feat: support updating cal video settings in API v2 (#21784)

* feat: support updating cal video settings in API v2

* chore: update descriptio

* feat: support create event type

* test: add test for updating event type

* test: add test for create event type

* chore: undo openapi

* chore: bump libraries

* Revert "chore: bump libraries"

This reverts commit bdf36d09b021fc531497a7b7ea66ab9c52b7d136.

* chore: bump libraries

---------

Co-authored-by: Lauris Skraucis <[email protected]>
Co-authored-by: supalarry <[email protected]>
This commit is contained in:
authored and GitHub committed 2025-06-13 12:05:29 +03:00
1 parent 8de4897042
commit ba8a71bf3a
15 files changed
+669 -2443

No files matched your search

+11 -1
View File
@@ -5,6 +5,15 @@ import { MIN_EVENT_DURATION_MINUTES, MAX_EVENT_DURATION_MINUTES } from "@calcom/
// TODO: figure out why EventTypeModel is being called even if it's not imported here, causing a circular dependency
// import { _EventTypeModel } from "../eventtype";
const calVideoSettingsSchema = z
.object({
disableRecordingForGuests: z.boolean().optional().nullable(),
disableRecordingForOrganizer: z.boolean().optional().nullable(),
redirectUrlOnExit: z.string().url().optional().nullable(),
})
.optional()
.nullable();
export const createEventTypeInput = z.object({
title: z.string().min(1),
slug: imports.eventTypeSlug,
@@ -20,7 +29,8 @@ export const createEventTypeInput = z.object({
minimumBookingNotice: z.number().int().min(0).optional(),
beforeEventBuffer: z.number().int().min(0).optional(),
afterEventBuffer: z.number().int().min(0).optional(),
scheduleId: z.number().int().optional()
scheduleId: z.number().int().optional(),
calVideoSettings: calVideoSettingsSchema
})
.partial({ hidden: true, locations: true })
.refine((data) => (data.teamId ? data.teamId && data.schedulingType : true), {