diff --git a/apps/api/v2/src/app.controller.ts b/apps/api/v2/src/app.controller.ts index 080e1ac4b7..82295bce91 100644 --- a/apps/api/v2/src/app.controller.ts +++ b/apps/api/v2/src/app.controller.ts @@ -3,8 +3,6 @@ import { Controller, Get, Version, VERSION_NEUTRAL } from "@nestjs/common"; import { ApiTags as DocsTags, ApiExcludeController as DocsExcludeController } from "@nestjs/swagger"; @Controller() -@DocsTags("Health - development only") -@DocsExcludeController(getEnv("NODE_ENV") === "production") export class AppController { @Get("health") @Version(VERSION_NEUTRAL) diff --git a/apps/api/v2/src/modules/oauth-clients/controllers/oauth-clients/oauth-clients.controller.ts b/apps/api/v2/src/modules/oauth-clients/controllers/oauth-clients/oauth-clients.controller.ts index bc9d941288..ac61c7d048 100644 --- a/apps/api/v2/src/modules/oauth-clients/controllers/oauth-clients/oauth-clients.controller.ts +++ b/apps/api/v2/src/modules/oauth-clients/controllers/oauth-clients/oauth-clients.controller.ts @@ -52,8 +52,6 @@ Second, make sure that the logged in user has organizationId set to pass the Org version: API_VERSIONS_VALUES, }) @UseGuards(NextAuthGuard, OrganizationRolesGuard) -@DocsExcludeController(getEnv("NODE_ENV") === "production") -@DocsTags("OAuth - development only") export class OAuthClientsController { private readonly logger = new Logger("OAuthClientController"); diff --git a/apps/api/v2/swagger/documentation.json b/apps/api/v2/swagger/documentation.json index de7a64c438..ce98a4dd67 100644 --- a/apps/api/v2/swagger/documentation.json +++ b/apps/api/v2/swagger/documentation.json @@ -4035,27 +4035,6 @@ ] } }, - "/health": { - "get": { - "operationId": "AppController_getHealth", - "parameters": [], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - } - }, - "tags": [ - "Health - development only" - ] - } - }, "/v2/me": { "get": { "operationId": "MeController_getMe", @@ -4249,204 +4228,6 @@ ] } }, - "/v2/oauth-clients": { - "post": { - "operationId": "OAuthClientsController_createOAuthClient", - "summary": "", - "description": "⚠️ First, this endpoint requires `Cookie: next-auth.session-token=eyJhbGciOiJ` header. Log into Cal web app using owner of organization that was created after visiting `/settings/organizations/new`, refresh swagger docs, and the cookie will be added to requests automatically to pass the NextAuthGuard.\nSecond, make sure that the logged in user has organizationId set to pass the OrganizationRolesGuard guard.", - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateOAuthClientInput" - } - } - } - }, - "responses": { - "201": { - "description": "Create an OAuth client", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateOAuthClientResponseDto" - } - } - } - } - }, - "tags": [ - "OAuth - development only" - ] - }, - "get": { - "operationId": "OAuthClientsController_getOAuthClients", - "summary": "", - "description": "⚠️ First, this endpoint requires `Cookie: next-auth.session-token=eyJhbGciOiJ` header. Log into Cal web app using owner of organization that was created after visiting `/settings/organizations/new`, refresh swagger docs, and the cookie will be added to requests automatically to pass the NextAuthGuard.\nSecond, make sure that the logged in user has organizationId set to pass the OrganizationRolesGuard guard.", - "parameters": [], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetOAuthClientsResponseDto" - } - } - } - } - }, - "tags": [ - "OAuth - development only" - ] - } - }, - "/v2/oauth-clients/{clientId}": { - "get": { - "operationId": "OAuthClientsController_getOAuthClientById", - "summary": "", - "description": "⚠️ First, this endpoint requires `Cookie: next-auth.session-token=eyJhbGciOiJ` header. Log into Cal web app using owner of organization that was created after visiting `/settings/organizations/new`, refresh swagger docs, and the cookie will be added to requests automatically to pass the NextAuthGuard.\nSecond, make sure that the logged in user has organizationId set to pass the OrganizationRolesGuard guard.", - "parameters": [ - { - "name": "clientId", - "required": true, - "in": "path", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetOAuthClientResponseDto" - } - } - } - } - }, - "tags": [ - "OAuth - development only" - ] - }, - "patch": { - "operationId": "OAuthClientsController_updateOAuthClient", - "summary": "", - "description": "⚠️ First, this endpoint requires `Cookie: next-auth.session-token=eyJhbGciOiJ` header. Log into Cal web app using owner of organization that was created after visiting `/settings/organizations/new`, refresh swagger docs, and the cookie will be added to requests automatically to pass the NextAuthGuard.\nSecond, make sure that the logged in user has organizationId set to pass the OrganizationRolesGuard guard.", - "parameters": [ - { - "name": "clientId", - "required": true, - "in": "path", - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateOAuthClientInput" - } - } - } - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetOAuthClientResponseDto" - } - } - } - } - }, - "tags": [ - "OAuth - development only" - ] - }, - "delete": { - "operationId": "OAuthClientsController_deleteOAuthClient", - "summary": "", - "description": "⚠️ First, this endpoint requires `Cookie: next-auth.session-token=eyJhbGciOiJ` header. Log into Cal web app using owner of organization that was created after visiting `/settings/organizations/new`, refresh swagger docs, and the cookie will be added to requests automatically to pass the NextAuthGuard.\nSecond, make sure that the logged in user has organizationId set to pass the OrganizationRolesGuard guard.", - "parameters": [ - { - "name": "clientId", - "required": true, - "in": "path", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetOAuthClientResponseDto" - } - } - } - } - }, - "tags": [ - "OAuth - development only" - ] - } - }, - "/v2/oauth-clients/{clientId}/managed-users": { - "get": { - "operationId": "OAuthClientsController_getOAuthClientManagedUsersById", - "summary": "", - "description": "⚠️ First, this endpoint requires `Cookie: next-auth.session-token=eyJhbGciOiJ` header. Log into Cal web app using owner of organization that was created after visiting `/settings/organizations/new`, refresh swagger docs, and the cookie will be added to requests automatically to pass the NextAuthGuard.\nSecond, make sure that the logged in user has organizationId set to pass the OrganizationRolesGuard guard.", - "parameters": [ - { - "name": "clientId", - "required": true, - "in": "path", - "schema": { - "type": "string" - } - }, - { - "name": "limit", - "required": false, - "in": "query", - "description": "The number of items to return", - "example": 10, - "schema": { - "type": "number" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetManagedUsersOutput" - } - } - } - } - }, - "tags": [ - "OAuth - development only" - ] - } - }, "/v2/schedules": { "post": { "operationId": "SchedulesController_2024_06_11_createSchedule", @@ -8628,6 +8409,9 @@ }, "bookingLimits": { "type": "string" + }, + "includeManagedEventsInLimits": { + "type": "boolean" } } }, diff --git a/docs/api-reference/v2/openapi.json b/docs/api-reference/v2/openapi.json index 3ec0a9b29c..b595f935e8 100644 --- a/docs/api-reference/v2/openapi.json +++ b/docs/api-reference/v2/openapi.json @@ -3826,25 +3826,6 @@ "tags": ["Event Types / Webhooks"] } }, - "/health": { - "get": { - "operationId": "AppController_getHealth", - "parameters": [], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "type": "string" - } - } - } - } - }, - "tags": ["Health - development only"] - } - }, "/v2/me": { "get": { "operationId": "MeController_getMe", @@ -4027,192 +4008,6 @@ "tags": ["OAuth", "Managed users"] } }, - "/v2/oauth-clients": { - "post": { - "operationId": "OAuthClientsController_createOAuthClient", - "summary": "", - "description": "⚠️ First, this endpoint requires `Cookie: next-auth.session-token=eyJhbGciOiJ` header. Log into Cal web app using owner of organization that was created after visiting `/settings/organizations/new`, refresh swagger docs, and the cookie will be added to requests automatically to pass the NextAuthGuard.\nSecond, make sure that the logged in user has organizationId set to pass the OrganizationRolesGuard guard.", - "parameters": [], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateOAuthClientInput" - } - } - } - }, - "responses": { - "201": { - "description": "Create an OAuth client", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/CreateOAuthClientResponseDto" - } - } - } - } - }, - "tags": ["OAuth - development only"] - }, - "get": { - "operationId": "OAuthClientsController_getOAuthClients", - "summary": "", - "description": "⚠️ First, this endpoint requires `Cookie: next-auth.session-token=eyJhbGciOiJ` header. Log into Cal web app using owner of organization that was created after visiting `/settings/organizations/new`, refresh swagger docs, and the cookie will be added to requests automatically to pass the NextAuthGuard.\nSecond, make sure that the logged in user has organizationId set to pass the OrganizationRolesGuard guard.", - "parameters": [], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetOAuthClientsResponseDto" - } - } - } - } - }, - "tags": ["OAuth - development only"] - } - }, - "/v2/oauth-clients/{clientId}": { - "get": { - "operationId": "OAuthClientsController_getOAuthClientById", - "summary": "", - "description": "⚠️ First, this endpoint requires `Cookie: next-auth.session-token=eyJhbGciOiJ` header. Log into Cal web app using owner of organization that was created after visiting `/settings/organizations/new`, refresh swagger docs, and the cookie will be added to requests automatically to pass the NextAuthGuard.\nSecond, make sure that the logged in user has organizationId set to pass the OrganizationRolesGuard guard.", - "parameters": [ - { - "name": "clientId", - "required": true, - "in": "path", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetOAuthClientResponseDto" - } - } - } - } - }, - "tags": ["OAuth - development only"] - }, - "patch": { - "operationId": "OAuthClientsController_updateOAuthClient", - "summary": "", - "description": "⚠️ First, this endpoint requires `Cookie: next-auth.session-token=eyJhbGciOiJ` header. Log into Cal web app using owner of organization that was created after visiting `/settings/organizations/new`, refresh swagger docs, and the cookie will be added to requests automatically to pass the NextAuthGuard.\nSecond, make sure that the logged in user has organizationId set to pass the OrganizationRolesGuard guard.", - "parameters": [ - { - "name": "clientId", - "required": true, - "in": "path", - "schema": { - "type": "string" - } - } - ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/UpdateOAuthClientInput" - } - } - } - }, - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetOAuthClientResponseDto" - } - } - } - } - }, - "tags": ["OAuth - development only"] - }, - "delete": { - "operationId": "OAuthClientsController_deleteOAuthClient", - "summary": "", - "description": "⚠️ First, this endpoint requires `Cookie: next-auth.session-token=eyJhbGciOiJ` header. Log into Cal web app using owner of organization that was created after visiting `/settings/organizations/new`, refresh swagger docs, and the cookie will be added to requests automatically to pass the NextAuthGuard.\nSecond, make sure that the logged in user has organizationId set to pass the OrganizationRolesGuard guard.", - "parameters": [ - { - "name": "clientId", - "required": true, - "in": "path", - "schema": { - "type": "string" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetOAuthClientResponseDto" - } - } - } - } - }, - "tags": ["OAuth - development only"] - } - }, - "/v2/oauth-clients/{clientId}/managed-users": { - "get": { - "operationId": "OAuthClientsController_getOAuthClientManagedUsersById", - "summary": "", - "description": "⚠️ First, this endpoint requires `Cookie: next-auth.session-token=eyJhbGciOiJ` header. Log into Cal web app using owner of organization that was created after visiting `/settings/organizations/new`, refresh swagger docs, and the cookie will be added to requests automatically to pass the NextAuthGuard.\nSecond, make sure that the logged in user has organizationId set to pass the OrganizationRolesGuard guard.", - "parameters": [ - { - "name": "clientId", - "required": true, - "in": "path", - "schema": { - "type": "string" - } - }, - { - "name": "limit", - "required": false, - "in": "query", - "description": "The number of items to return", - "example": 10, - "schema": { - "type": "number" - } - } - ], - "responses": { - "200": { - "description": "", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/GetManagedUsersOutput" - } - } - } - } - }, - "tags": ["OAuth - development only"] - } - }, "/v2/schedules": { "post": { "operationId": "SchedulesController_2024_06_11_createSchedule", @@ -7912,6 +7707,9 @@ }, "bookingLimits": { "type": "string" + }, + "includeManagedEventsInLimits": { + "type": "boolean" } } }, @@ -10961,12 +10759,18 @@ }, "meetingUrl": { "type": "string", - "description": "Meeting URL just for this booking. Displayed in email and calendar event. If not provided then cal video link will be generated.", + "description": "Deprecated - use 'location' instead. Meeting URL just for this booking. Displayed in email and calendar event. If not provided then cal video link will be generated.", + "example": "https://example.com/meeting", + "deprecated": true + }, + "location": { + "type": "string", + "description": "Location for this booking. Displayed in email and calendar event.", "example": "https://example.com/meeting" }, "bookingFieldsResponses": { "type": "object", - "description": "Booking field responses.", + "description": "Booking field responses consisting of an object with booking field slug as keys and user response as values.", "example": { "customField": "customValue" } @@ -11005,12 +10809,18 @@ }, "meetingUrl": { "type": "string", - "description": "Meeting URL just for this booking. Displayed in email and calendar event. If not provided then cal video link will be generated.", + "description": "Deprecated - use 'location' instead. Meeting URL just for this booking. Displayed in email and calendar event. If not provided then cal video link will be generated.", + "example": "https://example.com/meeting", + "deprecated": true + }, + "location": { + "type": "string", + "description": "Location for this booking. Displayed in email and calendar event.", "example": "https://example.com/meeting" }, "bookingFieldsResponses": { "type": "object", - "description": "Booking field responses.", + "description": "Booking field responses consisting of an object with booking field slug as keys and user response as values.", "example": { "customField": "customValue" } @@ -11052,9 +10862,9 @@ "type": "string" } }, - "meetingUrl": { + "location": { "type": "string", - "description": "Meeting URL just for this booking. Displayed in email and calendar event. If not provided then cal video link will be generated.", + "description": "Location for this booking. Displayed in email and calendar event.", "example": "https://example.com/meeting" }, "bookingFieldsResponses": { @@ -11067,6 +10877,20 @@ }, "required": ["start", "eventTypeId", "attendee"] }, + "EventType": { + "type": "object", + "properties": { + "id": { + "type": "number", + "example": 1 + }, + "slug": { + "type": "string", + "example": "some-event" + } + }, + "required": ["id", "slug"] + }, "BookingOutput_2024_08_13": { "type": "object", "properties": { @@ -11078,6 +10902,14 @@ "type": "string", "example": "booking_uid_123" }, + "title": { + "type": "string", + "example": "Consultation" + }, + "description": { + "type": "string", + "example": "Learn how to integrate scheduling into marketplace." + }, "hosts": { "type": "array", "items": { @@ -11115,7 +10947,12 @@ }, "eventTypeId": { "type": "number", - "example": 45 + "example": 50, + "deprecated": true, + "description": "Deprecated - rely on 'eventType' object containing the id instead." + }, + "eventType": { + "$ref": "#/components/schemas/EventType" }, "attendees": { "type": "array", @@ -11131,23 +10968,39 @@ } }, "meetingUrl": { + "type": "string", + "description": "Deprecated - rely on 'location' field instead.", + "example": "https://example.com/recurring-meeting", + "deprecated": true + }, + "location": { "type": "string", "example": "https://example.com/meeting" }, "absentHost": { "type": "boolean", "example": true + }, + "bookingFieldsResponses": { + "type": "object", + "description": "Booking field responses consisting of an object with booking field slug as keys and user response as values.", + "example": { + "customField": "customValue" + } } }, "required": [ "id", "uid", + "title", + "description", "hosts", "status", "start", "end", "duration", "eventTypeId", + "eventType", "attendees", "absentHost" ] @@ -11163,6 +11016,14 @@ "type": "string", "example": "recurring_uid_123" }, + "title": { + "type": "string", + "example": "Recurring meeting" + }, + "description": { + "type": "string", + "example": "Learn how to integrate scheduling into marketplace." + }, "hosts": { "type": "array", "items": { @@ -11200,7 +11061,12 @@ }, "eventTypeId": { "type": "number", - "example": 50 + "example": 50, + "deprecated": true, + "description": "Deprecated - rely on 'eventType' object containing the id instead." + }, + "eventType": { + "$ref": "#/components/schemas/EventType" }, "recurringBookingUid": { "type": "string", @@ -11220,23 +11086,39 @@ } }, "meetingUrl": { + "type": "string", + "description": "Deprecated - rely on 'location' field instead.", + "example": "https://example.com/recurring-meeting", + "deprecated": true + }, + "location": { "type": "string", "example": "https://example.com/recurring-meeting" }, "absentHost": { "type": "boolean", "example": false + }, + "bookingFieldsResponses": { + "type": "object", + "description": "Booking field responses consisting of an object with booking field slug as keys and user response as values.", + "example": { + "customField": "customValue" + } } }, "required": [ "id", "uid", + "title", + "description", "hosts", "status", "start", "end", "duration", "eventTypeId", + "eventType", "recurringBookingUid", "attendees", "absentHost" @@ -11291,6 +11173,9 @@ } ], "description": "Booking data, which can be either a BookingOutput object, a RecurringBookingOutput object, or an array of RecurringBookingOutput objects" + }, + "error": { + "type": "object" } }, "required": ["status", "data"] @@ -11316,6 +11201,9 @@ ] }, "description": "Array of booking data, which can contain either BookingOutput objects or RecurringBookingOutput objects" + }, + "error": { + "type": "object" } }, "required": ["status", "data"]