Merge pull request #84 from calcom/fix-build

fix: build issues, extend event-type in types, use @calcom/types
This commit is contained in:
Agusti Fernandez Pardo authored and GitHub committed 2022-05-19 22:08:34 +02:00
commit 2e8f42c5d7
5 files changed
+42 -12

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)])
);