fix: build issues, extend event-type in types, use @calcom/types
This commit is contained in:
1 parent
7d8ed47268
commit
fdc46fac7d
5 files changed
+38
-20
No files matched your search
@@ -38,9 +38,9 @@ const schemaEventTypeCreateParams = z
|
||||
slug: z.string(),
|
||||
description: z.string().optional().nullable(),
|
||||
length: z.number().int(),
|
||||
locations: jsonSchema.optional().nullable().or(z.null()),
|
||||
metadata: z.any().optional().nullable().or(z.null()),
|
||||
recurringEvent: jsonSchema.optional().nullable().or(z.null()),
|
||||
locations: jsonSchema.optional(),
|
||||
metadata: z.any().optional(),
|
||||
recurringEvent: jsonSchema.optional(),
|
||||
})
|
||||
.strict();
|
||||
|
||||
|
||||
@@ -5,5 +5,5 @@ type Literal = boolean | number | string;
|
||||
type Json = Literal | { [key: string]: Json } | Json[];
|
||||
const literalSchema = z.union([z.string(), z.number(), z.boolean()]);
|
||||
export const jsonSchema: z.ZodSchema<Json> = z.lazy(() =>
|
||||
z.union([literalSchema, z.array(jsonSchema), z.record(jsonSchema)]).or(z.null())
|
||||
z.union([literalSchema, z.array(jsonSchema), z.record(jsonSchema)])
|
||||
);
|
||||
Reference in new issue
Block a user