Files
speckle-server/packages/server/modules/gatekeeperCore/domain/events.ts
T
Kristaps Fabians Geikins b55e197d00 chore(server): refactor seat updated to be its own event (#4214)
* chore(server): refactor seat updated to be its own event

* minor cleanup

* test fix
2025-03-19 12:17:27 +02:00

19 lines
669 B
TypeScript

import { WorkspacePlan } from '@/modules/gatekeeperCore/domain/billing'
export const gatekeeperEventNamespace = 'gatekeeper' as const
const eventPrefix = `${gatekeeperEventNamespace}.` as const
export const GatekeeperEvents = {
WorkspaceTrialExpired: `${eventPrefix}workspace-trial-expired`,
WorkspacePlanUpdated: `${eventPrefix}workspace-plan-updated`,
WorkspaceSeatUpdated: `${eventPrefix}workspace-seat-updated`
} as const
export type GatekeeperEventPayloads = {
[GatekeeperEvents.WorkspaceTrialExpired]: { workspaceId: string }
[GatekeeperEvents.WorkspacePlanUpdated]: {
workspacePlan: Pick<WorkspacePlan, 'name' | 'status' | 'workspaceId'>
}
}