diff --git a/apps/api/v2/src/ee/bookings/2024-08-13/controllers/bookings.controller.ts b/apps/api/v2/src/ee/bookings/2024-08-13/controllers/bookings.controller.ts index c13230148e..c25034f760 100644 --- a/apps/api/v2/src/ee/bookings/2024-08-13/controllers/bookings.controller.ts +++ b/apps/api/v2/src/ee/bookings/2024-08-13/controllers/bookings.controller.ts @@ -7,6 +7,7 @@ import { ReassignBookingOutput_2024_08_13 } from "@/ee/bookings/2024-08-13/outpu import { RescheduleBookingOutput_2024_08_13 } from "@/ee/bookings/2024-08-13/outputs/reschedule-booking.output"; import { BookingsService_2024_08_13 } from "@/ee/bookings/2024-08-13/services/bookings.service"; import { VERSION_2024_08_13_VALUE, VERSION_2024_08_13 } from "@/lib/api-versions"; +import { API_KEY_OR_ACCESS_TOKEN_HEADER } from "@/lib/docs/headers"; import { GetUser } from "@/modules/auth/decorators/get-user/get-user.decorator"; import { Permissions } from "@/modules/auth/decorators/permissions/permissions.decorator"; import { ApiAuthGuard } from "@/modules/auth/guards/api-auth/api-auth.guard"; @@ -155,12 +156,7 @@ export class BookingsController_2024_08_13 { @Get("/") @UseGuards(ApiAuthGuard) - @ApiHeader({ - name: "Authorization", - description: - "value must be `Bearer ` where `` either managed user access token or api key prefixed with cal_", - required: true, - }) + @ApiHeader(API_KEY_OR_ACCESS_TOKEN_HEADER) @Permissions([BOOKING_READ]) @ApiOperation({ summary: "Get all bookings" }) async getBookings( @@ -245,13 +241,10 @@ export class BookingsController_2024_08_13 { @HttpCode(HttpStatus.OK) @Permissions([BOOKING_WRITE]) @UseGuards(ApiAuthGuard, BookingUidGuard) - @ApiHeader({ - name: "Authorization", - description: - "value must be `Bearer ` where `` either managed user access token or api key prefixed with cal_", - required: true, + @ApiHeader(API_KEY_OR_ACCESS_TOKEN_HEADER) + @ApiOperation({ + summary: "Mark a booking absence - provided authorization header refers to owner of the booking.", }) - @ApiOperation({ summary: "Mark a booking absence" }) async markNoShow( @Param("bookingUid") bookingUid: string, @Body() body: MarkAbsentBookingInput_2024_08_13, @@ -269,13 +262,11 @@ export class BookingsController_2024_08_13 { @HttpCode(HttpStatus.OK) @Permissions([BOOKING_WRITE]) @UseGuards(ApiAuthGuard, BookingUidGuard) - @ApiHeader({ - name: "Authorization", - description: - "value must be `Bearer ` where `` either managed user access token or api key prefixed with cal_", - required: true, + @ApiHeader(API_KEY_OR_ACCESS_TOKEN_HEADER) + @ApiOperation({ + summary: + "Automatically reassign booking to a new host automatically - provided authorization header refers to person who reassigned the booking.", }) - @ApiOperation({ summary: "Automatically reassign booking to a new host" }) async reassignBooking( @Param("bookingUid") bookingUid: string, @GetUser() user: UserWithProfile @@ -292,13 +283,11 @@ export class BookingsController_2024_08_13 { @HttpCode(HttpStatus.OK) @Permissions([BOOKING_WRITE]) @UseGuards(ApiAuthGuard, BookingUidGuard) - @ApiHeader({ - name: "Authorization", - description: - "value must be `Bearer ` where `` either managed user access token or api key prefixed with cal_", - required: true, + @ApiHeader(API_KEY_OR_ACCESS_TOKEN_HEADER) + @ApiOperation({ + summary: + "Reassign a booking to a specific user specified by the :userId - provided authorization header refers to person who reassigned the booking.", }) - @ApiOperation({ summary: "Reassign a booking to a specific user" }) async reassignBookingToUser( @Param("bookingUid") bookingUid: string, @Param("userId") userId: number, @@ -322,13 +311,11 @@ export class BookingsController_2024_08_13 { @HttpCode(HttpStatus.OK) @Permissions([BOOKING_WRITE]) @UseGuards(ApiAuthGuard, BookingUidGuard) - @ApiHeader({ - name: "Authorization", - description: - "value must be `Bearer ` where `` either managed user access token or api key prefixed with cal_", - required: true, + @ApiHeader(API_KEY_OR_ACCESS_TOKEN_HEADER) + @ApiOperation({ + summary: + "Confirm booking that requires a confirmation - provided authorization header refers to owner of the booking.", }) - @ApiOperation({ summary: "Confirm booking that requires a confirmation" }) async confirmBooking( @Param("bookingUid") bookingUid: string, @GetUser() user: UserWithProfile @@ -345,13 +332,11 @@ export class BookingsController_2024_08_13 { @HttpCode(HttpStatus.OK) @Permissions([BOOKING_WRITE]) @UseGuards(ApiAuthGuard, BookingUidGuard) - @ApiHeader({ - name: "Authorization", - description: - "value must be `Bearer ` where `` either managed user access token or api key prefixed with cal_", - required: true, + @ApiHeader(API_KEY_OR_ACCESS_TOKEN_HEADER) + @ApiOperation({ + summary: + "Decline booking that requires a confirmation - provided authorization header refers to owner of the booking.", }) - @ApiOperation({ summary: "Decline booking that requires a confirmation" }) async declineBooking( @Param("bookingUid") bookingUid: string, @Body() body: DeclineBookingInput_2024_08_13, @@ -368,6 +353,7 @@ export class BookingsController_2024_08_13 { @Get("/:bookingUid/calendar-links") @UseGuards(ApiAuthGuard, BookingUidGuard) @Permissions([BOOKING_READ]) + @ApiHeader(API_KEY_OR_ACCESS_TOKEN_HEADER) @ApiOperation({ summary: "Get 'Add to Calendar' links for a booking", description: diff --git a/apps/api/v2/src/ee/calendars/controllers/calendars.controller.ts b/apps/api/v2/src/ee/calendars/controllers/calendars.controller.ts index 40e5e529ba..99bb84b92d 100644 --- a/apps/api/v2/src/ee/calendars/controllers/calendars.controller.ts +++ b/apps/api/v2/src/ee/calendars/controllers/calendars.controller.ts @@ -14,6 +14,7 @@ import { GoogleCalendarService } from "@/ee/calendars/services/gcal.service"; import { IcsFeedService } from "@/ee/calendars/services/ics-feed.service"; import { OutlookService } from "@/ee/calendars/services/outlook.service"; import { API_VERSIONS_VALUES } from "@/lib/api-versions"; +import { API_KEY_OR_ACCESS_TOKEN_HEADER } from "@/lib/docs/headers"; import { GetUser } from "@/modules/auth/decorators/get-user/get-user.decorator"; import { Permissions } from "@/modules/auth/decorators/permissions/permissions.decorator"; import { ApiAuthGuard } from "@/modules/auth/guards/api-auth/api-auth.guard"; @@ -34,7 +35,7 @@ import { Post, Body, } from "@nestjs/common"; -import { ApiOperation, ApiParam, ApiQuery, ApiTags as DocsTags } from "@nestjs/swagger"; +import { ApiHeader, ApiOperation, ApiParam, ApiQuery, ApiTags as DocsTags } from "@nestjs/swagger"; import { User } from "@prisma/client"; import { plainToClass } from "class-transformer"; import { Request } from "express"; @@ -68,6 +69,7 @@ export class CalendarsController { @Post("/ics-feed/save") @UseGuards(ApiAuthGuard) + @ApiHeader(API_KEY_OR_ACCESS_TOKEN_HEADER) @ApiOperation({ summary: "Save an ICS feed" }) async createIcsFeed( @GetUser("id") userId: number, @@ -79,12 +81,14 @@ export class CalendarsController { @Get("/ics-feed/check") @UseGuards(ApiAuthGuard) + @ApiHeader(API_KEY_OR_ACCESS_TOKEN_HEADER) @ApiOperation({ summary: "Check an ICS feed" }) async checkIcsFeed(@GetUser("id") userId: number): Promise { return await this.icsFeedService.check(userId); } @UseGuards(ApiAuthGuard) + @ApiHeader(API_KEY_OR_ACCESS_TOKEN_HEADER) @Get("/busy-times") @ApiOperation({ summary: "Get busy times", @@ -113,6 +117,7 @@ export class CalendarsController { @Get("/") @UseGuards(ApiAuthGuard) + @ApiHeader(API_KEY_OR_ACCESS_TOKEN_HEADER) @ApiOperation({ summary: "Get all calendars" }) async getCalendars(@GetUser("id") userId: number): Promise { const calendars = await this.calendarsService.getCalendars(userId); @@ -129,6 +134,7 @@ export class CalendarsController { name: "calendar", }) @UseGuards(ApiAuthGuard) + @ApiHeader(API_KEY_OR_ACCESS_TOKEN_HEADER) @Get("/:calendar/connect") @HttpCode(HttpStatus.OK) @ApiOperation({ summary: "Get oAuth connect URL" }) @@ -199,6 +205,7 @@ export class CalendarsController { name: "calendar", }) @UseGuards(ApiAuthGuard) + @ApiHeader(API_KEY_OR_ACCESS_TOKEN_HEADER) @Post("/:calendar/credentials") @ApiOperation({ summary: "Sync credentials" }) async syncCredentials( @@ -227,6 +234,7 @@ export class CalendarsController { @Get("/:calendar/check") @HttpCode(HttpStatus.OK) @UseGuards(ApiAuthGuard, PermissionsGuard) + @ApiHeader(API_KEY_OR_ACCESS_TOKEN_HEADER) @Permissions([APPS_READ]) @ApiOperation({ summary: "Check a calendar connection" }) async check(@GetUser("id") userId: number, @Param("calendar") calendar: string): Promise { @@ -251,6 +259,7 @@ export class CalendarsController { name: "calendar", }) @UseGuards(ApiAuthGuard) + @ApiHeader(API_KEY_OR_ACCESS_TOKEN_HEADER) @Post("/:calendar/disconnect") @HttpCode(HttpStatus.OK) @ApiOperation({ summary: "Disconnect a calendar" }) diff --git a/apps/api/v2/src/ee/event-types/event-types_2024_06_14/controllers/event-types.controller.ts b/apps/api/v2/src/ee/event-types/event-types_2024_06_14/controllers/event-types.controller.ts index 77c4ad37c3..ed15c46f74 100644 --- a/apps/api/v2/src/ee/event-types/event-types_2024_06_14/controllers/event-types.controller.ts +++ b/apps/api/v2/src/ee/event-types/event-types_2024_06_14/controllers/event-types.controller.ts @@ -7,6 +7,7 @@ import { EventTypeResponseTransformPipe } from "@/ee/event-types/event-types_202 import { EventTypesService_2024_06_14 } from "@/ee/event-types/event-types_2024_06_14/services/event-types.service"; import { InputEventTypesService_2024_06_14 } from "@/ee/event-types/event-types_2024_06_14/services/input-event-types.service"; import { VERSION_2024_06_14_VALUE } from "@/lib/api-versions"; +import { API_KEY_OR_ACCESS_TOKEN_HEADER } from "@/lib/docs/headers"; import { GetUser } from "@/modules/auth/decorators/get-user/get-user.decorator"; import { Permissions } from "@/modules/auth/decorators/permissions/permissions.decorator"; import { ApiAuthGuard } from "@/modules/auth/guards/api-auth/api-auth.guard"; @@ -67,12 +68,7 @@ export class EventTypesController_2024_06_14 { @Post("/") @Permissions([EVENT_TYPE_WRITE]) @UseGuards(ApiAuthGuard) - @ApiHeader({ - name: "Authorization", - description: - "value must be `Bearer ` where `` either managed user access token or api key prefixed with cal_", - required: true, - }) + @ApiHeader(API_KEY_OR_ACCESS_TOKEN_HEADER) @ApiOperation({ summary: "Create an event type" }) async createEventType( @Body() body: CreateEventTypeInput_2024_06_14, @@ -94,12 +90,7 @@ export class EventTypesController_2024_06_14 { @Get("/:eventTypeId") @Permissions([EVENT_TYPE_READ]) @UseGuards(ApiAuthGuard) - @ApiHeader({ - name: "Authorization", - description: - "value must be `Bearer ` where `` either managed user access token or api key prefixed with cal_", - required: true, - }) + @ApiHeader(API_KEY_OR_ACCESS_TOKEN_HEADER) @ApiOperation({ summary: "Get an event type" }) async getEventTypeById( @Param("eventTypeId") eventTypeId: string, @@ -149,12 +140,7 @@ export class EventTypesController_2024_06_14 { @Patch("/:eventTypeId") @Permissions([EVENT_TYPE_WRITE]) @UseGuards(ApiAuthGuard) - @ApiHeader({ - name: "Authorization", - description: - "value must be `Bearer ` where `` either managed user access token or api key prefixed with cal_", - required: true, - }) + @ApiHeader(API_KEY_OR_ACCESS_TOKEN_HEADER) @HttpCode(HttpStatus.OK) @ApiOperation({ summary: "Update an event type" }) async updateEventType( @@ -179,12 +165,7 @@ export class EventTypesController_2024_06_14 { @Delete("/:eventTypeId") @Permissions([EVENT_TYPE_WRITE]) @UseGuards(ApiAuthGuard) - @ApiHeader({ - name: "Authorization", - description: - "value must be `Bearer ` where `` either managed user access token or api key prefixed with cal_", - required: true, - }) + @ApiHeader(API_KEY_OR_ACCESS_TOKEN_HEADER) @ApiOperation({ summary: "Delete an event type" }) async deleteEventType( @Param("eventTypeId") eventTypeId: number, diff --git a/apps/api/v2/src/ee/me/me.controller.ts b/apps/api/v2/src/ee/me/me.controller.ts index 682743750d..4ae533b887 100644 --- a/apps/api/v2/src/ee/me/me.controller.ts +++ b/apps/api/v2/src/ee/me/me.controller.ts @@ -2,6 +2,7 @@ import { GetMeOutput } from "@/ee/me/outputs/get-me.output"; import { UpdateMeOutput } from "@/ee/me/outputs/update-me.output"; import { SchedulesService_2024_04_15 } from "@/ee/schedules/schedules_2024_04_15/services/schedules.service"; import { API_VERSIONS_VALUES } from "@/lib/api-versions"; +import { API_KEY_OR_ACCESS_TOKEN_HEADER } from "@/lib/docs/headers"; import { GetUser } from "@/modules/auth/decorators/get-user/get-user.decorator"; import { Permissions } from "@/modules/auth/decorators/permissions/permissions.decorator"; import { ApiAuthGuard } from "@/modules/auth/guards/api-auth/api-auth.guard"; @@ -10,7 +11,7 @@ import { UpdateManagedUserInput } from "@/modules/users/inputs/update-managed-us import { UsersService } from "@/modules/users/services/users.service"; import { UserWithProfile, UsersRepository } from "@/modules/users/users.repository"; import { Controller, UseGuards, Get, Patch, Body } from "@nestjs/common"; -import { ApiOperation, ApiTags as DocsTags } from "@nestjs/swagger"; +import { ApiHeader, ApiOperation, ApiTags as DocsTags } from "@nestjs/swagger"; import { PROFILE_READ, PROFILE_WRITE, SUCCESS_STATUS } from "@calcom/platform-constants"; import { userSchemaResponse } from "@calcom/platform-types"; @@ -21,6 +22,7 @@ import { userSchemaResponse } from "@calcom/platform-types"; }) @UseGuards(ApiAuthGuard, PermissionsGuard) @DocsTags("Me") +@ApiHeader(API_KEY_OR_ACCESS_TOKEN_HEADER) export class MeController { constructor( private readonly usersRepository: UsersRepository, diff --git a/apps/api/v2/src/ee/provider/provider.controller.ts b/apps/api/v2/src/ee/provider/provider.controller.ts index 25ee201895..bb5fd3d30e 100644 --- a/apps/api/v2/src/ee/provider/provider.controller.ts +++ b/apps/api/v2/src/ee/provider/provider.controller.ts @@ -1,6 +1,7 @@ import { ProviderVerifyAccessTokenOutput } from "@/ee/provider/outputs/verify-access-token.output"; import { ProviderVerifyClientOutput } from "@/ee/provider/outputs/verify-client.output"; import { API_VERSIONS_VALUES } from "@/lib/api-versions"; +import { ACCESS_TOKEN_HEADER } from "@/lib/docs/headers"; import { GetUser } from "@/modules/auth/decorators/get-user/get-user.decorator"; import { ApiAuthGuard } from "@/modules/auth/guards/api-auth/api-auth.guard"; import { OAuthClientRepository } from "@/modules/oauth-clients/oauth-client.repository"; @@ -16,7 +17,7 @@ import { UnauthorizedException, UseGuards, } from "@nestjs/common"; -import { ApiOperation, ApiTags as DocsTags } from "@nestjs/swagger"; +import { ApiExcludeController, ApiHeader, ApiOperation, ApiTags as DocsTags } from "@nestjs/swagger"; import { SUCCESS_STATUS } from "@calcom/platform-constants"; @@ -24,6 +25,9 @@ import { SUCCESS_STATUS } from "@calcom/platform-constants"; path: "/v2/provider", version: API_VERSIONS_VALUES, }) +// note(Lauris): this controller is used by useOAuthClient and useOAuthFlow internal hooks and if customer +// wants to know if access token is expired then the flow is to make request and then receive message it expired. +@ApiExcludeController() @DocsTags("Platform / Cal Provider") export class CalProviderController { constructor(private readonly oauthClientRepository: OAuthClientRepository) {} @@ -53,6 +57,7 @@ export class CalProviderController { @HttpCode(HttpStatus.OK) @UseGuards(ApiAuthGuard) @ApiOperation({ summary: "Verify an access token" }) + @ApiHeader(ACCESS_TOKEN_HEADER) async verifyAccessToken( @Param("clientId") clientId: string, @GetUser() user: UserWithProfile diff --git a/apps/api/v2/src/ee/schedules/schedules_2024_06_11/controllers/schedules.controller.ts b/apps/api/v2/src/ee/schedules/schedules_2024_06_11/controllers/schedules.controller.ts index 33e924029f..0cced59752 100644 --- a/apps/api/v2/src/ee/schedules/schedules_2024_06_11/controllers/schedules.controller.ts +++ b/apps/api/v2/src/ee/schedules/schedules_2024_06_11/controllers/schedules.controller.ts @@ -1,5 +1,6 @@ import { SchedulesService_2024_06_11 } from "@/ee/schedules/schedules_2024_06_11/services/schedules.service"; import { VERSION_2024_06_14, VERSION_2024_06_11 } from "@/lib/api-versions"; +import { API_KEY_OR_ACCESS_TOKEN_HEADER } from "@/lib/docs/headers"; import { GetUser } from "@/modules/auth/decorators/get-user/get-user.decorator"; import { Permissions } from "@/modules/auth/decorators/permissions/permissions.decorator"; import { ApiAuthGuard } from "@/modules/auth/guards/api-auth/api-auth.guard"; @@ -46,12 +47,7 @@ import { default: VERSION_2024_06_11, }, }) -@ApiHeader({ - name: "Authorization", - description: - "value must be `Bearer ` where `` either managed user access token or api key prefixed with cal_", - required: true, -}) +@ApiHeader(API_KEY_OR_ACCESS_TOKEN_HEADER) export class SchedulesController_2024_06_11 { constructor(private readonly schedulesService: SchedulesService_2024_06_11) {} diff --git a/apps/api/v2/src/lib/docs/headers.ts b/apps/api/v2/src/lib/docs/headers.ts new file mode 100644 index 0000000000..97983f9a06 --- /dev/null +++ b/apps/api/v2/src/lib/docs/headers.ts @@ -0,0 +1,60 @@ +import { ApiHeaderOptions } from "@nestjs/swagger"; + +import { X_CAL_CLIENT_ID, X_CAL_SECRET_KEY } from "@calcom/platform-constants"; + +export const OPTIONAL_X_CAL_CLIENT_ID_HEADER: ApiHeaderOptions = { + name: X_CAL_CLIENT_ID, + description: "For platform customers - OAuth client ID", + required: false, +}; + +export const OPTIONAL_X_CAL_SECRET_KEY_HEADER: ApiHeaderOptions = { + name: X_CAL_SECRET_KEY, + description: "For platform customers - OAuth client secret key", + required: false, +}; + +export const X_CAL_CLIENT_ID_HEADER: ApiHeaderOptions = { + name: X_CAL_CLIENT_ID, + description: "For platform customers - OAuth client ID", + required: false, +}; + +export const X_CAL_SECRET_KEY_HEADER: ApiHeaderOptions = { + name: X_CAL_SECRET_KEY, + description: "For platform customers - OAuth client secret key", + required: false, +}; + +export const OPTIONAL_API_KEY_HEADER: ApiHeaderOptions = { + name: "Authorization", + description: + "For non-platform customers - value must be `Bearer ` where `` is api key prefixed with cal_", + required: false, +}; + +export const API_KEY_HEADER: ApiHeaderOptions = { + name: "Authorization", + description: "value must be `Bearer ` where `` is api key prefixed with cal_", + required: true, +}; + +export const API_KEY_OR_ACCESS_TOKEN_HEADER: ApiHeaderOptions = { + name: "Authorization", + description: + "value must be `Bearer ` where `` is api key prefixed with cal_ or managed user access token", + required: true, +}; + +export const OPTIONAL_API_KEY_OR_ACCESS_TOKEN_HEADER: ApiHeaderOptions = { + name: "Authorization", + description: + "value must be `Bearer ` where `` is api key prefixed with cal_ or managed user access token", + required: false, +}; + +export const ACCESS_TOKEN_HEADER: ApiHeaderOptions = { + name: "Authorization", + description: "value must be `Bearer ` where `` is managed user access token", + required: true, +}; diff --git a/apps/api/v2/src/modules/api-keys/controllers/api-keys.controller.ts b/apps/api/v2/src/modules/api-keys/controllers/api-keys.controller.ts index 63a04c708f..988f4f793a 100644 --- a/apps/api/v2/src/modules/api-keys/controllers/api-keys.controller.ts +++ b/apps/api/v2/src/modules/api-keys/controllers/api-keys.controller.ts @@ -1,4 +1,5 @@ import { API_VERSIONS_VALUES } from "@/lib/api-versions"; +import { API_KEY_HEADER } from "@/lib/docs/headers"; import { RefreshApiKeyInput } from "@/modules/api-keys/inputs/refresh-api-key.input"; import { RefreshApiKeyOutput } from "@/modules/api-keys/outputs/refresh-api-key.output"; import { ApiKeysService } from "@/modules/api-keys/services/api-keys.service"; @@ -23,12 +24,7 @@ export class ApiKeysController { summary: "Refresh API Key", description: `Generate a new API key and delete the current one. Provide API key to refresh as a Bearer token in the Authorization header (e.g. "Authorization: Bearer ").`, }) - @ApiHeader({ - name: "Authorization", - description: "Bearer ", - required: true, - schema: { type: "string" }, - }) + @ApiHeader(API_KEY_HEADER) @Post("/refresh") @HttpCode(HttpStatus.OK) async refresh( diff --git a/apps/api/v2/src/modules/conferencing/controllers/conferencing.controller.ts b/apps/api/v2/src/modules/conferencing/controllers/conferencing.controller.ts index dd42e671b0..2d0710810b 100644 --- a/apps/api/v2/src/modules/conferencing/controllers/conferencing.controller.ts +++ b/apps/api/v2/src/modules/conferencing/controllers/conferencing.controller.ts @@ -1,4 +1,5 @@ import { API_VERSIONS_VALUES } from "@/lib/api-versions"; +import { API_KEY_OR_ACCESS_TOKEN_HEADER } from "@/lib/docs/headers"; import { GetUser } from "@/modules/auth/decorators/get-user/get-user.decorator"; import { ApiAuthGuard } from "@/modules/auth/guards/api-auth/api-auth.guard"; import { @@ -37,7 +38,7 @@ import { Req, HttpException, } from "@nestjs/common"; -import { ApiOperation, ApiParam, ApiTags as DocsTags } from "@nestjs/swagger"; +import { ApiHeader, ApiOperation, ApiParam, ApiTags as DocsTags } from "@nestjs/swagger"; import { plainToInstance } from "class-transformer"; import { Request } from "express"; @@ -70,6 +71,7 @@ export class ConferencingController { @Post("/:app/connect") @HttpCode(HttpStatus.OK) @UseGuards(ApiAuthGuard) + @ApiHeader(API_KEY_OR_ACCESS_TOKEN_HEADER) @ApiOperation({ summary: "Connect your conferencing application" }) @ApiParam({ name: "app", @@ -98,6 +100,7 @@ export class ConferencingController { @Get("/:app/oauth/auth-url") @HttpCode(HttpStatus.OK) @UseGuards(ApiAuthGuard) + @ApiHeader(API_KEY_OR_ACCESS_TOKEN_HEADER) @ApiOperation({ summary: "Get OAuth conferencing app auth url" }) @ApiParam({ name: "app", @@ -204,6 +207,7 @@ export class ConferencingController { @Get("/") @HttpCode(HttpStatus.OK) @UseGuards(ApiAuthGuard) + @ApiHeader(API_KEY_OR_ACCESS_TOKEN_HEADER) @ApiOperation({ summary: "List your conferencing applications" }) async listInstalledConferencingApps( @GetUser("id") userId: number @@ -220,6 +224,7 @@ export class ConferencingController { @Post("/:app/default") @HttpCode(HttpStatus.OK) @UseGuards(ApiAuthGuard) + @ApiHeader(API_KEY_OR_ACCESS_TOKEN_HEADER) @ApiOperation({ summary: "Set your default conferencing application" }) @ApiParam({ name: "app", @@ -238,6 +243,7 @@ export class ConferencingController { @Get("/default") @HttpCode(HttpStatus.OK) @UseGuards(ApiAuthGuard) + @ApiHeader(API_KEY_OR_ACCESS_TOKEN_HEADER) @ApiOperation({ summary: "Get your default conferencing application" }) async getDefault(@GetUser("id") userId: number): Promise { const defaultconferencingApp = await this.conferencingService.getUserDefaultConferencingApp(userId); @@ -247,6 +253,7 @@ export class ConferencingController { @Delete("/:app/disconnect") @HttpCode(HttpStatus.OK) @UseGuards(ApiAuthGuard) + @ApiHeader(API_KEY_OR_ACCESS_TOKEN_HEADER) @ApiOperation({ summary: "Disconnect your conferencing application" }) @ApiParam({ name: "app", diff --git a/apps/api/v2/src/modules/destination-calendars/controllers/destination-calendars.controller.ts b/apps/api/v2/src/modules/destination-calendars/controllers/destination-calendars.controller.ts index 8241f1b867..dbc002e464 100644 --- a/apps/api/v2/src/modules/destination-calendars/controllers/destination-calendars.controller.ts +++ b/apps/api/v2/src/modules/destination-calendars/controllers/destination-calendars.controller.ts @@ -1,4 +1,5 @@ import { API_VERSIONS_VALUES } from "@/lib/api-versions"; +import { API_KEY_OR_ACCESS_TOKEN_HEADER } from "@/lib/docs/headers"; import { GetUser } from "@/modules/auth/decorators/get-user/get-user.decorator"; import { ApiAuthGuard } from "@/modules/auth/guards/api-auth/api-auth.guard"; import { DestinationCalendarsInputBodyDto } from "@/modules/destination-calendars/inputs/destination-calendars.input"; @@ -9,7 +10,7 @@ import { import { DestinationCalendarsService } from "@/modules/destination-calendars/services/destination-calendars.service"; import { UserWithProfile } from "@/modules/users/users.repository"; import { Body, Controller, Put, UseGuards } from "@nestjs/common"; -import { ApiOperation, ApiTags as DocsTags } from "@nestjs/swagger"; +import { ApiHeader, ApiOperation, ApiTags as DocsTags } from "@nestjs/swagger"; import { plainToClass } from "class-transformer"; import { SUCCESS_STATUS } from "@calcom/platform-constants"; @@ -19,11 +20,12 @@ import { SUCCESS_STATUS } from "@calcom/platform-constants"; version: API_VERSIONS_VALUES, }) @DocsTags("Destination Calendars") +@ApiHeader(API_KEY_OR_ACCESS_TOKEN_HEADER) +@UseGuards(ApiAuthGuard) export class DestinationCalendarsController { constructor(private readonly destinationCalendarsService: DestinationCalendarsService) {} @Put("/") - @UseGuards(ApiAuthGuard) @ApiOperation({ summary: "Update destination calendars" }) async updateDestinationCalendars( @Body() input: DestinationCalendarsInputBodyDto, diff --git a/apps/api/v2/src/modules/event-types/controllers/event-types-webhooks.controller.ts b/apps/api/v2/src/modules/event-types/controllers/event-types-webhooks.controller.ts index 25ac6b8e0c..1953cea1d4 100644 --- a/apps/api/v2/src/modules/event-types/controllers/event-types-webhooks.controller.ts +++ b/apps/api/v2/src/modules/event-types/controllers/event-types-webhooks.controller.ts @@ -1,4 +1,5 @@ import { API_VERSIONS_VALUES } from "@/lib/api-versions"; +import { API_KEY_OR_ACCESS_TOKEN_HEADER } from "@/lib/docs/headers"; import { ApiAuthGuard } from "@/modules/auth/guards/api-auth/api-auth.guard"; import { GetWebhook } from "@/modules/webhooks/decorators/get-webhook-decorator"; import { IsUserEventTypeWebhookGuard } from "@/modules/webhooks/guards/is-user-event-type-webhook-guard"; @@ -25,7 +26,7 @@ import { Patch, ParseIntPipe, } from "@nestjs/common"; -import { ApiOperation, ApiTags as DocsTags } from "@nestjs/swagger"; +import { ApiHeader, ApiOperation, ApiTags as DocsTags } from "@nestjs/swagger"; import { Webhook } from "@prisma/client"; import { plainToClass } from "class-transformer"; @@ -38,6 +39,7 @@ import { SkipTakePagination } from "@calcom/platform-types"; }) @UseGuards(ApiAuthGuard, IsUserEventTypeWebhookGuard) @DocsTags("Event Types / Webhooks") +@ApiHeader(API_KEY_OR_ACCESS_TOKEN_HEADER) export class EventTypeWebhooksController { constructor( private readonly webhooksService: WebhooksService, diff --git a/apps/api/v2/src/modules/oauth-clients/controllers/oauth-client-users/oauth-client-users.controller.ts b/apps/api/v2/src/modules/oauth-clients/controllers/oauth-client-users/oauth-client-users.controller.ts index 493193ceba..d4b23dae19 100644 --- a/apps/api/v2/src/modules/oauth-clients/controllers/oauth-client-users/oauth-client-users.controller.ts +++ b/apps/api/v2/src/modules/oauth-clients/controllers/oauth-client-users/oauth-client-users.controller.ts @@ -31,11 +31,10 @@ import { Query, NotFoundException, } from "@nestjs/common"; -import { ApiOperation, ApiTags as DocsTags } from "@nestjs/swagger"; +import { ApiOperation, ApiTags as DocsTags, ApiHeader } from "@nestjs/swagger"; import { User, MembershipRole } from "@prisma/client"; -import { SUCCESS_STATUS } from "@calcom/platform-constants"; -import { Pagination } from "@calcom/platform-types"; +import { SUCCESS_STATUS, X_CAL_SECRET_KEY } from "@calcom/platform-constants"; @Controller({ path: "/v2/oauth-clients/:clientId/users", @@ -43,6 +42,11 @@ import { Pagination } from "@calcom/platform-types"; }) @UseGuards(ApiAuthGuard, OAuthClientGuard, OrganizationRolesGuard) @DocsTags("Platform / Managed Users") +@ApiHeader({ + name: X_CAL_SECRET_KEY, + description: "OAuth client secret key", + required: true, +}) export class OAuthClientUsersController { private readonly logger = new Logger("UserController"); diff --git a/apps/api/v2/src/modules/oauth-clients/controllers/oauth-client-webhooks/oauth-client-webhooks.controller.ts b/apps/api/v2/src/modules/oauth-clients/controllers/oauth-client-webhooks/oauth-client-webhooks.controller.ts index 55b78e3fbe..8dd6882b77 100644 --- a/apps/api/v2/src/modules/oauth-clients/controllers/oauth-client-webhooks/oauth-client-webhooks.controller.ts +++ b/apps/api/v2/src/modules/oauth-clients/controllers/oauth-client-webhooks/oauth-client-webhooks.controller.ts @@ -16,11 +16,11 @@ import { WebhookOutputPipe } from "@/modules/webhooks/pipes/WebhookOutputPipe"; import { OAuthClientWebhooksService } from "@/modules/webhooks/services/oauth-clients-webhooks.service"; import { WebhooksService } from "@/modules/webhooks/services/webhooks.service"; import { Controller, Post, Body, UseGuards, Get, Param, Query, Delete, Patch } from "@nestjs/common"; -import { ApiOperation, ApiTags as DocsTags } from "@nestjs/swagger"; +import { ApiHeader, ApiOperation, ApiTags as DocsTags } from "@nestjs/swagger"; import { Webhook, MembershipRole } from "@prisma/client"; import { plainToClass } from "class-transformer"; -import { SUCCESS_STATUS } from "@calcom/platform-constants"; +import { SUCCESS_STATUS, X_CAL_SECRET_KEY } from "@calcom/platform-constants"; import { SkipTakePagination } from "@calcom/platform-types"; import { OAuthClientGuard } from "../../guards/oauth-client-guard"; @@ -31,6 +31,11 @@ import { OAuthClientGuard } from "../../guards/oauth-client-guard"; }) @UseGuards(NextAuthGuard, OrganizationRolesGuard, OAuthClientGuard) @DocsTags("Platform / Webhooks") +@ApiHeader({ + name: X_CAL_SECRET_KEY, + description: "OAuth client secret key", + required: true, +}) export class OAuthClientWebhooksController { constructor( private readonly webhooksService: WebhooksService, diff --git a/apps/api/v2/src/modules/oauth-clients/controllers/oauth-clients/oauth-clients.controller.ts b/apps/api/v2/src/modules/oauth-clients/controllers/oauth-clients/oauth-clients.controller.ts index 0a082cbc35..922ba27412 100644 --- a/apps/api/v2/src/modules/oauth-clients/controllers/oauth-clients/oauth-clients.controller.ts +++ b/apps/api/v2/src/modules/oauth-clients/controllers/oauth-clients/oauth-clients.controller.ts @@ -1,4 +1,5 @@ import { API_VERSIONS_VALUES } from "@/lib/api-versions"; +import { API_KEY_HEADER } from "@/lib/docs/headers"; import { GetOrgId } from "@/modules/auth/decorators/get-org-id/get-org-id.decorator"; import { MembershipRoles } from "@/modules/auth/decorators/roles/membership-roles.decorator"; import { ApiAuthGuard } from "@/modules/auth/guards/api-auth/api-auth.guard"; @@ -9,7 +10,6 @@ import { CreateOAuthClientResponseDto } from "@/modules/oauth-clients/controller import { GetOAuthClientResponseDto } from "@/modules/oauth-clients/controllers/oauth-clients/responses/GetOAuthClientResponse.dto"; import { GetOAuthClientsResponseDto } from "@/modules/oauth-clients/controllers/oauth-clients/responses/GetOAuthClientsResponse.dto"; import { OAuthClientGuard } from "@/modules/oauth-clients/guards/oauth-client-guard"; -import { OAuthClientRepository } from "@/modules/oauth-clients/oauth-client.repository"; import { OAuthClientsService } from "@/modules/oauth-clients/services/oauth-clients/oauth-clients.service"; import { OrganizationsRepository } from "@/modules/organizations/index/organizations.repository"; import { UsersRepository } from "@/modules/users/users.repository"; @@ -26,10 +26,15 @@ import { HttpStatus, Logger, UseGuards, - NotFoundException, BadRequestException, } from "@nestjs/common"; -import { ApiCreatedResponse as DocsCreatedResponse, ApiTags } from "@nestjs/swagger"; +import { + ApiCreatedResponse as DocsCreatedResponse, + ApiTags, + ApiOperation, + ApiExcludeEndpoint, + ApiHeader, +} from "@nestjs/swagger"; import { User, MembershipRole } from "@prisma/client"; import { SUCCESS_STATUS } from "@calcom/platform-constants"; @@ -41,11 +46,11 @@ import { CreateOAuthClientInput, UpdateOAuthClientInput, Pagination } from "@cal }) @ApiTags("OAuth Clients") @UseGuards(ApiAuthGuard, OrganizationRolesGuard) +@ApiHeader(API_KEY_HEADER) export class OAuthClientsController { private readonly logger = new Logger("OAuthClientController"); constructor( - private readonly oauthClientRepository: OAuthClientRepository, private readonly oAuthClientsService: OAuthClientsService, private readonly userRepository: UsersRepository, private readonly teamsRepository: OrganizationsRepository @@ -58,6 +63,7 @@ export class OAuthClientsController { description: "Create an OAuth client", type: CreateOAuthClientResponseDto, }) + @ApiOperation({ summary: "Create an OAuth client" }) async createOAuthClient( @GetOrgId() organizationId: number, @Body() body: CreateOAuthClientInput @@ -68,7 +74,9 @@ export class OAuthClientsController { const organization = await this.teamsRepository.findByIdIncludeBilling(organizationId); if (!organization?.platformBilling || !organization?.platformBilling?.subscriptionId) { - throw new BadRequestException("Team is not subscribed, cannot create an OAuth Client."); + throw new BadRequestException( + "Team is not subscribed to platform plan, cannot create an OAuth Client." + ); } const oAuthClientCredentials = await this.oAuthClientsService.createOAuthClient(organizationId, body); @@ -81,6 +89,7 @@ export class OAuthClientsController { @Get("/") @HttpCode(HttpStatus.OK) + @ApiOperation({ summary: "Get all OAuth clients" }) @MembershipRoles([MembershipRole.ADMIN, MembershipRole.OWNER, MembershipRole.MEMBER]) async getOAuthClients(@GetOrgId() organizationId: number): Promise { const clients = await this.oAuthClientsService.getOAuthClients(organizationId); @@ -91,6 +100,7 @@ export class OAuthClientsController { @HttpCode(HttpStatus.OK) @MembershipRoles([MembershipRole.ADMIN, MembershipRole.OWNER, MembershipRole.MEMBER]) @UseGuards(OAuthClientGuard) + @ApiOperation({ summary: "Get an OAuth client" }) async getOAuthClientById(@Param("clientId") clientId: string): Promise { const client = await this.oAuthClientsService.getOAuthClientById(clientId); return { status: SUCCESS_STATUS, data: client }; @@ -100,6 +110,9 @@ export class OAuthClientsController { @HttpCode(HttpStatus.OK) @MembershipRoles([MembershipRole.ADMIN, MembershipRole.OWNER, MembershipRole.MEMBER]) @UseGuards(OAuthClientGuard) + // note(Lauris): Excluding this endpoint because we have oauth-clients-users.controller to fetch oAuth users and I am leaving this endpoint + // just in case someone is using it. + @ApiExcludeEndpoint() async getOAuthClientManagedUsersById( @Param("clientId") clientId: string, @Query() queryParams: Pagination @@ -118,6 +131,7 @@ export class OAuthClientsController { @HttpCode(HttpStatus.OK) @MembershipRoles([MembershipRole.ADMIN, MembershipRole.OWNER]) @UseGuards(OAuthClientGuard) + @ApiOperation({ summary: "Update an OAuth client" }) async updateOAuthClient( @Param("clientId") clientId: string, @Body() body: UpdateOAuthClientInput @@ -131,6 +145,7 @@ export class OAuthClientsController { @HttpCode(HttpStatus.OK) @MembershipRoles([MembershipRole.ADMIN, MembershipRole.OWNER]) @UseGuards(OAuthClientGuard) + @ApiOperation({ summary: "Delete an OAuth client" }) async deleteOAuthClient(@Param("clientId") clientId: string): Promise { this.logger.log(`Deleting OAuth Client with ID: ${clientId}`); const client = await this.oAuthClientsService.deleteOAuthClient(clientId); diff --git a/apps/api/v2/src/modules/organizations/attributes/index/controllers/organizations-attributes.controller.ts b/apps/api/v2/src/modules/organizations/attributes/index/controllers/organizations-attributes.controller.ts index ea38461a90..d0052e9b7e 100644 --- a/apps/api/v2/src/modules/organizations/attributes/index/controllers/organizations-attributes.controller.ts +++ b/apps/api/v2/src/modules/organizations/attributes/index/controllers/organizations-attributes.controller.ts @@ -1,4 +1,5 @@ import { API_VERSIONS_VALUES } from "@/lib/api-versions"; +import { API_KEY_HEADER } from "@/lib/docs/headers"; import { PlatformPlan } from "@/modules/auth/decorators/billing/platform-plan.decorator"; import { Roles } from "@/modules/auth/decorators/roles/roles.decorator"; import { ApiAuthGuard } from "@/modules/auth/guards/api-auth/api-auth.guard"; @@ -28,7 +29,7 @@ import { Query, UseGuards, } from "@nestjs/common"; -import { ApiOperation, ApiTags as DocsTags } from "@nestjs/swagger"; +import { ApiHeader, ApiOperation, ApiTags as DocsTags } from "@nestjs/swagger"; import { SUCCESS_STATUS } from "@calcom/platform-constants"; import { SkipTakePagination } from "@calcom/platform-types"; @@ -39,6 +40,7 @@ import { SkipTakePagination } from "@calcom/platform-types"; }) @UseGuards(ApiAuthGuard, IsOrgGuard, RolesGuard, PlatformPlanGuard, IsAdminAPIEnabledGuard) @DocsTags("Orgs / Attributes") +@ApiHeader(API_KEY_HEADER) export class OrganizationsAttributesController { constructor(private readonly organizationsAttributesService: OrganizationAttributesService) {} // Gets all attributes for an organization diff --git a/apps/api/v2/src/modules/organizations/attributes/options/organizations-attributes-options.controller.ts b/apps/api/v2/src/modules/organizations/attributes/options/organizations-attributes-options.controller.ts index 56ed7e5347..fd3a496ee3 100644 --- a/apps/api/v2/src/modules/organizations/attributes/options/organizations-attributes-options.controller.ts +++ b/apps/api/v2/src/modules/organizations/attributes/options/organizations-attributes-options.controller.ts @@ -1,4 +1,5 @@ import { API_VERSIONS_VALUES } from "@/lib/api-versions"; +import { API_KEY_HEADER } from "@/lib/docs/headers"; import { PlatformPlan } from "@/modules/auth/decorators/billing/platform-plan.decorator"; import { Roles } from "@/modules/auth/decorators/roles/roles.decorator"; import { ApiAuthGuard } from "@/modules/auth/guards/api-auth/api-auth.guard"; @@ -20,7 +21,7 @@ import { GetAllAttributeOptionOutput } from "@/modules/organizations/attributes/ import { UpdateAttributeOptionOutput } from "@/modules/organizations/attributes/options/outputs/update-option.output"; import { OrganizationAttributeOptionService } from "@/modules/organizations/attributes/options/services/organization-attributes-option.service"; import { Body, Controller, Delete, Get, Param, ParseIntPipe, Patch, Post, UseGuards } from "@nestjs/common"; -import { ApiOperation, ApiTags as DocsTags } from "@nestjs/swagger"; +import { ApiHeader, ApiOperation, ApiTags as DocsTags } from "@nestjs/swagger"; import { SUCCESS_STATUS } from "@calcom/platform-constants"; @@ -30,6 +31,7 @@ import { SUCCESS_STATUS } from "@calcom/platform-constants"; }) @UseGuards(ApiAuthGuard, IsOrgGuard, RolesGuard, PlatformPlanGuard, IsAdminAPIEnabledGuard) @DocsTags("Orgs / Attributes / Options") +@ApiHeader(API_KEY_HEADER) export class OrganizationsAttributesOptionsController { constructor(private readonly organizationsAttributesOptionsService: OrganizationAttributeOptionService) {} diff --git a/apps/api/v2/src/modules/organizations/delegation-credentials/organizations-delegation-credential.controller.ts b/apps/api/v2/src/modules/organizations/delegation-credentials/organizations-delegation-credential.controller.ts index ccf182609a..d8962f893d 100644 --- a/apps/api/v2/src/modules/organizations/delegation-credentials/organizations-delegation-credential.controller.ts +++ b/apps/api/v2/src/modules/organizations/delegation-credentials/organizations-delegation-credential.controller.ts @@ -1,4 +1,9 @@ import { API_VERSIONS_VALUES } from "@/lib/api-versions"; +import { + OPTIONAL_X_CAL_CLIENT_ID_HEADER, + OPTIONAL_X_CAL_SECRET_KEY_HEADER, + OPTIONAL_API_KEY_HEADER, +} from "@/lib/docs/headers"; import { PlatformPlan } from "@/modules/auth/decorators/billing/platform-plan.decorator"; import { GetUser } from "@/modules/auth/decorators/get-user/get-user.decorator"; import { Roles } from "@/modules/auth/decorators/roles/roles.decorator"; @@ -23,7 +28,7 @@ import { HttpStatus, Patch, } from "@nestjs/common"; -import { ApiOperation, ApiTags as DocsTags } from "@nestjs/swagger"; +import { ApiHeader, ApiOperation, ApiTags as DocsTags } from "@nestjs/swagger"; import { User } from "@prisma/client"; import { plainToClass } from "class-transformer"; @@ -37,6 +42,9 @@ import { CreateDelegationCredentialInput } from "./inputs/create-delegation-cred }) @UseGuards(ApiAuthGuard, IsOrgGuard, RolesGuard, PlatformPlanGuard, IsAdminAPIEnabledGuard) @DocsTags("Orgs / Delegation Credentials") +@ApiHeader(OPTIONAL_X_CAL_CLIENT_ID_HEADER) +@ApiHeader(OPTIONAL_X_CAL_SECRET_KEY_HEADER) +@ApiHeader(OPTIONAL_API_KEY_HEADER) export class OrganizationsDelegationCredentialController { constructor(private readonly delegationCredentialService: OrganizationsDelegationCredentialService) {} diff --git a/apps/api/v2/src/modules/organizations/event-types/organizations-event-types.controller.ts b/apps/api/v2/src/modules/organizations/event-types/organizations-event-types.controller.ts index b9c94c1241..0336924b00 100644 --- a/apps/api/v2/src/modules/organizations/event-types/organizations-event-types.controller.ts +++ b/apps/api/v2/src/modules/organizations/event-types/organizations-event-types.controller.ts @@ -1,6 +1,11 @@ import { CreatePhoneCallInput } from "@/ee/event-types/event-types_2024_06_14/inputs/create-phone-call.input"; import { CreatePhoneCallOutput } from "@/ee/event-types/event-types_2024_06_14/outputs/create-phone-call.output"; import { API_VERSIONS_VALUES } from "@/lib/api-versions"; +import { + OPTIONAL_API_KEY_HEADER, + OPTIONAL_X_CAL_CLIENT_ID_HEADER, + OPTIONAL_X_CAL_SECRET_KEY_HEADER, +} from "@/lib/docs/headers"; import { PlatformPlan } from "@/modules/auth/decorators/billing/platform-plan.decorator"; import { GetUser } from "@/modules/auth/decorators/get-user/get-user.decorator"; import { Roles } from "@/modules/auth/decorators/roles/roles.decorator"; @@ -35,7 +40,7 @@ import { NotFoundException, Query, } from "@nestjs/common"; -import { ApiOperation, ApiTags as DocsTags } from "@nestjs/swagger"; +import { ApiHeader, ApiOperation, ApiTags as DocsTags } from "@nestjs/swagger"; import { ERROR_STATUS, SUCCESS_STATUS } from "@calcom/platform-constants"; import { handleCreatePhoneCall } from "@calcom/platform-libraries"; @@ -56,7 +61,10 @@ export type EventTypeHandlerResponse = { path: "/v2/organizations/:orgId", version: API_VERSIONS_VALUES, }) -@DocsTags("Orgs / Event Types") +@DocsTags("Orgs / Teams / Event Types") +@ApiHeader(OPTIONAL_X_CAL_CLIENT_ID_HEADER) +@ApiHeader(OPTIONAL_X_CAL_SECRET_KEY_HEADER) +@ApiHeader(OPTIONAL_API_KEY_HEADER) export class OrganizationsEventTypesController { constructor( private readonly organizationsEventTypesService: OrganizationsEventTypesService, diff --git a/apps/api/v2/src/modules/organizations/memberships/organizations-membership.controller.ts b/apps/api/v2/src/modules/organizations/memberships/organizations-membership.controller.ts index 7417ecfe89..5994ba5c87 100644 --- a/apps/api/v2/src/modules/organizations/memberships/organizations-membership.controller.ts +++ b/apps/api/v2/src/modules/organizations/memberships/organizations-membership.controller.ts @@ -1,4 +1,9 @@ import { API_VERSIONS_VALUES } from "@/lib/api-versions"; +import { + OPTIONAL_API_KEY_HEADER, + OPTIONAL_X_CAL_CLIENT_ID_HEADER, + OPTIONAL_X_CAL_SECRET_KEY_HEADER, +} from "@/lib/docs/headers"; import { PlatformPlan } from "@/modules/auth/decorators/billing/platform-plan.decorator"; import { Roles } from "@/modules/auth/decorators/roles/roles.decorator"; import { ApiAuthGuard } from "@/modules/auth/guards/api-auth/api-auth.guard"; @@ -30,7 +35,7 @@ import { HttpCode, HttpStatus, } from "@nestjs/common"; -import { ApiOperation, ApiTags as DocsTags } from "@nestjs/swagger"; +import { ApiHeader, ApiOperation, ApiTags as DocsTags } from "@nestjs/swagger"; import { plainToClass } from "class-transformer"; import { SUCCESS_STATUS } from "@calcom/platform-constants"; @@ -42,6 +47,9 @@ import { SkipTakePagination } from "@calcom/platform-types"; }) @UseGuards(ApiAuthGuard, IsOrgGuard, RolesGuard, PlatformPlanGuard, IsAdminAPIEnabledGuard) @DocsTags("Orgs / Memberships") +@ApiHeader(OPTIONAL_X_CAL_CLIENT_ID_HEADER) +@ApiHeader(OPTIONAL_X_CAL_SECRET_KEY_HEADER) +@ApiHeader(OPTIONAL_API_KEY_HEADER) export class OrganizationsMembershipsController { constructor(private organizationsMembershipService: OrganizationsMembershipService) {} diff --git a/apps/api/v2/src/modules/organizations/organizations/organizations-organizations.controller.ts b/apps/api/v2/src/modules/organizations/organizations/organizations-organizations.controller.ts index 2fa6d8ba3a..ee293a0b09 100644 --- a/apps/api/v2/src/modules/organizations/organizations/organizations-organizations.controller.ts +++ b/apps/api/v2/src/modules/organizations/organizations/organizations-organizations.controller.ts @@ -1,4 +1,5 @@ import { API_VERSIONS_VALUES } from "@/lib/api-versions"; +import { X_CAL_CLIENT_ID_HEADER, X_CAL_SECRET_KEY_HEADER } from "@/lib/docs/headers"; import { PlatformPlan } from "@/modules/auth/decorators/billing/platform-plan.decorator"; import { GetUser } from "@/modules/auth/decorators/get-user/get-user.decorator"; import { Roles } from "@/modules/auth/decorators/roles/roles.decorator"; @@ -28,7 +29,7 @@ import { HttpStatus, Delete, } from "@nestjs/common"; -import { ApiOperation, ApiTags as DocsTags } from "@nestjs/swagger"; +import { ApiHeader, ApiOperation, ApiTags as DocsTags } from "@nestjs/swagger"; import { SUCCESS_STATUS } from "@calcom/platform-constants"; @@ -40,6 +41,8 @@ const SCALE = "SCALE"; }) @UseGuards(ApiAuthGuard, IsOrgGuard, RolesGuard, PlatformPlanGuard, IsAdminAPIEnabledGuard) @DocsTags("Orgs / Orgs") +@ApiHeader(X_CAL_CLIENT_ID_HEADER) +@ApiHeader(X_CAL_SECRET_KEY_HEADER) export class OrganizationsOrganizationsController { constructor(private readonly managedOrganizationsService: ManagedOrganizationsService) {} diff --git a/apps/api/v2/src/modules/organizations/schedules/organizations-schedules.controller.ts b/apps/api/v2/src/modules/organizations/schedules/organizations-schedules.controller.ts index 004f761969..ec58e377ed 100644 --- a/apps/api/v2/src/modules/organizations/schedules/organizations-schedules.controller.ts +++ b/apps/api/v2/src/modules/organizations/schedules/organizations-schedules.controller.ts @@ -1,5 +1,10 @@ import { SchedulesService_2024_06_11 } from "@/ee/schedules/schedules_2024_06_11/services/schedules.service"; import { API_VERSIONS_VALUES } from "@/lib/api-versions"; +import { + OPTIONAL_API_KEY_HEADER, + OPTIONAL_X_CAL_CLIENT_ID_HEADER, + OPTIONAL_X_CAL_SECRET_KEY_HEADER, +} from "@/lib/docs/headers"; import { PlatformPlan } from "@/modules/auth/decorators/billing/platform-plan.decorator"; import { Roles } from "@/modules/auth/decorators/roles/roles.decorator"; import { ApiAuthGuard } from "@/modules/auth/guards/api-auth/api-auth.guard"; @@ -23,7 +28,7 @@ import { HttpStatus, Query, } from "@nestjs/common"; -import { ApiOperation, ApiTags as DocsTags } from "@nestjs/swagger"; +import { ApiHeader, ApiOperation, ApiTags as DocsTags } from "@nestjs/swagger"; import { SUCCESS_STATUS } from "@calcom/platform-constants"; import { @@ -42,7 +47,9 @@ import { SkipTakePagination } from "@calcom/platform-types"; version: API_VERSIONS_VALUES, }) @UseGuards(ApiAuthGuard, IsOrgGuard, RolesGuard, PlatformPlanGuard, IsAdminAPIEnabledGuard) -@DocsTags("Orgs / Schedules") +@ApiHeader(OPTIONAL_X_CAL_CLIENT_ID_HEADER) +@ApiHeader(OPTIONAL_X_CAL_SECRET_KEY_HEADER) +@ApiHeader(OPTIONAL_API_KEY_HEADER) export class OrganizationsSchedulesController { constructor( private schedulesService: SchedulesService_2024_06_11, @@ -52,6 +59,7 @@ export class OrganizationsSchedulesController { @Roles("ORG_ADMIN") @PlatformPlan("ESSENTIALS") @Get("/schedules") + @DocsTags("Orgs / Schedules") @ApiOperation({ summary: "Get all schedules" }) async getOrganizationSchedules( @Param("orgId", ParseIntPipe) orgId: number, diff --git a/apps/api/v2/src/modules/organizations/teams/bookings/organizations-teams-bookings.controller.ts b/apps/api/v2/src/modules/organizations/teams/bookings/organizations-teams-bookings.controller.ts index d503148e1f..d73776b29d 100644 --- a/apps/api/v2/src/modules/organizations/teams/bookings/organizations-teams-bookings.controller.ts +++ b/apps/api/v2/src/modules/organizations/teams/bookings/organizations-teams-bookings.controller.ts @@ -1,6 +1,11 @@ import { BookingUidGuard } from "@/ee/bookings/2024-08-13/guards/booking-uid.guard"; import { BookingsService_2024_08_13 } from "@/ee/bookings/2024-08-13/services/bookings.service"; import { API_VERSIONS_VALUES } from "@/lib/api-versions"; +import { + OPTIONAL_X_CAL_CLIENT_ID_HEADER, + OPTIONAL_X_CAL_SECRET_KEY_HEADER, + OPTIONAL_API_KEY_HEADER, +} from "@/lib/docs/headers"; import { PlatformPlan } from "@/modules/auth/decorators/billing/platform-plan.decorator"; import { GetUser } from "@/modules/auth/decorators/get-user/get-user.decorator"; import { Roles } from "@/modules/auth/decorators/roles/roles.decorator"; @@ -13,7 +18,7 @@ import { IsTeamInOrg } from "@/modules/auth/guards/teams/is-team-in-org.guard"; import { GetOrganizationsTeamsBookingsInput_2024_08_13 } from "@/modules/organizations/teams/bookings/inputs/get-organizations-teams-bookings.input"; import { UserWithProfile } from "@/modules/users/users.repository"; import { Controller, UseGuards, Get, Param, ParseIntPipe, Query, HttpStatus, HttpCode } from "@nestjs/common"; -import { ApiOperation, ApiTags as DocsTags } from "@nestjs/swagger"; +import { ApiHeader, ApiOperation, ApiTags as DocsTags } from "@nestjs/swagger"; import { SUCCESS_STATUS } from "@calcom/platform-constants"; import { GetBookingsOutput_2024_08_13 } from "@calcom/platform-types"; @@ -24,6 +29,9 @@ import { GetBookingsOutput_2024_08_13 } from "@calcom/platform-types"; }) @UseGuards(ApiAuthGuard, IsOrgGuard, RolesGuard, IsTeamInOrg, PlatformPlanGuard, IsAdminAPIEnabledGuard) @DocsTags("Orgs / Teams / Bookings") +@ApiHeader(OPTIONAL_X_CAL_CLIENT_ID_HEADER) +@ApiHeader(OPTIONAL_X_CAL_SECRET_KEY_HEADER) +@ApiHeader(OPTIONAL_API_KEY_HEADER) export class OrganizationsTeamsBookingsController { constructor(private readonly bookingsService: BookingsService_2024_08_13) {} diff --git a/apps/api/v2/src/modules/organizations/teams/index/organizations-teams.controller.ts b/apps/api/v2/src/modules/organizations/teams/index/organizations-teams.controller.ts index 49384d7246..25cda044c0 100644 --- a/apps/api/v2/src/modules/organizations/teams/index/organizations-teams.controller.ts +++ b/apps/api/v2/src/modules/organizations/teams/index/organizations-teams.controller.ts @@ -1,4 +1,9 @@ import { API_VERSIONS_VALUES } from "@/lib/api-versions"; +import { + OPTIONAL_API_KEY_HEADER, + OPTIONAL_X_CAL_CLIENT_ID_HEADER, + OPTIONAL_X_CAL_SECRET_KEY_HEADER, +} from "@/lib/docs/headers"; import { PlatformPlan } from "@/modules/auth/decorators/billing/platform-plan.decorator"; import { GetTeam } from "@/modules/auth/decorators/get-team/get-team.decorator"; import { GetUser } from "@/modules/auth/decorators/get-user/get-user.decorator"; @@ -30,10 +35,11 @@ import { Patch, Post, Body, - Headers, + Req, } from "@nestjs/common"; -import { ApiOperation, ApiTags as DocsTags } from "@nestjs/swagger"; +import { ApiHeader, ApiOperation, ApiTags as DocsTags } from "@nestjs/swagger"; import { plainToClass } from "class-transformer"; +import { Request } from "express"; import { SUCCESS_STATUS, X_CAL_CLIENT_ID } from "@calcom/platform-constants"; import { OrgTeamOutputDto } from "@calcom/platform-types"; @@ -46,11 +52,13 @@ import { Team } from "@calcom/prisma/client"; }) @UseGuards(ApiAuthGuard, IsOrgGuard, RolesGuard, PlatformPlanGuard, IsAdminAPIEnabledGuard) @DocsTags("Orgs / Teams") +@ApiHeader(OPTIONAL_X_CAL_CLIENT_ID_HEADER) +@ApiHeader(OPTIONAL_X_CAL_SECRET_KEY_HEADER) +@ApiHeader(OPTIONAL_API_KEY_HEADER) export class OrganizationsTeamsController { constructor(private organizationsTeamsService: OrganizationsTeamsService) {} @Get() - @DocsTags("Teams") @ApiOperation({ summary: "Get all teams" }) @Roles("ORG_ADMIN") @PlatformPlan("ESSENTIALS") @@ -148,8 +156,9 @@ export class OrganizationsTeamsController { @Param("orgId", ParseIntPipe) orgId: number, @Body() body: CreateOrgTeamDto, @GetUser() user: UserWithProfile, - @Headers(X_CAL_CLIENT_ID) oAuthClientId?: string + @Req() req: Request ): Promise { + const oAuthClientId = req.headers[X_CAL_CLIENT_ID] as string | undefined; const team = oAuthClientId ? await this.organizationsTeamsService.createPlatformOrgTeam(orgId, oAuthClientId, body, user) : await this.organizationsTeamsService.createOrgTeam(orgId, body, user); diff --git a/apps/api/v2/src/modules/organizations/teams/memberships/organizations-teams-memberships.controller.ts b/apps/api/v2/src/modules/organizations/teams/memberships/organizations-teams-memberships.controller.ts index ecca8145e8..b3deaa0e33 100644 --- a/apps/api/v2/src/modules/organizations/teams/memberships/organizations-teams-memberships.controller.ts +++ b/apps/api/v2/src/modules/organizations/teams/memberships/organizations-teams-memberships.controller.ts @@ -1,4 +1,9 @@ import { API_VERSIONS_VALUES } from "@/lib/api-versions"; +import { + OPTIONAL_API_KEY_HEADER, + OPTIONAL_X_CAL_CLIENT_ID_HEADER, + OPTIONAL_X_CAL_SECRET_KEY_HEADER, +} from "@/lib/docs/headers"; import { PlatformPlan } from "@/modules/auth/decorators/billing/platform-plan.decorator"; import { Roles } from "@/modules/auth/decorators/roles/roles.decorator"; import { ApiAuthGuard } from "@/modules/auth/guards/api-auth/api-auth.guard"; @@ -33,7 +38,7 @@ import { UnprocessableEntityException, Logger, } from "@nestjs/common"; -import { ApiOperation, ApiTags as DocsTags } from "@nestjs/swagger"; +import { ApiHeader, ApiOperation, ApiTags as DocsTags } from "@nestjs/swagger"; import { plainToClass } from "class-transformer"; import { SUCCESS_STATUS } from "@calcom/platform-constants"; @@ -46,6 +51,9 @@ import { SkipTakePagination } from "@calcom/platform-types"; }) @UseGuards(ApiAuthGuard, IsOrgGuard, RolesGuard, IsTeamInOrg, PlatformPlanGuard, IsAdminAPIEnabledGuard) @DocsTags("Orgs / Teams / Memberships") +@ApiHeader(OPTIONAL_X_CAL_CLIENT_ID_HEADER) +@ApiHeader(OPTIONAL_X_CAL_SECRET_KEY_HEADER) +@ApiHeader(OPTIONAL_API_KEY_HEADER) export class OrganizationsTeamsMembershipsController { private logger = new Logger("OrganizationsTeamsMembershipsController"); diff --git a/apps/api/v2/src/modules/organizations/teams/routing-forms/controllers/organizations-teams-routing-forms-responses.controller.ts b/apps/api/v2/src/modules/organizations/teams/routing-forms/controllers/organizations-teams-routing-forms-responses.controller.ts index cff980b761..073554c4d5 100644 --- a/apps/api/v2/src/modules/organizations/teams/routing-forms/controllers/organizations-teams-routing-forms-responses.controller.ts +++ b/apps/api/v2/src/modules/organizations/teams/routing-forms/controllers/organizations-teams-routing-forms-responses.controller.ts @@ -1,4 +1,5 @@ import { API_VERSIONS_VALUES } from "@/lib/api-versions"; +import { API_KEY_HEADER } from "@/lib/docs/headers"; import { PlatformPlan } from "@/modules/auth/decorators/billing/platform-plan.decorator"; import { Roles } from "@/modules/auth/decorators/roles/roles.decorator"; import { ApiAuthGuard } from "@/modules/auth/guards/api-auth/api-auth.guard"; @@ -8,11 +9,9 @@ import { IsOrgGuard } from "@/modules/auth/guards/organizations/is-org.guard"; import { IsRoutingFormInTeam } from "@/modules/auth/guards/routing-forms/is-routing-form-in-team.guard"; import { IsTeamInOrg } from "@/modules/auth/guards/teams/is-team-in-org.guard"; import { Controller, Get, Param, UseGuards } from "@nestjs/common"; -import { ApiOperation, ApiTags } from "@nestjs/swagger"; -import { plainToClass } from "class-transformer"; +import { ApiHeader, ApiOperation, ApiTags } from "@nestjs/swagger"; import { SUCCESS_STATUS } from "@calcom/platform-constants"; -import { RoutingFormResponseOutput } from "@calcom/platform-types"; import { RoutingFormsResponsesService } from "../../../../routing-forms-responses/services/routing-forms-responses.service"; import { GetRoutingFormResponsesOutput } from "../outputs/get-routing-form-responses.output"; @@ -30,6 +29,7 @@ import { GetRoutingFormResponsesOutput } from "../outputs/get-routing-form-respo PlatformPlanGuard, IsAdminAPIEnabledGuard ) +@ApiHeader(API_KEY_HEADER) export class OrganizationsTeamsRoutingFormsResponsesController { constructor(private readonly routingFormsResponsesService: RoutingFormsResponsesService) {} diff --git a/apps/api/v2/src/modules/organizations/teams/schedules/organizations-teams-schedules.controller.ts b/apps/api/v2/src/modules/organizations/teams/schedules/organizations-teams-schedules.controller.ts index cf826f497e..db5914b1d4 100644 --- a/apps/api/v2/src/modules/organizations/teams/schedules/organizations-teams-schedules.controller.ts +++ b/apps/api/v2/src/modules/organizations/teams/schedules/organizations-teams-schedules.controller.ts @@ -1,5 +1,10 @@ import { SchedulesService_2024_06_11 } from "@/ee/schedules/schedules_2024_06_11/services/schedules.service"; import { API_VERSIONS_VALUES } from "@/lib/api-versions"; +import { + OPTIONAL_API_KEY_HEADER, + OPTIONAL_X_CAL_CLIENT_ID_HEADER, + OPTIONAL_X_CAL_SECRET_KEY_HEADER, +} from "@/lib/docs/headers"; import { PlatformPlan } from "@/modules/auth/decorators/billing/platform-plan.decorator"; import { Roles } from "@/modules/auth/decorators/roles/roles.decorator"; import { ApiAuthGuard } from "@/modules/auth/guards/api-auth/api-auth.guard"; @@ -10,7 +15,7 @@ import { RolesGuard } from "@/modules/auth/guards/roles/roles.guard"; import { IsTeamInOrg } from "@/modules/auth/guards/teams/is-team-in-org.guard"; import { IsUserInOrgTeam } from "@/modules/auth/guards/users/is-user-in-org-team.guard"; import { Controller, UseGuards, Get, Param, ParseIntPipe } from "@nestjs/common"; -import { ApiOperation, ApiTags as DocsTags } from "@nestjs/swagger"; +import { ApiHeader, ApiOperation, ApiTags as DocsTags } from "@nestjs/swagger"; import { SUCCESS_STATUS } from "@calcom/platform-constants"; import { GetSchedulesOutput_2024_06_11 } from "@calcom/platform-types"; @@ -20,7 +25,9 @@ import { GetSchedulesOutput_2024_06_11 } from "@calcom/platform-types"; version: API_VERSIONS_VALUES, }) @UseGuards(ApiAuthGuard, IsOrgGuard, IsTeamInOrg, RolesGuard, PlatformPlanGuard, IsAdminAPIEnabledGuard) -@DocsTags("Orgs / Teams / Schedules") +@ApiHeader(OPTIONAL_X_CAL_CLIENT_ID_HEADER) +@ApiHeader(OPTIONAL_X_CAL_SECRET_KEY_HEADER) +@ApiHeader(OPTIONAL_API_KEY_HEADER) export class OrganizationsTeamsSchedulesController { constructor(private schedulesService: SchedulesService_2024_06_11) {} @@ -29,7 +36,9 @@ export class OrganizationsTeamsSchedulesController { @UseGuards(IsUserInOrgTeam) @Get("/users/:userId/schedules") @DocsTags("Orgs / Teams / Users / Schedules") - @ApiOperation({ summary: "Get schedules of a team member" }) + @ApiOperation({ + summary: "Get schedules of a team member", + }) async getUserSchedules( @Param("userId", ParseIntPipe) userId: number ): Promise { diff --git a/apps/api/v2/src/modules/organizations/users/index/controllers/organizations-users.controller.ts b/apps/api/v2/src/modules/organizations/users/index/controllers/organizations-users.controller.ts index 1df354df09..90b3bff658 100644 --- a/apps/api/v2/src/modules/organizations/users/index/controllers/organizations-users.controller.ts +++ b/apps/api/v2/src/modules/organizations/users/index/controllers/organizations-users.controller.ts @@ -1,4 +1,9 @@ import { API_VERSIONS_VALUES } from "@/lib/api-versions"; +import { + OPTIONAL_API_KEY_HEADER, + OPTIONAL_X_CAL_CLIENT_ID_HEADER, + OPTIONAL_X_CAL_SECRET_KEY_HEADER, +} from "@/lib/docs/headers"; import { PlatformPlan } from "@/modules/auth/decorators/billing/platform-plan.decorator"; import { GetOrg } from "@/modules/auth/decorators/get-org/get-org.decorator"; import { GetUser } from "@/modules/auth/decorators/get-user/get-user.decorator"; @@ -33,7 +38,7 @@ import { Query, } from "@nestjs/common"; import { ClassSerializerInterceptor } from "@nestjs/common"; -import { ApiOperation, ApiTags as DocsTags } from "@nestjs/swagger"; +import { ApiHeader, ApiOperation, ApiTags as DocsTags } from "@nestjs/swagger"; import { plainToInstance } from "class-transformer"; import { SUCCESS_STATUS } from "@calcom/platform-constants"; @@ -47,6 +52,9 @@ import { Team } from "@calcom/prisma/client"; @UseGuards(ApiAuthGuard, IsOrgGuard, RolesGuard, PlatformPlanGuard, IsAdminAPIEnabledGuard) @UseGuards(IsOrgGuard) @DocsTags("Orgs / Users") +@ApiHeader(OPTIONAL_X_CAL_CLIENT_ID_HEADER) +@ApiHeader(OPTIONAL_X_CAL_SECRET_KEY_HEADER) +@ApiHeader(OPTIONAL_API_KEY_HEADER) export class OrganizationsUsersController { constructor(private readonly organizationsUsersService: OrganizationsUsersService) {} diff --git a/apps/api/v2/src/modules/organizations/users/ooo/controllers/organizations-users-ooo-controller.ts b/apps/api/v2/src/modules/organizations/users/ooo/controllers/organizations-users-ooo-controller.ts index a6659d256d..0d11f8eb04 100644 --- a/apps/api/v2/src/modules/organizations/users/ooo/controllers/organizations-users-ooo-controller.ts +++ b/apps/api/v2/src/modules/organizations/users/ooo/controllers/organizations-users-ooo-controller.ts @@ -1,4 +1,9 @@ import { API_VERSIONS_VALUES } from "@/lib/api-versions"; +import { + OPTIONAL_API_KEY_HEADER, + OPTIONAL_X_CAL_CLIENT_ID_HEADER, + OPTIONAL_X_CAL_SECRET_KEY_HEADER, +} from "@/lib/docs/headers"; import { PlatformPlan } from "@/modules/auth/decorators/billing/platform-plan.decorator"; import { Roles } from "@/modules/auth/decorators/roles/roles.decorator"; import { ApiAuthGuard } from "@/modules/auth/guards/api-auth/api-auth.guard"; @@ -35,7 +40,7 @@ import { Query, } from "@nestjs/common"; import { ClassSerializerInterceptor } from "@nestjs/common"; -import { ApiOperation, ApiTags as DocsTags } from "@nestjs/swagger"; +import { ApiHeader, ApiOperation, ApiTags as DocsTags } from "@nestjs/swagger"; import { plainToInstance } from "class-transformer"; import { SUCCESS_STATUS } from "@calcom/platform-constants"; @@ -48,6 +53,9 @@ import { SUCCESS_STATUS } from "@calcom/platform-constants"; @UseGuards(ApiAuthGuard, IsOrgGuard, RolesGuard, PlatformPlanGuard, IsAdminAPIEnabledGuard) @UseGuards(IsOrgGuard) @DocsTags("Orgs / Users / OOO") +@ApiHeader(OPTIONAL_X_CAL_CLIENT_ID_HEADER) +@ApiHeader(OPTIONAL_X_CAL_SECRET_KEY_HEADER) +@ApiHeader(OPTIONAL_API_KEY_HEADER) export class OrganizationsUsersOOOController { constructor( private readonly userOOOService: UserOOOService, diff --git a/apps/api/v2/src/modules/organizations/webhooks/controllers/organizations-webhooks.controller.ts b/apps/api/v2/src/modules/organizations/webhooks/controllers/organizations-webhooks.controller.ts index be7f392c97..0cffcb83e0 100644 --- a/apps/api/v2/src/modules/organizations/webhooks/controllers/organizations-webhooks.controller.ts +++ b/apps/api/v2/src/modules/organizations/webhooks/controllers/organizations-webhooks.controller.ts @@ -1,4 +1,9 @@ import { API_VERSIONS_VALUES } from "@/lib/api-versions"; +import { + OPTIONAL_API_KEY_HEADER, + OPTIONAL_X_CAL_CLIENT_ID_HEADER, + OPTIONAL_X_CAL_SECRET_KEY_HEADER, +} from "@/lib/docs/headers"; import { PlatformPlan } from "@/modules/auth/decorators/billing/platform-plan.decorator"; import { Roles } from "@/modules/auth/decorators/roles/roles.decorator"; import { ApiAuthGuard } from "@/modules/auth/guards/api-auth/api-auth.guard"; @@ -32,7 +37,7 @@ import { HttpCode, HttpStatus, } from "@nestjs/common"; -import { ApiOperation, ApiTags as DocsTags } from "@nestjs/swagger"; +import { ApiHeader, ApiOperation, ApiTags as DocsTags } from "@nestjs/swagger"; import { plainToClass } from "class-transformer"; import { SUCCESS_STATUS } from "@calcom/platform-constants"; @@ -44,6 +49,9 @@ import { SkipTakePagination } from "@calcom/platform-types"; }) @UseGuards(ApiAuthGuard, IsOrgGuard, RolesGuard, PlatformPlanGuard, IsAdminAPIEnabledGuard) @DocsTags("Orgs / Webhooks") +@ApiHeader(OPTIONAL_X_CAL_CLIENT_ID_HEADER) +@ApiHeader(OPTIONAL_X_CAL_SECRET_KEY_HEADER) +@ApiHeader(OPTIONAL_API_KEY_HEADER) export class OrganizationsWebhooksController { constructor( private organizationsWebhooksService: OrganizationsWebhooksService, diff --git a/apps/api/v2/src/modules/selected-calendars/controllers/selected-calendars.controller.ts b/apps/api/v2/src/modules/selected-calendars/controllers/selected-calendars.controller.ts index da13b5e6da..40961de13f 100644 --- a/apps/api/v2/src/modules/selected-calendars/controllers/selected-calendars.controller.ts +++ b/apps/api/v2/src/modules/selected-calendars/controllers/selected-calendars.controller.ts @@ -1,4 +1,5 @@ import { API_VERSIONS_VALUES } from "@/lib/api-versions"; +import { API_KEY_OR_ACCESS_TOKEN_HEADER } from "@/lib/docs/headers"; import { GetUser } from "@/modules/auth/decorators/get-user/get-user.decorator"; import { ApiAuthGuard } from "@/modules/auth/guards/api-auth/api-auth.guard"; import { @@ -12,7 +13,7 @@ import { import { SelectedCalendarsService } from "@/modules/selected-calendars/services/selected-calendars.service"; import { UserWithProfile } from "@/modules/users/users.repository"; import { Body, Controller, Post, UseGuards, Delete, Query } from "@nestjs/common"; -import { ApiOperation, ApiTags as DocsTags } from "@nestjs/swagger"; +import { ApiHeader, ApiOperation, ApiTags as DocsTags } from "@nestjs/swagger"; import { plainToClass } from "class-transformer"; import { SUCCESS_STATUS } from "@calcom/platform-constants"; @@ -22,11 +23,12 @@ import { SUCCESS_STATUS } from "@calcom/platform-constants"; version: API_VERSIONS_VALUES, }) @DocsTags("Selected Calendars") +@UseGuards(ApiAuthGuard) +@ApiHeader(API_KEY_OR_ACCESS_TOKEN_HEADER) export class SelectedCalendarsController { constructor(private readonly selectedCalendarsService: SelectedCalendarsService) {} @Post("/") - @UseGuards(ApiAuthGuard) @ApiOperation({ summary: "Add a selected calendar" }) async addSelectedCalendar( @Body() input: SelectedCalendarsInputDto, @@ -41,7 +43,6 @@ export class SelectedCalendarsController { } @Delete("/") - @UseGuards(ApiAuthGuard) @ApiOperation({ summary: "Delete a selected calendar" }) async deleteSelectedCalendar( @Query() queryParams: SelectedCalendarsQueryParamsInputDto, diff --git a/apps/api/v2/src/modules/slots/slots-2024-09-04/controllers/slots.controller.ts b/apps/api/v2/src/modules/slots/slots-2024-09-04/controllers/slots.controller.ts index ac191da184..8884a5244b 100644 --- a/apps/api/v2/src/modules/slots/slots-2024-09-04/controllers/slots.controller.ts +++ b/apps/api/v2/src/modules/slots/slots-2024-09-04/controllers/slots.controller.ts @@ -1,4 +1,5 @@ import { VERSION_2024_09_04 } from "@/lib/api-versions"; +import { OPTIONAL_API_KEY_OR_ACCESS_TOKEN_HEADER, OPTIONAL_X_CAL_CLIENT_ID_HEADER } from "@/lib/docs/headers"; import { GetOptionalUser } from "@/modules/auth/decorators/get-optional-user/get-optional-user.decorator"; import { OptionalApiAuthGuard } from "@/modules/auth/guards/optional-api-auth/optional-api-auth.guard"; import { GetReservedSlotOutput_2024_09_04 } from "@/modules/slots/slots-2024-09-04/outputs/get-reserved-slot.output"; @@ -13,12 +14,10 @@ import { Delete, Post, Param, - Res, HttpCode, HttpStatus, Patch, UseGuards, - BadRequestException, } from "@nestjs/common"; import { ApiOperation, @@ -223,8 +222,12 @@ export class SlotsController_2024_09_04 { @UseGuards(OptionalApiAuthGuard) @ApiOperation({ summary: "Reserve a slot", - description: "Make a slot not available for others to book for a certain period of time.", + description: `Make a slot not available for others to book for a certain period of time. If you authenticate using oAuth credentials, api key or access token + then you can also specify custom duration for how long the slot should be reserved for (defaults to 5 minutes).`, }) + @ApiHeader(OPTIONAL_X_CAL_CLIENT_ID_HEADER) + @ApiHeader(OPTIONAL_X_CAL_CLIENT_ID_HEADER) + @ApiHeader(OPTIONAL_API_KEY_OR_ACCESS_TOKEN_HEADER) async reserveSlot( @Body() body: ReserveSlotInput_2024_09_04, @GetOptionalUser() user: User diff --git a/apps/api/v2/src/modules/stripe/controllers/stripe.controller.ts b/apps/api/v2/src/modules/stripe/controllers/stripe.controller.ts index 2333346f17..4bdb2672e4 100644 --- a/apps/api/v2/src/modules/stripe/controllers/stripe.controller.ts +++ b/apps/api/v2/src/modules/stripe/controllers/stripe.controller.ts @@ -1,4 +1,5 @@ import { API_VERSIONS_VALUES } from "@/lib/api-versions"; +import { API_KEY_OR_ACCESS_TOKEN_HEADER } from "@/lib/docs/headers"; import { GetUser } from "@/modules/auth/decorators/get-user/get-user.decorator"; import { ApiAuthGuard } from "@/modules/auth/guards/api-auth/api-auth.guard"; import { @@ -23,7 +24,7 @@ import { Headers, Param, } from "@nestjs/common"; -import { ApiTags as DocsTags, ApiOperation } from "@nestjs/swagger"; +import { ApiTags as DocsTags, ApiOperation, ApiHeader } from "@nestjs/swagger"; import { plainToClass } from "class-transformer"; import { Request } from "express"; import { stringify } from "querystring"; @@ -42,6 +43,7 @@ export class StripeController { @UseGuards(ApiAuthGuard) @HttpCode(HttpStatus.OK) @ApiOperation({ summary: "Get stripe connect URL" }) + @ApiHeader(API_KEY_OR_ACCESS_TOKEN_HEADER) async redirect( @Req() req: Request, @Headers("Authorization") authorization: string, @@ -100,6 +102,7 @@ export class StripeController { @Get("/check") @UseGuards(ApiAuthGuard) @HttpCode(HttpStatus.OK) + @ApiHeader(API_KEY_OR_ACCESS_TOKEN_HEADER) @ApiOperation({ summary: "Check stripe connection" }) async check(@GetUser() user: UserWithProfile): Promise { return await this.stripeService.checkIfIndividualStripeAccountConnected(user.id); @@ -108,6 +111,7 @@ export class StripeController { @Get("/check/:teamId") @UseGuards(ApiAuthGuard) @HttpCode(HttpStatus.OK) + @ApiHeader(API_KEY_OR_ACCESS_TOKEN_HEADER) @ApiOperation({ summary: "Check team stripe connection" }) async checkTeamStripeConnection( @Param("teamId") teamId: string diff --git a/apps/api/v2/src/modules/teams/event-types/controllers/teams-event-types.controller.ts b/apps/api/v2/src/modules/teams/event-types/controllers/teams-event-types.controller.ts index 18714bb91d..029cfe50be 100644 --- a/apps/api/v2/src/modules/teams/event-types/controllers/teams-event-types.controller.ts +++ b/apps/api/v2/src/modules/teams/event-types/controllers/teams-event-types.controller.ts @@ -1,6 +1,7 @@ import { CreatePhoneCallInput } from "@/ee/event-types/event-types_2024_06_14/inputs/create-phone-call.input"; import { CreatePhoneCallOutput } from "@/ee/event-types/event-types_2024_06_14/outputs/create-phone-call.output"; import { API_VERSIONS_VALUES } from "@/lib/api-versions"; +import { API_KEY_HEADER } from "@/lib/docs/headers"; import { PlatformPlan } from "@/modules/auth/decorators/billing/platform-plan.decorator"; import { GetUser } from "@/modules/auth/decorators/get-user/get-user.decorator"; import { Roles } from "@/modules/auth/decorators/roles/roles.decorator"; @@ -31,7 +32,7 @@ import { NotFoundException, Query, } from "@nestjs/common"; -import { ApiOperation, ApiTags as DocsTags } from "@nestjs/swagger"; +import { ApiHeader, ApiOperation, ApiTags as DocsTags } from "@nestjs/swagger"; import { ERROR_STATUS, SUCCESS_STATUS } from "@calcom/platform-constants"; import { handleCreatePhoneCall } from "@calcom/platform-libraries"; @@ -63,6 +64,7 @@ export class TeamsEventTypesController { @Roles("TEAM_ADMIN") @PlatformPlan("ESSENTIALS") @UseGuards(ApiAuthGuard, RolesGuard) + @ApiHeader(API_KEY_HEADER) @Post("/") @ApiOperation({ summary: "Create an event type" }) async createTeamEventType( @@ -86,6 +88,7 @@ export class TeamsEventTypesController { @Roles("TEAM_ADMIN") @UseGuards(ApiAuthGuard, RolesGuard) + @ApiHeader(API_KEY_HEADER) @Get("/:eventTypeId") @ApiOperation({ summary: "Get an event type" }) async getTeamEventType( @@ -109,6 +112,7 @@ export class TeamsEventTypesController { @Roles("TEAM_ADMIN") @Post("/:eventTypeId/create-phone-call") @UseGuards(ApiAuthGuard, RolesGuard) + @ApiHeader(API_KEY_HEADER) @ApiOperation({ summary: "Create a phone call" }) async createPhoneCall( @Param("eventTypeId") eventTypeId: number, @@ -162,6 +166,7 @@ export class TeamsEventTypesController { @Roles("TEAM_ADMIN") @UseGuards(ApiAuthGuard, RolesGuard) + @ApiHeader(API_KEY_HEADER) @Patch("/:eventTypeId") @ApiOperation({ summary: "Update a team event type" }) async updateTeamEventType( @@ -193,6 +198,7 @@ export class TeamsEventTypesController { @Roles("TEAM_ADMIN") @UseGuards(ApiAuthGuard, RolesGuard) + @ApiHeader(API_KEY_HEADER) @Delete("/:eventTypeId") @HttpCode(HttpStatus.OK) @ApiOperation({ summary: "Delete a team event type" }) diff --git a/apps/api/v2/src/modules/teams/memberships/controllers/teams-memberships.controller.ts b/apps/api/v2/src/modules/teams/memberships/controllers/teams-memberships.controller.ts index bb62333b96..0c9ee46289 100644 --- a/apps/api/v2/src/modules/teams/memberships/controllers/teams-memberships.controller.ts +++ b/apps/api/v2/src/modules/teams/memberships/controllers/teams-memberships.controller.ts @@ -1,4 +1,5 @@ import { API_VERSIONS_VALUES } from "@/lib/api-versions"; +import { API_KEY_HEADER } from "@/lib/docs/headers"; import { Roles } from "@/modules/auth/decorators/roles/roles.decorator"; import { ApiAuthGuard } from "@/modules/auth/guards/api-auth/api-auth.guard"; import { RolesGuard } from "@/modules/auth/guards/roles/roles.guard"; @@ -27,7 +28,7 @@ import { HttpStatus, Logger, } from "@nestjs/common"; -import { ApiOperation, ApiTags as DocsTags } from "@nestjs/swagger"; +import { ApiHeader, ApiOperation, ApiTags as DocsTags } from "@nestjs/swagger"; import { plainToClass } from "class-transformer"; import { SUCCESS_STATUS } from "@calcom/platform-constants"; @@ -40,6 +41,7 @@ import { SkipTakePagination } from "@calcom/platform-types"; }) @UseGuards(ApiAuthGuard, RolesGuard) @DocsTags("Teams / Memberships") +@ApiHeader(API_KEY_HEADER) export class TeamsMembershipsController { private logger = new Logger("TeamsMembershipsController"); diff --git a/apps/api/v2/src/modules/teams/teams/controllers/teams.controller.ts b/apps/api/v2/src/modules/teams/teams/controllers/teams.controller.ts index a9ac3af2a1..1f747b073c 100644 --- a/apps/api/v2/src/modules/teams/teams/controllers/teams.controller.ts +++ b/apps/api/v2/src/modules/teams/teams/controllers/teams.controller.ts @@ -1,4 +1,5 @@ import { API_VERSIONS_VALUES } from "@/lib/api-versions"; +import { API_KEY_HEADER } from "@/lib/docs/headers"; import { GetUser } from "@/modules/auth/decorators/get-user/get-user.decorator"; import { Roles } from "@/modules/auth/decorators/roles/roles.decorator"; import { ApiAuthGuard } from "@/modules/auth/guards/api-auth/api-auth.guard"; @@ -14,7 +15,7 @@ import { TeamsService } from "@/modules/teams/teams/services/teams.service"; import { TeamsRepository } from "@/modules/teams/teams/teams.repository"; import { UserWithProfile } from "@/modules/users/users.repository"; import { Controller, UseGuards, Get, Param, ParseIntPipe, Delete, Patch, Post, Body } from "@nestjs/common"; -import { ApiOperation, ApiTags as DocsTags } from "@nestjs/swagger"; +import { ApiHeader, ApiOperation, ApiTags as DocsTags } from "@nestjs/swagger"; import { plainToClass } from "class-transformer"; import { SUCCESS_STATUS } from "@calcom/platform-constants"; @@ -26,6 +27,7 @@ import { TeamOutputDto } from "@calcom/platform-types"; }) @UseGuards(ApiAuthGuard) @DocsTags("Teams") +@ApiHeader(API_KEY_HEADER) export class TeamsController { constructor(private teamsService: TeamsService, private teamsRepository: TeamsRepository) {} diff --git a/apps/api/v2/src/modules/timezones/controllers/timezones.controller.ts b/apps/api/v2/src/modules/timezones/controllers/timezones.controller.ts index 281c87b15f..32ecc98ab2 100644 --- a/apps/api/v2/src/modules/timezones/controllers/timezones.controller.ts +++ b/apps/api/v2/src/modules/timezones/controllers/timezones.controller.ts @@ -1,7 +1,7 @@ import { API_VERSIONS_VALUES } from "@/lib/api-versions"; import { TimezonesService } from "@/modules/timezones/services/timezones.service"; import { Controller, Get } from "@nestjs/common"; -import { ApiOperation, ApiTags as DocsTags } from "@nestjs/swagger"; +import { ApiExcludeController, ApiOperation, ApiTags as DocsTags } from "@nestjs/swagger"; import { SUCCESS_STATUS } from "@calcom/platform-constants"; import type { CityTimezones } from "@calcom/platform-libraries"; @@ -11,6 +11,8 @@ import { ApiResponse } from "@calcom/platform-types"; path: "/v2/timezones", version: API_VERSIONS_VALUES, }) +// note(Lauris): controller used only internally by atoms +@ApiExcludeController() @DocsTags("Timezones") export class TimezonesController { constructor(private readonly timezonesService: TimezonesService) {} diff --git a/apps/api/v2/src/modules/webhooks/controllers/webhooks.controller.ts b/apps/api/v2/src/modules/webhooks/controllers/webhooks.controller.ts index 5025699ddd..b552a29745 100644 --- a/apps/api/v2/src/modules/webhooks/controllers/webhooks.controller.ts +++ b/apps/api/v2/src/modules/webhooks/controllers/webhooks.controller.ts @@ -1,4 +1,5 @@ import { API_VERSIONS_VALUES } from "@/lib/api-versions"; +import { API_KEY_HEADER } from "@/lib/docs/headers"; import { GetUser } from "@/modules/auth/decorators/get-user/get-user.decorator"; import { ApiAuthGuard } from "@/modules/auth/guards/api-auth/api-auth.guard"; import { UserWithProfile } from "@/modules/users/users.repository"; @@ -15,7 +16,7 @@ import { WebhookOutputPipe } from "@/modules/webhooks/pipes/WebhookOutputPipe"; import { UserWebhooksService } from "@/modules/webhooks/services/user-webhooks.service"; import { WebhooksService } from "@/modules/webhooks/services/webhooks.service"; import { Controller, Post, Body, UseGuards, Get, Param, Query, Delete, Patch } from "@nestjs/common"; -import { ApiOperation, ApiTags as DocsTags } from "@nestjs/swagger"; +import { ApiHeader, ApiOperation, ApiTags as DocsTags } from "@nestjs/swagger"; import { Webhook } from "@prisma/client"; import { plainToClass } from "class-transformer"; @@ -28,6 +29,7 @@ import { SkipTakePagination } from "@calcom/platform-types"; }) @UseGuards(ApiAuthGuard) @DocsTags("Webhooks") +@ApiHeader(API_KEY_HEADER) export class WebhooksController { constructor( private readonly webhooksService: WebhooksService, diff --git a/apps/api/v2/swagger/documentation.json b/apps/api/v2/swagger/documentation.json index 1c03ede7e2..ee19b2a24a 100644 --- a/apps/api/v2/swagger/documentation.json +++ b/apps/api/v2/swagger/documentation.json @@ -1,73 +1,20 @@ { "openapi": "3.0.0", "paths": { - "/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/oauth-clients/{clientId}/users": { "get": { "operationId": "OAuthClientUsersController_getManagedUsers", "summary": "Get all managed users", "parameters": [ + { + "name": "x-cal-secret-key", + "in": "header", + "description": "OAuth client secret key", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "clientId", "required": true, @@ -130,6 +77,15 @@ "operationId": "OAuthClientUsersController_createUser", "summary": "Create a managed user", "parameters": [ + { + "name": "x-cal-secret-key", + "in": "header", + "description": "OAuth client secret key", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "clientId", "required": true, @@ -171,6 +127,15 @@ "operationId": "OAuthClientUsersController_getUserById", "summary": "Get a managed user", "parameters": [ + { + "name": "x-cal-secret-key", + "in": "header", + "description": "OAuth client secret key", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "clientId", "required": true, @@ -208,6 +173,15 @@ "operationId": "OAuthClientUsersController_updateUser", "summary": "Update a managed user", "parameters": [ + { + "name": "x-cal-secret-key", + "in": "header", + "description": "OAuth client secret key", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "clientId", "required": true, @@ -255,6 +229,15 @@ "operationId": "OAuthClientUsersController_deleteUser", "summary": "Delete a managed user", "parameters": [ + { + "name": "x-cal-secret-key", + "in": "header", + "description": "OAuth client secret key", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "clientId", "required": true, @@ -295,6 +278,15 @@ "summary": "Force refresh tokens", "description": "If you have lost managed user access or refresh token, then you can get new ones by using OAuth credentials.\n Each access token is valid for 60 minutes and each refresh token for 1 year. Make sure to store them later in your database, for example, by updating the User model to have `calAccessToken` and `calRefreshToken` columns.", "parameters": [ + { + "name": "x-cal-secret-key", + "in": "header", + "description": "OAuth client secret key", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "userId", "required": true, @@ -385,6 +377,15 @@ "operationId": "OAuthClientWebhooksController_createOAuthClientWebhook", "summary": "Create a webhook", "parameters": [ + { + "name": "x-cal-secret-key", + "in": "header", + "description": "OAuth client secret key", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "clientId", "required": true, @@ -424,6 +425,15 @@ "operationId": "OAuthClientWebhooksController_getOAuthClientWebhooks", "summary": "Get all webhooks", "parameters": [ + { + "name": "x-cal-secret-key", + "in": "header", + "description": "OAuth client secret key", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "clientId", "required": true, @@ -473,6 +483,15 @@ "operationId": "OAuthClientWebhooksController_deleteAllOAuthClientWebhooks", "summary": "Delete all webhooks", "parameters": [ + { + "name": "x-cal-secret-key", + "in": "header", + "description": "OAuth client secret key", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "clientId", "required": true, @@ -504,6 +523,15 @@ "operationId": "OAuthClientWebhooksController_updateOAuthClientWebhook", "summary": "Update a webhook", "parameters": [ + { + "name": "x-cal-secret-key", + "in": "header", + "description": "OAuth client secret key", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "webhookId", "required": true, @@ -542,7 +570,17 @@ "get": { "operationId": "OAuthClientWebhooksController_getOAuthClientWebhook", "summary": "Get a webhook", - "parameters": [], + "parameters": [ + { + "name": "x-cal-secret-key", + "in": "header", + "description": "OAuth client secret key", + "required": true, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "", @@ -562,7 +600,17 @@ "delete": { "operationId": "OAuthClientWebhooksController_deleteOAuthClientWebhook", "summary": "Delete a webhook", - "parameters": [], + "parameters": [ + { + "name": "x-cal-secret-key", + "in": "header", + "description": "OAuth client secret key", + "required": true, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "", @@ -585,6 +633,15 @@ "operationId": "OrganizationsAttributesController_getOrganizationAttributes", "summary": "Get all attributes", "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "orgId", "required": true, @@ -634,6 +691,15 @@ "operationId": "OrganizationsAttributesController_createOrganizationAttribute", "summary": "Create an attribute", "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "orgId", "required": true, @@ -675,6 +741,15 @@ "operationId": "OrganizationsAttributesController_getOrganizationAttribute", "summary": "Get an attribute", "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "orgId", "required": true, @@ -712,6 +787,15 @@ "operationId": "OrganizationsAttributesController_updateOrganizationAttribute", "summary": "Update an attribute", "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "orgId", "required": true, @@ -759,6 +843,15 @@ "operationId": "OrganizationsAttributesController_deleteOrganizationAttribute", "summary": "Delete an attribute", "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "orgId", "required": true, @@ -798,6 +891,15 @@ "operationId": "OrganizationsAttributesOptionsController_createOrganizationAttributeOption", "summary": "Create an attribute option", "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "orgId", "required": true, @@ -845,6 +947,15 @@ "operationId": "OrganizationsAttributesOptionsController_getOrganizationAttributeOptions", "summary": "Get all attribute options", "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "orgId", "required": true, @@ -884,6 +995,15 @@ "operationId": "OrganizationsAttributesOptionsController_deleteOrganizationAttributeOption", "summary": "Delete an attribute option", "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "orgId", "required": true, @@ -929,6 +1049,15 @@ "operationId": "OrganizationsAttributesOptionsController_updateOrganizationAttributeOption", "summary": "Update an attribute option", "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "orgId", "required": true, @@ -986,6 +1115,15 @@ "operationId": "OrganizationsAttributesOptionsController_assignOrganizationAttributeOptionToUser", "summary": "Assign an attribute to a user", "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "orgId", "required": true, @@ -1033,6 +1171,15 @@ "operationId": "OrganizationsAttributesOptionsController_getOrganizationAttributeOptionsForUser", "summary": "Get all attribute options for a user", "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "orgId", "required": true, @@ -1072,6 +1219,15 @@ "operationId": "OrganizationsAttributesOptionsController_unassignOrganizationAttributeOptionFromUser", "summary": "Unassign an attribute from a user", "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "orgId", "required": true, @@ -1119,6 +1275,33 @@ "operationId": "OrganizationsDelegationCredentialController_createDelegationCredential", "summary": "Save delegation credentials for your organization.", "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "For non-platform customers - value must be `Bearer ` where `` is api key prefixed with cal_", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-secret-key", + "in": "header", + "description": "For platform customers - OAuth client secret key", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-client-id", + "in": "header", + "description": "For platform customers - OAuth client ID", + "required": false, + "schema": { + "type": "string" + } + }, { "name": "orgId", "required": true, @@ -1160,6 +1343,33 @@ "operationId": "OrganizationsDelegationCredentialController_updateDelegationCredential", "summary": "Update delegation credentials of your organization.", "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "For non-platform customers - value must be `Bearer ` where `` is api key prefixed with cal_", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-secret-key", + "in": "header", + "description": "For platform customers - OAuth client secret key", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-client-id", + "in": "header", + "description": "For platform customers - OAuth client ID", + "required": false, + "schema": { + "type": "string" + } + }, { "name": "orgId", "required": true, @@ -1204,330 +1414,38 @@ ] } }, - "/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": false, - "in": "query", - "description": "Slug of team event type to return.", - "schema": { - "type": "string" - } - }, - { - "name": "hostsLimit", - "required": false, - "in": "query", - "description": "Specifies the maximum number of hosts to include in the response. This limit helps optimize performance. If not provided, all Hosts will be fetched.", - "schema": { - "type": "number" - } - } - ], - "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": "Authorization", + "in": "header", + "description": "For non-platform customers - value must be `Bearer ` where `` is api key prefixed with cal_", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-secret-key", + "in": "header", + "description": "For platform customers - OAuth client secret key", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-client-id", + "in": "header", + "description": "For platform customers - OAuth client ID", + "required": false, + "schema": { + "type": "string" + } + }, { "name": "orgId", "required": true, @@ -1577,6 +1495,33 @@ "operationId": "OrganizationsMembershipsController_createMembership", "summary": "Create a membership", "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "For non-platform customers - value must be `Bearer ` where `` is api key prefixed with cal_", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-secret-key", + "in": "header", + "description": "For platform customers - OAuth client secret key", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-client-id", + "in": "header", + "description": "For platform customers - OAuth client ID", + "required": false, + "schema": { + "type": "string" + } + }, { "name": "orgId", "required": true, @@ -1618,6 +1563,33 @@ "operationId": "OrganizationsMembershipsController_getOrgMembership", "summary": "Get a membership", "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "For non-platform customers - value must be `Bearer ` where `` is api key prefixed with cal_", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-secret-key", + "in": "header", + "description": "For platform customers - OAuth client secret key", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-client-id", + "in": "header", + "description": "For platform customers - OAuth client ID", + "required": false, + "schema": { + "type": "string" + } + }, { "name": "orgId", "required": true, @@ -1655,6 +1627,33 @@ "operationId": "OrganizationsMembershipsController_deleteMembership", "summary": "Delete a membership", "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "For non-platform customers - value must be `Bearer ` where `` is api key prefixed with cal_", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-secret-key", + "in": "header", + "description": "For platform customers - OAuth client secret key", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-client-id", + "in": "header", + "description": "For platform customers - OAuth client ID", + "required": false, + "schema": { + "type": "string" + } + }, { "name": "orgId", "required": true, @@ -1692,6 +1691,33 @@ "operationId": "OrganizationsMembershipsController_updateMembership", "summary": "Update a membership", "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "For non-platform customers - value must be `Bearer ` where `` is api key prefixed with cal_", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-secret-key", + "in": "header", + "description": "For platform customers - OAuth client secret key", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-client-id", + "in": "header", + "description": "For platform customers - OAuth client ID", + "required": false, + "schema": { + "type": "string" + } + }, { "name": "orgId", "required": true, @@ -1742,6 +1768,24 @@ "summary": "Create an organization within an organization", "description": "Requires the user to have at least the 'ORG_ADMIN' role within the organization. Additionally, for platform, the plan must be 'SCALE' or higher to access this endpoint.", "parameters": [ + { + "name": "x-cal-secret-key", + "in": "header", + "description": "For platform customers - OAuth client secret key", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-client-id", + "in": "header", + "description": "For platform customers - OAuth client ID", + "required": false, + "schema": { + "type": "string" + } + }, { "name": "orgId", "required": true, @@ -1782,6 +1826,24 @@ "summary": "Get all organizations within an organization", "description": "Requires the user to have at least the 'ORG_ADMIN' role within the organization. Additionally, for platform, the plan must be 'SCALE' or higher to access this endpoint.", "parameters": [ + { + "name": "x-cal-secret-key", + "in": "header", + "description": "For platform customers - OAuth client secret key", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-client-id", + "in": "header", + "description": "For platform customers - OAuth client ID", + "required": false, + "schema": { + "type": "string" + } + }, { "name": "orgId", "required": true, @@ -1814,6 +1876,24 @@ "summary": "Get an organization within an organization", "description": "Requires the user to have at least the 'ORG_ADMIN' role within the organization. Additionally, for platform, the plan must be 'SCALE' or higher to access this endpoint.", "parameters": [ + { + "name": "x-cal-secret-key", + "in": "header", + "description": "For platform customers - OAuth client secret key", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-client-id", + "in": "header", + "description": "For platform customers - OAuth client ID", + "required": false, + "schema": { + "type": "string" + } + }, { "name": "managedOrganizationId", "required": true, @@ -1844,6 +1924,24 @@ "summary": "Update an organization within an organization", "description": "Requires the user to have at least the 'ORG_ADMIN' role within the organization. Additionally, for platform, the plan must be 'SCALE' or higher to access this endpoint.", "parameters": [ + { + "name": "x-cal-secret-key", + "in": "header", + "description": "For platform customers - OAuth client secret key", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-client-id", + "in": "header", + "description": "For platform customers - OAuth client ID", + "required": false, + "schema": { + "type": "string" + } + }, { "name": "orgId", "required": true, @@ -1892,6 +1990,24 @@ "summary": "Delete an organization within an organization", "description": "Requires the user to have at least the 'ORG_ADMIN' role within the organization. Additionally, for platform, the plan must be 'SCALE' or higher to access this endpoint.", "parameters": [ + { + "name": "x-cal-secret-key", + "in": "header", + "description": "For platform customers - OAuth client secret key", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-client-id", + "in": "header", + "description": "For platform customers - OAuth client ID", + "required": false, + "schema": { + "type": "string" + } + }, { "name": "managedOrganizationId", "required": true, @@ -1923,6 +2039,33 @@ "operationId": "OrganizationsSchedulesController_getOrganizationSchedules", "summary": "Get all schedules", "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "For non-platform customers - value must be `Bearer ` where `` is api key prefixed with cal_", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-secret-key", + "in": "header", + "description": "For platform customers - OAuth client secret key", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-client-id", + "in": "header", + "description": "For platform customers - OAuth client ID", + "required": false, + "schema": { + "type": "string" + } + }, { "name": "orgId", "required": true, @@ -1969,209 +2112,38 @@ ] } }, - "/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": "Authorization", + "in": "header", + "description": "For non-platform customers - value must be `Bearer ` where `` is api key prefixed with cal_", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-secret-key", + "in": "header", + "description": "For platform customers - OAuth client secret key", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-client-id", + "in": "header", + "description": "For platform customers - OAuth client ID", + "required": false, + "schema": { + "type": "string" + } + }, { "name": "orgId", "required": true, @@ -2214,14 +2186,40 @@ } }, "tags": [ - "Orgs / Teams", - "Teams" + "Orgs / Teams" ] }, "post": { "operationId": "OrganizationsTeamsController_createTeam", "summary": "Create a team", "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "For non-platform customers - value must be `Bearer ` where `` is api key prefixed with cal_", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-secret-key", + "in": "header", + "description": "For platform customers - OAuth client secret key", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-client-id", + "in": "header", + "description": "For platform customers - OAuth client ID", + "required": false, + "schema": { + "type": "string" + } + }, { "name": "orgId", "required": true, @@ -2229,14 +2227,6 @@ "schema": { "type": "number" } - }, - { - "name": "x-cal-client-id", - "required": true, - "in": "header", - "schema": { - "type": "string" - } } ], "requestBody": { @@ -2271,6 +2261,33 @@ "operationId": "OrganizationsTeamsController_getMyTeams", "summary": "Get teams membership for user", "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "For non-platform customers - value must be `Bearer ` where `` is api key prefixed with cal_", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-secret-key", + "in": "header", + "description": "For platform customers - OAuth client secret key", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-client-id", + "in": "header", + "description": "For platform customers - OAuth client ID", + "required": false, + "schema": { + "type": "string" + } + }, { "name": "orgId", "required": true, @@ -2321,7 +2338,35 @@ "get": { "operationId": "OrganizationsTeamsController_getTeam", "summary": "Get a team", - "parameters": [], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "For non-platform customers - value must be `Bearer ` where `` is api key prefixed with cal_", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-secret-key", + "in": "header", + "description": "For platform customers - OAuth client secret key", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-client-id", + "in": "header", + "description": "For platform customers - OAuth client ID", + "required": false, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "", @@ -2342,6 +2387,33 @@ "operationId": "OrganizationsTeamsController_deleteTeam", "summary": "Delete a team", "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "For non-platform customers - value must be `Bearer ` where `` is api key prefixed with cal_", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-secret-key", + "in": "header", + "description": "For platform customers - OAuth client secret key", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-client-id", + "in": "header", + "description": "For platform customers - OAuth client ID", + "required": false, + "schema": { + "type": "string" + } + }, { "name": "orgId", "required": true, @@ -2379,6 +2451,33 @@ "operationId": "OrganizationsTeamsController_updateTeam", "summary": "Update a team", "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "For non-platform customers - value must be `Bearer ` where `` is api key prefixed with cal_", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-secret-key", + "in": "header", + "description": "For platform customers - OAuth client secret key", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-client-id", + "in": "header", + "description": "For platform customers - OAuth client ID", + "required": false, + "schema": { + "type": "string" + } + }, { "name": "orgId", "required": true, @@ -2428,6 +2527,33 @@ "operationId": "OrganizationsTeamsBookingsController_getAllOrgTeamBookings", "summary": "Get organization team bookings", "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "For non-platform customers - value must be `Bearer ` where `` is api key prefixed with cal_", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-secret-key", + "in": "header", + "description": "For platform customers - OAuth client secret key", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-client-id", + "in": "header", + "description": "For platform customers - OAuth client ID", + "required": false, + "schema": { + "type": "string" + } + }, { "name": "status", "required": false, @@ -2599,11 +2725,546 @@ ] } }, + "/v2/organizations/{orgId}/teams/{teamId}/event-types": { + "post": { + "operationId": "OrganizationsEventTypesController_createTeamEventType", + "summary": "Create an event type", + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "For non-platform customers - value must be `Bearer ` where `` is api key prefixed with cal_", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-secret-key", + "in": "header", + "description": "For platform customers - OAuth client secret key", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-client-id", + "in": "header", + "description": "For platform customers - OAuth client ID", + "required": false, + "schema": { + "type": "string" + } + }, + { + "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 / Teams / Event Types" + ] + }, + "get": { + "operationId": "OrganizationsEventTypesController_getTeamEventTypes", + "summary": "Get a team event type", + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "For non-platform customers - value must be `Bearer ` where `` is api key prefixed with cal_", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-secret-key", + "in": "header", + "description": "For platform customers - OAuth client secret key", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-client-id", + "in": "header", + "description": "For platform customers - OAuth client ID", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "teamId", + "required": true, + "in": "path", + "schema": { + "type": "number" + } + }, + { + "name": "eventSlug", + "required": false, + "in": "query", + "description": "Slug of team event type to return.", + "schema": { + "type": "string" + } + }, + { + "name": "hostsLimit", + "required": false, + "in": "query", + "description": "Specifies the maximum number of hosts to include in the response. This limit helps optimize performance. If not provided, all Hosts will be fetched.", + "schema": { + "type": "number" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetTeamEventTypesOutput" + } + } + } + } + }, + "tags": [ + "Orgs / Teams / Event Types" + ] + } + }, + "/v2/organizations/{orgId}/teams/{teamId}/event-types/{eventTypeId}": { + "get": { + "operationId": "OrganizationsEventTypesController_getTeamEventType", + "summary": "Get an event type", + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "For non-platform customers - value must be `Bearer ` where `` is api key prefixed with cal_", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-secret-key", + "in": "header", + "description": "For platform customers - OAuth client secret key", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-client-id", + "in": "header", + "description": "For platform customers - OAuth client ID", + "required": false, + "schema": { + "type": "string" + } + }, + { + "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 / Teams / Event Types" + ] + }, + "patch": { + "operationId": "OrganizationsEventTypesController_updateTeamEventType", + "summary": "Update a team event type", + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "For non-platform customers - value must be `Bearer ` where `` is api key prefixed with cal_", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-secret-key", + "in": "header", + "description": "For platform customers - OAuth client secret key", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-client-id", + "in": "header", + "description": "For platform customers - OAuth client ID", + "required": false, + "schema": { + "type": "string" + } + }, + { + "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 / Teams / Event Types" + ] + }, + "delete": { + "operationId": "OrganizationsEventTypesController_deleteTeamEventType", + "summary": "Delete a team event type", + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "For non-platform customers - value must be `Bearer ` where `` is api key prefixed with cal_", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-secret-key", + "in": "header", + "description": "For platform customers - OAuth client secret key", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-client-id", + "in": "header", + "description": "For platform customers - OAuth client ID", + "required": false, + "schema": { + "type": "string" + } + }, + { + "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 / Teams / Event Types" + ] + } + }, + "/v2/organizations/{orgId}/teams/{teamId}/event-types/{eventTypeId}/create-phone-call": { + "post": { + "operationId": "OrganizationsEventTypesController_createPhoneCall", + "summary": "Create a phone call", + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "For non-platform customers - value must be `Bearer ` where `` is api key prefixed with cal_", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-secret-key", + "in": "header", + "description": "For platform customers - OAuth client secret key", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-client-id", + "in": "header", + "description": "For platform customers - OAuth client ID", + "required": false, + "schema": { + "type": "string" + } + }, + { + "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 / Teams / Event Types" + ] + } + }, + "/v2/organizations/{orgId}/teams/event-types": { + "get": { + "operationId": "OrganizationsEventTypesController_getTeamsEventTypes", + "summary": "Get all team event types", + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "For non-platform customers - value must be `Bearer ` where `` is api key prefixed with cal_", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-secret-key", + "in": "header", + "description": "For platform customers - OAuth client secret key", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-client-id", + "in": "header", + "description": "For platform customers - OAuth client ID", + "required": false, + "schema": { + "type": "string" + } + }, + { + "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 / Teams / Event Types" + ] + } + }, "/v2/organizations/{orgId}/teams/{teamId}/memberships": { "get": { "operationId": "OrganizationsTeamsMembershipsController_getAllOrgTeamMemberships", "summary": "Get all memberships", "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "For non-platform customers - value must be `Bearer ` where `` is api key prefixed with cal_", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-secret-key", + "in": "header", + "description": "For platform customers - OAuth client secret key", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-client-id", + "in": "header", + "description": "For platform customers - OAuth client ID", + "required": false, + "schema": { + "type": "string" + } + }, { "name": "orgId", "required": true, @@ -2661,6 +3322,33 @@ "operationId": "OrganizationsTeamsMembershipsController_createOrgTeamMembership", "summary": "Create a membership", "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "For non-platform customers - value must be `Bearer ` where `` is api key prefixed with cal_", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-secret-key", + "in": "header", + "description": "For platform customers - OAuth client secret key", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-client-id", + "in": "header", + "description": "For platform customers - OAuth client ID", + "required": false, + "schema": { + "type": "string" + } + }, { "name": "orgId", "required": true, @@ -2710,6 +3398,33 @@ "operationId": "OrganizationsTeamsMembershipsController_getOrgTeamMembership", "summary": "Get a membership", "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "For non-platform customers - value must be `Bearer ` where `` is api key prefixed with cal_", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-secret-key", + "in": "header", + "description": "For platform customers - OAuth client secret key", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-client-id", + "in": "header", + "description": "For platform customers - OAuth client ID", + "required": false, + "schema": { + "type": "string" + } + }, { "name": "orgId", "required": true, @@ -2755,6 +3470,33 @@ "operationId": "OrganizationsTeamsMembershipsController_deleteOrgTeamMembership", "summary": "Delete a membership", "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "For non-platform customers - value must be `Bearer ` where `` is api key prefixed with cal_", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-secret-key", + "in": "header", + "description": "For platform customers - OAuth client secret key", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-client-id", + "in": "header", + "description": "For platform customers - OAuth client ID", + "required": false, + "schema": { + "type": "string" + } + }, { "name": "orgId", "required": true, @@ -2800,6 +3542,33 @@ "operationId": "OrganizationsTeamsMembershipsController_updateOrgTeamMembership", "summary": "Update a membership", "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "For non-platform customers - value must be `Bearer ` where `` is api key prefixed with cal_", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-secret-key", + "in": "header", + "description": "For platform customers - OAuth client secret key", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-client-id", + "in": "header", + "description": "For platform customers - OAuth client ID", + "required": false, + "schema": { + "type": "string" + } + }, { "name": "orgId", "required": true, @@ -2857,6 +3626,15 @@ "operationId": "OrganizationsTeamsRoutingFormsResponsesController_getRoutingFormResponses", "summary": "Get routing form responses", "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "routingFormId", "required": true, @@ -2888,6 +3666,33 @@ "operationId": "OrganizationsTeamsSchedulesController_getUserSchedules", "summary": "Get schedules of a team member", "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "For non-platform customers - value must be `Bearer ` where `` is api key prefixed with cal_", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-secret-key", + "in": "header", + "description": "For platform customers - OAuth client secret key", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-client-id", + "in": "header", + "description": "For platform customers - OAuth client ID", + "required": false, + "schema": { + "type": "string" + } + }, { "name": "userId", "required": true, @@ -2910,7 +3715,6 @@ } }, "tags": [ - "Orgs / Teams / Schedules", "Orgs / Teams / Users / Schedules" ] } @@ -2920,6 +3724,33 @@ "operationId": "OrganizationsUsersController_getOrganizationsUsers", "summary": "Get all users", "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "For non-platform customers - value must be `Bearer ` where `` is api key prefixed with cal_", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-secret-key", + "in": "header", + "description": "For platform customers - OAuth client secret key", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-client-id", + "in": "header", + "description": "For platform customers - OAuth client ID", + "required": false, + "schema": { + "type": "string" + } + }, { "name": "orgId", "required": true, @@ -2984,6 +3815,33 @@ "operationId": "OrganizationsUsersController_createOrganizationUser", "summary": "Create a user", "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "For non-platform customers - value must be `Bearer ` where `` is api key prefixed with cal_", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-secret-key", + "in": "header", + "description": "For platform customers - OAuth client secret key", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-client-id", + "in": "header", + "description": "For platform customers - OAuth client ID", + "required": false, + "schema": { + "type": "string" + } + }, { "name": "orgId", "required": true, @@ -3025,6 +3883,33 @@ "operationId": "OrganizationsUsersController_updateOrganizationUser", "summary": "Update a user", "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "For non-platform customers - value must be `Bearer ` where `` is api key prefixed with cal_", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-secret-key", + "in": "header", + "description": "For platform customers - OAuth client secret key", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-client-id", + "in": "header", + "description": "For platform customers - OAuth client ID", + "required": false, + "schema": { + "type": "string" + } + }, { "name": "orgId", "required": true, @@ -3072,6 +3957,33 @@ "operationId": "OrganizationsUsersController_deleteOrganizationUser", "summary": "Delete a user", "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "For non-platform customers - value must be `Bearer ` where `` is api key prefixed with cal_", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-secret-key", + "in": "header", + "description": "For platform customers - OAuth client secret key", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-client-id", + "in": "header", + "description": "For platform customers - OAuth client ID", + "required": false, + "schema": { + "type": "string" + } + }, { "name": "orgId", "required": true, @@ -3111,6 +4023,33 @@ "operationId": "OrganizationsUsersOOOController_getOrganizationUserOOO", "summary": "Get all ooo entries of a user", "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "For non-platform customers - value must be `Bearer ` where `` is api key prefixed with cal_", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-secret-key", + "in": "header", + "description": "For platform customers - OAuth client secret key", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-client-id", + "in": "header", + "description": "For platform customers - OAuth client ID", + "required": false, + "schema": { + "type": "string" + } + }, { "name": "userId", "required": true, @@ -3181,6 +4120,33 @@ "operationId": "OrganizationsUsersOOOController_createOrganizationUserOOO", "summary": "Create an ooo entry for user", "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "For non-platform customers - value must be `Bearer ` where `` is api key prefixed with cal_", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-secret-key", + "in": "header", + "description": "For platform customers - OAuth client secret key", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-client-id", + "in": "header", + "description": "For platform customers - OAuth client ID", + "required": false, + "schema": { + "type": "string" + } + }, { "name": "userId", "required": true, @@ -3215,6 +4181,33 @@ "operationId": "OrganizationsUsersOOOController_updateOrganizationUserOOO", "summary": "Update ooo entry of a user", "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "For non-platform customers - value must be `Bearer ` where `` is api key prefixed with cal_", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-secret-key", + "in": "header", + "description": "For platform customers - OAuth client secret key", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-client-id", + "in": "header", + "description": "For platform customers - OAuth client ID", + "required": false, + "schema": { + "type": "string" + } + }, { "name": "userId", "required": true, @@ -3255,6 +4248,33 @@ "operationId": "OrganizationsUsersOOOController_deleteOrganizationUserOOO", "summary": "Delete ooo entry of a user", "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "For non-platform customers - value must be `Bearer ` where `` is api key prefixed with cal_", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-secret-key", + "in": "header", + "description": "For platform customers - OAuth client secret key", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-client-id", + "in": "header", + "description": "For platform customers - OAuth client ID", + "required": false, + "schema": { + "type": "string" + } + }, { "name": "oooId", "required": true, @@ -3279,6 +4299,33 @@ "operationId": "OrganizationsUsersOOOController_getOrganizationUsersOOO", "summary": "Get all OOO entries of org users", "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "For non-platform customers - value must be `Bearer ` where `` is api key prefixed with cal_", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-secret-key", + "in": "header", + "description": "For platform customers - OAuth client secret key", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-client-id", + "in": "header", + "description": "For platform customers - OAuth client ID", + "required": false, + "schema": { + "type": "string" + } + }, { "name": "orgId", "required": true, @@ -3356,11 +4403,366 @@ ] } }, + "/v2/organizations/{orgId}/users/{userId}/schedules": { + "post": { + "operationId": "OrganizationsSchedulesController_createUserSchedule", + "summary": "Create a schedule", + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "For non-platform customers - value must be `Bearer ` where `` is api key prefixed with cal_", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-secret-key", + "in": "header", + "description": "For platform customers - OAuth client secret key", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-client-id", + "in": "header", + "description": "For platform customers - OAuth client ID", + "required": false, + "schema": { + "type": "string" + } + }, + { + "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 / Users / Schedules" + ] + }, + "get": { + "operationId": "OrganizationsSchedulesController_getUserSchedules", + "summary": "Get all schedules", + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "For non-platform customers - value must be `Bearer ` where `` is api key prefixed with cal_", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-secret-key", + "in": "header", + "description": "For platform customers - OAuth client secret key", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-client-id", + "in": "header", + "description": "For platform customers - OAuth client ID", + "required": false, + "schema": { + "type": "string" + } + }, + { + "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 / Users / Schedules" + ] + } + }, + "/v2/organizations/{orgId}/users/{userId}/schedules/{scheduleId}": { + "get": { + "operationId": "OrganizationsSchedulesController_getUserSchedule", + "summary": "Get a schedule", + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "For non-platform customers - value must be `Bearer ` where `` is api key prefixed with cal_", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-secret-key", + "in": "header", + "description": "For platform customers - OAuth client secret key", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-client-id", + "in": "header", + "description": "For platform customers - OAuth client ID", + "required": false, + "schema": { + "type": "string" + } + }, + { + "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 / Users / Schedules" + ] + }, + "patch": { + "operationId": "OrganizationsSchedulesController_updateUserSchedule", + "summary": "Update a schedule", + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "For non-platform customers - value must be `Bearer ` where `` is api key prefixed with cal_", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-secret-key", + "in": "header", + "description": "For platform customers - OAuth client secret key", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-client-id", + "in": "header", + "description": "For platform customers - OAuth client ID", + "required": false, + "schema": { + "type": "string" + } + }, + { + "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 / Users / Schedules" + ] + }, + "delete": { + "operationId": "OrganizationsSchedulesController_deleteUserSchedule", + "summary": "Delete a schedule", + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "For non-platform customers - value must be `Bearer ` where `` is api key prefixed with cal_", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-secret-key", + "in": "header", + "description": "For platform customers - OAuth client secret key", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-client-id", + "in": "header", + "description": "For platform customers - OAuth client ID", + "required": false, + "schema": { + "type": "string" + } + }, + { + "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 / Users / Schedules" + ] + } + }, "/v2/organizations/{orgId}/webhooks": { "get": { "operationId": "OrganizationsWebhooksController_getAllOrganizationWebhooks", "summary": "Get all webhooks", "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "For non-platform customers - value must be `Bearer ` where `` is api key prefixed with cal_", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-secret-key", + "in": "header", + "description": "For platform customers - OAuth client secret key", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-client-id", + "in": "header", + "description": "For platform customers - OAuth client ID", + "required": false, + "schema": { + "type": "string" + } + }, { "name": "orgId", "required": true, @@ -3410,6 +4812,33 @@ "operationId": "OrganizationsWebhooksController_createOrganizationWebhook", "summary": "Create a webhook", "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "For non-platform customers - value must be `Bearer ` where `` is api key prefixed with cal_", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-secret-key", + "in": "header", + "description": "For platform customers - OAuth client secret key", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-client-id", + "in": "header", + "description": "For platform customers - OAuth client ID", + "required": false, + "schema": { + "type": "string" + } + }, { "name": "orgId", "required": true, @@ -3451,6 +4880,33 @@ "operationId": "OrganizationsWebhooksController_getOrganizationWebhook", "summary": "Get a webhook", "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "For non-platform customers - value must be `Bearer ` where `` is api key prefixed with cal_", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-secret-key", + "in": "header", + "description": "For platform customers - OAuth client secret key", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-client-id", + "in": "header", + "description": "For platform customers - OAuth client ID", + "required": false, + "schema": { + "type": "string" + } + }, { "name": "webhookId", "required": true, @@ -3480,6 +4936,33 @@ "operationId": "OrganizationsWebhooksController_deleteWebhook", "summary": "Delete a webhook", "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "For non-platform customers - value must be `Bearer ` where `` is api key prefixed with cal_", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-secret-key", + "in": "header", + "description": "For platform customers - OAuth client secret key", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-client-id", + "in": "header", + "description": "For platform customers - OAuth client ID", + "required": false, + "schema": { + "type": "string" + } + }, { "name": "webhookId", "required": true, @@ -3509,6 +4992,33 @@ "operationId": "OrganizationsWebhooksController_updateOrgWebhook", "summary": "Update a webhook", "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "For non-platform customers - value must be `Bearer ` where `` is api key prefixed with cal_", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-secret-key", + "in": "header", + "description": "For platform customers - OAuth client secret key", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-client-id", + "in": "header", + "description": "For platform customers - OAuth client ID", + "required": false, + "schema": { + "type": "string" + } + }, { "name": "webhookId", "required": true, @@ -3554,7 +5064,7 @@ { "name": "Authorization", "in": "header", - "description": "Bearer ", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_", "required": true, "schema": { "type": "string" @@ -3875,7 +5385,7 @@ { "name": "Authorization", "in": "header", - "description": "value must be `Bearer ` where `` either managed user access token or api key prefixed with cal_", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_ or managed user access token", "required": true, "schema": { "type": "string" @@ -4064,7 +5574,7 @@ "/v2/bookings/{bookingUid}/mark-absent": { "post": { "operationId": "BookingsController_2024_08_13_markNoShow", - "summary": "Mark a booking absence", + "summary": "Mark a booking absence - provided authorization header refers to owner of the booking.", "parameters": [ { "name": "cal-api-version", @@ -4087,7 +5597,7 @@ { "name": "Authorization", "in": "header", - "description": "value must be `Bearer ` where `` either managed user access token or api key prefixed with cal_", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_ or managed user access token", "required": true, "schema": { "type": "string" @@ -4124,7 +5634,7 @@ "/v2/bookings/{bookingUid}/reassign": { "post": { "operationId": "BookingsController_2024_08_13_reassignBooking", - "summary": "Automatically reassign booking to a new host", + "summary": "Automatically reassign booking to a new host automatically - provided authorization header refers to person who reassigned the booking.", "parameters": [ { "name": "cal-api-version", @@ -4147,7 +5657,7 @@ { "name": "Authorization", "in": "header", - "description": "value must be `Bearer ` where `` either managed user access token or api key prefixed with cal_", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_ or managed user access token", "required": true, "schema": { "type": "string" @@ -4174,7 +5684,7 @@ "/v2/bookings/{bookingUid}/reassign/{userId}": { "post": { "operationId": "BookingsController_2024_08_13_reassignBookingToUser", - "summary": "Reassign a booking to a specific user", + "summary": "Reassign a booking to a specific user specified by the :userId - provided authorization header refers to person who reassigned the booking.", "parameters": [ { "name": "cal-api-version", @@ -4205,7 +5715,7 @@ { "name": "Authorization", "in": "header", - "description": "value must be `Bearer ` where `` either managed user access token or api key prefixed with cal_", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_ or managed user access token", "required": true, "schema": { "type": "string" @@ -4242,7 +5752,7 @@ "/v2/bookings/{bookingUid}/confirm": { "post": { "operationId": "BookingsController_2024_08_13_confirmBooking", - "summary": "Confirm booking that requires a confirmation", + "summary": "Confirm booking that requires a confirmation - provided authorization header refers to owner of the booking.", "parameters": [ { "name": "cal-api-version", @@ -4265,7 +5775,7 @@ { "name": "Authorization", "in": "header", - "description": "value must be `Bearer ` where `` either managed user access token or api key prefixed with cal_", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_ or managed user access token", "required": true, "schema": { "type": "string" @@ -4292,7 +5802,7 @@ "/v2/bookings/{bookingUid}/decline": { "post": { "operationId": "BookingsController_2024_08_13_declineBooking", - "summary": "Decline booking that requires a confirmation", + "summary": "Decline booking that requires a confirmation - provided authorization header refers to owner of the booking.", "parameters": [ { "name": "cal-api-version", @@ -4315,7 +5825,7 @@ { "name": "Authorization", "in": "header", - "description": "value must be `Bearer ` where `` either managed user access token or api key prefixed with cal_", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_ or managed user access token", "required": true, "schema": { "type": "string" @@ -4372,6 +5882,15 @@ "schema": { "type": "string" } + }, + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_ or managed user access token", + "required": true, + "schema": { + "type": "string" + } } ], "responses": { @@ -4395,7 +5914,17 @@ "post": { "operationId": "CalendarsController_createIcsFeed", "summary": "Save an ICS feed", - "parameters": [], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_ or managed user access token", + "required": true, + "schema": { + "type": "string" + } + } + ], "requestBody": { "required": true, "content": { @@ -4427,7 +5956,17 @@ "get": { "operationId": "CalendarsController_checkIcsFeed", "summary": "Check an ICS feed", - "parameters": [], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_ or managed user access token", + "required": true, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "", @@ -4496,6 +6035,15 @@ "schema": { "type": "string" } + }, + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_ or managed user access token", + "required": true, + "schema": { + "type": "string" + } } ], "responses": { @@ -4519,7 +6067,17 @@ "get": { "operationId": "CalendarsController_getCalendars", "summary": "Get all calendars", - "parameters": [], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_ or managed user access token", + "required": true, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "", @@ -4546,6 +6104,7 @@ "name": "Authorization", "required": true, "in": "header", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_ or managed user access token", "schema": { "type": "string" } @@ -4648,6 +6207,15 @@ ], "type": "string" } + }, + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_ or managed user access token", + "required": true, + "schema": { + "type": "string" + } } ], "responses": { @@ -4677,6 +6245,15 @@ ], "type": "string" } + }, + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_ or managed user access token", + "required": true, + "schema": { + "type": "string" + } } ], "responses": { @@ -4713,6 +6290,15 @@ ], "type": "string" } + }, + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_ or managed user access token", + "required": true, + "schema": { + "type": "string" + } } ], "requestBody": { @@ -4758,6 +6344,15 @@ ], "type": "string" } + }, + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_ or managed user access token", + "required": true, + "schema": { + "type": "string" + } } ], "responses": { @@ -4786,6 +6381,7 @@ "name": "Authorization", "required": true, "in": "header", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_ or managed user access token", "schema": { "type": "string" } @@ -4886,7 +6482,17 @@ "get": { "operationId": "ConferencingController_listInstalledConferencingApps", "summary": "List your conferencing applications", - "parameters": [], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_ or managed user access token", + "required": true, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "", @@ -4923,6 +6529,15 @@ ], "type": "string" } + }, + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_ or managed user access token", + "required": true, + "schema": { + "type": "string" + } } ], "responses": { @@ -4946,7 +6561,17 @@ "get": { "operationId": "ConferencingController_getDefault", "summary": "Get your default conferencing application", - "parameters": [], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_ or managed user access token", + "required": true, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "", @@ -4982,6 +6607,15 @@ ], "type": "string" } + }, + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_ or managed user access token", + "required": true, + "schema": { + "type": "string" + } } ], "responses": { @@ -5005,7 +6639,17 @@ "put": { "operationId": "DestinationCalendarsController_updateDestinationCalendars", "summary": "Update destination calendars", - "parameters": [], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_ or managed user access token", + "required": true, + "schema": { + "type": "string" + } + } + ], "requestBody": { "required": true, "content": { @@ -5051,7 +6695,7 @@ { "name": "Authorization", "in": "header", - "description": "value must be `Bearer ` where `` either managed user access token or api key prefixed with cal_", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_ or managed user access token", "required": true, "schema": { "type": "string" @@ -5187,7 +6831,7 @@ { "name": "Authorization", "in": "header", - "description": "value must be `Bearer ` where `` either managed user access token or api key prefixed with cal_", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_ or managed user access token", "required": true, "schema": { "type": "string" @@ -5235,7 +6879,7 @@ { "name": "Authorization", "in": "header", - "description": "value must be `Bearer ` where `` either managed user access token or api key prefixed with cal_", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_ or managed user access token", "required": true, "schema": { "type": "string" @@ -5293,7 +6937,7 @@ { "name": "Authorization", "in": "header", - "description": "value must be `Bearer ` where `` either managed user access token or api key prefixed with cal_", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_ or managed user access token", "required": true, "schema": { "type": "string" @@ -5322,6 +6966,15 @@ "operationId": "EventTypeWebhooksController_createEventTypeWebhook", "summary": "Create a webhook", "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_ or managed user access token", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "eventTypeId", "required": true, @@ -5361,6 +7014,15 @@ "operationId": "EventTypeWebhooksController_getEventTypeWebhooks", "summary": "Get all webhooks", "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_ or managed user access token", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "eventTypeId", "required": true, @@ -5410,6 +7072,15 @@ "operationId": "EventTypeWebhooksController_deleteAllEventTypeWebhooks", "summary": "Delete all webhooks", "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_ or managed user access token", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "eventTypeId", "required": true, @@ -5441,6 +7112,15 @@ "operationId": "EventTypeWebhooksController_updateEventTypeWebhook", "summary": "Update a webhook", "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_ or managed user access token", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "webhookId", "required": true, @@ -5479,7 +7159,17 @@ "get": { "operationId": "EventTypeWebhooksController_getEventTypeWebhook", "summary": "Get a webhook", - "parameters": [], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_ or managed user access token", + "required": true, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "", @@ -5499,7 +7189,17 @@ "delete": { "operationId": "EventTypeWebhooksController_deleteEventTypeWebhook", "summary": "Delete a webhook", - "parameters": [], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_ or managed user access token", + "required": true, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "", @@ -5521,7 +7221,17 @@ "get": { "operationId": "MeController_getMe", "summary": "Get my profile", - "parameters": [], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_ or managed user access token", + "required": true, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "", @@ -5541,7 +7251,17 @@ "patch": { "operationId": "MeController_updateMe", "summary": "Update my profile", - "parameters": [], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_ or managed user access token", + "required": true, + "schema": { + "type": "string" + } + } + ], "requestBody": { "required": true, "content": { @@ -5572,7 +7292,18 @@ "/v2/oauth-clients": { "post": { "operationId": "OAuthClientsController_createOAuthClient", - "parameters": [], + "summary": "Create an OAuth client", + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_", + "required": true, + "schema": { + "type": "string" + } + } + ], "requestBody": { "required": true, "content": { @@ -5601,7 +7332,18 @@ }, "get": { "operationId": "OAuthClientsController_getOAuthClients", - "parameters": [], + "summary": "Get all OAuth clients", + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_", + "required": true, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "", @@ -5622,7 +7364,17 @@ "/v2/oauth-clients/{clientId}": { "get": { "operationId": "OAuthClientsController_getOAuthClientById", + "summary": "Get an OAuth client", "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "clientId", "required": true, @@ -5650,7 +7402,17 @@ }, "patch": { "operationId": "OAuthClientsController_updateOAuthClient", + "summary": "Update an OAuth client", "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "clientId", "required": true, @@ -5688,7 +7450,17 @@ }, "delete": { "operationId": "OAuthClientsController_deleteOAuthClient", + "summary": "Delete an OAuth client", "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "clientId", "required": true, @@ -5715,56 +7487,6 @@ ] } }, - "/v2/oauth-clients/{clientId}/managed-users": { - "get": { - "operationId": "OAuthClientsController_getOAuthClientManagedUsersById", - "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" - } - }, - { - "name": "offset", - "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/GetManagedUsersOutput" - } - } - } - } - }, - "tags": [ - "OAuth Clients" - ] - } - }, "/v2/schedules": { "post": { "operationId": "SchedulesController_2024_06_11_createSchedule", @@ -5774,7 +7496,7 @@ { "name": "Authorization", "in": "header", - "description": "value must be `Bearer ` where `` either managed user access token or api key prefixed with cal_", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_ or managed user access token", "required": true, "schema": { "type": "string" @@ -5825,7 +7547,7 @@ { "name": "Authorization", "in": "header", - "description": "value must be `Bearer ` where `` either managed user access token or api key prefixed with cal_", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_ or managed user access token", "required": true, "schema": { "type": "string" @@ -5868,7 +7590,7 @@ { "name": "Authorization", "in": "header", - "description": "value must be `Bearer ` where `` either managed user access token or api key prefixed with cal_", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_ or managed user access token", "required": true, "schema": { "type": "string" @@ -5910,7 +7632,7 @@ { "name": "Authorization", "in": "header", - "description": "value must be `Bearer ` where `` either managed user access token or api key prefixed with cal_", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_ or managed user access token", "required": true, "schema": { "type": "string" @@ -5958,7 +7680,7 @@ { "name": "Authorization", "in": "header", - "description": "value must be `Bearer ` where `` either managed user access token or api key prefixed with cal_", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_ or managed user access token", "required": true, "schema": { "type": "string" @@ -6016,7 +7738,7 @@ { "name": "Authorization", "in": "header", - "description": "value must be `Bearer ` where `` either managed user access token or api key prefixed with cal_", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_ or managed user access token", "required": true, "schema": { "type": "string" @@ -6062,7 +7784,17 @@ "post": { "operationId": "SelectedCalendarsController_addSelectedCalendar", "summary": "Add a selected calendar", - "parameters": [], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_ or managed user access token", + "required": true, + "schema": { + "type": "string" + } + } + ], "requestBody": { "required": true, "content": { @@ -6093,6 +7825,15 @@ "operationId": "SelectedCalendarsController_deleteSelectedCalendar", "summary": "Delete a selected calendar", "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_ or managed user access token", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "integration", "required": true, @@ -6328,7 +8069,7 @@ "post": { "operationId": "SlotsController_2024_09_04_reserveSlot", "summary": "Reserve a slot", - "description": "Make a slot not available for others to book for a certain period of time.", + "description": "Make a slot not available for others to book for a certain period of time. If you authenticate using oAuth credentials, api key or access token\n then you can also specify custom duration for how long the slot should be reserved for (defaults to 5 minutes).", "parameters": [ { "name": "cal-api-version", @@ -6339,6 +8080,24 @@ "type": "string", "default": "2024-09-04" } + }, + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_ or managed user access token", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-client-id", + "in": "header", + "description": "For platform customers - OAuth client ID", + "required": false, + "schema": { + "type": "string" + } } ], "requestBody": { @@ -6508,6 +8267,7 @@ "name": "Authorization", "required": true, "in": "header", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_ or managed user access token", "schema": { "type": "string" } @@ -6573,7 +8333,17 @@ "get": { "operationId": "StripeController_check", "summary": "Check stripe connection", - "parameters": [], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_ or managed user access token", + "required": true, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "", @@ -6603,6 +8373,15 @@ "schema": { "type": "string" } + }, + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_ or managed user access token", + "required": true, + "schema": { + "type": "string" + } } ], "responses": { @@ -6626,7 +8405,17 @@ "post": { "operationId": "TeamsController_createTeam", "summary": "Create a team", - "parameters": [], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_", + "required": true, + "schema": { + "type": "string" + } + } + ], "requestBody": { "required": true, "content": { @@ -6656,7 +8445,17 @@ "get": { "operationId": "TeamsController_getTeams", "summary": "Get teams", - "parameters": [], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_", + "required": true, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "", @@ -6679,6 +8478,15 @@ "operationId": "TeamsController_getTeam", "summary": "Get a team", "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "teamId", "required": true, @@ -6708,6 +8516,15 @@ "operationId": "TeamsController_updateTeam", "summary": "Update a team", "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "teamId", "required": true, @@ -6747,6 +8564,15 @@ "operationId": "TeamsController_deleteTeam", "summary": "Delete a team", "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "teamId", "required": true, @@ -6785,6 +8611,15 @@ "schema": { "type": "number" } + }, + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_", + "required": true, + "schema": { + "type": "string" + } } ], "requestBody": { @@ -6881,6 +8716,15 @@ "schema": { "type": "number" } + }, + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_", + "required": true, + "schema": { + "type": "string" + } } ], "responses": { @@ -6918,6 +8762,15 @@ "schema": { "type": "number" } + }, + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_", + "required": true, + "schema": { + "type": "string" + } } ], "requestBody": { @@ -6965,6 +8818,15 @@ "schema": { "type": "number" } + }, + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_", + "required": true, + "schema": { + "type": "string" + } } ], "responses": { @@ -7004,6 +8866,15 @@ "schema": { "type": "number" } + }, + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_", + "required": true, + "schema": { + "type": "string" + } } ], "requestBody": { @@ -7038,6 +8909,15 @@ "operationId": "TeamsMembershipsController_createTeamMembership", "summary": "Create a membership", "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "teamId", "required": true, @@ -7077,6 +8957,15 @@ "operationId": "TeamsMembershipsController_getTeamMemberships", "summary": "Get all memberships", "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "teamId", "required": true, @@ -7128,6 +9017,15 @@ "operationId": "TeamsMembershipsController_getTeamMembership", "summary": "Get a membership", "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "teamId", "required": true, @@ -7165,6 +9063,15 @@ "operationId": "TeamsMembershipsController_updateTeamMembership", "summary": "Create a membership", "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "teamId", "required": true, @@ -7212,6 +9119,15 @@ "operationId": "TeamsMembershipsController_deleteTeamMembership", "summary": "Delete a membership", "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "teamId", "required": true, @@ -7246,33 +9162,21 @@ ] } }, - "/v2/timezones": { - "get": { - "operationId": "TimezonesController_getTimeZones", - "summary": "Get all timezones", - "parameters": [], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object" - } - } - } - } - }, - "tags": [ - "Timezones" - ] - } - }, "/v2/webhooks": { "post": { "operationId": "WebhooksController_createWebhook", "summary": "Create a webhook", - "parameters": [], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_", + "required": true, + "schema": { + "type": "string" + } + } + ], "requestBody": { "required": true, "content": { @@ -7304,6 +9208,15 @@ "summary": "Get all webooks", "description": "Gets a paginated list of webhooks for the authenticated user.", "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "take", "required": false, @@ -7347,6 +9260,15 @@ "operationId": "WebhooksController_updateWebhook", "summary": "Update a webhook", "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "webhookId", "required": true, @@ -7385,7 +9307,17 @@ "get": { "operationId": "WebhooksController_getWebhook", "summary": "Get a webhook", - "parameters": [], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_", + "required": true, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "", @@ -7406,6 +9338,15 @@ "operationId": "WebhooksController_deleteWebhook", "summary": "Delete a webhook", "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "webhookId", "required": true, @@ -16244,61 +18185,6 @@ "data" ] }, - "ProviderVerifyClientData": { - "type": "object", - "properties": { - "clientId": { - "type": "string" - }, - "organizationId": { - "type": "number" - }, - "name": { - "type": "string" - } - }, - "required": [ - "clientId", - "organizationId", - "name" - ] - }, - "ProviderVerifyClientOutput": { - "type": "object", - "properties": { - "status": { - "type": "string", - "example": "success", - "enum": [ - "success", - "error" - ] - }, - "data": { - "$ref": "#/components/schemas/ProviderVerifyClientData" - } - }, - "required": [ - "status", - "data" - ] - }, - "ProviderVerifyAccessTokenOutput": { - "type": "object", - "properties": { - "status": { - "type": "string", - "example": "success", - "enum": [ - "success", - "error" - ] - } - }, - "required": [ - "status" - ] - }, "MeOrgOutput": { "type": "object", "properties": { diff --git a/docs/api-reference/v2/introduction.mdx b/docs/api-reference/v2/introduction.mdx index 4f40b7f7bd..47cf42499d 100644 --- a/docs/api-reference/v2/introduction.mdx +++ b/docs/api-reference/v2/introduction.mdx @@ -3,6 +3,20 @@ title: 'Introduction to API v2' description: 'Introduction to Cal.com API v2 endpoints' --- +## Platform endpoints +Platform customers have the following endpoints available: + +1. Endpoints prefixed with "Platform". +2. Endpoints with no prefix e.g "Bookings", "Event Types". +3. If you are at least on the ESSENTIALS plan, then all endpoints prefixed with "Orgs" except "Orgs / Attributes", "Orgs / Attributes / Options" and "Orgs / Teams / Routing forms / Responses". + +## Organizations endpoints +Organizations customers have all the endpoints except the ones prefixed with "Platform" and "Teams" and "Orgs / Orgs" because +children organizations are only allowed in the platform plan right now. + +## Teams endpoints +Teams customers have all the endpoints except the ones prefixed with "Platform" and "Orgs". + ## Authentication The Cal.com API has 3 authentication methods: @@ -40,7 +54,7 @@ You need to use OAuth credentials when: 1. Managing managed users [API reference](https://cal.com/docs/api-reference/v2/platform-managed-users/create-a-managed-user) 2. Creating OAuth client webhooks [API reference](https://cal.com/docs/api-reference/v2/platform-webhooks/create-a-webhook) -3. Refreshing tokens of a managed user [API reference](https://cal.com/docs/api-reference/v2/oauth/post-v2oauth-refresh) +3. Refreshing tokens of a managed user [API reference](https://cal.com/docs/api-reference/v2/platform-managed-users/refresh-managed-user-tokens) 4. Teams related endpoints: Managing organization teams [API reference](https://cal.com/docs/api-reference/v2/orgs-teams/create-a-team), adding managed users as members to teams [API reference](https://cal.com/docs/api-reference/v2/orgs-teams-memberships/create-a-membership), creating team event types [API reference](https://cal.com/docs/api-reference/v2/orgs-event-types/create-an-event-type). OAuth credentials can be accessed in the platform dashboard https://app.cal.com/settings/platform after you have created an OAuth client. Each one has an ID and secret. You then need to pass them as request headers: @@ -63,11 +77,3 @@ Validity period: access tokens are valid for 60 minutes and refresh tokens for 1 Recovering tokens: if you ever lose managed user's access or refresh tokens, you can force refresh them using the OAuth client credentials and store them in your database [API reference](https://cal.com/docs/api-reference/v2/platform-managed-users/force-refresh-tokens). -## Navigating endpoints -Platform customers have the following endpoints available: - -1. Endpoints prefixed with "Platform". -2. Endpoints with no prefix e.g "Bookings", "Event Types". -3. If you are at least on the ESSENTIALS plan, then all endpoints prefixed with "Orgs" except "Orgs / Attributes". - -Non-platform customers have all the endpoints except the ones prefixed with "Platform". \ No newline at end of file diff --git a/docs/api-reference/v2/openapi.json b/docs/api-reference/v2/openapi.json index 5a9813ac88..788c9cc143 100644 --- a/docs/api-reference/v2/openapi.json +++ b/docs/api-reference/v2/openapi.json @@ -1,69 +1,20 @@ { "openapi": "3.0.0", "paths": { - "/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/oauth-clients/{clientId}/users": { "get": { "operationId": "OAuthClientUsersController_getManagedUsers", "summary": "Get all managed users", "parameters": [ + { + "name": "x-cal-secret-key", + "in": "header", + "description": "OAuth client secret key", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "clientId", "required": true, @@ -124,6 +75,15 @@ "operationId": "OAuthClientUsersController_createUser", "summary": "Create a managed user", "parameters": [ + { + "name": "x-cal-secret-key", + "in": "header", + "description": "OAuth client secret key", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "clientId", "required": true, @@ -163,6 +123,15 @@ "operationId": "OAuthClientUsersController_getUserById", "summary": "Get a managed user", "parameters": [ + { + "name": "x-cal-secret-key", + "in": "header", + "description": "OAuth client secret key", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "clientId", "required": true, @@ -198,6 +167,15 @@ "operationId": "OAuthClientUsersController_updateUser", "summary": "Update a managed user", "parameters": [ + { + "name": "x-cal-secret-key", + "in": "header", + "description": "OAuth client secret key", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "clientId", "required": true, @@ -243,6 +221,15 @@ "operationId": "OAuthClientUsersController_deleteUser", "summary": "Delete a managed user", "parameters": [ + { + "name": "x-cal-secret-key", + "in": "header", + "description": "OAuth client secret key", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "clientId", "required": true, @@ -281,6 +268,15 @@ "summary": "Force refresh tokens", "description": "If you have lost managed user access or refresh token, then you can get new ones by using OAuth credentials.\n Each access token is valid for 60 minutes and each refresh token for 1 year. Make sure to store them later in your database, for example, by updating the User model to have `calAccessToken` and `calRefreshToken` columns.", "parameters": [ + { + "name": "x-cal-secret-key", + "in": "header", + "description": "OAuth client secret key", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "userId", "required": true, @@ -367,6 +363,15 @@ "operationId": "OAuthClientWebhooksController_createOAuthClientWebhook", "summary": "Create a webhook", "parameters": [ + { + "name": "x-cal-secret-key", + "in": "header", + "description": "OAuth client secret key", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "clientId", "required": true, @@ -404,6 +409,15 @@ "operationId": "OAuthClientWebhooksController_getOAuthClientWebhooks", "summary": "Get all webhooks", "parameters": [ + { + "name": "x-cal-secret-key", + "in": "header", + "description": "OAuth client secret key", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "clientId", "required": true, @@ -451,6 +465,15 @@ "operationId": "OAuthClientWebhooksController_deleteAllOAuthClientWebhooks", "summary": "Delete all webhooks", "parameters": [ + { + "name": "x-cal-secret-key", + "in": "header", + "description": "OAuth client secret key", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "clientId", "required": true, @@ -480,6 +503,15 @@ "operationId": "OAuthClientWebhooksController_updateOAuthClientWebhook", "summary": "Update a webhook", "parameters": [ + { + "name": "x-cal-secret-key", + "in": "header", + "description": "OAuth client secret key", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "webhookId", "required": true, @@ -516,7 +548,17 @@ "get": { "operationId": "OAuthClientWebhooksController_getOAuthClientWebhook", "summary": "Get a webhook", - "parameters": [], + "parameters": [ + { + "name": "x-cal-secret-key", + "in": "header", + "description": "OAuth client secret key", + "required": true, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "", @@ -534,7 +576,17 @@ "delete": { "operationId": "OAuthClientWebhooksController_deleteOAuthClientWebhook", "summary": "Delete a webhook", - "parameters": [], + "parameters": [ + { + "name": "x-cal-secret-key", + "in": "header", + "description": "OAuth client secret key", + "required": true, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "", @@ -555,6 +607,15 @@ "operationId": "OrganizationsAttributesController_getOrganizationAttributes", "summary": "Get all attributes", "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "orgId", "required": true, @@ -602,6 +663,15 @@ "operationId": "OrganizationsAttributesController_createOrganizationAttribute", "summary": "Create an attribute", "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "orgId", "required": true, @@ -641,6 +711,15 @@ "operationId": "OrganizationsAttributesController_getOrganizationAttribute", "summary": "Get an attribute", "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "orgId", "required": true, @@ -676,6 +755,15 @@ "operationId": "OrganizationsAttributesController_updateOrganizationAttribute", "summary": "Update an attribute", "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "orgId", "required": true, @@ -721,6 +809,15 @@ "operationId": "OrganizationsAttributesController_deleteOrganizationAttribute", "summary": "Delete an attribute", "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "orgId", "required": true, @@ -758,6 +855,15 @@ "operationId": "OrganizationsAttributesOptionsController_createOrganizationAttributeOption", "summary": "Create an attribute option", "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "orgId", "required": true, @@ -803,6 +909,15 @@ "operationId": "OrganizationsAttributesOptionsController_getOrganizationAttributeOptions", "summary": "Get all attribute options", "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "orgId", "required": true, @@ -840,6 +955,15 @@ "operationId": "OrganizationsAttributesOptionsController_deleteOrganizationAttributeOption", "summary": "Delete an attribute option", "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "orgId", "required": true, @@ -883,6 +1007,15 @@ "operationId": "OrganizationsAttributesOptionsController_updateOrganizationAttributeOption", "summary": "Update an attribute option", "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "orgId", "required": true, @@ -938,6 +1071,15 @@ "operationId": "OrganizationsAttributesOptionsController_assignOrganizationAttributeOptionToUser", "summary": "Assign an attribute to a user", "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "orgId", "required": true, @@ -983,6 +1125,15 @@ "operationId": "OrganizationsAttributesOptionsController_getOrganizationAttributeOptionsForUser", "summary": "Get all attribute options for a user", "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "orgId", "required": true, @@ -1020,6 +1171,15 @@ "operationId": "OrganizationsAttributesOptionsController_unassignOrganizationAttributeOptionFromUser", "summary": "Unassign an attribute from a user", "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "orgId", "required": true, @@ -1065,6 +1225,33 @@ "operationId": "OrganizationsDelegationCredentialController_createDelegationCredential", "summary": "Save delegation credentials for your organization.", "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "For non-platform customers - value must be `Bearer ` where `` is api key prefixed with cal_", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-secret-key", + "in": "header", + "description": "For platform customers - OAuth client secret key", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-client-id", + "in": "header", + "description": "For platform customers - OAuth client ID", + "required": false, + "schema": { + "type": "string" + } + }, { "name": "orgId", "required": true, @@ -1104,6 +1291,33 @@ "operationId": "OrganizationsDelegationCredentialController_updateDelegationCredential", "summary": "Update delegation credentials of your organization.", "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "For non-platform customers - value must be `Bearer ` where `` is api key prefixed with cal_", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-secret-key", + "in": "header", + "description": "For platform customers - OAuth client secret key", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-client-id", + "in": "header", + "description": "For platform customers - OAuth client ID", + "required": false, + "schema": { + "type": "string" + } + }, { "name": "orgId", "required": true, @@ -1146,316 +1360,38 @@ "tags": ["Orgs / Delegation Credentials"] } }, - "/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": false, - "in": "query", - "description": "Slug of team event type to return.", - "schema": { - "type": "string" - } - }, - { - "name": "hostsLimit", - "required": false, - "in": "query", - "description": "Specifies the maximum number of hosts to include in the response. This limit helps optimize performance. If not provided, all Hosts will be fetched.", - "schema": { - "type": "number" - } - } - ], - "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": "Authorization", + "in": "header", + "description": "For non-platform customers - value must be `Bearer ` where `` is api key prefixed with cal_", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-secret-key", + "in": "header", + "description": "For platform customers - OAuth client secret key", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-client-id", + "in": "header", + "description": "For platform customers - OAuth client ID", + "required": false, + "schema": { + "type": "string" + } + }, { "name": "orgId", "required": true, @@ -1503,6 +1439,33 @@ "operationId": "OrganizationsMembershipsController_createMembership", "summary": "Create a membership", "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "For non-platform customers - value must be `Bearer ` where `` is api key prefixed with cal_", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-secret-key", + "in": "header", + "description": "For platform customers - OAuth client secret key", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-client-id", + "in": "header", + "description": "For platform customers - OAuth client ID", + "required": false, + "schema": { + "type": "string" + } + }, { "name": "orgId", "required": true, @@ -1542,6 +1505,33 @@ "operationId": "OrganizationsMembershipsController_getOrgMembership", "summary": "Get a membership", "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "For non-platform customers - value must be `Bearer ` where `` is api key prefixed with cal_", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-secret-key", + "in": "header", + "description": "For platform customers - OAuth client secret key", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-client-id", + "in": "header", + "description": "For platform customers - OAuth client ID", + "required": false, + "schema": { + "type": "string" + } + }, { "name": "orgId", "required": true, @@ -1577,6 +1567,33 @@ "operationId": "OrganizationsMembershipsController_deleteMembership", "summary": "Delete a membership", "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "For non-platform customers - value must be `Bearer ` where `` is api key prefixed with cal_", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-secret-key", + "in": "header", + "description": "For platform customers - OAuth client secret key", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-client-id", + "in": "header", + "description": "For platform customers - OAuth client ID", + "required": false, + "schema": { + "type": "string" + } + }, { "name": "orgId", "required": true, @@ -1612,6 +1629,33 @@ "operationId": "OrganizationsMembershipsController_updateMembership", "summary": "Update a membership", "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "For non-platform customers - value must be `Bearer ` where `` is api key prefixed with cal_", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-secret-key", + "in": "header", + "description": "For platform customers - OAuth client secret key", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-client-id", + "in": "header", + "description": "For platform customers - OAuth client ID", + "required": false, + "schema": { + "type": "string" + } + }, { "name": "orgId", "required": true, @@ -1660,6 +1704,24 @@ "summary": "Create an organization within an organization", "description": "Requires the user to have at least the 'ORG_ADMIN' role within the organization. Additionally, for platform, the plan must be 'SCALE' or higher to access this endpoint.", "parameters": [ + { + "name": "x-cal-secret-key", + "in": "header", + "description": "For platform customers - OAuth client secret key", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-client-id", + "in": "header", + "description": "For platform customers - OAuth client ID", + "required": false, + "schema": { + "type": "string" + } + }, { "name": "orgId", "required": true, @@ -1698,6 +1760,24 @@ "summary": "Get all organizations within an organization", "description": "Requires the user to have at least the 'ORG_ADMIN' role within the organization. Additionally, for platform, the plan must be 'SCALE' or higher to access this endpoint.", "parameters": [ + { + "name": "x-cal-secret-key", + "in": "header", + "description": "For platform customers - OAuth client secret key", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-client-id", + "in": "header", + "description": "For platform customers - OAuth client ID", + "required": false, + "schema": { + "type": "string" + } + }, { "name": "orgId", "required": true, @@ -1728,6 +1808,24 @@ "summary": "Get an organization within an organization", "description": "Requires the user to have at least the 'ORG_ADMIN' role within the organization. Additionally, for platform, the plan must be 'SCALE' or higher to access this endpoint.", "parameters": [ + { + "name": "x-cal-secret-key", + "in": "header", + "description": "For platform customers - OAuth client secret key", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-client-id", + "in": "header", + "description": "For platform customers - OAuth client ID", + "required": false, + "schema": { + "type": "string" + } + }, { "name": "managedOrganizationId", "required": true, @@ -1756,6 +1854,24 @@ "summary": "Update an organization within an organization", "description": "Requires the user to have at least the 'ORG_ADMIN' role within the organization. Additionally, for platform, the plan must be 'SCALE' or higher to access this endpoint.", "parameters": [ + { + "name": "x-cal-secret-key", + "in": "header", + "description": "For platform customers - OAuth client secret key", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-client-id", + "in": "header", + "description": "For platform customers - OAuth client ID", + "required": false, + "schema": { + "type": "string" + } + }, { "name": "orgId", "required": true, @@ -1802,6 +1918,24 @@ "summary": "Delete an organization within an organization", "description": "Requires the user to have at least the 'ORG_ADMIN' role within the organization. Additionally, for platform, the plan must be 'SCALE' or higher to access this endpoint.", "parameters": [ + { + "name": "x-cal-secret-key", + "in": "header", + "description": "For platform customers - OAuth client secret key", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-client-id", + "in": "header", + "description": "For platform customers - OAuth client ID", + "required": false, + "schema": { + "type": "string" + } + }, { "name": "managedOrganizationId", "required": true, @@ -1831,6 +1965,33 @@ "operationId": "OrganizationsSchedulesController_getOrganizationSchedules", "summary": "Get all schedules", "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "For non-platform customers - value must be `Bearer ` where `` is api key prefixed with cal_", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-secret-key", + "in": "header", + "description": "For platform customers - OAuth client secret key", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-client-id", + "in": "header", + "description": "For platform customers - OAuth client ID", + "required": false, + "schema": { + "type": "string" + } + }, { "name": "orgId", "required": true, @@ -1875,194 +2036,38 @@ "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": "Authorization", + "in": "header", + "description": "For non-platform customers - value must be `Bearer ` where `` is api key prefixed with cal_", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-secret-key", + "in": "header", + "description": "For platform customers - OAuth client secret key", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-client-id", + "in": "header", + "description": "For platform customers - OAuth client ID", + "required": false, + "schema": { + "type": "string" + } + }, { "name": "orgId", "required": true, @@ -2104,12 +2109,39 @@ } } }, - "tags": ["Orgs / Teams", "Teams"] + "tags": ["Orgs / Teams"] }, "post": { "operationId": "OrganizationsTeamsController_createTeam", "summary": "Create a team", "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "For non-platform customers - value must be `Bearer ` where `` is api key prefixed with cal_", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-secret-key", + "in": "header", + "description": "For platform customers - OAuth client secret key", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-client-id", + "in": "header", + "description": "For platform customers - OAuth client ID", + "required": false, + "schema": { + "type": "string" + } + }, { "name": "orgId", "required": true, @@ -2117,14 +2149,6 @@ "schema": { "type": "number" } - }, - { - "name": "x-cal-client-id", - "required": true, - "in": "header", - "schema": { - "type": "string" - } } ], "requestBody": { @@ -2157,6 +2181,33 @@ "operationId": "OrganizationsTeamsController_getMyTeams", "summary": "Get teams membership for user", "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "For non-platform customers - value must be `Bearer ` where `` is api key prefixed with cal_", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-secret-key", + "in": "header", + "description": "For platform customers - OAuth client secret key", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-client-id", + "in": "header", + "description": "For platform customers - OAuth client ID", + "required": false, + "schema": { + "type": "string" + } + }, { "name": "orgId", "required": true, @@ -2205,7 +2256,35 @@ "get": { "operationId": "OrganizationsTeamsController_getTeam", "summary": "Get a team", - "parameters": [], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "For non-platform customers - value must be `Bearer ` where `` is api key prefixed with cal_", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-secret-key", + "in": "header", + "description": "For platform customers - OAuth client secret key", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-client-id", + "in": "header", + "description": "For platform customers - OAuth client ID", + "required": false, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "", @@ -2224,6 +2303,33 @@ "operationId": "OrganizationsTeamsController_deleteTeam", "summary": "Delete a team", "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "For non-platform customers - value must be `Bearer ` where `` is api key prefixed with cal_", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-secret-key", + "in": "header", + "description": "For platform customers - OAuth client secret key", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-client-id", + "in": "header", + "description": "For platform customers - OAuth client ID", + "required": false, + "schema": { + "type": "string" + } + }, { "name": "orgId", "required": true, @@ -2259,6 +2365,33 @@ "operationId": "OrganizationsTeamsController_updateTeam", "summary": "Update a team", "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "For non-platform customers - value must be `Bearer ` where `` is api key prefixed with cal_", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-secret-key", + "in": "header", + "description": "For platform customers - OAuth client secret key", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-client-id", + "in": "header", + "description": "For platform customers - OAuth client ID", + "required": false, + "schema": { + "type": "string" + } + }, { "name": "orgId", "required": true, @@ -2306,6 +2439,33 @@ "operationId": "OrganizationsTeamsBookingsController_getAllOrgTeamBookings", "summary": "Get organization team bookings", "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "For non-platform customers - value must be `Bearer ` where `` is api key prefixed with cal_", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-secret-key", + "in": "header", + "description": "For platform customers - OAuth client secret key", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-client-id", + "in": "header", + "description": "For platform customers - OAuth client ID", + "required": false, + "schema": { + "type": "string" + } + }, { "name": "status", "required": false, @@ -2460,11 +2620,532 @@ "tags": ["Orgs / Teams / Bookings"] } }, + "/v2/organizations/{orgId}/teams/{teamId}/event-types": { + "post": { + "operationId": "OrganizationsEventTypesController_createTeamEventType", + "summary": "Create an event type", + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "For non-platform customers - value must be `Bearer ` where `` is api key prefixed with cal_", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-secret-key", + "in": "header", + "description": "For platform customers - OAuth client secret key", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-client-id", + "in": "header", + "description": "For platform customers - OAuth client ID", + "required": false, + "schema": { + "type": "string" + } + }, + { + "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 / Teams / Event Types"] + }, + "get": { + "operationId": "OrganizationsEventTypesController_getTeamEventTypes", + "summary": "Get a team event type", + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "For non-platform customers - value must be `Bearer ` where `` is api key prefixed with cal_", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-secret-key", + "in": "header", + "description": "For platform customers - OAuth client secret key", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-client-id", + "in": "header", + "description": "For platform customers - OAuth client ID", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "teamId", + "required": true, + "in": "path", + "schema": { + "type": "number" + } + }, + { + "name": "eventSlug", + "required": false, + "in": "query", + "description": "Slug of team event type to return.", + "schema": { + "type": "string" + } + }, + { + "name": "hostsLimit", + "required": false, + "in": "query", + "description": "Specifies the maximum number of hosts to include in the response. This limit helps optimize performance. If not provided, all Hosts will be fetched.", + "schema": { + "type": "number" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetTeamEventTypesOutput" + } + } + } + } + }, + "tags": ["Orgs / Teams / Event Types"] + } + }, + "/v2/organizations/{orgId}/teams/{teamId}/event-types/{eventTypeId}": { + "get": { + "operationId": "OrganizationsEventTypesController_getTeamEventType", + "summary": "Get an event type", + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "For non-platform customers - value must be `Bearer ` where `` is api key prefixed with cal_", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-secret-key", + "in": "header", + "description": "For platform customers - OAuth client secret key", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-client-id", + "in": "header", + "description": "For platform customers - OAuth client ID", + "required": false, + "schema": { + "type": "string" + } + }, + { + "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 / Teams / Event Types"] + }, + "patch": { + "operationId": "OrganizationsEventTypesController_updateTeamEventType", + "summary": "Update a team event type", + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "For non-platform customers - value must be `Bearer ` where `` is api key prefixed with cal_", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-secret-key", + "in": "header", + "description": "For platform customers - OAuth client secret key", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-client-id", + "in": "header", + "description": "For platform customers - OAuth client ID", + "required": false, + "schema": { + "type": "string" + } + }, + { + "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 / Teams / Event Types"] + }, + "delete": { + "operationId": "OrganizationsEventTypesController_deleteTeamEventType", + "summary": "Delete a team event type", + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "For non-platform customers - value must be `Bearer ` where `` is api key prefixed with cal_", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-secret-key", + "in": "header", + "description": "For platform customers - OAuth client secret key", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-client-id", + "in": "header", + "description": "For platform customers - OAuth client ID", + "required": false, + "schema": { + "type": "string" + } + }, + { + "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 / Teams / Event Types"] + } + }, + "/v2/organizations/{orgId}/teams/{teamId}/event-types/{eventTypeId}/create-phone-call": { + "post": { + "operationId": "OrganizationsEventTypesController_createPhoneCall", + "summary": "Create a phone call", + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "For non-platform customers - value must be `Bearer ` where `` is api key prefixed with cal_", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-secret-key", + "in": "header", + "description": "For platform customers - OAuth client secret key", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-client-id", + "in": "header", + "description": "For platform customers - OAuth client ID", + "required": false, + "schema": { + "type": "string" + } + }, + { + "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 / Teams / Event Types"] + } + }, + "/v2/organizations/{orgId}/teams/event-types": { + "get": { + "operationId": "OrganizationsEventTypesController_getTeamsEventTypes", + "summary": "Get all team event types", + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "For non-platform customers - value must be `Bearer ` where `` is api key prefixed with cal_", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-secret-key", + "in": "header", + "description": "For platform customers - OAuth client secret key", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-client-id", + "in": "header", + "description": "For platform customers - OAuth client ID", + "required": false, + "schema": { + "type": "string" + } + }, + { + "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 / Teams / Event Types"] + } + }, "/v2/organizations/{orgId}/teams/{teamId}/memberships": { "get": { "operationId": "OrganizationsTeamsMembershipsController_getAllOrgTeamMemberships", "summary": "Get all memberships", "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "For non-platform customers - value must be `Bearer ` where `` is api key prefixed with cal_", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-secret-key", + "in": "header", + "description": "For platform customers - OAuth client secret key", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-client-id", + "in": "header", + "description": "For platform customers - OAuth client ID", + "required": false, + "schema": { + "type": "string" + } + }, { "name": "orgId", "required": true, @@ -2520,6 +3201,33 @@ "operationId": "OrganizationsTeamsMembershipsController_createOrgTeamMembership", "summary": "Create a membership", "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "For non-platform customers - value must be `Bearer ` where `` is api key prefixed with cal_", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-secret-key", + "in": "header", + "description": "For platform customers - OAuth client secret key", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-client-id", + "in": "header", + "description": "For platform customers - OAuth client ID", + "required": false, + "schema": { + "type": "string" + } + }, { "name": "orgId", "required": true, @@ -2567,6 +3275,33 @@ "operationId": "OrganizationsTeamsMembershipsController_getOrgTeamMembership", "summary": "Get a membership", "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "For non-platform customers - value must be `Bearer ` where `` is api key prefixed with cal_", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-secret-key", + "in": "header", + "description": "For platform customers - OAuth client secret key", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-client-id", + "in": "header", + "description": "For platform customers - OAuth client ID", + "required": false, + "schema": { + "type": "string" + } + }, { "name": "orgId", "required": true, @@ -2610,6 +3345,33 @@ "operationId": "OrganizationsTeamsMembershipsController_deleteOrgTeamMembership", "summary": "Delete a membership", "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "For non-platform customers - value must be `Bearer ` where `` is api key prefixed with cal_", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-secret-key", + "in": "header", + "description": "For platform customers - OAuth client secret key", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-client-id", + "in": "header", + "description": "For platform customers - OAuth client ID", + "required": false, + "schema": { + "type": "string" + } + }, { "name": "orgId", "required": true, @@ -2653,6 +3415,33 @@ "operationId": "OrganizationsTeamsMembershipsController_updateOrgTeamMembership", "summary": "Update a membership", "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "For non-platform customers - value must be `Bearer ` where `` is api key prefixed with cal_", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-secret-key", + "in": "header", + "description": "For platform customers - OAuth client secret key", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-client-id", + "in": "header", + "description": "For platform customers - OAuth client ID", + "required": false, + "schema": { + "type": "string" + } + }, { "name": "orgId", "required": true, @@ -2708,6 +3497,15 @@ "operationId": "OrganizationsTeamsRoutingFormsResponsesController_getRoutingFormResponses", "summary": "Get routing form responses", "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "routingFormId", "required": true, @@ -2737,6 +3535,33 @@ "operationId": "OrganizationsTeamsSchedulesController_getUserSchedules", "summary": "Get schedules of a team member", "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "For non-platform customers - value must be `Bearer ` where `` is api key prefixed with cal_", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-secret-key", + "in": "header", + "description": "For platform customers - OAuth client secret key", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-client-id", + "in": "header", + "description": "For platform customers - OAuth client ID", + "required": false, + "schema": { + "type": "string" + } + }, { "name": "userId", "required": true, @@ -2758,7 +3583,7 @@ } } }, - "tags": ["Orgs / Teams / Schedules", "Orgs / Teams / Users / Schedules"] + "tags": ["Orgs / Teams / Users / Schedules"] } }, "/v2/organizations/{orgId}/users": { @@ -2766,6 +3591,33 @@ "operationId": "OrganizationsUsersController_getOrganizationsUsers", "summary": "Get all users", "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "For non-platform customers - value must be `Bearer ` where `` is api key prefixed with cal_", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-secret-key", + "in": "header", + "description": "For platform customers - OAuth client secret key", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-client-id", + "in": "header", + "description": "For platform customers - OAuth client ID", + "required": false, + "schema": { + "type": "string" + } + }, { "name": "orgId", "required": true, @@ -2828,6 +3680,33 @@ "operationId": "OrganizationsUsersController_createOrganizationUser", "summary": "Create a user", "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "For non-platform customers - value must be `Bearer ` where `` is api key prefixed with cal_", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-secret-key", + "in": "header", + "description": "For platform customers - OAuth client secret key", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-client-id", + "in": "header", + "description": "For platform customers - OAuth client ID", + "required": false, + "schema": { + "type": "string" + } + }, { "name": "orgId", "required": true, @@ -2867,6 +3746,33 @@ "operationId": "OrganizationsUsersController_updateOrganizationUser", "summary": "Update a user", "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "For non-platform customers - value must be `Bearer ` where `` is api key prefixed with cal_", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-secret-key", + "in": "header", + "description": "For platform customers - OAuth client secret key", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-client-id", + "in": "header", + "description": "For platform customers - OAuth client ID", + "required": false, + "schema": { + "type": "string" + } + }, { "name": "orgId", "required": true, @@ -2912,6 +3818,33 @@ "operationId": "OrganizationsUsersController_deleteOrganizationUser", "summary": "Delete a user", "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "For non-platform customers - value must be `Bearer ` where `` is api key prefixed with cal_", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-secret-key", + "in": "header", + "description": "For platform customers - OAuth client secret key", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-client-id", + "in": "header", + "description": "For platform customers - OAuth client ID", + "required": false, + "schema": { + "type": "string" + } + }, { "name": "orgId", "required": true, @@ -2949,6 +3882,33 @@ "operationId": "OrganizationsUsersOOOController_getOrganizationUserOOO", "summary": "Get all ooo entries of a user", "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "For non-platform customers - value must be `Bearer ` where `` is api key prefixed with cal_", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-secret-key", + "in": "header", + "description": "For platform customers - OAuth client secret key", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-client-id", + "in": "header", + "description": "For platform customers - OAuth client ID", + "required": false, + "schema": { + "type": "string" + } + }, { "name": "userId", "required": true, @@ -3011,6 +3971,33 @@ "operationId": "OrganizationsUsersOOOController_createOrganizationUserOOO", "summary": "Create an ooo entry for user", "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "For non-platform customers - value must be `Bearer ` where `` is api key prefixed with cal_", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-secret-key", + "in": "header", + "description": "For platform customers - OAuth client secret key", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-client-id", + "in": "header", + "description": "For platform customers - OAuth client ID", + "required": false, + "schema": { + "type": "string" + } + }, { "name": "userId", "required": true, @@ -3043,6 +4030,33 @@ "operationId": "OrganizationsUsersOOOController_updateOrganizationUserOOO", "summary": "Update ooo entry of a user", "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "For non-platform customers - value must be `Bearer ` where `` is api key prefixed with cal_", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-secret-key", + "in": "header", + "description": "For platform customers - OAuth client secret key", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-client-id", + "in": "header", + "description": "For platform customers - OAuth client ID", + "required": false, + "schema": { + "type": "string" + } + }, { "name": "userId", "required": true, @@ -3081,6 +4095,33 @@ "operationId": "OrganizationsUsersOOOController_deleteOrganizationUserOOO", "summary": "Delete ooo entry of a user", "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "For non-platform customers - value must be `Bearer ` where `` is api key prefixed with cal_", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-secret-key", + "in": "header", + "description": "For platform customers - OAuth client secret key", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-client-id", + "in": "header", + "description": "For platform customers - OAuth client ID", + "required": false, + "schema": { + "type": "string" + } + }, { "name": "oooId", "required": true, @@ -3103,6 +4144,33 @@ "operationId": "OrganizationsUsersOOOController_getOrganizationUsersOOO", "summary": "Get all OOO entries of org users", "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "For non-platform customers - value must be `Bearer ` where `` is api key prefixed with cal_", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-secret-key", + "in": "header", + "description": "For platform customers - OAuth client secret key", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-client-id", + "in": "header", + "description": "For platform customers - OAuth client ID", + "required": false, + "schema": { + "type": "string" + } + }, { "name": "orgId", "required": true, @@ -3172,11 +4240,356 @@ "tags": ["Orgs / Users / OOO"] } }, + "/v2/organizations/{orgId}/users/{userId}/schedules": { + "post": { + "operationId": "OrganizationsSchedulesController_createUserSchedule", + "summary": "Create a schedule", + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "For non-platform customers - value must be `Bearer ` where `` is api key prefixed with cal_", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-secret-key", + "in": "header", + "description": "For platform customers - OAuth client secret key", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-client-id", + "in": "header", + "description": "For platform customers - OAuth client ID", + "required": false, + "schema": { + "type": "string" + } + }, + { + "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 / Users / Schedules"] + }, + "get": { + "operationId": "OrganizationsSchedulesController_getUserSchedules", + "summary": "Get all schedules", + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "For non-platform customers - value must be `Bearer ` where `` is api key prefixed with cal_", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-secret-key", + "in": "header", + "description": "For platform customers - OAuth client secret key", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-client-id", + "in": "header", + "description": "For platform customers - OAuth client ID", + "required": false, + "schema": { + "type": "string" + } + }, + { + "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 / Users / Schedules"] + } + }, + "/v2/organizations/{orgId}/users/{userId}/schedules/{scheduleId}": { + "get": { + "operationId": "OrganizationsSchedulesController_getUserSchedule", + "summary": "Get a schedule", + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "For non-platform customers - value must be `Bearer ` where `` is api key prefixed with cal_", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-secret-key", + "in": "header", + "description": "For platform customers - OAuth client secret key", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-client-id", + "in": "header", + "description": "For platform customers - OAuth client ID", + "required": false, + "schema": { + "type": "string" + } + }, + { + "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 / Users / Schedules"] + }, + "patch": { + "operationId": "OrganizationsSchedulesController_updateUserSchedule", + "summary": "Update a schedule", + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "For non-platform customers - value must be `Bearer ` where `` is api key prefixed with cal_", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-secret-key", + "in": "header", + "description": "For platform customers - OAuth client secret key", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-client-id", + "in": "header", + "description": "For platform customers - OAuth client ID", + "required": false, + "schema": { + "type": "string" + } + }, + { + "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 / Users / Schedules"] + }, + "delete": { + "operationId": "OrganizationsSchedulesController_deleteUserSchedule", + "summary": "Delete a schedule", + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "For non-platform customers - value must be `Bearer ` where `` is api key prefixed with cal_", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-secret-key", + "in": "header", + "description": "For platform customers - OAuth client secret key", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-client-id", + "in": "header", + "description": "For platform customers - OAuth client ID", + "required": false, + "schema": { + "type": "string" + } + }, + { + "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 / Users / Schedules"] + } + }, "/v2/organizations/{orgId}/webhooks": { "get": { "operationId": "OrganizationsWebhooksController_getAllOrganizationWebhooks", "summary": "Get all webhooks", "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "For non-platform customers - value must be `Bearer ` where `` is api key prefixed with cal_", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-secret-key", + "in": "header", + "description": "For platform customers - OAuth client secret key", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-client-id", + "in": "header", + "description": "For platform customers - OAuth client ID", + "required": false, + "schema": { + "type": "string" + } + }, { "name": "orgId", "required": true, @@ -3224,6 +4637,33 @@ "operationId": "OrganizationsWebhooksController_createOrganizationWebhook", "summary": "Create a webhook", "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "For non-platform customers - value must be `Bearer ` where `` is api key prefixed with cal_", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-secret-key", + "in": "header", + "description": "For platform customers - OAuth client secret key", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-client-id", + "in": "header", + "description": "For platform customers - OAuth client ID", + "required": false, + "schema": { + "type": "string" + } + }, { "name": "orgId", "required": true, @@ -3263,6 +4703,33 @@ "operationId": "OrganizationsWebhooksController_getOrganizationWebhook", "summary": "Get a webhook", "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "For non-platform customers - value must be `Bearer ` where `` is api key prefixed with cal_", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-secret-key", + "in": "header", + "description": "For platform customers - OAuth client secret key", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-client-id", + "in": "header", + "description": "For platform customers - OAuth client ID", + "required": false, + "schema": { + "type": "string" + } + }, { "name": "webhookId", "required": true, @@ -3290,6 +4757,33 @@ "operationId": "OrganizationsWebhooksController_deleteWebhook", "summary": "Delete a webhook", "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "For non-platform customers - value must be `Bearer ` where `` is api key prefixed with cal_", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-secret-key", + "in": "header", + "description": "For platform customers - OAuth client secret key", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-client-id", + "in": "header", + "description": "For platform customers - OAuth client ID", + "required": false, + "schema": { + "type": "string" + } + }, { "name": "webhookId", "required": true, @@ -3317,6 +4811,33 @@ "operationId": "OrganizationsWebhooksController_updateOrgWebhook", "summary": "Update a webhook", "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "For non-platform customers - value must be `Bearer ` where `` is api key prefixed with cal_", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-secret-key", + "in": "header", + "description": "For platform customers - OAuth client secret key", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-client-id", + "in": "header", + "description": "For platform customers - OAuth client ID", + "required": false, + "schema": { + "type": "string" + } + }, { "name": "webhookId", "required": true, @@ -3360,7 +4881,7 @@ { "name": "Authorization", "in": "header", - "description": "Bearer ", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_", "required": true, "schema": { "type": "string" @@ -3659,7 +5180,7 @@ { "name": "Authorization", "in": "header", - "description": "value must be `Bearer ` where `` either managed user access token or api key prefixed with cal_", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_ or managed user access token", "required": true, "schema": { "type": "string" @@ -3840,7 +5361,7 @@ "/v2/bookings/{bookingUid}/mark-absent": { "post": { "operationId": "BookingsController_2024_08_13_markNoShow", - "summary": "Mark a booking absence", + "summary": "Mark a booking absence - provided authorization header refers to owner of the booking.", "parameters": [ { "name": "cal-api-version", @@ -3863,7 +5384,7 @@ { "name": "Authorization", "in": "header", - "description": "value must be `Bearer ` where `` either managed user access token or api key prefixed with cal_", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_ or managed user access token", "required": true, "schema": { "type": "string" @@ -3898,7 +5419,7 @@ "/v2/bookings/{bookingUid}/reassign": { "post": { "operationId": "BookingsController_2024_08_13_reassignBooking", - "summary": "Automatically reassign booking to a new host", + "summary": "Automatically reassign booking to a new host automatically - provided authorization header refers to person who reassigned the booking.", "parameters": [ { "name": "cal-api-version", @@ -3921,7 +5442,7 @@ { "name": "Authorization", "in": "header", - "description": "value must be `Bearer ` where `` either managed user access token or api key prefixed with cal_", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_ or managed user access token", "required": true, "schema": { "type": "string" @@ -3946,7 +5467,7 @@ "/v2/bookings/{bookingUid}/reassign/{userId}": { "post": { "operationId": "BookingsController_2024_08_13_reassignBookingToUser", - "summary": "Reassign a booking to a specific user", + "summary": "Reassign a booking to a specific user specified by the :userId - provided authorization header refers to person who reassigned the booking.", "parameters": [ { "name": "cal-api-version", @@ -3977,7 +5498,7 @@ { "name": "Authorization", "in": "header", - "description": "value must be `Bearer ` where `` either managed user access token or api key prefixed with cal_", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_ or managed user access token", "required": true, "schema": { "type": "string" @@ -4012,7 +5533,7 @@ "/v2/bookings/{bookingUid}/confirm": { "post": { "operationId": "BookingsController_2024_08_13_confirmBooking", - "summary": "Confirm booking that requires a confirmation", + "summary": "Confirm booking that requires a confirmation - provided authorization header refers to owner of the booking.", "parameters": [ { "name": "cal-api-version", @@ -4035,7 +5556,7 @@ { "name": "Authorization", "in": "header", - "description": "value must be `Bearer ` where `` either managed user access token or api key prefixed with cal_", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_ or managed user access token", "required": true, "schema": { "type": "string" @@ -4060,7 +5581,7 @@ "/v2/bookings/{bookingUid}/decline": { "post": { "operationId": "BookingsController_2024_08_13_declineBooking", - "summary": "Decline booking that requires a confirmation", + "summary": "Decline booking that requires a confirmation - provided authorization header refers to owner of the booking.", "parameters": [ { "name": "cal-api-version", @@ -4083,7 +5604,7 @@ { "name": "Authorization", "in": "header", - "description": "value must be `Bearer ` where `` either managed user access token or api key prefixed with cal_", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_ or managed user access token", "required": true, "schema": { "type": "string" @@ -4138,6 +5659,15 @@ "schema": { "type": "string" } + }, + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_ or managed user access token", + "required": true, + "schema": { + "type": "string" + } } ], "responses": { @@ -4159,7 +5689,17 @@ "post": { "operationId": "CalendarsController_createIcsFeed", "summary": "Save an ICS feed", - "parameters": [], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_ or managed user access token", + "required": true, + "schema": { + "type": "string" + } + } + ], "requestBody": { "required": true, "content": { @@ -4189,7 +5729,17 @@ "get": { "operationId": "CalendarsController_checkIcsFeed", "summary": "Check an ICS feed", - "parameters": [], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_ or managed user access token", + "required": true, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "", @@ -4256,6 +5806,15 @@ "schema": { "type": "string" } + }, + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_ or managed user access token", + "required": true, + "schema": { + "type": "string" + } } ], "responses": { @@ -4277,7 +5836,17 @@ "get": { "operationId": "CalendarsController_getCalendars", "summary": "Get all calendars", - "parameters": [], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_ or managed user access token", + "required": true, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "", @@ -4302,6 +5871,7 @@ "name": "Authorization", "required": true, "in": "header", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_ or managed user access token", "schema": { "type": "string" } @@ -4392,6 +5962,15 @@ "enum": ["apple"], "type": "string" } + }, + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_ or managed user access token", + "required": true, + "schema": { + "type": "string" + } } ], "responses": { @@ -4415,6 +5994,15 @@ "enum": ["apple", "google", "office365"], "type": "string" } + }, + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_ or managed user access token", + "required": true, + "schema": { + "type": "string" + } } ], "responses": { @@ -4445,6 +6033,15 @@ "enum": ["apple", "google", "office365"], "type": "string" } + }, + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_ or managed user access token", + "required": true, + "schema": { + "type": "string" + } } ], "requestBody": { @@ -4486,6 +6083,15 @@ "enum": ["google-meet"], "type": "string" } + }, + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_ or managed user access token", + "required": true, + "schema": { + "type": "string" + } } ], "responses": { @@ -4512,6 +6118,7 @@ "name": "Authorization", "required": true, "in": "header", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_ or managed user access token", "schema": { "type": "string" } @@ -4602,7 +6209,17 @@ "get": { "operationId": "ConferencingController_listInstalledConferencingApps", "summary": "List your conferencing applications", - "parameters": [], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_ or managed user access token", + "required": true, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "", @@ -4632,6 +6249,15 @@ "enum": ["google-meet", "zoom", "msteams", "daily-video"], "type": "string" } + }, + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_ or managed user access token", + "required": true, + "schema": { + "type": "string" + } } ], "responses": { @@ -4653,7 +6279,17 @@ "get": { "operationId": "ConferencingController_getDefault", "summary": "Get your default conferencing application", - "parameters": [], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_ or managed user access token", + "required": true, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "", @@ -4683,6 +6319,15 @@ "enum": ["google-meet", "zoom", "msteams"], "type": "string" } + }, + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_ or managed user access token", + "required": true, + "schema": { + "type": "string" + } } ], "responses": { @@ -4704,7 +6349,17 @@ "put": { "operationId": "DestinationCalendarsController_updateDestinationCalendars", "summary": "Update destination calendars", - "parameters": [], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_ or managed user access token", + "required": true, + "schema": { + "type": "string" + } + } + ], "requestBody": { "required": true, "content": { @@ -4748,7 +6403,7 @@ { "name": "Authorization", "in": "header", - "description": "value must be `Bearer ` where `` either managed user access token or api key prefixed with cal_", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_ or managed user access token", "required": true, "schema": { "type": "string" @@ -4880,7 +6535,7 @@ { "name": "Authorization", "in": "header", - "description": "value must be `Bearer ` where `` either managed user access token or api key prefixed with cal_", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_ or managed user access token", "required": true, "schema": { "type": "string" @@ -4926,7 +6581,7 @@ { "name": "Authorization", "in": "header", - "description": "value must be `Bearer ` where `` either managed user access token or api key prefixed with cal_", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_ or managed user access token", "required": true, "schema": { "type": "string" @@ -4982,7 +6637,7 @@ { "name": "Authorization", "in": "header", - "description": "value must be `Bearer ` where `` either managed user access token or api key prefixed with cal_", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_ or managed user access token", "required": true, "schema": { "type": "string" @@ -5009,6 +6664,15 @@ "operationId": "EventTypeWebhooksController_createEventTypeWebhook", "summary": "Create a webhook", "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_ or managed user access token", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "eventTypeId", "required": true, @@ -5046,6 +6710,15 @@ "operationId": "EventTypeWebhooksController_getEventTypeWebhooks", "summary": "Get all webhooks", "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_ or managed user access token", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "eventTypeId", "required": true, @@ -5093,6 +6766,15 @@ "operationId": "EventTypeWebhooksController_deleteAllEventTypeWebhooks", "summary": "Delete all webhooks", "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_ or managed user access token", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "eventTypeId", "required": true, @@ -5122,6 +6804,15 @@ "operationId": "EventTypeWebhooksController_updateEventTypeWebhook", "summary": "Update a webhook", "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_ or managed user access token", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "webhookId", "required": true, @@ -5158,7 +6849,17 @@ "get": { "operationId": "EventTypeWebhooksController_getEventTypeWebhook", "summary": "Get a webhook", - "parameters": [], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_ or managed user access token", + "required": true, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "", @@ -5176,7 +6877,17 @@ "delete": { "operationId": "EventTypeWebhooksController_deleteEventTypeWebhook", "summary": "Delete a webhook", - "parameters": [], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_ or managed user access token", + "required": true, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "", @@ -5196,7 +6907,17 @@ "get": { "operationId": "MeController_getMe", "summary": "Get my profile", - "parameters": [], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_ or managed user access token", + "required": true, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "", @@ -5214,7 +6935,17 @@ "patch": { "operationId": "MeController_updateMe", "summary": "Update my profile", - "parameters": [], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_ or managed user access token", + "required": true, + "schema": { + "type": "string" + } + } + ], "requestBody": { "required": true, "content": { @@ -5243,7 +6974,18 @@ "/v2/oauth-clients": { "post": { "operationId": "OAuthClientsController_createOAuthClient", - "parameters": [], + "summary": "Create an OAuth client", + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_", + "required": true, + "schema": { + "type": "string" + } + } + ], "requestBody": { "required": true, "content": { @@ -5270,7 +7012,18 @@ }, "get": { "operationId": "OAuthClientsController_getOAuthClients", - "parameters": [], + "summary": "Get all OAuth clients", + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_", + "required": true, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "", @@ -5289,7 +7042,17 @@ "/v2/oauth-clients/{clientId}": { "get": { "operationId": "OAuthClientsController_getOAuthClientById", + "summary": "Get an OAuth client", "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "clientId", "required": true, @@ -5315,7 +7078,17 @@ }, "patch": { "operationId": "OAuthClientsController_updateOAuthClient", + "summary": "Update an OAuth client", "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "clientId", "required": true, @@ -5351,7 +7124,17 @@ }, "delete": { "operationId": "OAuthClientsController_deleteOAuthClient", + "summary": "Delete an OAuth client", "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "clientId", "required": true, @@ -5376,54 +7159,6 @@ "tags": ["OAuth Clients"] } }, - "/v2/oauth-clients/{clientId}/managed-users": { - "get": { - "operationId": "OAuthClientsController_getOAuthClientManagedUsersById", - "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" - } - }, - { - "name": "offset", - "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/GetManagedUsersOutput" - } - } - } - } - }, - "tags": ["OAuth Clients"] - } - }, "/v2/schedules": { "post": { "operationId": "SchedulesController_2024_06_11_createSchedule", @@ -5433,7 +7168,7 @@ { "name": "Authorization", "in": "header", - "description": "value must be `Bearer ` where `` either managed user access token or api key prefixed with cal_", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_ or managed user access token", "required": true, "schema": { "type": "string" @@ -5482,7 +7217,7 @@ { "name": "Authorization", "in": "header", - "description": "value must be `Bearer ` where `` either managed user access token or api key prefixed with cal_", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_ or managed user access token", "required": true, "schema": { "type": "string" @@ -5523,7 +7258,7 @@ { "name": "Authorization", "in": "header", - "description": "value must be `Bearer ` where `` either managed user access token or api key prefixed with cal_", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_ or managed user access token", "required": true, "schema": { "type": "string" @@ -5563,7 +7298,7 @@ { "name": "Authorization", "in": "header", - "description": "value must be `Bearer ` where `` either managed user access token or api key prefixed with cal_", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_ or managed user access token", "required": true, "schema": { "type": "string" @@ -5609,7 +7344,7 @@ { "name": "Authorization", "in": "header", - "description": "value must be `Bearer ` where `` either managed user access token or api key prefixed with cal_", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_ or managed user access token", "required": true, "schema": { "type": "string" @@ -5665,7 +7400,7 @@ { "name": "Authorization", "in": "header", - "description": "value must be `Bearer ` where `` either managed user access token or api key prefixed with cal_", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_ or managed user access token", "required": true, "schema": { "type": "string" @@ -5709,7 +7444,17 @@ "post": { "operationId": "SelectedCalendarsController_addSelectedCalendar", "summary": "Add a selected calendar", - "parameters": [], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_ or managed user access token", + "required": true, + "schema": { + "type": "string" + } + } + ], "requestBody": { "required": true, "content": { @@ -5738,6 +7483,15 @@ "operationId": "SelectedCalendarsController_deleteSelectedCalendar", "summary": "Delete a selected calendar", "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_ or managed user access token", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "integration", "required": true, @@ -5969,7 +7723,7 @@ "post": { "operationId": "SlotsController_2024_09_04_reserveSlot", "summary": "Reserve a slot", - "description": "Make a slot not available for others to book for a certain period of time.", + "description": "Make a slot not available for others to book for a certain period of time. If you authenticate using oAuth credentials, api key or access token\n then you can also specify custom duration for how long the slot should be reserved for (defaults to 5 minutes).", "parameters": [ { "name": "cal-api-version", @@ -5980,6 +7734,24 @@ "type": "string", "default": "2024-09-04" } + }, + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_ or managed user access token", + "required": false, + "schema": { + "type": "string" + } + }, + { + "name": "x-cal-client-id", + "in": "header", + "description": "For platform customers - OAuth client ID", + "required": false, + "schema": { + "type": "string" + } } ], "requestBody": { @@ -6141,6 +7913,7 @@ "name": "Authorization", "required": true, "in": "header", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_ or managed user access token", "schema": { "type": "string" } @@ -6202,7 +7975,17 @@ "get": { "operationId": "StripeController_check", "summary": "Check stripe connection", - "parameters": [], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_ or managed user access token", + "required": true, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "", @@ -6230,6 +8013,15 @@ "schema": { "type": "string" } + }, + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_ or managed user access token", + "required": true, + "schema": { + "type": "string" + } } ], "responses": { @@ -6251,7 +8043,17 @@ "post": { "operationId": "TeamsController_createTeam", "summary": "Create a team", - "parameters": [], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_", + "required": true, + "schema": { + "type": "string" + } + } + ], "requestBody": { "required": true, "content": { @@ -6279,7 +8081,17 @@ "get": { "operationId": "TeamsController_getTeams", "summary": "Get teams", - "parameters": [], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_", + "required": true, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "", @@ -6300,6 +8112,15 @@ "operationId": "TeamsController_getTeam", "summary": "Get a team", "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "teamId", "required": true, @@ -6327,6 +8148,15 @@ "operationId": "TeamsController_updateTeam", "summary": "Update a team", "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "teamId", "required": true, @@ -6364,6 +8194,15 @@ "operationId": "TeamsController_deleteTeam", "summary": "Delete a team", "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "teamId", "required": true, @@ -6400,6 +8239,15 @@ "schema": { "type": "number" } + }, + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_", + "required": true, + "schema": { + "type": "string" + } } ], "requestBody": { @@ -6492,6 +8340,15 @@ "schema": { "type": "number" } + }, + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_", + "required": true, + "schema": { + "type": "string" + } } ], "responses": { @@ -6527,6 +8384,15 @@ "schema": { "type": "number" } + }, + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_", + "required": true, + "schema": { + "type": "string" + } } ], "requestBody": { @@ -6572,6 +8438,15 @@ "schema": { "type": "number" } + }, + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_", + "required": true, + "schema": { + "type": "string" + } } ], "responses": { @@ -6609,6 +8484,15 @@ "schema": { "type": "number" } + }, + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_", + "required": true, + "schema": { + "type": "string" + } } ], "requestBody": { @@ -6641,6 +8525,15 @@ "operationId": "TeamsMembershipsController_createTeamMembership", "summary": "Create a membership", "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "teamId", "required": true, @@ -6678,6 +8571,15 @@ "operationId": "TeamsMembershipsController_getTeamMemberships", "summary": "Get all memberships", "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "teamId", "required": true, @@ -6727,6 +8629,15 @@ "operationId": "TeamsMembershipsController_getTeamMembership", "summary": "Get a membership", "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "teamId", "required": true, @@ -6762,6 +8673,15 @@ "operationId": "TeamsMembershipsController_updateTeamMembership", "summary": "Create a membership", "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "teamId", "required": true, @@ -6807,6 +8727,15 @@ "operationId": "TeamsMembershipsController_deleteTeamMembership", "summary": "Delete a membership", "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "teamId", "required": true, @@ -6839,31 +8768,21 @@ "tags": ["Teams / Memberships"] } }, - "/v2/timezones": { - "get": { - "operationId": "TimezonesController_getTimeZones", - "summary": "Get all timezones", - "parameters": [], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "object" - } - } - } - } - }, - "tags": ["Timezones"] - } - }, "/v2/webhooks": { "post": { "operationId": "WebhooksController_createWebhook", "summary": "Create a webhook", - "parameters": [], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_", + "required": true, + "schema": { + "type": "string" + } + } + ], "requestBody": { "required": true, "content": { @@ -6893,6 +8812,15 @@ "summary": "Get all webooks", "description": "Gets a paginated list of webhooks for the authenticated user.", "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "take", "required": false, @@ -6934,6 +8862,15 @@ "operationId": "WebhooksController_updateWebhook", "summary": "Update a webhook", "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "webhookId", "required": true, @@ -6970,7 +8907,17 @@ "get": { "operationId": "WebhooksController_getWebhook", "summary": "Get a webhook", - "parameters": [], + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_", + "required": true, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "", @@ -6989,6 +8936,15 @@ "operationId": "WebhooksController_deleteWebhook", "summary": "Delete a webhook", "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "webhookId", "required": true, @@ -14635,46 +16591,6 @@ }, "required": ["status", "data"] }, - "ProviderVerifyClientData": { - "type": "object", - "properties": { - "clientId": { - "type": "string" - }, - "organizationId": { - "type": "number" - }, - "name": { - "type": "string" - } - }, - "required": ["clientId", "organizationId", "name"] - }, - "ProviderVerifyClientOutput": { - "type": "object", - "properties": { - "status": { - "type": "string", - "example": "success", - "enum": ["success", "error"] - }, - "data": { - "$ref": "#/components/schemas/ProviderVerifyClientData" - } - }, - "required": ["status", "data"] - }, - "ProviderVerifyAccessTokenOutput": { - "type": "object", - "properties": { - "status": { - "type": "string", - "example": "success", - "enum": ["success", "error"] - } - }, - "required": ["status"] - }, "MeOrgOutput": { "type": "object", "properties": {