Files
speckle-server/packages/server/modules/serverinvites/domain/events.ts
T
Kristaps Fabians Geikins 51579b76ef fix(server): various fixes related to subs + further improved utils + way quicker tests (#3573)
* 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?
2024-12-02 13:30:24 +02:00

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
}
}