From 703dade9deb60a0237dcd3a4fc033cb6a38d0498 Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Sat, 18 Jun 2022 00:03:06 +0000 Subject: [PATCH] daily update 20220618T000306 --- client/services/ContextService.ts | 58 +- client/services/ProjectService.ts | 130 ++--- client/services/ScheduleService.ts | 146 ++--- client/services/WebhookService.ts | 48 +- swagger.json | 892 ++++++++++++++--------------- 5 files changed, 637 insertions(+), 637 deletions(-) diff --git a/client/services/ContextService.ts b/client/services/ContextService.ts index 68daf2b..6605cbd 100644 --- a/client/services/ContextService.ts +++ b/client/services/ContextService.ts @@ -205,6 +205,35 @@ export class ContextService { }, }); } + /** + * Remove an environment variable + * Delete an environment variable from a context. + * @returns any A confirmation message + * @throws ApiError + */ + public static deleteEnvironmentVariableFromContext({ + envVarName, + contextId, + }: { + /** The name of the environment variable **/ + envVarName: string; + /** ID of the context (UUID) **/ + contextId: string; + }): CancelablePromise<{ + /** + * A human-readable message + */ + message: string; + }> { + return __request(OpenAPI, { + method: "DELETE", + url: "/context/{context-id}/environment-variable/{env-var-name}", + path: { + "env-var-name": envVarName, + "context-id": contextId, + }, + }); + } /** * Add or update an environment variable * Create or update an environment variable within a context. Returns information about the environment variable, not including its value. @@ -259,33 +288,4 @@ export class ContextService { mediaType: "application/json", }); } - /** - * Remove an environment variable - * Delete an environment variable from a context. - * @returns any A confirmation message - * @throws ApiError - */ - public static deleteEnvironmentVariableFromContext({ - envVarName, - contextId, - }: { - /** The name of the environment variable **/ - envVarName: string; - /** ID of the context (UUID) **/ - contextId: string; - }): CancelablePromise<{ - /** - * A human-readable message - */ - message: string; - }> { - return __request(OpenAPI, { - method: "DELETE", - url: "/context/{context-id}/environment-variable/{env-var-name}", - path: { - "env-var-name": envVarName, - "context-id": contextId, - }, - }); - } } diff --git a/client/services/ProjectService.ts b/client/services/ProjectService.ts index 1068805..ec468cd 100644 --- a/client/services/ProjectService.ts +++ b/client/services/ProjectService.ts @@ -58,6 +58,37 @@ export class ProjectService { }, }); } + /** + * Create a new checkout key + * Creates a new checkout key. This API request is only usable with a user API token. + * @returns any Error response. + * @throws ApiError + */ + public static createCheckoutKey({ + projectSlug, + requestBody, + }: { + /** Project slug in the form `vcs-slug/org-name/repo-name`. The `/` characters may be URL-escaped. **/ + projectSlug: string; + requestBody?: { + /** + * The type of checkout key to create. This may be either `deploy-key` or `user-key`. + */ + type: "user-key" | "deploy-key"; + }; + }): CancelablePromise<{ + message?: string; + }> { + return __request(OpenAPI, { + method: "POST", + url: "/project/{project-slug}/checkout-key", + path: { + "project-slug": projectSlug, + }, + body: requestBody, + mediaType: "application/json", + }); + } /** * Get all checkout keys * Returns a sequence of checkout keys for `:project`. @@ -106,34 +137,32 @@ export class ProjectService { }); } /** - * Create a new checkout key - * Creates a new checkout key. This API request is only usable with a user API token. - * @returns any Error response. + * Delete a checkout key + * Deletes the checkout key. + * @returns any A confirmation message. * @throws ApiError */ - public static createCheckoutKey({ + public static deleteCheckoutKey({ projectSlug, - requestBody, + fingerprint, }: { /** Project slug in the form `vcs-slug/org-name/repo-name`. The `/` characters may be URL-escaped. **/ projectSlug: string; - requestBody?: { - /** - * The type of checkout key to create. This may be either `deploy-key` or `user-key`. - */ - type: "user-key" | "deploy-key"; - }; + /** An SSH key fingerprint. **/ + fingerprint: string; }): CancelablePromise<{ - message?: string; + /** + * A human-readable message + */ + message: string; }> { return __request(OpenAPI, { - method: "POST", - url: "/project/{project-slug}/checkout-key", + method: "DELETE", + url: "/project/{project-slug}/checkout-key/{fingerprint}", path: { "project-slug": projectSlug, + fingerprint: fingerprint, }, - body: requestBody, - mediaType: "application/json", }); } /** @@ -182,32 +211,38 @@ export class ProjectService { }); } /** - * Delete a checkout key - * Deletes the checkout key. - * @returns any A confirmation message. + * Create an environment variable + * Creates a new environment variable. + * @returns any Error response. * @throws ApiError */ - public static deleteCheckoutKey({ + public static createEnvVar({ projectSlug, - fingerprint, + requestBody, }: { /** Project slug in the form `vcs-slug/org-name/repo-name`. The `/` characters may be URL-escaped. **/ projectSlug: string; - /** An SSH key fingerprint. **/ - fingerprint: string; + requestBody?: { + /** + * The name of the environment variable. + */ + name: string; + /** + * The value of the environment variable. + */ + value: string; + }; }): CancelablePromise<{ - /** - * A human-readable message - */ - message: string; + message?: string; }> { return __request(OpenAPI, { - method: "DELETE", - url: "/project/{project-slug}/checkout-key/{fingerprint}", + method: "POST", + url: "/project/{project-slug}/envvar", path: { "project-slug": projectSlug, - fingerprint: fingerprint, }, + body: requestBody, + mediaType: "application/json", }); } /** @@ -245,41 +280,6 @@ export class ProjectService { }, }); } - /** - * Create an environment variable - * Creates a new environment variable. - * @returns any Error response. - * @throws ApiError - */ - public static createEnvVar({ - projectSlug, - requestBody, - }: { - /** Project slug in the form `vcs-slug/org-name/repo-name`. The `/` characters may be URL-escaped. **/ - projectSlug: string; - requestBody?: { - /** - * The name of the environment variable. - */ - name: string; - /** - * The value of the environment variable. - */ - value: string; - }; - }): CancelablePromise<{ - message?: string; - }> { - return __request(OpenAPI, { - method: "POST", - url: "/project/{project-slug}/envvar", - path: { - "project-slug": projectSlug, - }, - body: requestBody, - mediaType: "application/json", - }); - } /** * Delete an environment variable * Deletes the environment variable named :name. diff --git a/client/services/ScheduleService.ts b/client/services/ScheduleService.ts index e741b03..af806cd 100644 --- a/client/services/ScheduleService.ts +++ b/client/services/ScheduleService.ts @@ -162,79 +162,16 @@ export class ScheduleService { }); } /** - * Delete a schedule - * Deletes the schedule by id. - * @returns any A confirmation message. - * @throws ApiError - */ - public static deleteScheduleById({ - scheduleId, - }: { - /** The unique ID of the schedule. **/ - scheduleId: string; - }): CancelablePromise<{ - /** - * A human-readable message - */ - message: string; - }> { - return __request(OpenAPI, { - method: "DELETE", - url: "/schedule/{schedule-id}", - path: { - "schedule-id": scheduleId, - }, - }); - } - /** - * Update a schedule - * Updates a schedule and returns the updated schedule. + * Get a schedule + * Get a schedule by id. * @returns any A schedule object. * @throws ApiError */ - public static updateSchedule({ + public static getScheduleById({ scheduleId, - requestBody, }: { /** The unique ID of the schedule. **/ scheduleId: string; - requestBody?: { - /** - * Description of the schedule. - */ - description?: string; - /** - * Name of the schedule. - */ - name?: string; - /** - * Timetable that specifies when a schedule triggers. - */ - timetable?: { - /** - * Number of times a schedule triggers per hour, value must be between 1 and 60 - */ - "per-hour"?: number; - /** - * Hours in a day in which the schedule triggers. - */ - "hours-of-day"?: Array; - /** - * Days in a week in which the schedule triggers. - */ - "days-of-week"?: Array< - "TUE" | "SAT" | "SUN" | "MON" | "THU" | "WED" | "FRI" - >; - }; - /** - * The attribution-actor of the scheduled pipeline. - */ - "attribution-actor"?: "current" | "system"; - /** - * Pipeline parameters represented as key-value pairs. Must contain branch or tag. - */ - parameters?: Record; - }; }): CancelablePromise<{ /** * The unique ID of the schedule. @@ -302,26 +239,87 @@ export class ScheduleService { description: string; }> { return __request(OpenAPI, { - method: "PATCH", + method: "GET", url: "/schedule/{schedule-id}", path: { "schedule-id": scheduleId, }, - body: requestBody, - mediaType: "application/json", }); } /** - * Get a schedule - * Get a schedule by id. + * Delete a schedule + * Deletes the schedule by id. + * @returns any A confirmation message. + * @throws ApiError + */ + public static deleteScheduleById({ + scheduleId, + }: { + /** The unique ID of the schedule. **/ + scheduleId: string; + }): CancelablePromise<{ + /** + * A human-readable message + */ + message: string; + }> { + return __request(OpenAPI, { + method: "DELETE", + url: "/schedule/{schedule-id}", + path: { + "schedule-id": scheduleId, + }, + }); + } + /** + * Update a schedule + * Updates a schedule and returns the updated schedule. * @returns any A schedule object. * @throws ApiError */ - public static getScheduleById({ + public static updateSchedule({ scheduleId, + requestBody, }: { /** The unique ID of the schedule. **/ scheduleId: string; + requestBody?: { + /** + * Description of the schedule. + */ + description?: string; + /** + * Name of the schedule. + */ + name?: string; + /** + * Timetable that specifies when a schedule triggers. + */ + timetable?: { + /** + * Number of times a schedule triggers per hour, value must be between 1 and 60 + */ + "per-hour"?: number; + /** + * Hours in a day in which the schedule triggers. + */ + "hours-of-day"?: Array; + /** + * Days in a week in which the schedule triggers. + */ + "days-of-week"?: Array< + "TUE" | "SAT" | "SUN" | "MON" | "THU" | "WED" | "FRI" + >; + }; + /** + * The attribution-actor of the scheduled pipeline. + */ + "attribution-actor"?: "current" | "system"; + /** + * Pipeline parameters represented as key-value pairs. Must contain branch or tag. + */ + parameters?: Record; + }; }): CancelablePromise<{ /** * The unique ID of the schedule. @@ -389,11 +387,13 @@ export class ScheduleService { description: string; }> { return __request(OpenAPI, { - method: "GET", + method: "PATCH", url: "/schedule/{schedule-id}", path: { "schedule-id": scheduleId, }, + body: requestBody, + mediaType: "application/json", }); } } diff --git a/client/services/WebhookService.ts b/client/services/WebhookService.ts index 6671a21..d3323b4 100644 --- a/client/services/WebhookService.ts +++ b/client/services/WebhookService.ts @@ -131,6 +131,30 @@ export class WebhookService { mediaType: "application/json", }); } + /** + * Delete a webhook + * @returns any A confirmation message + * @throws ApiError + */ + public static deleteWebhook({ + webhookId, + }: { + /** ID of the webhook (UUID) **/ + webhookId: string; + }): CancelablePromise<{ + /** + * A human-readable message + */ + message: string; + }> { + return __request(OpenAPI, { + method: "DELETE", + url: "/webhook/{webhook-id}", + path: { + "webhook-id": webhookId, + }, + }); + } /** * Get a webhook * Get a webhook by id. @@ -197,30 +221,6 @@ export class WebhookService { }, }); } - /** - * Delete a webhook - * @returns any A confirmation message - * @throws ApiError - */ - public static deleteWebhook({ - webhookId, - }: { - /** ID of the webhook (UUID) **/ - webhookId: string; - }): CancelablePromise<{ - /** - * A human-readable message - */ - message: string; - }> { - return __request(OpenAPI, { - method: "DELETE", - url: "/webhook/{webhook-id}", - path: { - "webhook-id": webhookId, - }, - }); - } /** * Update a webhook * @returns any A webhook diff --git a/swagger.json b/swagger.json index ccf4deb..869e7db 100644 --- a/swagger.json +++ b/swagger.json @@ -437,6 +437,70 @@ } }, "/context/{context-id}/environment-variable/{env-var-name}": { + "delete": { + "summary": "Remove an environment variable", + "description": "Delete an environment variable from a context.", + "tags": ["Context"], + "operationId": "deleteEnvironmentVariableFromContext", + "responses": { + "200": { + "description": "A confirmation message", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "A human-readable message" + } + }, + "required": ["message"], + "description": "message response", + "title": "MessageResponse" + } + } + } + }, + "default": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + } + } + } + } + }, + "description": "Error response." + } + }, + "parameters": [ + { + "in": "path", + "name": "env-var-name", + "description": "The name of the environment variable", + "schema": { + "type": "string" + }, + "required": true, + "example": "POSTGRES_USER" + }, + { + "in": "path", + "name": "context-id", + "description": "ID of the context (UUID)", + "schema": { + "type": "string", + "format": "uuid" + }, + "required": true + } + ] + }, "put": { "summary": "Add or update an environment variable", "description": "Create or update an environment variable within a context. Returns information about the environment variable, not including its value.", @@ -543,70 +607,6 @@ } } } - }, - "delete": { - "summary": "Remove an environment variable", - "description": "Delete an environment variable from a context.", - "tags": ["Context"], - "operationId": "deleteEnvironmentVariableFromContext", - "responses": { - "200": { - "description": "A confirmation message", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "message": { - "type": "string", - "description": "A human-readable message" - } - }, - "required": ["message"], - "description": "message response", - "title": "MessageResponse" - } - } - } - }, - "default": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "message": { - "type": "string" - } - } - } - } - }, - "description": "Error response." - } - }, - "parameters": [ - { - "in": "path", - "name": "env-var-name", - "description": "The name of the environment variable", - "schema": { - "type": "string" - }, - "required": true, - "example": "POSTGRES_USER" - }, - { - "in": "path", - "name": "context-id", - "description": "ID of the context (UUID)", - "schema": { - "type": "string", - "format": "uuid" - }, - "required": true - } - ] } }, "/insights/pages/{project-slug}/summary": { @@ -4050,105 +4050,6 @@ } }, "/project/{project-slug}/checkout-key": { - "get": { - "summary": "Get all checkout keys", - "description": "Returns a sequence of checkout keys for `:project`.", - "tags": ["Project"], - "operationId": "listCheckoutKeys", - "responses": { - "200": { - "description": "A sequence of checkout keys.", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "items": { - "type": "array", - "items": { - "type": "object", - "properties": { - "public-key": { - "type": "string", - "description": "A public SSH key.", - "example": "ssh-rsa ..." - }, - "type": { - "enum": ["deploy-key", "github-user-key"], - "type": "string", - "description": "The type of checkout key. This may be either `deploy-key` or `github-user-key`.", - "title": "CheckoutKeyType", - "example": "deploy-key" - }, - "fingerprint": { - "type": "string", - "description": "An SSH key fingerprint.", - "example": "c9:0b:1c:4f:d5:65:56:b9:ad:88:f9:81:2b:37:74:2f" - }, - "preferred": { - "type": "boolean", - "description": "A boolean value that indicates if this key is preferred.", - "example": true - }, - "created-at": { - "type": "string", - "format": "date-time", - "description": "The date and time the checkout key was created.", - "example": "2015-09-21T17:29:21.042Z" - } - }, - "required": [ - "public-key", - "type", - "fingerprint", - "preferred", - "created-at" - ], - "title": "CheckoutKey" - } - }, - "next_page_token": { - "type": "string", - "x-nullable": true, - "description": "A token to pass as a `page-token` query parameter to return the next page of results." - } - }, - "required": ["items", "next_page_token"], - "title": "CheckoutKeyListResponse" - } - } - } - }, - "default": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "message": { - "type": "string" - } - } - } - } - }, - "description": "Error response." - } - }, - "parameters": [ - { - "in": "path", - "name": "project-slug", - "description": "Project slug in the form `vcs-slug/org-name/repo-name`. The `/` characters may be URL-escaped.", - "schema": { - "type": "string" - }, - "required": true, - "example": "gh/CircleCI-Public/api-preview-docs", - "allowReserved": true - } - ] - }, "post": { "summary": "Create a new checkout key", "description": "Creates a new checkout key. This API request is only usable with a user API token.", @@ -4252,59 +4153,72 @@ } } } - } - }, - "/project/{project-slug}/checkout-key/{fingerprint}": { + }, "get": { - "summary": "Get a checkout key", - "description": "Returns an individual checkout key.", + "summary": "Get all checkout keys", + "description": "Returns a sequence of checkout keys for `:project`.", "tags": ["Project"], - "operationId": "getCheckoutKey", + "operationId": "listCheckoutKeys", "responses": { "200": { - "description": "The checkout key.", + "description": "A sequence of checkout keys.", "content": { "application/json": { "schema": { "type": "object", "properties": { - "public-key": { - "type": "string", - "description": "A public SSH key.", - "example": "ssh-rsa ..." - }, - "type": { - "enum": ["deploy-key", "github-user-key"], - "type": "string", - "description": "The type of checkout key. This may be either `deploy-key` or `github-user-key`.", - "title": "CheckoutKeyType", - "example": "deploy-key" - }, - "fingerprint": { - "type": "string", - "description": "An SSH key fingerprint.", - "example": "c9:0b:1c:4f:d5:65:56:b9:ad:88:f9:81:2b:37:74:2f" - }, - "preferred": { - "type": "boolean", - "description": "A boolean value that indicates if this key is preferred.", - "example": true + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "public-key": { + "type": "string", + "description": "A public SSH key.", + "example": "ssh-rsa ..." + }, + "type": { + "enum": ["deploy-key", "github-user-key"], + "type": "string", + "description": "The type of checkout key. This may be either `deploy-key` or `github-user-key`.", + "title": "CheckoutKeyType", + "example": "deploy-key" + }, + "fingerprint": { + "type": "string", + "description": "An SSH key fingerprint.", + "example": "c9:0b:1c:4f:d5:65:56:b9:ad:88:f9:81:2b:37:74:2f" + }, + "preferred": { + "type": "boolean", + "description": "A boolean value that indicates if this key is preferred.", + "example": true + }, + "created-at": { + "type": "string", + "format": "date-time", + "description": "The date and time the checkout key was created.", + "example": "2015-09-21T17:29:21.042Z" + } + }, + "required": [ + "public-key", + "type", + "fingerprint", + "preferred", + "created-at" + ], + "title": "CheckoutKey" + } }, - "created-at": { + "next_page_token": { "type": "string", - "format": "date-time", - "description": "The date and time the checkout key was created.", - "example": "2015-09-21T17:29:21.042Z" + "x-nullable": true, + "description": "A token to pass as a `page-token` query parameter to return the next page of results." } }, - "required": [ - "public-key", - "type", - "fingerprint", - "preferred", - "created-at" - ], - "title": "CheckoutKey" + "required": ["items", "next_page_token"], + "title": "CheckoutKeyListResponse" } } } @@ -4336,19 +4250,11 @@ "required": true, "example": "gh/CircleCI-Public/api-preview-docs", "allowReserved": true - }, - { - "in": "path", - "name": "fingerprint", - "description": "An SSH key fingerprint.", - "schema": { - "type": "string" - }, - "required": true, - "example": "c9:0b:1c:4f:d5:65:56:b9:ad:88:f9:81:2b:37:74:2f" } ] - }, + } + }, + "/project/{project-slug}/checkout-key/{fingerprint}": { "delete": { "summary": "Delete a checkout key", "description": "Deletes the checkout key.", @@ -4413,50 +4319,57 @@ "example": "c9:0b:1c:4f:d5:65:56:b9:ad:88:f9:81:2b:37:74:2f" } ] - } - }, - "/project/{project-slug}/envvar": { + }, "get": { - "summary": "List all environment variables", - "description": "Returns four 'x' characters, in addition to the last four ASCII characters of the value, consistent with the display of environment variable values on the CircleCI website.", + "summary": "Get a checkout key", + "description": "Returns an individual checkout key.", "tags": ["Project"], - "operationId": "listEnvVars", + "operationId": "getCheckoutKey", "responses": { "200": { - "description": "A sequence of environment variables.", + "description": "The checkout key.", "content": { "application/json": { "schema": { "type": "object", "properties": { - "items": { - "type": "array", - "items": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "The name of the environment variable.", - "example": "foo" - }, - "value": { - "type": "string", - "description": "The value of the environment variable.", - "example": "xxxx1234" - } - }, - "required": ["name", "value"], - "title": "EnvironmentVariablePair" - } + "public-key": { + "type": "string", + "description": "A public SSH key.", + "example": "ssh-rsa ..." }, - "next_page_token": { + "type": { + "enum": ["deploy-key", "github-user-key"], "type": "string", - "x-nullable": true, - "description": "A token to pass as a `page-token` query parameter to return the next page of results." + "description": "The type of checkout key. This may be either `deploy-key` or `github-user-key`.", + "title": "CheckoutKeyType", + "example": "deploy-key" + }, + "fingerprint": { + "type": "string", + "description": "An SSH key fingerprint.", + "example": "c9:0b:1c:4f:d5:65:56:b9:ad:88:f9:81:2b:37:74:2f" + }, + "preferred": { + "type": "boolean", + "description": "A boolean value that indicates if this key is preferred.", + "example": true + }, + "created-at": { + "type": "string", + "format": "date-time", + "description": "The date and time the checkout key was created.", + "example": "2015-09-21T17:29:21.042Z" } }, - "required": ["items", "next_page_token"], - "title": "EnvironmentVariableListResponse" + "required": [ + "public-key", + "type", + "fingerprint", + "preferred", + "created-at" + ], + "title": "CheckoutKey" } } } @@ -4488,9 +4401,21 @@ "required": true, "example": "gh/CircleCI-Public/api-preview-docs", "allowReserved": true + }, + { + "in": "path", + "name": "fingerprint", + "description": "An SSH key fingerprint.", + "schema": { + "type": "string" + }, + "required": true, + "example": "c9:0b:1c:4f:d5:65:56:b9:ad:88:f9:81:2b:37:74:2f" } ] - }, + } + }, + "/project/{project-slug}/envvar": { "post": { "summary": "Create an environment variable", "description": "Creates a new environment variable.", @@ -4573,6 +4498,81 @@ } } } + }, + "get": { + "summary": "List all environment variables", + "description": "Returns four 'x' characters, in addition to the last four ASCII characters of the value, consistent with the display of environment variable values on the CircleCI website.", + "tags": ["Project"], + "operationId": "listEnvVars", + "responses": { + "200": { + "description": "A sequence of environment variables.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The name of the environment variable.", + "example": "foo" + }, + "value": { + "type": "string", + "description": "The value of the environment variable.", + "example": "xxxx1234" + } + }, + "required": ["name", "value"], + "title": "EnvironmentVariablePair" + } + }, + "next_page_token": { + "type": "string", + "x-nullable": true, + "description": "A token to pass as a `page-token` query parameter to return the next page of results." + } + }, + "required": ["items", "next_page_token"], + "title": "EnvironmentVariableListResponse" + } + } + } + }, + "default": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + } + } + } + } + }, + "description": "Error response." + } + }, + "parameters": [ + { + "in": "path", + "name": "project-slug", + "description": "Project slug in the form `vcs-slug/org-name/repo-name`. The `/` characters may be URL-escaped.", + "schema": { + "type": "string" + }, + "required": true, + "example": "gh/CircleCI-Public/api-preview-docs", + "allowReserved": true + } + ] } }, "/project/{project-slug}/envvar/{name}": { @@ -6709,74 +6709,20 @@ } }, "/schedule/{schedule-id}": { - "delete": { - "summary": "Delete a schedule", - "description": "Deletes the schedule by id.", + "get": { + "summary": "Get a schedule", + "description": "Get a schedule by id.", "tags": ["Schedule"], - "operationId": "deleteScheduleById", + "operationId": "getScheduleById", "responses": { "200": { - "description": "A confirmation message.", + "description": "A schedule object.", "content": { "application/json": { "schema": { "type": "object", "properties": { - "message": { - "type": "string", - "description": "A human-readable message" - } - }, - "required": ["message"], - "description": "message response", - "title": "MessageResponse" - } - } - } - }, - "default": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "message": { - "type": "string" - } - } - } - } - }, - "description": "Error response." - } - }, - "parameters": [ - { - "in": "path", - "name": "schedule-id", - "description": "The unique ID of the schedule.", - "schema": { - "type": "string", - "format": "uuid" - }, - "required": true - } - ] - }, - "patch": { - "summary": "Update a schedule", - "description": "Updates a schedule and returns the updated schedule.", - "tags": ["Schedule"], - "operationId": "updateSchedule", - "responses": { - "200": { - "description": "A schedule object.", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "id": { + "id": { "type": "string", "format": "uuid", "description": "The unique ID of the schedule." @@ -6931,99 +6877,67 @@ }, "required": true } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "description": { - "type": "string", - "x-nullable": true, - "description": "Description of the schedule." - }, - "name": { - "type": "string", - "description": "Name of the schedule." - }, - "timetable": { - "type": "object", - "properties": { - "per-hour": { - "type": "integer", - "format": "integer", - "description": "Number of times a schedule triggers per hour, value must be between 1 and 60" - }, - "hours-of-day": { - "type": "array", - "items": { - "type": "integer", - "format": "integer", - "description": "Hour in a day in UTC, value must be between 0 and 24" - }, - "description": "Hours in a day in which the schedule triggers." - }, - "days-of-week": { - "type": "array", - "items": { - "enum": [ - "TUE", - "SAT", - "SUN", - "MON", - "THU", - "WED", - "FRI" - ], - "type": "string", - "description": "Day in a week, in three letters format" - }, - "description": "Days in a week in which the schedule triggers." - } - }, - "description": "Timetable that specifies when a schedule triggers." - }, - "attribution-actor": { - "enum": ["current", "system"], - "type": "string", - "description": "The attribution-actor of the scheduled pipeline.", - "example": "current" + ] + }, + "delete": { + "summary": "Delete a schedule", + "description": "Deletes the schedule by id.", + "tags": ["Schedule"], + "operationId": "deleteScheduleById", + "responses": { + "200": { + "description": "A confirmation message.", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "A human-readable message" + } }, - "parameters": { - "type": "object", - "additionalProperties": { - "anyOf": [ - { - "type": "integer" - }, - { - "type": "string" - }, - { - "type": "boolean" - } - ] - }, - "description": "Pipeline parameters represented as key-value pairs. Must contain branch or tag.", - "example": { - "deploy_prod": true, - "branch": "feature/design-new-api" + "required": ["message"], + "description": "message response", + "title": "MessageResponse" + } + } + } + }, + "default": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" } } - }, - "description": "The parameters for an update schedule request", - "title": "UpdateScheduleParameters" + } } - } + }, + "description": "Error response." } - } + }, + "parameters": [ + { + "in": "path", + "name": "schedule-id", + "description": "The unique ID of the schedule.", + "schema": { + "type": "string", + "format": "uuid" + }, + "required": true + } + ] }, - "get": { - "summary": "Get a schedule", - "description": "Get a schedule by id.", + "patch": { + "summary": "Update a schedule", + "description": "Updates a schedule and returns the updated schedule.", "tags": ["Schedule"], - "operationId": "getScheduleById", + "operationId": "updateSchedule", "responses": { "200": { "description": "A schedule object.", @@ -7187,7 +7101,93 @@ }, "required": true } - ] + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "description": { + "type": "string", + "x-nullable": true, + "description": "Description of the schedule." + }, + "name": { + "type": "string", + "description": "Name of the schedule." + }, + "timetable": { + "type": "object", + "properties": { + "per-hour": { + "type": "integer", + "format": "integer", + "description": "Number of times a schedule triggers per hour, value must be between 1 and 60" + }, + "hours-of-day": { + "type": "array", + "items": { + "type": "integer", + "format": "integer", + "description": "Hour in a day in UTC, value must be between 0 and 24" + }, + "description": "Hours in a day in which the schedule triggers." + }, + "days-of-week": { + "type": "array", + "items": { + "enum": [ + "TUE", + "SAT", + "SUN", + "MON", + "THU", + "WED", + "FRI" + ], + "type": "string", + "description": "Day in a week, in three letters format" + }, + "description": "Days in a week in which the schedule triggers." + } + }, + "description": "Timetable that specifies when a schedule triggers." + }, + "attribution-actor": { + "enum": ["current", "system"], + "type": "string", + "description": "The attribution-actor of the scheduled pipeline.", + "example": "current" + }, + "parameters": { + "type": "object", + "additionalProperties": { + "anyOf": [ + { + "type": "integer" + }, + { + "type": "string" + }, + { + "type": "boolean" + } + ] + }, + "description": "Pipeline parameters represented as key-value pairs. Must contain branch or tag.", + "example": { + "deploy_prod": true, + "branch": "feature/design-new-api" + } + } + }, + "description": "The parameters for an update schedule request", + "title": "UpdateScheduleParameters" + } + } + } + } } }, "/user/{id}": { @@ -7563,6 +7563,59 @@ } }, "/webhook/{webhook-id}": { + "delete": { + "summary": "Delete a webhook", + "tags": ["Webhook"], + "operationId": "deleteWebhook", + "responses": { + "200": { + "description": "A confirmation message", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "A human-readable message" + } + }, + "required": ["message"], + "description": "message response", + "title": "MessageResponse" + } + } + } + }, + "default": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + } + } + } + } + }, + "description": "Error response." + } + }, + "parameters": [ + { + "in": "path", + "name": "webhook-id", + "description": "ID of the webhook (UUID)", + "schema": { + "type": "string", + "format": "uuid" + }, + "required": true + } + ] + }, "get": { "summary": "Get a webhook", "description": "Get a webhook by id.", @@ -7679,59 +7732,6 @@ } ] }, - "delete": { - "summary": "Delete a webhook", - "tags": ["Webhook"], - "operationId": "deleteWebhook", - "responses": { - "200": { - "description": "A confirmation message", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "message": { - "type": "string", - "description": "A human-readable message" - } - }, - "required": ["message"], - "description": "message response", - "title": "MessageResponse" - } - } - } - }, - "default": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "message": { - "type": "string" - } - } - } - } - }, - "description": "Error response." - } - }, - "parameters": [ - { - "in": "path", - "name": "webhook-id", - "description": "ID of the webhook (UUID)", - "schema": { - "type": "string", - "format": "uuid" - }, - "required": true - } - ] - }, "put": { "summary": "Update a webhook", "tags": ["Webhook"],