📈 Send onboarding replies to PostHog
This commit is contained in:
@ -37,6 +37,18 @@ const userCreatedEventSchema = userEvent.merge(
|
||||
})
|
||||
)
|
||||
|
||||
const userUpdatedEventSchema = userEvent.merge(
|
||||
z.object({
|
||||
name: z.literal('User updated'),
|
||||
data: z.object({
|
||||
name: z.string().optional(),
|
||||
onboardingCategories: z.array(z.string()).optional(),
|
||||
referral: z.string().optional(),
|
||||
company: z.string().optional(),
|
||||
}),
|
||||
})
|
||||
)
|
||||
|
||||
const typebotCreatedEventSchema = typebotEvent.merge(
|
||||
z.object({
|
||||
name: z.literal('Typebot created'),
|
||||
@ -129,6 +141,7 @@ export const eventSchema = z.discriminatedUnion('name', [
|
||||
subscriptionAutoUpdatedEventSchema,
|
||||
workspacePastDueEventSchema,
|
||||
workspaceNotPastDueEventSchema,
|
||||
userUpdatedEventSchema,
|
||||
])
|
||||
|
||||
export type TelemetryEvent = z.infer<typeof eventSchema>
|
||||
|
@ -14,6 +14,7 @@ export const userSchema = z.object({
|
||||
image: z.string().nullable(),
|
||||
company: z.string().nullable(),
|
||||
onboardingCategories: z.array(z.string()),
|
||||
referral: z.string().nullable(),
|
||||
graphNavigation: z.nativeEnum(GraphNavigation),
|
||||
preferredAppAppearance: z.string().nullable(),
|
||||
displayedInAppNotifications: displayedInAppNotificationsSchema.nullable(),
|
||||
|
Reference in New Issue
Block a user