51579b76ef
* fixed test util throwing + added new tests * more tests * more tests * various model tests * version tests * removed shitty old tests * lint fix * workspaceProjectsUpdated test * workspace updated on invite * workspace subs support team changes * tests fix * test fix hopefully?
30 lines
788 B
TypeScript
30 lines
788 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 ServerInvitesEventsKeys =
|
|
(typeof ServerInvitesEvents)[keyof typeof ServerInvitesEvents]
|
|
|
|
export type ServerInvitesEventsPayloads = {
|
|
[ServerInvitesEvents.Created]: {
|
|
invite: ServerInviteRecord
|
|
}
|
|
[ServerInvitesEvents.Finalized]: {
|
|
invite: ServerInviteRecord
|
|
finalizerUserId: string
|
|
accept: boolean
|
|
}
|
|
[ServerInvitesEvents.Canceled]: {
|
|
invite: ServerInviteRecord
|
|
cancelerUserId: string
|
|
}
|
|
}
|