diff --git a/apps/api/v2/src/ee/event-types/event-types_2024_04_15/controllers/event-types.controller.ts b/apps/api/v2/src/ee/event-types/event-types_2024_04_15/controllers/event-types.controller.ts index 9b5ba327c0ea7c..e08562a65f9c96 100644 --- a/apps/api/v2/src/ee/event-types/event-types_2024_04_15/controllers/event-types.controller.ts +++ b/apps/api/v2/src/ee/event-types/event-types_2024_04_15/controllers/event-types.controller.ts @@ -36,7 +36,7 @@ import { InternalServerErrorException, ParseIntPipe, } from "@nestjs/common"; -import { ApiTags as DocsTags } from "@nestjs/swagger"; +import { ApiExcludeController as DocsExcludeController } from "@nestjs/swagger"; import { EVENT_TYPE_READ, EVENT_TYPE_WRITE, SUCCESS_STATUS } from "@calcom/platform-constants"; import { getPublicEvent, getEventTypesByViewer } from "@calcom/platform-libraries-0.0.2"; @@ -47,7 +47,7 @@ import { PrismaClient } from "@calcom/prisma"; version: [VERSION_2024_04_15, VERSION_2024_06_11], }) @UseGuards(PermissionsGuard) -@DocsTags("Event types") +@DocsExcludeController(true) export class EventTypesController_2024_04_15 { constructor( private readonly eventTypesService: EventTypesService_2024_04_15, 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 01c048c6f03df7..f6f69ff52a1dcc 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 @@ -24,7 +24,7 @@ import { Delete, Query, } from "@nestjs/common"; -import { ApiTags as DocsTags } from "@nestjs/swagger"; +import { ApiHeader, ApiTags as DocsTags } from "@nestjs/swagger"; import { EVENT_TYPE_READ, EVENT_TYPE_WRITE, SUCCESS_STATUS } from "@calcom/platform-constants"; import { @@ -39,12 +39,23 @@ import { }) @UseGuards(PermissionsGuard) @DocsTags("Event types") +@ApiHeader({ + name: "cal-api-version", + description: `Must be set to \`2024-06-14\``, + required: true, +}) export class EventTypesController_2024_06_14 { constructor(private readonly eventTypesService: EventTypesService_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, + }) async createEventType( @Body() body: CreateEventTypeInput_2024_06_14, @GetUser() user: UserWithProfile @@ -60,6 +71,12 @@ 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, + }) async getEventTypeById( @Param("eventTypeId") eventTypeId: string, @GetUser() user: UserWithProfile @@ -91,6 +108,12 @@ 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, + }) @HttpCode(HttpStatus.OK) async updateEventType( @Param("eventTypeId") eventTypeId: number, @@ -108,6 +131,12 @@ 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, + }) async deleteEventType( @Param("eventTypeId") eventTypeId: number, @GetUser("id") userId: number diff --git a/apps/api/v2/src/ee/schedules/schedules_2024_04_15/controllers/schedules.controller.ts b/apps/api/v2/src/ee/schedules/schedules_2024_04_15/controllers/schedules.controller.ts index ad6d31c06a0af6..54a6d7034b275b 100644 --- a/apps/api/v2/src/ee/schedules/schedules_2024_04_15/controllers/schedules.controller.ts +++ b/apps/api/v2/src/ee/schedules/schedules_2024_04_15/controllers/schedules.controller.ts @@ -23,7 +23,7 @@ import { Patch, UseGuards, } from "@nestjs/common"; -import { ApiResponse, ApiTags as DocsTags } from "@nestjs/swagger"; +import { ApiResponse, ApiExcludeController as DocsExcludeController } from "@nestjs/swagger"; import { Throttle } from "@nestjs/throttler"; import { SCHEDULE_READ, SCHEDULE_WRITE, SUCCESS_STATUS } from "@calcom/platform-constants"; @@ -36,7 +36,7 @@ import { CreateScheduleInput_2024_04_15 } from "../inputs/create-schedule.input" version: VERSION_2024_04_15_VALUE, }) @UseGuards(ApiAuthGuard, PermissionsGuard) -@DocsTags("Schedules") +@DocsExcludeController(true) export class SchedulesController_2024_04_15 { constructor(private readonly schedulesService: SchedulesService_2024_04_15) {} 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 bb60283f078c8f..1c11d0fe825a9d 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 @@ -17,7 +17,7 @@ import { Patch, UseGuards, } from "@nestjs/common"; -import { ApiResponse, ApiTags as DocsTags } from "@nestjs/swagger"; +import { ApiHeader, ApiOperation, ApiResponse, ApiTags as DocsTags } from "@nestjs/swagger"; import { Throttle } from "@nestjs/throttler"; import { SCHEDULE_READ, SCHEDULE_WRITE, SUCCESS_STATUS } from "@calcom/platform-constants"; @@ -38,11 +38,38 @@ import { }) @UseGuards(ApiAuthGuard, PermissionsGuard) @DocsTags("Schedules") +@ApiHeader({ + name: "cal-api-version", + description: `Must be set to \`2024-06-11\``, + required: true, +}) +@ApiHeader({ + name: "Authorization", + description: + "value must be `Bearer ` where `` either managed user access token or api key prefixed with cal_", + required: true, +}) export class SchedulesController_2024_06_11 { constructor(private readonly schedulesService: SchedulesService_2024_06_11) {} @Post("/") @Permissions([SCHEDULE_WRITE]) + @ApiOperation({ + summary: "Create a schedule", + description: ` + The point of creating schedules is for event types to be available at specific times. + + First goal of schedules is to have a default schedule. If you are platform customer and created managed users, then it is important to note that each managed user should have a default schedule. + 1. If you passed \`timeZone\` when creating managed user, then the default schedule from Monday to Friday from 9AM to 5PM will be created with that timezone. Managed user can then change the default schedule via \`AvailabilitySettings\` atom. + 2. If you did not, then we assume you want that user has specific schedule right away. You should create default schedule by specifying + \`"isDefault": true\` in the request body. Until the user has a default schedule that user can't be booked or manage his / her schedule via the AvailabilitySettings atom. + + Second goal is to create other schedules that event types can point to, so that when that event is booked availability is not checked against the default schedule but against that specific schedule. + After creating a non default schedule you can update event type to point to that schedule via the PATCH \`event-types/{eventTypeId}\` endpoint. + + When specifying start time and end time for each day use 24 hour format e.g. 08:00, 15:00 etc. + `, + }) async createSchedule( @GetUser() user: UserWithProfile, @Body() bodySchedule: CreateScheduleInput_2024_06_11 @@ -59,7 +86,7 @@ export class SchedulesController_2024_06_11 { @Permissions([SCHEDULE_READ]) @ApiResponse({ status: 200, - description: "Returns the default schedule", + description: "Returns the default schedule of the authenticated user", type: GetDefaultScheduleOutput_2024_06_11, }) async getDefaultSchedule(@GetUser() user: UserWithProfile): Promise { @@ -88,6 +115,9 @@ export class SchedulesController_2024_06_11 { @Get("/") @Permissions([SCHEDULE_READ]) + @ApiOperation({ + description: "Returns all schedules of the authenticated user", + }) async getSchedules(@GetUser() user: UserWithProfile): Promise { const schedules = await this.schedulesService.getUserSchedules(user.id); 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 b81124117b8a9b..b92e22df12f96b 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 @@ -79,7 +79,6 @@ export class OAuthClientUsersController { `Creating user with data: ${JSON.stringify(body, null, 2)} for OAuth Client with ID ${oAuthClientId}` ); const client = await this.oauthRepository.getOAuthClient(oAuthClientId); - console.log("asap createUser client", JSON.stringify(client, null, 2)); const isPlatformManaged = true; const { user, tokens } = await this.oAuthClientUsersService.createOauthClientUser( diff --git a/apps/api/v2/src/modules/users/inputs/create-managed-user.input.ts b/apps/api/v2/src/modules/users/inputs/create-managed-user.input.ts index fdfa6d25f3ca14..2be466e15adfa4 100644 --- a/apps/api/v2/src/modules/users/inputs/create-managed-user.input.ts +++ b/apps/api/v2/src/modules/users/inputs/create-managed-user.input.ts @@ -29,7 +29,11 @@ export class CreateManagedUserInput { @IsTimeZone() @IsOptional() @CapitalizeTimeZone() - @ApiProperty({ example: "America/New_York" }) + @ApiProperty({ + example: "America/New_York", + description: `Timezone is used to create user's default schedule from Monday to Friday from 9AM to 5PM. If it is not passed then user does not have + a default schedule and it must be created manually via the /schedules endpoint. Until the schedule is created, the user can't access availability atom to set his / her availability nor booked.`, + }) timeZone?: string; @IsEnum(Locales) diff --git a/apps/api/v2/swagger/documentation.json b/apps/api/v2/swagger/documentation.json index f9f0083a6096a7..6fd37c188b3c3e 100644 --- a/apps/api/v2/swagger/documentation.json +++ b/apps/api/v2/swagger/documentation.json @@ -597,14 +597,33 @@ }, "/v2/event-types": { "post": { - "operationId": "EventTypesController_2024_04_15_createEventType", - "parameters": [], + "operationId": "EventTypesController_2024_06_14_createEventType", + "parameters": [ + { + "name": "cal-api-version", + "in": "header", + "description": "Must be set to `2024-06-14`", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` either managed user access token or api key prefixed with cal_", + "required": true, + "schema": { + "type": "string" + } + } + ], "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateEventTypeInput_2024_04_15" + "$ref": "#/components/schemas/CreateEventTypeInput_2024_06_14" } } } @@ -615,7 +634,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateEventTypeOutput" + "$ref": "#/components/schemas/CreateEventTypeOutput_2024_06_14" } } } @@ -626,15 +645,52 @@ ] }, "get": { - "operationId": "EventTypesController_2024_04_15_getEventTypes", - "parameters": [], + "operationId": "EventTypesController_2024_06_14_getEventTypes", + "parameters": [ + { + "name": "cal-api-version", + "in": "header", + "description": "Must be set to `2024-06-14`", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "username", + "required": true, + "in": "query", + "description": "The username of the user to get event types for. If only username provided will get all event types.", + "schema": { + "type": "string" + } + }, + { + "name": "eventSlug", + "required": true, + "in": "query", + "description": "Slug of event type to return. Notably, if eventSlug is provided then username must be provided too, because multiple users can have event with same slug.", + "schema": { + "type": "string" + } + }, + { + "name": "usernames", + "required": true, + "in": "query", + "description": "Get dynamic event type for multiple usernames separated by comma. e.g `usernames=alice,bob`", + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GetEventTypesOutput" + "$ref": "#/components/schemas/GetEventTypesOutput_2024_06_14" } } } @@ -647,14 +703,32 @@ }, "/v2/event-types/{eventTypeId}": { "get": { - "operationId": "EventTypesController_2024_04_15_getEventType", + "operationId": "EventTypesController_2024_06_14_getEventTypeById", "parameters": [ + { + "name": "cal-api-version", + "in": "header", + "description": "Must be set to `2024-06-14`", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "eventTypeId", "required": true, "in": "path", "schema": { - "type": "number" + "type": "string" + } + }, + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` either managed user access token or api key prefixed with cal_", + "required": true, + "schema": { + "type": "string" } } ], @@ -664,7 +738,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GetEventTypeOutput" + "$ref": "#/components/schemas/GetEventTypeOutput_2024_06_14" } } } @@ -675,8 +749,17 @@ ] }, "patch": { - "operationId": "EventTypesController_2024_04_15_updateEventType", + "operationId": "EventTypesController_2024_06_14_updateEventType", "parameters": [ + { + "name": "cal-api-version", + "in": "header", + "description": "Must be set to `2024-06-14`", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "eventTypeId", "required": true, @@ -684,6 +767,15 @@ "schema": { "type": "number" } + }, + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` either managed user access token or api key prefixed with cal_", + "required": true, + "schema": { + "type": "string" + } } ], "requestBody": { @@ -691,7 +783,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpdateEventTypeInput_2024_04_15" + "$ref": "#/components/schemas/UpdateEventTypeInput_2024_06_14" } } } @@ -702,7 +794,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpdateEventTypeOutput" + "$ref": "#/components/schemas/UpdateEventTypeOutput_2024_06_14" } } } @@ -713,8 +805,17 @@ ] }, "delete": { - "operationId": "EventTypesController_2024_04_15_deleteEventType", + "operationId": "EventTypesController_2024_06_14_deleteEventType", "parameters": [ + { + "name": "cal-api-version", + "in": "header", + "description": "Must be set to `2024-06-14`", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "eventTypeId", "required": true, @@ -722,6 +823,15 @@ "schema": { "type": "number" } + }, + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` either managed user access token or api key prefixed with cal_", + "required": true, + "schema": { + "type": "string" + } } ], "responses": { @@ -730,7 +840,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DeleteEventTypeOutput" + "$ref": "#/components/schemas/DeleteEventTypeOutput_2024_06_14" } } } @@ -816,91 +926,6 @@ ] } }, - "/v2/event-types/{username}/{eventSlug}/public": { - "get": { - "operationId": "EventTypesController_2024_04_15_getPublicEventType", - "parameters": [ - { - "name": "username", - "required": true, - "in": "path", - "schema": { - "type": "string" - } - }, - { - "name": "eventSlug", - "required": true, - "in": "path", - "schema": { - "type": "string" - } - }, - { - "name": "isTeamEvent", - "required": false, - "in": "query", - "schema": { - "type": "boolean" - } - }, - { - "name": "org", - "required": false, - "in": "query", - "schema": { - "nullable": true, - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetEventTypePublicOutput" - } - } - } - } - }, - "tags": [ - "Event types" - ] - } - }, - "/v2/event-types/{username}/public": { - "get": { - "operationId": "EventTypesController_2024_04_15_getPublicEventTypes", - "parameters": [ - { - "name": "username", - "required": true, - "in": "path", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetEventTypesPublicOutput" - } - } - } - } - }, - "tags": [ - "Event types" - ] - } - }, "/v2/organizations/{orgId}/teams": { "get": { "operationId": "OrganizationsTeamsController_getAllTeams", @@ -1843,6 +1868,15 @@ "schema": { "type": "number" } + }, + { + "name": "eventSlug", + "required": true, + "in": "query", + "description": "Slug of team event type to return.", + "schema": { + "type": "string" + } } ], "responses": { @@ -3005,14 +3039,35 @@ }, "/v2/schedules": { "post": { - "operationId": "SchedulesController_2024_04_15_createSchedule", - "parameters": [], + "operationId": "SchedulesController_2024_06_11_createSchedule", + "summary": "Create a schedule", + "description": "\n The point of creating schedules is for event types to be available at specific times.\n\n First goal of schedules is to have a default schedule. If you are platform customer and created managed users, then it is important to note that each managed user should have a default schedule.\n 1. If you passed `timeZone` when creating managed user, then the default schedule from Monday to Friday from 9AM to 5PM will be created with that timezone. Managed user can then change the default schedule via `AvailabilitySettings` atom.\n 2. If you did not, then we assume you want that user has specific schedule right away. You should create default schedule by specifying\n `\"isDefault\": true` in the request body. Until the user has a default schedule that user can't be booked or manage his / her schedule via the AvailabilitySettings atom.\n\n Second goal is to create other schedules that event types can point to, so that when that event is booked availability is not checked against the default schedule but against that specific schedule.\n After creating a non default schedule you can update event type to point to that schedule via the PATCH `event-types/{eventTypeId}` endpoint.\n\n When specifying start time and end time for each day use 24 hour format e.g. 08:00, 15:00 etc.\n ", + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` either managed user access token or api key prefixed with cal_", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "cal-api-version", + "in": "header", + "description": "Must be set to `2024-06-11`", + "required": true, + "schema": { + "type": "string" + } + } + ], "requestBody": { "required": true, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateScheduleInput_2024_04_15" + "$ref": "#/components/schemas/CreateScheduleInput_2024_06_11" } } } @@ -3023,7 +3078,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/CreateScheduleOutput_2024_04_15" + "$ref": "#/components/schemas/CreateScheduleOutput_2024_06_11" } } } @@ -3034,15 +3089,36 @@ ] }, "get": { - "operationId": "SchedulesController_2024_04_15_getSchedules", - "parameters": [], + "operationId": "SchedulesController_2024_06_11_getSchedules", + "summary": "", + "description": "Returns all schedules of the authenticated user", + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` either managed user access token or api key prefixed with cal_", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "cal-api-version", + "in": "header", + "description": "Must be set to `2024-06-11`", + "required": true, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { "description": "", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GetSchedulesOutput_2024_04_15" + "$ref": "#/components/schemas/GetSchedulesOutput_2024_06_11" } } } @@ -3055,15 +3131,34 @@ }, "/v2/schedules/default": { "get": { - "operationId": "SchedulesController_2024_04_15_getDefaultSchedule", - "parameters": [], + "operationId": "SchedulesController_2024_06_11_getDefaultSchedule", + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` either managed user access token or api key prefixed with cal_", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "cal-api-version", + "in": "header", + "description": "Must be set to `2024-06-11`", + "required": true, + "schema": { + "type": "string" + } + } + ], "responses": { "200": { - "description": "Returns the default schedule", + "description": "Returns the default schedule of the authenticated user", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GetDefaultScheduleOutput_2024_04_15" + "$ref": "#/components/schemas/GetDefaultScheduleOutput_2024_06_11" } } } @@ -3076,8 +3171,26 @@ }, "/v2/schedules/{scheduleId}": { "get": { - "operationId": "SchedulesController_2024_04_15_getSchedule", + "operationId": "SchedulesController_2024_06_11_getSchedule", "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` either managed user access token or api key prefixed with cal_", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "cal-api-version", + "in": "header", + "description": "Must be set to `2024-06-11`", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "scheduleId", "required": true, @@ -3093,7 +3206,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GetScheduleOutput_2024_04_15" + "$ref": "#/components/schemas/GetScheduleOutput_2024_06_11" } } } @@ -3104,10 +3217,28 @@ ] }, "patch": { - "operationId": "SchedulesController_2024_04_15_updateSchedule", + "operationId": "SchedulesController_2024_06_11_updateSchedule", "parameters": [ { - "name": "scheduleId", + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` either managed user access token or api key prefixed with cal_", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "cal-api-version", + "in": "header", + "description": "Must be set to `2024-06-11`", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "scheduleId", "required": true, "in": "path", "schema": { @@ -3120,7 +3251,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpdateScheduleInput_2024_04_15" + "$ref": "#/components/schemas/UpdateScheduleInput_2024_06_11" } } } @@ -3131,7 +3262,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/UpdateScheduleOutput_2024_04_15" + "$ref": "#/components/schemas/UpdateScheduleOutput_2024_06_11" } } } @@ -3142,8 +3273,26 @@ ] }, "delete": { - "operationId": "SchedulesController_2024_04_15_deleteSchedule", + "operationId": "SchedulesController_2024_06_11_deleteSchedule", "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` either managed user access token or api key prefixed with cal_", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "cal-api-version", + "in": "header", + "description": "Must be set to `2024-06-11`", + "required": true, + "schema": { + "type": "string" + } + }, { "name": "scheduleId", "required": true, @@ -3159,7 +3308,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/DeleteScheduleOutput_2024_04_15" + "$ref": "#/components/schemas/DeleteScheduleOutput_2024_06_11" } } } @@ -4779,7 +4928,8 @@ }, "timeZone": { "type": "string", - "example": "America/New_York" + "example": "America/New_York", + "description": "Timezone is used to create user's default schedule from Monday to Friday from 9AM to 5PM. If it is not passed then user does not have\n a default schedule and it must be created manually via the /schedules endpoint. Until the schedule is created, the user can't access availability atom to set his / her availability nor booked." }, "locale": { "enum": [ @@ -5236,1631 +5386,1911 @@ "refreshToken" ] }, - "CreateEventTypeInput_2024_06_14": { + "AddressLocation_2024_06_14": { "type": "object", "properties": { - "lengthInMinutes": { - "type": "number", - "example": 60 - }, - "title": { + "type": { "type": "string", - "example": "Learn the secrets of masterchief!" + "example": "address", + "description": "only allowed value for type is `address`" }, - "description": { + "address": { "type": "string", - "example": "Discover the culinary wonders of the Argentina by making the best flan ever!" - } - }, - "required": [ - "lengthInMinutes", - "title", - "description" - ] - }, - "EventTypeOutput_2024_06_14": { - "type": "object", - "properties": { - "id": { - "type": "number", - "example": 1 + "example": "123 Example St, City, Country" + }, + "public": { + "type": "boolean" } }, "required": [ - "id" + "type", + "address", + "public" ] }, - "CreateEventTypeOutput_2024_06_14": { + "LinkLocation_2024_06_14": { "type": "object", "properties": { - "status": { + "type": { "type": "string", - "enum": [ - "success", - "error" - ], - "example": "success" + "example": "link", + "description": "only allowed value for type is `link`" }, - "data": { - "$ref": "#/components/schemas/EventTypeOutput_2024_06_14" + "link": { + "type": "string", + "example": "https://customvideo.com/join/123456" + }, + "public": { + "type": "boolean" } }, "required": [ - "status", - "data" + "type", + "link", + "public" ] }, - "GetEventTypeOutput_2024_06_14": { + "IntegrationLocation_2024_06_14": { "type": "object", "properties": { - "status": { + "type": { "type": "string", - "enum": [ - "success", - "error" - ], - "example": "success" + "example": "integration", + "description": "only allowed value for type is `integration`" }, - "data": { - "nullable": true, - "allOf": [ - { - "$ref": "#/components/schemas/EventTypeOutput_2024_06_14" - } + "integration": { + "type": "string", + "example": "cal-video", + "enum": [ + "cal-video" ] } }, "required": [ - "status", - "data" + "type", + "integration" ] }, - "GetEventTypesOutput_2024_06_14": { + "PhoneLocation_2024_06_14": { "type": "object", "properties": { - "status": { + "type": { "type": "string", - "enum": [ - "success", - "error" - ], - "example": "success" + "example": "phone", + "description": "only allowed value for type is `phone`" }, - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EventTypeOutput_2024_06_14" - } + "phone": { + "type": "string", + "example": "+37120993151" + }, + "public": { + "type": "boolean" } }, "required": [ - "status", - "data" + "type", + "phone", + "public" ] }, - "UpdateEventTypeInput_2024_06_14": { - "type": "object", - "properties": {} - }, - "UpdateEventTypeOutput_2024_06_14": { + "PhoneFieldInput_2024_06_14": { "type": "object", "properties": { - "status": { + "type": { "type": "string", - "enum": [ - "success", - "error" - ], - "example": "success" + "example": "phone", + "description": "only allowed value for type is `phone`" }, - "data": { - "$ref": "#/components/schemas/EventTypeOutput_2024_06_14" + "slug": { + "type": "string", + "description": "Unique identifier for the field in format `some-slug`. It is used to access response to this booking field during the booking", + "example": "some-slug" + }, + "label": { + "type": "string" + }, + "required": { + "type": "boolean" + }, + "placeholder": { + "type": "string" } }, "required": [ - "status", - "data" + "type", + "slug", + "label", + "required", + "placeholder" ] }, - "DeleteData_2024_06_14": { + "AddressFieldInput_2024_06_14": { "type": "object", "properties": { - "id": { - "type": "number", - "example": 1 + "type": { + "type": "string", + "example": "address", + "description": "only allowed value for type is `address`" }, - "lengthInMinutes": { - "type": "number", - "example": 60 + "slug": { + "type": "string", + "description": "Unique identifier for the field in format `some-slug`. It is used to access response to this booking field during the booking", + "example": "some-slug" }, - "title": { + "label": { "type": "string", - "example": "Learn the secrets of masterchief!" + "example": "Please enter your address" }, - "slug": { - "type": "string" + "required": { + "type": "boolean" + }, + "placeholder": { + "type": "string", + "example": "e.g., 1234 Main St" } }, "required": [ - "id", - "lengthInMinutes", - "title", - "slug" + "type", + "slug", + "label", + "required", + "placeholder" ] }, - "DeleteEventTypeOutput_2024_06_14": { + "TextFieldInput_2024_06_14": { "type": "object", "properties": { - "status": { + "type": { "type": "string", - "enum": [ - "success", - "error" - ], - "example": "success" + "example": "text", + "description": "only allowed value for type is `text`" }, - "data": { - "$ref": "#/components/schemas/DeleteData_2024_06_14" + "slug": { + "type": "string", + "description": "Unique identifier for the field in format `some-slug`. It is used to access response to this booking field during the booking", + "example": "some-slug" + }, + "label": { + "type": "string", + "example": "Please enter your text" + }, + "required": { + "type": "boolean" + }, + "placeholder": { + "type": "string", + "example": "e.g., Enter text here" } }, "required": [ - "status", - "data" + "type", + "slug", + "label", + "required", + "placeholder" ] }, - "SelectedCalendarsInputDto": { + "NumberFieldInput_2024_06_14": { "type": "object", "properties": { - "integration": { - "type": "string" + "type": { + "type": "string", + "example": "number", + "description": "only allowed value for type is `number`" }, - "externalId": { - "type": "string" + "slug": { + "type": "string", + "description": "Unique identifier for the field in format `some-slug`. It is used to access response to this booking field during the booking", + "example": "some-slug" }, - "credentialId": { - "type": "number" + "label": { + "type": "string", + "example": "Please enter a number" + }, + "required": { + "type": "boolean" + }, + "placeholder": { + "type": "string", + "example": "e.g., 100" } }, "required": [ - "integration", - "externalId", - "credentialId" + "type", + "slug", + "label", + "required", + "placeholder" ] }, - "SelectedCalendarOutputDto": { + "TextAreaFieldInput_2024_06_14": { "type": "object", "properties": { - "userId": { - "type": "number" + "type": { + "type": "string", + "example": "textarea", + "description": "only allowed value for type is `textarea`" }, - "integration": { - "type": "string" + "slug": { + "type": "string", + "description": "Unique identifier for the field in format `some-slug`. It is used to access response to this booking field during the booking", + "example": "some-slug" }, - "externalId": { - "type": "string" + "label": { + "type": "string", + "example": "Please enter detailed information" }, - "credentialId": { - "type": "number", - "nullable": true + "required": { + "type": "boolean" + }, + "placeholder": { + "type": "string", + "example": "e.g., Detailed description here..." } }, "required": [ - "userId", - "integration", - "externalId", - "credentialId" + "type", + "slug", + "label", + "required", + "placeholder" ] }, - "SelectedCalendarOutputResponseDto": { + "SelectFieldInput_2024_06_14": { "type": "object", "properties": { - "status": { + "type": { "type": "string", - "example": "success", - "enum": [ - "success", - "error" - ] + "example": "select", + "description": "only allowed value for type is `select`" }, - "data": { - "$ref": "#/components/schemas/SelectedCalendarOutputDto" + "slug": { + "type": "string", + "description": "Unique identifier for the field in format `some-slug`. It is used to access response to this booking field during the booking", + "example": "some-slug" + }, + "label": { + "type": "string", + "example": "Please select an option" + }, + "required": { + "type": "boolean" + }, + "placeholder": { + "type": "string", + "example": "Select..." + }, + "options": { + "example": [ + "Option 1", + "Option 2" + ], + "type": "array", + "items": { + "type": "string" + } } }, "required": [ - "status", - "data" + "type", + "slug", + "label", + "required", + "placeholder", + "options" ] }, - "EventTypeLocation_2024_04_15": { + "MultiSelectFieldInput_2024_06_14": { "type": "object", "properties": { "type": { "type": "string", - "example": "link" + "example": "multiselect", + "description": "only allowed value for type is `multiselect`" }, - "link": { + "slug": { + "type": "string", + "description": "Unique identifier for the field in format `some-slug`. It is used to access response to this booking field during the booking", + "example": "some-slug" + }, + "label": { "type": "string", - "example": "https://masterchief.com/argentina/flan/video/9129412" + "example": "Please select multiple options" + }, + "required": { + "type": "boolean" + }, + "options": { + "example": [ + "Option 1", + "Option 2" + ], + "type": "array", + "items": { + "type": "string" + } } }, "required": [ - "type" + "type", + "slug", + "label", + "required", + "options" ] }, - "CreateEventTypeInput_2024_04_15": { + "MultiEmailFieldInput_2024_06_14": { "type": "object", "properties": { - "length": { - "type": "number", - "minimum": 1, - "example": 60 - }, - "slug": { + "type": { "type": "string", - "example": "cooking-class" + "example": "multiemail", + "description": "only allowed value for type is `multiemail`" }, - "title": { + "slug": { "type": "string", - "example": "Learn the secrets of masterchief!" + "description": "Unique identifier for the field in format `some-slug`. It is used to access response to this booking field during the booking", + "example": "some-slug" }, - "description": { + "label": { "type": "string", - "example": "Discover the culinary wonders of the Argentina by making the best flan ever!" - }, - "locations": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EventTypeLocation_2024_04_15" - } + "example": "Please enter multiple emails" }, - "disableGuests": { + "required": { "type": "boolean" }, - "slotInterval": { - "type": "number", - "minimum": 0 - }, - "minimumBookingNotice": { - "type": "number", - "minimum": 0 - }, - "beforeEventBuffer": { - "type": "number", - "minimum": 0 - }, - "afterEventBuffer": { - "type": "number", - "minimum": 0 + "placeholder": { + "type": "string", + "example": "e.g., example@example.com" } }, "required": [ - "length", + "type", "slug", - "title" + "label", + "required", + "placeholder" ] }, - "EventTypeOutput": { + "CheckboxGroupFieldInput_2024_06_14": { "type": "object", "properties": { - "id": { - "type": "number", - "example": 1 - }, - "length": { - "type": "number", - "example": 60 + "type": { + "type": "string", + "example": "checkbox", + "description": "only allowed value for type is `checkbox`" }, "slug": { "type": "string", - "example": "cooking-class" + "description": "Unique identifier for the field in format `some-slug`. It is used to access response to this booking field during the booking", + "example": "some-slug" }, - "title": { + "label": { "type": "string", - "example": "Learn the secrets of masterchief!" + "example": "Select all that apply" }, - "description": { - "type": "string", - "nullable": true, - "example": "Discover the culinary wonders of the Argentina by making the best flan ever!" + "required": { + "type": "boolean" }, - "locations": { - "nullable": true, + "options": { + "example": [ + "Checkbox 1", + "Checkbox 2" + ], "type": "array", "items": { - "$ref": "#/components/schemas/EventTypeLocation_2024_04_15" + "type": "string" } } }, "required": [ - "id", - "length", + "type", "slug", - "title", - "description", - "locations" + "label", + "required", + "options" ] }, - "CreateEventTypeOutput": { + "RadioGroupFieldInput_2024_06_14": { "type": "object", "properties": { - "status": { + "type": { "type": "string", - "example": "success", - "enum": [ - "success", - "error" - ] + "example": "radio", + "description": "only allowed value for type is `radio`" }, - "data": { - "$ref": "#/components/schemas/EventTypeOutput" + "slug": { + "type": "string", + "description": "Unique identifier for the field in format `some-slug`. It is used to access response to this booking field during the booking", + "example": "some-slug" + }, + "label": { + "type": "string", + "example": "Select one option" + }, + "required": { + "type": "boolean" + }, + "options": { + "example": [ + "Radio 1", + "Radio 2" + ], + "type": "array", + "items": { + "type": "string" + } } }, "required": [ - "status", - "data" + "type", + "slug", + "label", + "required", + "options" ] }, - "Data": { + "BooleanFieldInput_2024_06_14": { "type": "object", "properties": { - "eventType": { - "$ref": "#/components/schemas/EventTypeOutput" + "type": { + "type": "string", + "example": "boolean", + "description": "only allowed value for type is `boolean`" + }, + "slug": { + "type": "string", + "description": "Unique identifier for the field in format `some-slug`. It is used to access response to this booking field during the booking", + "example": "some-slug" + }, + "label": { + "type": "string", + "example": "Agree to terms?" + }, + "required": { + "type": "boolean" } }, "required": [ - "eventType" + "type", + "slug", + "label", + "required" ] }, - "GetEventTypeOutput": { + "BusinessDaysWindow_2024_06_14": { "type": "object", "properties": { - "status": { + "type": { "type": "string", - "example": "success", "enum": [ - "success", - "error" - ] + "businessDays", + "calendarDays", + "range" + ], + "description": "Whether the window should be business days, calendar days or a range of dates" }, - "data": { - "$ref": "#/components/schemas/Data" + "value": { + "type": "number", + "example": 5, + "description": "How many business day into the future can this event be booked" + }, + "rolling": { + "type": "boolean", + "example": true, + "description": "If true, the window will be rolling aka from the moment that someone is trying to book this event. Otherwise it will be specified amount of days from the current date." } }, "required": [ - "status", - "data" + "type", + "value", + "rolling" ] }, - "EventTypeGroup": { + "CalendarDaysWindow_2024_06_14": { "type": "object", "properties": { - "eventTypes": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EventTypeOutput" - } + "type": { + "type": "string", + "enum": [ + "businessDays", + "calendarDays", + "range" + ], + "description": "Whether the window should be business days, calendar days or a range of dates" + }, + "value": { + "type": "number", + "example": 5, + "description": "How many calendar days into the future can this event be booked" + }, + "rolling": { + "type": "boolean", + "example": true, + "description": "If true, the window will be rolling aka from the moment that someone is trying to book this event. Otherwise it will be specified amount of days from the current date." } }, "required": [ - "eventTypes" + "type", + "value", + "rolling" ] }, - "GetEventTypesData": { + "RangeWindow_2024_06_14": { "type": "object", "properties": { - "eventTypeGroups": { + "type": { + "type": "string", + "enum": [ + "businessDays", + "calendarDays", + "range" + ], + "description": "Whether the window should be business days, calendar days or a range of dates" + }, + "value": { + "example": [ + "2030-09-05", + "2030-09-09" + ], + "description": "Date range for when this event can be booked.", "type": "array", "items": { - "$ref": "#/components/schemas/EventTypeGroup" + "type": "string" } } }, "required": [ - "eventTypeGroups" + "type", + "value" ] }, - "GetEventTypesOutput": { + "BookingLimitsCount_2024_06_14": { "type": "object", "properties": { - "status": { - "type": "string", - "example": "success", - "enum": [ - "success", - "error" - ] + "day": { + "type": "number", + "description": "The number of bookings per day", + "example": 1 }, - "data": { - "$ref": "#/components/schemas/GetEventTypesData" + "week": { + "type": "number", + "description": "The number of bookings per week", + "example": 2 + }, + "month": { + "type": "number", + "description": "The number of bookings per month", + "example": 3 + }, + "year": { + "type": "number", + "description": "The number of bookings per year", + "example": 4 } }, "required": [ - "status", - "data" + "day", + "week", + "month", + "year" ] }, - "Location": { + "BookingLimitsDuration_2024_06_14": { "type": "object", "properties": { - "type": { - "type": "string" + "day": { + "type": "number", + "minimum": 15, + "description": "The duration of bookings per day (must be a multiple of 15)", + "example": 60 + }, + "week": { + "type": "number", + "minimum": 15, + "description": "The duration of bookings per week (must be a multiple of 15)", + "example": 120 + }, + "month": { + "type": "number", + "minimum": 15, + "description": "The duration of bookings per month (must be a multiple of 15)", + "example": 180 + }, + "year": { + "type": "number", + "minimum": 15, + "description": "The duration of bookings per year (must be a multiple of 15)", + "example": 240 } - }, - "required": [ - "type" - ] + } }, - "Source": { + "Recurrence_2024_06_14": { "type": "object", "properties": { - "id": { - "type": "string" + "interval": { + "type": "number", + "example": 10, + "description": "Repeats every {count} week | month | year" }, - "type": { - "type": "string" + "occurrences": { + "type": "number", + "example": 10, + "description": "Repeats for a maximum of {count} events" }, - "label": { - "type": "string" + "frequency": { + "type": "string", + "enum": [ + "yearly", + "monthly", + "weekly" + ] } }, "required": [ - "id", - "type", - "label" + "interval", + "occurrences", + "frequency" ] }, - "BookingField": { + "CreateEventTypeInput_2024_06_14": { "type": "object", "properties": { - "name": { - "type": "string" - }, - "type": { - "type": "string" - }, - "defaultLabel": { - "type": "string" - }, - "label": { - "type": "string" - }, - "placeholder": { - "type": "string" - }, - "required": { - "type": "boolean" + "lengthInMinutes": { + "type": "number", + "example": 60 }, - "getOptionsAt": { - "type": "string" + "title": { + "type": "string", + "example": "Learn the secrets of masterchief!" }, - "hideWhenJustOneOption": { - "type": "boolean" + "slug": { + "type": "string", + "example": "learn-the-secrets-of-masterchief" }, - "editable": { - "type": "string" + "description": { + "type": "string", + "example": "Discover the culinary wonders of the Argentina by making the best flan ever!" }, - "sources": { + "locations": { "type": "array", + "description": "Locations where the event will take place. If not provided, cal video link will be used as the location.", "items": { - "$ref": "#/components/schemas/Source" + "oneOf": [ + { + "$ref": "#/components/schemas/AddressLocation_2024_06_14" + }, + { + "$ref": "#/components/schemas/LinkLocation_2024_06_14" + }, + { + "$ref": "#/components/schemas/IntegrationLocation_2024_06_14" + }, + { + "$ref": "#/components/schemas/PhoneLocation_2024_06_14" + } + ] } }, - "disableOnPrefill": { - "type": "boolean" - } - }, - "required": [ - "name", - "type" - ] - }, - "Organization": { - "type": "object", - "properties": { - "id": { - "type": "number" - }, - "slug": { - "type": "string", - "nullable": true - }, - "name": { - "type": "string" + "bookingFields": { + "type": "array", + "description": "Custom fields that can be added to the booking form when the event is booked by someone. By default booking form has name and email field.", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/PhoneFieldInput_2024_06_14" + }, + { + "$ref": "#/components/schemas/AddressFieldInput_2024_06_14" + }, + { + "$ref": "#/components/schemas/TextFieldInput_2024_06_14" + }, + { + "$ref": "#/components/schemas/NumberFieldInput_2024_06_14" + }, + { + "$ref": "#/components/schemas/TextAreaFieldInput_2024_06_14" + }, + { + "$ref": "#/components/schemas/SelectFieldInput_2024_06_14" + }, + { + "$ref": "#/components/schemas/MultiSelectFieldInput_2024_06_14" + }, + { + "$ref": "#/components/schemas/MultiEmailFieldInput_2024_06_14" + }, + { + "$ref": "#/components/schemas/CheckboxGroupFieldInput_2024_06_14" + }, + { + "$ref": "#/components/schemas/RadioGroupFieldInput_2024_06_14" + }, + { + "$ref": "#/components/schemas/BooleanFieldInput_2024_06_14" + } + ] + } }, - "metadata": { - "type": "object" - } - }, - "required": [ - "id", - "name", - "metadata" - ] - }, - "Profile": { - "type": "object", - "properties": { - "username": { - "type": "string", - "nullable": true + "disableGuests": { + "type": "boolean", + "description": "If true, person booking this event't cant add guests via their emails." }, - "id": { + "slotInterval": { "type": "number", - "nullable": true + "description": "Number representing length of each slot when event is booked. By default it equal length of the event type.\n If event length is 60 minutes then we would have slots 9AM, 10AM, 11AM etc. but if it was changed to 30 minutes then\n we would have slots 9AM, 9:30AM, 10AM, 10:30AM etc. as the available times to book the 60 minute event." }, - "userId": { - "type": "number" + "minimumBookingNotice": { + "type": "number", + "description": "Minimum number of minutes before the event that a booking can be made." }, - "uid": { - "type": "string" + "beforeEventBuffer": { + "type": "number", + "description": "Time spaces that can be pre-pended before an event to give more time before it." }, - "name": { - "type": "string" + "afterEventBuffer": { + "type": "number", + "description": "Time spaces that can be appended after an event to give more time after it." }, - "organizationId": { + "scheduleId": { "type": "number", - "nullable": true + "description": "If you want that this event has different schedule than user's default one you can specify it here." }, - "organization": { - "nullable": true, + "bookingLimitsCount": { + "description": "Limit how many times this event can be booked", "allOf": [ { - "$ref": "#/components/schemas/Organization" + "$ref": "#/components/schemas/BookingLimitsCount_2024_06_14" } ] }, - "upId": { - "type": "string" - }, - "image": { - "type": "string" + "onlyShowFirstAvailableSlot": { + "type": "boolean", + "description": "This will limit your availability for this event type to one slot per day, scheduled at the earliest available time." }, - "brandColor": { - "type": "string" + "bookingLimitsDuration": { + "description": "Limit total amount of time that this event can be booked", + "allOf": [ + { + "$ref": "#/components/schemas/BookingLimitsDuration_2024_06_14" + } + ] }, - "darkBrandColor": { - "type": "string" + "bookingWindow": { + "type": "array", + "description": "Limit how far in the future this event can be booked", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/BusinessDaysWindow_2024_06_14" + }, + { + "$ref": "#/components/schemas/CalendarDaysWindow_2024_06_14" + }, + { + "$ref": "#/components/schemas/RangeWindow_2024_06_14" + } + ] + } }, - "theme": { - "type": "string" + "offsetStart": { + "type": "number", + "description": "Offset timeslots shown to bookers by a specified number of minutes" }, - "bookerLayouts": { - "type": "object" + "recurrence": { + "description": "Create a recurring event that can be booked once but will occur multiple times", + "allOf": [ + { + "$ref": "#/components/schemas/Recurrence_2024_06_14" + } + ] } }, "required": [ - "username", - "id", - "organizationId", - "upId" + "lengthInMinutes", + "title", + "slug", + "description", + "locations", + "bookingFields", + "disableGuests", + "slotInterval", + "minimumBookingNotice", + "beforeEventBuffer", + "afterEventBuffer", + "scheduleId", + "bookingLimitsCount", + "onlyShowFirstAvailableSlot", + "bookingLimitsDuration", + "bookingWindow", + "offsetStart", + "recurrence" ] }, - "Owner": { + "EmailDefaultFieldOutput_2024_06_14": { "type": "object", "properties": { - "id": { - "type": "number" - }, - "avatarUrl": { - "type": "string", - "nullable": true - }, - "username": { - "type": "string", - "nullable": true - }, - "name": { - "type": "string", - "nullable": true - }, - "weekStart": { - "type": "string" - }, - "brandColor": { - "type": "string", - "nullable": true - }, - "darkBrandColor": { - "type": "string", - "nullable": true + "isDefault": { + "type": "object", + "default": true, + "description": "This property is always true because it's a default field", + "example": true }, - "theme": { + "slug": { "type": "string", - "nullable": true - }, - "metadata": { - "type": "object" - }, - "defaultScheduleId": { - "type": "number", - "nullable": true + "default": "email" }, - "nonProfileUsername": { + "type": { "type": "string", - "nullable": true + "default": "email" }, - "profile": { - "$ref": "#/components/schemas/Profile" + "required": { + "type": "boolean" } }, "required": [ - "id", - "username", - "name", - "weekStart", - "metadata", - "nonProfileUsername", - "profile" + "isDefault", + "slug", + "type", + "required" ] }, - "Schedule": { + "NameDefaultFieldOutput_2024_06_14": { "type": "object", "properties": { - "id": { - "type": "number" + "isDefault": { + "type": "object", + "default": true, + "description": "This property is always true because it's a default field", + "example": true }, - "timeZone": { + "slug": { "type": "string", - "nullable": true + "default": "name" + }, + "type": { + "type": "string", + "default": "name" + }, + "required": { + "type": "boolean" } }, "required": [ - "id", - "timeZone" + "isDefault", + "slug", + "type", + "required" ] }, - "User": { + "LocationDefaultFieldOutput_2024_06_14": { "type": "object", "properties": { - "username": { - "type": "string", - "nullable": true + "isDefault": { + "type": "object", + "default": true, + "description": "This property is always true because it's a default field", + "example": true }, - "name": { + "slug": { "type": "string", - "nullable": true + "default": "location" }, - "weekStart": { - "type": "string" - }, - "organizationId": { - "type": "number" - }, - "avatarUrl": { + "type": { "type": "string", - "nullable": true - }, - "profile": { - "$ref": "#/components/schemas/Profile" + "default": "radioInput" }, - "bookerUrl": { - "type": "string" + "required": { + "type": "boolean" } }, "required": [ - "username", - "name", - "weekStart", - "profile", - "bookerUrl" + "isDefault", + "slug", + "type", + "required" ] }, - "PublicEventTypeOutput": { + "RescheduleReasonDefaultFieldOutput_2024_06_14": { "type": "object", "properties": { - "id": { - "type": "number" - }, - "title": { - "type": "string" - }, - "description": { - "type": "string" - }, - "eventName": { - "type": "string", - "nullable": true - }, - "slug": { - "type": "string" - }, - "isInstantEvent": { - "type": "boolean" - }, - "aiPhoneCallConfig": { - "type": "object" - }, - "schedulingType": { - "type": "object" - }, - "length": { - "type": "number" - }, - "locations": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Location" - } - }, - "customInputs": { - "type": "array", - "items": { - "type": "object" - } - }, - "disableGuests": { - "type": "boolean" - }, - "metadata": { + "isDefault": { "type": "object", - "nullable": true - }, - "lockTimeZoneToggleOnBookingPage": { - "type": "boolean" - }, - "requiresConfirmation": { - "type": "boolean" - }, - "requiresBookerEmailVerification": { - "type": "boolean" - }, - "recurringEvent": { - "type": "object" - }, - "price": { - "type": "number" - }, - "currency": { - "type": "string" - }, - "seatsPerTimeSlot": { - "type": "number", - "nullable": true - }, - "seatsShowAvailabilityCount": { - "type": "boolean", - "nullable": true - }, - "bookingFields": { - "type": "array", - "items": { - "$ref": "#/components/schemas/BookingField" - } - }, - "team": { - "type": "object" + "default": true, + "description": "This property is always true because it's a default field", + "example": true }, - "successRedirectUrl": { + "slug": { "type": "string", - "nullable": true - }, - "workflows": { - "type": "array", - "items": { - "type": "object" - } - }, - "hosts": { - "type": "array", - "items": { - "type": "object" - } - }, - "owner": { - "nullable": true, - "allOf": [ - { - "$ref": "#/components/schemas/Owner" - } - ] - }, - "schedule": { - "nullable": true, - "allOf": [ - { - "$ref": "#/components/schemas/Schedule" - } - ] - }, - "hidden": { - "type": "boolean" - }, - "assignAllTeamMembers": { - "type": "boolean" - }, - "bookerLayouts": { - "type": "object" - }, - "users": { - "type": "array", - "items": { - "$ref": "#/components/schemas/User" - } + "default": "rescheduleReason" }, - "entity": { - "type": "object" + "type": { + "type": "string", + "default": "textarea" }, - "isDynamic": { + "required": { "type": "boolean" } }, "required": [ - "id", - "title", - "description", + "isDefault", "slug", - "isInstantEvent", - "length", - "locations", - "customInputs", - "disableGuests", - "metadata", - "lockTimeZoneToggleOnBookingPage", - "requiresConfirmation", - "requiresBookerEmailVerification", - "price", - "currency", - "seatsShowAvailabilityCount", - "bookingFields", - "workflows", - "hosts", - "owner", - "schedule", - "hidden", - "assignAllTeamMembers", - "users", - "entity", - "isDynamic" + "type", + "required" ] }, - "GetEventTypePublicOutput": { + "TitleDefaultFieldOutput_2024_06_14": { "type": "object", "properties": { - "status": { + "isDefault": { + "type": "object", + "default": true, + "description": "This property is always true because it's a default field", + "example": true + }, + "slug": { "type": "string", - "example": "success", - "enum": [ - "success", - "error" - ] + "default": "title" }, - "data": { - "nullable": true, - "allOf": [ - { - "$ref": "#/components/schemas/PublicEventTypeOutput" - } - ] + "type": { + "type": "string", + "default": "text" + }, + "required": { + "type": "boolean" } }, "required": [ - "status", - "data" + "isDefault", + "slug", + "type", + "required" ] }, - "PublicEventType": { + "NotesDefaultFieldOutput_2024_06_14": { "type": "object", "properties": { - "id": { - "type": "number", - "example": 1 - }, - "length": { - "type": "number", - "example": 60 + "isDefault": { + "type": "object", + "default": true, + "description": "This property is always true because it's a default field", + "example": true }, "slug": { "type": "string", - "example": "cooking-class" + "default": "notes" }, - "title": { + "type": { "type": "string", - "example": "Learn the secrets of masterchief!" + "default": "textarea" }, - "description": { - "type": "string", - "nullable": true + "required": { + "type": "boolean" } }, "required": [ - "id", - "length", + "isDefault", "slug", - "title" + "type", + "required" ] }, - "GetEventTypesPublicOutput": { + "GuestsDefaultFieldOutput_2024_06_14": { "type": "object", "properties": { - "status": { + "isDefault": { + "type": "object", + "default": true, + "description": "This property is always true because it's a default field", + "example": true + }, + "slug": { "type": "string", - "example": "success", - "enum": [ - "success", - "error" - ] + "default": "guests" }, - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/PublicEventType" - } + "type": { + "type": "string", + "default": "multiemail" + }, + "required": { + "type": "boolean" } }, "required": [ - "status", - "data" + "isDefault", + "slug", + "type", + "required" ] }, - "Option": { + "AddressFieldOutput_2024_06_14": { "type": "object", "properties": { - "value": { - "type": "string" + "type": { + "type": "string", + "enum": [ + "phone", + "address", + "text", + "number", + "textarea", + "select", + "multiselect", + "multiemail", + "checkbox", + "radio", + "boolean" + ], + "example": "address", + "description": "only allowed value for type is `address`" + }, + "slug": { + "type": "string", + "description": "Unique identifier for the field in format `some-slug`. It is used to access response to this booking field during the booking", + "example": "some-slug" }, "label": { - "type": "string" - } - }, - "required": [ - "value", - "label" - ] - }, - "VariantsConfig": { - "type": "object", - "properties": { - "variants": { - "type": "object" + "type": "string", + "example": "Please enter your address" + }, + "required": { + "type": "boolean" + }, + "placeholder": { + "type": "string", + "example": "e.g., 1234 Main St" + }, + "isDefault": { + "type": "object", + "default": false, + "description": "This property is always false because it's not default field but custom field", + "example": false } }, "required": [ - "variants" + "type", + "slug", + "label", + "required", + "isDefault" ] }, - "View": { + "BooleanFieldOutput_2024_06_14": { "type": "object", "properties": { - "id": { - "type": "string" + "type": { + "type": "string", + "enum": [ + "phone", + "address", + "text", + "number", + "textarea", + "select", + "multiselect", + "multiemail", + "checkbox", + "radio", + "boolean" + ], + "example": "boolean", + "description": "only allowed value for type is `boolean`" + }, + "slug": { + "type": "string", + "description": "Unique identifier for the field in format `some-slug`. It is used to access response to this booking field during the booking", + "example": "some-slug" }, "label": { - "type": "string" + "type": "string", + "example": "Agree to terms?" }, - "description": { - "type": "string" + "required": { + "type": "boolean" + }, + "isDefault": { + "type": "object", + "default": false, + "description": "This property is always false because it's not default field but custom field", + "example": false } }, "required": [ - "id", - "label" + "type", + "slug", + "label", + "required", + "isDefault" ] }, - "BookingField_2024_04_15": { + "CheckboxGroupFieldOutput_2024_06_14": { "type": "object", "properties": { "type": { "type": "string", "enum": [ - "number", - "boolean", + "phone", "address", - "name", "text", + "number", "textarea", - "email", - "phone", - "multiemail", "select", "multiselect", + "multiemail", "checkbox", "radio", - "radioInput" - ] - }, - "name": { - "type": "string" + "boolean" + ], + "example": "checkbox", + "description": "only allowed value for type is `checkbox`" }, - "options": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Option" - } + "slug": { + "type": "string", + "description": "Unique identifier for the field in format `some-slug`. It is used to access response to this booking field during the booking", + "example": "some-slug" }, "label": { - "type": "string" - }, - "labelAsSafeHtml": { - "type": "string" - }, - "defaultLabel": { - "type": "string" - }, - "placeholder": { - "type": "string" + "type": "string", + "example": "Select all that apply" }, "required": { "type": "boolean" }, - "getOptionsAt": { - "type": "string" - }, - "optionsInputs": { - "type": "object" - }, - "variant": { - "type": "string" - }, - "variantsConfig": { - "$ref": "#/components/schemas/VariantsConfig" - }, - "views": { + "options": { + "example": [ + "Checkbox 1", + "Checkbox 2" + ], "type": "array", "items": { - "$ref": "#/components/schemas/View" + "type": "string" } }, - "hideWhenJustOneOption": { - "type": "boolean" - }, - "hidden": { - "type": "boolean" - }, - "editable": { + "isDefault": { + "type": "object", + "default": false, + "description": "This property is always false because it's not default field but custom field", + "example": false + } + }, + "required": [ + "type", + "slug", + "label", + "required", + "options", + "isDefault" + ] + }, + "MultiEmailFieldOutput_2024_06_14": { + "type": "object", + "properties": { + "type": { "type": "string", "enum": [ - "system", - "system-but-optional", - "system-but-hidden", - "user", - "user-readonly" - ] + "phone", + "address", + "text", + "number", + "textarea", + "select", + "multiselect", + "multiemail", + "checkbox", + "radio", + "boolean" + ], + "example": "multiemail", + "description": "only allowed value for type is `multiemail`" }, - "sources": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Source" - } + "slug": { + "type": "string", + "description": "Unique identifier for the field in format `some-slug`. It is used to access response to this booking field during the booking", + "example": "some-slug" + }, + "label": { + "type": "string", + "example": "Please enter multiple emails" }, - "disableOnPrefill": { + "required": { "type": "boolean" + }, + "placeholder": { + "type": "string", + "example": "e.g., example@example.com" + }, + "isDefault": { + "type": "object", + "default": false, + "description": "This property is always false because it's not default field but custom field", + "example": false } }, "required": [ "type", - "name" + "slug", + "label", + "required", + "isDefault" ] }, - "UpdateEventTypeInput_2024_04_15": { + "MultiSelectFieldOutput_2024_06_14": { "type": "object", "properties": { - "length": { - "type": "number", - "minimum": 1 + "type": { + "type": "string", + "enum": [ + "phone", + "address", + "text", + "number", + "textarea", + "select", + "multiselect", + "multiemail", + "checkbox", + "radio", + "boolean" + ], + "example": "multiselect", + "description": "only allowed value for type is `multiselect`" }, "slug": { - "type": "string" - }, - "title": { - "type": "string" + "type": "string", + "description": "Unique identifier for the field in format `some-slug`. It is used to access response to this booking field during the booking", + "example": "some-slug" }, - "description": { - "type": "string" + "label": { + "type": "string", + "example": "Please select multiple options" }, - "hidden": { + "required": { "type": "boolean" }, - "locations": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EventTypeLocation_2024_04_15" - } - }, - "bookingFields": { + "options": { + "example": [ + "Option 1", + "Option 2" + ], "type": "array", "items": { - "$ref": "#/components/schemas/BookingField_2024_04_15" + "type": "string" } }, - "disableGuests": { - "type": "boolean" - }, - "minimumBookingNotice": { - "type": "number", - "minimum": 0 - }, - "beforeEventBuffer": { - "type": "number", - "minimum": 0 - }, - "afterEventBuffer": { - "type": "number", - "minimum": 0 - }, - "slotInterval": { - "type": "number", - "minimum": 0 - } - } - }, - "UpdateEventTypeOutput": { - "type": "object", - "properties": { - "status": { - "type": "string", - "example": "success", - "enum": [ - "success", - "error" - ] - }, - "data": { - "$ref": "#/components/schemas/EventTypeOutput" + "isDefault": { + "type": "object", + "default": false, + "description": "This property is always false because it's not default field but custom field", + "example": false } }, "required": [ - "status", - "data" + "type", + "slug", + "label", + "required", + "options", + "isDefault" ] }, - "DeleteData": { + "NumberFieldOutput_2024_06_14": { "type": "object", "properties": { - "id": { - "type": "number", - "example": 1 - }, - "length": { - "type": "number", - "example": 60 + "type": { + "type": "string", + "enum": [ + "phone", + "address", + "text", + "number", + "textarea", + "select", + "multiselect", + "multiemail", + "checkbox", + "radio", + "boolean" + ], + "example": "number", + "description": "only allowed value for type is `number`" }, "slug": { "type": "string", - "example": "cooking-class" + "description": "Unique identifier for the field in format `some-slug`. It is used to access response to this booking field during the booking", + "example": "some-slug" }, - "title": { + "label": { "type": "string", - "example": "Learn the secrets of masterchief!" + "example": "Please enter a number" + }, + "required": { + "type": "boolean" + }, + "placeholder": { + "type": "string", + "example": "e.g., 100" + }, + "isDefault": { + "type": "object", + "default": false, + "description": "This property is always false because it's not default field but custom field", + "example": false } }, "required": [ - "id", - "length", + "type", "slug", - "title" + "label", + "required", + "isDefault" ] }, - "DeleteEventTypeOutput": { + "PhoneFieldOutput_2024_06_14": { "type": "object", "properties": { - "status": { + "type": { "type": "string", - "example": "success", "enum": [ - "success", - "error" - ] - }, - "data": { - "$ref": "#/components/schemas/DeleteData" - } - }, - "required": [ - "status", - "data" - ] - }, - "OrgTeamOutputDto": { - "type": "object", - "properties": { - "id": { - "type": "number" - }, - "parentId": { - "type": "number" - }, - "name": { - "type": "string", - "minLength": 1 + "phone", + "address", + "text", + "number", + "textarea", + "select", + "multiselect", + "multiemail", + "checkbox", + "radio", + "boolean" + ], + "example": "phone", + "description": "only allowed value for type is `phone`" }, "slug": { - "type": "string" - }, - "logoUrl": { - "type": "string" - }, - "calVideoLogo": { - "type": "string" - }, - "appLogo": { - "type": "string" - }, - "appIconLogo": { - "type": "string" + "type": "string", + "description": "Unique identifier for the field in format `some-slug`. It is used to access response to this booking field during the booking", + "example": "some-slug" }, - "bio": { + "label": { "type": "string" }, - "hideBranding": { - "type": "boolean" - }, - "isOrganization": { - "type": "boolean" - }, - "isPrivate": { + "required": { "type": "boolean" }, - "hideBookATeamMember": { - "type": "boolean", - "default": false - }, - "metadata": { - "type": "string" - }, - "theme": { - "type": "string" - }, - "brandColor": { - "type": "string" - }, - "darkBrandColor": { - "type": "string" - }, - "bannerUrl": { + "placeholder": { "type": "string" }, - "timeFormat": { - "type": "number" - }, - "timeZone": { - "type": "string", - "default": "Europe/London" - }, - "weekStart": { - "type": "string", - "default": "Sunday" + "isDefault": { + "type": "object", + "default": false, + "description": "This property is always false because it's not default field but custom field", + "example": false } }, "required": [ - "id", - "name" + "type", + "slug", + "label", + "required", + "isDefault" ] }, - "OrgTeamsOutputResponseDto": { + "RadioGroupFieldOutput_2024_06_14": { "type": "object", "properties": { - "status": { + "type": { "type": "string", - "example": "success", "enum": [ - "success", - "error" - ] + "phone", + "address", + "text", + "number", + "textarea", + "select", + "multiselect", + "multiemail", + "checkbox", + "radio", + "boolean" + ], + "example": "radio", + "description": "only allowed value for type is `radio`" }, - "data": { + "slug": { + "type": "string", + "description": "Unique identifier for the field in format `some-slug`. It is used to access response to this booking field during the booking", + "example": "some-slug" + }, + "label": { + "type": "string", + "example": "Select one option" + }, + "required": { + "type": "boolean" + }, + "options": { + "example": [ + "Radio 1", + "Radio 2" + ], "type": "array", "items": { - "$ref": "#/components/schemas/OrgTeamOutputDto" + "type": "string" } + }, + "isDefault": { + "type": "object", + "default": false, + "description": "This property is always false because it's not default field but custom field", + "example": false } }, "required": [ - "status", - "data" + "type", + "slug", + "label", + "required", + "options", + "isDefault" ] }, - "OrgMeTeamsOutputResponseDto": { + "SelectFieldOutput_2024_06_14": { "type": "object", "properties": { - "status": { + "type": { "type": "string", - "example": "success", "enum": [ - "success", - "error" - ] + "phone", + "address", + "text", + "number", + "textarea", + "select", + "multiselect", + "multiemail", + "checkbox", + "radio", + "boolean" + ], + "example": "select", + "description": "only allowed value for type is `select`" }, - "data": { + "slug": { + "type": "string", + "description": "Unique identifier for the field in format `some-slug`. It is used to access response to this booking field during the booking", + "example": "some-slug" + }, + "label": { + "type": "string", + "example": "Please select an option" + }, + "required": { + "type": "boolean" + }, + "placeholder": { + "type": "string", + "example": "Select..." + }, + "options": { + "example": [ + "Option 1", + "Option 2" + ], "type": "array", "items": { - "$ref": "#/components/schemas/OrgTeamOutputDto" + "type": "string" } + }, + "isDefault": { + "type": "object", + "default": false, + "description": "This property is always false because it's not default field but custom field", + "example": false } }, "required": [ - "status", - "data" + "type", + "slug", + "label", + "required", + "options", + "isDefault" ] }, - "OrgTeamOutputResponseDto": { + "TextAreaFieldOutput_2024_06_14": { "type": "object", "properties": { - "status": { + "type": { "type": "string", - "example": "success", "enum": [ - "success", - "error" - ] + "phone", + "address", + "text", + "number", + "textarea", + "select", + "multiselect", + "multiemail", + "checkbox", + "radio", + "boolean" + ], + "example": "textarea", + "description": "only allowed value for type is `textarea`" }, - "data": { - "$ref": "#/components/schemas/OrgTeamOutputDto" + "slug": { + "type": "string", + "description": "Unique identifier for the field in format `some-slug`. It is used to access response to this booking field during the booking", + "example": "some-slug" + }, + "label": { + "type": "string", + "example": "Please enter detailed information" + }, + "required": { + "type": "boolean" + }, + "placeholder": { + "type": "string", + "example": "e.g., Detailed description here..." + }, + "isDefault": { + "type": "object", + "default": false, + "description": "This property is always false because it's not default field but custom field", + "example": false } }, "required": [ - "status", - "data" + "type", + "slug", + "label", + "required", + "isDefault" ] }, - "UpdateOrgTeamDto": { + "TextFieldOutput_2024_06_14": { "type": "object", "properties": { - "name": { + "type": { "type": "string", - "minLength": 1 + "enum": [ + "phone", + "address", + "text", + "number", + "textarea", + "select", + "multiselect", + "multiemail", + "checkbox", + "radio", + "boolean" + ], + "example": "text", + "description": "only allowed value for type is `text`" }, "slug": { - "type": "string" - }, - "logoUrl": { - "type": "string" + "type": "string", + "description": "Unique identifier for the field in format `some-slug`. It is used to access response to this booking field during the booking", + "example": "some-slug" }, - "calVideoLogo": { - "type": "string" + "label": { + "type": "string", + "example": "Please enter your text" }, - "appLogo": { - "type": "string" + "required": { + "type": "boolean" }, - "appIconLogo": { - "type": "string" + "placeholder": { + "type": "string", + "example": "e.g., Enter text here" }, - "bio": { - "type": "string" + "isDefault": { + "type": "object", + "default": false, + "description": "This property is always false because it's not default field but custom field", + "example": false + } + }, + "required": [ + "type", + "slug", + "label", + "required", + "isDefault" + ] + }, + "EventTypeOutput_2024_06_14": { + "type": "object", + "properties": { + "id": { + "type": "number", + "example": 1 }, - "hideBranding": { - "type": "boolean", - "default": false + "lengthInMinutes": { + "type": "number", + "example": 60 }, - "isPrivate": { - "type": "boolean" + "title": { + "type": "string", + "example": "Learn the secrets of masterchief!" }, - "hideBookATeamMember": { - "type": "boolean" + "slug": { + "type": "string", + "example": "learn-the-secrets-of-masterchief" }, - "metadata": { - "type": "string" + "description": { + "type": "string", + "example": "Discover the culinary wonders of the Argentina by making the best flan ever!" }, - "theme": { - "type": "string" + "locations": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/AddressLocation_2024_06_14" + }, + { + "$ref": "#/components/schemas/LinkLocation_2024_06_14" + }, + { + "$ref": "#/components/schemas/IntegrationLocation_2024_06_14" + }, + { + "$ref": "#/components/schemas/PhoneLocation_2024_06_14" + } + ] + } }, - "brandColor": { - "type": "string" + "bookingFields": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/NameDefaultFieldOutput_2024_06_14" + }, + { + "$ref": "#/components/schemas/EmailDefaultFieldOutput_2024_06_14" + }, + { + "$ref": "#/components/schemas/LocationDefaultFieldOutput_2024_06_14" + }, + { + "$ref": "#/components/schemas/RescheduleReasonDefaultFieldOutput_2024_06_14" + }, + { + "$ref": "#/components/schemas/TitleDefaultFieldOutput_2024_06_14" + }, + { + "$ref": "#/components/schemas/NotesDefaultFieldOutput_2024_06_14" + }, + { + "$ref": "#/components/schemas/GuestsDefaultFieldOutput_2024_06_14" + }, + { + "$ref": "#/components/schemas/PhoneFieldOutput_2024_06_14" + }, + { + "$ref": "#/components/schemas/AddressFieldOutput_2024_06_14" + }, + { + "$ref": "#/components/schemas/TextFieldOutput_2024_06_14" + }, + { + "$ref": "#/components/schemas/NumberFieldOutput_2024_06_14" + }, + { + "$ref": "#/components/schemas/TextAreaFieldOutput_2024_06_14" + }, + { + "$ref": "#/components/schemas/SelectFieldOutput_2024_06_14" + }, + { + "$ref": "#/components/schemas/MultiSelectFieldOutput_2024_06_14" + }, + { + "$ref": "#/components/schemas/MultiEmailFieldOutput_2024_06_14" + }, + { + "$ref": "#/components/schemas/CheckboxGroupFieldOutput_2024_06_14" + }, + { + "$ref": "#/components/schemas/RadioGroupFieldOutput_2024_06_14" + }, + { + "$ref": "#/components/schemas/BooleanFieldOutput_2024_06_14" + } + ] + } }, - "darkBrandColor": { - "type": "string" + "disableGuests": { + "type": "boolean" }, - "bannerUrl": { - "type": "string" + "slotInterval": { + "type": "number", + "example": 60 }, - "timeFormat": { - "type": "number" + "minimumBookingNotice": { + "type": "number", + "example": 0 }, - "timeZone": { - "type": "string", - "default": "Europe/London" + "beforeEventBuffer": { + "type": "number", + "example": 0 }, - "weekStart": { - "type": "string", - "default": "Sunday" - } - } - }, - "CreateOrgTeamDto": { - "type": "object", - "properties": { - "name": { - "type": "string", - "minLength": 1 + "afterEventBuffer": { + "type": "number", + "example": 0 }, - "slug": { - "type": "string" + "recurrence": { + "type": "object" }, - "logoUrl": { - "type": "string" + "metadata": { + "type": "object" }, - "calVideoLogo": { - "type": "string" + "requiresConfirmation": { + "type": "boolean" }, - "appLogo": { - "type": "string" + "price": { + "type": "number" }, - "appIconLogo": { + "currency": { "type": "string" }, - "bio": { - "type": "string" + "lockTimeZoneToggleOnBookingPage": { + "type": "boolean" }, - "hideBranding": { - "type": "boolean", - "default": false + "seatsPerTimeSlot": { + "type": "object" }, - "isPrivate": { - "type": "boolean" + "forwardParamsSuccessRedirect": { + "type": "object" }, - "hideBookATeamMember": { - "type": "boolean" + "successRedirectUrl": { + "type": "object" }, - "metadata": { - "type": "string" + "seatsShowAvailabilityCount": { + "type": "object" }, - "theme": { - "type": "string" + "scheduleId": { + "type": "object" }, - "brandColor": { - "type": "string" + "bookingLimitsCount": { + "$ref": "#/components/schemas/BookingLimitsCount_2024_06_14" }, - "darkBrandColor": { - "type": "string" + "onlyShowFirstAvailableSlot": { + "type": "boolean" }, - "bannerUrl": { - "type": "string" + "bookingLimitsDuration": { + "$ref": "#/components/schemas/BookingLimitsDuration_2024_06_14" }, - "timeFormat": { - "type": "number" + "bookingWindow": { + "type": "array", + "description": "Limit how far in the future this event can be booked", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/BusinessDaysWindow_2024_06_14" + }, + { + "$ref": "#/components/schemas/CalendarDaysWindow_2024_06_14" + }, + { + "$ref": "#/components/schemas/RangeWindow_2024_06_14" + } + ] + } }, - "timeZone": { - "type": "string", - "default": "Europe/London" + "offsetStart": { + "type": "number" }, - "weekStart": { - "type": "string", - "default": "Sunday" + "ownerId": { + "type": "number", + "example": 10 }, - "autoAcceptCreator": { - "type": "boolean", - "default": true + "users": { + "type": "array", + "items": { + "type": "string" + } } }, "required": [ - "name" + "id", + "lengthInMinutes", + "title", + "slug", + "description", + "locations", + "bookingFields", + "disableGuests", + "slotInterval", + "minimumBookingNotice", + "beforeEventBuffer", + "afterEventBuffer", + "recurrence", + "metadata", + "requiresConfirmation", + "price", + "currency", + "lockTimeZoneToggleOnBookingPage", + "seatsPerTimeSlot", + "forwardParamsSuccessRedirect", + "successRedirectUrl", + "seatsShowAvailabilityCount", + "scheduleId", + "bookingLimitsCount", + "onlyShowFirstAvailableSlot", + "bookingLimitsDuration", + "bookingWindow", + "offsetStart", + "ownerId", + "users" ] }, - "ScheduleAvailabilityInput_2024_06_11": { + "CreateEventTypeOutput_2024_06_14": { "type": "object", "properties": { - "days": { - "example": [ - "Monday", - "Tuesday" - ], - "type": "array", - "items": { - "type": "object" - } - }, - "startTime": { + "status": { "type": "string", - "pattern": "TIME_FORMAT_HH_MM", - "example": "09:00" + "enum": [ + "success", + "error" + ], + "example": "success" }, - "endTime": { - "type": "string", - "pattern": "TIME_FORMAT_HH_MM", - "example": "10:00" + "data": { + "$ref": "#/components/schemas/EventTypeOutput_2024_06_14" } }, "required": [ - "days", - "startTime", - "endTime" + "status", + "data" ] }, - "ScheduleOverrideInput_2024_06_11": { + "GetEventTypeOutput_2024_06_14": { "type": "object", "properties": { - "date": { + "status": { "type": "string", - "example": "2024-05-20" + "enum": [ + "success", + "error" + ], + "example": "success" }, - "startTime": { - "type": "string", - "pattern": "TIME_FORMAT_HH_MM", - "example": "12:00" - }, - "endTime": { - "type": "string", - "pattern": "TIME_FORMAT_HH_MM", - "example": "13:00" - } - }, - "required": [ - "date", - "startTime", - "endTime" - ] - }, - "ScheduleOutput_2024_06_11": { - "type": "object", - "properties": { - "id": { - "type": "number", - "example": 254 - }, - "ownerId": { - "type": "number", - "example": 478 - }, - "name": { - "type": "string", - "example": "One-on-one coaching" - }, - "timeZone": { - "type": "string", - "example": "Europe/Rome" - }, - "availability": { - "example": [ - { - "days": [ - "Monday", - "Tuesday" - ], - "startTime": "09:00", - "endTime": "10:00" - } - ], - "type": "array", - "items": { - "$ref": "#/components/schemas/ScheduleAvailabilityInput_2024_06_11" - } - }, - "isDefault": { - "type": "boolean", - "example": true - }, - "overrides": { - "example": [ + "data": { + "nullable": true, + "allOf": [ { - "date": "2024-05-20", - "startTime": "12:00", - "endTime": "13:00" + "$ref": "#/components/schemas/EventTypeOutput_2024_06_14" } - ], - "type": "array", - "items": { - "$ref": "#/components/schemas/ScheduleOverrideInput_2024_06_11" - } + ] } }, "required": [ - "id", - "ownerId", - "name", - "timeZone", - "availability", - "isDefault", - "overrides" + "status", + "data" ] }, - "GetSchedulesOutput_2024_06_11": { + "GetEventTypesOutput_2024_06_14": { "type": "object", "properties": { "status": { "type": "string", - "example": "success", "enum": [ "success", "error" - ] + ], + "example": "success" }, "data": { "type": "array", "items": { - "$ref": "#/components/schemas/ScheduleOutput_2024_06_11" + "$ref": "#/components/schemas/EventTypeOutput_2024_06_14" } - }, - "error": { - "type": "object" } }, "required": [ @@ -6868,70 +7298,194 @@ "data" ] }, - "CreateScheduleInput_2024_06_11": { + "UpdateEventTypeInput_2024_06_14": { "type": "object", "properties": { - "name": { + "lengthInMinutes": { + "type": "number", + "example": 60 + }, + "title": { "type": "string", - "example": "One-on-one coaching" + "example": "Learn the secrets of masterchief!" }, - "timeZone": { + "slug": { "type": "string", - "example": "Europe/Rome" + "example": "learn-the-secrets-of-masterchief" }, - "availability": { - "example": [ - { - "days": [ - "Monday", - "Tuesday" - ], - "startTime": "09:00", - "endTime": "10:00" - } - ], + "description": { + "type": "string", + "example": "Discover the culinary wonders of the Argentina by making the best flan ever!" + }, + "locations": { "type": "array", + "description": "Locations where the event will take place. If not provided, cal video link will be used as the location.", "items": { - "$ref": "#/components/schemas/ScheduleAvailabilityInput_2024_06_11" + "oneOf": [ + { + "$ref": "#/components/schemas/AddressLocation_2024_06_14" + }, + { + "$ref": "#/components/schemas/LinkLocation_2024_06_14" + }, + { + "$ref": "#/components/schemas/IntegrationLocation_2024_06_14" + }, + { + "$ref": "#/components/schemas/PhoneLocation_2024_06_14" + } + ] } }, - "isDefault": { + "bookingFields": { + "type": "array", + "description": "Custom fields that can be added to the booking form when the event is booked by someone. By default booking form has name and email field.", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/PhoneFieldInput_2024_06_14" + }, + { + "$ref": "#/components/schemas/AddressFieldInput_2024_06_14" + }, + { + "$ref": "#/components/schemas/TextFieldInput_2024_06_14" + }, + { + "$ref": "#/components/schemas/NumberFieldInput_2024_06_14" + }, + { + "$ref": "#/components/schemas/TextAreaFieldInput_2024_06_14" + }, + { + "$ref": "#/components/schemas/SelectFieldInput_2024_06_14" + }, + { + "$ref": "#/components/schemas/MultiSelectFieldInput_2024_06_14" + }, + { + "$ref": "#/components/schemas/MultiEmailFieldInput_2024_06_14" + }, + { + "$ref": "#/components/schemas/CheckboxGroupFieldInput_2024_06_14" + }, + { + "$ref": "#/components/schemas/RadioGroupFieldInput_2024_06_14" + }, + { + "$ref": "#/components/schemas/BooleanFieldInput_2024_06_14" + } + ] + } + }, + "disableGuests": { "type": "boolean", - "example": true + "description": "If true, person booking this event't cant add guests via their emails." }, - "overrides": { - "example": [ + "slotInterval": { + "type": "number", + "description": "Number representing length of each slot when event is booked. By default it equal length of the event type.\n If event length is 60 minutes then we would have slots 9AM, 10AM, 11AM etc. but if it was changed to 30 minutes then\n we would have slots 9AM, 9:30AM, 10AM, 10:30AM etc. as the available times to book the 60 minute event." + }, + "minimumBookingNotice": { + "type": "number", + "description": "Minimum number of minutes before the event that a booking can be made." + }, + "beforeEventBuffer": { + "type": "number", + "description": "Time spaces that can be pre-pended before an event to give more time before it." + }, + "afterEventBuffer": { + "type": "number", + "description": "Time spaces that can be appended after an event to give more time after it." + }, + "scheduleId": { + "type": "number", + "description": "If you want that this event has different schedule than user's default one you can specify it here." + }, + "bookingLimitsCount": { + "description": "Limit how many times this event can be booked", + "allOf": [ { - "date": "2024-05-20", - "startTime": "12:00", - "endTime": "14:00" + "$ref": "#/components/schemas/BookingLimitsCount_2024_06_14" } - ], + ] + }, + "onlyShowFirstAvailableSlot": { + "type": "boolean", + "description": "This will limit your availability for this event type to one slot per day, scheduled at the earliest available time." + }, + "bookingLimitsDuration": { + "description": "Limit total amount of time that this event can be booked", + "allOf": [ + { + "$ref": "#/components/schemas/BookingLimitsDuration_2024_06_14" + } + ] + }, + "bookingWindow": { "type": "array", + "description": "Limit how far in the future this event can be booked", "items": { - "$ref": "#/components/schemas/ScheduleOverrideInput_2024_06_11" + "oneOf": [ + { + "$ref": "#/components/schemas/BusinessDaysWindow_2024_06_14" + }, + { + "$ref": "#/components/schemas/CalendarDaysWindow_2024_06_14" + }, + { + "$ref": "#/components/schemas/RangeWindow_2024_06_14" + } + ] } + }, + "offsetStart": { + "type": "number", + "description": "Offset timeslots shown to bookers by a specified number of minutes" + }, + "recurrence": { + "description": "Create a recurring event that can be booked once but will occur multiple times", + "allOf": [ + { + "$ref": "#/components/schemas/Recurrence_2024_06_14" + } + ] } }, "required": [ - "name", - "timeZone", - "isDefault" + "lengthInMinutes", + "title", + "slug", + "description", + "locations", + "bookingFields", + "disableGuests", + "slotInterval", + "minimumBookingNotice", + "beforeEventBuffer", + "afterEventBuffer", + "scheduleId", + "bookingLimitsCount", + "onlyShowFirstAvailableSlot", + "bookingLimitsDuration", + "bookingWindow", + "offsetStart", + "recurrence" ] }, - "CreateScheduleOutput_2024_06_11": { + "UpdateEventTypeOutput_2024_06_14": { "type": "object", "properties": { "status": { "type": "string", - "example": "success", "enum": [ "success", "error" - ] + ], + "example": "success" }, "data": { - "$ref": "#/components/schemas/ScheduleOutput_2024_06_11" + "$ref": "#/components/schemas/EventTypeOutput_2024_06_14" } }, "required": [ @@ -6939,27 +7493,45 @@ "data" ] }, - "GetScheduleOutput_2024_06_11": { + "DeleteData_2024_06_14": { + "type": "object", + "properties": { + "id": { + "type": "number", + "example": 1 + }, + "lengthInMinutes": { + "type": "number", + "example": 60 + }, + "title": { + "type": "string", + "example": "Learn the secrets of masterchief!" + }, + "slug": { + "type": "string" + } + }, + "required": [ + "id", + "lengthInMinutes", + "title", + "slug" + ] + }, + "DeleteEventTypeOutput_2024_06_14": { "type": "object", "properties": { "status": { "type": "string", - "example": "success", "enum": [ "success", "error" - ] + ], + "example": "success" }, "data": { - "nullable": true, - "allOf": [ - { - "$ref": "#/components/schemas/ScheduleOutput_2024_06_11" - } - ] - }, - "error": { - "type": "object" + "$ref": "#/components/schemas/DeleteData_2024_06_14" } }, "required": [ @@ -6967,76 +7539,50 @@ "data" ] }, - "UpdateScheduleInput_2024_06_11": { + "SelectedCalendarsInputDto": { "type": "object", "properties": { - "name": { - "type": "string", - "example": "One-on-one coaching" - }, - "timeZone": { - "type": "string", - "example": "Europe/Rome" - }, - "availability": { - "example": [ - { - "days": [ - "Monday", - "Tuesday" - ], - "startTime": "09:00", - "endTime": "10:00" - } - ], - "type": "array", - "items": { - "$ref": "#/components/schemas/ScheduleAvailabilityInput_2024_06_11" - } + "integration": { + "type": "string" }, - "isDefault": { - "type": "boolean", - "example": true + "externalId": { + "type": "string" }, - "overrides": { - "example": [ - { - "date": "2024-05-20", - "startTime": "12:00", - "endTime": "14:00" - } - ], - "type": "array", - "items": { - "$ref": "#/components/schemas/ScheduleOverrideInput_2024_06_11" - } + "credentialId": { + "type": "number" } - } + }, + "required": [ + "integration", + "externalId", + "credentialId" + ] }, - "UpdateScheduleOutput_2024_06_11": { + "SelectedCalendarOutputDto": { "type": "object", "properties": { - "status": { - "type": "string", - "example": "success", - "enum": [ - "success", - "error" - ] + "userId": { + "type": "number" }, - "data": { - "$ref": "#/components/schemas/ScheduleOutput_2024_06_11" + "integration": { + "type": "string" }, - "error": { - "type": "object" + "externalId": { + "type": "string" + }, + "credentialId": { + "type": "number", + "nullable": true } }, "required": [ - "status", - "data" + "userId", + "integration", + "externalId", + "credentialId" ] }, - "DeleteScheduleOutput_2024_06_11": { + "SelectedCalendarOutputResponseDto": { "type": "object", "properties": { "status": { @@ -7046,148 +7592,93 @@ "success", "error" ] + }, + "data": { + "$ref": "#/components/schemas/SelectedCalendarOutputDto" } }, "required": [ - "status" + "status", + "data" ] }, - "GetUserOutput": { + "OrgTeamOutputDto": { "type": "object", "properties": { "id": { - "type": "number", - "description": "The ID of the user", - "example": 1 + "type": "number" }, - "username": { - "type": "string", - "nullable": true, - "description": "The username of the user", - "example": "john_doe" + "parentId": { + "type": "number" }, "name": { "type": "string", - "nullable": true, - "description": "The name of the user", - "example": "John Doe" + "minLength": 1 }, - "email": { - "type": "string", - "description": "The email of the user", - "example": "john@example.com" + "slug": { + "type": "string" }, - "emailVerified": { - "format": "date-time", - "type": "string", - "nullable": true, - "description": "The date when the email was verified", - "example": "2022-01-01T00:00:00Z" + "logoUrl": { + "type": "string" }, - "bio": { - "type": "string", - "nullable": true, - "description": "The bio of the user", - "example": "I am a software developer" + "calVideoLogo": { + "type": "string" }, - "avatarUrl": { - "type": "string", - "nullable": true, - "description": "The URL of the user's avatar", - "example": "https://example.com/avatar.jpg" + "appLogo": { + "type": "string" }, - "timeZone": { - "type": "string", - "description": "The time zone of the user", - "example": "America/New_York" + "appIconLogo": { + "type": "string" }, - "weekStart": { - "type": "string", - "description": "The week start day of the user", - "example": "Monday" + "bio": { + "type": "string" }, - "appTheme": { - "type": "string", - "nullable": true, - "description": "The app theme of the user", - "example": "light" + "hideBranding": { + "type": "boolean" }, - "theme": { - "type": "string", - "nullable": true, - "description": "The theme of the user", - "example": "default" + "isOrganization": { + "type": "boolean" }, - "defaultScheduleId": { - "type": "number", - "nullable": true, - "description": "The ID of the default schedule for the user", - "example": 1 + "isPrivate": { + "type": "boolean" }, - "locale": { - "type": "string", - "nullable": true, - "description": "The locale of the user", - "example": "en-US" + "hideBookATeamMember": { + "type": "boolean", + "default": false }, - "timeFormat": { - "type": "number", - "nullable": true, - "description": "The time format of the user", - "example": 12 + "metadata": { + "type": "string" }, - "hideBranding": { - "type": "boolean", - "description": "Whether to hide branding for the user", - "example": false + "theme": { + "type": "string" }, "brandColor": { - "type": "string", - "nullable": true, - "description": "The brand color of the user", - "example": "#ffffff" + "type": "string" }, "darkBrandColor": { - "type": "string", - "nullable": true, - "description": "The dark brand color of the user", - "example": "#000000" + "type": "string" }, - "allowDynamicBooking": { - "type": "boolean", - "nullable": true, - "description": "Whether dynamic booking is allowed for the user", - "example": true + "bannerUrl": { + "type": "string" }, - "createdDate": { - "format": "date-time", - "type": "string", - "description": "The date when the user was created", - "example": "2022-01-01T00:00:00Z" + "timeFormat": { + "type": "number" }, - "verified": { - "type": "boolean", - "nullable": true, - "description": "Whether the user is verified", - "example": true + "timeZone": { + "type": "string", + "default": "Europe/London" }, - "invitedTo": { - "type": "number", - "nullable": true, - "description": "The ID of the user who invited this user", - "example": 1 + "weekStart": { + "type": "string", + "default": "Sunday" } }, "required": [ "id", - "email", - "timeZone", - "weekStart", - "hideBranding", - "createdDate" + "name" ] }, - "GetOrganizationUsersOutput": { + "OrgTeamsOutputResponseDto": { "type": "object", "properties": { "status": { @@ -7201,7 +7692,7 @@ "data": { "type": "array", "items": { - "$ref": "#/components/schemas/GetUserOutput" + "$ref": "#/components/schemas/OrgTeamOutputDto" } } }, @@ -7210,95 +7701,30 @@ "data" ] }, - "CreateOrganizationUserInput": { + "OrgMeTeamsOutputResponseDto": { "type": "object", "properties": { - "email": { - "type": "string", - "description": "User email address", - "example": "user@example.com" - }, - "username": { + "status": { "type": "string", - "description": "Username", - "example": "user123" + "example": "success", + "enum": [ + "success", + "error" + ] }, - "weekday": { - "type": "string", - "description": "Preferred weekday", - "example": "Monday" - }, - "brandColor": { - "type": "string", - "description": "Brand color in HEX format", - "example": "#FFFFFF" - }, - "darkBrandColor": { - "type": "string", - "description": "Dark brand color in HEX format", - "example": "#000000" - }, - "hideBranding": { - "type": "boolean", - "description": "Hide branding", - "example": false - }, - "timeZone": { - "type": "string", - "description": "Time zone", - "example": "America/New_York" - }, - "theme": { - "type": "string", - "nullable": true, - "description": "Theme", - "example": "dark" - }, - "appTheme": { - "type": "string", - "nullable": true, - "description": "Application theme", - "example": "light" - }, - "timeFormat": { - "type": "number", - "description": "Time format", - "example": 24 - }, - "defaultScheduleId": { - "type": "number", - "minimum": 0, - "description": "Default schedule ID", - "example": 1 - }, - "locale": { - "type": "string", - "nullable": true, - "default": "en", - "description": "Locale", - "example": "en" - }, - "avatarUrl": { - "type": "string", - "description": "Avatar URL", - "example": "https://example.com/avatar.jpg" - }, - "organizationRole": { - "type": "object", - "default": "MEMBER" - }, - "autoAccept": { - "type": "object", - "default": true + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/OrgTeamOutputDto" + } } }, "required": [ - "email", - "organizationRole", - "autoAccept" + "status", + "data" ] }, - "GetOrganizationUserOutput": { + "OrgTeamOutputResponseDto": { "type": "object", "properties": { "status": { @@ -7310,7 +7736,7 @@ ] }, "data": { - "$ref": "#/components/schemas/GetUserOutput" + "$ref": "#/components/schemas/OrgTeamOutputDto" } }, "required": [ @@ -7318,177 +7744,276 @@ "data" ] }, - "UpdateOrganizationUserInput": { - "type": "object", - "properties": {} - }, - "OrgMembershipOutputDto": { + "UpdateOrgTeamDto": { "type": "object", "properties": { - "role": { + "name": { "type": "string", - "enum": [ - "MEMBER", - "OWNER", - "ADMIN" - ] + "minLength": 1 }, - "id": { - "type": "number" + "slug": { + "type": "string" }, - "userId": { - "type": "number" + "logoUrl": { + "type": "string" }, - "teamId": { - "type": "number" + "calVideoLogo": { + "type": "string" }, - "accepted": { + "appLogo": { + "type": "string" + }, + "appIconLogo": { + "type": "string" + }, + "bio": { + "type": "string" + }, + "hideBranding": { + "type": "boolean", + "default": false + }, + "isPrivate": { "type": "boolean" }, - "disableImpersonation": { + "hideBookATeamMember": { "type": "boolean" - } - }, - "required": [ - "role", - "id", - "userId", - "teamId", - "accepted" - ] - }, - "GetAllOrgMemberships": { - "type": "object", - "properties": { - "status": { + }, + "metadata": { + "type": "string" + }, + "theme": { + "type": "string" + }, + "brandColor": { + "type": "string" + }, + "darkBrandColor": { + "type": "string" + }, + "bannerUrl": { + "type": "string" + }, + "timeFormat": { + "type": "number" + }, + "timeZone": { "type": "string", - "example": "success", - "enum": [ - "success", - "error" - ] + "default": "Europe/London" }, - "data": { - "$ref": "#/components/schemas/OrgMembershipOutputDto" + "weekStart": { + "type": "string", + "default": "Sunday" } - }, - "required": [ - "status", - "data" - ] + } }, - "CreateOrgMembershipDto": { + "CreateOrgTeamDto": { "type": "object", "properties": { - "role": { + "name": { "type": "string", - "default": "MEMBER", - "enum": [ - "MEMBER", - "OWNER", - "ADMIN" - ] + "minLength": 1 }, - "userId": { - "type": "number" + "slug": { + "type": "string" }, - "accepted": { + "logoUrl": { + "type": "string" + }, + "calVideoLogo": { + "type": "string" + }, + "appLogo": { + "type": "string" + }, + "appIconLogo": { + "type": "string" + }, + "bio": { + "type": "string" + }, + "hideBranding": { "type": "boolean", "default": false }, - "disableImpersonation": { + "isPrivate": { + "type": "boolean" + }, + "hideBookATeamMember": { + "type": "boolean" + }, + "metadata": { + "type": "string" + }, + "theme": { + "type": "string" + }, + "brandColor": { + "type": "string" + }, + "darkBrandColor": { + "type": "string" + }, + "bannerUrl": { + "type": "string" + }, + "timeFormat": { + "type": "number" + }, + "timeZone": { + "type": "string", + "default": "Europe/London" + }, + "weekStart": { + "type": "string", + "default": "Sunday" + }, + "autoAcceptCreator": { "type": "boolean", - "default": false + "default": true } }, "required": [ - "role", - "userId" + "name" ] }, - "CreateOrgMembershipOutput": { + "ScheduleAvailabilityInput_2024_06_11": { "type": "object", "properties": { - "status": { + "days": { "type": "string", - "example": "success", "enum": [ - "success", - "error" - ] - }, - "data": { - "$ref": "#/components/schemas/OrgMembershipOutputDto" - } - }, - "required": [ - "status", - "data" - ] - }, - "GetOrgMembership": { - "type": "object", - "properties": { - "status": { + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday", + "Sunday" + ], + "example": [ + "Monday", + "Tuesday" + ], + "description": "Array of days when schedule is active." + }, + "startTime": { "type": "string", - "example": "success", - "enum": [ - "success", - "error" - ] + "pattern": "TIME_FORMAT_HH_MM", + "example": "08:00", + "description": "startTime must be a valid time in format HH:MM e.g. 08:00" }, - "data": { - "$ref": "#/components/schemas/OrgMembershipOutputDto" + "endTime": { + "type": "string", + "pattern": "TIME_FORMAT_HH_MM", + "example": "15:00", + "description": "endTime must be a valid time in format HH:MM e.g. 15:00" } }, "required": [ - "status", - "data" + "days", + "startTime", + "endTime" ] }, - "DeleteOrgMembership": { + "ScheduleOverrideInput_2024_06_11": { "type": "object", "properties": { - "status": { + "date": { "type": "string", - "example": "success", - "enum": [ - "success", - "error" - ] + "example": "2024-05-20" }, - "data": { - "$ref": "#/components/schemas/OrgMembershipOutputDto" + "startTime": { + "type": "string", + "pattern": "TIME_FORMAT_HH_MM", + "example": "12:00", + "description": "startTime must be a valid time in format HH:MM e.g. 12:00" + }, + "endTime": { + "type": "string", + "pattern": "TIME_FORMAT_HH_MM", + "example": "13:00", + "description": "endTime must be a valid time in format HH:MM e.g. 13:00" } }, "required": [ - "status", - "data" + "date", + "startTime", + "endTime" ] }, - "UpdateOrgMembershipDto": { + "ScheduleOutput_2024_06_11": { "type": "object", "properties": { - "role": { + "id": { + "type": "number", + "example": 254 + }, + "ownerId": { + "type": "number", + "example": 478 + }, + "name": { "type": "string", - "default": "MEMBER", - "enum": [ - "MEMBER", - "OWNER", - "ADMIN" - ] + "example": "Catch up hours" }, - "accepted": { - "type": "boolean", - "default": false + "timeZone": { + "type": "string", + "example": "Europe/Rome" }, - "disableImpersonation": { + "availability": { + "example": [ + { + "days": [ + "Monday", + "Tuesday" + ], + "startTime": "17:00", + "endTime": "19:00" + }, + { + "days": [ + "Wednesday", + "Thursday" + ], + "startTime": "16:00", + "endTime": "20:00" + } + ], + "type": "array", + "items": { + "$ref": "#/components/schemas/ScheduleAvailabilityInput_2024_06_11" + } + }, + "isDefault": { "type": "boolean", - "default": false + "example": true + }, + "overrides": { + "example": [ + { + "date": "2024-05-20", + "startTime": "18:00", + "endTime": "21:00" + } + ], + "type": "array", + "items": { + "$ref": "#/components/schemas/ScheduleOverrideInput_2024_06_11" + } } - } + }, + "required": [ + "id", + "ownerId", + "name", + "timeZone", + "availability", + "isDefault", + "overrides" + ] }, - "UpdateOrgMembership": { + "GetSchedulesOutput_2024_06_11": { "type": "object", "properties": { "status": { @@ -7500,7 +8025,13 @@ ] }, "data": { - "$ref": "#/components/schemas/OrgMembershipOutputDto" + "type": "array", + "items": { + "$ref": "#/components/schemas/ScheduleOutput_2024_06_11" + } + }, + "error": { + "type": "object" } }, "required": [ @@ -7508,44 +8039,70 @@ "data" ] }, - "CreateTeamEventTypeInput_2024_06_14": { + "CreateScheduleInput_2024_06_11": { "type": "object", "properties": { - "lengthInMinutes": { - "type": "number", - "example": 60 - }, - "title": { + "name": { "type": "string", - "example": "Learn the secrets of masterchief!" + "example": "Catch up hours" }, - "description": { + "timeZone": { "type": "string", - "example": "Discover the culinary wonders of the Argentina by making the best flan ever!" - }, - "schedulingType": { - "type": "object" + "example": "Europe/Rome", + "description": "Timezone is used to calculate available times when an event using the schedule is booked." }, - "hosts": { + "availability": { + "description": "Each object contains days and times when the user is available. If not passed, the default availability is Monday to Friday from 09:00 to 17:00.", + "example": [ + { + "days": [ + "Monday", + "Tuesday" + ], + "startTime": "17:00", + "endTime": "19:00" + }, + { + "days": [ + "Wednesday", + "Thursday" + ], + "startTime": "16:00", + "endTime": "20:00" + } + ], "type": "array", "items": { - "type": "string" + "$ref": "#/components/schemas/ScheduleAvailabilityInput_2024_06_11" } }, - "assignAllTeamMembers": { - "type": "boolean" + "isDefault": { + "type": "boolean", + "example": true, + "description": "Each user should have 1 default schedule. If you specified `timeZone` when creating managed user, then the default schedule will be created with that timezone.\n Default schedule means that if an event type is not tied to a specific schedule then the default schedule is used." + }, + "overrides": { + "description": "Need to change availability for a specific date? Add an override.", + "example": [ + { + "date": "2024-05-20", + "startTime": "18:00", + "endTime": "21:00" + } + ], + "type": "array", + "items": { + "$ref": "#/components/schemas/ScheduleOverrideInput_2024_06_11" + } } }, "required": [ - "lengthInMinutes", - "title", - "description", - "schedulingType", - "hosts", - "assignAllTeamMembers" + "name", + "timeZone", + "isDefault" ] }, - "CreateTeamEventTypeOutput": { + "CreateScheduleOutput_2024_06_11": { "type": "object", "properties": { "status": { @@ -7557,17 +8114,7 @@ ] }, "data": { - "oneOf": [ - { - "$ref": "#/components/schemas/TeamEventTypeOutput_2024_06_14" - }, - { - "type": "array", - "items": { - "$ref": "#/components/schemas/TeamEventTypeOutput_2024_06_14" - } - } - ] + "$ref": "#/components/schemas/ScheduleOutput_2024_06_11" } }, "required": [ @@ -7575,278 +8122,425 @@ "data" ] }, - "Recurrence_2024_06_14": { + "GetScheduleOutput_2024_06_11": { "type": "object", "properties": { - "interval": { - "type": "number", - "example": 10, - "description": "Repeats every {count} week | month | year" + "status": { + "type": "string", + "example": "success", + "enum": [ + "success", + "error" + ] }, - "occurrences": { - "type": "number", - "example": 10, - "description": "Repeats for a maximum of {count} events" + "data": { + "nullable": true, + "allOf": [ + { + "$ref": "#/components/schemas/ScheduleOutput_2024_06_11" + } + ] }, - "frequency": { - "enum": [ - "yearly", - "monthly", - "weekly" - ], - "type": "string" + "error": { + "type": "object" } }, "required": [ - "interval", - "occurrences", - "frequency" + "status", + "data" ] }, - "TeamEventTypeResponseHost": { + "UpdateScheduleInput_2024_06_11": { "type": "object", "properties": { "name": { - "type": "string" + "type": "string", + "example": "One-on-one coaching" }, - "userId": { - "type": "number" + "timeZone": { + "type": "string", + "example": "Europe/Rome" }, - "mandatory": { + "availability": { + "example": [ + { + "days": [ + "Monday", + "Tuesday" + ], + "startTime": "09:00", + "endTime": "10:00" + } + ], + "type": "array", + "items": { + "$ref": "#/components/schemas/ScheduleAvailabilityInput_2024_06_11" + } + }, + "isDefault": { "type": "boolean", - "default": false + "example": true }, - "priority": { - "type": "object", - "default": "medium" + "overrides": { + "example": [ + { + "date": "2024-05-20", + "startTime": "12:00", + "endTime": "14:00" + } + ], + "type": "array", + "items": { + "$ref": "#/components/schemas/ScheduleOverrideInput_2024_06_11" + } } - }, - "required": [ - "name", - "userId" - ] + } }, - "BookingLimitsCount_2024_06_14": { + "UpdateScheduleOutput_2024_06_11": { "type": "object", "properties": { - "day": { - "type": "number", - "minimum": 1, - "description": "The number of bookings per day", - "example": 1 - }, - "week": { - "type": "number", - "minimum": 1, - "description": "The number of bookings per week", - "example": 2 + "status": { + "type": "string", + "example": "success", + "enum": [ + "success", + "error" + ] }, - "month": { - "type": "number", - "minimum": 1, - "description": "The number of bookings per month", - "example": 3 + "data": { + "$ref": "#/components/schemas/ScheduleOutput_2024_06_11" }, - "year": { - "type": "number", - "minimum": 1, - "description": "The number of bookings per year", - "example": 4 + "error": { + "type": "object" } - } + }, + "required": [ + "status", + "data" + ] }, - "BookingLimitsDuration_2024_06_14": { + "DeleteScheduleOutput_2024_06_11": { "type": "object", "properties": { - "day": { - "type": "number", - "minimum": 15, - "description": "The duration of bookings per day (must be a multiple of 15)", - "example": 60 - }, - "week": { - "type": "number", - "minimum": 15, - "description": "The duration of bookings per week (must be a multiple of 15)", - "example": 120 - }, - "month": { - "type": "number", - "minimum": 15, - "description": "The duration of bookings per month (must be a multiple of 15)", - "example": 180 - }, - "year": { - "type": "number", - "minimum": 15, - "description": "The duration of bookings per year (must be a multiple of 15)", - "example": 240 + "status": { + "type": "string", + "example": "success", + "enum": [ + "success", + "error" + ] } - } + }, + "required": [ + "status" + ] }, - "TeamEventTypeOutput_2024_06_14": { + "GetUserOutput": { "type": "object", "properties": { "id": { "type": "number", + "description": "The ID of the user", "example": 1 }, - "lengthInMinutes": { - "type": "number", - "minimum": 1 + "username": { + "type": "string", + "nullable": true, + "description": "The username of the user", + "example": "john_doe" }, - "title": { - "type": "string" + "name": { + "type": "string", + "nullable": true, + "description": "The name of the user", + "example": "John Doe" }, - "slug": { - "type": "string" + "email": { + "type": "string", + "description": "The email of the user", + "example": "john@example.com" }, - "description": { - "type": "string" + "emailVerified": { + "format": "date-time", + "type": "string", + "nullable": true, + "description": "The date when the email was verified", + "example": "2022-01-01T00:00:00Z" }, - "locations": { - "type": "array", - "items": { - "type": "object" - } + "bio": { + "type": "string", + "nullable": true, + "description": "The bio of the user", + "example": "I am a software developer" }, - "bookingFields": { - "type": "array", - "items": { - "type": "object" - } + "avatarUrl": { + "type": "string", + "nullable": true, + "description": "The URL of the user's avatar", + "example": "https://example.com/avatar.jpg" }, - "disableGuests": { - "type": "boolean" + "timeZone": { + "type": "string", + "description": "The time zone of the user", + "example": "America/New_York" }, - "slotInterval": { + "weekStart": { + "type": "string", + "description": "The week start day of the user", + "example": "Monday" + }, + "appTheme": { + "type": "string", + "nullable": true, + "description": "The app theme of the user", + "example": "light" + }, + "theme": { + "type": "string", + "nullable": true, + "description": "The theme of the user", + "example": "default" + }, + "defaultScheduleId": { "type": "number", - "nullable": true + "nullable": true, + "description": "The ID of the default schedule for the user", + "example": 1 }, - "minimumBookingNotice": { + "locale": { + "type": "string", + "nullable": true, + "description": "The locale of the user", + "example": "en-US" + }, + "timeFormat": { "type": "number", - "minimum": 0 + "nullable": true, + "description": "The time format of the user", + "example": 12 }, - "beforeEventBuffer": { - "type": "number" + "hideBranding": { + "type": "boolean", + "description": "Whether to hide branding for the user", + "example": false }, - "afterEventBuffer": { - "type": "number" + "brandColor": { + "type": "string", + "nullable": true, + "description": "The brand color of the user", + "example": "#ffffff" }, - "schedulingType": { - "type": "object", - "nullable": true + "darkBrandColor": { + "type": "string", + "nullable": true, + "description": "The dark brand color of the user", + "example": "#000000" }, - "recurrence": { + "allowDynamicBooking": { + "type": "boolean", "nullable": true, - "allOf": [ - { - "$ref": "#/components/schemas/Recurrence_2024_06_14" - } - ] + "description": "Whether dynamic booking is allowed for the user", + "example": true }, - "metadata": { - "type": "object" + "createdDate": { + "format": "date-time", + "type": "string", + "description": "The date when the user was created", + "example": "2022-01-01T00:00:00Z" }, - "requiresConfirmation": { - "type": "boolean" + "verified": { + "type": "boolean", + "nullable": true, + "description": "Whether the user is verified", + "example": true }, - "price": { - "type": "number" + "invitedTo": { + "type": "number", + "nullable": true, + "description": "The ID of the user who invited this user", + "example": 1 + } + }, + "required": [ + "id", + "email", + "timeZone", + "weekStart", + "hideBranding", + "createdDate" + ] + }, + "GetOrganizationUsersOutput": { + "type": "object", + "properties": { + "status": { + "type": "string", + "example": "success", + "enum": [ + "success", + "error" + ] }, - "currency": { - "type": "string" + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GetUserOutput" + } + } + }, + "required": [ + "status", + "data" + ] + }, + "CreateOrganizationUserInput": { + "type": "object", + "properties": { + "email": { + "type": "string", + "description": "User email address", + "example": "user@example.com" }, - "lockTimeZoneToggleOnBookingPage": { - "type": "boolean" + "username": { + "type": "string", + "description": "Username", + "example": "user123" }, - "seatsPerTimeSlot": { - "type": "number", - "nullable": true + "weekday": { + "type": "string", + "description": "Preferred weekday", + "example": "Monday" }, - "forwardParamsSuccessRedirect": { - "type": "boolean", - "nullable": true + "brandColor": { + "type": "string", + "description": "Brand color in HEX format", + "example": "#FFFFFF" }, - "successRedirectUrl": { + "darkBrandColor": { "type": "string", - "nullable": true + "description": "Dark brand color in HEX format", + "example": "#000000" }, - "seatsShowAvailabilityCount": { + "hideBranding": { "type": "boolean", - "nullable": true + "description": "Hide branding", + "example": false }, - "isInstantEvent": { - "type": "boolean" + "timeZone": { + "type": "string", + "description": "Time zone", + "example": "America/New_York" }, - "scheduleId": { - "type": "number", - "nullable": true + "theme": { + "type": "string", + "nullable": true, + "description": "Theme", + "example": "dark" }, - "teamId": { - "type": "number", - "nullable": true + "appTheme": { + "type": "string", + "nullable": true, + "description": "Application theme", + "example": "light" }, - "ownerId": { + "timeFormat": { "type": "number", - "nullable": true + "description": "Time format", + "example": 24 }, - "parentEventTypeId": { + "defaultScheduleId": { "type": "number", - "nullable": true + "minimum": 0, + "description": "Default schedule ID", + "example": 1 }, - "hosts": { - "type": "array", - "items": { - "$ref": "#/components/schemas/TeamEventTypeResponseHost" - } + "locale": { + "type": "string", + "nullable": true, + "default": "en", + "description": "Locale", + "example": "en" }, - "assignAllTeamMembers": { - "type": "boolean" + "avatarUrl": { + "type": "string", + "description": "Avatar URL", + "example": "https://example.com/avatar.jpg" + }, + "organizationRole": { + "type": "object", + "default": "MEMBER" + }, + "autoAccept": { + "type": "object", + "default": true + } + }, + "required": [ + "email", + "organizationRole", + "autoAccept" + ] + }, + "GetOrganizationUserOutput": { + "type": "object", + "properties": { + "status": { + "type": "string", + "example": "success", + "enum": [ + "success", + "error" + ] + }, + "data": { + "$ref": "#/components/schemas/GetUserOutput" + } + }, + "required": [ + "status", + "data" + ] + }, + "UpdateOrganizationUserInput": { + "type": "object", + "properties": {} + }, + "OrgMembershipOutputDto": { + "type": "object", + "properties": { + "role": { + "type": "string", + "enum": [ + "MEMBER", + "OWNER", + "ADMIN" + ] }, - "bookingLimitsCount": { - "$ref": "#/components/schemas/BookingLimitsCount_2024_06_14" + "id": { + "type": "number" }, - "onlyShowFirstAvailableSlot": { - "type": "boolean" + "userId": { + "type": "number" }, - "bookingLimitsDuration": { - "$ref": "#/components/schemas/BookingLimitsDuration_2024_06_14" + "teamId": { + "type": "number" }, - "bookingWindow": { - "type": "object" + "accepted": { + "type": "boolean" }, - "offsetStart": { - "type": "number", - "minimum": 1 + "disableImpersonation": { + "type": "boolean" } }, "required": [ + "role", "id", - "lengthInMinutes", - "title", - "slug", - "description", - "locations", - "bookingFields", - "disableGuests", - "schedulingType", - "recurrence", - "metadata", - "requiresConfirmation", - "price", - "currency", - "lockTimeZoneToggleOnBookingPage", - "seatsPerTimeSlot", - "forwardParamsSuccessRedirect", - "successRedirectUrl", - "seatsShowAvailabilityCount", - "isInstantEvent", - "scheduleId", - "hosts" + "userId", + "teamId", + "accepted" ] }, - "GetTeamEventTypeOutput": { + "GetAllOrgMemberships": { "type": "object", "properties": { "status": { @@ -7858,7 +8552,7 @@ ] }, "data": { - "$ref": "#/components/schemas/TeamEventTypeOutput_2024_06_14" + "$ref": "#/components/schemas/OrgMembershipOutputDto" } }, "required": [ @@ -7866,71 +8560,76 @@ "data" ] }, - "CreatePhoneCallInput": { + "CreateOrgMembershipDto": { "type": "object", "properties": { - "yourPhoneNumber": { - "type": "string", - "pattern": "/^\\+[1-9]\\d{1,14}$/", - "description": "Your phone number" - }, - "numberToCall": { - "type": "string", - "pattern": "/^\\+[1-9]\\d{1,14}$/", - "description": "Number to call" - }, - "calApiKey": { + "role": { "type": "string", - "description": "CAL API Key" - }, - "enabled": { - "type": "object", - "default": true, - "description": "Enabled status" - }, - "templateType": { - "default": "CUSTOM_TEMPLATE", + "default": "MEMBER", "enum": [ - "CHECK_IN_APPOINTMENT", - "CUSTOM_TEMPLATE" - ], - "type": "string", - "description": "Template type" - }, - "schedulerName": { - "type": "string", - "description": "Scheduler name" + "MEMBER", + "OWNER", + "ADMIN" + ] }, - "guestName": { - "type": "string", - "description": "Guest name" + "userId": { + "type": "number" }, - "guestEmail": { - "type": "string", - "description": "Guest email" + "accepted": { + "type": "boolean", + "default": false }, - "guestCompany": { + "disableImpersonation": { + "type": "boolean", + "default": false + } + }, + "required": [ + "role", + "userId" + ] + }, + "CreateOrgMembershipOutput": { + "type": "object", + "properties": { + "status": { "type": "string", - "description": "Guest company" + "example": "success", + "enum": [ + "success", + "error" + ] }, - "beginMessage": { + "data": { + "$ref": "#/components/schemas/OrgMembershipOutputDto" + } + }, + "required": [ + "status", + "data" + ] + }, + "GetOrgMembership": { + "type": "object", + "properties": { + "status": { "type": "string", - "description": "Begin message" + "example": "success", + "enum": [ + "success", + "error" + ] }, - "generalPrompt": { - "type": "string", - "description": "General prompt" + "data": { + "$ref": "#/components/schemas/OrgMembershipOutputDto" } }, "required": [ - "yourPhoneNumber", - "numberToCall", - "calApiKey", - "enabled", - "templateType" + "status", + "data" ] }, - "CreatePhoneCallOutput": { + "DeleteOrgMembership": { "type": "object", "properties": { "status": { @@ -7942,7 +8641,7 @@ ] }, "data": { - "$ref": "#/components/schemas/Data" + "$ref": "#/components/schemas/OrgMembershipOutputDto" } }, "required": [ @@ -7950,7 +8649,29 @@ "data" ] }, - "GetTeamEventTypesOutput": { + "UpdateOrgMembershipDto": { + "type": "object", + "properties": { + "role": { + "type": "string", + "default": "MEMBER", + "enum": [ + "MEMBER", + "OWNER", + "ADMIN" + ] + }, + "accepted": { + "type": "boolean", + "default": false + }, + "disableImpersonation": { + "type": "boolean", + "default": false + } + } + }, + "UpdateOrgMembership": { "type": "object", "properties": { "status": { @@ -7962,10 +8683,7 @@ ] }, "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/TeamEventTypeOutput_2024_06_14" - } + "$ref": "#/components/schemas/OrgMembershipOutputDto" } }, "required": [ @@ -7973,47 +8691,161 @@ "data" ] }, - "UpdateTeamEventTypeInput_2024_06_14": { + "CreateTeamEventTypeInput_2024_06_14": { "type": "object", "properties": { "lengthInMinutes": { - "type": "number" + "type": "number", + "example": 60 }, "title": { - "type": "string" + "type": "string", + "example": "Learn the secrets of masterchief!" }, "slug": { - "type": "string" + "type": "string", + "example": "learn-the-secrets-of-masterchief" }, "description": { - "type": "string" + "type": "string", + "example": "Discover the culinary wonders of the Argentina by making the best flan ever!" }, "locations": { "type": "array", + "description": "Locations where the event will take place. If not provided, cal video link will be used as the location.", "items": { - "type": "string" + "oneOf": [ + { + "$ref": "#/components/schemas/AddressLocation_2024_06_14" + }, + { + "$ref": "#/components/schemas/LinkLocation_2024_06_14" + }, + { + "$ref": "#/components/schemas/IntegrationLocation_2024_06_14" + }, + { + "$ref": "#/components/schemas/PhoneLocation_2024_06_14" + } + ] } }, "bookingFields": { "type": "array", + "description": "Custom fields that can be added to the booking form when the event is booked by someone. By default booking form has name and email field.", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/PhoneFieldInput_2024_06_14" + }, + { + "$ref": "#/components/schemas/AddressFieldInput_2024_06_14" + }, + { + "$ref": "#/components/schemas/TextFieldInput_2024_06_14" + }, + { + "$ref": "#/components/schemas/NumberFieldInput_2024_06_14" + }, + { + "$ref": "#/components/schemas/TextAreaFieldInput_2024_06_14" + }, + { + "$ref": "#/components/schemas/SelectFieldInput_2024_06_14" + }, + { + "$ref": "#/components/schemas/MultiSelectFieldInput_2024_06_14" + }, + { + "$ref": "#/components/schemas/MultiEmailFieldInput_2024_06_14" + }, + { + "$ref": "#/components/schemas/CheckboxGroupFieldInput_2024_06_14" + }, + { + "$ref": "#/components/schemas/RadioGroupFieldInput_2024_06_14" + }, + { + "$ref": "#/components/schemas/BooleanFieldInput_2024_06_14" + } + ] + } + }, + "disableGuests": { + "type": "boolean", + "description": "If true, person booking this event't cant add guests via their emails." + }, + "slotInterval": { + "type": "number", + "description": "Number representing length of each slot when event is booked. By default it equal length of the event type.\n If event length is 60 minutes then we would have slots 9AM, 10AM, 11AM etc. but if it was changed to 30 minutes then\n we would have slots 9AM, 9:30AM, 10AM, 10:30AM etc. as the available times to book the 60 minute event." + }, + "minimumBookingNotice": { + "type": "number", + "description": "Minimum number of minutes before the event that a booking can be made." + }, + "beforeEventBuffer": { + "type": "number", + "description": "Time spaces that can be pre-pended before an event to give more time before it." + }, + "afterEventBuffer": { + "type": "number", + "description": "Time spaces that can be appended after an event to give more time after it." + }, + "scheduleId": { + "type": "number", + "description": "If you want that this event has different schedule than user's default one you can specify it here." + }, + "bookingLimitsCount": { + "description": "Limit how many times this event can be booked", + "allOf": [ + { + "$ref": "#/components/schemas/BookingLimitsCount_2024_06_14" + } + ] + }, + "onlyShowFirstAvailableSlot": { + "type": "boolean", + "description": "This will limit your availability for this event type to one slot per day, scheduled at the earliest available time." + }, + "bookingLimitsDuration": { + "description": "Limit total amount of time that this event can be booked", + "allOf": [ + { + "$ref": "#/components/schemas/BookingLimitsDuration_2024_06_14" + } + ] + }, + "bookingWindow": { + "type": "array", + "description": "Limit how far in the future this event can be booked", "items": { - "type": "string" + "oneOf": [ + { + "$ref": "#/components/schemas/BusinessDaysWindow_2024_06_14" + }, + { + "$ref": "#/components/schemas/CalendarDaysWindow_2024_06_14" + }, + { + "$ref": "#/components/schemas/RangeWindow_2024_06_14" + } + ] } }, - "disableGuests": { - "type": "boolean" - }, - "slotInterval": { - "type": "number" - }, - "minimumBookingNotice": { - "type": "number" + "offsetStart": { + "type": "number", + "description": "Offset timeslots shown to bookers by a specified number of minutes" }, - "beforeEventBuffer": { - "type": "number" + "recurrence": { + "description": "Create a recurring event that can be booked once but will occur multiple times", + "allOf": [ + { + "$ref": "#/components/schemas/Recurrence_2024_06_14" + } + ] }, - "afterEventBuffer": { - "type": "number" + "schedulingType": { + "type": "object" }, "hosts": { "type": "array", @@ -8022,7 +8854,8 @@ } }, "assignAllTeamMembers": { - "type": "boolean" + "type": "boolean", + "description": "If true, all current and future team members will be assigned to this event type" } }, "required": [ @@ -8037,11 +8870,19 @@ "minimumBookingNotice", "beforeEventBuffer", "afterEventBuffer", + "scheduleId", + "bookingLimitsCount", + "onlyShowFirstAvailableSlot", + "bookingLimitsDuration", + "bookingWindow", + "offsetStart", + "recurrence", + "schedulingType", "hosts", "assignAllTeamMembers" ] }, - "UpdateTeamEventTypeOutput": { + "CreateTeamEventTypeOutput": { "type": "object", "properties": { "status": { @@ -8071,85 +8912,294 @@ "data" ] }, - "DeleteTeamEventTypeOutput": { + "TeamEventTypeResponseHost": { "type": "object", "properties": { - "status": { + "userId": { + "type": "number", + "description": "Which user is the host of this event" + }, + "mandatory": { + "type": "boolean", + "default": false, + "description": "Only relevant for round robin event types. If true then the user must attend round robin event always." + }, + "priority": { "type": "string", - "example": "success", + "default": "medium", "enum": [ - "success", - "error" + "lowest", + "low", + "medium", + "high", + "highest" ] }, - "data": { - "type": "object" + "name": { + "type": "string", + "example": "John Doe" } }, "required": [ - "status", - "data" + "userId", + "name" ] }, - "OrgTeamMembershipOutputDto": { + "TeamEventTypeOutput_2024_06_14": { "type": "object", "properties": { - "role": { + "id": { + "type": "number", + "example": 1 + }, + "lengthInMinutes": { + "type": "number", + "minimum": 1, + "example": 60 + }, + "title": { "type": "string", - "enum": [ - "MEMBER", - "OWNER", - "ADMIN" + "example": "Learn the secrets of masterchief!" + }, + "slug": { + "type": "string", + "example": "learn-the-secrets-of-masterchief" + }, + "description": { + "type": "string", + "example": "Discover the culinary wonders of the Argentina by making the best flan ever!" + }, + "locations": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/AddressLocation_2024_06_14" + }, + { + "$ref": "#/components/schemas/LinkLocation_2024_06_14" + }, + { + "$ref": "#/components/schemas/IntegrationLocation_2024_06_14" + }, + { + "$ref": "#/components/schemas/PhoneLocation_2024_06_14" + } + ] + } + }, + "bookingFields": { + "type": "array", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/NameDefaultFieldOutput_2024_06_14" + }, + { + "$ref": "#/components/schemas/EmailDefaultFieldOutput_2024_06_14" + }, + { + "$ref": "#/components/schemas/LocationDefaultFieldOutput_2024_06_14" + }, + { + "$ref": "#/components/schemas/RescheduleReasonDefaultFieldOutput_2024_06_14" + }, + { + "$ref": "#/components/schemas/TitleDefaultFieldOutput_2024_06_14" + }, + { + "$ref": "#/components/schemas/NotesDefaultFieldOutput_2024_06_14" + }, + { + "$ref": "#/components/schemas/GuestsDefaultFieldOutput_2024_06_14" + }, + { + "$ref": "#/components/schemas/PhoneFieldOutput_2024_06_14" + }, + { + "$ref": "#/components/schemas/AddressFieldOutput_2024_06_14" + }, + { + "$ref": "#/components/schemas/TextFieldOutput_2024_06_14" + }, + { + "$ref": "#/components/schemas/NumberFieldOutput_2024_06_14" + }, + { + "$ref": "#/components/schemas/TextAreaFieldOutput_2024_06_14" + }, + { + "$ref": "#/components/schemas/SelectFieldOutput_2024_06_14" + }, + { + "$ref": "#/components/schemas/MultiSelectFieldOutput_2024_06_14" + }, + { + "$ref": "#/components/schemas/MultiEmailFieldOutput_2024_06_14" + }, + { + "$ref": "#/components/schemas/CheckboxGroupFieldOutput_2024_06_14" + }, + { + "$ref": "#/components/schemas/RadioGroupFieldOutput_2024_06_14" + }, + { + "$ref": "#/components/schemas/BooleanFieldOutput_2024_06_14" + } + ] + } + }, + "disableGuests": { + "type": "boolean" + }, + "slotInterval": { + "type": "number", + "nullable": true, + "example": 60 + }, + "minimumBookingNotice": { + "type": "number", + "minimum": 0, + "example": 0 + }, + "beforeEventBuffer": { + "type": "number", + "example": 0 + }, + "afterEventBuffer": { + "type": "number", + "example": 0 + }, + "recurrence": { + "nullable": true, + "allOf": [ + { + "$ref": "#/components/schemas/Recurrence_2024_06_14" + } ] }, - "id": { - "type": "number" + "metadata": { + "type": "object" }, - "userId": { - "type": "number" + "requiresConfirmation": { + "type": "boolean" }, - "teamId": { + "price": { "type": "number" }, - "accepted": { + "currency": { + "type": "string" + }, + "lockTimeZoneToggleOnBookingPage": { "type": "boolean" }, - "disableImpersonation": { + "seatsPerTimeSlot": { + "type": "number", + "nullable": true + }, + "forwardParamsSuccessRedirect": { + "type": "boolean", + "nullable": true + }, + "successRedirectUrl": { + "type": "string", + "nullable": true + }, + "seatsShowAvailabilityCount": { + "type": "boolean", + "nullable": true + }, + "scheduleId": { + "type": "number", + "nullable": true + }, + "bookingLimitsCount": { + "$ref": "#/components/schemas/BookingLimitsCount_2024_06_14" + }, + "onlyShowFirstAvailableSlot": { "type": "boolean" - } - }, - "required": [ - "role", - "id", - "userId", - "teamId", - "accepted" - ] - }, - "OrgTeamMembershipsOutputResponseDto": { - "type": "object", - "properties": { - "status": { + }, + "bookingLimitsDuration": { + "$ref": "#/components/schemas/BookingLimitsDuration_2024_06_14" + }, + "bookingWindow": { + "type": "array", + "description": "Limit how far in the future this event can be booked", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/BusinessDaysWindow_2024_06_14" + }, + { + "$ref": "#/components/schemas/CalendarDaysWindow_2024_06_14" + }, + { + "$ref": "#/components/schemas/RangeWindow_2024_06_14" + } + ] + } + }, + "offsetStart": { + "type": "number", + "minimum": 1 + }, + "schedulingType": { "type": "string", - "example": "success", + "nullable": true, "enum": [ - "success", - "error" + "ROUND_ROBIN", + "COLLECTIVE", + "MANAGED" ] }, - "data": { + "teamId": { + "type": "number", + "nullable": true + }, + "ownerId": { + "type": "number", + "nullable": true + }, + "parentEventTypeId": { + "type": "number", + "nullable": true, + "description": "For managed event types parent event type is the event type that this event type is based on" + }, + "hosts": { "type": "array", "items": { - "$ref": "#/components/schemas/OrgTeamMembershipOutputDto" + "$ref": "#/components/schemas/TeamEventTypeResponseHost" } + }, + "assignAllTeamMembers": { + "type": "boolean" } }, "required": [ - "status", - "data" + "id", + "lengthInMinutes", + "title", + "slug", + "description", + "locations", + "bookingFields", + "disableGuests", + "recurrence", + "metadata", + "requiresConfirmation", + "price", + "currency", + "lockTimeZoneToggleOnBookingPage", + "seatsPerTimeSlot", + "forwardParamsSuccessRedirect", + "successRedirectUrl", + "seatsShowAvailabilityCount", + "scheduleId", + "schedulingType", + "hosts" ] }, - "OrgTeamMembershipOutputResponseDto": { + "GetTeamEventTypeOutput": { "type": "object", "properties": { "status": { @@ -8161,7 +9211,7 @@ ] }, "data": { - "$ref": "#/components/schemas/OrgTeamMembershipOutputDto" + "$ref": "#/components/schemas/TeamEventTypeOutput_2024_06_14" } }, "required": [ @@ -8169,111 +9219,86 @@ "data" ] }, - "UpdateOrgTeamMembershipDto": { + "CreatePhoneCallInput": { "type": "object", "properties": { - "role": { + "yourPhoneNumber": { "type": "string", - "default": "MEMBER", - "enum": [ - "MEMBER", - "OWNER", - "ADMIN" - ] + "pattern": "/^\\+[1-9]\\d{1,14}$/", + "description": "Your phone number" }, - "accepted": { - "type": "boolean", - "default": false + "numberToCall": { + "type": "string", + "pattern": "/^\\+[1-9]\\d{1,14}$/", + "description": "Number to call" }, - "disableImpersonation": { - "type": "boolean", - "default": false - } - } - }, - "CreateOrgTeamMembershipDto": { - "type": "object", - "properties": { - "role": { + "calApiKey": { "type": "string", - "default": "MEMBER", - "enum": [ - "MEMBER", - "OWNER", - "ADMIN" - ] + "description": "CAL API Key" }, - "userId": { - "type": "number" + "enabled": { + "type": "object", + "default": true, + "description": "Enabled status" }, - "accepted": { - "type": "boolean", - "default": false + "templateType": { + "default": "CUSTOM_TEMPLATE", + "enum": [ + "CHECK_IN_APPOINTMENT", + "CUSTOM_TEMPLATE" + ], + "type": "string", + "description": "Template type" }, - "disableImpersonation": { - "type": "boolean", - "default": false - } - }, - "required": [ - "role", - "userId" - ] - }, - "Attribute": { - "type": "object", - "properties": { - "id": { + "schedulerName": { "type": "string", - "description": "The ID of the attribute", - "example": "attr_123" + "description": "Scheduler name" }, - "teamId": { - "type": "number", - "description": "The team ID associated with the attribute", - "example": 1 + "guestName": { + "type": "string", + "description": "Guest name" }, - "type": { + "guestEmail": { "type": "string", - "description": "The type of the attribute", - "enum": [ - "TEXT", - "NUMBER", - "SINGLE_SELECT", - "MULTI_SELECT" - ] + "description": "Guest email" }, - "name": { + "guestCompany": { "type": "string", - "description": "The name of the attribute", - "example": "Attribute Name" + "description": "Guest company" }, - "slug": { + "beginMessage": { "type": "string", - "description": "The slug of the attribute", - "example": "attribute-name" + "description": "Begin message" }, - "enabled": { - "type": "boolean", - "description": "Whether the attribute is enabled and displayed on their profile", - "example": true + "generalPrompt": { + "type": "string", + "description": "General prompt" + } + }, + "required": [ + "yourPhoneNumber", + "numberToCall", + "calApiKey", + "enabled", + "templateType" + ] + }, + "Data": { + "type": "object", + "properties": { + "callId": { + "type": "string" }, - "usersCanEditRelation": { - "type": "boolean", - "description": "Whether users can edit the relation", - "example": true + "agentId": { + "type": "string" } }, "required": [ - "id", - "teamId", - "type", - "name", - "slug", - "enabled" + "callId", + "agentId" ] }, - "GetOrganizationAttributesOutput": { + "CreatePhoneCallOutput": { "type": "object", "properties": { "status": { @@ -8285,10 +9310,7 @@ ] }, "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/Attribute" - } + "$ref": "#/components/schemas/Data" } }, "required": [ @@ -8296,7 +9318,7 @@ "data" ] }, - "GetSingleAttributeOutput": { + "GetTeamEventTypesOutput": { "type": "object", "properties": { "status": { @@ -8308,12 +9330,10 @@ ] }, "data": { - "nullable": true, - "allOf": [ - { - "$ref": "#/components/schemas/Attribute" - } - ] + "type": "array", + "items": { + "$ref": "#/components/schemas/TeamEventTypeOutput_2024_06_14" + } } }, "required": [ @@ -8321,51 +9341,194 @@ "data" ] }, - "CreateOrganizationAttributeOptionInput": { + "UpdateTeamEventTypeInput_2024_06_14": { "type": "object", "properties": { - "value": { - "type": "string" + "lengthInMinutes": { + "type": "number", + "example": 60 }, - "slug": { - "type": "string" - } - }, - "required": [ - "value", - "slug" - ] - }, - "CreateOrganizationAttributeInput": { - "type": "object", - "properties": { - "name": { - "type": "string" + "title": { + "type": "string", + "example": "Learn the secrets of masterchief!" }, "slug": { - "type": "string" + "type": "string", + "example": "learn-the-secrets-of-masterchief" + }, + "description": { + "type": "string", + "example": "Discover the culinary wonders of the Argentina by making the best flan ever!" + }, + "locations": { + "type": "array", + "description": "Locations where the event will take place. If not provided, cal video link will be used as the location.", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/AddressLocation_2024_06_14" + }, + { + "$ref": "#/components/schemas/LinkLocation_2024_06_14" + }, + { + "$ref": "#/components/schemas/IntegrationLocation_2024_06_14" + }, + { + "$ref": "#/components/schemas/PhoneLocation_2024_06_14" + } + ] + } + }, + "bookingFields": { + "type": "array", + "description": "Custom fields that can be added to the booking form when the event is booked by someone. By default booking form has name and email field.", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/PhoneFieldInput_2024_06_14" + }, + { + "$ref": "#/components/schemas/AddressFieldInput_2024_06_14" + }, + { + "$ref": "#/components/schemas/TextFieldInput_2024_06_14" + }, + { + "$ref": "#/components/schemas/NumberFieldInput_2024_06_14" + }, + { + "$ref": "#/components/schemas/TextAreaFieldInput_2024_06_14" + }, + { + "$ref": "#/components/schemas/SelectFieldInput_2024_06_14" + }, + { + "$ref": "#/components/schemas/MultiSelectFieldInput_2024_06_14" + }, + { + "$ref": "#/components/schemas/MultiEmailFieldInput_2024_06_14" + }, + { + "$ref": "#/components/schemas/CheckboxGroupFieldInput_2024_06_14" + }, + { + "$ref": "#/components/schemas/RadioGroupFieldInput_2024_06_14" + }, + { + "$ref": "#/components/schemas/BooleanFieldInput_2024_06_14" + } + ] + } + }, + "disableGuests": { + "type": "boolean", + "description": "If true, person booking this event't cant add guests via their emails." + }, + "slotInterval": { + "type": "number", + "description": "Number representing length of each slot when event is booked. By default it equal length of the event type.\n If event length is 60 minutes then we would have slots 9AM, 10AM, 11AM etc. but if it was changed to 30 minutes then\n we would have slots 9AM, 9:30AM, 10AM, 10:30AM etc. as the available times to book the 60 minute event." + }, + "minimumBookingNotice": { + "type": "number", + "description": "Minimum number of minutes before the event that a booking can be made." + }, + "beforeEventBuffer": { + "type": "number", + "description": "Time spaces that can be pre-pended before an event to give more time before it." + }, + "afterEventBuffer": { + "type": "number", + "description": "Time spaces that can be appended after an event to give more time after it." + }, + "scheduleId": { + "type": "number", + "description": "If you want that this event has different schedule than user's default one you can specify it here." + }, + "bookingLimitsCount": { + "description": "Limit how many times this event can be booked", + "allOf": [ + { + "$ref": "#/components/schemas/BookingLimitsCount_2024_06_14" + } + ] + }, + "onlyShowFirstAvailableSlot": { + "type": "boolean", + "description": "This will limit your availability for this event type to one slot per day, scheduled at the earliest available time." + }, + "bookingLimitsDuration": { + "description": "Limit total amount of time that this event can be booked", + "allOf": [ + { + "$ref": "#/components/schemas/BookingLimitsDuration_2024_06_14" + } + ] + }, + "bookingWindow": { + "type": "array", + "description": "Limit how far in the future this event can be booked", + "items": { + "oneOf": [ + { + "$ref": "#/components/schemas/BusinessDaysWindow_2024_06_14" + }, + { + "$ref": "#/components/schemas/CalendarDaysWindow_2024_06_14" + }, + { + "$ref": "#/components/schemas/RangeWindow_2024_06_14" + } + ] + } }, - "type": { - "type": "object" + "offsetStart": { + "type": "number", + "description": "Offset timeslots shown to bookers by a specified number of minutes" }, - "options": { + "recurrence": { + "description": "Create a recurring event that can be booked once but will occur multiple times", + "allOf": [ + { + "$ref": "#/components/schemas/Recurrence_2024_06_14" + } + ] + }, + "hosts": { "type": "array", "items": { - "$ref": "#/components/schemas/CreateOrganizationAttributeOptionInput" + "type": "string" } }, - "enabled": { - "type": "boolean" + "assignAllTeamMembers": { + "type": "boolean", + "description": "If true, all current and future team members will be assigned to this event type" } }, "required": [ - "name", + "lengthInMinutes", + "title", "slug", - "type", - "options" + "description", + "locations", + "bookingFields", + "disableGuests", + "slotInterval", + "minimumBookingNotice", + "beforeEventBuffer", + "afterEventBuffer", + "scheduleId", + "bookingLimitsCount", + "onlyShowFirstAvailableSlot", + "bookingLimitsDuration", + "bookingWindow", + "offsetStart", + "recurrence", + "hosts", + "assignAllTeamMembers" ] }, - "CreateOrganizationAttributesOutput": { + "UpdateTeamEventTypeOutput": { "type": "object", "properties": { "status": { @@ -8377,7 +9540,17 @@ ] }, "data": { - "$ref": "#/components/schemas/Attribute" + "oneOf": [ + { + "$ref": "#/components/schemas/TeamEventTypeOutput_2024_06_14" + }, + { + "type": "array", + "items": { + "$ref": "#/components/schemas/TeamEventTypeOutput_2024_06_14" + } + } + ] } }, "required": [ @@ -8385,24 +9558,7 @@ "data" ] }, - "UpdateOrganizationAttributeInput": { - "type": "object", - "properties": { - "name": { - "type": "string" - }, - "slug": { - "type": "string" - }, - "type": { - "type": "object" - }, - "enabled": { - "type": "boolean" - } - } - }, - "UpdateOrganizationAttributesOutput": { + "DeleteTeamEventTypeOutput": { "type": "object", "properties": { "status": { @@ -8414,7 +9570,7 @@ ] }, "data": { - "$ref": "#/components/schemas/Attribute" + "type": "object" } }, "required": [ @@ -8422,58 +9578,42 @@ "data" ] }, - "DeleteOrganizationAttributesOutput": { + "OrgTeamMembershipOutputDto": { "type": "object", "properties": { - "status": { + "role": { "type": "string", - "example": "success", "enum": [ - "success", - "error" + "MEMBER", + "OWNER", + "ADMIN" ] }, - "data": { - "$ref": "#/components/schemas/Attribute" - } - }, - "required": [ - "status", - "data" - ] - }, - "OptionOutput": { - "type": "object", - "properties": { "id": { - "type": "string", - "description": "The ID of the option", - "example": "attr_option_id" + "type": "number" }, - "attributeId": { - "type": "string", - "description": "The ID of the attribute", - "example": "attr_id" + "userId": { + "type": "number" }, - "value": { - "type": "string", - "description": "The value of the option", - "example": "option_value" + "teamId": { + "type": "number" }, - "slug": { - "type": "string", - "description": "The slug of the option", - "example": "option-slug" + "accepted": { + "type": "boolean" + }, + "disableImpersonation": { + "type": "boolean" } }, "required": [ + "role", "id", - "attributeId", - "value", - "slug" + "userId", + "teamId", + "accepted" ] }, - "CreateAttributeOptionOutput": { + "OrgTeamMembershipsOutputResponseDto": { "type": "object", "properties": { "status": { @@ -8485,7 +9625,10 @@ ] }, "data": { - "$ref": "#/components/schemas/OptionOutput" + "type": "array", + "items": { + "$ref": "#/components/schemas/OrgTeamMembershipOutputDto" + } } }, "required": [ @@ -8493,7 +9636,7 @@ "data" ] }, - "DeleteAttributeOptionOutput": { + "OrgTeamMembershipOutputResponseDto": { "type": "object", "properties": { "status": { @@ -8505,7 +9648,7 @@ ] }, "data": { - "$ref": "#/components/schemas/OptionOutput" + "$ref": "#/components/schemas/OrgTeamMembershipOutputDto" } }, "required": [ @@ -8513,100 +9656,111 @@ "data" ] }, - "UpdateOrganizationAttributeOptionInput": { - "type": "object", - "properties": { - "value": { - "type": "string" - }, - "slug": { - "type": "string" - } - } - }, - "UpdateAttributeOptionOutput": { + "UpdateOrgTeamMembershipDto": { "type": "object", "properties": { - "status": { + "role": { "type": "string", - "example": "success", + "default": "MEMBER", "enum": [ - "success", - "error" + "MEMBER", + "OWNER", + "ADMIN" ] }, - "data": { - "$ref": "#/components/schemas/OptionOutput" + "accepted": { + "type": "boolean", + "default": false + }, + "disableImpersonation": { + "type": "boolean", + "default": false } - }, - "required": [ - "status", - "data" - ] + } }, - "GetAllAttributeOptionOutput": { + "CreateOrgTeamMembershipDto": { "type": "object", "properties": { - "status": { + "role": { "type": "string", - "example": "success", + "default": "MEMBER", "enum": [ - "success", - "error" + "MEMBER", + "OWNER", + "ADMIN" ] }, - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/OptionOutput" - } - } - }, - "required": [ - "status", - "data" - ] - }, - "AssignOrganizationAttributeOptionToUserInput": { - "type": "object", - "properties": { - "value": { - "type": "string" + "userId": { + "type": "number" }, - "attributeOptionId": { - "type": "string" + "accepted": { + "type": "boolean", + "default": false }, - "attributeId": { - "type": "string" + "disableImpersonation": { + "type": "boolean", + "default": false } }, "required": [ - "attributeId" + "role", + "userId" ] }, - "AssignOptionUserOutputData": { + "Attribute": { "type": "object", "properties": { "id": { "type": "string", - "description": "The ID of the option assigned to the user" + "description": "The ID of the attribute", + "example": "attr_123" }, - "memberId": { + "teamId": { "type": "number", - "description": "The ID form the org membership for the user" + "description": "The team ID associated with the attribute", + "example": 1 }, - "attributeOptionId": { + "type": { "type": "string", - "description": "The value of the option" + "description": "The type of the attribute", + "enum": [ + "TEXT", + "NUMBER", + "SINGLE_SELECT", + "MULTI_SELECT" + ] + }, + "name": { + "type": "string", + "description": "The name of the attribute", + "example": "Attribute Name" + }, + "slug": { + "type": "string", + "description": "The slug of the attribute", + "example": "attribute-name" + }, + "enabled": { + "type": "boolean", + "description": "Whether the attribute is enabled and displayed on their profile", + "example": true + }, + "usersCanEditRelation": { + "type": "boolean", + "description": "Whether users can edit the relation", + "example": true } }, "required": [ "id", - "memberId", - "attributeOptionId" + "teamId", + "type", + "name", + "slug", + "enabled" ] }, - "AssignOptionUserOutput": { + "GetOrganizationAttributesOutput": { "type": "object", "properties": { "status": { @@ -8618,7 +9772,10 @@ ] }, "data": { - "$ref": "#/components/schemas/AssignOptionUserOutputData" + "type": "array", + "items": { + "$ref": "#/components/schemas/Attribute" + } } }, "required": [ @@ -8626,7 +9783,7 @@ "data" ] }, - "UnassignOptionUserOutput": { + "GetSingleAttributeOutput": { "type": "object", "properties": { "status": { @@ -8638,7 +9795,12 @@ ] }, "data": { - "$ref": "#/components/schemas/AssignOptionUserOutputData" + "nullable": true, + "allOf": [ + { + "$ref": "#/components/schemas/Attribute" + } + ] } }, "required": [ @@ -8646,96 +9808,51 @@ "data" ] }, - "GetOptionUserOutputData": { + "CreateOrganizationAttributeOptionInput": { "type": "object", "properties": { - "id": { - "type": "string", - "description": "The ID of the option assigned to the user" - }, - "attributeId": { - "type": "string", - "description": "The ID of the attribute" - }, "value": { - "type": "string", - "description": "The value of the option" + "type": "string" }, "slug": { - "type": "string", - "description": "The slug of the option" + "type": "string" } }, "required": [ - "id", - "attributeId", "value", "slug" ] }, - "GetOptionUserOutput": { - "type": "object", - "properties": { - "status": { - "type": "string", - "example": "success", - "enum": [ - "success", - "error" - ] - }, - "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/GetOptionUserOutputData" - } - } - }, - "required": [ - "status", - "data" - ] - }, - "TeamWebhookOutputDto": { + "CreateOrganizationAttributeInput": { "type": "object", "properties": { - "payloadTemplate": { - "type": "string", - "description": "The template of the payload that will be sent to the subscriberUrl, check cal.com/docs/core-features/webhooks for more information", - "example": "{\"content\":\"A new event has been scheduled\",\"type\":\"{{type}}\",\"name\":\"{{title}}\",\"organizer\":\"{{organizer.name}}\",\"booker\":\"{{attendees.0.name}}\"}" + "name": { + "type": "string" }, - "teamId": { - "type": "number" + "slug": { + "type": "string" }, - "id": { - "type": "number" + "type": { + "type": "object" }, - "triggers": { + "options": { "type": "array", "items": { - "type": "object" + "$ref": "#/components/schemas/CreateOrganizationAttributeOptionInput" } }, - "subscriberUrl": { - "type": "string" - }, - "active": { + "enabled": { "type": "boolean" - }, - "secret": { - "type": "string" } }, "required": [ - "payloadTemplate", - "teamId", - "id", - "triggers", - "subscriberUrl", - "active" + "name", + "slug", + "type", + "options" ] }, - "TeamWebhooksOutputResponseDto": { + "CreateOrganizationAttributesOutput": { "type": "object", "properties": { "status": { @@ -8747,10 +9864,7 @@ ] }, "data": { - "type": "array", - "items": { - "$ref": "#/components/schemas/TeamWebhookOutputDto" - } + "$ref": "#/components/schemas/Attribute" } }, "required": [ @@ -8758,130 +9872,24 @@ "data" ] }, - "CreateWebhookInputDto": { + "UpdateOrganizationAttributeInput": { "type": "object", "properties": { - "payloadTemplate": { - "type": "string", - "description": "The template of the payload that will be sent to the subscriberUrl, check cal.com/docs/core-features/webhooks for more information", - "example": "{\"content\":\"A new event has been scheduled\",\"type\":\"{{type}}\",\"name\":\"{{title}}\",\"organizer\":\"{{organizer.name}}\",\"booker\":\"{{attendees.0.name}}\"}" - }, - "triggers": { - "type": "string", - "example": [ - "BOOKING_CREATED", - "BOOKING_RESCHEDULED", - "BOOKING_CANCELLED", - "BOOKING_CONFIRMED", - "BOOKING_REJECTED", - "BOOKING_COMPLETED", - "BOOKING_NO_SHOW", - "BOOKING_REOPENED" - ], - "enum": [ - "BOOKING_CREATED", - "BOOKING_PAYMENT_INITIATED", - "BOOKING_PAID", - "BOOKING_RESCHEDULED", - "BOOKING_REQUESTED", - "BOOKING_CANCELLED", - "BOOKING_REJECTED", - "BOOKING_NO_SHOW_UPDATED", - "FORM_SUBMITTED", - "MEETING_ENDED", - "MEETING_STARTED", - "RECORDING_READY", - "INSTANT_MEETING", - "RECORDING_TRANSCRIPTION_GENERATED", - "OOO_CREATED" - ] - }, - "active": { - "type": "boolean" - }, - "subscriberUrl": { + "name": { "type": "string" }, - "secret": { + "slug": { "type": "string" - } - }, - "required": [ - "triggers", - "active", - "subscriberUrl" - ] - }, - "TeamWebhookOutputResponseDto": { - "type": "object", - "properties": { - "status": { - "type": "string", - "example": "success", - "enum": [ - "success", - "error" - ] - }, - "data": { - "$ref": "#/components/schemas/TeamWebhookOutputDto" - } - }, - "required": [ - "status", - "data" - ] - }, - "UpdateWebhookInputDto": { - "type": "object", - "properties": { - "payloadTemplate": { - "type": "string", - "description": "The template of the payload that will be sent to the subscriberUrl, check cal.com/docs/core-features/webhooks for more information", - "example": "{\"content\":\"A new event has been scheduled\",\"type\":\"{{type}}\",\"name\":\"{{title}}\",\"organizer\":\"{{organizer.name}}\",\"booker\":\"{{attendees.0.name}}\"}" }, - "triggers": { - "type": "string", - "example": [ - "BOOKING_CREATED", - "BOOKING_RESCHEDULED", - "BOOKING_CANCELLED", - "BOOKING_CONFIRMED", - "BOOKING_REJECTED", - "BOOKING_COMPLETED", - "BOOKING_NO_SHOW", - "BOOKING_REOPENED" - ], - "enum": [ - "BOOKING_CREATED", - "BOOKING_PAYMENT_INITIATED", - "BOOKING_PAID", - "BOOKING_RESCHEDULED", - "BOOKING_REQUESTED", - "BOOKING_CANCELLED", - "BOOKING_REJECTED", - "BOOKING_NO_SHOW_UPDATED", - "FORM_SUBMITTED", - "MEETING_ENDED", - "MEETING_STARTED", - "RECORDING_READY", - "INSTANT_MEETING", - "RECORDING_TRANSCRIPTION_GENERATED", - "OOO_CREATED" - ] + "type": { + "type": "object" }, - "active": { + "enabled": { "type": "boolean" - }, - "subscriberUrl": { - "type": "string" - }, - "secret": { - "type": "string" } } }, - "GetDefaultScheduleOutput_2024_06_11": { + "UpdateOrganizationAttributesOutput": { "type": "object", "properties": { "status": { @@ -8893,7 +9901,7 @@ ] }, "data": { - "$ref": "#/components/schemas/ScheduleOutput_2024_06_11" + "$ref": "#/components/schemas/Attribute" } }, "required": [ @@ -8901,219 +9909,109 @@ "data" ] }, - "CreateAvailabilityInput_2024_04_15": { - "type": "object", - "properties": { - "days": { - "example": [ - 1, - 2 - ], - "type": "array", - "items": { - "type": "number" - } - }, - "startTime": { - "format": "date-time", - "type": "string" - }, - "endTime": { - "format": "date-time", - "type": "string" - } - }, - "required": [ - "days", - "startTime", - "endTime" - ] - }, - "CreateScheduleInput_2024_04_15": { + "DeleteOrganizationAttributesOutput": { "type": "object", "properties": { - "name": { - "type": "string" - }, - "timeZone": { - "type": "string" - }, - "availabilities": { - "type": "array", - "items": { - "$ref": "#/components/schemas/CreateAvailabilityInput_2024_04_15" - } + "status": { + "type": "string", + "example": "success", + "enum": [ + "success", + "error" + ] }, - "isDefault": { - "type": "boolean" + "data": { + "$ref": "#/components/schemas/Attribute" } }, "required": [ - "name", - "timeZone", - "isDefault" + "status", + "data" ] }, - "WorkingHours": { + "OptionOutput": { "type": "object", "properties": { - "days": { - "type": "array", - "items": { - "type": "number" - } + "id": { + "type": "string", + "description": "The ID of the option", + "example": "attr_option_id" }, - "startTime": { - "type": "number" + "attributeId": { + "type": "string", + "description": "The ID of the attribute", + "example": "attr_id" }, - "endTime": { - "type": "number" + "value": { + "type": "string", + "description": "The value of the option", + "example": "option_value" }, - "userId": { - "type": "number", - "nullable": true + "slug": { + "type": "string", + "description": "The slug of the option", + "example": "option-slug" } }, "required": [ - "days", - "startTime", - "endTime" + "id", + "attributeId", + "value", + "slug" ] }, - "AvailabilityModel": { + "CreateAttributeOptionOutput": { "type": "object", "properties": { - "id": { - "type": "number" - }, - "userId": { - "type": "number", - "nullable": true - }, - "eventTypeId": { - "type": "number", - "nullable": true - }, - "days": { - "type": "array", - "items": { - "type": "number" - } - }, - "startTime": { - "format": "date-time", - "type": "string" - }, - "endTime": { - "format": "date-time", - "type": "string" - }, - "date": { - "format": "date-time", + "status": { "type": "string", - "nullable": true + "example": "success", + "enum": [ + "success", + "error" + ] }, - "scheduleId": { - "type": "number", - "nullable": true + "data": { + "$ref": "#/components/schemas/OptionOutput" } }, "required": [ - "id", - "days", - "startTime", - "endTime" + "status", + "data" ] }, - "TimeRange": { + "DeleteAttributeOptionOutput": { "type": "object", "properties": { - "userId": { - "type": "number", - "nullable": true - }, - "start": { - "format": "date-time", - "type": "string" + "status": { + "type": "string", + "example": "success", + "enum": [ + "success", + "error" + ] }, - "end": { - "format": "date-time", - "type": "string" + "data": { + "$ref": "#/components/schemas/OptionOutput" } }, "required": [ - "start", - "end" + "status", + "data" ] }, - "ScheduleOutput": { + "UpdateOrganizationAttributeOptionInput": { "type": "object", "properties": { - "id": { - "type": "number" - }, - "name": { + "value": { "type": "string" }, - "isManaged": { - "type": "boolean" - }, - "workingHours": { - "type": "array", - "items": { - "$ref": "#/components/schemas/WorkingHours" - } - }, - "schedule": { - "type": "array", - "items": { - "$ref": "#/components/schemas/AvailabilityModel" - } - }, - "availability": { - "type": "array", - "items": { - "required": true, - "type": "array", - "items": { - "$ref": "#/components/schemas/TimeRange" - } - } - }, - "timeZone": { + "slug": { "type": "string" - }, - "dateOverrides": { - "type": "array", - "items": { - "type": "object" - } - }, - "isDefault": { - "type": "boolean" - }, - "isLastSchedule": { - "type": "boolean" - }, - "readOnly": { - "type": "boolean" } - }, - "required": [ - "id", - "name", - "isManaged", - "workingHours", - "schedule", - "availability", - "timeZone", - "dateOverrides", - "isDefault", - "isLastSchedule", - "readOnly" - ] + } }, - "CreateScheduleOutput_2024_04_15": { + "UpdateAttributeOptionOutput": { "type": "object", "properties": { "status": { @@ -9125,7 +10023,7 @@ ] }, "data": { - "$ref": "#/components/schemas/ScheduleOutput" + "$ref": "#/components/schemas/OptionOutput" } }, "required": [ @@ -9133,7 +10031,7 @@ "data" ] }, - "GetDefaultScheduleOutput_2024_04_15": { + "GetAllAttributeOptionOutput": { "type": "object", "properties": { "status": { @@ -9145,12 +10043,10 @@ ] }, "data": { - "nullable": true, - "allOf": [ - { - "$ref": "#/components/schemas/ScheduleOutput" - } - ] + "type": "array", + "items": { + "$ref": "#/components/schemas/OptionOutput" + } } }, "required": [ @@ -9158,7 +10054,46 @@ "data" ] }, - "GetScheduleOutput_2024_04_15": { + "AssignOrganizationAttributeOptionToUserInput": { + "type": "object", + "properties": { + "value": { + "type": "string" + }, + "attributeOptionId": { + "type": "string" + }, + "attributeId": { + "type": "string" + } + }, + "required": [ + "attributeId" + ] + }, + "AssignOptionUserOutputData": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "The ID of the option assigned to the user" + }, + "memberId": { + "type": "number", + "description": "The ID form the org membership for the user" + }, + "attributeOptionId": { + "type": "string", + "description": "The value of the option" + } + }, + "required": [ + "id", + "memberId", + "attributeOptionId" + ] + }, + "AssignOptionUserOutput": { "type": "object", "properties": { "status": { @@ -9170,7 +10105,7 @@ ] }, "data": { - "$ref": "#/components/schemas/ScheduleOutput" + "$ref": "#/components/schemas/AssignOptionUserOutputData" } }, "required": [ @@ -9178,7 +10113,7 @@ "data" ] }, - "GetSchedulesOutput_2024_04_15": { + "UnassignOptionUserOutput": { "type": "object", "properties": { "status": { @@ -9190,7 +10125,7 @@ ] }, "data": { - "$ref": "#/components/schemas/ScheduleOutput" + "$ref": "#/components/schemas/AssignOptionUserOutputData" } }, "required": [ @@ -9198,186 +10133,173 @@ "data" ] }, - "UpdateScheduleInput_2024_04_15": { + "GetOptionUserOutputData": { "type": "object", "properties": { - "timeZone": { - "type": "string" - }, - "name": { - "type": "string" + "id": { + "type": "string", + "description": "The ID of the option assigned to the user" }, - "isDefault": { - "type": "boolean" + "attributeId": { + "type": "string", + "description": "The ID of the attribute" }, - "schedule": { - "example": [ - [], - [ - { - "start": "2022-01-01T00:00:00.000Z", - "end": "2022-01-02T00:00:00.000Z" - } - ], - [], - [], - [], - [], - [] - ], - "items": { - "type": "array" - }, - "type": "array" + "value": { + "type": "string", + "description": "The value of the option" }, - "dateOverrides": { - "example": [ - [], - [ - { - "start": "2022-01-01T00:00:00.000Z", - "end": "2022-01-02T00:00:00.000Z" - } - ], - [], - [], - [], - [], - [] - ], - "items": { - "type": "array" - }, - "type": "array" + "slug": { + "type": "string", + "description": "The slug of the option" } }, "required": [ - "timeZone", - "name", - "isDefault", - "schedule" + "id", + "attributeId", + "value", + "slug" ] }, - "EventTypeModel_2024_04_15": { + "GetOptionUserOutput": { "type": "object", "properties": { - "id": { - "type": "number" - }, - "eventName": { + "status": { "type": "string", - "nullable": true + "example": "success", + "enum": [ + "success", + "error" + ] + }, + "data": { + "type": "array", + "items": { + "$ref": "#/components/schemas/GetOptionUserOutputData" + } } }, "required": [ - "id" + "status", + "data" ] }, - "AvailabilityModel_2024_04_15": { + "TeamWebhookOutputDto": { "type": "object", "properties": { - "id": { - "type": "number" - }, - "userId": { - "type": "number", - "nullable": true + "payloadTemplate": { + "type": "string", + "description": "The template of the payload that will be sent to the subscriberUrl, check cal.com/docs/core-features/webhooks for more information", + "example": "{\"content\":\"A new event has been scheduled\",\"type\":\"{{type}}\",\"name\":\"{{title}}\",\"organizer\":\"{{organizer.name}}\",\"booker\":\"{{attendees.0.name}}\"}" }, - "scheduleId": { - "type": "number", - "nullable": true + "teamId": { + "type": "number" }, - "eventTypeId": { - "type": "number", - "nullable": true + "id": { + "type": "number" }, - "days": { + "triggers": { "type": "array", "items": { - "type": "number" + "type": "object" } }, - "startTime": { - "format": "date-time", + "subscriberUrl": { "type": "string" }, - "endTime": { - "format": "date-time", - "type": "string" + "active": { + "type": "boolean" }, - "date": { - "format": "date-time", - "type": "string", - "nullable": true + "secret": { + "type": "string" } }, "required": [ + "payloadTemplate", + "teamId", "id", - "days" + "triggers", + "subscriberUrl", + "active" ] }, - "ScheduleModel_2024_04_15": { + "TeamWebhooksOutputResponseDto": { "type": "object", "properties": { - "id": { - "type": "number" - }, - "userId": { - "type": "number" - }, - "name": { - "type": "string" - }, - "timeZone": { + "status": { "type": "string", - "nullable": true - }, - "eventType": { - "type": "array", - "items": { - "$ref": "#/components/schemas/EventTypeModel_2024_04_15" - } + "example": "success", + "enum": [ + "success", + "error" + ] }, - "availability": { + "data": { "type": "array", "items": { - "$ref": "#/components/schemas/AvailabilityModel_2024_04_15" + "$ref": "#/components/schemas/TeamWebhookOutputDto" } } }, "required": [ - "id", - "userId", - "name" + "status", + "data" ] }, - "UpdatedScheduleOutput_2024_04_15": { + "CreateWebhookInputDto": { "type": "object", "properties": { - "schedule": { - "$ref": "#/components/schemas/ScheduleModel_2024_04_15" + "payloadTemplate": { + "type": "string", + "description": "The template of the payload that will be sent to the subscriberUrl, check cal.com/docs/core-features/webhooks for more information", + "example": "{\"content\":\"A new event has been scheduled\",\"type\":\"{{type}}\",\"name\":\"{{title}}\",\"organizer\":\"{{organizer.name}}\",\"booker\":\"{{attendees.0.name}}\"}" }, - "isDefault": { + "triggers": { + "type": "string", + "example": [ + "BOOKING_CREATED", + "BOOKING_RESCHEDULED", + "BOOKING_CANCELLED", + "BOOKING_CONFIRMED", + "BOOKING_REJECTED", + "BOOKING_COMPLETED", + "BOOKING_NO_SHOW", + "BOOKING_REOPENED" + ], + "enum": [ + "BOOKING_CREATED", + "BOOKING_PAYMENT_INITIATED", + "BOOKING_PAID", + "BOOKING_RESCHEDULED", + "BOOKING_REQUESTED", + "BOOKING_CANCELLED", + "BOOKING_REJECTED", + "BOOKING_NO_SHOW_UPDATED", + "FORM_SUBMITTED", + "MEETING_ENDED", + "MEETING_STARTED", + "RECORDING_READY", + "INSTANT_MEETING", + "RECORDING_TRANSCRIPTION_GENERATED", + "OOO_CREATED" + ] + }, + "active": { "type": "boolean" }, - "timeZone": { + "subscriberUrl": { "type": "string" }, - "prevDefaultId": { - "type": "number", - "nullable": true - }, - "currentDefaultId": { - "type": "number", - "nullable": true + "secret": { + "type": "string" } }, "required": [ - "schedule", - "isDefault" + "triggers", + "active", + "subscriberUrl" ] }, - "UpdateScheduleOutput_2024_04_15": { + "TeamWebhookOutputResponseDto": { "type": "object", "properties": { "status": { @@ -9389,7 +10311,7 @@ ] }, "data": { - "$ref": "#/components/schemas/UpdatedScheduleOutput_2024_04_15" + "$ref": "#/components/schemas/TeamWebhookOutputDto" } }, "required": [ @@ -9397,7 +10319,56 @@ "data" ] }, - "DeleteScheduleOutput_2024_04_15": { + "UpdateWebhookInputDto": { + "type": "object", + "properties": { + "payloadTemplate": { + "type": "string", + "description": "The template of the payload that will be sent to the subscriberUrl, check cal.com/docs/core-features/webhooks for more information", + "example": "{\"content\":\"A new event has been scheduled\",\"type\":\"{{type}}\",\"name\":\"{{title}}\",\"organizer\":\"{{organizer.name}}\",\"booker\":\"{{attendees.0.name}}\"}" + }, + "triggers": { + "type": "string", + "example": [ + "BOOKING_CREATED", + "BOOKING_RESCHEDULED", + "BOOKING_CANCELLED", + "BOOKING_CONFIRMED", + "BOOKING_REJECTED", + "BOOKING_COMPLETED", + "BOOKING_NO_SHOW", + "BOOKING_REOPENED" + ], + "enum": [ + "BOOKING_CREATED", + "BOOKING_PAYMENT_INITIATED", + "BOOKING_PAID", + "BOOKING_RESCHEDULED", + "BOOKING_REQUESTED", + "BOOKING_CANCELLED", + "BOOKING_REJECTED", + "BOOKING_NO_SHOW_UPDATED", + "FORM_SUBMITTED", + "MEETING_ENDED", + "MEETING_STARTED", + "RECORDING_READY", + "INSTANT_MEETING", + "RECORDING_TRANSCRIPTION_GENERATED", + "OOO_CREATED" + ] + }, + "active": { + "type": "boolean" + }, + "subscriberUrl": { + "type": "string" + }, + "secret": { + "type": "string" + } + } + }, + "GetDefaultScheduleOutput_2024_06_11": { "type": "object", "properties": { "status": { @@ -9407,10 +10378,14 @@ "success", "error" ] + }, + "data": { + "$ref": "#/components/schemas/ScheduleOutput_2024_06_11" } }, "required": [ - "status" + "status", + "data" ] }, "AuthUrlData": { @@ -10130,6 +11105,26 @@ "credentialId" ] }, + "User": { + "type": "object", + "properties": { + "id": { + "type": "number" + }, + "name": { + "type": "string", + "nullable": true + }, + "email": { + "type": "string" + } + }, + "required": [ + "id", + "name", + "email" + ] + }, "GetBookingsDataEntry": { "type": "object", "properties": { @@ -10416,6 +11411,21 @@ "data" ] }, + "Location": { + "type": "object", + "properties": { + "optionValue": { + "type": "string" + }, + "value": { + "type": "string" + } + }, + "required": [ + "optionValue", + "value" + ] + }, "Response": { "type": "object", "properties": { diff --git a/packages/platform/types/event-types/event-types_2024_06_14/inputs/booking-fields.input.ts b/packages/platform/types/event-types/event-types_2024_06_14/inputs/booking-fields.input.ts index c116809d5dcf9b..056ae86e25da08 100644 --- a/packages/platform/types/event-types/event-types_2024_06_14/inputs/booking-fields.input.ts +++ b/packages/platform/types/event-types/event-types_2024_06_14/inputs/booking-fields.input.ts @@ -21,11 +21,15 @@ const inputBookingFieldTypes = [ export class PhoneFieldInput_2024_06_14 { @IsIn(inputBookingFieldTypes) - @DocsProperty() + @DocsProperty({ example: "phone", description: "only allowed value for type is `phone`" }) type!: "phone"; @IsString() - @DocsProperty() + @DocsProperty({ + description: + "Unique identifier for the field in format `some-slug`. It is used to access response to this booking field during the booking", + example: "some-slug", + }) slug!: string; @IsString() @@ -44,11 +48,15 @@ export class PhoneFieldInput_2024_06_14 { export class AddressFieldInput_2024_06_14 { @IsIn(inputBookingFieldTypes) - @DocsProperty() + @DocsProperty({ example: "address", description: "only allowed value for type is `address`" }) type!: "address"; @IsString() - @DocsProperty() + @DocsProperty({ + description: + "Unique identifier for the field in format `some-slug`. It is used to access response to this booking field during the booking", + example: "some-slug", + }) slug!: string; @IsString() @@ -68,11 +76,15 @@ export class AddressFieldInput_2024_06_14 { export class TextFieldInput_2024_06_14 { @IsIn(inputBookingFieldTypes) - @DocsProperty() + @DocsProperty({ example: "text", description: "only allowed value for type is `text`" }) type!: "text"; @IsString() - @DocsProperty() + @DocsProperty({ + description: + "Unique identifier for the field in format `some-slug`. It is used to access response to this booking field during the booking", + example: "some-slug", + }) slug!: string; @IsString() @@ -92,11 +104,15 @@ export class TextFieldInput_2024_06_14 { export class NumberFieldInput_2024_06_14 { @IsIn(inputBookingFieldTypes) - @DocsProperty() + @DocsProperty({ example: "number", description: "only allowed value for type is `number`" }) type!: "number"; @IsString() - @DocsProperty() + @DocsProperty({ + description: + "Unique identifier for the field in format `some-slug`. It is used to access response to this booking field during the booking", + example: "some-slug", + }) slug!: string; @IsString() @@ -116,11 +132,15 @@ export class NumberFieldInput_2024_06_14 { export class TextAreaFieldInput_2024_06_14 { @IsIn(inputBookingFieldTypes) - @DocsProperty() + @DocsProperty({ example: "textarea", description: "only allowed value for type is `textarea`" }) type!: "textarea"; @IsString() - @DocsProperty() + @DocsProperty({ + description: + "Unique identifier for the field in format `some-slug`. It is used to access response to this booking field during the booking", + example: "some-slug", + }) slug!: string; @IsString() @@ -140,11 +160,15 @@ export class TextAreaFieldInput_2024_06_14 { export class SelectFieldInput_2024_06_14 { @IsIn(inputBookingFieldTypes) - @DocsProperty() + @DocsProperty({ example: "select", description: "only allowed value for type is `select`" }) type!: "select"; @IsString() - @DocsProperty() + @DocsProperty({ + description: + "Unique identifier for the field in format `some-slug`. It is used to access response to this booking field during the booking", + example: "some-slug", + }) slug!: string; @IsString() @@ -168,11 +192,15 @@ export class SelectFieldInput_2024_06_14 { export class MultiSelectFieldInput_2024_06_14 { @IsIn(inputBookingFieldTypes) - @DocsProperty() + @DocsProperty({ example: "multiselect", description: "only allowed value for type is `multiselect`" }) type!: "multiselect"; @IsString() - @DocsProperty() + @DocsProperty({ + description: + "Unique identifier for the field in format `some-slug`. It is used to access response to this booking field during the booking", + example: "some-slug", + }) slug!: string; @IsString() @@ -190,11 +218,15 @@ export class MultiSelectFieldInput_2024_06_14 { export class MultiEmailFieldInput_2024_06_14 { @IsIn(inputBookingFieldTypes) - @DocsProperty() + @DocsProperty({ example: "multiemail", description: "only allowed value for type is `multiemail`" }) type!: "multiemail"; @IsString() - @DocsProperty() + @DocsProperty({ + description: + "Unique identifier for the field in format `some-slug`. It is used to access response to this booking field during the booking", + example: "some-slug", + }) slug!: string; @IsString() @@ -214,11 +246,15 @@ export class MultiEmailFieldInput_2024_06_14 { export class CheckboxGroupFieldInput_2024_06_14 { @IsIn(inputBookingFieldTypes) - @DocsProperty() + @DocsProperty({ example: "checkbox", description: "only allowed value for type is `checkbox`" }) type!: "checkbox"; @IsString() - @DocsProperty() + @DocsProperty({ + description: + "Unique identifier for the field in format `some-slug`. It is used to access response to this booking field during the booking", + example: "some-slug", + }) slug!: string; @IsString() @@ -236,11 +272,15 @@ export class CheckboxGroupFieldInput_2024_06_14 { export class RadioGroupFieldInput_2024_06_14 { @IsIn(inputBookingFieldTypes) - @DocsProperty() + @DocsProperty({ example: "radio", description: "only allowed value for type is `radio`" }) type!: "radio"; @IsString() - @DocsProperty() + @DocsProperty({ + description: + "Unique identifier for the field in format `some-slug`. It is used to access response to this booking field during the booking", + example: "some-slug", + }) slug!: string; @IsString() @@ -258,11 +298,15 @@ export class RadioGroupFieldInput_2024_06_14 { export class BooleanFieldInput_2024_06_14 { @IsIn(inputBookingFieldTypes) - @DocsProperty() + @DocsProperty({ example: "boolean", description: "only allowed value for type is `boolean`" }) type!: "boolean"; @IsString() - @DocsProperty() + @DocsProperty({ + description: + "Unique identifier for the field in format `some-slug`. It is used to access response to this booking field during the booking", + example: "some-slug", + }) slug!: string; @IsString() diff --git a/packages/platform/types/event-types/event-types_2024_06_14/inputs/booking-window.input.ts b/packages/platform/types/event-types/event-types_2024_06_14/inputs/booking-window.input.ts index 1a41e264c07deb..802c3bf98f8f0d 100644 --- a/packages/platform/types/event-types/event-types_2024_06_14/inputs/booking-window.input.ts +++ b/packages/platform/types/event-types/event-types_2024_06_14/inputs/booking-window.input.ts @@ -1,4 +1,5 @@ import { BadRequestException } from "@nestjs/common"; +import { ApiProperty } from "@nestjs/swagger"; import type { ValidatorConstraintInterface, ValidationOptions } from "class-validator"; import { IsEnum, @@ -29,6 +30,10 @@ export type TransformFutureBookingsLimitSchema_2024_06_14 = { // Base class for common properties and validation class BookingWindowBase { @IsEnum(BookingWindowPeriodInputTypeEnum_2024_06_14) + @ApiProperty({ + enum: ["businessDays", "calendarDays", "range"], + description: "Whether the window should be business days, calendar days or a range of dates", + }) type!: BookingWindowPeriodInputType_2024_06_14; } @@ -36,20 +41,32 @@ class BookingWindowBase { export class BusinessDaysWindow_2024_06_14 extends BookingWindowBase { @IsNumber() @IsDefined() + @ApiProperty({ example: 5, description: "How many business day into the future can this event be booked" }) value!: number; @IsOptional() @IsBoolean() + @ApiProperty({ + example: true, + description: + "If true, the window will be rolling aka from the moment that someone is trying to book this event. Otherwise it will be specified amount of days from the current date.", + }) rolling?: boolean; } export class CalendarDaysWindow_2024_06_14 extends BookingWindowBase { @IsNumber() @IsDefined() + @ApiProperty({ example: 5, description: "How many calendar days into the future can this event be booked" }) value!: number; @IsOptional() @IsBoolean() + @ApiProperty({ + example: true, + description: + "If true, the window will be rolling aka from the moment that someone is trying to book this event. Otherwise it will be specified amount of days from the current date.", + }) rolling?: boolean; } @@ -58,6 +75,11 @@ export class RangeWindow_2024_06_14 extends BookingWindowBase { @ArrayNotEmpty() @IsDateString({}, { each: true }) @IsDefined() + @ApiProperty({ + type: [String], + example: ["2030-09-05", "2030-09-09"], + description: "Date range for when this event can be booked.", + }) value!: string[]; } diff --git a/packages/platform/types/event-types/event-types_2024_06_14/inputs/create-event-type.input.ts b/packages/platform/types/event-types/event-types_2024_06_14/inputs/create-event-type.input.ts index 6fe659926330ef..763f4945d757cd 100644 --- a/packages/platform/types/event-types/event-types_2024_06_14/inputs/create-event-type.input.ts +++ b/packages/platform/types/event-types/event-types_2024_06_14/inputs/create-event-type.input.ts @@ -1,4 +1,4 @@ -import { ApiProperty as DocsProperty } from "@nestjs/swagger"; +import { ApiProperty as DocsProperty, getSchemaPath, ApiExtraModels } from "@nestjs/swagger"; import { Type, Transform } from "class-transformer"; import { IsString, @@ -13,6 +13,19 @@ import { import { SchedulingType } from "@calcom/platform-enums"; +import { + AddressFieldInput_2024_06_14, + BooleanFieldInput_2024_06_14, + CheckboxGroupFieldInput_2024_06_14, + MultiEmailFieldInput_2024_06_14, + MultiSelectFieldInput_2024_06_14, + NumberFieldInput_2024_06_14, + PhoneFieldInput_2024_06_14, + RadioGroupFieldInput_2024_06_14, + SelectFieldInput_2024_06_14, + TextAreaFieldInput_2024_06_14, + TextFieldInput_2024_06_14, +} from "./booking-fields.input"; import type { InputBookingField_2024_06_14 } from "./booking-fields.input"; import { ValidateInputBookingFields_2024_06_14 } from "./booking-fields.input"; import { BookingLimitsCount_2024_06_14, ValidateBookingLimistsCount } from "./booking-limits-count.input"; @@ -21,8 +34,19 @@ import { ValidateBookingLimistsDuration, } from "./booking-limits-duration.input"; import type { BookingWindow_2024_06_14 } from "./booking-window.input"; -import { ValidateBookingWindow } from "./booking-window.input"; -import { ValidateLocations_2024_06_14 } from "./locations.input"; +import { + BusinessDaysWindow_2024_06_14, + CalendarDaysWindow_2024_06_14, + RangeWindow_2024_06_14, + ValidateBookingWindow, +} from "./booking-window.input"; +import { + AddressLocation_2024_06_14, + IntegrationLocation_2024_06_14, + LinkLocation_2024_06_14, + PhoneLocation_2024_06_14, + ValidateLocations_2024_06_14, +} from "./locations.input"; import type { Location_2024_06_14 } from "./locations.input"; import { Recurrence_2024_06_14 } from "./recurrence.input"; @@ -30,7 +54,28 @@ export const CREATE_EVENT_LENGTH_EXAMPLE = 60; export const CREATE_EVENT_TITLE_EXAMPLE = "Learn the secrets of masterchief!"; export const CREATE_EVENT_DESCRIPTION_EXAMPLE = "Discover the culinary wonders of the Argentina by making the best flan ever!"; +export const CREATE_EVENT_SLUG_EXAMPLE = "learn-the-secrets-of-masterchief"; +@ApiExtraModels( + AddressLocation_2024_06_14, + LinkLocation_2024_06_14, + IntegrationLocation_2024_06_14, + PhoneLocation_2024_06_14, + PhoneFieldInput_2024_06_14, + AddressFieldInput_2024_06_14, + TextFieldInput_2024_06_14, + NumberFieldInput_2024_06_14, + TextAreaFieldInput_2024_06_14, + SelectFieldInput_2024_06_14, + MultiSelectFieldInput_2024_06_14, + MultiEmailFieldInput_2024_06_14, + CheckboxGroupFieldInput_2024_06_14, + RadioGroupFieldInput_2024_06_14, + BooleanFieldInput_2024_06_14, + BusinessDaysWindow_2024_06_14, + CalendarDaysWindow_2024_06_14, + RangeWindow_2024_06_14 +) export class CreateEventTypeInput_2024_06_14 { @IsInt() @Min(1) @@ -42,6 +87,7 @@ export class CreateEventTypeInput_2024_06_14 { title!: string; @IsString() + @DocsProperty({ example: CREATE_EVENT_SLUG_EXAMPLE }) slug!: string; @IsOptional() @@ -51,63 +97,131 @@ export class CreateEventTypeInput_2024_06_14 { @IsOptional() @ValidateLocations_2024_06_14() + @DocsProperty({ + description: + "Locations where the event will take place. If not provided, cal video link will be used as the location.", + oneOf: [ + { $ref: getSchemaPath(AddressLocation_2024_06_14) }, + { $ref: getSchemaPath(LinkLocation_2024_06_14) }, + { $ref: getSchemaPath(IntegrationLocation_2024_06_14) }, + { $ref: getSchemaPath(PhoneLocation_2024_06_14) }, + ], + type: "array", + }) + @Type(() => Object) locations?: Location_2024_06_14[]; @IsOptional() @ValidateInputBookingFields_2024_06_14() + @DocsProperty({ + description: + "Custom fields that can be added to the booking form when the event is booked by someone. By default booking form has name and email field.", + oneOf: [ + { $ref: getSchemaPath(PhoneFieldInput_2024_06_14) }, + { $ref: getSchemaPath(AddressFieldInput_2024_06_14) }, + { $ref: getSchemaPath(TextFieldInput_2024_06_14) }, + { $ref: getSchemaPath(NumberFieldInput_2024_06_14) }, + { $ref: getSchemaPath(TextAreaFieldInput_2024_06_14) }, + { $ref: getSchemaPath(SelectFieldInput_2024_06_14) }, + { $ref: getSchemaPath(MultiSelectFieldInput_2024_06_14) }, + { $ref: getSchemaPath(MultiEmailFieldInput_2024_06_14) }, + { $ref: getSchemaPath(CheckboxGroupFieldInput_2024_06_14) }, + { $ref: getSchemaPath(RadioGroupFieldInput_2024_06_14) }, + { $ref: getSchemaPath(BooleanFieldInput_2024_06_14) }, + ], + type: "array", + }) + @Type(() => Object) bookingFields?: InputBookingField_2024_06_14[]; @IsBoolean() @IsOptional() + @DocsProperty({ description: "If true, person booking this event't cant add guests via their emails." }) disableGuests?: boolean; @IsInt() @IsOptional() + @DocsProperty({ + description: `Number representing length of each slot when event is booked. By default it equal length of the event type. + If event length is 60 minutes then we would have slots 9AM, 10AM, 11AM etc. but if it was changed to 30 minutes then + we would have slots 9AM, 9:30AM, 10AM, 10:30AM etc. as the available times to book the 60 minute event.`, + }) slotInterval?: number; @IsInt() @Min(0) @IsOptional() + @DocsProperty({ description: "Minimum number of minutes before the event that a booking can be made." }) minimumBookingNotice?: number; @IsInt() @IsOptional() + @DocsProperty({ + description: "Time spaces that can be pre-pended before an event to give more time before it.", + }) beforeEventBuffer?: number; @IsInt() @IsOptional() + @DocsProperty({ + description: "Time spaces that can be appended after an event to give more time after it.", + }) afterEventBuffer?: number; @IsInt() @IsOptional() + @DocsProperty({ + description: + "If you want that this event has different schedule than user's default one you can specify it here.", + }) scheduleId?: number; @IsOptional() @Type(() => BookingLimitsCount_2024_06_14) @ValidateBookingLimistsCount() + @DocsProperty({ description: "Limit how many times this event can be booked" }) bookingLimitsCount?: BookingLimitsCount_2024_06_14; @IsOptional() @IsBoolean() + @DocsProperty({ + description: + "This will limit your availability for this event type to one slot per day, scheduled at the earliest available time.", + }) onlyShowFirstAvailableSlot?: boolean; @IsOptional() @Type(() => BookingLimitsDuration_2024_06_14) @ValidateBookingLimistsDuration() + @DocsProperty({ description: "Limit total amount of time that this event can be booked" }) bookingLimitsDuration?: BookingLimitsDuration_2024_06_14; @IsOptional() @ValidateBookingWindow() + @DocsProperty({ + description: "Limit how far in the future this event can be booked", + oneOf: [ + { $ref: getSchemaPath(BusinessDaysWindow_2024_06_14) }, + { $ref: getSchemaPath(CalendarDaysWindow_2024_06_14) }, + { $ref: getSchemaPath(RangeWindow_2024_06_14) }, + ], + type: "array", + }) + @Type(() => Object) bookingWindow?: BookingWindow_2024_06_14; @IsOptional() @IsInt() @Min(1) + @DocsProperty({ description: "Offset timeslots shown to bookers by a specified number of minutes" }) offsetStart?: number; @IsOptional() @ValidateNested() @Type(() => Recurrence_2024_06_14) + @DocsProperty({ + description: "Create a recurring event that can be booked once but will occur multiple times", + }) recurrence?: Recurrence_2024_06_14; } @@ -120,14 +234,20 @@ export enum HostPriority { } export class Host { @IsInt() + @DocsProperty({ description: "Which user is the host of this event" }) userId!: number; @IsOptional() @IsBoolean() + @DocsProperty({ + description: + "Only relevant for round robin event types. If true then the user must attend round robin event always.", + }) mandatory?: boolean = false; @IsEnum(HostPriority) @IsOptional() + @DocsProperty({ enum: HostPriority }) priority?: keyof typeof HostPriority = "medium"; } @@ -156,6 +276,8 @@ export class CreateTeamEventTypeInput_2024_06_14 extends CreateEventTypeInput_20 @IsBoolean() @IsOptional() - @DocsProperty() + @DocsProperty({ + description: "If true, all current and future team members will be assigned to this event type", + }) assignAllTeamMembers?: boolean; } diff --git a/packages/platform/types/event-types/event-types_2024_06_14/inputs/get-event-types-query.input.ts b/packages/platform/types/event-types/event-types_2024_06_14/inputs/get-event-types-query.input.ts index 1403f4d276368d..a63edab4f082b5 100644 --- a/packages/platform/types/event-types/event-types_2024_06_14/inputs/get-event-types-query.input.ts +++ b/packages/platform/types/event-types/event-types_2024_06_14/inputs/get-event-types-query.input.ts @@ -1,23 +1,40 @@ +import { ApiProperty } from "@nestjs/swagger"; import { Transform } from "class-transformer"; import { IsOptional, IsString } from "class-validator"; export class GetEventTypesQuery_2024_06_14 { @IsOptional() @IsString() + @ApiProperty({ + description: + "The username of the user to get event types for. If only username provided will get all event types.", + }) username?: string; @IsString() @IsOptional() + @ApiProperty({ + description: + "Slug of event type to return. Notably, if eventSlug is provided then username must be provided too, because multiple users can have event with same slug.", + }) eventSlug?: string; @IsOptional() @TransformUsernames() + @ApiProperty({ + description: + "Get dynamic event type for multiple usernames separated by comma. e.g `usernames=alice,bob`", + type: String, + }) usernames?: string[]; } export class GetTeamEventTypesQuery_2024_06_14 { @IsString() @IsOptional() + @ApiProperty({ + description: "Slug of team event type to return.", + }) eventSlug?: string; } diff --git a/packages/platform/types/event-types/event-types_2024_06_14/inputs/locations.input.ts b/packages/platform/types/event-types/event-types_2024_06_14/inputs/locations.input.ts index 2a41643f996ffd..81082ebb1fd145 100644 --- a/packages/platform/types/event-types/event-types_2024_06_14/inputs/locations.input.ts +++ b/packages/platform/types/event-types/event-types_2024_06_14/inputs/locations.input.ts @@ -9,6 +9,7 @@ const locations = ["address", "link", "integration", "phone"] as const; export class AddressLocation_2024_06_14 { @IsIn(locations) + @DocsProperty({ example: "address", description: "only allowed value for type is `address`" }) type!: "address"; @IsString() @@ -16,11 +17,13 @@ export class AddressLocation_2024_06_14 { address!: string; @IsBoolean() + @DocsProperty() public!: boolean; } export class LinkLocation_2024_06_14 { @IsIn(locations) + @DocsProperty({ example: "link", description: "only allowed value for type is `link`" }) type!: "link"; @IsUrl() @@ -28,6 +31,7 @@ export class LinkLocation_2024_06_14 { link!: string; @IsBoolean() + @DocsProperty() public!: boolean; } @@ -36,15 +40,17 @@ export type Integration_2024_06_14 = (typeof integrations)[number]; export class IntegrationLocation_2024_06_14 { @IsIn(locations) + @DocsProperty({ example: "integration", description: "only allowed value for type is `integration`" }) type!: "integration"; @IsIn(integrations) - @DocsProperty({ example: integrations[0] }) + @DocsProperty({ example: integrations[0], enum: integrations }) integration!: Integration_2024_06_14; } export class PhoneLocation_2024_06_14 { @IsIn(locations) + @DocsProperty({ example: "phone", description: "only allowed value for type is `phone`" }) type!: "phone"; @IsPhoneNumber() @@ -52,6 +58,7 @@ export class PhoneLocation_2024_06_14 { phone!: string; @IsBoolean() + @DocsProperty() public!: boolean; } diff --git a/packages/platform/types/event-types/event-types_2024_06_14/inputs/update-event-type.input.ts b/packages/platform/types/event-types/event-types_2024_06_14/inputs/update-event-type.input.ts index 426f85ddaca658..33265c47064e4c 100644 --- a/packages/platform/types/event-types/event-types_2024_06_14/inputs/update-event-type.input.ts +++ b/packages/platform/types/event-types/event-types_2024_06_14/inputs/update-event-type.input.ts @@ -1,157 +1,244 @@ -import { ApiProperty as DocsProperty } from "@nestjs/swagger"; +import { ApiProperty as DocsProperty, getSchemaPath, ApiExtraModels } from "@nestjs/swagger"; import { Type } from "class-transformer"; import { IsString, IsInt, IsBoolean, IsOptional, Min, ValidateNested, IsArray } from "class-validator"; import type { InputBookingField_2024_06_14 } from "./booking-fields.input"; -import { ValidateInputBookingFields_2024_06_14 } from "./booking-fields.input"; +import { + AddressFieldInput_2024_06_14, + BooleanFieldInput_2024_06_14, + CheckboxGroupFieldInput_2024_06_14, + MultiEmailFieldInput_2024_06_14, + MultiSelectFieldInput_2024_06_14, + NumberFieldInput_2024_06_14, + PhoneFieldInput_2024_06_14, + RadioGroupFieldInput_2024_06_14, + SelectFieldInput_2024_06_14, + TextAreaFieldInput_2024_06_14, + TextFieldInput_2024_06_14, + ValidateInputBookingFields_2024_06_14, +} from "./booking-fields.input"; import { BookingLimitsCount_2024_06_14, ValidateBookingLimistsCount } from "./booking-limits-count.input"; import { BookingLimitsDuration_2024_06_14, ValidateBookingLimistsDuration, } from "./booking-limits-duration.input"; -import { ValidateBookingWindow, type BookingWindow_2024_06_14 } from "./booking-window.input"; -import { Host } from "./create-event-type.input"; -import { ValidateLocations_2024_06_14 } from "./locations.input"; +import { + BusinessDaysWindow_2024_06_14, + CalendarDaysWindow_2024_06_14, + RangeWindow_2024_06_14, + ValidateBookingWindow, + type BookingWindow_2024_06_14, +} from "./booking-window.input"; +import { + CREATE_EVENT_DESCRIPTION_EXAMPLE, + CREATE_EVENT_LENGTH_EXAMPLE, + CREATE_EVENT_SLUG_EXAMPLE, + CREATE_EVENT_TITLE_EXAMPLE, + Host, +} from "./create-event-type.input"; +import { + AddressLocation_2024_06_14, + IntegrationLocation_2024_06_14, + LinkLocation_2024_06_14, + PhoneLocation_2024_06_14, + ValidateLocations_2024_06_14, +} from "./locations.input"; import type { Location_2024_06_14 } from "./locations.input"; import { Recurrence_2024_06_14 } from "./recurrence.input"; +@ApiExtraModels( + AddressLocation_2024_06_14, + LinkLocation_2024_06_14, + IntegrationLocation_2024_06_14, + PhoneLocation_2024_06_14, + PhoneFieldInput_2024_06_14, + AddressFieldInput_2024_06_14, + TextFieldInput_2024_06_14, + NumberFieldInput_2024_06_14, + TextAreaFieldInput_2024_06_14, + SelectFieldInput_2024_06_14, + MultiSelectFieldInput_2024_06_14, + MultiEmailFieldInput_2024_06_14, + CheckboxGroupFieldInput_2024_06_14, + RadioGroupFieldInput_2024_06_14, + BooleanFieldInput_2024_06_14, + BusinessDaysWindow_2024_06_14, + CalendarDaysWindow_2024_06_14, + RangeWindow_2024_06_14 +) export class UpdateEventTypeInput_2024_06_14 { @IsOptional() @IsInt() @Min(1) + @DocsProperty({ example: CREATE_EVENT_LENGTH_EXAMPLE }) lengthInMinutes?: number; @IsOptional() @IsString() + @DocsProperty({ example: CREATE_EVENT_TITLE_EXAMPLE }) title?: string; @IsString() @IsOptional() + @DocsProperty({ example: CREATE_EVENT_SLUG_EXAMPLE }) slug?: string; @IsOptional() @IsString() + @DocsProperty({ example: CREATE_EVENT_DESCRIPTION_EXAMPLE }) description?: string; @IsOptional() @ValidateLocations_2024_06_14() + @DocsProperty({ + description: + "Locations where the event will take place. If not provided, cal video link will be used as the location.", + oneOf: [ + { $ref: getSchemaPath(AddressLocation_2024_06_14) }, + { $ref: getSchemaPath(LinkLocation_2024_06_14) }, + { $ref: getSchemaPath(IntegrationLocation_2024_06_14) }, + { $ref: getSchemaPath(PhoneLocation_2024_06_14) }, + ], + type: "array", + }) + @Type(() => Object) locations?: Location_2024_06_14[]; @IsOptional() @ValidateInputBookingFields_2024_06_14() + @DocsProperty({ + description: + "Custom fields that can be added to the booking form when the event is booked by someone. By default booking form has name and email field.", + oneOf: [ + { $ref: getSchemaPath(PhoneFieldInput_2024_06_14) }, + { $ref: getSchemaPath(AddressFieldInput_2024_06_14) }, + { $ref: getSchemaPath(TextFieldInput_2024_06_14) }, + { $ref: getSchemaPath(NumberFieldInput_2024_06_14) }, + { $ref: getSchemaPath(TextAreaFieldInput_2024_06_14) }, + { $ref: getSchemaPath(SelectFieldInput_2024_06_14) }, + { $ref: getSchemaPath(MultiSelectFieldInput_2024_06_14) }, + { $ref: getSchemaPath(MultiEmailFieldInput_2024_06_14) }, + { $ref: getSchemaPath(CheckboxGroupFieldInput_2024_06_14) }, + { $ref: getSchemaPath(RadioGroupFieldInput_2024_06_14) }, + { $ref: getSchemaPath(BooleanFieldInput_2024_06_14) }, + ], + type: "array", + }) + @Type(() => Object) bookingFields?: InputBookingField_2024_06_14[]; @IsBoolean() @IsOptional() + @DocsProperty({ description: "If true, person booking this event't cant add guests via their emails." }) disableGuests?: boolean; @IsInt() @IsOptional() + @DocsProperty({ + description: `Number representing length of each slot when event is booked. By default it equal length of the event type. + If event length is 60 minutes then we would have slots 9AM, 10AM, 11AM etc. but if it was changed to 30 minutes then + we would have slots 9AM, 9:30AM, 10AM, 10:30AM etc. as the available times to book the 60 minute event.`, + }) slotInterval?: number; @IsInt() @Min(0) @IsOptional() + @DocsProperty({ description: "Minimum number of minutes before the event that a booking can be made." }) minimumBookingNotice?: number; @IsInt() @IsOptional() + @DocsProperty({ + description: "Time spaces that can be pre-pended before an event to give more time before it.", + }) beforeEventBuffer?: number; @IsInt() @IsOptional() + @DocsProperty({ + description: "Time spaces that can be appended after an event to give more time after it.", + }) afterEventBuffer?: number; @IsInt() @IsOptional() + @DocsProperty({ + description: + "If you want that this event has different schedule than user's default one you can specify it here.", + }) scheduleId?: number; @IsOptional() @Type(() => BookingLimitsCount_2024_06_14) @ValidateBookingLimistsCount() + @DocsProperty({ description: "Limit how many times this event can be booked" }) bookingLimitsCount?: BookingLimitsCount_2024_06_14; @IsOptional() @IsBoolean() + @DocsProperty({ + description: + "This will limit your availability for this event type to one slot per day, scheduled at the earliest available time.", + }) onlyShowFirstAvailableSlot?: boolean; @IsOptional() @Type(() => BookingLimitsDuration_2024_06_14) @ValidateBookingLimistsDuration() + @DocsProperty({ description: "Limit total amount of time that this event can be booked" }) bookingLimitsDuration?: BookingLimitsDuration_2024_06_14; @IsOptional() @ValidateBookingWindow() + @DocsProperty({ + description: "Limit how far in the future this event can be booked", + oneOf: [ + { $ref: getSchemaPath(BusinessDaysWindow_2024_06_14) }, + { $ref: getSchemaPath(CalendarDaysWindow_2024_06_14) }, + { $ref: getSchemaPath(RangeWindow_2024_06_14) }, + ], + type: "array", + }) + @Type(() => Object) bookingWindow?: BookingWindow_2024_06_14; @IsOptional() @IsInt() @Min(1) + @DocsProperty({ description: "Offset timeslots shown to bookers by a specified number of minutes" }) offsetStart?: number; @IsOptional() @ValidateNested() @Type(() => Recurrence_2024_06_14) + @DocsProperty({ + description: "Create a recurring event that can be booked once but will occur multiple times", + }) recurrence?: Recurrence_2024_06_14; } -export class UpdateTeamEventTypeInput_2024_06_14 { - @IsOptional() - @IsInt() - @Min(1) - @DocsProperty() - lengthInMinutes?: number; - - @IsOptional() - @IsString() - @DocsProperty() - title?: string; - - @IsString() - @IsOptional() - @DocsProperty() - slug?: string; - - @IsOptional() - @IsString() - @DocsProperty() - description?: string; - - @IsOptional() - @ValidateLocations_2024_06_14() - @DocsProperty() - locations?: Location_2024_06_14[]; - - @IsOptional() - @ValidateInputBookingFields_2024_06_14() - @DocsProperty() - bookingFields?: InputBookingField_2024_06_14[]; - - @IsBoolean() - @IsOptional() - @DocsProperty() - disableGuests?: boolean; - - @IsInt() - @IsOptional() - @DocsProperty() - slotInterval?: number; - - @IsInt() - @Min(0) - @IsOptional() - @DocsProperty() - minimumBookingNotice?: number; - - @IsInt() - @IsOptional() - @DocsProperty() - beforeEventBuffer?: number; - - @IsInt() - @IsOptional() - @DocsProperty() - afterEventBuffer?: number; +@ApiExtraModels( + AddressLocation_2024_06_14, + LinkLocation_2024_06_14, + IntegrationLocation_2024_06_14, + PhoneLocation_2024_06_14, + PhoneFieldInput_2024_06_14, + AddressFieldInput_2024_06_14, + TextFieldInput_2024_06_14, + NumberFieldInput_2024_06_14, + TextAreaFieldInput_2024_06_14, + SelectFieldInput_2024_06_14, + MultiSelectFieldInput_2024_06_14, + MultiEmailFieldInput_2024_06_14, + CheckboxGroupFieldInput_2024_06_14, + RadioGroupFieldInput_2024_06_14, + BooleanFieldInput_2024_06_14, + BusinessDaysWindow_2024_06_14, + CalendarDaysWindow_2024_06_14, + RangeWindow_2024_06_14 +) +export class UpdateTeamEventTypeInput_2024_06_14 extends UpdateEventTypeInput_2024_06_14 { @ValidateNested({ each: true }) @Type(() => Host) @IsArray() @@ -162,33 +249,8 @@ export class UpdateTeamEventTypeInput_2024_06_14 { @IsBoolean() @IsOptional() @DocsProperty() + @DocsProperty({ + description: "If true, all current and future team members will be assigned to this event type", + }) assignAllTeamMembers?: boolean; - - @IsOptional() - @Type(() => BookingLimitsCount_2024_06_14) - @ValidateBookingLimistsCount() - bookingLimitsCount?: BookingLimitsCount_2024_06_14; - - @IsOptional() - @IsBoolean() - onlyShowFirstAvailableSlot?: boolean; - - @IsOptional() - @Type(() => BookingLimitsDuration_2024_06_14) - @ValidateBookingLimistsDuration() - bookingLimitsDuration?: BookingLimitsDuration_2024_06_14; - - @IsOptional() - @ValidateBookingWindow() - bookingWindow?: BookingWindow_2024_06_14; - - @IsOptional() - @IsInt() - @Min(1) - offsetStart?: number; - - @IsOptional() - @ValidateNested() - @Type(() => Recurrence_2024_06_14) - recurrence?: Recurrence_2024_06_14; } diff --git a/packages/platform/types/event-types/event-types_2024_06_14/outputs/booking-fields.output.ts b/packages/platform/types/event-types/event-types_2024_06_14/outputs/booking-fields.output.ts index b33cb812a2f73b..4253f443ee77c1 100644 --- a/packages/platform/types/event-types/event-types_2024_06_14/outputs/booking-fields.output.ts +++ b/packages/platform/types/event-types/event-types_2024_06_14/outputs/booking-fields.output.ts @@ -1,4 +1,5 @@ import { BadRequestException } from "@nestjs/common"; +import { ApiProperty as DocsProperty } from "@nestjs/swagger"; import { plainToInstance } from "class-transformer"; import { IsBoolean, IsString } from "class-validator"; import type { ValidationOptions, ValidatorConstraintInterface } from "class-validator"; @@ -18,156 +19,295 @@ import { BooleanFieldInput_2024_06_14, } from "../inputs"; -class NameDefaultFieldOutput_2024_06_14 { +export class NameDefaultFieldOutput_2024_06_14 { @IsBoolean() + @DocsProperty({ + description: "This property is always true because it's a default field", + example: true, + default: true, + }) isDefault = true; @IsString() + @DocsProperty({ + default: "name", + }) slug!: "name"; @IsString() + @DocsProperty({ + default: "name", + }) type!: "name"; @IsBoolean() + @DocsProperty() required!: true; } -class EmailDefaultFieldOutput_2024_06_14 { +export class EmailDefaultFieldOutput_2024_06_14 { @IsBoolean() + @DocsProperty({ + description: "This property is always true because it's a default field", + example: true, + default: true, + }) isDefault = true; @IsString() + @DocsProperty({ + default: "email", + }) slug!: "email"; @IsString() + @DocsProperty({ + default: "email", + }) type!: "email"; @IsBoolean() + @DocsProperty() required!: true; } -class LocationDefaultFieldOutput_2024_06_14 { +export class LocationDefaultFieldOutput_2024_06_14 { @IsBoolean() + @DocsProperty({ + description: "This property is always true because it's a default field", + example: true, + default: true, + }) isDefault = true; @IsString() + @DocsProperty({ + default: "location", + }) slug!: "location"; @IsString() + @DocsProperty({ + default: "radioInput", + }) type!: "radioInput"; @IsBoolean() + @DocsProperty() required!: false; } -class RescheduleReasonDefaultFieldOutput_2024_06_14 { +export class RescheduleReasonDefaultFieldOutput_2024_06_14 { @IsBoolean() + @DocsProperty({ + description: "This property is always true because it's a default field", + example: true, + default: true, + }) isDefault = true; @IsString() + @DocsProperty({ + default: "rescheduleReason", + }) slug!: "rescheduleReason"; @IsString() + @DocsProperty({ + default: "textarea", + }) type!: "textarea"; @IsBoolean() + @DocsProperty() required!: false; } -class TitleDefaultFieldOutput_2024_06_14 { +export class TitleDefaultFieldOutput_2024_06_14 { @IsBoolean() + @DocsProperty({ + description: "This property is always true because it's a default field", + example: true, + default: true, + }) isDefault = true; @IsString() + @DocsProperty({ + default: "title", + }) slug!: "title"; @IsString() + @DocsProperty({ + default: "text", + }) type!: "text"; @IsBoolean() + @DocsProperty() required!: true; } -class NotesDefaultFieldOutput_2024_06_14 { +export class NotesDefaultFieldOutput_2024_06_14 { @IsBoolean() + @DocsProperty({ + description: "This property is always true because it's a default field", + example: true, + default: true, + }) isDefault = true; @IsString() + @DocsProperty({ + default: "notes", + }) slug!: "notes"; @IsString() + @DocsProperty({ + default: "textarea", + }) type!: "textarea"; @IsBoolean() + @DocsProperty() required!: false; } -class GuestsDefaultFieldOutput_2024_06_14 { +export class GuestsDefaultFieldOutput_2024_06_14 { @IsBoolean() + @DocsProperty({ + description: "This property is always true because it's a default field", + example: true, + default: true, + }) isDefault = true; @IsString() + @DocsProperty({ + default: "guests", + }) slug!: "guests"; @IsString() + @DocsProperty({ + default: "multiemail", + }) type!: "multiemail"; @IsBoolean() + @DocsProperty() required!: false; } -class PhoneFieldOutput_2024_06_14 extends PhoneFieldInput_2024_06_14 { +export class PhoneFieldOutput_2024_06_14 extends PhoneFieldInput_2024_06_14 { @IsBoolean() + @DocsProperty({ + description: "This property is always false because it's not default field but custom field", + example: false, + default: false, + }) isDefault = false; } -class AddressFieldOutput_2024_06_14 extends AddressFieldInput_2024_06_14 { +export class AddressFieldOutput_2024_06_14 extends AddressFieldInput_2024_06_14 { @IsBoolean() + @DocsProperty({ + description: "This property is always false because it's not default field but custom field", + example: false, + default: false, + }) isDefault = false; } -class TextFieldOutput_2024_06_14 extends TextFieldInput_2024_06_14 { +export class TextFieldOutput_2024_06_14 extends TextFieldInput_2024_06_14 { @IsBoolean() + @DocsProperty({ + description: "This property is always false because it's not default field but custom field", + example: false, + default: false, + }) isDefault = false; } -class NumberFieldOutput_2024_06_14 extends NumberFieldInput_2024_06_14 { +export class NumberFieldOutput_2024_06_14 extends NumberFieldInput_2024_06_14 { @IsBoolean() + @DocsProperty({ + description: "This property is always false because it's not default field but custom field", + example: false, + default: false, + }) isDefault = false; } -class TextAreaFieldOutput_2024_06_14 extends TextAreaFieldInput_2024_06_14 { +export class TextAreaFieldOutput_2024_06_14 extends TextAreaFieldInput_2024_06_14 { @IsBoolean() + @DocsProperty({ + description: "This property is always false because it's not default field but custom field", + example: false, + default: false, + }) isDefault = false; } -class SelectFieldOutput_2024_06_14 extends SelectFieldInput_2024_06_14 { +export class SelectFieldOutput_2024_06_14 extends SelectFieldInput_2024_06_14 { @IsBoolean() + @DocsProperty({ + description: "This property is always false because it's not default field but custom field", + example: false, + default: false, + }) isDefault = false; } -class MultiSelectFieldOutput_2024_06_14 extends MultiSelectFieldInput_2024_06_14 { +export class MultiSelectFieldOutput_2024_06_14 extends MultiSelectFieldInput_2024_06_14 { @IsBoolean() + @DocsProperty({ + description: "This property is always false because it's not default field but custom field", + example: false, + default: false, + }) isDefault = false; } -class MultiEmailFieldOutput_2024_06_14 extends MultiEmailFieldInput_2024_06_14 { +export class MultiEmailFieldOutput_2024_06_14 extends MultiEmailFieldInput_2024_06_14 { @IsBoolean() + @DocsProperty({ + description: "This property is always false because it's not default field but custom field", + example: false, + default: false, + }) isDefault = false; } -class CheckboxGroupFieldOutput_2024_06_14 extends CheckboxGroupFieldInput_2024_06_14 { +export class CheckboxGroupFieldOutput_2024_06_14 extends CheckboxGroupFieldInput_2024_06_14 { @IsBoolean() + @DocsProperty({ + description: "This property is always false because it's not default field but custom field", + example: false, + default: false, + }) isDefault = false; } -class RadioGroupFieldOutput_2024_06_14 extends RadioGroupFieldInput_2024_06_14 { +export class RadioGroupFieldOutput_2024_06_14 extends RadioGroupFieldInput_2024_06_14 { @IsBoolean() + @DocsProperty({ + description: "This property is always false because it's not default field but custom field", + example: false, + default: false, + }) isDefault = false; } -class BooleanFieldOutput_2024_06_14 extends BooleanFieldInput_2024_06_14 { +export class BooleanFieldOutput_2024_06_14 extends BooleanFieldInput_2024_06_14 { @IsBoolean() + @DocsProperty({ + description: "This property is always false because it's not default field but custom field", + example: false, + default: false, + }) isDefault = false; } diff --git a/packages/platform/types/event-types/event-types_2024_06_14/outputs/event-type.output.ts b/packages/platform/types/event-types/event-types_2024_06_14/outputs/event-type.output.ts index 6e5e7d0e339841..5166aea7540667 100644 --- a/packages/platform/types/event-types/event-types_2024_06_14/outputs/event-type.output.ts +++ b/packages/platform/types/event-types/event-types_2024_06_14/outputs/event-type.output.ts @@ -1,4 +1,4 @@ -import { ApiProperty as DocsProperty } from "@nestjs/swagger"; +import { ApiProperty as DocsProperty, getSchemaPath, ApiExtraModels } from "@nestjs/swagger"; import { Type } from "class-transformer"; import { IsArray, @@ -12,10 +12,42 @@ import { } from "class-validator"; import type { Location_2024_06_14, BookingWindow_2024_06_14 } from "../inputs"; -import { Host as TeamEventTypeHostInput, BookingLimitsDuration_2024_06_14 } from "../inputs"; +import { + Host as TeamEventTypeHostInput, + BookingLimitsDuration_2024_06_14, + BusinessDaysWindow_2024_06_14, + CalendarDaysWindow_2024_06_14, + RangeWindow_2024_06_14, +} from "../inputs"; import { Recurrence_2024_06_14 } from "../inputs"; -import type { BookingLimitsCount_2024_06_14 } from "../inputs/booking-limits-count.input"; -import { ValidateLocations_2024_06_14 } from "../inputs/locations.input"; +import { BookingLimitsCount_2024_06_14 } from "../inputs/booking-limits-count.input"; +import { + AddressLocation_2024_06_14, + IntegrationLocation_2024_06_14, + LinkLocation_2024_06_14, + PhoneLocation_2024_06_14, + ValidateLocations_2024_06_14, +} from "../inputs/locations.input"; +import { + EmailDefaultFieldOutput_2024_06_14, + NameDefaultFieldOutput_2024_06_14, + LocationDefaultFieldOutput_2024_06_14, + RescheduleReasonDefaultFieldOutput_2024_06_14, + TitleDefaultFieldOutput_2024_06_14, + NotesDefaultFieldOutput_2024_06_14, + GuestsDefaultFieldOutput_2024_06_14, + AddressFieldOutput_2024_06_14, + BooleanFieldOutput_2024_06_14, + CheckboxGroupFieldOutput_2024_06_14, + MultiEmailFieldOutput_2024_06_14, + MultiSelectFieldOutput_2024_06_14, + NumberFieldOutput_2024_06_14, + PhoneFieldOutput_2024_06_14, + RadioGroupFieldOutput_2024_06_14, + SelectFieldOutput_2024_06_14, + TextAreaFieldOutput_2024_06_14, + TextFieldOutput_2024_06_14, +} from "../outputs/booking-fields.output"; import type { OutputBookingField_2024_06_14 } from "./booking-fields.output"; import { ValidateOutputBookingFields_2024_06_14 } from "./booking-fields.output"; @@ -52,239 +84,250 @@ class User_2024_06_14 { metadata!: Record; } -export class EventTypeOutput_2024_06_14 { +@ApiExtraModels( + AddressLocation_2024_06_14, + LinkLocation_2024_06_14, + IntegrationLocation_2024_06_14, + PhoneLocation_2024_06_14, + EmailDefaultFieldOutput_2024_06_14, + NameDefaultFieldOutput_2024_06_14, + LocationDefaultFieldOutput_2024_06_14, + RescheduleReasonDefaultFieldOutput_2024_06_14, + TitleDefaultFieldOutput_2024_06_14, + NotesDefaultFieldOutput_2024_06_14, + GuestsDefaultFieldOutput_2024_06_14, + AddressFieldOutput_2024_06_14, + BooleanFieldOutput_2024_06_14, + CheckboxGroupFieldOutput_2024_06_14, + MultiEmailFieldOutput_2024_06_14, + MultiSelectFieldOutput_2024_06_14, + NumberFieldOutput_2024_06_14, + PhoneFieldOutput_2024_06_14, + RadioGroupFieldOutput_2024_06_14, + SelectFieldOutput_2024_06_14, + TextAreaFieldOutput_2024_06_14, + TextFieldOutput_2024_06_14, + BookingLimitsDuration_2024_06_14, + BusinessDaysWindow_2024_06_14, + CalendarDaysWindow_2024_06_14, + RangeWindow_2024_06_14 +) +class BaseEventTypeOutput_2024_06_14 { @IsInt() @DocsProperty({ example: 1 }) id!: number; - @IsInt() - ownerId!: number; - @IsInt() @Min(1) + @DocsProperty({ example: 60 }) lengthInMinutes!: number; @IsString() + @DocsProperty({ example: "Learn the secrets of masterchief!" }) title!: string; @IsString() + @DocsProperty({ example: "learn-the-secrets-of-masterchief" }) slug!: string; @IsString() + @DocsProperty({ + example: "Discover the culinary wonders of the Argentina by making the best flan ever!", + }) description!: string; @ValidateLocations_2024_06_14() + @DocsProperty({ + oneOf: [ + { $ref: getSchemaPath(AddressLocation_2024_06_14) }, + { $ref: getSchemaPath(LinkLocation_2024_06_14) }, + { $ref: getSchemaPath(IntegrationLocation_2024_06_14) }, + { $ref: getSchemaPath(PhoneLocation_2024_06_14) }, + ], + type: "array", + }) + @Type(() => Object) locations!: Location_2024_06_14[]; @ValidateOutputBookingFields_2024_06_14() + @DocsProperty({ + oneOf: [ + { $ref: getSchemaPath(NameDefaultFieldOutput_2024_06_14) }, + { $ref: getSchemaPath(EmailDefaultFieldOutput_2024_06_14) }, + { $ref: getSchemaPath(LocationDefaultFieldOutput_2024_06_14) }, + { $ref: getSchemaPath(RescheduleReasonDefaultFieldOutput_2024_06_14) }, + { $ref: getSchemaPath(TitleDefaultFieldOutput_2024_06_14) }, + { $ref: getSchemaPath(NotesDefaultFieldOutput_2024_06_14) }, + { $ref: getSchemaPath(GuestsDefaultFieldOutput_2024_06_14) }, + { $ref: getSchemaPath(PhoneFieldOutput_2024_06_14) }, + { $ref: getSchemaPath(AddressFieldOutput_2024_06_14) }, + { $ref: getSchemaPath(TextFieldOutput_2024_06_14) }, + { $ref: getSchemaPath(NumberFieldOutput_2024_06_14) }, + { $ref: getSchemaPath(TextAreaFieldOutput_2024_06_14) }, + { $ref: getSchemaPath(SelectFieldOutput_2024_06_14) }, + { $ref: getSchemaPath(MultiSelectFieldOutput_2024_06_14) }, + { $ref: getSchemaPath(MultiEmailFieldOutput_2024_06_14) }, + { $ref: getSchemaPath(CheckboxGroupFieldOutput_2024_06_14) }, + { $ref: getSchemaPath(RadioGroupFieldOutput_2024_06_14) }, + { $ref: getSchemaPath(BooleanFieldOutput_2024_06_14) }, + ], + type: "array", + }) + @Type(() => Object) bookingFields!: OutputBookingField_2024_06_14[]; @IsBoolean() + @DocsProperty() disableGuests!: boolean; @IsInt() @IsOptional() + @DocsProperty({ example: 60, type: Number }) slotInterval?: number | null; @IsInt() @Min(0) @IsOptional() + @DocsProperty({ example: 0 }) minimumBookingNotice?: number; @IsInt() @IsOptional() + @DocsProperty({ example: 0 }) beforeEventBuffer?: number; @IsInt() @IsOptional() + @DocsProperty({ example: 0 }) afterEventBuffer?: number; - @IsEnum(SchedulingTypeEnum) - schedulingType!: EventTypesOutputSchedulingType | null; - @Type(() => Recurrence_2024_06_14) + @DocsProperty() recurrence!: Recurrence_2024_06_14 | null; @Type(() => Object) + @DocsProperty() metadata!: Record; @IsBoolean() + @DocsProperty() requiresConfirmation!: boolean; @IsInt() + @DocsProperty() price!: number; @IsString() + @DocsProperty() currency!: string; @IsBoolean() + @DocsProperty() lockTimeZoneToggleOnBookingPage!: boolean; @IsInt() + @DocsProperty() seatsPerTimeSlot!: number | null; @IsBoolean() + @DocsProperty() forwardParamsSuccessRedirect!: boolean | null; @IsString() + @DocsProperty() successRedirectUrl!: string | null; @IsBoolean() + @DocsProperty() seatsShowAvailabilityCount!: boolean | null; - @IsBoolean() - isInstantEvent!: boolean; - - users!: User_2024_06_14[]; - @IsInt() + @DocsProperty() scheduleId!: number | null; @IsOptional() + @DocsProperty() + @Type(() => BookingLimitsCount_2024_06_14) bookingLimitsCount?: BookingLimitsCount_2024_06_14; @IsOptional() @IsBoolean() + @DocsProperty() onlyShowFirstAvailableSlot?: boolean; @IsOptional() @Type(() => BookingLimitsDuration_2024_06_14) + @DocsProperty() bookingLimitsDuration?: BookingLimitsDuration_2024_06_14; @IsOptional() + @DocsProperty({ + description: "Limit how far in the future this event can be booked", + oneOf: [ + { $ref: getSchemaPath(BusinessDaysWindow_2024_06_14) }, + { $ref: getSchemaPath(CalendarDaysWindow_2024_06_14) }, + { $ref: getSchemaPath(RangeWindow_2024_06_14) }, + ], + type: "array", + }) + @Type(() => Object) bookingWindow?: BookingWindow_2024_06_14; @IsOptional() @IsInt() @Min(1) + @DocsProperty() offsetStart?: number; } export class TeamEventTypeResponseHost extends TeamEventTypeHostInput { @IsString() + @DocsProperty({ example: "John Doe" }) name!: string; } -export class TeamEventTypeOutput_2024_06_14 { +export class EventTypeOutput_2024_06_14 extends BaseEventTypeOutput_2024_06_14 { @IsInt() - @DocsProperty({ example: 1 }) - id!: number; - - @IsInt() - @Min(1) - lengthInMinutes!: number; - - @IsString() - title!: string; - - @IsString() - slug!: string; - - @IsString() - description!: string; - - @ValidateLocations_2024_06_14() - locations!: Location_2024_06_14[]; - - @ValidateOutputBookingFields_2024_06_14() - bookingFields!: OutputBookingField_2024_06_14[]; - - @IsBoolean() - disableGuests!: boolean; - - @IsInt() - @IsOptional() - slotInterval?: number | null; - - @IsInt() - @Min(0) - @IsOptional() - minimumBookingNotice?: number; - - @IsInt() - @IsOptional() - beforeEventBuffer?: number; + @DocsProperty({ example: 10 }) + ownerId!: number; - @IsInt() - @IsOptional() - afterEventBuffer?: number; + @Type(() => User_2024_06_14) + @IsArray() + @DocsProperty() + users!: User_2024_06_14[]; +} +export class TeamEventTypeOutput_2024_06_14 extends BaseEventTypeOutput_2024_06_14 { @IsEnum(SchedulingTypeEnum) + @DocsProperty({ enum: SchedulingTypeEnum }) schedulingType!: EventTypesOutputSchedulingType | null; - @Type(() => Recurrence_2024_06_14) - recurrence!: Recurrence_2024_06_14 | null; - - @Type(() => Object) - metadata!: Record; - - @IsBoolean() - requiresConfirmation!: boolean; - - @IsInt() - price!: number; - - @IsString() - currency!: string; - - @IsBoolean() - lockTimeZoneToggleOnBookingPage!: boolean; - - @IsInt() - seatsPerTimeSlot!: number | null; - - @IsBoolean() - forwardParamsSuccessRedirect!: boolean | null; - - @IsString() - successRedirectUrl!: string | null; - - @IsBoolean() - seatsShowAvailabilityCount!: boolean | null; - - @IsBoolean() - isInstantEvent!: boolean; - - @IsInt() - scheduleId!: number | null; - @IsInt() @IsOptional() + @DocsProperty() teamId?: number | null; @IsInt() @IsOptional() + @DocsProperty() ownerId?: number | null; @IsInt() @IsOptional() + @DocsProperty({ + description: + "For managed event types parent event type is the event type that this event type is based on", + }) parentEventTypeId?: number | null; @ValidateNested({ each: true }) @Type(() => TeamEventTypeResponseHost) @IsArray() + @DocsProperty() hosts!: TeamEventTypeResponseHost[]; @IsBoolean() @IsOptional() + @DocsProperty() assignAllTeamMembers?: boolean; - - @IsOptional() - bookingLimitsCount?: BookingLimitsCount_2024_06_14; - - @IsOptional() - @IsBoolean() - onlyShowFirstAvailableSlot?: boolean; - - @IsOptional() - @Type(() => BookingLimitsDuration_2024_06_14) - bookingLimitsDuration?: BookingLimitsDuration_2024_06_14; - - @IsOptional() - bookingWindow?: BookingWindow_2024_06_14; - - @IsOptional() - @IsInt() - @Min(1) - offsetStart?: number; } diff --git a/packages/platform/types/schedules/schedules-2024-06-11/inputs/create-schedule.input.ts b/packages/platform/types/schedules/schedules-2024-06-11/inputs/create-schedule.input.ts index 4dd63e99997ad4..106b800ff13849 100644 --- a/packages/platform/types/schedules/schedules-2024-06-11/inputs/create-schedule.input.ts +++ b/packages/platform/types/schedules/schedules-2024-06-11/inputs/create-schedule.input.ts @@ -18,17 +18,21 @@ import { TIME_FORMAT_HH_MM, WEEK_DAYS } from "../constants"; export class ScheduleAvailabilityInput_2024_06_11 { @IsArray() @IsIn(WEEK_DAYS, { each: true }) - @ApiProperty({ example: ["Monday", "Tuesday"] }) + @ApiProperty({ + example: ["Monday", "Tuesday"], + description: "Array of days when schedule is active.", + enum: WEEK_DAYS, + }) days!: WeekDay[]; @IsString() @Matches(TIME_FORMAT_HH_MM, { message: "startTime must be a valid time format HH:MM" }) - @ApiProperty({ example: "09:00" }) + @ApiProperty({ example: "08:00", description: "startTime must be a valid time in format HH:MM e.g. 08:00" }) startTime!: string; @IsString() @Matches(TIME_FORMAT_HH_MM, { message: "endTime must be a valid time format HH:MM" }) - @ApiProperty({ example: "10:00" }) + @ApiProperty({ example: "15:00", description: "endTime must be a valid time in format HH:MM e.g. 15:00" }) endTime!: string; } @@ -39,22 +43,25 @@ export class ScheduleOverrideInput_2024_06_11 { @IsString() @Matches(TIME_FORMAT_HH_MM, { message: "startTime must be a valid time format HH:MM" }) - @ApiProperty({ example: "12:00" }) + @ApiProperty({ example: "12:00", description: "startTime must be a valid time in format HH:MM e.g. 12:00" }) startTime!: string; @IsString() @Matches(TIME_FORMAT_HH_MM, { message: "endTime must be a valid time format HH:MM" }) - @ApiProperty({ example: "13:00" }) + @ApiProperty({ example: "13:00", description: "endTime must be a valid time in format HH:MM e.g. 13:00" }) endTime!: string; } export class CreateScheduleInput_2024_06_11 { @IsString() - @ApiProperty({ example: "One-on-one coaching" }) + @ApiProperty({ example: "Catch up hours" }) name!: string; @IsTimeZone() - @ApiProperty({ example: "Europe/Rome" }) + @ApiProperty({ + example: "Europe/Rome", + description: "Timezone is used to calculate available times when an event using the schedule is booked.", + }) timeZone!: string; @IsArray() @@ -63,11 +70,18 @@ export class CreateScheduleInput_2024_06_11 { @Type(() => ScheduleAvailabilityInput_2024_06_11) @ApiProperty({ type: [ScheduleAvailabilityInput_2024_06_11], + description: + "Each object contains days and times when the user is available. If not passed, the default availability is Monday to Friday from 09:00 to 17:00.", example: [ { days: ["Monday", "Tuesday"], - startTime: "09:00", - endTime: "10:00", + startTime: "17:00", + endTime: "19:00", + }, + { + days: ["Wednesday", "Thursday"], + startTime: "16:00", + endTime: "20:00", }, ], required: false, @@ -75,7 +89,11 @@ export class CreateScheduleInput_2024_06_11 { availability?: ScheduleAvailabilityInput_2024_06_11[]; @IsBoolean() - @ApiProperty({ example: true }) + @ApiProperty({ + example: true, + description: `Each user should have 1 default schedule. If you specified \`timeZone\` when creating managed user, then the default schedule will be created with that timezone. + Default schedule means that if an event type is not tied to a specific schedule then the default schedule is used.`, + }) isDefault!: boolean; @IsArray() @@ -84,11 +102,12 @@ export class CreateScheduleInput_2024_06_11 { @Type(() => ScheduleOverrideInput_2024_06_11) @ApiProperty({ type: [ScheduleOverrideInput_2024_06_11], + description: "Need to change availability for a specific date? Add an override.", example: [ { date: "2024-05-20", - startTime: "12:00", - endTime: "14:00", + startTime: "18:00", + endTime: "21:00", }, ], required: false, diff --git a/packages/platform/types/schedules/schedules-2024-06-11/outputs/schedule.output.ts b/packages/platform/types/schedules/schedules-2024-06-11/outputs/schedule.output.ts index 13c1bcbf3977d0..f00b493590d087 100644 --- a/packages/platform/types/schedules/schedules-2024-06-11/outputs/schedule.output.ts +++ b/packages/platform/types/schedules/schedules-2024-06-11/outputs/schedule.output.ts @@ -25,7 +25,7 @@ export class ScheduleOutput_2024_06_11 { ownerId!: number; @IsString() - @ApiProperty({ example: "One-on-one coaching" }) + @ApiProperty({ example: "Catch up hours" }) name!: string; @IsTimeZone() @@ -40,8 +40,13 @@ export class ScheduleOutput_2024_06_11 { example: [ { days: ["Monday", "Tuesday"], - startTime: "09:00", - endTime: "10:00", + startTime: "17:00", + endTime: "19:00", + }, + { + days: ["Wednesday", "Thursday"], + startTime: "16:00", + endTime: "20:00", }, ], }) @@ -60,8 +65,8 @@ export class ScheduleOutput_2024_06_11 { example: [ { date: "2024-05-20", - startTime: "12:00", - endTime: "13:00", + startTime: "18:00", + endTime: "21:00", }, ], })