bf80347abf
* feat(workspaces): delete workspace emit event * feat(workspaces): move workspace group metrics to the backend * Removed FE mixpanel group update * Remove fragment * test(gatekeeper): add unittest to new gatekeeper service --------- Co-authored-by: Mike Tasset <mike.tasset@gmail.com>
18 lines
605 B
TypeScript
18 lines
605 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`
|
|
} as const
|
|
|
|
export type GatekeeperEventPayloads = {
|
|
[GatekeeperEvents.WorkspaceTrialExpired]: { workspaceId: string }
|
|
[GatekeeperEvents.WorkspacePlanUpdated]: {
|
|
workspacePlan: Pick<WorkspacePlan, 'name' | 'status' | 'workspaceId'>
|
|
}
|
|
}
|