diff --git a/apps/api/v2/src/modules/organizations/delegation-credentials/organizations-delegation-credential.controller.ts b/apps/api/v2/src/modules/organizations/delegation-credentials/organizations-delegation-credential.controller.ts index 92397d6197..0390e9ef55 100644 --- a/apps/api/v2/src/modules/organizations/delegation-credentials/organizations-delegation-credential.controller.ts +++ b/apps/api/v2/src/modules/organizations/delegation-credentials/organizations-delegation-credential.controller.ts @@ -34,7 +34,7 @@ import { plainToClass } from "class-transformer"; import { SUCCESS_STATUS } from "@calcom/platform-constants"; import type { User } from "@calcom/prisma/client"; -import type { CreateDelegationCredentialInput } from "./inputs/create-delegation-credential.input"; +import { CreateDelegationCredentialInput } from "./inputs/create-delegation-credential.input"; @Controller({ path: "/v2/organizations/:orgId/delegation-credentials", diff --git a/apps/api/v2/swagger/documentation.json b/apps/api/v2/swagger/documentation.json index 2a5a864426..3b3c26f84d 100644 --- a/apps/api/v2/swagger/documentation.json +++ b/apps/api/v2/swagger/documentation.json @@ -1806,7 +1806,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Function" + "$ref": "#/components/schemas/CreateDelegationCredentialInput" } } } @@ -9049,6 +9049,52 @@ "summary": "Get busy times", "description": "Get busy times from a calendar. Example request URL is `https://api.cal.com/v2/calendars/busy-times?loggedInUsersTz=Europe%2FMadrid&dateFrom=2024-12-18&dateTo=2024-12-18&calendarsToLoad[0][credentialId]=135&calendarsToLoad[0][externalId]=skrauciz%40gmail.com`", "parameters": [ + { + "name": "loggedInUsersTz", + "required": true, + "in": "query", + "description": "The timezone of the logged in user represented as a string", + "schema": { + "example": "America/New_York", + "type": "string" + } + }, + { + "name": "dateFrom", + "required": false, + "in": "query", + "description": "The starting date for the busy times query", + "schema": { + "example": "2023-10-01", + "type": "string" + } + }, + { + "name": "dateTo", + "required": false, + "in": "query", + "description": "The ending date for the busy times query", + "schema": { + "example": "2023-10-31", + "type": "string" + } + }, + { + "name": "credentialId", + "in": "query", + "required": true, + "schema": { + "type": "number" + } + }, + { + "name": "externalId", + "in": "query", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "Authorization", "in": "header", @@ -9244,7 +9290,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Function" + "$ref": "#/components/schemas/CreateCalendarCredentialsInput" } } } @@ -25067,9 +25113,53 @@ "status" ] }, - "Function": { + "GoogleServiceAccountKeyInput": { "type": "object", - "properties": {} + "properties": { + "private_key": { + "type": "string" + }, + "client_email": { + "type": "string" + }, + "client_id": { + "type": "string" + } + }, + "required": [ + "private_key", + "client_email", + "client_id" + ] + }, + "CreateDelegationCredentialInput": { + "type": "object", + "properties": { + "workspacePlatformSlug": { + "type": "string" + }, + "domain": { + "type": "string" + }, + "serviceAccountKey": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/GoogleServiceAccountKeyInput" + }, + { + "$ref": "#/components/schemas/MicrosoftServiceAccountKeyInput" + } + ] + } + } + }, + "required": [ + "workspacePlatformSlug", + "domain", + "serviceAccountKey" + ] }, "WorkspacePlatformDto": { "type": "object", @@ -25143,25 +25233,6 @@ "data" ] }, - "GoogleServiceAccountKeyInput": { - "type": "object", - "properties": { - "private_key": { - "type": "string" - }, - "client_email": { - "type": "string" - }, - "client_id": { - "type": "string" - } - }, - "required": [ - "private_key", - "client_email", - "client_id" - ] - }, "UpdateDelegationCredentialInput": { "type": "object", "properties": { @@ -25620,6 +25691,21 @@ "data" ] }, + "CreateCalendarCredentialsInput": { + "type": "object", + "properties": { + "username": { + "type": "string" + }, + "password": { + "type": "string" + } + }, + "required": [ + "username", + "password" + ] + }, "DeleteCalendarCredentialsInputBodyDto": { "type": "object", "properties": { @@ -26871,6 +26957,11 @@ "$ref": "#/components/schemas/Routing" } ] + }, + "emailVerificationCode": { + "type": "string", + "description": "Email verification code required when event type has email verification enabled.", + "example": "123456" } }, "required": [ @@ -26999,6 +27090,11 @@ } ] }, + "emailVerificationCode": { + "type": "string", + "description": "Email verification code required when event type has email verification enabled.", + "example": "123456" + }, "instant": { "type": "boolean", "description": "Flag indicating if the booking is an instant booking. Only available for team events.", @@ -27132,6 +27228,11 @@ } ] }, + "emailVerificationCode": { + "type": "string", + "description": "Email verification code required when event type has email verification enabled.", + "example": "123456" + }, "recurrenceCount": { "type": "number", "description": "The number of recurrences. If not provided then event type recurrence count will be used. Can't be more than\n event type recurrence count", @@ -28558,6 +28659,11 @@ "type": "string", "example": "User requested reschedule", "description": "Reason for rescheduling the booking" + }, + "emailVerificationCode": { + "type": "string", + "description": "Email verification code required when event type has email verification enabled.", + "example": "123456" } }, "required": [ @@ -28580,6 +28686,11 @@ "type": "string", "example": "3be561a9-31f1-4b8e-aefc-9d9a085f0dd1", "description": "Uid of the specific seat within booking." + }, + "emailVerificationCode": { + "type": "string", + "description": "Email verification code required when event type has email verification enabled.", + "example": "123456" } }, "required": [ diff --git a/docs/api-reference/v2/openapi.json b/docs/api-reference/v2/openapi.json index 7e04a3689a..f460ac586a 100644 --- a/docs/api-reference/v2/openapi.json +++ b/docs/api-reference/v2/openapi.json @@ -1732,7 +1732,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Function" + "$ref": "#/components/schemas/CreateDelegationCredentialInput" } } } @@ -8663,6 +8663,52 @@ "summary": "Get busy times", "description": "Get busy times from a calendar. Example request URL is `https://api.cal.com/v2/calendars/busy-times?loggedInUsersTz=Europe%2FMadrid&dateFrom=2024-12-18&dateTo=2024-12-18&calendarsToLoad[0][credentialId]=135&calendarsToLoad[0][externalId]=skrauciz%40gmail.com`", "parameters": [ + { + "name": "loggedInUsersTz", + "required": true, + "in": "query", + "description": "The timezone of the logged in user represented as a string", + "schema": { + "example": "America/New_York", + "type": "string" + } + }, + { + "name": "dateFrom", + "required": false, + "in": "query", + "description": "The starting date for the busy times query", + "schema": { + "example": "2023-10-01", + "type": "string" + } + }, + { + "name": "dateTo", + "required": false, + "in": "query", + "description": "The ending date for the busy times query", + "schema": { + "example": "2023-10-31", + "type": "string" + } + }, + { + "name": "credentialId", + "in": "query", + "required": true, + "schema": { + "type": "number" + } + }, + { + "name": "externalId", + "in": "query", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "Authorization", "in": "header", @@ -8842,7 +8888,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/Function" + "$ref": "#/components/schemas/CreateCalendarCredentialsInput" } } } @@ -22915,9 +22961,45 @@ }, "required": ["status"] }, - "Function": { + "GoogleServiceAccountKeyInput": { "type": "object", - "properties": {} + "properties": { + "private_key": { + "type": "string" + }, + "client_email": { + "type": "string" + }, + "client_id": { + "type": "string" + } + }, + "required": ["private_key", "client_email", "client_id"] + }, + "CreateDelegationCredentialInput": { + "type": "object", + "properties": { + "workspacePlatformSlug": { + "type": "string" + }, + "domain": { + "type": "string" + }, + "serviceAccountKey": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/GoogleServiceAccountKeyInput" + }, + { + "$ref": "#/components/schemas/MicrosoftServiceAccountKeyInput" + } + ] + } + } + }, + "required": ["workspacePlatformSlug", "domain", "serviceAccountKey"] }, "WorkspacePlatformDto": { "type": "object", @@ -22982,21 +23064,6 @@ }, "required": ["status", "data"] }, - "GoogleServiceAccountKeyInput": { - "type": "object", - "properties": { - "private_key": { - "type": "string" - }, - "client_email": { - "type": "string" - }, - "client_id": { - "type": "string" - } - }, - "required": ["private_key", "client_email", "client_id"] - }, "UpdateDelegationCredentialInput": { "type": "object", "properties": { @@ -23399,6 +23466,18 @@ }, "required": ["status", "data"] }, + "CreateCalendarCredentialsInput": { + "type": "object", + "properties": { + "username": { + "type": "string" + }, + "password": { + "type": "string" + } + }, + "required": ["username", "password"] + }, "DeleteCalendarCredentialsInputBodyDto": { "type": "object", "properties": { @@ -24500,6 +24579,11 @@ "$ref": "#/components/schemas/Routing" } ] + }, + "emailVerificationCode": { + "type": "string", + "description": "Email verification code required when event type has email verification enabled.", + "example": "123456" } }, "required": ["start", "attendee"] @@ -24619,6 +24703,11 @@ } ] }, + "emailVerificationCode": { + "type": "string", + "description": "Email verification code required when event type has email verification enabled.", + "example": "123456" + }, "instant": { "type": "boolean", "description": "Flag indicating if the booking is an instant booking. Only available for team events.", @@ -24742,6 +24831,11 @@ } ] }, + "emailVerificationCode": { + "type": "string", + "description": "Email verification code required when event type has email verification enabled.", + "example": "123456" + }, "recurrenceCount": { "type": "number", "description": "The number of recurrences. If not provided then event type recurrence count will be used. Can't be more than\n event type recurrence count", @@ -26067,6 +26161,11 @@ "type": "string", "example": "User requested reschedule", "description": "Reason for rescheduling the booking" + }, + "emailVerificationCode": { + "type": "string", + "description": "Email verification code required when event type has email verification enabled.", + "example": "123456" } }, "required": ["start"] @@ -26087,6 +26186,11 @@ "type": "string", "example": "3be561a9-31f1-4b8e-aefc-9d9a085f0dd1", "description": "Uid of the specific seat within booking." + }, + "emailVerificationCode": { + "type": "string", + "description": "Email verification code required when event type has email verification enabled.", + "example": "123456" } }, "required": ["start", "seatUid"]