From f6ba77ccfe58cf479e8cf8fb75a2003a98a00f80 Mon Sep 17 00:00:00 2001 From: Keith Williams Date: Tue, 24 Sep 2024 11:03:22 -0300 Subject: [PATCH] chore: Add sorting to API v2 OpenAPI doc (#16786) --- apps/api/v2/src/main.ts | 66 + apps/api/v2/swagger/documentation.json | 6723 ++++++++++++------------ 2 files changed, 3379 insertions(+), 3410 deletions(-) diff --git a/apps/api/v2/src/main.ts b/apps/api/v2/src/main.ts index 1ec453ca09..0f68d9cd4f 100644 --- a/apps/api/v2/src/main.ts +++ b/apps/api/v2/src/main.ts @@ -4,6 +4,12 @@ import { ConfigService } from "@nestjs/config"; import { NestFactory } from "@nestjs/core"; import type { NestExpressApplication } from "@nestjs/platform-express"; import { SwaggerModule, DocumentBuilder } from "@nestjs/swagger"; +import { + PathItemObject, + PathsObject, + OperationObject, + TagObject, +} from "@nestjs/swagger/dist/interfaces/open-api-spec.interface"; import "dotenv/config"; import * as fs from "fs"; import { Server } from "http"; @@ -13,6 +19,8 @@ import { bootstrap } from "./app"; import { AppModule } from "./app.module"; import { loggerConfig } from "./lib/logger"; +const HttpMethods: (keyof PathItemObject)[] = ["get", "post", "put", "delete", "patch", "options", "head"]; + const run = async () => { const app = await NestFactory.create(AppModule, { logger: WinstonModule.createLogger(loggerConfig()), @@ -35,12 +43,70 @@ const run = async () => { } }; +function customTagSort(a: string, b: string): number { + const platformPrefix = "Platform"; + const orgsPrefix = "Orgs"; + + if (a.startsWith(platformPrefix) && !b.startsWith(platformPrefix)) { + return -1; + } + if (!a.startsWith(platformPrefix) && b.startsWith(platformPrefix)) { + return 1; + } + + if (a.startsWith(orgsPrefix) && !b.startsWith(orgsPrefix)) { + return -1; + } + if (!a.startsWith(orgsPrefix) && b.startsWith(orgsPrefix)) { + return 1; + } + + return a.localeCompare(b); +} + +function isOperationObject(obj: any): obj is OperationObject { + return obj && typeof obj === "object" && "tags" in obj; +} + +function groupAndSortPathsByFirstTag(paths: PathsObject): PathsObject { + const groupedPaths: { [key: string]: PathsObject } = {}; + + Object.keys(paths).forEach((pathKey) => { + const pathItem = paths[pathKey]; + + HttpMethods.forEach((method) => { + const operation = pathItem[method]; + + if (isOperationObject(operation) && operation.tags && operation.tags.length > 0) { + const firstTag = operation.tags[0]; + + if (!groupedPaths[firstTag]) { + groupedPaths[firstTag] = {}; + } + + groupedPaths[firstTag][pathKey] = pathItem; + } + }); + }); + + const sortedTags = Object.keys(groupedPaths).sort(customTagSort); + const sortedPaths: PathsObject = {}; + + sortedTags.forEach((tag) => { + Object.assign(sortedPaths, groupedPaths[tag]); + }); + + return sortedPaths; +} + async function generateSwagger(app: NestExpressApplication) { const logger = new Logger("App"); logger.log(`Generating Swagger documentation...\n`); const config = new DocumentBuilder().setTitle("Cal.com API v2").build(); const document = SwaggerModule.createDocument(app, config); + document.paths = groupAndSortPathsByFirstTag(document.paths); + const outputFile = "./swagger/documentation.json"; if (fs.existsSync(outputFile)) { diff --git a/apps/api/v2/swagger/documentation.json b/apps/api/v2/swagger/documentation.json index 84980f6385..82f389dcdb 100644 --- a/apps/api/v2/swagger/documentation.json +++ b/apps/api/v2/swagger/documentation.json @@ -1,9 +1,142 @@ { "openapi": "3.0.0", "paths": { - "/health": { + "/v2/provider/{clientId}": { "get": { - "operationId": "AppController_getHealth", + "operationId": "CalProviderController_verifyClientId", + "summary": "Get a provider", + "parameters": [ + { + "name": "clientId", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProviderVerifyClientOutput" + } + } + } + } + }, + "tags": [ + "Platform / Cal Provider" + ] + } + }, + "/v2/provider/{clientId}/access-token": { + "get": { + "operationId": "CalProviderController_verifyAccessToken", + "summary": "Verify an access token", + "parameters": [ + { + "name": "clientId", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ProviderVerifyAccessTokenOutput" + } + } + } + } + }, + "tags": [ + "Platform / Cal Provider" + ] + } + }, + "/v2/gcal/oauth/auth-url": { + "get": { + "operationId": "GcalController_redirect", + "summary": "Get auth URL", + "parameters": [ + { + "name": "Authorization", + "required": true, + "in": "header", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GcalAuthUrlOutput" + } + } + } + } + }, + "tags": [ + "Platform / Google Calendar" + ] + } + }, + "/v2/gcal/oauth/save": { + "get": { + "operationId": "GcalController_save", + "summary": "Connect a calendar", + "parameters": [ + { + "name": "state", + "required": true, + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "code", + "required": true, + "in": "query", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GcalSaveRedirectOutput" + } + } + } + } + }, + "tags": [ + "Platform / Google Calendar" + ] + } + }, + "/v2/gcal/check": { + "get": { + "operationId": "GcalController_check", + "summary": "Check a calendar connection status", "parameters": [], "responses": { "200": { @@ -11,14 +144,14 @@ "content": { "application/json": { "schema": { - "type": "string" + "$ref": "#/components/schemas/GcalCheckOutput" } } } } }, "tags": [ - "Health - development only" + "Platform / Google Calendar" ] } }, @@ -264,42 +397,168 @@ ] } }, - "/v2/oauth-clients": { + "/v2/oauth-clients/{clientId}/webhooks": { "post": { - "operationId": "OAuthClientsController_createOAuthClient", - "summary": "", - "description": "⚠️ First, this endpoint requires `Cookie: next-auth.session-token=eyJhbGciOiJ` header. Log into Cal web app using owner of organization that was created after visiting `/settings/organizations/new`, refresh swagger docs, and the cookie will be added to requests automatically to pass the NextAuthGuard.\nSecond, make sure that the logged in user has organizationId set to pass the OrganizationRolesGuard guard.", - "parameters": [], + "operationId": "OAuthClientWebhooksController_createOAuthClientWebhook", + "summary": "Create a webhook", + "parameters": [ + { + "name": "clientId", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateOAuthClientInput" + "$ref": "#/components/schemas/CreateWebhookInputDto" } } } }, "responses": { "201": { - "description": "Create an OAuth client", + "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateOAuthClientResponseDto" + "$ref": "#/components/schemas/OAuthClientWebhookOutputResponseDto" } } } } }, "tags": [ - "OAuth - development only" + "Platform / Webhooks" ] }, "get": { - "operationId": "OAuthClientsController_getOAuthClients", - "summary": "", - "description": "⚠️ First, this endpoint requires `Cookie: next-auth.session-token=eyJhbGciOiJ` header. Log into Cal web app using owner of organization that was created after visiting `/settings/organizations/new`, refresh swagger docs, and the cookie will be added to requests automatically to pass the NextAuthGuard.\nSecond, make sure that the logged in user has organizationId set to pass the OrganizationRolesGuard guard.", + "operationId": "OAuthClientWebhooksController_getOAuthClientWebhooks", + "summary": "Get all webhooks", + "parameters": [ + { + "name": "clientId", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "take", + "required": false, + "in": "query", + "description": "The number of items to return", + "example": 10, + "schema": { + "type": "number" + } + }, + { + "name": "skip", + "required": false, + "in": "query", + "description": "The number of items to skip", + "example": 0, + "schema": { + "type": "number" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OAuthClientWebhooksOutputResponseDto" + } + } + } + } + }, + "tags": [ + "Platform / Webhooks" + ] + }, + "delete": { + "operationId": "OAuthClientWebhooksController_deleteAllOAuthClientWebhooks", + "summary": "Delete all webhooks", + "parameters": [ + { + "name": "clientId", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteManyWebhooksOutputResponseDto" + } + } + } + } + }, + "tags": [ + "Platform / Webhooks" + ] + } + }, + "/v2/oauth-clients/{clientId}/webhooks/{webhookId}": { + "patch": { + "operationId": "OAuthClientWebhooksController_updateOAuthClientWebhook", + "summary": "Update a webhook", + "parameters": [ + { + "name": "webhookId", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateWebhookInputDto" + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OAuthClientWebhookOutputResponseDto" + } + } + } + } + }, + "tags": [ + "Platform / Webhooks" + ] + }, + "get": { + "operationId": "OAuthClientWebhooksController_getOAuthClientWebhook", + "summary": "Get a webhook", "parameters": [], "responses": { "200": { @@ -307,792 +566,19 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GetOAuthClientsResponseDto" + "$ref": "#/components/schemas/OAuthClientWebhookOutputResponseDto" } } } } }, "tags": [ - "OAuth - development only" - ] - } - }, - "/v2/oauth-clients/{clientId}": { - "get": { - "operationId": "OAuthClientsController_getOAuthClientById", - "summary": "", - "description": "⚠️ First, this endpoint requires `Cookie: next-auth.session-token=eyJhbGciOiJ` header. Log into Cal web app using owner of organization that was created after visiting `/settings/organizations/new`, refresh swagger docs, and the cookie will be added to requests automatically to pass the NextAuthGuard.\nSecond, make sure that the logged in user has organizationId set to pass the OrganizationRolesGuard guard.", - "parameters": [ - { - "name": "clientId", - "required": true, - "in": "path", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetOAuthClientResponseDto" - } - } - } - } - }, - "tags": [ - "OAuth - development only" - ] - }, - "patch": { - "operationId": "OAuthClientsController_updateOAuthClient", - "summary": "", - "description": "⚠️ First, this endpoint requires `Cookie: next-auth.session-token=eyJhbGciOiJ` header. Log into Cal web app using owner of organization that was created after visiting `/settings/organizations/new`, refresh swagger docs, and the cookie will be added to requests automatically to pass the NextAuthGuard.\nSecond, make sure that the logged in user has organizationId set to pass the OrganizationRolesGuard guard.", - "parameters": [ - { - "name": "clientId", - "required": true, - "in": "path", - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateOAuthClientInput" - } - } - } - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetOAuthClientResponseDto" - } - } - } - } - }, - "tags": [ - "OAuth - development only" + "Platform / Webhooks" ] }, "delete": { - "operationId": "OAuthClientsController_deleteOAuthClient", - "summary": "", - "description": "⚠️ First, this endpoint requires `Cookie: next-auth.session-token=eyJhbGciOiJ` header. Log into Cal web app using owner of organization that was created after visiting `/settings/organizations/new`, refresh swagger docs, and the cookie will be added to requests automatically to pass the NextAuthGuard.\nSecond, make sure that the logged in user has organizationId set to pass the OrganizationRolesGuard guard.", - "parameters": [ - { - "name": "clientId", - "required": true, - "in": "path", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetOAuthClientResponseDto" - } - } - } - } - }, - "tags": [ - "OAuth - development only" - ] - } - }, - "/v2/oauth-clients/{clientId}/managed-users": { - "get": { - "operationId": "OAuthClientsController_getOAuthClientManagedUsersById", - "summary": "", - "description": "⚠️ First, this endpoint requires `Cookie: next-auth.session-token=eyJhbGciOiJ` header. Log into Cal web app using owner of organization that was created after visiting `/settings/organizations/new`, refresh swagger docs, and the cookie will be added to requests automatically to pass the NextAuthGuard.\nSecond, make sure that the logged in user has organizationId set to pass the OrganizationRolesGuard guard.", - "parameters": [ - { - "name": "clientId", - "required": true, - "in": "path", - "schema": { - "type": "string" - } - }, - { - "name": "limit", - "required": false, - "in": "query", - "description": "The number of items to return", - "example": 10, - "schema": { - "type": "number" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetManagedUsersOutput" - } - } - } - } - }, - "tags": [ - "OAuth - development only" - ] - } - }, - "/v2/oauth/{clientId}/authorize": { - "post": { - "operationId": "OAuthFlowController_authorize", - "summary": "Authorize an OAuth client", - "description": "Redirects the user to the specified 'redirect_uri' with an authorization code in query parameter if the client is authorized successfully. The code is then exchanged for access and refresh tokens via the `/exchange` endpoint.", - "parameters": [ - { - "name": "clientId", - "required": true, - "in": "path", - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/OAuthAuthorizeInput" - } - } - } - }, - "responses": { - "200": { - "description": "The user is redirected to the 'redirect_uri' with an authorization code in query parameter e.g. `redirectUri?code=secretcode.`" - }, - "400": { - "description": "Bad request if the OAuth client is not found, if the redirect URI is invalid, or if the user has already authorized the client." - } - }, - "tags": [ - "OAuth - development only" - ] - } - }, - "/v2/oauth/{clientId}/exchange": { - "post": { - "operationId": "OAuthFlowController_exchange", - "summary": "Exchange authorization code for access tokens", - "description": "Exchanges the authorization code received from the `/authorize` endpoint for access and refresh tokens. The authorization code should be provided in the 'Authorization' header prefixed with 'Bearer '.", - "parameters": [ - { - "name": "Authorization", - "required": true, - "in": "header", - "schema": { - "type": "string" - } - }, - { - "name": "clientId", - "required": true, - "in": "path", - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ExchangeAuthorizationCodeInput" - } - } - } - }, - "responses": { - "200": { - "description": "Successfully exchanged authorization code for access and refresh tokens.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/KeysResponseDto" - } - } - } - }, - "400": { - "description": "Bad request if the authorization code is missing, invalid, or if the client ID and secret do not match." - } - }, - "tags": [ - "OAuth - development only" - ] - } - }, - "/v2/oauth/{clientId}/refresh": { - "post": { - "operationId": "OAuthFlowController_refreshAccessToken", - "parameters": [ - { - "name": "clientId", - "required": true, - "in": "path", - "schema": { - "type": "string" - } - }, - { - "name": "x-cal-secret-key", - "required": true, - "in": "header", - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/RefreshTokenInput" - } - } - } - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/KeysResponseDto" - } - } - } - } - }, - "tags": [ - "OAuth - development only" - ] - } - }, - "/v2/event-types": { - "post": { - "operationId": "EventTypesController_2024_06_14_createEventType", - "summary": "Create an event type", - "parameters": [ - { - "name": "cal-api-version", - "in": "header", - "description": "Must be set to `2024-06-14`", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "Authorization", - "in": "header", - "description": "value must be `Bearer ` where `` either managed user access token or api key prefixed with cal_", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateEventTypeInput_2024_06_14" - } - } - } - }, - "responses": { - "201": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateEventTypeOutput_2024_06_14" - } - } - } - } - }, - "tags": [ - "Event Types" - ] - }, - "get": { - "operationId": "EventTypesController_2024_06_14_getEventTypes", - "summary": "Get all event types", - "parameters": [ - { - "name": "cal-api-version", - "in": "header", - "description": "Must be set to `2024-06-14`", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "username", - "required": true, - "in": "query", - "description": "The username of the user to get event types for. If only username provided will get all event types.", - "schema": { - "type": "string" - } - }, - { - "name": "eventSlug", - "required": true, - "in": "query", - "description": "Slug of event type to return. Notably, if eventSlug is provided then username must be provided too, because multiple users can have event with same slug.", - "schema": { - "type": "string" - } - }, - { - "name": "usernames", - "required": true, - "in": "query", - "description": "Get dynamic event type for multiple usernames separated by comma. e.g `usernames=alice,bob`", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetEventTypesOutput_2024_06_14" - } - } - } - } - }, - "tags": [ - "Event Types" - ] - } - }, - "/v2/event-types/{eventTypeId}": { - "get": { - "operationId": "EventTypesController_2024_06_14_getEventTypeById", - "summary": "Get an event type", - "parameters": [ - { - "name": "cal-api-version", - "in": "header", - "description": "Must be set to `2024-06-14`", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "eventTypeId", - "required": true, - "in": "path", - "schema": { - "type": "string" - } - }, - { - "name": "Authorization", - "in": "header", - "description": "value must be `Bearer ` where `` either managed user access token or api key prefixed with cal_", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetEventTypeOutput_2024_06_14" - } - } - } - } - }, - "tags": [ - "Event Types" - ] - }, - "patch": { - "operationId": "EventTypesController_2024_06_14_updateEventType", - "summary": "Update an event type", - "parameters": [ - { - "name": "cal-api-version", - "in": "header", - "description": "Must be set to `2024-06-14`", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "eventTypeId", - "required": true, - "in": "path", - "schema": { - "type": "number" - } - }, - { - "name": "Authorization", - "in": "header", - "description": "value must be `Bearer ` where `` either managed user access token or api key prefixed with cal_", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateEventTypeInput_2024_06_14" - } - } - } - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateEventTypeOutput_2024_06_14" - } - } - } - } - }, - "tags": [ - "Event Types" - ] - }, - "delete": { - "operationId": "EventTypesController_2024_06_14_deleteEventType", - "summary": "Delete an event type", - "parameters": [ - { - "name": "cal-api-version", - "in": "header", - "description": "Must be set to `2024-06-14`", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "eventTypeId", - "required": true, - "in": "path", - "schema": { - "type": "number" - } - }, - { - "name": "Authorization", - "in": "header", - "description": "value must be `Bearer ` where `` either managed user access token or api key prefixed with cal_", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeleteEventTypeOutput_2024_06_14" - } - } - } - } - }, - "tags": [ - "Event Types" - ] - } - }, - "/v2/selected-calendars": { - "post": { - "operationId": "SelectedCalendarsController_addSelectedCalendar", - "summary": "Add a selected calendar", - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SelectedCalendarsInputDto" - } - } - } - }, - "responses": { - "201": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SelectedCalendarOutputResponseDto" - } - } - } - } - }, - "tags": [ - "Selected Calendars" - ] - }, - "delete": { - "operationId": "SelectedCalendarsController_removeSelectedCalendar", - "summary": "Delete a selected calendar", - "parameters": [ - { - "name": "integration", - "required": true, - "in": "query", - "schema": { - "type": "string" - } - }, - { - "name": "externalId", - "required": true, - "in": "query", - "schema": { - "type": "string" - } - }, - { - "name": "credentialId", - "required": true, - "in": "query", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/SelectedCalendarOutputResponseDto" - } - } - } - } - }, - "tags": [ - "Selected Calendars" - ] - } - }, - "/v2/organizations/{orgId}/teams": { - "get": { - "operationId": "OrganizationsTeamsController_getAllTeams", - "summary": "Get all teams", - "parameters": [ - { - "name": "orgId", - "required": true, - "in": "path", - "schema": { - "type": "number" - } - }, - { - "name": "take", - "required": false, - "in": "query", - "description": "The number of items to return", - "example": 10, - "schema": { - "type": "number" - } - }, - { - "name": "skip", - "required": false, - "in": "query", - "description": "The number of items to skip", - "example": 0, - "schema": { - "type": "number" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/OrgTeamsOutputResponseDto" - } - } - } - } - }, - "tags": [ - "Orgs / Teams", - "Teams" - ] - }, - "post": { - "operationId": "OrganizationsTeamsController_createTeam", - "summary": "Create a team", - "parameters": [ - { - "name": "orgId", - "required": true, - "in": "path", - "schema": { - "type": "number" - } - }, - { - "name": "x-cal-client-id", - "required": true, - "in": "header", - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateOrgTeamDto" - } - } - } - }, - "responses": { - "201": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/OrgTeamOutputResponseDto" - } - } - } - } - }, - "tags": [ - "Orgs / Teams" - ] - } - }, - "/v2/organizations/{orgId}/teams/me": { - "get": { - "operationId": "OrganizationsTeamsController_getMyTeams", - "summary": "Get team membership for user", - "parameters": [ - { - "name": "orgId", - "required": true, - "in": "path", - "schema": { - "type": "number" - } - }, - { - "name": "take", - "required": false, - "in": "query", - "description": "The number of items to return", - "example": 10, - "schema": { - "type": "number" - } - }, - { - "name": "skip", - "required": false, - "in": "query", - "description": "The number of items to skip", - "example": 0, - "schema": { - "type": "number" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/OrgMeTeamsOutputResponseDto" - } - } - } - } - }, - "tags": [ - "Orgs / Teams" - ] - } - }, - "/v2/organizations/{orgId}/teams/{teamId}": { - "get": { - "operationId": "OrganizationsTeamsController_getTeam", - "summary": "Get a team", + "operationId": "OAuthClientWebhooksController_deleteOAuthClientWebhook", + "summary": "Delete a webhook", "parameters": [], "responses": { "200": { @@ -1100,1311 +586,14 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/OrgTeamOutputResponseDto" + "$ref": "#/components/schemas/OAuthClientWebhookOutputResponseDto" } } } } }, "tags": [ - "Orgs / Teams" - ] - }, - "delete": { - "operationId": "OrganizationsTeamsController_deleteTeam", - "summary": "Delete a team", - "parameters": [ - { - "name": "orgId", - "required": true, - "in": "path", - "schema": { - "type": "number" - } - }, - { - "name": "teamId", - "required": true, - "in": "path", - "schema": { - "type": "number" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/OrgTeamOutputResponseDto" - } - } - } - } - }, - "tags": [ - "Orgs / Teams" - ] - }, - "patch": { - "operationId": "OrganizationsTeamsController_updateTeam", - "summary": "Update a team", - "parameters": [ - { - "name": "orgId", - "required": true, - "in": "path", - "schema": { - "type": "number" - } - }, - { - "name": "teamId", - "required": true, - "in": "path", - "schema": { - "type": "number" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateOrgTeamDto" - } - } - } - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/OrgTeamOutputResponseDto" - } - } - } - } - }, - "tags": [ - "Orgs / Teams" - ] - } - }, - "/v2/organizations/{orgId}/schedules": { - "get": { - "operationId": "OrganizationsSchedulesController_getOrganizationSchedules", - "summary": "Get all schedules", - "parameters": [ - { - "name": "orgId", - "required": true, - "in": "path", - "schema": { - "type": "number" - } - }, - { - "name": "take", - "required": false, - "in": "query", - "description": "The number of items to return", - "example": 10, - "schema": { - "type": "number" - } - }, - { - "name": "skip", - "required": false, - "in": "query", - "description": "The number of items to skip", - "example": 0, - "schema": { - "type": "number" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetSchedulesOutput_2024_06_11" - } - } - } - } - }, - "tags": [ - "Orgs / Schedules" - ] - } - }, - "/v2/organizations/{orgId}/users/{userId}/schedules": { - "post": { - "operationId": "OrganizationsSchedulesController_createUserSchedule", - "summary": "Create a schedule", - "parameters": [ - { - "name": "userId", - "required": true, - "in": "path", - "schema": { - "type": "number" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateScheduleInput_2024_06_11" - } - } - } - }, - "responses": { - "201": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateScheduleOutput_2024_06_11" - } - } - } - } - }, - "tags": [ - "Orgs / Schedules", - "Orgs / Users / Schedules" - ] - }, - "get": { - "operationId": "OrganizationsSchedulesController_getUserSchedules", - "summary": "Get all schedules", - "parameters": [ - { - "name": "userId", - "required": true, - "in": "path", - "schema": { - "type": "number" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetSchedulesOutput_2024_06_11" - } - } - } - } - }, - "tags": [ - "Orgs / Schedules", - "Orgs / Users / Schedules" - ] - } - }, - "/v2/organizations/{orgId}/users/{userId}/schedules/{scheduleId}": { - "get": { - "operationId": "OrganizationsSchedulesController_getUserSchedule", - "summary": "Get a schedule", - "parameters": [ - { - "name": "userId", - "required": true, - "in": "path", - "schema": { - "type": "number" - } - }, - { - "name": "scheduleId", - "required": true, - "in": "path", - "schema": { - "type": "number" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetScheduleOutput_2024_06_11" - } - } - } - } - }, - "tags": [ - "Orgs / Schedules", - "Orgs / Users / Schedules" - ] - }, - "patch": { - "operationId": "OrganizationsSchedulesController_updateUserSchedule", - "summary": "Update a schedule", - "parameters": [ - { - "name": "userId", - "required": true, - "in": "path", - "schema": { - "type": "number" - } - }, - { - "name": "scheduleId", - "required": true, - "in": "path", - "schema": { - "type": "number" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateScheduleInput_2024_06_11" - } - } - } - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateScheduleOutput_2024_06_11" - } - } - } - } - }, - "tags": [ - "Orgs / Schedules", - "Orgs / Users / Schedules" - ] - }, - "delete": { - "operationId": "OrganizationsSchedulesController_deleteUserSchedule", - "summary": "Delete a schedule", - "parameters": [ - { - "name": "userId", - "required": true, - "in": "path", - "schema": { - "type": "number" - } - }, - { - "name": "scheduleId", - "required": true, - "in": "path", - "schema": { - "type": "number" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeleteScheduleOutput_2024_06_11" - } - } - } - } - }, - "tags": [ - "Orgs / Schedules", - "Orgs / Users / Schedules" - ] - } - }, - "/v2/organizations/{orgId}/users": { - "get": { - "operationId": "OrganizationsUsersController_getOrganizationsUsers", - "summary": "Get all users", - "parameters": [ - { - "name": "orgId", - "required": true, - "in": "path", - "schema": { - "type": "number" - } - }, - { - "name": "take", - "required": false, - "in": "query", - "description": "The number of items to return", - "example": 10, - "schema": { - "type": "number" - } - }, - { - "name": "skip", - "required": false, - "in": "query", - "description": "The number of items to skip", - "example": 0, - "schema": { - "type": "number" - } - }, - { - "name": "emails", - "required": false, - "in": "query", - "description": "The email address or an array of email addresses to filter by", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetOrganizationUsersOutput" - } - } - } - } - }, - "tags": [ - "Orgs / Users" - ] - }, - "post": { - "operationId": "OrganizationsUsersController_createOrganizationUser", - "summary": "Create a user", - "parameters": [ - { - "name": "orgId", - "required": true, - "in": "path", - "schema": { - "type": "number" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateOrganizationUserInput" - } - } - } - }, - "responses": { - "201": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetOrganizationUserOutput" - } - } - } - } - }, - "tags": [ - "Orgs / Users" - ] - } - }, - "/v2/organizations/{orgId}/users/{userId}": { - "patch": { - "operationId": "OrganizationsUsersController_updateOrganizationUser", - "summary": "Update a user", - "parameters": [ - { - "name": "orgId", - "required": true, - "in": "path", - "schema": { - "type": "number" - } - }, - { - "name": "userId", - "required": true, - "in": "path", - "schema": { - "type": "number" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateOrganizationUserInput" - } - } - } - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetOrganizationUserOutput" - } - } - } - } - }, - "tags": [ - "Orgs / Users" - ] - }, - "delete": { - "operationId": "OrganizationsUsersController_deleteOrganizationUser", - "summary": "Delete a user", - "parameters": [ - { - "name": "orgId", - "required": true, - "in": "path", - "schema": { - "type": "number" - } - }, - { - "name": "userId", - "required": true, - "in": "path", - "schema": { - "type": "number" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetOrganizationUserOutput" - } - } - } - } - }, - "tags": [ - "Orgs / Users" - ] - } - }, - "/v2/organizations/{orgId}/memberships": { - "get": { - "operationId": "OrganizationsMembershipsController_getAllMemberships", - "summary": "Get all memberships", - "parameters": [ - { - "name": "orgId", - "required": true, - "in": "path", - "schema": { - "type": "number" - } - }, - { - "name": "take", - "required": false, - "in": "query", - "description": "The number of items to return", - "example": 10, - "schema": { - "type": "number" - } - }, - { - "name": "skip", - "required": false, - "in": "query", - "description": "The number of items to skip", - "example": 0, - "schema": { - "type": "number" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetAllOrgMemberships" - } - } - } - } - }, - "tags": [ - "Orgs / Memberships" - ] - }, - "post": { - "operationId": "OrganizationsMembershipsController_createMembership", - "summary": "Create a membership", - "parameters": [ - { - "name": "orgId", - "required": true, - "in": "path", - "schema": { - "type": "number" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateOrgMembershipDto" - } - } - } - }, - "responses": { - "201": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateOrgMembershipOutput" - } - } - } - } - }, - "tags": [ - "Orgs / Memberships" - ] - } - }, - "/v2/organizations/{orgId}/memberships/{membershipId}": { - "get": { - "operationId": "OrganizationsMembershipsController_getOrgMembership", - "summary": "Get a membership", - "parameters": [ - { - "name": "orgId", - "required": true, - "in": "path", - "schema": { - "type": "number" - } - }, - { - "name": "membershipId", - "required": true, - "in": "path", - "schema": { - "type": "number" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetOrgMembership" - } - } - } - } - }, - "tags": [ - "Orgs / Memberships" - ] - }, - "delete": { - "operationId": "OrganizationsMembershipsController_deleteMembership", - "summary": "Delete a membership", - "parameters": [ - { - "name": "orgId", - "required": true, - "in": "path", - "schema": { - "type": "number" - } - }, - { - "name": "membershipId", - "required": true, - "in": "path", - "schema": { - "type": "number" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeleteOrgMembership" - } - } - } - } - }, - "tags": [ - "Orgs / Memberships" - ] - }, - "patch": { - "operationId": "OrganizationsMembershipsController_updateMembership", - "summary": "Update a membership", - "parameters": [ - { - "name": "orgId", - "required": true, - "in": "path", - "schema": { - "type": "number" - } - }, - { - "name": "membershipId", - "required": true, - "in": "path", - "schema": { - "type": "number" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateOrgMembershipDto" - } - } - } - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateOrgMembership" - } - } - } - } - }, - "tags": [ - "Orgs / Memberships" - ] - } - }, - "/v2/organizations/{orgId}/teams/{teamId}/event-types": { - "post": { - "operationId": "OrganizationsEventTypesController_createTeamEventType", - "summary": "Create an event type", - "parameters": [ - { - "name": "teamId", - "required": true, - "in": "path", - "schema": { - "type": "number" - } - }, - { - "name": "orgId", - "required": true, - "in": "path", - "schema": { - "type": "number" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateTeamEventTypeInput_2024_06_14" - } - } - } - }, - "responses": { - "201": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateTeamEventTypeOutput" - } - } - } - } - }, - "tags": [ - "Orgs / Event Types" - ] - }, - "get": { - "operationId": "OrganizationsEventTypesController_getTeamEventTypes", - "summary": "Get a team event type", - "parameters": [ - { - "name": "teamId", - "required": true, - "in": "path", - "schema": { - "type": "number" - } - }, - { - "name": "eventSlug", - "required": true, - "in": "query", - "description": "Slug of team event type to return.", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetTeamEventTypesOutput" - } - } - } - } - }, - "tags": [ - "Orgs / Event Types" - ] - } - }, - "/v2/organizations/{orgId}/teams/{teamId}/event-types/{eventTypeId}": { - "get": { - "operationId": "OrganizationsEventTypesController_getTeamEventType", - "summary": "Get an event type", - "parameters": [ - { - "name": "teamId", - "required": true, - "in": "path", - "schema": { - "type": "number" - } - }, - { - "name": "eventTypeId", - "required": true, - "in": "path", - "schema": { - "type": "number" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetTeamEventTypeOutput" - } - } - } - } - }, - "tags": [ - "Orgs / Event Types" - ] - }, - "patch": { - "operationId": "OrganizationsEventTypesController_updateTeamEventType", - "summary": "Update a team event type", - "parameters": [ - { - "name": "teamId", - "required": true, - "in": "path", - "schema": { - "type": "number" - } - }, - { - "name": "eventTypeId", - "required": true, - "in": "path", - "schema": { - "type": "number" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateTeamEventTypeInput_2024_06_14" - } - } - } - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateTeamEventTypeOutput" - } - } - } - } - }, - "tags": [ - "Orgs / Event Types" - ] - }, - "delete": { - "operationId": "OrganizationsEventTypesController_deleteTeamEventType", - "summary": "Delete a team event type", - "parameters": [ - { - "name": "teamId", - "required": true, - "in": "path", - "schema": { - "type": "number" - } - }, - { - "name": "eventTypeId", - "required": true, - "in": "path", - "schema": { - "type": "number" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeleteTeamEventTypeOutput" - } - } - } - } - }, - "tags": [ - "Orgs / Event Types" - ] - } - }, - "/v2/organizations/{orgId}/teams/{teamId}/event-types/{eventTypeId}/create-phone-call": { - "post": { - "operationId": "OrganizationsEventTypesController_createPhoneCall", - "summary": "Create a phone call", - "parameters": [ - { - "name": "eventTypeId", - "required": true, - "in": "path", - "schema": { - "type": "number" - } - }, - { - "name": "orgId", - "required": true, - "in": "path", - "schema": { - "type": "number" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreatePhoneCallInput" - } - } - } - }, - "responses": { - "201": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreatePhoneCallOutput" - } - } - } - } - }, - "tags": [ - "Orgs / Event Types" - ] - } - }, - "/v2/organizations/{orgId}/teams/event-types": { - "get": { - "operationId": "OrganizationsEventTypesController_getTeamsEventTypes", - "summary": "Get all team event types", - "parameters": [ - { - "name": "orgId", - "required": true, - "in": "path", - "schema": { - "type": "number" - } - }, - { - "name": "take", - "required": false, - "in": "query", - "description": "The number of items to return", - "example": 10, - "schema": { - "type": "number" - } - }, - { - "name": "skip", - "required": false, - "in": "query", - "description": "The number of items to skip", - "example": 0, - "schema": { - "type": "number" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetTeamEventTypesOutput" - } - } - } - } - }, - "tags": [ - "Orgs / Event Types" - ] - } - }, - "/v2/organizations/{orgId}/teams/{teamId}/memberships": { - "get": { - "operationId": "OrganizationsTeamsMembershipsController_getAllOrgTeamMemberships", - "summary": "Get all memberships", - "parameters": [ - { - "name": "orgId", - "required": true, - "in": "path", - "schema": { - "type": "number" - } - }, - { - "name": "teamId", - "required": true, - "in": "path", - "schema": { - "type": "number" - } - }, - { - "name": "take", - "required": false, - "in": "query", - "description": "The number of items to return", - "example": 10, - "schema": { - "type": "number" - } - }, - { - "name": "skip", - "required": false, - "in": "query", - "description": "The number of items to skip", - "example": 0, - "schema": { - "type": "number" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/OrgTeamMembershipsOutputResponseDto" - } - } - } - } - }, - "tags": [ - "Orgs / Teams / Memberships" - ] - }, - "post": { - "operationId": "OrganizationsTeamsMembershipsController_createOrgTeamMembership", - "summary": "Create a membership", - "parameters": [ - { - "name": "orgId", - "required": true, - "in": "path", - "schema": { - "type": "number" - } - }, - { - "name": "teamId", - "required": true, - "in": "path", - "schema": { - "type": "number" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateOrgTeamMembershipDto" - } - } - } - }, - "responses": { - "201": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/OrgTeamMembershipOutputResponseDto" - } - } - } - } - }, - "tags": [ - "Orgs / Teams / Memberships" - ] - } - }, - "/v2/organizations/{orgId}/teams/{teamId}/memberships/{membershipId}": { - "get": { - "operationId": "OrganizationsTeamsMembershipsController_getOrgTeamMembership", - "summary": "Get a membership", - "parameters": [ - { - "name": "orgId", - "required": true, - "in": "path", - "schema": { - "type": "number" - } - }, - { - "name": "teamId", - "required": true, - "in": "path", - "schema": { - "type": "number" - } - }, - { - "name": "membershipId", - "required": true, - "in": "path", - "schema": { - "type": "number" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/OrgTeamMembershipOutputResponseDto" - } - } - } - } - }, - "tags": [ - "Orgs / Teams / Memberships" - ] - }, - "delete": { - "operationId": "OrganizationsTeamsMembershipsController_deleteOrgTeamMembership", - "summary": "Delete a membership", - "parameters": [ - { - "name": "orgId", - "required": true, - "in": "path", - "schema": { - "type": "number" - } - }, - { - "name": "teamId", - "required": true, - "in": "path", - "schema": { - "type": "number" - } - }, - { - "name": "membershipId", - "required": true, - "in": "path", - "schema": { - "type": "number" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/OrgTeamMembershipOutputResponseDto" - } - } - } - } - }, - "tags": [ - "Orgs / Teams / Memberships" - ] - }, - "patch": { - "operationId": "OrganizationsTeamsMembershipsController_updateOrgTeamMembership", - "summary": "Update a membership", - "parameters": [ - { - "name": "orgId", - "required": true, - "in": "path", - "schema": { - "type": "number" - } - }, - { - "name": "teamId", - "required": true, - "in": "path", - "schema": { - "type": "number" - } - }, - { - "name": "membershipId", - "required": true, - "in": "path", - "schema": { - "type": "number" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateOrgTeamMembershipDto" - } - } - } - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/OrgTeamMembershipOutputResponseDto" - } - } - } - } - }, - "tags": [ - "Orgs / Teams / Memberships" + "Platform / Webhooks" ] } }, @@ -2942,6 +1131,1475 @@ ] } }, + "/v2/organizations/{orgId}/teams/{teamId}/event-types": { + "post": { + "operationId": "OrganizationsEventTypesController_createTeamEventType", + "summary": "Create an event type", + "parameters": [ + { + "name": "teamId", + "required": true, + "in": "path", + "schema": { + "type": "number" + } + }, + { + "name": "orgId", + "required": true, + "in": "path", + "schema": { + "type": "number" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateTeamEventTypeInput_2024_06_14" + } + } + } + }, + "responses": { + "201": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateTeamEventTypeOutput" + } + } + } + } + }, + "tags": [ + "Orgs / Event Types" + ] + }, + "get": { + "operationId": "OrganizationsEventTypesController_getTeamEventTypes", + "summary": "Get a team event type", + "parameters": [ + { + "name": "teamId", + "required": true, + "in": "path", + "schema": { + "type": "number" + } + }, + { + "name": "eventSlug", + "required": true, + "in": "query", + "description": "Slug of team event type to return.", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetTeamEventTypesOutput" + } + } + } + } + }, + "tags": [ + "Orgs / Event Types" + ] + } + }, + "/v2/organizations/{orgId}/teams/{teamId}/event-types/{eventTypeId}": { + "get": { + "operationId": "OrganizationsEventTypesController_getTeamEventType", + "summary": "Get an event type", + "parameters": [ + { + "name": "teamId", + "required": true, + "in": "path", + "schema": { + "type": "number" + } + }, + { + "name": "eventTypeId", + "required": true, + "in": "path", + "schema": { + "type": "number" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetTeamEventTypeOutput" + } + } + } + } + }, + "tags": [ + "Orgs / Event Types" + ] + }, + "patch": { + "operationId": "OrganizationsEventTypesController_updateTeamEventType", + "summary": "Update a team event type", + "parameters": [ + { + "name": "teamId", + "required": true, + "in": "path", + "schema": { + "type": "number" + } + }, + { + "name": "eventTypeId", + "required": true, + "in": "path", + "schema": { + "type": "number" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateTeamEventTypeInput_2024_06_14" + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateTeamEventTypeOutput" + } + } + } + } + }, + "tags": [ + "Orgs / Event Types" + ] + }, + "delete": { + "operationId": "OrganizationsEventTypesController_deleteTeamEventType", + "summary": "Delete a team event type", + "parameters": [ + { + "name": "teamId", + "required": true, + "in": "path", + "schema": { + "type": "number" + } + }, + { + "name": "eventTypeId", + "required": true, + "in": "path", + "schema": { + "type": "number" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteTeamEventTypeOutput" + } + } + } + } + }, + "tags": [ + "Orgs / Event Types" + ] + } + }, + "/v2/organizations/{orgId}/teams/{teamId}/event-types/{eventTypeId}/create-phone-call": { + "post": { + "operationId": "OrganizationsEventTypesController_createPhoneCall", + "summary": "Create a phone call", + "parameters": [ + { + "name": "eventTypeId", + "required": true, + "in": "path", + "schema": { + "type": "number" + } + }, + { + "name": "orgId", + "required": true, + "in": "path", + "schema": { + "type": "number" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreatePhoneCallInput" + } + } + } + }, + "responses": { + "201": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreatePhoneCallOutput" + } + } + } + } + }, + "tags": [ + "Orgs / Event Types" + ] + } + }, + "/v2/organizations/{orgId}/teams/event-types": { + "get": { + "operationId": "OrganizationsEventTypesController_getTeamsEventTypes", + "summary": "Get all team event types", + "parameters": [ + { + "name": "orgId", + "required": true, + "in": "path", + "schema": { + "type": "number" + } + }, + { + "name": "take", + "required": false, + "in": "query", + "description": "The number of items to return", + "example": 10, + "schema": { + "type": "number" + } + }, + { + "name": "skip", + "required": false, + "in": "query", + "description": "The number of items to skip", + "example": 0, + "schema": { + "type": "number" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetTeamEventTypesOutput" + } + } + } + } + }, + "tags": [ + "Orgs / Event Types" + ] + } + }, + "/v2/organizations/{orgId}/memberships": { + "get": { + "operationId": "OrganizationsMembershipsController_getAllMemberships", + "summary": "Get all memberships", + "parameters": [ + { + "name": "orgId", + "required": true, + "in": "path", + "schema": { + "type": "number" + } + }, + { + "name": "take", + "required": false, + "in": "query", + "description": "The number of items to return", + "example": 10, + "schema": { + "type": "number" + } + }, + { + "name": "skip", + "required": false, + "in": "query", + "description": "The number of items to skip", + "example": 0, + "schema": { + "type": "number" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetAllOrgMemberships" + } + } + } + } + }, + "tags": [ + "Orgs / Memberships" + ] + }, + "post": { + "operationId": "OrganizationsMembershipsController_createMembership", + "summary": "Create a membership", + "parameters": [ + { + "name": "orgId", + "required": true, + "in": "path", + "schema": { + "type": "number" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateOrgMembershipDto" + } + } + } + }, + "responses": { + "201": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateOrgMembershipOutput" + } + } + } + } + }, + "tags": [ + "Orgs / Memberships" + ] + } + }, + "/v2/organizations/{orgId}/memberships/{membershipId}": { + "get": { + "operationId": "OrganizationsMembershipsController_getOrgMembership", + "summary": "Get a membership", + "parameters": [ + { + "name": "orgId", + "required": true, + "in": "path", + "schema": { + "type": "number" + } + }, + { + "name": "membershipId", + "required": true, + "in": "path", + "schema": { + "type": "number" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetOrgMembership" + } + } + } + } + }, + "tags": [ + "Orgs / Memberships" + ] + }, + "delete": { + "operationId": "OrganizationsMembershipsController_deleteMembership", + "summary": "Delete a membership", + "parameters": [ + { + "name": "orgId", + "required": true, + "in": "path", + "schema": { + "type": "number" + } + }, + { + "name": "membershipId", + "required": true, + "in": "path", + "schema": { + "type": "number" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteOrgMembership" + } + } + } + } + }, + "tags": [ + "Orgs / Memberships" + ] + }, + "patch": { + "operationId": "OrganizationsMembershipsController_updateMembership", + "summary": "Update a membership", + "parameters": [ + { + "name": "orgId", + "required": true, + "in": "path", + "schema": { + "type": "number" + } + }, + { + "name": "membershipId", + "required": true, + "in": "path", + "schema": { + "type": "number" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateOrgMembershipDto" + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateOrgMembership" + } + } + } + } + }, + "tags": [ + "Orgs / Memberships" + ] + } + }, + "/v2/organizations/{orgId}/schedules": { + "get": { + "operationId": "OrganizationsSchedulesController_getOrganizationSchedules", + "summary": "Get all schedules", + "parameters": [ + { + "name": "orgId", + "required": true, + "in": "path", + "schema": { + "type": "number" + } + }, + { + "name": "take", + "required": false, + "in": "query", + "description": "The number of items to return", + "example": 10, + "schema": { + "type": "number" + } + }, + { + "name": "skip", + "required": false, + "in": "query", + "description": "The number of items to skip", + "example": 0, + "schema": { + "type": "number" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetSchedulesOutput_2024_06_11" + } + } + } + } + }, + "tags": [ + "Orgs / Schedules" + ] + } + }, + "/v2/organizations/{orgId}/users/{userId}/schedules": { + "post": { + "operationId": "OrganizationsSchedulesController_createUserSchedule", + "summary": "Create a schedule", + "parameters": [ + { + "name": "userId", + "required": true, + "in": "path", + "schema": { + "type": "number" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateScheduleInput_2024_06_11" + } + } + } + }, + "responses": { + "201": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateScheduleOutput_2024_06_11" + } + } + } + } + }, + "tags": [ + "Orgs / Schedules", + "Orgs / Users / Schedules" + ] + }, + "get": { + "operationId": "OrganizationsSchedulesController_getUserSchedules", + "summary": "Get all schedules", + "parameters": [ + { + "name": "userId", + "required": true, + "in": "path", + "schema": { + "type": "number" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetSchedulesOutput_2024_06_11" + } + } + } + } + }, + "tags": [ + "Orgs / Schedules", + "Orgs / Users / Schedules" + ] + } + }, + "/v2/organizations/{orgId}/users/{userId}/schedules/{scheduleId}": { + "get": { + "operationId": "OrganizationsSchedulesController_getUserSchedule", + "summary": "Get a schedule", + "parameters": [ + { + "name": "userId", + "required": true, + "in": "path", + "schema": { + "type": "number" + } + }, + { + "name": "scheduleId", + "required": true, + "in": "path", + "schema": { + "type": "number" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetScheduleOutput_2024_06_11" + } + } + } + } + }, + "tags": [ + "Orgs / Schedules", + "Orgs / Users / Schedules" + ] + }, + "patch": { + "operationId": "OrganizationsSchedulesController_updateUserSchedule", + "summary": "Update a schedule", + "parameters": [ + { + "name": "userId", + "required": true, + "in": "path", + "schema": { + "type": "number" + } + }, + { + "name": "scheduleId", + "required": true, + "in": "path", + "schema": { + "type": "number" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateScheduleInput_2024_06_11" + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateScheduleOutput_2024_06_11" + } + } + } + } + }, + "tags": [ + "Orgs / Schedules", + "Orgs / Users / Schedules" + ] + }, + "delete": { + "operationId": "OrganizationsSchedulesController_deleteUserSchedule", + "summary": "Delete a schedule", + "parameters": [ + { + "name": "userId", + "required": true, + "in": "path", + "schema": { + "type": "number" + } + }, + { + "name": "scheduleId", + "required": true, + "in": "path", + "schema": { + "type": "number" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteScheduleOutput_2024_06_11" + } + } + } + } + }, + "tags": [ + "Orgs / Schedules", + "Orgs / Users / Schedules" + ] + } + }, + "/v2/organizations/{orgId}/teams": { + "get": { + "operationId": "OrganizationsTeamsController_getAllTeams", + "summary": "Get all teams", + "parameters": [ + { + "name": "orgId", + "required": true, + "in": "path", + "schema": { + "type": "number" + } + }, + { + "name": "take", + "required": false, + "in": "query", + "description": "The number of items to return", + "example": 10, + "schema": { + "type": "number" + } + }, + { + "name": "skip", + "required": false, + "in": "query", + "description": "The number of items to skip", + "example": 0, + "schema": { + "type": "number" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OrgTeamsOutputResponseDto" + } + } + } + } + }, + "tags": [ + "Orgs / Teams", + "Teams" + ] + }, + "post": { + "operationId": "OrganizationsTeamsController_createTeam", + "summary": "Create a team", + "parameters": [ + { + "name": "orgId", + "required": true, + "in": "path", + "schema": { + "type": "number" + } + }, + { + "name": "x-cal-client-id", + "required": true, + "in": "header", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateOrgTeamDto" + } + } + } + }, + "responses": { + "201": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OrgTeamOutputResponseDto" + } + } + } + } + }, + "tags": [ + "Orgs / Teams" + ] + } + }, + "/v2/organizations/{orgId}/teams/me": { + "get": { + "operationId": "OrganizationsTeamsController_getMyTeams", + "summary": "Get team membership for user", + "parameters": [ + { + "name": "orgId", + "required": true, + "in": "path", + "schema": { + "type": "number" + } + }, + { + "name": "take", + "required": false, + "in": "query", + "description": "The number of items to return", + "example": 10, + "schema": { + "type": "number" + } + }, + { + "name": "skip", + "required": false, + "in": "query", + "description": "The number of items to skip", + "example": 0, + "schema": { + "type": "number" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OrgMeTeamsOutputResponseDto" + } + } + } + } + }, + "tags": [ + "Orgs / Teams" + ] + } + }, + "/v2/organizations/{orgId}/teams/{teamId}": { + "get": { + "operationId": "OrganizationsTeamsController_getTeam", + "summary": "Get a team", + "parameters": [], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OrgTeamOutputResponseDto" + } + } + } + } + }, + "tags": [ + "Orgs / Teams" + ] + }, + "delete": { + "operationId": "OrganizationsTeamsController_deleteTeam", + "summary": "Delete a team", + "parameters": [ + { + "name": "orgId", + "required": true, + "in": "path", + "schema": { + "type": "number" + } + }, + { + "name": "teamId", + "required": true, + "in": "path", + "schema": { + "type": "number" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OrgTeamOutputResponseDto" + } + } + } + } + }, + "tags": [ + "Orgs / Teams" + ] + }, + "patch": { + "operationId": "OrganizationsTeamsController_updateTeam", + "summary": "Update a team", + "parameters": [ + { + "name": "orgId", + "required": true, + "in": "path", + "schema": { + "type": "number" + } + }, + { + "name": "teamId", + "required": true, + "in": "path", + "schema": { + "type": "number" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateOrgTeamDto" + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OrgTeamOutputResponseDto" + } + } + } + } + }, + "tags": [ + "Orgs / Teams" + ] + } + }, + "/v2/organizations/{orgId}/teams/{teamId}/memberships": { + "get": { + "operationId": "OrganizationsTeamsMembershipsController_getAllOrgTeamMemberships", + "summary": "Get all memberships", + "parameters": [ + { + "name": "orgId", + "required": true, + "in": "path", + "schema": { + "type": "number" + } + }, + { + "name": "teamId", + "required": true, + "in": "path", + "schema": { + "type": "number" + } + }, + { + "name": "take", + "required": false, + "in": "query", + "description": "The number of items to return", + "example": 10, + "schema": { + "type": "number" + } + }, + { + "name": "skip", + "required": false, + "in": "query", + "description": "The number of items to skip", + "example": 0, + "schema": { + "type": "number" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OrgTeamMembershipsOutputResponseDto" + } + } + } + } + }, + "tags": [ + "Orgs / Teams / Memberships" + ] + }, + "post": { + "operationId": "OrganizationsTeamsMembershipsController_createOrgTeamMembership", + "summary": "Create a membership", + "parameters": [ + { + "name": "orgId", + "required": true, + "in": "path", + "schema": { + "type": "number" + } + }, + { + "name": "teamId", + "required": true, + "in": "path", + "schema": { + "type": "number" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateOrgTeamMembershipDto" + } + } + } + }, + "responses": { + "201": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OrgTeamMembershipOutputResponseDto" + } + } + } + } + }, + "tags": [ + "Orgs / Teams / Memberships" + ] + } + }, + "/v2/organizations/{orgId}/teams/{teamId}/memberships/{membershipId}": { + "get": { + "operationId": "OrganizationsTeamsMembershipsController_getOrgTeamMembership", + "summary": "Get a membership", + "parameters": [ + { + "name": "orgId", + "required": true, + "in": "path", + "schema": { + "type": "number" + } + }, + { + "name": "teamId", + "required": true, + "in": "path", + "schema": { + "type": "number" + } + }, + { + "name": "membershipId", + "required": true, + "in": "path", + "schema": { + "type": "number" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OrgTeamMembershipOutputResponseDto" + } + } + } + } + }, + "tags": [ + "Orgs / Teams / Memberships" + ] + }, + "delete": { + "operationId": "OrganizationsTeamsMembershipsController_deleteOrgTeamMembership", + "summary": "Delete a membership", + "parameters": [ + { + "name": "orgId", + "required": true, + "in": "path", + "schema": { + "type": "number" + } + }, + { + "name": "teamId", + "required": true, + "in": "path", + "schema": { + "type": "number" + } + }, + { + "name": "membershipId", + "required": true, + "in": "path", + "schema": { + "type": "number" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OrgTeamMembershipOutputResponseDto" + } + } + } + } + }, + "tags": [ + "Orgs / Teams / Memberships" + ] + }, + "patch": { + "operationId": "OrganizationsTeamsMembershipsController_updateOrgTeamMembership", + "summary": "Update a membership", + "parameters": [ + { + "name": "orgId", + "required": true, + "in": "path", + "schema": { + "type": "number" + } + }, + { + "name": "teamId", + "required": true, + "in": "path", + "schema": { + "type": "number" + } + }, + { + "name": "membershipId", + "required": true, + "in": "path", + "schema": { + "type": "number" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateOrgTeamMembershipDto" + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OrgTeamMembershipOutputResponseDto" + } + } + } + } + }, + "tags": [ + "Orgs / Teams / Memberships" + ] + } + }, + "/v2/organizations/{orgId}/users": { + "get": { + "operationId": "OrganizationsUsersController_getOrganizationsUsers", + "summary": "Get all users", + "parameters": [ + { + "name": "orgId", + "required": true, + "in": "path", + "schema": { + "type": "number" + } + }, + { + "name": "take", + "required": false, + "in": "query", + "description": "The number of items to return", + "example": 10, + "schema": { + "type": "number" + } + }, + { + "name": "skip", + "required": false, + "in": "query", + "description": "The number of items to skip", + "example": 0, + "schema": { + "type": "number" + } + }, + { + "name": "emails", + "required": false, + "in": "query", + "description": "The email address or an array of email addresses to filter by", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetOrganizationUsersOutput" + } + } + } + } + }, + "tags": [ + "Orgs / Users" + ] + }, + "post": { + "operationId": "OrganizationsUsersController_createOrganizationUser", + "summary": "Create a user", + "parameters": [ + { + "name": "orgId", + "required": true, + "in": "path", + "schema": { + "type": "number" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateOrganizationUserInput" + } + } + } + }, + "responses": { + "201": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetOrganizationUserOutput" + } + } + } + } + }, + "tags": [ + "Orgs / Users" + ] + } + }, + "/v2/organizations/{orgId}/users/{userId}": { + "patch": { + "operationId": "OrganizationsUsersController_updateOrganizationUser", + "summary": "Update a user", + "parameters": [ + { + "name": "orgId", + "required": true, + "in": "path", + "schema": { + "type": "number" + } + }, + { + "name": "userId", + "required": true, + "in": "path", + "schema": { + "type": "number" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateOrganizationUserInput" + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetOrganizationUserOutput" + } + } + } + } + }, + "tags": [ + "Orgs / Users" + ] + }, + "delete": { + "operationId": "OrganizationsUsersController_deleteOrganizationUser", + "summary": "Delete a user", + "parameters": [ + { + "name": "orgId", + "required": true, + "in": "path", + "schema": { + "type": "number" + } + }, + { + "name": "userId", + "required": true, + "in": "path", + "schema": { + "type": "number" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetOrganizationUserOutput" + } + } + } + } + }, + "tags": [ + "Orgs / Users" + ] + } + }, "/v2/organizations/{orgId}/webhooks": { "get": { "operationId": "OrganizationsWebhooksController_getAllOrganizationWebhooks", @@ -3131,792 +2789,6 @@ ] } }, - "/v2/schedules": { - "post": { - "operationId": "SchedulesController_2024_06_11_createSchedule", - "summary": "Create a schedule", - "description": "\n The point of creating schedules is for event types to be available at specific times.\n\n First goal of schedules is to have a default schedule. If you are platform customer and created managed users, then it is important to note that each managed user should have a default schedule.\n 1. If you passed `timeZone` when creating managed user, then the default schedule from Monday to Friday from 9AM to 5PM will be created with that timezone. Managed user can then change the default schedule via `AvailabilitySettings` atom.\n 2. If you did not, then we assume you want that user has specific schedule right away. You should create default schedule by specifying\n `\"isDefault\": true` in the request body. Until the user has a default schedule that user can't be booked or manage his / her schedule via the AvailabilitySettings atom.\n\n Second goal is to create other schedules that event types can point to, so that when that event is booked availability is not checked against the default schedule but against that specific schedule.\n After creating a non default schedule you can update event type to point to that schedule via the PATCH `event-types/{eventTypeId}` endpoint.\n\n When specifying start time and end time for each day use 24 hour format e.g. 08:00, 15:00 etc.\n ", - "parameters": [ - { - "name": "Authorization", - "in": "header", - "description": "value must be `Bearer ` where `` either managed user access token or api key prefixed with cal_", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "cal-api-version", - "in": "header", - "description": "Must be set to `2024-06-11`", - "required": true, - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateScheduleInput_2024_06_11" - } - } - } - }, - "responses": { - "201": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateScheduleOutput_2024_06_11" - } - } - } - } - }, - "tags": [ - "Schedules" - ] - }, - "get": { - "operationId": "SchedulesController_2024_06_11_getSchedules", - "summary": "Get all schedules (of the authenticated user)", - "parameters": [ - { - "name": "Authorization", - "in": "header", - "description": "value must be `Bearer ` where `` either managed user access token or api key prefixed with cal_", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "cal-api-version", - "in": "header", - "description": "Must be set to `2024-06-11`", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetSchedulesOutput_2024_06_11" - } - } - } - } - }, - "tags": [ - "Schedules" - ] - } - }, - "/v2/schedules/default": { - "get": { - "operationId": "SchedulesController_2024_06_11_getDefaultSchedule", - "summary": "Get default schedule (of the authenticated user)", - "parameters": [ - { - "name": "Authorization", - "in": "header", - "description": "value must be `Bearer ` where `` either managed user access token or api key prefixed with cal_", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "cal-api-version", - "in": "header", - "description": "Must be set to `2024-06-11`", - "required": true, - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "Returns the default schedule of the authenticated user", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetDefaultScheduleOutput_2024_06_11" - } - } - } - } - }, - "tags": [ - "Schedules" - ] - } - }, - "/v2/schedules/{scheduleId}": { - "get": { - "operationId": "SchedulesController_2024_06_11_getSchedule", - "summary": "Get a schedule", - "parameters": [ - { - "name": "Authorization", - "in": "header", - "description": "value must be `Bearer ` where `` either managed user access token or api key prefixed with cal_", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "cal-api-version", - "in": "header", - "description": "Must be set to `2024-06-11`", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "scheduleId", - "required": true, - "in": "path", - "schema": { - "type": "number" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetScheduleOutput_2024_06_11" - } - } - } - } - }, - "tags": [ - "Schedules" - ] - }, - "patch": { - "operationId": "SchedulesController_2024_06_11_updateSchedule", - "summary": "Update a schedule", - "parameters": [ - { - "name": "Authorization", - "in": "header", - "description": "value must be `Bearer ` where `` either managed user access token or api key prefixed with cal_", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "cal-api-version", - "in": "header", - "description": "Must be set to `2024-06-11`", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "scheduleId", - "required": true, - "in": "path", - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateScheduleInput_2024_06_11" - } - } - } - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateScheduleOutput_2024_06_11" - } - } - } - } - }, - "tags": [ - "Schedules" - ] - }, - "delete": { - "operationId": "SchedulesController_2024_06_11_deleteSchedule", - "summary": "Delete a schedule", - "parameters": [ - { - "name": "Authorization", - "in": "header", - "description": "value must be `Bearer ` where `` either managed user access token or api key prefixed with cal_", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "cal-api-version", - "in": "header", - "description": "Must be set to `2024-06-11`", - "required": true, - "schema": { - "type": "string" - } - }, - { - "name": "scheduleId", - "required": true, - "in": "path", - "schema": { - "type": "number" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeleteScheduleOutput_2024_06_11" - } - } - } - } - }, - "tags": [ - "Schedules" - ] - } - }, - "/v2/gcal/oauth/auth-url": { - "get": { - "operationId": "GcalController_redirect", - "summary": "Get auth URL", - "parameters": [ - { - "name": "Authorization", - "required": true, - "in": "header", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GcalAuthUrlOutput" - } - } - } - } - }, - "tags": [ - "Platform / Google Calendar" - ] - } - }, - "/v2/gcal/oauth/save": { - "get": { - "operationId": "GcalController_save", - "summary": "Connect a calendar", - "parameters": [ - { - "name": "state", - "required": true, - "in": "query", - "schema": { - "type": "string" - } - }, - { - "name": "code", - "required": true, - "in": "query", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GcalSaveRedirectOutput" - } - } - } - } - }, - "tags": [ - "Platform / Google Calendar" - ] - } - }, - "/v2/gcal/check": { - "get": { - "operationId": "GcalController_check", - "summary": "Check a calendar connection status", - "parameters": [], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GcalCheckOutput" - } - } - } - } - }, - "tags": [ - "Platform / Google Calendar" - ] - } - }, - "/v2/provider/{clientId}": { - "get": { - "operationId": "CalProviderController_verifyClientId", - "summary": "Get a provider", - "parameters": [ - { - "name": "clientId", - "required": true, - "in": "path", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProviderVerifyClientOutput" - } - } - } - } - }, - "tags": [ - "Platform / Cal Provider" - ] - } - }, - "/v2/provider/{clientId}/access-token": { - "get": { - "operationId": "CalProviderController_verifyAccessToken", - "summary": "Verify an access token", - "parameters": [ - { - "name": "clientId", - "required": true, - "in": "path", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ProviderVerifyAccessTokenOutput" - } - } - } - } - }, - "tags": [ - "Platform / Cal Provider" - ] - } - }, - "/v2/me": { - "get": { - "operationId": "MeController_getMe", - "summary": "Get my profile", - "parameters": [], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetMeOutput" - } - } - } - } - }, - "tags": [ - "Me" - ] - }, - "patch": { - "operationId": "MeController_updateMe", - "summary": "Update my profile", - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateManagedUserInput" - } - } - } - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateMeOutput" - } - } - } - } - }, - "tags": [ - "Me" - ] - } - }, - "/v2/calendars/ics-feed/save": { - "post": { - "operationId": "CalendarsController_createIcsFeed", - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateIcsFeedInputDto" - } - } - } - }, - "responses": { - "201": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateIcsFeedOutputResponseDto" - } - } - } - } - }, - "tags": [ - "Calendars" - ] - } - }, - "/v2/calendars/ics-feed/check": { - "get": { - "operationId": "CalendarsController_checkIcsFeed", - "parameters": [], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object" - } - } - } - } - }, - "tags": [ - "Calendars" - ] - } - }, - "/v2/calendars/busy-times": { - "get": { - "operationId": "CalendarsController_getBusyTimes", - "summary": "Get busy times", - "parameters": [ - { - "name": "loggedInUsersTz", - "required": true, - "in": "query", - "description": "The timezone of the logged in user represented as a string", - "example": "America/New_York", - "schema": { - "type": "string" - } - }, - { - "name": "calendarsToLoad", - "required": true, - "in": "query", - "description": "An array of Calendar objects representing the calendars to be loaded", - "example": "[{ credentialId: \"1\", externalId: \"AQgtJE7RnHEeyisVq2ENs2gAAAgEGAAAACgtJE7RnHEeyisVq2ENs2gAAAhSDAAAA\" }, { credentialId: \"2\", externalId: \"AQM7RnHEeyisVq2ENs2gAAAhFDBBBBB\" }]", - "schema": { - "type": "array", - "items": { - "type": "string" - } - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetBusyTimesOutput" - } - } - } - } - }, - "tags": [ - "Calendars" - ] - } - }, - "/v2/calendars": { - "get": { - "operationId": "CalendarsController_getCalendars", - "summary": "Get all calendars", - "parameters": [], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ConnectedCalendarsOutput" - } - } - } - } - }, - "tags": [ - "Calendars" - ] - } - }, - "/v2/calendars/{calendar}/connect": { - "get": { - "operationId": "CalendarsController_redirect", - "summary": "Get connect URL", - "parameters": [ - { - "name": "Authorization", - "required": true, - "in": "header", - "schema": { - "type": "string" - } - }, - { - "name": "calendar", - "required": true, - "in": "path", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object" - } - } - } - } - }, - "tags": [ - "Calendars" - ] - } - }, - "/v2/calendars/{calendar}/save": { - "get": { - "operationId": "CalendarsController_save", - "summary": "Save a calendar", - "parameters": [ - { - "name": "state", - "required": true, - "in": "query", - "schema": { - "type": "string" - } - }, - { - "name": "code", - "required": true, - "in": "query", - "schema": { - "type": "string" - } - }, - { - "name": "calendar", - "required": true, - "in": "path", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "" - } - }, - "tags": [ - "Calendars" - ] - } - }, - "/v2/calendars/{calendar}/credentials": { - "post": { - "operationId": "CalendarsController_syncCredentials", - "summary": "Sync credentials", - "parameters": [ - { - "name": "calendar", - "required": true, - "in": "path", - "schema": { - "type": "string" - } - } - ], - "responses": { - "201": { - "description": "" - } - }, - "tags": [ - "Calendars" - ] - } - }, - "/v2/calendars/{calendar}/check": { - "get": { - "operationId": "CalendarsController_check", - "summary": "Check a calendar connection", - "parameters": [ - { - "name": "calendar", - "required": true, - "in": "path", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object" - } - } - } - } - }, - "tags": [ - "Calendars" - ] - } - }, - "/v2/calendars/{calendar}/disconnect": { - "post": { - "operationId": "CalendarsController_deleteCalendarCredentials", - "summary": "Disconnect a calendar", - "parameters": [ - { - "name": "calendar", - "required": true, - "in": "path", - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeleteCalendarCredentialsInputBodyDto" - } - } - } - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeletedCalendarCredentialsOutputResponseDto" - } - } - } - } - }, - "tags": [ - "Calendars" - ] - } - }, "/v2/bookings": { "post": { "operationId": "BookingsController_2024_08_13_createBooking", @@ -4373,6 +3245,1566 @@ ] } }, + "/v2/calendars/ics-feed/save": { + "post": { + "operationId": "CalendarsController_createIcsFeed", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateIcsFeedInputDto" + } + } + } + }, + "responses": { + "201": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateIcsFeedOutputResponseDto" + } + } + } + } + }, + "tags": [ + "Calendars" + ] + } + }, + "/v2/calendars/ics-feed/check": { + "get": { + "operationId": "CalendarsController_checkIcsFeed", + "parameters": [], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + } + } + }, + "tags": [ + "Calendars" + ] + } + }, + "/v2/calendars/busy-times": { + "get": { + "operationId": "CalendarsController_getBusyTimes", + "summary": "Get busy times", + "parameters": [ + { + "name": "loggedInUsersTz", + "required": true, + "in": "query", + "description": "The timezone of the logged in user represented as a string", + "example": "America/New_York", + "schema": { + "type": "string" + } + }, + { + "name": "calendarsToLoad", + "required": true, + "in": "query", + "description": "An array of Calendar objects representing the calendars to be loaded", + "example": "[{ credentialId: \"1\", externalId: \"AQgtJE7RnHEeyisVq2ENs2gAAAgEGAAAACgtJE7RnHEeyisVq2ENs2gAAAhSDAAAA\" }, { credentialId: \"2\", externalId: \"AQM7RnHEeyisVq2ENs2gAAAhFDBBBBB\" }]", + "schema": { + "type": "array", + "items": { + "type": "string" + } + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetBusyTimesOutput" + } + } + } + } + }, + "tags": [ + "Calendars" + ] + } + }, + "/v2/calendars": { + "get": { + "operationId": "CalendarsController_getCalendars", + "summary": "Get all calendars", + "parameters": [], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ConnectedCalendarsOutput" + } + } + } + } + }, + "tags": [ + "Calendars" + ] + } + }, + "/v2/calendars/{calendar}/connect": { + "get": { + "operationId": "CalendarsController_redirect", + "summary": "Get connect URL", + "parameters": [ + { + "name": "Authorization", + "required": true, + "in": "header", + "schema": { + "type": "string" + } + }, + { + "name": "calendar", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + } + } + }, + "tags": [ + "Calendars" + ] + } + }, + "/v2/calendars/{calendar}/save": { + "get": { + "operationId": "CalendarsController_save", + "summary": "Save a calendar", + "parameters": [ + { + "name": "state", + "required": true, + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "code", + "required": true, + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "calendar", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "" + } + }, + "tags": [ + "Calendars" + ] + } + }, + "/v2/calendars/{calendar}/credentials": { + "post": { + "operationId": "CalendarsController_syncCredentials", + "summary": "Sync credentials", + "parameters": [ + { + "name": "calendar", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "201": { + "description": "" + } + }, + "tags": [ + "Calendars" + ] + } + }, + "/v2/calendars/{calendar}/check": { + "get": { + "operationId": "CalendarsController_check", + "summary": "Check a calendar connection", + "parameters": [ + { + "name": "calendar", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "object" + } + } + } + } + }, + "tags": [ + "Calendars" + ] + } + }, + "/v2/calendars/{calendar}/disconnect": { + "post": { + "operationId": "CalendarsController_deleteCalendarCredentials", + "summary": "Disconnect a calendar", + "parameters": [ + { + "name": "calendar", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteCalendarCredentialsInputBodyDto" + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeletedCalendarCredentialsOutputResponseDto" + } + } + } + } + }, + "tags": [ + "Calendars" + ] + } + }, + "/v2/destination-calendars": { + "put": { + "operationId": "DestinationCalendarsController_updateDestinationCalendars", + "summary": "Update destination calendars", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DestinationCalendarsInputBodyDto" + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DestinationCalendarsOutputResponseDto" + } + } + } + } + }, + "tags": [ + "Destination Calendars" + ] + } + }, + "/v2/event-types": { + "post": { + "operationId": "EventTypesController_2024_06_14_createEventType", + "summary": "Create an event type", + "parameters": [ + { + "name": "cal-api-version", + "in": "header", + "description": "Must be set to `2024-06-14`", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` either managed user access token or api key prefixed with cal_", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateEventTypeInput_2024_06_14" + } + } + } + }, + "responses": { + "201": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateEventTypeOutput_2024_06_14" + } + } + } + } + }, + "tags": [ + "Event Types" + ] + }, + "get": { + "operationId": "EventTypesController_2024_06_14_getEventTypes", + "summary": "Get all event types", + "parameters": [ + { + "name": "cal-api-version", + "in": "header", + "description": "Must be set to `2024-06-14`", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "username", + "required": true, + "in": "query", + "description": "The username of the user to get event types for. If only username provided will get all event types.", + "schema": { + "type": "string" + } + }, + { + "name": "eventSlug", + "required": true, + "in": "query", + "description": "Slug of event type to return. Notably, if eventSlug is provided then username must be provided too, because multiple users can have event with same slug.", + "schema": { + "type": "string" + } + }, + { + "name": "usernames", + "required": true, + "in": "query", + "description": "Get dynamic event type for multiple usernames separated by comma. e.g `usernames=alice,bob`", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetEventTypesOutput_2024_06_14" + } + } + } + } + }, + "tags": [ + "Event Types" + ] + } + }, + "/v2/event-types/{eventTypeId}": { + "get": { + "operationId": "EventTypesController_2024_06_14_getEventTypeById", + "summary": "Get an event type", + "parameters": [ + { + "name": "cal-api-version", + "in": "header", + "description": "Must be set to `2024-06-14`", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "eventTypeId", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` either managed user access token or api key prefixed with cal_", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetEventTypeOutput_2024_06_14" + } + } + } + } + }, + "tags": [ + "Event Types" + ] + }, + "patch": { + "operationId": "EventTypesController_2024_06_14_updateEventType", + "summary": "Update an event type", + "parameters": [ + { + "name": "cal-api-version", + "in": "header", + "description": "Must be set to `2024-06-14`", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "eventTypeId", + "required": true, + "in": "path", + "schema": { + "type": "number" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` either managed user access token or api key prefixed with cal_", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateEventTypeInput_2024_06_14" + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateEventTypeOutput_2024_06_14" + } + } + } + } + }, + "tags": [ + "Event Types" + ] + }, + "delete": { + "operationId": "EventTypesController_2024_06_14_deleteEventType", + "summary": "Delete an event type", + "parameters": [ + { + "name": "cal-api-version", + "in": "header", + "description": "Must be set to `2024-06-14`", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "eventTypeId", + "required": true, + "in": "path", + "schema": { + "type": "number" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` either managed user access token or api key prefixed with cal_", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteEventTypeOutput_2024_06_14" + } + } + } + } + }, + "tags": [ + "Event Types" + ] + } + }, + "/v2/event-types/{eventTypeId}/webhooks": { + "post": { + "operationId": "EventTypeWebhooksController_createEventTypeWebhook", + "summary": "Create a webhook", + "parameters": [ + { + "name": "eventTypeId", + "required": true, + "in": "path", + "schema": { + "type": "number" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateWebhookInputDto" + } + } + } + }, + "responses": { + "201": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EventTypeWebhookOutputResponseDto" + } + } + } + } + }, + "tags": [ + "Event Types / Webhooks" + ] + }, + "get": { + "operationId": "EventTypeWebhooksController_getEventTypeWebhooks", + "summary": "Get all webhooks", + "parameters": [ + { + "name": "eventTypeId", + "required": true, + "in": "path", + "schema": { + "type": "number" + } + }, + { + "name": "take", + "required": false, + "in": "query", + "description": "The number of items to return", + "example": 10, + "schema": { + "type": "number" + } + }, + { + "name": "skip", + "required": false, + "in": "query", + "description": "The number of items to skip", + "example": 0, + "schema": { + "type": "number" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EventTypeWebhooksOutputResponseDto" + } + } + } + } + }, + "tags": [ + "Event Types / Webhooks" + ] + }, + "delete": { + "operationId": "EventTypeWebhooksController_deleteAllEventTypeWebhooks", + "summary": "Delete all webhooks", + "parameters": [ + { + "name": "eventTypeId", + "required": true, + "in": "path", + "schema": { + "type": "number" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteManyWebhooksOutputResponseDto" + } + } + } + } + }, + "tags": [ + "Event Types / Webhooks" + ] + } + }, + "/v2/event-types/{eventTypeId}/webhooks/{webhookId}": { + "patch": { + "operationId": "EventTypeWebhooksController_updateEventTypeWebhook", + "summary": "Update a webhook", + "parameters": [ + { + "name": "webhookId", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateWebhookInputDto" + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EventTypeWebhookOutputResponseDto" + } + } + } + } + }, + "tags": [ + "Event Types / Webhooks" + ] + }, + "get": { + "operationId": "EventTypeWebhooksController_getEventTypeWebhook", + "summary": "Get a webhook", + "parameters": [], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EventTypeWebhookOutputResponseDto" + } + } + } + } + }, + "tags": [ + "Event Types / Webhooks" + ] + }, + "delete": { + "operationId": "EventTypeWebhooksController_deleteEventTypeWebhook", + "summary": "Delete a webhook", + "parameters": [], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/EventTypeWebhookOutputResponseDto" + } + } + } + } + }, + "tags": [ + "Event Types / Webhooks" + ] + } + }, + "/health": { + "get": { + "operationId": "AppController_getHealth", + "parameters": [], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "type": "string" + } + } + } + } + }, + "tags": [ + "Health - development only" + ] + } + }, + "/v2/me": { + "get": { + "operationId": "MeController_getMe", + "summary": "Get my profile", + "parameters": [], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetMeOutput" + } + } + } + } + }, + "tags": [ + "Me" + ] + }, + "patch": { + "operationId": "MeController_updateMe", + "summary": "Update my profile", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateManagedUserInput" + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateMeOutput" + } + } + } + } + }, + "tags": [ + "Me" + ] + } + }, + "/v2/oauth-clients": { + "post": { + "operationId": "OAuthClientsController_createOAuthClient", + "summary": "", + "description": "⚠️ First, this endpoint requires `Cookie: next-auth.session-token=eyJhbGciOiJ` header. Log into Cal web app using owner of organization that was created after visiting `/settings/organizations/new`, refresh swagger docs, and the cookie will be added to requests automatically to pass the NextAuthGuard.\nSecond, make sure that the logged in user has organizationId set to pass the OrganizationRolesGuard guard.", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateOAuthClientInput" + } + } + } + }, + "responses": { + "201": { + "description": "Create an OAuth client", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateOAuthClientResponseDto" + } + } + } + } + }, + "tags": [ + "OAuth - development only" + ] + }, + "get": { + "operationId": "OAuthClientsController_getOAuthClients", + "summary": "", + "description": "⚠️ First, this endpoint requires `Cookie: next-auth.session-token=eyJhbGciOiJ` header. Log into Cal web app using owner of organization that was created after visiting `/settings/organizations/new`, refresh swagger docs, and the cookie will be added to requests automatically to pass the NextAuthGuard.\nSecond, make sure that the logged in user has organizationId set to pass the OrganizationRolesGuard guard.", + "parameters": [], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetOAuthClientsResponseDto" + } + } + } + } + }, + "tags": [ + "OAuth - development only" + ] + } + }, + "/v2/oauth-clients/{clientId}": { + "get": { + "operationId": "OAuthClientsController_getOAuthClientById", + "summary": "", + "description": "⚠️ First, this endpoint requires `Cookie: next-auth.session-token=eyJhbGciOiJ` header. Log into Cal web app using owner of organization that was created after visiting `/settings/organizations/new`, refresh swagger docs, and the cookie will be added to requests automatically to pass the NextAuthGuard.\nSecond, make sure that the logged in user has organizationId set to pass the OrganizationRolesGuard guard.", + "parameters": [ + { + "name": "clientId", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetOAuthClientResponseDto" + } + } + } + } + }, + "tags": [ + "OAuth - development only" + ] + }, + "patch": { + "operationId": "OAuthClientsController_updateOAuthClient", + "summary": "", + "description": "⚠️ First, this endpoint requires `Cookie: next-auth.session-token=eyJhbGciOiJ` header. Log into Cal web app using owner of organization that was created after visiting `/settings/organizations/new`, refresh swagger docs, and the cookie will be added to requests automatically to pass the NextAuthGuard.\nSecond, make sure that the logged in user has organizationId set to pass the OrganizationRolesGuard guard.", + "parameters": [ + { + "name": "clientId", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateOAuthClientInput" + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetOAuthClientResponseDto" + } + } + } + } + }, + "tags": [ + "OAuth - development only" + ] + }, + "delete": { + "operationId": "OAuthClientsController_deleteOAuthClient", + "summary": "", + "description": "⚠️ First, this endpoint requires `Cookie: next-auth.session-token=eyJhbGciOiJ` header. Log into Cal web app using owner of organization that was created after visiting `/settings/organizations/new`, refresh swagger docs, and the cookie will be added to requests automatically to pass the NextAuthGuard.\nSecond, make sure that the logged in user has organizationId set to pass the OrganizationRolesGuard guard.", + "parameters": [ + { + "name": "clientId", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetOAuthClientResponseDto" + } + } + } + } + }, + "tags": [ + "OAuth - development only" + ] + } + }, + "/v2/oauth-clients/{clientId}/managed-users": { + "get": { + "operationId": "OAuthClientsController_getOAuthClientManagedUsersById", + "summary": "", + "description": "⚠️ First, this endpoint requires `Cookie: next-auth.session-token=eyJhbGciOiJ` header. Log into Cal web app using owner of organization that was created after visiting `/settings/organizations/new`, refresh swagger docs, and the cookie will be added to requests automatically to pass the NextAuthGuard.\nSecond, make sure that the logged in user has organizationId set to pass the OrganizationRolesGuard guard.", + "parameters": [ + { + "name": "clientId", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "limit", + "required": false, + "in": "query", + "description": "The number of items to return", + "example": 10, + "schema": { + "type": "number" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetManagedUsersOutput" + } + } + } + } + }, + "tags": [ + "OAuth - development only" + ] + } + }, + "/v2/oauth/{clientId}/authorize": { + "post": { + "operationId": "OAuthFlowController_authorize", + "summary": "Authorize an OAuth client", + "description": "Redirects the user to the specified 'redirect_uri' with an authorization code in query parameter if the client is authorized successfully. The code is then exchanged for access and refresh tokens via the `/exchange` endpoint.", + "parameters": [ + { + "name": "clientId", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/OAuthAuthorizeInput" + } + } + } + }, + "responses": { + "200": { + "description": "The user is redirected to the 'redirect_uri' with an authorization code in query parameter e.g. `redirectUri?code=secretcode.`" + }, + "400": { + "description": "Bad request if the OAuth client is not found, if the redirect URI is invalid, or if the user has already authorized the client." + } + }, + "tags": [ + "OAuth - development only" + ] + } + }, + "/v2/oauth/{clientId}/exchange": { + "post": { + "operationId": "OAuthFlowController_exchange", + "summary": "Exchange authorization code for access tokens", + "description": "Exchanges the authorization code received from the `/authorize` endpoint for access and refresh tokens. The authorization code should be provided in the 'Authorization' header prefixed with 'Bearer '.", + "parameters": [ + { + "name": "Authorization", + "required": true, + "in": "header", + "schema": { + "type": "string" + } + }, + { + "name": "clientId", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ExchangeAuthorizationCodeInput" + } + } + } + }, + "responses": { + "200": { + "description": "Successfully exchanged authorization code for access and refresh tokens.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/KeysResponseDto" + } + } + } + }, + "400": { + "description": "Bad request if the authorization code is missing, invalid, or if the client ID and secret do not match." + } + }, + "tags": [ + "OAuth - development only" + ] + } + }, + "/v2/oauth/{clientId}/refresh": { + "post": { + "operationId": "OAuthFlowController_refreshAccessToken", + "parameters": [ + { + "name": "clientId", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-secret-key", + "required": true, + "in": "header", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/RefreshTokenInput" + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/KeysResponseDto" + } + } + } + } + }, + "tags": [ + "OAuth - development only" + ] + } + }, + "/v2/schedules": { + "post": { + "operationId": "SchedulesController_2024_06_11_createSchedule", + "summary": "Create a schedule", + "description": "\n The point of creating schedules is for event types to be available at specific times.\n\n First goal of schedules is to have a default schedule. If you are platform customer and created managed users, then it is important to note that each managed user should have a default schedule.\n 1. If you passed `timeZone` when creating managed user, then the default schedule from Monday to Friday from 9AM to 5PM will be created with that timezone. Managed user can then change the default schedule via `AvailabilitySettings` atom.\n 2. If you did not, then we assume you want that user has specific schedule right away. You should create default schedule by specifying\n `\"isDefault\": true` in the request body. Until the user has a default schedule that user can't be booked or manage his / her schedule via the AvailabilitySettings atom.\n\n Second goal is to create other schedules that event types can point to, so that when that event is booked availability is not checked against the default schedule but against that specific schedule.\n After creating a non default schedule you can update event type to point to that schedule via the PATCH `event-types/{eventTypeId}` endpoint.\n\n When specifying start time and end time for each day use 24 hour format e.g. 08:00, 15:00 etc.\n ", + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` either managed user access token or api key prefixed with cal_", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "cal-api-version", + "in": "header", + "description": "Must be set to `2024-06-11`", + "required": true, + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateScheduleInput_2024_06_11" + } + } + } + }, + "responses": { + "201": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/CreateScheduleOutput_2024_06_11" + } + } + } + } + }, + "tags": [ + "Schedules" + ] + }, + "get": { + "operationId": "SchedulesController_2024_06_11_getSchedules", + "summary": "Get all schedules (of the authenticated user)", + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` either managed user access token or api key prefixed with cal_", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "cal-api-version", + "in": "header", + "description": "Must be set to `2024-06-11`", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetSchedulesOutput_2024_06_11" + } + } + } + } + }, + "tags": [ + "Schedules" + ] + } + }, + "/v2/schedules/default": { + "get": { + "operationId": "SchedulesController_2024_06_11_getDefaultSchedule", + "summary": "Get default schedule (of the authenticated user)", + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` either managed user access token or api key prefixed with cal_", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "cal-api-version", + "in": "header", + "description": "Must be set to `2024-06-11`", + "required": true, + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "Returns the default schedule of the authenticated user", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetDefaultScheduleOutput_2024_06_11" + } + } + } + } + }, + "tags": [ + "Schedules" + ] + } + }, + "/v2/schedules/{scheduleId}": { + "get": { + "operationId": "SchedulesController_2024_06_11_getSchedule", + "summary": "Get a schedule", + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` either managed user access token or api key prefixed with cal_", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "cal-api-version", + "in": "header", + "description": "Must be set to `2024-06-11`", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "scheduleId", + "required": true, + "in": "path", + "schema": { + "type": "number" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetScheduleOutput_2024_06_11" + } + } + } + } + }, + "tags": [ + "Schedules" + ] + }, + "patch": { + "operationId": "SchedulesController_2024_06_11_updateSchedule", + "summary": "Update a schedule", + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` either managed user access token or api key prefixed with cal_", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "cal-api-version", + "in": "header", + "description": "Must be set to `2024-06-11`", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "scheduleId", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateScheduleInput_2024_06_11" + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateScheduleOutput_2024_06_11" + } + } + } + } + }, + "tags": [ + "Schedules" + ] + }, + "delete": { + "operationId": "SchedulesController_2024_06_11_deleteSchedule", + "summary": "Delete a schedule", + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` either managed user access token or api key prefixed with cal_", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "cal-api-version", + "in": "header", + "description": "Must be set to `2024-06-11`", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "scheduleId", + "required": true, + "in": "path", + "schema": { + "type": "number" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/DeleteScheduleOutput_2024_06_11" + } + } + } + } + }, + "tags": [ + "Schedules" + ] + } + }, + "/v2/selected-calendars": { + "post": { + "operationId": "SelectedCalendarsController_addSelectedCalendar", + "summary": "Add a selected calendar", + "parameters": [], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SelectedCalendarsInputDto" + } + } + } + }, + "responses": { + "201": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SelectedCalendarOutputResponseDto" + } + } + } + } + }, + "tags": [ + "Selected Calendars" + ] + }, + "delete": { + "operationId": "SelectedCalendarsController_removeSelectedCalendar", + "summary": "Delete a selected calendar", + "parameters": [ + { + "name": "integration", + "required": true, + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "externalId", + "required": true, + "in": "query", + "schema": { + "type": "string" + } + }, + { + "name": "credentialId", + "required": true, + "in": "query", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/SelectedCalendarOutputResponseDto" + } + } + } + } + }, + "tags": [ + "Selected Calendars" + ] + } + }, "/v2/slots/reserve": { "post": { "operationId": "SlotsController_reserveSlot", @@ -4633,438 +5065,6 @@ "Webhooks" ] } - }, - "/v2/event-types/{eventTypeId}/webhooks": { - "post": { - "operationId": "EventTypeWebhooksController_createEventTypeWebhook", - "summary": "Create a webhook", - "parameters": [ - { - "name": "eventTypeId", - "required": true, - "in": "path", - "schema": { - "type": "number" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateWebhookInputDto" - } - } - } - }, - "responses": { - "201": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EventTypeWebhookOutputResponseDto" - } - } - } - } - }, - "tags": [ - "Event Types / Webhooks" - ] - }, - "get": { - "operationId": "EventTypeWebhooksController_getEventTypeWebhooks", - "summary": "Get all webhooks", - "parameters": [ - { - "name": "eventTypeId", - "required": true, - "in": "path", - "schema": { - "type": "number" - } - }, - { - "name": "take", - "required": false, - "in": "query", - "description": "The number of items to return", - "example": 10, - "schema": { - "type": "number" - } - }, - { - "name": "skip", - "required": false, - "in": "query", - "description": "The number of items to skip", - "example": 0, - "schema": { - "type": "number" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EventTypeWebhooksOutputResponseDto" - } - } - } - } - }, - "tags": [ - "Event Types / Webhooks" - ] - }, - "delete": { - "operationId": "EventTypeWebhooksController_deleteAllEventTypeWebhooks", - "summary": "Delete all webhooks", - "parameters": [ - { - "name": "eventTypeId", - "required": true, - "in": "path", - "schema": { - "type": "number" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeleteManyWebhooksOutputResponseDto" - } - } - } - } - }, - "tags": [ - "Event Types / Webhooks" - ] - } - }, - "/v2/event-types/{eventTypeId}/webhooks/{webhookId}": { - "patch": { - "operationId": "EventTypeWebhooksController_updateEventTypeWebhook", - "summary": "Update a webhook", - "parameters": [ - { - "name": "webhookId", - "required": true, - "in": "path", - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateWebhookInputDto" - } - } - } - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EventTypeWebhookOutputResponseDto" - } - } - } - } - }, - "tags": [ - "Event Types / Webhooks" - ] - }, - "get": { - "operationId": "EventTypeWebhooksController_getEventTypeWebhook", - "summary": "Get a webhook", - "parameters": [], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EventTypeWebhookOutputResponseDto" - } - } - } - } - }, - "tags": [ - "Event Types / Webhooks" - ] - }, - "delete": { - "operationId": "EventTypeWebhooksController_deleteEventTypeWebhook", - "summary": "Delete a webhook", - "parameters": [], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/EventTypeWebhookOutputResponseDto" - } - } - } - } - }, - "tags": [ - "Event Types / Webhooks" - ] - } - }, - "/v2/oauth-clients/{clientId}/webhooks": { - "post": { - "operationId": "OAuthClientWebhooksController_createOAuthClientWebhook", - "summary": "Create a webhook", - "parameters": [ - { - "name": "clientId", - "required": true, - "in": "path", - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateWebhookInputDto" - } - } - } - }, - "responses": { - "201": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/OAuthClientWebhookOutputResponseDto" - } - } - } - } - }, - "tags": [ - "Platform / Webhooks" - ] - }, - "get": { - "operationId": "OAuthClientWebhooksController_getOAuthClientWebhooks", - "summary": "Get all webhooks", - "parameters": [ - { - "name": "clientId", - "required": true, - "in": "path", - "schema": { - "type": "string" - } - }, - { - "name": "take", - "required": false, - "in": "query", - "description": "The number of items to return", - "example": 10, - "schema": { - "type": "number" - } - }, - { - "name": "skip", - "required": false, - "in": "query", - "description": "The number of items to skip", - "example": 0, - "schema": { - "type": "number" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/OAuthClientWebhooksOutputResponseDto" - } - } - } - } - }, - "tags": [ - "Platform / Webhooks" - ] - }, - "delete": { - "operationId": "OAuthClientWebhooksController_deleteAllOAuthClientWebhooks", - "summary": "Delete all webhooks", - "parameters": [ - { - "name": "clientId", - "required": true, - "in": "path", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DeleteManyWebhooksOutputResponseDto" - } - } - } - } - }, - "tags": [ - "Platform / Webhooks" - ] - } - }, - "/v2/oauth-clients/{clientId}/webhooks/{webhookId}": { - "patch": { - "operationId": "OAuthClientWebhooksController_updateOAuthClientWebhook", - "summary": "Update a webhook", - "parameters": [ - { - "name": "webhookId", - "required": true, - "in": "path", - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateWebhookInputDto" - } - } - } - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/OAuthClientWebhookOutputResponseDto" - } - } - } - } - }, - "tags": [ - "Platform / Webhooks" - ] - }, - "get": { - "operationId": "OAuthClientWebhooksController_getOAuthClientWebhook", - "summary": "Get a webhook", - "parameters": [], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/OAuthClientWebhookOutputResponseDto" - } - } - } - } - }, - "tags": [ - "Platform / Webhooks" - ] - }, - "delete": { - "operationId": "OAuthClientWebhooksController_deleteOAuthClientWebhook", - "summary": "Delete a webhook", - "parameters": [], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/OAuthClientWebhookOutputResponseDto" - } - } - } - } - }, - "tags": [ - "Platform / Webhooks" - ] - } - }, - "/v2/destination-calendars": { - "put": { - "operationId": "DestinationCalendarsController_updateDestinationCalendars", - "summary": "Update destination calendars", - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DestinationCalendarsInputBodyDto" - } - } - } - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/DestinationCalendarsOutputResponseDto" - } - } - } - } - }, - "tags": [ - "Destination Calendars" - ] - } } }, "info": { @@ -5073,104 +5073,7 @@ "version": "1.0.0", "contact": {} }, - "tags": [ - { - "name": "Bookings", - "description": "" - }, - { - "name": "Calendars", - "description": "" - }, - { - "name": "Destination Calendars", - "description": "" - }, - { - "name": "Event Types", - "description": "" - }, - { - "name": "Event Types / Webhooks", - "description": "" - }, - { - "name": "Me", - "description": "" - }, - { - "name": "Orgs / Attributes", - "description": "" - }, - { - "name": "Orgs / Attributes / Options", - "description": "" - }, - { - "name": "Orgs / Event Types", - "description": "" - }, - { - "name": "Orgs / Memberships", - "description": "" - }, - { - "name": "Orgs / Teams", - "description": "" - }, - { - "name": "Orgs / Teams / Memberships", - "description": "" - }, - { - "name": "Orgs / Schedules", - "description": "" - }, - { - "name": "Orgs / Users", - "description": "" - }, - { - "name": "Orgs / Webhooks", - "description": "" - }, - { - "name": "Platform / Cal Provider", - "description": "" - }, - { - "name": "Platform / Google Calendar", - "description": "" - }, - { - "name": "Platform / Managed Users", - "description": "" - }, - { - "name": "Platform / Webhooks", - "description": "" - }, - { - "name": "Selected Calendars", - "description": "" - }, - { - "name": "Schedules", - "description": "" - }, - { - "name": "Slots", - "description": "" - }, - { - "name": "Timezones", - "description": "" - }, - { - "name": "Webhooks", - "description": "" - } - ], + "tags": [], "servers": [], "components": { "schemas": { @@ -5315,12 +5218,12 @@ }, "timeFormat": { "type": "number", - "example": 12, "enum": [ 12, 24 ], - "description": "Must be 12 or 24" + "example": 12, + "description": "Must be a number 12 or 24" }, "weekStart": { "type": "string",