From d8d5cdd826d60cbe405590bc7e47701ce2eaad6d Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Fri, 19 Aug 2022 00:03:58 +0000 Subject: [PATCH] daily update 20220819T000358 --- client/services/ContextService.ts | 66 +- client/services/ProjectService.ts | 134 ++-- client/services/ScheduleService.ts | 54 +- client/services/WebhookService.ts | 170 ++--- swagger.json | 968 ++++++++++++++--------------- 5 files changed, 696 insertions(+), 696 deletions(-) diff --git a/client/services/ContextService.ts b/client/services/ContextService.ts index b9dff50..3560ecd 100644 --- a/client/services/ContextService.ts +++ b/client/services/ContextService.ts @@ -219,39 +219,6 @@ 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. @@ -310,4 +277,37 @@ 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 5e076f3..afdbc5b 100644 --- a/client/services/ProjectService.ts +++ b/client/services/ProjectService.ts @@ -60,6 +60,39 @@ 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`. @@ -110,36 +143,36 @@ 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", }); } /** @@ -191,39 +224,6 @@ export class ProjectService { }, }); } - /** - * Delete a checkout key - * Deletes the checkout key. - * @returns any A confirmation message. - * @throws ApiError - */ - public static deleteCheckoutKey({ - projectSlug, - fingerprint, - }: { - /** - * 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; - }): CancelablePromise<{ - /** - * A human-readable message - */ - message: string; - }> { - return __request(OpenAPI, { - method: "DELETE", - url: "/project/{project-slug}/checkout-key/{fingerprint}", - path: { - "project-slug": projectSlug, - fingerprint: fingerprint, - }, - }); - } /** * Create an environment variable * Creates a new environment variable. @@ -299,12 +299,12 @@ export class ProjectService { }); } /** - * Get a masked environment variable - * Returns the masked value of environment variable :name. - * @returns any The environment variable. + * Delete an environment variable + * Deletes the environment variable named :name. + * @returns any A confirmation message. * @throws ApiError */ - public static getEnvVar({ + public static deleteEnvVar({ projectSlug, name, }: { @@ -318,16 +318,12 @@ export class ProjectService { name: string; }): CancelablePromise<{ /** - * The name of the environment variable. - */ - name: string; - /** - * The value of the environment variable. + * A human-readable message */ - value: string; + message: string; }> { return __request(OpenAPI, { - method: "GET", + method: "DELETE", url: "/project/{project-slug}/envvar/{name}", path: { "project-slug": projectSlug, @@ -336,12 +332,12 @@ export class ProjectService { }); } /** - * Delete an environment variable - * Deletes the environment variable named :name. - * @returns any A confirmation message. + * Get a masked environment variable + * Returns the masked value of environment variable :name. + * @returns any The environment variable. * @throws ApiError */ - public static deleteEnvVar({ + public static getEnvVar({ projectSlug, name, }: { @@ -355,12 +351,16 @@ export class ProjectService { name: string; }): CancelablePromise<{ /** - * A human-readable message + * The name of the environment variable. */ - message: string; + name: string; + /** + * The value of the environment variable. + */ + value: string; }> { return __request(OpenAPI, { - method: "DELETE", + method: "GET", url: "/project/{project-slug}/envvar/{name}", path: { "project-slug": projectSlug, diff --git a/client/services/ScheduleService.ts b/client/services/ScheduleService.ts index 281be99..569660d 100644 --- a/client/services/ScheduleService.ts +++ b/client/services/ScheduleService.ts @@ -285,33 +285,6 @@ 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. @@ -519,6 +492,33 @@ export class ScheduleService { mediaType: "application/json", }); } + /** + * 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, + }, + }); + } /** * Get a schedule * Get a schedule by id. diff --git a/client/services/WebhookService.ts b/client/services/WebhookService.ts index 36e14c2..dfea83c 100644 --- a/client/services/WebhookService.ts +++ b/client/services/WebhookService.ts @@ -2,6 +2,59 @@ import type { CancelablePromise } from "../core/CancelablePromise.ts"; import { OpenAPI } from "../core/OpenAPI.ts"; import { request as __request } from "../core/request.ts"; export class WebhookService { + /** + * Create a webhook + * @returns any Error response. + * @throws ApiError + */ + public static createWebhook({ + requestBody, + }: { + requestBody?: { + /** + * Name of the webhook + */ + name: string; + /** + * Events that will trigger the webhook + */ + events: Array<"workflow-completed" | "job-completed">; + /** + * URL to deliver the webhook to. Note: protocol must be included as well (only https is supported) + */ + url: string; + /** + * Whether to enforce TLS certificate verification when delivering the webhook + */ + "verify-tls": boolean; + /** + * Secret used to build an HMAC hash of the payload and passed as a header in the webhook request + */ + "signing-secret": string; + /** + * The scope in which the relevant events that will trigger webhooks + */ + scope: { + /** + * ID of the scope being used (at the moment, only project ID is supported) + */ + id: string; + /** + * Type of the scope being used + */ + type: "project"; + }; + }; + }): CancelablePromise<{ + message?: string; + }> { + return __request(OpenAPI, { + method: "POST", + url: "/webhook", + body: requestBody, + mediaType: "application/json", + }); + } /** * List webhooks * Get a list of webhook that match the given scope-type and scope-id @@ -82,59 +135,6 @@ export class WebhookService { }, }); } - /** - * Create a webhook - * @returns any Error response. - * @throws ApiError - */ - public static createWebhook({ - requestBody, - }: { - requestBody?: { - /** - * Name of the webhook - */ - name: string; - /** - * Events that will trigger the webhook - */ - events: Array<"workflow-completed" | "job-completed">; - /** - * URL to deliver the webhook to. Note: protocol must be included as well (only https is supported) - */ - url: string; - /** - * Whether to enforce TLS certificate verification when delivering the webhook - */ - "verify-tls": boolean; - /** - * Secret used to build an HMAC hash of the payload and passed as a header in the webhook request - */ - "signing-secret": string; - /** - * The scope in which the relevant events that will trigger webhooks - */ - scope: { - /** - * ID of the scope being used (at the moment, only project ID is supported) - */ - id: string; - /** - * Type of the scope being used - */ - type: "project"; - }; - }; - }): CancelablePromise<{ - message?: string; - }> { - return __request(OpenAPI, { - method: "POST", - url: "/webhook", - body: requestBody, - mediaType: "application/json", - }); - } /** * Delete a webhook * @returns any A confirmation message @@ -162,40 +162,18 @@ export class WebhookService { }); } /** - * Update a webhook + * Get a webhook + * Get a webhook by id. * @returns any A webhook * @throws ApiError */ - public static updateWebhook({ + public static getWebhookById({ webhookId, - requestBody, }: { /** * ID of the webhook (UUID) */ webhookId: string; - requestBody?: { - /** - * Name of the webhook - */ - name?: string; - /** - * Events that will trigger the webhook - */ - events?: Array<"workflow-completed" | "job-completed">; - /** - * URL to deliver the webhook to. Note: protocol must be included as well (only https is supported) - */ - url?: string; - /** - * Secret used to build an HMAC hash of the payload and passed as a header in the webhook request - */ - "signing-secret"?: string; - /** - * Whether to enforce TLS certificate verification when delivering the webhook - */ - "verify-tls"?: boolean; - }; }): CancelablePromise<{ /** * URL to deliver the webhook to. Note: protocol must be included as well (only https is supported) @@ -244,28 +222,48 @@ export class WebhookService { events: Array<"workflow-completed" | "job-completed">; }> { return __request(OpenAPI, { - method: "PUT", + method: "GET", url: "/webhook/{webhook-id}", path: { "webhook-id": webhookId, }, - body: requestBody, - mediaType: "application/json", }); } /** - * Get a webhook - * Get a webhook by id. + * Update a webhook * @returns any A webhook * @throws ApiError */ - public static getWebhookById({ + public static updateWebhook({ webhookId, + requestBody, }: { /** * ID of the webhook (UUID) */ webhookId: string; + requestBody?: { + /** + * Name of the webhook + */ + name?: string; + /** + * Events that will trigger the webhook + */ + events?: Array<"workflow-completed" | "job-completed">; + /** + * URL to deliver the webhook to. Note: protocol must be included as well (only https is supported) + */ + url?: string; + /** + * Secret used to build an HMAC hash of the payload and passed as a header in the webhook request + */ + "signing-secret"?: string; + /** + * Whether to enforce TLS certificate verification when delivering the webhook + */ + "verify-tls"?: boolean; + }; }): CancelablePromise<{ /** * URL to deliver the webhook to. Note: protocol must be included as well (only https is supported) @@ -314,11 +312,13 @@ export class WebhookService { events: Array<"workflow-completed" | "job-completed">; }> { return __request(OpenAPI, { - method: "GET", + method: "PUT", url: "/webhook/{webhook-id}", path: { "webhook-id": webhookId, }, + body: requestBody, + mediaType: "application/json", }); } } diff --git a/swagger.json b/swagger.json index d517ed9..e71f238 100644 --- a/swagger.json +++ b/swagger.json @@ -437,70 +437,6 @@ } }, "/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.", @@ -607,6 +543,70 @@ } } } + }, + "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": { @@ -4059,105 +4059,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.", @@ -4261,59 +4162,129 @@ } } } - } - }, - "/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" + } + } + } + }, + "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}/checkout-key/{fingerprint}": { + "delete": { + "summary": "Delete a checkout key", + "description": "Deletes the checkout key.", + "tags": ["Project"], + "operationId": "deleteCheckoutKey", + "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" } } } @@ -4358,27 +4329,56 @@ } ] }, - "delete": { - "summary": "Delete a checkout key", - "description": "Deletes the checkout key.", + "get": { + "summary": "Get a checkout key", + "description": "Returns an individual checkout key.", "tags": ["Project"], - "operationId": "deleteCheckoutKey", + "operationId": "getCheckoutKey", "responses": { "200": { - "description": "A confirmation message.", + "description": "The checkout key.", "content": { "application/json": { "schema": { "type": "object", "properties": { - "message": { + "public-key": { "type": "string", - "description": "A human-readable message" + "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": ["message"], - "description": "message response", - "title": "MessageResponse" + "required": [ + "public-key", + "type", + "fingerprint", + "preferred", + "created-at" + ], + "title": "CheckoutKey" } } } @@ -4585,32 +4585,27 @@ } }, "/project/{project-slug}/envvar/{name}": { - "get": { - "summary": "Get a masked environment variable", - "description": "Returns the masked value of environment variable :name.", + "delete": { + "summary": "Delete an environment variable", + "description": "Deletes the environment variable named :name.", "tags": ["Project"], - "operationId": "getEnvVar", + "operationId": "deleteEnvVar", "responses": { "200": { - "description": "The environment variable.", + "description": "A confirmation message.", "content": { "application/json": { "schema": { "type": "object", "properties": { - "name": { - "type": "string", - "description": "The name of the environment variable.", - "example": "foo" - }, - "value": { + "message": { "type": "string", - "description": "The value of the environment variable.", - "example": "xxxx1234" + "description": "A human-readable message" } }, - "required": ["name", "value"], - "title": "EnvironmentVariablePair" + "required": ["message"], + "description": "message response", + "title": "MessageResponse" } } } @@ -4655,27 +4650,32 @@ } ] }, - "delete": { - "summary": "Delete an environment variable", - "description": "Deletes the environment variable named :name.", + "get": { + "summary": "Get a masked environment variable", + "description": "Returns the masked value of environment variable :name.", "tags": ["Project"], - "operationId": "deleteEnvVar", + "operationId": "getEnvVar", "responses": { "200": { - "description": "A confirmation message.", + "description": "The environment variable.", "content": { "application/json": { "schema": { "type": "object", "properties": { - "message": { + "name": { "type": "string", - "description": "A human-readable message" + "description": "The name of the environment variable.", + "example": "foo" + }, + "value": { + "type": "string", + "description": "The value of the environment variable.", + "example": "xxxx1234" } }, - "required": ["message"], - "description": "message response", - "title": "MessageResponse" + "required": ["name", "value"], + "title": "EnvironmentVariablePair" } } } @@ -7053,74 +7053,20 @@ } }, "/schedule/{schedule-id}": { - "delete": { - "summary": "Delete a schedule", - "description": "Deletes the schedule by id.", + "patch": { + "summary": "Update a schedule", + "description": "Updates a schedule and returns the updated schedule.", "tags": ["Schedule"], - "operationId": "deleteScheduleById", + "operationId": "updateSchedule", "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." @@ -7505,6 +7451,60 @@ } } }, + "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" + } + }, + "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 + } + ] + }, "get": { "summary": "Get a schedule", "description": "Get a schedule by id.", @@ -7853,147 +7853,6 @@ } }, "/webhook": { - "get": { - "summary": "List webhooks", - "description": "Get a list of webhook that match the given scope-type and scope-id", - "tags": ["Webhook"], - "operationId": "getWebhooks", - "responses": { - "200": { - "description": "A list of webhooks", - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "items": { - "type": "array", - "items": { - "type": "object", - "properties": { - "url": { - "type": "string", - "description": "URL to deliver the webhook to. Note: protocol must be included as well (only https is supported)" - }, - "verify-tls": { - "type": "boolean", - "description": "Whether to enforce TLS certificate verification when delivering the webhook" - }, - "id": { - "type": "string", - "format": "uuid", - "description": "The unique ID of the webhook" - }, - "signing-secret": { - "type": "string", - "description": "Masked value of the secret used to build an HMAC hash of the payload and passed as a header in the webhook request" - }, - "updated-at": { - "type": "string", - "format": "date-time", - "description": "The date and time the webhook was last updated.", - "example": "2015-09-21T17:29:21.042Z" - }, - "name": { - "type": "string", - "description": "Name of the webhook" - }, - "created-at": { - "type": "string", - "format": "date-time", - "description": "The date and time the webhook was created.", - "example": "2015-09-21T17:29:21.042Z" - }, - "scope": { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "ID of the scope being used (at the moment, only project ID is supported)" - }, - "type": { - "type": "string", - "description": "Type of the scope being used" - } - }, - "required": ["id", "type"], - "description": "The scope in which the relevant events that will trigger webhooks" - }, - "events": { - "type": "array", - "items": { - "enum": ["workflow-completed", "job-completed"], - "type": "string" - }, - "description": "Events that will trigger the webhook" - } - }, - "required": [ - "id", - "scope", - "name", - "events", - "url", - "verify-tls", - "signing-secret", - "created-at", - "updated-at" - ], - "title": "Webhook" - } - }, - "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"], - "description": "A list of webhooks" - } - } - } - }, - "default": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "message": { - "type": "string" - } - } - } - } - }, - "description": "Error response." - } - }, - "parameters": [ - { - "in": "query", - "name": "scope-id", - "description": "ID of the scope being used (at the moment, only project ID is supported)", - "schema": { - "type": "string", - "format": "uuid" - }, - "required": true - }, - { - "in": "query", - "name": "scope-type", - "description": "Type of the scope being used", - "schema": { - "type": "string", - "enum": ["project"] - }, - "required": true - } - ] - }, "post": { "summary": "Create a webhook", "tags": ["Webhook"], @@ -8157,6 +8016,147 @@ } } } + }, + "get": { + "summary": "List webhooks", + "description": "Get a list of webhook that match the given scope-type and scope-id", + "tags": ["Webhook"], + "operationId": "getWebhooks", + "responses": { + "200": { + "description": "A list of webhooks", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "items": { + "type": "array", + "items": { + "type": "object", + "properties": { + "url": { + "type": "string", + "description": "URL to deliver the webhook to. Note: protocol must be included as well (only https is supported)" + }, + "verify-tls": { + "type": "boolean", + "description": "Whether to enforce TLS certificate verification when delivering the webhook" + }, + "id": { + "type": "string", + "format": "uuid", + "description": "The unique ID of the webhook" + }, + "signing-secret": { + "type": "string", + "description": "Masked value of the secret used to build an HMAC hash of the payload and passed as a header in the webhook request" + }, + "updated-at": { + "type": "string", + "format": "date-time", + "description": "The date and time the webhook was last updated.", + "example": "2015-09-21T17:29:21.042Z" + }, + "name": { + "type": "string", + "description": "Name of the webhook" + }, + "created-at": { + "type": "string", + "format": "date-time", + "description": "The date and time the webhook was created.", + "example": "2015-09-21T17:29:21.042Z" + }, + "scope": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid", + "description": "ID of the scope being used (at the moment, only project ID is supported)" + }, + "type": { + "type": "string", + "description": "Type of the scope being used" + } + }, + "required": ["id", "type"], + "description": "The scope in which the relevant events that will trigger webhooks" + }, + "events": { + "type": "array", + "items": { + "enum": ["workflow-completed", "job-completed"], + "type": "string" + }, + "description": "Events that will trigger the webhook" + } + }, + "required": [ + "id", + "scope", + "name", + "events", + "url", + "verify-tls", + "signing-secret", + "created-at", + "updated-at" + ], + "title": "Webhook" + } + }, + "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"], + "description": "A list of webhooks" + } + } + } + }, + "default": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + } + } + } + } + }, + "description": "Error response." + } + }, + "parameters": [ + { + "in": "query", + "name": "scope-id", + "description": "ID of the scope being used (at the moment, only project ID is supported)", + "schema": { + "type": "string", + "format": "uuid" + }, + "required": true + }, + { + "in": "query", + "name": "scope-type", + "description": "Type of the scope being used", + "schema": { + "type": "string", + "enum": ["project"] + }, + "required": true + } + ] } }, "/webhook/{webhook-id}": { @@ -8213,10 +8213,11 @@ } ] }, - "put": { - "summary": "Update a webhook", + "get": { + "summary": "Get a webhook", + "description": "Get a webhook by id.", "tags": ["Webhook"], - "operationId": "updateWebhook", + "operationId": "getWebhookById", "responses": { "200": { "description": "A webhook", @@ -8326,49 +8327,12 @@ }, "required": true } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "Name of the webhook" - }, - "events": { - "type": "array", - "items": { - "enum": ["workflow-completed", "job-completed"], - "type": "string" - }, - "description": "Events that will trigger the webhook" - }, - "url": { - "type": "string", - "description": "URL to deliver the webhook to. Note: protocol must be included as well (only https is supported)" - }, - "signing-secret": { - "type": "string", - "description": "Secret used to build an HMAC hash of the payload and passed as a header in the webhook request" - }, - "verify-tls": { - "type": "boolean", - "description": "Whether to enforce TLS certificate verification when delivering the webhook" - } - }, - "description": "The parameters for an update webhook request" - } - } - } - } + ] }, - "get": { - "summary": "Get a webhook", - "description": "Get a webhook by id.", + "put": { + "summary": "Update a webhook", "tags": ["Webhook"], - "operationId": "getWebhookById", + "operationId": "updateWebhook", "responses": { "200": { "description": "A webhook", @@ -8478,7 +8442,43 @@ }, "required": true } - ] + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Name of the webhook" + }, + "events": { + "type": "array", + "items": { + "enum": ["workflow-completed", "job-completed"], + "type": "string" + }, + "description": "Events that will trigger the webhook" + }, + "url": { + "type": "string", + "description": "URL to deliver the webhook to. Note: protocol must be included as well (only https is supported)" + }, + "signing-secret": { + "type": "string", + "description": "Secret used to build an HMAC hash of the payload and passed as a header in the webhook request" + }, + "verify-tls": { + "type": "boolean", + "description": "Whether to enforce TLS certificate verification when delivering the webhook" + } + }, + "description": "The parameters for an update webhook request" + } + } + } + } } }, "/workflow/{id}": {