refactor(server): event names (#12084)

This commit is contained in:
Jason Rasmussen 2024-08-27 18:06:50 -04:00 committed by GitHub
parent aac6a4b052
commit 0be3c4472f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
16 changed files with 55 additions and 54 deletions

View file

@ -6,19 +6,19 @@ export const IEventRepository = 'IEventRepository';
type EmitEventMap = {
// app events
onBootstrap: ['api' | 'microservices'];
onShutdown: [];
'app.bootstrap': ['api' | 'microservices'];
'app.shutdown': [];
// config events
onConfigUpdate: [{ newConfig: SystemConfig; oldConfig: SystemConfig }];
onConfigValidate: [{ newConfig: SystemConfig; oldConfig: SystemConfig }];
'config.update': [{ newConfig: SystemConfig; oldConfig: SystemConfig }];
'config.validate': [{ newConfig: SystemConfig; oldConfig: SystemConfig }];
// album events
onAlbumUpdate: [{ id: string; updatedBy: string }];
onAlbumInvite: [{ id: string; userId: string }];
'album.update': [{ id: string; updatedBy: string }];
'album.invite': [{ id: string; userId: string }];
// user events
onUserSignup: [{ notify: boolean; id: string; tempPassword?: string }];
'user.signup': [{ notify: boolean; id: string; tempPassword?: string }];
};
export type EmitEvent = keyof EmitEventMap;