Skip to content

Scheduling infrastructure for absolutely everyone.

feat: Round Robin groups (#22296)

Carina Wollendorfere29b7e83b8ea
diff --git a/apps/web/components/booking/BookingListItem.tsx b/apps/web/components/booking/BookingListItem.tsx
index f172d15721a..b5c97a7bbb5 100644
--- a/apps/web/components/booking/BookingListItem.tsx
+++ b/apps/web/components/booking/BookingListItem.tsx
@@ -546,9 +546,7 @@ function BookingListItem(booking: BookingItemProps) {
</Link>
</div>
</div>
- <div
- data-testid="title-and-attendees"
- className={`w-full px-4${isRejected ? " line-through" : ""}`}>
+ <div data-testid="title-and-attendees" className={`w-full px-4${isRejected ? "line-through" : ""}`}>
<Link href={bookingLink}>
{/* Time and Badges for mobile */}
<div className="w-full pb-2 pt-4 sm:hidden">
@@ -893,7 +891,7 @@ const FirstAttendee = ({
) : (
<a
key={user.email}
- className=" hover:text-blue-500"
+ className="hover:text-blue-500"
href={`mailto:${user.email}`}
onClick={(e) => e.stopPropagation()}>
{user.name || user.email}
@@ -1081,7 +1079,7 @@ const GroupedAttendees = (groupedAttendeeProps: GroupedAttendeeProps) => {
/>
))}
<DropdownMenuSeparator />
- <div className="flex justify-end p-2 ">
+ <div className="flex justify-end p-2">
<Button
data-testid="update-no-show"
color="secondary"
@@ -1204,7 +1202,7 @@ const GroupedGuests = ({ guests }: { guests: AttendeeProps[] }) => {
</DropdownMenuItem>
))}
<DropdownMenuSeparator />
- <div className="flex justify-end space-x-2 p-2 ">
+ <div className="flex justify-end space-x-2 p-2">
<Link href={`mailto:${selectedEmail}`}>
<Button
color="secondary"
diff --git a/apps/web/components/booking/bookingActions.test.ts b/apps/web/components/booking/bookingActions.test.ts
index 29a77b71d42..14981596e75 100644
--- a/apps/web/components/booking/bookingActions.test.ts
+++ b/apps/web/components/booking/bookingActions.test.ts
@@ -278,13 +278,14 @@ describe("Booking Actions", () => {
expect(rerouteAction).toBeDefined();
});
- it("should include reassign action for round robin events", () => {
+ it("should include reassign action for round robin events with no host groups", () => {
const context = createMockContext({
booking: {
...createMockContext().booking,
eventType: {
...createMockContext().booking.eventType,
schedulingType: SchedulingType.ROUND_ROBIN,
+ hostGroups: [],
},
},
});
@@ -294,6 +295,60 @@ describe("Booking Actions", () => {
expect(reassignAction).toBeDefined();
});
+ it("should include reassign action for round robin events with one host group", () => {
+ const context = createMockContext({
+ booking: {
+ ...createMockContext().booking,
+ eventType: {
+ ...createMockContext().booking.eventType,
+ schedulingType: SchedulingType.ROUND_ROBIN,
+ hostGroups: [{ id: "group-1", name: "Group 1" }],
+ },
+ },
+ });
+ const actions = getEditEventActions(context);
+
+ const reassignAction = actions.find((a) => a.id === "reassign");
+ expect(reassignAction).toBeDefined();
+ });
+
+ it("should exclude reassign action for round robin events with more than one host groups", () => {
+ const context = createMockContext({
+ booking: {
+ ...createMockContext().booking,
+ eventType: {
+ ...createMockContext().booking.eventType,
+ schedulingType: SchedulingType.ROUND_ROBIN,
+ hostGroups: [
+ { id: "group-1", name: "Group 1" },
+ { id: "group-2", name: "Group 2" },
+ ],
+ },
+ },
+ });
+ const actions = getEditEventActions(context);
+
+ const reassignAction = actions.find((a) => a.id === "reassign");
+ expect(reassignAction).toBeUndefined();
+ });
+
+ it("should exclude reassign action for non-round-robin events", () => {
+ const context = createMockContext({
+ booking: {
+ ...createMockContext().booking,
+ eventType: {
+ ...createMockContext().booking.eventType,
+ schedulingType: SchedulingType.COLLECTIVE,
+ hostGroups: [],
+ },
+ },
+ });
+ const actions = getEditEventActions(context);
+
+ const reassignAction = actions.find((a) => a.id === "reassign");
+ expect(reassignAction).toBeUndefined();
+ });
+
it("should exclude add_members when guests are disabled", () => {
const context = createMockContext({
booking: {
diff --git a/apps/web/components/booking/bookingActions.ts b/apps/web/components/booking/bookingActions.ts
index e0fbed746bd..f28647c17d3 100644
--- a/apps/web/components/booking/bookingActions.ts
+++ b/apps/web/components/booking/bookingActions.ts
@@ -146,8 +146,9 @@ export function getEditEventActions(context: BookingActionContext): ActionType[]
icon: "user-plus",
disabled: false,
},
- // Reassign (if round robin)
- booking.eventType.schedulingType === SchedulingType.ROUND_ROBIN
+ // Reassign if round robin with no or one host groups
+ booking.eventType.schedulingType === SchedulingType.ROUND_ROBIN &&
+ (!booking.eventType.hostGroups || booking.eventType.hostGroups?.length <= 1)
? {
id: "reassign",
label: t("reassign"),
diff --git a/apps/web/public/static/locales/en/common.json b/apps/web/public/static/locales/en/common.json
index 7f294dbc14c..af7919c1551 100644
--- a/apps/web/public/static/locales/en/common.json
+++ b/apps/web/public/static/locales/en/common.json
@@ -120,7 +120,7 @@
"already_signed_up_for_this_booking_error": "You are already signed up for this booking.",
"hosts_unavailable_for_booking": "Some of the hosts are unavailable for booking.",
"fixed_hosts_unavailable_for_booking": "Some of the fixed hosts are unavailable for booking.",
- "round_robin_hosts_unavailable_for_booking": "No Round Robin hosts is available for booking.",
+ "round_robin_host_unavailable_for_booking": "Round Robin host is unavailable for booking.",
"help": "Help",
"price": "Price",
"paid": "Paid",
@@ -349,6 +349,7 @@
"available_apps_lower_case": "Available apps",
"available_apps_desc": "View popular apps below and explore more in our <0>App Store</0>",
"fixed_host_helper": "Add anyone who needs to attend the event. <0>Learn more</0>",
+ "round_robin_groups_helper": "People in a group take turns, one person of each group will show up for the event.",
"round_robin_helper": "People in the group take turns and only one person will show up for the event.",
"check_email_reset_password": "Check your email. We sent you a link to reset your password.",
"finish": "Finish",
@@ -3362,6 +3363,7 @@
"use_booker_timezone_info": "Apply the selected restriction schedule in the booker's timezone",
"load_balancing_warning": "This will disable Load Balancing on all your Round Robin event types",
"rr_load_balancing_disabled": "Load Balancing is only available when the timestamp basis is set to Booking Creation Time",
+ "rr_load_balancing_disabled_with_groups": "Load Balancing is not available with Round Robin Groups",
"round_robin_settings_description": "Customize the default round robin settings for this team",
"round_robin_settings_updated_successfully": "Round Robin settings updated successfully",
"booking_creation_time": "Booking Creation Time",
@@ -3378,6 +3380,7 @@
"booking_not_allowed_by_restriction_schedule_error": "Booking outside restriction schedule availability.",
"restriction_schedule_not_found_error": "Restriction schedule not found",
"converted_image_size_limit_exceed": "Image size limit exceeded, please use a smaller image preferably in JPEG format",
+ "add_group": "Add Group",
"routing_funnel": "Routing Funnel",
"routing_funnel_total_submissions": "Total Submissions",
"routing_funnel_successful_routings": "Successful Routings",
diff --git a/apps/web/test/lib/getSchedule.test.ts b/apps/web/test/lib/getSchedule.test.ts
index b6919290422..d0bb7c218d4 100644
--- a/apps/web/test/lib/getSchedule.test.ts
+++ b/apps/web/test/lib/getSchedule.test.ts
@@ -1,4 +1,5 @@
import CalendarManagerMock from "../../../../tests/libs/__mocks__/CalendarManager";
+import { constantsScenarios } from "@calcom/lib/__mocks__/constants";
import {
getDate,
@@ -23,12 +24,12 @@ import { expect, expectedSlotsForSchedule } from "./getSchedule/expects";
import { setupAndTeardown } from "./getSchedule/setupAndTeardown";
import { timeTravelToTheBeginningOfToday } from "./getSchedule/utils";
-vi.mock("@calcom/lib/constants", () => ({
- IS_PRODUCTION: true,
+constantsScenarios.set({
+ IS_PRODUCTION: true as any,
WEBAPP_URL: "http://localhost:3000",
- RESERVED_SUBDOMAINS: ["auth", "docs"],
- SINGLE_ORG_SLUG: "",
-}));
+ RESERVED_SUBDOMAINS: ["auth", "docs"] as any,
+ SINGLE_ORG_SLUG: "" as any,
+});
describe("getSchedule", () => {
const availableSlotsService = getAvailableSlotsService();
diff --git a/apps/web/test/utils/bookingScenario/bookingScenario.ts b/apps/web/test/utils/bookingScenario/bookingScenario.ts
index cdb8b7e9a9d..0869ef6c003 100644
--- a/apps/web/test/utils/bookingScenario/bookingScenario.ts
+++ b/apps/web/test/utils/bookingScenario/bookingScenario.ts
@@ -121,6 +121,7 @@ type InputHost = {
userId: number;
isFixed?: boolean;
scheduleId?: number | null;
+ groupId?: string | null;
};
type InputSelectedSlot = {
@@ -215,6 +216,7 @@ export type InputEventType = {
useEventLevelSelectedCalendars?: boolean;
users?: { id: number }[];
hosts?: InputHost[];
+ hostGroups?: { id: string; name: string }[];
schedulingType?: SchedulingType;
parent?: { id: number };
beforeEventBuffer?: number;
@@ -290,6 +292,17 @@ export const Timezones = {
async function addHostsToDb(eventTypes: InputEventType[]) {
for (const eventType of eventTypes) {
+ // Create host groups first if they exist
+ if (eventType.hostGroups?.length) {
+ await prismock.hostGroup.createMany({
+ data: eventType.hostGroups.map((group) => ({
+ id: group.id, // Preserve the input ID
+ name: group.name,
+ eventTypeId: eventType.id,
+ })),
+ });
+ }
+
if (!eventType.hosts?.length) continue;
for (const host of eventType.hosts) {
const data: Prisma.HostCreateInput = {
@@ -311,6 +324,13 @@ async function addHostsToDb(eventTypes: InputEventType[]) {
},
}
: undefined,
+ group: host.groupId
+ ? {
+ connect: {
+ id: host.groupId,
+ },
+ }
+ : undefined,
};
await prismock.host.create({
@@ -363,6 +383,7 @@ export async function addEventTypesToDb(
workflows: true,
destinationCalendar: true,
schedule: true,
+ hostGroups: true,
},
});
@@ -473,6 +494,7 @@ export async function addEventTypes(eventTypes: InputEventType[], usersStore: In
workflows: [],
users,
hosts,
+ hostGroups: eventType.hostGroups || [],
destinationCalendar: eventType.destinationCalendar
? {
create: eventType.destinationCalendar,
diff --git a/docs/api-reference/v2/openapi.json b/docs/api-reference/v2/openapi.json
index 8fa97692b50..3e061b63def 100644
--- a/docs/api-reference/v2/openapi.json
+++ b/docs/api-reference/v2/openapi.json
@@ -69,9 +69,7 @@
}
}
},
- "tags": [
- "Platform / Managed Users"
- ]
+ "tags": ["Platform / Managed Users"]
},
"post": {
"operationId": "OAuthClientUsersController_createUser",
@@ -117,9 +115,7 @@
}
}
},
- "tags": [
- "Platform / Managed Users"
- ]
+ "tags": ["Platform / Managed Users"]
}
},
"/v2/oauth-clients/{clientId}/users/{userId}": {
@@ -165,9 +161,7 @@
}
}
},
- "tags": [
- "Platform / Managed Users"
- ]
+ "tags": ["Platform / Managed Users"]
},
"patch": {
"operationId": "OAuthClientUsersController_updateUser",
@@ -221,9 +215,7 @@
}
}
},
- "tags": [
- "Platform / Managed Users"
- ]
+ "tags": ["Platform / Managed Users"]
},
"delete": {
"operationId": "OAuthClientUsersController_deleteUser",
@@ -267,9 +259,7 @@
}
}
},
- "tags": [
- "Platform / Managed Users"
- ]
+ "tags": ["Platform / Managed Users"]
}
},
"/v2/oauth-clients/{clientId}/users/{userId}/force-refresh": {
@@ -316,9 +306,7 @@
}
}
},
- "tags": [
- "Platform / Managed Users"
- ]
+ "tags": ["Platform / Managed Users"]
}
},
"/v2/oauth/{clientId}/refresh": {
@@ -367,9 +355,7 @@
}
}
},
- "tags": [
- "Platform / Managed Users"
- ]
+ "tags": ["Platform / Managed Users"]
}
},
"/v2/oauth-clients/{clientId}/webhooks": {
@@ -417,9 +403,7 @@
}
}
},
- "tags": [
- "Platform / Webhooks"
- ]
+ "tags": ["Platform / Webhooks"]
},
"get": {
"operationId": "OAuthClientWebhooksController_getOAuthClientWebhooks",
@@ -480,9 +464,7 @@
}
}
},
- "tags": [
- "Platform / Webhooks"
- ]
+ "tags": ["Platform / Webhooks"]
},
"delete": {
"operationId": "OAuthClientWebhooksController_deleteAllOAuthClientWebhooks",
@@ -518,9 +500,7 @@
}
}
},
- "tags": [
- "Platform / Webhooks"
- ]
+ "tags": ["Platform / Webhooks"]
}
},
"/v2/oauth-clients/{clientId}/webhooks/{webhookId}": {
@@ -568,9 +548,7 @@
}
}
},
- "tags": [
- "Platform / Webhooks"
- ]
+ "tags": ["Platform / Webhooks"]
},
"get": {
"operationId": "OAuthClientWebhooksController_getOAuthClientWebhook",
@@ -598,9 +576,7 @@
}
}
},
- "tags": [
- "Platform / Webhooks"
- ]
+ "tags": ["Platform / Webhooks"]
},
"delete": {
"operationId": "OAuthClientWebhooksController_deleteOAuthClientWebhook",
@@ -628,9 +604,7 @@
}
}
},
- "tags": [
- "Platform / Webhooks"
- ]
+ "tags": ["Platform / Webhooks"]
}
},
"/v2/organizations/{orgId}/attributes": {
@@ -693,9 +667,7 @@
}
}
},
- "tags": [
- "Orgs / Attributes"
- ]
+ "tags": ["Orgs / Attributes"]
},
"post": {
"operationId": "OrganizationsAttributesController_createOrganizationAttribute",
@@ -741,9 +713,7 @@
}
}
},
- "tags": [
- "Orgs / Attributes"
- ]
+ "tags": ["Orgs / Attributes"]
}
},
"/v2/organizations/{orgId}/attributes/{attributeId}": {
@@ -789,9 +759,7 @@
}
}
},
- "tags": [
- "Orgs / Attributes"
- ]
+ "tags": ["Orgs / Attributes"]
},
"patch": {
"operationId": "OrganizationsAttributesController_updateOrganizationAttribute",
@@ -845,9 +813,7 @@
}
}
},
- "tags": [
- "Orgs / Attributes"
- ]
+ "tags": ["Orgs / Attributes"]
},
"delete": {
"operationId": "OrganizationsAttributesController_deleteOrganizationAttribute",
@@ -891,9 +857,7 @@
}
}
},
- "tags": [
- "Orgs / Attributes"
- ]
+ "tags": ["Orgs / Attributes"]
}
},
"/v2/organizations/{orgId}/attributes/{attributeId}/options": {
@@ -949,9 +913,7 @@
}
}
},
- "tags": [
- "Orgs / Attributes / Options"
- ]
+ "tags": ["Orgs / Attributes / Options"]
},
"get": {
"operationId": "OrganizationsAttributesOptionsController_getOrganizationAttributeOptions",
@@ -995,9 +957,7 @@
}
}
},
- "tags": [
- "Orgs / Attributes / Options"
- ]
+ "tags": ["Orgs / Attributes / Options"]
}
},
"/v2/organizations/{orgId}/attributes/{attributeId}/options/{optionId}": {
@@ -1051,9 +1011,7 @@
}
}
},
- "tags": [
- "Orgs / Attributes / Options"
- ]
+ "tags": ["Orgs / Attributes / Options"]
},
"patch": {
"operationId": "OrganizationsAttributesOptionsController_updateOrganizationAttributeOption",
@@ -1115,9 +1073,7 @@
}
}
},
- "tags": [
- "Orgs / Attributes / Options"
- ]
+ "tags": ["Orgs / Attributes / Options"]
}
},
"/v2/organizations/{orgId}/attributes/{attributeId}/options/assigned": {
@@ -1207,9 +1163,7 @@
}
}
},
- "tags": [
- "Orgs / Attributes / Options"
- ]
+ "tags": ["Orgs / Attributes / Options"]
}
},
"/v2/organizations/{orgId}/attributes/slugs/{attributeSlug}/options/assigned": {
@@ -1299,9 +1253,7 @@
}
}
},
- "tags": [
- "Orgs / Attributes / Options"
- ]
+ "tags": ["Orgs / Attributes / Options"]
}
},
"/v2/organizations/{orgId}/attributes/options/{userId}": {
@@ -1357,9 +1309,7 @@
}
}
},
- "tags": [
- "Orgs / Attributes / Options"
- ]
+ "tags": ["Orgs / Attributes / Options"]
},
"get": {
"operationId": "OrganizationsAttributesOptionsController_getOrganizationAttributeOptionsForUser",
@@ -1403,9 +1353,7 @@
}
}
},
- "tags": [
- "Orgs / Attributes / Options"
- ]
+ "tags": ["Orgs / Attributes / Options"]
}
},
"/v2/organizations/{orgId}/attributes/options/{userId}/{attributeOptionId}": {
@@ -1459,9 +1407,7 @@
}
}
},
- "tags": [
- "Orgs / Attributes / Options"
- ]
+ "tags": ["Orgs / Attributes / Options"]
}
},
"/v2/organizations/{orgId}/bookings": {
@@ -1506,13 +1452,7 @@
"type": "array",
"items": {
"type": "string",
- "enum": [
- "upcoming",
- "recurring",
- "past",
- "cancelled",
- "unconfirmed"
- ]
+ "enum": ["upcoming", "recurring", "past", "cancelled", "unconfirmed"]
}
}
},
@@ -1653,10 +1593,7 @@
"description": "Sort results by their start time in ascending or descending order.",
"example": "?sortStart=asc OR ?sortStart=desc",
"schema": {
- "enum": [
- "asc",
- "desc"
- ],
+ "enum": ["asc", "desc"],
"type": "string"
}
},
@@ -1667,10 +1604,7 @@
"description": "Sort results by their end time in ascending or descending order.",
"example": "?sortEnd=asc OR ?sortEnd=desc",
"schema": {
- "enum": [
- "asc",
- "desc"
- ],
+ "enum": ["asc", "desc"],
"type": "string"
}
},
@@ -1681,10 +1615,7 @@
"description": "Sort results by their creation time (when booking was made) in ascending or descending order.",
"example": "?sortCreated=asc OR ?sortCreated=desc",
"schema": {
- "enum": [
- "asc",
- "desc"
- ],
+ "enum": ["asc", "desc"],
"type": "string"
}
},
@@ -1695,10 +1626,7 @@
"description": "Sort results by their updated time (for example when booking status changes) in ascending or descending order.",
"example": "?sortUpdated=asc OR ?sortUpdated=desc",
"schema": {
- "enum": [
- "asc",
- "desc"
- ],
+ "enum": ["asc", "desc"],
"type": "string"
}
},
@@ -1755,9 +1683,7 @@
}
}
},
- "tags": [
- "Orgs / Bookings"
- ]
+ "tags": ["Orgs / Bookings"]
}
},
"/v2/organizations/{orgId}/delegation-credentials": {
@@ -1823,9 +1749,7 @@
}
}
},
- "tags": [
- "Orgs / Delegation Credentials"
- ]
+ "tags": ["Orgs / Delegation Credentials"]
}
},
"/v2/organizations/{orgId}/delegation-credentials/{credentialId}": {
@@ -1899,9 +1823,7 @@
}
}
},
- "tags": [
- "Orgs / Delegation Credentials"
- ]
+ "tags": ["Orgs / Delegation Credentials"]
}
},
"/v2/organizations/{orgId}/memberships": {
@@ -1982,9 +1904,7 @@
}
}
},
- "tags": [
- "Orgs / Memberships"
- ]
+ "tags": ["Orgs / Memberships"]
},
"post": {
"operationId": "OrganizationsMembershipsController_createMembership",
@@ -2048,9 +1968,7 @@
}
}
},
- "tags": [
- "Orgs / Memberships"
- ]
+ "tags": ["Orgs / Memberships"]
}
},
"/v2/organizations/{orgId}/memberships/{membershipId}": {
@@ -2114,9 +2032,7 @@
}
}
},
- "tags": [
- "Orgs / Memberships"
- ]
+ "tags": ["Orgs / Memberships"]
},
"delete": {
"operationId": "OrganizationsMembershipsController_deleteMembership",
@@ -2178,9 +2094,7 @@
}
}
},
- "tags": [
- "Orgs / Memberships"
- ]
+ "tags": ["Orgs / Memberships"]
},
"patch": {
"operationId": "OrganizationsMembershipsController_updateMembership",
@@ -2252,9 +2166,7 @@
}
}
},
- "tags": [
- "Orgs / Memberships"
- ]
+ "tags": ["Orgs / Memberships"]
}
},
"/v2/organizations/{orgId}/routing-forms": {
@@ -2303,10 +2215,7 @@
"in": "query",
"description": "Sort by creation time",
"schema": {
- "enum": [
- "asc",
- "desc"
- ],
+ "enum": ["asc", "desc"],
"type": "string"
}
},
@@ -2316,10 +2225,7 @@
"in": "query",
"description": "Sort by update time",
"schema": {
- "enum": [
- "asc",
- "desc"
- ],
+ "enum": ["asc", "desc"],
"type": "string"
}
},
@@ -2398,9 +2304,7 @@
}
}
},
- "tags": [
- "Orgs / Routing forms"
- ]
+ "tags": ["Orgs / Routing forms"]
}
},
"/v2/organizations/{orgId}/routing-forms/{routingFormId}/responses": {
@@ -2457,10 +2361,7 @@
"in": "query",
"description": "Sort by creation time",
"schema": {
- "enum": [
- "asc",
- "desc"
- ],
+ "enum": ["asc", "desc"],
"type": "string"
}
},
@@ -2470,10 +2371,7 @@
"in": "query",
"description": "Sort by update time",
"schema": {
- "enum": [
- "asc",
- "desc"
- ],
+ "enum": ["asc", "desc"],
"type": "string"
}
},
@@ -2539,9 +2437,7 @@
}
}
},
- "tags": [
- "Orgs / Routing forms"
- ]
+ "tags": ["Orgs / Routing forms"]
},
"post": {
"operationId": "OrganizationsRoutingFormsResponsesController_createRoutingFormResponse",
@@ -2619,10 +2515,7 @@
"description": "Format of slot times in response. Use 'range' to get start and end times.",
"example": "range",
"schema": {
- "enum": [
- "range",
- "time"
- ],
+ "enum": ["range", "time"],
"type": "string"
}
},
@@ -2659,9 +2552,7 @@
}
}
},
- "tags": [
- "Orgs / Routing forms"
- ]
+ "tags": ["Orgs / Routing forms"]
}
},
"/v2/organizations/{orgId}/routing-forms/{routingFormId}/responses/{responseId}": {
@@ -2725,9 +2616,7 @@
}
}
},
- "tags": [
- "Orgs / Routing forms"
- ]
+ "tags": ["Orgs / Routing forms"]
}
},
"/v2/organizations/{orgId}/schedules": {
@@ -2808,9 +2697,7 @@
}
}
},
- "tags": [
- "Orgs / Schedules"
- ]
+ "tags": ["Orgs / Schedules"]
}
},
"/v2/organizations/{orgId}/teams": {
@@ -2891,9 +2778,7 @@
}
}
},
- "tags": [
- "Orgs / Teams"
- ]
+ "tags": ["Orgs / Teams"]
},
"post": {
"operationId": "OrganizationsTeamsController_createTeam",
@@ -2957,9 +2842,7 @@
}
}
},
- "tags": [
- "Orgs / Teams"
- ]
+ "tags": ["Orgs / Teams"]
}
},
"/v2/organizations/{orgId}/teams/me": {
@@ -3040,9 +2923,7 @@
}
}
},
- "tags": [
- "Orgs / Teams"
- ]
+ "tags": ["Orgs / Teams"]
}
},
"/v2/organizations/{orgId}/teams/{teamId}": {
@@ -3090,9 +2971,7 @@
}
}
},
- "tags": [
- "Orgs / Teams"
- ]
+ "tags": ["Orgs / Teams"]
},
"delete": {
"operationId": "OrganizationsTeamsController_deleteTeam",
@@ -3154,9 +3033,7 @@
}
}
},
- "tags": [
- "Orgs / Teams"
- ]
+ "tags": ["Orgs / Teams"]
},
"patch": {
"operationId": "OrganizationsTeamsController_updateTeam",
@@ -3228,9 +3105,7 @@
}
}
},
- "tags": [
- "Orgs / Teams"
- ]
+ "tags": ["Orgs / Teams"]
}
},
"/v2/organizations/{orgId}/teams/{teamId}/bookings": {
@@ -3275,13 +3150,7 @@
"type": "array",
"items": {
"type": "string",
- "enum": [
- "upcoming",
- "recurring",
- "past",
- "cancelled",
- "unconfirmed"
- ]
+ "enum": ["upcoming", "recurring", "past", "cancelled", "unconfirmed"]
}
}
},
@@ -3352,10 +3221,7 @@
"description": "Sort results by their start time in ascending or descending order.",
"example": "?sortStart=asc OR ?sortStart=desc",
"schema": {
- "enum": [
- "asc",
- "desc"
- ],
+ "enum": ["asc", "desc"],
"type": "string"
}
},
@@ -3366,10 +3232,7 @@
"description": "Sort results by their end time in ascending or descending order.",
"example": "?sortEnd=asc OR ?sortEnd=desc",
"schema": {
- "enum": [
- "asc",
- "desc"
- ],
+ "enum": ["asc", "desc"],
"type": "string"
}
},
@@ -3380,10 +3243,7 @@
"description": "Sort results by their creation time (when booking was made) in ascending or descending order.",
"example": "?sortCreated=asc OR ?sortCreated=desc",
"schema": {
- "enum": [
- "asc",
- "desc"
- ],
+ "enum": ["asc", "desc"],
"type": "string"
}
},
@@ -3439,9 +3299,7 @@
}
}
},
- "tags": [
- "Orgs / Teams / Bookings"
- ]
+ "tags": ["Orgs / Teams / Bookings"]
}
},
"/v2/organizations/{orgId}/teams/{teamId}/bookings/{bookingUid}/references": {
@@ -3515,9 +3373,7 @@
}
}
},
- "tags": [
- "Orgs / Teams / Bookings"
- ]
+ "tags": ["Orgs / Teams / Bookings"]
}
},
"/v2/organizations/{orgId}/teams/{teamId}/conferencing/{app}/connect": {
@@ -3547,9 +3403,7 @@
"in": "path",
"description": "Conferencing application type",
"schema": {
- "enum": [
- "google-meet"
- ],
+ "enum": ["google-meet"],
"type": "string"
}
}
@@ -3566,9 +3420,7 @@
}
}
},
- "tags": [
- "Orgs / Teams / Conferencing"
- ]
+ "tags": ["Orgs / Teams / Conferencing"]
}
},
"/v2/organizations/{orgId}/teams/{teamId}/conferencing/{app}/oauth/auth-url": {
@@ -3606,10 +3458,7 @@
"in": "path",
"description": "Conferencing application type",
"schema": {
- "enum": [
- "zoom",
- "msteams"
- ],
+ "enum": ["zoom", "msteams"],
"type": "string"
}
},
@@ -3642,9 +3491,7 @@
}
}
},
- "tags": [
- "Orgs / Teams / Conferencing"
- ]
+ "tags": ["Orgs / Teams / Conferencing"]
}
},
"/v2/organizations/{orgId}/teams/{teamId}/conferencing": {
@@ -3673,9 +3520,7 @@
}
}
},
- "tags": [
- "Orgs / Teams / Conferencing"
- ]
+ "tags": ["Orgs / Teams / Conferencing"]
}
},
"/v2/organizations/{orgId}/teams/{teamId}/conferencing/{app}/default": {
@@ -3697,12 +3542,7 @@
"in": "path",
"description": "Conferencing application type",
"schema": {
- "enum": [
- "google-meet",
- "zoom",
- "msteams",
- "daily-video"
- ],
+ "enum": ["google-meet", "zoom", "msteams", "daily-video"],
"type": "string"
}
}
@@ -3719,9 +3559,7 @@
}
}
},
- "tags": [
- "Orgs / Teams / Conferencing"
- ]
+ "tags": ["Orgs / Teams / Conferencing"]
}
},
"/v2/organizations/{orgId}/teams/{teamId}/conferencing/default": {
@@ -3743,12 +3581,7 @@
"in": "path",
"description": "Conferencing application type",
"schema": {
- "enum": [
- "google-meet",
- "zoom",
- "msteams",
- "daily-video"
- ],
+ "enum": ["google-meet", "zoom", "msteams", "daily-video"],
"type": "string"
}
}
@@ -3765,9 +3598,7 @@
}
}
},
- "tags": [
- "Orgs / Teams / Conferencing"
- ]
+ "tags": ["Orgs / Teams / Conferencing"]
}
},
"/v2/organizations/{orgId}/teams/{teamId}/conferencing/{app}/disconnect": {
@@ -3789,11 +3620,7 @@
"in": "path",
"description": "Conferencing application type",
"schema": {
- "enum": [
- "google-meet",
- "zoom",
- "msteams"
- ],
+ "enum": ["google-meet", "zoom", "msteams"],
"type": "string"
}
}
@@ -3810,9 +3637,7 @@
}
}
},
- "tags": [
- "Orgs / Teams / Conferencing"
- ]
+ "tags": ["Orgs / Teams / Conferencing"]
}
},
"/v2/organizations/{orgId}/teams/{teamId}/conferencing/{app}/oauth/callback": {
@@ -3866,9 +3691,7 @@
"description": ""
}
},
- "tags": [
- "Orgs / Teams / Conferencing"
- ]
+ "tags": ["Orgs / Teams / Conferencing"]
}
},
"/v2/organizations/{orgId}/teams/{teamId}/event-types": {
@@ -3942,9 +3765,7 @@
}
}
},
- "tags": [
- "Orgs / Teams / Event Types"
- ]
+ "tags": ["Orgs / Teams / Event Types"]
},
"get": {
"operationId": "OrganizationsEventTypesController_getTeamEventTypes",
@@ -4016,9 +3837,7 @@
}
}
},
- "tags": [
- "Orgs / Teams / Event Types"
- ]
+ "tags": ["Orgs / Teams / Event Types"]
}
},
"/v2/organizations/{orgId}/teams/{teamId}/event-types/{eventTypeId}": {
@@ -4082,9 +3901,7 @@
}
}
},
- "tags": [
- "Orgs / Teams / Event Types"
- ]
+ "tags": ["Orgs / Teams / Event Types"]
},
"patch": {
"operationId": "OrganizationsEventTypesController_updateTeamEventType",
@@ -4156,9 +3973,7 @@
}
}
},
- "tags": [
- "Orgs / Teams / Event Types"
- ]
+ "tags": ["Orgs / Teams / Event Types"]
},
"delete": {
"operationId": "OrganizationsEventTypesController_deleteTeamEventType",
@@ -4220,9 +4035,7 @@
}
}
},
- "tags": [
- "Orgs / Teams / Event Types"
- ]
+ "tags": ["Orgs / Teams / Event Types"]
}
},
"/v2/organizations/{orgId}/teams/{teamId}/event-types/{eventTypeId}/create-phone-call": {
@@ -4296,9 +4109,7 @@
}
}
},
- "tags": [
- "Orgs / Teams / Event Types"
- ]
+ "tags": ["Orgs / Teams / Event Types"]
}
},
"/v2/organizations/{orgId}/teams/event-types": {
@@ -4379,9 +4190,7 @@
}
}
},
- "tags": [
- "Orgs / Teams / Event Types"
- ]
+ "tags": ["Orgs / Teams / Event Types"]
}
},
"/v2/organizations/{orgId}/teams/{teamId}/memberships": {
@@ -4470,9 +4279,7 @@
}
}
},
- "tags": [
- "Orgs / Teams / Memberships"
- ]
+ "tags": ["Orgs / Teams / Memberships"]
},
"post": {
"operationId": "OrganizationsTeamsMembershipsController_createOrgTeamMembership",
@@ -4544,9 +4351,7 @@
}
}
},
- "tags": [
- "Orgs / Teams / Memberships"
- ]
+ "tags": ["Orgs / Teams / Memberships"]
}
},
"/v2/organizations/{orgId}/teams/{teamId}/memberships/{membershipId}": {
@@ -4618,9 +4423,7 @@
}
}
},
- "tags": [
- "Orgs / Teams / Memberships"
- ]
+ "tags": ["Orgs / Teams / Memberships"]
},
"delete": {
"operationId": "OrganizationsTeamsMembershipsController_deleteOrgTeamMembership",
@@ -4690,9 +4493,7 @@
}
}
},
- "tags": [
- "Orgs / Teams / Memberships"
- ]
+ "tags": ["Orgs / Teams / Memberships"]
},
"patch": {
"operationId": "OrganizationsTeamsMembershipsController_updateOrgTeamMembership",
@@ -4772,9 +4573,7 @@
}
}
},
- "tags": [
- "Orgs / Teams / Memberships"
- ]
+ "tags": ["Orgs / Teams / Memberships"]
}
},
"/v2/organizations/{orgId}/teams/{teamId}/routing-forms": {
@@ -4831,10 +4630,7 @@
"in": "query",
"description": "Sort by creation time",
"schema": {
- "enum": [
- "asc",
- "desc"
- ],
+ "enum": ["asc", "desc"],
"type": "string"
}
},
@@ -4844,10 +4640,7 @@
"in": "query",
"description": "Sort by update time",
"schema": {
- "enum": [
- "asc",
- "desc"
- ],
+ "enum": ["asc", "desc"],
"type": "string"
}
},
@@ -4913,9 +4706,7 @@
}
}
},
- "tags": [
- "Orgs / Teams / Routing forms"
- ]
+ "tags": ["Orgs / Teams / Routing forms"]
}
},
"/v2/organizations/{orgId}/teams/{teamId}/routing-forms/{routingFormId}/responses": {
@@ -4980,10 +4771,7 @@
"in": "query",
"description": "Sort by creation time",
"schema": {
- "enum": [
- "asc",
- "desc"
- ],
+ "enum": ["asc", "desc"],
"type": "string"
}
},
@@ -4993,10 +4781,7 @@
"in": "query",
"description": "Sort by update time",
"schema": {
- "enum": [
- "asc",
- "desc"
- ],
+ "enum": ["asc", "desc"],
"type": "string"
}
},
@@ -5062,9 +4847,7 @@
}
}
},
- "tags": [
- "Orgs / Teams / Routing forms / Responses"
- ]
+ "tags": ["Orgs / Teams / Routing forms / Responses"]
},
"post": {
"operationId": "OrganizationsTeamsRoutingFormsResponsesController_createRoutingFormResponse",
@@ -5150,10 +4933,7 @@
"description": "Format of slot times in response. Use 'range' to get start and end times.",
"example": "range",
"schema": {
- "enum": [
- "range",
- "time"
- ],
+ "enum": ["range", "time"],
"type": "string"
}
},
@@ -5190,9 +4970,7 @@
}
}
},
- "tags": [
- "Orgs / Teams / Routing forms / Responses"
- ]
+ "tags": ["Orgs / Teams / Routing forms / Responses"]
}
},
"/v2/organizations/{orgId}/teams/{teamId}/routing-forms/{routingFormId}/responses/{responseId}": {
@@ -5256,9 +5034,7 @@
}
}
},
- "tags": [
- "Orgs / Teams / Routing forms / Responses"
- ]
+ "tags": ["Orgs / Teams / Routing forms / Responses"]
}
},
"/v2/organizations/{orgId}/teams/{teamId}/stripe/connect": {
@@ -5319,9 +5095,7 @@
}
}
},
- "tags": [
- "Orgs / Teams / Stripe"
- ]
+ "tags": ["Orgs / Teams / Stripe"]
}
},
"/v2/organizations/{orgId}/teams/{teamId}/stripe/check": {
@@ -5350,9 +5124,7 @@
}
}
},
- "tags": [
- "Orgs / Teams / Stripe"
- ]
+ "tags": ["Orgs / Teams / Stripe"]
}
},
"/v2/organizations/{orgId}/teams/{teamId}/stripe/save": {
@@ -5397,9 +5169,7 @@
}
}
},
- "tags": [
- "Orgs / Teams / Stripe"
- ]
+ "tags": ["Orgs / Teams / Stripe"]
}
},
"/v2/organizations/{orgId}/teams/{teamId}/users/{userId}/schedules": {
@@ -5455,9 +5225,7 @@
}
}
},
- "tags": [
- "Orgs / Teams / Users / Schedules"
- ]
+ "tags": ["Orgs / Teams / Users / Schedules"]
}
},
"/v2/organizations/{orgId}/teams/{teamId}/workflows": {
@@ -5546,9 +5314,7 @@
}
}
},
- "tags": [
- "Orgs / Teams / Workflows"
- ]
+ "tags": ["Orgs / Teams / Workflows"]
},
"post": {
"operationId": "OrganizationTeamWorkflowsController_createWorkflow",
@@ -5612,9 +5378,7 @@
}
}
},
- "tags": [
- "Orgs / Teams / Workflows"
- ]
+ "tags": ["Orgs / Teams / Workflows"]
}
},
"/v2/organizations/{orgId}/teams/{teamId}/workflows/{workflowId}": {
@@ -5678,9 +5442,7 @@
}
}
},
- "tags": [
- "Orgs / Teams / Workflows"
- ]
+ "tags": ["Orgs / Teams / Workflows"]
},
"patch": {
"operationId": "OrganizationTeamWorkflowsController_updateWorkflow",
@@ -5752,9 +5514,7 @@
}
}
},
- "tags": [
- "Orgs / Teams / Workflows"
- ]
+ "tags": ["Orgs / Teams / Workflows"]
},
"delete": {
"operationId": "OrganizationTeamWorkflowsController_deleteWorkflow",
@@ -5809,9 +5569,7 @@
"description": ""
}
},
- "tags": [
- "Orgs / Teams / Workflows"
- ]
+ "tags": ["Orgs / Teams / Workflows"]
}
},
"/v2/organizations/{orgId}/users": {
@@ -5910,11 +5668,7 @@
"example": "NONE",
"schema": {
"default": "AND",
- "enum": [
- "OR",
- "AND",
- "NONE"
- ],
+ "enum": ["OR", "AND", "NONE"],
"type": "string"
}
},
@@ -5944,9 +5698,7 @@
}
}
},
- "tags": [
- "Orgs / Users"
- ]
+ "tags": ["Orgs / Users"]
},
"post": {
"operationId": "OrganizationsUsersController_createOrganizationUser",
@@ -6002,9 +5754,7 @@
}
}
},
- "tags": [
- "Orgs / Users"
- ]
+ "tags": ["Orgs / Users"]
}
},
"/v2/organizations/{orgId}/users/{userId}": {
@@ -6078,9 +5828,7 @@
}
}
},
- "tags": [
- "Orgs / Users"
- ]
+ "tags": ["Orgs / Users"]
},
"delete": {
"operationId": "OrganizationsUsersController_deleteOrganizationUser",
@@ -6142,9 +5890,7 @@
}
}
},
- "tags": [
- "Orgs / Users"
- ]
+ "tags": ["Orgs / Users"]
}
},
"/v2/organizations/{orgId}/users/{userId}/bookings": {
@@ -6205,13 +5951,7 @@
"type": "array",
"items": {
"type": "string",
- "enum": [
- "upcoming",
- "recurring",
- "past",
- "cancelled",
- "unconfirmed"
- ]
+ "enum": ["upcoming", "recurring", "past", "cancelled", "unconfirmed"]
}
}
},
@@ -6352,10 +6092,7 @@
"description": "Sort results by their start time in ascending or descending order.",
"example": "?sortStart=asc OR ?sortStart=desc",
"schema": {
- "enum": [
- "asc",
- "desc"
- ],
+ "enum": ["asc", "desc"],
"type": "string"
}
},
@@ -6366,10 +6103,7 @@
"description": "Sort results by their end time in ascending or descending order.",
"example": "?sortEnd=asc OR ?sortEnd=desc",
"schema": {
- "enum": [
- "asc",
- "desc"
- ],
+ "enum": ["asc", "desc"],
"type": "string"
}
},
@@ -6380,10 +6114,7 @@
"description": "Sort results by their creation time (when booking was made) in ascending or descending order.",
"example": "?sortCreated=asc OR ?sortCreated=desc",
"schema": {
- "enum": [
- "asc",
- "desc"
- ],
+ "enum": ["asc", "desc"],
"type": "string"
}
},
@@ -6394,10 +6125,7 @@
"description": "Sort results by their updated time (for example when booking status changes) in ascending or descending order.",
"example": "?sortUpdated=asc OR ?sortUpdated=desc",
"schema": {
- "enum": [
- "asc",
- "desc"
- ],
+ "enum": ["asc", "desc"],
"type": "string"
}
},
@@ -6429,9 +6157,7 @@
"description": ""
}
},
- "tags": [
- "Orgs / Users / Bookings"
- ]
+ "tags": ["Orgs / Users / Bookings"]
}
},
"/v2/organizations/{orgId}/users/{userId}/ooo": {
@@ -6506,10 +6232,7 @@
"description": "Sort results by their start time in ascending or descending order.",
"example": "?sortStart=asc OR ?sortStart=desc",
"schema": {
- "enum": [
- "asc",
- "desc"
- ],
+ "enum": ["asc", "desc"],
"type": "string"
}
},
@@ -6520,10 +6243,7 @@
"description": "Sort results by their end time in ascending or descending order.",
"example": "?sortEnd=asc OR ?sortEnd=desc",
"schema": {
- "enum": [
- "asc",
- "desc"
- ],
+ "enum": ["asc", "desc"],
"type": "string"
}
}
@@ -6533,9 +6253,7 @@
"description": ""
}
},
- "tags": [
- "Orgs / Users / OOO"
- ]
+ "tags": ["Orgs / Users / OOO"]
},
"post": {
"operationId": "OrganizationsUsersOOOController_createOrganizationUserOOO",
@@ -6592,9 +6310,7 @@
"description": ""
}
},
- "tags": [
- "Orgs / Users / OOO"
- ]
+ "tags": ["Orgs / Users / OOO"]
}
},
"/v2/organizations/{orgId}/users/{userId}/ooo/{oooId}": {
@@ -6661,9 +6377,7 @@
"description": ""
}
},
- "tags": [
- "Orgs / Users / OOO"
- ]
+ "tags": ["Orgs / Users / OOO"]
},
"delete": {
"operationId": "OrganizationsUsersOOOController_deleteOrganizationUserOOO",
@@ -6710,9 +6424,7 @@
"description": ""
}
},
- "tags": [
- "Orgs / Users / OOO"
- ]
+ "tags": ["Orgs / Users / OOO"]
}
},
"/v2/organizations/{orgId}/ooo": {
@@ -6787,10 +6499,7 @@
"description": "Sort results by their start time in ascending or descending order.",
"example": "?sortStart=asc OR ?sortStart=desc",
"schema": {
- "enum": [
- "asc",
- "desc"
- ],
+ "enum": ["asc", "desc"],
"type": "string"
}
},
@@ -6801,10 +6510,7 @@
"description": "Sort results by their end time in ascending or descending order.",
"example": "?sortEnd=asc OR ?sortEnd=desc",
"schema": {
- "enum": [
- "asc",
- "desc"
- ],
+ "enum": ["asc", "desc"],
"type": "string"
}
},
@@ -6824,9 +6530,7 @@
"description": ""
}
},
- "tags": [
- "Orgs / Users / OOO"
- ]
+ "tags": ["Orgs / Users / OOO"]
}
},
"/v2/organizations/{orgId}/users/{userId}/schedules": {
@@ -6892,9 +6596,7 @@
}
}
},
- "tags": [
- "Orgs / Users / Schedules"
- ]
+ "tags": ["Orgs / Users / Schedules"]
},
"get": {
"operationId": "OrganizationsSchedulesController_getUserSchedules",
@@ -6948,9 +6650,7 @@
}
}
},
- "tags": [
- "Orgs / Users / Schedules"
- ]
+ "tags": ["Orgs / Users / Schedules"]
}
},
"/v2/organizations/{orgId}/users/{userId}/schedules/{scheduleId}": {
@@ -7014,9 +6714,7 @@
}
}
},
- "tags": [
- "Orgs / Users / Schedules"
- ]
+ "tags": ["Orgs / Users / Schedules"]
},
"patch": {
"operationId": "OrganizationsSchedulesController_updateUserSchedule",
@@ -7088,9 +6786,7 @@
}
}
},
- "tags": [
- "Orgs / Users / Schedules"
- ]
+ "tags": ["Orgs / Users / Schedules"]
},
"delete": {
"operationId": "OrganizationsSchedulesController_deleteUserSchedule",
@@ -7152,9 +6848,7 @@
}
}
},
- "tags": [
- "Orgs / Users / Schedules"
- ]
+ "tags": ["Orgs / Users / Schedules"]
}
},
"/v2/organizations/{orgId}/webhooks": {
@@ -7235,9 +6929,7 @@
}
}
},
- "tags": [
- "Orgs / Webhooks"
- ]
+ "tags": ["Orgs / Webhooks"]
},
"post": {
"operationId": "OrganizationsWebhooksController_createOrganizationWebhook",
@@ -7301,9 +6993,7 @@
}
}
},
- "tags": [
- "Orgs / Webhooks"
- ]
+ "tags": ["Orgs / Webhooks"]
}
},
"/v2/organizations/{orgId}/webhooks/{webhookId}": {
@@ -7359,9 +7049,7 @@
}
}
},
- "tags": [
- "Orgs / Webhooks"
- ]
+ "tags": ["Orgs / Webhooks"]
},
"delete": {
"operationId": "OrganizationsWebhooksController_deleteWebhook",
@@ -7415,9 +7103,7 @@
}
}
},
- "tags": [
- "Orgs / Webhooks"
- ]
+ "tags": ["Orgs / Webhooks"]
},
"patch": {
"operationId": "OrganizationsWebhooksController_updateOrgWebhook",
@@ -7481,9 +7167,7 @@
}
}
},
- "tags": [
- "Orgs / Webhooks"
- ]
+ "tags": ["Orgs / Webhooks"]
}
},
"/v2/api-keys/refresh": {
@@ -7524,9 +7208,7 @@
}
}
},
- "tags": [
- "Api Keys"
- ]
+ "tags": ["Api Keys"]
}
},
"/v2/bookings": {
@@ -7579,9 +7261,7 @@
}
}
},
- "tags": [
- "Bookings"
- ]
+ "tags": ["Bookings"]
},
"get": {
"operationId": "BookingsController_2024_08_13_getBookings",
@@ -7607,13 +7287,7 @@
"type": "array",
"items": {
"type": "string",
- "enum": [
- "upcoming",
- "recurring",
- "past",
- "cancelled",
- "unconfirmed"
- ]
+ "enum": ["upcoming", "recurring", "past", "cancelled", "unconfirmed"]
}
}
},
@@ -7754,10 +7428,7 @@
"description": "Sort results by their start time in ascending or descending order.",
"example": "?sortStart=asc OR ?sortStart=desc",
"schema": {
- "enum": [
- "asc",
- "desc"
- ],
+ "enum": ["asc", "desc"],
"type": "string"
}
},
@@ -7768,10 +7439,7 @@
"description": "Sort results by their end time in ascending or descending order.",
"example": "?sortEnd=asc OR ?sortEnd=desc",
"schema": {
- "enum": [
- "asc",
- "desc"
- ],
+ "enum": ["asc", "desc"],
"type": "string"
}
},
@@ -7782,10 +7450,7 @@
"description": "Sort results by their creation time (when booking was made) in ascending or descending order.",
"example": "?sortCreated=asc OR ?sortCreated=desc",
"schema": {
- "enum": [
- "asc",
- "desc"
- ],
+ "enum": ["asc", "desc"],
"type": "string"
}
},
@@ -7796,10 +7461,7 @@
"description": "Sort results by their updated time (for example when booking status changes) in ascending or descending order.",
"example": "?sortUpdated=asc OR ?sortUpdated=desc",
"schema": {
- "enum": [
- "asc",
- "desc"
- ],
+ "enum": ["asc", "desc"],
"type": "string"
}
},
@@ -7847,9 +7509,7 @@
}
}
},
- "tags": [
- "Bookings"
- ]
+ "tags": ["Bookings"]
}
},
"/v2/bookings/{bookingUid}": {
@@ -7889,9 +7549,7 @@
}
}
},
- "tags": [
- "Bookings"
- ]
+ "tags": ["Bookings"]
}
},
"/v2/bookings/{bookingUid}/recordings": {
@@ -7931,9 +7589,7 @@
}
}
},
- "tags": [
- "Bookings"
- ]
+ "tags": ["Bookings"]
}
},
"/v2/bookings/{bookingUid}/transcripts": {
@@ -7973,9 +7629,7 @@
}
}
},
- "tags": [
- "Bookings"
- ]
+ "tags": ["Bookings"]
}
},
"/v2/bookings/{bookingUid}/reschedule": {
@@ -8033,9 +7687,7 @@
}
}
},
- "tags": [
- "Bookings"
- ]
+ "tags": ["Bookings"]
}
},
"/v2/bookings/{bookingUid}/cancel": {
@@ -8093,9 +7745,7 @@
}
}
},
- "tags": [
- "Bookings"
- ]
+ "tags": ["Bookings"]
}
},
"/v2/bookings/{bookingUid}/mark-absent": {
@@ -8154,9 +7804,7 @@
}
}
},
- "tags": [
- "Bookings"
- ]
+ "tags": ["Bookings"]
}
},
"/v2/bookings/{bookingUid}/reassign": {
@@ -8205,9 +7853,7 @@
}
}
},
- "tags": [
- "Bookings"
- ]
+ "tags": ["Bookings"]
}
},
"/v2/bookings/{bookingUid}/reassign/{userId}": {
@@ -8274,9 +7920,7 @@
}
}
},
- "tags": [
- "Bookings"
- ]
+ "tags": ["Bookings"]
}
},
"/v2/bookings/{bookingUid}/confirm": {
@@ -8325,9 +7969,7 @@
}
}
},
- "tags": [
- "Bookings"
- ]
+ "tags": ["Bookings"]
}
},
"/v2/bookings/{bookingUid}/decline": {
@@ -8386,9 +8028,7 @@
}
}
},
- "tags": [
- "Bookings"
- ]
+ "tags": ["Bookings"]
}
},
"/v2/bookings/{bookingUid}/calendar-links": {
@@ -8437,9 +8077,7 @@
}
}
},
- "tags": [
- "Bookings"
- ]
+ "tags": ["Bookings"]
}
},
"/v2/bookings/{bookingUid}/references": {
@@ -8505,9 +8143,7 @@
}
}
},
- "tags": [
- "Bookings"
- ]
+ "tags": ["Bookings"]
}
},
"/v2/calendars/{calendar}/event/{eventUid}": {
@@ -8521,9 +8157,7 @@
"required": true,
"in": "path",
"schema": {
- "enum": [
- "google"
- ],
+ "enum": ["google"],
"type": "string"
}
},
@@ -8558,9 +8192,7 @@
}
}
},
- "tags": [
- "Cal Unified Calendars"
- ]
+ "tags": ["Cal Unified Calendars"]
}
},
"/v2/calendars/ics-feed/save": {
@@ -8600,9 +8232,7 @@
}
}
},
- "tags": [
- "Calendars"
- ]
+ "tags": ["Calendars"]
}
},
"/v2/calendars/ics-feed/check": {
@@ -8632,9 +8262,7 @@
}
}
},
- "tags": [
- "Calendars"
- ]
+ "tags": ["Calendars"]
}
},
"/v2/calendars/busy-times": {
@@ -8711,9 +8339,7 @@
}
}
},
- "tags": [
- "Calendars"
- ]
+ "tags": ["Calendars"]
}
},
"/v2/calendars": {
@@ -8743,9 +8369,7 @@
}
}
},
- "tags": [
- "Calendars"
- ]
+ "tags": ["Calendars"]
}
},
"/v2/calendars/{calendar}/connect": {
@@ -8767,10 +8391,7 @@
"required": true,
"in": "path",
"schema": {
- "enum": [
- "office365",
- "google"
- ],
+ "enum": ["office365", "google"],
"type": "string"
}
},
@@ -8804,9 +8425,7 @@
}
}
},
- "tags": [
- "Calendars"
- ]
+ "tags": ["Calendars"]
}
},
"/v2/calendars/{calendar}/save": {
@@ -8835,10 +8454,7 @@
"required": true,
"in": "path",
"schema": {
- "enum": [
- "office365",
- "google"
- ],
+ "enum": ["office365", "google"],
"type": "string"
}
}
@@ -8848,9 +8464,7 @@
"description": ""
}
},
- "tags": [
- "Calendars"
- ]
+ "tags": ["Calendars"]
}
},
"/v2/calendars/{calendar}/credentials": {
@@ -8863,9 +8477,7 @@
"required": true,
"in": "path",
"schema": {
- "enum": [
- "apple"
- ],
+ "enum": ["apple"],
"type": "string"
}
},
@@ -8894,9 +8506,7 @@
"description": ""
}
},
- "tags": [
- "Calendars"
- ]
+ "tags": ["Calendars"]
}
},
"/v2/calendars/{calendar}/check": {
@@ -8909,11 +8519,7 @@
"required": true,
"in": "path",
"schema": {
- "enum": [
- "apple",
- "google",
- "office365"
- ],
+ "enum": ["apple", "google", "office365"],
"type": "string"
}
},
@@ -8939,9 +8545,7 @@
}
}
},
- "tags": [
- "Calendars"
- ]
+ "tags": ["Calendars"]
}
},
"/v2/calendars/{calendar}/disconnect": {
@@ -8954,11 +8558,7 @@
"required": true,
"in": "path",
"schema": {
- "enum": [
- "apple",
- "google",
- "office365"
- ],
+ "enum": ["apple", "google", "office365"],
"type": "string"
}
},
@@ -8994,9 +8594,7 @@
}
}
},
- "tags": [
- "Calendars"
- ]
+ "tags": ["Calendars"]
}
},
"/v2/conferencing/{app}/connect": {
@@ -9010,9 +8608,7 @@
"in": "path",
"description": "Conferencing application type",
"schema": {
- "enum": [
- "google-meet"
- ],
+ "enum": ["google-meet"],
"type": "string"
}
},
@@ -9038,9 +8634,7 @@
}
}
},
- "tags": [
- "Conferencing"
- ]
+ "tags": ["Conferencing"]
}
},
"/v2/conferencing/{app}/oauth/auth-url": {
@@ -9063,10 +8657,7 @@
"in": "path",
"description": "Conferencing application type",
"schema": {
- "enum": [
- "zoom",
- "msteams"
- ],
+ "enum": ["zoom", "msteams"],
"type": "string"
}
},
@@ -9099,9 +8690,7 @@
}
}
},
- "tags": [
- "Conferencing"
- ]
+ "tags": ["Conferencing"]
}
},
"/v2/conferencing/{app}/oauth/callback": {
@@ -9123,10 +8712,7 @@
"in": "path",
"description": "Conferencing application type",
"schema": {
- "enum": [
- "zoom",
- "msteams"
- ],
+ "enum": ["zoom", "msteams"],
"type": "string"
}
},
@@ -9144,9 +8730,7 @@
"description": ""
}
},
- "tags": [
- "Conferencing"
- ]
+ "tags": ["Conferencing"]
}
},
"/v2/conferencing": {
@@ -9176,9 +8760,7 @@
}
}
},
- "tags": [
- "Conferencing"
- ]
+ "tags": ["Conferencing"]
}
},
"/v2/conferencing/{app}/default": {
@@ -9192,12 +8774,7 @@
"in": "path",
"description": "Conferencing application type",
"schema": {
- "enum": [
- "google-meet",
- "zoom",
- "msteams",
- "daily-video"
- ],
+ "enum": ["google-meet", "zoom", "msteams", "daily-video"],
"type": "string"
}
},
@@ -9223,9 +8800,7 @@
}
}
},
- "tags": [
- "Conferencing"
- ]
+ "tags": ["Conferencing"]
}
},
"/v2/conferencing/default": {
@@ -9255,9 +8830,7 @@
}
}
},
- "tags": [
- "Conferencing"
- ]
+ "tags": ["Conferencing"]
}
},
"/v2/conferencing/{app}/disconnect": {
@@ -9271,11 +8844,7 @@
"in": "path",
"description": "Conferencing application type",
"schema": {
- "enum": [
- "google-meet",
- "zoom",
- "msteams"
- ],
+ "enum": ["google-meet", "zoom", "msteams"],
"type": "string"
}
},
@@ -9301,9 +8870,7 @@
}
}
},
- "tags": [
- "Conferencing"
- ]
+ "tags": ["Conferencing"]
}
},
"/v2/destination-calendars": {
@@ -9343,9 +8910,7 @@
}
}
},
- "tags": [
- "Destination Calendars"
- ]
+ "tags": ["Destination Calendars"]
}
},
"/v2/event-types": {
@@ -9395,9 +8960,7 @@
}
}
},
- "tags": [
- "Event Types"
- ]
+ "tags": ["Event Types"]
},
"get": {
"operationId": "EventTypesController_2024_06_14_getEventTypes",
@@ -9471,9 +9034,7 @@
}
}
},
- "tags": [
- "Event Types"
- ]
+ "tags": ["Event Types"]
}
},
"/v2/event-types/{eventTypeId}": {
@@ -9521,9 +9082,7 @@
}
}
},
- "tags": [
- "Event Types"
- ]
+ "tags": ["Event Types"]
},
"patch": {
"operationId": "EventTypesController_2024_06_14_updateEventType",
@@ -9579,9 +9138,7 @@
}
}
},
- "tags": [
- "Event Types"
- ]
+ "tags": ["Event Types"]
},
"delete": {
"operationId": "EventTypesController_2024_06_14_deleteEventType",
@@ -9627,9 +9184,7 @@
}
}
},
- "tags": [
- "Event Types"
- ]
+ "tags": ["Event Types"]
}
},
"/v2/event-types/{eventTypeId}/webhooks": {
@@ -9677,9 +9232,7 @@
}
}
},
- "tags": [
- "Event Types / Webhooks"
- ]
+ "tags": ["Event Types / Webhooks"]
},
"get": {
"operationId": "EventTypeWebhooksController_getEventTypeWebhooks",
@@ -9740,9 +9293,7 @@
}
}
},
- "tags": [
- "Event Types / Webhooks"
- ]
+ "tags": ["Event Types / Webhooks"]
},
"delete": {
"operationId": "EventTypeWebhooksController_deleteAllEventTypeWebhooks",
@@ -9778,9 +9329,7 @@
}
}
},
- "tags": [
- "Event Types / Webhooks"
- ]
+ "tags": ["Event Types / Webhooks"]
}
},
"/v2/event-types/{eventTypeId}/webhooks/{webhookId}": {
@@ -9828,9 +9377,7 @@
}
}
},
- "tags": [
- "Event Types / Webhooks"
- ]
+ "tags": ["Event Types / Webhooks"]
},
"get": {
"operationId": "EventTypeWebhooksController_getEventTypeWebhook",
@@ -9858,9 +9405,7 @@
}
}
},
- "tags": [
- "Event Types / Webhooks"
- ]
+ "tags": ["Event Types / Webhooks"]
},
"delete": {
"operationId": "EventTypeWebhooksController_deleteEventTypeWebhook",
@@ -9888,9 +9433,7 @@
}
}
},
- "tags": [
- "Event Types / Webhooks"
- ]
+ "tags": ["Event Types / Webhooks"]
}
},
"/v2/organizations/{orgId}/organizations": {
@@ -9948,9 +9491,7 @@
}
}
},
- "tags": [
- "Managed Orgs"
- ]
+ "tags": ["Managed Orgs"]
},
"get": {
"operationId": "OrganizationsOrganizationsController_getOrganizations",
@@ -10051,9 +9592,7 @@
}
}
},
- "tags": [
- "Managed Orgs"
- ]
+ "tags": ["Managed Orgs"]
}
},
"/v2/organizations/{orgId}/organizations/{managedOrganizationId}": {
@@ -10101,9 +9640,7 @@
}
}
},
- "tags": [
- "Managed Orgs"
- ]
+ "tags": ["Managed Orgs"]
},
"patch": {
"operationId": "OrganizationsOrganizationsController_updateOrganization",
@@ -10167,9 +9704,7 @@
}
}
},
- "tags": [
- "Managed Orgs"
- ]
+ "tags": ["Managed Orgs"]
},
"delete": {
"operationId": "OrganizationsOrganizationsController_deleteOrganization",
@@ -10215,9 +9750,7 @@
}
}
},
- "tags": [
- "Managed Orgs"
- ]
+ "tags": ["Managed Orgs"]
}
},
"/v2/me": {
@@ -10247,9 +9780,7 @@
}
}
},
- "tags": [
- "Me"
- ]
+ "tags": ["Me"]
},
"patch": {
"operationId": "MeController_updateMe",
@@ -10287,9 +9818,7 @@
}
}
},
- "tags": [
- "Me"
- ]
+ "tags": ["Me"]
}
},
"/v2/oauth-clients": {
@@ -10329,9 +9858,7 @@
}
}
},
- "tags": [
- "OAuth Clients"
- ]
+ "tags": ["OAuth Clients"]
},
"get": {
"operationId": "OAuthClientsController_getOAuthClients",
@@ -10359,9 +9886,7 @@
}
}
},
- "tags": [
- "OAuth Clients"
- ]
+ "tags": ["OAuth Clients"]
}
},
"/v2/oauth-clients/{clientId}": {
@@ -10399,9 +9924,7 @@
}
}
},
- "tags": [
- "OAuth Clients"
- ]
+ "tags": ["OAuth Clients"]
},
"patch": {
"operationId": "OAuthClientsController_updateOAuthClient",
@@ -10447,9 +9970,7 @@
}
}
},
- "tags": [
- "OAuth Clients"
- ]
+ "tags": ["OAuth Clients"]
},
"delete": {
"operationId": "OAuthClientsController_deleteOAuthClient",
@@ -10485,9 +10006,7 @@
}
}
},
- "tags": [
- "OAuth Clients"
- ]
+ "tags": ["OAuth Clients"]
}
},
"/v2/organizations/{orgId}/teams/{teamId}/verified-resources/emails/verification-code/request": {
@@ -10528,9 +10047,7 @@
}
}
},
- "tags": [
- "Organization Team Verified Resources"
- ]
+ "tags": ["Organization Team Verified Resources"]
}
},
"/v2/organizations/{orgId}/teams/{teamId}/verified-resources/phones/verification-code/request": {
@@ -10571,9 +10088,7 @@
}
}
},
- "tags": [
- "Organization Team Verified Resources"
- ]
+ "tags": ["Organization Team Verified Resources"]
}
},
"/v2/organizations/{orgId}/teams/{teamId}/verified-resources/emails/verification-code/verify": {
@@ -10622,9 +10137,7 @@
}
}
},
- "tags": [
- "Organization Team Verified Resources"
- ]
+ "tags": ["Organization Team Verified Resources"]
}
},
"/v2/organizations/{orgId}/teams/{teamId}/verified-resources/phones/verification-code/verify": {
@@ -10673,9 +10186,7 @@
}
}
},
- "tags": [
- "Organization Team Verified Resources"
- ]
+ "tags": ["Organization Team Verified Resources"]
}
},
"/v2/organizations/{orgId}/teams/{teamId}/verified-resources/emails": {
@@ -10738,9 +10249,7 @@
}
}
},
- "tags": [
- "Organization Team Verified Resources"
- ]
+ "tags": ["Organization Team Verified Resources"]
}
},
"/v2/organizations/{orgId}/teams/{teamId}/verified-resources/phones": {
@@ -10803,9 +10312,7 @@
}
}
},
- "tags": [
- "Organization Team Verified Resources"
- ]
+ "tags": ["Organization Team Verified Resources"]
}
},
"/v2/organizations/{orgId}/teams/{teamId}/verified-resources/emails/{id}": {
@@ -10851,9 +10358,7 @@
}
}
},
- "tags": [
- "Organization Team Verified Resources"
- ]
+ "tags": ["Organization Team Verified Resources"]
}
},
"/v2/organizations/{orgId}/teams/{teamId}/verified-resources/phones/{id}": {
@@ -10899,9 +10404,7 @@
}
}
},
- "tags": [
- "Organization Team Verified Resources"
- ]
+ "tags": ["Organization Team Verified Resources"]
}
},
"/v2/routing-forms/{routingFormId}/calculate-slots": {
@@ -10966,10 +10469,7 @@
"description": "Format of slot times in response. Use 'range' to get start and end times.",
"example": "range",
"schema": {
- "enum": [
- "range",
- "time"
- ],
+ "enum": ["range", "time"],
"type": "string"
}
},
@@ -11004,9 +10504,7 @@
}
}
},
- "tags": [
- "Routing forms"
- ]
+ "tags": ["Routing forms"]
}
},
"/v2/schedules": {
@@ -11057,9 +10555,7 @@
}
}
},
- "tags": [
- "Schedules"
- ]
+ "tags": ["Schedules"]
},
"get": {
"operationId": "SchedulesController_2024_06_11_getSchedules",
@@ -11098,9 +10594,7 @@
}
}
},
- "tags": [
- "Schedules"
- ]
+ "tags": ["Schedules"]
}
},
"/v2/schedules/default": {
@@ -11141,9 +10635,7 @@
}
}
},
- "tags": [
- "Schedules"
- ]
+ "tags": ["Schedules"]
}
},
"/v2/schedules/{scheduleId}": {
@@ -11191,9 +10683,7 @@
}
}
},
- "tags": [
- "Schedules"
- ]
+ "tags": ["Schedules"]
},
"patch": {
"operationId": "SchedulesController_2024_06_11_updateSchedule",
@@ -11249,9 +10739,7 @@
}
}
},
- "tags": [
- "Schedules"
- ]
+ "tags": ["Schedules"]
},
"delete": {
"operationId": "SchedulesController_2024_06_11_deleteSchedule",
@@ -11297,9 +10785,7 @@
}
}
},
- "tags": [
- "Schedules"
- ]
+ "tags": ["Schedules"]
}
},
"/v2/selected-calendars": {
@@ -11339,9 +10825,7 @@
}
}
},
- "tags": [
- "Selected Calendars"
- ]
+ "tags": ["Selected Calendars"]
},
"delete": {
"operationId": "SelectedCalendarsController_deleteSelectedCalendar",
@@ -11401,9 +10885,7 @@
}
}
},
- "tags": [
- "Selected Calendars"
- ]
+ "tags": ["Selected Calendars"]
}
},
"/v2/slots": {
@@ -11606,9 +11088,7 @@
}
}
},
- "tags": [
- "Slots"
- ]
+ "tags": ["Slots"]
}
},
"/v2/slots/reservations": {
@@ -11668,9 +11148,7 @@
}
}
},
- "tags": [
- "Slots"
- ]
+ "tags": ["Slots"]
}
},
"/v2/slots/reservations/{uid}": {
@@ -11709,9 +11187,7 @@
}
}
},
- "tags": [
- "Slots"
- ]
+ "tags": ["Slots"]
},
"patch": {
"operationId": "SlotsController_2024_09_04_updateReservedSlot",
@@ -11758,9 +11234,7 @@
}
}
},
- "tags": [
- "Slots"
- ]
+ "tags": ["Slots"]
},
"delete": {
"operationId": "SlotsController_2024_09_04_deleteReservedSlot",
@@ -11800,9 +11274,7 @@
}
}
},
- "tags": [
- "Slots"
- ]
+ "tags": ["Slots"]
}
},
"/v2/stripe/connect": {
@@ -11832,9 +11304,7 @@
}
}
},
- "tags": [
- "Stripe"
- ]
+ "tags": ["Stripe"]
}
},
"/v2/stripe/save": {
@@ -11871,9 +11341,7 @@
}
}
},
- "tags": [
- "Stripe"
- ]
+ "tags": ["Stripe"]
}
},
"/v2/stripe/check": {
@@ -11903,9 +11371,7 @@
}
}
},
- "tags": [
- "Stripe"
- ]
+ "tags": ["Stripe"]
}
},
"/v2/teams": {
@@ -11945,9 +11411,7 @@
}
}
},
- "tags": [
- "Teams"
- ]
+ "tags": ["Teams"]
},
"get": {
"operationId": "TeamsController_getTeams",
@@ -11975,9 +11439,7 @@
}
}
},
- "tags": [
- "Teams"
- ]
+ "tags": ["Teams"]
}
},
"/v2/teams/{teamId}": {
@@ -12015,9 +11477,7 @@
}
}
},
- "tags": [
- "Teams"
- ]
+ "tags": ["Teams"]
},
"patch": {
"operationId": "TeamsController_updateTeam",
@@ -12063,9 +11523,7 @@
}
}
},
- "tags": [
- "Teams"
- ]
+ "tags": ["Teams"]
},
"delete": {
"operationId": "TeamsController_deleteTeam",
@@ -12101,9 +11559,7 @@
}
}
},
- "tags": [
- "Teams"
- ]
+ "tags": ["Teams"]
}
},
"/v2/teams/{teamId}/event-types": {
@@ -12151,9 +11607,7 @@
}
}
},
- "tags": [
- "Teams / Event Types"
- ]
+ "tags": ["Teams / Event Types"]
},
"get": {
"operationId": "TeamsEventTypesController_getTeamEventTypes",
@@ -12198,9 +11652,7 @@
}
}
},
- "tags": [
- "Teams / Event Types"
- ]
+ "tags": ["Teams / Event Types"]
}
},
"/v2/teams/{teamId}/event-types/{eventTypeId}": {
@@ -12246,9 +11698,7 @@
}
}
},
- "tags": [
- "Teams / Event Types"
- ]
+ "tags": ["Teams / Event Types"]
},
"patch": {
"operationId": "TeamsEventTypesController_updateTeamEventType",
@@ -12302,9 +11752,7 @@
}
}
},
- "tags": [
- "Teams / Event Types"
- ]
+ "tags": ["Teams / Event Types"]
},
"delete": {
"operationId": "TeamsEventTypesController_deleteTeamEventType",
@@ -12348,9 +11796,7 @@
}
}
},
- "tags": [
- "Teams / Event Types"
- ]
+ "tags": ["Teams / Event Types"]
}
},
"/v2/teams/{teamId}/event-types/{eventTypeId}/create-phone-call": {
@@ -12406,9 +11852,7 @@
}
}
},
- "tags": [
- "Teams / Event Types"
- ]
+ "tags": ["Teams / Event Types"]
}
},
"/v2/teams/{teamId}/memberships": {
@@ -12456,9 +11900,7 @@
}
}
},
- "tags": [
- "Teams / Memberships"
- ]
+ "tags": ["Teams / Memberships"]
},
"get": {
"operationId": "TeamsMembershipsController_getTeamMemberships",
@@ -12519,9 +11961,7 @@
}
}
},
- "tags": [
- "Teams / Memberships"
- ]
+ "tags": ["Teams / Memberships"]
}
},
"/v2/teams/{teamId}/memberships/{membershipId}": {
@@ -12567,9 +12007,7 @@
}
}
},
- "tags": [
- "Teams / Memberships"
- ]
+ "tags": ["Teams / Memberships"]
},
"patch": {
"operationId": "TeamsMembershipsController_updateTeamMembership",
@@ -12623,9 +12061,7 @@
}
}
},
- "tags": [
- "Teams / Memberships"
- ]
+ "tags": ["Teams / Memberships"]
},
"delete": {
"operationId": "TeamsMembershipsController_deleteTeamMembership",
@@ -12669,9 +12105,7 @@
}
}
},
- "tags": [
- "Teams / Memberships"
- ]
+ "tags": ["Teams / Memberships"]
}
},
"/v2/teams/{teamId}/verified-resources/emails/verification-code/request": {
@@ -12712,9 +12146,7 @@
}
}
},
- "tags": [
- "Teams Verified Resources"
- ]
+ "tags": ["Teams Verified Resources"]
}
},
"/v2/teams/{teamId}/verified-resources/phones/verification-code/request": {
@@ -12755,9 +12187,7 @@
}
}
},
- "tags": [
- "Teams Verified Resources"
- ]
+ "tags": ["Teams Verified Resources"]
}
},
"/v2/teams/{teamId}/verified-resources/emails/verification-code/verify": {
@@ -12806,9 +12236,7 @@
}
}
},
- "tags": [
- "Teams Verified Resources"
- ]
+ "tags": ["Teams Verified Resources"]
}
},
"/v2/teams/{teamId}/verified-resources/phones/verification-code/verify": {
@@ -12857,9 +12285,7 @@
}
}
},
- "tags": [
- "Teams Verified Resources"
- ]
+ "tags": ["Teams Verified Resources"]
}
},
"/v2/teams/{teamId}/verified-resources/emails": {
@@ -12922,9 +12348,7 @@
}
}
},
- "tags": [
- "Teams Verified Resources"
- ]
+ "tags": ["Teams Verified Resources"]
}
},
"/v2/teams/{teamId}/verified-resources/phones": {
@@ -12987,9 +12411,7 @@
}
}
},
- "tags": [
- "Teams Verified Resources"
- ]
+ "tags": ["Teams Verified Resources"]
}
},
"/v2/teams/{teamId}/verified-resources/emails/{id}": {
@@ -13035,9 +12457,7 @@
}
}
},
- "tags": [
- "Teams Verified Resources"
- ]
+ "tags": ["Teams Verified Resources"]
}
},
"/v2/teams/{teamId}/verified-resources/phones/{id}": {
@@ -13083,9 +12503,7 @@
}
}
},
- "tags": [
- "Teams Verified Resources"
- ]
+ "tags": ["Teams Verified Resources"]
}
},
"/v2/verified-resources/emails/verification-code/request": {
@@ -13126,9 +12544,7 @@
}
}
},
- "tags": [
- "Verified Resources"
- ]
+ "tags": ["Verified Resources"]
}
},
"/v2/verified-resources/phones/verification-code/request": {
@@ -13169,9 +12585,7 @@
}
}
},
- "tags": [
- "Verified Resources"
- ]
+ "tags": ["Verified Resources"]
}
},
"/v2/verified-resources/emails/verification-code/verify": {
@@ -13212,9 +12626,7 @@
}
}
},
- "tags": [
- "Verified Resources"
- ]
+ "tags": ["Verified Resources"]
}
},
"/v2/verified-resources/phones/verification-code/verify": {
@@ -13255,9 +12667,7 @@
}
}
},
- "tags": [
- "Verified Resources"
- ]
+ "tags": ["Verified Resources"]
}
},
"/v2/verified-resources/emails": {
@@ -13312,9 +12722,7 @@
}
}
},
- "tags": [
- "Verified Resources"
- ]
+ "tags": ["Verified Resources"]
}
},
"/v2/verified-resources/phones": {
@@ -13369,9 +12777,7 @@
}
}
},
- "tags": [
- "Verified Resources"
- ]
+ "tags": ["Verified Resources"]
}
},
"/v2/verified-resources/emails/{id}": {
@@ -13409,9 +12815,7 @@
}
}
},
- "tags": [
- "Verified Resources"
- ]
+ "tags": ["Verified Resources"]
}
},
"/v2/verified-resources/phones/{id}": {
@@ -13449,9 +12853,7 @@
}
}
},
- "tags": [
- "Verified Resources"
- ]
+ "tags": ["Verified Resources"]
}
},
"/v2/webhooks": {
@@ -13491,9 +12893,7 @@
}
}
},
- "tags": [
- "Webhooks"
- ]
+ "tags": ["Webhooks"]
},
"get": {
"operationId": "WebhooksController_getWebhooks",
@@ -13547,9 +12947,7 @@
}
}
},
- "tags": [
- "Webhooks"
- ]
+ "tags": ["Webhooks"]
}
},
"/v2/webhooks/{webhookId}": {
@@ -13597,9 +12995,7 @@
}
}
},
- "tags": [
- "Webhooks"
- ]
+ "tags": ["Webhooks"]
},
"get": {
"operationId": "WebhooksController_getWebhook",
@@ -13627,9 +13023,7 @@
}
}
},
- "tags": [
- "Webhooks"
- ]
+ "tags": ["Webhooks"]
},
"delete": {
"operationId": "WebhooksController_deleteWebhook",
@@ -13665,9 +13059,7 @@
}
}
},
- "tags": [
- "Webhooks"
- ]
+ "tags": ["Webhooks"]
}
}
},
@@ -13810,10 +13202,7 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"type": "array",
@@ -13822,10 +13211,7 @@
}
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"CreateManagedUserInput": {
"type": "object",
@@ -13841,25 +13227,14 @@
},
"timeFormat": {
"type": "number",
- "enum": [
- 12,
- 24
- ],
+ "enum": [12, 24],
"example": 12,
"description": "Must be a number 12 or 24"
},
"weekStart": {
"type": "string",
"example": "Monday",
- "enum": [
- "Monday",
- "Tuesday",
- "Wednesday",
- "Thursday",
- "Friday",
- "Saturday",
- "Sunday"
- ]
+ "enum": ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"]
},
"timeZone": {
"type": "string",
@@ -13933,10 +13308,7 @@
}
}
},
- "required": [
- "email",
- "name"
- ]
+ "required": ["email", "name"]
},
"CreateManagedUserData": {
"type": "object",
@@ -13959,13 +13331,7 @@
"type": "number"
}
},
- "required": [
- "accessToken",
- "refreshToken",
- "user",
- "accessTokenExpiresAt",
- "refreshTokenExpiresAt"
- ]
+ "required": ["accessToken", "refreshToken", "user", "accessTokenExpiresAt", "refreshTokenExpiresAt"]
},
"CreateManagedUserOutput": {
"type": "object",
@@ -13973,10 +13339,7 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"$ref": "#/components/schemas/CreateManagedUserData"
@@ -13985,10 +13348,7 @@
"type": "object"
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"GetManagedUserOutput": {
"type": "object",
@@ -13996,19 +13356,13 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"$ref": "#/components/schemas/ManagedUserOutput"
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"UpdateManagedUserInput": {
"type": "object",
@@ -14021,10 +13375,7 @@
},
"timeFormat": {
"type": "number",
- "enum": [
- 12,
- 24
- ],
+ "enum": [12, 24],
"example": 12,
"description": "Must be 12 or 24"
},
@@ -14033,15 +13384,7 @@
},
"weekStart": {
"type": "string",
- "enum": [
- "Monday",
- "Tuesday",
- "Wednesday",
- "Thursday",
- "Friday",
- "Saturday",
- "Sunday"
- ],
+ "enum": ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"],
"example": "Monday"
},
"timeZone": {
@@ -14133,12 +13476,7 @@
"type": "number"
}
},
- "required": [
- "accessToken",
- "refreshToken",
- "accessTokenExpiresAt",
- "refreshTokenExpiresAt"
- ]
+ "required": ["accessToken", "refreshToken", "accessTokenExpiresAt", "refreshTokenExpiresAt"]
},
"KeysResponseDto": {
"type": "object",
@@ -14146,19 +13484,13 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"$ref": "#/components/schemas/KeysDto"
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"CreateOAuthClientInput": {
"type": "object",
@@ -14218,11 +13550,7 @@
"description": "If true and if managed user has calendar connected, calendar events will be created. Disable it if you manually create calendar events. Default to true."
}
},
- "required": [
- "name",
- "redirectUris",
- "permissions"
- ]
+ "required": ["name", "redirectUris", "permissions"]
},
"CreateOAuthClientOutput": {
"type": "object",
@@ -14236,20 +13564,14 @@
"example": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJuYW1lIjoib2F1dGgtY2xpZW50Iiwi"
}
},
- "required": [
- "clientId",
- "clientSecret"
- ]
+ "required": ["clientId", "clientSecret"]
},
"CreateOAuthClientResponseDto": {
"type": "object",
"properties": {
"status": {
"type": "string",
- "enum": [
- "success",
- "error"
- ],
+ "enum": ["success", "error"],
"example": "success"
},
"data": {
@@ -14264,10 +13586,7 @@
]
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"PlatformOAuthClientDto": {
"type": "object",
@@ -14302,19 +13621,14 @@
"PROFILE_WRITE"
]
},
- "example": [
- "BOOKING_READ",
- "BOOKING_WRITE"
- ]
+ "example": ["BOOKING_READ", "BOOKING_WRITE"]
},
"logo": {
"type": "object",
"example": "https://example.com/logo.png"
},
"redirectUris": {
- "example": [
- "https://example.com/callback"
- ],
+ "example": ["https://example.com/callback"],
"type": "array",
"items": {
"type": "string"
@@ -14375,10 +13689,7 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"type": "array",
@@ -14387,10 +13698,7 @@
}
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"GetOAuthClientResponseDto": {
"type": "object",
@@ -14398,19 +13706,13 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"$ref": "#/components/schemas/PlatformOAuthClientDto"
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"UpdateOAuthClientInput": {
"type": "object",
@@ -14457,9 +13759,7 @@
"description": "Managed user's refresh token."
}
},
- "required": [
- "refreshToken"
- ]
+ "required": ["refreshToken"]
},
"RefreshApiKeyInput": {
"type": "object",
@@ -14485,9 +13785,7 @@
"type": "string"
}
},
- "required": [
- "apiKey"
- ]
+ "required": ["apiKey"]
},
"RefreshApiKeyOutput": {
"type": "object",
@@ -14495,48 +13793,31 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"$ref": "#/components/schemas/ApiKeyOutput"
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"BookerLayouts_2024_06_14": {
"type": "object",
"properties": {
"defaultLayout": {
"type": "string",
- "enum": [
- "month",
- "week",
- "column"
- ]
+ "enum": ["month", "week", "column"]
},
"enabledLayouts": {
"type": "array",
"description": "Array of valid layouts - month, week or column",
"items": {
"type": "string",
- "enum": [
- "month",
- "week",
- "column"
- ]
+ "enum": ["month", "week", "column"]
}
}
},
- "required": [
- "defaultLayout",
- "enabledLayouts"
- ]
+ "required": ["defaultLayout", "enabledLayouts"]
},
"EventTypeColor_2024_06_14": {
"type": "object",
@@ -14552,10 +13833,7 @@
"example": "#fafafa"
}
},
- "required": [
- "lightThemeHex",
- "darkThemeHex"
- ]
+ "required": ["lightThemeHex", "darkThemeHex"]
},
"DestinationCalendar_2024_06_14": {
"type": "object",
@@ -14569,10 +13847,7 @@
"description": "The external ID of the destination calendar. Refer to the /api/v2/calendars endpoint to retrieve the external IDs of your connected calendars."
}
},
- "required": [
- "integration",
- "externalId"
- ]
+ "required": ["integration", "externalId"]
},
"InputAddressLocation_2024_06_14": {
"type": "object",
@@ -14590,11 +13865,7 @@
"type": "boolean"
}
},
- "required": [
- "type",
- "address",
- "public"
- ]
+ "required": ["type", "address", "public"]
},
"InputLinkLocation_2024_06_14": {
"type": "object",
@@ -14612,11 +13883,7 @@
"type": "boolean"
}
},
- "required": [
- "type",
- "link",
- "public"
- ]
+ "required": ["type", "link", "public"]
},
"InputIntegrationLocation_2024_06_14": {
"type": "object",
@@ -14629,18 +13896,10 @@
"integration": {
"type": "string",
"example": "cal-video",
- "enum": [
- "cal-video",
- "google-meet",
- "office365-video",
- "zoom"
- ]
+ "enum": ["cal-video", "google-meet", "office365-video", "zoom"]
}
},
- "required": [
- "type",
- "integration"
- ]
+ "required": ["type", "integration"]
},
"InputPhoneLocation_2024_06_14": {
"type": "object",
@@ -14658,11 +13917,7 @@
"type": "boolean"
}
},
- "required": [
- "type",
- "phone",
- "public"
- ]
+ "required": ["type", "phone", "public"]
},
"PhoneFieldInput_2024_06_14": {
"type": "object",
@@ -14695,14 +13950,7 @@
"description": "If true show under event type settings but don't show this booking field in the Booker. If false show in both."
}
},
- "required": [
- "type",
- "slug",
- "label",
- "required",
- "placeholder",
- "hidden"
- ]
+ "required": ["type", "slug", "label", "required", "placeholder", "hidden"]
},
"AddressFieldInput_2024_06_14": {
"type": "object",
@@ -14737,14 +13985,7 @@
"description": "If true show under event type settings but don't show this booking field in the Booker. If false show in both."
}
},
- "required": [
- "type",
- "slug",
- "label",
- "required",
- "placeholder",
- "hidden"
- ]
+ "required": ["type", "slug", "label", "required", "placeholder", "hidden"]
},
"TextFieldInput_2024_06_14": {
"type": "object",
@@ -14779,14 +14020,7 @@
"description": "If true show under event type settings but don't show this booking field in the Booker. If false show in both."
}
},
- "required": [
- "type",
- "slug",
- "label",
- "required",
- "placeholder",
- "hidden"
- ]
+ "required": ["type", "slug", "label", "required", "placeholder", "hidden"]
},
"NumberFieldInput_2024_06_14": {
"type": "object",
@@ -14821,14 +14055,7 @@
"description": "If true show under event type settings but don't show this booking field in the Booker. If false show in both."
}
},
- "required": [
- "type",
- "slug",
- "label",
- "required",
- "placeholder",
- "hidden"
- ]
+ "required": ["type", "slug", "label", "required", "placeholder", "hidden"]
},
"TextAreaFieldInput_2024_06_14": {
"type": "object",
@@ -14863,14 +14090,7 @@
"description": "If true show under event type settings but don't show this booking field in the Booker. If false show in both."
}
},
- "required": [
- "type",
- "slug",
- "label",
- "required",
- "placeholder",
- "hidden"
- ]
+ "required": ["type", "slug", "label", "required", "placeholder", "hidden"]
},
"SelectFieldInput_2024_06_14": {
"type": "object",
@@ -14897,10 +14117,7 @@
"example": "Select..."
},
"options": {
- "example": [
- "Option 1",
- "Option 2"
- ],
+ "example": ["Option 1", "Option 2"],
"type": "array",
"items": {
"type": "string"
@@ -14915,15 +14132,7 @@
"description": "If true show under event type settings but don't show this booking field in the Booker. If false show in both."
}
},
- "required": [
- "type",
- "slug",
- "label",
- "required",
- "placeholder",
- "options",
- "hidden"
- ]
+ "required": ["type", "slug", "label", "required", "placeholder", "options", "hidden"]
},
"MultiSelectFieldInput_2024_06_14": {
"type": "object",
@@ -14946,10 +14155,7 @@
"type": "boolean"
},
"options": {
- "example": [
- "Option 1",
- "Option 2"
- ],
+ "example": ["Option 1", "Option 2"],
"type": "array",
"items": {
"type": "string"
@@ -14964,14 +14170,7 @@
"description": "If true show under event type settings but don't show this booking field in the Booker. If false show in both."
}
},
- "required": [
- "type",
- "slug",
- "label",
- "required",
- "options",
- "hidden"
- ]
+ "required": ["type", "slug", "label", "required", "options", "hidden"]
},
"MultiEmailFieldInput_2024_06_14": {
"type": "object",
@@ -15006,14 +14205,7 @@
"description": "If true show under event type settings but don't show this booking field in the Booker. If false show in both."
}
},
- "required": [
- "type",
- "slug",
- "label",
- "required",
- "placeholder",
- "hidden"
- ]
+ "required": ["type", "slug", "label", "required", "placeholder", "hidden"]
},
"CheckboxGroupFieldInput_2024_06_14": {
"type": "object",
@@ -15036,10 +14228,7 @@
"type": "boolean"
},
"options": {
- "example": [
- "Checkbox 1",
- "Checkbox 2"
- ],
+ "example": ["Checkbox 1", "Checkbox 2"],
"type": "array",
"items": {
"type": "string"
@@ -15054,14 +14243,7 @@
"description": "If true show under event type settings but don't show this booking field in the Booker. If false show in both."
}
},
- "required": [
- "type",
- "slug",
- "label",
- "required",
- "options",
- "hidden"
- ]
+ "required": ["type", "slug", "label", "required", "options", "hidden"]
},
"RadioGroupFieldInput_2024_06_14": {
"type": "object",
@@ -15084,10 +14266,7 @@
"type": "boolean"
},
"options": {
- "example": [
- "Radio 1",
- "Radio 2"
- ],
+ "example": ["Radio 1", "Radio 2"],
"type": "array",
"items": {
"type": "string"
@@ -15102,14 +14281,7 @@
"description": "If true show under event type settings but don't show this booking field in the Booker. If false show in both."
}
},
- "required": [
- "type",
- "slug",
- "label",
- "required",
- "options",
- "hidden"
- ]
+ "required": ["type", "slug", "label", "required", "options", "hidden"]
},
"BooleanFieldInput_2024_06_14": {
"type": "object",
@@ -15140,13 +14312,7 @@
"description": "If true show under event type settings but don't show this booking field in the Booker. If false show in both."
}
},
- "required": [
- "type",
- "slug",
- "label",
- "required",
- "hidden"
- ]
+ "required": ["type", "slug", "label", "required", "hidden"]
},
"UrlFieldInput_2024_06_14": {
"type": "object",
@@ -15181,25 +14347,14 @@
"description": "If true show under event type settings but don't show this booking field in the Booker. If false show in both."
}
},
- "required": [
- "type",
- "slug",
- "label",
- "required",
- "placeholder",
- "hidden"
- ]
+ "required": ["type", "slug", "label", "required", "placeholder", "hidden"]
},
"BusinessDaysWindow_2024_06_14": {
"type": "object",
"properties": {
"type": {
"type": "string",
- "enum": [
- "businessDays",
- "calendarDays",
- "range"
- ],
+ "enum": ["businessDays", "calendarDays", "range"],
"description": "Whether the window should be business days, calendar days or a range of dates"
},
"value": {
@@ -15213,21 +14368,14 @@
"description": "\n Determines the behavior of the booking window:\n - If **true**, the window is rolling. This means the number of available days will always be equal the specified 'value' \n and adjust dynamically as bookings are made. For example, if 'value' is 3 and availability is only on Mondays, \n a booker attempting to schedule on November 10 will see slots on November 11, 18, and 25. As one of these days \n becomes fully booked, a new day (e.g., December 2) will open up to ensure 3 available days are always visible.\n - If **false**, the window is fixed. This means the booking window only considers the next 'value' days from the\n moment someone is trying to book. For example, if 'value' is 3, availability is only on Mondays, and the current \n date is November 10, the booker will only see slots on November 11 because the window is restricted to the next \n 3 calendar days (November 10–12).\n "
}
},
- "required": [
- "type",
- "value"
- ]
+ "required": ["type", "value"]
},
"CalendarDaysWindow_2024_06_14": {
"type": "object",
"properties": {
"type": {
"type": "string",
- "enum": [
- "businessDays",
- "calendarDays",
- "range"
- ],
+ "enum": ["businessDays", "calendarDays", "range"],
"description": "Whether the window should be business days, calendar days or a range of dates"
},
"value": {
@@ -15241,28 +14389,18 @@
"description": "\n Determines the behavior of the booking window:\n - If **true**, the window is rolling. This means the number of available days will always be equal the specified 'value' \n and adjust dynamically as bookings are made. For example, if 'value' is 3 and availability is only on Mondays, \n a booker attempting to schedule on November 10 will see slots on November 11, 18, and 25. As one of these days \n becomes fully booked, a new day (e.g., December 2) will open up to ensure 3 available days are always visible.\n - If **false**, the window is fixed. This means the booking window only considers the next 'value' days from the\n moment someone is trying to book. For example, if 'value' is 3, availability is only on Mondays, and the current \n date is November 10, the booker will only see slots on November 11 because the window is restricted to the next \n 3 calendar days (November 10–12).\n "
}
},
- "required": [
- "type",
- "value"
- ]
+ "required": ["type", "value"]
},
"RangeWindow_2024_06_14": {
"type": "object",
"properties": {
"type": {
"type": "string",
- "enum": [
- "businessDays",
- "calendarDays",
- "range"
- ],
+ "enum": ["businessDays", "calendarDays", "range"],
"description": "Whether the window should be business days, calendar days or a range of dates"
},
"value": {
- "example": [
- "2030-09-05",
- "2030-09-09"
- ],
+ "example": ["2030-09-05", "2030-09-09"],
"description": "Date range for when this event can be booked.",
"type": "array",
"items": {
@@ -15270,10 +14408,7 @@
}
}
},
- "required": [
- "type",
- "value"
- ]
+ "required": ["type", "value"]
},
"BaseBookingLimitsCount_2024_06_14": {
"type": "object",
@@ -15314,9 +14449,7 @@
"default": false
}
},
- "required": [
- "disabled"
- ]
+ "required": ["disabled"]
},
"BaseBookingLimitsDuration_2024_06_14": {
"type": "object",
@@ -15358,18 +14491,10 @@
},
"frequency": {
"type": "string",
- "enum": [
- "yearly",
- "monthly",
- "weekly"
- ]
+ "enum": ["yearly", "monthly", "weekly"]
}
},
- "required": [
- "interval",
- "occurrences",
- "frequency"
- ]
+ "required": ["interval", "occurrences", "frequency"]
},
"NoticeThreshold_2024_06_14": {
"type": "object",
@@ -15385,10 +14510,7 @@
"example": 30
}
},
- "required": [
- "unit",
- "count"
- ]
+ "required": ["unit", "count"]
},
"BaseConfirmationPolicy_2024_06_14": {
"type": "object",
@@ -15396,10 +14518,7 @@
"type": {
"type": "string",
"description": "The policy that determines when confirmation is required",
- "enum": [
- "always",
- "time"
- ],
+ "enum": ["always", "time"],
"example": "always"
},
"noticeThreshold": {
@@ -15415,10 +14534,7 @@
"description": "Unconfirmed bookings still block calendar slots."
}
},
- "required": [
- "type",
- "blockUnconfirmedBookingsInBooker"
- ]
+ "required": ["type", "blockUnconfirmedBookingsInBooker"]
},
"Seats_2024_06_14": {
"type": "object",
@@ -15439,11 +14555,7 @@
"example": true
}
},
- "required": [
- "seatsPerTimeSlot",
- "showAttendeeInfo",
- "showAvailabilityCount"
- ]
+ "required": ["seatsPerTimeSlot", "showAttendeeInfo", "showAvailabilityCount"]
},
"InputAttendeeAddressLocation_2024_06_14": {
"type": "object",
@@ -15454,9 +14566,7 @@
"description": "only allowed value for type is `attendeeAddress`"
}
},
- "required": [
- "type"
- ]
+ "required": ["type"]
},
"InputAttendeePhoneLocation_2024_06_14": {
"type": "object",
@@ -15467,9 +14577,7 @@
"description": "only allowed value for type is `attendeePhone`"
}
},
- "required": [
- "type"
- ]
+ "required": ["type"]
},
"InputAttendeeDefinedLocation_2024_06_14": {
"type": "object",
@@ -15480,9 +14588,7 @@
"description": "only allowed value for type is `attendeeDefined`"
}
},
- "required": [
- "type"
- ]
+ "required": ["type"]
},
"NameDefaultFieldInput_2024_06_14": {
"type": "object",
@@ -15503,11 +14609,7 @@
"description": "Disable this booking field if the URL contains query parameter with key equal to the slug and prefill it with the provided value. For example, if URL contains query parameter `&name=bob`, the name field will be prefilled with this value and disabled. In case of Booker atom need to pass 'name' to defaultFormValues prop with the desired value e.g. `defaultFormValues={{name: 'bob'}}`. See guide https://cal.com/docs/platform/guides/booking-fields"
}
},
- "required": [
- "type",
- "label",
- "placeholder"
- ]
+ "required": ["type", "label", "placeholder"]
},
"EmailDefaultFieldInput_2024_06_14": {
"type": "object",
@@ -15536,11 +14638,7 @@
"description": "Disable this booking field if the URL contains query parameter with key equal to the slug and prefill it with the provided value. For example, if URL contains query parameter `&[email protected]`, the email field will be prefilled with this value and disabled. In case of Booker atom need to pass 'email' to defaultFormValues prop with the desired value e.g. `defaultFormValues={{email: '[email protected]'}}`. See guide https://cal.com/docs/platform/guides/booking-field"
}
},
- "required": [
- "type",
- "label",
- "placeholder"
- ]
+ "required": ["type", "label", "placeholder"]
},
"TitleDefaultFieldInput_2024_06_14": {
"type": "object",
@@ -15568,9 +14666,7 @@
"description": "Disable this booking field if the URL contains query parameter with key equal to the slug and prefill it with the provided value. For example, if URL contains query parameter `&title=journey`, the title field will be prefilled with this value and disabled. In case of Booker atom need to pass 'title' to defaultFormValues prop with the desired value e.g. `defaultFormValues={{title: 'very important meeting'}}`. See guide https://cal.com/docs/platform/guides/booking-field"
}
},
- "required": [
- "slug"
- ]
+ "required": ["slug"]
},
"LocationDefaultFieldInput_2024_06_14": {
"type": "object",
@@ -15584,9 +14680,7 @@
"type": "string"
}
},
- "required": [
- "slug"
- ]
+ "required": ["slug"]
},
"NotesDefaultFieldInput_2024_06_14": {
"type": "object",
@@ -15614,9 +14708,7 @@
"description": "Disable this booking field if the URL contains query parameter with key equal to the slug and prefill it with the provided value. For example, if URL contains query parameter `&notes=journey`, the notes field will be prefilled with this value and disabled. In case of Booker atom need to pass 'notes' to defaultFormValues prop with the desired value e.g. `defaultFormValues={{notes: 'bring notebook and paper'}}`. See guide https://cal.com/docs/platform/guides/booking-field"
}
},
- "required": [
- "slug"
- ]
+ "required": ["slug"]
},
"GuestsDefaultFieldInput_2024_06_14": {
"type": "object",
@@ -15644,9 +14736,7 @@
"description": "Disable this booking field if the URL contains query parameter with key equal to the slug and prefill it with the provided value. For example, if URL contains query parameter `&[email protected]`, the guests field will be prefilled with this value and disabled. In case of Booker atom need to pass 'guests' to defaultFormValues prop with the desired value e.g. `defaultFormValues={{guests: ['[email protected]', '[email protected]']}}`. See guide https://cal.com/docs/platform/guides/booking-field"
}
},
- "required": [
- "slug"
- ]
+ "required": ["slug"]
},
"RescheduleReasonDefaultFieldInput_2024_06_14": {
"type": "object",
@@ -15674,9 +14764,7 @@
"description": "Disable this booking field if the URL contains query parameter with key equal to the slug and prefill it with the provided value. For example, if URL contains query parameter `&rescheduleReason=travel`, the rescheduleReason field will be prefilled with this value and disabled. In case of Booker atom need to pass 'rescheduleReason' to defaultFormValues prop with the desired value e.g. `defaultFormValues={{rescheduleReason: 'bob'}}`. See guide https://cal.com/docs/platform/guides/booking-field"
}
},
- "required": [
- "slug"
- ]
+ "required": ["slug"]
},
"InputOrganizersDefaultApp_2024_06_14": {
"type": "object",
@@ -15687,9 +14775,7 @@
"description": "only allowed value for type is `organizersDefaultApp`"
}
},
- "required": [
- "type"
- ]
+ "required": ["type"]
},
"CalVideoSettings": {
"type": "object",
@@ -15720,11 +14806,7 @@
"example": 60
},
"lengthInMinutesOptions": {
- "example": [
- 15,
- 30,
- 60
- ],
+ "example": [15, 30, 60],
"description": "If you want that user can choose between different lengths of the event you can specify them here. Must include the provided `lengthInMinutes`.",
"type": "array",
"items": {
@@ -15993,11 +15075,7 @@
}
}
},
- "required": [
- "lengthInMinutes",
- "title",
- "slug"
- ]
+ "required": ["lengthInMinutes", "title", "slug"]
},
"OutputAddressLocation_2024_06_14": {
"type": "object",
@@ -16026,11 +15104,7 @@
"type": "boolean"
}
},
- "required": [
- "type",
- "address",
- "public"
- ]
+ "required": ["type", "address", "public"]
},
"OutputLinkLocation_2024_06_14": {
"type": "object",
@@ -16058,11 +15132,7 @@
"type": "boolean"
}
},
- "required": [
- "type",
- "link",
- "public"
- ]
+ "required": ["type", "link", "public"]
},
"OutputIntegrationLocation_2024_06_14": {
"type": "object",
@@ -16128,10 +15198,7 @@
"description": "Credential ID associated with the integration"
}
},
- "required": [
- "type",
- "integration"
- ]
+ "required": ["type", "integration"]
},
"OutputPhoneLocation_2024_06_14": {
"type": "object",
@@ -16159,11 +15226,7 @@
"type": "boolean"
}
},
- "required": [
- "type",
- "phone",
- "public"
- ]
+ "required": ["type", "phone", "public"]
},
"OutputOrganizersDefaultAppLocation_2024_06_14": {
"type": "object",
@@ -16186,9 +15249,7 @@
"description": "only allowed value for type is `organizersDefaultApp`"
}
},
- "required": [
- "type"
- ]
+ "required": ["type"]
},
"OutputUnknownLocation_2024_06_14": {
"type": "object",
@@ -16214,10 +15275,7 @@
"type": "string"
}
},
- "required": [
- "type",
- "location"
- ]
+ "required": ["type", "location"]
},
"EmailDefaultFieldOutput_2024_06_14": {
"type": "object",
@@ -16274,11 +15332,7 @@
"default": "email"
}
},
- "required": [
- "type",
- "isDefault",
- "slug"
- ]
+ "required": ["type", "isDefault", "slug"]
},
"NameDefaultFieldOutput_2024_06_14": {
"type": "object",
@@ -16329,12 +15383,7 @@
"type": "boolean"
}
},
- "required": [
- "type",
- "isDefault",
- "slug",
- "required"
- ]
+ "required": ["type", "isDefault", "slug", "required"]
},
"LocationDefaultFieldOutput_2024_06_14": {
"type": "object",
@@ -16365,26 +15414,14 @@
"type": "string"
}
},
- "required": [
- "isDefault",
- "slug",
- "type",
- "required",
- "hidden"
- ]
+ "required": ["isDefault", "slug", "type", "required", "hidden"]
},
"RescheduleReasonDefaultFieldOutput_2024_06_14": {
"type": "object",
"properties": {
"slug": {
"type": "string",
- "enum": [
- "title",
- "location",
- "notes",
- "guests",
- "rescheduleReason"
- ],
+ "enum": ["title", "location", "notes", "guests", "rescheduleReason"],
"example": "rescheduleReason",
"description": "only allowed value for type is `rescheduleReason`",
"default": "rescheduleReason"
@@ -16417,24 +15454,14 @@
"default": "textarea"
}
},
- "required": [
- "slug",
- "isDefault",
- "type"
- ]
+ "required": ["slug", "isDefault", "type"]
},
"TitleDefaultFieldOutput_2024_06_14": {
"type": "object",
"properties": {
"slug": {
"type": "string",
- "enum": [
- "title",
- "location",
- "notes",
- "guests",
- "rescheduleReason"
- ],
+ "enum": ["title", "location", "notes", "guests", "rescheduleReason"],
"example": "title",
"description": "only allowed value for type is `title`",
"default": "title"
@@ -16467,24 +15494,14 @@
"default": "text"
}
},
- "required": [
- "slug",
- "isDefault",
- "type"
- ]
+ "required": ["slug", "isDefault", "type"]
},
"NotesDefaultFieldOutput_2024_06_14": {
"type": "object",
"properties": {
"slug": {
"type": "string",
- "enum": [
- "title",
- "location",
- "notes",
- "guests",
- "rescheduleReason"
- ],
+ "enum": ["title", "location", "notes", "guests", "rescheduleReason"],
"example": "notes",
"description": "only allowed value for type is `notes`",
"default": "notes"
@@ -16517,24 +15534,14 @@
"default": "textarea"
}
},
- "required": [
- "slug",
- "isDefault",
- "type"
- ]
+ "required": ["slug", "isDefault", "type"]
},
"GuestsDefaultFieldOutput_2024_06_14": {
"type": "object",
"properties": {
"slug": {
"type": "string",
- "enum": [
- "title",
- "location",
- "notes",
- "guests",
- "rescheduleReason"
- ],
+ "enum": ["title", "location", "notes", "guests", "rescheduleReason"],
"example": "guests",
"description": "only allowed value for type is `guests`",
"default": "guests"
@@ -16567,11 +15574,7 @@
"default": "multiemail"
}
},
- "required": [
- "slug",
- "isDefault",
- "type"
- ]
+ "required": ["slug", "isDefault", "type"]
},
"AddressFieldOutput_2024_06_14": {
"type": "object",
@@ -16628,14 +15631,7 @@
"example": false
}
},
- "required": [
- "type",
- "slug",
- "label",
- "required",
- "hidden",
- "isDefault"
- ]
+ "required": ["type", "slug", "label", "required", "hidden", "isDefault"]
},
"BooleanFieldOutput_2024_06_14": {
"type": "object",
@@ -16688,14 +15684,7 @@
"example": false
}
},
- "required": [
- "type",
- "slug",
- "label",
- "required",
- "hidden",
- "isDefault"
- ]
+ "required": ["type", "slug", "label", "required", "hidden", "isDefault"]
},
"CheckboxGroupFieldOutput_2024_06_14": {
"type": "object",
@@ -16734,10 +15723,7 @@
"type": "boolean"
},
"options": {
- "example": [
- "Checkbox 1",
- "Checkbox 2"
- ],
+ "example": ["Checkbox 1", "Checkbox 2"],
"type": "array",
"items": {
"type": "string"
@@ -16758,15 +15744,7 @@
"example": false
}
},
- "required": [
- "type",
- "slug",
- "label",
- "required",
- "options",
- "hidden",
- "isDefault"
- ]
+ "required": ["type", "slug", "label", "required", "options", "hidden", "isDefault"]
},
"MultiEmailFieldOutput_2024_06_14": {
"type": "object",
@@ -16823,14 +15801,7 @@
"example": false
}
},
- "required": [
- "type",
- "slug",
- "label",
- "required",
- "hidden",
- "isDefault"
- ]
+ "required": ["type", "slug", "label", "required", "hidden", "isDefault"]
},
"MultiSelectFieldOutput_2024_06_14": {
"type": "object",
@@ -16869,10 +15840,7 @@
"type": "boolean"
},
"options": {
- "example": [
- "Option 1",
- "Option 2"
- ],
+ "example": ["Option 1", "Option 2"],
"type": "array",
"items": {
"type": "string"
@@ -16893,15 +15861,7 @@
"example": false
}
},
- "required": [
- "type",
- "slug",
- "label",
- "required",
- "options",
- "hidden",
- "isDefault"
- ]
+ "required": ["type", "slug", "label", "required", "options", "hidden", "isDefault"]
},
"UrlFieldOutput_2024_06_14": {
"type": "object",
@@ -16958,14 +15918,7 @@
"example": false
}
},
- "required": [
- "type",
- "slug",
- "label",
- "required",
- "hidden",
- "isDefault"
- ]
+ "required": ["type", "slug", "label", "required", "hidden", "isDefault"]
},
"NumberFieldOutput_2024_06_14": {
"type": "object",
@@ -17022,14 +15975,7 @@
"example": false
}
},
- "required": [
- "type",
- "slug",
- "label",
- "required",
- "hidden",
- "isDefault"
- ]
+ "required": ["type", "slug", "label", "required", "hidden", "isDefault"]
},
"PhoneFieldOutput_2024_06_14": {
"type": "object",
@@ -17084,14 +16030,7 @@
"example": false
}
},
- "required": [
- "type",
- "slug",
- "label",
- "required",
- "hidden",
- "isDefault"
- ]
+ "required": ["type", "slug", "label", "required", "hidden", "isDefault"]
},
"RadioGroupFieldOutput_2024_06_14": {
"type": "object",
@@ -17130,10 +16069,7 @@
"type": "boolean"
},
"options": {
- "example": [
- "Radio 1",
- "Radio 2"
- ],
+ "example": ["Radio 1", "Radio 2"],
"type": "array",
"items": {
"type": "string"
@@ -17154,15 +16090,7 @@
"example": false
}
},
- "required": [
- "type",
- "slug",
- "label",
- "required",
- "options",
- "hidden",
- "isDefault"
- ]
+ "required": ["type", "slug", "label", "required", "options", "hidden", "isDefault"]
},
"SelectFieldOutput_2024_06_14": {
"type": "object",
@@ -17205,10 +16133,7 @@
"example": "Select..."
},
"options": {
- "example": [
- "Option 1",
- "Option 2"
- ],
+ "example": ["Option 1", "Option 2"],
"type": "array",
"items": {
"type": "string"
@@ -17229,15 +16154,7 @@
"example": false
}
},
- "required": [
- "type",
- "slug",
- "label",
- "required",
- "options",
- "hidden",
- "isDefault"
- ]
+ "required": ["type", "slug", "label", "required", "options", "hidden", "isDefault"]
},
"TextAreaFieldOutput_2024_06_14": {
"type": "object",
@@ -17294,14 +16211,7 @@
"example": false
}
},
- "required": [
- "type",
- "slug",
- "label",
- "required",
- "hidden",
- "isDefault"
- ]
+ "required": ["type", "slug", "label", "required", "hidden", "isDefault"]
},
"TextFieldOutput_2024_06_14": {
"type": "object",
@@ -17358,14 +16268,7 @@
"example": false
}
},
- "required": [
- "type",
- "slug",
- "label",
- "required",
- "hidden",
- "isDefault"
- ]
+ "required": ["type", "slug", "label", "required", "hidden", "isDefault"]
},
"EventTypeOutput_2024_06_14": {
"type": "object",
@@ -17379,11 +16282,7 @@
"example": 60
},
"lengthInMinutesOptions": {
- "example": [
- 15,
- 30,
- 60
- ],
+ "example": [15, 30, 60],
"description": "If you want that user can choose between different lengths of the event you can specify them here. Must include the provided `lengthInMinutes`.",
"type": "array",
"items": {
@@ -17663,30 +16562,21 @@
"properties": {
"status": {
"type": "string",
- "enum": [
- "success",
- "error"
- ],
+ "enum": ["success", "error"],
"example": "success"
},
"data": {
"$ref": "#/components/schemas/EventTypeOutput_2024_06_14"
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"GetEventTypeOutput_2024_06_14": {
"type": "object",
"properties": {
"status": {
"type": "string",
- "enum": [
- "success",
- "error"
- ],
+ "enum": ["success", "error"],
"example": "success"
},
"data": {
@@ -17698,20 +16588,14 @@
]
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"GetEventTypesOutput_2024_06_14": {
"type": "object",
"properties": {
"status": {
"type": "string",
- "enum": [
- "success",
- "error"
- ],
+ "enum": ["success", "error"],
"example": "success"
},
"data": {
@@ -17721,10 +16605,7 @@
}
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"UpdateEventTypeInput_2024_06_14": {
"type": "object",
@@ -17734,11 +16615,7 @@
"example": 60
},
"lengthInMinutesOptions": {
- "example": [
- 15,
- 30,
- 60
- ],
+ "example": [15, 30, 60],
"description": "If you want that user can choose between different lengths of the event you can specify them here. Must include the provided `lengthInMinutes`.",
"type": "array",
"items": {
@@ -18010,20 +16887,14 @@
"properties": {
"status": {
"type": "string",
- "enum": [
- "success",
- "error"
- ],
+ "enum": ["success", "error"],
"example": "success"
},
"data": {
"$ref": "#/components/schemas/EventTypeOutput_2024_06_14"
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"DeleteData_2024_06_14": {
"type": "object",
@@ -18044,32 +16915,21 @@
"type": "string"
}
},
- "required": [
- "id",
- "lengthInMinutes",
- "title",
- "slug"
- ]
+ "required": ["id", "lengthInMinutes", "title", "slug"]
},
"DeleteEventTypeOutput_2024_06_14": {
"type": "object",
"properties": {
"status": {
"type": "string",
- "enum": [
- "success",
- "error"
- ],
+ "enum": ["success", "error"],
"example": "success"
},
"data": {
"$ref": "#/components/schemas/DeleteData_2024_06_14"
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"SelectedCalendarsInputDto": {
"type": "object",
@@ -18087,11 +16947,7 @@
"type": "string"
}
},
- "required": [
- "integration",
- "externalId",
- "credentialId"
- ]
+ "required": ["integration", "externalId", "credentialId"]
},
"SelectedCalendarOutputDto": {
"type": "object",
@@ -18110,12 +16966,7 @@
"nullable": true
}
},
- "required": [
- "userId",
- "integration",
- "externalId",
- "credentialId"
- ]
+ "required": ["userId", "integration", "externalId", "credentialId"]
},
"SelectedCalendarOutputResponseDto": {
"type": "object",
@@ -18123,19 +16974,13 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"$ref": "#/components/schemas/SelectedCalendarOutputDto"
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"OrgTeamOutputDto": {
"type": "object",
@@ -18211,11 +17056,7 @@
"default": "Sunday"
}
},
- "required": [
- "id",
- "name",
- "isOrganization"
- ]
+ "required": ["id", "name", "isOrganization"]
},
"OrgTeamsOutputResponseDto": {
"type": "object",
@@ -18223,10 +17064,7 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"type": "array",
@@ -18235,10 +17073,7 @@
}
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"OrgMeTeamsOutputResponseDto": {
"type": "object",
@@ -18246,10 +17081,7 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"type": "array",
@@ -18258,10 +17090,7 @@
}
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"OrgTeamOutputResponseDto": {
"type": "object",
@@ -18269,19 +17098,13 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"$ref": "#/components/schemas/OrgTeamOutputDto"
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"UpdateOrgTeamDto": {
"type": "object",
@@ -18446,40 +17269,19 @@
"description": "If you are a platform customer, don't pass 'false', because then team creator won't be able to create team event types."
}
},
- "required": [
- "name"
- ]
+ "required": ["name"]
},
"ScheduleAvailabilityInput_2024_06_11": {
"type": "object",
"properties": {
"days": {
"type": "array",
- "enum": [
- "Monday",
- "Tuesday",
- "Wednesday",
- "Thursday",
- "Friday",
- "Saturday",
- "Sunday"
- ],
- "example": [
- "Monday",
- "Tuesday"
- ],
+ "enum": ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"],
+ "example": ["Monday", "Tuesday"],
"description": "Array of days when schedule is active.",
"items": {
"type": "string",
- "enum": [
- "Monday",
- "Tuesday",
- "Wednesday",
- "Thursday",
- "Friday",
- "Saturday",
- "Sunday"
- ]
+ "enum": ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"]
}
},
"startTime": {
@@ -18495,11 +17297,7 @@
"description": "endTime must be a valid time in format HH:MM e.g. 15:00"
}
},
- "required": [
- "days",
- "startTime",
- "endTime"
- ]
+ "required": ["days", "startTime", "endTime"]
},
"ScheduleOverrideInput_2024_06_11": {
"type": "object",
@@ -18521,11 +17319,7 @@
"description": "endTime must be a valid time in format HH:MM e.g. 13:00"
}
},
- "required": [
- "date",
- "startTime",
- "endTime"
- ]
+ "required": ["date", "startTime", "endTime"]
},
"ScheduleOutput_2024_06_11": {
"type": "object",
@@ -18549,18 +17343,12 @@
"availability": {
"example": [
{
- "days": [
- "Monday",
- "Tuesday"
- ],
+ "days": ["Monday", "Tuesday"],
"startTime": "17:00",
"endTime": "19:00"
},
{
- "days": [
- "Wednesday",
- "Thursday"
- ],
+ "days": ["Wednesday", "Thursday"],
"startTime": "16:00",
"endTime": "20:00"
}
@@ -18588,15 +17376,7 @@
}
}
},
- "required": [
- "id",
- "ownerId",
- "name",
- "timeZone",
- "availability",
- "isDefault",
- "overrides"
- ]
+ "required": ["id", "ownerId", "name", "timeZone", "availability", "isDefault", "overrides"]
},
"GetSchedulesOutput_2024_06_11": {
"type": "object",
@@ -18604,10 +17384,7 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"type": "array",
@@ -18619,10 +17396,7 @@
"type": "object"
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"CreateScheduleInput_2024_06_11": {
"type": "object",
@@ -18640,18 +17414,12 @@
"description": "Each object contains days and times when the user is available. If not passed, the default availability is Monday to Friday from 09:00 to 17:00.",
"example": [
{
- "days": [
- "Monday",
- "Tuesday"
- ],
+ "days": ["Monday", "Tuesday"],
"startTime": "17:00",
"endTime": "19:00"
},
{
- "days": [
- "Wednesday",
- "Thursday"
- ],
+ "days": ["Wednesday", "Thursday"],
"startTime": "16:00",
"endTime": "20:00"
}
@@ -18681,11 +17449,7 @@
}
}
},
- "required": [
- "name",
- "timeZone",
- "isDefault"
- ]
+ "required": ["name", "timeZone", "isDefault"]
},
"CreateScheduleOutput_2024_06_11": {
"type": "object",
@@ -18693,19 +17457,13 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"$ref": "#/components/schemas/ScheduleOutput_2024_06_11"
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"GetScheduleOutput_2024_06_11": {
"type": "object",
@@ -18713,10 +17471,7 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"nullable": true,
@@ -18730,10 +17485,7 @@
"type": "object"
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"UpdateScheduleInput_2024_06_11": {
"type": "object",
@@ -18749,10 +17501,7 @@
"availability": {
"example": [
{
- "days": [
- "Monday",
- "Tuesday"
- ],
+ "days": ["Monday", "Tuesday"],
"startTime": "09:00",
"endTime": "10:00"
}
@@ -18787,10 +17536,7 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"$ref": "#/components/schemas/ScheduleOutput_2024_06_11"
@@ -18799,10 +17545,7 @@
"type": "object"
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"DeleteScheduleOutput_2024_06_11": {
"type": "object",
@@ -18810,15 +17553,10 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
}
},
- "required": [
- "status"
- ]
+ "required": ["status"]
},
"ProfileOutput": {
"type": "object",
@@ -18845,11 +17583,7 @@
"example": "john_doe"
}
},
- "required": [
- "id",
- "organizationId",
- "userId"
- ]
+ "required": ["id", "organizationId", "userId"]
},
"GetOrgUsersWithProfileOutput": {
"type": "object",
@@ -18991,15 +17725,7 @@
]
}
},
- "required": [
- "id",
- "email",
- "timeZone",
- "weekStart",
- "hideBranding",
- "createdDate",
- "profile"
- ]
+ "required": ["id", "email", "timeZone", "weekStart", "hideBranding", "createdDate", "profile"]
},
"GetOrganizationUsersResponseDTO": {
"type": "object",
@@ -19007,10 +17733,7 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"type": "array",
@@ -19019,10 +17742,7 @@
}
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"CreateOrganizationUserInput": {
"type": "object",
@@ -19112,20 +17832,14 @@
"organizationRole": {
"type": "string",
"default": "MEMBER",
- "enum": [
- "MEMBER",
- "ADMIN",
- "OWNER"
- ]
+ "enum": ["MEMBER", "ADMIN", "OWNER"]
},
"autoAccept": {
"type": "boolean",
"default": true
}
},
- "required": [
- "email"
- ]
+ "required": ["email"]
},
"GetOrganizationUserOutput": {
"type": "object",
@@ -19133,19 +17847,13 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"$ref": "#/components/schemas/GetOrgUsersWithProfileOutput"
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"UpdateOrganizationUserInput": {
"type": "object",
@@ -19161,10 +17869,7 @@
"type": "string"
}
},
- "required": [
- "id",
- "name"
- ]
+ "required": ["id", "name"]
},
"TextAttribute": {
"type": "object",
@@ -19185,13 +17890,7 @@
"type": "string"
}
},
- "required": [
- "id",
- "name",
- "type",
- "option",
- "optionId"
- ]
+ "required": ["id", "name", "type", "option", "optionId"]
},
"NumberAttribute": {
"type": "object",
@@ -19212,13 +17911,7 @@
"type": "string"
}
},
- "required": [
- "id",
- "name",
- "type",
- "option",
- "optionId"
- ]
+ "required": ["id", "name", "type", "option", "optionId"]
},
"SingleSelectAttribute": {
"type": "object",
@@ -19239,13 +17932,7 @@
"type": "string"
}
},
- "required": [
- "id",
- "name",
- "type",
- "option",
- "optionId"
- ]
+ "required": ["id", "name", "type", "option", "optionId"]
},
"MultiSelectAttributeOption": {
"type": "object",
@@ -19257,10 +17944,7 @@
"type": "string"
}
},
- "required": [
- "optionId",
- "option"
- ]
+ "required": ["optionId", "option"]
},
"MultiSelectAttribute": {
"type": "object",
@@ -19281,12 +17965,7 @@
}
}
},
- "required": [
- "id",
- "name",
- "type",
- "options"
- ]
+ "required": ["id", "name", "type", "options"]
},
"MembershipUserOutputDto": {
"type": "object",
@@ -19313,9 +17992,7 @@
}
}
},
- "required": [
- "email"
- ]
+ "required": ["email"]
},
"OrganizationMembershipOutput": {
"type": "object",
@@ -19334,11 +18011,7 @@
},
"role": {
"type": "string",
- "enum": [
- "MEMBER",
- "OWNER",
- "ADMIN"
- ]
+ "enum": ["MEMBER", "OWNER", "ADMIN"]
},
"disableImpersonation": {
"type": "boolean"
@@ -19366,15 +18039,7 @@
}
}
},
- "required": [
- "id",
- "userId",
- "teamId",
- "accepted",
- "role",
- "user",
- "attributes"
- ]
+ "required": ["id", "userId", "teamId", "accepted", "role", "user", "attributes"]
},
"GetAllOrgMemberships": {
"type": "object",
@@ -19382,19 +18047,13 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"$ref": "#/components/schemas/OrganizationMembershipOutput"
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"CreateOrgMembershipDto": {
"type": "object",
@@ -19409,11 +18068,7 @@
"role": {
"type": "string",
"default": "MEMBER",
- "enum": [
- "MEMBER",
- "OWNER",
- "ADMIN"
- ],
+ "enum": ["MEMBER", "OWNER", "ADMIN"],
"description": "If you are platform customer then managed users should only have MEMBER role."
},
"disableImpersonation": {
@@ -19421,10 +18076,7 @@
"default": false
}
},
- "required": [
- "userId",
- "role"
- ]
+ "required": ["userId", "role"]
},
"CreateOrgMembershipOutput": {
"type": "object",
@@ -19432,19 +18084,13 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"$ref": "#/components/schemas/OrganizationMembershipOutput"
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"GetOrgMembership": {
"type": "object",
@@ -19452,19 +18098,13 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"$ref": "#/components/schemas/OrganizationMembershipOutput"
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"DeleteOrgMembership": {
"type": "object",
@@ -19472,19 +18112,13 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"$ref": "#/components/schemas/OrganizationMembershipOutput"
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"UpdateOrgMembershipDto": {
"type": "object",
@@ -19494,11 +18128,7 @@
},
"role": {
"type": "string",
- "enum": [
- "MEMBER",
- "OWNER",
- "ADMIN"
- ]
+ "enum": ["MEMBER", "OWNER", "ADMIN"]
},
"disableImpersonation": {
"type": "boolean"
@@ -19511,19 +18141,13 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"$ref": "#/components/schemas/OrganizationMembershipOutput"
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"Host": {
"type": "object",
@@ -19538,18 +18162,10 @@
},
"priority": {
"type": "string",
- "enum": [
- "lowest",
- "low",
- "medium",
- "high",
- "highest"
- ]
+ "enum": ["lowest", "low", "medium", "high", "highest"]
}
},
- "required": [
- "userId"
- ]
+ "required": ["userId"]
},
"CreateTeamEventTypeInput_2024_06_14": {
"type": "object",
@@ -19559,11 +18175,7 @@
"example": 60
},
"lengthInMinutesOptions": {
- "example": [
- 15,
- 30,
- 60
- ],
+ "example": [15, 30, 60],
"description": "If you want that user can choose between different lengths of the event you can specify them here. Must include the provided `lengthInMinutes`.",
"type": "array",
"items": {
@@ -19804,11 +18416,7 @@
},
"schedulingType": {
"type": "string",
- "enum": [
- "collective",
- "roundRobin",
- "managed"
- ],
+ "enum": ["collective", "roundRobin", "managed"],
"example": "collective",
"description": "The scheduling type for the team event - collective, roundRobin or managed."
},
@@ -19856,12 +18464,7 @@
}
}
},
- "required": [
- "lengthInMinutes",
- "title",
- "slug",
- "schedulingType"
- ]
+ "required": ["lengthInMinutes", "title", "slug", "schedulingType"]
},
"CreateTeamEventTypeOutput": {
"type": "object",
@@ -19869,10 +18472,7 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"oneOf": [
@@ -19888,10 +18488,7 @@
]
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"TeamEventTypeResponseHost": {
"type": "object",
@@ -19908,13 +18505,7 @@
"priority": {
"type": "string",
"default": "medium",
- "enum": [
- "lowest",
- "low",
- "medium",
- "high",
- "highest"
- ]
+ "enum": ["lowest", "low", "medium", "high", "highest"]
},
"name": {
"type": "string",
@@ -19930,11 +18521,7 @@
"example": "https://cal.com/api/avatar/d95949bc-ccb1-400f-acf6-045c51a16856.png"
}
},
- "required": [
- "userId",
- "name",
- "username"
- ]
+ "required": ["userId", "name", "username"]
},
"EventTypeTeam": {
"type": "object",
@@ -19967,9 +18554,7 @@
"type": "string"
}
},
- "required": [
- "id"
- ]
+ "required": ["id"]
},
"TeamEventTypeOutput_2024_06_14": {
"type": "object",
@@ -19984,11 +18569,7 @@
"example": 60
},
"lengthInMinutesOptions": {
- "example": [
- 15,
- 30,
- 60
- ],
+ "example": [15, 30, 60],
"description": "If you want that user can choose between different lengths of the event you can specify them here. Must include the provided `lengthInMinutes`.",
"type": "array",
"items": {
@@ -20259,11 +18840,7 @@
},
"schedulingType": {
"type": "string",
- "enum": [
- "roundRobin",
- "collective",
- "managed"
- ]
+ "enum": ["roundRobin", "collective", "managed"]
},
"team": {
"$ref": "#/components/schemas/EventTypeTeam"
@@ -20299,19 +18876,13 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"$ref": "#/components/schemas/TeamEventTypeOutput_2024_06_14"
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"CreatePhoneCallInput": {
"type": "object",
@@ -20337,10 +18908,7 @@
},
"templateType": {
"default": "CUSTOM_TEMPLATE",
- "enum": [
- "CHECK_IN_APPOINTMENT",
- "CUSTOM_TEMPLATE"
- ],
+ "enum": ["CHECK_IN_APPOINTMENT", "CUSTOM_TEMPLATE"],
"type": "string",
"description": "Template type"
},
@@ -20369,13 +18937,7 @@
"description": "General prompt"
}
},
- "required": [
- "yourPhoneNumber",
- "numberToCall",
- "calApiKey",
- "enabled",
- "templateType"
- ]
+ "required": ["yourPhoneNumber", "numberToCall", "calApiKey", "enabled", "templateType"]
},
"Data": {
"type": "object",
@@ -20387,9 +18949,7 @@
"type": "string"
}
},
- "required": [
- "callId"
- ]
+ "required": ["callId"]
},
"CreatePhoneCallOutput": {
"type": "object",
@@ -20397,19 +18957,13 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"$ref": "#/components/schemas/Data"
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"GetTeamEventTypesOutput": {
"type": "object",
@@ -20417,10 +18971,7 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"type": "array",
@@ -20429,10 +18980,7 @@
}
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"UpdateTeamEventTypeInput_2024_06_14": {
"type": "object",
@@ -20442,11 +18990,7 @@
"example": 60
},
"lengthInMinutesOptions": {
- "example": [
- 15,
- 30,
- 60
- ],
+ "example": [15, 30, 60],
"description": "If you want that user can choose between different lengths of the event you can specify them here. Must include the provided `lengthInMinutes`.",
"type": "array",
"items": {
@@ -20732,10 +19276,7 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"oneOf": [
@@ -20751,10 +19292,7 @@
]
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"DeleteTeamEventTypeOutput": {
"type": "object",
@@ -20762,19 +19300,13 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"type": "object"
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"TeamMembershipOutput": {
"type": "object",
@@ -20793,11 +19325,7 @@
},
"role": {
"type": "string",
- "enum": [
- "MEMBER",
- "OWNER",
- "ADMIN"
- ]
+ "enum": ["MEMBER", "OWNER", "ADMIN"]
},
"disableImpersonation": {
"type": "boolean"
@@ -20806,14 +19334,7 @@
"$ref": "#/components/schemas/MembershipUserOutputDto"
}
},
- "required": [
- "id",
- "userId",
- "teamId",
- "accepted",
- "role",
- "user"
- ]
+ "required": ["id", "userId", "teamId", "accepted", "role", "user"]
},
"OrgTeamMembershipsOutputResponseDto": {
"type": "object",
@@ -20821,10 +19342,7 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"type": "array",
@@ -20833,10 +19351,7 @@
}
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"OrgTeamMembershipOutputResponseDto": {
"type": "object",
@@ -20844,19 +19359,13 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"$ref": "#/components/schemas/TeamMembershipOutput"
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"UpdateOrgTeamMembershipDto": {
"type": "object",
@@ -20866,11 +19375,7 @@
},
"role": {
"type": "string",
- "enum": [
- "MEMBER",
- "OWNER",
- "ADMIN"
- ]
+ "enum": ["MEMBER", "OWNER", "ADMIN"]
},
"disableImpersonation": {
"type": "boolean"
@@ -20890,21 +19395,14 @@
"role": {
"type": "string",
"default": "MEMBER",
- "enum": [
- "MEMBER",
- "OWNER",
- "ADMIN"
- ]
+ "enum": ["MEMBER", "OWNER", "ADMIN"]
},
"disableImpersonation": {
"type": "boolean",
"default": false
}
},
- "required": [
- "userId",
- "role"
- ]
+ "required": ["userId", "role"]
},
"Attribute": {
"type": "object",
@@ -20922,12 +19420,7 @@
"type": {
"type": "string",
"description": "The type of the attribute",
- "enum": [
- "TEXT",
- "NUMBER",
- "SINGLE_SELECT",
- "MULTI_SELECT"
- ]
+ "enum": ["TEXT", "NUMBER", "SINGLE_SELECT", "MULTI_SELECT"]
},
"name": {
"type": "string",
@@ -20950,14 +19443,7 @@
"example": true
}
},
- "required": [
- "id",
- "teamId",
- "type",
- "name",
- "slug",
- "enabled"
- ]
+ "required": ["id", "teamId", "type", "name", "slug", "enabled"]
},
"GetOrganizationAttributesOutput": {
"type": "object",
@@ -20965,10 +19451,7 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"type": "array",
@@ -20977,10 +19460,7 @@
}
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"GetSingleAttributeOutput": {
"type": "object",
@@ -20988,10 +19468,7 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"nullable": true,
@@ -21002,10 +19479,7 @@
]
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"CreateOrganizationAttributeOptionInput": {
"type": "object",
@@ -21017,10 +19491,7 @@
"type": "string"
}
},
- "required": [
- "value",
- "slug"
- ]
+ "required": ["value", "slug"]
},
"CreateOrganizationAttributeInput": {
"type": "object",
@@ -21033,12 +19504,7 @@
},
"type": {
"type": "string",
- "enum": [
- "TEXT",
- "NUMBER",
- "SINGLE_SELECT",
- "MULTI_SELECT"
- ]
+ "enum": ["TEXT", "NUMBER", "SINGLE_SELECT", "MULTI_SELECT"]
},
"options": {
"type": "array",
@@ -21050,12 +19516,7 @@
"type": "boolean"
}
},
- "required": [
- "name",
- "slug",
- "type",
- "options"
- ]
+ "required": ["name", "slug", "type", "options"]
},
"CreateOrganizationAttributesOutput": {
"type": "object",
@@ -21063,19 +19524,13 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"$ref": "#/components/schemas/Attribute"
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"UpdateOrganizationAttributeInput": {
"type": "object",
@@ -21088,12 +19543,7 @@
},
"type": {
"type": "string",
- "enum": [
- "TEXT",
- "NUMBER",
- "SINGLE_SELECT",
- "MULTI_SELECT"
- ]
+ "enum": ["TEXT", "NUMBER", "SINGLE_SELECT", "MULTI_SELECT"]
},
"enabled": {
"type": "boolean"
@@ -21106,19 +19556,13 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"$ref": "#/components/schemas/Attribute"
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"DeleteOrganizationAttributesOutput": {
"type": "object",
@@ -21126,19 +19570,13 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"$ref": "#/components/schemas/Attribute"
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"OptionOutput": {
"type": "object",
@@ -21164,12 +19602,7 @@
"example": "option-slug"
}
},
- "required": [
- "id",
- "attributeId",
- "value",
- "slug"
- ]
+ "required": ["id", "attributeId", "value", "slug"]
},
"CreateAttributeOptionOutput": {
"type": "object",
@@ -21177,19 +19610,13 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"$ref": "#/components/schemas/OptionOutput"
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"DeleteAttributeOptionOutput": {
"type": "object",
@@ -21197,19 +19624,13 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"$ref": "#/components/schemas/OptionOutput"
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"UpdateOrganizationAttributeOptionInput": {
"type": "object",
@@ -21228,19 +19649,13 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"$ref": "#/components/schemas/OptionOutput"
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"GetAllAttributeOptionOutput": {
"type": "object",
@@ -21248,10 +19663,7 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"type": "array",
@@ -21260,10 +19672,7 @@
}
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"AssignedOptionOutput": {
"type": "object",
@@ -21290,23 +19699,14 @@
},
"assignedUserIds": {
"description": "Ids of the users assigned to the attribute option.",
- "example": [
- 124,
- 224
- ],
+ "example": [124, 224],
"type": "array",
"items": {
"type": "string"
}
}
},
- "required": [
- "id",
- "attributeId",
- "value",
- "slug",
- "assignedUserIds"
- ]
+ "required": ["id", "attributeId", "value", "slug", "assignedUserIds"]
},
"GetAllAttributeAssignedOptionOutput": {
"type": "object",
@@ -21314,10 +19714,7 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"type": "array",
@@ -21326,10 +19723,7 @@
}
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"AssignOrganizationAttributeOptionToUserInput": {
"type": "object",
@@ -21344,9 +19738,7 @@
"type": "string"
}
},
- "required": [
- "attributeId"
- ]
+ "required": ["attributeId"]
},
"AssignOptionUserOutputData": {
"type": "object",
@@ -21364,11 +19756,7 @@
"description": "The value of the option"
}
},
- "required": [
- "id",
- "memberId",
- "attributeOptionId"
- ]
+ "required": ["id", "memberId", "attributeOptionId"]
},
"AssignOptionUserOutput": {
"type": "object",
@@ -21376,19 +19764,13 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"$ref": "#/components/schemas/AssignOptionUserOutputData"
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"UnassignOptionUserOutput": {
"type": "object",
@@ -21396,19 +19778,13 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"$ref": "#/components/schemas/AssignOptionUserOutputData"
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"GetOptionUserOutputData": {
"type": "object",
@@ -21430,12 +19806,7 @@
"description": "The slug of the option"
}
},
- "required": [
- "id",
- "attributeId",
- "value",
- "slug"
- ]
+ "required": ["id", "attributeId", "value", "slug"]
},
"GetOptionUserOutput": {
"type": "object",
@@ -21443,10 +19814,7 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"type": "array",
@@ -21455,10 +19823,7 @@
}
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"TeamWebhookOutputDto": {
"type": "object",
@@ -21490,14 +19855,7 @@
"type": "string"
}
},
- "required": [
- "payloadTemplate",
- "teamId",
- "id",
- "triggers",
- "subscriberUrl",
- "active"
- ]
+ "required": ["payloadTemplate", "teamId", "id", "triggers", "subscriberUrl", "active"]
},
"TeamWebhooksOutputResponseDto": {
"type": "object",
@@ -21505,10 +19863,7 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"type": "array",
@@ -21517,10 +19872,7 @@
}
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"CreateWebhookInputDto": {
"type": "object",
@@ -21573,11 +19925,7 @@
"type": "string"
}
},
- "required": [
- "active",
- "subscriberUrl",
- "triggers"
- ]
+ "required": ["active", "subscriberUrl", "triggers"]
},
"TeamWebhookOutputResponseDto": {
"type": "object",
@@ -21585,19 +19933,13 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"$ref": "#/components/schemas/TeamWebhookOutputDto"
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"UpdateWebhookInputDto": {
"type": "object",
@@ -21680,19 +20022,10 @@
"type": "string",
"description": "the reason for the out of office entry, if applicable",
"example": "vacation",
- "enum": [
- "unspecified",
- "vacation",
- "travel",
- "sick",
- "public_holiday"
- ]
+ "enum": ["unspecified", "vacation", "travel", "sick", "public_holiday"]
}
},
- "required": [
- "start",
- "end"
- ]
+ "required": ["start", "end"]
},
"UpdateOutOfOfficeEntryDto": {
"type": "object",
@@ -21723,13 +20056,7 @@
"type": "string",
"description": "the reason for the out of office entry, if applicable",
"example": "vacation",
- "enum": [
- "unspecified",
- "vacation",
- "travel",
- "sick",
- "public_holiday"
- ]
+ "enum": ["unspecified", "vacation", "travel", "sick", "public_holiday"]
}
}
},
@@ -21744,10 +20071,7 @@
},
"activeOnEventTypeIds": {
"description": "List of Event Type IDs the workflow is specifically active on (if not active on all)",
- "example": [
- 698191,
- 698192
- ],
+ "example": [698191, 698192],
"type": "array",
"items": {
"type": "number"
@@ -21767,17 +20091,10 @@
"type": "string",
"description": "Unit for the offset time",
"example": "hour",
- "enum": [
- "hour",
- "minute",
- "day"
- ]
+ "enum": ["hour", "minute", "day"]
}
},
- "required": [
- "value",
- "unit"
- ]
+ "required": ["value", "unit"]
},
"WorkflowTriggerOutputDto": {
"type": "object",
@@ -21805,9 +20122,7 @@
]
}
},
- "required": [
- "type"
- ]
+ "required": ["type"]
},
"WorkflowMessageOutputDto": {
"type": "object",
@@ -21828,9 +20143,7 @@
"example": "Reminder for {EVENT_NAME}."
}
},
- "required": [
- "subject"
- ]
+ "required": ["subject"]
},
"WorkflowStepOutputDto": {
"type": "object",
@@ -21863,12 +20176,7 @@
"type": "string",
"description": "Intended recipient type",
"example": "const",
- "enum": [
- "const",
- "attendee",
- "email",
- "phone_number"
- ]
+ "enum": ["const", "attendee", "email", "phone_number"]
},
"email": {
"type": "string",
@@ -21883,14 +20191,7 @@
"type": "string",
"description": "Template type used",
"example": "reminder",
- "enum": [
- "reminder",
- "custom",
- "rescheduled",
- "completed",
- "rating",
- "cancelled"
- ]
+ "enum": ["reminder", "custom", "rescheduled", "completed", "rating", "cancelled"]
},
"includeCalendarEvent": {
"type": "object",
@@ -21912,15 +20213,7 @@
]
}
},
- "required": [
- "id",
- "stepNumber",
- "action",
- "recipient",
- "template",
- "sender",
- "message"
- ]
+ "required": ["id", "stepNumber", "action", "recipient", "template", "sender", "message"]
},
"WorkflowOutput": {
"type": "object",
@@ -21979,13 +20272,7 @@
"example": "2024-05-12T11:30:00.000Z"
}
},
- "required": [
- "id",
- "name",
- "activation",
- "trigger",
- "steps"
- ]
+ "required": ["id", "name", "activation", "trigger", "steps"]
},
"GetWorkflowsOutput": {
"type": "object",
@@ -21994,10 +20281,7 @@
"type": "string",
"description": "Indicates the status of the response",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"description": "List of workflows",
@@ -22007,10 +20291,7 @@
}
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"GetWorkflowOutput": {
"type": "object",
@@ -22019,10 +20300,7 @@
"type": "string",
"description": "Indicates the status of the response",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"description": "workflow",
@@ -22032,10 +20310,7 @@
}
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"WorkflowTriggerOffsetDto": {
"type": "object",
@@ -22051,10 +20326,7 @@
"example": "hour"
}
},
- "required": [
- "value",
- "unit"
- ]
+ "required": ["value", "unit"]
},
"OnBeforeEventTriggerDto": {
"type": "object",
@@ -22074,10 +20346,7 @@
"example": "beforeEvent"
}
},
- "required": [
- "offset",
- "type"
- ]
+ "required": ["offset", "type"]
},
"OnAfterEventTriggerDto": {
"type": "object",
@@ -22097,10 +20366,7 @@
"example": "afterEvent"
}
},
- "required": [
- "offset",
- "type"
- ]
+ "required": ["offset", "type"]
},
"OnCancelTriggerDto": {
"type": "object",
@@ -22111,9 +20377,7 @@
"description": "Trigger type for the workflow"
}
},
- "required": [
- "type"
- ]
+ "required": ["type"]
},
"OnCreationTriggerDto": {
"type": "object",
@@ -22124,9 +20388,7 @@
"description": "Trigger type for the workflow"
}
},
- "required": [
- "type"
- ]
+ "required": ["type"]
},
"OnRescheduleTriggerDto": {
"type": "object",
@@ -22137,9 +20399,7 @@
"description": "Trigger type for the workflow"
}
},
- "required": [
- "type"
- ]
+ "required": ["type"]
},
"OnAfterCalVideoGuestsNoShowTriggerDto": {
"type": "object",
@@ -22159,10 +20419,7 @@
"example": "afterGuestsCalVideoNoShow"
}
},
- "required": [
- "offset",
- "type"
- ]
+ "required": ["offset", "type"]
},
"OnAfterCalVideoHostsNoShowTriggerDto": {
"type": "object",
@@ -22182,10 +20439,7 @@
"example": "afterHostsCalVideoNoShow"
}
},
- "required": [
- "offset",
- "type"
- ]
+ "required": ["offset", "type"]
},
"HtmlWorkflowMessageDto": {
"type": "object",
@@ -22201,10 +20455,7 @@
"example": "<p>This is a reminder from {ORGANIZER} of {EVENT_NAME} to {ATTENDEE} starting here {LOCATION} {MEETING_URL} at {START_TIME_h:mma} {TIMEZONE}.</p>"
}
},
- "required": [
- "subject",
- "html"
- ]
+ "required": ["subject", "html"]
},
"WorkflowEmailAddressStepDto": {
"type": "object",
@@ -22233,25 +20484,13 @@
"type": "string",
"description": "Recipient type",
"example": "attendee",
- "enum": [
- "const",
- "attendee",
- "email",
- "phone_number"
- ]
+ "enum": ["const", "attendee", "email", "phone_number"]
},
"template": {
"type": "string",
"description": "Template type for the step",
"example": "reminder",
- "enum": [
- "reminder",
- "custom",
- "rescheduled",
- "completed",
- "rating",
- "cancelled"
- ]
+ "enum": ["reminder", "custom", "rescheduled", "completed", "rating", "cancelled"]
},
"sender": {
"type": "string",
@@ -22318,25 +20557,13 @@
"type": "string",
"description": "Recipient type",
"example": "attendee",
- "enum": [
- "const",
- "attendee",
- "email",
- "phone_number"
- ]
+ "enum": ["const", "attendee", "email", "phone_number"]
},
"template": {
"type": "string",
"description": "Template type for the step",
"example": "reminder",
- "enum": [
- "reminder",
- "custom",
- "rescheduled",
- "completed",
- "rating",
- "cancelled"
- ]
+ "enum": ["reminder", "custom", "rescheduled", "completed", "rating", "cancelled"]
},
"sender": {
"type": "string",
@@ -22394,25 +20621,13 @@
"type": "string",
"description": "Recipient type",
"example": "attendee",
- "enum": [
- "const",
- "attendee",
- "email",
- "phone_number"
- ]
+ "enum": ["const", "attendee", "email", "phone_number"]
},
"template": {
"type": "string",
"description": "Template type for the step",
"example": "reminder",
- "enum": [
- "reminder",
- "custom",
- "rescheduled",
- "completed",
- "rating",
- "cancelled"
- ]
+ "enum": ["reminder", "custom", "rescheduled", "completed", "rating", "cancelled"]
},
"sender": {
"type": "string",
@@ -22457,10 +20672,7 @@
"example": "This is a reminder message from {ORGANIZER} of {EVENT_NAME} to {ATTENDEE} starting here {LOCATION} {MEETING_URL} at {START_TIME_h:mma} {TIMEZONE}."
}
},
- "required": [
- "subject",
- "text"
- ]
+ "required": ["subject", "text"]
},
"WorkflowPhoneWhatsAppAttendeeStepDto": {
"type": "object",
@@ -22489,25 +20701,13 @@
"type": "string",
"description": "Recipient type",
"example": "attendee",
- "enum": [
- "const",
- "attendee",
- "email",
- "phone_number"
- ]
+ "enum": ["const", "attendee", "email", "phone_number"]
},
"template": {
"type": "string",
"description": "Template type for the step",
"example": "reminder",
- "enum": [
- "reminder",
- "custom",
- "rescheduled",
- "completed",
- "rating",
- "cancelled"
- ]
+ "enum": ["reminder", "custom", "rescheduled", "completed", "rating", "cancelled"]
},
"sender": {
"type": "string",
@@ -22522,14 +20722,7 @@
]
}
},
- "required": [
- "action",
- "stepNumber",
- "recipient",
- "template",
- "sender",
- "message"
- ]
+ "required": ["action", "stepNumber", "recipient", "template", "sender", "message"]
},
"WorkflowPhoneWhatsAppNumberStepDto": {
"type": "object",
@@ -22558,25 +20751,13 @@
"type": "string",
"description": "Recipient type",
"example": "attendee",
- "enum": [
- "const",
- "attendee",
- "email",
- "phone_number"
- ]
+ "enum": ["const", "attendee", "email", "phone_number"]
},
"template": {
"type": "string",
"description": "Template type for the step",
"example": "reminder",
- "enum": [
- "reminder",
- "custom",
- "rescheduled",
- "completed",
- "rating",
- "cancelled"
- ]
+ "enum": ["reminder", "custom", "rescheduled", "completed", "rating", "cancelled"]
},
"sender": {
"type": "string",
@@ -22599,15 +20780,7 @@
]
}
},
- "required": [
- "action",
- "stepNumber",
- "recipient",
- "template",
- "sender",
- "verifiedPhoneId",
- "message"
- ]
+ "required": ["action", "stepNumber", "recipient", "template", "sender", "verifiedPhoneId", "message"]
},
"WorkflowPhoneNumberStepDto": {
"type": "object",
@@ -22636,25 +20809,13 @@
"type": "string",
"description": "Recipient type",
"example": "attendee",
- "enum": [
- "const",
- "attendee",
- "email",
- "phone_number"
- ]
+ "enum": ["const", "attendee", "email", "phone_number"]
},
"template": {
"type": "string",
"description": "Template type for the step",
"example": "reminder",
- "enum": [
- "reminder",
- "custom",
- "rescheduled",
- "completed",
- "rating",
- "cancelled"
- ]
+ "enum": ["reminder", "custom", "rescheduled", "completed", "rating", "cancelled"]
},
"sender": {
"type": "string",
@@ -22677,15 +20838,7 @@
]
}
},
- "required": [
- "action",
- "stepNumber",
- "recipient",
- "template",
- "sender",
- "verifiedPhoneId",
- "message"
- ]
+ "required": ["action", "stepNumber", "recipient", "template", "sender", "verifiedPhoneId", "message"]
},
"WorkflowPhoneAttendeeStepDto": {
"type": "object",
@@ -22714,25 +20867,13 @@
"type": "string",
"description": "Recipient type",
"example": "attendee",
- "enum": [
- "const",
- "attendee",
- "email",
- "phone_number"
- ]
+ "enum": ["const", "attendee", "email", "phone_number"]
},
"template": {
"type": "string",
"description": "Template type for the step",
"example": "reminder",
- "enum": [
- "reminder",
- "custom",
- "rescheduled",
- "completed",
- "rating",
- "cancelled"
- ]
+ "enum": ["reminder", "custom", "rescheduled", "completed", "rating", "cancelled"]
},
"sender": {
"type": "string",
@@ -22751,14 +20892,7 @@
]
}
},
- "required": [
- "action",
- "stepNumber",
- "recipient",
- "template",
- "sender",
- "message"
- ]
+ "required": ["action", "stepNumber", "recipient", "template", "sender", "message"]
},
"BaseWorkflowTriggerDto": {
"type": "object",
@@ -22768,9 +20902,7 @@
"description": "Trigger type for the workflow"
}
},
- "required": [
- "type"
- ]
+ "required": ["type"]
},
"WorkflowActivationDto": {
"type": "object",
@@ -22784,18 +20916,14 @@
"activeOnEventTypeIds": {
"default": [],
"description": "List of event-types IDs the workflow applies to, required if isActiveOnAllEventTypes is false",
- "example": [
- 698191
- ],
+ "example": [698191],
"type": "array",
"items": {
"type": "number"
}
}
},
- "required": [
- "isActiveOnAllEventTypes"
- ]
+ "required": ["isActiveOnAllEventTypes"]
},
"CreateWorkflowDto": {
"type": "object",
@@ -22869,12 +20997,7 @@
}
}
},
- "required": [
- "name",
- "activation",
- "trigger",
- "steps"
- ]
+ "required": ["name", "activation", "trigger", "steps"]
},
"UpdateEmailAddressWorkflowStepDto": {
"type": "object",
@@ -22903,25 +21026,13 @@
"type": "string",
"description": "Recipient type",
"example": "attendee",
- "enum": [
- "const",
- "attendee",
- "email",
- "phone_number"
- ]
+ "enum": ["const", "attendee", "email", "phone_number"]
},
"template": {
"type": "string",
"description": "Template type for the step",
"example": "reminder",
- "enum": [
- "reminder",
- "custom",
- "rescheduled",
- "completed",
- "rating",
- "cancelled"
- ]
+ "enum": ["reminder", "custom", "rescheduled", "completed", "rating", "cancelled"]
},
"sender": {
"type": "string",
@@ -22993,25 +21104,13 @@
"type": "string",
"description": "Recipient type",
"example": "attendee",
- "enum": [
- "const",
- "attendee",
- "email",
- "phone_number"
- ]
+ "enum": ["const", "attendee", "email", "phone_number"]
},
"template": {
"type": "string",
"description": "Template type for the step",
"example": "reminder",
- "enum": [
- "reminder",
- "custom",
- "rescheduled",
- "completed",
- "rating",
- "cancelled"
- ]
+ "enum": ["reminder", "custom", "rescheduled", "completed", "rating", "cancelled"]
},
"sender": {
"type": "string",
@@ -23074,25 +21173,13 @@
"type": "string",
"description": "Recipient type",
"example": "attendee",
- "enum": [
- "const",
- "attendee",
- "email",
- "phone_number"
- ]
+ "enum": ["const", "attendee", "email", "phone_number"]
},
"template": {
"type": "string",
"description": "Template type for the step",
"example": "reminder",
- "enum": [
- "reminder",
- "custom",
- "rescheduled",
- "completed",
- "rating",
- "cancelled"
- ]
+ "enum": ["reminder", "custom", "rescheduled", "completed", "rating", "cancelled"]
},
"sender": {
"type": "string",
@@ -23155,25 +21242,13 @@
"type": "string",
"description": "Recipient type",
"example": "attendee",
- "enum": [
- "const",
- "attendee",
- "email",
- "phone_number"
- ]
+ "enum": ["const", "attendee", "email", "phone_number"]
},
"template": {
"type": "string",
"description": "Template type for the step",
"example": "reminder",
- "enum": [
- "reminder",
- "custom",
- "rescheduled",
- "completed",
- "rating",
- "cancelled"
- ]
+ "enum": ["reminder", "custom", "rescheduled", "completed", "rating", "cancelled"]
},
"sender": {
"type": "string",
@@ -23197,14 +21272,7 @@
"example": 67244
}
},
- "required": [
- "action",
- "stepNumber",
- "recipient",
- "template",
- "sender",
- "message"
- ]
+ "required": ["action", "stepNumber", "recipient", "template", "sender", "message"]
},
"UpdatePhoneWhatsAppNumberWorkflowStepDto": {
"type": "object",
@@ -23233,25 +21301,13 @@
"type": "string",
"description": "Recipient type",
"example": "attendee",
- "enum": [
- "const",
- "attendee",
- "email",
- "phone_number"
- ]
+ "enum": ["const", "attendee", "email", "phone_number"]
},
"template": {
"type": "string",
"description": "Template type for the step",
"example": "reminder",
- "enum": [
- "reminder",
- "custom",
- "rescheduled",
- "completed",
- "rating",
- "cancelled"
- ]
+ "enum": ["reminder", "custom", "rescheduled", "completed", "rating", "cancelled"]
},
"sender": {
"type": "string",
@@ -23279,15 +21335,7 @@
"example": 67244
}
},
- "required": [
- "action",
- "stepNumber",
- "recipient",
- "template",
- "sender",
- "verifiedPhoneId",
- "message"
- ]
+ "required": ["action", "stepNumber", "recipient", "template", "sender", "verifiedPhoneId", "message"]
},
"UpdateWhatsAppAttendeePhoneWorkflowStepDto": {
"type": "object",
@@ -23316,25 +21364,13 @@
"type": "string",
"description": "Recipient type",
"example": "attendee",
- "enum": [
- "const",
- "attendee",
- "email",
- "phone_number"
- ]
+ "enum": ["const", "attendee", "email", "phone_number"]
},
"template": {
"type": "string",
"description": "Template type for the step",
"example": "reminder",
- "enum": [
- "reminder",
- "custom",
- "rescheduled",
- "completed",
- "rating",
- "cancelled"
- ]
+ "enum": ["reminder", "custom", "rescheduled", "completed", "rating", "cancelled"]
},
"sender": {
"type": "string",
@@ -23354,14 +21390,7 @@
"example": 67244
}
},
- "required": [
- "action",
- "stepNumber",
- "recipient",
- "template",
- "sender",
- "message"
- ]
+ "required": ["action", "stepNumber", "recipient", "template", "sender", "message"]
},
"UpdatePhoneNumberWorkflowStepDto": {
"type": "object",
@@ -23390,25 +21419,13 @@
"type": "string",
"description": "Recipient type",
"example": "attendee",
- "enum": [
- "const",
- "attendee",
- "email",
- "phone_number"
- ]
+ "enum": ["const", "attendee", "email", "phone_number"]
},
"template": {
"type": "string",
"description": "Template type for the step",
"example": "reminder",
- "enum": [
- "reminder",
- "custom",
- "rescheduled",
- "completed",
- "rating",
- "cancelled"
- ]
+ "enum": ["reminder", "custom", "rescheduled", "completed", "rating", "cancelled"]
},
"sender": {
"type": "string",
@@ -23436,15 +21453,7 @@
"example": 67244
}
},
- "required": [
- "action",
- "stepNumber",
- "recipient",
- "template",
- "sender",
- "verifiedPhoneId",
- "message"
- ]
+ "required": ["action", "stepNumber", "recipient", "template", "sender", "verifiedPhoneId", "message"]
},
"UpdateWorkflowDto": {
"type": "object",
@@ -23526,9 +21535,7 @@
"type": "string"
}
},
- "required": [
- "authUrl"
- ]
+ "required": ["authUrl"]
},
"StripConnectOutputResponseDto": {
"type": "object",
@@ -23536,19 +21543,13 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"$ref": "#/components/schemas/StripConnectOutputDto"
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"StripCredentialsSaveOutputResponseDto": {
"type": "object",
@@ -23557,9 +21558,7 @@
"type": "string"
}
},
- "required": [
- "url"
- ]
+ "required": ["url"]
},
"StripCredentialsCheckOutputResponseDto": {
"type": "object",
@@ -23569,9 +21568,7 @@
"example": "success"
}
},
- "required": [
- "status"
- ]
+ "required": ["status"]
},
"GetDefaultScheduleOutput_2024_06_11": {
"type": "object",
@@ -23579,19 +21576,13 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"$ref": "#/components/schemas/ScheduleOutput_2024_06_11"
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"CreateTeamInput": {
"type": "object",
@@ -23675,9 +21666,7 @@
"description": "If you are a platform customer, don't pass 'false', because then team creator won't be able to create team event types."
}
},
- "required": [
- "name"
- ]
+ "required": ["name"]
},
"CreateTeamOutput": {
"type": "object",
@@ -23685,10 +21674,7 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"oneOf": [
@@ -23702,10 +21688,7 @@
"description": "Either an Output object or a TeamOutputDto."
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"TeamOutputDto": {
"type": "object",
@@ -23781,11 +21764,7 @@
"default": "Sunday"
}
},
- "required": [
- "id",
- "name",
- "isOrganization"
- ]
+ "required": ["id", "name", "isOrganization"]
},
"GetTeamOutput": {
"type": "object",
@@ -23793,19 +21772,13 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"$ref": "#/components/schemas/TeamOutputDto"
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"GetTeamsOutput": {
"type": "object",
@@ -23813,10 +21786,7 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"type": "array",
@@ -23825,10 +21795,7 @@
}
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"UpdateTeamOutput": {
"type": "object",
@@ -23836,19 +21803,13 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"$ref": "#/components/schemas/TeamOutputDto"
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"ConferencingAppsOutputDto": {
"type": "object",
@@ -23873,30 +21834,20 @@
"description": "Whether if the connection is working or not."
}
},
- "required": [
- "id",
- "type",
- "userId"
- ]
+ "required": ["id", "type", "userId"]
},
"ConferencingAppOutputResponseDto": {
"type": "object",
"properties": {
"status": {
"type": "string",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"$ref": "#/components/schemas/ConferencingAppsOutputDto"
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"GetConferencingAppsOauthUrlResponseDto": {
"type": "object",
@@ -23904,25 +21855,17 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
}
},
- "required": [
- "status"
- ]
+ "required": ["status"]
},
"ConferencingAppsOutputResponseDto": {
"type": "object",
"properties": {
"status": {
"type": "string",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"type": "array",
@@ -23931,10 +21874,7 @@
}
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"SetDefaultConferencingAppOutputResponseDto": {
"type": "object",
@@ -23942,15 +21882,10 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
}
},
- "required": [
- "status"
- ]
+ "required": ["status"]
},
"DefaultConferencingAppsOutputDto": {
"type": "object",
@@ -23969,18 +21904,13 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"$ref": "#/components/schemas/DefaultConferencingAppsOutputDto"
}
},
- "required": [
- "status"
- ]
+ "required": ["status"]
},
"DisconnectConferencingAppOutputResponseDto": {
"type": "object",
@@ -23988,15 +21918,10 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
}
},
- "required": [
- "status"
- ]
+ "required": ["status"]
},
"GoogleServiceAccountKeyInput": {
"type": "object",
@@ -24011,11 +21936,7 @@
"type": "string"
}
},
- "required": [
- "private_key",
- "client_email",
- "client_id"
- ]
+ "required": ["private_key", "client_email", "client_id"]
},
"CreateDelegationCredentialInput": {
"type": "object",
@@ -24040,11 +21961,7 @@
}
}
},
- "required": [
- "workspacePlatformSlug",
- "domain",
- "serviceAccountKey"
- ]
+ "required": ["workspacePlatformSlug", "domain", "serviceAccountKey"]
},
"WorkspacePlatformDto": {
"type": "object",
@@ -24056,10 +21973,7 @@
"type": "string"
}
},
- "required": [
- "name",
- "slug"
- ]
+ "required": ["name", "slug"]
},
"DelegationCredentialOutput": {
"type": "object",
@@ -24104,19 +22018,13 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"$ref": "#/components/schemas/DelegationCredentialOutput"
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"UpdateDelegationCredentialInput": {
"type": "object",
@@ -24145,29 +22053,20 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"$ref": "#/components/schemas/DelegationCredentialOutput"
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"CreateIcsFeedInputDto": {
"type": "object",
"properties": {
"urls": {
"type": "array",
- "example": [
- "https://cal.com/ics/feed.ics",
- "http://cal.com/ics/feed.ics"
- ],
+ "example": ["https://cal.com/ics/feed.ics", "http://cal.com/ics/feed.ics"],
"description": "An array of ICS URLs",
"items": {
"type": "string",
@@ -24181,9 +22080,7 @@
"description": "Whether to allowing writing to the calendar or not"
}
},
- "required": [
- "urls"
- ]
+ "required": ["urls"]
},
"CreateIcsFeedOutput": {
"type": "object",
@@ -24223,14 +22120,7 @@
"description": "Whether the calendar credentials are valid or not"
}
},
- "required": [
- "id",
- "type",
- "userId",
- "teamId",
- "appId",
- "invalid"
- ]
+ "required": ["id", "type", "userId", "teamId", "appId", "invalid"]
},
"CreateIcsFeedOutputResponseDto": {
"type": "object",
@@ -24238,19 +22128,13 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"$ref": "#/components/schemas/CreateIcsFeedOutput"
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"BusyTimesOutput": {
"type": "object",
@@ -24268,10 +22152,7 @@
"nullable": true
}
},
- "required": [
- "start",
- "end"
- ]
+ "required": ["start", "end"]
},
"GetBusyTimesOutput": {
"type": "object",
@@ -24279,10 +22160,7 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"type": "array",
@@ -24291,10 +22169,7 @@
}
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"Integration": {
"type": "object",
@@ -24403,13 +22278,7 @@
"nullable": true
}
},
- "required": [
- "externalId",
- "primary",
- "readOnly",
- "isSelected",
- "credentialId"
- ]
+ "required": ["externalId", "primary", "readOnly", "isSelected", "credentialId"]
},
"Calendar": {
"type": "object",
@@ -24444,12 +22313,7 @@
"nullable": true
}
},
- "required": [
- "externalId",
- "readOnly",
- "isSelected",
- "credentialId"
- ]
+ "required": ["externalId", "readOnly", "isSelected", "credentialId"]
},
"ConnectedCalendar": {
"type": "object",
@@ -24474,10 +22338,7 @@
}
}
},
- "required": [
- "integration",
- "credentialId"
- ]
+ "required": ["integration", "credentialId"]
},
"DestinationCalendar": {
"type": "object",
@@ -24551,10 +22412,7 @@
"$ref": "#/components/schemas/DestinationCalendar"
}
},
- "required": [
- "connectedCalendars",
- "destinationCalendar"
- ]
+ "required": ["connectedCalendars", "destinationCalendar"]
},
"ConnectedCalendarsOutput": {
"type": "object",
@@ -24562,19 +22420,13 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"$ref": "#/components/schemas/ConnectedCalendarsData"
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"CreateCalendarCredentialsInput": {
"type": "object",
@@ -24586,10 +22438,7 @@
"type": "string"
}
},
- "required": [
- "username",
- "password"
- ]
+ "required": ["username", "password"]
},
"DeleteCalendarCredentialsInputBodyDto": {
"type": "object",
@@ -24600,9 +22449,7 @@
"description": "Credential ID of the calendar to delete, as returned by the /calendars endpoint"
}
},
- "required": [
- "id"
- ]
+ "required": ["id"]
},
"DeletedCalendarCredentialsOutputDto": {
"type": "object",
@@ -24630,14 +22477,7 @@
"nullable": true
}
},
- "required": [
- "id",
- "type",
- "userId",
- "teamId",
- "appId",
- "invalid"
- ]
+ "required": ["id", "type", "userId", "teamId", "appId", "invalid"]
},
"DeletedCalendarCredentialsOutputResponseDto": {
"type": "object",
@@ -24645,19 +22485,13 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"$ref": "#/components/schemas/DeletedCalendarCredentialsOutputDto"
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"CreateOrganizationInput": {
"type": "object",
@@ -24693,9 +22527,7 @@
}
}
},
- "required": [
- "name"
- ]
+ "required": ["name"]
},
"ManagedOrganizationWithApiKeyOutput": {
"type": "object",
@@ -24720,11 +22552,7 @@
"type": "string"
}
},
- "required": [
- "id",
- "name",
- "apiKey"
- ]
+ "required": ["id", "name", "apiKey"]
},
"CreateManagedOrganizationOutput": {
"type": "object",
@@ -24732,19 +22560,13 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"$ref": "#/components/schemas/ManagedOrganizationWithApiKeyOutput"
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"ManagedOrganizationOutput": {
"type": "object",
@@ -24766,10 +22588,7 @@
}
}
},
- "required": [
- "id",
- "name"
- ]
+ "required": ["id", "name"]
},
"GetManagedOrganizationOutput": {
"type": "object",
@@ -24777,19 +22596,13 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"$ref": "#/components/schemas/ManagedOrganizationOutput"
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"PaginationMetaDto": {
"type": "object",
@@ -24857,10 +22670,7 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"type": "array",
@@ -24872,11 +22682,7 @@
"$ref": "#/components/schemas/PaginationMetaDto"
}
},
- "required": [
- "status",
- "data",
- "pagination"
- ]
+ "required": ["status", "data", "pagination"]
},
"UpdateOrganizationInput": {
"type": "object",
@@ -24925,14 +22731,7 @@
"type": "string"
}
},
- "required": [
- "id",
- "formId",
- "formFillerId",
- "routedToBookingUid",
- "response",
- "createdAt"
- ]
+ "required": ["id", "formId", "formFillerId", "routedToBookingUid", "response", "createdAt"]
},
"GetRoutingFormResponsesOutput": {
"type": "object",
@@ -24940,19 +22739,13 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"$ref": "#/components/schemas/RoutingFormResponseOutput"
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"Routing": {
"type": "object",
@@ -24971,10 +22764,7 @@
},
"teamMemberIds": {
"description": "Array of team member IDs that were routed to handle this booking.",
- "example": [
- 101,
- 102
- ],
+ "example": [101, 102],
"type": "array",
"items": {
"type": "number"
@@ -25001,9 +22791,7 @@
"example": "Account"
}
},
- "required": [
- "teamMemberIds"
- ]
+ "required": ["teamMemberIds"]
},
"CreateRoutingFormResponseOutputData": {
"type": "object",
@@ -25018,10 +22806,7 @@
"example": {
"eventTypeId": 123,
"routing": {
- "teamMemberIds": [
- 101,
- 102
- ],
+ "teamMemberIds": [101, 102],
"teamMemberEmail": "[email protected]",
"skipContactOwner": true
}
@@ -25060,19 +22845,13 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"$ref": "#/components/schemas/CreateRoutingFormResponseOutputData"
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"UpdateRoutingFormResponseInput": {
"type": "object",
@@ -25089,19 +22868,13 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"$ref": "#/components/schemas/RoutingFormResponseOutput"
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"RoutingFormOutput": {
"type": "object",
@@ -25177,10 +22950,7 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"type": "array",
@@ -25189,10 +22959,7 @@
}
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"SlotsOutput_2024_09_04": {
"type": "object",
@@ -25219,10 +22986,7 @@
]
}
},
- "required": [
- "eventTypeId",
- "slots"
- ]
+ "required": ["eventTypeId", "slots"]
},
"ResponseSlotsOutput": {
"type": "object",
@@ -25230,19 +22994,13 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"$ref": "#/components/schemas/ResponseSlotsOutputData"
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"ReserveSlotInput_2024_09_04": {
"type": "object",
@@ -25268,10 +23026,7 @@
"description": "ONLY for authenticated requests with api key, access token or OAuth credentials (ID + secret).\n \n For how many minutes the slot should be reserved - for this long time noone else can book this event type at `start` time. If not provided, defaults to 5 minutes."
}
},
- "required": [
- "eventTypeId",
- "slotStart"
- ]
+ "required": ["eventTypeId", "slotStart"]
},
"ReserveSlotOutput_2024_09_04": {
"type": "object",
@@ -25328,19 +23083,13 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"$ref": "#/components/schemas/ReserveSlotOutput_2024_09_04"
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"GetReservedSlotOutput_2024_09_04": {
"type": "object",
@@ -25348,10 +23097,7 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"nullable": true,
@@ -25362,10 +23108,7 @@
]
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"MeOrgOutput": {
"type": "object",
@@ -25377,10 +23120,7 @@
"type": "number"
}
},
- "required": [
- "isPlatform",
- "id"
- ]
+ "required": ["isPlatform", "id"]
},
"MeOutput": {
"type": "object",
@@ -25432,19 +23172,13 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"$ref": "#/components/schemas/MeOutput"
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"UpdateMeOutput": {
"type": "object",
@@ -25452,19 +23186,13 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"$ref": "#/components/schemas/MeOutput"
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"BookingInputAddressLocation_2024_08_13": {
"type": "object",
@@ -25475,9 +23203,7 @@
"description": "only allowed value for type is `address` - it refers to address defined by the organizer."
}
},
- "required": [
- "type"
- ]
+ "required": ["type"]
},
"BookingInputAttendeeAddressLocation_2024_08_13": {
"type": "object",
@@ -25492,10 +23218,7 @@
"example": "123 Example St, City, Country"
}
},
- "required": [
- "type",
- "address"
- ]
+ "required": ["type", "address"]
},
"BookingInputAttendeeDefinedLocation_2024_08_13": {
"type": "object",
@@ -25510,10 +23233,7 @@
"example": "321 Example St, City, Country"
}
},
- "required": [
- "type",
- "location"
- ]
+ "required": ["type", "location"]
},
"BookingInputAttendeePhoneLocation_2024_08_13": {
"type": "object",
@@ -25528,10 +23248,7 @@
"example": "+37120993151"
}
},
- "required": [
- "type",
- "phone"
- ]
+ "required": ["type", "phone"]
},
"BookingInputIntegrationLocation_2024_08_13": {
"type": "object",
@@ -25577,10 +23294,7 @@
]
}
},
- "required": [
- "type",
- "integration"
- ]
+ "required": ["type", "integration"]
},
"BookingInputLinkLocation_2024_08_13": {
"type": "object",
@@ -25591,9 +23305,7 @@
"description": "only allowed value for type is `link` - it refers to link defined by the organizer."
}
},
- "required": [
- "type"
- ]
+ "required": ["type"]
},
"BookingInputPhoneLocation_2024_08_13": {
"type": "object",
@@ -25604,9 +23316,7 @@
"description": "only allowed value for type is `phone` - it refers to phone defined by the organizer."
}
},
- "required": [
- "type"
- ]
+ "required": ["type"]
},
"BookingInputOrganizersDefaultAppLocation_2024_08_13": {
"type": "object",
@@ -25617,9 +23327,7 @@
"description": "only available for team event types and the only allowed value for type is `organizersDefaultApp` - it refers to the default app defined by the organizer."
}
},
- "required": [
- "type"
- ]
+ "required": ["type"]
},
"ValidateBookingLocation_2024_08_13": {
"type": "object",
@@ -25700,10 +23408,7 @@
"default": "en"
}
},
- "required": [
- "name",
- "timeZone"
- ]
+ "required": ["name", "timeZone"]
},
"CreateBookingInput_2024_08_13": {
"type": "object",
@@ -25755,10 +23460,7 @@
},
"guests": {
"description": "An optional list of guest emails attending the event.",
- "example": [
- ],
"type": "array",
"items": {
"type": "string"
@@ -25815,10 +23517,7 @@
"description": "Routing information from routing forms that determined the booking assignment. Both responseId and teamMemberIds are required if provided.",
"example": {
"responseId": 123,
- "teamMemberIds": [
- 101,
- 102
- ]
+ "teamMemberIds": [101, 102]
},
"allOf": [
{
@@ -25827,10 +23526,7 @@
]
}
},
- "required": [
- "start",
- "attendee"
- ]
+ "required": ["start", "attendee"]
},
"CreateInstantBookingInput_2024_08_13": {
"type": "object",
@@ -25882,10 +23578,7 @@
},
"guests": {
"description": "An optional list of guest emails attending the event.",
- "example": [
- ],
"type": "array",
"items": {
"type": "string"
@@ -25942,10 +23635,7 @@
"description": "Routing information from routing forms that determined the booking assignment. Both responseId and teamMemberIds are required if provided.",
"example": {
"responseId": 123,
- "teamMemberIds": [
- 101,
- 102
- ]
+ "teamMemberIds": [101, 102]
},
"allOf": [
{
@@ -25959,11 +23649,7 @@
"example": true
}
},
- "required": [
- "start",
- "attendee",
- "instant"
- ]
+ "required": ["start", "attendee", "instant"]
},
"CreateRecurringBookingInput_2024_08_13": {
"type": "object",
@@ -26015,10 +23701,7 @@
},
"guests": {
"description": "An optional list of guest emails attending the event.",
- "example": [
- ],
"type": "array",
"items": {
"type": "string"
@@ -26075,10 +23758,7 @@
"description": "Routing information from routing forms that determined the booking assignment. Both responseId and teamMemberIds are required if provided.",
"example": {
"responseId": 123,
- "teamMemberIds": [
- 101,
- 102
- ]
+ "teamMemberIds": [101, 102]
},
"allOf": [
{
@@ -26092,10 +23772,7 @@
"example": 5
}
},
- "required": [
- "start",
- "attendee"
- ]
+ "required": ["start", "attendee"]
},
"BookingHost": {
"type": "object",
@@ -26121,13 +23798,7 @@
"example": "America/Los_Angeles"
}
},
- "required": [
- "id",
- "name",
- "email",
- "username",
- "timeZone"
- ]
+ "required": ["id", "name", "email", "username", "timeZone"]
},
"EventType": {
"type": "object",
@@ -26141,10 +23812,7 @@
"example": "some-event"
}
},
- "required": [
- "id",
- "slug"
- ]
+ "required": ["id", "slug"]
},
"BookingAttendee": {
"type": "object",
@@ -26219,12 +23887,7 @@
"example": "+1234567890"
}
},
- "required": [
- "name",
- "email",
- "timeZone",
- "absent"
- ]
+ "required": ["name", "email", "timeZone", "absent"]
},
"BookingOutput_2024_08_13": {
"type": "object",
@@ -26253,12 +23916,7 @@
},
"status": {
"type": "string",
- "enum": [
- "cancelled",
- "accepted",
- "rejected",
- "pending"
- ],
+ "enum": ["cancelled", "accepted", "rejected", "pending"],
"example": "accepted"
},
"cancellationReason": {
@@ -26352,10 +24010,7 @@
}
},
"guests": {
- "example": [
- ],
"type": "array",
"items": {
"type": "string"
@@ -26416,12 +24071,7 @@
},
"status": {
"type": "string",
- "enum": [
- "cancelled",
- "accepted",
- "rejected",
- "pending"
- ],
+ "enum": ["cancelled", "accepted", "rejected", "pending"],
"example": "accepted"
},
"cancellationReason": {
@@ -26515,10 +24165,7 @@
}
},
"guests": {
- "example": [
- ],
"type": "array",
"items": {
"type": "string"
@@ -26647,14 +24294,7 @@
}
}
},
- "required": [
- "name",
- "email",
- "timeZone",
- "absent",
- "seatUid",
- "bookingFieldsResponses"
- ]
+ "required": ["name", "email", "timeZone", "absent", "seatUid", "bookingFieldsResponses"]
},
"CreateSeatedBookingOutput_2024_08_13": {
"type": "object",
@@ -26683,12 +24323,7 @@
},
"status": {
"type": "string",
- "enum": [
- "cancelled",
- "accepted",
- "rejected",
- "pending"
- ],
+ "enum": ["cancelled", "accepted", "rejected", "pending"],
"example": "accepted"
},
"cancellationReason": {
@@ -26833,12 +24468,7 @@
},
"status": {
"type": "string",
- "enum": [
- "cancelled",
- "accepted",
- "rejected",
- "pending"
- ],
+ "enum": ["cancelled", "accepted", "rejected", "pending"],
"example": "accepted"
},
"cancellationReason": {
@@ -26967,10 +24597,7 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"oneOf": [
@@ -26996,10 +24623,7 @@
"description": "Booking data, which can be either a BookingOutput object or an array of RecurringBookingOutput objects"
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"GetSeatedBookingOutput_2024_08_13": {
"type": "object",
@@ -27028,12 +24652,7 @@
},
"status": {
"type": "string",
- "enum": [
- "cancelled",
- "accepted",
- "rejected",
- "pending"
- ],
+ "enum": ["cancelled", "accepted", "rejected", "pending"],
"example": "accepted"
},
"cancellationReason": {
@@ -27173,12 +24792,7 @@
},
"status": {
"type": "string",
- "enum": [
- "cancelled",
- "accepted",
- "rejected",
- "pending"
- ],
+ "enum": ["cancelled", "accepted", "rejected", "pending"],
"example": "accepted"
},
"cancellationReason": {
@@ -27302,10 +24916,7 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"oneOf": [
@@ -27340,10 +24951,7 @@
"type": "object"
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"RecordingItem": {
"type": "object",
@@ -27387,14 +24995,7 @@
"example": "Error message"
}
},
- "required": [
- "id",
- "roomName",
- "startTs",
- "status",
- "duration",
- "shareToken"
- ]
+ "required": ["id", "roomName", "startTs", "status", "duration", "shareToken"]
},
"GetBookingRecordingsOutput": {
"type": "object",
@@ -27402,10 +25003,7 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"error": {
"type": "object"
@@ -27417,10 +25015,7 @@
}
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"GetBookingTranscriptsOutput": {
"type": "object",
@@ -27428,16 +25023,10 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
- "example": [
- "https://transcript1.com",
- "https://transcript2.com"
- ],
+ "example": ["https://transcript1.com", "https://transcript2.com"],
"type": "array",
"items": {
"type": "string"
@@ -27447,10 +25036,7 @@
"type": "object"
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"GetBookingsOutput_2024_08_13": {
"type": "object",
@@ -27458,10 +25044,7 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"type": "array",
@@ -27490,11 +25073,7 @@
"type": "object"
}
},
- "required": [
- "status",
- "data",
- "pagination"
- ]
+ "required": ["status", "data", "pagination"]
},
"RescheduleBookingInput_2024_08_13": {
"type": "object",
@@ -27514,9 +25093,7 @@
"description": "Reason for rescheduling the booking"
}
},
- "required": [
- "start"
- ]
+ "required": ["start"]
},
"RescheduleSeatedBookingInput_2024_08_13": {
"type": "object",
@@ -27536,10 +25113,7 @@
"description": "Uid of the specific seat within booking."
}
},
- "required": [
- "start",
- "seatUid"
- ]
+ "required": ["start", "seatUid"]
},
"RescheduleBookingOutput_2024_08_13": {
"type": "object",
@@ -27547,10 +25121,7 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"oneOf": [
@@ -27570,10 +25141,7 @@
"description": "Booking data, which can be either a BookingOutput object or a RecurringBookingOutput object"
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"CancelBookingInput_2024_08_13": {
"type": "object",
@@ -27597,9 +25165,7 @@
"description": "Uid of the specific seat within booking."
}
},
- "required": [
- "seatUid"
- ]
+ "required": ["seatUid"]
},
"CancelBookingOutput_2024_08_13": {
"type": "object",
@@ -27607,10 +25173,7 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"oneOf": [
@@ -27642,10 +25205,7 @@
"description": "Booking data, which can be either a BookingOutput object, a RecurringBookingOutput object, or an array of RecurringBookingOutput objects"
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"MarkAbsentAttendee": {
"type": "object",
@@ -27657,10 +25217,7 @@
"type": "boolean"
}
},
- "required": [
- "email",
- "absent"
- ]
+ "required": ["email", "absent"]
},
"MarkAbsentBookingInput_2024_08_13": {
"type": "object",
@@ -27684,10 +25241,7 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"oneOf": [
@@ -27701,10 +25255,7 @@
"description": "Booking data, which can be either a BookingOutput object or a RecurringBookingOutput object"
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"ReassignedToDto": {
"type": "object",
@@ -27722,11 +25273,7 @@
"example": "[email protected]"
}
},
- "required": [
- "id",
- "name",
- "email"
- ]
+ "required": ["id", "name", "email"]
},
"ReassignBookingOutput_2024_08_13": {
"type": "object",
@@ -27734,10 +25281,7 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"oneOf": [
@@ -27753,10 +25297,7 @@
]
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"ReassignToUserBookingInput_2024_08_13": {
"type": "object",
@@ -27790,10 +25331,7 @@
"description": "The link to the calendar"
}
},
- "required": [
- "label",
- "link"
- ]
+ "required": ["label", "link"]
},
"CalendarLinksOutput_2024_08_13": {
"type": "object",
@@ -27811,10 +25349,7 @@
}
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"BookingReference": {
"type": "object",
@@ -27837,12 +25372,7 @@
"description": "The id of the booking reference"
}
},
- "required": [
- "type",
- "eventUid",
- "destinationCalendarId",
- "id"
- ]
+ "required": ["type", "eventUid", "destinationCalendarId", "id"]
},
"BookingReferencesOutput_2024_08_13": {
"type": "object",
@@ -27860,10 +25390,7 @@
}
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"CreateTeamMembershipInput": {
"type": "object",
@@ -27878,20 +25405,14 @@
"role": {
"type": "string",
"default": "MEMBER",
- "enum": [
- "MEMBER",
- "OWNER",
- "ADMIN"
- ]
+ "enum": ["MEMBER", "OWNER", "ADMIN"]
},
"disableImpersonation": {
"type": "boolean",
"default": false
}
},
- "required": [
- "userId"
- ]
+ "required": ["userId"]
},
"CreateTeamMembershipOutput": {
"type": "object",
@@ -27899,19 +25420,13 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"$ref": "#/components/schemas/TeamMembershipOutput"
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"GetTeamMembershipOutput": {
"type": "object",
@@ -27919,19 +25434,13 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"$ref": "#/components/schemas/TeamMembershipOutput"
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"GetTeamMembershipsOutput": {
"type": "object",
@@ -27939,19 +25448,13 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"$ref": "#/components/schemas/TeamMembershipOutput"
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"UpdateTeamMembershipInput": {
"type": "object",
@@ -27961,11 +25464,7 @@
},
"role": {
"type": "string",
- "enum": [
- "MEMBER",
- "OWNER",
- "ADMIN"
- ]
+ "enum": ["MEMBER", "OWNER", "ADMIN"]
},
"disableImpersonation": {
"type": "boolean"
@@ -27978,19 +25477,13 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"$ref": "#/components/schemas/TeamMembershipOutput"
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"DeleteTeamMembershipOutput": {
"type": "object",
@@ -27998,19 +25491,13 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"$ref": "#/components/schemas/TeamMembershipOutput"
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"UserWebhookOutputDto": {
"type": "object",
@@ -28042,14 +25529,7 @@
"type": "string"
}
},
- "required": [
- "payloadTemplate",
- "userId",
- "id",
- "triggers",
- "subscriberUrl",
- "active"
- ]
+ "required": ["payloadTemplate", "userId", "id", "triggers", "subscriberUrl", "active"]
},
"UserWebhookOutputResponseDto": {
"type": "object",
@@ -28057,19 +25537,13 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"$ref": "#/components/schemas/UserWebhookOutputDto"
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"UserWebhooksOutputResponseDto": {
"type": "object",
@@ -28077,10 +25551,7 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"type": "array",
@@ -28089,10 +25560,7 @@
}
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"EventTypeWebhookOutputDto": {
"type": "object",
@@ -28124,14 +25592,7 @@
"type": "string"
}
},
- "required": [
- "payloadTemplate",
- "eventTypeId",
- "id",
- "triggers",
- "subscriberUrl",
- "active"
- ]
+ "required": ["payloadTemplate", "eventTypeId", "id", "triggers", "subscriberUrl", "active"]
},
"EventTypeWebhookOutputResponseDto": {
"type": "object",
@@ -28139,19 +25600,13 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"$ref": "#/components/schemas/EventTypeWebhookOutputDto"
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"EventTypeWebhooksOutputResponseDto": {
"type": "object",
@@ -28159,10 +25614,7 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"type": "array",
@@ -28171,10 +25623,7 @@
}
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"DeleteManyWebhooksOutputResponseDto": {
"type": "object",
@@ -28182,19 +25631,13 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"type": "string"
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"OAuthClientWebhookOutputDto": {
"type": "object",
@@ -28226,14 +25669,7 @@
"type": "string"
}
},
- "required": [
- "payloadTemplate",
- "oAuthClientId",
- "id",
- "triggers",
- "subscriberUrl",
- "active"
- ]
+ "required": ["payloadTemplate", "oAuthClientId", "id", "triggers", "subscriberUrl", "active"]
},
"OAuthClientWebhookOutputResponseDto": {
"type": "object",
@@ -28241,19 +25677,13 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"$ref": "#/components/schemas/OAuthClientWebhookOutputDto"
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"OAuthClientWebhooksOutputResponseDto": {
"type": "object",
@@ -28261,10 +25691,7 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"type": "array",
@@ -28273,10 +25700,7 @@
}
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"DestinationCalendarsInputBodyDto": {
"type": "object",
@@ -28285,11 +25709,7 @@
"type": "string",
"example": "apple_calendar",
"description": "The calendar service you want to integrate, as returned by the /calendars endpoint",
- "enum": [
- "apple_calendar",
- "google_calendar",
- "office365_calendar"
- ]
+ "enum": ["apple_calendar", "google_calendar", "office365_calendar"]
},
"externalId": {
"type": "string",
@@ -28300,10 +25720,7 @@
"type": "string"
}
},
- "required": [
- "integration",
- "externalId"
- ]
+ "required": ["integration", "externalId"]
},
"DestinationCalendarsOutputDto": {
"type": "object",
@@ -28322,12 +25739,7 @@
"nullable": true
}
},
- "required": [
- "userId",
- "integration",
- "externalId",
- "credentialId"
- ]
+ "required": ["userId", "integration", "externalId", "credentialId"]
},
"DestinationCalendarsOutputResponseDto": {
"type": "object",
@@ -28335,29 +25747,18 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"$ref": "#/components/schemas/DestinationCalendarsOutputDto"
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"CalendarEventResponseStatus": {
"type": "string",
"description": "Host's response to the invitation",
- "enum": [
- "accepted",
- "pending",
- "declined",
- "needsAction"
- ]
+ "enum": ["accepted", "pending", "declined", "needsAction"]
},
"CalendarEventAttendee": {
"type": "object",
@@ -28386,19 +25787,12 @@
"description": "Indicates if this attendee's attendance is optional"
}
},
- "required": [
- "email"
- ]
+ "required": ["email"]
},
"CalendarEventStatus": {
"type": "string",
"description": "Status of the event (accepted, pending, declined, cancelled)",
- "enum": [
- "accepted",
- "pending",
- "declined",
- "cancelled"
- ]
+ "enum": ["accepted", "pending", "declined", "cancelled"]
},
"CalendarEventHost": {
"type": "object",
@@ -28418,18 +25812,12 @@
"$ref": "#/components/schemas/CalendarEventResponseStatus"
}
},
- "required": [
- "email"
- ]
+ "required": ["email"]
},
"CalendarSource": {
"type": "string",
"description": "Calendar integration source (e.g., Google Calendar, Office 365, Apple Calendar). Currently only Google Calendar is supported.",
- "enum": [
- "google",
- "office365",
- "apple"
- ]
+ "enum": ["google", "office365", "apple"]
},
"UnifiedCalendarEventOutput": {
"type": "object",
@@ -28523,13 +25911,7 @@
"$ref": "#/components/schemas/CalendarSource"
}
},
- "required": [
- "start",
- "end",
- "id",
- "title",
- "source"
- ]
+ "required": ["start", "end", "id", "title", "source"]
},
"GetUnifiedCalendarEventOutput": {
"type": "object",
@@ -28537,19 +25919,13 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"$ref": "#/components/schemas/UnifiedCalendarEventOutput"
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"RequestEmailVerificationInput": {
"type": "object",
@@ -28560,9 +25936,7 @@
"example": "[email protected]"
}
},
- "required": [
- "email"
- ]
+ "required": ["email"]
},
"RequestEmailVerificationOutput": {
"type": "object",
@@ -28570,15 +25944,10 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
}
},
- "required": [
- "status"
- ]
+ "required": ["status"]
},
"RequestPhoneVerificationInput": {
"type": "object",
@@ -28589,9 +25958,7 @@
"example": "+372 5555 6666"
}
},
- "required": [
- "phone"
- ]
+ "required": ["phone"]
},
"RequestPhoneVerificationOutput": {
"type": "object",
@@ -28599,15 +25966,10 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
}
},
- "required": [
- "status"
- ]
+ "required": ["status"]
},
"VerifyEmailInput": {
"type": "object",
@@ -28623,10 +25985,7 @@
"example": "1ABG2C"
}
},
- "required": [
- "email",
- "code"
- ]
+ "required": ["email", "code"]
},
"WorkingHours": {
"type": "object",
@@ -28648,11 +26007,7 @@
"nullable": true
}
},
- "required": [
- "days",
- "startTime",
- "endTime"
- ]
+ "required": ["days", "startTime", "endTime"]
},
"AvailabilityModel": {
"type": "object",
@@ -28692,12 +26047,7 @@
"nullable": true
}
},
- "required": [
- "id",
- "days",
- "startTime",
- "endTime"
- ]
+ "required": ["id", "days", "startTime", "endTime"]
},
"ScheduleOutput": {
"type": "object",
@@ -28767,19 +26117,13 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"$ref": "#/components/schemas/ScheduleOutput"
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"VerifyPhoneInput": {
"type": "object",
@@ -28795,10 +26139,7 @@
"example": "1ABG2C"
}
},
- "required": [
- "phone",
- "code"
- ]
+ "required": ["phone", "code"]
},
"UserVerifiedPhoneOutput": {
"type": "object",
@@ -28806,19 +26147,13 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"$ref": "#/components/schemas/ScheduleOutput"
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"UserVerifiedEmailsOutput": {
"type": "object",
@@ -28826,19 +26161,13 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"$ref": "#/components/schemas/ScheduleOutput"
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"UserVerifiedPhonesOutput": {
"type": "object",
@@ -28846,19 +26175,13 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"$ref": "#/components/schemas/ScheduleOutput"
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"TeamVerifiedEmailOutput": {
"type": "object",
@@ -28866,19 +26189,13 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"$ref": "#/components/schemas/ScheduleOutput"
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"TeamVerifiedPhoneOutput": {
"type": "object",
@@ -28886,19 +26203,13 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"$ref": "#/components/schemas/ScheduleOutput"
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"TeamVerifiedEmailsOutput": {
"type": "object",
@@ -28906,19 +26217,13 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"$ref": "#/components/schemas/ScheduleOutput"
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"TeamVerifiedPhonesOutput": {
"type": "object",
@@ -28926,20 +26231,14 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"$ref": "#/components/schemas/ScheduleOutput"
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
}
}
}
-}
\ No newline at end of file
+}
diff --git a/packages/eslint-plugin/src/rules/avoid-web-storage.ts b/packages/eslint-plugin/src/rules/avoid-web-storage.ts
index 5e4e7d404bb..11fd928a84c 100644
--- a/packages/eslint-plugin/src/rules/avoid-web-storage.ts
+++ b/packages/eslint-plugin/src/rules/avoid-web-storage.ts
@@ -5,7 +5,7 @@ const rule = createRule({
create(context) {
// Track imported names from @calcom/lib/webstorage
const safeImportedNames = new Set<string>();
-
+
return {
ImportDeclaration(node) {
// Check if this is an import from the safe webstorage module
@@ -18,11 +18,11 @@ const rule = createRule({
});
}
},
-
+
CallExpression(node) {
const webStorages = ["localStorage", "sessionStorage"];
const callee = node.callee;
-
+
// Check for window.localStorage or window.sessionStorage
if (
// Can't figure out how to fix this TS issue
@@ -40,7 +40,7 @@ const rule = createRule({
messageId: "possible-issue-with-embed",
});
}
-
+
// Check for direct localStorage or sessionStorage usage
if (
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
@@ -63,11 +63,11 @@ const rule = createRule({
});
}
},
-
+
// Also check for property access like localStorage.length
MemberExpression(node) {
const webStorages = ["localStorage", "sessionStorage"];
-
+
// Check for direct property access on localStorage/sessionStorage
if (
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
@@ -86,7 +86,7 @@ const rule = createRule({
messageId: "possible-issue-with-embed",
});
}
-
+
// Check for window.localStorage/sessionStorage property access
if (
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
diff --git a/packages/features/bookings/lib/handleNewBooking.ts b/packages/features/bookings/lib/handleNewBooking.ts
index 14310476949..613e1a9c866 100644
--- a/packages/features/bookings/lib/handleNewBooking.ts
+++ b/packages/features/bookings/lib/handleNewBooking.ts
@@ -44,6 +44,7 @@ import {
import { getVideoCallUrlFromCalEvent } from "@calcom/lib/CalEventParser";
import EventManager, { placeholderCreatedEvent } from "@calcom/lib/EventManager";
import { handleAnalyticsEvents } from "@calcom/lib/analyticsManager/handleAnalyticsEvents";
+import { groupHostsByGroupId } from "@calcom/lib/bookings/hostGroupUtils";
import { shouldIgnoreContactOwner } from "@calcom/lib/bookings/routing/utils";
import { getUsernameList } from "@calcom/lib/defaultEvents";
import {
@@ -281,9 +282,7 @@ export const buildEventForTeamEventType = async ({
const fixedUsers = users.filter((user) => user.isFixed);
const nonFixedUsers = users.filter((user) => !user.isFixed);
const filteredUsers =
- schedulingType === SchedulingType.ROUND_ROBIN
- ? [...fixedUsers, ...(nonFixedUsers.length > 0 ? [nonFixedUsers[0]] : [])]
- : users;
+ schedulingType === SchedulingType.ROUND_ROBIN ? [...fixedUsers, ...nonFixedUsers] : users;
// Organizer or user owner of this event type it's not listed as a team member.
const teamMemberPromises = filteredUsers
@@ -825,11 +824,17 @@ async function handler(
}
}
- const luckyUserPool: IsFixedAwareUser[] = [];
const fixedUserPool: IsFixedAwareUser[] = [];
+ const nonFixedUsers: IsFixedAwareUser[] = [];
availableUsers.forEach((user) => {
- user.isFixed ? fixedUserPool.push(user) : luckyUserPool.push(user);
+ user.isFixed ? fixedUserPool.push(user) : nonFixedUsers.push(user);
+ });
+
+ // Group non-fixed users by their group IDs
+ const luckyUserPools = groupHostsByGroupId({
+ hosts: nonFixedUsers,
+ hostGroups: eventType.hostGroups,
});
const notAvailableLuckyUsers: typeof users = [];
@@ -838,81 +843,88 @@ async function handler(
"Computed available users",
safeStringify({
availableUsers: availableUsers.map((user) => user.id),
- luckyUserPool: luckyUserPool.map((user) => user.id),
+ luckyUserPools: Object.fromEntries(
+ Object.entries(luckyUserPools).map(([groupId, users]) => [groupId, users.map((user) => user.id)])
+ ),
})
);
const luckyUsers: typeof users = [];
-
// loop through all non-fixed hosts and get the lucky users
// This logic doesn't run when contactOwner is used because in that case, luckUsers.length === 1
- while (luckyUserPool.length > 0 && luckyUsers.length < 1 /* TODO: Add variable */) {
- const freeUsers = luckyUserPool.filter(
- (user) => !luckyUsers.concat(notAvailableLuckyUsers).find((existing) => existing.id === user.id)
- );
- // no more freeUsers after subtracting notAvailableLuckyUsers from luckyUsers :(
- if (freeUsers.length === 0) break;
- assertNonEmptyArray(freeUsers); // make sure TypeScript knows it too with an assertion; the error will never be thrown.
- // freeUsers is ensured
-
- const userIdsSet = new Set(users.map((user) => user.id));
- const firstUserOrgId = await getOrgIdFromMemberOrTeamId({
- memberId: eventTypeWithUsers.users[0].id ?? null,
- teamId: eventType.teamId,
- });
- const newLuckyUser = await getLuckyUser({
- // find a lucky user that is not already in the luckyUsers array
- availableUsers: freeUsers,
- allRRHosts: (
- await enrichHostsWithDelegationCredentials({
- orgId: firstUserOrgId ?? null,
- hosts: eventTypeWithUsers.hosts,
- })
- ).filter((host) => !host.isFixed && userIdsSet.has(host.user.id)),
- eventType,
- routingFormResponse,
- meetingStartTime: new Date(reqBody.start),
- });
- if (!newLuckyUser) {
- break; // prevent infinite loop
- }
- if (
- input.bookingData.isFirstRecurringSlot &&
- eventType.schedulingType === SchedulingType.ROUND_ROBIN
- ) {
- // for recurring round robin events check if lucky user is available for next slots
- try {
- for (
- let i = 0;
- i < input.bookingData.allRecurringDates.length &&
- i < input.bookingData.numSlotsToCheckForAvailability;
- i++
- ) {
- const start = input.bookingData.allRecurringDates[i].start;
- const end = input.bookingData.allRecurringDates[i].end;
-
- await ensureAvailableUsers(
- { ...eventTypeWithUsers, users: [newLuckyUser] },
- {
- dateFrom: dayjs(start).tz(reqBody.timeZone).format(),
- dateTo: dayjs(end).tz(reqBody.timeZone).format(),
- timeZone: reqBody.timeZone,
- originalRescheduledBooking,
- },
- loggerWithEventDetails,
- shouldServeCache
+ for (const [groupId, luckyUserPool] of Object.entries(luckyUserPools)) {
+ let luckUserFound = false;
+ while (luckyUserPool.length > 0 && !luckUserFound) {
+ const freeUsers = luckyUserPool.filter(
+ (user) => !luckyUsers.concat(notAvailableLuckyUsers).find((existing) => existing.id === user.id)
+ );
+ // no more freeUsers after subtracting notAvailableLuckyUsers from luckyUsers :(
+ if (freeUsers.length === 0) break;
+ assertNonEmptyArray(freeUsers); // make sure TypeScript knows it too with an assertion; the error will never be thrown.
+ // freeUsers is ensured
+
+ const userIdsSet = new Set(users.map((user) => user.id));
+ const firstUserOrgId = await getOrgIdFromMemberOrTeamId({
+ memberId: eventTypeWithUsers.users[0].id ?? null,
+ teamId: eventType.teamId,
+ });
+ const newLuckyUser = await getLuckyUser({
+ // find a lucky user that is not already in the luckyUsers array
+ availableUsers: freeUsers,
+ // only hosts from the same group
+ allRRHosts: (
+ await enrichHostsWithDelegationCredentials({
+ orgId: firstUserOrgId ?? null,
+ hosts: eventTypeWithUsers.hosts,
+ })
+ ).filter((host) => !host.isFixed && userIdsSet.has(host.user.id) && host.groupId === groupId),
+ eventType,
+ routingFormResponse,
+ meetingStartTime: new Date(reqBody.start),
+ });
+ if (!newLuckyUser) {
+ break; // prevent infinite loop
+ }
+ if (
+ input.bookingData.isFirstRecurringSlot &&
+ eventType.schedulingType === SchedulingType.ROUND_ROBIN
+ ) {
+ // for recurring round robin events check if lucky user is available for next slots
+ try {
+ for (
+ let i = 0;
+ i < input.bookingData.allRecurringDates.length &&
+ i < input.bookingData.numSlotsToCheckForAvailability;
+ i++
+ ) {
+ const start = input.bookingData.allRecurringDates[i].start;
+ const end = input.bookingData.allRecurringDates[i].end;
+
+ await ensureAvailableUsers(
+ { ...eventTypeWithUsers, users: [newLuckyUser] },
+ {
+ dateFrom: dayjs(start).tz(reqBody.timeZone).format(),
+ dateTo: dayjs(end).tz(reqBody.timeZone).format(),
+ timeZone: reqBody.timeZone,
+ originalRescheduledBooking,
+ },
+ loggerWithEventDetails,
+ shouldServeCache
+ );
+ }
+ // if no error, then lucky user is available for the next slots
+ luckyUsers.push(newLuckyUser);
+ luckUserFound = true;
+ } catch {
+ notAvailableLuckyUsers.push(newLuckyUser);
+ loggerWithEventDetails.info(
+ `Round robin host ${newLuckyUser.name} not available for first two slots. Trying to find another host.`
);
}
- // if no error, then lucky user is available for the next slots
+ } else {
luckyUsers.push(newLuckyUser);
- } catch {
- notAvailableLuckyUsers.push(newLuckyUser);
- loggerWithEventDetails.info(
- `Round robin host ${newLuckyUser.name} not available for first two slots. Trying to find another host.`
- );
+ luckUserFound = true;
}
- } else {
- luckyUsers.push(newLuckyUser);
}
}
@@ -921,8 +933,22 @@ async function handler(
throw new Error(ErrorCode.FixedHostsUnavailableForBooking);
}
+ const roundRobinHosts = eventType.hosts.filter((host) => !host.isFixed);
+
+ const hostGroups = groupHostsByGroupId({
+ hosts: roundRobinHosts,
+ hostGroups: eventType.hostGroups,
+ });
+
+ // Filter out host groups that have no hosts in them
+ const nonEmptyHostGroups = Object.fromEntries(
+ Object.entries(hostGroups).filter(([groupId, hosts]) => hosts.length > 0)
+ );
// If there are RR hosts, we need to find a lucky user
- if ([...qualifiedRRUsers, ...additionalFallbackRRUsers].length > 0 && luckyUsers.length === 0) {
+ if (
+ [...qualifiedRRUsers, ...additionalFallbackRRUsers].length > 0 &&
+ luckyUsers.length !== (Object.keys(nonEmptyHostGroups).length || 1)
+ ) {
throw new Error(ErrorCode.RoundRobinHostsUnavailableForBooking);
}
@@ -933,7 +959,9 @@ async function handler(
...troubleshooterData,
luckyUsers: luckyUsers.map((u) => u.id),
fixedUsers: fixedUserPool.map((u) => u.id),
- luckyUserPool: luckyUserPool.map((u) => u.id),
+ luckyUserPool: Object.values(luckyUserPools)
+ .flat()
+ .map((u) => u.id),
};
} else if (
input.bookingData.allRecurringDates &&
diff --git a/packages/features/bookings/lib/handleNewBooking/getEventTypesFromDB.ts b/packages/features/bookings/lib/handleNewBooking/getEventTypesFromDB.ts
index fb464248659..ff88a6abefa 100644
--- a/packages/features/bookings/lib/handleNewBooking/getEventTypesFromDB.ts
+++ b/packages/features/bookings/lib/handleNewBooking/getEventTypesFromDB.ts
@@ -135,6 +135,7 @@ export const getEventTypesFromDB = async (eventTypeId: number) => {
priority: true,
weight: true,
createdAt: true,
+ groupId: true,
user: {
select: {
credentials: {
@@ -177,6 +178,12 @@ export const getEventTypesFromDB = async (eventTypeId: number) => {
assignRRMembersUsingSegment: true,
rrSegmentQueryValue: true,
useEventLevelSelectedCalendars: true,
+ hostGroups: {
+ select: {
+ id: true,
+ name: true,
+ },
+ },
},
});
@@ -206,6 +213,7 @@ export const getEventTypesFromDB = async (eventTypeId: number) => {
bookingFields: getBookingFieldsWithSystemFields({ ...restEventType, isOrgTeamEvent }),
rrSegmentQueryValue: rrSegmentQueryValueSchema.parse(eventType.rrSegmentQueryValue) ?? null,
isDynamic: false,
+ hostGroups: eventType.hostGroups || [],
};
} catch (error) {
if (error instanceof Error && error.message.includes("Record to update not found")) {
diff --git a/packages/features/bookings/lib/handleNewBooking/loadUsers.ts b/packages/features/bookings/lib/handleNewBooking/loadUsers.ts
index 110a01656ce..208b1a9d740 100644
--- a/packages/features/bookings/lib/handleNewBooking/loadUsers.ts
+++ b/packages/features/bookings/lib/handleNewBooking/loadUsers.ts
@@ -85,12 +85,13 @@ const loadUsersByEventType = async (eventType: EventType): Promise<NewBookingEve
eventType,
hosts: hosts ?? fallbackHosts,
});
- return matchingHosts.map(({ user, isFixed, priority, weight, createdAt }) => ({
+ return matchingHosts.map(({ user, isFixed, priority, weight, createdAt, groupId }) => ({
...user,
isFixed,
priority,
weight,
createdAt,
+ groupId,
}));
};
diff --git a/packages/features/bookings/lib/handleNewBooking/test/buildEventForTeamEventType.test.ts b/packages/features/bookings/lib/handleNewBooking/test/buildEventForTeamEventType.test.ts
index 63601754eb5..5dd04310fcf 100644
--- a/packages/features/bookings/lib/handleNewBooking/test/buildEventForTeamEventType.test.ts
+++ b/packages/features/bookings/lib/handleNewBooking/test/buildEventForTeamEventType.test.ts
@@ -139,7 +139,7 @@ describe("buildEventForTeamEventType", () => {
expect(memberEmails).toContain("[email protected]");
expect(memberEmails).toContain("[email protected]");
- expect(memberEmails).not.toContain("[email protected]");
+ expect(memberEmails).toContain("[email protected]");
});
it("builds a team with fallback name and id", async () => {
diff --git a/packages/features/bookings/lib/handleNewBooking/test/team-bookings/round-robin.test.ts b/packages/features/bookings/lib/handleNewBooking/test/team-bookings/round-robin.test.ts
new file mode 100644
index 00000000000..7fbb612d5d6
--- /dev/null
+++ b/packages/features/bookings/lib/handleNewBooking/test/team-bookings/round-robin.test.ts
@@ -0,0 +1,652 @@
+import {
+ getBooker,
+ TestData,
+ getOrganizer,
+ createBookingScenario,
+ Timezones,
+ getScenarioData,
+ mockSuccessfulVideoMeetingCreation,
+ BookingLocations,
+ getDate,
+ getMockBookingAttendee,
+ getGoogleCalendarCredential,
+ mockCalendarToHaveNoBusySlots,
+} from "@calcom/web/test/utils/bookingScenario/bookingScenario";
+import { getMockRequestDataForBooking } from "@calcom/web/test/utils/bookingScenario/getMockRequestDataForBooking";
+import { setupAndTeardown } from "@calcom/web/test/utils/bookingScenario/setupAndTeardown";
+
+import { describe, test, vi, expect } from "vitest";
+
+import { appStoreMetadata } from "@calcom/app-store/apps.metadata.generated";
+import { ErrorCode } from "@calcom/lib/errorCodes";
+import { SchedulingType } from "@calcom/prisma/enums";
+import { BookingStatus } from "@calcom/prisma/enums";
+
+describe("Round Robin handleNewBooking", () => {
+ setupAndTeardown();
+
+ describe("Round Robin with groups", () => {
+ test("Books one host from each round robin group", async () => {
+ const handleNewBooking = (await import("@calcom/features/bookings/lib/handleNewBooking")).default;
+ const booker = getBooker({
+ email: "[email protected]",
+ name: "Booker",
+ });
+ const teamMemberOne = [
+ {
+ name: "Team Member One",
+ username: "other-team-member-1",
+ timeZone: Timezones["+5:30"],
+ defaultScheduleId: null,
+ email: "[email protected]",
+ id: 102,
+ schedule: TestData.schedules.IstMorningShift,
+ credentials: [getGoogleCalendarCredential()],
+ selectedCalendars: [TestData.selectedCalendars.google],
+ destinationCalendar: {
+ integration: TestData.apps["google-calendar"].type,
+ externalId: "[email protected]",
+ },
+ },
+ ];
+ const organizer = getOrganizer({
+ name: "Organizer",
+ email: "[email protected]",
+ id: 101,
+ defaultScheduleId: null,
+ schedules: [TestData.schedules.IstMorningShift],
+ credentials: [getGoogleCalendarCredential()],
+ selectedCalendars: [TestData.selectedCalendars.google],
+ destinationCalendar: {
+ integration: TestData.apps["google-calendar"].type,
+ externalId: "[email protected]",
+ },
+ });
+
+ const teamMembers = [
+ {
+ name: "Team Member 1",
+ username: "team-member-1",
+ timeZone: Timezones["+5:30"],
+ defaultScheduleId: null,
+ email: "[email protected]",
+ id: 102,
+ schedules: [TestData.schedules.IstEveningShift],
+ },
+ {
+ name: "Team Member 2",
+ username: "team-member-2",
+ timeZone: Timezones["+5:30"],
+ defaultScheduleId: null,
+ email: "[email protected]",
+ id: 103,
+ schedules: [TestData.schedules.IstEveningShift],
+ },
+ {
+ name: "Team Member 3",
+ username: "team-member-3",
+ timeZone: Timezones["+5:30"],
+ defaultScheduleId: null,
+ email: "[email protected]",
+ id: 104,
+ schedules: [TestData.schedules.IstEveningShift],
+ },
+ {
+ name: "Team Member 4",
+ username: "team-member-4",
+ timeZone: Timezones["+5:30"],
+ defaultScheduleId: null,
+ email: "[email protected]",
+ id: 105,
+ schedules: [TestData.schedules.IstEveningShift],
+ },
+ ];
+
+ await createBookingScenario(
+ getScenarioData({
+ eventTypes: [
+ {
+ id: 1,
+ slotInterval: 15,
+ schedulingType: SchedulingType.ROUND_ROBIN,
+ length: 15,
+ users: [
+ { id: teamMembers[0].id },
+ { id: teamMembers[1].id },
+ { id: teamMembers[2].id },
+ { id: teamMembers[3].id },
+ ],
+ hosts: [
+ { userId: teamMembers[0].id, isFixed: false, groupId: "group-1" },
+ { userId: teamMembers[1].id, isFixed: false, groupId: "group-1" },
+ { userId: teamMembers[2].id, isFixed: false, groupId: "group-2" },
+ { userId: teamMembers[3].id, isFixed: false, groupId: "group-2" },
+ ],
+ hostGroups: [
+ { id: "group-1", name: "Group 1" },
+ { id: "group-2", name: "Group 2" },
+ ],
+ schedule: TestData.schedules.IstMorningShift,
+ destinationCalendar: {
+ integration: TestData.apps["google-calendar"].type,
+ externalId: "[email protected]",
+ },
+ },
+ ],
+ organizer,
+ usersApartFromOrganizer: teamMembers,
+ apps: [TestData.apps["google-calendar"], TestData.apps["daily-video"]],
+ })
+ );
+
+ mockSuccessfulVideoMeetingCreation({
+ metadataLookupKey: appStoreMetadata.dailyvideo.dirName,
+ videoMeetingData: {
+ id: "MOCK_ID",
+ password: "MOCK_PASS",
+ url: `http://mock-dailyvideo.example.com/meeting-1`,
+ },
+ });
+ const calendarMock = mockCalendarToHaveNoBusySlots("googlecalendar", {
+ create: {
+ id: "MOCKED_GOOGLE_CALENDAR_EVENT_ID",
+ iCalUID: "MOCKED_GOOGLE_CALENDAR_ICS_ID",
+ },
+ });
+ const mockBookingData = getMockRequestDataForBooking({
+ data: {
+ // Try booking the first available free timeslot in both the users' schedules
+ start: `${getDate({ dateIncrement: 1 }).dateString}T11:30:00.000Z`,
+ end: `${getDate({ dateIncrement: 1 }).dateString}T11:45:00.000Z`,
+ eventTypeId: 1,
+ responses: {
+ email: booker.email,
+ name: booker.name,
+ location: { optionValue: "", value: BookingLocations.CalVideo },
+ },
+ },
+ });
+ const createdBooking = await handleNewBooking({
+ bookingData: mockBookingData,
+ });
+
+ // Verify that the booking was created successfully
+ expect(createdBooking).toBeDefined();
+ expect(createdBooking.responses).toEqual(
+ expect.objectContaining({
+ email: booker.email,
+ name: booker.name,
+ })
+ );
+
+ // Verify that lucky users were selected (one from each group)
+ expect(createdBooking.luckyUsers).toBeDefined();
+ expect(createdBooking.luckyUsers).toHaveLength(2);
+
+ // Verify that the selected users are from different groups
+ const selectedUserIds = createdBooking.luckyUsers;
+ const group1UserIds = [teamMembers[0].id, teamMembers[1].id]; // group-1
+ const group2UserIds = [teamMembers[2].id, teamMembers[3].id]; // group-2
+
+ // Check that one user is from group-1 and one is from group-2
+ const hasGroup1User = selectedUserIds.some((id) => group1UserIds.includes(id));
+ const hasGroup2User = selectedUserIds.some((id) => group2UserIds.includes(id));
+
+ expect(hasGroup1User).toBe(true);
+ expect(hasGroup2User).toBe(true);
+
+ // Verify that the booking has the correct attendees
+ expect(createdBooking.attendees).toHaveLength(2);
+ expect(createdBooking.attendees[0].email).toBe(booker.email);
+
+ // The second attendee should be one of the selected lucky users
+ const secondAttendeeEmail = createdBooking.attendees[1].email;
+ const selectedUserEmails = selectedUserIds.map(
+ (id) => teamMembers.find((member) => member.id === id)?.email
+ );
+ expect(selectedUserEmails).toContain(secondAttendeeEmail);
+ });
+
+ test("Throws error when one round robin group has no available hosts", async () => {
+ const handleNewBooking = (await import("@calcom/features/bookings/lib/handleNewBooking")).default;
+ const booker = getBooker({
+ email: "[email protected]",
+ name: "Booker",
+ });
+
+ const teamMembers = [
+ {
+ name: "Team Member 1",
+ username: "team-member-1",
+ timeZone: Timezones["+5:30"],
+ defaultScheduleId: null,
+ email: "[email protected]",
+ id: 102,
+ schedules: [TestData.schedules.IstEveningShift],
+ },
+ {
+ name: "Team Member 2",
+ username: "team-member-2",
+ timeZone: Timezones["+5:30"],
+ defaultScheduleId: null,
+ email: "[email protected]",
+ id: 103,
+ schedules: [TestData.schedules.IstEveningShift],
+ },
+ {
+ name: "Team Member 3",
+ username: "team-member-3",
+ timeZone: Timezones["+5:30"],
+ defaultScheduleId: null,
+ email: "[email protected]",
+ id: 104,
+ schedules: [TestData.schedules.IstEveningShift],
+ },
+ {
+ name: "Team Member 4",
+ username: "team-member-4",
+ timeZone: Timezones["+5:30"],
+ defaultScheduleId: null,
+ email: "[email protected]",
+ id: 105,
+ schedules: [TestData.schedules.IstEveningShift],
+ },
+ ];
+
+ const organizer = getOrganizer({
+ name: "Organizer",
+ email: "[email protected]",
+ id: 101,
+ defaultScheduleId: null,
+ schedules: [TestData.schedules.IstMorningShift],
+ credentials: [getGoogleCalendarCredential()],
+ selectedCalendars: [TestData.selectedCalendars.google],
+ destinationCalendar: {
+ integration: TestData.apps["google-calendar"].type,
+ externalId: "[email protected]",
+ },
+ });
+
+ await createBookingScenario(
+ getScenarioData({
+ eventTypes: [
+ {
+ id: 1,
+ slotInterval: 15,
+ schedulingType: SchedulingType.ROUND_ROBIN,
+ length: 15,
+ users: [
+ { id: teamMembers[0].id },
+ { id: teamMembers[1].id },
+ { id: teamMembers[2].id },
+ { id: teamMembers[3].id },
+ ],
+ hosts: [
+ { userId: teamMembers[0].id, isFixed: false, groupId: "group-1" },
+ { userId: teamMembers[1].id, isFixed: false, groupId: "group-1" },
+ { userId: teamMembers[2].id, isFixed: false, groupId: "group-2" },
+ { userId: teamMembers[3].id, isFixed: false, groupId: "group-2" },
+ ],
+ hostGroups: [
+ { id: "group-1", name: "Group 1" },
+ { id: "group-2", name: "Group 2" },
+ ],
+ schedule: TestData.schedules.IstMorningShift,
+ destinationCalendar: {
+ integration: TestData.apps["google-calendar"].type,
+ externalId: "[email protected]",
+ },
+ },
+ ],
+ organizer,
+ usersApartFromOrganizer: teamMembers,
+ apps: [TestData.apps["google-calendar"], TestData.apps["daily-video"]],
+ // Add existing bookings to make only group-2 hosts busy
+ bookings: [
+ {
+ userId: teamMembers[0].id, // Team Member 1 (group-1)
+ eventTypeId: 1,
+ startTime: `${getDate({ dateIncrement: 1 }).dateString}T11:30:00.000Z`,
+ endTime: `${getDate({ dateIncrement: 1 }).dateString}T11:45:00.000Z`,
+ status: "ACCEPTED",
+ attendees: [
+ {
+ email: "[email protected]",
+ },
+ ],
+ },
+ {
+ userId: teamMembers[1].id, // Team Member 2 (group-1)
+ eventTypeId: 1,
+ startTime: `${getDate({ dateIncrement: 1 }).dateString}T11:30:00.000Z`,
+ endTime: `${getDate({ dateIncrement: 1 }).dateString}T11:45:00.000Z`,
+ status: "ACCEPTED",
+ attendees: [
+ {
+ email: "[email protected]",
+ },
+ ],
+ },
+ ],
+ })
+ );
+
+ mockSuccessfulVideoMeetingCreation({
+ metadataLookupKey: appStoreMetadata.dailyvideo.dirName || "dailyvideo",
+ videoMeetingData: {
+ id: "MOCK_ID",
+ password: "MOCK_PASS",
+ url: `http://mock-dailyvideo.example.com/meeting-1`,
+ },
+ });
+
+ const calendarMock = mockCalendarToHaveNoBusySlots("googlecalendar", {
+ create: {
+ id: "MOCKED_GOOGLE_CALENDAR_EVENT_ID",
+ iCalUID: "MOCKED_GOOGLE_CALENDAR_ICS_ID",
+ },
+ });
+
+ const mockBookingData = getMockRequestDataForBooking({
+ data: {
+ start: `${getDate({ dateIncrement: 1 }).dateString}T11:30:00.000Z`,
+ end: `${getDate({ dateIncrement: 1 }).dateString}T11:45:00.000Z`,
+ eventTypeId: 1,
+ responses: {
+ email: booker.email,
+ name: booker.name,
+ location: { optionValue: "", value: BookingLocations.CalVideo },
+ },
+ },
+ });
+
+ // Expect handleNewBooking to throw an error because group-2 has no available hosts
+ await expect(
+ handleNewBooking({
+ bookingData: mockBookingData,
+ })
+ ).rejects.toThrow(ErrorCode.RoundRobinHostsUnavailableForBooking);
+ });
+
+ test("Creates successful booking even when one group has no hosts", async () => {
+ const handleNewBooking = (await import("@calcom/features/bookings/lib/handleNewBooking")).default;
+ const booker = getBooker({
+ email: "[email protected]",
+ name: "Booker",
+ });
+
+ const teamMembers = [
+ {
+ name: "Team Member 1",
+ username: "team-member-1",
+ timeZone: Timezones["+5:30"],
+ defaultScheduleId: null,
+ email: "[email protected]",
+ id: 102,
+ schedules: [TestData.schedules.IstEveningShift],
+ },
+ {
+ name: "Team Member 2",
+ username: "team-member-2",
+ timeZone: Timezones["+5:30"],
+ defaultScheduleId: null,
+ email: "[email protected]",
+ id: 103,
+ schedules: [TestData.schedules.IstEveningShift],
+ },
+ ];
+
+ const organizer = getOrganizer({
+ name: "Organizer",
+ email: "[email protected]",
+ id: 101,
+ defaultScheduleId: null,
+ schedules: [TestData.schedules.IstMorningShift],
+ credentials: [getGoogleCalendarCredential()],
+ selectedCalendars: [TestData.selectedCalendars.google],
+ destinationCalendar: {
+ integration: TestData.apps["google-calendar"].type,
+ externalId: "[email protected]",
+ },
+ });
+
+ await createBookingScenario(
+ getScenarioData({
+ eventTypes: [
+ {
+ id: 1,
+ slotInterval: 15,
+ schedulingType: SchedulingType.ROUND_ROBIN,
+ length: 15,
+ users: [{ id: teamMembers[0].id }, { id: teamMembers[1].id }],
+ hosts: [
+ { userId: teamMembers[0].id, isFixed: false, groupId: "group-1" },
+ { userId: teamMembers[1].id, isFixed: false, groupId: "group-1" },
+ ],
+ hostGroups: [
+ { id: "group-1", name: "Group 1" },
+ { id: "group-2", name: "Group 2" }, // Empty group with no hosts
+ ],
+ schedule: TestData.schedules.IstMorningShift,
+ destinationCalendar: {
+ integration: TestData.apps["google-calendar"].type,
+ externalId: "[email protected]",
+ },
+ },
+ ],
+ organizer,
+ usersApartFromOrganizer: teamMembers,
+ apps: [TestData.apps["google-calendar"], TestData.apps["daily-video"]],
+ })
+ );
+
+ mockSuccessfulVideoMeetingCreation({
+ metadataLookupKey: appStoreMetadata.dailyvideo.dirName,
+ videoMeetingData: {
+ id: "MOCK_ID",
+ password: "MOCK_PASS",
+ url: `http://mock-dailyvideo.example.com/meeting-1`,
+ },
+ });
+
+ const calendarMock = mockCalendarToHaveNoBusySlots("googlecalendar", {
+ create: {
+ id: "MOCKED_GOOGLE_CALENDAR_EVENT_ID",
+ iCalUID: "MOCKED_GOOGLE_CALENDAR_ICS_ID",
+ },
+ });
+
+ const mockBookingData = getMockRequestDataForBooking({
+ data: {
+ start: `${getDate({ dateIncrement: 1 }).dateString}T11:30:00.000Z`,
+ end: `${getDate({ dateIncrement: 1 }).dateString}T11:45:00.000Z`,
+ eventTypeId: 1,
+ responses: {
+ email: booker.email,
+ name: booker.name,
+ location: { optionValue: "", value: BookingLocations.CalVideo },
+ },
+ },
+ });
+
+ const createdBooking = await handleNewBooking({
+ bookingData: mockBookingData,
+ });
+
+ // Verify that the booking was created successfully
+ expect(createdBooking).toBeDefined();
+ expect(createdBooking.responses).toEqual(
+ expect.objectContaining({
+ email: booker.email,
+ name: booker.name,
+ })
+ );
+
+ // Verify that lucky users were selected (only from group-1 since group-2 has no hosts)
+ expect(createdBooking.luckyUsers).toBeDefined();
+ expect(createdBooking.luckyUsers).toHaveLength(1);
+
+ // Verify that the selected user is from group-1
+ const selectedUserId = createdBooking.luckyUsers[0];
+ const group1UserIds = [teamMembers[0].id, teamMembers[1].id]; // group-1
+ expect(group1UserIds).toContain(selectedUserId);
+
+ // Verify that the booking has the correct attendees
+ expect(createdBooking.attendees).toHaveLength(1);
+ expect(createdBooking.attendees[0].email).toBe(booker.email);
+
+ // Verify that the booking user is the selected lucky user
+ expect(createdBooking.userId).toBe(selectedUserId);
+ });
+ });
+
+ describe("Seated Round Robin Event", () => {
+ test("For second seat booking, organizer remains the same with no team members included", async () => {
+ const handleNewBooking = (await import("@calcom/features/bookings/lib/handleNewBooking")).default;
+ const EventManager = (await import("@calcom/lib/EventManager")).default;
+
+ const eventManagerSpy = vi.spyOn(EventManager.prototype, "updateCalendarAttendees");
+
+ const booker = getBooker({
+ email: "[email protected]",
+ name: "Seat 2",
+ });
+
+ const assignedHost = getOrganizer({
+ name: "Assigned Host",
+ email: "[email protected]",
+ id: 101,
+ schedules: [TestData.schedules.IstWorkHours],
+ });
+
+ const teamMembers = [
+ {
+ name: "Team Member 1",
+ username: "team-member-1",
+ timeZone: Timezones["+5:30"],
+ defaultScheduleId: null,
+ email: "[email protected]",
+ id: 102,
+ schedules: [TestData.schedules.IstEveningShift],
+ },
+ {
+ name: "Team Member 2",
+ username: "team-member-2",
+ timeZone: Timezones["+5:30"],
+ defaultScheduleId: null,
+ email: "[email protected]",
+ id: 103,
+ schedules: [TestData.schedules.IstEveningShift],
+ },
+ ];
+
+ const bookingId = 1;
+ const bookingUid = "abc123";
+ const { dateString: plus1DateString } = getDate({ dateIncrement: 1 });
+ const bookingStartTime = `${plus1DateString}T04:00:00Z`;
+ const bookingEndTime = `${plus1DateString}T04:30:00Z`;
+
+ await createBookingScenario(
+ getScenarioData({
+ eventTypes: [
+ {
+ id: 1,
+ slug: "seated-round-robin-event",
+ slotInterval: 30,
+ length: 30,
+ schedulingType: SchedulingType.ROUND_ROBIN,
+ users: [{ id: assignedHost.id }, { id: teamMembers[0].id }, { id: teamMembers[1].id }],
+ hosts: [
+ { userId: assignedHost.id, isFixed: false },
+ { userId: teamMembers[0].id, isFixed: false },
+ { userId: teamMembers[1].id, isFixed: false },
+ ],
+ seatsPerTimeSlot: 3,
+ seatsShowAttendees: false,
+ },
+ ],
+ bookings: [
+ {
+ id: bookingId,
+ uid: bookingUid,
+ eventTypeId: 1,
+ status: BookingStatus.ACCEPTED,
+ startTime: bookingStartTime,
+ endTime: bookingEndTime,
+ userId: assignedHost.id, // This is the assigned host for the booking
+ metadata: {
+ videoCallUrl: "https://existing-daily-video-call-url.example.com",
+ },
+ references: [
+ {
+ type: appStoreMetadata.dailyvideo.type,
+ uid: "MOCK_ID",
+ meetingId: "MOCK_ID",
+ meetingPassword: "MOCK_PASS",
+ meetingUrl: "http://mock-dailyvideo.example.com",
+ credentialId: null,
+ },
+ ],
+ attendees: [
+ getMockBookingAttendee({
+ id: 1,
+ name: "Seat 1",
+ email: "[email protected]",
+ locale: "en",
+ timeZone: "America/Toronto",
+ bookingSeat: {
+ referenceUid: "booking-seat-1",
+ data: {},
+ },
+ }),
+ ],
+ },
+ ],
+ organizer: assignedHost,
+ usersApartFromOrganizer: [...teamMembers],
+ })
+ );
+
+ mockSuccessfulVideoMeetingCreation({
+ metadataLookupKey: "dailyvideo",
+ videoMeetingData: {
+ id: "MOCK_ID",
+ password: "MOCK_PASS",
+ url: `http://mock-dailyvideo.example.com/meeting-1`,
+ },
+ });
+
+ const reqBookingUser = "seatedAttendee";
+
+ const mockBookingData = getMockRequestDataForBooking({
+ data: {
+ eventTypeId: 1,
+ responses: {
+ email: booker.email,
+ name: booker.name,
+ location: { optionValue: "", value: BookingLocations.CalVideo },
+ },
+ bookingUid: bookingUid,
+ user: reqBookingUser,
+ },
+ });
+
+ await handleNewBooking({
+ bookingData: mockBookingData,
+ });
+
+ expect(eventManagerSpy).toHaveBeenCalled();
+
+ const calendarEvent = eventManagerSpy.mock.calls[0][0];
+
+ expect(calendarEvent.organizer.email).toBe(assignedHost.email);
+
+ expect(calendarEvent.team?.members).toBeDefined();
+ expect(calendarEvent.team?.members.length).toBe(0);
+
+ const teamMemberEmails = calendarEvent.team?.members.map((member) => member.email);
+ expect(teamMemberEmails).not.toContain(teamMembers[0].email);
+ expect(teamMemberEmails).not.toContain(teamMembers[1].email);
+ });
+ });
+});
diff --git a/packages/features/bookings/lib/handleNewBooking/test/team-bookings/seatedRoundRobin.test.ts b/packages/features/bookings/lib/handleNewBooking/test/team-bookings/seatedRoundRobin.test.ts
deleted file mode 100644
index d855e4b7690..00000000000
--- a/packages/features/bookings/lib/handleNewBooking/test/team-bookings/seatedRoundRobin.test.ts
+++ /dev/null
@@ -1,172 +0,0 @@
-import {
- getBooker,
- TestData,
- getOrganizer,
- createBookingScenario,
- Timezones,
- getScenarioData,
- mockSuccessfulVideoMeetingCreation,
- BookingLocations,
- getDate,
- getMockBookingAttendee,
-} from "@calcom/web/test/utils/bookingScenario/bookingScenario";
-import { getMockRequestDataForBooking } from "@calcom/web/test/utils/bookingScenario/getMockRequestDataForBooking";
-import { setupAndTeardown } from "@calcom/web/test/utils/bookingScenario/setupAndTeardown";
-
-import { describe, test, vi, expect } from "vitest";
-
-import { appStoreMetadata } from "@calcom/app-store/apps.metadata.generated";
-import { SchedulingType } from "@calcom/prisma/enums";
-import { BookingStatus } from "@calcom/prisma/enums";
-
-describe("Seated Round Robin Events", () => {
- setupAndTeardown();
-
- test("For second seat booking, organizer remains the same with no team members included", async () => {
- const handleNewBooking = (await import("@calcom/features/bookings/lib/handleNewBooking")).default;
- const EventManager = (await import("@calcom/lib/EventManager")).default;
-
- const eventManagerSpy = vi.spyOn(EventManager.prototype, "updateCalendarAttendees");
-
- const booker = getBooker({
- email: "[email protected]",
- name: "Seat 2",
- });
-
- const assignedHost = getOrganizer({
- name: "Assigned Host",
- email: "[email protected]",
- id: 101,
- schedules: [TestData.schedules.IstWorkHours],
- });
-
- const teamMembers = [
- {
- name: "Team Member 1",
- username: "team-member-1",
- timeZone: Timezones["+5:30"],
- defaultScheduleId: null,
- email: "[email protected]",
- id: 102,
- schedules: [TestData.schedules.IstEveningShift],
- },
- {
- name: "Team Member 2",
- username: "team-member-2",
- timeZone: Timezones["+5:30"],
- defaultScheduleId: null,
- email: "[email protected]",
- id: 103,
- schedules: [TestData.schedules.IstEveningShift],
- },
- ];
-
- const bookingId = 1;
- const bookingUid = "abc123";
- const { dateString: plus1DateString } = getDate({ dateIncrement: 1 });
- const bookingStartTime = `${plus1DateString}T04:00:00Z`;
- const bookingEndTime = `${plus1DateString}T04:30:00Z`;
-
- await createBookingScenario(
- getScenarioData({
- eventTypes: [
- {
- id: 1,
- slug: "seated-round-robin-event",
- slotInterval: 30,
- length: 30,
- schedulingType: SchedulingType.ROUND_ROBIN,
- users: [{ id: assignedHost.id }, { id: teamMembers[0].id }, { id: teamMembers[1].id }],
- hosts: [
- { userId: assignedHost.id, isFixed: false },
- { userId: teamMembers[0].id, isFixed: false },
- { userId: teamMembers[1].id, isFixed: false },
- ],
- seatsPerTimeSlot: 3,
- seatsShowAttendees: false,
- },
- ],
- bookings: [
- {
- id: bookingId,
- uid: bookingUid,
- eventTypeId: 1,
- status: BookingStatus.ACCEPTED,
- startTime: bookingStartTime,
- endTime: bookingEndTime,
- userId: assignedHost.id, // This is the assigned host for the booking
- metadata: {
- videoCallUrl: "https://existing-daily-video-call-url.example.com",
- },
- references: [
- {
- type: appStoreMetadata.dailyvideo.type,
- uid: "MOCK_ID",
- meetingId: "MOCK_ID",
- meetingPassword: "MOCK_PASS",
- meetingUrl: "http://mock-dailyvideo.example.com",
- credentialId: null,
- },
- ],
- attendees: [
- getMockBookingAttendee({
- id: 1,
- name: "Seat 1",
- email: "[email protected]",
- locale: "en",
- timeZone: "America/Toronto",
- bookingSeat: {
- referenceUid: "booking-seat-1",
- data: {},
- },
- }),
- ],
- },
- ],
- organizer: assignedHost,
- usersApartFromOrganizer: [...teamMembers],
- })
- );
-
- mockSuccessfulVideoMeetingCreation({
- metadataLookupKey: "dailyvideo",
- videoMeetingData: {
- id: "MOCK_ID",
- password: "MOCK_PASS",
- url: `http://mock-dailyvideo.example.com/meeting-1`,
- },
- });
-
- const reqBookingUser = "seatedAttendee";
-
- const mockBookingData = getMockRequestDataForBooking({
- data: {
- eventTypeId: 1,
- responses: {
- email: booker.email,
- name: booker.name,
- location: { optionValue: "", value: BookingLocations.CalVideo },
- },
- bookingUid: bookingUid,
- user: reqBookingUser,
- },
- });
-
- await handleNewBooking({
- bookingData: mockBookingData,
- });
-
- expect(eventManagerSpy).toHaveBeenCalled();
-
- const calendarEvent = eventManagerSpy.mock.calls[0][0];
-
- expect(calendarEvent.organizer.email).toBe(assignedHost.email);
-
- expect(calendarEvent.team?.members).toBeDefined();
- expect(calendarEvent.team?.members.length).toBe(0);
-
- const teamMemberEmails = calendarEvent.team?.members.map((member) => member.email);
- expect(teamMemberEmails).not.toContain(teamMembers[0].email);
- expect(teamMemberEmails).not.toContain(teamMembers[1].email);
- });
-});
diff --git a/packages/features/bookings/lib/handleNewBooking/types.ts b/packages/features/bookings/lib/handleNewBooking/types.ts
index 5456ccfece8..0b949bb6b41 100644
--- a/packages/features/bookings/lib/handleNewBooking/types.ts
+++ b/packages/features/bookings/lib/handleNewBooking/types.ts
@@ -41,6 +41,7 @@ export type IsFixedAwareUser = User & {
weight?: number;
userLevelSelectedCalendars: SelectedCalendar[];
allSelectedCalendars: SelectedCalendar[];
+ groupId?: string | null;
availabilityData?: GetUserAvailabilityResult;
};
diff --git a/packages/features/ee/round-robin/roundRobinManualReassignment.ts b/packages/features/ee/round-robin/roundRobinManualReassignment.ts
index 6cc7ac27c25..87ba3a3d7b8 100644
--- a/packages/features/ee/round-robin/roundRobinManualReassignment.ts
+++ b/packages/features/ee/round-robin/roundRobinManualReassignment.ts
@@ -91,6 +91,13 @@ export const roundRobinManualReassignment = async ({
throw new Error("Event type not found");
}
+ if (eventType.hostGroups && eventType.hostGroups.length > 1) {
+ roundRobinReassignLogger.error(
+ `Event type ${eventTypeId} has more than one round robin group, reassignment is not allowed`
+ );
+ throw new Error("Reassignment not allowed with more than one round robin group");
+ }
+
const eventTypeHosts = eventType.hosts.length
? eventType.hosts
: eventType.users.map((user) => ({
@@ -100,6 +107,7 @@ export const roundRobinManualReassignment = async ({
weight: 100,
schedule: null,
createdAt: new Date(0), // use earliest possible date as fallback
+ groupId: null,
}));
const fixedHost = eventTypeHosts.find((host) => host.isFixed);
diff --git a/packages/features/ee/round-robin/roundRobinReassignment.ts b/packages/features/ee/round-robin/roundRobinReassignment.ts
index 47bf2545934..c0e3a11f480 100644
--- a/packages/features/ee/round-robin/roundRobinReassignment.ts
+++ b/packages/features/ee/round-robin/roundRobinReassignment.ts
@@ -89,6 +89,13 @@ export const roundRobinReassignment = async ({
throw new Error("Event type not found");
}
+ if (eventType.hostGroups && eventType.hostGroups.length > 1) {
+ logger.error(
+ `Event type ${eventTypeId} has more than one round robin group, reassignment is not allowed`
+ );
+ throw new Error("Reassignment not allowed with more than one round robin group");
+ }
+
eventType.hosts = eventType.hosts.length
? eventType.hosts
: eventType.users.map((user) => ({
@@ -98,6 +105,7 @@ export const roundRobinReassignment = async ({
weight: 100,
schedule: null,
createdAt: new Date(0), // use earliest possible date as fallback
+ groupId: null,
}));
if (eventType.hosts.length === 0) {
diff --git a/packages/features/eventtypes/components/AddMembersWithSwitch.tsx b/packages/features/eventtypes/components/AddMembersWithSwitch.tsx
index cbf6a120b60..47a761fee3c 100644
--- a/packages/features/eventtypes/components/AddMembersWithSwitch.tsx
+++ b/packages/features/eventtypes/components/AddMembersWithSwitch.tsx
@@ -61,6 +61,7 @@ const CheckedHostField = ({
onChange,
helperText,
isRRWeightsEnabled,
+ groupId,
customClassNames,
...rest
}: {
@@ -72,6 +73,7 @@ const CheckedHostField = ({
options?: Options<CheckedSelectOption>;
helperText?: React.ReactNode | string;
isRRWeightsEnabled?: boolean;
+ groupId: string | null;
} & Omit<Partial<ComponentProps<typeof CheckedTeamSelect>>, "onChange" | "value">) => {
return (
<div className="flex flex-col rounded-md">
@@ -88,6 +90,7 @@ const CheckedHostField = ({
priority: option.priority ?? 2,
weight: option.weight ?? 100,
scheduleId: option.defaultScheduleId,
+ groupId: option.groupId,
}))
);
}}
@@ -97,7 +100,13 @@ const CheckedHostField = ({
const option = options.find((member) => member.value === host.userId.toString());
if (!option) return acc;
- acc.push({ ...option, priority: host.priority ?? 2, isFixed, weight: host.weight ?? 100 });
+ acc.push({
+ ...option,
+ priority: host.priority ?? 2,
+ isFixed,
+ weight: host.weight ?? 100,
+ groupId: host.groupId,
+ });
return acc;
}, [] as CheckedSelectOption[])}
@@ -106,6 +115,7 @@ const CheckedHostField = ({
placeholder={placeholder}
isRRWeightsEnabled={isRRWeightsEnabled}
customClassNames={customClassNames}
+ groupId={groupId}
{...rest}
/>
</div>
@@ -178,6 +188,7 @@ export type AddMembersWithSwitchProps = {
isRRWeightsEnabled?: boolean;
teamId: number;
isSegmentApplicable?: boolean;
+ groupId: string | null;
"data-testid"?: string;
customClassNames?: AddMembersWithSwitchCustomClassNames;
};
@@ -244,6 +255,7 @@ export function AddMembersWithSwitch({
isRRWeightsEnabled,
teamId,
isSegmentApplicable,
+ groupId,
customClassNames,
...rest
}: AddMembersWithSwitchProps) {
@@ -273,13 +285,15 @@ export function AddMembersWithSwitch({
case AssignmentState.TEAM_MEMBERS_IN_SEGMENT_ENABLED:
return (
<>
- <AssignAllTeamMembers
- assignAllTeamMembers={assignAllTeamMembers}
- setAssignAllTeamMembers={setAssignAllTeamMembers}
- onActive={onActive}
- onInactive={onAssignAllTeamMembersInactive}
- customClassNames={customClassNames?.assingAllTeamMembers}
- />
+ {!groupId && (
+ <AssignAllTeamMembers
+ assignAllTeamMembers={assignAllTeamMembers}
+ setAssignAllTeamMembers={setAssignAllTeamMembers}
+ onActive={onActive}
+ onInactive={onAssignAllTeamMembersInactive}
+ customClassNames={customClassNames?.assingAllTeamMembers}
+ />
+ )}
{assignmentState !== AssignmentState.ALL_TEAM_MEMBERS_ENABLED_AND_SEGMENT_NOT_APPLICABLE && (
<div className="mt-2">
@@ -300,7 +314,7 @@ export function AddMembersWithSwitch({
return (
<>
<div className="mb-2">
- {assignmentState === AssignmentState.TOGGLES_OFF_AND_ALL_TEAM_MEMBERS_APPLICABLE && (
+ {assignmentState === AssignmentState.TOGGLES_OFF_AND_ALL_TEAM_MEMBERS_APPLICABLE && !groupId && (
<AssignAllTeamMembers
assignAllTeamMembers={assignAllTeamMembers}
setAssignAllTeamMembers={setAssignAllTeamMembers}
@@ -317,9 +331,15 @@ export function AddMembersWithSwitch({
onChange={onChange}
isFixed={isFixed}
className="mb-2"
- options={teamMembers.sort(sortByLabel)}
+ options={teamMembers
+ .map((member) => ({
+ ...member,
+ groupId: groupId,
+ }))
+ .sort(sortByLabel)}
placeholder={placeholder ?? t("add_attendees")}
isRRWeightsEnabled={isRRWeightsEnabled}
+ groupId={groupId}
customClassNames={customClassNames?.teamMemberSelect}
/>
</div>
@@ -340,7 +360,7 @@ const AddMembersWithSwitchWrapper = ({
[isPlatform]
);
return (
- <div className="rounded-md ">
+ <div className="rounded-md">
<div className={`flex flex-col rounded-md pb-2 pt-6 ${containerClassName}`}>
<AddMembersWithSwitchWrapped {...props} />
</div>
diff --git a/packages/features/eventtypes/components/CheckedTeamSelect.tsx b/packages/features/eventtypes/components/CheckedTeamSelect.tsx
index a11f790f749..f1f02fa1dd1 100644
--- a/packages/features/eventtypes/components/CheckedTeamSelect.tsx
+++ b/packages/features/eventtypes/components/CheckedTeamSelect.tsx
@@ -2,17 +2,18 @@
import { useAutoAnimate } from "@formkit/auto-animate/react";
import { useState } from "react";
-import type { Props } from "react-select";
+import type { Options, Props } from "react-select";
import { useIsPlatform } from "@calcom/atoms/hooks/useIsPlatform";
import type { SelectClassNames } from "@calcom/features/eventtypes/lib/types";
+import { getHostsFromOtherGroups } from "@calcom/lib/bookings/hostGroupUtils";
import { useLocale } from "@calcom/lib/hooks/useLocale";
-import { Icon } from "@calcom/ui/components/icon";
-import { Select } from "@calcom/ui/components/form";
-import { Tooltip } from "@calcom/ui/components/tooltip";
+import classNames from "@calcom/ui/classNames";
import { Avatar } from "@calcom/ui/components/avatar";
import { Button } from "@calcom/ui/components/button";
-import classNames from "@calcom/ui/classNames";
+import { Select } from "@calcom/ui/components/form";
+import { Icon } from "@calcom/ui/components/icon";
+import { Tooltip } from "@calcom/ui/components/tooltip";
import type { PriorityDialogCustomClassNames, WeightDialogCustomClassNames } from "./HostEditDialogs";
import { PriorityDialog, WeightDialog } from "./HostEditDialogs";
@@ -26,6 +27,7 @@ export type CheckedSelectOption = {
isFixed?: boolean;
disabled?: boolean;
defaultScheduleId?: number | null;
+ groupId: string | null;
};
export type CheckedTeamSelectCustomClassNames = {
@@ -49,12 +51,15 @@ export const CheckedTeamSelect = ({
value = [],
isRRWeightsEnabled,
customClassNames,
+ groupId,
...props
}: Omit<Props<CheckedSelectOption, true>, "value" | "onChange"> & {
+ options?: Options<CheckedSelectOption>;
value?: readonly CheckedSelectOption[];
onChange: (value: readonly CheckedSelectOption[]) => void;
isRRWeightsEnabled?: boolean;
customClassNames?: CheckedTeamSelectCustomClassNames;
+ groupId: string | null;
}) => {
const isPlatform = useIsPlatform();
const [priorityDialogOpen, setPriorityDialogOpen] = useState(false);
@@ -65,6 +70,15 @@ export const CheckedTeamSelect = ({
const { t } = useLocale();
const [animationRef] = useAutoAnimate<HTMLUListElement>();
+ const valueFromGroup = groupId ? value.filter((host) => host.groupId === groupId) : value;
+
+ const handleSelectChange = (newValue: readonly CheckedSelectOption[]) => {
+ const otherGroupsHosts = getHostsFromOtherGroups(value, groupId);
+
+ const newValueAllGroups = [...otherGroupsHosts, ...newValue.map((host) => ({ ...host, groupId }))];
+ props.onChange(newValueAllGroups);
+ };
+
return (
<>
<Select
@@ -73,26 +87,30 @@ export const CheckedTeamSelect = ({
placeholder={props.placeholder || t("select")}
isSearchable={true}
options={options}
- value={value}
+ value={valueFromGroup}
+ onChange={handleSelectChange}
isMulti
className={customClassNames?.hostsSelect?.select}
- innerClassNames={customClassNames?.hostsSelect?.innerClassNames}
+ innerClassNames={{
+ ...customClassNames?.hostsSelect?.innerClassNames,
+ control: "rounded-md",
+ }}
/>
{/* This class name conditional looks a bit odd but it allows a seamless transition when using autoanimate
- Slides down from the top instead of just teleporting in from nowhere*/}
<ul
className={classNames(
"mb-4 mt-3 rounded-md",
- value.length >= 1 && "border-subtle border",
+ valueFromGroup.length >= 1 && "border-subtle border",
customClassNames?.selectedHostList?.container
)}
ref={animationRef}>
- {value.map((option, index) => (
+ {valueFromGroup.map((option, index) => (
<>
<li
key={option.value}
className={classNames(
- `flex px-3 py-2 ${index === value.length - 1 ? "" : "border-subtle border-b"}`,
+ `flex px-3 py-2 ${index === valueFromGroup.length - 1 ? "" : "border-subtle border-b"}`,
customClassNames?.selectedHostList?.listItem?.container
)}>
{!isPlatform && <Avatar size="sm" imageSrc={option.avatar} alt={option.label} />}
@@ -170,6 +188,7 @@ export const CheckedTeamSelect = ({
isOpenDialog={priorityDialogOpen}
setIsOpenDialog={setPriorityDialogOpen}
option={currentOption}
+ options={options}
onChange={props.onChange}
customClassNames={customClassNames?.priorityDialog}
/>
@@ -177,6 +196,7 @@ export const CheckedTeamSelect = ({
isOpenDialog={weightDialogOpen}
setIsOpenDialog={setWeightDialogOpen}
option={currentOption}
+ options={options}
onChange={props.onChange}
customClassNames={customClassNames?.weightDialog}
/>
diff --git a/packages/features/eventtypes/components/EditWeightsForAllTeamMembers.tsx b/packages/features/eventtypes/components/EditWeightsForAllTeamMembers.tsx
index 452f962c06c..1e3f05e1943 100644
--- a/packages/features/eventtypes/components/EditWeightsForAllTeamMembers.tsx
+++ b/packages/features/eventtypes/components/EditWeightsForAllTeamMembers.tsx
@@ -143,7 +143,9 @@ export const EditWeightsForAllTeamMembers = ({
const handleSave = () => {
// Create a map of existing hosts for easy lookup
- const existingHostsMap = new Map(value.map((host) => [host.userId.toString(), host]));
+ const existingHostsMap = new Map(
+ value.filter((host) => !host.isFixed).map((host) => [host.userId.toString(), host])
+ );
// Create the updated value by processing all team members
const updatedValue = teamMembers
@@ -156,6 +158,7 @@ export const EditWeightsForAllTeamMembers = ({
isFixed: existingHost?.isFixed ?? false,
priority: existingHost?.priority ?? 0,
weight: localWeights[member.value] ?? existingHost?.weight ?? 100,
+ groupId: existingHost?.groupId ?? null,
};
})
.filter(Boolean) as Host[];
@@ -238,7 +241,10 @@ export const EditWeightsForAllTeamMembers = ({
)
.filter((member) => {
// When assignAllTeamMembers is false, only include members that exist in value array
- return assignAllTeamMembers || value.some((host) => host.userId === parseInt(member.value, 10));
+ return (
+ assignAllTeamMembers ||
+ value.some((host) => !host.isFixed && host.userId === parseInt(member.value, 10))
+ );
});
}, [teamMembers, localWeights, searchQuery, assignAllTeamMembers, value]);
diff --git a/packages/features/eventtypes/components/EventType.tsx b/packages/features/eventtypes/components/EventType.tsx
index ff7239b4406..f365b448d28 100644
--- a/packages/features/eventtypes/components/EventType.tsx
+++ b/packages/features/eventtypes/components/EventType.tsx
@@ -25,6 +25,7 @@ export type Host = {
priority: number;
weight: number;
scheduleId?: number | null;
+ groupId: string | null;
};
export type CustomInputParsed = typeof customInputSchema._output;
diff --git a/packages/features/eventtypes/components/HostEditDialogs.tsx b/packages/features/eventtypes/components/HostEditDialogs.tsx
index cb2b5c45c04..cd756da61b7 100644
--- a/packages/features/eventtypes/components/HostEditDialogs.tsx
+++ b/packages/features/eventtypes/components/HostEditDialogs.tsx
@@ -1,6 +1,7 @@
import type { Dispatch, SetStateAction } from "react";
import { useState } from "react";
import { useFormContext } from "react-hook-form";
+import type { Options } from "react-select";
import { Dialog } from "@calcom/features/components/controlled-dialog";
import type {
@@ -9,6 +10,8 @@ import type {
InputClassNames,
SelectClassNames,
} from "@calcom/features/eventtypes/lib/types";
+import { groupHostsByGroupId, getHostsFromOtherGroups } from "@calcom/lib/bookings/hostGroupUtils";
+import { DEFAULT_GROUP_ID } from "@calcom/lib/constants";
import { useLocale } from "@calcom/lib/hooks/useLocale";
import classNames from "@calcom/ui/classNames";
import { Button } from "@calcom/ui/components/button";
@@ -24,6 +27,7 @@ interface IDialog {
isOpenDialog: boolean;
setIsOpenDialog: Dispatch<SetStateAction<boolean>>;
option: CheckedSelectOption;
+ options: Options<CheckedSelectOption>;
onChange: (value: readonly CheckedSelectOption[]) => void;
}
@@ -37,7 +41,7 @@ export const PriorityDialog = (
}
) => {
const { t } = useLocale();
- const { isOpenDialog, setIsOpenDialog, option, onChange, customClassNames } = props;
+ const { isOpenDialog, setIsOpenDialog, option, options, onChange, customClassNames } = props;
const { getValues } = useFormContext<FormValues>();
const priorityOptions = [
@@ -53,21 +57,46 @@ export const PriorityDialog = (
if (!!newPriority) {
const hosts: Host[] = getValues("hosts");
const isRRWeightsEnabled = getValues("isRRWeightsEnabled");
- const updatedHosts = hosts
- .filter((host) => !host.isFixed)
- .map((host) => {
- return {
- ...option,
- value: host.userId.toString(),
- priority: host.userId === parseInt(option.value, 10) ? newPriority.value : host.priority,
- isFixed: false,
- weight: host.weight,
- };
- });
-
- const sortedHosts = updatedHosts.sort((a, b) => sortHosts(a, b, isRRWeightsEnabled));
-
- onChange(sortedHosts);
+ const hostGroups = getValues("hostGroups");
+ const rrHosts = hosts.filter((host) => !host.isFixed);
+
+ const groupedHosts = groupHostsByGroupId({ hosts: rrHosts, hostGroups });
+
+ let sortedHostGroup: CheckedSelectOption[] = [];
+
+ const hostGroupToSort = groupedHosts[option.groupId ?? DEFAULT_GROUP_ID];
+
+ if (hostGroupToSort) {
+ sortedHostGroup = hostGroupToSort
+ .map((host) => {
+ return {
+ ...option,
+ value: host.userId.toString(),
+ priority: host.userId === parseInt(option.value, 10) ? newPriority.value : host.priority,
+ isFixed: false,
+ weight: host.weight,
+ groupId: host.groupId,
+ userId: host.userId,
+ };
+ })
+ .sort((a, b) => sortHosts(a, b, isRRWeightsEnabled));
+ }
+
+ const otherGroupsHosts = getHostsFromOtherGroups(rrHosts, option.groupId);
+
+ const otherGroupsOptions = otherGroupsHosts.map((host) => {
+ return {
+ ...option,
+ value: host.userId.toString(),
+ priority: host.priority,
+ weight: host.weight,
+ isFixed: host.isFixed,
+ groupId: host.groupId,
+ userId: host.userId,
+ };
+ });
+ const updatedHosts = [...otherGroupsOptions, ...sortedHostGroup];
+ onChange(updatedHosts);
}
setIsOpenDialog(false);
};
@@ -128,27 +157,75 @@ export type WeightDialogCustomClassNames = {
};
export const WeightDialog = (props: IDialog & { customClassNames?: WeightDialogCustomClassNames }) => {
const { t } = useLocale();
- const { isOpenDialog, setIsOpenDialog, option, onChange, customClassNames } = props;
+ const { isOpenDialog, setIsOpenDialog, option, options, onChange, customClassNames } = props;
const { getValues } = useFormContext<FormValues>();
const [newWeight, setNewWeight] = useState<number | undefined>();
const setWeight = () => {
if (!!newWeight) {
const hosts: Host[] = getValues("hosts");
- const updatedHosts = hosts
- .filter((host) => !host.isFixed)
- .map((host) => {
- return {
- ...option,
- value: host.userId.toString(),
- priority: host.priority,
- weight: host.userId === parseInt(option.value, 10) ? newWeight : host.weight,
- isFixed: false,
- };
- });
-
- const sortedHosts = updatedHosts.sort((a, b) => sortHosts(a, b, true));
- onChange(sortedHosts);
+ const isRRWeightsEnabled = getValues("isRRWeightsEnabled");
+ const hostGroups = getValues("hostGroups");
+ const rrHosts = hosts.filter((host) => !host.isFixed);
+
+ const groupedHosts = groupHostsByGroupId({ hosts: rrHosts, hostGroups });
+
+ const updateHostWeight = (host: Host) => {
+ if (host.userId === parseInt(option.value, 10)) {
+ return { ...host, weight: newWeight };
+ }
+ return host;
+ };
+
+ // Sort hosts within the group
+ let sortedHostGroup: (Host & {
+ avatar: string;
+ label: string;
+ })[] = [];
+
+ const hostGroupToSort = groupedHosts[option.groupId ?? DEFAULT_GROUP_ID];
+
+ if (hostGroupToSort) {
+ sortedHostGroup = hostGroupToSort
+ .map((host) => {
+ const userOption = options.find((opt) => opt.value === host.userId.toString());
+ const updatedHost = updateHostWeight(host);
+ return {
+ ...updatedHost,
+ avatar: userOption?.avatar ?? "",
+ label: userOption?.label ?? host.userId.toString(),
+ };
+ })
+ .sort((a, b) => sortHosts(a, b, isRRWeightsEnabled));
+ }
+
+ const updatedOptions = sortedHostGroup.map((host) => ({
+ avatar: host.avatar,
+ label: host.label,
+ value: host.userId.toString(),
+ priority: host.priority,
+ weight: host.weight,
+ isFixed: host.isFixed,
+ groupId: host.groupId,
+ }));
+
+ // Preserve hosts from other groups
+ const otherGroupsHosts = getHostsFromOtherGroups(rrHosts, option.groupId);
+
+ const otherGroupsOptions = otherGroupsHosts.map((host) => {
+ const userOption = options.find((opt) => opt.value === host.userId.toString());
+ return {
+ avatar: userOption?.avatar ?? "",
+ label: userOption?.label ?? host.userId.toString(),
+ value: host.userId.toString(),
+ priority: host.priority,
+ weight: host.weight,
+ isFixed: host.isFixed,
+ groupId: host.groupId,
+ };
+ });
+ const newFullValue = [...otherGroupsOptions, ...updatedOptions];
+ onChange(newFullValue);
}
setIsOpenDialog(false);
};
diff --git a/packages/features/eventtypes/components/tabs/assignment/EventTeamAssignmentTab.tsx b/packages/features/eventtypes/components/tabs/assignment/EventTeamAssignmentTab.tsx
index d3d0ddcedda..2f55b950d58 100644
--- a/packages/features/eventtypes/components/tabs/assignment/EventTeamAssignmentTab.tsx
+++ b/packages/features/eventtypes/components/tabs/assignment/EventTeamAssignmentTab.tsx
@@ -1,9 +1,10 @@
import type { TFunction } from "i18next";
import Link from "next/link";
-import { useEffect, useRef, useState } from "react";
+import { useCallback, useEffect, useRef, useState } from "react";
import type { ComponentProps, Dispatch, SetStateAction } from "react";
import { Controller, useFormContext, useWatch } from "react-hook-form";
import type { Options } from "react-select";
+import { v4 as uuidv4 } from "uuid";
import type { AddMembersWithSwitchCustomClassNames } from "@calcom/features/eventtypes/components/AddMembersWithSwitch";
import AddMembersWithSwitch, {
@@ -25,9 +26,11 @@ import ServerTrans from "@calcom/lib/components/ServerTrans";
import { useLocale } from "@calcom/lib/hooks/useLocale";
import { RRTimestampBasis, SchedulingType } from "@calcom/prisma/enums";
import classNames from "@calcom/ui/classNames";
+import { Button } from "@calcom/ui/components/button";
import { Label } from "@calcom/ui/components/form";
import { Select } from "@calcom/ui/components/form";
import { SettingsToggle } from "@calcom/ui/components/form";
+import { Icon } from "@calcom/ui/components/icon";
import { RadioAreaGroup as RadioArea } from "@calcom/ui/components/radio";
import { Tooltip } from "@calcom/ui/components/tooltip";
@@ -162,6 +165,39 @@ const FixedHosts = ({
const [isDisabled, setIsDisabled] = useState(hasActiveFixedHosts);
+ const handleFixedHostsActivation = useCallback(() => {
+ const currentHosts = getValues("hosts");
+ setValue(
+ "hosts",
+ teamMembers.map((teamMember) => {
+ const host = currentHosts.find((host) => host.userId === parseInt(teamMember.value, 10));
+ return {
+ isFixed: true,
+ userId: parseInt(teamMember.value, 10),
+ priority: host?.priority ?? 2,
+ weight: host?.weight ?? 100,
+ // if host was already added, retain scheduleId and groupId
+ scheduleId: host?.scheduleId || teamMember.defaultScheduleId,
+ groupId: host?.groupId || null,
+ };
+ }),
+ { shouldDirty: true }
+ );
+ }, [getValues, setValue, teamMembers]);
+
+ const handleFixedHostsToggle = useCallback(
+ (checked: boolean) => {
+ if (!checked) {
+ const rrHosts = getValues("hosts")
+ .filter((host) => !host.isFixed)
+ .sort((a, b) => (b.priority ?? 2) - (a.priority ?? 2));
+ setValue("hosts", rrHosts, { shouldDirty: true });
+ }
+ setIsDisabled(checked);
+ },
+ [getValues, setValue]
+ );
+
return (
<div className={classNames("mt-5 rounded-lg", customClassNames?.container)}>
{!isRoundRobinEvent ? (
@@ -185,6 +221,7 @@ const FixedHosts = ({
<div className="border-subtle rounded-b-md border border-t-0 px-6">
<AddMembersWithSwitch
teamId={teamId}
+ groupId={null}
teamMembers={teamMembers}
value={value}
onChange={onChange}
@@ -193,24 +230,7 @@ const FixedHosts = ({
automaticAddAllEnabled={!isRoundRobinEvent}
isFixed={true}
customClassNames={customClassNames?.addMembers}
- onActive={() => {
- const currentHosts = getValues("hosts");
- setValue(
- "hosts",
- teamMembers.map((teamMember) => {
- const host = currentHosts.find((host) => host.userId === parseInt(teamMember.value, 10));
- return {
- isFixed: true,
- userId: parseInt(teamMember.value, 10),
- priority: host?.priority ?? 2,
- weight: host?.weight ?? 100,
- // if host was already added, retain scheduleId
- scheduleId: host?.scheduleId || teamMember.defaultScheduleId,
- };
- }),
- { shouldDirty: true }
- );
- }}
+ onActive={handleFixedHostsActivation}
/>
</div>
</>
@@ -225,19 +245,12 @@ const FixedHosts = ({
labelClassName={classNames("text-sm", customClassNames?.label)}
descriptionClassName={classNames("text-sm text-subtle", customClassNames?.description)}
switchContainerClassName={customClassNames?.container}
- onCheckedChange={(checked) => {
- if (!checked) {
- const rrHosts = getValues("hosts")
- .filter((host) => !host.isFixed)
- .sort((a, b) => (b.priority ?? 2) - (a.priority ?? 2));
- setValue("hosts", rrHosts, { shouldDirty: true });
- }
- setIsDisabled(checked);
- }}
+ onCheckedChange={handleFixedHostsToggle}
childrenClassName={classNames("lg:ml-0", customClassNames?.children)}>
<div className="border-subtle flex flex-col gap-6 rounded-bl-md rounded-br-md border border-t-0 px-6">
<AddMembersWithSwitch
data-testid="fixed-hosts-select"
+ groupId={null}
placeholder={t("add_a_member")}
teamId={teamId}
teamMembers={teamMembers}
@@ -248,24 +261,7 @@ const FixedHosts = ({
setAssignAllTeamMembers={setAssignAllTeamMembers}
automaticAddAllEnabled={!isRoundRobinEvent}
isFixed={true}
- onActive={() => {
- const currentHosts = getValues("hosts");
- setValue(
- "hosts",
- teamMembers.map((teamMember) => {
- const host = currentHosts.find((host) => host.userId === parseInt(teamMember.value, 10));
- return {
- isFixed: true,
- userId: parseInt(teamMember.value, 10),
- priority: host?.priority ?? 2,
- weight: host?.weight ?? 100,
- // if host was already added, retain scheduleId
- scheduleId: host?.scheduleId || teamMember.defaultScheduleId,
- };
- }),
- { shouldDirty: true }
- );
- }}
+ onActive={handleFixedHostsActivation}
/>
</div>
</SettingsToggle>
@@ -315,6 +311,154 @@ const RoundRobinHosts = ({
control,
name: "rrSegmentQueryValue",
});
+ const hostGroups = useWatch({
+ control,
+ name: "hostGroups",
+ });
+
+ const handleWeightsEnabledChange = (active: boolean, onChange: (value: boolean) => void) => {
+ onChange(active);
+ const allHosts = getValues("hosts");
+ const fixedHosts = allHosts.filter((host) => host.isFixed);
+ const rrHosts = allHosts.filter((host) => !host.isFixed);
+ const sortedRRHosts = rrHosts.sort((a, b) => sortHosts(a, b, active));
+ // Preserve fixed hosts when updating
+ setValue("hosts", [...fixedHosts, ...sortedRRHosts]);
+ };
+
+ const handleWeightsChange = (hosts: Host[]) => {
+ const allHosts = getValues("hosts");
+ const fixedHosts = allHosts.filter((host) => host.isFixed);
+ const sortedRRHosts = hosts.sort((a, b) => sortHosts(a, b, true));
+ // Preserve fixed hosts when updating
+ setValue("hosts", [...fixedHosts, ...sortedRRHosts], { shouldDirty: true });
+ };
+
+ const handleAddGroup = useCallback(() => {
+ const allHosts = getValues("hosts");
+ const currentRRHosts = allHosts.filter((host) => !host.isFixed);
+ const fixedHosts = allHosts.filter((host) => host.isFixed);
+
+ // If there are already hosts added and no group exists yet, create two groups
+ if (hostGroups?.length === 0 && currentRRHosts.length > 0) {
+ const firstGroup = { id: uuidv4(), name: "" };
+ const secondGroup = { id: uuidv4(), name: "" };
+ const updatedHostGroups = [firstGroup, secondGroup];
+ setValue("hostGroups", updatedHostGroups, { shouldDirty: true });
+
+ const updatedRRHosts = currentRRHosts.map((host) => {
+ if (!host.groupId && !host.isFixed) {
+ return { ...host, groupId: firstGroup.id };
+ }
+ return host;
+ });
+ setValue("hosts", [...fixedHosts, ...updatedRRHosts], { shouldDirty: true });
+ } else {
+ // If groups already exist, just add one more group
+ const newGroup = { id: uuidv4(), name: "" };
+ const updatedHostGroups = [...hostGroups, newGroup];
+ setValue("hostGroups", updatedHostGroups, { shouldDirty: true });
+ }
+
+ // Disable 'Add all team members' switch if enabled
+ if (assignAllTeamMembers) {
+ setValue("assignAllTeamMembers", false, { shouldDirty: true });
+ setAssignAllTeamMembers(false);
+ }
+ }, [hostGroups, getValues, setValue, assignAllTeamMembers, setAssignAllTeamMembers]);
+
+ const handleGroupNameChange = useCallback(
+ (groupId: string, newName: string) => {
+ const updatedHostGroups =
+ hostGroups?.map((g) => (g.id === groupId ? { ...g, name: newName } : g)) || [];
+ setValue("hostGroups", updatedHostGroups, { shouldDirty: true });
+ },
+ [hostGroups, setValue]
+ );
+
+ const handleRemoveGroup = useCallback(
+ (groupId: string) => {
+ // Remove the group from hostGroups
+ const updatedHostGroups = hostGroups?.filter((g) => g.id !== groupId) || [];
+ setValue("hostGroups", updatedHostGroups, { shouldDirty: true });
+
+ // Remove all hosts that belong to this group
+ const updatedHosts = value.filter((host) => host.groupId !== groupId);
+ onChange(updatedHosts);
+ setValue("hosts", updatedHosts, { shouldDirty: true });
+ },
+ [hostGroups, setValue, value, onChange]
+ );
+
+ const handleMembersActivation = useCallback(
+ (groupId: string | null) => {
+ const currentHosts = getValues("hosts");
+ setValue(
+ "hosts",
+ teamMembers.map((teamMember) => {
+ const host = currentHosts.find((host) => host.userId === parseInt(teamMember.value, 10));
+ return {
+ isFixed: false,
+ userId: parseInt(teamMember.value, 10),
+ priority: host?.priority ?? 2,
+ weight: host?.weight ?? 100,
+ // if host was already added, retain scheduleId and groupId
+ scheduleId: host?.scheduleId || teamMember.defaultScheduleId,
+ groupId: host?.groupId || groupId,
+ };
+ }),
+ { shouldDirty: true }
+ );
+ },
+ [getValues, setValue, teamMembers]
+ );
+
+ const AddMembersWithSwitchComponent = ({
+ groupId,
+ containerClassName,
+ }: {
+ groupId: string | null;
+ containerClassName?: string;
+ }) => {
+ return (
+ <AddMembersWithSwitch
+ placeholder={t("add_a_member")}
+ teamId={teamId}
+ teamMembers={teamMembers}
+ value={value}
+ onChange={onChange}
+ assignAllTeamMembers={assignAllTeamMembers}
+ setAssignAllTeamMembers={setAssignAllTeamMembers}
+ isSegmentApplicable={isSegmentApplicable}
+ automaticAddAllEnabled={true}
+ isRRWeightsEnabled={isRRWeightsEnabled}
+ isFixed={false}
+ groupId={groupId}
+ containerClassName={containerClassName || (assignAllTeamMembers ? "-mt-4" : "")}
+ onActive={() => handleMembersActivation(groupId)}
+ customClassNames={customClassNames?.addMembers}
+ />
+ );
+ };
+
+ const UnassignedHostsGroup = () => {
+ const unassignedHosts = value.filter((host) => !host.isFixed && !host.groupId);
+
+ if (unassignedHosts.length === 0) {
+ return null;
+ }
+
+ return (
+ <div className="border-subtle my-4 rounded-md border p-4 pb-0">
+ <div className="-mb-4 flex items-center justify-between">
+ <div className="flex items-center gap-1">
+ <span className="text-default text-sm font-medium">{`Group ${hostGroups.length + 1}`}</span>
+ </div>
+ </div>
+ <AddMembersWithSwitchComponent groupId={null} />
+ </div>
+ );
+ };
return (
<div className={classNames("rounded-lg")}>
@@ -323,16 +467,23 @@ const RoundRobinHosts = ({
"border-subtle mt-5 rounded-t-md border p-6 pb-5",
customClassNames?.container
)}>
- <Label className={classNames("mb-1 text-sm font-semibold", customClassNames?.label)}>
- {t("round_robin_hosts")}
- </Label>
- <p
- className={classNames(
- "text-subtle max-w-full break-words text-sm leading-tight",
- customClassNames?.description
- )}>
- {t("round_robin_helper")}
- </p>
+ <div className="flex items-center justify-between">
+ <div>
+ <Label className={classNames("mb-1 text-sm font-semibold", customClassNames?.label)}>
+ {t("round_robin_hosts")}
+ </Label>
+ <p
+ className={classNames(
+ "text-subtle max-w-full break-words text-sm leading-tight",
+ customClassNames?.description
+ )}>
+ {hostGroups?.length > 0 ? t("round_robin_groups_helper") : t("round_robin_helper")}
+ </p>
+ </div>
+ <Button color="secondary" size="sm" StartIcon="plus" onClick={handleAddGroup}>
+ {t("add_group")}
+ </Button>
+ </div>
</div>
<div className="border-subtle rounded-b-md border border-t-0 px-6 pt-4">
<>
@@ -346,19 +497,11 @@ const RoundRobinHosts = ({
switchContainerClassName={customClassNames?.enableWeights?.container}
labelClassName={customClassNames?.enableWeights?.label}
descriptionClassName={customClassNames?.enableWeights?.description}
- onCheckedChange={(active) => {
- onChange(active);
- const rrHosts = getValues("hosts").filter((host) => !host.isFixed);
- const sortedRRHosts = rrHosts.sort((a, b) => sortHosts(a, b, active));
- setValue("hosts", sortedRRHosts);
- }}>
+ onCheckedChange={(active) => handleWeightsEnabledChange(active, onChange)}>
<EditWeightsForAllTeamMembers
teamMembers={teamMembers}
value={value}
- onChange={(hosts) => {
- const sortedRRHosts = hosts.sort((a, b) => sortHosts(a, b, true));
- setValue("hosts", sortedRRHosts, { shouldDirty: true });
- }}
+ onChange={handleWeightsChange}
assignAllTeamMembers={assignAllTeamMembers}
assignRRMembersUsingSegment={assignRRMembersUsingSegment}
teamId={teamId}
@@ -368,39 +511,42 @@ const RoundRobinHosts = ({
)}
/>
</>
- <AddMembersWithSwitch
- placeholder={t("add_a_member")}
- teamId={teamId}
- teamMembers={teamMembers}
- value={value}
- onChange={onChange}
- assignAllTeamMembers={assignAllTeamMembers}
- setAssignAllTeamMembers={setAssignAllTeamMembers}
- isSegmentApplicable={isSegmentApplicable}
- automaticAddAllEnabled={true}
- isRRWeightsEnabled={isRRWeightsEnabled}
- isFixed={false}
- containerClassName={assignAllTeamMembers ? "-mt-4" : ""}
- onActive={() => {
- const currentHosts = getValues("hosts");
- setValue(
- "hosts",
- teamMembers.map((teamMember) => {
- const host = currentHosts.find((host) => host.userId === parseInt(teamMember.value, 10));
- return {
- isFixed: false,
- userId: parseInt(teamMember.value, 10),
- priority: host?.priority ?? 2,
- weight: host?.weight ?? 100,
- // if host was already added, retain scheduleId
- scheduleId: host?.scheduleId || teamMember.defaultScheduleId,
- };
- }),
- { shouldDirty: true }
- );
- }}
- customClassNames={customClassNames?.addMembers}
- />
+ {!hostGroups.length ? (
+ <AddMembersWithSwitchComponent groupId={hostGroups[0]?.id ?? null} />
+ ) : (
+ <>
+ {/* Show unassigned hosts first */}
+ <UnassignedHostsGroup />
+
+ {/* Show all defined groups */}
+ {hostGroups.map((group, index) => {
+ const groupNumber = index + 1;
+
+ return (
+ <div key={index} className="border-subtle my-4 rounded-md border p-4 pb-0">
+ <div className="-mb-4 flex items-center justify-between">
+ <div className="flex items-center gap-2">
+ <input
+ type="text"
+ value={group.name ?? ""}
+ onChange={(e) => handleGroupNameChange(group.id, e.target.value)}
+ className="border-none bg-transparent p-0 text-sm font-medium focus:outline-none focus:ring-0"
+ placeholder={`Group ${groupNumber}`}
+ />
+ </div>
+ <button
+ type="button"
+ onClick={() => handleRemoveGroup(group.id)}
+ className="text-subtle hover:text-default rounded p-1">
+ <Icon name="x" className="h-4 w-4" />
+ </button>
+ </div>
+ <AddMembersWithSwitchComponent groupId={group.id} />
+ </div>
+ );
+ })}
+ </>
+ )}
</div>
</div>
);
@@ -507,16 +653,18 @@ const Hosts = ({
);
}, [schedulingType, setValue, getValues, submitCount]);
- // To ensure existing host do not loose its scheduleId property, whenever a new host of same type is added.
+ // To ensure existing host do not loose its scheduleId and groupId properties, whenever a new host of same type is added.
// This is because the host is created from list option in CheckedHostField component.
const updatedHosts = (changedHosts: Host[]) => {
const existingHosts = getValues("hosts");
return changedHosts.map((newValue) => {
const existingHost = existingHosts.find((host: Host) => host.userId === newValue.userId);
+
return existingHost
? {
...newValue,
scheduleId: existingHost.scheduleId,
+ groupId: existingHost.groupId,
}
: newValue;
});
@@ -560,7 +708,7 @@ const Hosts = ({
teamMembers={teamMembers}
value={value}
onChange={(changeValue) => {
- const hosts = [...value.filter((host: Host) => host.isFixed), ...updatedHosts(changeValue)];
+ const hosts = [...value.filter((host: Host) => host.isFixed), ...changeValue];
onChange(hosts);
}}
assignAllTeamMembers={assignAllTeamMembers}
@@ -633,11 +781,34 @@ export const EventTeamAssignmentTab = ({
setAssignAllTeamMembers(false);
};
+ const handleSchedulingTypeChange = useCallback(
+ (schedulingType: SchedulingType | undefined, onChange: (value: SchedulingType | undefined) => void) => {
+ if (schedulingType) {
+ onChange(schedulingType);
+ resetRROptions();
+ }
+ },
+ [setValue, setAssignAllTeamMembers]
+ );
+
+ const handleMaxLeadThresholdChange = (val: string, onChange: (value: number | null) => void) => {
+ if (val === "loadBalancing") {
+ onChange(3);
+ } else {
+ onChange(null);
+ }
+ };
+
const schedulingType = useWatch({
control,
name: "schedulingType",
});
+ const hostGroups = useWatch({
+ control,
+ name: "hostGroups",
+ });
+
return (
<div>
{team && !isManagedEventType && (
@@ -679,10 +850,7 @@ export const EventTeamAssignmentTab = ({
customClassNames?.assignmentType?.schedulingTypeSelect?.select
)}
innerClassNames={customClassNames?.assignmentType?.schedulingTypeSelect?.innerClassNames}
- onChange={(val) => {
- onChange(val?.value);
- resetRROptions();
- }}
+ onChange={(val) => handleSchedulingTypeChange(val?.value, onChange)}
/>
)}
/>
@@ -701,10 +869,7 @@ export const EventTeamAssignmentTab = ({
name="maxLeadThreshold"
render={({ field: { value, onChange } }) => (
<RadioArea.Group
- onValueChange={(val) => {
- if (val === "loadBalancing") onChange(3);
- else onChange(null);
- }}
+ onValueChange={(val) => handleMaxLeadThresholdChange(val, onChange)}
className="mt-1 flex flex-col gap-4">
<RadioArea.Item
value="maximizeAvailability"
@@ -716,11 +881,18 @@ export const EventTeamAssignmentTab = ({
</strong>
<p>{t("rr_distribution_method_availability_description")}</p>
</RadioArea.Item>
- {!!(
- eventType.team?.rrTimestampBasis &&
- eventType.team?.rrTimestampBasis !== RRTimestampBasis.CREATED_AT
- ) ? (
- <Tooltip content={t("rr_load_balancing_disabled")}>
+ {(eventType.team?.rrTimestampBasis &&
+ eventType.team?.rrTimestampBasis !== RRTimestampBasis.CREATED_AT) ||
+ hostGroups?.length > 1 ? (
+ <Tooltip
+ content={
+ !!(
+ eventType.team?.rrTimestampBasis &&
+ eventType.team?.rrTimestampBasis !== RRTimestampBasis.CREATED_AT
+ )
+ ? t("rr_load_balancing_disabled")
+ : t("rr_load_balancing_disabled_with_groups")
+ }>
<div className="w-full">
<RadioArea.Item
value="loadBalancing"
diff --git a/packages/features/eventtypes/lib/types.ts b/packages/features/eventtypes/lib/types.ts
index 2596f7756d6..d5d34505f77 100644
--- a/packages/features/eventtypes/lib/types.ts
+++ b/packages/features/eventtypes/lib/types.ts
@@ -30,6 +30,7 @@ export type Host = {
priority: number;
weight: number;
scheduleId?: number | null;
+ groupId: string | null;
};
export type TeamMember = {
value: string;
@@ -146,6 +147,10 @@ export type FormValues = {
onlyShowFirstAvailableSlot: boolean;
children: ChildrenEventType[];
hosts: Host[];
+ hostGroups: {
+ id: string;
+ name: string;
+ }[];
bookingFields: z.infer<typeof eventTypeBookingFields>;
availability?: AvailabilityOption;
bookerLayouts: BookerLayoutSettings;
diff --git a/packages/features/schedules/components/Schedule.tsx b/packages/features/schedules/components/Schedule.tsx
index 388de8f32d6..06fa8994e10 100644
--- a/packages/features/schedules/components/Schedule.tsx
+++ b/packages/features/schedules/components/Schedule.tsx
@@ -20,7 +20,6 @@ import { useLocale } from "@calcom/lib/hooks/useLocale";
import { weekdayNames } from "@calcom/lib/weekday";
import useMeQuery from "@calcom/trpc/react/hooks/useMeQuery";
import type { TimeRange } from "@calcom/types/schedule";
-
import cn from "@calcom/ui/classNames";
import { Button } from "@calcom/ui/components/button";
import { Dropdown, DropdownMenuContent, DropdownMenuTrigger } from "@calcom/ui/components/dropdown";
diff --git a/packages/lib/__mocks__/constants.ts b/packages/lib/__mocks__/constants.ts
index 9cb3f842398..47ac4b76eb0 100644
--- a/packages/lib/__mocks__/constants.ts
+++ b/packages/lib/__mocks__/constants.ts
@@ -15,13 +15,13 @@ const initialConstants = {
IS_SELF_HOSTED: false,
SEO_IMG_DEFAULT: "https://cal.com/og-image.png",
SEO_IMG_OGIMG: "https://cal.com/og-image-wide.png",
- SEO_IMG_LOGO: "https://cal.com/logo.png",
CURRENT_TIMEZONE: "Europe/London",
APP_NAME: "Cal.com",
BOOKER_NUMBER_OF_DAYS_TO_LOAD: 14,
PUBLIC_QUICK_AVAILABILITY_ROLLOUT: 100,
SINGLE_ORG_SLUG: "",
-} as typeof constants;
+ DEFAULT_GROUP_ID: "default_group_id",
+} as Partial<typeof constants>;
export const mockedConstants = { ...initialConstants };
diff --git a/packages/lib/bookings/filterHostsBySameRoundRobinHost.test.ts b/packages/lib/bookings/filterHostsBySameRoundRobinHost.test.ts
index cd246856b85..86be937c1b5 100644
--- a/packages/lib/bookings/filterHostsBySameRoundRobinHost.test.ts
+++ b/packages/lib/bookings/filterHostsBySameRoundRobinHost.test.ts
@@ -64,4 +64,66 @@ describe("filterHostsBySameRoundRobinHost", () => {
})
).resolves.toStrictEqual([hosts[0]]);
});
+
+ // Tests for bookings that have more than one host
+ describe("Fixed hosts and round robin groups support", () => {
+ it("should return organizer and attendee hosts", async () => {
+ prismaMock.booking.findFirst.mockResolvedValue({
+ userId: 1,
+ attendees: [
+ { email: "[email protected]" },
+ { email: "[email protected]" },
+ { email: "[email protected]" }, // Non-host attendee
+ ],
+ });
+
+ const hosts = [
+ { isFixed: false as const, createdAt: new Date(), user: { id: 1, email: "[email protected]" } },
+ { isFixed: false as const, createdAt: new Date(), user: { id: 2, email: "[email protected]" } },
+ { isFixed: false as const, createdAt: new Date(), user: { id: 3, email: "[email protected]" } },
+ { isFixed: false as const, createdAt: new Date(), user: { id: 4, email: "[email protected]" } },
+ ];
+
+ const result = await filterHostsBySameRoundRobinHost({
+ hosts,
+ rescheduleUid: "some-uid",
+ rescheduleWithSameRoundRobinHost: true,
+ routedTeamMemberIds: null,
+ });
+
+ // Should return organizer host (id: 1) and attendee hosts (ids: 2, 3)
+ expect(result).toHaveLength(3);
+ expect(result).toEqual([
+ expect.objectContaining({ user: { id: 1, email: "[email protected]" } }), // organizer
+ expect.objectContaining({ user: { id: 2, email: "[email protected]" } }), // attendee
+ expect.objectContaining({ user: { id: 3, email: "[email protected]" } }), // attendee
+ ]);
+ });
+
+ it("should return only organizer host when no attendees match current hosts", async () => {
+ prismaMock.booking.findFirst.mockResolvedValue({
+ userId: 1,
+ attendees: [
+ { email: "[email protected]" }, // Non-host attendee
+ { email: "[email protected]" }, // Non-host attendee
+ ],
+ });
+
+ const hosts = [
+ { isFixed: false as const, createdAt: new Date(), user: { id: 1, email: "[email protected]" } },
+ { isFixed: false as const, createdAt: new Date(), user: { id: 2, email: "[email protected]" } },
+ ];
+
+ const result = await filterHostsBySameRoundRobinHost({
+ hosts,
+ rescheduleUid: "some-uid",
+ rescheduleWithSameRoundRobinHost: true,
+ routedTeamMemberIds: null,
+ });
+
+ // Should return only organizer host
+ expect(result).toHaveLength(1);
+ expect(result[0]).toEqual(expect.objectContaining({ user: { id: 1, email: "[email protected]" } }));
+ });
+ });
});
diff --git a/packages/lib/bookings/filterHostsBySameRoundRobinHost.ts b/packages/lib/bookings/filterHostsBySameRoundRobinHost.ts
index 76208c04279..001c44ca803 100644
--- a/packages/lib/bookings/filterHostsBySameRoundRobinHost.ts
+++ b/packages/lib/bookings/filterHostsBySameRoundRobinHost.ts
@@ -6,7 +6,7 @@ import { isRerouting } from "./routing/utils";
export const filterHostsBySameRoundRobinHost = async <
T extends {
isFixed: false; // ensure no fixed hosts are passed.
- user: { id: number };
+ user: { id: number; email: string };
}
>({
hosts,
@@ -35,8 +35,23 @@ export const filterHostsBySameRoundRobinHost = async <
},
select: {
userId: true,
+ attendees: {
+ select: {
+ email: true,
+ },
+ },
},
});
- return hosts.filter((host) => host.user.id === originalRescheduledBooking?.userId || 0);
+ if (!originalRescheduledBooking) {
+ return hosts;
+ }
+
+ const attendeeEmails = originalRescheduledBooking.attendees?.map((attendee) => attendee.email) || [];
+
+ return hosts.filter((host) => {
+ const isOrganizer = host.user.id === originalRescheduledBooking.userId;
+ const isAttendee = attendeeEmails.includes(host.user.email);
+ return isOrganizer || isAttendee;
+ });
};
diff --git a/packages/lib/bookings/findQualifiedHostsWithDelegationCredentials.test.ts b/packages/lib/bookings/findQualifiedHostsWithDelegationCredentials.test.ts
index 7e6229ee4af..90b534df4f4 100644
--- a/packages/lib/bookings/findQualifiedHostsWithDelegationCredentials.test.ts
+++ b/packages/lib/bookings/findQualifiedHostsWithDelegationCredentials.test.ts
@@ -35,6 +35,7 @@ describe("findQualifiedHostsWithDelegationCredentials", async () => {
},
priority: undefined,
weight: undefined,
+ groupId: null,
},
{
isFixed: false,
@@ -47,6 +48,7 @@ describe("findQualifiedHostsWithDelegationCredentials", async () => {
},
priority: undefined,
weight: undefined,
+ groupId: null,
},
{
isFixed: false,
@@ -59,6 +61,7 @@ describe("findQualifiedHostsWithDelegationCredentials", async () => {
},
priority: undefined,
weight: undefined,
+ groupId: null,
},
];
diff --git a/packages/lib/bookings/findQualifiedHostsWithDelegationCredentials.ts b/packages/lib/bookings/findQualifiedHostsWithDelegationCredentials.ts
index 3061292c18b..b2c5bab2198 100644
--- a/packages/lib/bookings/findQualifiedHostsWithDelegationCredentials.ts
+++ b/packages/lib/bookings/findQualifiedHostsWithDelegationCredentials.ts
@@ -17,6 +17,7 @@ type Host<T> = {
createdAt: Date;
priority?: number | null;
weight?: number | null;
+ groupId: string | null;
} & {
user: T;
};
@@ -81,6 +82,7 @@ const _findQualifiedHostsWithDelegationCredentials = async <
createdAt: Date | null;
priority?: number | null;
weight?: number | null;
+ groupId?: string | null;
user: Omit<T, "credentials"> & { credentials: CredentialForCalendarService[] };
}[];
fixedHosts: {
@@ -88,6 +90,7 @@ const _findQualifiedHostsWithDelegationCredentials = async <
createdAt: Date | null;
priority?: number | null;
weight?: number | null;
+ groupId?: string | null;
user: Omit<T, "credentials"> & { credentials: CredentialForCalendarService[] };
}[];
// all hosts we want to fallback to including the qualifiedRRHosts (fairness + crm contact owner)
@@ -96,6 +99,7 @@ const _findQualifiedHostsWithDelegationCredentials = async <
createdAt: Date | null;
priority?: number | null;
weight?: number | null;
+ groupId?: string | null;
user: Omit<T, "credentials"> & { credentials: CredentialForCalendarService[] };
}[];
}> => {
@@ -132,11 +136,11 @@ const _findQualifiedHostsWithDelegationCredentials = async <
}
const hostsAfterSegmentMatching = applyFilterWithFallback(
- roundRobinHosts,
+ hostsAfterRescheduleWithSameRoundRobinHost,
(await findMatchingHostsWithEventSegment({
eventType,
- hosts: roundRobinHosts,
- })) as typeof roundRobinHosts
+ hosts: hostsAfterRescheduleWithSameRoundRobinHost,
+ })) as typeof hostsAfterRescheduleWithSameRoundRobinHost
);
if (hostsAfterSegmentMatching.length === 1) {
@@ -147,7 +151,9 @@ const _findQualifiedHostsWithDelegationCredentials = async <
}
//if segment matching doesn't return any hosts we fall back to all round robin hosts
- const officalRRHosts = hostsAfterSegmentMatching.length ? hostsAfterSegmentMatching : roundRobinHosts;
+ const officalRRHosts = hostsAfterSegmentMatching.length
+ ? hostsAfterSegmentMatching
+ : hostsAfterRescheduleWithSameRoundRobinHost;
const hostsAfterContactOwnerMatching = applyFilterWithFallback(
officalRRHosts,
diff --git a/packages/lib/bookings/getRoutedUsers.ts b/packages/lib/bookings/getRoutedUsers.ts
index 86533a2bd5e..7511caf5ffa 100644
--- a/packages/lib/bookings/getRoutedUsers.ts
+++ b/packages/lib/bookings/getRoutedUsers.ts
@@ -76,6 +76,7 @@ type BaseHost<User extends BaseUser> = {
weight?: number | null;
weightAdjustment?: number | null;
user: User;
+ groupId: string | null;
};
export type EventType = {
@@ -107,6 +108,7 @@ export function getNormalizedHosts<User extends BaseUser, Host extends BaseHost<
priority: host.priority,
weight: host.weight,
createdAt: host.createdAt,
+ groupId: host.groupId,
})),
fallbackHosts: null,
};
@@ -119,6 +121,7 @@ export function getNormalizedHosts<User extends BaseUser, Host extends BaseHost<
email: user.email,
user: user,
createdAt: null,
+ groupId: null,
};
}),
};
@@ -145,6 +148,7 @@ export async function getNormalizedHostsWithDelegationCredentials<
priority: host.priority,
weight: host.weight,
createdAt: host.createdAt,
+ groupId: host.groupId,
}));
const firstHost = hostsWithoutDelegationCredential[0];
const firstUserOrgId = await getOrgIdFromMemberOrTeamId({
@@ -197,6 +201,7 @@ export async function findMatchingHostsWithEventSegment<User extends BaseUser>({
priority?: number | null;
weight?: number | null;
createdAt: Date | null;
+ groupId: string | null;
}[];
}) {
const matchingRRTeamMembers = await findMatchingTeamMembersIdsForEventRRSegment({
diff --git a/packages/lib/bookings/hostGroupUtils.ts b/packages/lib/bookings/hostGroupUtils.ts
new file mode 100644
index 00000000000..71d75057aa5
--- /dev/null
+++ b/packages/lib/bookings/hostGroupUtils.ts
@@ -0,0 +1,39 @@
+import { DEFAULT_GROUP_ID } from "@calcom/lib/constants";
+
+export function groupHostsByGroupId<T extends { groupId?: string | null }>({
+ hosts,
+ hostGroups,
+}: {
+ hosts: T[];
+ hostGroups?: { id: string }[];
+}): Record<string, T[]> {
+ const groups: Record<string, T[]> = {};
+
+ const hasGroups = hostGroups && hostGroups.length > 0;
+
+ if (hasGroups) {
+ hostGroups.forEach((group) => {
+ groups[group.id] = [];
+ });
+ } else {
+ groups[DEFAULT_GROUP_ID] = [];
+ }
+
+ hosts.forEach((host) => {
+ const groupId = hasGroups && host.groupId ? host.groupId : DEFAULT_GROUP_ID;
+ if (groups[groupId]) {
+ groups[groupId].push(host);
+ }
+ });
+
+ return groups;
+}
+
+export function getHostsFromOtherGroups<T extends { groupId?: string | null }>(
+ hosts: readonly T[],
+ groupId: string | null
+): T[] {
+ return hosts.filter(
+ (host) => (groupId && (!host.groupId || host.groupId !== groupId)) || (!groupId && host.groupId)
+ );
+}
diff --git a/packages/lib/constants.ts b/packages/lib/constants.ts
index 56b578625c3..ce54e31f3e7 100644
--- a/packages/lib/constants.ts
+++ b/packages/lib/constants.ts
@@ -230,3 +230,5 @@ export const IS_SMS_CREDITS_ENABLED =
export const DATABASE_CHUNK_SIZE = parseInt(process.env.DATABASE_CHUNK_SIZE || "25", 10);
export const NEXTJS_CACHE_TTL = 3600; // 1 hour
+
+export const DEFAULT_GROUP_ID = "default_group_id";
diff --git a/packages/lib/defaultEvents.ts b/packages/lib/defaultEvents.ts
index 7f90985e928..f8f5f3c2120 100644
--- a/packages/lib/defaultEvents.ts
+++ b/packages/lib/defaultEvents.ts
@@ -145,6 +145,7 @@ const commons = {
instantMeetingScheduleId: null,
instantMeetingParameters: [],
eventTypeColor: null,
+ hostGroups: [],
};
export const dynamicEvent = {
diff --git a/packages/lib/errorCodes.ts b/packages/lib/errorCodes.ts
index 058c05f050b..b015ae9164d 100644
--- a/packages/lib/errorCodes.ts
+++ b/packages/lib/errorCodes.ts
@@ -5,7 +5,7 @@ export enum ErrorCode {
RequestBodyWithouEnd = "request_body_end_time_internal_error",
AlreadySignedUpForBooking = "already_signed_up_for_this_booking_error",
FixedHostsUnavailableForBooking = "fixed_hosts_unavailable_for_booking",
- RoundRobinHostsUnavailableForBooking = "round_robin_hosts_unavailable_for_booking",
+ RoundRobinHostsUnavailableForBooking = "round_robin_host_unavailable_for_booking",
EventTypeNotFound = "event_type_not_found_error",
BookingNotFound = "booking_not_found_error",
BookingSeatsFull = "booking_seats_full_error",
diff --git a/packages/lib/getAggregatedAvailability.test.ts b/packages/lib/getAggregatedAvailability.test.ts
index 8062c3654e2..539c0100ec9 100644
--- a/packages/lib/getAggregatedAvailability.test.ts
+++ b/packages/lib/getAggregatedAvailability.test.ts
@@ -209,4 +209,264 @@ describe("getAggregatedAvailability", () => {
expect(isAvailable(result, timeRangeToCheckAvailable)).toBe(true);
expect(result.length).toBe(1);
});
+
+ it("requires at least one RR host from each group to be available", () => {
+ // Test scenario with two groups:
+ // Group 1: Host A (available 11:00-11:30), Host B (available 12:00-12:30)
+ // Group 2: Host C (available 11:15-11:45), Host D (available 12:15-12:45)
+ // Fixed host: available 11:00-13:00
+ // Expected: Only slots where at least one host from each group is available
+ const userAvailability = [
+ {
+ dateRanges: [],
+ oooExcludedDateRanges: [
+ { start: dayjs("2025-01-23T11:00:00.000Z"), end: dayjs("2025-01-23T13:00:00.000Z") },
+ ],
+ user: { isFixed: true },
+ },
+ {
+ dateRanges: [],
+ oooExcludedDateRanges: [
+ { start: dayjs("2025-01-23T11:00:00.000Z"), end: dayjs("2025-01-23T11:30:00.000Z") },
+ ],
+ user: { isFixed: false, groupId: "group1" },
+ },
+ {
+ dateRanges: [],
+ oooExcludedDateRanges: [
+ { start: dayjs("2025-01-23T12:00:00.000Z"), end: dayjs("2025-01-23T12:30:00.000Z") },
+ ],
+ user: { isFixed: false, groupId: "group1" },
+ },
+ {
+ dateRanges: [],
+ oooExcludedDateRanges: [
+ { start: dayjs("2025-01-23T11:15:00.000Z"), end: dayjs("2025-01-23T11:45:00.000Z") },
+ ],
+ user: { isFixed: false, groupId: "group2" },
+ },
+ {
+ dateRanges: [],
+ oooExcludedDateRanges: [
+ { start: dayjs("2025-01-23T12:15:00.000Z"), end: dayjs("2025-01-23T12:45:00.000Z") },
+ ],
+ user: { isFixed: false, groupId: "group2" },
+ },
+ ];
+
+ const result = getAggregatedAvailability(userAvailability, "ROUND_ROBIN");
+
+ const timeRangeAvailable = {
+ start: dayjs("2025-01-23T11:15:00.000Z"),
+ end: dayjs("2025-01-23T11:30:00.000Z"),
+ };
+ expect(isAvailable(result, timeRangeAvailable)).toBe(true);
+
+ const timeRangeAvailable2 = {
+ start: dayjs("2025-01-23T12:15:00.000Z"),
+ end: dayjs("2025-01-23T12:30:00.000Z"),
+ };
+ expect(isAvailable(result, timeRangeAvailable2)).toBe(true);
+
+ // Should NOT be available when only one group has hosts available
+ const timeRangeNotAvailable = {
+ start: dayjs("2025-01-23T11:00:00.000Z"),
+ end: dayjs("2025-01-23T11:15:00.000Z"),
+ };
+ expect(isAvailable(result, timeRangeNotAvailable)).toBe(false);
+
+ // Should NOT be available when only one group has hosts available
+ const timeRangeNotAvailable2 = {
+ start: dayjs("2025-01-23T12:30:00.000Z"),
+ end: dayjs("2025-01-23T12:45:00.000Z"),
+ };
+ expect(isAvailable(result, timeRangeNotAvailable2)).toBe(false);
+ });
+
+ it("handles single group with multiple RR hosts (union behavior)", () => {
+ // Test that when all RR hosts are in the same group, we get union behavior
+ // Host A: available 11:00-11:20, 16:10-16:30
+ // Host B: available 11:15-11:30, 13:20-13:30
+ // Expected: Union of both hosts' availability
+ const userAvailability = [
+ {
+ dateRanges: [],
+ oooExcludedDateRanges: [
+ { start: dayjs("2025-01-23T11:00:00.000Z"), end: dayjs("2025-01-23T11:20:00.000Z") },
+ { start: dayjs("2025-01-23T16:10:00.000Z"), end: dayjs("2025-01-23T16:30:00.000Z") },
+ ],
+ user: { isFixed: false },
+ },
+ {
+ dateRanges: [],
+ oooExcludedDateRanges: [
+ { start: dayjs("2025-01-23T11:15:00.000Z"), end: dayjs("2025-01-23T11:30:00.000Z") },
+ { start: dayjs("2025-01-23T13:20:00.000Z"), end: dayjs("2025-01-23T13:30:00.000Z") },
+ ],
+ user: { isFixed: false },
+ },
+ ];
+
+ const result = getAggregatedAvailability(userAvailability, "ROUND_ROBIN");
+
+ // Should be available when either host is available
+ const timeRangeAvailable = {
+ start: dayjs("2025-01-23T11:00:00.000Z"),
+ end: dayjs("2025-01-23T11:20:00.000Z"),
+ };
+ expect(isAvailable(result, timeRangeAvailable)).toBe(true);
+
+ const timeRangeAvailable2 = {
+ start: dayjs("2025-01-23T13:20:00.000Z"),
+ end: dayjs("2025-01-23T13:30:00.000Z"),
+ };
+ expect(isAvailable(result, timeRangeAvailable2)).toBe(true);
+
+ // Should NOT be available when neither host is available
+ const timeRangeNotAvailable = {
+ start: dayjs("2025-01-23T11:00:00.000Z"),
+ end: dayjs("2025-01-23T11:30:00.000Z"),
+ };
+ expect(isAvailable(result, timeRangeNotAvailable)).toBe(false);
+ });
+
+ it("handles mixed groups with some hosts having groupId and others not", () => {
+ // Test scenario:
+ // Group 1: Host A (available 11:00-11:45)
+ // Group 2: Host B (available 11:15-12:00)
+ // Default group: Host C (available 11:30-12:30), Host D (available 12:15-12:45)
+ // Fixed host: available 11:00-13:00
+
+ const userAvailability = [
+ {
+ dateRanges: [],
+ oooExcludedDateRanges: [
+ { start: dayjs("2025-01-23T11:00:00.000Z"), end: dayjs("2025-01-23T13:00:00.000Z") },
+ ],
+ user: { isFixed: true },
+ },
+ {
+ dateRanges: [],
+ oooExcludedDateRanges: [
+ { start: dayjs("2025-01-23T11:00:00.000Z"), end: dayjs("2025-01-23T11:45:00.000Z") },
+ ],
+ user: { isFixed: false, groupId: "group1" },
+ },
+ {
+ dateRanges: [],
+ oooExcludedDateRanges: [
+ { start: dayjs("2025-01-23T11:15:00.000Z"), end: dayjs("2025-01-23T12:00:00.000Z") },
+ ],
+ user: { isFixed: false, groupId: "group2" },
+ },
+ {
+ dateRanges: [],
+ oooExcludedDateRanges: [
+ { start: dayjs("2025-01-23T11:30:00.000Z"), end: dayjs("2025-01-23T12:30:00.000Z") },
+ ],
+ user: { isFixed: false },
+ },
+ {
+ dateRanges: [],
+ oooExcludedDateRanges: [
+ { start: dayjs("2025-01-23T12:15:00.000Z"), end: dayjs("2025-01-23T12:45:00.000Z") },
+ ],
+ user: { isFixed: false },
+ },
+ ];
+
+ const result = getAggregatedAvailability(userAvailability, "ROUND_ROBIN");
+
+ // Should be available when all groups have at least one host available
+ // Fixed host + Group 1 + Group 2 + Default group all available in this time range
+ const timeRangeAvailable = {
+ start: dayjs("2025-01-23T11:30:00.000Z"),
+ end: dayjs("2025-01-23T11:45:00.000Z"),
+ };
+ expect(isAvailable(result, timeRangeAvailable)).toBe(true);
+
+ // Should NOT be available when not all groups have hosts available
+ // Only Group 1, Group 2, and fixed host available, but Default group not available
+ const timeRangeNotAvailable = {
+ start: dayjs("2025-01-23T11:15:00.000Z"),
+ end: dayjs("2025-01-23T11:30:00.000Z"),
+ };
+ expect(isAvailable(result, timeRangeNotAvailable)).toBe(false);
+
+ // Should NOT be available when not all groups have hosts available
+ // Only Group 1 and fixed host available, Group 2 and Default group not available
+ const timeRangeNotAvailable2 = {
+ start: dayjs("2025-01-23T11:00:00.000Z"),
+ end: dayjs("2025-01-23T11:15:00.000Z"),
+ };
+ expect(isAvailable(result, timeRangeNotAvailable2)).toBe(false);
+
+ // Should NOT be available when not all groups have hosts available
+ // Only Group 2 and fixed host available, Group 1 and Default group not available
+ const timeRangeNotAvailable3 = {
+ start: dayjs("2025-01-23T11:45:00.000Z"),
+ end: dayjs("2025-01-23T12:00:00.000Z"),
+ };
+ expect(isAvailable(result, timeRangeNotAvailable3)).toBe(false);
+ });
+
+ it("handles empty groups gracefully", () => {
+ // Test scenario with empty groups
+ const userAvailability = [
+ {
+ dateRanges: [],
+ oooExcludedDateRanges: [
+ { start: dayjs("2025-01-23T11:00:00.000Z"), end: dayjs("2025-01-23T11:30:00.000Z") },
+ ],
+ user: { isFixed: true },
+ },
+ ];
+
+ const result = getAggregatedAvailability(userAvailability, "ROUND_ROBIN");
+
+ // Should only have fixed host availability
+ const timeRangeAvailable = {
+ start: dayjs("2025-01-23T11:00:00.000Z"),
+ end: dayjs("2025-01-23T11:30:00.000Z"),
+ };
+ expect(isAvailable(result, timeRangeAvailable)).toBe(true);
+ expect(result.length).toBe(1);
+ });
+
+ it("handles scenario where one group has no available hosts", () => {
+ // Test scenario where one group has no available hosts
+ // Group 1: Host A (available 11:00-11:30)
+ // Group 2: Host B (not available at all)
+ // Fixed host: available 11:00-13:00
+ const userAvailability = [
+ {
+ dateRanges: [],
+ oooExcludedDateRanges: [
+ { start: dayjs("2025-01-23T11:00:00.000Z"), end: dayjs("2025-01-23T13:00:00.000Z") },
+ ],
+ user: { isFixed: true },
+ },
+ {
+ dateRanges: [],
+ oooExcludedDateRanges: [
+ { start: dayjs("2025-01-23T11:00:00.000Z"), end: dayjs("2025-01-23T11:30:00.000Z") },
+ ],
+ user: { isFixed: false, groupId: "group1" },
+ },
+ {
+ dateRanges: [],
+ oooExcludedDateRanges: [], // No availability
+ user: { isFixed: false, groupId: "group2" },
+ },
+ ];
+
+ const result = getAggregatedAvailability(userAvailability, "ROUND_ROBIN");
+
+ // Should NOT be available when one group has no hosts available
+ const timeRangeNotAvailable = {
+ start: dayjs("2025-01-23T11:00:00.000Z"),
+ end: dayjs("2025-01-23T11:30:00.000Z"),
+ };
+ expect(isAvailable(result, timeRangeNotAvailable)).toBe(false);
+ });
});
diff --git a/packages/lib/getAggregatedAvailability.ts b/packages/lib/getAggregatedAvailability.ts
index 6f3f9fa8bd4..e78f5d19821 100644
--- a/packages/lib/getAggregatedAvailability.ts
+++ b/packages/lib/getAggregatedAvailability.ts
@@ -1,3 +1,4 @@
+import { DEFAULT_GROUP_ID } from "@calcom/lib/constants";
import type { DateRange } from "@calcom/lib/date-ranges";
import { intersect } from "@calcom/lib/date-ranges";
import { SchedulingType } from "@calcom/prisma/enums";
@@ -25,7 +26,7 @@ export const getAggregatedAvailability = (
userAvailability: {
dateRanges: DateRange[];
oooExcludedDateRanges: DateRange[];
- user?: { isFixed?: boolean };
+ user?: { isFixed?: boolean; groupId?: string | null };
}[],
schedulingType: SchedulingType | null
): DateRange[] => {
@@ -44,10 +45,27 @@ export const getAggregatedAvailability = (
const dateRangesToIntersect = !!fixedDateRanges.length ? [fixedDateRanges] : [];
const roundRobinHosts = userAvailability.filter(({ user }) => user?.isFixed !== true);
if (roundRobinHosts.length) {
- dateRangesToIntersect.push(
- roundRobinHosts.flatMap((s) => (!isTeamEvent ? s.dateRanges : s.oooExcludedDateRanges))
- );
+ // Group round robin hosts by their groupId
+ const hostsByGroup = roundRobinHosts.reduce((groups, host) => {
+ const groupId = host.user?.groupId || DEFAULT_GROUP_ID;
+ if (!groups[groupId]) {
+ groups[groupId] = [];
+ }
+ groups[groupId].push(host);
+ return groups;
+ }, {} as Record<string, typeof roundRobinHosts>);
+
+ // at least one host from each group needs to be available
+ Object.values(hostsByGroup).forEach((groupHosts) => {
+ if (groupHosts.length > 0) {
+ const groupDateRanges = groupHosts.flatMap((s) =>
+ !isTeamEvent ? s.dateRanges : s.oooExcludedDateRanges
+ );
+ dateRangesToIntersect.push(groupDateRanges ?? []);
+ }
+ });
}
+
const availability = intersect(dateRangesToIntersect);
const uniqueRanges = uniqueAndSortedDateRanges(availability);
diff --git a/packages/lib/server/repository/eventTypeRepository.ts b/packages/lib/server/repository/eventTypeRepository.ts
index 2c580502928..25611493c24 100644
--- a/packages/lib/server/repository/eventTypeRepository.ts
+++ b/packages/lib/server/repository/eventTypeRepository.ts
@@ -606,6 +606,12 @@ export class EventTypeRepository {
},
},
teamId: true,
+ hostGroups: {
+ select: {
+ id: true,
+ name: true,
+ },
+ },
team: {
select: {
id: true,
@@ -672,6 +678,7 @@ export class EventTypeRepository {
priority: true,
weight: true,
scheduleId: true,
+ groupId: true,
user: {
select: {
timeZone: true,
@@ -895,6 +902,12 @@ export class EventTypeRepository {
},
},
teamId: true,
+ hostGroups: {
+ select: {
+ id: true,
+ name: true,
+ },
+ },
team: {
select: {
id: true,
@@ -1197,6 +1210,12 @@ export class EventTypeRepository {
useEventLevelSelectedCalendars: true,
restrictionScheduleId: true,
useBookerTimezone: true,
+ hostGroups: {
+ select: {
+ id: true,
+ name: true,
+ },
+ },
team: {
select: {
id: true,
@@ -1246,6 +1265,7 @@ export class EventTypeRepository {
createdAt: true,
weight: true,
priority: true,
+ groupId: true,
user: {
select: {
credentials: { select: credentialForCalendarServiceSelect },
diff --git a/packages/platform/atoms/event-types/hooks/useEventTypeForm.ts b/packages/platform/atoms/event-types/hooks/useEventTypeForm.ts
index 0bca6f53f74..3134d221c1c 100644
--- a/packages/platform/atoms/event-types/hooks/useEventTypeForm.ts
+++ b/packages/platform/atoms/event-types/hooks/useEventTypeForm.ts
@@ -101,6 +101,7 @@ export const useEventTypeForm = ({
hideOrganizerEmail: eventType.hideOrganizerEmail,
metadata: eventType.metadata,
hosts: eventType.hosts.sort((a, b) => sortHosts(a, b, eventType.isRRWeightsEnabled)),
+ hostGroups: eventType.hostGroups || [],
successRedirectUrl: eventType.successRedirectUrl || "",
forwardParamsSuccessRedirect: eventType.forwardParamsSuccessRedirect,
users: eventType.users,
diff --git a/packages/platform/atoms/event-types/wrappers/EventTypeWebWrapper.tsx b/packages/platform/atoms/event-types/wrappers/EventTypeWebWrapper.tsx
index b59d876e519..bc97a502825 100644
--- a/packages/platform/atoms/event-types/wrappers/EventTypeWebWrapper.tsx
+++ b/packages/platform/atoms/event-types/wrappers/EventTypeWebWrapper.tsx
@@ -108,7 +108,12 @@ export const EventTypeWebWrapper = ({ id, data: serverFetchedData }: EventTypeWe
return <EventTypeWeb {...eventTypeQueryData} id={id} />;
};
-const EventTypeWeb = ({ id, ...rest }: EventTypeSetupProps & { id: number }) => {
+const EventTypeWeb = ({
+ id,
+ ...rest
+}: EventTypeSetupProps & {
+ id: number;
+}) => {
const { t } = useLocale();
const utils = trpc.useUtils();
const pathname = usePathname();
diff --git a/packages/prisma/migrations/20250704081718_add_host_groups/migration.sql b/packages/prisma/migrations/20250704081718_add_host_groups/migration.sql
new file mode 100644
index 00000000000..2ca7d8fd059
--- /dev/null
+++ b/packages/prisma/migrations/20250704081718_add_host_groups/migration.sql
@@ -0,0 +1,25 @@
+-- AlterTable
+ALTER TABLE "Host" ADD COLUMN "groupId" TEXT;
+
+-- CreateTable
+CREATE TABLE "HostGroup" (
+ "id" TEXT NOT NULL,
+ "name" TEXT NOT NULL,
+ "eventTypeId" INTEGER,
+ "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
+ "updatedAt" TIMESTAMP(3) NOT NULL,
+
+ CONSTRAINT "HostGroup_pkey" PRIMARY KEY ("id")
+);
+
+-- CreateIndex
+CREATE INDEX "HostGroup_name_idx" ON "HostGroup"("name");
+
+-- CreateIndex
+CREATE INDEX "HostGroup_eventTypeId_idx" ON "HostGroup"("eventTypeId");
+
+-- AddForeignKey
+ALTER TABLE "Host" ADD CONSTRAINT "Host_groupId_fkey" FOREIGN KEY ("groupId") REFERENCES "HostGroup"("id") ON DELETE SET NULL ON UPDATE CASCADE;
+
+-- AddForeignKey
+ALTER TABLE "HostGroup" ADD CONSTRAINT "HostGroup_eventTypeId_fkey" FOREIGN KEY ("eventTypeId") REFERENCES "EventType"("id") ON DELETE CASCADE ON UPDATE CASCADE;
diff --git a/packages/prisma/schema.prisma b/packages/prisma/schema.prisma
index 14c2e73086f..a41165ed33a 100644
--- a/packages/prisma/schema.prisma
+++ b/packages/prisma/schema.prisma
@@ -49,18 +49,20 @@ enum CreationSource {
}
model Host {
- user User @relation(fields: [userId], references: [id], onDelete: Cascade)
+ user User @relation(fields: [userId], references: [id], onDelete: Cascade)
userId Int
- eventType EventType @relation(fields: [eventTypeId], references: [id], onDelete: Cascade)
+ eventType EventType @relation(fields: [eventTypeId], references: [id], onDelete: Cascade)
eventTypeId Int
- isFixed Boolean @default(false)
+ isFixed Boolean @default(false)
priority Int?
weight Int?
// weightAdjustment is deprecated. We not calculate the calibratino value on the spot. Plan to drop this column.
weightAdjustment Int?
- schedule Schedule? @relation(fields: [scheduleId], references: [id])
+ schedule Schedule? @relation(fields: [scheduleId], references: [id])
scheduleId Int?
- createdAt DateTime @default(now())
+ createdAt DateTime @default(now())
+ group HostGroup? @relation(fields: [groupId], references: [id])
+ groupId String?
@@id([userId, eventTypeId])
@@index([userId])
@@ -68,6 +70,19 @@ model Host {
@@index([scheduleId])
}
+model HostGroup {
+ id String @id @default(uuid())
+ name String
+ hosts Host[]
+ eventType EventType? @relation(fields: [eventTypeId], references: [id], onDelete: Cascade)
+ eventTypeId Int?
+ createdAt DateTime @default(now())
+ updatedAt DateTime @updatedAt
+
+ @@index([name])
+ @@index([eventTypeId])
+}
+
model CalVideoSettings {
eventTypeId Int @id
eventType EventType @relation(fields: [eventTypeId], references: [id], onDelete: Cascade)
@@ -99,9 +114,10 @@ model EventType {
offsetStart Int @default(0)
hidden Boolean @default(false)
hosts Host[]
- users User[] @relation("user_eventtype")
- owner User? @relation("owner", fields: [userId], references: [id], onDelete: Cascade)
- userId Int?
+
+ users User[] @relation("user_eventtype")
+ owner User? @relation("owner", fields: [userId], references: [id], onDelete: Cascade)
+ userId Int?
profileId Int?
profile Profile? @relation(fields: [profileId], references: [id])
@@ -204,9 +220,10 @@ model EventType {
secondaryEmailId Int?
secondaryEmail SecondaryEmail? @relation(fields: [secondaryEmailId], references: [id], onDelete: Cascade)
- useBookerTimezone Boolean @default(false)
+ useBookerTimezone Boolean @default(false)
restrictionScheduleId Int?
- restrictionSchedule Schedule? @relation("restrictionSchedule", fields: [restrictionScheduleId], references: [id])
+ restrictionSchedule Schedule? @relation("restrictionSchedule", fields: [restrictionScheduleId], references: [id])
+ hostGroups HostGroup[]
@@unique([userId, slug])
@@unique([teamId, slug])
diff --git a/packages/trpc/server/routers/viewer/bookings/get.handler.ts b/packages/trpc/server/routers/viewer/bookings/get.handler.ts
index 2a08b5e4e70..56e96e9aa65 100644
--- a/packages/trpc/server/routers/viewer/bookings/get.handler.ts
+++ b/packages/trpc/server/routers/viewer/bookings/get.handler.ts
@@ -524,6 +524,12 @@ export async function getBookings({
.select(["Team.id", "Team.name", "Team.slug"])
.whereRef("EventType.teamId", "=", "Team.id")
).as("team"),
+ jsonArrayFrom(
+ eb
+ .selectFrom("HostGroup")
+ .select(["HostGroup.id", "HostGroup.name"])
+ .whereRef("HostGroup.eventTypeId", "=", "EventType.id")
+ ).as("hostGroups"),
])
.whereRef("EventType.id", "=", "Booking.eventTypeId")
).as("eventType"),
diff --git a/packages/trpc/server/routers/viewer/eventTypes/types.ts b/packages/trpc/server/routers/viewer/eventTypes/types.ts
index c0cdedec03c..3e11a20a5c7 100644
--- a/packages/trpc/server/routers/viewer/eventTypes/types.ts
+++ b/packages/trpc/server/routers/viewer/eventTypes/types.ts
@@ -54,6 +54,12 @@ const hostSchema = z.object({
priority: z.number().min(0).max(4).optional().nullable(),
weight: z.number().min(0).optional().nullable(),
scheduleId: z.number().optional().nullable(),
+ groupId: z.string().optional().nullable(),
+});
+
+const hostGroupSchema = z.object({
+ id: z.string().uuid(),
+ name: z.string(),
});
const childSchema = z.object({
@@ -96,6 +102,7 @@ const BaseEventTypeUpdateInput = _EventTypeModel
rrSegmentQueryValue: rrSegmentQueryValueSchema.optional(),
useEventLevelSelectedCalendars: z.boolean().optional(),
seatsPerTimeSlot: z.number().min(1).max(MAX_SEATS_PER_TIME_SLOT).nullable().optional(),
+ hostGroups: z.array(hostGroupSchema).optional(),
})
.partial()
.extend(_EventTypeModel.pick({ id: true }).shape);
diff --git a/packages/trpc/server/routers/viewer/eventTypes/update.handler.ts b/packages/trpc/server/routers/viewer/eventTypes/update.handler.ts
index 260a830cd28..b4d5bb86502 100644
--- a/packages/trpc/server/routers/viewer/eventTypes/update.handler.ts
+++ b/packages/trpc/server/routers/viewer/eventTypes/update.handler.ts
@@ -94,6 +94,7 @@ export const updateHandler = async ({ ctx, input }: UpdateOptions) => {
seatsPerTimeSlot,
restrictionScheduleId,
calVideoSettings,
+ hostGroups,
...rest
} = input;
@@ -149,6 +150,12 @@ export const updateHandler = async ({ ctx, input }: UpdateOptions) => {
workflowId: true,
},
},
+ hostGroups: {
+ select: {
+ id: true,
+ name: true,
+ },
+ },
team: {
select: {
id: true,
@@ -210,6 +217,12 @@ export const updateHandler = async ({ ctx, input }: UpdateOptions) => {
);
}
+ const isLoadBalancingDisabled = !!(
+ (eventType.team?.rrTimestampBasis && eventType.team?.rrTimestampBasis !== RRTimestampBasis.CREATED_AT) ||
+ (hostGroups && hostGroups.length > 1) ||
+ (!hostGroups && eventType.hostGroups && eventType.hostGroups.length > 1)
+ );
+
const data: Prisma.EventTypeUpdateInput = {
...rest,
// autoTranslate feature is allowed for org users only
@@ -224,10 +237,7 @@ export const updateHandler = async ({ ctx, input }: UpdateOptions) => {
eventTypeColor: eventTypeColor === null ? Prisma.DbNull : (eventTypeColor as Prisma.InputJsonObject),
disableGuests: guestsField?.hidden ?? false,
seatsPerTimeSlot,
- maxLeadThreshold:
- eventType.team?.rrTimestampBasis && eventType.team?.rrTimestampBasis !== RRTimestampBasis.CREATED_AT
- ? null
- : rest.maxLeadThreshold,
+ maxLeadThreshold: isLoadBalancingDisabled ? null : rest.maxLeadThreshold,
};
data.locations = locations ?? undefined;
@@ -393,6 +403,48 @@ export const updateHandler = async ({ ctx, input }: UpdateOptions) => {
};
}
+ // Handle hostGroups updates
+ if (hostGroups !== undefined) {
+ const existingHostGroups = await ctx.prisma.hostGroup.findMany({
+ where: {
+ eventTypeId: id,
+ },
+ select: {
+ id: true,
+ name: true,
+ },
+ });
+
+ await Promise.all(
+ hostGroups.map(async (group) => {
+ await ctx.prisma.hostGroup.upsert({
+ where: { id: group.id },
+ update: { name: group.name },
+ create: {
+ id: group.id,
+ name: group.name,
+ eventTypeId: id,
+ },
+ });
+ })
+ );
+
+ const newGroupsMap = new Map(hostGroups.map((group) => [group.id, group]));
+
+ // Delete groups that are no longer in the new list
+ const groupsToDelete = existingHostGroups.filter((existingGroup) => !newGroupsMap.has(existingGroup.id));
+
+ if (groupsToDelete.length > 0) {
+ await ctx.prisma.hostGroup.deleteMany({
+ where: {
+ id: {
+ in: groupsToDelete.map((group) => group.id),
+ },
+ },
+ });
+ }
+ }
+
if (teamId && hosts) {
// check if all hosts can be assigned (memberships that have accepted invite)
const teamMemberIds = await membershipRepo.listAcceptedTeamMemberIds({ teamId });
@@ -405,10 +457,6 @@ export const updateHandler = async ({ ctx, input }: UpdateOptions) => {
});
}
- // weights were already enabled or are enabled now
- const isWeightsEnabled =
- isRRWeightsEnabled || (typeof isRRWeightsEnabled === "undefined" && eventType.isRRWeightsEnabled);
-
const oldHostsSet = new Set(eventType.hosts.map((oldHost) => oldHost.userId));
const newHostsSet = new Set(hosts.map((oldHost) => oldHost.userId));
@@ -429,6 +477,7 @@ export const updateHandler = async ({ ctx, input }: UpdateOptions) => {
isFixed: data.schedulingType === SchedulingType.COLLECTIVE || host.isFixed,
priority: host.priority ?? 2,
weight: host.weight ?? 100,
+ groupId: host.groupId,
};
}),
update: existingHosts.map((host) => ({
@@ -443,6 +492,7 @@ export const updateHandler = async ({ ctx, input }: UpdateOptions) => {
priority: host.priority ?? 2,
weight: host.weight ?? 100,
scheduleId: host.scheduleId ?? null,
+ groupId: host.groupId,
},
})),
};
@@ -641,6 +691,18 @@ export const updateHandler = async ({ ctx, input }: UpdateOptions) => {
updatedValues,
});
+ // Clean up empty host groups
+ if (hostGroups !== undefined || hosts) {
+ await ctx.prisma.hostGroup.deleteMany({
+ where: {
+ eventTypeId: id,
+ hosts: {
+ none: {},
+ },
+ },
+ });
+ }
+
const res = ctx.res as NextApiResponse;
if (typeof res?.revalidate !== "undefined") {
try {
diff --git a/packages/trpc/server/routers/viewer/eventTypes/util.ts b/packages/trpc/server/routers/viewer/eventTypes/util.ts
index 72debf66090..5f32253a33d 100644
--- a/packages/trpc/server/routers/viewer/eventTypes/util.ts
+++ b/packages/trpc/server/routers/viewer/eventTypes/util.ts
@@ -190,6 +190,7 @@ type Host = {
priority?: number | null | undefined;
weight?: number | null | undefined;
scheduleId?: number | null | undefined;
+ groupId: string | null;
};
type User = {
diff --git a/packages/trpc/server/routers/viewer/slots/util.ts b/packages/trpc/server/routers/viewer/slots/util.ts
index 2c260668e81..5fb155c03b8 100644
--- a/packages/trpc/server/routers/viewer/slots/util.ts
+++ b/packages/trpc/server/routers/viewer/slots/util.ts
@@ -709,10 +709,11 @@ export class AvailableSlotsService {
}: {
hosts: {
isFixed?: boolean;
+ groupId?: string | null;
user: GetAvailabilityUserWithDelegationCredentials;
}[];
}) {
- return hosts.map(({ isFixed, user }) => ({ isFixed, ...user }));
+ return hosts.map(({ isFixed, groupId, user }) => ({ isFixed, groupId, ...user }));
}
private getUsersWithCredentials = withReporting(
@@ -743,6 +744,7 @@ export class AvailableSlotsService {
>;
hosts: {
isFixed?: boolean;
+ groupId?: string | null;
user: GetAvailabilityUserWithDelegationCredentials;
}[];
loggerWithEventDetails: Logger<unknown>;
diff --git a/packages/trpc/server/routers/viewer/teams/hasTeamPlan.handler.ts b/packages/trpc/server/routers/viewer/teams/hasTeamPlan.handler.ts
index 161fd0e2a8c..29b1421a619 100644
--- a/packages/trpc/server/routers/viewer/teams/hasTeamPlan.handler.ts
+++ b/packages/trpc/server/routers/viewer/teams/hasTeamPlan.handler.ts
@@ -1,5 +1,4 @@
import { MembershipRepository } from "@calcom/lib/server/repository/membership";
-import type { TrpcSessionUser } from "@calcom/trpc/server/types";
type HasTeamPlanOptions = {
ctx: {