refactor(server): client emit events (#12606)

* refactor(server): client emit events

* chore: test coverage
This commit is contained in:
Jason Rasmussen 2024-09-12 14:12:39 -04:00 committed by GitHub
parent 7b737786b3
commit ba57646f9f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 142 additions and 20 deletions

View file

@ -22,10 +22,24 @@ type EmitEventMap = {
'asset.untag': [{ assetId: string }];
'asset.hide': [{ assetId: string; userId: string }];
'asset.show': [{ assetId: string; userId: string }];
'asset.trash': [{ assetId: string; userId: string }];
'asset.delete': [{ assetId: string; userId: string }];
// asset bulk events
'assets.trash': [{ assetIds: string[]; userId: string }];
'assets.restore': [{ assetIds: string[]; userId: string }];
// session events
'session.delete': [{ sessionId: string }];
// stack events
'stack.create': [{ stackId: string; userId: string }];
'stack.update': [{ stackId: string; userId: string }];
'stack.delete': [{ stackId: string; userId: string }];
// stack bulk events
'stacks.delete': [{ stackIds: string[]; userId: string }];
// user events
'user.signup': [{ notify: boolean; id: string; tempPassword?: string }];
};