fix: build issues, extend event-type in types, use @calcom/types

This commit is contained in:
Agusti Fernandez Pardo committed 2022-05-19 22:00:22 +02:00
1 parent 7d8ed47268
commit fdc46fac7d
5 files changed
+38 -20

No files matched your search

+3 -3
View File
@@ -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();
+1 -1
View File
@@ -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)])
);