fix: json validation
parent
957d6d2375
commit
35ebf53f19
|
@ -38,8 +38,8 @@ const schemaEventTypeCreateParams = z
|
||||||
slug: z.string(),
|
slug: z.string(),
|
||||||
description: z.string().optional().nullable(),
|
description: z.string().optional().nullable(),
|
||||||
length: z.number().int(),
|
length: z.number().int(),
|
||||||
// locations: jsonSchema.optional().nullable().or(z.null()),
|
locations: jsonSchema.optional().nullable().or(z.null()),
|
||||||
// metadata: z.any().optional().nullable().nullish(),
|
metadata: z.any().optional().nullable().or(z.null()),
|
||||||
recurringEvent: jsonSchema.optional().nullable().or(z.null()),
|
recurringEvent: jsonSchema.optional().nullable().or(z.null()),
|
||||||
})
|
})
|
||||||
.strict();
|
.strict();
|
||||||
|
@ -85,4 +85,10 @@ export const schemaEventTypeReadPublic = EventType.pick({
|
||||||
slotInterval: true,
|
slotInterval: true,
|
||||||
successRedirectUrl: true,
|
successRedirectUrl: true,
|
||||||
description: true,
|
description: true,
|
||||||
}).merge(z.object({ metadata: z.any(), locations: jsonSchema.or(z.null()) }));
|
}).merge(
|
||||||
|
z.object({
|
||||||
|
locations: jsonSchema.optional().nullable().or(z.null()),
|
||||||
|
metadata: z.any().optional().nullable().or(z.null()),
|
||||||
|
recurringEvent: jsonSchema.optional().nullable().or(z.null()),
|
||||||
|
})
|
||||||
|
);
|
||||||
|
|
Loading…
Reference in New Issue