Scheduling infrastructure for absolutely everyone.
fix: event-types locations output schema apiv2 (#17150)
Morgan9ad69c20cf36
diff --git a/apps/api/v2/package.json b/apps/api/v2/package.jsonindex fd614d0666b..e920a5e21c6 100644--- a/apps/api/v2/package.json+++ b/apps/api/v2/package.json@@ -28,7 +28,7 @@"dependencies": {"@calcom/platform-constants": "*","@calcom/platform-enums": "*",- "@calcom/platform-libraries": "npm:@calcom/[email protected]",+ "@calcom/platform-libraries": "npm:@calcom/[email protected]","@calcom/platform-libraries-0.0.2": "npm:@calcom/[email protected]","@calcom/platform-types": "*","@calcom/platform-utils": "*",diff --git a/packages/lib/event-types/transformers/api-to-internal/locations.ts b/packages/lib/event-types/transformers/api-to-internal/locations.tsindex 432cc2a1a32..5143d7fd6ca 100644--- a/packages/lib/event-types/transformers/api-to-internal/locations.ts+++ b/packages/lib/event-types/transformers/api-to-internal/locations.ts@@ -69,10 +69,20 @@ const UserPhoneSchema = z.object({displayLocationPublicly: z.boolean().default(false),});+const ConferencingSchema = z.object({+ type: z.literal("conferencing"),+});+type InPersonLocation = z.infer<typeof InPersonSchema>;type LinkLocation = z.infer<typeof LinkSchema>;export type IntegrationLocation = z.infer<typeof IntegrationSchema>;type UserPhoneLocation = z.infer<typeof UserPhoneSchema>;-const TransformedLocationSchema = z.union([InPersonSchema, LinkSchema, IntegrationSchema, UserPhoneSchema]);+const TransformedLocationSchema = z.union([+ InPersonSchema,+ LinkSchema,+ IntegrationSchema,+ UserPhoneSchema,+ ConferencingSchema,+]);export const TransformedLocationsSchema = z.array(TransformedLocationSchema);