fix: event-types locations output schema apiv2 (#17150)
This commit is contained in:
1 parent
9a5efd39ce
commit
9ad69c20cf
2 files changed
+12
-2
No files matched your search
@@ -28,7 +28,7 @@
|
||||
"dependencies": {
|
||||
"@calcom/platform-constants": "*",
|
||||
"@calcom/platform-enums": "*",
|
||||
"@calcom/platform-libraries": "npm:@calcom/platform-libraries@0.0.45",
|
||||
"@calcom/platform-libraries": "npm:@calcom/platform-libraries@0.0.46",
|
||||
"@calcom/platform-libraries-0.0.2": "npm:@calcom/platform-libraries@0.0.2",
|
||||
"@calcom/platform-types": "*",
|
||||
"@calcom/platform-utils": "*",
|
||||
|
||||
@@ -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);
|
||||
Reference in new issue
Block a user