2
0

👷 Add email alert hourly sender

Closes #549
This commit is contained in:
Baptiste Arnaud
2023-06-06 13:25:13 +02:00
parent 40ef934740
commit a4cb6face8
16 changed files with 797 additions and 125 deletions

View File

@ -90,6 +90,16 @@ const workspaceLimitReachedEventSchema = workspaceEvent.merge(
})
)
const workspaceAutoQuarantinedEventSchema = workspaceEvent.merge(
z.object({
name: z.literal('Workspace automatically quarantined'),
data: z.object({
chatsLimit: z.number(),
totalChatsUsed: z.number(),
}),
})
)
export const eventSchema = z.discriminatedUnion('name', [
workspaceCreatedEventSchema,
userCreatedEventSchema,
@ -98,6 +108,7 @@ export const eventSchema = z.discriminatedUnion('name', [
subscriptionUpdatedEventSchema,
newResultsCollectedEventSchema,
workspaceLimitReachedEventSchema,
workspaceAutoQuarantinedEventSchema,
])
export type TelemetryEvent = z.infer<typeof eventSchema>