b55e197d00
* chore(server): refactor seat updated to be its own event * minor cleanup * test fix
19 lines
669 B
TypeScript
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'>
|
|
}
|
|
}
|