fix: allow int for profileId

This commit is contained in:
Carl-Gerhard Lindesvärd
2026-01-20 13:06:35 +01:00
parent 5830277ba9
commit cf1bf95388

View File

@@ -6,7 +6,7 @@ export const zTrackPayload = z
.object({
name: z.string().min(1),
properties: z.record(z.unknown()).optional(),
profileId: z.string().optional(),
profileId: z.string().or(z.number()).optional(),
})
.refine((data) => !RESERVED_EVENT_NAMES.includes(data.name as any), {
message: `Event name cannot be one of the reserved names: ${RESERVED_EVENT_NAMES.join(', ')}`,