aee14edc5b
* got rid of models emitter + added tests * got rid of projects emitter + added tests * replaced user event bus * test migrate
27 lines
684 B
TypeScript
27 lines
684 B
TypeScript
import { ServerInviteRecord } from '@/modules/serverinvites/domain/types'
|
|
|
|
export const serverinvitesEventNamespace = 'serverinvites' as const
|
|
|
|
const prefix = `${serverinvitesEventNamespace}.` as const
|
|
|
|
export const ServerInvitesEvents = {
|
|
Created: `${prefix}created`,
|
|
Finalized: `${prefix}finalized`,
|
|
Canceled: `${prefix}canceled`
|
|
} as const
|
|
|
|
export type ServerInvitesEventsPayloads = {
|
|
[ServerInvitesEvents.Created]: {
|
|
invite: ServerInviteRecord
|
|
}
|
|
[ServerInvitesEvents.Finalized]: {
|
|
invite: ServerInviteRecord
|
|
finalizerUserId: string
|
|
accept: boolean
|
|
}
|
|
[ServerInvitesEvents.Canceled]: {
|
|
invite: ServerInviteRecord
|
|
cancelerUserId: string
|
|
}
|
|
}
|