2
0

📈 (posthog) Send user last login event

This commit is contained in:
Baptiste Arnaud
2024-03-04 10:04:48 +01:00
parent 8846cdbf6b
commit 434b06767d
3 changed files with 22 additions and 1 deletions

View File

@@ -37,6 +37,12 @@ const userCreatedEventSchema = userEvent.merge(
})
)
const userLoggedInEventSchema = userEvent.merge(
z.object({
name: z.literal('User logged in'),
})
)
const userUpdatedEventSchema = userEvent.merge(
z.object({
name: z.literal('User updated'),
@@ -173,6 +179,7 @@ export const clientSideEvents = [removedBrandingEventSchema] as const
export const eventSchema = z.discriminatedUnion('name', [
workspaceCreatedEventSchema,
userCreatedEventSchema,
userLoggedInEventSchema,
typebotCreatedEventSchema,
publishedTypebotEventSchema,
subscriptionUpdatedEventSchema,