Skip to content

Scheduling infrastructure for absolutely everyone.

feat: add host validation for team event types (#24170)

chauhan_sa3fbe3731ecb
diff --git a/packages/platform/types/event-types/event-types_2024_06_14/inputs/create-event-type.input.ts b/packages/platform/types/event-types/event-types_2024_06_14/inputs/create-event-type.input.ts
index 860bb6920e1..e81eb1c9487 100644
--- a/packages/platform/types/event-types/event-types_2024_06_14/inputs/create-event-type.input.ts
+++ b/packages/platform/types/event-types/event-types_2024_06_14/inputs/create-event-type.input.ts
@@ -19,6 +19,7 @@ import {
ArrayUnique,
} from "class-validator";
+
import { SchedulingType } from "@calcom/platform-enums";
import { BookerLayouts_2024_06_14 } from "./booker-layouts.input";
@@ -560,14 +561,14 @@ export class CreateTeamEventTypeInput_2024_06_14 extends BaseCreateEventTypeInpu
@DocsPropertyOptional({
type: [Host],
description:
- "Hosts contain specific team members you want to assign to this event type, but if you want to assign all team members, use `assignAllTeamMembers: true` instead and omit this field. For platform customers the hosts can include userIds only of managed users.",
+ "Hosts contain specific team members you want to assign to this event type, but if you want to assign all team members, use `assignAllTeamMembers: true` instead and omit this field. For platform customers the hosts can include userIds only of managed users. Provide either hosts or assignAllTeamMembers but not both",
})
hosts?: Host[];
@IsBoolean()
@IsOptional()
@DocsPropertyOptional({
- description: "If true, all current and future team members will be assigned to this event type",
+ description: "If true, all current and future team members will be assigned to this event type. Provide either assignAllTeamMembers or hosts but not both",
})
assignAllTeamMembers?: boolean;
diff --git a/packages/platform/types/event-types/event-types_2024_06_14/inputs/update-event-type.input.ts b/packages/platform/types/event-types/event-types_2024_06_14/inputs/update-event-type.input.ts
index 62c0cb4a8bc..8f69ea17178 100644
--- a/packages/platform/types/event-types/event-types_2024_06_14/inputs/update-event-type.input.ts
+++ b/packages/platform/types/event-types/event-types_2024_06_14/inputs/update-event-type.input.ts
@@ -455,14 +455,16 @@ export class UpdateTeamEventTypeInput_2024_06_14 extends BaseUpdateEventTypeInpu
@Type(() => Host)
@IsArray()
@IsOptional()
- @DocsPropertyOptional({ type: [Host] })
+ @DocsPropertyOptional({ type: [Host],
+ description:
+ "Hosts contain specific team members you want to assign to this event type, but if you want to assign all team members, use `assignAllTeamMembers: true` instead and omit this field. For platform customers the hosts can include userIds only of managed users. Provide either hosts or assignAllTeamMembers but not both",
+ })
hosts?: Host[];
@IsOptional()
@IsBoolean()
- @DocsProperty()
@DocsPropertyOptional({
- description: "If true, all current and future team members will be assigned to this event type",
+ description: "If true, all current and future team members will be assigned to this event type. Provide either assignAllTeamMembers or hosts but not both",
})
assignAllTeamMembers?: boolean;