chore: add auto recording (#22723)

* feat: add auto recording setting in API v2

* test: add e2e test

* test: add tests

* chore: save progress

* chore: update zod
This commit is contained in:
Udit Takkar authored and GitHub committed 2025-07-25 18:43:27 +00:00
1 parent 91ee225f14
commit 9ccf5f3723
8 files changed
+5810 -52

No files matched your search

+1 -1
View File
@@ -38,7 +38,7 @@
"@axiomhq/winston": "^1.2.0",
"@calcom/platform-constants": "*",
"@calcom/platform-enums": "*",
"@calcom/platform-libraries": "npm:@calcom/platform-libraries@0.0.258",
"@calcom/platform-libraries": "npm:@calcom/platform-libraries@0.0.266",
"@calcom/platform-types": "*",
"@calcom/platform-utils": "*",
"@calcom/prisma": "*",
@@ -967,6 +967,7 @@ describe("Event types Endpoints", () => {
calVideoSettings: {
disableRecordingForGuests: true,
disableRecordingForOrganizer: true,
enableAutomaticRecordingForOrganizer: true,
},
bookingFields: [
nameBookingField,
@@ -1095,6 +1096,9 @@ describe("Event types Endpoints", () => {
expect(updatedEventType.calVideoSettings?.disableRecordingForOrganizer).toEqual(
body.calVideoSettings?.disableRecordingForOrganizer
);
expect(updatedEventType.calVideoSettings?.enableAutomaticRecordingForOrganizer).toEqual(
body.calVideoSettings?.enableAutomaticRecordingForOrganizer
);
eventType.title = newTitle;
eventType.scheduleId = secondSchedule.id;
@@ -1115,6 +1119,7 @@ describe("Event types Endpoints", () => {
eventType.lockTimeZoneToggleOnBookingPage = updatedEventType.lockTimeZoneToggleOnBookingPage;
eventType.color = updatedEventType.color;
eventType.bookingFields = updatedEventType.bookingFields;
eventType.calVideoSettings = updatedEventType.calVideoSettings;
});
});
@@ -1871,6 +1876,7 @@ describe("Event types Endpoints", () => {
calVideoSettings: {
disableRecordingForGuests: true,
disableRecordingForOrganizer: true,
enableAutomaticRecordingForOrganizer: true,
},
locations: [
{
@@ -1893,6 +1899,7 @@ describe("Event types Endpoints", () => {
expect(createdEventType.locations).toEqual(body.locations);
expect(createdEventType.calVideoSettings?.disableRecordingForGuests).toEqual(true);
expect(createdEventType.calVideoSettings?.disableRecordingForOrganizer).toEqual(true);
expect(createdEventType.calVideoSettings?.enableAutomaticRecordingForOrganizer).toEqual(true);
firstCreatedEventType = responseBody.data;
});
});
+4
View File
@@ -15705,6 +15705,10 @@
"redirectUrlOnExit": {
"type": "object",
"description": "URL to which participants are redirected when they exit the call"
},
"enableAutomaticRecordingForOrganizer": {
"type": "boolean",
"description": "If true, enables the automatic recording for the event when organizer joins the call"
}
}
},
+4
View File
@@ -15705,6 +15705,10 @@
"redirectUrlOnExit": {
"type": "object",
"description": "URL to which participants are redirected when they exit the call"
},
"enableAutomaticRecordingForOrganizer": {
"type": "boolean",
"description": "If true, enables the automatic recording for the event when organizer joins the call"
}
}
},
@@ -145,6 +145,13 @@ export class CalVideoSettings {
description: "URL to which participants are redirected when they exit the call",
})
redirectUrlOnExit?: string | null;
@IsOptional()
@IsBoolean()
@DocsPropertyOptional({
description: "If true, enables the automatic recording for the event when organizer joins the call",
})
enableAutomaticRecordingForOrganizer?: boolean;
}
class BaseCreateEventTypeInput {
+7 -3
View File
@@ -7,9 +7,13 @@ import { MIN_EVENT_DURATION_MINUTES, MAX_EVENT_DURATION_MINUTES } from "@calcom/
const calVideoSettingsSchema = z
.object({
disableRecordingForGuests: z.boolean().optional().nullable(),
disableRecordingForOrganizer: z.boolean().optional().nullable(),
redirectUrlOnExit: z.string().url().optional().nullable(),
disableRecordingForGuests: z.boolean().nullish(),
disableRecordingForOrganizer: z.boolean().nullish(),
redirectUrlOnExit: z.string().url().nullish(),
enableAutomaticRecordingForOrganizer: z.boolean().nullish(),
enableAutomaticTranscription: z.boolean().nullish(),
disableTranscriptionForGuests: z.boolean().nullish(),
disableTranscriptionForOrganizer: z.boolean().nullish(),
})
.optional()
.nullable();
@@ -71,6 +71,10 @@ export const createHandler = async ({ ctx, input }: CreateOptions) => {
create: {
disableRecordingForGuests: calVideoSettings.disableRecordingForGuests ?? false,
disableRecordingForOrganizer: calVideoSettings.disableRecordingForOrganizer ?? false,
enableAutomaticTranscription: calVideoSettings.enableAutomaticTranscription ?? false,
enableAutomaticRecordingForOrganizer: calVideoSettings.enableAutomaticRecordingForOrganizer ?? false,
disableTranscriptionForGuests: calVideoSettings.disableTranscriptionForGuests ?? false,
disableTranscriptionForOrganizer: calVideoSettings.disableTranscriptionForOrganizer ?? false,
redirectUrlOnExit: calVideoSettings.redirectUrlOnExit ?? null,
},
};
+5776 -48
View File
File diff suppressed because it is too large. Load diff