Skip to content

Scheduling infrastructure for absolutely everyone.

Revert "chore: rename DWD to DelegationCredential (#19703)" (#19734)

Morgan340b5ab06127
diff --git a/apps/api/v1/pages/api/destination-calendars/[id]/_patch.ts b/apps/api/v1/pages/api/destination-calendars/[id]/_patch.ts
index 63b63f48cd5..c23d8b151be 100644
--- a/apps/api/v1/pages/api/destination-calendars/[id]/_patch.ts
+++ b/apps/api/v1/pages/api/destination-calendars/[id]/_patch.ts
@@ -2,7 +2,7 @@ import type { Prisma } from "@prisma/client";
import type { NextApiRequest } from "next";
import type { z } from "zod";
-import { getCalendarCredentialsWithoutDelegation, getConnectedCalendars } from "@calcom/lib/CalendarManager";
+import { getCalendarCredentialsWithoutDwd, getConnectedCalendars } from "@calcom/lib/CalendarManager";
import { HttpError } from "@calcom/lib/http-error";
import { defaultResponder } from "@calcom/lib/server/defaultResponder";
import prisma from "@calcom/prisma";
@@ -185,7 +185,7 @@ async function verifyCredentialsAndGetId({
currentCredentialId: number | null;
}) {
if (parsedBody.integration && parsedBody.externalId) {
- const calendarCredentials = getCalendarCredentialsWithoutDelegation(userCredentials);
+ const calendarCredentials = getCalendarCredentialsWithoutDwd(userCredentials);
const { connectedCalendars } = await getConnectedCalendars(
calendarCredentials,
diff --git a/apps/api/v1/pages/api/destination-calendars/_post.ts b/apps/api/v1/pages/api/destination-calendars/_post.ts
index 2962224a7f5..06a133c4bc0 100644
--- a/apps/api/v1/pages/api/destination-calendars/_post.ts
+++ b/apps/api/v1/pages/api/destination-calendars/_post.ts
@@ -1,6 +1,6 @@
import type { NextApiRequest } from "next";
-import { getCalendarCredentialsWithoutDelegation, getConnectedCalendars } from "@calcom/lib/CalendarManager";
+import { getCalendarCredentialsWithoutDwd, getConnectedCalendars } from "@calcom/lib/CalendarManager";
import { HttpError } from "@calcom/lib/http-error";
import { defaultResponder } from "@calcom/lib/server/defaultResponder";
import prisma from "@calcom/prisma";
@@ -82,7 +82,7 @@ async function postHandler(req: NextApiRequest) {
message: "Bad request, credential id invalid",
});
- const calendarCredentials = getCalendarCredentialsWithoutDelegation(userCredentials);
+ const calendarCredentials = getCalendarCredentialsWithoutDwd(userCredentials);
const { connectedCalendars } = await getConnectedCalendars(calendarCredentials, [], parsedBody.externalId);
diff --git a/apps/api/v1/test/lib/selected-calendars/_post.test.ts b/apps/api/v1/test/lib/selected-calendars/_post.test.ts
index 28932ade522..8975e254896 100644
--- a/apps/api/v1/test/lib/selected-calendars/_post.test.ts
+++ b/apps/api/v1/test/lib/selected-calendars/_post.test.ts
@@ -81,7 +81,7 @@ describe("POST /api/selected-calendars", () => {
userId: 444444,
id: "xxx-xxx",
eventTypeId: null,
- delegationCredentialId: null,
+ domainWideDelegationCredentialId: null,
googleChannelId: null,
googleChannelKind: null,
googleChannelResourceId: null,
@@ -123,7 +123,7 @@ describe("POST /api/selected-calendars", () => {
googleChannelResourceId: null,
googleChannelResourceUri: null,
googleChannelExpiration: null,
- delegationCredentialId: null,
+ domainWideDelegationCredentialId: null,
eventTypeId: null,
error: null,
});
diff --git a/apps/api/v2/package.json b/apps/api/v2/package.json
index f4956799ccc..1a22fe43717 100644
--- a/apps/api/v2/package.json
+++ b/apps/api/v2/package.json
@@ -30,7 +30,7 @@
"@axiomhq/winston": "^1.2.0",
"@calcom/platform-constants": "*",
"@calcom/platform-enums": "*",
- "@calcom/platform-libraries": "npm:@calcom/[email protected]",
+ "@calcom/platform-libraries": "npm:@calcom/[email protected]",
"@calcom/platform-libraries-0.0.2": "npm:@calcom/[email protected]",
"@calcom/platform-types": "*",
"@calcom/platform-utils": "*",
diff --git a/apps/api/v2/src/ee/calendars/outputs/connected-calendars.output.ts b/apps/api/v2/src/ee/calendars/outputs/connected-calendars.output.ts
index 30b291ce9d9..d87cb59a2e0 100644
--- a/apps/api/v2/src/ee/calendars/outputs/connected-calendars.output.ts
+++ b/apps/api/v2/src/ee/calendars/outputs/connected-calendars.output.ts
@@ -131,7 +131,7 @@ class Primary {
@IsString()
@IsOptional()
@ApiPropertyOptional({ type: String, nullable: true })
- delegationCredentialId?: string | null;
+ domainWideDelegationCredentialId?: string | null;
}
export class Calendar {
@@ -174,7 +174,7 @@ export class Calendar {
@IsString()
@IsOptional()
@ApiPropertyOptional({ type: String, nullable: true })
- delegationCredentialId?: string | null;
+ domainWideDelegationCredentialId?: string | null;
}
export class ConnectedCalendar {
@@ -190,7 +190,7 @@ export class ConnectedCalendar {
@IsString()
@IsOptional()
@ApiPropertyOptional({ type: String, nullable: true })
- delegationCredentialId?: string | null;
+ domainWideDelegationCredentialId?: string | null;
@ValidateNested()
@IsObject()
@@ -238,7 +238,7 @@ class DestinationCalendar {
@IsString()
@IsOptional()
@ApiPropertyOptional({ type: String, nullable: true })
- delegationCredentialId?: string | null;
+ domainWideDelegationCredentialId?: string | null;
@IsString()
@IsOptional()
diff --git a/apps/api/v2/src/ee/calendars/services/calendars.service.ts b/apps/api/v2/src/ee/calendars/services/calendars.service.ts
index c338754ef9d..ef07970547f 100644
--- a/apps/api/v2/src/ee/calendars/services/calendars.service.ts
+++ b/apps/api/v2/src/ee/calendars/services/calendars.service.ts
@@ -39,7 +39,7 @@ export class CalendarsService {
private readonly selectedCalendarsRepository: SelectedCalendarsRepository
) {}
- private buildNonDelegationCredentials<TCredential>(credentials: TCredential[]) {
+ private buildNonDwdCredentials<TCredential>(credentials: TCredential[]) {
return credentials
.map((credential) => ({
...credential,
@@ -83,7 +83,7 @@ export class CalendarsService {
);
try {
const calendarBusyTimes = await getBusyCalendarTimes(
- this.buildNonDelegationCredentials(credentials),
+ this.buildNonDwdCredentials(credentials),
dateFrom,
dateTo,
composedSelectedCalendars
diff --git a/apps/api/v2/src/modules/atoms/services/event-types-atom.service.ts b/apps/api/v2/src/modules/atoms/services/event-types-atom.service.ts
index 4665b5c5121..d057c405140 100644
--- a/apps/api/v2/src/modules/atoms/services/event-types-atom.service.ts
+++ b/apps/api/v2/src/modules/atoms/services/event-types-atom.service.ts
@@ -211,7 +211,7 @@ export class EventTypesAtomService {
credentials = credentials.concat(teamAppCredentials);
}
}
- //TODO: enrich credentials for DelegationCredential
+ //TODO: enrich credentials for DWD
const enabledApps = await getEnabledAppsFromCredentials(credentials, {
where: { slug },
});
diff --git a/apps/api/v2/src/modules/destination-calendars/controllers/destination-calendars.controller.ts b/apps/api/v2/src/modules/destination-calendars/controllers/destination-calendars.controller.ts
index 8241f1b867b..6fad47ba4ef 100644
--- a/apps/api/v2/src/modules/destination-calendars/controllers/destination-calendars.controller.ts
+++ b/apps/api/v2/src/modules/destination-calendars/controllers/destination-calendars.controller.ts
@@ -29,12 +29,12 @@ export class DestinationCalendarsController {
@Body() input: DestinationCalendarsInputBodyDto,
@GetUser() user: UserWithProfile
): Promise<DestinationCalendarsOutputResponseDto> {
- const { integration, externalId, delegationCredentialId } = input;
+ const { integration, externalId, domainWideDelegationCredentialId } = input;
const updatedDestinationCalendar = await this.destinationCalendarsService.updateDestinationCalendars(
integration,
externalId,
user.id,
- delegationCredentialId
+ domainWideDelegationCredentialId
);
return {
diff --git a/apps/api/v2/src/modules/destination-calendars/destination-calendars.repository.ts b/apps/api/v2/src/modules/destination-calendars/destination-calendars.repository.ts
index 5d8684f86dc..a95165204c5 100644
--- a/apps/api/v2/src/modules/destination-calendars/destination-calendars.repository.ts
+++ b/apps/api/v2/src/modules/destination-calendars/destination-calendars.repository.ts
@@ -12,21 +12,21 @@ export class DestinationCalendarsRepository {
userId: number,
primaryEmail: string | null,
credentialId?: number,
- delegationCredentialId?: string
+ domainWideDelegationCredentialId?: string
) {
return await this.dbWrite.prisma.destinationCalendar.upsert({
update: {
integration,
externalId,
...(credentialId ? { credentialId } : {}),
- ...(delegationCredentialId ? { delegationCredentialId } : {}),
+ ...(domainWideDelegationCredentialId ? { domainWideDelegationCredentialId } : {}),
primaryEmail,
},
create: {
integration,
externalId,
...(credentialId ? { credentialId } : {}),
- ...(delegationCredentialId ? { delegationCredentialId } : {}),
+ ...(domainWideDelegationCredentialId ? { domainWideDelegationCredentialId } : {}),
primaryEmail,
userId,
},
diff --git a/apps/api/v2/src/modules/destination-calendars/inputs/destination-calendars.input.ts b/apps/api/v2/src/modules/destination-calendars/inputs/destination-calendars.input.ts
index dc584c4ad8a..cf6d566eb20 100644
--- a/apps/api/v2/src/modules/destination-calendars/inputs/destination-calendars.input.ts
+++ b/apps/api/v2/src/modules/destination-calendars/inputs/destination-calendars.input.ts
@@ -37,5 +37,5 @@ export class DestinationCalendarsInputBodyDto {
@IsString()
@IsOptional()
@ApiPropertyOptional()
- readonly delegationCredentialId?: string;
+ readonly domainWideDelegationCredentialId?: string;
}
diff --git a/apps/api/v2/src/modules/destination-calendars/services/destination-calendars.service.ts b/apps/api/v2/src/modules/destination-calendars/services/destination-calendars.service.ts
index 130455b84c1..a67bde21625 100644
--- a/apps/api/v2/src/modules/destination-calendars/services/destination-calendars.service.ts
+++ b/apps/api/v2/src/modules/destination-calendars/services/destination-calendars.service.ts
@@ -14,10 +14,10 @@ export class DestinationCalendarsService {
integration: string,
externalId: string,
userId: number,
- delegationCredentialId?: string
+ domainWideDelegationCredentialId?: string
) {
- // note(Lauris): todo remove the log but leaving this now to confirm delegationCredentialId is received
- console.log("debug: delegationCredentialId", delegationCredentialId);
+ // note(Lauris): todo remove the log but leaving this now to confirm domainWideDelegationCredentialId is received
+ console.log("debug: domainWideDelegationCredentialId", domainWideDelegationCredentialId);
const userCalendars = await this.calendarsService.getCalendars(userId);
const allCalendars: Calendar[] = userCalendars.connectedCalendars
.map((cal: ConnectedCalendar) => cal.calendars ?? [])
@@ -27,25 +27,25 @@ export class DestinationCalendarsService {
cal.externalId === externalId && cal.integration === integration && cal.readOnly === false
)?.credentialId;
- if (!delegationCredentialId && !credentialId) {
+ if (!domainWideDelegationCredentialId && !credentialId) {
throw new NotFoundException(`Could not find calendar ${externalId}`);
}
- const delegatedCalendar = delegationCredentialId
+ const dwdCalendar = domainWideDelegationCredentialId
? allCalendars.find(
(cal: Calendar) =>
cal.externalId === externalId &&
cal.integration === integration &&
- cal.delegationCredentialId === delegationCredentialId
+ cal.domainWideDelegationCredentialId === domainWideDelegationCredentialId
)
: undefined;
- if (delegationCredentialId && !delegatedCalendar) {
+ if (domainWideDelegationCredentialId && !dwdCalendar) {
throw new NotFoundException(`Could not find calendar ${externalId}`);
}
- const primaryEmail = delegatedCalendar
- ? (delegatedCalendar.primary && delegatedCalendar?.email) || undefined
+ const primaryEmail = dwdCalendar
+ ? (dwdCalendar.primary && dwdCalendar?.email) || undefined
: allCalendars.find((cal: Calendar) => cal.primary && cal.credentialId === credentialId)?.email;
const {
@@ -58,8 +58,8 @@ export class DestinationCalendarsService {
externalId,
userId,
primaryEmail ?? null,
- delegatedCalendar ? undefined : credentialId,
- delegatedCalendar ? delegationCredentialId : undefined
+ dwdCalendar ? undefined : credentialId,
+ dwdCalendar ? domainWideDelegationCredentialId : undefined
);
return {
diff --git a/apps/api/v2/src/modules/organizations/delegation-credentials/organizations-delegation-credential.module.ts b/apps/api/v2/src/modules/organizations/delegation-credentials/organizations-delegation-credential.module.ts
deleted file mode 100644
index a4fe8ebbf96..00000000000
--- a/apps/api/v2/src/modules/organizations/delegation-credentials/organizations-delegation-credential.module.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-import { MembershipsModule } from "@/modules/memberships/memberships.module";
-import { OrganizationsDelegationCredentialController } from "@/modules/organizations/delegation-credentials/organizations-delegation-credential.controller";
-import { OrganizationsDelegationCredentialRepository } from "@/modules/organizations/delegation-credentials/organizations-delegation-credential.repository";
-import { OrganizationsRepository } from "@/modules/organizations/index/organizations.repository";
-import { PrismaModule } from "@/modules/prisma/prisma.module";
-import { RedisModule } from "@/modules/redis/redis.module";
-import { StripeModule } from "@/modules/stripe/stripe.module";
-import { Module } from "@nestjs/common";
-
-import { OrganizationsDelegationCredentialService } from "./services/organizations-delegation-credential.service";
-
-@Module({
- imports: [PrismaModule, StripeModule, RedisModule, MembershipsModule],
- providers: [
- OrganizationsDelegationCredentialService,
- OrganizationsDelegationCredentialRepository,
- OrganizationsRepository,
- ],
- controllers: [OrganizationsDelegationCredentialController],
-})
-export class OrganizationsDelegationCredentialModule {}
diff --git a/apps/api/v2/src/modules/organizations/delegation-credentials/organizations-delegation-credential.repository.ts b/apps/api/v2/src/modules/organizations/delegation-credentials/organizations-delegation-credential.repository.ts
deleted file mode 100644
index a5b3b447a32..00000000000
--- a/apps/api/v2/src/modules/organizations/delegation-credentials/organizations-delegation-credential.repository.ts
+++ /dev/null
@@ -1,31 +0,0 @@
-import { PrismaReadService } from "@/modules/prisma/prisma-read.service";
-import { Injectable } from "@nestjs/common";
-
-import { Prisma } from "@calcom/prisma/client";
-
-@Injectable()
-export class OrganizationsDelegationCredentialRepository {
- constructor(private readonly dbRead: PrismaReadService) {}
-
- async findById(delegationCredentialId: string) {
- return this.dbRead.prisma.delegationCredential.findUnique({ where: { id: delegationCredentialId } });
- }
-
- async findByIdWithWorkspacePlatform(delegationCredentialId: string) {
- return this.dbRead.prisma.delegationCredential.findUnique({
- where: { id: delegationCredentialId },
- include: { workspacePlatform: true },
- });
- }
-
- async updateIncludeWorkspacePlatform(
- delegationCredentialId: string,
- data: Prisma.DelegationCredentialUncheckedUpdateInput
- ) {
- return this.dbRead.prisma.delegationCredential.update({
- where: { id: delegationCredentialId },
- data,
- include: { workspacePlatform: true },
- });
- }
-}
diff --git a/apps/api/v2/src/modules/organizations/delegation-credentials/services/organizations-delegation-credential.service.ts b/apps/api/v2/src/modules/organizations/delegation-credentials/services/organizations-delegation-credential.service.ts
deleted file mode 100644
index 62376ab4d6b..00000000000
--- a/apps/api/v2/src/modules/organizations/delegation-credentials/services/organizations-delegation-credential.service.ts
+++ /dev/null
@@ -1,93 +0,0 @@
-import { CreateDelegationCredentialInput } from "@/modules/organizations/delegation-credentials/inputs/create-delegation-credential.input";
-import {
- GoogleServiceAccountKeyInput,
- MicrosoftServiceAccountKeyInput,
-} from "@/modules/organizations/delegation-credentials/inputs/service-account-key.input";
-import { UpdateDelegationCredentialInput } from "@/modules/organizations/delegation-credentials/inputs/update-delegation-credential.input";
-import { OrganizationsDelegationCredentialRepository } from "@/modules/organizations/delegation-credentials/organizations-delegation-credential.repository";
-import { DelegationCredentialOutput } from "@/modules/organizations/delegation-credentials/outputs/delegation-credential.output";
-import { Injectable, NotFoundException } from "@nestjs/common";
-import { User } from "@prisma/client";
-
-import {
- addDelegationCredential,
- toggleDelegationCredentialEnabled,
- encryptServiceAccountKey,
-} from "@calcom/platform-libraries";
-
-@Injectable()
-export class OrganizationsDelegationCredentialService {
- constructor(
- private readonly organizationsDelegationCredentialRepository: OrganizationsDelegationCredentialRepository
- ) {}
- async createDelegationCredential(
- orgId: number,
- delegatedServiceAccountUser: User,
- body: CreateDelegationCredentialInput
- ) {
- const delegationCredential = await addDelegationCredential({
- input: body,
- ctx: { user: { id: delegatedServiceAccountUser.id, organizationId: orgId } },
- });
- return delegationCredential;
- }
-
- async updateDelegationCredential(
- orgId: number,
- delegationCredentialId: string,
- delegatedServiceAccountUser: User,
- body: UpdateDelegationCredentialInput
- ) {
- if (body.enabled !== undefined) {
- await this.updateDelegationCredentialEnabled(
- orgId,
- delegationCredentialId,
- delegatedServiceAccountUser,
- body.enabled
- );
- }
- if (body.serviceAccountKey !== undefined) {
- await this.updateDelegationCredentialServiceAccountKey(delegationCredentialId, body.serviceAccountKey);
- }
- const delegationCredential =
- await this.organizationsDelegationCredentialRepository.findByIdWithWorkspacePlatform(
- delegationCredentialId
- );
- if (!delegationCredential) {
- throw new NotFoundException(`DelegationCredential with id ${delegationCredentialId} not found`);
- }
-
- return delegationCredential;
- }
-
- async updateDelegationCredentialEnabled(
- orgId: number,
- delegationCredentialId: string,
- delegatedServiceAccountUser: User,
- enabled: boolean
- ) {
- const handlerUser = {
- id: delegatedServiceAccountUser.id,
- email: delegatedServiceAccountUser.email,
- organizationId: orgId,
- };
- const handlerBody = { id: delegationCredentialId, enabled };
- const delegationCredential = await toggleDelegationCredentialEnabled(handlerUser, handlerBody);
- return delegationCredential;
- }
-
- async updateDelegationCredentialServiceAccountKey(
- delegationCredentialId: string,
- serviceAccountKey: GoogleServiceAccountKeyInput | MicrosoftServiceAccountKeyInput
- ) {
- const encryptedServiceAccountKey = encryptServiceAccountKey(serviceAccountKey);
- const delegationCredential =
- await this.organizationsDelegationCredentialRepository.updateIncludeWorkspacePlatform(
- delegationCredentialId,
- {
- serviceAccountKey: encryptedServiceAccountKey,
- }
- );
- return delegationCredential;
- }
-}
diff --git a/apps/api/v2/src/modules/organizations/delegation-credentials/inputs/create-delegation-credential.input.ts b/apps/api/v2/src/modules/organizations/dwd/inputs/create-dwd.input.ts
similarity index 86%
rename from apps/api/v2/src/modules/organizations/delegation-credentials/inputs/create-delegation-credential.input.ts
rename to apps/api/v2/src/modules/organizations/dwd/inputs/create-dwd.input.ts
index 939c7973cb8..81c2f078b05 100644
--- a/apps/api/v2/src/modules/organizations/delegation-credentials/inputs/create-delegation-credential.input.ts
+++ b/apps/api/v2/src/modules/organizations/dwd/inputs/create-dwd.input.ts
@@ -2,12 +2,12 @@ import {
GoogleServiceAccountKeyInput,
ServiceAccountKeyValidator,
MicrosoftServiceAccountKeyInput,
-} from "@/modules/organizations/delegation-credentials/inputs/service-account-key.input";
+} from "@/modules/organizations/dwd/inputs/service-account-key.input";
import { ApiProperty, getSchemaPath } from "@nestjs/swagger";
import { Expose, Type } from "class-transformer";
import { IsString, IsNotEmpty, ValidateNested, Validate } from "class-validator";
-export class CreateDelegationCredentialInput {
+export class CreateDwdInput {
@IsString()
@IsNotEmpty()
@ApiProperty()
diff --git a/apps/api/v2/src/modules/organizations/delegation-credentials/inputs/service-account-key.input.ts b/apps/api/v2/src/modules/organizations/dwd/inputs/service-account-key.input.ts
similarity index 100%
rename from apps/api/v2/src/modules/organizations/delegation-credentials/inputs/service-account-key.input.ts
rename to apps/api/v2/src/modules/organizations/dwd/inputs/service-account-key.input.ts
diff --git a/apps/api/v2/src/modules/organizations/delegation-credentials/inputs/update-delegation-credential.input.ts b/apps/api/v2/src/modules/organizations/dwd/inputs/update-dwd.input.ts
similarity index 86%
rename from apps/api/v2/src/modules/organizations/delegation-credentials/inputs/update-delegation-credential.input.ts
rename to apps/api/v2/src/modules/organizations/dwd/inputs/update-dwd.input.ts
index 2e126476340..e87b37685d5 100644
--- a/apps/api/v2/src/modules/organizations/delegation-credentials/inputs/update-delegation-credential.input.ts
+++ b/apps/api/v2/src/modules/organizations/dwd/inputs/update-dwd.input.ts
@@ -2,12 +2,12 @@ import {
GoogleServiceAccountKeyInput,
MicrosoftServiceAccountKeyInput,
ServiceAccountKeyValidator,
-} from "@/modules/organizations/delegation-credentials/inputs/service-account-key.input";
+} from "@/modules/organizations/dwd/inputs/service-account-key.input";
import { ApiPropertyOptional, getSchemaPath } from "@nestjs/swagger";
import { Expose, plainToClass, Transform, Type } from "class-transformer";
import { IsBoolean, IsOptional, Validate, ValidateNested } from "class-validator";
-export class UpdateDelegationCredentialInput {
+export class UpdateDwdInput {
@IsBoolean()
@IsOptional()
@ApiPropertyOptional()
diff --git a/apps/api/v2/src/modules/organizations/delegation-credentials/organizations-delegation-credential.controller.ts b/apps/api/v2/src/modules/organizations/dwd/organizations-dwd.controller.ts
similarity index 50%
rename from apps/api/v2/src/modules/organizations/delegation-credentials/organizations-delegation-credential.controller.ts
rename to apps/api/v2/src/modules/organizations/dwd/organizations-dwd.controller.ts
index ccf182609a3..d5e63440151 100644
--- a/apps/api/v2/src/modules/organizations/delegation-credentials/organizations-delegation-credential.controller.ts
+++ b/apps/api/v2/src/modules/organizations/dwd/organizations-dwd.controller.ts
@@ -7,11 +7,11 @@ import { PlatformPlanGuard } from "@/modules/auth/guards/billing/platform-plan.g
import { IsAdminAPIEnabledGuard } from "@/modules/auth/guards/organizations/is-admin-api-enabled.guard";
import { IsOrgGuard } from "@/modules/auth/guards/organizations/is-org.guard";
import { RolesGuard } from "@/modules/auth/guards/roles/roles.guard";
-import { UpdateDelegationCredentialInput } from "@/modules/organizations/delegation-credentials/inputs/update-delegation-credential.input";
-import { CreateDelegationCredentialOutput } from "@/modules/organizations/delegation-credentials/outputs/create-delegation-credential.output";
-import { DelegationCredentialOutput } from "@/modules/organizations/delegation-credentials/outputs/delegation-credential.output";
-import { UpdateDelegationCredentialOutput } from "@/modules/organizations/delegation-credentials/outputs/update-delegation-credential.output";
-import { OrganizationsDelegationCredentialService } from "@/modules/organizations/delegation-credentials/services/organizations-delegation-credential.service";
+import { UpdateDwdInput } from "@/modules/organizations/dwd/inputs/update-dwd.input";
+import { CreateDwdOutput } from "@/modules/organizations/dwd/outputs/create-dwd.output";
+import { DwdOutput } from "@/modules/organizations/dwd/outputs/dwd.output";
+import { UpdateDwdOutput } from "@/modules/organizations/dwd/outputs/update-dwd.output";
+import { OrganizationsDwdService } from "@/modules/organizations/dwd/services/organizations-dwd.service";
import {
Controller,
UseGuards,
@@ -29,7 +29,7 @@ import { plainToClass } from "class-transformer";
import { SUCCESS_STATUS } from "@calcom/platform-constants";
-import { CreateDelegationCredentialInput } from "./inputs/create-delegation-credential.input";
+import { CreateDwdInput } from "./inputs/create-dwd.input";
@Controller({
path: "/v2/organizations/:orgId/delegation-credentials",
@@ -37,27 +37,23 @@ import { CreateDelegationCredentialInput } from "./inputs/create-delegation-cred
})
@UseGuards(ApiAuthGuard, IsOrgGuard, RolesGuard, PlatformPlanGuard, IsAdminAPIEnabledGuard)
@DocsTags("Orgs / Delegation Credentials")
-export class OrganizationsDelegationCredentialController {
- constructor(private readonly delegationCredentialService: OrganizationsDelegationCredentialService) {}
+export class OrganizationsDwdController {
+ constructor(private readonly dwdService: OrganizationsDwdService) {}
@Post("/")
@HttpCode(HttpStatus.CREATED)
@Roles("ORG_ADMIN")
@PlatformPlan("SCALE")
@ApiOperation({ summary: "Save delegation credentials for your organization." })
- async createDelegationCredential(
+ async createDwd(
@Param("orgId", ParseIntPipe) orgId: number,
- @GetUser() delegatedServiceAccountUser: User,
- @Body() body: CreateDelegationCredentialInput
- ): Promise<CreateDelegationCredentialOutput> {
- const delegationCredential = await this.delegationCredentialService.createDelegationCredential(
- orgId,
- delegatedServiceAccountUser,
- body
- );
+ @GetUser() dwdServiceAccountUser: User,
+ @Body() body: CreateDwdInput
+ ): Promise<CreateDwdOutput> {
+ const dwd = await this.dwdService.createDwd(orgId, dwdServiceAccountUser, body);
return {
status: SUCCESS_STATUS,
- data: plainToClass(DelegationCredentialOutput, delegationCredential, { strategy: "excludeAll" }),
+ data: plainToClass(DwdOutput, dwd, { strategy: "excludeAll" }),
};
}
@@ -65,21 +61,16 @@ export class OrganizationsDelegationCredentialController {
@Roles("ORG_ADMIN")
@PlatformPlan("SCALE")
@ApiOperation({ summary: "Update delegation credentials of your organization." })
- async updateDelegationCredential(
+ async updateDwd(
@Param("orgId", ParseIntPipe) orgId: number,
- @GetUser() delegatedServiceAccountUser: User,
- @Body() body: UpdateDelegationCredentialInput,
+ @GetUser() dwdServiceAccountUser: User,
+ @Body() body: UpdateDwdInput,
@Param("credentialId") credentialId: string
- ): Promise<UpdateDelegationCredentialOutput> {
- const delegationCredential = await this.delegationCredentialService.updateDelegationCredential(
- orgId,
- credentialId,
- delegatedServiceAccountUser,
- body
- );
+ ): Promise<UpdateDwdOutput> {
+ const dwd = await this.dwdService.updateDwd(orgId, credentialId, dwdServiceAccountUser, body);
return {
status: SUCCESS_STATUS,
- data: plainToClass(DelegationCredentialOutput, delegationCredential, { strategy: "excludeAll" }),
+ data: plainToClass(DwdOutput, dwd, { strategy: "excludeAll" }),
};
}
}
diff --git a/apps/api/v2/src/modules/organizations/dwd/organizations-dwd.module.ts b/apps/api/v2/src/modules/organizations/dwd/organizations-dwd.module.ts
new file mode 100644
index 00000000000..72906a8f20c
--- /dev/null
+++ b/apps/api/v2/src/modules/organizations/dwd/organizations-dwd.module.ts
@@ -0,0 +1,17 @@
+import { MembershipsModule } from "@/modules/memberships/memberships.module";
+import { OrganizationsDwdController } from "@/modules/organizations/dwd/organizations-dwd.controller";
+import { OrganizationsDwdRepository } from "@/modules/organizations/dwd/organizations-dwd.repository";
+import { OrganizationsRepository } from "@/modules/organizations/index/organizations.repository";
+import { PrismaModule } from "@/modules/prisma/prisma.module";
+import { RedisModule } from "@/modules/redis/redis.module";
+import { StripeModule } from "@/modules/stripe/stripe.module";
+import { Module } from "@nestjs/common";
+
+import { OrganizationsDwdService } from "./services/organizations-dwd.service";
+
+@Module({
+ imports: [PrismaModule, StripeModule, RedisModule, MembershipsModule],
+ providers: [OrganizationsDwdService, OrganizationsDwdRepository, OrganizationsRepository],
+ controllers: [OrganizationsDwdController],
+})
+export class OrganizationsDwdModule {}
diff --git a/apps/api/v2/src/modules/organizations/dwd/organizations-dwd.repository.ts b/apps/api/v2/src/modules/organizations/dwd/organizations-dwd.repository.ts
new file mode 100644
index 00000000000..da537651ea4
--- /dev/null
+++ b/apps/api/v2/src/modules/organizations/dwd/organizations-dwd.repository.ts
@@ -0,0 +1,28 @@
+import { PrismaReadService } from "@/modules/prisma/prisma-read.service";
+import { Injectable } from "@nestjs/common";
+
+import { Prisma } from "@calcom/prisma/client";
+
+@Injectable()
+export class OrganizationsDwdRepository {
+ constructor(private readonly dbRead: PrismaReadService) {}
+
+ async findById(dwdId: string) {
+ return this.dbRead.prisma.domainWideDelegation.findUnique({ where: { id: dwdId } });
+ }
+
+ async findByIdWithWorkspacePlatform(dwdId: string) {
+ return this.dbRead.prisma.domainWideDelegation.findUnique({
+ where: { id: dwdId },
+ include: { workspacePlatform: true },
+ });
+ }
+
+ async updateIncludeWorkspacePlatform(dwdId: string, data: Prisma.DomainWideDelegationUncheckedUpdateInput) {
+ return this.dbRead.prisma.domainWideDelegation.update({
+ where: { id: dwdId },
+ data,
+ include: { workspacePlatform: true },
+ });
+ }
+}
diff --git a/apps/api/v2/src/modules/organizations/delegation-credentials/outputs/update-delegation-credential.output.ts b/apps/api/v2/src/modules/organizations/dwd/outputs/create-dwd.output.ts
similarity index 62%
rename from apps/api/v2/src/modules/organizations/delegation-credentials/outputs/update-delegation-credential.output.ts
rename to apps/api/v2/src/modules/organizations/dwd/outputs/create-dwd.output.ts
index 5033e96a7a7..9651a7d08fe 100644
--- a/apps/api/v2/src/modules/organizations/delegation-credentials/outputs/update-delegation-credential.output.ts
+++ b/apps/api/v2/src/modules/organizations/dwd/outputs/create-dwd.output.ts
@@ -1,20 +1,20 @@
-import { DelegationCredentialOutput } from "@/modules/organizations/delegation-credentials/outputs/delegation-credential.output";
+import { DwdOutput } from "@/modules/organizations/dwd/outputs/dwd.output";
import { ApiProperty } from "@nestjs/swagger";
import { Type } from "class-transformer";
import { IsEnum, IsNotEmptyObject, ValidateNested } from "class-validator";
import { SUCCESS_STATUS, ERROR_STATUS } from "@calcom/platform-constants";
-export class UpdateDelegationCredentialOutput {
+export class CreateDwdOutput {
@ApiProperty({ example: SUCCESS_STATUS, enum: [SUCCESS_STATUS, ERROR_STATUS] })
@IsEnum([SUCCESS_STATUS, ERROR_STATUS])
status!: typeof SUCCESS_STATUS | typeof ERROR_STATUS;
@ApiProperty({
- type: DelegationCredentialOutput,
+ type: DwdOutput,
})
@IsNotEmptyObject()
@ValidateNested()
- @Type(() => DelegationCredentialOutput)
- data!: DelegationCredentialOutput;
+ @Type(() => DwdOutput)
+ data!: DwdOutput;
}
diff --git a/apps/api/v2/src/modules/organizations/delegation-credentials/outputs/delegation-credential.output.ts b/apps/api/v2/src/modules/organizations/dwd/outputs/dwd.output.ts
similarity index 95%
rename from apps/api/v2/src/modules/organizations/delegation-credentials/outputs/delegation-credential.output.ts
rename to apps/api/v2/src/modules/organizations/dwd/outputs/dwd.output.ts
index c4a2fe54fad..6a7247c9a30 100644
--- a/apps/api/v2/src/modules/organizations/delegation-credentials/outputs/delegation-credential.output.ts
+++ b/apps/api/v2/src/modules/organizations/dwd/outputs/dwd.output.ts
@@ -14,7 +14,7 @@ class WorkspacePlatformDto {
slug!: string;
}
-export class DelegationCredentialOutput {
+export class DwdOutput {
@ApiProperty()
@IsString()
@Expose()
diff --git a/apps/api/v2/src/modules/organizations/delegation-credentials/outputs/create-delegation-credential.output.ts b/apps/api/v2/src/modules/organizations/dwd/outputs/update-dwd.output.ts
similarity index 62%
rename from apps/api/v2/src/modules/organizations/delegation-credentials/outputs/create-delegation-credential.output.ts
rename to apps/api/v2/src/modules/organizations/dwd/outputs/update-dwd.output.ts
index e0ca7b9c94d..06feaa15d6b 100644
--- a/apps/api/v2/src/modules/organizations/delegation-credentials/outputs/create-delegation-credential.output.ts
+++ b/apps/api/v2/src/modules/organizations/dwd/outputs/update-dwd.output.ts
@@ -1,20 +1,20 @@
-import { DelegationCredentialOutput } from "@/modules/organizations/delegation-credentials/outputs/delegation-credential.output";
+import { DwdOutput } from "@/modules/organizations/dwd/outputs/dwd.output";
import { ApiProperty } from "@nestjs/swagger";
import { Type } from "class-transformer";
import { IsEnum, IsNotEmptyObject, ValidateNested } from "class-validator";
import { SUCCESS_STATUS, ERROR_STATUS } from "@calcom/platform-constants";
-export class CreateDelegationCredentialOutput {
+export class UpdateDwdOutput {
@ApiProperty({ example: SUCCESS_STATUS, enum: [SUCCESS_STATUS, ERROR_STATUS] })
@IsEnum([SUCCESS_STATUS, ERROR_STATUS])
status!: typeof SUCCESS_STATUS | typeof ERROR_STATUS;
@ApiProperty({
- type: DelegationCredentialOutput,
+ type: DwdOutput,
})
@IsNotEmptyObject()
@ValidateNested()
- @Type(() => DelegationCredentialOutput)
- data!: DelegationCredentialOutput;
+ @Type(() => DwdOutput)
+ data!: DwdOutput;
}
diff --git a/apps/api/v2/src/modules/organizations/dwd/services/organizations-dwd.service.ts b/apps/api/v2/src/modules/organizations/dwd/services/organizations-dwd.service.ts
new file mode 100644
index 00000000000..70914a4a1a1
--- /dev/null
+++ b/apps/api/v2/src/modules/organizations/dwd/services/organizations-dwd.service.ts
@@ -0,0 +1,62 @@
+import { CreateDwdInput } from "@/modules/organizations/dwd/inputs/create-dwd.input";
+import {
+ GoogleServiceAccountKeyInput,
+ MicrosoftServiceAccountKeyInput,
+} from "@/modules/organizations/dwd/inputs/service-account-key.input";
+import { UpdateDwdInput } from "@/modules/organizations/dwd/inputs/update-dwd.input";
+import { OrganizationsDwdRepository } from "@/modules/organizations/dwd/organizations-dwd.repository";
+import { DwdOutput } from "@/modules/organizations/dwd/outputs/dwd.output";
+import { Injectable, NotFoundException } from "@nestjs/common";
+import { User } from "@prisma/client";
+
+import { addDwd, toggleDwdEnabled, encryptServiceAccountKey } from "@calcom/platform-libraries";
+
+@Injectable()
+export class OrganizationsDwdService {
+ constructor(private readonly organizationsDwdRepository: OrganizationsDwdRepository) {}
+ async createDwd(orgId: number, dwdServiceAccountUser: User, body: CreateDwdInput) {
+ console.log("asap body", JSON.stringify(body, null, 2));
+ const dwd = await addDwd({
+ input: body,
+ ctx: { user: { id: dwdServiceAccountUser.id, organizationId: orgId } },
+ });
+ return dwd;
+ }
+
+ async updateDwd(orgId: number, dwdId: string, dwdServiceAccountUser: User, body: UpdateDwdInput) {
+ if (body.enabled !== undefined) {
+ await this.updateDwdEnabled(orgId, dwdId, dwdServiceAccountUser, body.enabled);
+ }
+ if (body.serviceAccountKey !== undefined) {
+ await this.updateDwdServiceAccountKey(dwdId, body.serviceAccountKey);
+ }
+ const dwd = await this.organizationsDwdRepository.findByIdWithWorkspacePlatform(dwdId);
+ if (!dwd) {
+ throw new NotFoundException(`DWD with id ${dwdId} not found`);
+ }
+
+ return dwd;
+ }
+
+ async updateDwdEnabled(orgId: number, dwdId: string, dwdServiceAccountUser: User, enabled: boolean) {
+ const handlerUser = {
+ id: dwdServiceAccountUser.id,
+ email: dwdServiceAccountUser.email,
+ organizationId: orgId,
+ };
+ const handlerBody = { id: dwdId, enabled };
+ const dwd = await toggleDwdEnabled(handlerUser, handlerBody);
+ return dwd;
+ }
+
+ async updateDwdServiceAccountKey(
+ dwdId: string,
+ serviceAccountKey: GoogleServiceAccountKeyInput | MicrosoftServiceAccountKeyInput
+ ) {
+ const encryptedServiceAccountKey = encryptServiceAccountKey(serviceAccountKey);
+ const dwd = await this.organizationsDwdRepository.updateIncludeWorkspacePlatform(dwdId, {
+ serviceAccountKey: encryptedServiceAccountKey,
+ });
+ return dwd;
+ }
+}
diff --git a/apps/api/v2/src/modules/organizations/organizations.module.ts b/apps/api/v2/src/modules/organizations/organizations.module.ts
index 86f1ca89cd7..d468faea350 100644
--- a/apps/api/v2/src/modules/organizations/organizations.module.ts
+++ b/apps/api/v2/src/modules/organizations/organizations.module.ts
@@ -11,7 +11,7 @@ import { OrganizationAttributesService } from "@/modules/organizations/attribute
import { OrganizationAttributeOptionRepository } from "@/modules/organizations/attributes/options/organization-attribute-options.repository";
import { OrganizationsAttributesOptionsController } from "@/modules/organizations/attributes/options/organizations-attributes-options.controller";
import { OrganizationAttributeOptionService } from "@/modules/organizations/attributes/options/services/organization-attributes-option.service";
-import { OrganizationsDelegationCredentialModule } from "@/modules/organizations/delegation-credentials/organizations-delegation-credential.module";
+import { OrganizationsDwdModule } from "@/modules/organizations/dwd/organizations-dwd.module";
import { OrganizationsEventTypesController } from "@/modules/organizations/event-types/organizations-event-types.controller";
import { OrganizationsEventTypesRepository } from "@/modules/organizations/event-types/organizations-event-types.repository";
import { OutputTeamEventTypesResponsePipe } from "@/modules/organizations/event-types/pipes/team-event-types-response.transformer";
@@ -65,7 +65,7 @@ import { Module } from "@nestjs/common";
EventTypesModule_2024_06_14,
TeamsEventTypesModule,
TeamsModule,
- OrganizationsDelegationCredentialModule,
+ OrganizationsDwdModule,
OrganizationsOrganizationsModule,
OrganizationsTeamsRoutingFormsModule,
],
diff --git a/apps/api/v2/src/modules/selected-calendars/inputs/selected-calendars.input.ts b/apps/api/v2/src/modules/selected-calendars/inputs/selected-calendars.input.ts
index 50d5e9e138e..3d24593667b 100644
--- a/apps/api/v2/src/modules/selected-calendars/inputs/selected-calendars.input.ts
+++ b/apps/api/v2/src/modules/selected-calendars/inputs/selected-calendars.input.ts
@@ -12,7 +12,7 @@ export class SelectedCalendarsInputDto {
@IsString()
@IsOptional()
- readonly delegationCredentialId?: string;
+ readonly domainWideDelegationCredentialId?: string;
}
export class SelectedCalendarsQueryParamsInputDto {
@@ -27,5 +27,5 @@ export class SelectedCalendarsQueryParamsInputDto {
@IsString()
@IsOptional()
- readonly delegationCredentialId?: string;
+ readonly domainWideDelegationCredentialId?: string;
}
diff --git a/apps/api/v2/src/modules/selected-calendars/selected-calendars.module.ts b/apps/api/v2/src/modules/selected-calendars/selected-calendars.module.ts
index da2beb8258c..0665bb53a7d 100644
--- a/apps/api/v2/src/modules/selected-calendars/selected-calendars.module.ts
+++ b/apps/api/v2/src/modules/selected-calendars/selected-calendars.module.ts
@@ -2,7 +2,7 @@ import { CalendarsRepository } from "@/ee/calendars/calendars.repository";
import { CalendarsService } from "@/ee/calendars/services/calendars.service";
import { AppsRepository } from "@/modules/apps/apps.repository";
import { CredentialsRepository } from "@/modules/credentials/credentials.repository";
-import { OrganizationsDelegationCredentialRepository } from "@/modules/organizations/delegation-credentials/organizations-delegation-credential.repository";
+import { OrganizationsDwdRepository } from "@/modules/organizations/dwd/organizations-dwd.repository";
import { OrganizationsMembershipRepository } from "@/modules/organizations/memberships/organizations-membership.repository";
import { OrganizationsMembershipService } from "@/modules/organizations/memberships/services/organizations-membership.service";
import { PrismaModule } from "@/modules/prisma/prisma.module";
@@ -22,7 +22,7 @@ import { Module } from "@nestjs/common";
CredentialsRepository,
AppsRepository,
OrganizationsMembershipService,
- OrganizationsDelegationCredentialRepository,
+ OrganizationsDwdRepository,
OrganizationsMembershipRepository,
SelectedCalendarsService,
],
diff --git a/apps/api/v2/src/modules/selected-calendars/selected-calendars.repository.ts b/apps/api/v2/src/modules/selected-calendars/selected-calendars.repository.ts
index 5dd45ea19be..7f9b17eeac3 100644
--- a/apps/api/v2/src/modules/selected-calendars/selected-calendars.repository.ts
+++ b/apps/api/v2/src/modules/selected-calendars/selected-calendars.repository.ts
@@ -89,7 +89,7 @@ export class SelectedCalendarsRepository {
userId: number,
integration: string,
externalId: string,
- delegationCredentialId?: string
+ domainWideDelegationCredentialId?: string
) {
// Using deleteMany because userId_externalId_integration_eventTypeId is a unique constraint but with eventTypeId being nullable, causing it to be not used as a unique constraint
const records = await this.dbWrite.prisma.selectedCalendar.findMany({
@@ -97,7 +97,7 @@ export class SelectedCalendarsRepository {
userId,
externalId,
integration,
- delegationCredentialId,
+ domainWideDelegationCredentialId,
...ensureUserLevelWhere,
},
});
diff --git a/apps/api/v2/src/modules/selected-calendars/services/selected-calendars.service.ts b/apps/api/v2/src/modules/selected-calendars/services/selected-calendars.service.ts
index bc2f153f439..ac94840bd8e 100644
--- a/apps/api/v2/src/modules/selected-calendars/services/selected-calendars.service.ts
+++ b/apps/api/v2/src/modules/selected-calendars/services/selected-calendars.service.ts
@@ -1,5 +1,5 @@
import { CalendarsService } from "@/ee/calendars/services/calendars.service";
-import { OrganizationsDelegationCredentialRepository } from "@/modules/organizations/delegation-credentials/organizations-delegation-credential.repository";
+import { OrganizationsDwdRepository } from "@/modules/organizations/dwd/organizations-dwd.repository";
import { OrganizationsMembershipService } from "@/modules/organizations/memberships/services/organizations-membership.service";
import {
SelectedCalendarsInputDto,
@@ -11,9 +11,7 @@ import { Injectable, NotFoundException } from "@nestjs/common";
import { SelectedCalendarRepository } from "@calcom/platform-libraries";
-type SelectedCalendarsInputDelegationCredential = SelectedCalendarsInputDto & {
- delegationCredentialId: string;
-};
+type SelectedCalendarsInputDwd = SelectedCalendarsInputDto & { domainWideDelegationCredentialId: string };
@Injectable()
export class SelectedCalendarsService {
@@ -21,16 +19,16 @@ export class SelectedCalendarsService {
private readonly calendarsService: CalendarsService,
private readonly selectedCalendarsRepository: SelectedCalendarsRepository,
private readonly organizationsMembershipService: OrganizationsMembershipService,
- private readonly organizationsDelegationCredentialRepository: OrganizationsDelegationCredentialRepository
+ private readonly organizationsDwdRepository: OrganizationsDwdRepository
) {}
async addSelectedCalendar(user: UserWithProfile, input: SelectedCalendarsInputDto) {
- if (input.delegationCredentialId) {
- const delegationCredentialInput = {
+ if (input.domainWideDelegationCredentialId) {
+ const dwdInput = {
...input,
- delegationCredentialId: input.delegationCredentialId,
+ domainWideDelegationCredentialId: input.domainWideDelegationCredentialId,
};
- return this.addSelectedCalendarDelegationCredential(user, delegationCredentialInput);
+ return this.addSelectedCalendarDwd(user, dwdInput);
}
return this.addSelectedCalendarUser(user, input);
}
@@ -49,42 +47,35 @@ export class SelectedCalendarsService {
return userSelectedCalendar;
}
- private async addSelectedCalendarDelegationCredential(
- user: UserWithProfile,
- selectedCalendar: SelectedCalendarsInputDelegationCredential
- ) {
- const isMemberOfOrganization = await this.isMemberOfDelegationCredentialOrganization(
+ private async addSelectedCalendarDwd(user: UserWithProfile, selectedCalendar: SelectedCalendarsInputDwd) {
+ const isMemberOfOrganization = await this.isMemberOfDwdOrganization(
user.id,
- selectedCalendar.delegationCredentialId
+ selectedCalendar.domainWideDelegationCredentialId
);
if (!isMemberOfOrganization) {
- throw new NotFoundException(
- "User is not a member of the organization that owns the Delegation credential"
- );
+ throw new NotFoundException("User is not a member of the organization that owns the DWD credential");
}
- const { integration, externalId, credentialId, delegationCredentialId } = selectedCalendar;
- const delegationCredentialSelectedCalendar = await SelectedCalendarRepository.upsert({
+ const { integration, externalId, credentialId, domainWideDelegationCredentialId } = selectedCalendar;
+ const dwdSelectedCalendar = await SelectedCalendarRepository.upsert({
userId: user.id,
integration,
externalId,
credentialId,
- delegationCredentialId,
+ domainWideDelegationCredentialId,
eventTypeId: null,
});
- return delegationCredentialSelectedCalendar;
+ return dwdSelectedCalendar;
}
- private async isMemberOfDelegationCredentialOrganization(userId: number, delegationCredentialId: string) {
- const delegationCredential = await this.organizationsDelegationCredentialRepository.findById(
- delegationCredentialId
- );
- if (!delegationCredential) {
- throw new NotFoundException("DelegationCredential with provided delegationCredentialId not found");
+ private async isMemberOfDwdOrganization(userId: number, domainWideDelegationCredentialId: string) {
+ const dwd = await this.organizationsDwdRepository.findById(domainWideDelegationCredentialId);
+ if (!dwd) {
+ throw new NotFoundException("DWD with provided domainWideDelegationCredentialId not found");
}
const isMemberOfOrganization = await this.organizationsMembershipService.getOrgMembershipByUserId(
- delegationCredential.organizationId,
+ dwd.organizationId,
userId
);
@@ -95,19 +86,17 @@ export class SelectedCalendarsService {
selectedCalendar: SelectedCalendarsQueryParamsInputDto,
user: UserWithProfile
) {
- const { integration, externalId, credentialId, delegationCredentialId } = selectedCalendar;
+ const { integration, externalId, credentialId, domainWideDelegationCredentialId } = selectedCalendar;
- if (!delegationCredentialId) {
+ if (!domainWideDelegationCredentialId) {
await this.calendarsService.checkCalendarCredentials(Number(credentialId), user.id);
} else {
- const isMemberOfOrganization = await this.isMemberOfDelegationCredentialOrganization(
+ const isMemberOfOrganization = await this.isMemberOfDwdOrganization(
user.id,
- delegationCredentialId
+ domainWideDelegationCredentialId
);
if (!isMemberOfOrganization) {
- throw new NotFoundException(
- "User is not a member of the organization that owns the Delegation credential"
- );
+ throw new NotFoundException("User is not a member of the organization that owns the DWD credential");
}
}
@@ -115,7 +104,7 @@ export class SelectedCalendarsService {
user.id,
integration,
externalId,
- delegationCredentialId
+ domainWideDelegationCredentialId
);
return removedCalendarEntry;
diff --git a/apps/api/v2/swagger/documentation.json b/apps/api/v2/swagger/documentation.json
index bdf812f1d94..b8eb08086f7 100644
--- a/apps/api/v2/swagger/documentation.json
+++ b/apps/api/v2/swagger/documentation.json
@@ -1093,7 +1093,7 @@
},
"/v2/organizations/{orgId}/delegation-credentials": {
"post": {
- "operationId": "OrganizationsDelegationCredentialController_createDelegationCredential",
+ "operationId": "OrganizationsDwdController_createDwd",
"summary": "Save delegation credentials for your organization.",
"parameters": [
{
@@ -1110,7 +1110,7 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/CreateDelegationCredentialInput"
+ "$ref": "#/components/schemas/CreateDwdInput"
}
}
}
@@ -1121,7 +1121,7 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/CreateDelegationCredentialOutput"
+ "$ref": "#/components/schemas/CreateDwdOutput"
}
}
}
@@ -1134,7 +1134,7 @@
},
"/v2/organizations/{orgId}/delegation-credentials/{credentialId}": {
"patch": {
- "operationId": "OrganizationsDelegationCredentialController_updateDelegationCredential",
+ "operationId": "OrganizationsDwdController_updateDwd",
"summary": "Update delegation credentials of your organization.",
"parameters": [
{
@@ -1159,7 +1159,7 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/UpdateDelegationCredentialInput"
+ "$ref": "#/components/schemas/UpdateDwdInput"
}
}
}
@@ -1170,7 +1170,7 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/UpdateDelegationCredentialOutput"
+ "$ref": "#/components/schemas/UpdateDwdOutput"
}
}
}
@@ -5942,7 +5942,7 @@
}
},
{
- "name": "delegationCredentialId",
+ "name": "domainWideDelegationCredentialId",
"required": false,
"in": "query",
"schema": {
@@ -11499,7 +11499,7 @@
"credentialId": {
"type": "number"
},
- "delegationCredentialId": {
+ "domainWideDelegationCredentialId": {
"type": "string"
}
},
@@ -15170,7 +15170,7 @@
"client_id"
]
},
- "CreateDelegationCredentialInput": {
+ "CreateDwdInput": {
"type": "object",
"properties": {
"workspacePlatformSlug": {
@@ -15214,7 +15214,7 @@
"slug"
]
},
- "DelegationCredentialOutput": {
+ "DwdOutput": {
"type": "object",
"properties": {
"id": {
@@ -15251,7 +15251,7 @@
"updatedAt"
]
},
- "CreateDelegationCredentialOutput": {
+ "CreateDwdOutput": {
"type": "object",
"properties": {
"status": {
@@ -15263,7 +15263,7 @@
]
},
"data": {
- "$ref": "#/components/schemas/DelegationCredentialOutput"
+ "$ref": "#/components/schemas/DwdOutput"
}
},
"required": [
@@ -15271,7 +15271,7 @@
"data"
]
},
- "UpdateDelegationCredentialInput": {
+ "UpdateDwdInput": {
"type": "object",
"properties": {
"enabled": {
@@ -15292,7 +15292,7 @@
}
}
},
- "UpdateDelegationCredentialOutput": {
+ "UpdateDwdOutput": {
"type": "object",
"properties": {
"status": {
@@ -15304,7 +15304,7 @@
]
},
"data": {
- "$ref": "#/components/schemas/DelegationCredentialOutput"
+ "$ref": "#/components/schemas/DwdOutput"
}
},
"required": [
@@ -15914,7 +15914,7 @@
"credentialId": {
"type": "number"
},
- "delegationCredentialId": {
+ "domainWideDelegationCredentialId": {
"type": "string",
"nullable": true
}
@@ -15955,7 +15955,7 @@
"credentialId": {
"type": "number"
},
- "delegationCredentialId": {
+ "domainWideDelegationCredentialId": {
"type": "string",
"nullable": true
}
@@ -15976,7 +15976,7 @@
"credentialId": {
"type": "number"
},
- "delegationCredentialId": {
+ "domainWideDelegationCredentialId": {
"type": "string",
"nullable": true
},
@@ -16023,7 +16023,7 @@
"type": "number",
"nullable": true
},
- "delegationCredentialId": {
+ "domainWideDelegationCredentialId": {
"type": "string",
"nullable": true
},
@@ -18383,7 +18383,7 @@
"example": "https://caldav.icloud.com/26962146906/calendars/1644422A-1945-4438-BBC0-4F0Q23A57R7S/",
"description": "Unique identifier used to represent the specfic calendar, as returned by the /calendars endpoint"
},
- "delegationCredentialId": {
+ "domainWideDelegationCredentialId": {
"type": "string"
}
},
diff --git a/apps/web/app/(use-page-wrapper)/settings/(settings-layout)/SettingsLayoutAppDirClient.tsx b/apps/web/app/(use-page-wrapper)/settings/(settings-layout)/SettingsLayoutAppDirClient.tsx
index aacc629b615..a59dfdbe3b4 100644
--- a/apps/web/app/(use-page-wrapper)/settings/(settings-layout)/SettingsLayoutAppDirClient.tsx
+++ b/apps/web/app/(use-page-wrapper)/settings/(settings-layout)/SettingsLayoutAppDirClient.tsx
@@ -168,10 +168,10 @@ const organizationAdminKeys = [
"OAuth Clients",
"SSO",
"directory_sync",
- "delegation_credential",
+ "domain_wide_delegation",
];
-const useTabs = ({ isDelegationCredentialEnabled }: { isDelegationCredentialEnabled: boolean }) => {
+const useTabs = ({ isDwdEnabled }: { isDwdEnabled: boolean }) => {
const session = useSession();
const { data: user } = trpc.viewer.me.useQuery({ includePasswordAdded: true });
const orgBranding = useOrgBranding();
@@ -202,11 +202,11 @@ const useTabs = ({ isDelegationCredentialEnabled }: { isDelegationCredentialEnab
});
}
- // Add delegation-credential menu item only if feature flag is enabled
- if (isDelegationCredentialEnabled) {
+ // Add domain-wide-delegation menu item only if feature flag is enabled
+ if (isDwdEnabled) {
newArray.push({
- name: "delegation_credential",
- href: "/settings/organizations/delegation-credential",
+ name: "domain_wide_delegation",
+ href: "/settings/organizations/domain-wide-delegation",
});
}
@@ -243,7 +243,7 @@ const useTabs = ({ isDelegationCredentialEnabled }: { isDelegationCredentialEnab
if (isAdmin) return true;
return !adminRequiredKeys.includes(tab.name);
});
- }, [isAdmin, orgBranding, isOrgAdminOrOwner, user, isDelegationCredentialEnabled]);
+ }, [isAdmin, orgBranding, isOrgAdminOrOwner, user, isDwdEnabled]);
return processTabsMemod;
};
@@ -440,9 +440,7 @@ const SettingsSidebarContainer = ({
enabled: !!session.data?.user?.org && !currentOrgProp,
});
- const tabsWithPermissions = useTabs({
- isDelegationCredentialEnabled: !!_currentOrg?.features?.delegationCredential,
- });
+ const tabsWithPermissions = useTabs({ isDwdEnabled: !!_currentOrg?.features?.domainWideDelegation });
const { data: _otherTeams } = trpc.viewer.organizations.listOtherTeams.useQuery(undefined, {
enabled: !!session.data?.user?.org && !otherTeamsProp,
diff --git a/apps/web/app/(use-page-wrapper)/settings/(settings-layout)/organizations/domain-wide-delegation/domain-wide-delegation-TODO.md b/apps/web/app/(use-page-wrapper)/settings/(settings-layout)/organizations/domain-wide-delegation/domain-wide-delegation-TODO.md
new file mode 100644
index 00000000000..10d76ca090a
--- /dev/null
+++ b/apps/web/app/(use-page-wrapper)/settings/(settings-layout)/organizations/domain-wide-delegation/domain-wide-delegation-TODO.md
@@ -0,0 +1,112 @@
+## Version 1.0
+### Release Plan
+ 1. Read the document(domain-wide-delegation.md) and acknowledge it.
+ 3. Deploy:
+ 1. Follow "Setting up Domain-Wide Delegation for Google Calendar API" in domain-wide-delegation.md to create Service Account and create a workspace.
+ 2. Merge PR(without Calendar Cache Support) and then deploy.
+ 4. Enable for i.cal.com:
+ 1. Disable Calendar Cache for i.cal.com
+ 2. Enable DWD for i.cal.com first and then test there
+ 3. Wait for 1-2 days and keep monitoring the errors in Sentry and Axiom.
+ 5. Merge & Deploy the Calendar Cache support(with DWD) PR
+ 1. Enable Calendar Cache back for i.cal.com
+ 2. Observe the errors in Sentry and Axiom.
+ 6. Enable for a big customer:
+ 1. Wait for a week and keep monitoring the errors in Sentry and Axiom.
+ 7. Use delegatedCredentialsFirst instead of delegatedCredentialsLast in EventManager.ts
+ - Observe errors in Sentry and Axiom.
+
+## Manual Testing
+ - V2/V1 APIs - There could be problem if DWD credentials aren't supported there. Because as organization enables DWD and new users won't need to connect their calendars in the old way. e.g. getBusyCalendarTimes seem to be used there in V2.
+ - [x] Request reshedule - cancellation of meeting in calendar verification
+ - [x] Isolation of DWD credentials for different organizations
+ - [x] Using same domain name for different organization isn't allowed. It is restricted during creation of DWD.
+ - [x] Location Change of a booking to Google Meet(from Cal Video)
+ - [x] Google Meet/Google Calendar
+ - [x] Shows up installed on apps/google-meet and apps/instaled/conferencing
+ - [x] Can't remove the app
+ - [x] Seated Event
+ - [x] Seat cancellation removes calendar invite
+ - [x] Onboarding
+ - [x] When DWD is not enabled, the flow works.
+ - [x] When DWD is enabled, Google Calendar is pre-installed and Destination Calendar and Selected Calendar are configurable. On next step, Google Meet is pre-installed and shown at the top and could be set as default.
+ - [x] User Level Selected Calendar and Destination Calendars are honored - verified through booking the user.
+ - [ ] Event Type Selected Calendar and Destination Calendar
+ - [ ] Dynamic Group Booking
+ - [x] Owner must have verified email to enable DWD
+ - [x] RR Team Event
+ - [x] Booking
+ - Unavailable slot isn't available for booking. Unavailable user isn't used.
+ - [x] Reroute
+ - [x] Reassign
+ - [x] Troubleshooter
+ - [x] Shows busy times from Calendar
+ - [ ] Calendar Cache[TO BE TESTED LATER]
+ - [ ] Event Type Selected Calendar caching test
+ - [ ] User Selected Calendar caching test
+
+### Important
+ - **Performance**
+ - There could be 100s of users in an organization with already connected calendars. Enabling DWD adds a duplicate credential(in-memory) for each of them.
+ - Because a credential isn't aware of which externalIds it has access to(without connecting with Google Calendar API itself), we can't identify which credential is for which SelectedCalendar and thus we can't de-duplicate them. This has an impact on fetching the availability and thus for a team event with x participants, we could have 2x requests to Google Calendar API. Because for big value of x, user might be using routing already with team members and thus the actual value of x might be much lower. So, we could be fine. Also, we would have Calendar Cache enabled there already to reduce the requests.
+ - Bugs
+ - [x] For RR event, if I am able to see the slots for a blocked day in calendar(by temporarily unselecting the calendar), and then we enable the calendar back, the blocked day can be booked.
+ - [x] Not using Goole Meet with Default conferencing app.
+ - [x] Duplicate Calendar Events in Google Calendar when choosing non-primary calendar as destination. No idea why this is happening.
+ - The issue was in getAttendees in Google CalendarService not using externalCalendarId.
+ - [x] Restrict toggling based on email verified
+ - [x] Duplicate Calendar connections in 'apps/installed' if a user already had connected calendar and DWD is enabled.
+ - [x] Calendar Cache has credentialId column which isn't applicable for DWD(Solution: Added userId there)
+ - [x] Troubleshooter
+ - [x] Shows busy times from Claendar
+ - [x] If a user has connected a calendar, and then DWD is enabled.
+ - Tested various scenarios for it
+ - [x] Inviting a new user.
+ - Verified that Google Calendar is shown pre-installed.
+ - How about Google Meet(which depends on Google Calendar) - Correctly shows up as installed.
+ - TODO:
+ - [ ] Add experimental/Beta flag in DWD
+ - [ ] Consideration of multiple domains email in a single team event. We might need to consider all the member's domains in the team event when fetching availabilituy.
+ - [x] Performance
+ - [x] Available Slots and booking flow shouldn't slow down. Right now the querying logic is not optimized. We query per team member, we should do one query - This is fixed and took quite a refactor but it is cleaner code now.
+ - [ ] Tag all DWD related logs and errors with "DWD:"
+ - [x] Troubleshooter
+ - [x] Google CalendarService unit tests to verify that if DWD credential is provided it uses impersonation to access API otherwise it uses regular user credential API.
+ - [x] setDestinationCalendar.handler.ts tests to verify that when DWD is enabled it still correctly sets the destination calendar.
+ - [x] getConnectedDestinationCalendars tests.
+ - [x] Creating DWD shouldn't immediately enable it. Enabling has separate check to confirm if it is actually configured in google workspace
+ - [x] Added check to avoid adding same domain for a workspace platform in another organization if it is already enabled in some other organization
+ - [x] Don't show dwd in menu for non-org-admin users - It errors with something_went_wrong right now
+ - [x] Don't allow disabled platform to be selected in the UI for creation.
+ - We have disabled coming the disabled platform to be coming into the list that effectively disables edit of existing dwd and creation of new dwd for that platform.
+ - [x] Where should we show the user the client ID to enable domain wide delegation?
+ - [x] It must be shown to the organization owner/admin only
+ - [x] There could be multiple checkboxes per domain to enable domain wide delegation for a domain
+ - [x] Which domain to allow
+ - Any domain can be added by a user
+ - [x] Support multiple domains in DomainWideDelegation schema for an organization
+ - [x] Use the domain as well to identify if the domain wide delegation is enabled
+ - [x] Before enabling Domain-wide delegation, there should be a check to ensure that the clientID has been added to the Workspace Platform
+ - [x] We should allow setting default conferencing app during onboarding
+
+### Follow-up release
+ - [ ] Confirmation for DwD toggling off
+ - [ ] Confirmation for DwD deletion - Deletion isn't there at the moment.
+ - [ ] Make Google Meet "show up" as default conferencing app when DWD for Google is enabled.
+ - [ ] Profile pic from Google with DWD might not be working - Fix it.
+
+### Security
+ - [x] We don't let any one user see the added service account key from UI.
+ - [ ] We intend to implement Workload Identity Federation in the future.
+
+### Documentation
+- After enabling domain-wide delegation, the credential is shown pre-installed and the connection can't be removed(or the app can't be uninstalled by user)
+- Steps
+ - App admin will first create a Workspace Platform and then organization owner/admin can enable domain-wide delegation for a domain
+ - As soon as domain-wide delegation is created, it would start taking preference over the personal credentials of the organization members and it would be used for that.
+
+Version-2.0
+- Workload Identity Federation to ensure that the service account key is never stored in DB.
+
+
+
diff --git a/apps/web/app/(use-page-wrapper)/settings/(settings-layout)/organizations/domain-wide-delegation/domain-wide-delegation.md b/apps/web/app/(use-page-wrapper)/settings/(settings-layout)/organizations/domain-wide-delegation/domain-wide-delegation.md
new file mode 100644
index 00000000000..157162ee5b5
--- /dev/null
+++ b/apps/web/app/(use-page-wrapper)/settings/(settings-layout)/organizations/domain-wide-delegation/domain-wide-delegation.md
@@ -0,0 +1,104 @@
+## Setting up Domain-Wide Delegation for Google Calendar API
+
+Step 1: Create a Google Cloud Project
+
+Before you can create a service account, you'll need to set up a Google Cloud project.
+
+ 1. Create a Google Cloud Project:
+ - Go to the Google Cloud Console
+ - Select Create Project
+ - Give your project a name and select your billing account (if applicable)
+ - Click Create
+ 2. Enable the Google Calendar API:
+ 1. Go to the Google Cloud Console
+ 2. Select API & Services → Library
+ 3. Search for "Google Calendar API"
+ 4. Click Enable
+
+Step 2: Create a Service Account
+
+A service account is needed to act on behalf of users
+
+ 1. Navigate to the Service Accounts page:
+ - In the Google Cloud Console, go to IAM & Admin → Service Accounts
+ 2. Create a New Service Account:
+ - Click on Create Service Account
+ - Give your service account a name and description
+ - Click Create and Continue
+
+Step 3: To Be taken by Cal.com instance admin:
+ - Create a Workspace Platform with slug="google". Slug has to be exactly this. This is how we know we need to use Google Calendar and Google Meet.
+
+Last Step (To Be Taken By Cal.com organization Owner/Admin): Assign Specific API Permissions via OAuth Scopes:
+ - Create DWD with workspace platform "google"
+ - User must be a member of the Google Workspace to be able to enable DWD as there is a validation if the user's calendar can be accessed through the service account
+ - Get the Client ID from there
+ - Go to your Google Admin Console (admin-google-com)
+ - Navigate to Security → Access and Data Controls -> API controls -> Manage Domain-Wide Delegation
+ - Here, you'll authorize the Client ID(Unique ID) to access the Google Calendar API
+ - Add the necessary API scopes for Google Calendar(Full access to Google Calendar)
+ https://www.googleapis.com/auth/calendar
+
+
+## Onboarding Improvement
+- Just adding a member to the organization would do the following:
+ - Member to receive events in their calendar, even if they don't login to their account and complete the onboarding process.
+ - The booking location would be Google Meet, even if the user hasn't set it as default(Though Cal Video would show up as default, but we still use Google Meet in this case. We will fix it later.)
+ - It would still not use their calendar for conflict checking, but user can complete the onboarding(just select one calendar there for conflict checking)
+- Onboarding process: Google Calendar is pre-installed for any new member of the organization(assuming the user has an email of the DWD domain) and Destination Calendar and Selected Calendar are configurable. On next step, Google Meet is pre-installed and shown at the top and could be set as default.
+
+## Restrictions after enabling DWD
+- Enabling DWD for a particular workspace in Cal.com(only google supported at the moment) disables the user from disconnecting that credential.
+
+## Who can create DWD and enable it?
+- Only the owner/admin of the organization can create DWD
+- Only the owner/admin of the organization can enable the created DWD. Following additional requirements are there:
+ - The client ID must be added to the Google Admin Console
+ - The user's email must be a member of the Google Workspace
+ - The user's email must be verified.
+
+## Disabling DWD
+ - Disabling DWD maintains the user's preferences in terms of SelectedCalendars and DestinationCalendar.
+
+## Developer Notes
+### Terminology
+- DWD Credential: A DWD service account key along with user's email becomes the DWD Credential which is an alternative to regular Credential in DB.
+- DWD: Domain Wide Delegation
+- non-dwd credential: Regular credentials that are stored in Credentials table
+
+### How DWD works
+- We use the Cal.com user's email to impersonate that user using DWD Credential(which is just a service account key at the moment)
+ - That gives us read/write permission to get availability of the user and create new events in their calendar.
+
+### What is a DWD Credential?
+- A DWD service account key along with user's email becomes the DWD Credential which is an alternative to regular Credential in DB.
+- DWD doesn't completely replace the regular credentials. DWD Credential gives access to the cal.com user's email in Google Calendar. So, if the user needs to connect to some other email's calendar, we need to use the regular credentials.
+
+### Important Points
+- No Credential table entry is created when enabling DWD. The workspace platform's related apps will be considered as "installed" for the users with email matching dwd domain. An in-memory credential like object is created for this purpose. It allows avoiding creation of thousands of records for all the members of the organization when dwd is enabled.
+- DWD Credential is applicable to Users only.
+ - For team, we don't use dwd credential as you can impersonate a user and not team through Dwd credential. Currently supported apps(Google Calendar and Google Meet) don't support team installation, so we could simply allow enabling DWD without any issues.
+- Disabling a workspace platform stops it from being used for any new organizations and also disables any DWD using the workspace platform from being edited.
+ - It still all existing DWDs to keep on working
+- Adding any number of DWDs for a particular workspace always gives the same Client ID as DWD uses the workspace's default Service Account.
+- We should disable DWD and not delete it when we want to stop using it temporarily. Deleting DWD also removes all the seletedCalendar entries connected to it.
+
+### How apps/installed loads the credentials
+1. Identify the logged in user's email
+2. Identify the domainWideDelegations for that email's domain
+3. Build in-memory credentials for the domainWideDelegations and use them along with the actual credentials(that user might have connected) of the user
+4. We don't show the non-dwd connected calendar(if there is a corresponding dwd connected calendar). Though we use the non-dwd credentials to identify the selected calendars, for the dwd connected calendar.
+
+### Impact on existing users booking flow
+- There should be no impact on availability on enabling DWD because we keep on using the existing credentials along with new DWD credential.
+- When booking the event, we sort the credentials with DWD credentials last, so there should be no impact on creating calendar events.
+ - NOTE: We will followup with sorting the credentials with DWD credentials first in a followup PR(They are preferred because they don't expire)
+
+### Impact on APIs - [ To Verify ]
+- We don't support DWD through APIs yet. So, all existing APIs would continue to work with non-dwd credentials only.
+
+### Notes when testing locally
+- You need to enable the feature through feature flag.
+- You could use Acme org and login as [email protected]
+- Make sure to change the email of the user above to your workspace owner's email(other member's email might also work). This is necessary otherwise you won't be able to enable DWD for the organization.
+ - Note: After changing the email, you would have to logout and login again as required by NextAuth
\ No newline at end of file
diff --git a/apps/web/app/(use-page-wrapper)/settings/(settings-layout)/organizations/delegation-credential/page.tsx b/apps/web/app/(use-page-wrapper)/settings/(settings-layout)/organizations/domain-wide-delegation/page.tsx
similarity index 53%
rename from apps/web/app/(use-page-wrapper)/settings/(settings-layout)/organizations/delegation-credential/page.tsx
rename to apps/web/app/(use-page-wrapper)/settings/(settings-layout)/organizations/domain-wide-delegation/page.tsx
index f76f7915808..5f72eaeec14 100644
--- a/apps/web/app/(use-page-wrapper)/settings/(settings-layout)/organizations/delegation-credential/page.tsx
+++ b/apps/web/app/(use-page-wrapper)/settings/(settings-layout)/organizations/domain-wide-delegation/page.tsx
@@ -1,12 +1,12 @@
import { _generateMetadata, getTranslate } from "app/_utils";
-import DelegationCredentialList from "@calcom/features/ee/organizations/pages/settings/delegationCredential";
+import DomainWideDelegationList from "@calcom/features/ee/organizations/pages/settings/domainWideDelegation";
import SettingsHeader from "@calcom/features/settings/appDir/SettingsHeader";
export const generateMetadata = async () =>
await _generateMetadata(
- (t) => t("delegation_credential"),
- (t) => t("delegation_credential_description")
+ (t) => t("domain_wide_delegation"),
+ (t) => t("domain_wide_delegation_description")
);
const Page = async () => {
@@ -15,9 +15,9 @@ const Page = async () => {
return (
<SettingsHeader
borderInShellHeader
- title={t("delegation_credential")}
- description={t("delegation_credential_description")}>
- <DelegationCredentialList />
+ title={t("domain_wide_delegation")}
+ description={t("domain_wide_delegation_description")}>
+ <DomainWideDelegationList />
</SettingsHeader>
);
};
diff --git a/apps/web/app/api/availability/calendar/route.ts b/apps/web/app/api/availability/calendar/route.ts
index 6ccc587a840..06bb7aa1f03 100644
--- a/apps/web/app/api/availability/calendar/route.ts
+++ b/apps/web/app/api/availability/calendar/route.ts
@@ -17,7 +17,7 @@ const selectedCalendarSelectSchema = z.object({
integration: z.string(),
externalId: z.string(),
credentialId: z.coerce.number(),
- delegationCredentialId: z.string().nullish().default(null),
+ domainWideDelegationCredentialId: z.string().nullish().default(null),
eventTypeId: z.coerce.number().nullish(),
});
@@ -65,7 +65,7 @@ async function postHandler(req: NextRequest) {
const user = await authMiddleware();
const body = await req.json();
- const { integration, externalId, credentialId, eventTypeId, delegationCredentialId } =
+ const { integration, externalId, credentialId, eventTypeId, domainWideDelegationCredentialId } =
selectedCalendarSelectSchema.parse(body);
await SelectedCalendarRepository.upsert({
@@ -73,7 +73,7 @@ async function postHandler(req: NextRequest) {
integration,
externalId,
credentialId,
- delegationCredentialId,
+ domainWideDelegationCredentialId,
eventTypeId: eventTypeId ?? null,
});
diff --git a/apps/web/components/getting-started/components/AppConnectionItem.tsx b/apps/web/components/getting-started/components/AppConnectionItem.tsx
index 3066316b01f..174f1941fd4 100644
--- a/apps/web/components/getting-started/components/AppConnectionItem.tsx
+++ b/apps/web/components/getting-started/components/AppConnectionItem.tsx
@@ -113,7 +113,7 @@ const AppConnectionItem = (props: IAppConnectionItem) => {
</Button>
)}
/>
- {/* It is possible that app is already installed here during onboarding due to Delegation Credential enabled at organization level. We allow the user to set it as default */}
+ {/* It is possible that app is already installed here during onboarding due to Domain Wide Delegation enabled at organization level. We allow the user to set it as default */}
{installed && !isDefault && (
<Button
color="secondary"
diff --git a/apps/web/components/getting-started/components/ConnectedCalendarItem.tsx b/apps/web/components/getting-started/components/ConnectedCalendarItem.tsx
index 288c6ea9c79..d3f19043ec4 100644
--- a/apps/web/components/getting-started/components/ConnectedCalendarItem.tsx
+++ b/apps/web/components/getting-started/components/ConnectedCalendarItem.tsx
@@ -14,7 +14,7 @@ interface IConnectedCalendarItem {
userId?: number | undefined;
integration?: string | undefined;
externalId: string;
- delegationCredentialId: string | null;
+ domainWideDelegationCredentialId: string | null;
}[];
}
@@ -62,7 +62,7 @@ const ConnectedCalendarItem = (prop: IConnectedCalendarItem) => {
type={integrationType}
isChecked={calendar.isSelected}
isLastItemInList={i === calendars.length - 1}
- delegationCredentialId={calendar.delegationCredentialId}
+ domainWideDelegationCredentialId={calendar.domainWideDelegationCredentialId}
/>
))}
</ul>
diff --git a/apps/web/components/getting-started/steps-views/ConnectedVideoStep.tsx b/apps/web/components/getting-started/steps-views/ConnectedVideoStep.tsx
index 84581a3cbe3..51caedda58a 100644
--- a/apps/web/components/getting-started/steps-views/ConnectedVideoStep.tsx
+++ b/apps/web/components/getting-started/steps-views/ConnectedVideoStep.tsx
@@ -22,7 +22,7 @@ const ConnectedVideoStep = (props: ConnectedAppStepProps) => {
* Both props together sort by most popular first, then by installed first.
* So, installed apps are always shown at the top, followed by remaining apps sorted by descending popularity.
*
- * This is done because there could be not so popular app already installed by the admin(e.g. through Delegation Credential)
+ * This is done because there could be not so popular app already installed by the admin(e.g. through Domain-Wide Delegation)
* and we want to show it at the top so that user can set it as default if he wants to.
*/
sortByMostPopular: true,
diff --git a/apps/web/pages/api/trpc/delegationCredential/[trpc].ts b/apps/web/pages/api/trpc/delegationCredential/[trpc].ts
deleted file mode 100644
index f1e5acf3c7c..00000000000
--- a/apps/web/pages/api/trpc/delegationCredential/[trpc].ts
+++ /dev/null
@@ -1,4 +0,0 @@
-import { createNextApiHandler } from "@calcom/trpc/server/createNextApiHandler";
-import { delegationCredentialRouter } from "@calcom/trpc/server/routers/viewer/delegationCredential/_router";
-
-export default createNextApiHandler(delegationCredentialRouter);
diff --git a/apps/web/pages/api/trpc/domainWideDelegation/[trpc].ts b/apps/web/pages/api/trpc/domainWideDelegation/[trpc].ts
new file mode 100644
index 00000000000..e3d6a0fd1b5
--- /dev/null
+++ b/apps/web/pages/api/trpc/domainWideDelegation/[trpc].ts
@@ -0,0 +1,4 @@
+import { createNextApiHandler } from "@calcom/trpc/server/createNextApiHandler";
+import { domainWideDelegationRouter } from "@calcom/trpc/server/routers/viewer/domainWideDelegation/_router";
+
+export default createNextApiHandler(domainWideDelegationRouter);
diff --git a/apps/web/public/static/locales/ar/common.json b/apps/web/public/static/locales/ar/common.json
index 5ebee41b6e3..073ad19674b 100644
--- a/apps/web/public/static/locales/ar/common.json
+++ b/apps/web/public/static/locales/ar/common.json
@@ -2269,13 +2269,13 @@
"what_is_this_meeting_about": "عمَّ تدور هذه الجلسة؟",
"add_to_team": "إضافة إلى الفريق",
"remove_users_from_org": "إزالة مستخدمين من مؤسسة",
- "delegation_credential": "بيانات اعتماد التفويض",
- "delegation_credential_description": "تسمح بيانات اعتماد التفويض بإدارة الوصول إلى تقويمات Google Workspace لمؤسستك.",
+ "domain_wide_delegation": "تفويض على مستوى النطاق",
+ "domain_wide_delegation_description": "يتيح لك التفويض على مستوى النطاق إدارة الوصول إلى تقويمات Google Workspace لمؤسستك.",
"add_client_id_in_google_workspace_with_below_scope": "أضف معرف العميل هذا في Google Workspace مع النطاق أدناه",
- "delegation_credential_enabled": "تم تفعيل بيانات اعتماد التفويض",
- "delegation_credential_disabled": "تم تعطيل بيانات اعتماد التفويض",
- "add_delegation_credential": "إضافة بيانات اعتماد التفويض",
- "edit_delegation_credential": "تعديل بيانات اعتماد التفويض",
+ "domain_wide_delegation_enabled": "تم تمكين التفويض على مستوى النطاق",
+ "domain_wide_delegation_disabled": "تم تعطيل التفويض على مستوى النطاق",
+ "add_domain_wide_delegation": "إضافة تفويض على مستوى النطاق",
+ "edit_domain_wide_delegation": "تعديل التفويض على مستوى النطاق",
"domain": "النطاق",
"no_workspace_platforms": "لا توجد منصات عمل",
"workspace_platform": "منصة العمل",
@@ -2287,7 +2287,7 @@
"slug": "المعرف المختصر",
"service_account_key": "مفتاح JSON لحساب الخدمة",
"edit_service_account_key": "تعديل مفتاح JSON لحساب الخدمة",
- "delegation_credential_restricts_adding_more_than_one_installation": "تقيد بيانات اعتماد التفويض إضافة أكثر من تثبيت واحد",
+ "domain_wide_delegation_restricts_adding_more_than_one_installation": "يقيد التفويض على مستوى النطاق إضافة أكثر من تثبيت واحد",
"app_successfully_installed_and_is_using_delegated_credentials": "تم تثبيت التطبيق بنجاح ويستخدم بيانات اعتماد مفوضة",
"remove_users_from_org_confirm": "هل أنت متأكد من أنك تريد إزالة هذا العدد من المستخدمين {{userCount}} من هذه المؤسسة؟",
"remove_users_from_team": "إزالة المستخدمين من الفريق",
@@ -2953,7 +2953,7 @@
"k_bar_ai_error": "حدث خطأ غير متوقع. يرجى المحاولة مرة أخرى لاحقًا",
"select_oAuth_client": "اختر عميل OAuth",
"on_every_instance": "في كل مثيل",
- "delegation_credential_feature_not_enabled": "ميزة بيانات اعتماد التفويض غير مفعلة لمؤسستك",
+ "domain_wide_delegation_feature_not_enabled": "ميزة التفويض على مستوى النطاق غير مفعلة لمؤسستك",
"internal_booking_note": "ملاحظة داخلية",
"internal_note_cancellation_reason": "السبب المشارك مع العميل (اختياري)",
"internal_booking_note_description": "هذه الملاحظة ستكون مرئية فقط لأعضاء فريقك",
diff --git a/apps/web/public/static/locales/az/common.json b/apps/web/public/static/locales/az/common.json
index c37ecac4f4e..e6b54cc3b98 100644
--- a/apps/web/public/static/locales/az/common.json
+++ b/apps/web/public/static/locales/az/common.json
@@ -2269,13 +2269,13 @@
"what_is_this_meeting_about": "Bu görüş nə haqqındadır?",
"add_to_team": "Komandaya əlavə et",
"remove_users_from_org": "İstifadəçiləri təşkilatdan çıxarın",
- "delegation_credential": "Nümayəndəlik etimadnaməsi",
- "delegation_credential_description": "Nümayəndəlik etimadnaməsi təşkilatınız üçün Google Workspace təqvimlərinə girişi idarə etməyə imkan verir.",
+ "domain_wide_delegation": "Domen səviyyəsində səlahiyyət",
+ "domain_wide_delegation_description": "Domen səviyyəsində səlahiyyət təşkilatınız üçün Google Workspace təqvimlərinə girişi idarə etməyə imkan verir.",
"add_client_id_in_google_workspace_with_below_scope": "Bu Client Id-ni aşağıdakı əhatə dairəsi ilə Google Workspace-ə əlavə edin",
- "delegation_credential_enabled": "Nümayəndəlik etimadnaməsi aktivləşdirildi",
- "delegation_credential_disabled": "Nümayəndəlik etimadnaməsi deaktiv edildi",
- "add_delegation_credential": "Nümayəndəlik etimadnaməsi əlavə et",
- "edit_delegation_credential": "Nümayəndəlik etimadnaməsini redaktə et",
+ "domain_wide_delegation_enabled": "Domen səviyyəsində səlahiyyət aktivdir",
+ "domain_wide_delegation_disabled": "Domen səviyyəsində səlahiyyət deaktivdir",
+ "add_domain_wide_delegation": "Domen səviyyəsində səlahiyyət əlavə et",
+ "edit_domain_wide_delegation": "Domen səviyyəsində səlahiyyəti redaktə et",
"domain": "Domen",
"no_workspace_platforms": "İş sahəsi platformaları yoxdur",
"workspace_platform": "İş sahəsi platforması",
@@ -2287,7 +2287,7 @@
"slug": "Slug",
"service_account_key": "Servis hesabı açarı JSON",
"edit_service_account_key": "Servis hesabı açarı JSON-u redaktə et",
- "delegation_credential_restricts_adding_more_than_one_installation": "Nümayəndəlik etimadnaməsi birdən çox quraşdırma əlavə etməyi məhdudlaşdırır",
+ "domain_wide_delegation_restricts_adding_more_than_one_installation": "Domen səviyyəsində səlahiyyət birdən çox quraşdırma əlavə etməyi məhdudlaşdırır",
"app_successfully_installed_and_is_using_delegated_credentials": "Tətbiq uğurla quraşdırıldı və səlahiyyətli etimadnamələrdən istifadə edir",
"remove_users_from_org_confirm": "{{userCount}} istifadəçini bu təşkilatdan çıxarmaq istədiyinizə əminsinizmi?",
"remove_users_from_team": "İstifadəçiləri komandadan çıxarın",
@@ -2953,7 +2953,7 @@
"k_bar_ai_error": "Gözlənilməz bir xəta baş verdi. Zəhmət olmasa bir az sonra yenidən cəhd edin",
"select_oAuth_client": "OAuth müştərisini seçin",
"on_every_instance": "Hər nümunədə",
- "delegation_credential_feature_not_enabled": "Nümayəndəlik etimadnaməsi funksiyası təşkilatınız üçün aktivləşdirilməyib",
+ "domain_wide_delegation_feature_not_enabled": "Domen səviyyəsində səlahiyyət funksiyası təşkilatınız üçün aktivləşdirilməyib",
"internal_booking_note": "Daxili Qeyd",
"internal_note_cancellation_reason": "Müştəri ilə paylaşılan səbəb (istəyə bağlı)",
"internal_booking_note_description": "Bu qeyd yalnız komanda üzvləriniz tərəfindən görünəcək",
diff --git a/apps/web/public/static/locales/bg/common.json b/apps/web/public/static/locales/bg/common.json
index fa3cb1b86e4..422cdf70683 100644
--- a/apps/web/public/static/locales/bg/common.json
+++ b/apps/web/public/static/locales/bg/common.json
@@ -2269,13 +2269,13 @@
"what_is_this_meeting_about": "За какво е тази среща?",
"add_to_team": "Добави към екип",
"remove_users_from_org": "Премахни потребители от организацията",
- "delegation_credential": "Делегирани идентификационни данни",
- "delegation_credential_description": "Делегираните идентификационни данни ви позволяват да управлявате достъпа до календарите на Google Workspace за вашата организация.",
+ "domain_wide_delegation": "Делегиране на ниво домейн",
+ "domain_wide_delegation_description": "Делегирането на ниво домейн ви позволява да управлявате достъпа до Google Workspace календари за вашата организация.",
"add_client_id_in_google_workspace_with_below_scope": "Добавете този Client Id в Google Workspace със следния обхват",
- "delegation_credential_enabled": "Делегираните идентификационни данни са активирани",
- "delegation_credential_disabled": "Делегираните идентификационни данни са деактивирани",
- "add_delegation_credential": "Добавяне на делегирани идентификационни данни",
- "edit_delegation_credential": "Редактиране на делегирани идентификационни данни",
+ "domain_wide_delegation_enabled": "Делегирането на ниво домейн е активирано",
+ "domain_wide_delegation_disabled": "Делегирането на ниво домейн е деактивирано",
+ "add_domain_wide_delegation": "Добавяне на делегиране на ниво домейн",
+ "edit_domain_wide_delegation": "Редактиране на делегиране на ниво домейн",
"domain": "Домейн",
"no_workspace_platforms": "Няма работни платформи",
"workspace_platform": "Работна платформа",
@@ -2287,7 +2287,7 @@
"slug": "Slug",
"service_account_key": "JSON ключ на служебния акаунт",
"edit_service_account_key": "Редактиране на JSON ключа на служебния акаунт",
- "delegation_credential_restricts_adding_more_than_one_installation": "Делегираните идентификационни данни ограничават добавянето на повече от една инсталация",
+ "domain_wide_delegation_restricts_adding_more_than_one_installation": "Делегирането на ниво домейн ограничава добавянето на повече от една инсталация",
"app_successfully_installed_and_is_using_delegated_credentials": "Приложението е успешно инсталирано и използва делегирани идентификационни данни",
"remove_users_from_org_confirm": "Сигурни ли сте, че искате да премахнете {{userCount}} потребители от тази организация?",
"remove_users_from_team": "Премахни потребители от екипа",
@@ -2953,7 +2953,7 @@
"k_bar_ai_error": "Възникна неочаквана грешка. Моля, опитайте отново по-късно",
"select_oAuth_client": "Изберете OAuth клиент",
"on_every_instance": "При всяко изпълнение",
- "delegation_credential_feature_not_enabled": "Функцията за делегирани идентификационни данни не е активирана за вашата организация",
+ "domain_wide_delegation_feature_not_enabled": "Функцията за делегиране на ниво домейн не е активирана за вашата организация",
"internal_booking_note": "Вътрешна бележка",
"internal_note_cancellation_reason": "Причина, споделена с клиента (по избор)",
"internal_booking_note_description": "Тази бележка ще бъде видима само за членовете на вашия екип",
diff --git a/apps/web/public/static/locales/ca/common.json b/apps/web/public/static/locales/ca/common.json
index c65ba7fbb77..59e8fdd595b 100644
--- a/apps/web/public/static/locales/ca/common.json
+++ b/apps/web/public/static/locales/ca/common.json
@@ -2269,13 +2269,13 @@
"what_is_this_meeting_about": "De què tracta aquesta reunió?",
"add_to_team": "Afegir a l'equip",
"remove_users_from_org": "Eliminar usuaris de l'organització",
- "delegation_credential": "Credencial de delegació",
- "delegation_credential_description": "La credencial de delegació us permet gestionar l'accés als calendaris de Google Workspace per a la vostra organització.",
+ "domain_wide_delegation": "Delegació per a tot el domini",
+ "domain_wide_delegation_description": "La delegació per a tot el domini us permet gestionar l'accés als calendaris de Google Workspace per a la vostra organització.",
"add_client_id_in_google_workspace_with_below_scope": "Afegiu aquest ID de client a Google Workspace amb l'abast següent",
- "delegation_credential_enabled": "Credencial de delegació activada",
- "delegation_credential_disabled": "Credencial de delegació desactivada",
- "add_delegation_credential": "Afegir credencial de delegació",
- "edit_delegation_credential": "Editar credencial de delegació",
+ "domain_wide_delegation_enabled": "Delegació per a tot el domini activada",
+ "domain_wide_delegation_disabled": "Delegació per a tot el domini desactivada",
+ "add_domain_wide_delegation": "Afegir delegació per a tot el domini",
+ "edit_domain_wide_delegation": "Editar delegació per a tot el domini",
"domain": "Domini",
"no_workspace_platforms": "No hi ha plataformes de workspace",
"workspace_platform": "Plataforma workspace",
@@ -2287,7 +2287,7 @@
"slug": "Slug",
"service_account_key": "JSON de la clau del compte de servei",
"edit_service_account_key": "Editar JSON de la clau del compte de servei",
- "delegation_credential_restricts_adding_more_than_one_installation": "La credencial de delegació restringeix afegir més d'una instal·lació",
+ "domain_wide_delegation_restricts_adding_more_than_one_installation": "La delegació per a tot el domini restringeix afegir més d'una instal·lació",
"app_successfully_installed_and_is_using_delegated_credentials": "L'aplicació s'ha instal·lat correctament i està utilitzant credencials delegades",
"remove_users_from_org_confirm": "Estàs segur que vols eliminar {{userCount}} usuaris d'aquesta organització?",
"remove_users_from_team": "Eliminar usuaris de l'equip",
@@ -2953,7 +2953,7 @@
"k_bar_ai_error": "S'ha produït un error inesperat. Si us plau, torna-ho a provar més tard",
"select_oAuth_client": "Selecciona el client OAuth",
"on_every_instance": "A cada instància",
- "delegation_credential_feature_not_enabled": "La funcionalitat de credencial de delegació no està activada per a la vostra organització",
+ "domain_wide_delegation_feature_not_enabled": "La funció de delegació per a tot el domini no està activada per a la vostra organització",
"internal_booking_note": "Nota interna",
"internal_note_cancellation_reason": "Motiu compartit amb el client (opcional)",
"internal_booking_note_description": "Aquesta nota només serà visible per als membres del teu equip",
diff --git a/apps/web/public/static/locales/cs/common.json b/apps/web/public/static/locales/cs/common.json
index b37c6c1f4d6..9a88587e0f7 100644
--- a/apps/web/public/static/locales/cs/common.json
+++ b/apps/web/public/static/locales/cs/common.json
@@ -2269,13 +2269,13 @@
"what_is_this_meeting_about": "Čeho se tato schůzka týká?",
"add_to_team": "Přidat do týmu",
"remove_users_from_org": "Odstranění uživatelů z organizace",
- "delegation_credential": "Delegované pověření",
- "delegation_credential_description": "Delegované pověření vám umožňuje spravovat přístup ke kalendářům Google Workspace pro vaši organizaci.",
+ "domain_wide_delegation": "Delegování na úrovni domény",
+ "domain_wide_delegation_description": "Delegování na úrovni domény vám umožňuje spravovat přístup ke kalendářům Google Workspace pro vaši organizaci.",
"add_client_id_in_google_workspace_with_below_scope": "Přidejte toto Client ID do Google Workspace s následujícím rozsahem oprávnění",
- "delegation_credential_enabled": "Delegované pověření povoleno",
- "delegation_credential_disabled": "Delegované pověření zakázáno",
- "add_delegation_credential": "Přidat delegované pověření",
- "edit_delegation_credential": "Upravit delegované pověření",
+ "domain_wide_delegation_enabled": "Delegování na úrovni domény je povoleno",
+ "domain_wide_delegation_disabled": "Delegování na úrovni domény je zakázáno",
+ "add_domain_wide_delegation": "Přidat delegování na úrovni domény",
+ "edit_domain_wide_delegation": "Upravit delegování na úrovni domény",
"domain": "Doména",
"no_workspace_platforms": "Žádné workspace platformy",
"workspace_platform": "Workspace platforma",
@@ -2287,7 +2287,7 @@
"slug": "Slug",
"service_account_key": "JSON klíč servisního účtu",
"edit_service_account_key": "Upravit JSON klíč servisního účtu",
- "delegation_credential_restricts_adding_more_than_one_installation": "Delegované pověření omezuje přidání více než jedné instalace",
+ "domain_wide_delegation_restricts_adding_more_than_one_installation": "Delegování na úrovni domény omezuje přidání více než jedné instalace",
"app_successfully_installed_and_is_using_delegated_credentials": "Aplikace byla úspěšně nainstalována a používá delegované přihlašovací údaje",
"remove_users_from_org_confirm": "Opravdu chcete odebrat uživatele ({{userCount}}) z této organizace?",
"remove_users_from_team": "Odstranit uživatele z týmu",
@@ -2953,7 +2953,7 @@
"k_bar_ai_error": "Došlo k neočekávané chybě. Zkuste to prosím později",
"select_oAuth_client": "Vybrat OAuth klienta",
"on_every_instance": "Na každé instanci",
- "delegation_credential_feature_not_enabled": "Funkce delegovaného pověření není pro vaši organizaci povolena",
+ "domain_wide_delegation_feature_not_enabled": "Funkce delegování na úrovni domény není pro vaši organizaci povolena",
"internal_booking_note": "Interní poznámka",
"internal_note_cancellation_reason": "Důvod sdílený se zákazníkem (volitelné)",
"internal_booking_note_description": "Tato poznámka bude viditelná pouze pro členy vašeho týmu",
diff --git a/apps/web/public/static/locales/da/common.json b/apps/web/public/static/locales/da/common.json
index 5b15d3a4205..5485611e7a2 100644
--- a/apps/web/public/static/locales/da/common.json
+++ b/apps/web/public/static/locales/da/common.json
@@ -2269,13 +2269,13 @@
"what_is_this_meeting_about": "Hvad handler dette møde om?",
"add_to_team": "Tilføj til team",
"remove_users_from_org": "Fjern brugere fra organisation",
- "delegation_credential": "Delegationslegitimation",
- "delegation_credential_description": "Delegationslegitimation giver dig mulighed for at administrere adgang til Google Workspace-kalendere for din organisation.",
+ "domain_wide_delegation": "Domæneomfattende delegation",
+ "domain_wide_delegation_description": "Domæneomfattende delegation giver dig mulighed for at administrere adgang til Google Workspace-kalendere for din organisation.",
"add_client_id_in_google_workspace_with_below_scope": "Tilføj dette klient-id i Google Workspace med nedenstående scope",
- "delegation_credential_enabled": "Delegationslegitimation aktiveret",
- "delegation_credential_disabled": "Delegationslegitimation deaktiveret",
- "add_delegation_credential": "Tilføj delegationslegitimation",
- "edit_delegation_credential": "Rediger delegationslegitimation",
+ "domain_wide_delegation_enabled": "Domæneomfattende delegation aktiveret",
+ "domain_wide_delegation_disabled": "Domæneomfattende delegation deaktiveret",
+ "add_domain_wide_delegation": "Tilføj domæneomfattende delegation",
+ "edit_domain_wide_delegation": "Rediger domæneomfattende delegation",
"domain": "Domæne",
"no_workspace_platforms": "Ingen workspace-platforme",
"workspace_platform": "Workspace-platform",
@@ -2287,7 +2287,7 @@
"slug": "Slug",
"service_account_key": "Servicekontonøgle JSON",
"edit_service_account_key": "Rediger servicekontonøgle JSON",
- "delegation_credential_restricts_adding_more_than_one_installation": "Delegationslegitimation begrænser tilføjelse af mere end én installation",
+ "domain_wide_delegation_restricts_adding_more_than_one_installation": "Domæneomfattende delegation begrænser tilføjelse af mere end én installation",
"app_successfully_installed_and_is_using_delegated_credentials": "Appen er installeret og bruger delegerede legitimationsoplysninger",
"remove_users_from_org_confirm": "Er du sikker på, at du vil fjerne {{userCount}} brugere fra denne organisation?",
"remove_users_from_team": "Fjern brugere fra teamet",
@@ -2953,7 +2953,7 @@
"k_bar_ai_error": "Der opstod en uventet fejl. Prøv venligst igen senere",
"select_oAuth_client": "Vælg OAuth-klient",
"on_every_instance": "På hver forekomst",
- "delegation_credential_feature_not_enabled": "Delegationslegitimationsfunktionen er ikke aktiveret for din organisation",
+ "domain_wide_delegation_feature_not_enabled": "Funktionen for domæneomfattende delegation er ikke aktiveret for din organisation",
"internal_booking_note": "Intern note",
"internal_note_cancellation_reason": "Årsag delt med kunden (valgfrit)",
"internal_booking_note_description": "Denne note vil kun være synlig for medlemmer af dit team",
diff --git a/apps/web/public/static/locales/de/common.json b/apps/web/public/static/locales/de/common.json
index ded223274da..601c1d040bd 100644
--- a/apps/web/public/static/locales/de/common.json
+++ b/apps/web/public/static/locales/de/common.json
@@ -2269,13 +2269,13 @@
"what_is_this_meeting_about": "Worum geht es in diesem Termin?",
"add_to_team": "Zum Team hinzufügen",
"remove_users_from_org": "Benutzer aus der Organisation entfernen",
- "delegation_credential": "Delegierungsnachweis",
- "delegation_credential_description": "Der Delegierungsnachweis ermöglicht es Ihnen, den Zugriff auf Google Workspace-Kalender für Ihre Organisation zu verwalten.",
+ "domain_wide_delegation": "Organisationsweite Berechtigung",
+ "domain_wide_delegation_description": "Die organisationsweite Berechtigung ermöglicht es Ihnen, den Zugriff auf Google Workspace-Kalender für Ihre Organisation zu verwalten.",
"add_client_id_in_google_workspace_with_below_scope": "Fügen Sie diese Client-ID in Google Workspace mit dem folgenden Bereich hinzu",
- "delegation_credential_enabled": "Delegierungsnachweis aktiviert",
- "delegation_credential_disabled": "Delegierungsnachweis deaktiviert",
- "add_delegation_credential": "Delegierungsnachweis hinzufügen",
- "edit_delegation_credential": "Delegierungsnachweis bearbeiten",
+ "domain_wide_delegation_enabled": "Organisationsweite Berechtigung aktiviert",
+ "domain_wide_delegation_disabled": "Organisationsweite Berechtigung deaktiviert",
+ "add_domain_wide_delegation": "Organisationsweite Berechtigung hinzufügen",
+ "edit_domain_wide_delegation": "Organisationsweite Berechtigung bearbeiten",
"domain": "Domain",
"no_workspace_platforms": "Keine Workspace-Plattformen",
"workspace_platform": "Workspace-Plattform",
@@ -2287,7 +2287,7 @@
"slug": "Slug",
"service_account_key": "Servicekonto-Schlüssel JSON",
"edit_service_account_key": "Servicekonto-Schlüssel JSON bearbeiten",
- "delegation_credential_restricts_adding_more_than_one_installation": "Der Delegierungsnachweis beschränkt das Hinzufügen von mehr als einer Installation",
+ "domain_wide_delegation_restricts_adding_more_than_one_installation": "Die organisationsweite Berechtigung beschränkt das Hinzufügen auf eine Installation",
"app_successfully_installed_and_is_using_delegated_credentials": "App erfolgreich installiert und verwendet delegierte Anmeldeinformationen",
"remove_users_from_org_confirm": "Sind Sie sicher, dass Sie {{userCount}} Benutzer aus dieser Organisation entfernen möchten?",
"remove_users_from_team": "Benutzer aus Team entfernen",
@@ -2953,7 +2953,7 @@
"k_bar_ai_error": "Ein unerwarteter Fehler ist aufgetreten. Bitte versuchen Sie es später erneut",
"select_oAuth_client": "OAuth-Client auswählen",
"on_every_instance": "Bei jeder Instanz",
- "delegation_credential_feature_not_enabled": "Die Funktion für den Delegierungsnachweis ist für Ihre Organisation nicht aktiviert",
+ "domain_wide_delegation_feature_not_enabled": "Die Funktion für organisationsweite Berechtigung ist für Ihre Organisation nicht aktiviert",
"internal_booking_note": "Interner Vermerk",
"internal_note_cancellation_reason": "Grund, der dem Kunden mitgeteilt wird (optional)",
"internal_booking_note_description": "Dieser Vermerk ist nur für Mitglieder deines Teams sichtbar",
diff --git a/apps/web/public/static/locales/el/common.json b/apps/web/public/static/locales/el/common.json
index 4dd7a749ac9..22c4b1d4030 100644
--- a/apps/web/public/static/locales/el/common.json
+++ b/apps/web/public/static/locales/el/common.json
@@ -2269,13 +2269,13 @@
"what_is_this_meeting_about": "Ποιο είναι το θέμα της συνάντησης;",
"add_to_team": "Προσθήκη στην ομάδα",
"remove_users_from_org": "Αφαίρεση χρηστών από τον οργανισμό",
- "delegation_credential": "Διαπιστευτήριο εξουσιοδότησης",
- "delegation_credential_description": "Το διαπιστευτήριο εξουσιοδότησης σας επιτρέπει να διαχειρίζεστε την πρόσβαση στα ημερολόγια του Google Workspace για τον οργανισμό σας.",
+ "domain_wide_delegation": "Εξουσιοδότηση σε επίπεδο τομέα",
+ "domain_wide_delegation_description": "Η εξουσιοδότηση σε επίπεδο τομέα σας επιτρέπει να διαχειρίζεστε την πρόσβαση στα ημερολόγια του Google Workspace για τον οργανισμό σας.",
"add_client_id_in_google_workspace_with_below_scope": "Προσθέστε αυτό το Client Id στο Google Workspace με το παρακάτω scope",
- "delegation_credential_enabled": "Το διαπιστευτήριο εξουσιοδότησης είναι ενεργοποιημένο",
- "delegation_credential_disabled": "Το διαπιστευτήριο εξουσιοδότησης είναι απενεργοποιημένο",
- "add_delegation_credential": "Προσθήκη διαπιστευτηρίου εξουσιοδότησης",
- "edit_delegation_credential": "Επεξεργασία διαπιστευτηρίου εξουσιοδότησης",
+ "domain_wide_delegation_enabled": "Η εξουσιοδότηση σε επίπεδο τομέα είναι ενεργοποιημένη",
+ "domain_wide_delegation_disabled": "Η εξουσιοδότηση σε επίπεδο τομέα είναι απενεργοποιημένη",
+ "add_domain_wide_delegation": "Προσθήκη εξουσιοδότησης σε επίπεδο τομέα",
+ "edit_domain_wide_delegation": "Επεξεργασία εξουσιοδότησης σε επίπεδο τομέα",
"domain": "Τομέας",
"no_workspace_platforms": "Δεν υπάρχουν πλατφόρμες workspace",
"workspace_platform": "Πλατφόρμα workspace",
@@ -2287,7 +2287,7 @@
"slug": "Slug",
"service_account_key": "JSON κλειδιού λογαριασμού υπηρεσίας",
"edit_service_account_key": "Επεξεργασία JSON κλειδιού λογαριασμού υπηρεσίας",
- "delegation_credential_restricts_adding_more_than_one_installation": "Το διαπιστευτήριο εξουσιοδότησης περιορίζει την προσθήκη περισσότερων από μία εγκαταστάσεις",
+ "domain_wide_delegation_restricts_adding_more_than_one_installation": "Η εξουσιοδότηση σε επίπεδο τομέα περιορίζει την προσθήκη περισσότερων από μία εγκαταστάσεων",
"app_successfully_installed_and_is_using_delegated_credentials": "Η εφαρμογή εγκαταστάθηκε επιτυχώς και χρησιμοποιεί διαπιστευτήρια εξουσιοδότησης",
"remove_users_from_org_confirm": "Είστε βέβαιοι ότι θέλετε να αφαιρέσετε {{userCount}} χρήστες από αυτόν τον οργανισμό;",
"remove_users_from_team": "Αφαίρεση χρηστών από την ομάδα",
@@ -2953,7 +2953,7 @@
"k_bar_ai_error": "Παρουσιάστηκε ένα απρόσμενο σφάλμα. Παρακαλώ δοκιμάστε ξανά αργότερα",
"select_oAuth_client": "Επιλέξτε OAuth Client",
"on_every_instance": "Σε κάθε περίπτωση",
- "delegation_credential_feature_not_enabled": "Η λειτουργία διαπιστευτηρίου εξουσιοδότησης δεν είναι ενεργοποιημένη για τον οργανισμό σας",
+ "domain_wide_delegation_feature_not_enabled": "Η λειτουργία εξουσιοδότησης σε επίπεδο τομέα δεν είναι ενεργοποιημένη για τον οργανισμό σας",
"internal_booking_note": "Εσωτερική σημείωση",
"internal_note_cancellation_reason": "Λόγος που θα κοινοποιηθεί στον πελάτη (προαιρετικό)",
"internal_booking_note_description": "Αυτή η σημείωση θα είναι ορατή μόνο στα μέλη της ομάδας σας",
diff --git a/apps/web/public/static/locales/en/common.json b/apps/web/public/static/locales/en/common.json
index c209bab9b82..6c1c1363d8b 100644
--- a/apps/web/public/static/locales/en/common.json
+++ b/apps/web/public/static/locales/en/common.json
@@ -2269,25 +2269,25 @@
"what_is_this_meeting_about": "What is this meeting about?",
"add_to_team": "Add to team",
"remove_users_from_org": "Remove users from organization",
- "delegation_credential": "Delegation credential",
- "delegation_credential_description": "Delegation credential allows you to manage access to Google Workspace calendars for your organization.",
+ "domain_wide_delegation": "Domain-wide delegation",
+ "domain_wide_delegation_description": "Domain-wide delegation allows you to manage access to Google Workspace calendars for your organization.",
"add_client_id_in_google_workspace_with_below_scope": "Add this Client Id in Google Workspace with the scope below",
- "delegation_credential_enabled": "Delegation credential enabled",
- "delegation_credential_disabled": "Delegation credential disabled",
- "add_delegation_credential": "Add delegation credential",
- "edit_delegation_credential": "Edit delegation credential",
+ "domain_wide_delegation_enabled": "Domain-wide delegation enabled",
+ "domain_wide_delegation_disabled": "Domain-wide delegation disabled",
+ "add_domain_wide_delegation": "Add domain-wide delegation",
+ "edit_domain_wide_delegation": "Edit domain-wide delegation",
"domain": "Domain",
"no_workspace_platforms": "No workspace platforms",
"workspace_platform": "Workspace platform",
"workspace_platforms": "Workspace platforms",
- "workspace_platforms_description": "Manage workspace platforms that can be used for delegation credential",
+ "workspace_platforms_description": "Manage workspace platforms that can be used for domain-wide delegation",
"edit_workspace_platform": "Edit workspace platform",
"edit_service_account": "Edit service account",
"add_workspace_platform": "Add workspace platform",
"slug": "Slug",
"service_account_key": "Service account key JSON",
"edit_service_account_key": "Edit service account key JSON",
- "delegation_credential_restricts_adding_more_than_one_installation": "Delegation credential restricts adding more than one installation",
+ "domain_wide_delegation_restricts_adding_more_than_one_installation": "Domain-wide delegation restricts adding more than one installation",
"app_successfully_installed_and_is_using_delegated_credentials": "App successfully installed and is using delegated credentials",
"remove_users_from_org_confirm": "Are you sure you want to remove {{userCount}} users from this organization?",
"remove_users_from_team": "Remove users from team",
@@ -2744,24 +2744,24 @@
"booking_limits_updated_successfully": "Booking limits updated successfully",
"you_are_unauthorized_to_make_this_change_to_the_booking": "You are unauthorized to make this change to the booking",
"add_client_id_in_google_workspace_with_below_scope": "Add this Client Id in Google Workspace with the scope below",
- "delegation_credential": "Delegation credential",
- "delegation_credential_enabled": "Delegation credential enabled",
- "delegation_credential_disabled": "Delegation credential disabled",
- "delegation_credential_description": "Delegation credential allows you to manage access to Google Workspace calendars for your organization.",
- "add_delegation_credential": "Add delegation credential",
- "edit_delegation_credential": "Edit delegation credential",
+ "domain_wide_delegation": "Domain-wide delegation",
+ "domain_wide_delegation_enabled": "Domain-wide delegation enabled",
+ "domain_wide_delegation_disabled": "Domain-wide delegation disabled",
+ "domain_wide_delegation_description": "Domain-wide delegation allows you to manage access to Google Workspace calendars for your organization.",
+ "add_domain_wide_delegation": "Add domain-wide delegation",
+ "edit_domain_wide_delegation": "Edit domain-wide delegation",
"domain": "Domain",
"no_workspace_platforms": "No workspace platforms",
"workspace_platform": "Workspace platform",
"workspace_platforms": "Workspace platforms",
- "workspace_platforms_description": "Manage workspace platforms that can be used for delegation credential",
+ "workspace_platforms_description": "Manage workspace platforms that can be used for domain-wide delegation",
"edit_workspace_platform": "Edit workspace platform",
"edit_service_account": "Edit service account",
"add_workspace_platform": "Add workspace platform",
"slug": "Slug",
"service_account_key": "Service account key JSON",
"edit_service_account_key": "Edit service account key JSON",
- "delegation_credential_restricts_adding_more_than_one_installation": "Delegation credential restricts adding more than one installation",
+ "domain_wide_delegation_restricts_adding_more_than_one_installation": "Domain-wide delegation restricts adding more than one installation",
"app_successfully_installed_and_is_using_delegated_credentials": "App successfully installed and is using delegated credentials",
"matching_members": "Matching members",
"x_matching_members": "{{x}} matching members",
@@ -2973,7 +2973,7 @@
"k_bar_ai_error": "An unexpected error occured. Please try again later",
"select_oAuth_client": "Select Oauth Client",
"on_every_instance": "On every instance",
- "delegation_credential_feature_not_enabled": "Delegation credential feature is not enabled for your organization",
+ "domain_wide_delegation_feature_not_enabled": "Domain-wide delegation feature is not enabled for your organization",
"internal_booking_note": "Internal Note",
"internal_note_cancellation_reason": "Reason shared with customer (optional)",
"internal_booking_note_description": "This note will be visible to only members of your team",
diff --git a/apps/web/public/static/locales/es-419/common.json b/apps/web/public/static/locales/es-419/common.json
index 8e5636506e5..c48e898b3af 100644
--- a/apps/web/public/static/locales/es-419/common.json
+++ b/apps/web/public/static/locales/es-419/common.json
@@ -2269,13 +2269,13 @@
"what_is_this_meeting_about": "¿De qué se trata esta reunión?",
"add_to_team": "Agregar al equipo",
"remove_users_from_org": "Eliminar usuarios de la organización",
- "delegation_credential": "Credencial de delegación",
- "delegation_credential_description": "La credencial de delegación te permite administrar el acceso a los calendarios de Google Workspace para tu organización.",
+ "domain_wide_delegation": "Delegación a nivel de dominio",
+ "domain_wide_delegation_description": "La delegación a nivel de dominio te permite gestionar el acceso a los calendarios de Google Workspace para tu organización.",
"add_client_id_in_google_workspace_with_below_scope": "Agrega este ID de cliente en Google Workspace con el siguiente alcance",
- "delegation_credential_enabled": "Credencial de delegación habilitada",
- "delegation_credential_disabled": "Credencial de delegación deshabilitada",
- "add_delegation_credential": "Agregar credencial de delegación",
- "edit_delegation_credential": "Editar credencial de delegación",
+ "domain_wide_delegation_enabled": "Delegación a nivel de dominio habilitada",
+ "domain_wide_delegation_disabled": "Delegación a nivel de dominio deshabilitada",
+ "add_domain_wide_delegation": "Agregar delegación a nivel de dominio",
+ "edit_domain_wide_delegation": "Editar delegación a nivel de dominio",
"domain": "Dominio",
"no_workspace_platforms": "No hay plataformas de workspace",
"workspace_platform": "Plataforma de workspace",
@@ -2287,7 +2287,7 @@
"slug": "Slug",
"service_account_key": "JSON de la clave de cuenta de servicio",
"edit_service_account_key": "Editar JSON de la clave de cuenta de servicio",
- "delegation_credential_restricts_adding_more_than_one_installation": "La credencial de delegación restringe agregar más de una instalación",
+ "domain_wide_delegation_restricts_adding_more_than_one_installation": "La delegación a nivel de dominio restringe agregar más de una instalación",
"app_successfully_installed_and_is_using_delegated_credentials": "La aplicación se instaló correctamente y está usando credenciales delegadas",
"remove_users_from_org_confirm": "¿Estás seguro de que deseas eliminar a {{userCount}} usuarios de esta organización?",
"remove_users_from_team": "Eliminar usuarios del equipo",
@@ -2953,7 +2953,7 @@
"k_bar_ai_error": "Ocurrió un error inesperado. Por favor, inténtalo de nuevo más tarde",
"select_oAuth_client": "Seleccionar cliente OAuth",
"on_every_instance": "En cada instancia",
- "delegation_credential_feature_not_enabled": "La función de credencial de delegación no está habilitada para tu organización",
+ "domain_wide_delegation_feature_not_enabled": "La función de delegación a nivel de dominio no está habilitada para tu organización",
"internal_booking_note": "Nota interna",
"internal_note_cancellation_reason": "Motivo compartido con el cliente (opcional)",
"internal_booking_note_description": "Esta nota será visible solo para los miembros de tu equipo",
diff --git a/apps/web/public/static/locales/es/common.json b/apps/web/public/static/locales/es/common.json
index bad909732ae..0ce6cc667ba 100644
--- a/apps/web/public/static/locales/es/common.json
+++ b/apps/web/public/static/locales/es/common.json
@@ -2269,13 +2269,13 @@
"what_is_this_meeting_about": "¿De qué trata esta reunión?",
"add_to_team": "Agregar al equipo",
"remove_users_from_org": "Eliminar usuarios de la organización",
- "delegation_credential": "Credencial de delegación",
- "delegation_credential_description": "La credencial de delegación te permite gestionar el acceso a los calendarios de Google Workspace para tu organización.",
+ "domain_wide_delegation": "Delegación a nivel de dominio",
+ "domain_wide_delegation_description": "La delegación a nivel de dominio te permite gestionar el acceso a los calendarios de Google Workspace para tu organización.",
"add_client_id_in_google_workspace_with_below_scope": "Añade este ID de cliente en Google Workspace con el siguiente alcance",
- "delegation_credential_enabled": "Credencial de delegación habilitada",
- "delegation_credential_disabled": "Credencial de delegación deshabilitada",
- "add_delegation_credential": "Añadir credencial de delegación",
- "edit_delegation_credential": "Editar credencial de delegación",
+ "domain_wide_delegation_enabled": "Delegación a nivel de dominio activada",
+ "domain_wide_delegation_disabled": "Delegación a nivel de dominio desactivada",
+ "add_domain_wide_delegation": "Añadir delegación a nivel de dominio",
+ "edit_domain_wide_delegation": "Editar delegación a nivel de dominio",
"domain": "Dominio",
"no_workspace_platforms": "No hay plataformas de trabajo",
"workspace_platform": "Plataforma de trabajo",
@@ -2287,7 +2287,7 @@
"slug": "Slug",
"service_account_key": "JSON de la clave de cuenta de servicio",
"edit_service_account_key": "Editar JSON de la clave de cuenta de servicio",
- "delegation_credential_restricts_adding_more_than_one_installation": "La credencial de delegación restringe añadir más de una instalación",
+ "domain_wide_delegation_restricts_adding_more_than_one_installation": "La delegación a nivel de dominio restringe añadir más de una instalación",
"app_successfully_installed_and_is_using_delegated_credentials": "Aplicación instalada correctamente y está usando credenciales delegadas",
"remove_users_from_org_confirm": "¿Está seguro de que desea eliminar {{userCount}} usuarios de esta organización?",
"remove_users_from_team": "Eliminar usuarios del equipo",
@@ -2953,7 +2953,7 @@
"k_bar_ai_error": "Ocurrió un error inesperado. Por favor, inténtalo de nuevo más tarde",
"select_oAuth_client": "Seleccionar cliente OAuth",
"on_every_instance": "En cada instancia",
- "delegation_credential_feature_not_enabled": "La función de credencial de delegación no está habilitada para tu organización",
+ "domain_wide_delegation_feature_not_enabled": "La función de delegación a nivel de dominio no está habilitada para tu organización",
"internal_booking_note": "Nota interna",
"internal_note_cancellation_reason": "Motivo compartido con el cliente (opcional)",
"internal_booking_note_description": "Esta nota solo será visible para los miembros de tu equipo",
diff --git a/apps/web/public/static/locales/et/common.json b/apps/web/public/static/locales/et/common.json
index d7cf79ed15a..1cfce29507c 100644
--- a/apps/web/public/static/locales/et/common.json
+++ b/apps/web/public/static/locales/et/common.json
@@ -2269,13 +2269,13 @@
"what_is_this_meeting_about": "Millest see kohtumine räägib?",
"add_to_team": "Lisa meeskonda",
"remove_users_from_org": "Eemalda kasutajad organisatsioonist",
- "delegation_credential": "Delegeerimise volitus",
- "delegation_credential_description": "Delegeerimise volitus võimaldab teil hallata juurdepääsu Google Workspace'i kalendritele oma organisatsioonis.",
+ "domain_wide_delegation": "Domeeniülene delegeerimine",
+ "domain_wide_delegation_description": "Domeeniülene delegeerimine võimaldab hallata juurdepääsu Google Workspace'i kalendritele teie organisatsioonis.",
"add_client_id_in_google_workspace_with_below_scope": "Lisa see kliendi ID Google Workspace'i järgmise ulatusega",
- "delegation_credential_enabled": "Delegeerimise volitus on lubatud",
- "delegation_credential_disabled": "Delegeerimise volitus on keelatud",
- "add_delegation_credential": "Lisa delegeerimise volitus",
- "edit_delegation_credential": "Muuda delegeerimise volitust",
+ "domain_wide_delegation_enabled": "Domeeniülene delegeerimine on lubatud",
+ "domain_wide_delegation_disabled": "Domeeniülene delegeerimine on keelatud",
+ "add_domain_wide_delegation": "Lisa domeeniülene delegeerimine",
+ "edit_domain_wide_delegation": "Muuda domeeniülest delegeerimist",
"domain": "Domeen",
"no_workspace_platforms": "Tööruumi platvormid puuduvad",
"workspace_platform": "Tööruumi platvorm",
@@ -2287,7 +2287,7 @@
"slug": "Slug",
"service_account_key": "Teenusekonto võtme JSON",
"edit_service_account_key": "Muuda teenusekonto võtme JSON-i",
- "delegation_credential_restricts_adding_more_than_one_installation": "Delegeerimise volitus piirab rohkem kui ühe installatsiooni lisamist",
+ "domain_wide_delegation_restricts_adding_more_than_one_installation": "Domeeniülene delegeerimine piirab rohkem kui ühe installimise lisamist",
"app_successfully_installed_and_is_using_delegated_credentials": "Rakendus on edukalt installitud ja kasutab delegeeritud volitusi",
"remove_users_from_org_confirm": "Kas soovite kindlasti eemaldada sellest organisatsioonist {{userCount}} kasutajat?",
"remove_users_from_team": "Eemalda kasutajad meeskonnast",
@@ -2953,7 +2953,7 @@
"k_bar_ai_error": "Ilmnes ootamatu viga. Palun proovi hiljem uuesti",
"select_oAuth_client": "Vali OAuth klient",
"on_every_instance": "Igal korral",
- "delegation_credential_feature_not_enabled": "Delegeerimise volituse funktsioon ei ole teie organisatsiooni jaoks lubatud",
+ "domain_wide_delegation_feature_not_enabled": "Domeeniülese delegeerimise funktsioon ei ole teie organisatsiooni jaoks lubatud",
"internal_booking_note": "Sisemine märkus",
"internal_note_cancellation_reason": "Kliendiga jagatav põhjus (valikuline)",
"internal_booking_note_description": "See märkus on nähtav ainult teie meeskonna liikmetele",
diff --git a/apps/web/public/static/locales/eu/common.json b/apps/web/public/static/locales/eu/common.json
index 3e61a51abe6..12e4951c69d 100644
--- a/apps/web/public/static/locales/eu/common.json
+++ b/apps/web/public/static/locales/eu/common.json
@@ -2269,13 +2269,13 @@
"what_is_this_meeting_about": "Zeri buruzko bilera da hau?",
"add_to_team": "Taldera gehitu",
"remove_users_from_org": "Erabiltzaileak erakundetik kendu",
- "delegation_credential": "Eskuordetze kredentzialak",
- "delegation_credential_description": "Eskuordetze kredentzialek zure erakundearentzat Google Workspace egutegietarako sarbidea kudeatzea ahalbidetzen dute.",
+ "domain_wide_delegation": "Domeinuaren eskuordetzea",
+ "domain_wide_delegation_description": "Domeinuaren eskuordetzeak zure erakundeko Google Workspace egutegietarako sarbidea kudeatzeko aukera ematen dizu.",
"add_client_id_in_google_workspace_with_below_scope": "Gehitu bezero ID hau Google Workspace-n beheko esparruarekin",
- "delegation_credential_enabled": "Eskuordetze kredentzialak gaituta",
- "delegation_credential_disabled": "Eskuordetze kredentzialak desgaituta",
- "add_delegation_credential": "Gehitu eskuordetze kredentzialak",
- "edit_delegation_credential": "Editatu eskuordetze kredentzialak",
+ "domain_wide_delegation_enabled": "Domeinuaren eskuordetzea gaituta",
+ "domain_wide_delegation_disabled": "Domeinuaren eskuordetzea desgaituta",
+ "add_domain_wide_delegation": "Gehitu domeinuaren eskuordetzea",
+ "edit_domain_wide_delegation": "Editatu domeinuaren eskuordetzea",
"domain": "Domeinua",
"no_workspace_platforms": "Ez dago workspace plataformarik",
"workspace_platform": "Workspace plataforma",
@@ -2287,7 +2287,7 @@
"slug": "Slug",
"service_account_key": "Zerbitzu kontuaren gako JSON",
"edit_service_account_key": "Editatu zerbitzu kontuaren gako JSON",
- "delegation_credential_restricts_adding_more_than_one_installation": "Eskuordetze kredentzialek instalazio bat baino gehiago gehitzea mugatzen dute",
+ "domain_wide_delegation_restricts_adding_more_than_one_installation": "Domeinuaren eskuordetzeak instalazio bat baino gehiago gehitzea mugatzen du",
"app_successfully_installed_and_is_using_delegated_credentials": "Aplikazioa ongi instalatu da eta eskuordetutako kredentzialak erabiltzen ari da",
"remove_users_from_org_confirm": "Ziur zaude {{userCount}} erabiltzaile erakunde honetatik kendu nahi dituzula?",
"remove_users_from_team": "Erabiltzaileak taldetik kendu",
@@ -2953,7 +2953,7 @@
"k_bar_ai_error": "Ustekabeko errore bat gertatu da. Mesedez, saiatu berriro geroago",
"select_oAuth_client": "Hautatu OAuth bezeroa",
"on_every_instance": "Instantzia bakoitzean",
- "delegation_credential_feature_not_enabled": "Eskuordetze kredentzialen eginbidea ez dago gaituta zure erakundearentzat",
+ "domain_wide_delegation_feature_not_enabled": "Domeinuaren eskuordetzea ez dago gaituta zure erakundearentzat",
"internal_booking_note": "Barne-oharra",
"internal_note_cancellation_reason": "Bezeroari jakinarazitako arrazoia (aukerakoa)",
"internal_booking_note_description": "Ohar hau zure taldeko kideek soilik ikusiko dute",
diff --git a/apps/web/public/static/locales/fi/common.json b/apps/web/public/static/locales/fi/common.json
index a6a3311349c..b6ce7ea9df6 100644
--- a/apps/web/public/static/locales/fi/common.json
+++ b/apps/web/public/static/locales/fi/common.json
@@ -2269,13 +2269,13 @@
"what_is_this_meeting_about": "Mikä on tapaamisen aihe?",
"add_to_team": "Lisää tiimiin",
"remove_users_from_org": "Poista käyttäjät organisaatiosta",
- "delegation_credential": "Delegointitunniste",
- "delegation_credential_description": "Delegointitunniste mahdollistaa Google Workspace -kalenterien käyttöoikeuksien hallinnan organisaatiollesi.",
+ "domain_wide_delegation": "Toimialueen laajuinen valtuutus",
+ "domain_wide_delegation_description": "Toimialueen laajuinen valtuutus mahdollistaa Google Workspace -kalenterien käyttöoikeuksien hallinnan organisaatiossasi.",
"add_client_id_in_google_workspace_with_below_scope": "Lisää tämä asiakastunnus Google Workspaceen alla olevalla käyttöoikeudella",
- "delegation_credential_enabled": "Delegointitunniste käytössä",
- "delegation_credential_disabled": "Delegointitunniste pois käytöstä",
- "add_delegation_credential": "Lisää delegointitunniste",
- "edit_delegation_credential": "Muokkaa delegointitunnistetta",
+ "domain_wide_delegation_enabled": "Toimialueen laajuinen valtuutus käytössä",
+ "domain_wide_delegation_disabled": "Toimialueen laajuinen valtuutus pois käytöstä",
+ "add_domain_wide_delegation": "Lisää toimialueen laajuinen valtuutus",
+ "edit_domain_wide_delegation": "Muokkaa toimialueen laajuista valtuutusta",
"domain": "Toimialue",
"no_workspace_platforms": "Ei työtila-alustoja",
"workspace_platform": "Työtila-alusta",
@@ -2287,7 +2287,7 @@
"slug": "Slug",
"service_account_key": "Palvelutilin avain JSON",
"edit_service_account_key": "Muokkaa palvelutilin avaimen JSONia",
- "delegation_credential_restricts_adding_more_than_one_installation": "Delegointitunniste rajoittaa useamman kuin yhden asennuksen lisäämistä",
+ "domain_wide_delegation_restricts_adding_more_than_one_installation": "Toimialueen laajuinen valtuutus rajoittaa useamman kuin yhden asennuksen lisäämistä",
"app_successfully_installed_and_is_using_delegated_credentials": "Sovellus asennettu onnistuneesti ja käyttää delegoituja tunnistetietoja",
"remove_users_from_org_confirm": "Haluatko varmasti poistaa {{userCount}} käyttäjää tästä organisaatiosta?",
"remove_users_from_team": "Poista käyttäjät tiimistä",
@@ -2953,7 +2953,7 @@
"k_bar_ai_error": "Tapahtui odottamaton virhe. Yritä myöhemmin uudelleen",
"select_oAuth_client": "Valitse OAuth-asiakassovellus",
"on_every_instance": "Jokaisessa instanssissa",
- "delegation_credential_feature_not_enabled": "Delegointitunniste-ominaisuus ei ole käytössä organisaatiollesi",
+ "domain_wide_delegation_feature_not_enabled": "Toimialueen laajuisen valtuutuksen ominaisuus ei ole käytössä organisaatiossasi",
"internal_booking_note": "Sisäinen muistiinpano",
"internal_note_cancellation_reason": "Asiakkaalle jaettava syy (valinnainen)",
"internal_booking_note_description": "Tämä muistiinpano näkyy vain tiimisi jäsenille",
diff --git a/apps/web/public/static/locales/fr/common.json b/apps/web/public/static/locales/fr/common.json
index 236fc6d8e12..cecda0d040e 100644
--- a/apps/web/public/static/locales/fr/common.json
+++ b/apps/web/public/static/locales/fr/common.json
@@ -2269,13 +2269,13 @@
"what_is_this_meeting_about": "En quoi consiste ce rendez-vous ?",
"add_to_team": "Ajouter à l'équipe",
"remove_users_from_org": "Supprimer des utilisateurs de l'organisation",
- "delegation_credential": "Identifiant de délégation",
- "delegation_credential_description": "L'identifiant de délégation vous permet de gérer l'accès aux calendriers Google Workspace pour votre organisation.",
+ "domain_wide_delegation": "Délégation à l'échelle du domaine",
+ "domain_wide_delegation_description": "La délégation à l'échelle du domaine vous permet de gérer l'accès aux calendriers Google Workspace pour votre organisation.",
"add_client_id_in_google_workspace_with_below_scope": "Ajoutez cet identifiant client dans Google Workspace avec la portée ci-dessous",
- "delegation_credential_enabled": "Identifiant de délégation activé",
- "delegation_credential_disabled": "Identifiant de délégation désactivé",
- "add_delegation_credential": "Ajouter un identifiant de délégation",
- "edit_delegation_credential": "Modifier l'identifiant de délégation",
+ "domain_wide_delegation_enabled": "Délégation à l'échelle du domaine activée",
+ "domain_wide_delegation_disabled": "Délégation à l'échelle du domaine désactivée",
+ "add_domain_wide_delegation": "Ajouter une délégation à l'échelle du domaine",
+ "edit_domain_wide_delegation": "Modifier la délégation à l'échelle du domaine",
"domain": "Domaine",
"no_workspace_platforms": "Aucune plateforme workspace",
"workspace_platform": "Plateforme workspace",
@@ -2287,7 +2287,7 @@
"slug": "Slug",
"service_account_key": "Clé JSON du compte de service",
"edit_service_account_key": "Modifier la clé JSON du compte de service",
- "delegation_credential_restricts_adding_more_than_one_installation": "L'identifiant de délégation limite l'ajout à une seule installation",
+ "domain_wide_delegation_restricts_adding_more_than_one_installation": "La délégation à l'échelle du domaine limite l'ajout à une seule installation",
"app_successfully_installed_and_is_using_delegated_credentials": "L'application a été installée avec succès et utilise les identifiants délégués",
"remove_users_from_org_confirm": "Voulez-vous vraiment supprimer {{userCount}} utilisateurs de cette organisation ?",
"remove_users_from_team": "Retirer des utilisateurs de l'équipe",
@@ -2953,7 +2953,7 @@
"k_bar_ai_error": "Une erreur inattendue s'est produite. Veuillez réessayer plus tard",
"select_oAuth_client": "Sélectionner le client OAuth",
"on_every_instance": "Sur chaque instance",
- "delegation_credential_feature_not_enabled": "La fonctionnalité d'identifiant de délégation n'est pas activée pour votre organisation",
+ "domain_wide_delegation_feature_not_enabled": "La fonctionnalité de délégation à l'échelle du domaine n'est pas activée pour votre organisation",
"internal_booking_note": "Note interne",
"internal_note_cancellation_reason": "Raison partagée avec le client (facultatif)",
"internal_booking_note_description": "Cette note sera visible uniquement par les membres de votre équipe",
diff --git a/apps/web/public/static/locales/he/common.json b/apps/web/public/static/locales/he/common.json
index 55661837521..16d36ad2e03 100644
--- a/apps/web/public/static/locales/he/common.json
+++ b/apps/web/public/static/locales/he/common.json
@@ -2269,13 +2269,13 @@
"what_is_this_meeting_about": "במה עוסקת הפגישה הזו?",
"add_to_team": "הוספה לצוות",
"remove_users_from_org": "הסרת משתמשים מהארגון",
- "delegation_credential": "אישור האצלה",
- "delegation_credential_description": "אישור האצלה מאפשר לך לנהל גישה ללוחות השנה של Google Workspace עבור הארגון שלך.",
+ "domain_wide_delegation": "הרשאה ברמת הדומיין",
+ "domain_wide_delegation_description": "הרשאה ברמת הדומיין מאפשרת לך לנהל גישה ליומני Google Workspace עבור הארגון שלך.",
"add_client_id_in_google_workspace_with_below_scope": "הוסף את מזהה הלקוח הזה ב-Google Workspace עם ההרשאה הבאה",
- "delegation_credential_enabled": "אישור האצלה מופעל",
- "delegation_credential_disabled": "אישור האצלה מושבת",
- "add_delegation_credential": "הוסף אישור האצלה",
- "edit_delegation_credential": "ערוך אישור האצלה",
+ "domain_wide_delegation_enabled": "הרשאה ברמת הדומיין מופעלת",
+ "domain_wide_delegation_disabled": "הרשאה ברמת הדומיין מושבתת",
+ "add_domain_wide_delegation": "הוסף הרשאה ברמת הדומיין",
+ "edit_domain_wide_delegation": "ערוך הרשאה ברמת הדומיין",
"domain": "דומיין",
"no_workspace_platforms": "אין פלטפורמות עבודה",
"workspace_platform": "פלטפורמת עבודה",
@@ -2287,7 +2287,7 @@
"slug": "Slug",
"service_account_key": "מפתח JSON של חשבון שירות",
"edit_service_account_key": "ערוך מפתח JSON של חשבון שירות",
- "delegation_credential_restricts_adding_more_than_one_installation": "אישור האצלה מגביל הוספת יותר מהתקנה אחת",
+ "domain_wide_delegation_restricts_adding_more_than_one_installation": "הרשאה ברמת הדומיין מגבילה הוספת יותר מהתקנה אחת",
"app_successfully_installed_and_is_using_delegated_credentials": "האפליקציה הותקנה בהצלחה ומשתמשת באישורים מואצלים",
"remove_users_from_org_confirm": "בטוח שברצונך להסיר {{userCount}} משתמשים מהארגון הזה?",
"remove_users_from_team": "הסר משתמשים מהצוות",
@@ -2953,7 +2953,7 @@
"k_bar_ai_error": "אירעה שגיאה בלתי צפויה. אנא נסה שוב מאוחר יותר",
"select_oAuth_client": "בחר לקוח OAuth",
"on_every_instance": "בכל מופע",
- "delegation_credential_feature_not_enabled": "תכונת אישור האצלה אינה מופעלת עבור הארגון שלך",
+ "domain_wide_delegation_feature_not_enabled": "תכונת ההרשאה ברמת הדומיין אינה מופעלת עבור הארגון שלך",
"internal_booking_note": "הערה פנימית",
"internal_note_cancellation_reason": "סיבה שתשותף עם הלקוח (אופציונלי)",
"internal_booking_note_description": "הערה זו תהיה גלויה רק לחברי הצוות שלך",
diff --git a/apps/web/public/static/locales/hu/common.json b/apps/web/public/static/locales/hu/common.json
index b79e5650e29..502537a508f 100644
--- a/apps/web/public/static/locales/hu/common.json
+++ b/apps/web/public/static/locales/hu/common.json
@@ -2269,13 +2269,13 @@
"what_is_this_meeting_about": "Miről szól ez a találkozó?",
"add_to_team": "Hozzáadás a csapathoz",
"remove_users_from_org": "Felhasználók eltávolítása a szervezetből",
- "delegation_credential": "Delegálási hitelesítő adat",
- "delegation_credential_description": "A delegálási hitelesítő adat lehetővé teszi a Google Workspace naptárakhoz való hozzáférés kezelését a szervezete számára.",
+ "domain_wide_delegation": "Tartományra kiterjedő delegálás",
+ "domain_wide_delegation_description": "A tartományra kiterjedő delegálás lehetővé teszi a Google Workspace naptárak hozzáférésének kezelését a szervezet számára.",
"add_client_id_in_google_workspace_with_below_scope": "Adja hozzá ezt az ügyfél-azonosítót a Google Workspace-hez az alábbi hatókörrel",
- "delegation_credential_enabled": "Delegálási hitelesítő adat engedélyezve",
- "delegation_credential_disabled": "Delegálási hitelesítő adat letiltva",
- "add_delegation_credential": "Delegálási hitelesítő adat hozzáadása",
- "edit_delegation_credential": "Delegálási hitelesítő adat szerkesztése",
+ "domain_wide_delegation_enabled": "Tartományra kiterjedő delegálás engedélyezve",
+ "domain_wide_delegation_disabled": "Tartományra kiterjedő delegálás letiltva",
+ "add_domain_wide_delegation": "Tartományra kiterjedő delegálás hozzáadása",
+ "edit_domain_wide_delegation": "Tartományra kiterjedő delegálás szerkesztése",
"domain": "Tartomány",
"no_workspace_platforms": "Nincsenek workspace platformok",
"workspace_platform": "Workspace platform",
@@ -2287,7 +2287,7 @@
"slug": "Slug",
"service_account_key": "Szolgáltatási fiók kulcs JSON",
"edit_service_account_key": "Szolgáltatási fiók kulcs JSON szerkesztése",
- "delegation_credential_restricts_adding_more_than_one_installation": "A delegálási hitelesítő adat korlátozza egynél több telepítés hozzáadását",
+ "domain_wide_delegation_restricts_adding_more_than_one_installation": "A tartományra kiterjedő delegálás korlátozza egynél több telepítés hozzáadását",
"app_successfully_installed_and_is_using_delegated_credentials": "Az alkalmazás sikeresen telepítve lett és delegált hitelesítő adatokat használ",
"remove_users_from_org_confirm": "Biztosan eltávolít {{userCount}} felhasználót ebből a szervezetből?",
"remove_users_from_team": "Felhasználók eltávolítása a csapatból",
@@ -2953,7 +2953,7 @@
"k_bar_ai_error": "Váratlan hiba történt. Kérjük, próbálja újra később",
"select_oAuth_client": "OAuth kliens kiválasztása",
"on_every_instance": "Minden példányon",
- "delegation_credential_feature_not_enabled": "A delegálási hitelesítő adat funkció nincs engedélyezve a szervezete számára",
+ "domain_wide_delegation_feature_not_enabled": "A tartományra kiterjedő delegálás funkció nincs engedélyezve a szervezete számára",
"internal_booking_note": "Belső megjegyzés",
"internal_note_cancellation_reason": "Az ügyféllel megosztott indok (opcionális)",
"internal_booking_note_description": "Ez a megjegyzés csak a csapattagok számára lesz látható",
diff --git a/apps/web/public/static/locales/it/common.json b/apps/web/public/static/locales/it/common.json
index 898c15753f4..422597d922b 100644
--- a/apps/web/public/static/locales/it/common.json
+++ b/apps/web/public/static/locales/it/common.json
@@ -2269,13 +2269,13 @@
"what_is_this_meeting_about": "Qual è l'oggetto della riunione?",
"add_to_team": "Aggiungi al team",
"remove_users_from_org": "Rimuovi utenti dall'organizzazione",
- "delegation_credential": "Credenziale di delega",
- "delegation_credential_description": "La credenziale di delega ti permette di gestire l'accesso ai calendari di Google Workspace per la tua organizzazione.",
+ "domain_wide_delegation": "Delega a livello di dominio",
+ "domain_wide_delegation_description": "La delega a livello di dominio ti permette di gestire l'accesso ai calendari di Google Workspace per la tua organizzazione.",
"add_client_id_in_google_workspace_with_below_scope": "Aggiungi questo Client Id in Google Workspace con lo scope indicato sotto",
- "delegation_credential_enabled": "Credenziale di delega abilitata",
- "delegation_credential_disabled": "Credenziale di delega disabilitata",
- "add_delegation_credential": "Aggiungi credenziale di delega",
- "edit_delegation_credential": "Modifica credenziale di delega",
+ "domain_wide_delegation_enabled": "Delega a livello di dominio attivata",
+ "domain_wide_delegation_disabled": "Delega a livello di dominio disattivata",
+ "add_domain_wide_delegation": "Aggiungi delega a livello di dominio",
+ "edit_domain_wide_delegation": "Modifica delega a livello di dominio",
"domain": "Dominio",
"no_workspace_platforms": "Nessuna piattaforma workspace",
"workspace_platform": "Piattaforma workspace",
@@ -2287,7 +2287,7 @@
"slug": "Slug",
"service_account_key": "JSON chiave account di servizio",
"edit_service_account_key": "Modifica JSON chiave account di servizio",
- "delegation_credential_restricts_adding_more_than_one_installation": "La credenziale di delega limita l'aggiunta di più di un'installazione",
+ "domain_wide_delegation_restricts_adding_more_than_one_installation": "La delega a livello di dominio limita l'aggiunta di più di un'installazione",
"app_successfully_installed_and_is_using_delegated_credentials": "App installata con successo e sta utilizzando le credenziali delegate",
"remove_users_from_org_confirm": "Rimuovere {{userCount}} utenti da questa organizzazione?",
"remove_users_from_team": "Rimuovi utenti dal team",
@@ -2953,7 +2953,7 @@
"k_bar_ai_error": "Si è verificato un errore imprevisto. Per favore, riprova più tardi",
"select_oAuth_client": "Seleziona client OAuth",
"on_every_instance": "Su ogni istanza",
- "delegation_credential_feature_not_enabled": "La funzionalità di credenziale di delega non è abilitata per la tua organizzazione",
+ "domain_wide_delegation_feature_not_enabled": "La funzione di delega a livello di dominio non è attivata per la tua organizzazione",
"internal_booking_note": "Nota interna",
"internal_note_cancellation_reason": "Motivo condiviso con il cliente (opzionale)",
"internal_booking_note_description": "Questa nota sarà visibile solo ai membri del tuo team",
diff --git a/apps/web/public/static/locales/ja/common.json b/apps/web/public/static/locales/ja/common.json
index 45f37318438..655f609510c 100644
--- a/apps/web/public/static/locales/ja/common.json
+++ b/apps/web/public/static/locales/ja/common.json
@@ -2269,13 +2269,13 @@
"what_is_this_meeting_about": "このミーティングの内容は?",
"add_to_team": "チームに追加",
"remove_users_from_org": "組織からユーザーを削除",
- "delegation_credential": "委任認証情報",
- "delegation_credential_description": "委任認証情報を使用すると、組織の Google Workspace カレンダーへのアクセスを管理できます。",
+ "domain_wide_delegation": "ドメイン全体の委任",
+ "domain_wide_delegation_description": "ドメイン全体の委任により、組織のGoogle Workspaceカレンダーへのアクセスを管理できます。",
"add_client_id_in_google_workspace_with_below_scope": "以下のスコープを使用してGoogle WorkspaceにこのクライアントIDを追加してください",
- "delegation_credential_enabled": "委任認証情報が有効になっています",
- "delegation_credential_disabled": "委任認証情報が無効になっています",
- "add_delegation_credential": "委任認証情報を追加",
- "edit_delegation_credential": "委任認証情報を編集",
+ "domain_wide_delegation_enabled": "ドメイン全体の委任が有効",
+ "domain_wide_delegation_disabled": "ドメイン全体の委任が無効",
+ "add_domain_wide_delegation": "ドメイン全体の委任を追加",
+ "edit_domain_wide_delegation": "ドメイン全体の委任を編集",
"domain": "ドメイン",
"no_workspace_platforms": "ワークスペースプラットフォームがありません",
"workspace_platform": "ワークスペースプラットフォーム",
@@ -2287,7 +2287,7 @@
"slug": "スラッグ",
"service_account_key": "サービスアカウントキーJSON",
"edit_service_account_key": "サービスアカウントキーJSONを編集",
- "delegation_credential_restricts_adding_more_than_one_installation": "委任認証情報により、複数のインストールの追加が制限されています",
+ "domain_wide_delegation_restricts_adding_more_than_one_installation": "ドメイン全体の委任では、複数のインストールを追加することはできません",
"app_successfully_installed_and_is_using_delegated_credentials": "アプリケーションが正常にインストールされ、委任された認証情報を使用しています",
"remove_users_from_org_confirm": "この組織から {{userCount}} 人のユーザーを削除しますか?",
"remove_users_from_team": "チームからユーザーを削除",
@@ -2953,7 +2953,7 @@
"k_bar_ai_error": "予期せぬエラーが発生しました。後でもう一度お試しください",
"select_oAuth_client": "OAuthクライアントを選択",
"on_every_instance": "すべてのインスタンスで",
- "delegation_credential_feature_not_enabled": "委任認証情報機能は、あなたの組織では有効になっていません",
+ "domain_wide_delegation_feature_not_enabled": "ドメイン全体の委任機能が組織で有効になっていません",
"internal_booking_note": "内部メモ",
"internal_note_cancellation_reason": "顧客と共有する理由(任意)",
"internal_booking_note_description": "このメモはチームメンバーのみが閲覧できます",
diff --git a/apps/web/public/static/locales/km/common.json b/apps/web/public/static/locales/km/common.json
index 4001b47f4f5..e7bd7ba52f4 100644
--- a/apps/web/public/static/locales/km/common.json
+++ b/apps/web/public/static/locales/km/common.json
@@ -2269,13 +2269,13 @@
"what_is_this_meeting_about": "កិច្ចប្រជុំនេះគឺអំពីអ្វី?",
"add_to_team": "បន្ថែមទៅក្រុម",
"remove_users_from_org": "យកអ្នកប្រើចេញពីអង្គការ",
- "delegation_credential": "លិខិតសម្គាល់ប្រគល់សិទ្ធិ",
- "delegation_credential_description": "លិខិតសម្គាល់ប្រគល់សិទ្ធិអនុញ្ញាតឱ្យអ្នកគ្រប់គ្រងការចូលប្រើប្រតិទិន Google Workspace សម្រាប់អង្គការរបស់អ្នក។",
+ "domain_wide_delegation": "ការប្រគល់សិទ្ធិទូទាំងដែន",
+ "domain_wide_delegation_description": "ការប្រគល់សិទ្ធិទូទាំងដែនអនុញ្ញាតឱ្យអ្នកគ្រប់គ្រងការចូលប្រើប្រតិទិន Google Workspace សម្រាប់ស្ថាប័នរបស់អ្នក។",
"add_client_id_in_google_workspace_with_below_scope": "បន្ថែម Client Id នេះនៅក្នុង Google Workspace ជាមួយនឹងវិសាលភាពខាងក្រោម",
- "delegation_credential_enabled": "លិខិតសម្គាល់ប្រគល់សិទ្ធិត្រូវបានបើកដំណើរការ",
- "delegation_credential_disabled": "លិខិតសម្គាល់ប្រគល់សិទ្ធិត្រូវបានបិទដំណើរការ",
- "add_delegation_credential": "បន្ថែមលិខិតសម្គាល់ប្រគល់សិទ្ធិ",
- "edit_delegation_credential": "កែសម្រួលលិខិតសម្គាល់ប្រគល់សិទ្ធិ",
+ "domain_wide_delegation_enabled": "បានបើកការប្រគល់សិទ្ធិទូទាំងដែន",
+ "domain_wide_delegation_disabled": "បានបិទការប្រគល់សិទ្ធិទូទាំងដែន",
+ "add_domain_wide_delegation": "បន្ថែមការប្រគល់សិទ្ធិទូទាំងដែន",
+ "edit_domain_wide_delegation": "កែសម្រួលការប្រគល់សិទ្ធិទូទាំងដែន",
"domain": "ដែន",
"no_workspace_platforms": "គ្មានវេទិកាការងារ",
"workspace_platform": "វេទិកាការងារ",
@@ -2287,7 +2287,7 @@
"slug": "Slug",
"service_account_key": "កូនសោគណនីសេវាកម្ម JSON",
"edit_service_account_key": "កែសម្រួលកូនសោគណនីសេវាកម្ម JSON",
- "delegation_credential_restricts_adding_more_than_one_installation": "លិខិតសម្គាល់ប្រគល់សិទ្ធិរឹតបន្តឹងការបន្ថែមការដំឡើងច្រើនជាងមួយ",
+ "domain_wide_delegation_restricts_adding_more_than_one_installation": "ការប្រគល់សិទ្ធិទូទាំងដែនកំណត់ការបន្ថែមការដំឡើងច្រើនជាងមួយ",
"app_successfully_installed_and_is_using_delegated_credentials": "កម្មវិធីត្រូវបានដំឡើងដោយជោគជ័យ និងកំពុងប្រើប្រាស់ព័ត៌មានសម្ងាត់ដែលបានប្រគល់សិទ្ធិ",
"remove_users_from_org_confirm": "តើអ្នកប្រាកដថាចង់យកអ្នកប្រើ {{userCount}} ចេញពីអង្គការនេះមែនទេ?",
"remove_users_from_team": "ដកអ្នកប្រើចេញពីក្រុម",
@@ -2953,7 +2953,7 @@
"k_bar_ai_error": "មានកំហុសដែលមិនបានរំពឹងទុកកើតឡើង។ សូមព្យាយាមម្តងទៀតនៅពេលក្រោយ",
"select_oAuth_client": "ជ្រើសរើស OAuth Client",
"on_every_instance": "នៅលើគ្រប់ករណី",
- "delegation_credential_feature_not_enabled": "មុខងារលិខិតសម្គាល់ប្រគល់សិទ្ធិមិនត្រូវបានបើកដំណើរការសម្រាប់អង្គការរបស់អ្នកទេ",
+ "domain_wide_delegation_feature_not_enabled": "មុខងារប្រគល់សិទ្ធិទូទាំងដែនមិនត្រូវបានបើកសម្រាប់ស្ថាប័នរបស់អ្នកទេ",
"internal_booking_note": "កំណត់ចំណាំផ្ទៃក្នុង",
"internal_note_cancellation_reason": "មូលហេតុដែលត្រូវចែករំលែកជាមួយអតិថិជន (ជាជម្រើស)",
"internal_booking_note_description": "កំណត់ចំណាំនេះនឹងអាចមើលឃើញសម្រាប់តែសមាជិកក្រុមរបស់អ្នកប៉ុណ្ណោះ",
diff --git a/apps/web/public/static/locales/ko/common.json b/apps/web/public/static/locales/ko/common.json
index 1e26a6862bd..b8d58d6a55c 100644
--- a/apps/web/public/static/locales/ko/common.json
+++ b/apps/web/public/static/locales/ko/common.json
@@ -2269,13 +2269,13 @@
"what_is_this_meeting_about": "이 회의는 어떤 주제를 다루나요?",
"add_to_team": "팀에 추가",
"remove_users_from_org": "조직에서 사용자 제거",
- "delegation_credential": "위임 자격 증명",
- "delegation_credential_description": "위임 자격 증명을 통해 조직의 Google Workspace 캘린더에 대한 접근을 관리할 수 있습니다.",
+ "domain_wide_delegation": "도메인 전체 위임",
+ "domain_wide_delegation_description": "도메인 전체 위임을 통해 조직의 Google Workspace 캘린더에 대한 액세스를 관리할 수 있습니다.",
"add_client_id_in_google_workspace_with_below_scope": "아래 범위로 Google Workspace에 이 클라이언트 ID를 추가하세요",
- "delegation_credential_enabled": "위임 자격 증명 활성화됨",
- "delegation_credential_disabled": "위임 자격 증명 비활성화됨",
- "add_delegation_credential": "위임 자격 증명 추가",
- "edit_delegation_credential": "위임 자격 증명 편집",
+ "domain_wide_delegation_enabled": "도메인 전체 위임이 활성화됨",
+ "domain_wide_delegation_disabled": "도메인 전체 위임이 비활성화됨",
+ "add_domain_wide_delegation": "도메인 전체 위임 추가",
+ "edit_domain_wide_delegation": "도메인 전체 위임 수정",
"domain": "도메인",
"no_workspace_platforms": "워크스페이스 플랫폼 없음",
"workspace_platform": "워크스페이스 플랫폼",
@@ -2287,7 +2287,7 @@
"slug": "슬러그",
"service_account_key": "서비스 계정 키 JSON",
"edit_service_account_key": "서비스 계정 키 JSON 수정",
- "delegation_credential_restricts_adding_more_than_one_installation": "위임 자격 증명은 하나 이상의 설치를 추가하는 것을 제한합니다",
+ "domain_wide_delegation_restricts_adding_more_than_one_installation": "도메인 전체 위임은 두 개 이상의 설치를 제한합니다",
"app_successfully_installed_and_is_using_delegated_credentials": "앱이 성공적으로 설치되었으며 위임된 자격 증명을 사용 중입니다",
"remove_users_from_org_confirm": "이 조직에서 {{userCount}}명의 사용자를 제거하시겠습니까?",
"remove_users_from_team": "팀에서 사용자 제거",
@@ -2953,7 +2953,7 @@
"k_bar_ai_error": "예기치 않은 오류가 발생했습니다. 나중에 다시 시도해 주세요",
"select_oAuth_client": "OAuth 클라이언트 선택",
"on_every_instance": "모든 인스턴스에서",
- "delegation_credential_feature_not_enabled": "위임 자격 증명 기능이 귀하의 조직에 대해 활성화되지 않았습니다",
+ "domain_wide_delegation_feature_not_enabled": "도메인 전체 위임 기능이 귀하의 조직에 대해 활성화되어 있지 않습니다",
"internal_booking_note": "내부 메모",
"internal_note_cancellation_reason": "고객과 공유할 사유 (선택사항)",
"internal_booking_note_description": "이 메모는 팀원들에게만 표시됩니다",
diff --git a/apps/web/public/static/locales/nl/common.json b/apps/web/public/static/locales/nl/common.json
index c054cb2936d..58eef04626e 100644
--- a/apps/web/public/static/locales/nl/common.json
+++ b/apps/web/public/static/locales/nl/common.json
@@ -2269,13 +2269,13 @@
"what_is_this_meeting_about": "Waar gaat deze afspraak over?",
"add_to_team": "Voeg toe aan team",
"remove_users_from_org": "Gebruikers verwijderen uit organisatie",
- "delegation_credential": "Delegatiereferentie",
- "delegation_credential_description": "Met een delegatiereferentie kunt u de toegang tot Google Workspace-agenda's voor uw organisatie beheren.",
+ "domain_wide_delegation": "Domeinbrede delegatie",
+ "domain_wide_delegation_description": "Domeinbrede delegatie stelt je in staat om toegang tot Google Workspace-agenda's voor je organisatie te beheren.",
"add_client_id_in_google_workspace_with_below_scope": "Voeg deze Client ID toe in Google Workspace met onderstaande scope",
- "delegation_credential_enabled": "Delegatiereferentie ingeschakeld",
- "delegation_credential_disabled": "Delegatiereferentie uitgeschakeld",
- "add_delegation_credential": "Delegatiereferentie toevoegen",
- "edit_delegation_credential": "Delegatiereferentie bewerken",
+ "domain_wide_delegation_enabled": "Domeinbrede delegatie ingeschakeld",
+ "domain_wide_delegation_disabled": "Domeinbrede delegatie uitgeschakeld",
+ "add_domain_wide_delegation": "Domeinbrede delegatie toevoegen",
+ "edit_domain_wide_delegation": "Domeinbrede delegatie bewerken",
"domain": "Domein",
"no_workspace_platforms": "Geen workspace-platforms",
"workspace_platform": "Workspace-platform",
@@ -2287,7 +2287,7 @@
"slug": "Slug",
"service_account_key": "Serviceaccount-sleutel JSON",
"edit_service_account_key": "Serviceaccount-sleutel JSON bewerken",
- "delegation_credential_restricts_adding_more_than_one_installation": "Delegatiereferentie beperkt het toevoegen van meer dan één installatie",
+ "domain_wide_delegation_restricts_adding_more_than_one_installation": "Domeinbrede delegatie beperkt het toevoegen van meer dan één installatie",
"app_successfully_installed_and_is_using_delegated_credentials": "App succesvol geïnstalleerd en gebruikt gedelegeerde inloggegevens",
"remove_users_from_org_confirm": "Weet u zeker dat u {{userCount}} gebruikers uit deze organisatie wilt verwijderen?",
"remove_users_from_team": "Gebruikers uit team verwijderen",
@@ -2953,7 +2953,7 @@
"k_bar_ai_error": "Er is een onverwachte fout opgetreden. Probeer het later opnieuw",
"select_oAuth_client": "Selecteer OAuth-client",
"on_every_instance": "Op elke instantie",
- "delegation_credential_feature_not_enabled": "De functie voor delegatiereferenties is niet ingeschakeld voor uw organisatie",
+ "domain_wide_delegation_feature_not_enabled": "De functie voor domeinbrede delegatie is niet ingeschakeld voor jouw organisatie",
"internal_booking_note": "Interne notitie",
"internal_note_cancellation_reason": "Reden gedeeld met klant (optioneel)",
"internal_booking_note_description": "Deze notitie is alleen zichtbaar voor leden van je team",
diff --git a/apps/web/public/static/locales/no/common.json b/apps/web/public/static/locales/no/common.json
index cde27b83092..bd9059d5aba 100644
--- a/apps/web/public/static/locales/no/common.json
+++ b/apps/web/public/static/locales/no/common.json
@@ -2269,13 +2269,13 @@
"what_is_this_meeting_about": "Hva handler dette møtet om?",
"add_to_team": "Legg til i team",
"remove_users_from_org": "Fjern brukere fra organisasjonen",
- "delegation_credential": "Delegeringslegitimasjon",
- "delegation_credential_description": "Delegeringslegitimasjon lar deg administrere tilgang til Google Workspace-kalendere for din organisasjon.",
+ "domain_wide_delegation": "Domeneomfattende delegering",
+ "domain_wide_delegation_description": "Domeneomfattende delegering lar deg administrere tilgang til Google Workspace-kalendere for din organisasjon.",
"add_client_id_in_google_workspace_with_below_scope": "Legg til denne klient-ID-en i Google Workspace med følgende omfang",
- "delegation_credential_enabled": "Delegeringslegitimasjon aktivert",
- "delegation_credential_disabled": "Delegeringslegitimasjon deaktivert",
- "add_delegation_credential": "Legg til delegeringslegitimasjon",
- "edit_delegation_credential": "Rediger delegeringslegitimasjon",
+ "domain_wide_delegation_enabled": "Domeneomfattende delegering er aktivert",
+ "domain_wide_delegation_disabled": "Domeneomfattende delegering er deaktivert",
+ "add_domain_wide_delegation": "Legg til domeneomfattende delegering",
+ "edit_domain_wide_delegation": "Rediger domeneomfattende delegering",
"domain": "Domene",
"no_workspace_platforms": "Ingen arbeidsplattformer",
"workspace_platform": "Arbeidsplattform",
@@ -2287,7 +2287,7 @@
"slug": "Slug",
"service_account_key": "JSON-nøkkel for tjenestekonto",
"edit_service_account_key": "Rediger JSON-nøkkel for tjenestekonto",
- "delegation_credential_restricts_adding_more_than_one_installation": "Delegeringslegitimasjon begrenser tillegg av mer enn én installasjon",
+ "domain_wide_delegation_restricts_adding_more_than_one_installation": "Domeneomfattende delegering begrenser til kun én installasjon",
"app_successfully_installed_and_is_using_delegated_credentials": "Appen er installert og bruker delegerte påloggingsdetaljer",
"remove_users_from_org_confirm": "Er du sikker på at du vil fjerne {{userCount}} brukere fra denne organisasjonen?",
"remove_users_from_team": "Fjern brukere fra teamet",
@@ -2953,7 +2953,7 @@
"k_bar_ai_error": "En uventet feil oppstod. Vennligst prøv igjen senere",
"select_oAuth_client": "Velg OAuth-klient",
"on_every_instance": "På hver instans",
- "delegation_credential_feature_not_enabled": "Delegeringslegitimasjon-funksjonen er ikke aktivert for din organisasjon",
+ "domain_wide_delegation_feature_not_enabled": "Funksjonen for domeneomfattende delegering er ikke aktivert for din organisasjon",
"internal_booking_note": "Internt notat",
"internal_note_cancellation_reason": "Årsak som deles med kunden (valgfritt)",
"internal_booking_note_description": "Dette notatet vil kun være synlig for medlemmer av teamet ditt",
diff --git a/apps/web/public/static/locales/pl/common.json b/apps/web/public/static/locales/pl/common.json
index 24ee2e955d3..533225b25f5 100644
--- a/apps/web/public/static/locales/pl/common.json
+++ b/apps/web/public/static/locales/pl/common.json
@@ -2269,13 +2269,13 @@
"what_is_this_meeting_about": "Czego dotyczy to spotkanie?",
"add_to_team": "Dodaj do zespołu",
"remove_users_from_org": "Usuń użytkowników z organizacji",
- "delegation_credential": "Poświadczenie delegacji",
- "delegation_credential_description": "Poświadczenie delegacji umożliwia zarządzanie dostępem do kalendarzy Google Workspace dla Twojej organizacji.",
+ "domain_wide_delegation": "Delegacja na poziomie domeny",
+ "domain_wide_delegation_description": "Delegacja na poziomie domeny pozwala zarządzać dostępem do kalendarzy Google Workspace dla Twojej organizacji.",
"add_client_id_in_google_workspace_with_below_scope": "Dodaj ten identyfikator klienta w Google Workspace z poniższym zakresem",
- "delegation_credential_enabled": "Poświadczenie delegacji włączone",
- "delegation_credential_disabled": "Poświadczenie delegacji wyłączone",
- "add_delegation_credential": "Dodaj poświadczenie delegacji",
- "edit_delegation_credential": "Edytuj poświadczenie delegacji",
+ "domain_wide_delegation_enabled": "Delegacja na poziomie domeny włączona",
+ "domain_wide_delegation_disabled": "Delegacja na poziomie domeny wyłączona",
+ "add_domain_wide_delegation": "Dodaj delegację na poziomie domeny",
+ "edit_domain_wide_delegation": "Edytuj delegację na poziomie domeny",
"domain": "Domena",
"no_workspace_platforms": "Brak platform workspace",
"workspace_platform": "Platforma workspace",
@@ -2287,7 +2287,7 @@
"slug": "Slug",
"service_account_key": "Klucz JSON konta usługi",
"edit_service_account_key": "Edytuj klucz JSON konta usługi",
- "delegation_credential_restricts_adding_more_than_one_installation": "Poświadczenie delegacji ogranicza dodawanie więcej niż jednej instalacji",
+ "domain_wide_delegation_restricts_adding_more_than_one_installation": "Delegacja na poziomie domeny ogranicza dodawanie więcej niż jednej instalacji",
"app_successfully_installed_and_is_using_delegated_credentials": "Aplikacja została pomyślnie zainstalowana i używa poświadczeń delegowanych",
"remove_users_from_org_confirm": "Czy na pewno chcesz usunąć {{userCount}} użytkowników z tej organizacji?",
"remove_users_from_team": "Usuń użytkowników z zespołu",
@@ -2953,7 +2953,7 @@
"k_bar_ai_error": "Wystąpił nieoczekiwany błąd. Spróbuj ponownie później",
"select_oAuth_client": "Wybierz klienta OAuth",
"on_every_instance": "W każdej instancji",
- "delegation_credential_feature_not_enabled": "Funkcja poświadczeń delegacji nie jest włączona dla Twojej organizacji",
+ "domain_wide_delegation_feature_not_enabled": "Funkcja delegacji na poziomie domeny nie jest włączona dla Twojej organizacji",
"internal_booking_note": "Notatka wewnętrzna",
"internal_note_cancellation_reason": "Powód udostępniony klientowi (opcjonalnie)",
"internal_booking_note_description": "Ta notatka będzie widoczna tylko dla członków twojego zespołu",
diff --git a/apps/web/public/static/locales/pt-BR/common.json b/apps/web/public/static/locales/pt-BR/common.json
index 16298e6bdf1..e21ace836f8 100644
--- a/apps/web/public/static/locales/pt-BR/common.json
+++ b/apps/web/public/static/locales/pt-BR/common.json
@@ -2269,13 +2269,13 @@
"what_is_this_meeting_about": "De que se trata esta reunião?",
"add_to_team": "Adicionar à equipe",
"remove_users_from_org": "Remover usuários da organização",
- "delegation_credential": "Credencial de delegação",
- "delegation_credential_description": "A credencial de delegação permite que você gerencie o acesso aos calendários do Google Workspace para sua organização.",
+ "domain_wide_delegation": "Delegação em todo o domínio",
+ "domain_wide_delegation_description": "A delegação em todo o domínio permite que você gerencie o acesso aos calendários do Google Workspace para sua organização.",
"add_client_id_in_google_workspace_with_below_scope": "Adicione este ID do Cliente no Google Workspace com o escopo abaixo",
- "delegation_credential_enabled": "Credencial de delegação ativada",
- "delegation_credential_disabled": "Credencial de delegação desativada",
- "add_delegation_credential": "Adicionar credencial de delegação",
- "edit_delegation_credential": "Editar credencial de delegação",
+ "domain_wide_delegation_enabled": "Delegação em todo o domínio ativada",
+ "domain_wide_delegation_disabled": "Delegação em todo o domínio desativada",
+ "add_domain_wide_delegation": "Adicionar delegação em todo o domínio",
+ "edit_domain_wide_delegation": "Editar delegação em todo o domínio",
"domain": "Domínio",
"no_workspace_platforms": "Nenhuma plataforma de workspace",
"workspace_platform": "Plataforma de workspace",
@@ -2287,7 +2287,7 @@
"slug": "Slug",
"service_account_key": "JSON da chave da conta de serviço",
"edit_service_account_key": "Editar JSON da chave da conta de serviço",
- "delegation_credential_restricts_adding_more_than_one_installation": "A credencial de delegação restringe a adição de mais de uma instalação",
+ "domain_wide_delegation_restricts_adding_more_than_one_installation": "A delegação em todo o domínio restringe a adição de mais de uma instalação",
"app_successfully_installed_and_is_using_delegated_credentials": "Aplicativo instalado com sucesso e está usando credenciais delegadas",
"remove_users_from_org_confirm": "Tem certeza de que deseja remover {{userCount}} usuários desta organização?",
"remove_users_from_team": "Remover usuários da equipe",
@@ -2953,7 +2953,7 @@
"k_bar_ai_error": "Ocorreu um erro inesperado. Por favor, tente novamente mais tarde",
"select_oAuth_client": "Selecionar cliente OAuth",
"on_every_instance": "Em cada instância",
- "delegation_credential_feature_not_enabled": "O recurso de credencial de delegação não está habilitado para sua organização",
+ "domain_wide_delegation_feature_not_enabled": "O recurso de delegação em todo o domínio não está ativado para sua organização",
"internal_booking_note": "Nota interna",
"internal_note_cancellation_reason": "Motivo compartilhado com o cliente (opcional)",
"internal_booking_note_description": "Esta nota será visível apenas para membros da sua equipe",
diff --git a/apps/web/public/static/locales/pt/common.json b/apps/web/public/static/locales/pt/common.json
index 646d92fe942..3b0a6eb6a9b 100644
--- a/apps/web/public/static/locales/pt/common.json
+++ b/apps/web/public/static/locales/pt/common.json
@@ -2269,13 +2269,13 @@
"what_is_this_meeting_about": "Sobre o que é esta reunião?",
"add_to_team": "Adicionar à equipa",
"remove_users_from_org": "Remover utilizadores da organização",
- "delegation_credential": "Credencial de delegação",
- "delegation_credential_description": "A credencial de delegação permite-lhe gerir o acesso aos calendários do Google Workspace para a sua organização.",
+ "domain_wide_delegation": "Delegação em todo o domínio",
+ "domain_wide_delegation_description": "A delegação em todo o domínio permite que você gerencie o acesso aos calendários do Google Workspace para sua organização.",
"add_client_id_in_google_workspace_with_below_scope": "Adicione este ID do Cliente no Google Workspace com o escopo abaixo",
- "delegation_credential_enabled": "Credencial de delegação ativada",
- "delegation_credential_disabled": "Credencial de delegação desativada",
- "add_delegation_credential": "Adicionar credencial de delegação",
- "edit_delegation_credential": "Editar credencial de delegação",
+ "domain_wide_delegation_enabled": "Delegação em todo o domínio ativada",
+ "domain_wide_delegation_disabled": "Delegação em todo o domínio desativada",
+ "add_domain_wide_delegation": "Adicionar delegação em todo o domínio",
+ "edit_domain_wide_delegation": "Editar delegação em todo o domínio",
"domain": "Domínio",
"no_workspace_platforms": "Nenhuma plataforma de workspace",
"workspace_platform": "Plataforma de workspace",
@@ -2287,7 +2287,7 @@
"slug": "Slug",
"service_account_key": "JSON da chave da conta de serviço",
"edit_service_account_key": "Editar JSON da chave da conta de serviço",
- "delegation_credential_restricts_adding_more_than_one_installation": "A credencial de delegação restringe a adição de mais de uma instalação",
+ "domain_wide_delegation_restricts_adding_more_than_one_installation": "A delegação em todo o domínio restringe a adição de mais de uma instalação",
"app_successfully_installed_and_is_using_delegated_credentials": "Aplicativo instalado com sucesso e está usando credenciais delegadas",
"remove_users_from_org_confirm": "Tem a certeza de que deseja remover {{userCount}} utilizadores desta organização?",
"remove_users_from_team": "Remover utilizadores da equipa",
@@ -2953,7 +2953,7 @@
"k_bar_ai_error": "Ocorreu um erro inesperado. Por favor, tente novamente mais tarde",
"select_oAuth_client": "Selecionar cliente OAuth",
"on_every_instance": "Em cada instância",
- "delegation_credential_feature_not_enabled": "O recurso de credencial de delegação não está ativado para a sua organização",
+ "domain_wide_delegation_feature_not_enabled": "O recurso de delegação em todo o domínio não está ativado para sua organização",
"internal_booking_note": "Nota interna",
"internal_note_cancellation_reason": "Motivo compartilhado com o cliente (opcional)",
"internal_booking_note_description": "Esta nota será visível apenas para os membros da sua equipe",
diff --git a/apps/web/public/static/locales/ro/common.json b/apps/web/public/static/locales/ro/common.json
index 9d2914145dc..e73fe64a294 100644
--- a/apps/web/public/static/locales/ro/common.json
+++ b/apps/web/public/static/locales/ro/common.json
@@ -2269,13 +2269,13 @@
"what_is_this_meeting_about": "Despre ce este vorba în această ședință?",
"add_to_team": "Adăugați la echipă",
"remove_users_from_org": "Eliminați utilizatori din organizație",
- "delegation_credential": "Credențial de delegare",
- "delegation_credential_description": "Credențialul de delegare vă permite să gestionați accesul la calendarele Google Workspace pentru organizația dvs.",
+ "domain_wide_delegation": "Delegare la nivel de domeniu",
+ "domain_wide_delegation_description": "Delegarea la nivel de domeniu îți permite să gestionezi accesul la calendarele Google Workspace pentru organizația ta.",
"add_client_id_in_google_workspace_with_below_scope": "Adaugă acest Client Id în Google Workspace cu scope-ul de mai jos",
- "delegation_credential_enabled": "Credențial de delegare activat",
- "delegation_credential_disabled": "Credențial de delegare dezactivat",
- "add_delegation_credential": "Adaugă credențial de delegare",
- "edit_delegation_credential": "Editează credențial de delegare",
+ "domain_wide_delegation_enabled": "Delegare la nivel de domeniu activată",
+ "domain_wide_delegation_disabled": "Delegare la nivel de domeniu dezactivată",
+ "add_domain_wide_delegation": "Adaugă delegare la nivel de domeniu",
+ "edit_domain_wide_delegation": "Editează delegarea la nivel de domeniu",
"domain": "Domeniu",
"no_workspace_platforms": "Nu există platforme workspace",
"workspace_platform": "Platformă workspace",
@@ -2287,7 +2287,7 @@
"slug": "Slug",
"service_account_key": "Cheie JSON cont de serviciu",
"edit_service_account_key": "Editează cheia JSON a contului de serviciu",
- "delegation_credential_restricts_adding_more_than_one_installation": "Credențialul de delegare restricționează adăugarea mai multor instalări",
+ "domain_wide_delegation_restricts_adding_more_than_one_installation": "Delegarea la nivel de domeniu restricționează adăugarea mai multor instalări",
"app_successfully_installed_and_is_using_delegated_credentials": "Aplicația a fost instalată cu succes și folosește credențiale delegate",
"remove_users_from_org_confirm": "Sigur doriți să eliminați {{userCount}} utilizatori din această organizație?",
"remove_users_from_team": "Elimină utilizatorii din echipă",
@@ -2953,7 +2953,7 @@
"k_bar_ai_error": "A apărut o eroare neașteptată. Te rugăm să încerci din nou mai târziu",
"select_oAuth_client": "Selectează clientul OAuth",
"on_every_instance": "La fiecare instanță",
- "delegation_credential_feature_not_enabled": "Funcționalitatea credențialului de delegare nu este activată pentru organizația dvs.",
+ "domain_wide_delegation_feature_not_enabled": "Funcția de delegare la nivel de domeniu nu este activată pentru organizația ta",
"internal_booking_note": "Notă internă",
"internal_note_cancellation_reason": "Motivul comunicat clientului (opțional)",
"internal_booking_note_description": "Această notă va fi vizibilă doar membrilor echipei tale",
diff --git a/apps/web/public/static/locales/ru/common.json b/apps/web/public/static/locales/ru/common.json
index 9d3f7702516..ba492c2a319 100644
--- a/apps/web/public/static/locales/ru/common.json
+++ b/apps/web/public/static/locales/ru/common.json
@@ -2269,13 +2269,13 @@
"what_is_this_meeting_about": "Чему посвязена эта встреча?",
"add_to_team": "Добавить в команду",
"remove_users_from_org": "Удалить пользователей из организации",
- "delegation_credential": "Делегированные учетные данные",
- "delegation_credential_description": "Делегированные учетные данные позволяют управлять доступом к календарям Google Workspace для вашей организации.",
+ "domain_wide_delegation": "Делегирование на уровне домена",
+ "domain_wide_delegation_description": "Делегирование на уровне домена позволяет управлять доступом к календарям Google Workspace для вашей организации.",
"add_client_id_in_google_workspace_with_below_scope": "Добавьте этот Client Id в Google Workspace с указанной ниже областью доступа",
- "delegation_credential_enabled": "Делегированные учетные данные включены",
- "delegation_credential_disabled": "Делегированные учетные данные отключены",
- "add_delegation_credential": "Добавить делегированные учетные данные",
- "edit_delegation_credential": "Редактировать делегированные учетные данные",
+ "domain_wide_delegation_enabled": "Делегирование на уровне домена включено",
+ "domain_wide_delegation_disabled": "Делегирование на уровне домена отключено",
+ "add_domain_wide_delegation": "Добавить делегирование на уровне домена",
+ "edit_domain_wide_delegation": "Редактировать делегирование на уровне домена",
"domain": "Домен",
"no_workspace_platforms": "Нет платформ workspace",
"workspace_platform": "Платформа workspace",
@@ -2287,7 +2287,7 @@
"slug": "Slug",
"service_account_key": "JSON ключ сервисного аккаунта",
"edit_service_account_key": "Редактировать JSON ключ сервисного аккаунта",
- "delegation_credential_restricts_adding_more_than_one_installation": "Делегированные учетные данные ограничивают добавление более одной установки",
+ "domain_wide_delegation_restricts_adding_more_than_one_installation": "Делегирование на уровне домена ограничивает добавление более одной установки",
"app_successfully_installed_and_is_using_delegated_credentials": "Приложение успешно установлено и использует делегированные учетные данные",
"remove_users_from_org_confirm": "Удалить {{userCount}} пользователей из этой организации?",
"remove_users_from_team": "Удалить пользователей из команды",
@@ -2953,7 +2953,7 @@
"k_bar_ai_error": "Произошла непредвиденная ошибка. Пожалуйста, попробуйте позже",
"select_oAuth_client": "Выберите OAuth-клиент",
"on_every_instance": "На каждом экземпляре",
- "delegation_credential_feature_not_enabled": "Функция делегированных учетных данных не включена для вашей организации",
+ "domain_wide_delegation_feature_not_enabled": "Функция делегирования на уровне домена не включена для вашей организации",
"internal_booking_note": "Внутренняя заметка",
"internal_note_cancellation_reason": "Причина, которая будет показана клиенту (необязательно)",
"internal_booking_note_description": "Эта заметка будет видна только участникам вашей команды",
diff --git a/apps/web/public/static/locales/sk-SK/common.json b/apps/web/public/static/locales/sk-SK/common.json
index 062f0e1dc83..e48722830b5 100644
--- a/apps/web/public/static/locales/sk-SK/common.json
+++ b/apps/web/public/static/locales/sk-SK/common.json
@@ -2269,13 +2269,13 @@
"what_is_this_meeting_about": "O čom je toto stretnutie?",
"add_to_team": "Pridať do tímu",
"remove_users_from_org": "Odstrániť používateľov z organizácie",
- "delegation_credential": "Delegované poverenie",
- "delegation_credential_description": "Delegované poverenie vám umožňuje spravovať prístup ku kalendárom Google Workspace pre vašu organizáciu.",
+ "domain_wide_delegation": "Delegovanie na úrovni domény",
+ "domain_wide_delegation_description": "Delegovanie na úrovni domény vám umožňuje spravovať prístup ku kalendárom Google Workspace pre vašu organizáciu.",
"add_client_id_in_google_workspace_with_below_scope": "Pridajte toto Client Id do Google Workspace s nasledujúcim rozsahom",
- "delegation_credential_enabled": "Delegované poverenie povolené",
- "delegation_credential_disabled": "Delegované poverenie zakázané",
- "add_delegation_credential": "Pridať delegované poverenie",
- "edit_delegation_credential": "Upraviť delegované poverenie",
+ "domain_wide_delegation_enabled": "Delegovanie na úrovni domény je povolené",
+ "domain_wide_delegation_disabled": "Delegovanie na úrovni domény je zakázané",
+ "add_domain_wide_delegation": "Pridať delegovanie na úrovni domény",
+ "edit_domain_wide_delegation": "Upraviť delegovanie na úrovni domény",
"domain": "Doména",
"no_workspace_platforms": "Žiadne workspace platformy",
"workspace_platform": "Workspace platforma",
@@ -2287,7 +2287,7 @@
"slug": "Slug",
"service_account_key": "Service account key JSON",
"edit_service_account_key": "Upraviť service account key JSON",
- "delegation_credential_restricts_adding_more_than_one_installation": "Delegované poverenie obmedzuje pridanie viac ako jednej inštalácie",
+ "domain_wide_delegation_restricts_adding_more_than_one_installation": "Delegovanie na úrovni domény obmedzuje pridanie viac ako jednej inštalácie",
"app_successfully_installed_and_is_using_delegated_credentials": "Aplikácia bola úspešne nainštalovaná a používa delegované prístupové údaje",
"remove_users_from_org_confirm": "Naozaj chcete odstrániť {{userCount}} používateľov z tejto organizácie?",
"remove_users_from_team": "Odstrániť používateľov z tímu",
@@ -2953,7 +2953,7 @@
"k_bar_ai_error": "Vyskytla sa neočakávaná chyba. Skúste to prosím neskôr znova",
"select_oAuth_client": "Vyberte OAuth klienta",
"on_every_instance": "Pri každej inštancii",
- "delegation_credential_feature_not_enabled": "Funkcia delegovaného poverenia nie je pre vašu organizáciu povolená",
+ "domain_wide_delegation_feature_not_enabled": "Funkcia delegovania na úrovni domény nie je pre vašu organizáciu povolená",
"internal_booking_note": "Interná poznámka",
"internal_note_cancellation_reason": "Dôvod zdieľaný so zákazníkom (voliteľné)",
"internal_booking_note_description": "Táto poznámka bude viditeľná len pre členov vášho tímu",
diff --git a/apps/web/public/static/locales/sr/common.json b/apps/web/public/static/locales/sr/common.json
index de8fd03dd87..86825bbdb4c 100644
--- a/apps/web/public/static/locales/sr/common.json
+++ b/apps/web/public/static/locales/sr/common.json
@@ -2269,13 +2269,13 @@
"what_is_this_meeting_about": "O čemu je sastanak?",
"add_to_team": "Dodajte timu",
"remove_users_from_org": "Uklonite korisnike iz organizacije",
- "delegation_credential": "Delegirani kredencijal",
- "delegation_credential_description": "Delegirani kredencijal vam omogućava da upravljate pristupom Google Workspace kalendarima za vašu organizaciju.",
+ "domain_wide_delegation": "Delegiranje na nivou domena",
+ "domain_wide_delegation_description": "Delegiranje na nivou domena vam omogućava da upravljate pristupom Google Workspace kalendarima za vašu organizaciju.",
"add_client_id_in_google_workspace_with_below_scope": "Dodajte ovaj Client Id u Google Workspace sa sledećim opsegom",
- "delegation_credential_enabled": "Delegirani kredencijal je omogućen",
- "delegation_credential_disabled": "Delegirani kredencijal je onemogućen",
- "add_delegation_credential": "Dodaj delegirani kredencijal",
- "edit_delegation_credential": "Izmeni delegirani kredencijal",
+ "domain_wide_delegation_enabled": "Delegiranje na nivou domena je omogućeno",
+ "domain_wide_delegation_disabled": "Delegiranje na nivou domena je onemogućeno",
+ "add_domain_wide_delegation": "Dodaj delegiranje na nivou domena",
+ "edit_domain_wide_delegation": "Izmeni delegiranje na nivou domena",
"domain": "Domen",
"no_workspace_platforms": "Nema workspace platformi",
"workspace_platform": "Workspace platforma",
@@ -2287,7 +2287,7 @@
"slug": "Slug",
"service_account_key": "JSON ključ servisnog naloga",
"edit_service_account_key": "Izmeni JSON ključ servisnog naloga",
- "delegation_credential_restricts_adding_more_than_one_installation": "Delegirani kredencijal ograničava dodavanje više od jedne instalacije",
+ "domain_wide_delegation_restricts_adding_more_than_one_installation": "Delegiranje na nivou domena ograničava dodavanje više od jedne instalacije",
"app_successfully_installed_and_is_using_delegated_credentials": "Aplikacija je uspešno instalirana i koristi delegirane kredencijale",
"remove_users_from_org_confirm": "Da li ste sigurni da želite da uklonite {{userCount}} korisnika iz organizacije?",
"remove_users_from_team": "Ukloni korisnike iz tima",
@@ -2953,7 +2953,7 @@
"k_bar_ai_error": "Došlo je do neočekivane greške. Molimo pokušajte ponovo kasnije",
"select_oAuth_client": "Izaberite OAuth klijenta",
"on_every_instance": "Na svakoj instanci",
- "delegation_credential_feature_not_enabled": "Funkcija delegiranog kredencijala nije omogućena za vašu organizaciju",
+ "domain_wide_delegation_feature_not_enabled": "Funkcija delegiranja na nivou domena nije omogućena za vašu organizaciju",
"internal_booking_note": "Interna beleška",
"internal_note_cancellation_reason": "Razlog koji se deli sa klijentom (opciono)",
"internal_booking_note_description": "Ova beleška će biti vidljiva samo članovima vašeg tima",
diff --git a/apps/web/public/static/locales/sv/common.json b/apps/web/public/static/locales/sv/common.json
index 1709c77d0de..06277fdaacf 100644
--- a/apps/web/public/static/locales/sv/common.json
+++ b/apps/web/public/static/locales/sv/common.json
@@ -2269,13 +2269,13 @@
"what_is_this_meeting_about": "Vad handlar det här mötet om?",
"add_to_team": "Lägg till i teamet",
"remove_users_from_org": "Ta bort användare från organisationen",
- "delegation_credential": "Delegationsautentiseringsuppgift",
- "delegation_credential_description": "Delegationsautentiseringsuppgift låter dig hantera åtkomst till Google Workspace-kalendrar för din organisation.",
+ "domain_wide_delegation": "Domänomfattande delegering",
+ "domain_wide_delegation_description": "Domänomfattande delegering låter dig hantera åtkomst till Google Workspace-kalendrar för din organisation.",
"add_client_id_in_google_workspace_with_below_scope": "Lägg till detta klient-ID i Google Workspace med omfattningen nedan",
- "delegation_credential_enabled": "Delegationsautentiseringsuppgift aktiverad",
- "delegation_credential_disabled": "Delegationsautentiseringsuppgift inaktiverad",
- "add_delegation_credential": "Lägg till delegationsautentiseringsuppgift",
- "edit_delegation_credential": "Redigera delegationsautentiseringsuppgift",
+ "domain_wide_delegation_enabled": "Domänomfattande delegering aktiverad",
+ "domain_wide_delegation_disabled": "Domänomfattande delegering inaktiverad",
+ "add_domain_wide_delegation": "Lägg till domänomfattande delegering",
+ "edit_domain_wide_delegation": "Redigera domänomfattande delegering",
"domain": "Domän",
"no_workspace_platforms": "Inga workspace-plattformar",
"workspace_platform": "Workspace-plattform",
@@ -2287,7 +2287,7 @@
"slug": "Slug",
"service_account_key": "JSON-nyckel för servicekonto",
"edit_service_account_key": "Redigera JSON-nyckel för servicekonto",
- "delegation_credential_restricts_adding_more_than_one_installation": "Delegationsautentiseringsuppgift begränsar tillägg av mer än en installation",
+ "domain_wide_delegation_restricts_adding_more_than_one_installation": "Domänomfattande delegering begränsar till max en installation",
"app_successfully_installed_and_is_using_delegated_credentials": "Appen har installerats och använder delegerade autentiseringsuppgifter",
"remove_users_from_org_confirm": "Är du säker på att du vill ta bort {{userCount}} användare från denna organisation?",
"remove_users_from_team": "Ta bort användare från teamet",
@@ -2953,7 +2953,7 @@
"k_bar_ai_error": "Ett oväntat fel inträffade. Vänligen försök igen senare",
"select_oAuth_client": "Välj OAuth-klient",
"on_every_instance": "På varje instans",
- "delegation_credential_feature_not_enabled": "Funktionen för delegationsautentiseringsuppgift är inte aktiverad för din organisation",
+ "domain_wide_delegation_feature_not_enabled": "Funktionen för domänomfattande delegering är inte aktiverad för din organisation",
"internal_booking_note": "Intern anteckning",
"internal_note_cancellation_reason": "Orsak som delas med kunden (valfritt)",
"internal_booking_note_description": "Denna anteckning kommer endast att vara synlig för medlemmar i ditt team",
diff --git a/apps/web/public/static/locales/tr/common.json b/apps/web/public/static/locales/tr/common.json
index adff792ab21..7550e208da7 100644
--- a/apps/web/public/static/locales/tr/common.json
+++ b/apps/web/public/static/locales/tr/common.json
@@ -2269,13 +2269,13 @@
"what_is_this_meeting_about": "Bu toplantının konusu nedir?",
"add_to_team": "Ekibe ekle",
"remove_users_from_org": "Kullanıcıları gruptan kaldır",
- "delegation_credential": "Yetki devri kimlik bilgisi",
- "delegation_credential_description": "Yetki devri kimlik bilgisi, organizasyonunuz için Google Workspace takvimlerine erişimi yönetmenizi sağlar.",
+ "domain_wide_delegation": "Alan adı genelinde yetkilendirme",
+ "domain_wide_delegation_description": "Alan adı genelinde yetkilendirme, organizasyonunuz için Google Workspace takvimlerine erişimi yönetmenizi sağlar.",
"add_client_id_in_google_workspace_with_below_scope": "Bu İstemci Kimliğini aşağıdaki kapsam ile Google Workspace'e ekleyin",
- "delegation_credential_enabled": "Yetki devri kimlik bilgisi etkinleştirildi",
- "delegation_credential_disabled": "Yetki devri kimlik bilgisi devre dışı bırakıldı",
- "add_delegation_credential": "Yetki devri kimlik bilgisi ekle",
- "edit_delegation_credential": "Yetki devri kimlik bilgisini düzenle",
+ "domain_wide_delegation_enabled": "Alan adı genelinde yetkilendirme etkin",
+ "domain_wide_delegation_disabled": "Alan adı genelinde yetkilendirme devre dışı",
+ "add_domain_wide_delegation": "Alan adı genelinde yetkilendirme ekle",
+ "edit_domain_wide_delegation": "Alan adı genelinde yetkilendirmeyi düzenle",
"domain": "Alan adı",
"no_workspace_platforms": "Çalışma alanı platformu yok",
"workspace_platform": "Çalışma alanı platformu",
@@ -2287,7 +2287,7 @@
"slug": "Slug",
"service_account_key": "Hizmet hesabı anahtarı JSON",
"edit_service_account_key": "Hizmet hesabı anahtarı JSON'ı düzenle",
- "delegation_credential_restricts_adding_more_than_one_installation": "Yetki devri kimlik bilgisi, birden fazla kurulum eklemeyi kısıtlar",
+ "domain_wide_delegation_restricts_adding_more_than_one_installation": "Alan adı genelinde yetkilendirme, birden fazla kurulum eklemeyi kısıtlar",
"app_successfully_installed_and_is_using_delegated_credentials": "Uygulama başarıyla kuruldu ve yetkilendirilmiş kimlik bilgilerini kullanıyor",
"remove_users_from_org_confirm": "{{userCount}} kullanıcıyı bu gruptan kaldırmak istediğinizden emin misiniz?",
"remove_users_from_team": "Kullanıcıları takımdan çıkar",
@@ -2953,7 +2953,7 @@
"k_bar_ai_error": "Beklenmeyen bir hata oluştu. Lütfen daha sonra tekrar deneyin",
"select_oAuth_client": "OAuth istemcisi seçin",
"on_every_instance": "Her örnekte",
- "delegation_credential_feature_not_enabled": "Yetki devri kimlik bilgisi özelliği organizasyonunuz için etkinleştirilmemiş",
+ "domain_wide_delegation_feature_not_enabled": "Alan adı genelinde yetkilendirme özelliği organizasyonunuz için etkinleştirilmemiş",
"internal_booking_note": "İç Not",
"internal_note_cancellation_reason": "Müşteri ile paylaşılacak neden (isteğe bağlı)",
"internal_booking_note_description": "Bu not yalnızca ekip üyeleriniz tarafından görülebilecektir",
diff --git a/apps/web/public/static/locales/uk/common.json b/apps/web/public/static/locales/uk/common.json
index 5b2527f1599..c51805001be 100644
--- a/apps/web/public/static/locales/uk/common.json
+++ b/apps/web/public/static/locales/uk/common.json
@@ -2269,13 +2269,13 @@
"what_is_this_meeting_about": "Про що ця зустріч?",
"add_to_team": "Додати в команду",
"remove_users_from_org": "Видалити користувачів з організації",
- "delegation_credential": "Облікові дані делегування",
- "delegation_credential_description": "Облікові дані делегування дозволяють керувати доступом до календарів Google Workspace для вашої організації.",
+ "domain_wide_delegation": "Делегування на рівні домену",
+ "domain_wide_delegation_description": "Делегування на рівні домену дозволяє керувати доступом до календарів Google Workspace для вашої організації.",
"add_client_id_in_google_workspace_with_below_scope": "Додайте цей Client Id в Google Workspace з наведеною нижче областю дії",
- "delegation_credential_enabled": "Облікові дані делегування увімкнено",
- "delegation_credential_disabled": "Облікові дані делегування вимкнено",
- "add_delegation_credential": "Додати облікові дані делегування",
- "edit_delegation_credential": "Редагувати облікові дані делегування",
+ "domain_wide_delegation_enabled": "Делегування на рівні домену увімкнено",
+ "domain_wide_delegation_disabled": "Делегування на рівні домену вимкнено",
+ "add_domain_wide_delegation": "Додати делегування на рівні домену",
+ "edit_domain_wide_delegation": "Редагувати делегування на рівні домену",
"domain": "Домен",
"no_workspace_platforms": "Немає платформ workspace",
"workspace_platform": "Платформа workspace",
@@ -2287,7 +2287,7 @@
"slug": "Slug",
"service_account_key": "JSON ключ сервісного акаунта",
"edit_service_account_key": "Редагувати JSON ключ сервісного акаунта",
- "delegation_credential_restricts_adding_more_than_one_installation": "Облікові дані делегування обмежують додавання більше однієї інсталяції",
+ "domain_wide_delegation_restricts_adding_more_than_one_installation": "Делегування на рівні домену обмежує додавання більше однієї інсталяції",
"app_successfully_installed_and_is_using_delegated_credentials": "Застосунок успішно встановлено і використовує делеговані облікові дані",
"remove_users_from_org_confirm": "Справді видалити користувачів ({{userCount}}) із цієї організації?",
"remove_users_from_team": "Видалити користувачів з команди",
@@ -2953,7 +2953,7 @@
"k_bar_ai_error": "Сталася неочікувана помилка. Будь ласка, спробуйте пізніше",
"select_oAuth_client": "Оберіть OAuth-клієнта",
"on_every_instance": "На кожному екземплярі",
- "delegation_credential_feature_not_enabled": "Функцію облікових даних делегування не увімкнено для вашої організації",
+ "domain_wide_delegation_feature_not_enabled": "Функція делегування на рівні домену не увімкнена для вашої організації",
"internal_booking_note": "Внутрішня примітка",
"internal_note_cancellation_reason": "Причина, яка буде повідомлена клієнту (необов'язково)",
"internal_booking_note_description": "Ця примітка буде видима лише для учасників вашої команди",
diff --git a/apps/web/public/static/locales/vi/common.json b/apps/web/public/static/locales/vi/common.json
index 93e8b2a998c..0b18cee6184 100644
--- a/apps/web/public/static/locales/vi/common.json
+++ b/apps/web/public/static/locales/vi/common.json
@@ -2269,13 +2269,13 @@
"what_is_this_meeting_about": "Cuộc họp này về điều gì?",
"add_to_team": "Thêm vào nhóm",
"remove_users_from_org": "Xoá bỏ người dùng khỏi tổ chức",
- "delegation_credential": "Thông tin xác thực ủy quyền",
- "delegation_credential_description": "Thông tin xác thực ủy quyền cho phép bạn quản lý quyền truy cập vào lịch Google Workspace cho tổ chức của bạn.",
+ "domain_wide_delegation": "Ủy quyền toàn miền",
+ "domain_wide_delegation_description": "Ủy quyền toàn miền cho phép bạn quản lý quyền truy cập vào lịch Google Workspace cho tổ chức của bạn.",
"add_client_id_in_google_workspace_with_below_scope": "Thêm Client Id này vào Google Workspace với phạm vi dưới đây",
- "delegation_credential_enabled": "Đã bật thông tin xác thực ủy quyền",
- "delegation_credential_disabled": "Đã tắt thông tin xác thực ủy quyền",
- "add_delegation_credential": "Thêm thông tin xác thực ủy quyền",
- "edit_delegation_credential": "Chỉnh sửa thông tin xác thực ủy quyền",
+ "domain_wide_delegation_enabled": "Đã bật ủy quyền toàn miền",
+ "domain_wide_delegation_disabled": "Đã tắt ủy quyền toàn miền",
+ "add_domain_wide_delegation": "Thêm ủy quyền toàn miền",
+ "edit_domain_wide_delegation": "Chỉnh sửa ủy quyền toàn miền",
"domain": "Tên miền",
"no_workspace_platforms": "Không có nền tảng workspace",
"workspace_platform": "Nền tảng workspace",
@@ -2287,7 +2287,7 @@
"slug": "Slug",
"service_account_key": "JSON khóa tài khoản dịch vụ",
"edit_service_account_key": "Chỉnh sửa JSON khóa tài khoản dịch vụ",
- "delegation_credential_restricts_adding_more_than_one_installation": "Thông tin xác thực ủy quyền giới hạn việc thêm nhiều hơn một cài đặt",
+ "domain_wide_delegation_restricts_adding_more_than_one_installation": "Ủy quyền toàn miền giới hạn việc thêm nhiều hơn một cài đặt",
"app_successfully_installed_and_is_using_delegated_credentials": "Ứng dụng đã được cài đặt thành công và đang sử dụng thông tin xác thực được ủy quyền",
"remove_users_from_org_confirm": "Bạn có chắc chắn muốn xoá bỏ {{userCount}} người dùng khỏi tổ chức này?",
"remove_users_from_team": "Xóa người dùng khỏi nhóm",
@@ -2953,7 +2953,7 @@
"k_bar_ai_error": "Đã xảy ra lỗi không mong muốn. Vui lòng thử lại sau",
"select_oAuth_client": "Chọn OAuth Client",
"on_every_instance": "Trên mỗi phiên bản",
- "delegation_credential_feature_not_enabled": "Tính năng thông tin xác thực ủy quyền chưa được kích hoạt cho tổ chức của bạn",
+ "domain_wide_delegation_feature_not_enabled": "Tính năng ủy quyền toàn miền chưa được kích hoạt cho tổ chức của bạn",
"internal_booking_note": "Ghi chú nội bộ",
"internal_note_cancellation_reason": "Lý do chia sẻ với khách hàng (tùy chọn)",
"internal_booking_note_description": "Ghi chú này chỉ hiển thị cho các thành viên trong nhóm của bạn",
diff --git a/apps/web/public/static/locales/zh-CN/common.json b/apps/web/public/static/locales/zh-CN/common.json
index 7a6fba59c54..976fe124a6a 100644
--- a/apps/web/public/static/locales/zh-CN/common.json
+++ b/apps/web/public/static/locales/zh-CN/common.json
@@ -2269,13 +2269,13 @@
"what_is_this_meeting_about": "此会议是关于什么的?",
"add_to_team": "添加到团队",
"remove_users_from_org": "从组织中移除用户",
- "delegation_credential": "委托凭证",
- "delegation_credential_description": "委托凭证允许您管理组织的 Google Workspace 日历访问权限。",
+ "domain_wide_delegation": "域级委托",
+ "domain_wide_delegation_description": "域级委托允许您管理组织的 Google Workspace 日历访问权限。",
"add_client_id_in_google_workspace_with_below_scope": "使用以下范围在 Google Workspace 中添加此客户端 ID",
- "delegation_credential_enabled": "委托凭证已启用",
- "delegation_credential_disabled": "委托凭证已禁用",
- "add_delegation_credential": "添加委托凭证",
- "edit_delegation_credential": "编辑委托凭证",
+ "domain_wide_delegation_enabled": "已启用域级委托",
+ "domain_wide_delegation_disabled": "已禁用域级委托",
+ "add_domain_wide_delegation": "添加域级委托",
+ "edit_domain_wide_delegation": "编辑域级委托",
"domain": "域名",
"no_workspace_platforms": "无工作区平台",
"workspace_platform": "工作区平台",
@@ -2287,7 +2287,7 @@
"slug": "标识符",
"service_account_key": "服务账号密钥 JSON",
"edit_service_account_key": "编辑服务账号密钥 JSON",
- "delegation_credential_restricts_adding_more_than_one_installation": "委托凭证限制添加多个安装",
+ "domain_wide_delegation_restricts_adding_more_than_one_installation": "域级委托限制添加多个安装",
"app_successfully_installed_and_is_using_delegated_credentials": "应用程序已成功安装并正在使用委托凭据",
"remove_users_from_org_confirm": "您确定要从该组织中移除 {{userCount}} 个用户吗?",
"remove_users_from_team": "从团队中移除用户",
@@ -2953,7 +2953,7 @@
"k_bar_ai_error": "发生意外错误。请稍后再试。",
"select_oAuth_client": "选择 OAuth 客户端",
"on_every_instance": "在每个实例上",
- "delegation_credential_feature_not_enabled": "您的组织尚未启用委托凭证功能",
+ "domain_wide_delegation_feature_not_enabled": "您的组织尚未启用域级委托功能",
"internal_booking_note": "内部备注",
"internal_note_cancellation_reason": "与客户共享的原因(可选)",
"internal_booking_note_description": "此备注仅对团队成员可见",
diff --git a/apps/web/public/static/locales/zh-TW/common.json b/apps/web/public/static/locales/zh-TW/common.json
index b538fd32e6b..3faa70d9952 100644
--- a/apps/web/public/static/locales/zh-TW/common.json
+++ b/apps/web/public/static/locales/zh-TW/common.json
@@ -2269,13 +2269,13 @@
"what_is_this_meeting_about": "此會議的主題是什麼?",
"add_to_team": "新增至團隊",
"remove_users_from_org": "從組織中移除使用者",
- "delegation_credential": "委派憑證",
- "delegation_credential_description": "委派憑證允許您管理組織的 Google Workspace 日曆存取權限。",
+ "domain_wide_delegation": "網域範圍委派",
+ "domain_wide_delegation_description": "網域範圍委派允許您管理組織的 Google Workspace 日曆存取權限。",
"add_client_id_in_google_workspace_with_below_scope": "請在 Google Workspace 中使用以下範圍新增此客戶端 ID",
- "delegation_credential_enabled": "已啟用委派憑證",
- "delegation_credential_disabled": "已停用委派憑證",
- "add_delegation_credential": "新增委派憑證",
- "edit_delegation_credential": "編輯委派憑證",
+ "domain_wide_delegation_enabled": "已啟用網域範圍委派",
+ "domain_wide_delegation_disabled": "已停用網域範圍委派",
+ "add_domain_wide_delegation": "新增網域範圍委派",
+ "edit_domain_wide_delegation": "編輯網域範圍委派",
"domain": "網域",
"no_workspace_platforms": "無工作區平台",
"workspace_platform": "工作區平台",
@@ -2287,7 +2287,7 @@
"slug": "Slug",
"service_account_key": "服務帳戶金鑰 JSON",
"edit_service_account_key": "編輯服務帳戶金鑰 JSON",
- "delegation_credential_restricts_adding_more_than_one_installation": "委派憑證限制新增超過一個安裝",
+ "domain_wide_delegation_restricts_adding_more_than_one_installation": "網域範圍委派限制新增多個安裝",
"app_successfully_installed_and_is_using_delegated_credentials": "應用程式已成功安裝並使用委派憑證",
"remove_users_from_org_confirm": "確定要從此組織移除 {{userCount}} 使用者嗎?",
"remove_users_from_team": "從團隊中移除用戶",
@@ -2953,7 +2953,7 @@
"k_bar_ai_error": "發生意外錯誤。請稍後再試。",
"select_oAuth_client": "選擇 OAuth 用戶端",
"on_every_instance": "在每個執行個體上",
- "delegation_credential_feature_not_enabled": "您的組織尚未啟用委派憑證功能",
+ "domain_wide_delegation_feature_not_enabled": "您的組織尚未啟用網域範圍委派功能",
"internal_booking_note": "內部備註",
"internal_note_cancellation_reason": "與客戶分享的原因(選填)",
"internal_booking_note_description": "此備註僅團隊成員可見",
diff --git a/apps/web/test/lib/getSchedule/delegation-credential.test.ts b/apps/web/test/lib/getSchedule/domain-wide-delegation.test.ts
similarity index 91%
rename from apps/web/test/lib/getSchedule/delegation-credential.test.ts
rename to apps/web/test/lib/getSchedule/domain-wide-delegation.test.ts
index 74df5ad78ec..b8704558110 100644
--- a/apps/web/test/lib/getSchedule/delegation-credential.test.ts
+++ b/apps/web/test/lib/getSchedule/domain-wide-delegation.test.ts
@@ -4,7 +4,7 @@ import {
Timezones,
TestData,
mockCalendar,
- createDelegationCredential,
+ createDwdCredential,
createOrganization,
getOrganizer,
} from "../../utils/bookingScenario/bookingScenario";
@@ -20,8 +20,8 @@ import { setupAndTeardown } from "./setupAndTeardown";
describe("getSchedule", () => {
setupAndTeardown();
- describe("Delegation Credential", () => {
- test("correctly identifies unavailable slots using DelegationCredential credentials", async () => {
+ describe("Domain Wide Delegation", () => {
+ test("correctly identifies unavailable slots using DWD credentials", async () => {
const { dateString: plus1DateString } = getDate({ dateIncrement: 1 });
const { dateString: plus2DateString } = getDate({ dateIncrement: 2 });
@@ -50,13 +50,13 @@ describe("getSchedule", () => {
id: 101,
schedules: [TestData.schedules.IstWorkHours],
selectedCalendars: [TestData.selectedCalendars.google],
- // User must be part of organization to be able to use that organization's Delegation credential
+ // User must be part of organization to be able to use that organization's DWD credential
teams: payloadToMakePartOfOrganization,
// No regular credentials provided
credentials: [],
});
- await createDelegationCredential(org.id);
+ await createDwdCredential(org.id);
const googleCalendarMock = mockCalendar("googlecalendar", {
create: {
@@ -108,7 +108,7 @@ describe("getSchedule", () => {
});
});
- test("fails to get schedule when user isn't part of the organization with Delegation credential", async () => {
+ test("fails to get schedule when user isn't part of the organization with DWD credential", async () => {
const { dateString: plus1DateString } = getDate({ dateIncrement: 1 });
const { dateString: plus2DateString } = getDate({ dateIncrement: 2 });
@@ -147,8 +147,8 @@ describe("getSchedule", () => {
credentials: [],
});
- // Create Delegation credential for the org user isn't part of
- await createDelegationCredential(org.id);
+ // Create DWD credential for the org user isn't part of
+ await createDwdCredential(org.id);
const googleCalendarMock = mockCalendar("googlecalendar", {
create: {
@@ -196,7 +196,7 @@ describe("getSchedule", () => {
expectNoAttemptToGetAvailability(googleCalendarMock);
- // All slots would be available as no DelegationCredential credentials are available
+ // All slots would be available as no DWD credentials are available
expect(scheduleForDayWithAGoogleCalendarBooking).toHaveTimeSlots(
expectedSlotsForSchedule.IstWorkHours.interval["1hr"].allPossibleSlotsStartingAt430,
{
diff --git a/apps/web/test/utils/bookingScenario/bookingScenario.ts b/apps/web/test/utils/bookingScenario/bookingScenario.ts
index 6a0b55a5127..4033b0d7aa2 100644
--- a/apps/web/test/utils/bookingScenario/bookingScenario.ts
+++ b/apps/web/test/utils/bookingScenario/bookingScenario.ts
@@ -2309,7 +2309,7 @@ export const getDefaultBookingFields = ({
] as Fields;
};
-export const createDelegationCredential = async (orgId: number, type: "google" | "office365" = "google") => {
+export const createDwdCredential = async (orgId: number, type: "google" | "office365" = "google") => {
if (type === "google") {
const encryptedServiceAccountKey = {
type: "service_account",
@@ -2349,7 +2349,7 @@ export const createDelegationCredential = async (orgId: number, type: "google" |
auth_provider_x509_cert_url: "AUTH_PROVIDER_X509_CERT_URL",
};
- const delegationCredential = await prismock.delegationCredential.create({
+ const dwd = await prismock.domainWideDelegation.create({
data: {
workspacePlatform: {
connect: {
@@ -2368,7 +2368,7 @@ export const createDelegationCredential = async (orgId: number, type: "google" |
},
});
- return { ...delegationCredential, serviceAccountKey: decryptedServiceAccountKey };
+ return { ...dwd, serviceAccountKey: decryptedServiceAccountKey };
} else if (type === "office365") {
const encryptedServiceAccountKey = {
client_id: "CLIENT_ID",
@@ -2392,7 +2392,7 @@ export const createDelegationCredential = async (orgId: number, type: "google" |
tenant_id: "TENANT_ID",
};
- const delegationCredential = await prismock.delegationCredential.create({
+ const dwd = await prismock.domainWideDelegation.create({
data: {
workspacePlatform: {
connect: {
@@ -2411,13 +2411,13 @@ export const createDelegationCredential = async (orgId: number, type: "google" |
},
});
- return { ...delegationCredential, serviceAccountKey: decryptedServiceAccountKey };
+ return { ...dwd, serviceAccountKey: decryptedServiceAccountKey };
}
throw new Error(`Unsupported type: ${type}`);
};
// eslint-disable-next-line @typescript-eslint/no-explicit-any
-export const buildDelegationCredential = ({ serviceAccountKey }: { serviceAccountKey: any }) => {
+export const buildDwdCredential = ({ serviceAccountKey }: { serviceAccountKey: any }) => {
return {
id: -1,
key: {
diff --git a/docs/api-reference/v2/openapi.json b/docs/api-reference/v2/openapi.json
index bdf812f1d94..6cab980f2b0 100644
--- a/docs/api-reference/v2/openapi.json
+++ b/docs/api-reference/v2/openapi.json
@@ -27,9 +27,7 @@
}
}
},
- "tags": [
- "Platform / Cal Provider"
- ]
+ "tags": ["Platform / Cal Provider"]
}
},
"/v2/provider/{clientId}/access-token": {
@@ -58,9 +56,7 @@
}
}
},
- "tags": [
- "Platform / Cal Provider"
- ]
+ "tags": ["Platform / Cal Provider"]
}
},
"/v2/oauth-clients/{clientId}/users": {
@@ -99,9 +95,7 @@
}
}
},
- "tags": [
- "Platform / Managed Users"
- ]
+ "tags": ["Platform / Managed Users"]
},
"post": {
"operationId": "OAuthClientUsersController_createUser",
@@ -138,9 +132,7 @@
}
}
},
- "tags": [
- "Platform / Managed Users"
- ]
+ "tags": ["Platform / Managed Users"]
}
},
"/v2/oauth-clients/{clientId}/users/{userId}": {
@@ -177,9 +169,7 @@
}
}
},
- "tags": [
- "Platform / Managed Users"
- ]
+ "tags": ["Platform / Managed Users"]
},
"patch": {
"operationId": "OAuthClientUsersController_updateUser",
@@ -224,9 +214,7 @@
}
}
},
- "tags": [
- "Platform / Managed Users"
- ]
+ "tags": ["Platform / Managed Users"]
},
"delete": {
"operationId": "OAuthClientUsersController_deleteUser",
@@ -261,9 +249,7 @@
}
}
},
- "tags": [
- "Platform / Managed Users"
- ]
+ "tags": ["Platform / Managed Users"]
}
},
"/v2/oauth-clients/{clientId}/users/{userId}/force-refresh": {
@@ -301,9 +287,7 @@
}
}
},
- "tags": [
- "Platform / Managed Users"
- ]
+ "tags": ["Platform / Managed Users"]
}
},
"/v2/oauth/{clientId}/refresh": {
@@ -352,9 +336,7 @@
}
}
},
- "tags": [
- "Platform / Managed Users"
- ]
+ "tags": ["Platform / Managed Users"]
}
},
"/v2/oauth-clients/{clientId}/webhooks": {
@@ -393,9 +375,7 @@
}
}
},
- "tags": [
- "Platform / Webhooks"
- ]
+ "tags": ["Platform / Webhooks"]
},
"get": {
"operationId": "OAuthClientWebhooksController_getOAuthClientWebhooks",
@@ -442,9 +422,7 @@
}
}
},
- "tags": [
- "Platform / Webhooks"
- ]
+ "tags": ["Platform / Webhooks"]
},
"delete": {
"operationId": "OAuthClientWebhooksController_deleteAllOAuthClientWebhooks",
@@ -471,9 +449,7 @@
}
}
},
- "tags": [
- "Platform / Webhooks"
- ]
+ "tags": ["Platform / Webhooks"]
}
},
"/v2/oauth-clients/{clientId}/webhooks/{webhookId}": {
@@ -512,9 +488,7 @@
}
}
},
- "tags": [
- "Platform / Webhooks"
- ]
+ "tags": ["Platform / Webhooks"]
},
"get": {
"operationId": "OAuthClientWebhooksController_getOAuthClientWebhook",
@@ -532,9 +506,7 @@
}
}
},
- "tags": [
- "Platform / Webhooks"
- ]
+ "tags": ["Platform / Webhooks"]
},
"delete": {
"operationId": "OAuthClientWebhooksController_deleteOAuthClientWebhook",
@@ -552,9 +524,7 @@
}
}
},
- "tags": [
- "Platform / Webhooks"
- ]
+ "tags": ["Platform / Webhooks"]
}
},
"/v2/organizations/{orgId}/attributes": {
@@ -603,9 +573,7 @@
}
}
},
- "tags": [
- "Orgs / Attributes"
- ]
+ "tags": ["Orgs / Attributes"]
},
"post": {
"operationId": "OrganizationsAttributesController_createOrganizationAttribute",
@@ -642,9 +610,7 @@
}
}
},
- "tags": [
- "Orgs / Attributes"
- ]
+ "tags": ["Orgs / Attributes"]
}
},
"/v2/organizations/{orgId}/attributes/{attributeId}": {
@@ -681,9 +647,7 @@
}
}
},
- "tags": [
- "Orgs / Attributes"
- ]
+ "tags": ["Orgs / Attributes"]
},
"patch": {
"operationId": "OrganizationsAttributesController_updateOrganizationAttribute",
@@ -728,9 +692,7 @@
}
}
},
- "tags": [
- "Orgs / Attributes"
- ]
+ "tags": ["Orgs / Attributes"]
},
"delete": {
"operationId": "OrganizationsAttributesController_deleteOrganizationAttribute",
@@ -765,9 +727,7 @@
}
}
},
- "tags": [
- "Orgs / Attributes"
- ]
+ "tags": ["Orgs / Attributes"]
}
},
"/v2/organizations/{orgId}/attributes/{attributeId}/options": {
@@ -814,9 +774,7 @@
}
}
},
- "tags": [
- "Orgs / Attributes / Options"
- ]
+ "tags": ["Orgs / Attributes / Options"]
},
"get": {
"operationId": "OrganizationsAttributesOptionsController_getOrganizationAttributeOptions",
@@ -851,9 +809,7 @@
}
}
},
- "tags": [
- "Orgs / Attributes / Options"
- ]
+ "tags": ["Orgs / Attributes / Options"]
}
},
"/v2/organizations/{orgId}/attributes/{attributeId}/options/{optionId}": {
@@ -898,9 +854,7 @@
}
}
},
- "tags": [
- "Orgs / Attributes / Options"
- ]
+ "tags": ["Orgs / Attributes / Options"]
},
"patch": {
"operationId": "OrganizationsAttributesOptionsController_updateOrganizationAttributeOption",
@@ -953,9 +907,7 @@
}
}
},
- "tags": [
- "Orgs / Attributes / Options"
- ]
+ "tags": ["Orgs / Attributes / Options"]
}
},
"/v2/organizations/{orgId}/attributes/options/{userId}": {
@@ -1002,9 +954,7 @@
}
}
},
- "tags": [
- "Orgs / Attributes / Options"
- ]
+ "tags": ["Orgs / Attributes / Options"]
},
"get": {
"operationId": "OrganizationsAttributesOptionsController_getOrganizationAttributeOptionsForUser",
@@ -1039,9 +989,7 @@
}
}
},
- "tags": [
- "Orgs / Attributes / Options"
- ]
+ "tags": ["Orgs / Attributes / Options"]
}
},
"/v2/organizations/{orgId}/attributes/options/{userId}/{attributeOptionId}": {
@@ -1086,14 +1034,12 @@
}
}
},
- "tags": [
- "Orgs / Attributes / Options"
- ]
+ "tags": ["Orgs / Attributes / Options"]
}
},
"/v2/organizations/{orgId}/delegation-credentials": {
"post": {
- "operationId": "OrganizationsDelegationCredentialController_createDelegationCredential",
+ "operationId": "OrganizationsDwdController_createDwd",
"summary": "Save delegation credentials for your organization.",
"parameters": [
{
@@ -1110,7 +1056,7 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/CreateDelegationCredentialInput"
+ "$ref": "#/components/schemas/CreateDwdInput"
}
}
}
@@ -1121,20 +1067,18 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/CreateDelegationCredentialOutput"
+ "$ref": "#/components/schemas/CreateDwdOutput"
}
}
}
}
},
- "tags": [
- "Orgs / Delegation Credentials"
- ]
+ "tags": ["Orgs / Delegation Credentials"]
}
},
"/v2/organizations/{orgId}/delegation-credentials/{credentialId}": {
"patch": {
- "operationId": "OrganizationsDelegationCredentialController_updateDelegationCredential",
+ "operationId": "OrganizationsDwdController_updateDwd",
"summary": "Update delegation credentials of your organization.",
"parameters": [
{
@@ -1159,7 +1103,7 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/UpdateDelegationCredentialInput"
+ "$ref": "#/components/schemas/UpdateDwdInput"
}
}
}
@@ -1170,15 +1114,13 @@
"content": {
"application/json": {
"schema": {
- "$ref": "#/components/schemas/UpdateDelegationCredentialOutput"
+ "$ref": "#/components/schemas/UpdateDwdOutput"
}
}
}
}
},
- "tags": [
- "Orgs / Delegation Credentials"
- ]
+ "tags": ["Orgs / Delegation Credentials"]
}
},
"/v2/organizations/{orgId}/teams/{teamId}/event-types": {
@@ -1225,9 +1167,7 @@
}
}
},
- "tags": [
- "Orgs / Event Types"
- ]
+ "tags": ["Orgs / Event Types"]
},
"get": {
"operationId": "OrganizationsEventTypesController_getTeamEventTypes",
@@ -1272,9 +1212,7 @@
}
}
},
- "tags": [
- "Orgs / Event Types"
- ]
+ "tags": ["Orgs / Event Types"]
}
},
"/v2/organizations/{orgId}/teams/{teamId}/event-types/{eventTypeId}": {
@@ -1311,9 +1249,7 @@
}
}
},
- "tags": [
- "Orgs / Event Types"
- ]
+ "tags": ["Orgs / Event Types"]
},
"patch": {
"operationId": "OrganizationsEventTypesController_updateTeamEventType",
@@ -1358,9 +1294,7 @@
}
}
},
- "tags": [
- "Orgs / Event Types"
- ]
+ "tags": ["Orgs / Event Types"]
},
"delete": {
"operationId": "OrganizationsEventTypesController_deleteTeamEventType",
@@ -1395,9 +1329,7 @@
}
}
},
- "tags": [
- "Orgs / Event Types"
- ]
+ "tags": ["Orgs / Event Types"]
}
},
"/v2/organizations/{orgId}/teams/{teamId}/event-types/{eventTypeId}/create-phone-call": {
@@ -1444,9 +1376,7 @@
}
}
},
- "tags": [
- "Orgs / Event Types"
- ]
+ "tags": ["Orgs / Event Types"]
}
},
"/v2/organizations/{orgId}/teams/event-types": {
@@ -1495,9 +1425,7 @@
}
}
},
- "tags": [
- "Orgs / Event Types"
- ]
+ "tags": ["Orgs / Event Types"]
}
},
"/v2/organizations/{orgId}/memberships": {
@@ -1546,9 +1474,7 @@
}
}
},
- "tags": [
- "Orgs / Memberships"
- ]
+ "tags": ["Orgs / Memberships"]
},
"post": {
"operationId": "OrganizationsMembershipsController_createMembership",
@@ -1585,9 +1511,7 @@
}
}
},
- "tags": [
- "Orgs / Memberships"
- ]
+ "tags": ["Orgs / Memberships"]
}
},
"/v2/organizations/{orgId}/memberships/{membershipId}": {
@@ -1624,9 +1548,7 @@
}
}
},
- "tags": [
- "Orgs / Memberships"
- ]
+ "tags": ["Orgs / Memberships"]
},
"delete": {
"operationId": "OrganizationsMembershipsController_deleteMembership",
@@ -1661,9 +1583,7 @@
}
}
},
- "tags": [
- "Orgs / Memberships"
- ]
+ "tags": ["Orgs / Memberships"]
},
"patch": {
"operationId": "OrganizationsMembershipsController_updateMembership",
@@ -1708,9 +1628,7 @@
}
}
},
- "tags": [
- "Orgs / Memberships"
- ]
+ "tags": ["Orgs / Memberships"]
}
},
"/v2/organizations/{orgId}/organizations": {
@@ -1750,9 +1668,7 @@
}
}
},
- "tags": [
- "Orgs / Orgs"
- ]
+ "tags": ["Orgs / Orgs"]
},
"get": {
"operationId": "OrganizationsOrganizationsController_getOrganizations",
@@ -1780,9 +1696,7 @@
}
}
},
- "tags": [
- "Orgs / Orgs"
- ]
+ "tags": ["Orgs / Orgs"]
}
},
"/v2/organizations/{orgId}/organizations/{managedOrganizationId}": {
@@ -1812,9 +1726,7 @@
}
}
},
- "tags": [
- "Orgs / Orgs"
- ]
+ "tags": ["Orgs / Orgs"]
},
"patch": {
"operationId": "OrganizationsOrganizationsController_updateOrganization",
@@ -1860,9 +1772,7 @@
}
}
},
- "tags": [
- "Orgs / Orgs"
- ]
+ "tags": ["Orgs / Orgs"]
},
"delete": {
"operationId": "OrganizationsOrganizationsController_deleteOrganization",
@@ -1890,9 +1800,7 @@
}
}
},
- "tags": [
- "Orgs / Orgs"
- ]
+ "tags": ["Orgs / Orgs"]
}
},
"/v2/organizations/{orgId}/schedules": {
@@ -1941,9 +1849,7 @@
}
}
},
- "tags": [
- "Orgs / Schedules"
- ]
+ "tags": ["Orgs / Schedules"]
}
},
"/v2/organizations/{orgId}/users/{userId}/schedules": {
@@ -1982,10 +1888,7 @@
}
}
},
- "tags": [
- "Orgs / Schedules",
- "Orgs / Users / Schedules"
- ]
+ "tags": ["Orgs / Schedules", "Orgs / Users / Schedules"]
},
"get": {
"operationId": "OrganizationsSchedulesController_getUserSchedules",
@@ -2012,10 +1915,7 @@
}
}
},
- "tags": [
- "Orgs / Schedules",
- "Orgs / Users / Schedules"
- ]
+ "tags": ["Orgs / Schedules", "Orgs / Users / Schedules"]
}
},
"/v2/organizations/{orgId}/users/{userId}/schedules/{scheduleId}": {
@@ -2052,10 +1952,7 @@
}
}
},
- "tags": [
- "Orgs / Schedules",
- "Orgs / Users / Schedules"
- ]
+ "tags": ["Orgs / Schedules", "Orgs / Users / Schedules"]
},
"patch": {
"operationId": "OrganizationsSchedulesController_updateUserSchedule",
@@ -2100,10 +1997,7 @@
}
}
},
- "tags": [
- "Orgs / Schedules",
- "Orgs / Users / Schedules"
- ]
+ "tags": ["Orgs / Schedules", "Orgs / Users / Schedules"]
},
"delete": {
"operationId": "OrganizationsSchedulesController_deleteUserSchedule",
@@ -2138,10 +2032,7 @@
}
}
},
- "tags": [
- "Orgs / Schedules",
- "Orgs / Users / Schedules"
- ]
+ "tags": ["Orgs / Schedules", "Orgs / Users / Schedules"]
}
},
"/v2/organizations/{orgId}/teams": {
@@ -2190,10 +2081,7 @@
}
}
},
- "tags": [
- "Orgs / Teams",
- "Teams"
- ]
+ "tags": ["Orgs / Teams", "Teams"]
},
"post": {
"operationId": "OrganizationsTeamsController_createTeam",
@@ -2238,9 +2126,7 @@
}
}
},
- "tags": [
- "Orgs / Teams"
- ]
+ "tags": ["Orgs / Teams"]
}
},
"/v2/organizations/{orgId}/teams/me": {
@@ -2289,9 +2175,7 @@
}
}
},
- "tags": [
- "Orgs / Teams"
- ]
+ "tags": ["Orgs / Teams"]
}
},
"/v2/organizations/{orgId}/teams/{teamId}": {
@@ -2311,9 +2195,7 @@
}
}
},
- "tags": [
- "Orgs / Teams"
- ]
+ "tags": ["Orgs / Teams"]
},
"delete": {
"operationId": "OrganizationsTeamsController_deleteTeam",
@@ -2348,9 +2230,7 @@
}
}
},
- "tags": [
- "Orgs / Teams"
- ]
+ "tags": ["Orgs / Teams"]
},
"patch": {
"operationId": "OrganizationsTeamsController_updateTeam",
@@ -2395,9 +2275,7 @@
}
}
},
- "tags": [
- "Orgs / Teams"
- ]
+ "tags": ["Orgs / Teams"]
}
},
"/v2/organizations/{orgId}/teams/{teamId}/bookings": {
@@ -2415,13 +2293,7 @@
"type": "array",
"items": {
"type": "string",
- "enum": [
- "upcoming",
- "recurring",
- "past",
- "cancelled",
- "unconfirmed"
- ]
+ "enum": ["upcoming", "recurring", "past", "cancelled", "unconfirmed"]
}
}
},
@@ -2492,10 +2364,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"
}
},
@@ -2506,10 +2375,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"
}
},
@@ -2520,10 +2386,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"
}
},
@@ -2571,9 +2434,7 @@
}
}
},
- "tags": [
- "Orgs / Teams / Bookings"
- ]
+ "tags": ["Orgs / Teams / Bookings"]
}
},
"/v2/organizations/{orgId}/teams/{teamId}/memberships": {
@@ -2630,9 +2491,7 @@
}
}
},
- "tags": [
- "Orgs / Teams / Memberships"
- ]
+ "tags": ["Orgs / Teams / Memberships"]
},
"post": {
"operationId": "OrganizationsTeamsMembershipsController_createOrgTeamMembership",
@@ -2677,9 +2536,7 @@
}
}
},
- "tags": [
- "Orgs / Teams / Memberships"
- ]
+ "tags": ["Orgs / Teams / Memberships"]
}
},
"/v2/organizations/{orgId}/teams/{teamId}/memberships/{membershipId}": {
@@ -2724,9 +2581,7 @@
}
}
},
- "tags": [
- "Orgs / Teams / Memberships"
- ]
+ "tags": ["Orgs / Teams / Memberships"]
},
"delete": {
"operationId": "OrganizationsTeamsMembershipsController_deleteOrgTeamMembership",
@@ -2769,9 +2624,7 @@
}
}
},
- "tags": [
- "Orgs / Teams / Memberships"
- ]
+ "tags": ["Orgs / Teams / Memberships"]
},
"patch": {
"operationId": "OrganizationsTeamsMembershipsController_updateOrgTeamMembership",
@@ -2824,9 +2677,7 @@
}
}
},
- "tags": [
- "Orgs / Teams / Memberships"
- ]
+ "tags": ["Orgs / Teams / Memberships"]
}
},
"/v2/organizations/{orgId}/teams/{teamId}/routing-forms/{routingFormId}/responses": {
@@ -2855,9 +2706,7 @@
}
}
},
- "tags": [
- "Orgs / Teams / Routing forms / Responses"
- ]
+ "tags": ["Orgs / Teams / Routing forms / Responses"]
}
},
"/v2/organizations/{orgId}/teams/{teamId}/users/{userId}/schedules": {
@@ -2886,10 +2735,7 @@
}
}
},
- "tags": [
- "Orgs / Teams / Schedules",
- "Orgs / Teams / Users / Schedules"
- ]
+ "tags": ["Orgs / Teams / Schedules", "Orgs / Teams / Users / Schedules"]
}
},
"/v2/organizations/{orgId}/users": {
@@ -2953,9 +2799,7 @@
}
}
},
- "tags": [
- "Orgs / Users"
- ]
+ "tags": ["Orgs / Users"]
},
"post": {
"operationId": "OrganizationsUsersController_createOrganizationUser",
@@ -2992,9 +2836,7 @@
}
}
},
- "tags": [
- "Orgs / Users"
- ]
+ "tags": ["Orgs / Users"]
}
},
"/v2/organizations/{orgId}/users/{userId}": {
@@ -3041,9 +2883,7 @@
}
}
},
- "tags": [
- "Orgs / Users"
- ]
+ "tags": ["Orgs / Users"]
},
"delete": {
"operationId": "OrganizationsUsersController_deleteOrganizationUser",
@@ -3078,9 +2918,7 @@
}
}
},
- "tags": [
- "Orgs / Users"
- ]
+ "tags": ["Orgs / Users"]
}
},
"/v2/organizations/{orgId}/users/{userId}/ooo": {
@@ -3123,10 +2961,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"
}
},
@@ -3137,10 +2972,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"
}
}
@@ -3150,9 +2982,7 @@
"description": ""
}
},
- "tags": [
- "Orgs / Users / OOO"
- ]
+ "tags": ["Orgs / Users / OOO"]
},
"post": {
"operationId": "OrganizationsUsersOOOController_createOrganizationUserOOO",
@@ -3182,9 +3012,7 @@
"description": ""
}
},
- "tags": [
- "Orgs / Users / OOO"
- ]
+ "tags": ["Orgs / Users / OOO"]
}
},
"/v2/organizations/{orgId}/users/{userId}/ooo/{oooId}": {
@@ -3224,9 +3052,7 @@
"description": ""
}
},
- "tags": [
- "Orgs / Users / OOO"
- ]
+ "tags": ["Orgs / Users / OOO"]
},
"delete": {
"operationId": "OrganizationsUsersOOOController_deleteOrganizationUserOOO",
@@ -3246,9 +3072,7 @@
"description": ""
}
},
- "tags": [
- "Orgs / Users / OOO"
- ]
+ "tags": ["Orgs / Users / OOO"]
}
},
"/v2/organizations/{orgId}/ooo": {
@@ -3291,10 +3115,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"
}
},
@@ -3305,10 +3126,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"
}
},
@@ -3328,9 +3146,7 @@
"description": ""
}
},
- "tags": [
- "Orgs / Users / OOO"
- ]
+ "tags": ["Orgs / Users / OOO"]
}
},
"/v2/organizations/{orgId}/webhooks": {
@@ -3379,9 +3195,7 @@
}
}
},
- "tags": [
- "Orgs / Webhooks"
- ]
+ "tags": ["Orgs / Webhooks"]
},
"post": {
"operationId": "OrganizationsWebhooksController_createOrganizationWebhook",
@@ -3418,9 +3232,7 @@
}
}
},
- "tags": [
- "Orgs / Webhooks"
- ]
+ "tags": ["Orgs / Webhooks"]
}
},
"/v2/organizations/{orgId}/webhooks/{webhookId}": {
@@ -3449,9 +3261,7 @@
}
}
},
- "tags": [
- "Orgs / Webhooks"
- ]
+ "tags": ["Orgs / Webhooks"]
},
"delete": {
"operationId": "OrganizationsWebhooksController_deleteWebhook",
@@ -3478,9 +3288,7 @@
}
}
},
- "tags": [
- "Orgs / Webhooks"
- ]
+ "tags": ["Orgs / Webhooks"]
},
"patch": {
"operationId": "OrganizationsWebhooksController_updateOrgWebhook",
@@ -3517,9 +3325,7 @@
}
}
},
- "tags": [
- "Orgs / Webhooks"
- ]
+ "tags": ["Orgs / Webhooks"]
}
},
"/v2/api-keys/refresh": {
@@ -3560,9 +3366,7 @@
}
}
},
- "tags": [
- "Api Keys"
- ]
+ "tags": ["Api Keys"]
}
},
"/v2/bookings": {
@@ -3614,9 +3418,7 @@
}
}
},
- "tags": [
- "Bookings"
- ]
+ "tags": ["Bookings"]
},
"get": {
"operationId": "BookingsController_2024_08_13_getBookings",
@@ -3641,13 +3443,7 @@
"type": "array",
"items": {
"type": "string",
- "enum": [
- "upcoming",
- "recurring",
- "past",
- "cancelled",
- "unconfirmed"
- ]
+ "enum": ["upcoming", "recurring", "past", "cancelled", "unconfirmed"]
}
}
},
@@ -3758,10 +3554,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"
}
},
@@ -3772,10 +3565,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"
}
},
@@ -3786,10 +3576,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"
}
},
@@ -3800,10 +3587,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"
}
},
@@ -3849,9 +3633,7 @@
}
}
},
- "tags": [
- "Bookings"
- ]
+ "tags": ["Bookings"]
}
},
"/v2/bookings/{bookingUid}": {
@@ -3890,9 +3672,7 @@
}
}
},
- "tags": [
- "Bookings"
- ]
+ "tags": ["Bookings"]
}
},
"/v2/bookings/{bookingUid}/reschedule": {
@@ -3931,9 +3711,7 @@
}
}
},
- "tags": [
- "Bookings"
- ]
+ "tags": ["Bookings"]
}
},
"/v2/bookings/{bookingUid}/cancel": {
@@ -3972,9 +3750,7 @@
}
}
},
- "tags": [
- "Bookings"
- ]
+ "tags": ["Bookings"]
}
},
"/v2/bookings/{bookingUid}/mark-absent": {
@@ -4031,9 +3807,7 @@
}
}
},
- "tags": [
- "Bookings"
- ]
+ "tags": ["Bookings"]
}
},
"/v2/bookings/{bookingUid}/reassign": {
@@ -4080,9 +3854,7 @@
}
}
},
- "tags": [
- "Bookings"
- ]
+ "tags": ["Bookings"]
}
},
"/v2/bookings/{bookingUid}/reassign/{userId}": {
@@ -4147,9 +3919,7 @@
}
}
},
- "tags": [
- "Bookings"
- ]
+ "tags": ["Bookings"]
}
},
"/v2/bookings/{bookingUid}/confirm": {
@@ -4196,9 +3966,7 @@
}
}
},
- "tags": [
- "Bookings"
- ]
+ "tags": ["Bookings"]
}
},
"/v2/bookings/{bookingUid}/decline": {
@@ -4255,9 +4023,7 @@
}
}
},
- "tags": [
- "Bookings"
- ]
+ "tags": ["Bookings"]
}
},
"/v2/calendars/ics-feed/save": {
@@ -4287,9 +4053,7 @@
}
}
},
- "tags": [
- "Calendars"
- ]
+ "tags": ["Calendars"]
}
},
"/v2/calendars/ics-feed/check": {
@@ -4309,9 +4073,7 @@
}
}
},
- "tags": [
- "Calendars"
- ]
+ "tags": ["Calendars"]
}
},
"/v2/calendars/busy-times": {
@@ -4379,9 +4141,7 @@
}
}
},
- "tags": [
- "Calendars"
- ]
+ "tags": ["Calendars"]
}
},
"/v2/calendars": {
@@ -4401,9 +4161,7 @@
}
}
},
- "tags": [
- "Calendars"
- ]
+ "tags": ["Calendars"]
}
},
"/v2/calendars/{calendar}/connect": {
@@ -4424,10 +4182,7 @@
"required": true,
"in": "path",
"schema": {
- "enum": [
- "office365",
- "google"
- ],
+ "enum": ["office365", "google"],
"type": "string"
}
}
@@ -4444,9 +4199,7 @@
}
}
},
- "tags": [
- "Calendars"
- ]
+ "tags": ["Calendars"]
}
},
"/v2/calendars/{calendar}/save": {
@@ -4475,10 +4228,7 @@
"required": true,
"in": "path",
"schema": {
- "enum": [
- "office365",
- "google"
- ],
+ "enum": ["office365", "google"],
"type": "string"
}
}
@@ -4488,9 +4238,7 @@
"description": ""
}
},
- "tags": [
- "Calendars"
- ]
+ "tags": ["Calendars"]
}
},
"/v2/calendars/{calendar}/credentials": {
@@ -4503,9 +4251,7 @@
"required": true,
"in": "path",
"schema": {
- "enum": [
- "apple"
- ],
+ "enum": ["apple"],
"type": "string"
}
}
@@ -4515,9 +4261,7 @@
"description": ""
}
},
- "tags": [
- "Calendars"
- ]
+ "tags": ["Calendars"]
}
},
"/v2/calendars/{calendar}/check": {
@@ -4530,11 +4274,7 @@
"required": true,
"in": "path",
"schema": {
- "enum": [
- "apple",
- "google",
- "office365"
- ],
+ "enum": ["apple", "google", "office365"],
"type": "string"
}
}
@@ -4551,9 +4291,7 @@
}
}
},
- "tags": [
- "Calendars"
- ]
+ "tags": ["Calendars"]
}
},
"/v2/calendars/{calendar}/disconnect": {
@@ -4566,11 +4304,7 @@
"required": true,
"in": "path",
"schema": {
- "enum": [
- "apple",
- "google",
- "office365"
- ],
+ "enum": ["apple", "google", "office365"],
"type": "string"
}
}
@@ -4597,9 +4331,7 @@
}
}
},
- "tags": [
- "Calendars"
- ]
+ "tags": ["Calendars"]
}
},
"/v2/conferencing/{app}/connect": {
@@ -4628,9 +4360,7 @@
}
}
},
- "tags": [
- "Conferencing"
- ]
+ "tags": ["Conferencing"]
}
},
"/v2/conferencing/{app}/oauth/auth-url": {
@@ -4683,9 +4413,7 @@
}
}
},
- "tags": [
- "Conferencing"
- ]
+ "tags": ["Conferencing"]
}
},
"/v2/conferencing/{app}/oauth/callback": {
@@ -4723,9 +4451,7 @@
"description": ""
}
},
- "tags": [
- "Conferencing"
- ]
+ "tags": ["Conferencing"]
}
},
"/v2/conferencing": {
@@ -4745,9 +4471,7 @@
}
}
},
- "tags": [
- "Conferencing"
- ]
+ "tags": ["Conferencing"]
}
},
"/v2/conferencing/{app}/default": {
@@ -4776,9 +4500,7 @@
}
}
},
- "tags": [
- "Conferencing"
- ]
+ "tags": ["Conferencing"]
}
},
"/v2/conferencing/default": {
@@ -4798,9 +4520,7 @@
}
}
},
- "tags": [
- "Conferencing"
- ]
+ "tags": ["Conferencing"]
}
},
"/v2/conferencing/{app}/disconnect": {
@@ -4829,9 +4549,7 @@
}
}
},
- "tags": [
- "Conferencing"
- ]
+ "tags": ["Conferencing"]
}
},
"/v2/destination-calendars": {
@@ -4861,9 +4579,7 @@
}
}
},
- "tags": [
- "Destination Calendars"
- ]
+ "tags": ["Destination Calendars"]
}
},
"/v2/event-types": {
@@ -4912,9 +4628,7 @@
}
}
},
- "tags": [
- "Event Types"
- ]
+ "tags": ["Event Types"]
},
"get": {
"operationId": "EventTypesController_2024_06_14_getEventTypes",
@@ -4987,9 +4701,7 @@
}
}
},
- "tags": [
- "Event Types"
- ]
+ "tags": ["Event Types"]
}
},
"/v2/event-types/{eventTypeId}": {
@@ -5036,9 +4748,7 @@
}
}
},
- "tags": [
- "Event Types"
- ]
+ "tags": ["Event Types"]
},
"patch": {
"operationId": "EventTypesController_2024_06_14_updateEventType",
@@ -5093,9 +4803,7 @@
}
}
},
- "tags": [
- "Event Types"
- ]
+ "tags": ["Event Types"]
},
"delete": {
"operationId": "EventTypesController_2024_06_14_deleteEventType",
@@ -5140,9 +4848,7 @@
}
}
},
- "tags": [
- "Event Types"
- ]
+ "tags": ["Event Types"]
}
},
"/v2/event-types/{eventTypeId}/webhooks": {
@@ -5181,9 +4887,7 @@
}
}
},
- "tags": [
- "Event Types / Webhooks"
- ]
+ "tags": ["Event Types / Webhooks"]
},
"get": {
"operationId": "EventTypeWebhooksController_getEventTypeWebhooks",
@@ -5230,9 +4934,7 @@
}
}
},
- "tags": [
- "Event Types / Webhooks"
- ]
+ "tags": ["Event Types / Webhooks"]
},
"delete": {
"operationId": "EventTypeWebhooksController_deleteAllEventTypeWebhooks",
@@ -5259,9 +4961,7 @@
}
}
},
- "tags": [
- "Event Types / Webhooks"
- ]
+ "tags": ["Event Types / Webhooks"]
}
},
"/v2/event-types/{eventTypeId}/webhooks/{webhookId}": {
@@ -5300,9 +5000,7 @@
}
}
},
- "tags": [
- "Event Types / Webhooks"
- ]
+ "tags": ["Event Types / Webhooks"]
},
"get": {
"operationId": "EventTypeWebhooksController_getEventTypeWebhook",
@@ -5320,9 +5018,7 @@
}
}
},
- "tags": [
- "Event Types / Webhooks"
- ]
+ "tags": ["Event Types / Webhooks"]
},
"delete": {
"operationId": "EventTypeWebhooksController_deleteEventTypeWebhook",
@@ -5340,9 +5036,7 @@
}
}
},
- "tags": [
- "Event Types / Webhooks"
- ]
+ "tags": ["Event Types / Webhooks"]
}
},
"/v2/me": {
@@ -5362,9 +5056,7 @@
}
}
},
- "tags": [
- "Me"
- ]
+ "tags": ["Me"]
},
"patch": {
"operationId": "MeController_updateMe",
@@ -5392,9 +5084,7 @@
}
}
},
- "tags": [
- "Me"
- ]
+ "tags": ["Me"]
}
},
"/v2/oauth-clients": {
@@ -5425,9 +5115,7 @@
}
}
},
- "tags": [
- "OAuth Clients"
- ]
+ "tags": ["OAuth Clients"]
},
"get": {
"operationId": "OAuthClientsController_getOAuthClients",
@@ -5446,9 +5134,7 @@
}
}
},
- "tags": [
- "OAuth Clients"
- ]
+ "tags": ["OAuth Clients"]
}
},
"/v2/oauth-clients/{clientId}": {
@@ -5478,9 +5164,7 @@
}
}
},
- "tags": [
- "OAuth Clients"
- ]
+ "tags": ["OAuth Clients"]
},
"patch": {
"operationId": "OAuthClientsController_updateOAuthClient",
@@ -5518,9 +5202,7 @@
}
}
},
- "tags": [
- "OAuth Clients"
- ]
+ "tags": ["OAuth Clients"]
},
"delete": {
"operationId": "OAuthClientsController_deleteOAuthClient",
@@ -5548,9 +5230,7 @@
}
}
},
- "tags": [
- "OAuth Clients"
- ]
+ "tags": ["OAuth Clients"]
}
},
"/v2/oauth-clients/{clientId}/managed-users": {
@@ -5590,9 +5270,7 @@
}
}
},
- "tags": [
- "OAuth Clients"
- ]
+ "tags": ["OAuth Clients"]
}
},
"/v2/schedules": {
@@ -5642,9 +5320,7 @@
}
}
},
- "tags": [
- "Schedules"
- ]
+ "tags": ["Schedules"]
},
"get": {
"operationId": "SchedulesController_2024_06_11_getSchedules",
@@ -5682,9 +5358,7 @@
}
}
},
- "tags": [
- "Schedules"
- ]
+ "tags": ["Schedules"]
}
},
"/v2/schedules/default": {
@@ -5724,9 +5398,7 @@
}
}
},
- "tags": [
- "Schedules"
- ]
+ "tags": ["Schedules"]
}
},
"/v2/schedules/{scheduleId}": {
@@ -5773,9 +5445,7 @@
}
}
},
- "tags": [
- "Schedules"
- ]
+ "tags": ["Schedules"]
},
"patch": {
"operationId": "SchedulesController_2024_06_11_updateSchedule",
@@ -5830,9 +5500,7 @@
}
}
},
- "tags": [
- "Schedules"
- ]
+ "tags": ["Schedules"]
},
"delete": {
"operationId": "SchedulesController_2024_06_11_deleteSchedule",
@@ -5877,9 +5545,7 @@
}
}
},
- "tags": [
- "Schedules"
- ]
+ "tags": ["Schedules"]
}
},
"/v2/selected-calendars": {
@@ -5909,9 +5575,7 @@
}
}
},
- "tags": [
- "Selected Calendars"
- ]
+ "tags": ["Selected Calendars"]
},
"delete": {
"operationId": "SelectedCalendarsController_deleteSelectedCalendar",
@@ -5942,7 +5606,7 @@
}
},
{
- "name": "delegationCredentialId",
+ "name": "domainWideDelegationCredentialId",
"required": false,
"in": "query",
"schema": {
@@ -5962,9 +5626,7 @@
}
}
},
- "tags": [
- "Selected Calendars"
- ]
+ "tags": ["Selected Calendars"]
}
},
"/v2/slots": {
@@ -6142,9 +5804,7 @@
}
}
},
- "tags": [
- "Slots"
- ]
+ "tags": ["Slots"]
}
},
"/v2/slots/reservations": {
@@ -6185,9 +5845,7 @@
}
}
},
- "tags": [
- "Slots"
- ]
+ "tags": ["Slots"]
}
},
"/v2/slots/reservations/{uid}": {
@@ -6225,9 +5883,7 @@
}
}
},
- "tags": [
- "Slots"
- ]
+ "tags": ["Slots"]
},
"patch": {
"operationId": "SlotsController_2024_09_04_updateReservedSlot",
@@ -6273,9 +5929,7 @@
}
}
},
- "tags": [
- "Slots"
- ]
+ "tags": ["Slots"]
},
"delete": {
"operationId": "SlotsController_2024_09_04_deleteReservedSlot",
@@ -6313,9 +5967,7 @@
}
}
},
- "tags": [
- "Slots"
- ]
+ "tags": ["Slots"]
}
},
"/v2/stripe/connect": {
@@ -6344,9 +5996,7 @@
}
}
},
- "tags": [
- "Stripe"
- ]
+ "tags": ["Stripe"]
}
},
"/v2/stripe/save": {
@@ -6383,9 +6033,7 @@
}
}
},
- "tags": [
- "Stripe"
- ]
+ "tags": ["Stripe"]
}
},
"/v2/stripe/check": {
@@ -6405,9 +6053,7 @@
}
}
},
- "tags": [
- "Stripe"
- ]
+ "tags": ["Stripe"]
}
},
"/v2/stripe/check/{teamId}": {
@@ -6436,9 +6082,7 @@
}
}
},
- "tags": [
- "Stripe"
- ]
+ "tags": ["Stripe"]
}
},
"/v2/teams": {
@@ -6468,9 +6112,7 @@
}
}
},
- "tags": [
- "Teams"
- ]
+ "tags": ["Teams"]
},
"get": {
"operationId": "TeamsController_getTeams",
@@ -6488,9 +6130,7 @@
}
}
},
- "tags": [
- "Teams"
- ]
+ "tags": ["Teams"]
}
},
"/v2/teams/{teamId}": {
@@ -6519,9 +6159,7 @@
}
}
},
- "tags": [
- "Teams"
- ]
+ "tags": ["Teams"]
},
"patch": {
"operationId": "TeamsController_updateTeam",
@@ -6558,9 +6196,7 @@
}
}
},
- "tags": [
- "Teams"
- ]
+ "tags": ["Teams"]
},
"delete": {
"operationId": "TeamsController_deleteTeam",
@@ -6587,9 +6223,7 @@
}
}
},
- "tags": [
- "Teams"
- ]
+ "tags": ["Teams"]
}
},
"/v2/teams/{teamId}/event-types": {
@@ -6628,9 +6262,7 @@
}
}
},
- "tags": [
- "Teams / Event Types"
- ]
+ "tags": ["Teams / Event Types"]
},
"get": {
"operationId": "TeamsEventTypesController_getTeamEventTypes",
@@ -6675,9 +6307,7 @@
}
}
},
- "tags": [
- "Teams / Event Types"
- ]
+ "tags": ["Teams / Event Types"]
}
},
"/v2/teams/{teamId}/event-types/{eventTypeId}": {
@@ -6714,9 +6344,7 @@
}
}
},
- "tags": [
- "Teams / Event Types"
- ]
+ "tags": ["Teams / Event Types"]
},
"patch": {
"operationId": "TeamsEventTypesController_updateTeamEventType",
@@ -6761,9 +6389,7 @@
}
}
},
- "tags": [
- "Teams / Event Types"
- ]
+ "tags": ["Teams / Event Types"]
},
"delete": {
"operationId": "TeamsEventTypesController_deleteTeamEventType",
@@ -6798,9 +6424,7 @@
}
}
},
- "tags": [
- "Teams / Event Types"
- ]
+ "tags": ["Teams / Event Types"]
}
},
"/v2/teams/{teamId}/event-types/{eventTypeId}/create-phone-call": {
@@ -6847,9 +6471,7 @@
}
}
},
- "tags": [
- "Teams / Event Types"
- ]
+ "tags": ["Teams / Event Types"]
}
},
"/v2/teams/{teamId}/memberships": {
@@ -6888,9 +6510,7 @@
}
}
},
- "tags": [
- "Teams / Memberships"
- ]
+ "tags": ["Teams / Memberships"]
},
"get": {
"operationId": "TeamsMembershipsController_getTeamMemberships",
@@ -6937,9 +6557,7 @@
}
}
},
- "tags": [
- "Teams / Memberships"
- ]
+ "tags": ["Teams / Memberships"]
}
},
"/v2/teams/{teamId}/memberships/{membershipId}": {
@@ -6976,9 +6594,7 @@
}
}
},
- "tags": [
- "Teams / Memberships"
- ]
+ "tags": ["Teams / Memberships"]
},
"patch": {
"operationId": "TeamsMembershipsController_updateTeamMembership",
@@ -7023,9 +6639,7 @@
}
}
},
- "tags": [
- "Teams / Memberships"
- ]
+ "tags": ["Teams / Memberships"]
},
"delete": {
"operationId": "TeamsMembershipsController_deleteTeamMembership",
@@ -7060,9 +6674,7 @@
}
}
},
- "tags": [
- "Teams / Memberships"
- ]
+ "tags": ["Teams / Memberships"]
}
},
"/v2/timezones": {
@@ -7082,9 +6694,7 @@
}
}
},
- "tags": [
- "Timezones"
- ]
+ "tags": ["Timezones"]
}
},
"/v2/webhooks": {
@@ -7114,9 +6724,7 @@
}
}
},
- "tags": [
- "Webhooks"
- ]
+ "tags": ["Webhooks"]
},
"get": {
"operationId": "WebhooksController_getWebhooks",
@@ -7156,9 +6764,7 @@
}
}
},
- "tags": [
- "Webhooks"
- ]
+ "tags": ["Webhooks"]
}
},
"/v2/webhooks/{webhookId}": {
@@ -7197,9 +6803,7 @@
}
}
},
- "tags": [
- "Webhooks"
- ]
+ "tags": ["Webhooks"]
},
"get": {
"operationId": "WebhooksController_getWebhook",
@@ -7217,9 +6821,7 @@
}
}
},
- "tags": [
- "Webhooks"
- ]
+ "tags": ["Webhooks"]
},
"delete": {
"operationId": "WebhooksController_deleteWebhook",
@@ -7246,9 +6848,7 @@
}
}
},
- "tags": [
- "Webhooks"
- ]
+ "tags": ["Webhooks"]
}
}
},
@@ -7378,10 +6978,7 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"type": "array",
@@ -7390,10 +6987,7 @@
}
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"CreateManagedUserInput": {
"type": "object",
@@ -7409,25 +7003,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",
@@ -7488,10 +7071,7 @@
"description": "URL of the user's avatar image"
}
},
- "required": [
- "email",
- "name"
- ]
+ "required": ["email", "name"]
},
"CreateManagedUserData": {
"type": "object",
@@ -7509,12 +7089,7 @@
"type": "number"
}
},
- "required": [
- "user",
- "accessToken",
- "refreshToken",
- "accessTokenExpiresAt"
- ]
+ "required": ["user", "accessToken", "refreshToken", "accessTokenExpiresAt"]
},
"CreateManagedUserOutput": {
"type": "object",
@@ -7522,10 +7097,7 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"$ref": "#/components/schemas/CreateManagedUserData"
@@ -7534,10 +7106,7 @@
"type": "object"
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"GetManagedUserOutput": {
"type": "object",
@@ -7545,19 +7114,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",
@@ -7570,10 +7133,7 @@
},
"timeFormat": {
"type": "number",
- "enum": [
- 12,
- 24
- ],
+ "enum": [12, 24],
"example": 12,
"description": "Must be 12 or 24"
},
@@ -7582,15 +7142,7 @@
},
"weekStart": {
"type": "string",
- "enum": [
- "Monday",
- "Tuesday",
- "Wednesday",
- "Thursday",
- "Friday",
- "Saturday",
- "Sunday"
- ],
+ "enum": ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"],
"example": "Monday"
},
"timeZone": {
@@ -7666,11 +7218,7 @@
"type": "number"
}
},
- "required": [
- "accessToken",
- "refreshToken",
- "accessTokenExpiresAt"
- ]
+ "required": ["accessToken", "refreshToken", "accessTokenExpiresAt"]
},
"KeysResponseDto": {
"type": "object",
@@ -7678,19 +7226,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",
@@ -7745,11 +7287,7 @@
"description": "If true, when creating a managed user the managed user will have 4 default event types: 30 and 60 minutes without Cal video, 30 and 60 minutes with Cal video. Set this as false if you want to create a managed user and then manually create event types for the user."
}
},
- "required": [
- "name",
- "redirectUris",
- "permissions"
- ]
+ "required": ["name", "redirectUris", "permissions"]
},
"CreateOAuthClientOutput": {
"type": "object",
@@ -7763,20 +7301,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": {
@@ -7791,10 +7323,7 @@
]
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"PlatformOAuthClientDto": {
"type": "object",
@@ -7829,19 +7358,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"
@@ -7896,10 +7420,7 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"type": "array",
@@ -7908,10 +7429,7 @@
}
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"GetOAuthClientResponseDto": {
"type": "object",
@@ -7919,19 +7437,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",
@@ -7974,9 +7486,7 @@
"description": "Managed user's refresh token."
}
},
- "required": [
- "refreshToken"
- ]
+ "required": ["refreshToken"]
},
"RefreshApiKeyInput": {
"type": "object",
@@ -8002,9 +7512,7 @@
"type": "string"
}
},
- "required": [
- "apiKey"
- ]
+ "required": ["apiKey"]
},
"RefreshApiKeyOutput": {
"type": "object",
@@ -8012,19 +7520,13 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"$ref": "#/components/schemas/ApiKeyOutput"
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"InputAddressLocation_2024_06_14": {
"type": "object",
@@ -8042,11 +7544,7 @@
"type": "boolean"
}
},
- "required": [
- "type",
- "address",
- "public"
- ]
+ "required": ["type", "address", "public"]
},
"InputLinkLocation_2024_06_14": {
"type": "object",
@@ -8064,11 +7562,7 @@
"type": "boolean"
}
},
- "required": [
- "type",
- "link",
- "public"
- ]
+ "required": ["type", "link", "public"]
},
"InputIntegrationLocation_2024_06_14": {
"type": "object",
@@ -8081,18 +7575,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",
@@ -8110,11 +7596,7 @@
"type": "boolean"
}
},
- "required": [
- "type",
- "phone",
- "public"
- ]
+ "required": ["type", "phone", "public"]
},
"PhoneFieldInput_2024_06_14": {
"type": "object",
@@ -8147,14 +7629,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",
@@ -8189,14 +7664,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",
@@ -8231,14 +7699,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",
@@ -8273,14 +7734,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",
@@ -8315,14 +7769,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",
@@ -8349,10 +7796,7 @@
"example": "Select..."
},
"options": {
- "example": [
- "Option 1",
- "Option 2"
- ],
+ "example": ["Option 1", "Option 2"],
"type": "array",
"items": {
"type": "string"
@@ -8367,15 +7811,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",
@@ -8398,10 +7834,7 @@
"type": "boolean"
},
"options": {
- "example": [
- "Option 1",
- "Option 2"
- ],
+ "example": ["Option 1", "Option 2"],
"type": "array",
"items": {
"type": "string"
@@ -8416,14 +7849,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",
@@ -8458,14 +7884,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",
@@ -8488,10 +7907,7 @@
"type": "boolean"
},
"options": {
- "example": [
- "Checkbox 1",
- "Checkbox 2"
- ],
+ "example": ["Checkbox 1", "Checkbox 2"],
"type": "array",
"items": {
"type": "string"
@@ -8506,14 +7922,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",
@@ -8536,10 +7945,7 @@
"type": "boolean"
},
"options": {
- "example": [
- "Radio 1",
- "Radio 2"
- ],
+ "example": ["Radio 1", "Radio 2"],
"type": "array",
"items": {
"type": "string"
@@ -8554,14 +7960,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",
@@ -8591,13 +7990,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",
@@ -8632,25 +8025,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": {
@@ -8664,21 +8046,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": {
@@ -8692,28 +8067,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": {
@@ -8721,10 +8086,7 @@
}
}
},
- "required": [
- "type",
- "value"
- ]
+ "required": ["type", "value"]
},
"BaseBookingLimitsCount_2024_06_14": {
"type": "object",
@@ -8765,9 +8127,7 @@
"default": false
}
},
- "required": [
- "disabled"
- ]
+ "required": ["disabled"]
},
"BaseBookingLimitsDuration_2024_06_14": {
"type": "object",
@@ -8809,18 +8169,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",
@@ -8836,10 +8188,7 @@
"example": 30
}
},
- "required": [
- "unit",
- "count"
- ]
+ "required": ["unit", "count"]
},
"BaseConfirmationPolicy_2024_06_14": {
"type": "object",
@@ -8858,9 +8207,7 @@
]
}
},
- "required": [
- "type"
- ]
+ "required": ["type"]
},
"Seats_2024_06_14": {
"type": "object",
@@ -8881,11 +8228,7 @@
"example": true
}
},
- "required": [
- "seatsPerTimeSlot",
- "showAttendeeInfo",
- "showAvailabilityCount"
- ]
+ "required": ["seatsPerTimeSlot", "showAttendeeInfo", "showAvailabilityCount"]
},
"InputAttendeeAddressLocation_2024_06_14": {
"type": "object",
@@ -8896,9 +8239,7 @@
"description": "only allowed value for type is `attendeeAddress`"
}
},
- "required": [
- "type"
- ]
+ "required": ["type"]
},
"InputAttendeePhoneLocation_2024_06_14": {
"type": "object",
@@ -8909,9 +8250,7 @@
"description": "only allowed value for type is `attendeePhone`"
}
},
- "required": [
- "type"
- ]
+ "required": ["type"]
},
"InputAttendeeDefinedLocation_2024_06_14": {
"type": "object",
@@ -8922,9 +8261,7 @@
"description": "only allowed value for type is `attendeeDefined`"
}
},
- "required": [
- "type"
- ]
+ "required": ["type"]
},
"NameDefaultFieldInput_2024_06_14": {
"type": "object",
@@ -8945,11 +8282,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."
}
},
- "required": [
- "type",
- "label",
- "placeholder"
- ]
+ "required": ["type", "label", "placeholder"]
},
"EmailDefaultFieldInput_2024_06_14": {
"type": "object",
@@ -8973,12 +8306,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."
}
},
- "required": [
- "type",
- "label",
- "required",
- "placeholder"
- ]
+ "required": ["type", "label", "required", "placeholder"]
},
"TitleDefaultFieldInput_2024_06_14": {
"type": "object",
@@ -9006,9 +8334,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."
}
},
- "required": [
- "slug"
- ]
+ "required": ["slug"]
},
"NotesDefaultFieldInput_2024_06_14": {
"type": "object",
@@ -9036,9 +8362,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."
}
},
- "required": [
- "slug"
- ]
+ "required": ["slug"]
},
"GuestsDefaultFieldInput_2024_06_14": {
"type": "object",
@@ -9066,9 +8390,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."
}
},
- "required": [
- "slug"
- ]
+ "required": ["slug"]
},
"RescheduleReasonDefaultFieldInput_2024_06_14": {
"type": "object",
@@ -9096,9 +8418,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."
}
},
- "required": [
- "slug"
- ]
+ "required": ["slug"]
},
"InputOrganizersDefaultApp_2024_06_14": {
"type": "object",
@@ -9109,37 +8429,24 @@
"description": "only allowed value for type is `organizersDefaultApp`"
}
},
- "required": [
- "type"
- ]
+ "required": ["type"]
},
"BookerLayouts_2024_06_14": {
"type": "object",
"properties": {
"defaultLayout": {
"type": "string",
- "enum": [
- "month",
- "week",
- "column"
- ]
+ "enum": ["month", "week", "column"]
},
"enabledLayouts": {
"type": "array",
"items": {
"type": "string",
- "enum": [
- "month",
- "week",
- "column"
- ]
+ "enum": ["month", "week", "column"]
}
}
},
- "required": [
- "defaultLayout",
- "enabledLayouts"
- ]
+ "required": ["defaultLayout", "enabledLayouts"]
},
"EventTypeColor_2024_06_14": {
"type": "object",
@@ -9155,10 +8462,7 @@
"example": "#fafafa"
}
},
- "required": [
- "lightThemeHex",
- "darkThemeHex"
- ]
+ "required": ["lightThemeHex", "darkThemeHex"]
},
"DestinationCalendar_2024_06_14": {
"type": "object",
@@ -9172,10 +8476,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"]
},
"CreateEventTypeInput_2024_06_14": {
"type": "object",
@@ -9185,11 +8486,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": {
@@ -9443,11 +8740,7 @@
}
}
},
- "required": [
- "lengthInMinutes",
- "title",
- "slug"
- ]
+ "required": ["lengthInMinutes", "title", "slug"]
},
"OutputAddressLocation_2024_06_14": {
"type": "object",
@@ -9475,11 +8768,7 @@
"type": "boolean"
}
},
- "required": [
- "type",
- "address",
- "public"
- ]
+ "required": ["type", "address", "public"]
},
"OutputLinkLocation_2024_06_14": {
"type": "object",
@@ -9507,11 +8796,7 @@
"type": "boolean"
}
},
- "required": [
- "type",
- "link",
- "public"
- ]
+ "required": ["type", "link", "public"]
},
"OutputIntegrationLocation_2024_06_14": {
"type": "object",
@@ -9579,10 +8864,7 @@
"description": "Credential ID associated with the integration"
}
},
- "required": [
- "type",
- "integration"
- ]
+ "required": ["type", "integration"]
},
"OutputPhoneLocation_2024_06_14": {
"type": "object",
@@ -9610,11 +8892,7 @@
"type": "boolean"
}
},
- "required": [
- "type",
- "phone",
- "public"
- ]
+ "required": ["type", "phone", "public"]
},
"OutputOrganizersDefaultAppLocation_2024_06_14": {
"type": "object",
@@ -9637,9 +8915,7 @@
"description": "only allowed value for type is `organizersDefaultApp`"
}
},
- "required": [
- "type"
- ]
+ "required": ["type"]
},
"OutputUnknownLocation_2024_06_14": {
"type": "object",
@@ -9665,10 +8941,7 @@
"type": "string"
}
},
- "required": [
- "type",
- "location"
- ]
+ "required": ["type", "location"]
},
"EmailDefaultFieldOutput_2024_06_14": {
"type": "object",
@@ -9720,12 +8993,7 @@
"default": "email"
}
},
- "required": [
- "type",
- "required",
- "isDefault",
- "slug"
- ]
+ "required": ["type", "required", "isDefault", "slug"]
},
"NameDefaultFieldOutput_2024_06_14": {
"type": "object",
@@ -9776,12 +9044,7 @@
"type": "boolean"
}
},
- "required": [
- "type",
- "isDefault",
- "slug",
- "required"
- ]
+ "required": ["type", "isDefault", "slug", "required"]
},
"LocationDefaultFieldOutput_2024_06_14": {
"type": "object",
@@ -9809,26 +9072,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": [
- "isDefault",
- "slug",
- "type",
- "required",
- "hidden"
- ]
+ "required": ["isDefault", "slug", "type", "required", "hidden"]
},
"RescheduleReasonDefaultFieldOutput_2024_06_14": {
"type": "object",
"properties": {
"slug": {
"type": "string",
- "enum": [
- "name",
- "email",
- "title",
- "notes",
- "guests"
- ],
+ "enum": ["name", "email", "title", "notes", "guests"],
"example": "rescheduleReason",
"description": "only allowed value for type is `rescheduleReason`",
"default": "rescheduleReason"
@@ -9861,24 +9112,14 @@
"default": "textarea"
}
},
- "required": [
- "slug",
- "isDefault",
- "type"
- ]
+ "required": ["slug", "isDefault", "type"]
},
"TitleDefaultFieldOutput_2024_06_14": {
"type": "object",
"properties": {
"slug": {
"type": "string",
- "enum": [
- "name",
- "email",
- "title",
- "notes",
- "guests"
- ],
+ "enum": ["name", "email", "title", "notes", "guests"],
"example": "title",
"description": "only allowed value for type is `title`",
"default": "title"
@@ -9911,24 +9152,14 @@
"default": "text"
}
},
- "required": [
- "slug",
- "isDefault",
- "type"
- ]
+ "required": ["slug", "isDefault", "type"]
},
"NotesDefaultFieldOutput_2024_06_14": {
"type": "object",
"properties": {
"slug": {
"type": "string",
- "enum": [
- "name",
- "email",
- "title",
- "notes",
- "guests"
- ],
+ "enum": ["name", "email", "title", "notes", "guests"],
"example": "notes",
"description": "only allowed value for type is `notes`",
"default": "notes"
@@ -9961,24 +9192,14 @@
"default": "textarea"
}
},
- "required": [
- "slug",
- "isDefault",
- "type"
- ]
+ "required": ["slug", "isDefault", "type"]
},
"GuestsDefaultFieldOutput_2024_06_14": {
"type": "object",
"properties": {
"slug": {
"type": "string",
- "enum": [
- "name",
- "email",
- "title",
- "notes",
- "guests"
- ],
+ "enum": ["name", "email", "title", "notes", "guests"],
"example": "guests",
"description": "only allowed value for type is `guests`",
"default": "guests"
@@ -10011,11 +9232,7 @@
"default": "multiemail"
}
},
- "required": [
- "slug",
- "isDefault",
- "type"
- ]
+ "required": ["slug", "isDefault", "type"]
},
"AddressFieldOutput_2024_06_14": {
"type": "object",
@@ -10072,14 +9289,7 @@
"example": false
}
},
- "required": [
- "type",
- "slug",
- "label",
- "required",
- "hidden",
- "isDefault"
- ]
+ "required": ["type", "slug", "label", "required", "hidden", "isDefault"]
},
"BooleanFieldOutput_2024_06_14": {
"type": "object",
@@ -10131,14 +9341,7 @@
"example": false
}
},
- "required": [
- "type",
- "slug",
- "label",
- "required",
- "hidden",
- "isDefault"
- ]
+ "required": ["type", "slug", "label", "required", "hidden", "isDefault"]
},
"CheckboxGroupFieldOutput_2024_06_14": {
"type": "object",
@@ -10177,10 +9380,7 @@
"type": "boolean"
},
"options": {
- "example": [
- "Checkbox 1",
- "Checkbox 2"
- ],
+ "example": ["Checkbox 1", "Checkbox 2"],
"type": "array",
"items": {
"type": "string"
@@ -10201,15 +9401,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",
@@ -10266,14 +9458,7 @@
"example": false
}
},
- "required": [
- "type",
- "slug",
- "label",
- "required",
- "hidden",
- "isDefault"
- ]
+ "required": ["type", "slug", "label", "required", "hidden", "isDefault"]
},
"MultiSelectFieldOutput_2024_06_14": {
"type": "object",
@@ -10312,10 +9497,7 @@
"type": "boolean"
},
"options": {
- "example": [
- "Option 1",
- "Option 2"
- ],
+ "example": ["Option 1", "Option 2"],
"type": "array",
"items": {
"type": "string"
@@ -10336,15 +9518,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",
@@ -10401,14 +9575,7 @@
"example": false
}
},
- "required": [
- "type",
- "slug",
- "label",
- "required",
- "hidden",
- "isDefault"
- ]
+ "required": ["type", "slug", "label", "required", "hidden", "isDefault"]
},
"NumberFieldOutput_2024_06_14": {
"type": "object",
@@ -10465,14 +9632,7 @@
"example": false
}
},
- "required": [
- "type",
- "slug",
- "label",
- "required",
- "hidden",
- "isDefault"
- ]
+ "required": ["type", "slug", "label", "required", "hidden", "isDefault"]
},
"PhoneFieldOutput_2024_06_14": {
"type": "object",
@@ -10527,14 +9687,7 @@
"example": false
}
},
- "required": [
- "type",
- "slug",
- "label",
- "required",
- "hidden",
- "isDefault"
- ]
+ "required": ["type", "slug", "label", "required", "hidden", "isDefault"]
},
"RadioGroupFieldOutput_2024_06_14": {
"type": "object",
@@ -10573,10 +9726,7 @@
"type": "boolean"
},
"options": {
- "example": [
- "Radio 1",
- "Radio 2"
- ],
+ "example": ["Radio 1", "Radio 2"],
"type": "array",
"items": {
"type": "string"
@@ -10597,15 +9747,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",
@@ -10648,10 +9790,7 @@
"example": "Select..."
},
"options": {
- "example": [
- "Option 1",
- "Option 2"
- ],
+ "example": ["Option 1", "Option 2"],
"type": "array",
"items": {
"type": "string"
@@ -10672,15 +9811,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",
@@ -10737,14 +9868,7 @@
"example": false
}
},
- "required": [
- "type",
- "slug",
- "label",
- "required",
- "hidden",
- "isDefault"
- ]
+ "required": ["type", "slug", "label", "required", "hidden", "isDefault"]
},
"TextFieldOutput_2024_06_14": {
"type": "object",
@@ -10801,14 +9925,7 @@
"example": false
}
},
- "required": [
- "type",
- "slug",
- "label",
- "required",
- "hidden",
- "isDefault"
- ]
+ "required": ["type", "slug", "label", "required", "hidden", "isDefault"]
},
"EventTypeOutput_2024_06_14": {
"type": "object",
@@ -10822,11 +9939,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": {
@@ -11094,30 +10207,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": {
@@ -11129,20 +10233,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": {
@@ -11152,10 +10250,7 @@
}
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"UpdateEventTypeInput_2024_06_14": {
"type": "object",
@@ -11165,11 +10260,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": {
@@ -11426,20 +10517,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",
@@ -11460,32 +10545,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",
@@ -11499,15 +10573,11 @@
"credentialId": {
"type": "number"
},
- "delegationCredentialId": {
+ "domainWideDelegationCredentialId": {
"type": "string"
}
},
- "required": [
- "integration",
- "externalId",
- "credentialId"
- ]
+ "required": ["integration", "externalId", "credentialId"]
},
"SelectedCalendarOutputDto": {
"type": "object",
@@ -11526,12 +10596,7 @@
"nullable": true
}
},
- "required": [
- "userId",
- "integration",
- "externalId",
- "credentialId"
- ]
+ "required": ["userId", "integration", "externalId", "credentialId"]
},
"SelectedCalendarOutputResponseDto": {
"type": "object",
@@ -11539,19 +10604,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",
@@ -11624,11 +10683,7 @@
"default": "Sunday"
}
},
- "required": [
- "id",
- "name",
- "isOrganization"
- ]
+ "required": ["id", "name", "isOrganization"]
},
"OrgTeamsOutputResponseDto": {
"type": "object",
@@ -11636,10 +10691,7 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"type": "array",
@@ -11648,10 +10700,7 @@
}
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"OrgMeTeamsOutputResponseDto": {
"type": "object",
@@ -11659,10 +10708,7 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"type": "array",
@@ -11671,10 +10717,7 @@
}
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"OrgTeamOutputResponseDto": {
"type": "object",
@@ -11682,19 +10725,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",
@@ -11850,40 +10887,19 @@
"default": true
}
},
- "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": {
@@ -11899,11 +10915,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",
@@ -11925,11 +10937,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",
@@ -11953,18 +10961,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"
}
@@ -11992,15 +10994,7 @@
}
}
},
- "required": [
- "id",
- "ownerId",
- "name",
- "timeZone",
- "availability",
- "isDefault",
- "overrides"
- ]
+ "required": ["id", "ownerId", "name", "timeZone", "availability", "isDefault", "overrides"]
},
"GetSchedulesOutput_2024_06_11": {
"type": "object",
@@ -12008,10 +11002,7 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"type": "array",
@@ -12023,10 +11014,7 @@
"type": "object"
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"CreateScheduleInput_2024_06_11": {
"type": "object",
@@ -12044,18 +11032,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"
}
@@ -12085,11 +11067,7 @@
}
}
},
- "required": [
- "name",
- "timeZone",
- "isDefault"
- ]
+ "required": ["name", "timeZone", "isDefault"]
},
"CreateScheduleOutput_2024_06_11": {
"type": "object",
@@ -12097,19 +11075,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",
@@ -12117,10 +11089,7 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"nullable": true,
@@ -12134,10 +11103,7 @@
"type": "object"
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"UpdateScheduleInput_2024_06_11": {
"type": "object",
@@ -12153,10 +11119,7 @@
"availability": {
"example": [
{
- "days": [
- "Monday",
- "Tuesday"
- ],
+ "days": ["Monday", "Tuesday"],
"startTime": "09:00",
"endTime": "10:00"
}
@@ -12191,10 +11154,7 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"$ref": "#/components/schemas/ScheduleOutput_2024_06_11"
@@ -12203,10 +11163,7 @@
"type": "object"
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"DeleteScheduleOutput_2024_06_11": {
"type": "object",
@@ -12214,15 +11171,10 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
}
},
- "required": [
- "status"
- ]
+ "required": ["status"]
},
"ProfileOutput": {
"type": "object",
@@ -12249,11 +11201,7 @@
"example": "john_doe"
}
},
- "required": [
- "id",
- "organizationId",
- "userId"
- ]
+ "required": ["id", "organizationId", "userId"]
},
"GetOrgUsersWithProfileOutput": {
"type": "object",
@@ -12389,15 +11337,7 @@
]
}
},
- "required": [
- "id",
- "email",
- "timeZone",
- "weekStart",
- "hideBranding",
- "createdDate",
- "profile"
- ]
+ "required": ["id", "email", "timeZone", "weekStart", "hideBranding", "createdDate", "profile"]
},
"GetOrganizationUsersResponseDTO": {
"type": "object",
@@ -12405,10 +11345,7 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"type": "array",
@@ -12417,10 +11354,7 @@
}
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"CreateOrganizationUserInput": {
"type": "object",
@@ -12498,20 +11432,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",
@@ -12519,19 +11447,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",
@@ -12554,23 +11476,13 @@
},
"role": {
"type": "string",
- "enum": [
- "MEMBER",
- "OWNER",
- "ADMIN"
- ]
+ "enum": ["MEMBER", "OWNER", "ADMIN"]
},
"disableImpersonation": {
"type": "boolean"
}
},
- "required": [
- "id",
- "userId",
- "teamId",
- "accepted",
- "role"
- ]
+ "required": ["id", "userId", "teamId", "accepted", "role"]
},
"GetAllOrgMemberships": {
"type": "object",
@@ -12578,19 +11490,13 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"$ref": "#/components/schemas/OrgMembershipOutputDto"
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"CreateOrgMembershipDto": {
"type": "object",
@@ -12605,21 +11511,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"]
},
"CreateOrgMembershipOutput": {
"type": "object",
@@ -12627,19 +11526,13 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"$ref": "#/components/schemas/OrgMembershipOutputDto"
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"GetOrgMembership": {
"type": "object",
@@ -12647,19 +11540,13 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"$ref": "#/components/schemas/OrgMembershipOutputDto"
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"DeleteOrgMembership": {
"type": "object",
@@ -12667,19 +11554,13 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"$ref": "#/components/schemas/OrgMembershipOutputDto"
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"UpdateOrgMembershipDto": {
"type": "object",
@@ -12689,11 +11570,7 @@
},
"role": {
"type": "string",
- "enum": [
- "MEMBER",
- "OWNER",
- "ADMIN"
- ]
+ "enum": ["MEMBER", "OWNER", "ADMIN"]
},
"disableImpersonation": {
"type": "boolean"
@@ -12706,19 +11583,13 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"$ref": "#/components/schemas/OrgMembershipOutputDto"
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"Host": {
"type": "object",
@@ -12733,18 +11604,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",
@@ -12754,11 +11617,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": {
@@ -13028,13 +11887,7 @@
}
}
},
- "required": [
- "lengthInMinutes",
- "title",
- "slug",
- "schedulingType",
- "hosts"
- ]
+ "required": ["lengthInMinutes", "title", "slug", "schedulingType", "hosts"]
},
"CreateTeamEventTypeOutput": {
"type": "object",
@@ -13042,10 +11895,7 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"oneOf": [
@@ -13061,10 +11911,7 @@
]
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"TeamEventTypeResponseHost": {
"type": "object",
@@ -13081,13 +11928,7 @@
"priority": {
"type": "string",
"default": "medium",
- "enum": [
- "lowest",
- "low",
- "medium",
- "high",
- "highest"
- ]
+ "enum": ["lowest", "low", "medium", "high", "highest"]
},
"name": {
"type": "string",
@@ -13099,10 +11940,7 @@
"example": "https://cal.com/api/avatar/d95949bc-ccb1-400f-acf6-045c51a16856.png"
}
},
- "required": [
- "userId",
- "name"
- ]
+ "required": ["userId", "name"]
},
"EventTypeTeam": {
"type": "object",
@@ -13135,9 +11973,7 @@
"type": "string"
}
},
- "required": [
- "id"
- ]
+ "required": ["id"]
},
"TeamEventTypeOutput_2024_06_14": {
"type": "object",
@@ -13152,11 +11988,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": {
@@ -13415,11 +12247,7 @@
"schedulingType": {
"type": "string",
"nullable": true,
- "enum": [
- "ROUND_ROBIN",
- "COLLECTIVE",
- "MANAGED"
- ]
+ "enum": ["ROUND_ROBIN", "COLLECTIVE", "MANAGED"]
},
"team": {
"$ref": "#/components/schemas/EventTypeTeam"
@@ -13455,19 +12283,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",
@@ -13493,10 +12315,7 @@
},
"templateType": {
"default": "CUSTOM_TEMPLATE",
- "enum": [
- "CHECK_IN_APPOINTMENT",
- "CUSTOM_TEMPLATE"
- ],
+ "enum": ["CHECK_IN_APPOINTMENT", "CUSTOM_TEMPLATE"],
"type": "string",
"description": "Template type"
},
@@ -13525,13 +12344,7 @@
"description": "General prompt"
}
},
- "required": [
- "yourPhoneNumber",
- "numberToCall",
- "calApiKey",
- "enabled",
- "templateType"
- ]
+ "required": ["yourPhoneNumber", "numberToCall", "calApiKey", "enabled", "templateType"]
},
"Data": {
"type": "object",
@@ -13543,9 +12356,7 @@
"type": "string"
}
},
- "required": [
- "callId"
- ]
+ "required": ["callId"]
},
"CreatePhoneCallOutput": {
"type": "object",
@@ -13553,19 +12364,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",
@@ -13573,10 +12378,7 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"type": "array",
@@ -13585,10 +12387,7 @@
}
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"UpdateTeamEventTypeInput_2024_06_14": {
"type": "object",
@@ -13598,11 +12397,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": {
@@ -13873,10 +12668,7 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"oneOf": [
@@ -13892,10 +12684,7 @@
]
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"DeleteTeamEventTypeOutput": {
"type": "object",
@@ -13903,19 +12692,13 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"type": "object"
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"MembershipUserOutputDto": {
"type": "object",
@@ -13933,9 +12716,7 @@
"type": "string"
}
},
- "required": [
- "email"
- ]
+ "required": ["email"]
},
"OrgTeamMembershipOutputDto": {
"type": "object",
@@ -13954,11 +12735,7 @@
},
"role": {
"type": "string",
- "enum": [
- "MEMBER",
- "OWNER",
- "ADMIN"
- ]
+ "enum": ["MEMBER", "OWNER", "ADMIN"]
},
"disableImpersonation": {
"type": "boolean"
@@ -13967,14 +12744,7 @@
"$ref": "#/components/schemas/MembershipUserOutputDto"
}
},
- "required": [
- "id",
- "userId",
- "teamId",
- "accepted",
- "role",
- "user"
- ]
+ "required": ["id", "userId", "teamId", "accepted", "role", "user"]
},
"OrgTeamMembershipsOutputResponseDto": {
"type": "object",
@@ -13982,10 +12752,7 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"type": "array",
@@ -13994,10 +12761,7 @@
}
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"OrgTeamMembershipOutputResponseDto": {
"type": "object",
@@ -14005,19 +12769,13 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"$ref": "#/components/schemas/OrgTeamMembershipOutputDto"
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"UpdateOrgTeamMembershipDto": {
"type": "object",
@@ -14027,11 +12785,7 @@
},
"role": {
"type": "string",
- "enum": [
- "MEMBER",
- "OWNER",
- "ADMIN"
- ]
+ "enum": ["MEMBER", "OWNER", "ADMIN"]
},
"disableImpersonation": {
"type": "boolean"
@@ -14051,21 +12805,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",
@@ -14083,12 +12830,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",
@@ -14111,14 +12853,7 @@
"example": true
}
},
- "required": [
- "id",
- "teamId",
- "type",
- "name",
- "slug",
- "enabled"
- ]
+ "required": ["id", "teamId", "type", "name", "slug", "enabled"]
},
"GetOrganizationAttributesOutput": {
"type": "object",
@@ -14126,10 +12861,7 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"type": "array",
@@ -14138,10 +12870,7 @@
}
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"GetSingleAttributeOutput": {
"type": "object",
@@ -14149,10 +12878,7 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"nullable": true,
@@ -14163,10 +12889,7 @@
]
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"CreateOrganizationAttributeOptionInput": {
"type": "object",
@@ -14178,10 +12901,7 @@
"type": "string"
}
},
- "required": [
- "value",
- "slug"
- ]
+ "required": ["value", "slug"]
},
"CreateOrganizationAttributeInput": {
"type": "object",
@@ -14194,12 +12914,7 @@
},
"type": {
"type": "string",
- "enum": [
- "TEXT",
- "NUMBER",
- "SINGLE_SELECT",
- "MULTI_SELECT"
- ]
+ "enum": ["TEXT", "NUMBER", "SINGLE_SELECT", "MULTI_SELECT"]
},
"options": {
"type": "array",
@@ -14211,12 +12926,7 @@
"type": "boolean"
}
},
- "required": [
- "name",
- "slug",
- "type",
- "options"
- ]
+ "required": ["name", "slug", "type", "options"]
},
"CreateOrganizationAttributesOutput": {
"type": "object",
@@ -14224,19 +12934,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",
@@ -14249,12 +12953,7 @@
},
"type": {
"type": "string",
- "enum": [
- "TEXT",
- "NUMBER",
- "SINGLE_SELECT",
- "MULTI_SELECT"
- ]
+ "enum": ["TEXT", "NUMBER", "SINGLE_SELECT", "MULTI_SELECT"]
},
"enabled": {
"type": "boolean"
@@ -14267,19 +12966,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",
@@ -14287,19 +12980,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",
@@ -14325,12 +13012,7 @@
"example": "option-slug"
}
},
- "required": [
- "id",
- "attributeId",
- "value",
- "slug"
- ]
+ "required": ["id", "attributeId", "value", "slug"]
},
"CreateAttributeOptionOutput": {
"type": "object",
@@ -14338,19 +13020,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",
@@ -14358,19 +13034,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",
@@ -14389,19 +13059,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",
@@ -14409,10 +13073,7 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"type": "array",
@@ -14421,10 +13082,7 @@
}
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"AssignOrganizationAttributeOptionToUserInput": {
"type": "object",
@@ -14439,9 +13097,7 @@
"type": "string"
}
},
- "required": [
- "attributeId"
- ]
+ "required": ["attributeId"]
},
"AssignOptionUserOutputData": {
"type": "object",
@@ -14459,11 +13115,7 @@
"description": "The value of the option"
}
},
- "required": [
- "id",
- "memberId",
- "attributeOptionId"
- ]
+ "required": ["id", "memberId", "attributeOptionId"]
},
"AssignOptionUserOutput": {
"type": "object",
@@ -14471,19 +13123,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",
@@ -14491,19 +13137,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",
@@ -14525,12 +13165,7 @@
"description": "The slug of the option"
}
},
- "required": [
- "id",
- "attributeId",
- "value",
- "slug"
- ]
+ "required": ["id", "attributeId", "value", "slug"]
},
"GetOptionUserOutput": {
"type": "object",
@@ -14538,10 +13173,7 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"type": "array",
@@ -14550,10 +13182,7 @@
}
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"TeamWebhookOutputDto": {
"type": "object",
@@ -14585,14 +13214,7 @@
"type": "string"
}
},
- "required": [
- "payloadTemplate",
- "teamId",
- "id",
- "triggers",
- "subscriberUrl",
- "active"
- ]
+ "required": ["payloadTemplate", "teamId", "id", "triggers", "subscriberUrl", "active"]
},
"TeamWebhooksOutputResponseDto": {
"type": "object",
@@ -14600,10 +13222,7 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"type": "array",
@@ -14612,10 +13231,7 @@
}
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"CreateWebhookInputDto": {
"type": "object",
@@ -14668,11 +13284,7 @@
"type": "string"
}
},
- "required": [
- "active",
- "subscriberUrl",
- "triggers"
- ]
+ "required": ["active", "subscriberUrl", "triggers"]
},
"TeamWebhookOutputResponseDto": {
"type": "object",
@@ -14680,19 +13292,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",
@@ -14775,19 +13381,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",
@@ -14818,13 +13415,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"]
}
}
},
@@ -14835,9 +13426,7 @@
"type": "string"
}
},
- "required": [
- "authUrl"
- ]
+ "required": ["authUrl"]
},
"StripConnectOutputResponseDto": {
"type": "object",
@@ -14845,19 +13434,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",
@@ -14866,9 +13449,7 @@
"type": "string"
}
},
- "required": [
- "url"
- ]
+ "required": ["url"]
},
"StripCredentialsCheckOutputResponseDto": {
"type": "object",
@@ -14878,9 +13459,7 @@
"example": "success"
}
},
- "required": [
- "status"
- ]
+ "required": ["status"]
},
"GetDefaultScheduleOutput_2024_06_11": {
"type": "object",
@@ -14888,19 +13467,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",
@@ -14979,9 +13552,7 @@
"default": true
}
},
- "required": [
- "name"
- ]
+ "required": ["name"]
},
"CreateTeamOutput": {
"type": "object",
@@ -14989,10 +13560,7 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"oneOf": [
@@ -15006,10 +13574,7 @@
"description": "Either an Output object or a TeamOutputDto."
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"TeamOutputDto": {
"type": "object",
@@ -15082,11 +13647,7 @@
"default": "Sunday"
}
},
- "required": [
- "id",
- "name",
- "isOrganization"
- ]
+ "required": ["id", "name", "isOrganization"]
},
"GetTeamOutput": {
"type": "object",
@@ -15094,19 +13655,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",
@@ -15114,10 +13669,7 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"type": "array",
@@ -15126,10 +13678,7 @@
}
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"UpdateTeamOutput": {
"type": "object",
@@ -15137,19 +13686,13 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"$ref": "#/components/schemas/TeamOutputDto"
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"GoogleServiceAccountKeyInput": {
"type": "object",
@@ -15164,13 +13707,9 @@
"type": "string"
}
},
- "required": [
- "private_key",
- "client_email",
- "client_id"
- ]
+ "required": ["private_key", "client_email", "client_id"]
},
- "CreateDelegationCredentialInput": {
+ "CreateDwdInput": {
"type": "object",
"properties": {
"workspacePlatformSlug": {
@@ -15193,11 +13732,7 @@
}
}
},
- "required": [
- "workspacePlatformSlug",
- "domain",
- "serviceAccountKey"
- ]
+ "required": ["workspacePlatformSlug", "domain", "serviceAccountKey"]
},
"WorkspacePlatformDto": {
"type": "object",
@@ -15209,12 +13744,9 @@
"type": "string"
}
},
- "required": [
- "name",
- "slug"
- ]
+ "required": ["name", "slug"]
},
- "DelegationCredentialOutput": {
+ "DwdOutput": {
"type": "object",
"properties": {
"id": {
@@ -15251,27 +13783,21 @@
"updatedAt"
]
},
- "CreateDelegationCredentialOutput": {
+ "CreateDwdOutput": {
"type": "object",
"properties": {
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
- "$ref": "#/components/schemas/DelegationCredentialOutput"
+ "$ref": "#/components/schemas/DwdOutput"
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
- "UpdateDelegationCredentialInput": {
+ "UpdateDwdInput": {
"type": "object",
"properties": {
"enabled": {
@@ -15292,25 +13818,19 @@
}
}
},
- "UpdateDelegationCredentialOutput": {
+ "UpdateDwdOutput": {
"type": "object",
"properties": {
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
- "$ref": "#/components/schemas/DelegationCredentialOutput"
+ "$ref": "#/components/schemas/DwdOutput"
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"CreateOrganizationInput": {
"type": "object",
@@ -15337,9 +13857,7 @@
"type": "object"
}
},
- "required": [
- "name"
- ]
+ "required": ["name"]
},
"ManagedOrganizationWithApiKeyOutput": {
"type": "object",
@@ -15358,11 +13876,7 @@
"type": "string"
}
},
- "required": [
- "id",
- "name",
- "apiKey"
- ]
+ "required": ["id", "name", "apiKey"]
},
"CreateManagedOrganizationOutput": {
"type": "object",
@@ -15370,19 +13884,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",
@@ -15398,10 +13906,7 @@
"type": "object"
}
},
- "required": [
- "id",
- "name"
- ]
+ "required": ["id", "name"]
},
"GetManagedOrganizationOutput": {
"type": "object",
@@ -15409,19 +13914,13 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"$ref": "#/components/schemas/ManagedOrganizationOutput"
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"GetManagedOrganizationsOutput": {
"type": "object",
@@ -15429,10 +13928,7 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"type": "array",
@@ -15441,10 +13937,7 @@
}
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"UpdateOrganizationInput": {
"type": "object",
@@ -15489,14 +13982,7 @@
"type": "string"
}
},
- "required": [
- "id",
- "formId",
- "formFillerId",
- "routedToBookingUid",
- "response",
- "createdAt"
- ]
+ "required": ["id", "formId", "formFillerId", "routedToBookingUid", "response", "createdAt"]
},
"GetRoutingFormResponsesOutput": {
"type": "object",
@@ -15504,10 +13990,7 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"type": "array",
@@ -15516,10 +13999,7 @@
}
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"ProviderVerifyClientData": {
"type": "object",
@@ -15534,11 +14014,7 @@
"type": "string"
}
},
- "required": [
- "clientId",
- "organizationId",
- "name"
- ]
+ "required": ["clientId", "organizationId", "name"]
},
"ProviderVerifyClientOutput": {
"type": "object",
@@ -15546,19 +14022,13 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"$ref": "#/components/schemas/ProviderVerifyClientData"
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"ProviderVerifyAccessTokenOutput": {
"type": "object",
@@ -15566,15 +14036,10 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
}
},
- "required": [
- "status"
- ]
+ "required": ["status"]
},
"MeOrgOutput": {
"type": "object",
@@ -15586,10 +14051,7 @@
"type": "number"
}
},
- "required": [
- "isPlatform",
- "id"
- ]
+ "required": ["isPlatform", "id"]
},
"MeOutput": {
"type": "object",
@@ -15641,19 +14103,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",
@@ -15661,29 +14117,20 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"$ref": "#/components/schemas/MeOutput"
}
},
- "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",
@@ -15697,9 +14144,7 @@
"description": "Whether to allowing writing to the calendar or not"
}
},
- "required": [
- "urls"
- ]
+ "required": ["urls"]
},
"CreateIcsFeedOutput": {
"type": "object",
@@ -15739,14 +14184,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",
@@ -15754,19 +14192,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",
@@ -15784,10 +14216,7 @@
"nullable": true
}
},
- "required": [
- "start",
- "end"
- ]
+ "required": ["start", "end"]
},
"GetBusyTimesOutput": {
"type": "object",
@@ -15795,10 +14224,7 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"type": "array",
@@ -15807,10 +14233,7 @@
}
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"Integration": {
"type": "object",
@@ -15914,18 +14337,12 @@
"credentialId": {
"type": "number"
},
- "delegationCredentialId": {
+ "domainWideDelegationCredentialId": {
"type": "string",
"nullable": true
}
},
- "required": [
- "externalId",
- "primary",
- "readOnly",
- "isSelected",
- "credentialId"
- ]
+ "required": ["externalId", "primary", "readOnly", "isSelected", "credentialId"]
},
"Calendar": {
"type": "object",
@@ -15955,17 +14372,12 @@
"credentialId": {
"type": "number"
},
- "delegationCredentialId": {
+ "domainWideDelegationCredentialId": {
"type": "string",
"nullable": true
}
},
- "required": [
- "externalId",
- "readOnly",
- "isSelected",
- "credentialId"
- ]
+ "required": ["externalId", "readOnly", "isSelected", "credentialId"]
},
"ConnectedCalendar": {
"type": "object",
@@ -15976,7 +14388,7 @@
"credentialId": {
"type": "number"
},
- "delegationCredentialId": {
+ "domainWideDelegationCredentialId": {
"type": "string",
"nullable": true
},
@@ -15989,11 +14401,8 @@
"$ref": "#/components/schemas/Calendar"
}
}
- },
- "required": [
- "integration",
- "credentialId"
- ]
+ },
+ "required": ["integration", "credentialId"]
},
"DestinationCalendar": {
"type": "object",
@@ -16023,7 +14432,7 @@
"type": "number",
"nullable": true
},
- "delegationCredentialId": {
+ "domainWideDelegationCredentialId": {
"type": "string",
"nullable": true
},
@@ -16067,10 +14476,7 @@
"$ref": "#/components/schemas/DestinationCalendar"
}
},
- "required": [
- "connectedCalendars",
- "destinationCalendar"
- ]
+ "required": ["connectedCalendars", "destinationCalendar"]
},
"ConnectedCalendarsOutput": {
"type": "object",
@@ -16078,19 +14484,13 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"$ref": "#/components/schemas/ConnectedCalendarsData"
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"DeleteCalendarCredentialsInputBodyDto": {
"type": "object",
@@ -16101,9 +14501,7 @@
"description": "Credential ID of the calendar to delete, as returned by the /calendars endpoint"
}
},
- "required": [
- "id"
- ]
+ "required": ["id"]
},
"DeletedCalendarCredentialsOutputDto": {
"type": "object",
@@ -16131,14 +14529,7 @@
"nullable": true
}
},
- "required": [
- "id",
- "type",
- "userId",
- "teamId",
- "appId",
- "invalid"
- ]
+ "required": ["id", "type", "userId", "teamId", "appId", "invalid"]
},
"DeletedCalendarCredentialsOutputResponseDto": {
"type": "object",
@@ -16146,19 +14537,13 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"$ref": "#/components/schemas/DeletedCalendarCredentialsOutputDto"
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"Attendee": {
"type": "object",
@@ -16234,10 +14619,7 @@
"default": "en"
}
},
- "required": [
- "name",
- "timeZone"
- ]
+ "required": ["name", "timeZone"]
},
"CreateBookingInput_2024_08_13": {
"type": "object",
@@ -16267,10 +14649,7 @@
},
"guests": {
"description": "An optional list of guest emails attending the event.",
- "example": [
- ],
"type": "array",
"items": {
"type": "string"
@@ -16302,11 +14681,7 @@
}
}
},
- "required": [
- "start",
- "eventTypeId",
- "attendee"
- ]
+ "required": ["start", "eventTypeId", "attendee"]
},
"CreateInstantBookingInput_2024_08_13": {
"type": "object",
@@ -16336,10 +14711,7 @@
},
"guests": {
"description": "An optional list of guest emails attending the event.",
- "example": [
- ],
"type": "array",
"items": {
"type": "string"
@@ -16376,12 +14748,7 @@
"example": true
}
},
- "required": [
- "start",
- "eventTypeId",
- "attendee",
- "instant"
- ]
+ "required": ["start", "eventTypeId", "attendee", "instant"]
},
"CreateRecurringBookingInput_2024_08_13": {
"type": "object",
@@ -16411,10 +14778,7 @@
},
"guests": {
"description": "An optional list of guest emails attending the event.",
- "example": [
- ],
"type": "array",
"items": {
"type": "string"
@@ -16451,11 +14815,7 @@
"example": 5
}
},
- "required": [
- "start",
- "eventTypeId",
- "attendee"
- ]
+ "required": ["start", "eventTypeId", "attendee"]
},
"BookingHost": {
"type": "object",
@@ -16481,13 +14841,7 @@
"example": "America/Los_Angeles"
}
},
- "required": [
- "id",
- "name",
- "email",
- "username",
- "timeZone"
- ]
+ "required": ["id", "name", "email", "username", "timeZone"]
},
"EventType": {
"type": "object",
@@ -16501,10 +14855,7 @@
"example": "some-event"
}
},
- "required": [
- "id",
- "slug"
- ]
+ "required": ["id", "slug"]
},
"BookingOutput_2024_08_13": {
"type": "object",
@@ -16533,12 +14884,7 @@
},
"status": {
"type": "string",
- "enum": [
- "cancelled",
- "accepted",
- "rejected",
- "pending"
- ],
+ "enum": ["cancelled", "accepted", "rejected", "pending"],
"example": "accepted"
},
"cancellationReason": {
@@ -16621,10 +14967,7 @@
}
},
"guests": {
- "example": [
- ],
"type": "array",
"items": {
"type": "string"
@@ -16685,12 +15028,7 @@
},
"status": {
"type": "string",
- "enum": [
- "cancelled",
- "accepted",
- "rejected",
- "pending"
- ],
+ "enum": ["cancelled", "accepted", "rejected", "pending"],
"example": "accepted"
},
"cancellationReason": {
@@ -16773,10 +15111,7 @@
}
},
"guests": {
- "example": [
- ],
"type": "array",
"items": {
"type": "string"
@@ -16904,14 +15239,7 @@
}
}
},
- "required": [
- "name",
- "email",
- "timeZone",
- "absent",
- "seatUid",
- "bookingFieldsResponses"
- ]
+ "required": ["name", "email", "timeZone", "absent", "seatUid", "bookingFieldsResponses"]
},
"CreateSeatedBookingOutput_2024_08_13": {
"type": "object",
@@ -16940,12 +15268,7 @@
},
"status": {
"type": "string",
- "enum": [
- "cancelled",
- "accepted",
- "rejected",
- "pending"
- ],
+ "enum": ["cancelled", "accepted", "rejected", "pending"],
"example": "accepted"
},
"cancellationReason": {
@@ -17079,12 +15402,7 @@
},
"status": {
"type": "string",
- "enum": [
- "cancelled",
- "accepted",
- "rejected",
- "pending"
- ],
+ "enum": ["cancelled", "accepted", "rejected", "pending"],
"example": "accepted"
},
"cancellationReason": {
@@ -17202,10 +15520,7 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"oneOf": [
@@ -17231,10 +15546,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",
@@ -17263,12 +15575,7 @@
},
"status": {
"type": "string",
- "enum": [
- "cancelled",
- "accepted",
- "rejected",
- "pending"
- ],
+ "enum": ["cancelled", "accepted", "rejected", "pending"],
"example": "accepted"
},
"cancellationReason": {
@@ -17397,12 +15704,7 @@
},
"status": {
"type": "string",
- "enum": [
- "cancelled",
- "accepted",
- "rejected",
- "pending"
- ],
+ "enum": ["cancelled", "accepted", "rejected", "pending"],
"example": "accepted"
},
"cancellationReason": {
@@ -17515,10 +15817,7 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"oneOf": [
@@ -17553,10 +15852,7 @@
"type": "object"
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"GetBookingsOutput_2024_08_13": {
"type": "object",
@@ -17564,10 +15860,7 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"type": "array",
@@ -17593,10 +15886,7 @@
"type": "object"
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"RescheduleBookingOutput_2024_08_13": {
"type": "object",
@@ -17604,10 +15894,7 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"oneOf": [
@@ -17627,10 +15914,7 @@
"description": "Booking data, which can be either a BookingOutput object or a RecurringBookingOutput object"
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"CancelBookingOutput_2024_08_13": {
"type": "object",
@@ -17638,10 +15922,7 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"oneOf": [
@@ -17673,10 +15954,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"]
},
"MarkAbsentBookingInput_2024_08_13": {
"type": "object",
@@ -17700,10 +15978,7 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"oneOf": [
@@ -17717,10 +15992,7 @@
"description": "Booking data, which can be either a BookingOutput object or a RecurringBookingOutput object"
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"ReassignedToDto": {
"type": "object",
@@ -17738,11 +16010,7 @@
"example": "[email protected]"
}
},
- "required": [
- "id",
- "name",
- "email"
- ]
+ "required": ["id", "name", "email"]
},
"ReassignBookingOutput_2024_08_13": {
"type": "object",
@@ -17750,10 +16018,7 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"oneOf": [
@@ -17769,10 +16034,7 @@
]
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"ReassignToUserBookingInput_2024_08_13": {
"type": "object",
@@ -17807,20 +16069,14 @@
"role": {
"type": "string",
"default": "MEMBER",
- "enum": [
- "MEMBER",
- "OWNER",
- "ADMIN"
- ]
+ "enum": ["MEMBER", "OWNER", "ADMIN"]
},
"disableImpersonation": {
"type": "boolean",
"default": false
}
},
- "required": [
- "userId"
- ]
+ "required": ["userId"]
},
"TeamMembershipOutput": {
"type": "object",
@@ -17839,23 +16095,13 @@
},
"role": {
"type": "string",
- "enum": [
- "MEMBER",
- "OWNER",
- "ADMIN"
- ]
+ "enum": ["MEMBER", "OWNER", "ADMIN"]
},
"disableImpersonation": {
"type": "boolean"
}
},
- "required": [
- "id",
- "userId",
- "teamId",
- "accepted",
- "role"
- ]
+ "required": ["id", "userId", "teamId", "accepted", "role"]
},
"CreateTeamMembershipOutput": {
"type": "object",
@@ -17863,19 +16109,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",
@@ -17883,19 +16123,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",
@@ -17903,19 +16137,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",
@@ -17925,11 +16153,7 @@
},
"role": {
"type": "string",
- "enum": [
- "MEMBER",
- "OWNER",
- "ADMIN"
- ]
+ "enum": ["MEMBER", "OWNER", "ADMIN"]
},
"disableImpersonation": {
"type": "boolean"
@@ -17942,19 +16166,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",
@@ -17962,19 +16180,13 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"$ref": "#/components/schemas/TeamMembershipOutput"
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"ReserveSlotInput_2024_09_04": {
"type": "object",
@@ -18000,10 +16212,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",
@@ -18060,19 +16269,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",
@@ -18080,10 +16283,7 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"nullable": true,
@@ -18094,10 +16294,7 @@
]
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"UserWebhookOutputDto": {
"type": "object",
@@ -18129,14 +16326,7 @@
"type": "string"
}
},
- "required": [
- "payloadTemplate",
- "userId",
- "id",
- "triggers",
- "subscriberUrl",
- "active"
- ]
+ "required": ["payloadTemplate", "userId", "id", "triggers", "subscriberUrl", "active"]
},
"UserWebhookOutputResponseDto": {
"type": "object",
@@ -18144,19 +16334,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",
@@ -18164,10 +16348,7 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"type": "array",
@@ -18176,10 +16357,7 @@
}
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"EventTypeWebhookOutputDto": {
"type": "object",
@@ -18211,14 +16389,7 @@
"type": "string"
}
},
- "required": [
- "payloadTemplate",
- "eventTypeId",
- "id",
- "triggers",
- "subscriberUrl",
- "active"
- ]
+ "required": ["payloadTemplate", "eventTypeId", "id", "triggers", "subscriberUrl", "active"]
},
"EventTypeWebhookOutputResponseDto": {
"type": "object",
@@ -18226,19 +16397,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",
@@ -18246,10 +16411,7 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"type": "array",
@@ -18258,10 +16420,7 @@
}
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"DeleteManyWebhooksOutputResponseDto": {
"type": "object",
@@ -18269,19 +16428,13 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"type": "string"
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"OAuthClientWebhookOutputDto": {
"type": "object",
@@ -18313,14 +16466,7 @@
"type": "string"
}
},
- "required": [
- "payloadTemplate",
- "oAuthClientId",
- "id",
- "triggers",
- "subscriberUrl",
- "active"
- ]
+ "required": ["payloadTemplate", "oAuthClientId", "id", "triggers", "subscriberUrl", "active"]
},
"OAuthClientWebhookOutputResponseDto": {
"type": "object",
@@ -18328,19 +16474,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",
@@ -18348,10 +16488,7 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"type": "array",
@@ -18360,10 +16497,7 @@
}
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"DestinationCalendarsInputBodyDto": {
"type": "object",
@@ -18372,25 +16506,18 @@
"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",
"example": "https://caldav.icloud.com/26962146906/calendars/1644422A-1945-4438-BBC0-4F0Q23A57R7S/",
"description": "Unique identifier used to represent the specfic calendar, as returned by the /calendars endpoint"
},
- "delegationCredentialId": {
+ "domainWideDelegationCredentialId": {
"type": "string"
}
},
- "required": [
- "integration",
- "externalId"
- ]
+ "required": ["integration", "externalId"]
},
"DestinationCalendarsOutputDto": {
"type": "object",
@@ -18409,12 +16536,7 @@
"nullable": true
}
},
- "required": [
- "userId",
- "integration",
- "externalId",
- "credentialId"
- ]
+ "required": ["userId", "integration", "externalId", "credentialId"]
},
"DestinationCalendarsOutputResponseDto": {
"type": "object",
@@ -18422,19 +16544,13 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"$ref": "#/components/schemas/DestinationCalendarsOutputDto"
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"ConferencingAppsOutputDto": {
"type": "object",
@@ -18459,30 +16575,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",
@@ -18490,25 +16596,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",
@@ -18517,10 +16615,7 @@
}
}
},
- "required": [
- "status",
- "data"
- ]
+ "required": ["status", "data"]
},
"SetDefaultConferencingAppOutputResponseDto": {
"type": "object",
@@ -18528,15 +16623,10 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
}
},
- "required": [
- "status"
- ]
+ "required": ["status"]
},
"DefaultConferencingAppsOutputDto": {
"type": "object",
@@ -18555,18 +16645,13 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
},
"data": {
"$ref": "#/components/schemas/DefaultConferencingAppsOutputDto"
}
},
- "required": [
- "status"
- ]
+ "required": ["status"]
},
"DisconnectConferencingAppOutputResponseDto": {
"type": "object",
@@ -18574,16 +16659,11 @@
"status": {
"type": "string",
"example": "success",
- "enum": [
- "success",
- "error"
- ]
+ "enum": ["success", "error"]
}
},
- "required": [
- "status"
- ]
+ "required": ["status"]
}
}
}
-}
\ No newline at end of file
+}
diff --git a/packages/app-store/_appRegistry.ts b/packages/app-store/_appRegistry.ts
index 202045df336..6b8b19c3513 100644
--- a/packages/app-store/_appRegistry.ts
+++ b/packages/app-store/_appRegistry.ts
@@ -1,7 +1,7 @@
import { appStoreMetadata } from "@calcom/app-store/appStoreMetaData";
import { getAppFromSlug } from "@calcom/app-store/utils";
import getInstallCountPerApp from "@calcom/lib/apps/getInstallCountPerApp";
-import { getAllDelegationCredentialsForUser } from "@calcom/lib/delegationCredential/server";
+import { getAllDwdCredentialsForUser } from "@calcom/lib/domainWideDelegation/server";
import type { UserAdminTeams } from "@calcom/lib/server/repository/user";
import prisma, { safeAppSelect, safeCredentialSelect } from "@calcom/prisma";
import { userMetadata } from "@calcom/prisma/zod-utils";
@@ -92,8 +92,8 @@ export async function getAppRegistryWithCredentials(userId: number, userAdminTea
},
});
- const delegationCredentials = user
- ? await getAllDelegationCredentialsForUser({ user: { id: userId, email: user.email } })
+ const dwdCredentials = user
+ ? await getAllDwdCredentialsForUser({ user: { id: userId, email: user.email } })
: [];
const usersDefaultApp = userMetadata.parse(user?.metadata)?.defaultConferencingApp?.appSlug;
@@ -103,11 +103,9 @@ export async function getAppRegistryWithCredentials(userId: number, userAdminTea
})[];
const installCountPerApp = await getInstallCountPerApp();
for await (const dbapp of dbApps) {
- const delegationCredentialsForApp = delegationCredentials.filter(
- (credential) => credential.appId === dbapp.slug
- );
- const nonDelegationCredentialsForApp = dbapp.credentials;
- const allCredentials = [...delegationCredentialsForApp, ...nonDelegationCredentialsForApp];
+ const dwdCredentialsForApp = dwdCredentials.filter((credential) => credential.appId === dbapp.slug);
+ const nonDwdCredentialsForApp = dbapp.credentials;
+ const allCredentials = [...dwdCredentialsForApp, ...nonDwdCredentialsForApp];
const app = await getAppWithMetadata(dbapp);
if (!app) continue;
// Skip if app isn't installed
diff --git a/packages/app-store/googlecalendar/_metadata.ts b/packages/app-store/googlecalendar/_metadata.ts
index 65ccf7214ac..e40949d8ba4 100644
--- a/packages/app-store/googlecalendar/_metadata.ts
+++ b/packages/app-store/googlecalendar/_metadata.ts
@@ -19,7 +19,7 @@ export const metadata = {
dirName: "googlecalendar",
isOAuth: true,
- delegationCredential: {
+ domainWideDelegation: {
// This is unused at the moment but should be used in future
// For now, we have hardcoded imports in the codebase that are supported with Google Workspace(i.e. Google Calendar and Google Meet)
workspacePlatformSlug: "google",
diff --git a/packages/app-store/googlecalendar/api/webhook.ts b/packages/app-store/googlecalendar/api/webhook.ts
index 275d1c558a4..4cb5428ed88 100644
--- a/packages/app-store/googlecalendar/api/webhook.ts
+++ b/packages/app-store/googlecalendar/api/webhook.ts
@@ -1,6 +1,6 @@
import type { NextApiRequest } from "next";
-import { buildNonDelegationCredential } from "@calcom/lib/delegationCredential/server";
+import { buildNonDwdCredential } from "@calcom/lib/domainWideDelegation/server";
import { HttpError } from "@calcom/lib/http-error";
import { defaultHandler } from "@calcom/lib/server/defaultHandler";
import { defaultResponder } from "@calcom/lib/server/defaultResponder";
@@ -38,7 +38,7 @@ async function postHandler(req: NextApiRequest) {
});
const { selectedCalendars } = credential;
- const calendar = await getCalendar(buildNonDelegationCredential(credential));
+ const calendar = await getCalendar(buildNonDwdCredential(credential));
// Make sure to pass unique SelectedCalendars to avoid unnecessary third party api calls
// Necessary to do here so that it is ensure for all calendar apps
diff --git a/packages/app-store/googlecalendar/lib/CalendarService.test.ts b/packages/app-store/googlecalendar/lib/CalendarService.test.ts
index e8aa729f8ed..c371016c16d 100644
--- a/packages/app-store/googlecalendar/lib/CalendarService.test.ts
+++ b/packages/app-store/googlecalendar/lib/CalendarService.test.ts
@@ -295,7 +295,7 @@ describe("Watching and unwatching calendar", () => {
integration: "google_calendar",
externalId: "[email protected]",
credentialId: 1,
- delegationCredentialId: null,
+ domainWideDelegationCredentialId: null,
googleChannelId: "mock-channel-id",
googleChannelKind: "api#channel",
googleChannelResourceId: "mock-resource-id",
@@ -325,7 +325,7 @@ describe("Watching and unwatching calendar", () => {
integration: "google_calendar",
externalId: "[email protected]",
credentialId: 1,
- delegationCredentialId: null,
+ domainWideDelegationCredentialId: null,
googleChannelId: null,
googleChannelKind: null,
googleChannelResourceId: null,
@@ -711,13 +711,13 @@ describe("GoogleCalendarService credential handling", () => {
return mockJWTInstance;
};
- test("uses JWT auth with impersonation when Delegation credential is provided", async () => {
- const credentialWithDelegation = await createCredentialInDb({
+ test("uses JWT auth with impersonation when DWD credential is provided", async () => {
+ const credentialWithDWD = await createCredentialInDb({
user: { email: "[email protected]" },
delegatedTo: delegatedCredential,
});
- const calendarService = new CalendarService(credentialWithDelegation);
+ const calendarService = new CalendarService(credentialWithDWD);
await calendarService.listCalendars();
const expectedJWTConfig: MockJWT = {
@@ -738,7 +738,7 @@ describe("GoogleCalendarService credential handling", () => {
});
});
- test("uses OAuth2 auth when no Delegation credential is provided", async () => {
+ test("uses OAuth2 auth when no DWD credential is provided", async () => {
const regularCredential = await createCredentialInDb();
const { client_id, client_secret, redirect_uris } = await getGoogleAppKeys();
@@ -762,8 +762,8 @@ describe("GoogleCalendarService credential handling", () => {
});
});
- test("handles DelegationCredential authorization errors appropriately", async () => {
- const credentialWithDelegation = await createCredentialInDb({
+ test("handles DWD authorization errors appropriately", async () => {
+ const credentialWithDWD = await createCredentialInDb({
user: { email: "[email protected]" },
delegatedTo: delegatedCredential,
});
@@ -778,15 +778,15 @@ describe("GoogleCalendarService credential handling", () => {
},
});
- const calendarService = new CalendarService(credentialWithDelegation);
+ const calendarService = new CalendarService(credentialWithDWD);
await expect(calendarService.listCalendars()).rejects.toThrow(
- "Make sure that the Client ID for the delegation credential is added to the Google Workspace Admin Console"
+ "Make sure that the Client ID for the domain wide delegation is added to the Google Workspace Admin Console"
);
});
test("handles invalid_grant error (user not in workspace) appropriately", async () => {
- const credentialWithDelegation = await createCredentialInDb({
+ const credentialWithDWD = await createCredentialInDb({
user: { email: "[email protected]" },
delegatedTo: delegatedCredential,
});
@@ -801,13 +801,13 @@ describe("GoogleCalendarService credential handling", () => {
},
});
- const calendarService = new CalendarService(credentialWithDelegation);
+ const calendarService = new CalendarService(credentialWithDWD);
await expect(calendarService.listCalendars()).rejects.toThrow("User might not exist in Google Workspace");
});
- test("handles general DelegationCredential authorization errors appropriately", async () => {
- const credentialWithDelegation = await createCredentialInDb({
+ test("handles general DWD authorization errors appropriately", async () => {
+ const credentialWithDWD = await createCredentialInDb({
user: { email: "[email protected]" },
delegatedTo: delegatedCredential,
});
@@ -816,18 +816,18 @@ describe("GoogleCalendarService credential handling", () => {
authorizeError: new Error("Some unexpected error"),
});
- const calendarService = new CalendarService(credentialWithDelegation);
+ const calendarService = new CalendarService(credentialWithDWD);
- await expect(calendarService.listCalendars()).rejects.toThrow("Error authorizing delegation credential");
+ await expect(calendarService.listCalendars()).rejects.toThrow("Error authorizing domain wide delegation");
});
- test("handles missing user email for DelegationCredential appropriately", async () => {
- const credentialWithDelegation = await createCredentialInDb({
+ test("handles missing user email for DWD appropriately", async () => {
+ const credentialWithDWD = await createCredentialInDb({
user: { email: null },
delegatedTo: delegatedCredential,
});
- const calendarService = new CalendarService(credentialWithDelegation);
+ const calendarService = new CalendarService(credentialWithDWD);
const { client_id, client_secret, redirect_uris } = await getGoogleAppKeys();
await calendarService.listCalendars();
diff --git a/packages/app-store/googlecalendar/lib/CalendarService.ts b/packages/app-store/googlecalendar/lib/CalendarService.ts
index 42ee69c6d9a..0b7abd49afa 100644
--- a/packages/app-store/googlecalendar/lib/CalendarService.ts
+++ b/packages/app-store/googlecalendar/lib/CalendarService.ts
@@ -13,9 +13,9 @@ import type { FreeBusyArgs } from "@calcom/features/calendar-cache/calendar-cach
import { getTimeMax, getTimeMin } from "@calcom/features/calendar-cache/lib/datesForCache";
import { getLocation, getRichDescription } from "@calcom/lib/CalEventParser";
import {
- CalendarAppDelegationCredentialClientIdNotAuthorizedError,
- CalendarAppDelegationCredentialInvalidGrantError,
- CalendarAppDelegationCredentialError,
+ CalendarAppDomainWideDelegationClientIdNotAuthorizedError,
+ CalendarAppDomainWideDelegationInvalidGrantError,
+ CalendarAppDomainWideDelegationError,
} from "@calcom/lib/CalendarAppError";
import { uniqueBy } from "@calcom/lib/array";
import {
@@ -180,12 +180,12 @@ export default class GoogleCalendarService implements Calendar {
};
};
- private getAuthedCalendarFromDelegationCredential = async ({
- delegationCredential,
+ private getAuthedCalendarFromDwd = async ({
+ domainWideDelegation,
emailToImpersonate,
}: {
emailToImpersonate: string;
- delegationCredential: {
+ domainWideDelegation: {
serviceAccountKey: {
client_email: string;
client_id: string;
@@ -193,9 +193,9 @@ export default class GoogleCalendarService implements Calendar {
};
};
}) => {
- const serviceAccountClientEmail = delegationCredential.serviceAccountKey.client_email;
- const serviceAccountClientId = delegationCredential.serviceAccountKey.client_id;
- const serviceAccountPrivateKey = delegationCredential.serviceAccountKey.private_key;
+ const serviceAccountClientEmail = domainWideDelegation.serviceAccountKey.client_email;
+ const serviceAccountClientId = domainWideDelegation.serviceAccountKey.client_id;
+ const serviceAccountPrivateKey = domainWideDelegation.serviceAccountKey.private_key;
const authClient = new JWT({
email: serviceAccountClientEmail,
@@ -207,26 +207,26 @@ export default class GoogleCalendarService implements Calendar {
try {
await authClient.authorize();
} catch (error) {
- this.log.error("DelegationCredential: Error authorizing delegation credential", JSON.stringify(error));
+ this.log.error("DWD: Error authorizing domain wide delegation", JSON.stringify(error));
if ((error as any).response?.data?.error === "unauthorized_client") {
- throw new CalendarAppDelegationCredentialClientIdNotAuthorizedError(
- "Make sure that the Client ID for the delegation credential is added to the Google Workspace Admin Console"
+ throw new CalendarAppDomainWideDelegationClientIdNotAuthorizedError(
+ "Make sure that the Client ID for the domain wide delegation is added to the Google Workspace Admin Console"
);
}
if ((error as any).response?.data?.error === "invalid_grant") {
- throw new CalendarAppDelegationCredentialInvalidGrantError(
+ throw new CalendarAppDomainWideDelegationInvalidGrantError(
"User might not exist in Google Workspace"
);
}
// Catch all error
- throw new CalendarAppDelegationCredentialError("Error authorizing delegation credential");
+ throw new CalendarAppDomainWideDelegationError("Error authorizing domain wide delegation");
}
this.log.debug(
- "Using delegation credential with service account email",
+ "Using domain wide delegation with service account email",
safeStringify({
serviceAccountClientEmail,
serviceAccountClientId,
@@ -240,22 +240,22 @@ export default class GoogleCalendarService implements Calendar {
};
public authedCalendar = async () => {
- let delegationCredentialAuthedCalendar;
+ let dwdAuthedCalendar;
if (this.credential.delegatedTo) {
if (!this.credential.user?.email) {
- this.log.error("DelegationCredential: No email to impersonate found for delegation credential");
+ this.log.error("DWD: No email to impersonate found for domain wide delegation");
} else {
const oauthClientIdAliasRegex = /\+[a-zA-Z0-9]{25}/;
- delegationCredentialAuthedCalendar = await this.getAuthedCalendarFromDelegationCredential({
- delegationCredential: this.credential.delegatedTo,
+ dwdAuthedCalendar = await this.getAuthedCalendarFromDwd({
+ domainWideDelegation: this.credential.delegatedTo,
emailToImpersonate: this.credential.user.email.replace(oauthClientIdAliasRegex, ""),
});
}
}
- if (delegationCredentialAuthedCalendar) {
- return delegationCredentialAuthedCalendar;
+ if (dwdAuthedCalendar) {
+ return dwdAuthedCalendar;
}
const myGoogleAuth = await this.auth.getMyGoogleAuthWithRefreshedToken();
@@ -865,8 +865,8 @@ export default class GoogleCalendarService implements Calendar {
}
}
- // It would error if the delegation credential is not set up correctly
- async testDelegationCredentialSetup() {
+ // It would error if the domain wide delegation is not set up correctly
+ async testDomainWideDelegationSetup() {
const calendar = await this.authedCalendar();
const cals = await calendar.calendarList.list({ fields: "items(id)" });
return !!cals.data.items;
diff --git a/packages/app-store/office365calendar/lib/CalendarService.ts b/packages/app-store/office365calendar/lib/CalendarService.ts
index edc6a418a28..dc9fb379ada 100644
--- a/packages/app-store/office365calendar/lib/CalendarService.ts
+++ b/packages/app-store/office365calendar/lib/CalendarService.ts
@@ -4,8 +4,8 @@ import type { DefaultBodyType } from "msw";
import dayjs from "@calcom/dayjs";
import { getLocation, getRichDescription } from "@calcom/lib/CalEventParser";
import {
- CalendarAppDelegationCredentialInvalidGrantError,
- CalendarAppDelegationCredentialConfigurationError,
+ CalendarAppDomainWideDelegationInvalidGrantError,
+ CalendarAppDomainWideDelegationConfigurationError,
} from "@calcom/lib/CalendarAppError";
import { handleErrorsJson, handleErrorsRaw } from "@calcom/lib/errors";
import logger from "@calcom/lib/logger";
@@ -72,24 +72,27 @@ export default class Office365CalendarService implements Calendar {
appSlug: metadata.slug,
currentTokenObject: tokenResponse,
fetchNewTokenObject: async ({ refreshToken }: { refreshToken: string | null }) => {
- const isDelegated = Boolean(credential?.delegatedTo);
+ const isDomainWideDelegated = Boolean(credential?.delegatedTo);
- if (!isDelegated && !refreshToken) {
+ if (!isDomainWideDelegated && !refreshToken) {
return null;
}
- const { client_id, client_secret } = await this.getAuthCredentials(isDelegated);
+ const { client_id, client_secret } = await this.getAuthCredentials(isDomainWideDelegated);
- const url = this.getAuthUrl(isDelegated, credential?.delegatedTo?.serviceAccountKey?.tenant_id);
+ const url = this.getAuthUrl(
+ isDomainWideDelegated,
+ credential?.delegatedTo?.serviceAccountKey?.tenant_id
+ );
const bodyParams = {
- scope: isDelegated
+ scope: isDomainWideDelegated
? "https://graph.microsoft.com/.default"
: "User.Read Calendars.Read Calendars.ReadWrite",
client_id,
client_secret,
- grant_type: isDelegated ? "client_credentials" : "refresh_token",
- ...(isDelegated ? {} : { refresh_token: refreshToken ?? "" }),
+ grant_type: isDomainWideDelegated ? "client_credentials" : "refresh_token",
+ ...(isDomainWideDelegated ? {} : { refresh_token: refreshToken ?? "" }),
};
return fetch(url, {
@@ -124,8 +127,8 @@ export default class Office365CalendarService implements Calendar {
private getAuthUrl(delegatedTo: boolean, tenantId?: string): string {
if (delegatedTo) {
if (!tenantId) {
- throw new CalendarAppDelegationCredentialInvalidGrantError(
- "Invalid DelegationCredential Settings: tenantId is missing"
+ throw new CalendarAppDomainWideDelegationInvalidGrantError(
+ "Invalid DomainWideDelegation Settings: tenantId is missing"
);
}
return `https://login.microsoftonline.com/${tenantId}/oauth2/v2.0/token`;
@@ -134,14 +137,14 @@ export default class Office365CalendarService implements Calendar {
return "https://login.microsoftonline.com/common/oauth2/v2.0/token";
}
- private async getAuthCredentials(isDelegated: boolean) {
- if (isDelegated) {
+ private async getAuthCredentials(isDomainWideDelegated: boolean) {
+ if (isDomainWideDelegated) {
const client_id = this.credential?.delegatedTo?.serviceAccountKey?.client_id;
const client_secret = this.credential?.delegatedTo?.serviceAccountKey?.private_key;
if (!client_id || !client_secret) {
- throw new CalendarAppDelegationCredentialConfigurationError(
- "Delegation credential without clientId or Secret"
+ throw new CalendarAppDomainWideDelegationConfigurationError(
+ "Domain Wide Delegated credential without clientId or Secret"
);
}
@@ -154,18 +157,18 @@ export default class Office365CalendarService implements Calendar {
private async getAzureUserId(credential: CredentialForCalendarServiceWithTenantId) {
if (this.azureUserId) return this.azureUserId;
- const isDelegated = Boolean(credential?.delegatedTo);
+ const isDomainWideDelegated = Boolean(credential?.delegatedTo);
- if (!isDelegated) return;
+ if (!isDomainWideDelegated) return;
- const url = this.getAuthUrl(isDelegated, credential?.delegatedTo?.serviceAccountKey?.tenant_id);
+ const url = this.getAuthUrl(isDomainWideDelegated, credential?.delegatedTo?.serviceAccountKey?.tenant_id);
- const delegationCredentialClientId = credential.delegatedTo?.serviceAccountKey?.client_id;
- const delegationCredentialClientSecret = credential.delegatedTo?.serviceAccountKey?.private_key;
+ const dwdClientId = credential.delegatedTo?.serviceAccountKey?.client_id;
+ const dwdClientSecret = credential.delegatedTo?.serviceAccountKey?.private_key;
- if (!delegationCredentialClientId || !delegationCredentialClientSecret) {
- throw new CalendarAppDelegationCredentialConfigurationError(
- "Delegation credential without clientId or Secret"
+ if (!dwdClientId || !dwdClientSecret) {
+ throw new CalendarAppDomainWideDelegationConfigurationError(
+ "Domain Wide Delegated credential without clientId or Secret"
);
}
const loginResponse = await fetch(url, {
@@ -173,9 +176,9 @@ export default class Office365CalendarService implements Calendar {
headers: { "Content-Type": "application/x-www-form-urlencoded" },
body: new URLSearchParams({
scope: "https://graph.microsoft.com/.default",
- client_id: delegationCredentialClientId,
+ client_id: dwdClientId,
grant_type: "client_credentials",
- client_secret: delegationCredentialClientSecret,
+ client_secret: dwdClientSecret,
}),
});
@@ -199,7 +202,7 @@ export default class Office365CalendarService implements Calendar {
const parsedBody = await response.json();
if (!parsedBody?.value?.[0]?.id) {
- throw new CalendarAppDelegationCredentialInvalidGrantError(
+ throw new CalendarAppDomainWideDelegationInvalidGrantError(
"User might not exist in Microsoft Azure Active Directory"
);
}
@@ -208,16 +211,16 @@ export default class Office365CalendarService implements Calendar {
return this.azureUserId;
}
- // It would error if the delegation credential is not set up correctly
- async testDelegationCredentialSetup(): Promise<boolean> {
- const delegationCredentialClientId = this.credential.delegatedTo?.serviceAccountKey?.client_id;
- const delegationCredentialClientSecret = this.credential.delegatedTo?.serviceAccountKey?.private_key;
+ // It would error if the domain wide delegation is not set up correctly
+ async testDomainWideDelegationSetup(): Promise<boolean> {
+ const dwdClientId = this.credential.delegatedTo?.serviceAccountKey?.client_id;
+ const dwdClientSecret = this.credential.delegatedTo?.serviceAccountKey?.private_key;
const url = this.getAuthUrl(
Boolean(this.credential?.delegatedTo),
this.credential?.delegatedTo?.serviceAccountKey?.tenant_id
);
- if (!delegationCredentialClientId || !delegationCredentialClientSecret) {
+ if (!dwdClientId || !dwdClientSecret) {
return false;
}
const loginResponse = await fetch(url, {
@@ -225,9 +228,9 @@ export default class Office365CalendarService implements Calendar {
headers: { "Content-Type": "application/x-www-form-urlencoded" },
body: new URLSearchParams({
scope: "https://graph.microsoft.com/.default",
- client_id: delegationCredentialClientId,
+ client_id: dwdClientId,
grant_type: "client_credentials",
- client_secret: delegationCredentialClientSecret,
+ client_secret: dwdClientSecret,
}),
});
const parsedLoginResponse = await loginResponse.json();
diff --git a/packages/app-store/office365video/lib/VideoApiAdapter.ts b/packages/app-store/office365video/lib/VideoApiAdapter.ts
index c0a84ab2cc2..ee181e3af8a 100644
--- a/packages/app-store/office365video/lib/VideoApiAdapter.ts
+++ b/packages/app-store/office365video/lib/VideoApiAdapter.ts
@@ -1,8 +1,8 @@
import { z } from "zod";
import {
- CalendarAppDelegationCredentialConfigurationError,
- CalendarAppDelegationCredentialInvalidGrantError,
+ CalendarAppDomainWideDelegationConfigurationError,
+ CalendarAppDomainWideDelegationInvalidGrantError,
} from "@calcom/lib/CalendarAppError";
import { handleErrorsRaw } from "@calcom/lib/errors";
import { HttpError } from "@calcom/lib/http-error";
@@ -49,26 +49,26 @@ const TeamsVideoApiAdapter = (credential: CredentialForCalendarServiceWithTenant
appSlug: config.slug,
currentTokenObject: tokenResponse,
fetchNewTokenObject: async ({ refreshToken }: { refreshToken: string | null }) => {
- const isDelegated = Boolean(credential?.delegatedTo);
- if (!isDelegated && !refreshToken) {
+ const isDomainWideDelegated = Boolean(credential?.delegatedTo);
+ if (!isDomainWideDelegated && !refreshToken) {
return null;
}
- const credentials = isDelegated
+ const credentials = isDomainWideDelegated
? {
client_id: credential?.delegatedTo?.serviceAccountKey?.client_id,
client_secret: credential?.delegatedTo?.serviceAccountKey?.private_key,
}
: await getO365VideoAppKeys();
- if (isDelegated && (!credentials.client_id || !credentials.client_secret)) {
- throw new CalendarAppDelegationCredentialConfigurationError(
- "Delegation credential without clientId or Secret"
+ if (isDomainWideDelegated && (!credentials.client_id || !credentials.client_secret)) {
+ throw new CalendarAppDomainWideDelegationConfigurationError(
+ "Domain Wide Delegated credential without clientId or Secret"
);
}
- const url = getAuthUrl(isDelegated, credential?.delegatedTo?.serviceAccountKey?.tenant_id);
- const scope = isDelegated
+ const url = getAuthUrl(isDomainWideDelegated, credential?.delegatedTo?.serviceAccountKey?.tenant_id);
+ const scope = isDomainWideDelegated
? "https://graph.microsoft.com/.default"
: "User.Read Calendars.Read Calendars.ReadWrite";
@@ -76,8 +76,8 @@ const TeamsVideoApiAdapter = (credential: CredentialForCalendarServiceWithTenant
scope,
client_id: credentials.client_id || "",
client_secret: credentials.client_secret || "",
- grant_type: isDelegated ? "client_credentials" : "refresh_token",
- ...(isDelegated ? {} : { refresh_token: refreshToken ?? "" }),
+ grant_type: isDomainWideDelegated ? "client_credentials" : "refresh_token",
+ ...(isDomainWideDelegated ? {} : { refresh_token: refreshToken ?? "" }),
};
return await fetch(url, {
@@ -108,8 +108,8 @@ const TeamsVideoApiAdapter = (credential: CredentialForCalendarServiceWithTenant
function getAuthUrl(delegatedTo: boolean, tenantId?: string): string {
if (delegatedTo) {
if (!tenantId) {
- throw new CalendarAppDelegationCredentialInvalidGrantError(
- "Invalid DelegationCredential Settings: tenantId is missing"
+ throw new CalendarAppDomainWideDelegationInvalidGrantError(
+ "Invalid DomainWideDelegation Settings: tenantId is missing"
);
}
return `https://login.microsoftonline.com/${tenantId}/oauth2/v2.0/token`;
@@ -129,18 +129,18 @@ const TeamsVideoApiAdapter = (credential: CredentialForCalendarServiceWithTenant
async function getAzureUserId(credential: CredentialForCalendarServiceWithTenantId) {
if (azureUserId) return azureUserId;
- const isDelegated = Boolean(credential?.delegatedTo);
+ const isDomainWideDelegated = Boolean(credential?.delegatedTo);
- if (!isDelegated) return null;
+ if (!isDomainWideDelegated) return null;
- const url = getAuthUrl(isDelegated, credential?.delegatedTo?.serviceAccountKey?.tenant_id);
+ const url = getAuthUrl(isDomainWideDelegated, credential?.delegatedTo?.serviceAccountKey?.tenant_id);
- const delegationCredentialClientId = credential.delegatedTo?.serviceAccountKey?.client_id;
- const delegationCredentialClientSecret = credential.delegatedTo?.serviceAccountKey?.private_key;
+ const dwdClientId = credential.delegatedTo?.serviceAccountKey?.client_id;
+ const dwdClientSecret = credential.delegatedTo?.serviceAccountKey?.private_key;
- if (!delegationCredentialClientId || !delegationCredentialClientSecret) {
- throw new CalendarAppDelegationCredentialConfigurationError(
- "Delegation credential without clientId or Secret"
+ if (!dwdClientId || !dwdClientSecret) {
+ throw new CalendarAppDomainWideDelegationConfigurationError(
+ "Domain Wide Delegated credential without clientId or Secret"
);
}
const loginResponse = await fetch(url, {
@@ -148,9 +148,9 @@ const TeamsVideoApiAdapter = (credential: CredentialForCalendarServiceWithTenant
headers: { "Content-Type": "application/x-www-form-urlencoded" },
body: new URLSearchParams({
scope: "https://graph.microsoft.com/.default",
- client_id: delegationCredentialClientId,
+ client_id: dwdClientId,
grant_type: "client_credentials",
- client_secret: delegationCredentialClientSecret,
+ client_secret: dwdClientSecret,
}),
});
@@ -173,7 +173,7 @@ const TeamsVideoApiAdapter = (credential: CredentialForCalendarServiceWithTenant
const parsedBody = await response.json();
if (!parsedBody?.value?.[0]?.id) {
- throw new CalendarAppDelegationCredentialInvalidGrantError(
+ throw new CalendarAppDomainWideDelegationInvalidGrantError(
"User might not exist in Microsoft Azure Active Directory"
);
}
diff --git a/packages/app-store/server.ts b/packages/app-store/server.ts
index e948427c8ec..4de69de68d8 100644
--- a/packages/app-store/server.ts
+++ b/packages/app-store/server.ts
@@ -4,9 +4,9 @@ import type { TFunction } from "next-i18next";
import { defaultVideoAppCategories } from "@calcom/app-store/utils";
import getEnabledAppsFromCredentials from "@calcom/lib/apps/getEnabledAppsFromCredentials";
import {
- buildNonDelegationCredentials,
- enrichUserWithDelegationConferencingCredentialsWithoutOrgId,
-} from "@calcom/lib/delegationCredential/server";
+ buildNonDwdCredentials,
+ enrichUserWithDwdConferencingCredentialsWithoutOrgId,
+} from "@calcom/lib/domainWideDelegation/server";
import { prisma } from "@calcom/prisma";
import { AppCategories } from "@calcom/prisma/enums";
import { credentialForCalendarServiceSelect } from "@calcom/prisma/selects/credential";
@@ -63,7 +63,7 @@ export async function getLocationGroupedOptions(
});
}
- const nonDelegationCredentials = await prisma.credential.findMany({
+ const nonDwdCredentials = await prisma.credential.findMany({
where: {
...idToSearchObject,
app: {
@@ -84,19 +84,17 @@ export async function getLocationGroupedOptions(
let credentials;
if (user) {
- // We only add delegationCredentials if the request for location options is for a user because DelegationCredential Credential is applicable to Users only.
- const { credentials: allCredentials } = await enrichUserWithDelegationConferencingCredentialsWithoutOrgId(
- {
- user: {
- ...user,
- credentials: nonDelegationCredentials,
- },
- }
- );
+ // We only add dwd credentials if the request for location options is for a user because DWD Credential is applicable to Users only.
+ const { credentials: allCredentials } = await enrichUserWithDwdConferencingCredentialsWithoutOrgId({
+ user: {
+ ...user,
+ credentials: nonDwdCredentials,
+ },
+ });
credentials = allCredentials;
} else {
- // TODO: We can avoid calling buildNonDelegationCredentials here by moving the above prisma query to the repository and doing it there
- credentials = buildNonDelegationCredentials(nonDelegationCredentials);
+ // TODO: We can avoid calling buildNonDwdCredentials here by moving the above prisma query to the repository and doing it there
+ credentials = buildNonDwdCredentials(nonDwdCredentials);
}
const integrations = await getEnabledAppsFromCredentials(credentials, { filterOnCredentials: true });
diff --git a/packages/features/apps/components/AppList.tsx b/packages/features/apps/components/AppList.tsx
index 416dc5f0066..454916eec74 100644
--- a/packages/features/apps/components/AppList.tsx
+++ b/packages/features/apps/components/AppList.tsx
@@ -12,7 +12,7 @@ import type {
EventTypes,
} from "@calcom/features/eventtypes/components/BulkEditDefaultForEventsModal";
import { BulkEditDefaultForEventsModal } from "@calcom/features/eventtypes/components/BulkEditDefaultForEventsModal";
-import { isDelegationCredential } from "@calcom/lib/delegationCredential/clientAndServer";
+import { isDwdCredential } from "@calcom/lib/domainWideDelegation/clientAndServer";
import { useLocale } from "@calcom/lib/hooks/useLocale";
import type { AppCategories } from "@calcom/prisma/enums";
import { type RouterOutputs } from "@calcom/trpc";
@@ -230,7 +230,7 @@ function ConnectOrDisconnectIntegrationMenuItem(props: {
<DropdownItem
color="destructive"
onClick={() => handleDisconnect(credentialId, app, teamId)}
- disabled={isGlobal || isDelegationCredential({ credentialId })}
+ disabled={isGlobal || isDwdCredential({ credentialId })}
StartIcon="trash">
{t("remove_app")}
</DropdownItem>
diff --git a/packages/features/apps/components/DisconnectIntegration.tsx b/packages/features/apps/components/DisconnectIntegration.tsx
index d9f08f4aab5..c746e27a2da 100644
--- a/packages/features/apps/components/DisconnectIntegration.tsx
+++ b/packages/features/apps/components/DisconnectIntegration.tsx
@@ -2,7 +2,7 @@
import { useState } from "react";
-import { isDelegationCredential } from "@calcom/lib/delegationCredential/clientAndServer";
+import { isDwdCredential } from "@calcom/lib/domainWideDelegation/clientAndServer";
import { useLocale } from "@calcom/lib/hooks/useLocale";
import { trpc } from "@calcom/trpc/react";
import type { ButtonProps } from "@calcom/ui";
@@ -38,8 +38,8 @@ export default function DisconnectIntegration(props: {
},
});
- // Such a credential is added in-memory and removed when Delegation credential is disabled.
- const disableDisconnect = isDelegationCredential({ credentialId });
+ // Such a credential is added in-memory and removed when Domain-wide delegation is disabled.
+ const disableDisconnect = isDwdCredential({ credentialId });
return (
<DisconnectIntegrationComponent
onDeletionConfirmation={() => mutation.mutate({ id: credentialId, ...(teamId ? { teamId } : {}) })}
diff --git a/packages/features/bookings/lib/getAllCredentialsForUsersOnEvent/getAllCredentials.ts b/packages/features/bookings/lib/getAllCredentialsForUsersOnEvent/getAllCredentials.ts
index c17aec848c9..8e9414559bc 100644
--- a/packages/features/bookings/lib/getAllCredentialsForUsersOnEvent/getAllCredentials.ts
+++ b/packages/features/bookings/lib/getAllCredentialsForUsersOnEvent/getAllCredentials.ts
@@ -1,6 +1,6 @@
import type z from "zod";
-import { enrichUserWithDelegationCredentialsWithoutOrgId } from "@calcom/lib/delegationCredential/server";
+import { enrichUserWithDwdCredentialsWithoutOrgId } from "@calcom/lib/domainWideDelegation/server";
import { UserRepository } from "@calcom/lib/server/repository/user";
import prisma from "@calcom/prisma";
import { credentialForCalendarServiceSelect } from "@calcom/prisma/selects/credential";
@@ -120,9 +120,9 @@ export const getAllCredentials = async (
}
});
- const userWithDelegationCredentials = await enrichUserWithDelegationCredentialsWithoutOrgId({
+ const userWithDwdCredentials = await enrichUserWithDwdCredentialsWithoutOrgId({
user: { ...user, credentials: allCredentials },
});
- return userWithDelegationCredentials.credentials;
+ return userWithDwdCredentials.credentials;
};
diff --git a/packages/features/bookings/lib/getAllCredentialsForUsersOnEvent/refreshCredentials.ts b/packages/features/bookings/lib/getAllCredentialsForUsersOnEvent/refreshCredentials.ts
index bed3712704c..e778ee81d28 100644
--- a/packages/features/bookings/lib/getAllCredentialsForUsersOnEvent/refreshCredentials.ts
+++ b/packages/features/bookings/lib/getAllCredentialsForUsersOnEvent/refreshCredentials.ts
@@ -1,7 +1,7 @@
import async from "async";
-import { isDelegationCredential } from "@calcom/lib/delegationCredential/clientAndServer";
-import { buildAllCredentials } from "@calcom/lib/delegationCredential/server";
+import { isDwdCredential } from "@calcom/lib/domainWideDelegation/clientAndServer";
+import { buildAllCredentials } from "@calcom/lib/domainWideDelegation/server";
import type { CredentialForCalendarService } from "@calcom/types/Credential";
import { refreshCredential } from "./refreshCredential";
@@ -14,12 +14,8 @@ import { refreshCredential } from "./refreshCredential";
export async function refreshCredentials(
credentials: Array<CredentialForCalendarService>
): Promise<Array<CredentialForCalendarService>> {
- const nonDelegationCredentials = credentials.filter(
- (cred) => !isDelegationCredential({ credentialId: cred.id })
- );
- const delegationCredentials = credentials.filter((cred) =>
- isDelegationCredential({ credentialId: cred.id })
- );
- const refreshedDbCredentials = await async.mapLimit(nonDelegationCredentials, 5, refreshCredential);
- return buildAllCredentials({ delegationCredentials, existingCredentials: refreshedDbCredentials });
+ const nonDwdCredentials = credentials.filter((cred) => !isDwdCredential({ credentialId: cred.id }));
+ const dwdCredentials = credentials.filter((cred) => isDwdCredential({ credentialId: cred.id }));
+ const refreshedDbCredentials = await async.mapLimit(nonDwdCredentials, 5, refreshCredential);
+ return buildAllCredentials({ dwdCredentials, existingCredentials: refreshedDbCredentials });
}
diff --git a/packages/features/bookings/lib/handleCancelBooking.ts b/packages/features/bookings/lib/handleCancelBooking.ts
index 2703c35ec05..72fecf72f4f 100644
--- a/packages/features/bookings/lib/handleCancelBooking.ts
+++ b/packages/features/bookings/lib/handleCancelBooking.ts
@@ -70,7 +70,7 @@ async function getBookingToDelete(id: number | undefined, uid: string | undefine
externalCalendarId: true,
credentialId: true,
thirdPartyRecurringEventId: true,
- delegationCredentialId: true,
+ domainWideDelegationCredentialId: true,
},
},
payment: true,
diff --git a/packages/features/bookings/lib/handleNewBooking.ts b/packages/features/bookings/lib/handleNewBooking.ts
index efef4570696..5ebf5b5719b 100644
--- a/packages/features/bookings/lib/handleNewBooking.ts
+++ b/packages/features/bookings/lib/handleNewBooking.ts
@@ -48,9 +48,9 @@ import EventManager from "@calcom/lib/EventManager";
import { shouldIgnoreContactOwner } from "@calcom/lib/bookings/routing/utils";
import { getDefaultEvent, getUsernameList } from "@calcom/lib/defaultEvents";
import {
- enrichHostsWithDelegationCredentials,
- getFirstDelegationConferencingCredentialAppLocation,
-} from "@calcom/lib/delegationCredential/server";
+ enrichHostsWithDwdCredentials,
+ getFirstDwdConferencingCredentialAppLocation,
+} from "@calcom/lib/domainWideDelegation/server";
import { ErrorCode } from "@calcom/lib/errorCodes";
import { getErrorFromUnknown } from "@calcom/lib/errors";
import { getEventName } from "@calcom/lib/event";
@@ -690,7 +690,7 @@ async function handler(
// find a lucky user that is not already in the luckyUsers array
availableUsers: freeUsers,
allRRHosts: (
- await enrichHostsWithDelegationCredentials({
+ await enrichHostsWithDwdCredentials({
orgId: firstUserOrgId ?? null,
hosts: eventTypeWithUsers.hosts,
})
@@ -809,7 +809,7 @@ async function handler(
}
}
- const organizationDefaultLocation = getFirstDelegationConferencingCredentialAppLocation({
+ const organizationDefaultLocation = getFirstDwdConferencingCredentialAppLocation({
credentials: firstUser.credentials,
});
diff --git a/packages/features/bookings/lib/handleNewBooking/getLocationValuesForDb.ts b/packages/features/bookings/lib/handleNewBooking/getLocationValuesForDb.ts
index 5acd7f9cfbb..435f9d2b938 100644
--- a/packages/features/bookings/lib/handleNewBooking/getLocationValuesForDb.ts
+++ b/packages/features/bookings/lib/handleNewBooking/getLocationValuesForDb.ts
@@ -1,4 +1,4 @@
-import { getFirstDelegationConferencingCredentialAppLocation } from "@calcom/lib/delegationCredential/server";
+import { getFirstDwdConferencingCredentialAppLocation } from "@calcom/lib/domainWideDelegation/server";
import type { Prisma } from "@calcom/prisma/client";
import { userMetadata as userMetadataSchema } from "@calcom/prisma/zod-utils";
import type { CredentialForCalendarService } from "@calcom/types/Credential";
@@ -36,14 +36,13 @@ export const getLocationValuesForDb = <
users = sortUsersByDynamicList(users, dynamicUserList);
const firstDynamicGroupMember = users[0];
const firstDynamicGroupMemberMetadata = userMetadataSchema.parse(firstDynamicGroupMember.metadata);
- const firstDynamicGroupMemberDelegationCredentialConferencingAppLocation =
- getFirstDelegationConferencingCredentialAppLocation({
- credentials: firstDynamicGroupMember.credentials,
- });
+ const firstDynamicGroupMemberDwdConferencingAppLocation = getFirstDwdConferencingCredentialAppLocation({
+ credentials: firstDynamicGroupMember.credentials,
+ });
firstDynamicGroupMemberDefaultLocationUrl =
firstDynamicGroupMemberMetadata?.defaultConferencingApp?.appLink ||
- firstDynamicGroupMemberDelegationCredentialConferencingAppLocation;
+ firstDynamicGroupMemberDwdConferencingAppLocation;
locationBodyString = firstDynamicGroupMemberDefaultLocationUrl || locationBodyString;
}
diff --git a/packages/features/bookings/lib/handleNewBooking/loadAndValidateUsers.ts b/packages/features/bookings/lib/handleNewBooking/loadAndValidateUsers.ts
index 5a2e87d6557..7f87aacc355 100644
--- a/packages/features/bookings/lib/handleNewBooking/loadAndValidateUsers.ts
+++ b/packages/features/bookings/lib/handleNewBooking/loadAndValidateUsers.ts
@@ -2,8 +2,8 @@ import type { Prisma } from "@prisma/client";
import type { IncomingMessage } from "http";
import type { Logger } from "tslog";
-import { findQualifiedHostsWithDelegationCredentials } from "@calcom/lib/bookings/findQualifiedHostsWithDelegationCredentials";
-import { enrichUsersWithDelegationCredentials } from "@calcom/lib/delegationCredential/server";
+import { findQualifiedHostsWithDwdCredentials } from "@calcom/lib/bookings/findQualifiedHostsWithDwdCredentials";
+import { enrichUsersWithDwdCredentials } from "@calcom/lib/domainWideDelegation/server";
import getOrgIdFromMemberOrTeamId from "@calcom/lib/getOrgIdFromMemberOrTeamId";
import { HttpError } from "@calcom/lib/http-error";
import { getPiiFreeUser } from "@calcom/lib/piiFreeData";
@@ -25,10 +25,7 @@ type Users = (Awaited<ReturnType<typeof loadUsers>>[number] & {
createdAt?: Date;
})[];
-export type UsersWithDelegationCredentials = (Omit<
- Awaited<ReturnType<typeof loadUsers>>[number],
- "credentials"
-> & {
+export type UsersWithDwdCredentials = (Omit<Awaited<ReturnType<typeof loadUsers>>[number], "credentials"> & {
isFixed?: boolean;
metadata?: Prisma.JsonValue;
createdAt?: Date;
@@ -75,9 +72,9 @@ export async function loadAndValidateUsers({
rescheduleUid,
routingFormResponse,
}: InputProps): Promise<{
- qualifiedRRUsers: UsersWithDelegationCredentials;
- additionalFallbackRRUsers: UsersWithDelegationCredentials;
- fixedUsers: UsersWithDelegationCredentials;
+ qualifiedRRUsers: UsersWithDwdCredentials;
+ additionalFallbackRRUsers: UsersWithDwdCredentials;
+ fixedUsers: UsersWithDwdCredentials;
}> {
let users: Users = await loadUsers({
eventType,
@@ -128,14 +125,13 @@ export async function loadAndValidateUsers({
? false
: user.isFixed || eventType.schedulingType !== SchedulingType.ROUND_ROBIN,
}));
- const { qualifiedRRHosts, allFallbackRRHosts, fixedHosts } =
- await findQualifiedHostsWithDelegationCredentials({
- eventType,
- routedTeamMemberIds: routedTeamMemberIds || [],
- rescheduleUid,
- contactOwnerEmail,
- routingFormResponse,
- });
+ const { qualifiedRRHosts, allFallbackRRHosts, fixedHosts } = await findQualifiedHostsWithDwdCredentials({
+ eventType,
+ routedTeamMemberIds: routedTeamMemberIds || [],
+ rescheduleUid,
+ contactOwnerEmail,
+ routingFormResponse,
+ });
const allQualifiedHostsHashMap = [...qualifiedRRHosts, ...(allFallbackRRHosts ?? []), ...fixedHosts].reduce(
(acc, host) => {
if (host.user.id) {
@@ -145,14 +141,14 @@ export async function loadAndValidateUsers({
},
{} as {
[key: number]: Awaited<
- ReturnType<typeof findQualifiedHostsWithDelegationCredentials>
+ ReturnType<typeof findQualifiedHostsWithDwdCredentials>
>["qualifiedRRHosts"][number];
}
);
- let qualifiedRRUsers: UsersWithDelegationCredentials = [];
- let allFallbackRRUsers: UsersWithDelegationCredentials = [];
- let fixedUsers: UsersWithDelegationCredentials = [];
+ let qualifiedRRUsers: UsersWithDwdCredentials = [];
+ let allFallbackRRUsers: UsersWithDwdCredentials = [];
+ let fixedUsers: UsersWithDwdCredentials = [];
if (qualifiedRRHosts.length) {
// remove users that are not in the qualified hosts array
@@ -193,14 +189,14 @@ export async function loadAndValidateUsers({
memberId: firstUser.id ?? null,
teamId: eventType.teamId,
});
- const usersEnrichedWithDelegationCredential = await enrichUsersWithDelegationCredentials({
+ const usersEnrichedWithDwd = await enrichUsersWithDwdCredentials({
orgId: firstUserOrgId ?? null,
users,
});
return {
qualifiedRRUsers,
additionalFallbackRRUsers, // without qualified
- fixedUsers: usersEnrichedWithDelegationCredential,
+ fixedUsers: usersEnrichedWithDwd,
};
}
diff --git a/packages/features/bookings/lib/handleNewBooking/test/delegation-credential.test.ts b/packages/features/bookings/lib/handleNewBooking/test/domain-wide-delegation.test.ts
similarity index 92%
rename from packages/features/bookings/lib/handleNewBooking/test/delegation-credential.test.ts
rename to packages/features/bookings/lib/handleNewBooking/test/domain-wide-delegation.test.ts
index 0fb1dfe11e7..c928d7cf52e 100644
--- a/packages/features/bookings/lib/handleNewBooking/test/delegation-credential.test.ts
+++ b/packages/features/bookings/lib/handleNewBooking/test/domain-wide-delegation.test.ts
@@ -17,9 +17,9 @@ import {
mockSuccessfulVideoMeetingCreation,
mockCalendarToHaveNoBusySlots,
BookingLocations,
- createDelegationCredential,
+ createDwdCredential,
createOrganization,
- buildDelegationCredential,
+ buildDwdCredential,
} from "@calcom/web/test/utils/bookingScenario/bookingScenario";
import { createMockNextJsRequest } from "@calcom/web/test/utils/bookingScenario/createMockNextJsRequest";
import {
@@ -50,11 +50,11 @@ const timeout = process.env.CI ? 5000 : 20000;
describe("handleNewBooking", () => {
setupAndTeardown();
- describe("Delegation Credential", () => {
+ describe("Domain Wide Delegation", () => {
test(
- `should create a successful booking using the delegation credential
- 1. Should create a booking in the database with reference having Delegation credential
- 2. Should create an event in calendar with Delegation credential
+ `should create a successful booking using the domain wide delegation credential
+ 1. Should create a booking in the database with reference having DWD credential
+ 2. Should create an event in calendar with DWD credential
3. Should use Google Meet as the location even when not explicitly set.
`,
async ({ emails }) => {
@@ -90,14 +90,14 @@ describe("handleNewBooking", () => {
id: 101,
schedules: [TestData.schedules.IstWorkHours],
selectedCalendars: [TestData.selectedCalendars.google],
- // User must be part of organization to be able to use that organization's Delegation credential
+ // User must be part of organization to be able to use that organization's DWD credential
teams: payloadToMakePartOfOrganization,
// No regular credentials provided
credentials: [],
destinationCalendar: TestData.selectedCalendars.google,
});
- const delegationCredential = await createDelegationCredential(org.id);
+ const dwd = await createDwdCredential(org.id);
const payloadToCreateUserEventTypeForOrganizer = {
id: 1,
slotInterval: 30,
@@ -193,8 +193,8 @@ describe("handleNewBooking", () => {
meetingId: "GOOGLE_CALENDAR_EVENT_ID",
meetingPassword: "MOCK_PASSWORD",
meetingUrl: "https://GOOGLE_MEET_URL_IN_CALENDAR_EVENT",
- // Verify Delegation credential was used
- delegationCredentialId: delegationCredential.id,
+ // Verify DWD credential was used
+ domainWideDelegationCredentialId: dwd.id,
},
],
iCalUID: createdBooking.iCalUID,
@@ -202,9 +202,7 @@ describe("handleNewBooking", () => {
expectWorkflowToBeTriggered({ emailsToReceive: [organizer.email], emails });
expectSuccessfulCalendarEventCreationInCalendar(calendarMock, {
- credential: buildDelegationCredential({
- serviceAccountKey: delegationCredential.serviceAccountKey,
- }),
+ credential: buildDwdCredential({ serviceAccountKey: dwd.serviceAccountKey }),
calendarId: TestData.selectedCalendars.google.externalId,
// There would be no videoCallUrl in this case as it is not a dedicated conferencing case and hangoutLink is used instead
videoCallUrl: null,
@@ -234,9 +232,9 @@ describe("handleNewBooking", () => {
);
test(
- `should create a successful booking using the office365 delegation credential with Cal Video as the location
- 1. Should create a booking in the database with reference having Delegation credential
- 2. Should create an event in Outlook calendar with Delegation credential
+ `should create a successful booking using the office365 domain wide delegation credential with Cal Video as the location
+ 1. Should create a booking in the database with reference having DWD credential
+ 2. Should create an event in Outlook calendar with DWD credential
`,
async ({ emails }) => {
const handleNewBooking = (await import("@calcom/features/bookings/lib/handleNewBooking")).default;
@@ -271,14 +269,14 @@ describe("handleNewBooking", () => {
id: 101,
schedules: [TestData.schedules.IstWorkHours],
selectedCalendars: [TestData.selectedCalendars.office365],
- // User must be part of organization to be able to use that organization's Delegation credential
+ // User must be part of organization to be able to use that organization's DWD credential
teams: payloadToMakePartOfOrganization,
// No regular credentials provided
credentials: [],
destinationCalendar: TestData.selectedCalendars.office365,
});
- const delegationCredential = await createDelegationCredential(org.id, "office365");
+ const dwd = await createDwdCredential(org.id, "office365");
const payloadToCreateUserEventTypeForOrganizer = {
id: 1,
slotInterval: 30,
@@ -392,8 +390,8 @@ describe("handleNewBooking", () => {
meetingId: "OFFICE_365_CALENDAR_EVENT_ID",
meetingPassword: "MOCK_PASSWORD",
meetingUrl: "https://UNUSED_URL",
- // Verify Delegation credential was used
- delegationCredentialId: delegationCredential.id,
+ // Verify DWD credential was used
+ domainWideDelegationCredentialId: dwd.id,
},
],
iCalUID: createdBooking.iCalUID,
@@ -401,9 +399,7 @@ describe("handleNewBooking", () => {
expectWorkflowToBeTriggered({ emailsToReceive: [organizer.email], emails });
expectSuccessfulCalendarEventCreationInCalendar(calendarMock, {
- credential: buildDelegationCredential({
- serviceAccountKey: delegationCredential.serviceAccountKey,
- }),
+ credential: buildDwdCredential({ serviceAccountKey: dwd.serviceAccountKey }),
calendarId: TestData.selectedCalendars.office365.externalId,
// There would be no videoCallUrl in this case as it is not a dedicated conferencing case and hangoutLink is used instead
videoCallUrl: null,
@@ -434,7 +430,7 @@ describe("handleNewBooking", () => {
);
test(
- `should fail calendar event creation when organizer isn't part of the organization of DelegationCredential Credential`,
+ `should fail calendar event creation when organizer isn't part of the organization of DWD Credential`,
async () => {
const handleNewBooking = (await import("@calcom/features/bookings/lib/handleNewBooking")).default;
@@ -474,13 +470,13 @@ describe("handleNewBooking", () => {
id: 101,
schedules: [TestData.schedules.IstWorkHours],
selectedCalendars: [TestData.selectedCalendars.google],
- // User must be part of organization to be able to use that organization's Delegation credential
+ // User must be part of organization to be able to use that organization's DWD credential
teams: payloadToMakePartOfOrganization,
// No regular credentials provided
credentials: [],
});
- await createDelegationCredential(anotherOrg.id);
+ await createDwdCredential(anotherOrg.id);
const payloadToCreateUserEventTypeForOrganizer = {
id: 1,
slotInterval: 30,
@@ -602,9 +598,9 @@ describe("handleNewBooking", () => {
);
test(
- `should create a successful dynamic group booking using the delegation credential
- 1. Should create a booking in the database with reference having Delegation credential
- 2. Should create an event in calendar with Delegation credential for both users
+ `should create a successful dynamic group booking using the domain wide delegation credential
+ 1. Should create a booking in the database with reference having DWD credential
+ 2. Should create an event in calendar with DWD credential for both users
3. Should use Google Meet as the location even when not explicitly set.
`,
async () => {
@@ -658,7 +654,7 @@ describe("handleNewBooking", () => {
destinationCalendar: TestData.selectedCalendars.google,
});
- const delegationCredential = await createDelegationCredential(org.id);
+ const dwd = await createDwdCredential(org.id);
await createBookingScenario(
getScenarioData({
@@ -751,8 +747,8 @@ describe("handleNewBooking", () => {
meetingId: "GOOGLE_CALENDAR_EVENT_ID",
meetingPassword: "MOCK_PASSWORD",
meetingUrl: "https://GOOGLE_MEET_URL_IN_CALENDAR_EVENT",
- // Verify Delegation credential was used
- delegationCredentialId: delegationCredential.id,
+ // Verify DWD credential was used
+ domainWideDelegationCredentialId: dwd.id,
},
],
iCalUID: createdBooking.iCalUID,
diff --git a/packages/features/bookings/lib/handleSeats/cancel/cancelAttendeeSeat.ts b/packages/features/bookings/lib/handleSeats/cancel/cancelAttendeeSeat.ts
index d446e6a0ba5..9a8e87691d1 100644
--- a/packages/features/bookings/lib/handleSeats/cancel/cancelAttendeeSeat.ts
+++ b/packages/features/bookings/lib/handleSeats/cancel/cancelAttendeeSeat.ts
@@ -4,8 +4,8 @@ import { getCalendar } from "@calcom/app-store/_utils/getCalendar";
import { sendCancelledSeatEmailsAndSMS } from "@calcom/emails";
import sendPayload from "@calcom/features/webhooks/lib/sendOrSchedulePayload";
import type { EventPayloadType, EventTypeInfo } from "@calcom/features/webhooks/lib/sendPayload";
-import { getAllDelegationCredentialsForUser } from "@calcom/lib/delegationCredential/server";
-import { getDelegationCredentialOrFindRegularCredential } from "@calcom/lib/delegationCredential/server";
+import { getAllDwdCredentialsForUser } from "@calcom/lib/domainWideDelegation/server";
+import { getDwdOrFindRegularCredential } from "@calcom/lib/domainWideDelegation/server";
import { HttpError } from "@calcom/lib/http-error";
import logger from "@calcom/lib/logger";
import { safeStringify } from "@calcom/lib/safeStringify";
@@ -69,8 +69,8 @@ async function cancelAttendeeSeat(
const attendee = bookingToDelete?.attendees.find((attendee) => attendee.id === seatReference.attendeeId);
const bookingToDeleteUser = bookingToDelete.user ?? null;
- const delegationCredentials = bookingToDeleteUser
- ? await getAllDelegationCredentialsForUser({
+ const dwdCredentials = bookingToDeleteUser
+ ? await getAllDwdCredentialsForUser({
user: { email: bookingToDeleteUser.email, id: bookingToDeleteUser.id },
})
: [];
@@ -81,13 +81,13 @@ async function cancelAttendeeSeat(
const integrationsToUpdate = [];
for (const reference of bookingToDelete.references) {
- if (reference.credentialId || reference.delegationCredentialId) {
- const credential = await getDelegationCredentialOrFindRegularCredential({
+ if (reference.credentialId || reference.domainWideDelegationCredentialId) {
+ const credential = await getDwdOrFindRegularCredential({
id: {
credentialId: reference.credentialId,
- delegationCredentialId: reference.delegationCredentialId,
+ domainWideDelegationCredentialId: reference.domainWideDelegationCredentialId,
},
- delegationCredentials,
+ dwdCredentials,
});
if (credential) {
diff --git a/packages/features/bookings/lib/handleSeats/lib/lastAttendeeDeleteBooking.ts b/packages/features/bookings/lib/handleSeats/lib/lastAttendeeDeleteBooking.ts
index fd95f2e97f4..a969e2494d5 100644
--- a/packages/features/bookings/lib/handleSeats/lib/lastAttendeeDeleteBooking.ts
+++ b/packages/features/bookings/lib/handleSeats/lib/lastAttendeeDeleteBooking.ts
@@ -2,8 +2,8 @@ import type { Attendee } from "@prisma/client";
// eslint-disable-next-line no-restricted-imports
import { getCalendar } from "@calcom/app-store/_utils/getCalendar";
-import { getAllDelegationCredentialsForUser } from "@calcom/lib/delegationCredential/server";
-import { getDelegationCredentialOrFindRegularCredential } from "@calcom/lib/delegationCredential/server";
+import { getAllDwdCredentialsForUser } from "@calcom/lib/domainWideDelegation/server";
+import { getDwdOrFindRegularCredential } from "@calcom/lib/domainWideDelegation/server";
import { deleteMeeting } from "@calcom/lib/videoClient";
import prisma from "@calcom/prisma";
import { BookingStatus } from "@calcom/prisma/enums";
@@ -20,8 +20,8 @@ const lastAttendeeDeleteBooking = async (
) => {
let deletedReferences = false;
const bookingUser = originalRescheduledBooking?.user;
- const delegationCredentials = bookingUser
- ? await getAllDelegationCredentialsForUser({
+ const dwdCredentials = bookingUser
+ ? await getAllDwdCredentialsForUser({
user: { email: bookingUser.email, id: bookingUser.id },
})
: [];
@@ -29,13 +29,13 @@ const lastAttendeeDeleteBooking = async (
const integrationsToDelete = [];
for (const reference of originalRescheduledBooking.references) {
- if (reference.credentialId || reference.delegationCredentialId) {
- const credential = await getDelegationCredentialOrFindRegularCredential({
+ if (reference.credentialId || reference.domainWideDelegationCredentialId) {
+ const credential = await getDwdOrFindRegularCredential({
id: {
credentialId: reference.credentialId,
- delegationCredentialId: reference.delegationCredentialId,
+ domainWideDelegationCredentialId: reference.domainWideDelegationCredentialId,
},
- delegationCredentials,
+ dwdCredentials,
});
if (credential) {
diff --git a/packages/features/calendars/CalendarSwitch.tsx b/packages/features/calendars/CalendarSwitch.tsx
index adc1b7b64bb..ef8eefc9160 100644
--- a/packages/features/calendars/CalendarSwitch.tsx
+++ b/packages/features/calendars/CalendarSwitch.tsx
@@ -17,7 +17,7 @@ export type ICalendarSwitchProps = {
isLastItemInList?: boolean;
destination?: boolean;
credentialId: number;
- delegationCredentialId: string | null;
+ domainWideDelegationCredentialId: string | null;
eventTypeId: number | null;
disabled?: boolean;
};
@@ -36,7 +36,7 @@ const CalendarSwitch = (props: ICalendarSwitchProps) => {
isChecked,
name,
credentialId,
- delegationCredentialId,
+ domainWideDelegationCredentialId,
eventTypeId,
disabled,
} = props;
@@ -48,7 +48,7 @@ const CalendarSwitch = (props: ICalendarSwitchProps) => {
const body = {
integration: type,
externalId: externalId,
- ...(delegationCredentialId && { delegationCredentialId }),
+ ...(domainWideDelegationCredentialId && { domainWideDelegationCredentialId }),
// new URLSearchParams does not accept numbers
credentialId: String(credentialId),
...(eventTypeId ? { eventTypeId: String(eventTypeId) } : {}),
diff --git a/packages/features/credentials/handleDeleteCredential.ts b/packages/features/credentials/handleDeleteCredential.ts
index 40a24ccf4c4..852cd323f7a 100644
--- a/packages/features/credentials/handleDeleteCredential.ts
+++ b/packages/features/credentials/handleDeleteCredential.ts
@@ -7,7 +7,7 @@ import { sendCancelledEmailsAndSMS } from "@calcom/emails";
import { getCalEventResponses } from "@calcom/features/bookings/lib/getCalEventResponses";
import { deleteWebhookScheduledTriggers } from "@calcom/features/webhooks/lib/scheduleTrigger";
import { isPrismaObjOrUndefined, parseRecurringEvent } from "@calcom/lib";
-import { buildNonDelegationCredential } from "@calcom/lib/delegationCredential/server";
+import { buildNonDwdCredential } from "@calcom/lib/domainWideDelegation/server";
import { DailyLocationType } from "@calcom/lib/location";
import { deletePayment } from "@calcom/lib/payment/deletePayment";
import { getTranslation } from "@calcom/lib/server/i18n";
@@ -430,7 +430,7 @@ const handleDeleteCredential = async ({
// If it's a calendar remove it from the SelectedCalendars
if (credential.app?.categories.includes(AppCategories.calendar)) {
try {
- const calendar = await getCalendar(buildNonDelegationCredential(credential));
+ const calendar = await getCalendar(buildNonDwdCredential(credential));
const calendars = await calendar?.listCalendars();
diff --git a/packages/features/ee/organizations/pages/settings/delegationCredential.tsx b/packages/features/ee/organizations/pages/settings/domainWideDelegation.tsx
similarity index 90%
rename from packages/features/ee/organizations/pages/settings/delegationCredential.tsx
rename to packages/features/ee/organizations/pages/settings/domainWideDelegation.tsx
index 62ac3b3fdb5..a13de2a809a 100644
--- a/packages/features/ee/organizations/pages/settings/delegationCredential.tsx
+++ b/packages/features/ee/organizations/pages/settings/domainWideDelegation.tsx
@@ -186,7 +186,7 @@ function CreateDelegationDialog({
return (
<Dialog open={isOpen} onOpenChange={onClose}>
- <DialogContent enableOverflow title={t("add_delegation_credential")}>
+ <DialogContent enableOverflow title={t("add_domain_wide_delegation")}>
<Form form={form} handleSubmit={handleSubmit}>
<DelegationFormFields workspacePlatforms={workspacePlatforms} isCreate={true} />
<DialogFooter>
@@ -226,7 +226,7 @@ function EditDelegationDialog({
return (
<Dialog open={isOpen} onOpenChange={onClose}>
- <DialogContent title={t("edit_delegation_credential")}>
+ <DialogContent title={t("edit_domain_wide_delegation")}>
<Form form={form} handleSubmit={handleEdit}>
<DelegationFormFields workspacePlatforms={workspacePlatforms} isCreate={false} />
<DialogFooter>
@@ -282,26 +282,26 @@ function DelegationFormFields({
);
}
-function DelegationCredentialList() {
+function DomainWideDelegationList() {
const { t } = useLocale();
const utils = trpc.useContext();
- const { data: delegations, isLoading, error } = trpc.viewer.delegationCredential.list.useQuery();
+ const { data: delegations, isLoading, error } = trpc.viewer.domainWideDelegation.list.useQuery();
- const updateMutation = trpc.viewer.delegationCredential.update.useMutation({
- onSuccess: () => utils.viewer.delegationCredential.list.invalidate(),
+ const updateMutation = trpc.viewer.domainWideDelegation.update.useMutation({
+ onSuccess: () => utils.viewer.domainWideDelegation.list.invalidate(),
onError: (error) => {
showToast(error.message, "error");
},
});
- const toggleEnabledMutation = trpc.viewer.delegationCredential.toggleEnabled.useMutation({
+ const toggleEnabledMutation = trpc.viewer.domainWideDelegation.toggleEnabled.useMutation({
onSuccess: (data) => {
if (data) {
showToast(
- data.enabled ? t("delegation_credential_enabled") : t("delegation_credential_disabled"),
+ data.enabled ? t("domain_wide_delegation_enabled") : t("domain_wide_delegation_disabled"),
"success"
);
- utils.viewer.delegationCredential.list.invalidate();
+ utils.viewer.domainWideDelegation.list.invalidate();
}
},
onError: (error) => {
@@ -309,15 +309,15 @@ function DelegationCredentialList() {
},
});
- const createMutation = trpc.viewer.delegationCredential.add.useMutation({
- onSuccess: () => utils.viewer.delegationCredential.list.invalidate(),
+ const createMutation = trpc.viewer.domainWideDelegation.add.useMutation({
+ onSuccess: () => utils.viewer.domainWideDelegation.list.invalidate(),
onError: (error) => {
showToast(error.message, "error");
},
});
- const deleteMutation = trpc.viewer.delegationCredential.delete.useMutation({
- onSuccess: () => utils.viewer.delegationCredential.list.invalidate(),
+ const deleteMutation = trpc.viewer.domainWideDelegation.delete.useMutation({
+ onSuccess: () => utils.viewer.domainWideDelegation.list.invalidate(),
onError: (error) => {
showToast(error.message, "error");
},
@@ -345,7 +345,7 @@ function DelegationCredentialList() {
});
const { data: workspacePlatforms, isLoading: isLoadingWorkspacePlatforms } =
- trpc.viewer.delegationCredential.listWorkspacePlatforms.useQuery();
+ trpc.viewer.domainWideDelegation.listWorkspacePlatforms.useQuery();
const enabledWorkspacePlatforms = workspacePlatforms?.filter((platform) => platform.enabled) || [];
@@ -379,7 +379,7 @@ function DelegationCredentialList() {
const AddDwDButton = () => {
return (
<Button type="button" color="secondary" StartIcon="plus" className="mt-6" onClick={onCreateClick}>
- {t("add_delegation_credential")}
+ {t("add_domain_wide_delegation")}
</Button>
);
};
@@ -419,8 +419,8 @@ function DelegationCredentialList() {
) : (
<EmptyScreen
Icon="link"
- headline={t("add_delegation_credential")}
- description={t("delegation_credential_description")}
+ headline={t("add_domain_wide_delegation")}
+ description={t("domain_wide_delegation_description")}
className="rounded-b-lg rounded-t-none border-t-0"
buttonRaw={<AddDwDButton />}
/>
@@ -446,6 +446,6 @@ function DelegationCredentialList() {
);
}
-export default function DelegationCredentialListPage() {
- return <DelegationCredentialList />;
+export default function DomainWideDelegationListPage() {
+ return <DomainWideDelegationList />;
}
diff --git a/packages/features/ee/round-robin/roundRobinManualReassignment.ts b/packages/features/ee/round-robin/roundRobinManualReassignment.ts
index 4f3383e851c..c9b1a1904a1 100644
--- a/packages/features/ee/round-robin/roundRobinManualReassignment.ts
+++ b/packages/features/ee/round-robin/roundRobinManualReassignment.ts
@@ -20,7 +20,7 @@ import { scheduleWorkflowReminders } from "@calcom/features/ee/workflows/lib/rem
import { isPrismaObjOrUndefined } from "@calcom/lib";
import { getVideoCallUrlFromCalEvent } from "@calcom/lib/CalEventParser";
import { SENDER_NAME } from "@calcom/lib/constants";
-import { enrichUserWithDelegationCredentialsWithoutOrgId } from "@calcom/lib/delegationCredential/server";
+import { enrichUserWithDwdCredentialsWithoutOrgId } from "@calcom/lib/domainWideDelegation/server";
import { getEventName } from "@calcom/lib/event";
import { getBookerBaseUrl } from "@calcom/lib/getBookerUrl/server";
import logger from "@calcom/lib/logger";
@@ -275,7 +275,7 @@ export const roundRobinManualReassignment = async ({
include: { user: { select: { email: true } } },
});
- const newUserWithCredentials = await enrichUserWithDelegationCredentialsWithoutOrgId({
+ const newUserWithCredentials = await enrichUserWithDwdCredentialsWithoutOrgId({
user: { ...newUser, credentials },
});
diff --git a/packages/features/ee/round-robin/roundRobinReassignment.ts b/packages/features/ee/round-robin/roundRobinReassignment.ts
index 304e2cf89c3..2390a45239f 100644
--- a/packages/features/ee/round-robin/roundRobinReassignment.ts
+++ b/packages/features/ee/round-robin/roundRobinReassignment.ts
@@ -22,9 +22,9 @@ import { isPrismaObjOrUndefined } from "@calcom/lib";
import { getVideoCallUrlFromCalEvent } from "@calcom/lib/CalEventParser";
import { SENDER_NAME } from "@calcom/lib/constants";
import {
- enrichHostsWithDelegationCredentials,
- enrichUserWithDelegationCredentialsWithoutOrgId,
-} from "@calcom/lib/delegationCredential/server";
+ enrichHostsWithDwdCredentials,
+ enrichUserWithDwdCredentialsWithoutOrgId,
+} from "@calcom/lib/domainWideDelegation/server";
import { getEventName } from "@calcom/lib/event";
import { getBookerBaseUrl } from "@calcom/lib/getBookerUrl/server";
import logger from "@calcom/lib/logger";
@@ -119,7 +119,7 @@ export const roundRobinReassignment = async ({
const previousRRHostT = await getTranslation(previousRRHost?.locale || "en", "common");
- const eventTypeHosts = await enrichHostsWithDelegationCredentials({
+ const eventTypeHosts = await enrichHostsWithDwdCredentials({
orgId,
hosts: eventType.hosts,
});
@@ -320,7 +320,7 @@ export const roundRobinReassignment = async ({
},
});
- const organizerWithCredentials = await enrichUserWithDelegationCredentialsWithoutOrgId({
+ const organizerWithCredentials = await enrichUserWithDwdCredentialsWithoutOrgId({
user: { ...organizer, credentials },
});
diff --git a/packages/features/flags/config.ts b/packages/features/flags/config.ts
index 5b83cfd34cc..bf4145e9279 100644
--- a/packages/features/flags/config.ts
+++ b/packages/features/flags/config.ts
@@ -16,6 +16,6 @@ export type AppFlags = {
"disable-signup": boolean;
attributes: boolean;
"organizer-request-email-v2": boolean;
- "delegation-credential": boolean;
+ "domain-wide-delegation": boolean;
"salesforce-crm-tasker": boolean;
};
diff --git a/packages/features/flags/hooks/index.ts b/packages/features/flags/hooks/index.ts
index 556363af24e..ca2672d829d 100644
--- a/packages/features/flags/hooks/index.ts
+++ b/packages/features/flags/hooks/index.ts
@@ -15,7 +15,7 @@ const initialData: AppFlags = {
"disable-signup": false,
attributes: false,
"organizer-request-email-v2": false,
- "delegation-credential": false,
+ "domain-wide-delegation": false,
"salesforce-crm-tasker": false,
};
diff --git a/packages/lib/CalendarAppError.ts b/packages/lib/CalendarAppError.ts
index 5f815e4804d..9dc0f3e8854 100644
--- a/packages/lib/CalendarAppError.ts
+++ b/packages/lib/CalendarAppError.ts
@@ -5,37 +5,37 @@ export class CalendarAppError extends Error {
}
}
-export class CalendarAppDelegationCredentialError extends CalendarAppError {
+export class CalendarAppDomainWideDelegationError extends CalendarAppError {
constructor(message: string) {
super(message);
- this.name = "CalendarAppDelegationCredentialError";
+ this.name = "CalendarAppDomainWideDelegationError";
}
}
-export class CalendarAppDelegationCredentialConfigurationError extends CalendarAppDelegationCredentialError {
+export class CalendarAppDomainWideDelegationConfigurationError extends CalendarAppDomainWideDelegationError {
constructor(message: string) {
super(message);
- this.name = "CalendarAppDelegationCredentialConfigurationError";
+ this.name = "CalendarAppDomainWideDelegationConfigurationError";
}
}
-export class CalendarAppDelegationCredentialInvalidGrantError extends CalendarAppDelegationCredentialError {
+export class CalendarAppDomainWideDelegationInvalidGrantError extends CalendarAppDomainWideDelegationError {
constructor(message: string) {
super(message);
- this.name = "CalendarAppDelegationCredentialInvalidGrantError";
+ this.name = "CalendarAppDomainWideDelegationInvalidGrantError";
}
}
-export class CalendarAppDelegationCredentialClientIdNotAuthorizedError extends CalendarAppDelegationCredentialConfigurationError {
+export class CalendarAppDomainWideDelegationClientIdNotAuthorizedError extends CalendarAppDomainWideDelegationConfigurationError {
constructor(message: string) {
super(message);
- this.name = "CalendarAppDelegationCredentialClientIdNotAuthorizedError";
+ this.name = "CalendarAppDomainWideDelegationClientIdNotAuthorizedError";
}
}
-export class CalendarAppDelegationCredentialNotSetupError extends CalendarAppDelegationCredentialConfigurationError {
+export class CalendarAppDomainWideDelegationNotSetupError extends CalendarAppDomainWideDelegationConfigurationError {
constructor(message: string) {
super(message);
- this.name = "CalendarAppDelegationCredentialNotSetupError";
+ this.name = "CalendarAppDomainWideDelegationNotSetupError";
}
}
diff --git a/packages/lib/CalendarManager.ts b/packages/lib/CalendarManager.ts
index 8074c260c3f..7fad9713b4a 100644
--- a/packages/lib/CalendarManager.ts
+++ b/packages/lib/CalendarManager.ts
@@ -5,8 +5,8 @@ import { getCalendar } from "@calcom/app-store/_utils/getCalendar";
import getApps from "@calcom/app-store/utils";
import dayjs from "@calcom/dayjs";
import { getUid } from "@calcom/lib/CalEventParser";
-import { CalendarAppDelegationCredentialError } from "@calcom/lib/CalendarAppError";
-import { buildNonDelegationCredentials } from "@calcom/lib/delegationCredential/clientAndServer";
+import { CalendarAppDomainWideDelegationError } from "@calcom/lib/CalendarAppError";
+import { buildNonDwdCredentials } from "@calcom/lib/domainWideDelegation/clientAndServer";
import logger from "@calcom/lib/logger";
import { getPiiFreeCalendarEvent, getPiiFreeCredential } from "@calcom/lib/piiFreeData";
import { safeStringify } from "@calcom/lib/safeStringify";
@@ -40,8 +40,8 @@ export const getCalendarCredentials = (credentials: Array<CredentialForCalendarS
return calendarCredentials;
};
-export const getCalendarCredentialsWithoutDelegation = (credentials: CredentialPayload[]) => {
- return getCalendarCredentials(buildNonDelegationCredentials(credentials));
+export const getCalendarCredentialsWithoutDwd = (credentials: CredentialPayload[]) => {
+ return getCalendarCredentials(buildNonDwdCredentials(credentials));
};
export const getConnectedCalendars = async (
@@ -57,12 +57,12 @@ export const getConnectedCalendars = async (
const calendar = await item.calendar;
// Don't leak credentials to the client
const credentialId = credential.id;
- const delegationCredentialId = credential.delegatedToId ?? null;
+ const domainWideDelegationCredentialId = credential.delegatedToId ?? null;
if (!calendar) {
return {
integration,
credentialId,
- delegationCredentialId,
+ domainWideDelegationCredentialId,
};
}
const cals = await calendar.listCalendars();
@@ -75,7 +75,7 @@ export const getConnectedCalendars = async (
primary: cal.primary || null,
isSelected: selectedCalendars.some((selected) => selected.externalId === cal.externalId),
credentialId,
- delegationCredentialId,
+ domainWideDelegationCredentialId,
};
}),
["primary"]
@@ -100,7 +100,7 @@ export const getConnectedCalendars = async (
return {
integration: cleanIntegrationKeys(integration),
credentialId,
- delegationCredentialId,
+ domainWideDelegationCredentialId,
primary,
calendars,
};
@@ -114,7 +114,7 @@ export const getConnectedCalendars = async (
}
}
- if (error instanceof CalendarAppDelegationCredentialError) {
+ if (error instanceof CalendarAppDomainWideDelegationError) {
errorMessage = error.message;
}
@@ -123,7 +123,7 @@ export const getConnectedCalendars = async (
return {
integration: cleanIntegrationKeys(item.integration),
credentialId: item.credential.id,
- delegationCredentialId: item.credential.delegatedToId,
+ domainWideDelegationCredentialId: item.credential.delegatedToId,
error: {
message: errorMessage,
},
@@ -153,7 +153,7 @@ const cleanIntegrationKeys = (
export const getBusyCalendarTimes = async (
/**
- * withCredentials can possibly have a duplicate credential in case DelegationCredential is enabled.
+ * withCredentials can possibly have a duplicate credential in case DWD is enabled.
* There is no way to deduplicate that at the moment because a `credential` doesn't directly know for which email it is,
*/
withCredentials: CredentialForCalendarService[],
@@ -209,16 +209,14 @@ export const createEvent = async (
calEvent.additionalNotes = "Notes have been hidden by the organizer"; // TODO: i18n this string?
}
- const externalCalendarIdWhenDelegationCredentialIsChosen = credential.delegatedToId
- ? externalId
- : undefined;
+ const externalCalendarIdWhenDwdCredentialIsChosen = credential.delegatedToId ? externalId : undefined;
// TODO: Surface success/error messages coming from apps to improve end user visibility
const creationResult = calendar
? await calendar
- // Ideally we should pass externalId always, but let's start with DelegationCredential case first as in that case, CalendarService need to handle a special case for DelegationCredential to determine the selectedCalendar.
+ // Ideally we should pass externalId always, but let's start with DWD case first as in that case, CalendarService need to handle a special case for DWD to determine the selectedCalendar.
// Such logic shouldn't exist in CalendarService as it would be same for all calendar apps.
- .createEvent(calEvent, credential.id, externalCalendarIdWhenDelegationCredentialIsChosen)
+ .createEvent(calEvent, credential.id, externalCalendarIdWhenDwdCredentialIsChosen)
.catch(async (error: { code: number; calError: string }) => {
success = false;
/**
diff --git a/packages/lib/EventManager.ts b/packages/lib/EventManager.ts
index 927f08df59e..b817f79be4b 100644
--- a/packages/lib/EventManager.ts
+++ b/packages/lib/EventManager.ts
@@ -82,13 +82,13 @@ const getCredential = ({
allCredentials,
}: {
id: {
- delegationCredentialId: string | null;
+ domainWideDelegationCredentialId: string | null;
credentialId: number | null;
};
allCredentials: CredentialForCalendarService[];
}) => {
- return id.delegationCredentialId
- ? allCredentials.find((c) => c.delegatedToId === id.delegationCredentialId)
+ return id.domainWideDelegationCredentialId
+ ? allCredentials.find((c) => c.delegatedToId === id.domainWideDelegationCredentialId)
: allCredentials.find((c) => c.id === id.credentialId);
};
@@ -108,12 +108,12 @@ export const processLocation = (event: CalendarEvent): CalendarEvent => {
};
/**
- * Ensures invalid non-delegationCredentialId isn't returned
+ * Ensures invalid non-dwd credentialId isn't returned
*/
function getCredentialPayload(result: EventResult<Exclude<Event, AdditionalInformation>>) {
return {
credentialId: result?.credentialId && result.credentialId > 0 ? result.credentialId : undefined,
- delegationCredentialId: result?.delegatedToId || undefined,
+ domainWideDelegationCredentialId: result?.delegatedToId || undefined,
};
}
@@ -155,7 +155,7 @@ export default class EventManager {
.sort(latestCredentialFirst)
// TODO: Change it to delegatedCredentialFirst in a followup PR.
// We are keeping delegated credentials at the end so that there is no impact on existing users connections as we still use their existing credentials
- // Soon after DelegationCredential is released and stable, we switch it. Could be an env variable also to toggle this.
+ // Soon after DWD is released and stable, we switch it. Could be an env variable also to toggle this.
.sort(delegatedCredentialLast);
this.videoCredentials = appCredentials
@@ -364,7 +364,7 @@ export default class EventManager {
credentialId,
this.calendarCredentials,
credentialType,
- reference.delegationCredentialId
+ reference.domainWideDelegationCredentialId
);
if (calendarCredential) {
@@ -396,10 +396,10 @@ export default class EventManager {
credentialId: number | null | undefined,
credentials: CredentialForCalendarService[],
type: string,
- delegationCredentialId?: string | null
+ domainWideDelegationCredentialId?: string | null
) {
- if (delegationCredentialId) {
- return this.calendarCredentials.find((cred) => cred.delegatedToId === delegationCredentialId);
+ if (domainWideDelegationCredentialId) {
+ return this.calendarCredentials.find((cred) => cred.delegatedToId === domainWideDelegationCredentialId);
}
const credential = credentials.find((cred) => cred.id === credentialId);
if (credential) {
@@ -699,11 +699,11 @@ export default class EventManager {
for (const destination of destinationCalendars) {
if (eventCreated) break;
log.silly("Creating Calendar event", JSON.stringify({ destination }));
- if (destination.credentialId || destination.delegationCredentialId) {
+ if (destination.credentialId || destination.domainWideDelegationCredentialId) {
let credential = getCredential({
id: {
credentialId: destination.credentialId,
- delegationCredentialId: destination.delegationCredentialId,
+ domainWideDelegationCredentialId: destination.domainWideDelegationCredentialId,
},
allCredentials: this.calendarCredentials,
});
@@ -728,16 +728,14 @@ export default class EventManager {
delegatedTo: credentialFromDB.delegatedTo,
};
}
- } else if (destination.delegationCredentialId) {
- log.warn(
- "DelegationCredential: DelegationCredential seems to be disabled, falling back to first non-delegationCredential"
- );
- // In case DelegationCredential is disabled, we land here where the destination calendar is connected to a Delegation credential, but the credential isn't available(because DelegationCredential is disabled)
- // In this case, we fallback to the first non-delegationCredential. That would be there for all existing users before DelegationCredential was enabled
- const firstNonDelegatedCalendarCredential = this.calendarCredentials.find(
+ } else if (destination.domainWideDelegationCredentialId) {
+ log.warn("DWD: DWD seems to be disabled, falling back to first non-dwd credential");
+ // In case DWD is disabled, we land here where the destination calendar is connected to a DWD credential, but the credential isn't available(because DWD is disabled)
+ // In this case, we fallback to the first non-dwd credential. That would be there for all existing users before DWD was enabled
+ const firstNonDwdCalendarCredential = this.calendarCredentials.find(
(cred) => !cred.type.endsWith("other_calendar") && !cred.delegatedToId
);
- credential = firstNonDelegatedCalendarCredential;
+ credential = firstNonDwdCalendarCredential;
}
}
if (credential) {
diff --git a/packages/lib/apps/getEnabledAppsFromCredentials.ts b/packages/lib/apps/getEnabledAppsFromCredentials.ts
index 210398a1dce..a154c504f89 100644
--- a/packages/lib/apps/getEnabledAppsFromCredentials.ts
+++ b/packages/lib/apps/getEnabledAppsFromCredentials.ts
@@ -4,7 +4,7 @@ import type { CredentialDataWithTeamName } from "@calcom/app-store/utils";
import getApps from "@calcom/app-store/utils";
import { prisma } from "@calcom/prisma";
-import { isDelegationCredential } from "../delegationCredential/clientAndServer";
+import { isDwdCredential } from "../domainWideDelegation/clientAndServer";
type EnabledApp = ReturnType<typeof getApps>[number] & { enabled: boolean };
@@ -32,8 +32,8 @@ const getEnabledAppsFromCredentials = async (
},
} satisfies Prisma.AppWhereInput;
- const delegationCredentialsWithAppId = credentials
- .filter((credential) => isDelegationCredential({ credentialId: credential.id }))
+ const dwdCredentialsWithAppId = credentials
+ .filter((credential) => isDwdCredential({ credentialId: credential.id }))
.filter((credential): credential is typeof credential & { appId: string } => credential.appId !== null);
if (filterOnCredentials) {
@@ -59,17 +59,17 @@ const getEnabledAppsFromCredentials = async (
select: { slug: true, enabled: true },
});
- const delegationCredentialSupportedEnabledApps = await prisma.app.findMany({
+ const dwdSupportedEnabledApps = await prisma.app.findMany({
where: {
enabled: true,
slug: {
- in: delegationCredentialsWithAppId.map((credential) => credential.appId),
+ in: dwdCredentialsWithAppId.map((credential) => credential.appId),
},
},
select: { slug: true, enabled: true },
});
- enabledApps = [...enabledApps, ...delegationCredentialSupportedEnabledApps];
+ enabledApps = [...enabledApps, ...dwdSupportedEnabledApps];
const apps = getApps(credentials, filterOnCredentials);
const filteredApps = apps.reduce((reducedArray, app) => {
diff --git a/packages/lib/bookings/findQualifiedHostsWithDelegationCredentials.test.ts b/packages/lib/bookings/findQualifiedHostsWithDwdCredentials.test.ts
similarity index 95%
rename from packages/lib/bookings/findQualifiedHostsWithDelegationCredentials.test.ts
rename to packages/lib/bookings/findQualifiedHostsWithDwdCredentials.test.ts
index 8d8e16d6a2e..4c8e47bd37f 100644
--- a/packages/lib/bookings/findQualifiedHostsWithDelegationCredentials.test.ts
+++ b/packages/lib/bookings/findQualifiedHostsWithDwdCredentials.test.ts
@@ -6,7 +6,7 @@ import type { Mock } from "vitest";
import { SchedulingType } from "@calcom/prisma/enums";
import { filterHostsByLeadThreshold } from "./filterHostsByLeadThreshold";
-import { findQualifiedHostsWithDelegationCredentials } from "./findQualifiedHostsWithDelegationCredentials";
+import { findQualifiedHostsWithDwdCredentials } from "./findQualifiedHostsWithDwdCredentials";
import * as getRoutedUsers from "./getRoutedUsers";
// Mock the filterHostsByLeadThreshold function
@@ -21,7 +21,7 @@ afterEach(() => {
(filterHostsByLeadThreshold as Mock).mockClear();
});
-describe("findQualifiedHostsWithDelegationCredentials", async () => {
+describe("findQualifiedHostsWithDwdCredentials", async () => {
it("should return qualified hosts based on mock of filterHostsByLeadThreshold", async () => {
const hosts = [
{
@@ -88,7 +88,7 @@ describe("findQualifiedHostsWithDelegationCredentials", async () => {
};
// Call the function under test
- const result = await findQualifiedHostsWithDelegationCredentials({
+ const result = await findQualifiedHostsWithDwdCredentials({
eventType,
routedTeamMemberIds: [],
rescheduleUid: null,
@@ -139,7 +139,7 @@ describe("findQualifiedHostsWithDelegationCredentials", async () => {
};
// Call the function under test
- const result = await findQualifiedHostsWithDelegationCredentials({
+ const result = await findQualifiedHostsWithDwdCredentials({
eventType,
routedTeamMemberIds: [],
rescheduleUid: null,
@@ -225,7 +225,7 @@ describe("findQualifiedHostsWithDelegationCredentials", async () => {
};
// Call the function under test
- const result = await findQualifiedHostsWithDelegationCredentials({
+ const result = await findQualifiedHostsWithDwdCredentials({
eventType,
routedTeamMemberIds: [],
rescheduleUid: null,
@@ -313,7 +313,7 @@ describe("findQualifiedHostsWithDelegationCredentials", async () => {
};
// Call the function under test
- const result = await findQualifiedHostsWithDelegationCredentials({
+ const result = await findQualifiedHostsWithDwdCredentials({
eventType,
routedTeamMemberIds: [1],
rescheduleUid: null,
@@ -390,7 +390,7 @@ describe("findQualifiedHostsWithDelegationCredentials", async () => {
};
prismaMock.booking.findFirst.mockResolvedValue({ userId: 2 });
- const result = await findQualifiedHostsWithDelegationCredentials({
+ const result = await findQualifiedHostsWithDwdCredentials({
eventType,
routedTeamMemberIds: [],
rescheduleUid: "recheduleUid",
@@ -469,7 +469,7 @@ describe("findQualifiedHostsWithDelegationCredentials", async () => {
.mockImplementation(async () => [hosts[0]]);
// Call the function under test
- const result = await findQualifiedHostsWithDelegationCredentials({
+ const result = await findQualifiedHostsWithDwdCredentials({
eventType,
routedTeamMemberIds: [0, 1, 2],
rescheduleUid: null,
@@ -562,7 +562,7 @@ describe("findQualifiedHostsWithDelegationCredentials", async () => {
]);
// Call the function under test
- const result = await findQualifiedHostsWithDelegationCredentials({
+ const result = await findQualifiedHostsWithDwdCredentials({
eventType,
routedTeamMemberIds: [2, 3],
rescheduleUid: null,
@@ -661,7 +661,7 @@ describe("findQualifiedHostsWithDelegationCredentials", async () => {
(filterHostsByLeadThreshold as Mock).mockResolvedValue(rrHostsAfterFairness);
// Call the function under test
- const result = await findQualifiedHostsWithDelegationCredentials({
+ const result = await findQualifiedHostsWithDwdCredentials({
eventType,
routedTeamMemberIds: [2, 3],
rescheduleUid: null,
diff --git a/packages/lib/bookings/findQualifiedHostsWithDelegationCredentials.ts b/packages/lib/bookings/findQualifiedHostsWithDwdCredentials.ts
similarity index 97%
rename from packages/lib/bookings/findQualifiedHostsWithDelegationCredentials.ts
rename to packages/lib/bookings/findQualifiedHostsWithDwdCredentials.ts
index 91ee3ef0e2d..a282c4e70f6 100644
--- a/packages/lib/bookings/findQualifiedHostsWithDelegationCredentials.ts
+++ b/packages/lib/bookings/findQualifiedHostsWithDwdCredentials.ts
@@ -1,6 +1,6 @@
import {
findMatchingHostsWithEventSegment,
- getNormalizedHostsWithDelegationCredentials,
+ getNormalizedHostsWithDwdCredentials,
} from "@calcom/lib/bookings/getRoutedUsers";
import type { EventType } from "@calcom/lib/bookings/getRoutedUsers";
import type { SelectedCalendar } from "@calcom/prisma/client";
@@ -46,7 +46,7 @@ const isFixedHost = <T extends { isFixed: boolean }>(host: T): host is T & { isF
return host.isFixed;
};
-export const findQualifiedHostsWithDelegationCredentials = async <
+export const findQualifiedHostsWithDwdCredentials = async <
T extends {
email: string;
id: number;
@@ -97,10 +97,11 @@ export const findQualifiedHostsWithDelegationCredentials = async <
user: Omit<T, "credentials"> & { credentials: CredentialForCalendarService[] };
}[];
}> => {
- const { hosts: normalizedHosts, fallbackHosts: fallbackUsers } =
- await getNormalizedHostsWithDelegationCredentials({
+ const { hosts: normalizedHosts, fallbackHosts: fallbackUsers } = await getNormalizedHostsWithDwdCredentials(
+ {
eventType,
- });
+ }
+ );
// not a team event type, or some other reason - segment matching isn't necessary.
if (!normalizedHosts) {
const fixedHosts = fallbackUsers.filter(isFixedHost);
diff --git a/packages/lib/bookings/getRoutedUsers.ts b/packages/lib/bookings/getRoutedUsers.ts
index 330c1bd4373..bfe1cf3172c 100644
--- a/packages/lib/bookings/getRoutedUsers.ts
+++ b/packages/lib/bookings/getRoutedUsers.ts
@@ -5,7 +5,7 @@ import { safeStringify } from "@calcom/lib/safeStringify";
import { SchedulingType } from "@calcom/prisma/enums";
import type { CredentialPayload } from "@calcom/types/Credential";
-import { enrichHostsWithDelegationCredentials } from "../delegationCredential/server";
+import { enrichHostsWithDwdCredentials } from "../domainWideDelegation/server";
import getOrgIdFromMemberOrTeamId from "../getOrgIdFromMemberOrTeamId";
const log = logger.getSubLogger({ prefix: ["[getRoutedUsers]"] });
@@ -118,7 +118,7 @@ export function getNormalizedHosts<User extends BaseUser, Host extends BaseHost<
}
}
type BaseUserWithCredentialPayload = BaseUser & { credentials: CredentialPayload[] };
-export async function getNormalizedHostsWithDelegationCredentials<
+export async function getNormalizedHostsWithDwdCredentials<
User extends BaseUserWithCredentialPayload,
Host extends BaseHost<User>
>({
@@ -132,28 +132,28 @@ export async function getNormalizedHostsWithDelegationCredentials<
};
}) {
if (eventType.hosts?.length && eventType.schedulingType) {
- const hostsWithoutDelegationCredential = eventType.hosts.map((host) => ({
+ const hostsWithoutDwd = eventType.hosts.map((host) => ({
isFixed: host.isFixed,
user: host.user,
priority: host.priority,
weight: host.weight,
createdAt: host.createdAt,
}));
- const firstHost = hostsWithoutDelegationCredential[0];
+ const firstHost = hostsWithoutDwd[0];
const firstUserOrgId = await getOrgIdFromMemberOrTeamId({
memberId: firstHost?.user?.id ?? null,
teamId: eventType.teamId,
});
- const hostsEnrichedWithDelegationCredential = await enrichHostsWithDelegationCredentials({
+ const hostsEnrichedWithDwd = await enrichHostsWithDwdCredentials({
orgId: firstUserOrgId ?? null,
- hosts: hostsWithoutDelegationCredential ?? null,
+ hosts: hostsWithoutDwd ?? null,
});
return {
- hosts: hostsEnrichedWithDelegationCredential,
+ hosts: hostsEnrichedWithDwd,
fallbackHosts: null,
};
} else {
- const hostsWithoutDelegationCredential = eventType.users.map((user) => {
+ const hostsWithoutDwd = eventType.users.map((user) => {
return {
isFixed: !eventType.schedulingType || eventType.schedulingType === SchedulingType.COLLECTIVE,
email: user.email,
@@ -161,18 +161,18 @@ export async function getNormalizedHostsWithDelegationCredentials<
createdAt: null,
};
});
- const firstHost = hostsWithoutDelegationCredential[0];
+ const firstHost = hostsWithoutDwd[0];
const firstUserOrgId = await getOrgIdFromMemberOrTeamId({
memberId: firstHost?.user?.id ?? null,
teamId: eventType.teamId,
});
- const hostsEnrichedWithDelegationCredential = await enrichHostsWithDelegationCredentials({
+ const hostsEnrichedWithDwd = await enrichHostsWithDwdCredentials({
orgId: firstUserOrgId ?? null,
- hosts: hostsWithoutDelegationCredential ?? null,
+ hosts: hostsWithoutDwd ?? null,
});
return {
hosts: null,
- fallbackHosts: hostsEnrichedWithDelegationCredential,
+ fallbackHosts: hostsEnrichedWithDwd,
};
}
}
diff --git a/packages/lib/buildCalEventFromBooking.ts b/packages/lib/buildCalEventFromBooking.ts
index 23866b604aa..247fd6594ee 100644
--- a/packages/lib/buildCalEventFromBooking.ts
+++ b/packages/lib/buildCalEventFromBooking.ts
@@ -13,7 +13,7 @@ type DestinationCalendar = {
userId: number | null;
eventTypeId: number | null;
credentialId: number | null;
- delegationCredentialId: string | null;
+ domainWideDelegationCredentialId: string | null;
} | null;
type Attendee = {
diff --git a/packages/lib/delegationCredential/clientAndServer.ts b/packages/lib/delegationCredential/clientAndServer.ts
deleted file mode 100644
index 261eefe1e1e..00000000000
--- a/packages/lib/delegationCredential/clientAndServer.ts
+++ /dev/null
@@ -1,27 +0,0 @@
-export function isDelegationCredential({ credentialId }: { credentialId: number | null | undefined }) {
- // Though it is set as -1 right now, but we might want to set it to some other negative value.
- return typeof credentialId === "number" && credentialId < 0;
-}
-
-export const buildNonDelegationCredential = <T extends Record<string, unknown> | null>(credential: T) => {
- type WithDelegationCredential = T extends null
- ? null
- : T & {
- delegatedTo: null;
- delegatedToId: null;
- };
-
- if (!credential) return null as WithDelegationCredential;
- return {
- ...credential,
- delegatedTo: null,
- delegatedToId: null,
- } as WithDelegationCredential;
-};
-
-export const buildNonDelegationCredentials = <T extends Record<string, unknown>>(credentials: T[]) => {
- return credentials.map(buildNonDelegationCredential).filter((credential) => !!credential) as (T & {
- delegatedTo: null;
- delegatedToId: null;
- })[];
-};
diff --git a/packages/lib/domainWideDelegation/clientAndServer.ts b/packages/lib/domainWideDelegation/clientAndServer.ts
new file mode 100644
index 00000000000..5829191fbed
--- /dev/null
+++ b/packages/lib/domainWideDelegation/clientAndServer.ts
@@ -0,0 +1,27 @@
+export function isDwdCredential({ credentialId }: { credentialId: number | null | undefined }) {
+ // Though it is set as -1 right now, but we might want to set it to some other negative value.
+ return typeof credentialId === "number" && credentialId < 0;
+}
+
+export const buildNonDwdCredential = <T extends Record<string, unknown> | null>(credential: T) => {
+ type WithDelegatedCredential = T extends null
+ ? null
+ : T & {
+ delegatedTo: null;
+ delegatedToId: null;
+ };
+
+ if (!credential) return null as WithDelegatedCredential;
+ return {
+ ...credential,
+ delegatedTo: null,
+ delegatedToId: null,
+ } as WithDelegatedCredential;
+};
+
+export const buildNonDwdCredentials = <T extends Record<string, unknown>>(credentials: T[]) => {
+ return credentials.map(buildNonDwdCredential).filter((credential) => !!credential) as (T & {
+ delegatedTo: null;
+ delegatedToId: null;
+ })[];
+};
diff --git a/packages/lib/delegationCredential/server.test.ts b/packages/lib/domainWideDelegation/server.test.ts
similarity index 60%
rename from packages/lib/delegationCredential/server.test.ts
rename to packages/lib/domainWideDelegation/server.test.ts
index 4884110661e..74fa827d0d1 100644
--- a/packages/lib/delegationCredential/server.test.ts
+++ b/packages/lib/domainWideDelegation/server.test.ts
@@ -4,20 +4,20 @@ import { describe, it, expect, beforeEach, vi } from "vitest";
import { metadata as googleCalendarMetadata } from "@calcom/app-store/googlecalendar/_metadata";
import { metadata as googleMeetMetadata } from "@calcom/app-store/googlevideo/_metadata";
-import type { ServiceAccountKey } from "@calcom/lib/server/repository/delegationCredential";
-import { DelegationCredentialRepository } from "@calcom/lib/server/repository/delegationCredential";
+import type { ServiceAccountKey } from "@calcom/lib/server/repository/domainWideDelegation";
+import { DomainWideDelegationRepository } from "@calcom/lib/server/repository/domainWideDelegation";
import { OrganizationRepository } from "@calcom/lib/server/repository/organization";
import { SMSLockState } from "@calcom/prisma/enums";
import type { CredentialForCalendarService, CredentialPayload } from "@calcom/types/Credential";
import {
- getAllDelegationCredentialsForUser,
+ getAllDwdCredentialsForUser,
buildAllCredentials,
- getDelegationCredentialOrRegularCredential,
- enrichUsersWithDelegationCredentials,
- enrichHostsWithDelegationCredentials,
- enrichUserWithDelegationCredentialsWithoutOrgId,
- enrichUserWithDelegationConferencingCredentialsWithoutOrgId,
+ getDwdOrRegularCredential,
+ enrichUsersWithDwdCredentials,
+ enrichHostsWithDwdCredentials,
+ enrichUserWithDwdCredentialsWithoutOrgId,
+ enrichUserWithDwdConferencingCredentialsWithoutOrgId,
} from "./server";
// Mock OrganizationRepository
@@ -27,9 +27,9 @@ vi.mock("@calcom/lib/server/repository/organization", () => ({
},
}));
-// Mock DelegationCredentialRepository
-vi.mock("@calcom/lib/server/repository/delegationCredential", () => ({
- DelegationCredentialRepository: {
+// Mock DomainWideDelegationRepository
+vi.mock("@calcom/lib/server/repository/domainWideDelegation", () => ({
+ DomainWideDelegationRepository: {
findUniqueByOrgMemberEmailIncludeSensitiveServiceAccountKey: vi.fn(),
findUniqueByOrganizationIdAndDomainIncludeSensitiveServiceAccountKey: vi.fn(),
},
@@ -51,8 +51,8 @@ const mockWorkspacePlatform = {
slug: "google",
};
-const mockDelegationCredential = {
- id: "delegationCredential-1",
+const mockDwd = {
+ id: "dwd-1",
enabled: true,
domain: "example.com",
organizationId: 1,
@@ -106,11 +106,11 @@ const mockOrganization = {
};
// Credential Builders
-const buildDelegationCredential = (overrides = {}) => ({
+const buildDwdCredential = (overrides = {}) => ({
type: "google_calendar",
appId: "google-calendar",
id: -1,
- delegatedToId: mockDelegationCredential.id,
+ delegatedToId: mockDwd.id,
userId: mockUser.id,
user: { email: mockUser.email },
key: { access_token: "NOOP_UNUSED_DELEGATION_TOKEN" },
@@ -123,16 +123,16 @@ const buildDelegationCredential = (overrides = {}) => ({
...overrides,
});
-const buildGoogleCalendarDelegationCredential = (overrides = {}) => ({
- ...buildDelegationCredential({
+const buildDwdGoogleCalendarCredential = (overrides = {}) => ({
+ ...buildDwdCredential({
type: googleCalendarMetadata.type,
appId: googleCalendarMetadata.slug,
}),
...overrides,
});
-const buildDelegationCredentialGoogleMeetCredential = (overrides = {}) => ({
- ...buildDelegationCredential({
+const buildDwdGoogleMeetCredential = (overrides = {}) => ({
+ ...buildDwdCredential({
type: googleMeetMetadata.type,
appId: googleMeetMetadata.slug,
}),
@@ -167,13 +167,13 @@ const buildMockWorkspacePlatform = (overrides: Partial<typeof mockWorkspacePlatf
...overrides,
});
-const buildMockDelegationCredential = (overrides: Partial<typeof mockDelegationCredential> = {}) => ({
- ...mockDelegationCredential,
+const buildMockDwd = (overrides: Partial<typeof mockDwd> = {}) => ({
+ ...mockDwd,
workspacePlatform: buildMockWorkspacePlatform(overrides.workspacePlatform || {}),
...overrides,
});
-describe("getAllDelegationCredentialsForUser", () => {
+describe("getAllDwdCredentialsForUser", () => {
setupAndTeardown();
beforeEach(() => {
@@ -181,141 +181,138 @@ describe("getAllDelegationCredentialsForUser", () => {
vi.mocked(OrganizationRepository.findByMemberEmail).mockResolvedValue(mockOrganization);
});
- it("should return empty array when no DelegationCredential found", async () => {
+ it("should return empty array when no DWD found", async () => {
vi.mocked(
- DelegationCredentialRepository.findUniqueByOrgMemberEmailIncludeSensitiveServiceAccountKey
+ DomainWideDelegationRepository.findUniqueByOrgMemberEmailIncludeSensitiveServiceAccountKey
).mockResolvedValue(null);
- const result = await getAllDelegationCredentialsForUser({ user: mockUser });
+ const result = await getAllDwdCredentialsForUser({ user: mockUser });
expect(result).toEqual([]);
});
- it("should return empty array when DelegationCredential is disabled", async () => {
+ it("should return empty array when DWD is disabled", async () => {
vi.mocked(
- DelegationCredentialRepository.findUniqueByOrgMemberEmailIncludeSensitiveServiceAccountKey
- ).mockResolvedValue(buildMockDelegationCredential({ enabled: false }));
- const result = await getAllDelegationCredentialsForUser({ user: mockUser });
+ DomainWideDelegationRepository.findUniqueByOrgMemberEmailIncludeSensitiveServiceAccountKey
+ ).mockResolvedValue(buildMockDwd({ enabled: false }));
+ const result = await getAllDwdCredentialsForUser({ user: mockUser });
expect(result).toEqual([]);
});
- it("should return credentials for enabled Google DelegationCredential", async () => {
+ it("should return credentials for enabled Google DWD", async () => {
vi.mocked(
- DelegationCredentialRepository.findUniqueByOrgMemberEmailIncludeSensitiveServiceAccountKey
- ).mockResolvedValue(buildMockDelegationCredential());
- const result = await getAllDelegationCredentialsForUser({ user: mockUser });
+ DomainWideDelegationRepository.findUniqueByOrgMemberEmailIncludeSensitiveServiceAccountKey
+ ).mockResolvedValue(buildMockDwd());
+ const result = await getAllDwdCredentialsForUser({ user: mockUser });
expect(result).toHaveLength(2);
- expect(result).toEqual([
- buildGoogleCalendarDelegationCredential(),
- buildDelegationCredentialGoogleMeetCredential(),
- ]);
+ expect(result).toEqual([buildDwdGoogleCalendarCredential(), buildDwdGoogleMeetCredential()]);
});
it("should return empty array for non-Google platforms(as they are not supported yet)", async () => {
vi.mocked(
- DelegationCredentialRepository.findUniqueByOrgMemberEmailIncludeSensitiveServiceAccountKey
+ DomainWideDelegationRepository.findUniqueByOrgMemberEmailIncludeSensitiveServiceAccountKey
).mockResolvedValue(
- buildMockDelegationCredential({
+ buildMockDwd({
workspacePlatform: {
name: "Microsoft",
slug: "microsoft",
},
})
);
- const result = await getAllDelegationCredentialsForUser({ user: mockUser });
+ const result = await getAllDwdCredentialsForUser({ user: mockUser });
expect(result).toEqual([]);
});
});
describe("buildAllCredentials", () => {
- const mockDelegationCredentialGoogleCalendarCred = buildGoogleCalendarDelegationCredential();
+ const mockDwdGoogleCalendarCred = buildDwdGoogleCalendarCredential();
const mockRegularGoogleCalendarCred = buildRegularGoogleCalendarCredential();
- it("should combine DelegationCredential and regular credentials", () => {
+ it("should combine DWD and regular credentials", () => {
const result = buildAllCredentials({
- delegationCredentials: [mockDelegationCredentialGoogleCalendarCred],
+ dwdCredentials: [mockDwdGoogleCalendarCred],
existingCredentials: [mockRegularGoogleCalendarCred],
});
expect(result).toHaveLength(2);
- expect(result).toContainEqual(mockDelegationCredentialGoogleCalendarCred);
+ expect(result).toContainEqual(mockDwdGoogleCalendarCred);
expect(result).toContainEqual(mockRegularGoogleCalendarCred);
});
- it("should deduplicate DelegationCredential credentials with same delegatedToId and appId", () => {
- const duplicateDelegationCredential = buildGoogleCalendarDelegationCredential();
+ it("should deduplicate DWD credentials with same delegatedToId and appId", () => {
+ const duplicateDwdCredential = buildDwdGoogleCalendarCredential();
const result = buildAllCredentials({
- delegationCredentials: [mockDelegationCredentialGoogleCalendarCred, duplicateDelegationCredential],
+ dwdCredentials: [mockDwdGoogleCalendarCred, duplicateDwdCredential],
existingCredentials: [],
});
expect(result).toHaveLength(1);
- expect(result[0]).toEqual(mockDelegationCredentialGoogleCalendarCred);
+ expect(result[0]).toEqual(mockDwdGoogleCalendarCred);
});
- it("should keep DelegationCredential credentials with same delegatedToId but different appId", () => {
- const differentAppDelegationCredential = buildDelegationCredentialGoogleMeetCredential();
+ it("should keep DWD credentials with same delegatedToId but different appId", () => {
+ const differentAppDwdCredential = buildDwdGoogleMeetCredential();
const result = buildAllCredentials({
- delegationCredentials: [mockDelegationCredentialGoogleCalendarCred, differentAppDelegationCredential],
+ dwdCredentials: [mockDwdGoogleCalendarCred, differentAppDwdCredential],
existingCredentials: [],
});
expect(result).toHaveLength(2);
- expect(result).toContainEqual(mockDelegationCredentialGoogleCalendarCred);
- expect(result).toContainEqual(differentAppDelegationCredential);
+ expect(result).toContainEqual(mockDwdGoogleCalendarCred);
+ expect(result).toContainEqual(differentAppDwdCredential);
});
- it("should filter out DelegationCredential credentials from existingCredentials", () => {
- const delegatedCalendarCredential = buildRegularGoogleCalendarCredential({ id: -2 });
+ it("should filter out DWD credentials from existingCredentials", () => {
+ const dwdCalendarCredential = buildRegularGoogleCalendarCredential({ id: -2 });
const result = buildAllCredentials({
- delegationCredentials: [mockDelegationCredentialGoogleCalendarCred],
- existingCredentials: [mockRegularGoogleCalendarCred, delegatedCalendarCredential],
+ dwdCredentials: [mockDwdGoogleCalendarCred],
+ existingCredentials: [mockRegularGoogleCalendarCred, dwdCalendarCredential],
});
expect(result).toHaveLength(2);
- expect(result).toContainEqual(mockDelegationCredentialGoogleCalendarCred);
+ expect(result).toContainEqual(mockDwdGoogleCalendarCred);
expect(result).toContainEqual(mockRegularGoogleCalendarCred);
});
});
-describe("getDelegationCredentialOrRegularCredential", () => {
- const mockDelegationCredentialGoogleCalendarCred = buildGoogleCalendarDelegationCredential();
+describe("getDwdOrRegularCredential", () => {
+ const mockDwdGoogleCalendarCred = buildDwdGoogleCalendarCredential();
const mockRegularGoogleCalendarCred = buildRegularGoogleCalendarCredential();
- const credentials = [mockDelegationCredentialGoogleCalendarCred, mockRegularGoogleCalendarCred];
+ const credentials = [mockDwdGoogleCalendarCred, mockRegularGoogleCalendarCred];
- it("should find Delegation credential by delegationCredentialId", () => {
- const result = getDelegationCredentialOrRegularCredential({
+ it("should find DWD credential by dwdId", () => {
+ const result = getDwdOrRegularCredential({
credentials,
- id: { credentialId: null, delegationCredentialId: mockDelegationCredential.id },
+ id: { credentialId: null, dwdId: mockDwd.id },
});
- expect(result).toEqual(mockDelegationCredentialGoogleCalendarCred);
+ expect(result).toEqual(mockDwdGoogleCalendarCred);
});
it("should find regular credential by credentialId", () => {
- const result = getDelegationCredentialOrRegularCredential({
+ const result = getDwdOrRegularCredential({
credentials,
- id: { credentialId: mockRegularGoogleCalendarCred.id, delegationCredentialId: null },
+ id: { credentialId: mockRegularGoogleCalendarCred.id, dwdId: null },
});
expect(result).toEqual(mockRegularGoogleCalendarCred);
});
it("should return null when no matching credential found", () => {
- const result = getDelegationCredentialOrRegularCredential({
+ const result = getDwdOrRegularCredential({
credentials,
- id: { credentialId: 999, delegationCredentialId: null },
+ id: { credentialId: 999, dwdId: null },
});
expect(result).toBeNull();
});
it("should not match null to null for delegatedToId", () => {
- const result = getDelegationCredentialOrRegularCredential({
+ const result = getDwdOrRegularCredential({
credentials,
- id: { credentialId: null, delegationCredentialId: null },
+ id: { credentialId: null, dwdId: null },
});
expect(result).toBeNull();
});
});
-describe("enrichUsersWithDelegationCredentials", () => {
+describe("enrichUsersWithDwdCredentials", () => {
const mockUsers = [
{
...mockUser,
@@ -333,7 +330,7 @@ describe("enrichUsersWithDelegationCredentials", () => {
});
it("should return users as is when orgId is null", async () => {
- const result = await enrichUsersWithDelegationCredentials({
+ const result = await enrichUsersWithDwdCredentials({
orgId: null,
users: mockUsers,
});
@@ -350,19 +347,19 @@ describe("enrichUsersWithDelegationCredentials", () => {
);
});
- it("should enrich users with DelegationCredential credentials when available", async () => {
+ it("should enrich users with DWD credentials when available", async () => {
vi.mocked(
- DelegationCredentialRepository.findUniqueByOrganizationIdAndDomainIncludeSensitiveServiceAccountKey
- ).mockResolvedValue(buildMockDelegationCredential());
+ DomainWideDelegationRepository.findUniqueByOrganizationIdAndDomainIncludeSensitiveServiceAccountKey
+ ).mockResolvedValue(buildMockDwd());
- const result = await enrichUsersWithDelegationCredentials({
+ const result = await enrichUsersWithDwdCredentials({
orgId: 1,
users: mockUsers,
});
expect(result).toHaveLength(2);
result.forEach((enrichedUser) => {
- expect(enrichedUser.credentials).toHaveLength(3); // 1 regular + 2 DelegationCredential (calendar + meet)
+ expect(enrichedUser.credentials).toHaveLength(3); // 1 regular + 2 DWD (calendar + meet)
expect(enrichedUser.credentials).toContainEqual(
expect.objectContaining({
type: googleCalendarMetadata.type,
@@ -378,12 +375,12 @@ describe("enrichUsersWithDelegationCredentials", () => {
});
});
- it("should not add DelegationCredential credentials when DelegationCredential is disabled", async () => {
+ it("should not add DWD credentials when DWD is disabled", async () => {
vi.mocked(
- DelegationCredentialRepository.findUniqueByOrganizationIdAndDomainIncludeSensitiveServiceAccountKey
- ).mockResolvedValue(buildMockDelegationCredential({ enabled: false }));
+ DomainWideDelegationRepository.findUniqueByOrganizationIdAndDomainIncludeSensitiveServiceAccountKey
+ ).mockResolvedValue(buildMockDwd({ enabled: false }));
- const result = await enrichUsersWithDelegationCredentials({
+ const result = await enrichUsersWithDwdCredentials({
orgId: 1,
users: mockUsers,
});
@@ -401,7 +398,7 @@ describe("enrichUsersWithDelegationCredentials", () => {
});
});
-describe("enrichHostsWithDelegationCredentials", () => {
+describe("enrichHostsWithDwdCredentials", () => {
const mockHosts = [
{
user: {
@@ -425,7 +422,7 @@ describe("enrichHostsWithDelegationCredentials", () => {
});
it("should return hosts as is when orgId is null", async () => {
- const result = await enrichHostsWithDelegationCredentials({
+ const result = await enrichHostsWithDwdCredentials({
orgId: null,
hosts: mockHosts,
});
@@ -445,12 +442,12 @@ describe("enrichHostsWithDelegationCredentials", () => {
);
});
- it("should enrich hosts with DelegationCredential credentials when available", async () => {
+ it("should enrich hosts with DWD credentials when available", async () => {
vi.mocked(
- DelegationCredentialRepository.findUniqueByOrganizationIdAndDomainIncludeSensitiveServiceAccountKey
- ).mockResolvedValue(buildMockDelegationCredential());
+ DomainWideDelegationRepository.findUniqueByOrganizationIdAndDomainIncludeSensitiveServiceAccountKey
+ ).mockResolvedValue(buildMockDwd());
- const result = await enrichHostsWithDelegationCredentials({
+ const result = await enrichHostsWithDwdCredentials({
orgId: 1,
hosts: mockHosts,
});
@@ -458,7 +455,7 @@ describe("enrichHostsWithDelegationCredentials", () => {
expect(result).toHaveLength(2);
result.forEach((enrichedHost) => {
expect(enrichedHost.metadata).toBeDefined(); // Preserve non-user data
- expect(enrichedHost.user.credentials).toHaveLength(3); // 1 regular + 2 DelegationCredential (calendar + meet)
+ expect(enrichedHost.user.credentials).toHaveLength(3); // 1 regular + 2 DWD (calendar + meet)
expect(enrichedHost.user.credentials).toContainEqual(
expect.objectContaining({
type: googleCalendarMetadata.type,
@@ -474,12 +471,12 @@ describe("enrichHostsWithDelegationCredentials", () => {
});
});
- it("should not add DelegationCredential credentials when DelegationCredential is disabled", async () => {
+ it("should not add DWD credentials when DWD is disabled", async () => {
vi.mocked(
- DelegationCredentialRepository.findUniqueByOrganizationIdAndDomainIncludeSensitiveServiceAccountKey
- ).mockResolvedValue(buildMockDelegationCredential({ enabled: false }));
+ DomainWideDelegationRepository.findUniqueByOrganizationIdAndDomainIncludeSensitiveServiceAccountKey
+ ).mockResolvedValue(buildMockDwd({ enabled: false }));
- const result = await enrichHostsWithDelegationCredentials({
+ const result = await enrichHostsWithDwdCredentials({
orgId: 1,
hosts: mockHosts,
});
@@ -500,7 +497,7 @@ describe("enrichHostsWithDelegationCredentials", () => {
});
});
-describe("enrichUserWithDelegationCredentialsWithoutOrgId", () => {
+describe("enrichUserWithDwdCredentialsWithoutOrgId", () => {
const mockUserWithCredentials = {
...mockUser,
credentials: [buildRegularGoogleCalendarCredential()],
@@ -510,16 +507,16 @@ describe("enrichUserWithDelegationCredentialsWithoutOrgId", () => {
vi.clearAllMocks();
});
- it("should enrich user with DelegationCredential credentials when available", async () => {
+ it("should enrich user with DWD credentials when available", async () => {
vi.mocked(
- DelegationCredentialRepository.findUniqueByOrgMemberEmailIncludeSensitiveServiceAccountKey
- ).mockResolvedValue(buildMockDelegationCredential());
+ DomainWideDelegationRepository.findUniqueByOrgMemberEmailIncludeSensitiveServiceAccountKey
+ ).mockResolvedValue(buildMockDwd());
- const result = await enrichUserWithDelegationCredentialsWithoutOrgId({
+ const result = await enrichUserWithDwdCredentialsWithoutOrgId({
user: mockUserWithCredentials,
});
- expect(result.credentials).toHaveLength(3); // 1 regular + 2 DelegationCredential (calendar + meet)
+ expect(result.credentials).toHaveLength(3); // 1 regular + 2 DWD (calendar + meet)
expect(result.credentials).toContainEqual(
expect.objectContaining({
type: googleCalendarMetadata.type,
@@ -534,12 +531,12 @@ describe("enrichUserWithDelegationCredentialsWithoutOrgId", () => {
);
});
- it("should not add DelegationCredential credentials when DelegationCredential is not found", async () => {
+ it("should not add DWD credentials when DWD is not found", async () => {
vi.mocked(
- DelegationCredentialRepository.findUniqueByOrgMemberEmailIncludeSensitiveServiceAccountKey
+ DomainWideDelegationRepository.findUniqueByOrgMemberEmailIncludeSensitiveServiceAccountKey
).mockResolvedValue(null);
- const result = await enrichUserWithDelegationCredentialsWithoutOrgId({
+ const result = await enrichUserWithDwdCredentialsWithoutOrgId({
user: mockUserWithCredentials,
});
@@ -553,12 +550,12 @@ describe("enrichUserWithDelegationCredentialsWithoutOrgId", () => {
});
});
- it("should not add DelegationCredential credentials when DelegationCredential is disabled", async () => {
+ it("should not add DWD credentials when DWD is disabled", async () => {
vi.mocked(
- DelegationCredentialRepository.findUniqueByOrgMemberEmailIncludeSensitiveServiceAccountKey
- ).mockResolvedValue(buildMockDelegationCredential({ enabled: false }));
+ DomainWideDelegationRepository.findUniqueByOrgMemberEmailIncludeSensitiveServiceAccountKey
+ ).mockResolvedValue(buildMockDwd({ enabled: false }));
- const result = await enrichUserWithDelegationCredentialsWithoutOrgId({
+ const result = await enrichUserWithDwdCredentialsWithoutOrgId({
user: mockUserWithCredentials,
});
@@ -573,7 +570,7 @@ describe("enrichUserWithDelegationCredentialsWithoutOrgId", () => {
});
});
-describe("enrichUserWithDelegationConferencingCredentialsWithoutOrgId", () => {
+describe("enrichUserWithDwdConferencingCredentialsWithoutOrgId", () => {
const mockUserWithCredentials = {
...mockUser,
credentials: [buildRegularGoogleCalendarCredential()],
@@ -585,10 +582,10 @@ describe("enrichUserWithDelegationConferencingCredentialsWithoutOrgId", () => {
it("should only return conferencing credentials", async () => {
vi.mocked(
- DelegationCredentialRepository.findUniqueByOrgMemberEmailIncludeSensitiveServiceAccountKey
- ).mockResolvedValue(buildMockDelegationCredential());
+ DomainWideDelegationRepository.findUniqueByOrgMemberEmailIncludeSensitiveServiceAccountKey
+ ).mockResolvedValue(buildMockDwd());
- const result = await enrichUserWithDelegationConferencingCredentialsWithoutOrgId({
+ const result = await enrichUserWithDwdConferencingCredentialsWithoutOrgId({
user: mockUserWithCredentials,
});
@@ -603,10 +600,10 @@ describe("enrichUserWithDelegationConferencingCredentialsWithoutOrgId", () => {
it("should return empty credentials array when no conferencing credentials found", async () => {
vi.mocked(
- DelegationCredentialRepository.findUniqueByOrgMemberEmailIncludeSensitiveServiceAccountKey
+ DomainWideDelegationRepository.findUniqueByOrgMemberEmailIncludeSensitiveServiceAccountKey
).mockResolvedValue(null);
- const result = await enrichUserWithDelegationConferencingCredentialsWithoutOrgId({
+ const result = await enrichUserWithDwdConferencingCredentialsWithoutOrgId({
user: mockUserWithCredentials,
});
diff --git a/packages/lib/delegationCredential/server.ts b/packages/lib/domainWideDelegation/server.ts
similarity index 50%
rename from packages/lib/delegationCredential/server.ts
rename to packages/lib/domainWideDelegation/server.ts
index f21c8e4cc06..c002d381b57 100644
--- a/packages/lib/delegationCredential/server.ts
+++ b/packages/lib/domainWideDelegation/server.ts
@@ -6,21 +6,21 @@ import { metadata as office365VideoMetaData } from "@calcom/app-store/office365v
import logger from "@calcom/lib/logger";
import { safeStringify } from "@calcom/lib/safeStringify";
import { CredentialRepository } from "@calcom/lib/server/repository/credential";
-import type { ServiceAccountKey } from "@calcom/lib/server/repository/delegationCredential";
-import { DelegationCredentialRepository } from "@calcom/lib/server/repository/delegationCredential";
+import type { ServiceAccountKey } from "@calcom/lib/server/repository/domainWideDelegation";
+import { DomainWideDelegationRepository } from "@calcom/lib/server/repository/domainWideDelegation";
import type { CredentialForCalendarService, CredentialPayload } from "@calcom/types/Credential";
-import { buildNonDelegationCredentials, isDelegationCredential } from "./clientAndServer";
+import { buildNonDwdCredentials, isDwdCredential } from "./clientAndServer";
-export { buildNonDelegationCredentials, buildNonDelegationCredential } from "./clientAndServer";
+export { buildNonDwdCredentials, buildNonDwdCredential } from "./clientAndServer";
const GOOGLE_WORKSPACE_SLUG = "google";
const OFFICE365_WORKSPACE_SLUG = "office365";
const WORKSPACE_PLATFORM_SLUGS = [GOOGLE_WORKSPACE_SLUG, OFFICE365_WORKSPACE_SLUG] as const;
type WORKSPACE_PLATFORM_SLUGS_TYPE = (typeof WORKSPACE_PLATFORM_SLUGS)[number];
-const log = logger.getSubLogger({ prefix: ["lib/delegationCredential/server"] });
-interface DelegationCredential {
+const log = logger.getSubLogger({ prefix: ["lib/domainWideDelegation/server"] });
+interface DomainWideDelegation {
id: string;
workspacePlatform: {
slug: string;
@@ -28,7 +28,7 @@ interface DelegationCredential {
serviceAccountKey: ServiceAccountKey | null;
}
-interface DelegationCredentialWithSensitiveServiceAccountKey extends DelegationCredential {
+interface DomainWideDelegationWithSensitiveServiceAccountKey extends DomainWideDelegation {
serviceAccountKey: ServiceAccountKey;
}
@@ -41,10 +41,7 @@ const isValidWorkspaceSlug = (slug: string) => {
return WORKSPACE_PLATFORM_SLUGS.includes(slug as unknown as WORKSPACE_PLATFORM_SLUGS_TYPE);
};
-const getDelegationCredentialAppMetadata = (
- slug: WORKSPACE_PLATFORM_SLUGS_TYPE,
- isConferencing?: boolean
-) => {
+const getDwdAppMetadata = (slug: WORKSPACE_PLATFORM_SLUGS_TYPE, isConferencing?: boolean) => {
switch (slug) {
case GOOGLE_WORKSPACE_SLUG:
return isConferencing
@@ -69,16 +66,10 @@ const _isConferencingCredential = (credential: CredentialPayload) => {
);
};
-const _buildCommonUserCredential = ({
- delegationCredential,
- user,
-}: {
- delegationCredential: DelegationCredential;
- user: User;
-}) => {
+const _buildCommonUserCredential = ({ dwd, user }: { dwd: DomainWideDelegation; user: User }) => {
return {
id: -1,
- delegatedToId: delegationCredential.id,
+ delegatedToId: dwd.id,
userId: user.id,
user: {
email: user.email,
@@ -89,181 +80,159 @@ const _buildCommonUserCredential = ({
invalid: false,
teamId: null,
team: null,
- delegatedTo: delegationCredential.serviceAccountKey
+ delegatedTo: dwd.serviceAccountKey
? {
- serviceAccountKey: delegationCredential.serviceAccountKey,
+ serviceAccountKey: dwd.serviceAccountKey,
}
: null,
};
};
-const _buildDelegatedCalendarCredential = ({
- delegationCredential,
- user,
-}: {
- delegationCredential: DelegationCredential;
- user: User;
-}) => {
- log.debug("buildDelegationCredential", safeStringify({ delegationCredential, user }));
+const _buildDwdCalendarCredential = ({ dwd, user }: { dwd: DomainWideDelegation; user: User }) => {
+ log.debug("buildDomainWideDelegationCredential", safeStringify({ dwd, user }));
// TODO: Build for other platforms as well
- if (!isValidWorkspaceSlug(delegationCredential.workspacePlatform.slug)) {
+ if (!isValidWorkspaceSlug(dwd.workspacePlatform.slug)) {
log.warn(
`Only ${WORKSPACE_PLATFORM_SLUGS.toString()} Platforms are supported here, skipping ${
- delegationCredential.workspacePlatform.slug
+ dwd.workspacePlatform.slug
}`
);
return null;
}
return {
- ...getDelegationCredentialAppMetadata(
- delegationCredential.workspacePlatform.slug as unknown as WORKSPACE_PLATFORM_SLUGS_TYPE,
- false
- ),
- ..._buildCommonUserCredential({ delegationCredential, user }),
+ ...getDwdAppMetadata(dwd.workspacePlatform.slug as unknown as WORKSPACE_PLATFORM_SLUGS_TYPE, false),
+ ..._buildCommonUserCredential({ dwd, user }),
};
};
-const _buildDelegatedCalendarCredentialWithServiceAccountKey = ({
- delegationCredential,
+const _buildDwdCalendarCredentialWithServiceAccountKey = ({
+ dwd,
user,
}: {
- delegationCredential: DelegationCredentialWithSensitiveServiceAccountKey;
+ dwd: DomainWideDelegationWithSensitiveServiceAccountKey;
user: User;
}) => {
- const credential = _buildDelegatedCalendarCredential({ delegationCredential, user });
+ const credential = _buildDwdCalendarCredential({ dwd, user });
if (!credential) {
return null;
}
return {
...credential,
delegatedTo: {
- serviceAccountKey: delegationCredential.serviceAccountKey,
+ serviceAccountKey: dwd.serviceAccountKey,
},
};
};
-const _buildDelegatedConferencingCredential = ({
- delegationCredential,
- user,
-}: {
- delegationCredential: DelegationCredential;
- user: User;
-}) => {
+const _buildDwdConferencingCredential = ({ dwd, user }: { dwd: DomainWideDelegation; user: User }) => {
// TODO: Build for other platforms as well
- if (!isValidWorkspaceSlug(delegationCredential.workspacePlatform.slug)) {
+ if (!isValidWorkspaceSlug(dwd.workspacePlatform.slug)) {
log.warn(
`Only ${WORKSPACE_PLATFORM_SLUGS.toString()} Platforms are supported here, skipping ${
- delegationCredential.workspacePlatform.slug
+ dwd.workspacePlatform.slug
}`
);
return null;
}
return {
- ...getDelegationCredentialAppMetadata(
- delegationCredential.workspacePlatform.slug as unknown as WORKSPACE_PLATFORM_SLUGS_TYPE,
- true
- ),
- ..._buildCommonUserCredential({ delegationCredential, user }),
+ ...getDwdAppMetadata(dwd.workspacePlatform.slug as unknown as WORKSPACE_PLATFORM_SLUGS_TYPE, true),
+ ..._buildCommonUserCredential({ dwd, user }),
};
};
/**
- * Gets calendar as well as conferencing credentials(stored in-memory) for the user from the corresponding enabled DelegationCredential.
+ * Gets calendar as well as conferencing credentials(stored in-memory) for the user from the corresponding enabled DomainWideDelegation.
*/
-export async function getAllDelegationCredentialsForUser({ user }: { user: { email: string; id: number } }) {
+export async function getAllDwdCredentialsForUser({ user }: { user: { email: string; id: number } }) {
log.debug("called with", safeStringify({ user }));
// We access the repository without checking for feature flag here.
- // In case we need to disable the effects of DelegationCredential on credential we need to toggle DelegationCredential off from organization settings.
- // We could think of the teamFeatures flag to just disable the UI. The actual effect of DelegationCredential on credentials is disabled by toggling DelegationCredential off from UI
- const delegationCredential =
- await DelegationCredentialRepository.findUniqueByOrgMemberEmailIncludeSensitiveServiceAccountKey({
+ // In case we need to disable the effects of DWD on credential we need to toggle DWD off from organization settings.
+ // We could think of the teamFeatures flag to just disable the UI. The actual effect of DWD on credentials is disabled by toggling DWD off from UI
+ const dwd =
+ await DomainWideDelegationRepository.findUniqueByOrgMemberEmailIncludeSensitiveServiceAccountKey({
email: user.email,
});
- if (!delegationCredential || !delegationCredential.enabled) {
+ if (!dwd || !dwd.enabled) {
return [];
}
- const delegationCredentials = [
- _buildDelegatedCalendarCredential({ delegationCredential, user }),
- _buildDelegatedConferencingCredential({ delegationCredential, user }),
+ const domainWideDelegationCredentials = [
+ _buildDwdCalendarCredential({ dwd, user }),
+ _buildDwdConferencingCredential({ dwd, user }),
].filter((credential): credential is NonNullable<typeof credential> => credential !== null);
- log.debug("Returned", safeStringify({ delegationCredentials }));
- return delegationCredentials;
+ log.debug("Returned", safeStringify({ domainWideDelegationCredentials }));
+ return domainWideDelegationCredentials;
}
-export async function getAllDelegatedCalendarCredentialsForUser({
- user,
-}: {
- user: { email: string; id: number };
-}) {
- const delegationCredentials = await getAllDelegationCredentialsForUser({ user });
- return delegationCredentials.filter((credential) => credential.type.endsWith("_calendar"));
+export async function getAllDwdCalendarCredentialsForUser({ user }: { user: { email: string; id: number } }) {
+ const dwdCredentials = await getAllDwdCredentialsForUser({ user });
+ return dwdCredentials.filter((credential) => credential.type.endsWith("_calendar"));
}
-async function _getDelegationCredentialsMapPerUser({
+async function _getDwdCredentialsMapPerUser({
organizationId,
users,
}: {
organizationId: number | null;
users: User[];
}) {
- const emptyMap = new Map<number, NonNullable<ReturnType<typeof _buildDelegatedCalendarCredential>>[]>();
+ const emptyMap = new Map<number, NonNullable<ReturnType<typeof _buildDwdCalendarCredential>>[]>();
if (!organizationId) {
return emptyMap;
}
const domain = users[0].email.split("@")[1];
log.debug("called with", safeStringify({ users }));
- const delegationCredential =
- await DelegationCredentialRepository.findUniqueByOrganizationIdAndDomainIncludeSensitiveServiceAccountKey(
+ const dwd =
+ await DomainWideDelegationRepository.findUniqueByOrganizationIdAndDomainIncludeSensitiveServiceAccountKey(
{
organizationId,
domain,
}
);
- if (!delegationCredential || !delegationCredential.enabled) {
+ if (!dwd || !dwd.enabled) {
return emptyMap;
}
const credentialsByUserId = new Map<
number,
- NonNullable<ReturnType<typeof _buildDelegatedCalendarCredential>>[]
+ NonNullable<ReturnType<typeof _buildDwdCalendarCredential>>[]
>();
for (const user of users) {
- const delegationCredentials = [
- _buildDelegatedCalendarCredential({ delegationCredential, user }),
- _buildDelegatedConferencingCredential({ delegationCredential, user }),
+ const domainWideDelegationCredentials = [
+ _buildDwdCalendarCredential({ dwd, user }),
+ _buildDwdConferencingCredential({ dwd, user }),
].filter((credential): credential is NonNullable<typeof credential> => credential !== null);
- log.debug("Returned for user", safeStringify({ user, delegationCredentials }));
- credentialsByUserId.set(user.id, delegationCredentials);
+ log.debug("Returned for user", safeStringify({ user, domainWideDelegationCredentials }));
+ credentialsByUserId.set(user.id, domainWideDelegationCredentials);
}
return credentialsByUserId;
}
export async function checkIfSuccessfullyConfiguredInWorkspace({
- delegationCredential,
+ dwd,
user,
}: {
- delegationCredential: DelegationCredentialWithSensitiveServiceAccountKey;
+ dwd: DomainWideDelegationWithSensitiveServiceAccountKey;
user: User;
}) {
- if (!isValidWorkspaceSlug(delegationCredential.workspacePlatform.slug)) {
+ if (!isValidWorkspaceSlug(dwd.workspacePlatform.slug)) {
log.warn(
`Only ${WORKSPACE_PLATFORM_SLUGS.toString()} Platforms are supported here, skipping ${
- delegationCredential.workspacePlatform.slug
+ dwd.workspacePlatform.slug
}`
);
return false;
}
- const credential = _buildDelegatedCalendarCredentialWithServiceAccountKey({
- delegationCredential,
+ const credential = _buildDwdCalendarCredentialWithServiceAccountKey({
+ dwd,
user,
});
@@ -272,31 +241,31 @@ export async function checkIfSuccessfullyConfiguredInWorkspace({
if (!calendar) {
throw new Error("Google Calendar App not found");
}
- return await calendar?.testDelegationCredentialSetup?.();
+ return await calendar?.testDomainWideDelegationSetup?.();
}
-export async function getAllDelegationCredentialsForUserByAppType({
+export async function getAllDwdCredentialsForUserByAppType({
user,
appType,
}: {
user: User;
appType: string;
}) {
- const delegationCredentials = await getAllDelegationCredentialsForUser({
+ const dwdCredentials = await getAllDwdCredentialsForUser({
user,
});
- return delegationCredentials.filter((credential) => credential.type === appType);
+ return dwdCredentials.filter((credential) => credential.type === appType);
}
-export async function getAllDelegationCredentialsForUserByAppSlug({
+export async function getAllDwdCredentialsForUserByAppSlug({
user,
appSlug,
}: {
user: User;
appSlug: string;
}) {
- const delegationCredentials = await getAllDelegationCredentialsForUser({ user });
- return delegationCredentials.filter((credential) => credential.appId === appSlug);
+ const dwdCredentials = await getAllDwdCredentialsForUser({ user });
+ return dwdCredentials.filter((credential) => credential.appId === appSlug);
}
type Host<TUser extends { id: number; email: string; credentials: CredentialPayload[] }> = {
@@ -305,21 +274,19 @@ type Host<TUser extends { id: number; email: string; credentials: CredentialPayl
/**
* Prepares credentials for use by CalendarService and EventManager
- * - Ensures no duplicate delegationCredentials caused by enrichment at possibly multiple places
+ * - Ensures no duplicate dwd credentials caused by enrichment at possibly multiple places
*/
export const buildAllCredentials = ({
- delegationCredentials,
+ dwdCredentials,
existingCredentials,
}: {
- delegationCredentials: CredentialForCalendarService[];
+ dwdCredentials: CredentialForCalendarService[];
existingCredentials: CredentialPayload[];
}) => {
- const nonDelegationCredentials = existingCredentials.filter(
- (cred) => !isDelegationCredential({ credentialId: cred.id })
- );
+ const nonDwdCredentials = existingCredentials.filter((cred) => !isDwdCredential({ credentialId: cred.id }));
const allCredentials: CredentialForCalendarService[] = [
- ...delegationCredentials,
- ...buildNonDelegationCredentials(nonDelegationCredentials),
+ ...dwdCredentials,
+ ...buildNonDwdCredentials(nonDwdCredentials),
];
const uniqueAllCredentials = allCredentials.reduce((acc, credential) => {
@@ -328,10 +295,10 @@ export const buildAllCredentials = ({
acc.push(credential);
return acc;
}
- const existingDelegationCredential = acc.find(
+ const existingDwdCredential = acc.find(
(c) => c.delegatedToId === credential.delegatedToId && c.appId === credential.appId
);
- if (!existingDelegationCredential) {
+ if (!existingDwdCredential) {
acc.push(credential);
}
return acc;
@@ -340,10 +307,10 @@ export const buildAllCredentials = ({
return uniqueAllCredentials;
};
-export async function enrichUsersWithDelegationCredentials<
+export async function enrichUsersWithDwdCredentials<
TUser extends { id: number; email: string; credentials: CredentialPayload[] }
>({ orgId, users }: { orgId: number | null; users: TUser[] }) {
- const delegationCredentialsMap = await _getDelegationCredentialsMapPerUser({
+ const dwdCredentialsMap = await _getDwdCredentialsMapPerUser({
organizationId: orgId,
users,
});
@@ -351,7 +318,7 @@ export async function enrichUsersWithDelegationCredentials<
const enrichedUsers = users.map((user) => {
const { credentials, ...rest } = user;
const enrichedCredentials = buildAllCredentials({
- delegationCredentials: delegationCredentialsMap.get(user.id) ?? [],
+ dwdCredentials: dwdCredentialsMap.get(user.id) ?? [],
existingCredentials: credentials,
});
return {
@@ -359,11 +326,11 @@ export async function enrichUsersWithDelegationCredentials<
credentials: enrichedCredentials,
};
});
- log.debug("enrichUsersWithDelegationCredentials", safeStringify({ enrichedUsers, orgId }));
+ log.debug("enrichUsersWithDwdCredentials", safeStringify({ enrichedUsers, orgId }));
return enrichedUsers;
}
-export const enrichHostsWithDelegationCredentials = async <
+export const enrichHostsWithDwdCredentials = async <
THost extends Host<TUser>,
TUser extends { id: number; email: string; credentials: CredentialPayload[] }
>({
@@ -373,7 +340,7 @@ export const enrichHostsWithDelegationCredentials = async <
orgId: number | null;
hosts: THost[];
}) => {
- const delegationCredentialsMap = await _getDelegationCredentialsMapPerUser({
+ const dwdCredentialsMap = await _getDwdCredentialsMapPerUser({
organizationId: orgId,
users: hosts.map((host) => host.user),
});
@@ -385,38 +352,38 @@ export const enrichHostsWithDelegationCredentials = async <
user: {
...restUser,
credentials: buildAllCredentials({
- delegationCredentials: delegationCredentialsMap.get(restUser.id) ?? [],
+ dwdCredentials: dwdCredentialsMap.get(restUser.id) ?? [],
existingCredentials: credentials,
}),
},
};
});
- log.debug("enrichHostsWithDelegationCredentials", safeStringify({ enrichedHosts, orgId }));
+ log.debug("enrichHostsWithDwdCredentials", safeStringify({ enrichedHosts, orgId }));
return enrichedHosts;
};
-export const enrichUserWithDelegationCredentialsWithoutOrgId = async <
+export const enrichUserWithDwdCredentialsWithoutOrgId = async <
TUser extends { id: number; email: string; credentials: CredentialPayload[] }
>({
user,
}: {
user: TUser;
}) => {
- const delegationCredentials = await getAllDelegationCredentialsForUser({ user });
+ const dwdCredentials = await getAllDwdCredentialsForUser({ user });
const { credentials, ...restUser } = user;
return {
...restUser,
credentials: buildAllCredentials({
- delegationCredentials: delegationCredentials,
+ dwdCredentials: dwdCredentials,
existingCredentials: credentials,
}),
};
};
-export async function enrichUserWithDelegationConferencingCredentialsWithoutOrgId<
+export async function enrichUserWithDwdConferencingCredentialsWithoutOrgId<
TUser extends { id: number; email: string; credentials: CredentialPayload[] }
>({ user }: { user: TUser }) {
- const { credentials, ...restUser } = await enrichUserWithDelegationCredentialsWithoutOrgId({ user });
+ const { credentials, ...restUser } = await enrichUserWithDwdCredentialsWithoutOrgId({ user });
return {
...restUser,
credentials: credentials.filter(_isConferencingCredential),
@@ -424,20 +391,20 @@ export async function enrichUserWithDelegationConferencingCredentialsWithoutOrgI
}
/**
- * Either get Delegation credential from delegationCredentials or find regular credential from Credential table
+ * Either get DWD credential from dwdCredentials or find regular credential from Credential table
*/
-export async function getDelegationCredentialOrFindRegularCredential({
+export async function getDwdOrFindRegularCredential({
id,
- delegationCredentials,
+ dwdCredentials,
}: {
id: {
credentialId: number | null | undefined;
- delegationCredentialId: string | null | undefined;
+ domainWideDelegationCredentialId: string | null | undefined;
};
- delegationCredentials: CredentialForCalendarService[];
+ dwdCredentials: CredentialForCalendarService[];
}) {
- return id.delegationCredentialId
- ? delegationCredentials.find((cred) => cred.delegatedToId === id.delegationCredentialId)
+ return id.domainWideDelegationCredentialId
+ ? dwdCredentials.find((cred) => cred.delegatedToId === id.domainWideDelegationCredentialId)
: id.credentialId
? await CredentialRepository.findCredentialForCalendarServiceById({
id: id.credentialId,
@@ -446,22 +413,20 @@ export async function getDelegationCredentialOrFindRegularCredential({
}
/**
- * Utility function to find a credential from a list of credentials, supporting both regular and DelegationCredential credentials
+ * Utility function to find a credential from a list of credentials, supporting both regular and DWD credentials
*/
-export function getDelegationCredentialOrRegularCredential<
- TCredential extends { delegatedToId?: string | null; id: number }
->({
+export function getDwdOrRegularCredential<TCredential extends { delegatedToId?: string | null; id: number }>({
credentials,
id,
}: {
credentials: TCredential[];
- id: { credentialId: number | null | undefined; delegationCredentialId: string | null | undefined };
+ id: { credentialId: number | null | undefined; dwdId: string | null | undefined };
}) {
return (
credentials.find((cred) => {
// Ensure that we don't match null to null
if (cred.delegatedToId) {
- return cred.delegatedToId === id.delegationCredentialId;
+ return cred.delegatedToId === id.dwdId;
} else if (id.credentialId) {
return cred.id === id.credentialId;
}
@@ -470,7 +435,7 @@ export function getDelegationCredentialOrRegularCredential<
);
}
-export function getFirstDelegationConferencingCredential({
+export function getFirstDwdConferencingCredential({
credentials,
}: {
credentials: CredentialForCalendarService[];
@@ -478,16 +443,16 @@ export function getFirstDelegationConferencingCredential({
return credentials.find((credential) => _isConferencingCredential(credential));
}
-export function getFirstDelegationConferencingCredentialAppLocation({
+export function getFirstDwdConferencingCredentialAppLocation({
credentials,
}: {
credentials: CredentialForCalendarService[];
}) {
- const delegatedConferencingCredential = getFirstDelegationConferencingCredential({ credentials });
- if (delegatedConferencingCredential?.appId === googleMeetMetadata.slug) {
+ const dwdConferencingCredential = getFirstDwdConferencingCredential({ credentials });
+ if (dwdConferencingCredential?.appId === googleMeetMetadata.slug) {
return googleMeetMetadata.appData?.location?.type ?? null;
}
- if (delegatedConferencingCredential?.appId === office365VideoMetaData.slug) {
+ if (dwdConferencingCredential?.appId === office365VideoMetaData.slug) {
return office365VideoMetaData.appData?.location?.type ?? null;
}
return null;
diff --git a/packages/lib/getConnectedApps.ts b/packages/lib/getConnectedApps.ts
index 8891e0b7e08..20955b69a49 100644
--- a/packages/lib/getConnectedApps.ts
+++ b/packages/lib/getConnectedApps.ts
@@ -13,7 +13,7 @@ import type { TeamQuery } from "@calcom/trpc/server/routers/loggedInViewer/integ
import type { TIntegrationsInputSchema } from "@calcom/trpc/server/routers/loggedInViewer/integrations.schema";
import type { PaymentApp } from "@calcom/types/PaymentService";
-import { buildNonDelegationCredentials } from "./delegationCredential/clientAndServer";
+import { buildNonDwdCredentials } from "./domainWideDelegation/clientAndServer";
export type ConnectedApps = Awaited<ReturnType<typeof getConnectedApps>>;
@@ -106,7 +106,7 @@ export async function getConnectedApps({
userTeams = [...teamsQuery, ...parentTeams];
const teamAppCredentials = userTeams.flatMap((teamApp) => {
- return teamApp.credentials ? buildNonDelegationCredentials(teamApp.credentials.flat()) : [];
+ return teamApp.credentials ? buildNonDwdCredentials(teamApp.credentials.flat()) : [];
});
if (!includeTeamInstalledApps || teamId) {
credentials = teamAppCredentials;
diff --git a/packages/lib/getConnectedDestinationCalendars.ts b/packages/lib/getConnectedDestinationCalendars.ts
index c3c1fb721e5..b3844c32ca3 100644
--- a/packages/lib/getConnectedDestinationCalendars.ts
+++ b/packages/lib/getConnectedDestinationCalendars.ts
@@ -1,6 +1,6 @@
import { getCalendarCredentials, getConnectedCalendars } from "@calcom/lib/CalendarManager";
-import { isDelegationCredential } from "@calcom/lib/delegationCredential/clientAndServer";
-import { enrichUserWithDelegationCredentialsWithoutOrgId } from "@calcom/lib/delegationCredential/server";
+import { isDwdCredential } from "@calcom/lib/domainWideDelegation/clientAndServer";
+import { enrichUserWithDwdCredentialsWithoutOrgId } from "@calcom/lib/domainWideDelegation/server";
import logger from "@calcom/lib/logger";
import type { PrismaClient } from "@calcom/prisma";
import prisma from "@calcom/prisma";
@@ -27,14 +27,14 @@ export type ConnectedDestinationCalendars = Awaited<
>;
/**
- * Ensures that when DelegationCredential is enabled and there is already a calendar connected for the corresponding domain, we only allow the DelegationCredential calendar to be returned
- * This is to ensure that duplicate calendar connections aren't shown in UI(apps/installed/calendars). We choose DelegationCredential connection to be shown because we don't want users to be able to work with individual calendars
+ * Ensures that when DWD is enabled and there is already a calendar connected for the corresponding domain, we only allow the DWD calendar to be returned
+ * This is to ensure that duplicate calendar connections aren't shown in UI(apps/installed/calendars). We choose DWD connection to be shown because we don't want users to be able to work with individual calendars
*/
-const _ensureNoConflictingNonDelegatedConnectedCalendar = <
+const _ensureNoConflictingNonDwdConnectedCalendar = <
T extends {
integration: { slug: string };
primary?: { email?: string | null | undefined } | undefined;
- delegationCredentialId?: string | null | undefined;
+ domainWideDelegationCredentialId?: string | null | undefined;
}
>({
connectedCalendars,
@@ -51,18 +51,18 @@ const _ensureNoConflictingNonDelegatedConnectedCalendar = <
// If no other calendar with this slug, keep it
if (allCalendarsWithSameAppSlug.length === 1) return true;
- const delegatedCalendarsWithSameAppSlug = allCalendarsWithSameAppSlug.filter(
- (cal) => cal.delegationCredentialId
+ const dwdCalendarsWithSameAppSlug = allCalendarsWithSameAppSlug.filter(
+ (cal) => cal.domainWideDelegationCredentialId
);
- if (!delegatedCalendarsWithSameAppSlug.length) {
+ if (!dwdCalendarsWithSameAppSlug.length) {
return true;
}
- if (connectedCalendar.delegationCredentialId) {
+ if (connectedCalendar.domainWideDelegationCredentialId) {
return true;
}
- // DelegationCredential Credential is always of the loggedInUser
+ // DWD Credential is always of the loggedInUser
if (!connectedCalendar.primary?.email || connectedCalendar.primary.email !== loggedInUser.email) {
return true;
}
@@ -116,7 +116,7 @@ async function handleNoDestinationCalendar({
integration = "",
externalId = "",
credentialId,
- delegationCredentialId,
+ domainWideDelegationCredentialId,
email: primaryEmail,
} = connectedCalendars[0].primary ?? {};
@@ -140,12 +140,12 @@ async function handleNoDestinationCalendar({
integration,
externalId,
primaryEmail,
- ...(!isDelegationCredential({ credentialId })
+ ...(!isDwdCredential({ credentialId })
? {
credentialId,
}
: {
- delegationCredentialId,
+ domainWideDelegationCredentialId,
}),
},
});
@@ -285,7 +285,7 @@ export async function getConnectedDestinationCalendarsAndEnsureDefaultsInDb({
select: credentialForCalendarServiceSelect,
});
- const { credentials: allCredentials } = await enrichUserWithDelegationCredentialsWithoutOrgId({
+ const { credentials: allCredentials } = await enrichUserWithDwdCredentialsWithoutOrgId({
user: { id: user.id, email: user.email, credentials: userCredentials },
});
@@ -363,12 +363,12 @@ export async function getConnectedDestinationCalendarsAndEnsureDefaultsInDb({
});
}
- const noConflictingNonDelegatedConnectedCalendars = _ensureNoConflictingNonDelegatedConnectedCalendar({
+ const noConflictingNonDwdConnectedCalendars = _ensureNoConflictingNonDwdConnectedCalendar({
connectedCalendars,
loggedInUser: { email: user.email },
});
return {
- connectedCalendars: noConflictingNonDelegatedConnectedCalendars,
+ connectedCalendars: noConflictingNonDwdConnectedCalendars,
destinationCalendar: {
...(user.destinationCalendar as DestinationCalendar),
...destinationCalendar,
diff --git a/packages/lib/payment/getBooking.ts b/packages/lib/payment/getBooking.ts
index 267bbd7c6e9..583746a0d2a 100644
--- a/packages/lib/payment/getBooking.ts
+++ b/packages/lib/payment/getBooking.ts
@@ -9,7 +9,7 @@ import { credentialForCalendarServiceSelect } from "@calcom/prisma/selects/crede
import { EventTypeMetaDataSchema } from "@calcom/prisma/zod-utils";
import type { CalendarEvent } from "@calcom/types/Calendar";
-import { enrichUserWithDelegationCredentialsWithoutOrgId } from "../delegationCredential/server";
+import { enrichUserWithDwdCredentialsWithoutOrgId } from "../domainWideDelegation/server";
import { getBookerBaseUrl } from "../getBookerUrl/server";
async function getEventType(id: number) {
@@ -103,11 +103,11 @@ export async function getBooking(bookingId: number) {
const eventType = { ...eventTypeRaw, metadata: EventTypeMetaDataSchema.parse(eventTypeRaw?.metadata) };
- const { user: userWithoutDelegationCredentials } = booking;
+ const { user: userWithoutDwdCredentials } = booking;
- if (!userWithoutDelegationCredentials) throw new HttpCode({ statusCode: 204, message: "No user found" });
- const user = await enrichUserWithDelegationCredentialsWithoutOrgId({
- user: userWithoutDelegationCredentials,
+ if (!userWithoutDwdCredentials) throw new HttpCode({ statusCode: 204, message: "No user found" });
+ const user = await enrichUserWithDwdCredentialsWithoutOrgId({
+ user: userWithoutDwdCredentials,
});
const t = await getTranslation(user.locale ?? "en", "common");
diff --git a/packages/lib/server/buildCredentialPayloadForCalendar.ts b/packages/lib/server/buildCredentialPayloadForCalendar.ts
index 8221b778ac4..d23b4f07bf7 100644
--- a/packages/lib/server/buildCredentialPayloadForCalendar.ts
+++ b/packages/lib/server/buildCredentialPayloadForCalendar.ts
@@ -1,28 +1,28 @@
-import { isDelegationCredential } from "@calcom/lib/delegationCredential/clientAndServer";
+import { isDwdCredential } from "@calcom/lib/domainWideDelegation/clientAndServer";
export function buildCredentialPayloadForPrisma({
credentialId,
- delegationCredentialId,
+ domainWideDelegationCredentialId,
}: {
credentialId: number | null | undefined;
- delegationCredentialId: string | null | undefined;
+ domainWideDelegationCredentialId: string | null | undefined;
}) {
if (credentialId === undefined) {
return {
credentialId,
- delegationCredentialId,
+ domainWideDelegationCredentialId,
};
}
- if (isDelegationCredential({ credentialId })) {
+ if (isDwdCredential({ credentialId })) {
return {
credentialId: null,
- delegationCredentialId,
+ domainWideDelegationCredentialId,
};
} else {
return {
credentialId,
- delegationCredentialId: null,
+ domainWideDelegationCredentialId: null,
};
}
}
diff --git a/packages/lib/server/findUsersForAvailabilityCheck.ts b/packages/lib/server/findUsersForAvailabilityCheck.ts
index ae6f3a7a592..b6710c6c0c4 100644
--- a/packages/lib/server/findUsersForAvailabilityCheck.ts
+++ b/packages/lib/server/findUsersForAvailabilityCheck.ts
@@ -1,6 +1,6 @@
import type { Prisma } from "@prisma/client";
-import { enrichUserWithDelegationCredentialsWithoutOrgId } from "@calcom/lib/delegationCredential/server";
+import { enrichUserWithDwdCredentialsWithoutOrgId } from "@calcom/lib/domainWideDelegation/server";
import { availabilityUserSelect } from "@calcom/prisma";
import { prisma } from "@calcom/prisma";
import { credentialForCalendarServiceSelect } from "@calcom/prisma/selects/credential";
@@ -23,7 +23,7 @@ export async function findUsersForAvailabilityCheck({ where }: { where: Prisma.U
return null;
}
- return await enrichUserWithDelegationCredentialsWithoutOrgId({
+ return await enrichUserWithDwdCredentialsWithoutOrgId({
user: withSelectedCalendars(user),
});
}
diff --git a/packages/lib/server/getUsersCredentials.ts b/packages/lib/server/getUsersCredentials.ts
index 1db7315d43d..f3ff81ba131 100644
--- a/packages/lib/server/getUsersCredentials.ts
+++ b/packages/lib/server/getUsersCredentials.ts
@@ -2,13 +2,13 @@ import { prisma } from "@calcom/prisma";
import { credentialForCalendarServiceSelect } from "@calcom/prisma/selects/credential";
import type { TrpcSessionUser } from "@calcom/trpc/server/trpc";
-import { enrichUserWithDelegationCredentialsWithoutOrgId } from "../delegationCredential/server";
+import { enrichUserWithDwdCredentialsWithoutOrgId } from "../domainWideDelegation/server";
type SessionUser = NonNullable<TrpcSessionUser>;
type User = { id: SessionUser["id"]; email: SessionUser["email"] };
/**
- * It includes in-memory DelegationCredential credentials as well.
+ * It includes in-memory DWD credentials as well.
*/
export async function getUsersCredentials(user: User) {
const credentials = await prisma.credential.findMany({
@@ -21,7 +21,7 @@ export async function getUsersCredentials(user: User) {
},
});
- const { credentials: allCredentials } = await enrichUserWithDelegationCredentialsWithoutOrgId({
+ const { credentials: allCredentials } = await enrichUserWithDwdCredentialsWithoutOrgId({
user: {
email: user.email,
id: user.id,
diff --git a/packages/lib/server/repository/__tests__/delegationCredential.test.ts b/packages/lib/server/repository/__tests__/domainWideDelegation.test.ts
similarity index 83%
rename from packages/lib/server/repository/__tests__/delegationCredential.test.ts
rename to packages/lib/server/repository/__tests__/domainWideDelegation.test.ts
index 738bc402dc7..65b9aa535ce 100644
--- a/packages/lib/server/repository/__tests__/delegationCredential.test.ts
+++ b/packages/lib/server/repository/__tests__/domainWideDelegation.test.ts
@@ -4,7 +4,7 @@ import { describe, expect, it, beforeEach, vi } from "vitest";
import { encryptServiceAccountKey } from "@calcom/lib/server/serviceAccountKey";
-import { DelegationCredentialRepository } from "../delegationCredential";
+import { DomainWideDelegationRepository } from "../domainWideDelegation";
import { OrganizationRepository } from "../organization";
vi.mock("../organization", () => ({
@@ -56,7 +56,7 @@ const buildMockOrganization = () => ({
isOrganization: true,
});
-const buildMockDelegationCredential = (overrides = {}) => ({
+const buildMockDomainWideDelegation = (overrides = {}) => ({
id: "test-id",
enabled: true,
domain: "example.com",
@@ -68,7 +68,7 @@ const buildMockDelegationCredential = (overrides = {}) => ({
});
// Test Utilities
-const createTestDelegationCredential = async (overrides = {}) => {
+const createTestDomainWideDelegation = async (overrides = {}) => {
// Create organization first (as a team with isOrganization true)
await prismock.team.create({
data: buildMockOrganization(),
@@ -79,9 +79,9 @@ const createTestDelegationCredential = async (overrides = {}) => {
data: buildMockWorkspacePlatform(),
});
- const data = buildMockDelegationCredential(overrides);
+ const data = buildMockDomainWideDelegation(overrides);
- return await prismock.delegationCredential.create({
+ return await prismock.domainWideDelegation.create({
data: {
...data,
serviceAccountKey: encryptServiceAccountKey(data.serviceAccountKey),
@@ -96,9 +96,9 @@ const setupOrganizationMock = (returnValue: any) => {
vi.mocked(OrganizationRepository.findByMemberEmail).mockResolvedValue(returnValue);
};
-describe("DelegationCredentialRepository", () => {
+describe("DomainWideDelegationRepository", () => {
beforeEach(() => {
- prismock.delegationCredential.deleteMany();
+ prismock.domainWideDelegation.deleteMany();
prismock.workspacePlatform.deleteMany();
prismock.team.deleteMany();
vi.clearAllMocks();
@@ -106,13 +106,13 @@ describe("DelegationCredentialRepository", () => {
describe("Service Account Key Access Control", () => {
beforeEach(async () => {
- await createTestDelegationCredential();
+ await createTestDomainWideDelegation();
});
describe("Regular Find Methods (No Service Account Key)", () => {
describe("findById", () => {
it("should not expose service account key in response", async () => {
- const result = await DelegationCredentialRepository.findById({ id: "test-id" });
+ const result = await DomainWideDelegationRepository.findById({ id: "test-id" });
expect(result).not.toHaveProperty("serviceAccountKey");
expect(result).toEqual(
@@ -127,7 +127,7 @@ describe("DelegationCredentialRepository", () => {
describe("findAllByDomain", () => {
it("should not expose service account key in any of the results", async () => {
- const results = await DelegationCredentialRepository.findAllByDomain({ domain: "example.com" });
+ const results = await DomainWideDelegationRepository.findAllByDomain({ domain: "example.com" });
expect(results.length).toBeGreaterThan(0);
results.forEach((result) => {
@@ -145,7 +145,7 @@ describe("DelegationCredentialRepository", () => {
describe("Sensitive Methods (With Service Account Key)", () => {
describe("findByIdIncludeSensitiveServiceAccountKey", () => {
it("should expose valid service account key", async () => {
- const result = await DelegationCredentialRepository.findByIdIncludeSensitiveServiceAccountKey({
+ const result = await DomainWideDelegationRepository.findByIdIncludeSensitiveServiceAccountKey({
id: "test-id",
});
@@ -156,7 +156,7 @@ describe("DelegationCredentialRepository", () => {
describe("findByOrgIdIncludeSensitiveServiceAccountKey", () => {
it("should expose validated service account keys", async () => {
- const results = await DelegationCredentialRepository.findByOrgIdIncludeSensitiveServiceAccountKey({
+ const results = await DomainWideDelegationRepository.findByOrgIdIncludeSensitiveServiceAccountKey({
organizationId: 1,
});
@@ -170,7 +170,7 @@ describe("DelegationCredentialRepository", () => {
describe("findUniqueByOrganizationIdAndDomainIncludeSensitiveServiceAccountKey", () => {
it("should expose validated service account key", async () => {
const result =
- await DelegationCredentialRepository.findUniqueByOrganizationIdAndDomainIncludeSensitiveServiceAccountKey(
+ await DomainWideDelegationRepository.findUniqueByOrganizationIdAndDomainIncludeSensitiveServiceAccountKey(
{
organizationId: 1,
domain: "example.com",
@@ -187,7 +187,7 @@ describe("DelegationCredentialRepository", () => {
setupOrganizationMock({ id: 1 });
const result =
- await DelegationCredentialRepository.findUniqueByOrgMemberEmailIncludeSensitiveServiceAccountKey({
+ await DomainWideDelegationRepository.findUniqueByOrgMemberEmailIncludeSensitiveServiceAccountKey({
});
@@ -200,7 +200,7 @@ describe("DelegationCredentialRepository", () => {
setupOrganizationMock(null);
const result =
- await DelegationCredentialRepository.findUniqueByOrgMemberEmailIncludeSensitiveServiceAccountKey({
+ await DomainWideDelegationRepository.findUniqueByOrgMemberEmailIncludeSensitiveServiceAccountKey({
});
@@ -212,7 +212,7 @@ describe("DelegationCredentialRepository", () => {
describe("CRUD Operations", () => {
describe("create", () => {
- it("should store delegation credential with all required fields and establish connections", async () => {
+ it("should store domain wide delegation with all required fields and establish connections", async () => {
// Create organization first (as a team with isOrganization true)
await prismock.team.create({
data: buildMockOrganization(),
@@ -223,11 +223,11 @@ describe("DelegationCredentialRepository", () => {
data: buildMockWorkspacePlatform(),
});
- const data = buildMockDelegationCredential();
+ const data = buildMockDomainWideDelegation();
delete data.id; // ID is auto-generated
delete data.workspacePlatform; // Don't include the relation in create
- const result = await DelegationCredentialRepository.create(data);
+ const result = await DomainWideDelegationRepository.create(data);
expect(result).toEqual({
id: expect.any(String),
@@ -246,7 +246,7 @@ describe("DelegationCredentialRepository", () => {
describe("update", () => {
it("should modify workspace platform connection when workspacePlatformId is provided", async () => {
- const created = await createTestDelegationCredential();
+ const created = await createTestDomainWideDelegation();
// Create new workspace platform
const newWorkspacePlatform = await prismock.workspacePlatform.create({
@@ -257,7 +257,7 @@ describe("DelegationCredentialRepository", () => {
},
});
- const result = await DelegationCredentialRepository.updateById({
+ const result = await DomainWideDelegationRepository.updateById({
id: created.id,
data: { workspacePlatformId: newWorkspacePlatform.id },
});
@@ -277,7 +277,7 @@ describe("DelegationCredentialRepository", () => {
});
it("should modify organization connection when organizationId is provided", async () => {
- const created = await createTestDelegationCredential();
+ const created = await createTestDomainWideDelegation();
// Create new organization (as a team with isOrganization true)
const newOrganization = await prismock.team.create({
@@ -288,7 +288,7 @@ describe("DelegationCredentialRepository", () => {
},
});
- const result = await DelegationCredentialRepository.updateById({
+ const result = await DomainWideDelegationRepository.updateById({
id: created.id,
data: { organizationId: newOrganization.id },
});
@@ -308,9 +308,9 @@ describe("DelegationCredentialRepository", () => {
});
it("should modify specified fields while preserving others", async () => {
- const created = await createTestDelegationCredential();
+ const created = await createTestDomainWideDelegation();
- const result = await DelegationCredentialRepository.updateById({
+ const result = await DomainWideDelegationRepository.updateById({
id: created.id,
data: { enabled: false },
});
@@ -326,12 +326,12 @@ describe("DelegationCredentialRepository", () => {
});
describe("delete", () => {
- it("should remove the delegation credential completely", async () => {
- const created = await createTestDelegationCredential();
+ it("should remove the domain wide delegation completely", async () => {
+ const created = await createTestDomainWideDelegation();
- await DelegationCredentialRepository.deleteById({ id: created.id });
+ await DomainWideDelegationRepository.deleteById({ id: created.id });
- const result = await prismock.delegationCredential.findUnique({
+ const result = await prismock.domainWideDelegation.findUnique({
where: { id: created.id },
});
expect(result).toBeNull();
diff --git a/packages/lib/server/repository/credential.ts b/packages/lib/server/repository/credential.ts
index ed865f91f8b..01531d8c576 100644
--- a/packages/lib/server/repository/credential.ts
+++ b/packages/lib/server/repository/credential.ts
@@ -2,7 +2,7 @@ import { prisma } from "@calcom/prisma";
import { safeCredentialSelect } from "@calcom/prisma/selects/credential";
import { credentialForCalendarServiceSelect } from "@calcom/prisma/selects/credential";
-import { buildNonDelegationCredential } from "../../delegationCredential/server";
+import { buildNonDwdCredential } from "../../domainWideDelegation/server";
type CredentialCreateInput = {
type: string;
@@ -14,7 +14,7 @@ type CredentialCreateInput = {
export class CredentialRepository {
static async create(data: CredentialCreateInput) {
const credential = await prisma.credential.create({ data: { ...data } });
- return buildNonDelegationCredential(credential);
+ return buildNonDwdCredential(credential);
}
static async findByAppIdAndUserId({ appId, userId }: { appId: string; userId: number }) {
const credential = await prisma.credential.findFirst({
@@ -23,7 +23,7 @@ export class CredentialRepository {
userId,
},
});
- return buildNonDelegationCredential(credential);
+ return buildNonDwdCredential(credential);
}
/**
@@ -31,7 +31,7 @@ export class CredentialRepository {
*/
static async findFirstByIdWithUser({ id }: { id: number }) {
const credential = await prisma.credential.findFirst({ where: { id }, select: safeCredentialSelect });
- return buildNonDelegationCredential(credential);
+ return buildNonDwdCredential(credential);
}
/**
@@ -42,7 +42,7 @@ export class CredentialRepository {
where: { id },
select: { ...safeCredentialSelect, key: true },
});
- return buildNonDelegationCredential(credential);
+ return buildNonDwdCredential(credential);
}
static async findFirstByAppIdAndUserId({ appId, userId }: { appId: string; userId: number }) {
@@ -56,7 +56,7 @@ export class CredentialRepository {
static async findFirstByUserIdAndType({ userId, type }: { userId: number; type: string }) {
const credential = await prisma.credential.findFirst({ where: { userId, type } });
- return buildNonDelegationCredential(credential);
+ return buildNonDwdCredential(credential);
}
static async deleteById({ id }: { id: number }) {
@@ -73,6 +73,6 @@ export class CredentialRepository {
return dbCredential;
}
- return buildNonDelegationCredential(dbCredential);
+ return buildNonDwdCredential(dbCredential);
}
}
diff --git a/packages/lib/server/repository/destinationCalendar.ts b/packages/lib/server/repository/destinationCalendar.ts
index 37de4b0a573..9848e789d4c 100644
--- a/packages/lib/server/repository/destinationCalendar.ts
+++ b/packages/lib/server/repository/destinationCalendar.ts
@@ -44,24 +44,24 @@ export class DestinationCalendarRepository {
externalId?: string;
credentialId?: number | null;
primaryEmail?: string | null;
- delegationCredentialId?: string | null;
+ domainWideDelegationCredentialId?: string | null;
};
create: {
integration: string;
externalId: string;
credentialId: number | null;
primaryEmail?: string | null;
- delegationCredentialId?: string | null;
+ domainWideDelegationCredentialId?: string | null;
};
}) {
const credentialPayloadForUpdate = buildCredentialPayloadForPrisma({
credentialId: update.credentialId,
- delegationCredentialId: update.delegationCredentialId,
+ domainWideDelegationCredentialId: update.domainWideDelegationCredentialId,
});
const credentialPayloadForCreate = buildCredentialPayloadForPrisma({
credentialId: create.credentialId,
- delegationCredentialId: create.delegationCredentialId,
+ domainWideDelegationCredentialId: create.domainWideDelegationCredentialId,
});
return await prisma.destinationCalendar.upsert({
diff --git a/packages/lib/server/repository/delegationCredential.ts b/packages/lib/server/repository/domainWideDelegation.ts
similarity index 71%
rename from packages/lib/server/repository/delegationCredential.ts
rename to packages/lib/server/repository/domainWideDelegation.ts
index dd8ad6fb13e..6e721bd66a8 100644
--- a/packages/lib/server/repository/delegationCredential.ts
+++ b/packages/lib/server/repository/domainWideDelegation.ts
@@ -13,8 +13,8 @@ import { prisma } from "@calcom/prisma";
import { OrganizationRepository } from "./organization";
export type { ServiceAccountKey };
-const repositoryLogger = logger.getSubLogger({ prefix: ["DelegationCredentialRepository"] });
-const delegationCredentialSafeSelect = {
+const repositoryLogger = logger.getSubLogger({ prefix: ["DomainWideDelegationRepository"] });
+const domainWideDelegationSafeSelect = {
id: true,
enabled: true,
domain: true,
@@ -29,12 +29,12 @@ const delegationCredentialSafeSelect = {
},
};
-const delegationCredentialSelectIncludesServiceAccountKey = {
- ...delegationCredentialSafeSelect,
+const domainWideDelegationSelectIncludesServiceAccountKey = {
+ ...domainWideDelegationSafeSelect,
serviceAccountKey: true,
};
-export class DelegationCredentialRepository {
+export class DomainWideDelegationRepository {
private static encryptServiceAccountKey(serviceAccountKey: ServiceAccountKey): EncryptedServiceAccountKey {
return encryptServiceAccountKey(serviceAccountKey);
}
@@ -44,12 +44,12 @@ export class DelegationCredentialRepository {
}
private static withParsedServiceAccountKey<T extends { serviceAccountKey: Prisma.JsonValue } | null>(
- delegationCredential: T
+ domainWideDelegation: T
) {
- if (!delegationCredential) {
+ if (!domainWideDelegation) {
return null;
}
- const { serviceAccountKey, ...rest } = delegationCredential;
+ const { serviceAccountKey, ...rest } = domainWideDelegation;
// Decrypt the service account key if it exists
const decryptedKey = this.decryptServiceAccountKey(serviceAccountKey);
@@ -69,7 +69,7 @@ export class DelegationCredentialRepository {
serviceAccountKey: ServiceAccountKey;
}) {
const encryptedKey = this.encryptServiceAccountKey(data.serviceAccountKey);
- return await prisma.delegationCredential.create({
+ return await prisma.domainWideDelegation.create({
data: {
workspacePlatform: {
connect: {
@@ -85,14 +85,14 @@ export class DelegationCredentialRepository {
},
serviceAccountKey: encryptedKey,
},
- select: delegationCredentialSafeSelect,
+ select: domainWideDelegationSafeSelect,
});
}
static async findById({ id }: { id: string }) {
- return await prisma.delegationCredential.findUnique({
+ return await prisma.domainWideDelegation.findUnique({
where: { id },
- select: delegationCredentialSafeSelect,
+ select: domainWideDelegationSafeSelect,
});
}
@@ -103,20 +103,20 @@ export class DelegationCredentialRepository {
organizationId: number;
domain: string;
}) {
- const delegationCredential = await prisma.delegationCredential.findUnique({
+ const dwd = await prisma.domainWideDelegation.findUnique({
where: { organizationId_domain: { organizationId, domain } },
- select: delegationCredentialSelectIncludesServiceAccountKey,
+ select: domainWideDelegationSelectIncludesServiceAccountKey,
});
- return DelegationCredentialRepository.withParsedServiceAccountKey(delegationCredential);
+ return DomainWideDelegationRepository.withParsedServiceAccountKey(dwd);
}
static async findByIdIncludeSensitiveServiceAccountKey({ id }: { id: string }) {
- const delegationCredential = await prisma.delegationCredential.findUnique({
+ const domainWideDelegation = await prisma.domainWideDelegation.findUnique({
where: { id },
- select: delegationCredentialSelectIncludesServiceAccountKey,
+ select: domainWideDelegationSelectIncludesServiceAccountKey,
});
- if (!delegationCredential) return null;
- return DelegationCredentialRepository.withParsedServiceAccountKey(delegationCredential);
+ if (!domainWideDelegation) return null;
+ return DomainWideDelegationRepository.withParsedServiceAccountKey(domainWideDelegation);
}
static async findUniqueByOrgMemberEmailIncludeSensitiveServiceAccountKey({ email }: { email: string }) {
@@ -131,23 +131,23 @@ export class DelegationCredentialRepository {
}
const emailDomain = email.split("@")[1];
- const delegationCredential = await prisma.delegationCredential.findUnique({
+ const domainWideDelegation = await prisma.domainWideDelegation.findUnique({
where: {
organizationId_domain: {
organizationId: organization.id,
domain: emailDomain,
},
},
- select: delegationCredentialSelectIncludesServiceAccountKey,
+ select: domainWideDelegationSelectIncludesServiceAccountKey,
});
- return DelegationCredentialRepository.withParsedServiceAccountKey(delegationCredential);
+ return DomainWideDelegationRepository.withParsedServiceAccountKey(domainWideDelegation);
}
static async findAllByDomain({ domain }: { domain: string }) {
- return await prisma.delegationCredential.findMany({
+ return await prisma.domainWideDelegation.findMany({
where: { domain },
- select: delegationCredentialSafeSelect,
+ select: domainWideDelegationSafeSelect,
});
}
@@ -164,7 +164,7 @@ export class DelegationCredentialRepository {
}>;
}) {
const { workspacePlatformId, organizationId, ...rest } = data;
- return await prisma.delegationCredential.update({
+ return await prisma.domainWideDelegation.update({
where: { id },
data: {
...(workspacePlatformId && {
@@ -183,21 +183,21 @@ export class DelegationCredentialRepository {
}),
...rest,
},
- select: delegationCredentialSafeSelect,
+ select: domainWideDelegationSafeSelect,
});
}
static async deleteById({ id }: { id: string }) {
- return await prisma.delegationCredential.delete({
+ return await prisma.domainWideDelegation.delete({
where: { id },
});
}
static async findByOrgIdIncludeSensitiveServiceAccountKey({ organizationId }: { organizationId: number }) {
- return await prisma.delegationCredential.findMany({
+ return await prisma.domainWideDelegation.findMany({
where: { organizationId },
select: {
- ...delegationCredentialSelectIncludesServiceAccountKey,
+ ...domainWideDelegationSelectIncludesServiceAccountKey,
workspacePlatform: {
select: {
id: true,
diff --git a/packages/lib/server/repository/selectedCalendar.test.ts b/packages/lib/server/repository/selectedCalendar.test.ts
index 025863259aa..58468d2d940 100644
--- a/packages/lib/server/repository/selectedCalendar.test.ts
+++ b/packages/lib/server/repository/selectedCalendar.test.ts
@@ -290,13 +290,13 @@ describe("SelectedCalendarRepository", () => {
});
});
- describe("Delegation Credential", () => {
- it("should create a selected calendar with delegationCredentialId", async () => {
+ describe("Domain Wide Delegation", () => {
+ it("should create a selected calendar with domainWideDelegationCredentialId", async () => {
const data = {
userId: 1,
integration: "google_calendar",
externalId: "[email protected]",
- delegationCredentialId: "delegationCredential-123",
+ domainWideDelegationCredentialId: "dwd-123",
};
const result = await SelectedCalendarRepository.create(data);
@@ -306,7 +306,7 @@ describe("SelectedCalendarRepository", () => {
describe("upsert", () => {
describe("updation", () => {
- it("should update existing record with delegationCredentialId if credentialId is -1", async () => {
+ it("should update existing record with domainWideDelegationCredentialId if credentialId is -1", async () => {
const initialData = {
userId: 1,
integration: "google_calendar",
@@ -322,17 +322,17 @@ describe("SelectedCalendarRepository", () => {
integration: "google_calendar",
externalId: "[email protected]",
credentialId: -1,
- delegationCredentialId: "delegationCredential-123",
+ domainWideDelegationCredentialId: "dwd-123",
};
const result = await SelectedCalendarRepository.upsert(data);
expect(result.id).not.toBe(null);
expect(result.id).toBe(existingCalendar.id);
expect(result.credentialId).toBe(null);
- expect(result.delegationCredentialId).toBe(data.delegationCredentialId);
+ expect(result.domainWideDelegationCredentialId).toBe(data.domainWideDelegationCredentialId);
});
- it("should update existing record with credentialId if credentialId is valid(>0) even if delegationCredentialId is set", async () => {
+ it("should update existing record with credentialId if credentialId is valid(>0) even if domainWideDelegationCredentialId is set", async () => {
const initialData = {
userId: 1,
integration: "google_calendar",
@@ -348,19 +348,19 @@ describe("SelectedCalendarRepository", () => {
integration: "google_calendar",
externalId: "[email protected]",
credentialId: 2,
- delegationCredentialId: "delegationCredential-123",
+ domainWideDelegationCredentialId: "dwd-123",
};
const result = await SelectedCalendarRepository.upsert(data);
expect(result.id).not.toBe(null);
expect(result.id).toBe(existingCalendar.id);
expect(result.credentialId).toBe(data.credentialId);
- expect(result.delegationCredentialId).toBeNull();
+ expect(result.domainWideDelegationCredentialId).toBeNull();
});
});
describe("creation", () => {
- it("should create a new record with delegationCredentialId if credentialId is -1", async () => {
+ it("should create a new record with domainWideDelegationCredentialId if credentialId is -1", async () => {
const initialData = {
userId: 1,
integration: "google_calendar",
@@ -376,7 +376,7 @@ describe("SelectedCalendarRepository", () => {
integration: "google_calendar",
externalId: "[email protected]",
credentialId: -1,
- delegationCredentialId: "delegationCredential-123",
+ domainWideDelegationCredentialId: "dwd-123",
};
// It will create a new record because of unique constraint violation
@@ -384,17 +384,17 @@ describe("SelectedCalendarRepository", () => {
expect(result.id).not.toBe(null);
expect(result.id).not.toBe(existingCalendar.id);
expect(result.credentialId).toBe(null);
- expect(result.delegationCredentialId).toBe(data.delegationCredentialId);
+ expect(result.domainWideDelegationCredentialId).toBe(data.domainWideDelegationCredentialId);
});
});
- it("shouldnt update existing delegationCredentialId if upsert data doesn't have it", async () => {
+ it("shouldnt update existing domainWideDelegationCredentialId if upsert data doesn't have it", async () => {
const initialData = {
userId: 1,
integration: "google_calendar",
externalId: "[email protected]",
eventTypeId: null,
- delegationCredentialId: "delegationCredential-123",
+ domainWideDelegationCredentialId: "dwd-123",
credentialId: 1,
};
@@ -410,16 +410,16 @@ describe("SelectedCalendarRepository", () => {
const result = await SelectedCalendarRepository.upsert(data);
expect(result.id).toBe(existingCalendar.id);
expect(result.credentialId).toBe(existingCalendar.credentialId);
- expect(result.delegationCredentialId).toBe(null);
+ expect(result.domainWideDelegationCredentialId).toBe(null);
});
- it("shouldnt update delegationCredentialId if it is undefined", async () => {
+ it("shouldnt update domainWideDelegationCredentialId if it is undefined", async () => {
const initialData = {
userId: 1,
integration: "google_calendar",
externalId: "[email protected]",
eventTypeId: null,
- delegationCredentialId: "delegationCredential-123",
+ domainWideDelegationCredentialId: "dwd-123",
};
const existingCalendar = await SelectedCalendarRepository.create(initialData);
@@ -433,7 +433,9 @@ describe("SelectedCalendarRepository", () => {
const result = await SelectedCalendarRepository.upsert(data);
expect(result.id).toBe(existingCalendar.id);
expect(result.credentialId).toBe(existingCalendar.credentialId);
- expect(result.delegationCredentialId).toBe(existingCalendar.delegationCredentialId);
+ expect(result.domainWideDelegationCredentialId).toBe(
+ existingCalendar.domainWideDelegationCredentialId
+ );
});
});
});
diff --git a/packages/lib/server/repository/selectedCalendar.ts b/packages/lib/server/repository/selectedCalendar.ts
index 39502062ab4..8643023a2b3 100644
--- a/packages/lib/server/repository/selectedCalendar.ts
+++ b/packages/lib/server/repository/selectedCalendar.ts
@@ -82,7 +82,7 @@ export class SelectedCalendarRepository {
// So, this unique constraint can't be used in upsert. Prisma doesn't allow that, So, we do create and update separately
const credentialPayload = buildCredentialPayloadForPrisma({
credentialId: data.credentialId,
- delegationCredentialId: data.delegationCredentialId,
+ domainWideDelegationCredentialId: data.domainWideDelegationCredentialId,
});
const newData = {
diff --git a/packages/lib/server/repository/user.ts b/packages/lib/server/repository/user.ts
index a162bfb6825..4ac1f8ac363 100644
--- a/packages/lib/server/repository/user.ts
+++ b/packages/lib/server/repository/user.ts
@@ -12,7 +12,7 @@ import { userMetadata } from "@calcom/prisma/zod-utils";
import type { UpId, UserProfile } from "@calcom/types/UserProfile";
import { DEFAULT_SCHEDULE, getAvailabilityFromSchedule } from "../../availability";
-import { buildNonDelegationCredentials } from "../../delegationCredential/clientAndServer";
+import { buildNonDwdCredentials } from "../../domainWideDelegation/clientAndServer";
import { withSelectedCalendars } from "../withSelectedCalendars";
import { ProfileRepository } from "./profile";
import { getParsedTeam } from "./teamUtils";
@@ -786,7 +786,7 @@ export class UserRepository {
const { credentials, ...userWithSelectedCalendars } = withSelectedCalendars(user);
return {
...userWithSelectedCalendars,
- credentials: buildNonDelegationCredentials(credentials),
+ credentials: buildNonDwdCredentials(credentials),
};
}
diff --git a/packages/platform/atoms/destination-calendar/DestinationCalendarSelector.tsx b/packages/platform/atoms/destination-calendar/DestinationCalendarSelector.tsx
index 44ded39b5d6..e1c299e194e 100644
--- a/packages/platform/atoms/destination-calendar/DestinationCalendarSelector.tsx
+++ b/packages/platform/atoms/destination-calendar/DestinationCalendarSelector.tsx
@@ -14,7 +14,11 @@ import { getPlaceholderContent } from "../lib/getPlaceholderContent";
export type DestinationCalendarProps = {
connectedCalendars: ConnectedDestinationCalendars["connectedCalendars"];
destinationCalendar: ConnectedDestinationCalendars["destinationCalendar"];
- onChange: (value: { externalId: string; integration: string; delegationCredentialId?: string }) => void;
+ onChange: (value: {
+ externalId: string;
+ integration: string;
+ domainWideDelegationCredentialId?: string;
+ }) => void;
isPending?: boolean;
hidePlaceholder?: boolean;
value: string | undefined;
@@ -37,7 +41,7 @@ export const DestinationCalendarSelector = ({
value: string;
label: string;
subtitle: string;
- delegationCredentialId?: string;
+ domainWideDelegationCredentialId?: string;
} | null>(null);
useEffect(() => {
@@ -78,7 +82,7 @@ export const DestinationCalendarSelector = ({
selectedCalendar?.primary?.name
})`,
value: `${cal.integration}:${cal.externalId}`,
- delegationCredentialId: cal.delegationCredentialId || undefined,
+ domainWideDelegationCredentialId: cal.domainWideDelegationCredentialId || undefined,
})),
})) ?? []
);
@@ -137,7 +141,7 @@ export const DestinationCalendarSelector = ({
onChange({
integration,
externalId,
- delegationCredentialId: newValue.delegationCredentialId,
+ domainWideDelegationCredentialId: newValue.domainWideDelegationCredentialId,
});
}}
isLoading={isPending}
diff --git a/packages/platform/atoms/destination-calendar/wrappers/DestinationCalendarSettingsPlatformWrapper.tsx b/packages/platform/atoms/destination-calendar/wrappers/DestinationCalendarSettingsPlatformWrapper.tsx
index ae42a80e1c0..751d931984c 100644
--- a/packages/platform/atoms/destination-calendar/wrappers/DestinationCalendarSettingsPlatformWrapper.tsx
+++ b/packages/platform/atoms/destination-calendar/wrappers/DestinationCalendarSettingsPlatformWrapper.tsx
@@ -38,11 +38,11 @@ export const DestinationCalendarSettingsPlatformWrapper = ({
value={calendars.data.destinationCalendar.externalId}
hidePlaceholder
hideAdvancedText
- onChange={async ({ externalId, integration, delegationCredentialId }) => {
+ onChange={async ({ externalId, integration, domainWideDelegationCredentialId }) => {
await updateDestinationCalendars({
integration,
externalId,
- delegationCredentialId,
+ domainWideDelegationCredentialId,
});
}}
isPending={isUpdatingCalendar}
diff --git a/packages/platform/atoms/hooks/calendars/useAddSelectedCalendar.ts b/packages/platform/atoms/hooks/calendars/useAddSelectedCalendar.ts
index 370a01aa5d8..806b7ad050b 100644
--- a/packages/platform/atoms/hooks/calendars/useAddSelectedCalendar.ts
+++ b/packages/platform/atoms/hooks/calendars/useAddSelectedCalendar.ts
@@ -35,15 +35,15 @@ export const useAddSelectedCalendar = (
credentialId: number;
integration: string;
externalId: string;
- delegationCredentialId: string | null;
+ domainWideDelegationCredentialId: string | null;
}
>({
mutationFn: (data) => {
- const { delegationCredentialId, ...rest } = data;
+ const { domainWideDelegationCredentialId, ...rest } = data;
return http
.post(`/selected-calendars`, {
...rest,
- ...(delegationCredentialId ? { delegationCredentialId } : {}),
+ ...(domainWideDelegationCredentialId ? { domainWideDelegationCredentialId } : {}),
})
.then((res) => {
return res.data;
diff --git a/packages/platform/atoms/hooks/calendars/useRemoveSelectedCalendar.ts b/packages/platform/atoms/hooks/calendars/useRemoveSelectedCalendar.ts
index ce1df62cc0d..b30a8550263 100644
--- a/packages/platform/atoms/hooks/calendars/useRemoveSelectedCalendar.ts
+++ b/packages/platform/atoms/hooks/calendars/useRemoveSelectedCalendar.ts
@@ -35,17 +35,21 @@ export const useRemoveSelectedCalendar = (
credentialId: number;
integration: string;
externalId: string;
- delegationCredentialId: string | null;
+ domainWideDelegationCredentialId: string | null;
}
>({
mutationFn: (data) => {
- const { credentialId, externalId, integration, delegationCredentialId } = data;
+ const { credentialId, externalId, integration, domainWideDelegationCredentialId } = data;
return http
.delete(
`/selected-calendars?credentialId=${credentialId}&integration=${integration}&externalId=${encodeURIComponent(
externalId
- )}${delegationCredentialId ? `&delegationCredentialId=${delegationCredentialId}` : ""}`
+ )}${
+ domainWideDelegationCredentialId
+ ? `&domainWideDelegationCredentialId=${domainWideDelegationCredentialId}`
+ : ""
+ }`
)
.then((res) => {
return res.data;
diff --git a/packages/platform/atoms/hooks/calendars/useUpdateDestinationCalendars.ts b/packages/platform/atoms/hooks/calendars/useUpdateDestinationCalendars.ts
index a37c75239f4..ed16c8cc7ee 100644
--- a/packages/platform/atoms/hooks/calendars/useUpdateDestinationCalendars.ts
+++ b/packages/platform/atoms/hooks/calendars/useUpdateDestinationCalendars.ts
@@ -30,11 +30,11 @@ export const useUpdateDestinationCalendars = (
integration: string;
externalId: string;
credentialId: number | null;
- delegationCredentialId?: string;
+ domainWideDelegationCredentialId?: string;
};
}>,
unknown,
- { integration: string; externalId: string; delegationCredentialId?: string }
+ { integration: string; externalId: string; domainWideDelegationCredentialId?: string }
>({
mutationFn: (data) => {
return http.put(`/destination-calendars`, data).then((res) => {
diff --git a/packages/platform/atoms/selected-calendars/wrappers/SelectedCalendarsSettingsPlatformWrapper.tsx b/packages/platform/atoms/selected-calendars/wrappers/SelectedCalendarsSettingsPlatformWrapper.tsx
index 0f26e079a39..3d87e9a5616 100644
--- a/packages/platform/atoms/selected-calendars/wrappers/SelectedCalendarsSettingsPlatformWrapper.tsx
+++ b/packages/platform/atoms/selected-calendars/wrappers/SelectedCalendarsSettingsPlatformWrapper.tsx
@@ -83,7 +83,7 @@ export const SelectedCalendarsSettingsPlatformWrapper = ({
className="border-subtle mt-4 rounded-lg border"
actions={
<div className="flex w-32 justify-end">
- {allowDelete && !connectedCalendar.delegationCredentialId && (
+ {allowDelete && !connectedCalendar.domainWideDelegationCredentialId && (
<PlatformDisconnectIntegration
credentialId={connectedCalendar.credentialId}
trashIcon
@@ -107,7 +107,9 @@ export const SelectedCalendarsSettingsPlatformWrapper = ({
isChecked={cal.isSelected}
destination={cal.externalId === destinationCalendarId}
credentialId={cal.credentialId}
- delegationCredentialId={connectedCalendar.delegationCredentialId}
+ domainWideDelegationCredentialId={
+ connectedCalendar.domainWideDelegationCredentialId
+ }
eventTypeId={null}
/>
);
@@ -125,7 +127,7 @@ export const SelectedCalendarsSettingsPlatformWrapper = ({
message={<span>{connectedCalendar.error?.message || t("calendar_error")}</span>}
iconClassName="h-10 w-10 ml-2 mr-1 mt-0.5"
actions={
- !Boolean(connectedCalendar.delegationCredentialId) && (
+ !Boolean(connectedCalendar.domainWideDelegationCredentialId) && (
<div className="flex w-32 justify-end">
<PlatformDisconnectIntegration
credentialId={connectedCalendar.credentialId}
@@ -220,7 +222,7 @@ const PlatformDisconnectIntegration = (props: {
};
const PlatformCalendarSwitch = (props: ICalendarSwitchProps) => {
- const { isChecked, title, credentialId, type, externalId, delegationCredentialId } = props;
+ const { isChecked, title, credentialId, type, externalId, domainWideDelegationCredentialId } = props;
const [checkedInternal, setCheckedInternal] = useState(isChecked);
const { toast } = useToast();
@@ -253,13 +255,13 @@ const PlatformCalendarSwitch = (props: ICalendarSwitchProps) => {
externalId: string;
}) => {
if (isOn) {
- await addSelectedCalendar({ credentialId, integration, externalId, delegationCredentialId });
+ await addSelectedCalendar({ credentialId, integration, externalId, domainWideDelegationCredentialId });
} else {
await removeSelectedCalendar({
credentialId,
integration,
externalId,
- delegationCredentialId,
+ domainWideDelegationCredentialId,
});
}
};
diff --git a/packages/platform/atoms/selected-calendars/wrappers/SelectedCalendarsSettingsWebWrapper.tsx b/packages/platform/atoms/selected-calendars/wrappers/SelectedCalendarsSettingsWebWrapper.tsx
index 267211267ea..896b73cd7c5 100644
--- a/packages/platform/atoms/selected-calendars/wrappers/SelectedCalendarsSettingsWebWrapper.tsx
+++ b/packages/platform/atoms/selected-calendars/wrappers/SelectedCalendarsSettingsWebWrapper.tsx
@@ -65,8 +65,8 @@ const ConnectedCalendarList = ({
description={connectedCalendar.primary?.email ?? connectedCalendar.integration.description}
className="border-subtle mt-4 rounded-lg border"
actions={
- // Delegation credential can't be disconnected
- !connectedCalendar.delegationCredentialId &&
+ // DWD credential can't be disconnected
+ !connectedCalendar.domainWideDelegationCredentialId &&
!disableConnectionModification && (
<div className="flex w-32 justify-end">
<DisconnectIntegration
@@ -95,7 +95,9 @@ const ConnectedCalendarList = ({
destination={cal.externalId === destinationCalendarId}
credentialId={cal.credentialId}
eventTypeId={shouldUseEventTypeScope ? eventTypeId : null}
- delegationCredentialId={connectedCalendar.delegationCredentialId}
+ domainWideDelegationCredentialId={
+ connectedCalendar.domainWideDelegationCredentialId
+ }
/>
))}
</ul>
@@ -120,8 +122,8 @@ const ConnectedCalendarList = ({
}
iconClassName="h-10 w-10 ml-2 mr-1 mt-0.5"
actions={
- // Delegation credential can't be disconnected
- !connectedCalendar.delegationCredentialId && (
+ // DWD credential can't be disconnected
+ !connectedCalendar.domainWideDelegationCredentialId && (
<div className="flex w-32 justify-end">
<DisconnectIntegration
credentialId={connectedCalendar.credentialId}
diff --git a/packages/platform/libraries/index.ts b/packages/platform/libraries/index.ts
index 3a83296af60..0421653b22a 100644
--- a/packages/platform/libraries/index.ts
+++ b/packages/platform/libraries/index.ts
@@ -32,19 +32,19 @@ import getEnabledAppsFromCredentials from "@calcom/lib/apps/getEnabledAppsFromCr
import getAllUserBookings from "@calcom/lib/bookings/getAllUserBookings";
import { symmetricEncrypt, symmetricDecrypt } from "@calcom/lib/crypto";
import {
- getFirstDelegationConferencingCredentialAppLocation,
- getFirstDelegationConferencingCredential,
- getDelegationCredentialOrRegularCredential,
- getDelegationCredentialOrFindRegularCredential,
- enrichUserWithDelegationConferencingCredentialsWithoutOrgId,
- enrichUserWithDelegationCredentialsWithoutOrgId,
- enrichHostsWithDelegationCredentials,
- enrichUsersWithDelegationCredentials,
+ getFirstDwdConferencingCredentialAppLocation,
+ getFirstDwdConferencingCredential,
+ getDwdOrRegularCredential,
+ getDwdOrFindRegularCredential,
+ enrichUserWithDwdConferencingCredentialsWithoutOrgId,
+ enrichUserWithDwdCredentialsWithoutOrgId,
+ enrichHostsWithDwdCredentials,
+ enrichUsersWithDwdCredentials,
buildAllCredentials,
- getAllDelegationCredentialsForUserByAppSlug,
- getAllDelegationCredentialsForUserByAppType,
+ getAllDwdCredentialsForUserByAppSlug,
+ getAllDwdCredentialsForUserByAppType,
checkIfSuccessfullyConfiguredInWorkspace,
-} from "@calcom/lib/delegationCredential/server";
+} from "@calcom/lib/domainWideDelegation/server";
import getBulkEventTypes from "@calcom/lib/event-types/getBulkEventTypes";
import { getRoutedUrl } from "@calcom/lib/server/getRoutedUrl";
import { getTeamMemberEmailForResponseOrContactUsingUrlQuery } from "@calcom/lib/server/getTeamMemberEmailFromCrm";
@@ -54,7 +54,7 @@ import { credentialForCalendarServiceSelect } from "@calcom/prisma/selects/crede
import { paymentDataSelect } from "@calcom/prisma/selects/payment";
import type { TeamQuery } from "@calcom/trpc/server/routers/loggedInViewer/integrations.handler";
import { updateHandler as updateScheduleHandler } from "@calcom/trpc/server/routers/viewer/availability/schedule/update.handler";
-import addDelegationCredential from "@calcom/trpc/server/routers/viewer/delegationCredential/add.handler";
+import addDwd from "@calcom/trpc/server/routers/viewer/domainWideDelegation/add.handler";
import { getAvailableSlots } from "@calcom/trpc/server/routers/viewer/slots/util";
import {
createNewUsersConnectToOrgIfExists,
@@ -68,17 +68,17 @@ export { getUsersCredentials } from "@calcom/lib/server/getUsersCredentials";
export { getApps };
export {
- getFirstDelegationConferencingCredentialAppLocation,
- getFirstDelegationConferencingCredential,
- getDelegationCredentialOrRegularCredential,
- getDelegationCredentialOrFindRegularCredential,
- enrichUserWithDelegationConferencingCredentialsWithoutOrgId,
- enrichUserWithDelegationCredentialsWithoutOrgId,
- enrichHostsWithDelegationCredentials,
- enrichUsersWithDelegationCredentials,
+ getFirstDwdConferencingCredentialAppLocation,
+ getFirstDwdConferencingCredential,
+ getDwdOrRegularCredential,
+ getDwdOrFindRegularCredential,
+ enrichUserWithDwdConferencingCredentialsWithoutOrgId,
+ enrichUserWithDwdCredentialsWithoutOrgId,
+ enrichHostsWithDwdCredentials,
+ enrichUsersWithDwdCredentials,
buildAllCredentials,
- getAllDelegationCredentialsForUserByAppSlug,
- getAllDelegationCredentialsForUserByAppType,
+ getAllDwdCredentialsForUserByAppSlug,
+ getAllDwdCredentialsForUserByAppType,
checkIfSuccessfullyConfiguredInWorkspace,
};
@@ -276,9 +276,9 @@ export { getRoutedUrl };
export { getTeamMemberEmailForResponseOrContactUsingUrlQuery };
-export { addDelegationCredential };
+export { addDwd };
export { SelectedCalendarRepository } from "@calcom/lib/server/repository/selectedCalendar";
-export { toggleDelegationCredentialEnabled } from "@calcom/trpc/server/routers/viewer/delegationCredential/toggleEnabled.handler";
+export { toggleDwdEnabled } from "@calcom/trpc/server/routers/viewer/domainWideDelegation/toggleEnabled.handler";
export { encryptServiceAccountKey } from "@calcom/lib/server/serviceAccountKey";
export { createHandler as createApiKeyHandler } from "@calcom/trpc/server/routers/viewer/apiKeys/create.handler";
diff --git a/packages/prisma/migrations/20250304093009_rename_dwd_to_delegation_credentials/migration.sql b/packages/prisma/migrations/20250304093009_rename_dwd_to_delegation_credentials/migration.sql
deleted file mode 100644
index 50795e7ce1a..00000000000
--- a/packages/prisma/migrations/20250304093009_rename_dwd_to_delegation_credentials/migration.sql
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- Warnings:
-
- - You are about to drop the column `domainWideDelegationCredentialId` on the `BookingReference` table. All the data in the column will be lost.
- - You are about to drop the column `domainWideDelegationCredentialId` on the `DestinationCalendar` table. All the data in the column will be lost.
- - You are about to drop the column `domainWideDelegationCredentialId` on the `SelectedCalendar` table. All the data in the column will be lost.
- - You are about to drop the `DomainWideDelegation` table. If the table is not empty, all the data it contains will be lost.
-
-*/
--- DropForeignKey
-ALTER TABLE "BookingReference" DROP CONSTRAINT "BookingReference_domainWideDelegationCredentialId_fkey";
-
--- DropForeignKey
-ALTER TABLE "DestinationCalendar" DROP CONSTRAINT "DestinationCalendar_domainWideDelegationCredentialId_fkey";
-
--- DropForeignKey
-ALTER TABLE "DomainWideDelegation" DROP CONSTRAINT "DomainWideDelegation_organizationId_fkey";
-
--- DropForeignKey
-ALTER TABLE "DomainWideDelegation" DROP CONSTRAINT "DomainWideDelegation_workspacePlatformId_fkey";
-
--- DropForeignKey
-ALTER TABLE "SelectedCalendar" DROP CONSTRAINT "SelectedCalendar_domainWideDelegationCredentialId_fkey";
-
--- AlterTable
-ALTER TABLE "BookingReference" DROP COLUMN "domainWideDelegationCredentialId",
-ADD COLUMN "delegationCredentialId" TEXT;
-
--- AlterTable
-ALTER TABLE "DestinationCalendar" DROP COLUMN "domainWideDelegationCredentialId",
-ADD COLUMN "delegationCredentialId" TEXT;
-
--- AlterTable
-ALTER TABLE "SelectedCalendar" DROP COLUMN "domainWideDelegationCredentialId",
-ADD COLUMN "delegationCredentialId" TEXT;
-
-
--- CreateTable
-CREATE TABLE "DelegationCredential" (
- "id" TEXT NOT NULL,
- "workspacePlatformId" INTEGER NOT NULL,
- "serviceAccountKey" JSONB NOT NULL,
- "enabled" BOOLEAN NOT NULL DEFAULT false,
- "organizationId" INTEGER NOT NULL,
- "domain" TEXT NOT NULL,
- "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
- "updatedAt" TIMESTAMP(3) NOT NULL,
-
- CONSTRAINT "DelegationCredential_pkey" PRIMARY KEY ("id")
-);
-
--- CreateIndex
-CREATE UNIQUE INDEX "DelegationCredential_organizationId_domain_key" ON "DelegationCredential"("organizationId", "domain");
-
--- AddForeignKey
-ALTER TABLE "DestinationCalendar" ADD CONSTRAINT "DestinationCalendar_delegationCredentialId_fkey" FOREIGN KEY ("delegationCredentialId") REFERENCES "DelegationCredential"("id") ON DELETE CASCADE ON UPDATE CASCADE;
-
--- AddForeignKey
-ALTER TABLE "BookingReference" ADD CONSTRAINT "BookingReference_delegationCredentialId_fkey" FOREIGN KEY ("delegationCredentialId") REFERENCES "DelegationCredential"("id") ON DELETE SET NULL ON UPDATE CASCADE;
-
--- AddForeignKey
-ALTER TABLE "SelectedCalendar" ADD CONSTRAINT "SelectedCalendar_delegationCredentialId_fkey" FOREIGN KEY ("delegationCredentialId") REFERENCES "DelegationCredential"("id") ON DELETE CASCADE ON UPDATE CASCADE;
-
--- AddForeignKey
-ALTER TABLE "DelegationCredential" ADD CONSTRAINT "DelegationCredential_workspacePlatformId_fkey" FOREIGN KEY ("workspacePlatformId") REFERENCES "WorkspacePlatform"("id") ON DELETE CASCADE ON UPDATE CASCADE;
-
--- AddForeignKey
-ALTER TABLE "DelegationCredential" ADD CONSTRAINT "DelegationCredential_organizationId_fkey" FOREIGN KEY ("organizationId") REFERENCES "Team"("id") ON DELETE CASCADE ON UPDATE CASCADE;
diff --git a/packages/prisma/schema.prisma b/packages/prisma/schema.prisma
index 06438462f88..58a233e46a3 100644
--- a/packages/prisma/schema.prisma
+++ b/packages/prisma/schema.prisma
@@ -225,20 +225,20 @@ enum IdentityProvider {
}
model DestinationCalendar {
- id Int @id @default(autoincrement())
- integration String
- externalId String
+ id Int @id @default(autoincrement())
+ integration String
+ externalId String
/// @zod.custom(imports.emailSchema)
- primaryEmail String?
- user User? @relation(fields: [userId], references: [id], onDelete: Cascade)
- userId Int? @unique
- booking Booking[]
- eventType EventType? @relation(fields: [eventTypeId], references: [id], onDelete: Cascade)
- eventTypeId Int? @unique
- credentialId Int?
- credential Credential? @relation(fields: [credentialId], references: [id], onDelete: Cascade)
- delegationCredential DelegationCredential? @relation(fields: [delegationCredentialId], references: [id], onDelete: Cascade)
- delegationCredentialId String?
+ primaryEmail String?
+ user User? @relation(fields: [userId], references: [id], onDelete: Cascade)
+ userId Int? @unique
+ booking Booking[]
+ eventType EventType? @relation(fields: [eventTypeId], references: [id], onDelete: Cascade)
+ eventTypeId Int? @unique
+ credentialId Int?
+ credential Credential? @relation(fields: [credentialId], references: [id], onDelete: Cascade)
+ domainWideDelegation DomainWideDelegation? @relation(fields: [domainWideDelegationCredentialId], references: [id], onDelete: Cascade)
+ domainWideDelegationCredentialId String?
@@index([userId])
@@index([eventTypeId])
@@ -480,7 +480,7 @@ model Team {
attributes Attribute[]
smsLockReviewedByAdmin Boolean @default(false)
// Available for Organization only
- delegationCredentials DelegationCredential[]
+ domainWideDelegations DomainWideDelegation[]
features TeamFeatures[]
/// @zod.custom(imports.intervalLimitsType)
@@ -591,10 +591,10 @@ model BookingReference {
externalCalendarId String?
deleted Boolean?
- credential Credential? @relation(fields: [credentialId], references: [id], onDelete: SetNull)
- credentialId Int?
- delegationCredential DelegationCredential? @relation(fields: [delegationCredentialId], references: [id], onDelete: SetNull)
- delegationCredentialId String?
+ credential Credential? @relation(fields: [credentialId], references: [id], onDelete: SetNull)
+ credentialId Int?
+ domainWideDelegation DomainWideDelegation? @relation(fields: [domainWideDelegationCredentialId], references: [id], onDelete: SetNull)
+ domainWideDelegationCredentialId String?
@@index([bookingId])
@@index([type])
@@ -731,22 +731,22 @@ model Availability {
}
model SelectedCalendar {
- id String @id @default(uuid())
- user User @relation(fields: [userId], references: [id], onDelete: Cascade)
- userId Int
- integration String
- externalId String
- credential Credential? @relation(fields: [credentialId], references: [id], onDelete: Cascade)
- credentialId Int?
+ id String @id @default(uuid())
+ user User @relation(fields: [userId], references: [id], onDelete: Cascade)
+ userId Int
+ integration String
+ externalId String
+ credential Credential? @relation(fields: [credentialId], references: [id], onDelete: Cascade)
+ credentialId Int?
// Used to identify a watched calendar channel in Google Calendar
- googleChannelId String?
- googleChannelKind String?
- googleChannelResourceId String?
- googleChannelResourceUri String?
- googleChannelExpiration String?
- delegationCredential DelegationCredential? @relation(fields: [delegationCredentialId], references: [id], onDelete: Cascade)
- delegationCredentialId String?
- error String?
+ googleChannelId String?
+ googleChannelKind String?
+ googleChannelResourceId String?
+ googleChannelResourceUri String?
+ googleChannelExpiration String?
+ domainWideDelegationCredential DomainWideDelegation? @relation(fields: [domainWideDelegationCredentialId], references: [id], onDelete: Cascade)
+ domainWideDelegationCredentialId String?
+ error String?
eventTypeId Int?
eventType EventType? @relation(fields: [eventTypeId], references: [id])
@@ -1767,7 +1767,7 @@ enum EventTypeAutoTranslatedField {
TITLE
}
-model DelegationCredential {
+model DomainWideDelegation {
id String @id @default(uuid())
workspacePlatform WorkspacePlatform @relation(fields: [workspacePlatformId], references: [id], onDelete: Cascade)
workspacePlatformId Int
@@ -1789,7 +1789,7 @@ model DelegationCredential {
@@unique([organizationId, domain])
}
-// It is for delegation credential
+// It is for domain-wide delegation
model WorkspacePlatform {
id Int @id @default(autoincrement())
/// @zod.min(1)
@@ -1802,7 +1802,7 @@ model WorkspacePlatform {
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
enabled Boolean @default(false)
- delegationCredentials DelegationCredential[]
+ domainWideDelegations DomainWideDelegation[]
@@unique([slug])
}
diff --git a/packages/trpc/react/shared.ts b/packages/trpc/react/shared.ts
index b826a0526df..6290b3c6d57 100644
--- a/packages/trpc/react/shared.ts
+++ b/packages/trpc/react/shared.ts
@@ -30,7 +30,7 @@ export const ENDPOINTS = [
"googleWorkspace",
"oAuth",
"attributes",
- "delegationCredential",
+ "domainWideDelegation",
"routingForms",
- "delegationCredential",
+ "domainWideDelegation",
] as const;
diff --git a/packages/trpc/server/routers/loggedInViewer/appCredentialsByType.handler.ts b/packages/trpc/server/routers/loggedInViewer/appCredentialsByType.handler.ts
index 5ad4ca7eead..b75c44a4d19 100644
--- a/packages/trpc/server/routers/loggedInViewer/appCredentialsByType.handler.ts
+++ b/packages/trpc/server/routers/loggedInViewer/appCredentialsByType.handler.ts
@@ -1,4 +1,4 @@
-import { getAllDelegationCredentialsForUserByAppType } from "@calcom/lib/delegationCredential/server";
+import { getAllDwdCredentialsForUserByAppType } from "@calcom/lib/domainWideDelegation/server";
import { UserRepository } from "@calcom/lib/server/repository/user";
import { prisma } from "@calcom/prisma";
import type { TrpcSessionUser } from "@calcom/trpc/server/trpc";
@@ -44,7 +44,7 @@ export const appCredentialsByTypeHandler = async ({ ctx, input }: AppCredentials
},
});
- const delegationCredentials = await getAllDelegationCredentialsForUserByAppType({
+ const dwdCredentials = await getAllDwdCredentialsForUserByAppType({
user: { id: user.id, email: user.email },
appType: input.appType,
});
@@ -52,7 +52,7 @@ export const appCredentialsByTypeHandler = async ({ ctx, input }: AppCredentials
// For app pages need to return which teams the user can install the app on
// return user.credentials.filter((app) => app.type == input.appType).map((credential) => credential.id);
return {
- credentials: [...delegationCredentials, ...credentials],
+ credentials: [...dwdCredentials, ...credentials],
userAdminTeams: userAdminTeamsIds,
};
};
diff --git a/packages/trpc/server/routers/loggedInViewer/getUserTopBanners.handler.ts b/packages/trpc/server/routers/loggedInViewer/getUserTopBanners.handler.ts
index dedd6582175..41856d43415 100644
--- a/packages/trpc/server/routers/loggedInViewer/getUserTopBanners.handler.ts
+++ b/packages/trpc/server/routers/loggedInViewer/getUserTopBanners.handler.ts
@@ -1,5 +1,5 @@
import { getCalendarCredentials, getConnectedCalendars } from "@calcom/lib/CalendarManager";
-import { buildNonDelegationCredentials } from "@calcom/lib/delegationCredential/server";
+import { buildNonDwdCredentials } from "@calcom/lib/domainWideDelegation/server";
import { prisma } from "@calcom/prisma";
import { credentialForCalendarServiceSelect } from "@calcom/prisma/selects/credential";
import type { TrpcSessionUser } from "@calcom/trpc/server/trpc";
@@ -24,8 +24,8 @@ const checkInvalidGoogleCalendarCredentials = async ({ ctx }: Props) => {
select: credentialForCalendarServiceSelect,
});
- // TODO: Call top buildNonDelegationCredentials here can be avoided by moving credential prisma query to repository.
- const calendarCredentials = getCalendarCredentials(buildNonDelegationCredentials(userCredentials));
+ // TODO: Call top buildNonDwdCredentials here can be avoided by moving credential prisma query to repository.
+ const calendarCredentials = getCalendarCredentials(buildNonDwdCredentials(userCredentials));
const { connectedCalendars } = await getConnectedCalendars(
calendarCredentials,
diff --git a/packages/trpc/server/routers/loggedInViewer/setDestinationCalendar.handler.test.ts b/packages/trpc/server/routers/loggedInViewer/setDestinationCalendar.handler.test.ts
index 38a0d783867..7f0f991ce50 100644
--- a/packages/trpc/server/routers/loggedInViewer/setDestinationCalendar.handler.test.ts
+++ b/packages/trpc/server/routers/loggedInViewer/setDestinationCalendar.handler.test.ts
@@ -6,7 +6,7 @@ import {
getOrganizer,
getScenarioData,
createOrganization,
- createDelegationCredential,
+ createDwdCredential,
} from "@calcom/web/test/utils/bookingScenario/bookingScenario";
import { setupAndTeardown } from "@calcom/web/test/utils/bookingScenario/setupAndTeardown";
@@ -28,7 +28,7 @@ vi.mock("@calcom/lib/CalendarManager", () => ({
describe("setDestinationCalendarHandler", () => {
setupAndTeardown();
- it("should successfully set destination calendar with DelegationCredential credentials", async () => {
+ it("should successfully set destination calendar with DWD credentials", async () => {
const org = await createOrganization({
name: "Test Org",
slug: "testorg",
@@ -73,9 +73,9 @@ describe("setDestinationCalendarHandler", () => {
],
});
- const delegationCredential = await createDelegationCredential(org.id);
+ const dwd = await createDwdCredential(org.id);
- const delegationCredentialId = delegationCredential.id;
+ const dwdCredentialId = dwd.id;
const testExternalId = "[email protected]";
// Mock the getConnectedCalendars response
@@ -90,7 +90,7 @@ describe("setDestinationCalendarHandler", () => {
primary: true,
email: organizer.email,
credentialId: -1,
- delegationCredentialId: delegationCredentialId,
+ domainWideDelegationCredentialId: dwdCredentialId,
},
{
externalId: testExternalId,
@@ -99,7 +99,7 @@ describe("setDestinationCalendarHandler", () => {
primary: null,
email: organizer.email,
credentialId: -1,
- delegationCredentialId: delegationCredentialId,
+ domainWideDelegationCredentialId: dwdCredentialId,
},
],
},
@@ -129,7 +129,7 @@ describe("setDestinationCalendarHandler", () => {
integration: "google_calendar",
externalId: testExternalId,
credentialId: null,
- delegationCredentialId: delegationCredentialId,
+ domainWideDelegationCredentialId: dwdCredentialId,
},
],
},
@@ -146,7 +146,7 @@ describe("setDestinationCalendarHandler", () => {
integration: "google_calendar",
externalId: testExternalId,
credentialId: null,
- delegationCredentialId: delegationCredentialId,
+ domainWideDelegationCredentialId: dwdCredentialId,
},
],
} as NonNullable<TrpcSessionUser>,
@@ -172,7 +172,7 @@ describe("setDestinationCalendarHandler", () => {
integration: "google_calendar",
externalId: testExternalId,
credentialId: null,
- delegationCredentialId: delegationCredentialId,
+ domainWideDelegationCredentialId: dwdCredentialId,
})
);
});
diff --git a/packages/trpc/server/routers/loggedInViewer/setDestinationCalendar.handler.ts b/packages/trpc/server/routers/loggedInViewer/setDestinationCalendar.handler.ts
index de0f876ba92..bcecad70172 100644
--- a/packages/trpc/server/routers/loggedInViewer/setDestinationCalendar.handler.ts
+++ b/packages/trpc/server/routers/loggedInViewer/setDestinationCalendar.handler.ts
@@ -33,11 +33,11 @@ export const getFirstConnectedCalendar = ({
}) => {
const calendars = connectedCalendars.flatMap((c) => c.calendars ?? []);
const matchingCalendars = calendars.filter(matcher);
- const delegationCredentialCalendar = matchingCalendars.find((cal) => !!cal.delegationCredentialId);
+ const dwdCredentialCalendar = matchingCalendars.find((cal) => !!cal.domainWideDelegationCredentialId);
- // Prefer Delegation credential calendar as there could be other one due to existing connections even after DelegationCredential is enabled.
- if (delegationCredentialCalendar) {
- return delegationCredentialCalendar;
+ // Prefer DWD credential calendar as there could be other one due to existing connections even after DWD is enabled.
+ if (dwdCredentialCalendar) {
+ return dwdCredentialCalendar;
} else {
return matchingCalendars[0];
}
@@ -48,8 +48,8 @@ export const getFirstConnectedCalendar = ({
* Also, DestinationCalendar doesn't have unique constraint on externalId, integration and eventTypeId, so there could be multiple destinationCalendars with same externalId, integration and eventTypeId in DB.
* So, it could update any of the destinationCalendar when there are duplicates in DB. Ideally we should have unique constraint on externalId, integration and eventTypeId.
*
- * With the addition of Delegation credential, it adds another dimension to the problem.
- * A user could have DelegationCredential and non-Delegation credential for the same calendar and he might be selecting Delegation credential connected calendar but it could still be set with nullish destinationCalendar.delegationCredentialId.
+ * With the addition of DWD credential, it adds another dimension to the problem.
+ * A user could have DWD and non-DWD credential for the same calendar and he might be selecting DWD credential connected calendar but it could still be set with nullish destinationCalendar.domainWideDelegationCredentialId.
*/
export const setDestinationCalendarHandler = async ({ ctx, input }: SetDestinationCalendarOptions) => {
const { user } = ctx;
@@ -69,11 +69,11 @@ export const setDestinationCalendarHandler = async ({ ctx, input }: SetDestinati
cal.externalId === externalId && cal.integration === integration && cal.readOnly === false,
});
- const { credentialId, delegationCredentialId } = firstConnectedCalendar || {};
+ const { credentialId, domainWideDelegationCredentialId } = firstConnectedCalendar || {};
let where;
- if (!credentialId && !delegationCredentialId) {
+ if (!credentialId && !domainWideDelegationCredentialId) {
throw new TRPCError({ code: "BAD_REQUEST", message: `Could not find calendar ${input.externalId}` });
}
@@ -81,7 +81,8 @@ export const setDestinationCalendarHandler = async ({ ctx, input }: SetDestinati
allCals.find(
(cal) =>
cal.primary &&
- (cal.credentialId === credentialId || cal.delegationCredentialId === delegationCredentialId)
+ (cal.credentialId === credentialId ||
+ cal.domainWideDelegationCredentialId === domainWideDelegationCredentialId)
)?.email ?? null;
if (eventTypeId) {
@@ -109,7 +110,7 @@ export const setDestinationCalendarHandler = async ({ ctx, input }: SetDestinati
externalId,
primaryEmail,
credentialId,
- delegationCredentialId,
+ domainWideDelegationCredentialId,
},
create: {
...where,
@@ -117,7 +118,7 @@ export const setDestinationCalendarHandler = async ({ ctx, input }: SetDestinati
externalId,
primaryEmail,
credentialId,
- delegationCredentialId,
+ domainWideDelegationCredentialId,
},
});
};
diff --git a/packages/trpc/server/routers/viewer/_router.tsx b/packages/trpc/server/routers/viewer/_router.tsx
index b1fff5d14e5..f0eaaee1cd1 100644
--- a/packages/trpc/server/routers/viewer/_router.tsx
+++ b/packages/trpc/server/routers/viewer/_router.tsx
@@ -15,8 +15,8 @@ import { attributesRouter } from "./attributes/_router";
import { authRouter } from "./auth/_router";
import { availabilityRouter } from "./availability/_router";
import { bookingsRouter } from "./bookings/_router";
-import { delegationCredentialRouter } from "./delegationCredential/_router";
import { deploymentSetupRouter } from "./deploymentSetup/_router";
+import { domainWideDelegationRouter } from "./domainWideDelegation/_router";
import { dsyncRouter } from "./dsync/_router";
import { eventTypesRouter } from "./eventTypes/_router";
import { googleWorkspaceRouter } from "./googleWorkspace/_router";
@@ -45,7 +45,7 @@ export const viewerRouter = mergeRouters(
teams: viewerTeamsRouter,
timezones: timezonesRouter,
organizations: viewerOrganizationsRouter,
- delegationCredential: delegationCredentialRouter,
+ domainWideDelegation: domainWideDelegationRouter,
webhook: webhookRouter,
apiKeys: apiKeysRouter,
slots: slotsRouter,
diff --git a/packages/trpc/server/routers/viewer/apps/queryForDependencies.handler.ts b/packages/trpc/server/routers/viewer/apps/queryForDependencies.handler.ts
index f78f8d991a6..cfaa0177561 100644
--- a/packages/trpc/server/routers/viewer/apps/queryForDependencies.handler.ts
+++ b/packages/trpc/server/routers/viewer/apps/queryForDependencies.handler.ts
@@ -1,5 +1,5 @@
import { getAppFromSlug } from "@calcom/app-store/utils";
-import { getAllDelegationCredentialsForUserByAppSlug } from "@calcom/lib/delegationCredential/server";
+import { getAllDwdCredentialsForUserByAppSlug } from "@calcom/lib/domainWideDelegation/server";
import { prisma } from "@calcom/prisma";
import type { TrpcSessionUser } from "../../../trpc";
@@ -27,11 +27,11 @@ export const queryForDependenciesHandler = async ({ ctx, input }: QueryForDepend
},
});
- const delegationCredentials = await getAllDelegationCredentialsForUserByAppSlug({
+ const dwdCredentials = await getAllDwdCredentialsForUserByAppSlug({
user: ctx.user,
appSlug: appId,
});
- const appInstalled = !!dbCredential || !!delegationCredentials.length;
+ const appInstalled = !!dbCredential || !!dwdCredentials.length;
const app = getAppFromSlug(dependency);
diff --git a/packages/trpc/server/routers/viewer/availability/calendarOverlay.handler.ts b/packages/trpc/server/routers/viewer/availability/calendarOverlay.handler.ts
index 4eabb84432f..6fb4f30a012 100644
--- a/packages/trpc/server/routers/viewer/availability/calendarOverlay.handler.ts
+++ b/packages/trpc/server/routers/viewer/availability/calendarOverlay.handler.ts
@@ -1,6 +1,6 @@
import dayjs from "@calcom/dayjs";
import { getBusyCalendarTimes } from "@calcom/lib/CalendarManager";
-import { enrichUserWithDelegationCredentialsWithoutOrgId } from "@calcom/lib/delegationCredential/server";
+import { enrichUserWithDwdCredentialsWithoutOrgId } from "@calcom/lib/domainWideDelegation/server";
import { prisma } from "@calcom/prisma";
import type { EventBusyDate } from "@calcom/types/Calendar";
@@ -30,7 +30,7 @@ export const calendarOverlayHandler = async ({ ctx, input }: ListOptions) => {
// To call getCalendar we need
// Ensure that the user has access to all of the credentialIds
- const nonDelegationCredentials = await prisma.credential.findMany({
+ const nonDwdCredentials = await prisma.credential.findMany({
where: {
id: {
in: uniqueCredentialIds,
@@ -53,10 +53,10 @@ export const calendarOverlayHandler = async ({ ctx, input }: ListOptions) => {
},
});
- const { credentials } = await enrichUserWithDelegationCredentialsWithoutOrgId({
+ const { credentials } = await enrichUserWithDwdCredentialsWithoutOrgId({
user: {
...user,
- credentials: nonDelegationCredentials,
+ credentials: nonDwdCredentials,
},
});
diff --git a/packages/trpc/server/routers/viewer/bookings/requestReschedule.handler.ts b/packages/trpc/server/routers/viewer/bookings/requestReschedule.handler.ts
index 0aeb7cc39d7..92db3fbf49d 100644
--- a/packages/trpc/server/routers/viewer/bookings/requestReschedule.handler.ts
+++ b/packages/trpc/server/routers/viewer/bookings/requestReschedule.handler.ts
@@ -11,7 +11,7 @@ import sendPayload from "@calcom/features/webhooks/lib/sendOrSchedulePayload";
import { isPrismaObjOrUndefined } from "@calcom/lib";
import { CalendarEventBuilder } from "@calcom/lib/builders/CalendarEvent/builder";
import { CalendarEventDirector } from "@calcom/lib/builders/CalendarEvent/director";
-import { getDelegationCredentialOrRegularCredential } from "@calcom/lib/delegationCredential/server";
+import { getDwdOrRegularCredential } from "@calcom/lib/domainWideDelegation/server";
import { getBookerBaseUrl } from "@calcom/lib/getBookerUrl/server";
import getOrgIdFromMemberOrTeamId from "@calcom/lib/getOrgIdFromMemberOrTeamId";
import { getTeamIdFromEventType } from "@calcom/lib/getTeamIdFromEventType";
@@ -240,22 +240,22 @@ export const requestRescheduleHandler = async ({ ctx, input }: RequestReschedule
if (bookingRef.type.endsWith("_calendar")) {
const calendar = await getCalendar(
- getDelegationCredentialOrRegularCredential({
+ getDwdOrRegularCredential({
credentials,
id: {
credentialId: bookingRef?.credentialId,
- delegationCredentialId: bookingRef?.delegationCredentialId,
+ dwdId: bookingRef?.domainWideDelegationCredentialId,
},
})
);
return calendar?.deleteEvent(bookingRef.uid, builder.calendarEvent, bookingRef.externalCalendarId);
} else if (bookingRef.type.endsWith("_video")) {
return deleteMeeting(
- getDelegationCredentialOrRegularCredential({
+ getDwdOrRegularCredential({
credentials,
id: {
credentialId: bookingRef?.credentialId,
- delegationCredentialId: bookingRef?.delegationCredentialId,
+ dwdId: bookingRef?.domainWideDelegationCredentialId,
},
}),
bookingRef.uid
diff --git a/packages/trpc/server/routers/viewer/delegationCredential/delete.handler.ts b/packages/trpc/server/routers/viewer/delegationCredential/delete.handler.ts
deleted file mode 100644
index b8d7db6beb8..00000000000
--- a/packages/trpc/server/routers/viewer/delegationCredential/delete.handler.ts
+++ /dev/null
@@ -1,21 +0,0 @@
-import type z from "zod";
-
-import { DelegationCredentialRepository } from "@calcom/lib/server/repository/delegationCredential";
-
-import { TRPCError } from "@trpc/server";
-
-import type { DelegationCredentialDeleteSchema } from "./schema";
-
-export default async function handler({
- input,
-}: {
- input: z.infer<typeof DelegationCredentialDeleteSchema>;
-}) {
- const { id } = input;
-
- // We might want to consider allowing this in the future. Right now, toggling off DelegationCredential achieves similar but non-destructive effect
- throw new TRPCError({ code: "BAD_REQUEST", message: "Not allowed" });
- await DelegationCredentialRepository.deleteById({ id });
-
- return { id };
-}
diff --git a/packages/trpc/server/routers/viewer/delegationCredential/_router.ts b/packages/trpc/server/routers/viewer/domainWideDelegation/_router.ts
similarity index 67%
rename from packages/trpc/server/routers/viewer/delegationCredential/_router.ts
rename to packages/trpc/server/routers/viewer/domainWideDelegation/_router.ts
index 11b6b5c8ec4..5c0171c4a6b 100644
--- a/packages/trpc/server/routers/viewer/delegationCredential/_router.ts
+++ b/packages/trpc/server/routers/viewer/domainWideDelegation/_router.ts
@@ -6,16 +6,16 @@ import { TRPCError } from "@trpc/server";
import authedProcedure, { authedOrgAdminProcedure } from "../../../procedures/authedProcedure";
import { router, importHandler } from "../../../trpc";
import {
- DelegationCredentialCreateSchema,
- DelegationCredentialUpdateSchema,
- DelegationCredentialDeleteSchema,
- DelegationCredentialToggleEnabledSchema,
+ DomainWideDelegationCreateSchema,
+ DomainWideDelegationUpdateSchema,
+ DomainWideDelegationDeleteSchema,
+ DomainWideDelegationToggleEnabledSchema,
} from "./schema";
-const NAMESPACE = "delegationCredential";
+const NAMESPACE = "domainWideDelegation";
const namespaced = (s: string) => `${NAMESPACE}.${s}`;
-const checkDelegationCredentialFeature = async ({
+const checkDomainWideDelegationFeature = async ({
ctx,
next,
}: {
@@ -33,41 +33,41 @@ const checkDelegationCredentialFeature = async ({
});
}
- const hasDelegationCredential = await featureRepo.checkIfTeamHasFeature(
+ const hasDomainWideDelegation = await featureRepo.checkIfTeamHasFeature(
user.organizationId,
- "delegation-credential"
+ "domain-wide-delegation"
);
- if (!hasDelegationCredential) {
+ if (!hasDomainWideDelegation) {
throw new TRPCError({
code: "FORBIDDEN",
- message: t("delegation_credential_feature_not_enabled"),
+ message: t("domain_wide_delegation_feature_not_enabled"),
});
}
return next();
};
-export const delegationCredentialRouter = router({
- list: authedOrgAdminProcedure.use(checkDelegationCredentialFeature).query(async (opts) => {
+export const domainWideDelegationRouter = router({
+ list: authedOrgAdminProcedure.use(checkDomainWideDelegationFeature).query(async (opts) => {
const handler = await importHandler(namespaced("list"), () => import("./list.handler"));
return handler(opts);
}),
update: authedOrgAdminProcedure
- .use(checkDelegationCredentialFeature)
- .input(DelegationCredentialUpdateSchema)
+ .use(checkDomainWideDelegationFeature)
+ .input(DomainWideDelegationUpdateSchema)
.mutation(async (opts) => {
const handler = await importHandler(namespaced("update"), () => import("./update.handler"));
return handler(opts);
}),
add: authedOrgAdminProcedure
- .use(checkDelegationCredentialFeature)
- .input(DelegationCredentialCreateSchema)
+ .use(checkDomainWideDelegationFeature)
+ .input(DomainWideDelegationCreateSchema)
.mutation(async (opts) => {
const handler = await importHandler(namespaced("add"), () => import("./add.handler"));
return handler(opts);
}),
toggleEnabled: authedOrgAdminProcedure
- .use(checkDelegationCredentialFeature)
- .input(DelegationCredentialToggleEnabledSchema)
+ .use(checkDomainWideDelegationFeature)
+ .input(DomainWideDelegationToggleEnabledSchema)
.mutation(async (opts) => {
const handler = await importHandler(
namespaced("toggleEnabled"),
@@ -76,13 +76,13 @@ export const delegationCredentialRouter = router({
return handler(opts);
}),
delete: authedOrgAdminProcedure
- .use(checkDelegationCredentialFeature)
- .input(DelegationCredentialDeleteSchema)
+ .use(checkDomainWideDelegationFeature)
+ .input(DomainWideDelegationDeleteSchema)
.mutation(async (opts) => {
const handler = await importHandler(namespaced("delete"), () => import("./delete.handler"));
return handler(opts);
}),
- listWorkspacePlatforms: authedProcedure.use(checkDelegationCredentialFeature).query(async () => {
+ listWorkspacePlatforms: authedProcedure.use(checkDomainWideDelegationFeature).query(async () => {
const handler = await importHandler(
namespaced("listWorkspacePlatforms"),
() => import("./listWorkspacePlatforms.handler")
diff --git a/packages/trpc/server/routers/viewer/delegationCredential/add.handler.ts b/packages/trpc/server/routers/viewer/domainWideDelegation/add.handler.ts
similarity index 68%
rename from packages/trpc/server/routers/viewer/delegationCredential/add.handler.ts
rename to packages/trpc/server/routers/viewer/domainWideDelegation/add.handler.ts
index 189dda593ad..a5eeb29493b 100644
--- a/packages/trpc/server/routers/viewer/delegationCredential/add.handler.ts
+++ b/packages/trpc/server/routers/viewer/domainWideDelegation/add.handler.ts
@@ -1,22 +1,22 @@
import type { z } from "zod";
-import { DelegationCredentialRepository } from "@calcom/lib/server/repository/delegationCredential";
+import { DomainWideDelegationRepository } from "@calcom/lib/server/repository/domainWideDelegation";
import { WorkspacePlatformRepository } from "@calcom/lib/server/repository/workspacePlatform";
import { TRPCError } from "@trpc/server";
-import type { DelegationCredentialCreateSchema } from "./schema";
+import type { DomainWideDelegationCreateSchema } from "./schema";
import {
- ensureDelegationCredentialNotAlreadyConfigured,
+ ensureDomainWideDelegationNotAlreadyConfigured,
ensureNoServiceAccountKey,
- handleDelegationCredentialError,
+ handleDomainWideDelegationError,
} from "./utils";
export default async function handler({
input,
ctx,
}: {
- input: z.infer<typeof DelegationCredentialCreateSchema>;
+ input: z.infer<typeof DomainWideDelegationCreateSchema>;
ctx: { user: { id: number; organizationId: number | null } };
}) {
const { workspacePlatformSlug, domain, serviceAccountKey } = input;
@@ -26,7 +26,7 @@ export default async function handler({
if (!organizationId) {
throw new TRPCError({
code: "UNAUTHORIZED",
- message: "You must be part of an organization to add a delegation credential",
+ message: "You must be part of an organization to add a domain-wide delegation",
});
}
@@ -42,13 +42,13 @@ export default async function handler({
});
}
- await ensureDelegationCredentialNotAlreadyConfigured({
+ await ensureDomainWideDelegationNotAlreadyConfigured({
domain,
currentOrganizationId: organizationId,
- delegationCredentialBeingUpdatedId: null,
+ dwdBeingUpdatedId: null,
});
- const createdDelegation = await DelegationCredentialRepository.create({
+ const createdDelegation = await DomainWideDelegationRepository.create({
workspacePlatformId: workspacePlatform.id,
domain,
// We don't want to enable by default because enabling requires some checks to be completed and it has a separate flow.
@@ -59,6 +59,6 @@ export default async function handler({
return ensureNoServiceAccountKey(createdDelegation);
} catch (error) {
- handleDelegationCredentialError(error);
+ handleDomainWideDelegationError(error);
}
}
diff --git a/packages/trpc/server/routers/viewer/domainWideDelegation/delete.handler.ts b/packages/trpc/server/routers/viewer/domainWideDelegation/delete.handler.ts
new file mode 100644
index 00000000000..58df0e3da6f
--- /dev/null
+++ b/packages/trpc/server/routers/viewer/domainWideDelegation/delete.handler.ts
@@ -0,0 +1,21 @@
+import type z from "zod";
+
+import { DomainWideDelegationRepository } from "@calcom/lib/server/repository/domainWideDelegation";
+
+import { TRPCError } from "@trpc/server";
+
+import type { DomainWideDelegationDeleteSchema } from "./schema";
+
+export default async function handler({
+ input,
+}: {
+ input: z.infer<typeof DomainWideDelegationDeleteSchema>;
+}) {
+ const { id } = input;
+
+ // We might want to consider allowing this in the future. Right now, toggling off DWD achieves similar but non-destructive effect
+ throw new TRPCError({ code: "BAD_REQUEST", message: "Not allowed" });
+ await DomainWideDelegationRepository.deleteById({ id });
+
+ return { id };
+}
diff --git a/packages/trpc/server/routers/viewer/delegationCredential/list.handler.ts b/packages/trpc/server/routers/viewer/domainWideDelegation/list.handler.ts
similarity index 73%
rename from packages/trpc/server/routers/viewer/delegationCredential/list.handler.ts
rename to packages/trpc/server/routers/viewer/domainWideDelegation/list.handler.ts
index e604e8f238b..0833140d39e 100644
--- a/packages/trpc/server/routers/viewer/delegationCredential/list.handler.ts
+++ b/packages/trpc/server/routers/viewer/domainWideDelegation/list.handler.ts
@@ -1,4 +1,4 @@
-import { DelegationCredentialRepository } from "@calcom/lib/server/repository/delegationCredential";
+import { DomainWideDelegationRepository } from "@calcom/lib/server/repository/domainWideDelegation";
import { encryptedServiceAccountKeySchema } from "@calcom/lib/server/serviceAccountKey";
import type { PrismaClient } from "@calcom/prisma";
@@ -14,14 +14,14 @@ export default async function handler({
const organizationId = user.organization?.id;
if (!organizationId) {
- throw new Error("You must be in an organization to list delegation credentials");
+ throw new Error("You must be in an organization to list domain wide delegations");
}
- const delegationCredentials =
- await DelegationCredentialRepository.findByOrgIdIncludeSensitiveServiceAccountKey({
+ const domainWideDelegations =
+ await DomainWideDelegationRepository.findByOrgIdIncludeSensitiveServiceAccountKey({
organizationId,
});
- return delegationCredentials.map((delegation) => {
+ return domainWideDelegations.map((delegation) => {
// Let's not parse the service account key here, we should be able to fix the item with the problem, so we always try to return the complete list
const serviceAccountKey = encryptedServiceAccountKeySchema.safeParse(delegation.serviceAccountKey);
diff --git a/packages/trpc/server/routers/viewer/delegationCredential/listWorkspacePlatforms.handler.ts b/packages/trpc/server/routers/viewer/domainWideDelegation/listWorkspacePlatforms.handler.ts
similarity index 100%
rename from packages/trpc/server/routers/viewer/delegationCredential/listWorkspacePlatforms.handler.ts
rename to packages/trpc/server/routers/viewer/domainWideDelegation/listWorkspacePlatforms.handler.ts
diff --git a/packages/trpc/server/routers/viewer/delegationCredential/schema.ts b/packages/trpc/server/routers/viewer/domainWideDelegation/schema.ts
similarity index 59%
rename from packages/trpc/server/routers/viewer/delegationCredential/schema.ts
rename to packages/trpc/server/routers/viewer/domainWideDelegation/schema.ts
index a08d1a3138b..b30c1452304 100644
--- a/packages/trpc/server/routers/viewer/delegationCredential/schema.ts
+++ b/packages/trpc/server/routers/viewer/domainWideDelegation/schema.ts
@@ -2,23 +2,23 @@ import { z } from "zod";
import { serviceAccountKeySchema } from "@calcom/prisma/zod-utils";
-export const DelegationCredentialCreateSchema = z.object({
+export const DomainWideDelegationCreateSchema = z.object({
workspacePlatformSlug: z.string(),
domain: z.string(),
serviceAccountKey: serviceAccountKeySchema,
});
-export const DelegationCredentialUpdateSchema = z.object({
+export const DomainWideDelegationUpdateSchema = z.object({
id: z.string(),
workspacePlatformSlug: z.string(),
domain: z.string(),
});
-export const DelegationCredentialToggleEnabledSchema = z.object({
+export const DomainWideDelegationToggleEnabledSchema = z.object({
id: z.string(),
enabled: z.boolean(),
});
-export const DelegationCredentialDeleteSchema = z.object({
+export const DomainWideDelegationDeleteSchema = z.object({
id: z.string(),
});
diff --git a/packages/trpc/server/routers/viewer/delegationCredential/toggleEnabled.handler.ts b/packages/trpc/server/routers/viewer/domainWideDelegation/toggleEnabled.handler.ts
similarity index 58%
rename from packages/trpc/server/routers/viewer/delegationCredential/toggleEnabled.handler.ts
rename to packages/trpc/server/routers/viewer/domainWideDelegation/toggleEnabled.handler.ts
index b5c5f3a9c70..71e82c231cf 100644
--- a/packages/trpc/server/routers/viewer/delegationCredential/toggleEnabled.handler.ts
+++ b/packages/trpc/server/routers/viewer/domainWideDelegation/toggleEnabled.handler.ts
@@ -1,11 +1,11 @@
import type { z } from "zod";
-import { checkIfSuccessfullyConfiguredInWorkspace } from "@calcom/lib/delegationCredential/server";
+import { checkIfSuccessfullyConfiguredInWorkspace } from "@calcom/lib/domainWideDelegation/server";
import { getTranslation } from "@calcom/lib/server/i18n";
-import { DelegationCredentialRepository } from "@calcom/lib/server/repository/delegationCredential";
-import type { ServiceAccountKey } from "@calcom/lib/server/repository/delegationCredential";
+import { DomainWideDelegationRepository } from "@calcom/lib/server/repository/domainWideDelegation";
+import type { ServiceAccountKey } from "@calcom/lib/server/repository/domainWideDelegation";
-import type { DelegationCredentialToggleEnabledSchema } from "./schema";
+import type { DomainWideDelegationToggleEnabledSchema } from "./schema";
import { ensureNoServiceAccountKey } from "./utils";
type LoggedInUser = {
@@ -23,7 +23,7 @@ export default async function toggleEnabledHandler({
ctx: {
user: LoggedInUser;
};
- input: z.infer<typeof DelegationCredentialToggleEnabledSchema>;
+ input: z.infer<typeof DomainWideDelegationToggleEnabledSchema>;
}) {
const { user: loggedInUser } = ctx;
const t = await getTranslation(ctx.user.locale ?? "en", "common");
@@ -32,53 +32,51 @@ export default async function toggleEnabledHandler({
throw new Error(t("verify_your_email"));
}
- return toggleDelegationCredentialEnabled(loggedInUser, input);
+ return toggleDwdEnabled(loggedInUser, input);
}
-export async function toggleDelegationCredentialEnabled(
+export async function toggleDwdEnabled(
loggedInUser: Omit<LoggedInUser, "locale" | "emailVerified">,
- input: z.infer<typeof DelegationCredentialToggleEnabledSchema>
+ input: z.infer<typeof DomainWideDelegationToggleEnabledSchema>
) {
if (input.enabled) {
await assertWorkspaceConfigured({
- delegationCredentialId: input.id,
+ domainWideDelegationId: input.id,
user: loggedInUser,
});
}
- const updatedDelegationCredential = await DelegationCredentialRepository.updateById({
+ const updatedDomainWideDelegation = await DomainWideDelegationRepository.updateById({
id: input.id,
data: {
enabled: input.enabled,
},
});
- return ensureNoServiceAccountKey(updatedDelegationCredential);
+ return ensureNoServiceAccountKey(updatedDomainWideDelegation);
}
const assertWorkspaceConfigured = async ({
- delegationCredentialId,
+ domainWideDelegationId,
user,
}: {
- delegationCredentialId: string;
+ domainWideDelegationId: string;
user: { id: number; email: string; organizationId: number | null };
}) => {
- const delegationCredential = await DelegationCredentialRepository.findByIdIncludeSensitiveServiceAccountKey(
- {
- id: delegationCredentialId,
- }
- );
+ const dwd = await DomainWideDelegationRepository.findByIdIncludeSensitiveServiceAccountKey({
+ id: domainWideDelegationId,
+ });
- if (!delegationCredential) {
+ if (!dwd) {
throw new Error("Domain wide delegation not found");
}
- if (!hasServiceAccountKey(delegationCredential)) {
+ if (!hasServiceAccountKey(dwd)) {
throw new Error("Domain wide delegation doesn't have service account key");
}
const isSuccessfullyConfigured = await checkIfSuccessfullyConfiguredInWorkspace({
- delegationCredential,
+ dwd,
user,
});
@@ -88,7 +86,7 @@ const assertWorkspaceConfigured = async ({
};
function hasServiceAccountKey<T extends { serviceAccountKey: ServiceAccountKey | null }>(
- delegationCredential: T
-): delegationCredential is T & { serviceAccountKey: ServiceAccountKey } {
- return delegationCredential.serviceAccountKey !== null;
+ domainWideDelegation: T
+): domainWideDelegation is T & { serviceAccountKey: ServiceAccountKey } {
+ return domainWideDelegation.serviceAccountKey !== null;
}
diff --git a/packages/trpc/server/routers/viewer/delegationCredential/update.handler.ts b/packages/trpc/server/routers/viewer/domainWideDelegation/update.handler.ts
similarity index 69%
rename from packages/trpc/server/routers/viewer/delegationCredential/update.handler.ts
rename to packages/trpc/server/routers/viewer/domainWideDelegation/update.handler.ts
index 0ba2194779c..b07fe1abf40 100644
--- a/packages/trpc/server/routers/viewer/delegationCredential/update.handler.ts
+++ b/packages/trpc/server/routers/viewer/domainWideDelegation/update.handler.ts
@@ -1,22 +1,22 @@
import type { z } from "zod";
-import { DelegationCredentialRepository } from "@calcom/lib/server/repository/delegationCredential";
+import { DomainWideDelegationRepository } from "@calcom/lib/server/repository/domainWideDelegation";
import { WorkspacePlatformRepository } from "@calcom/lib/server/repository/workspacePlatform";
import { TRPCError } from "@trpc/server";
-import type { DelegationCredentialUpdateSchema } from "./schema";
+import type { DomainWideDelegationUpdateSchema } from "./schema";
import {
- ensureDelegationCredentialNotAlreadyConfigured,
+ ensureDomainWideDelegationNotAlreadyConfigured,
ensureNoServiceAccountKey,
- handleDelegationCredentialError,
+ handleDomainWideDelegationError,
} from "./utils";
export default async function handler({
input,
ctx,
}: {
- input: z.infer<typeof DelegationCredentialUpdateSchema>;
+ input: z.infer<typeof DomainWideDelegationUpdateSchema>;
ctx: { user: { id: number; organizationId: number | null } };
}) {
const { id, workspacePlatformSlug, domain } = input;
@@ -26,14 +26,14 @@ export default async function handler({
if (!organizationId) {
throw new TRPCError({
code: "UNAUTHORIZED",
- message: "You must be part of an organization to update a delegation credential",
+ message: "You must be part of an organization to update a domain wide delegation",
});
}
- await ensureDelegationCredentialNotAlreadyConfigured({
+ await ensureDomainWideDelegationNotAlreadyConfigured({
domain,
currentOrganizationId: organizationId,
- delegationCredentialBeingUpdatedId: id,
+ dwdBeingUpdatedId: id,
});
try {
@@ -48,7 +48,7 @@ export default async function handler({
});
}
- const updatedDelegation = await DelegationCredentialRepository.updateById({
+ const updatedDelegation = await DomainWideDelegationRepository.updateById({
id,
data: {
workspacePlatformId: workspacePlatform.id,
@@ -59,6 +59,6 @@ export default async function handler({
return ensureNoServiceAccountKey(updatedDelegation);
} catch (error) {
- handleDelegationCredentialError(error);
+ handleDomainWideDelegationError(error);
}
}
diff --git a/packages/trpc/server/routers/viewer/delegationCredential/utils.ts b/packages/trpc/server/routers/viewer/domainWideDelegation/utils.ts
similarity index 66%
rename from packages/trpc/server/routers/viewer/delegationCredential/utils.ts
rename to packages/trpc/server/routers/viewer/domainWideDelegation/utils.ts
index 475bc249c8d..f0677b59d24 100644
--- a/packages/trpc/server/routers/viewer/delegationCredential/utils.ts
+++ b/packages/trpc/server/routers/viewer/domainWideDelegation/utils.ts
@@ -2,12 +2,12 @@ import { z } from "zod";
import logger from "@calcom/lib/logger";
import { safeStringify } from "@calcom/lib/safeStringify";
-import { DelegationCredentialRepository } from "@calcom/lib/server/repository/delegationCredential";
+import { DomainWideDelegationRepository } from "@calcom/lib/server/repository/domainWideDelegation";
import type { Prisma } from "@calcom/prisma/client";
import { TRPCError } from "@trpc/server";
-const log = logger.getSubLogger({ prefix: ["delegationCredential/utils"] });
+const log = logger.getSubLogger({ prefix: ["domainWideDelegation/utils"] });
export class InvalidServiceAccountKeyError extends Error {
constructor(message: string) {
super(message);
@@ -15,29 +15,27 @@ export class InvalidServiceAccountKeyError extends Error {
}
}
-export async function ensureDelegationCredentialNotAlreadyConfigured({
+export async function ensureDomainWideDelegationNotAlreadyConfigured({
domain,
currentOrganizationId,
- delegationCredentialBeingUpdatedId,
+ dwdBeingUpdatedId,
}: {
domain: string;
currentOrganizationId: number;
- delegationCredentialBeingUpdatedId: string | null;
+ dwdBeingUpdatedId: string | null;
}) {
- const allDelegationsForDomain = await DelegationCredentialRepository.findAllByDomain({
+ const allDelegationsForDomain = await DomainWideDelegationRepository.findAllByDomain({
domain,
});
const conflictingDelegationInCurrentOrg = allDelegationsForDomain.find(
- (delegation) =>
- delegation.organizationId === currentOrganizationId &&
- delegation.id !== delegationCredentialBeingUpdatedId
+ (delegation) => delegation.organizationId === currentOrganizationId && delegation.id !== dwdBeingUpdatedId
);
if (conflictingDelegationInCurrentOrg) {
throw new TRPCError({
code: "BAD_REQUEST",
- message: `Your organization already has delegation credential for ${conflictingDelegationInCurrentOrg.domain}`,
+ message: `Your organization already has domain-wide delegation for ${conflictingDelegationInCurrentOrg.domain}`,
});
}
@@ -48,7 +46,7 @@ export async function ensureDelegationCredentialNotAlreadyConfigured({
if (differentOrgEnabledDelegations.length > 0) {
throw new TRPCError({
code: "BAD_REQUEST",
- message: `Domain ${domain} already has delegation credential enabled in another organization`,
+ message: `Domain ${domain} already has domain-wide delegation enabled in another organization`,
});
}
}
@@ -75,7 +73,7 @@ export function parseServiceAccountKey(serviceAccountKey: Prisma.JsonValue) {
return parsedServiceAccountKey.data;
}
-export const handleDelegationCredentialError = (error: unknown) => {
+export const handleDomainWideDelegationError = (error: unknown) => {
if (error instanceof InvalidServiceAccountKeyError) {
throw new TRPCError({
code: "BAD_REQUEST",
@@ -87,20 +85,20 @@ export const handleDelegationCredentialError = (error: unknown) => {
throw error;
}
- log.error("Error handling delegation credential:", safeStringify(error));
+ log.error("Error handling domain-wide delegation:", safeStringify(error));
throw new TRPCError({
code: "INTERNAL_SERVER_ERROR",
- message: "An error occurred while handling delegation credential settings.",
+ message: "An error occurred while handling domain-wide delegation settings.",
});
};
export const ensureNoServiceAccountKey = <T extends { id: string; serviceAccountKey?: unknown } | null>(
- delegationCredential: T
+ domainWideDelegation: T
) => {
- if (!delegationCredential) {
+ if (!domainWideDelegation) {
return null;
}
- const { serviceAccountKey: _1, ...rest } = delegationCredential;
+ const { serviceAccountKey: _1, ...rest } = domainWideDelegation;
return {
...rest,
serviceAccountKey: undefined,
diff --git a/packages/trpc/server/routers/viewer/organizations/list.handler.ts b/packages/trpc/server/routers/viewer/organizations/list.handler.ts
index 066f7d63928..541809e7a1f 100644
--- a/packages/trpc/server/routers/viewer/organizations/list.handler.ts
+++ b/packages/trpc/server/routers/viewer/organizations/list.handler.ts
@@ -27,15 +27,15 @@ export const listHandler = async ({ ctx }: ListHandlerInput) => {
}
const featureRepo = new FeaturesRepository();
- const hasDelegationCredential = await featureRepo.checkIfTeamHasFeature(
+ const hasDomainWideDelegation = await featureRepo.checkIfTeamHasFeature(
organizationId,
- "delegation-credential"
+ "domain-wide-delegation"
);
return {
...currentOrg,
features: {
- delegationCredential: hasDelegationCredential,
+ domainWideDelegation: hasDomainWideDelegation,
},
};
};
diff --git a/packages/trpc/server/routers/viewer/routing-forms/findTeamMembersMatchingAttributeLogicOfRoute.handler.ts b/packages/trpc/server/routers/viewer/routing-forms/findTeamMembersMatchingAttributeLogicOfRoute.handler.ts
index 76181bdbc67..2b9a9612eac 100644
--- a/packages/trpc/server/routers/viewer/routing-forms/findTeamMembersMatchingAttributeLogicOfRoute.handler.ts
+++ b/packages/trpc/server/routers/viewer/routing-forms/findTeamMembersMatchingAttributeLogicOfRoute.handler.ts
@@ -9,7 +9,7 @@ import type { NextApiResponse } from "next";
import { enrichFormWithMigrationData } from "@calcom/app-store/routing-forms/enrichFormWithMigrationData";
import { getUrlSearchParamsToForwardForTestPreview } from "@calcom/app-store/routing-forms/pages/routing-link/getUrlSearchParamsToForward";
-import { enrichHostsWithDelegationCredentials } from "@calcom/lib/delegationCredential/server";
+import { enrichHostsWithDwdCredentials } from "@calcom/lib/domainWideDelegation/server";
import { entityPrismaWhereClause } from "@calcom/lib/entityPermissionUtils";
import { fromEntriesWithDuplicateKeys } from "@calcom/lib/fromEntriesWithDuplicateKeys";
import { findTeamMembersMatchingAttributeLogic } from "@calcom/lib/raqb/findTeamMembersMatchingAttributeLogic";
@@ -256,7 +256,7 @@ export const findTeamMembersMatchingAttributeLogicOfRouteHandler = async ({
const matchingTeamMembersIds = matchingTeamMembersWithResult.map((member) => member.userId);
const matchingTeamMembers = await UserRepository.findByIds({ ids: matchingTeamMembersIds });
- const matchingHosts = await enrichHostsWithDelegationCredentials({
+ const matchingHosts = await enrichHostsWithDwdCredentials({
orgId: formOrgId,
hosts: eventType.hosts.filter((host) => matchingTeamMembersIds.includes(host.user.id)),
});
diff --git a/packages/trpc/server/routers/viewer/slots/util.ts b/packages/trpc/server/routers/viewer/slots/util.ts
index 808ef4300b4..449877b8a3f 100644
--- a/packages/trpc/server/routers/viewer/slots/util.ts
+++ b/packages/trpc/server/routers/viewer/slots/util.ts
@@ -10,7 +10,7 @@ import { checkForConflicts } from "@calcom/features/bookings/lib/conflictChecker
import { isEventTypeLoggingEnabled } from "@calcom/features/bookings/lib/isEventTypeLoggingEnabled";
import { getShouldServeCache } from "@calcom/features/calendar-cache/lib/getShouldServeCache";
import { parseBookingLimit, parseDurationLimit } from "@calcom/lib";
-import { findQualifiedHostsWithDelegationCredentials } from "@calcom/lib/bookings/findQualifiedHostsWithDelegationCredentials";
+import { findQualifiedHostsWithDwdCredentials } from "@calcom/lib/bookings/findQualifiedHostsWithDwdCredentials";
import { shouldIgnoreContactOwner } from "@calcom/lib/bookings/routing/utils";
import { RESERVED_SUBDOMAINS } from "@calcom/lib/constants";
import { getUTCOffsetByTimezone } from "@calcom/lib/date-fns";
@@ -44,10 +44,10 @@ import type { TGetScheduleInputSchema } from "./getSchedule.schema";
import { handleNotificationWhenNoSlots } from "./handleNotificationWhenNoSlots";
const log = logger.getSubLogger({ prefix: ["[slots/util]"] });
-type GetAvailabilityUserWithoutDelegationCredentials = Omit<GetAvailabilityUser, "credentials"> & {
+type GetAvailabilityUserWithoutDwdCredentials = Omit<GetAvailabilityUser, "credentials"> & {
credentials: CredentialPayload[];
};
-type GetAvailabilityUserWithDelegationCredentials = Omit<GetAvailabilityUser, "credentials"> & {
+type GetAvailabilityUserWithDwdCredentials = Omit<GetAvailabilityUser, "credentials"> & {
credentials: CredentialForCalendarService[];
};
const selectSelectedSlots = Prisma.validator<Prisma.SelectedSlotsDefaultArgs>()({
@@ -272,7 +272,7 @@ export function getUsersWithCredentials({
}: {
hosts: {
isFixed?: boolean;
- user: GetAvailabilityUserWithDelegationCredentials;
+ user: GetAvailabilityUserWithDwdCredentials;
}[];
}) {
return hosts.map(({ isFixed, user }) => ({ isFixed, ...user }));
@@ -381,7 +381,7 @@ async function _getAvailableSlots({ input, ctx }: GetScheduleOptions): Promise<I
}
const { qualifiedRRHosts, allFallbackRRHosts, fixedHosts } = await monitorCallbackAsync(
- findQualifiedHostsWithDelegationCredentials<GetAvailabilityUserWithoutDelegationCredentials>,
+ findQualifiedHostsWithDwdCredentials<GetAvailabilityUserWithoutDwdCredentials>,
{
eventType,
rescheduleUid: input.rescheduleUid ?? null,
@@ -956,7 +956,7 @@ const calculateHostsAndAvailabilities = async ({
eventType: Exclude<Awaited<ReturnType<typeof getRegularOrDynamicEventType>>, null>;
hosts: {
isFixed?: boolean;
- user: GetAvailabilityUserWithDelegationCredentials;
+ user: GetAvailabilityUserWithDwdCredentials;
}[];
loggerWithEventDetails: Logger<unknown>;
startTime: ReturnType<typeof getStartTime>;
diff --git a/packages/trpc/server/routers/viewer/teams/getMemberAvailability.handler.ts b/packages/trpc/server/routers/viewer/teams/getMemberAvailability.handler.ts
index 2b873142968..d10b6a7a716 100644
--- a/packages/trpc/server/routers/viewer/teams/getMemberAvailability.handler.ts
+++ b/packages/trpc/server/routers/viewer/teams/getMemberAvailability.handler.ts
@@ -1,4 +1,4 @@
-import { enrichUserWithDelegationCredentialsWithoutOrgId } from "@calcom/lib/delegationCredential/server";
+import { enrichUserWithDwdCredentialsWithoutOrgId } from "@calcom/lib/domainWideDelegation/server";
import { getUserAvailability } from "@calcom/lib/getUserAvailability";
import { isTeamMember } from "@calcom/lib/server/queries/teams";
import { MembershipRepository } from "@calcom/lib/server/repository/membership";
@@ -27,7 +27,7 @@ export const getMemberAvailabilityHandler = async ({ ctx, input }: GetMemberAvai
if (!member.user.username)
throw new TRPCError({ code: "BAD_REQUEST", message: "Member doesn't have a username" });
const username = member.user.username;
- const user = await enrichUserWithDelegationCredentialsWithoutOrgId({
+ const user = await enrichUserWithDwdCredentialsWithoutOrgId({
user: member.user,
});
diff --git a/packages/trpc/server/routers/viewer/teams/roundRobin/getRoundRobinHostsToReasign.handler.ts b/packages/trpc/server/routers/viewer/teams/roundRobin/getRoundRobinHostsToReasign.handler.ts
index 8783df6794d..fe6031533f5 100644
--- a/packages/trpc/server/routers/viewer/teams/roundRobin/getRoundRobinHostsToReasign.handler.ts
+++ b/packages/trpc/server/routers/viewer/teams/roundRobin/getRoundRobinHostsToReasign.handler.ts
@@ -1,7 +1,7 @@
import dayjs from "@calcom/dayjs";
import { ensureAvailableUsers } from "@calcom/features/bookings/lib/handleNewBooking/ensureAvailableUsers";
import type { IsFixedAwareUser } from "@calcom/features/bookings/lib/handleNewBooking/types";
-import { enrichUsersWithDelegationCredentials } from "@calcom/lib/delegationCredential/server";
+import { enrichUsersWithDwdCredentials } from "@calcom/lib/domainWideDelegation/server";
import { ErrorCode } from "@calcom/lib/errorCodes";
import logger from "@calcom/lib/logger";
import { withSelectedCalendars } from "@calcom/lib/server/repository/user";
@@ -87,7 +87,7 @@ async function getTeamHostsFromDB({
}));
return {
- hosts: await enrichUsersWithDelegationCredentials({
+ hosts: await enrichUsersWithDwdCredentials({
orgId: organizationId,
users: hostsMergedWithUser,
}),
diff --git a/packages/types/App.d.ts b/packages/types/App.d.ts
index 0c3d45d6b46..cdd0c0dfdf1 100644
--- a/packages/types/App.d.ts
+++ b/packages/types/App.d.ts
@@ -168,9 +168,9 @@ export interface App {
/** Specifies if the App uses an OAuth flow */
isOAuth?: boolean;
/**
- * Specifies if the App supports delegation credential
+ * Specifies if the App supports domain-wide delegation
*/
- delegationCredential?: {
+ domainWideDelegation?: {
workspacePlatformSlug: string;
};
}
diff --git a/packages/types/Calendar.d.ts b/packages/types/Calendar.d.ts
index 280c821da4a..a1de5f41ca5 100644
--- a/packages/types/Calendar.d.ts
+++ b/packages/types/Calendar.d.ts
@@ -218,7 +218,7 @@ export interface CalendarEvent {
platformCancelUrl?: string | null;
platformBookingUrl?: string | null;
oneTimePassword?: string | null;
- delegationCredentialId?: string | null;
+ domainWideDelegationCredentialId?: string | null;
}
export interface EntryPoint {
@@ -287,7 +287,7 @@ export interface Calendar {
listCalendars(event?: CalendarEvent): Promise<IntegrationCalendar[]>;
- testDelegationCredentialSetup?(): Promise<boolean>;
+ testDomainWideDelegationSetup?(): Promise<boolean>;
watchCalendar?(options: {
calendarId: string;
diff --git a/packages/types/EventManager.d.ts b/packages/types/EventManager.d.ts
index 81499a2fdc0..db08f4e2b9b 100644
--- a/packages/types/EventManager.d.ts
+++ b/packages/types/EventManager.d.ts
@@ -10,7 +10,7 @@ export interface PartialReference {
meetingUrl?: string | null;
externalCalendarId?: string | null;
credentialId?: number | null;
- delegationCredentialId?: string | null;
+ domainWideDelegationCredentialId?: string | null;
}
export interface EventResult<T> {