From 007349a180d3f02b293c522bdc2c32dcae82a23e Mon Sep 17 00:00:00 2001 From: Keith Williams Date: Fri, 11 Apr 2025 15:46:42 -0300 Subject: [PATCH] revert: "fix: Broken API docs (#20664)" (#20667) This reverts commit 9d0afbd6f32b3fd772766813ffa64462e7b51586. --- docs/api-reference/v2/openapi.json | 743 ++++++++++++++++++++++++++++- 1 file changed, 741 insertions(+), 2 deletions(-) diff --git a/docs/api-reference/v2/openapi.json b/docs/api-reference/v2/openapi.json index 9973d103c9..492334a1a3 100644 --- a/docs/api-reference/v2/openapi.json +++ b/docs/api-reference/v2/openapi.json @@ -2197,6 +2197,340 @@ "tags": ["Orgs / Orgs"] } }, + "/v2/organizations/{orgId}/routing-forms": { + "get": { + "operationId": "OrganizationsRoutingFormsController_getOrganizationRoutingForms", + "summary": "Get organization routing forms", + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "orgId", + "required": true, + "in": "path", + "schema": { + "type": "number" + } + }, + { + "name": "skip", + "required": false, + "in": "query", + "description": "Number of responses to skip", + "schema": { + "type": "number" + } + }, + { + "name": "take", + "required": false, + "in": "query", + "description": "Number of responses to take", + "schema": { + "type": "number" + } + }, + { + "name": "sortCreatedAt", + "required": false, + "in": "query", + "description": "Sort by creation time", + "schema": { + "enum": ["asc", "desc"], + "type": "string" + } + }, + { + "name": "sortUpdatedAt", + "required": false, + "in": "query", + "description": "Sort by update time", + "schema": { + "enum": ["asc", "desc"], + "type": "string" + } + }, + { + "name": "afterCreatedAt", + "required": false, + "in": "query", + "description": "Filter by responses created after this date", + "schema": { + "format": "date-time", + "type": "string" + } + }, + { + "name": "beforeCreatedAt", + "required": false, + "in": "query", + "description": "Filter by responses created before this date", + "schema": { + "format": "date-time", + "type": "string" + } + }, + { + "name": "afterUpdatedAt", + "required": false, + "in": "query", + "description": "Filter by responses created after this date", + "schema": { + "format": "date-time", + "type": "string" + } + }, + { + "name": "beforeUpdatedAt", + "required": false, + "in": "query", + "description": "Filter by responses updated before this date", + "schema": { + "format": "date-time", + "type": "string" + } + }, + { + "name": "routedToBookingUid", + "required": false, + "in": "query", + "description": "Filter by responses routed to a specific booking", + "schema": { + "type": "string" + } + }, + { + "name": "teamIds", + "required": false, + "in": "query", + "description": "Filter by teamIds", + "schema": { + "type": "array", + "items": { + "type": "number" + } + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetRoutingFormsOutput" + } + } + } + } + }, + "tags": ["Orgs / Routing forms"] + } + }, + "/v2/organizations/{orgId}/routing-forms/{routingFormId}/responses": { + "get": { + "operationId": "OrganizationsRoutingFormsResponsesController_getRoutingFormResponses", + "summary": "Get routing form responses", + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "orgId", + "required": true, + "in": "path", + "schema": { + "type": "number" + } + }, + { + "name": "routingFormId", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "skip", + "required": false, + "in": "query", + "description": "Number of responses to skip", + "schema": { + "type": "number" + } + }, + { + "name": "take", + "required": false, + "in": "query", + "description": "Number of responses to take", + "schema": { + "type": "number" + } + }, + { + "name": "sortCreatedAt", + "required": false, + "in": "query", + "description": "Sort by creation time", + "schema": { + "enum": ["asc", "desc"], + "type": "string" + } + }, + { + "name": "sortUpdatedAt", + "required": false, + "in": "query", + "description": "Sort by update time", + "schema": { + "enum": ["asc", "desc"], + "type": "string" + } + }, + { + "name": "afterCreatedAt", + "required": false, + "in": "query", + "description": "Filter by responses created after this date", + "schema": { + "format": "date-time", + "type": "string" + } + }, + { + "name": "beforeCreatedAt", + "required": false, + "in": "query", + "description": "Filter by responses created before this date", + "schema": { + "format": "date-time", + "type": "string" + } + }, + { + "name": "afterUpdatedAt", + "required": false, + "in": "query", + "description": "Filter by responses created after this date", + "schema": { + "format": "date-time", + "type": "string" + } + }, + { + "name": "beforeUpdatedAt", + "required": false, + "in": "query", + "description": "Filter by responses updated before this date", + "schema": { + "format": "date-time", + "type": "string" + } + }, + { + "name": "routedToBookingUid", + "required": false, + "in": "query", + "description": "Filter by responses routed to a specific booking", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetRoutingFormResponsesOutput" + } + } + } + } + }, + "tags": ["Orgs / Routing forms"] + } + }, + "/v2/organizations/{orgId}/routing-forms/{routingFormId}/responses/{responseId}": { + "patch": { + "operationId": "OrganizationsRoutingFormsResponsesController_updateRoutingFormResponse", + "summary": "Update routing form response", + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "orgId", + "required": true, + "in": "path", + "schema": { + "type": "number" + } + }, + { + "name": "routingFormId", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "responseId", + "required": true, + "in": "path", + "schema": { + "type": "number" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateRoutingFormResponseInput" + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateRoutingFormResponseOutput" + } + } + } + } + }, + "tags": ["Orgs / Routing forms"] + } + }, "/v2/organizations/{orgId}/schedules": { "get": { "operationId": "OrganizationsSchedulesController_getOrganizationSchedules", @@ -3737,10 +4071,143 @@ "tags": ["Orgs / Teams / Memberships"] } }, + "/v2/organizations/{orgId}/teams/{teamId}/routing-forms": { + "get": { + "operationId": "OrganizationsTeamsRoutingFormsController_getTeamRoutingForms", + "summary": "Get team routing forms", + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "orgId", + "required": true, + "in": "path", + "schema": { + "type": "number" + } + }, + { + "name": "teamId", + "required": true, + "in": "path", + "schema": { + "type": "number" + } + }, + { + "name": "skip", + "required": false, + "in": "query", + "description": "Number of responses to skip", + "schema": { + "type": "number" + } + }, + { + "name": "take", + "required": false, + "in": "query", + "description": "Number of responses to take", + "schema": { + "type": "number" + } + }, + { + "name": "sortCreatedAt", + "required": false, + "in": "query", + "description": "Sort by creation time", + "schema": { + "enum": ["asc", "desc"], + "type": "string" + } + }, + { + "name": "sortUpdatedAt", + "required": false, + "in": "query", + "description": "Sort by update time", + "schema": { + "enum": ["asc", "desc"], + "type": "string" + } + }, + { + "name": "afterCreatedAt", + "required": false, + "in": "query", + "description": "Filter by responses created after this date", + "schema": { + "format": "date-time", + "type": "string" + } + }, + { + "name": "beforeCreatedAt", + "required": false, + "in": "query", + "description": "Filter by responses created before this date", + "schema": { + "format": "date-time", + "type": "string" + } + }, + { + "name": "afterUpdatedAt", + "required": false, + "in": "query", + "description": "Filter by responses created after this date", + "schema": { + "format": "date-time", + "type": "string" + } + }, + { + "name": "beforeUpdatedAt", + "required": false, + "in": "query", + "description": "Filter by responses updated before this date", + "schema": { + "format": "date-time", + "type": "string" + } + }, + { + "name": "routedToBookingUid", + "required": false, + "in": "query", + "description": "Filter by responses routed to a specific booking", + "schema": { + "type": "string" + } + } + ], + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetRoutingFormsOutput" + } + } + } + } + }, + "tags": ["Orgs / Teams / Routing forms"] + } + }, "/v2/organizations/{orgId}/teams/{teamId}/routing-forms/{routingFormId}/responses": { "get": { "operationId": "OrganizationsTeamsRoutingFormsResponsesController_getRoutingFormResponses", - "summary": "Get routing form responses", + "summary": "Get organization team routing form responses", "parameters": [ { "name": "Authorization", @@ -3758,6 +4225,109 @@ "schema": { "type": "string" } + }, + { + "name": "orgId", + "required": true, + "in": "path", + "schema": { + "type": "number" + } + }, + { + "name": "teamId", + "required": true, + "in": "path", + "schema": { + "type": "number" + } + }, + { + "name": "skip", + "required": false, + "in": "query", + "description": "Number of responses to skip", + "schema": { + "type": "number" + } + }, + { + "name": "take", + "required": false, + "in": "query", + "description": "Number of responses to take", + "schema": { + "type": "number" + } + }, + { + "name": "sortCreatedAt", + "required": false, + "in": "query", + "description": "Sort by creation time", + "schema": { + "enum": ["asc", "desc"], + "type": "string" + } + }, + { + "name": "sortUpdatedAt", + "required": false, + "in": "query", + "description": "Sort by update time", + "schema": { + "enum": ["asc", "desc"], + "type": "string" + } + }, + { + "name": "afterCreatedAt", + "required": false, + "in": "query", + "description": "Filter by responses created after this date", + "schema": { + "format": "date-time", + "type": "string" + } + }, + { + "name": "beforeCreatedAt", + "required": false, + "in": "query", + "description": "Filter by responses created before this date", + "schema": { + "format": "date-time", + "type": "string" + } + }, + { + "name": "afterUpdatedAt", + "required": false, + "in": "query", + "description": "Filter by responses created after this date", + "schema": { + "format": "date-time", + "type": "string" + } + }, + { + "name": "beforeUpdatedAt", + "required": false, + "in": "query", + "description": "Filter by responses updated before this date", + "schema": { + "format": "date-time", + "type": "string" + } + }, + { + "name": "routedToBookingUid", + "required": false, + "in": "query", + "description": "Filter by responses routed to a specific booking", + "schema": { + "type": "string" + } } ], "responses": { @@ -3775,6 +4345,70 @@ "tags": ["Orgs / Teams / Routing forms / Responses"] } }, + "/v2/organizations/{orgId}/teams/{teamId}/routing-forms/{routingFormId}/responses/{responseId}": { + "patch": { + "operationId": "OrganizationsTeamsRoutingFormsResponsesController_updateRoutingFormResponse", + "summary": "Update routing form response", + "parameters": [ + { + "name": "Authorization", + "in": "header", + "description": "value must be `Bearer ` where `` is api key prefixed with cal_", + "required": true, + "schema": { + "type": "string" + } + }, + { + "name": "teamId", + "required": true, + "in": "path", + "schema": { + "type": "number" + } + }, + { + "name": "routingFormId", + "required": true, + "in": "path", + "schema": { + "type": "string" + } + }, + { + "name": "responseId", + "required": true, + "in": "path", + "schema": { + "type": "number" + } + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateRoutingFormResponseInput" + } + } + } + }, + "responses": { + "200": { + "description": "", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/UpdateRoutingFormResponseOutput" + } + } + } + } + }, + "tags": ["Orgs / Teams / Routing forms / Responses"] + } + }, "/v2/organizations/{orgId}/teams/{teamId}/users/{userId}/schedules": { "get": { "operationId": "OrganizationsTeamsSchedulesController_getUserSchedules", @@ -17462,6 +18096,111 @@ "required": ["id", "formId", "formFillerId", "routedToBookingUid", "response", "createdAt"] }, "GetRoutingFormResponsesOutput": { + "type": "object", + "properties": { + "status": { + "type": "string", + "example": "success", + "enum": ["success", "error"] + }, + "data": { + "$ref": "#/components/schemas/RoutingFormResponseOutput" + } + }, + "required": ["status", "data"] + }, + "UpdateRoutingFormResponseInput": { + "type": "object", + "properties": { + "response": { + "type": "object", + "description": "The updated response data" + } + } + }, + "UpdateRoutingFormResponseOutput": { + "type": "object", + "properties": { + "status": { + "type": "string", + "example": "success", + "enum": ["success", "error"] + }, + "data": { + "$ref": "#/components/schemas/RoutingFormResponseOutput" + } + }, + "required": ["status", "data"] + }, + "RoutingFormOutput": { + "type": "object", + "properties": { + "name": { + "type": "string", + "example": "My Form" + }, + "description": { + "type": "string", + "nullable": true, + "example": "This is the description." + }, + "position": { + "type": "number", + "example": 0 + }, + "createdAt": { + "type": "string", + "example": "2024-03-28T10:00:00.000Z" + }, + "updatedAt": { + "type": "string", + "example": "2024-03-28T10:00:00.000Z" + }, + "userId": { + "type": "number", + "example": 2313 + }, + "teamId": { + "type": "number", + "nullable": true, + "example": 4214321 + }, + "disabled": { + "type": "boolean", + "example": false + }, + "id": { + "type": "string" + }, + "routes": { + "type": "object", + "nullable": true + }, + "fields": { + "type": "object", + "nullable": true + }, + "settings": { + "type": "object", + "nullable": true + } + }, + "required": [ + "name", + "description", + "position", + "createdAt", + "updatedAt", + "userId", + "teamId", + "disabled", + "id", + "routes", + "fields", + "settings" + ] + }, + "GetRoutingFormsOutput": { "type": "object", "properties": { "status": { @@ -17472,7 +18211,7 @@ "data": { "type": "array", "items": { - "$ref": "#/components/schemas/RoutingFormResponseOutput" + "$ref": "#/components/schemas/RoutingFormOutput" } } },