2
0

🐛 (billing) Set invoicing behavior to "always invoice" to fix double payment issue

This commit is contained in:
Baptiste Arnaud
2023-11-14 16:00:10 +01:00
parent 6c0f28b3e4
commit a1d7415227
4 changed files with 73 additions and 2 deletions

View File

@ -66,6 +66,15 @@ const subscriptionUpdatedEventSchema = workspaceEvent.merge(
})
)
const subscriptionAutoUpdatedEventSchema = workspaceEvent.merge(
z.object({
name: z.literal('Subscription automatically updated'),
data: z.object({
plan: z.nativeEnum(Plan),
}),
})
)
const newResultsCollectedEventSchema = typebotEvent.merge(
z.object({
name: z.literal('New results collected'),
@ -105,6 +114,7 @@ export const eventSchema = z.discriminatedUnion('name', [
newResultsCollectedEventSchema,
workspaceLimitReachedEventSchema,
workspaceAutoQuarantinedEventSchema,
subscriptionAutoUpdatedEventSchema,
])
export type TelemetryEvent = z.infer<typeof eventSchema>