From b9092809c3152adcf2165d18722ab05ba6a21ccd Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Wed, 7 Sep 2022 00:02:49 +0000 Subject: [PATCH] daily update 20220907T000249 --- client/services/ContextService.ts | 140 ++--- client/services/InsightsService.ts | 2 +- client/services/ProjectService.ts | 136 ++--- client/services/ScheduleService.ts | 138 ++--- client/services/WebhookService.ts | 52 +- swagger.json | 868 ++++++++++++++--------------- 6 files changed, 668 insertions(+), 668 deletions(-) diff --git a/client/services/ContextService.ts b/client/services/ContextService.ts index b102a0c..bf8770a 100644 --- a/client/services/ContextService.ts +++ b/client/services/ContextService.ts @@ -2,6 +2,62 @@ import type { CancelablePromise } from "../core/CancelablePromise.ts"; import { OpenAPI } from "../core/OpenAPI.ts"; import { request as __request } from "../core/request.ts"; export class ContextService { + /** + * Create a new context + * @returns any The new context + * @throws ApiError + */ + public static createContext({ + requestBody, + }: { + requestBody?: { + /** + * The user defined name of the context. + */ + name: string; + owner: + | { + /** + * The unique ID of the owner of the context. Specify either this or slug. + */ + id: string; + /** + * The type of the owner. Defaults to "organization". Accounts are only used as context owners in server. + */ + type?: "account" | "organization"; + } + | { + /** + * A string that represents an organization. Specify either this or id. Cannot be used for accounts. + */ + slug: string; + /** + * The type of owner. Defaults to "organization". Accounts are only used as context owners in server and must be specified by an id instead of a slug. + */ + type?: "organization"; + }; + }; + }): CancelablePromise<{ + /** + * The unique ID of the context. + */ + id: string; + /** + * The user defined name of the context. + */ + name: string; + /** + * The date and time the context was created. + */ + created_at: string; + }> { + return __request(OpenAPI, { + method: "POST", + url: "/context", + body: requestBody, + mediaType: "application/json", + }); + } /** * List contexts * List all contexts for an owner. @@ -62,59 +118,29 @@ export class ContextService { }); } /** - * Create a new context - * @returns any The new context + * Delete a context + * @returns any A confirmation message * @throws ApiError */ - public static createContext({ - requestBody, + public static deleteContext({ + contextId, }: { - requestBody?: { - /** - * The user defined name of the context. - */ - name: string; - owner: - | { - /** - * The unique ID of the owner of the context. Specify either this or slug. - */ - id: string; - /** - * The type of the owner. Defaults to "organization". Accounts are only used as context owners in server. - */ - type?: "account" | "organization"; - } - | { - /** - * A string that represents an organization. Specify either this or id. Cannot be used for accounts. - */ - slug: string; - /** - * The type of owner. Defaults to "organization". Accounts are only used as context owners in server and must be specified by an id instead of a slug. - */ - type?: "organization"; - }; - }; - }): CancelablePromise<{ /** - * The unique ID of the context. - */ - id: string; - /** - * The user defined name of the context. + * ID of the context (UUID) */ - name: string; + contextId: string; + }): CancelablePromise<{ /** - * The date and time the context was created. + * A human-readable message */ - created_at: string; + message: string; }> { return __request(OpenAPI, { - method: "POST", - url: "/context", - body: requestBody, - mediaType: "application/json", + method: "DELETE", + url: "/context/{context-id}", + path: { + "context-id": contextId, + }, }); } /** @@ -152,32 +178,6 @@ export class ContextService { }, }); } - /** - * Delete a context - * @returns any A confirmation message - * @throws ApiError - */ - public static deleteContext({ - contextId, - }: { - /** - * ID of the context (UUID) - */ - contextId: string; - }): CancelablePromise<{ - /** - * A human-readable message - */ - message: string; - }> { - return __request(OpenAPI, { - method: "DELETE", - url: "/context/{context-id}", - path: { - "context-id": contextId, - }, - }); - } /** * List environment variables * List information about environment variables in a context, not including their values. diff --git a/client/services/InsightsService.ts b/client/services/InsightsService.ts index 8c7d272..3c5930d 100644 --- a/client/services/InsightsService.ts +++ b/client/services/InsightsService.ts @@ -537,7 +537,7 @@ export class InsightsService { /** * Get flaky tests for a project * Get a list of flaky tests for a given project. Flaky tests are branch agnostic. - * A flaky test is a test that passed and faliled in the same commit. + * A flaky test is a test that passed and failed in the same commit. * @returns any A list of flaky tests for a project * @throws ApiError */ diff --git a/client/services/ProjectService.ts b/client/services/ProjectService.ts index 8fb81bd..a00488b 100644 --- a/client/services/ProjectService.ts +++ b/client/services/ProjectService.ts @@ -142,6 +142,39 @@ 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, + }, + }); + } /** * Get a checkout key * Returns an individual checkout key. @@ -192,35 +225,39 @@ export class ProjectService { }); } /** - * Delete a checkout key - * Deletes the checkout key. - * @returns any A confirmation message. + * List all environment variables + * 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. + * @returns any A sequence of environment variables. * @throws ApiError */ - public static deleteCheckoutKey({ + public static listEnvVars({ 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<{ + items: Array<{ + /** + * The name of the environment variable. + */ + name: string; + /** + * The value of the environment variable. + */ + value: string; + }>; /** - * A human-readable message + * A token to pass as a `page-token` query parameter to return the next page of results. */ - message: string; + next_page_token: string; }> { return __request(OpenAPI, { - method: "DELETE", - url: "/project/{project-slug}/checkout-key/{fingerprint}", + method: "GET", + url: "/project/{project-slug}/envvar", path: { "project-slug": projectSlug, - fingerprint: fingerprint, }, }); } @@ -262,39 +299,39 @@ export class ProjectService { }); } /** - * List all environment variables - * 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. - * @returns any A sequence of environment variables. + * Get a masked environment variable + * Returns the masked value of environment variable :name. + * @returns any The environment variable. * @throws ApiError */ - public static listEnvVars({ + public static getEnvVar({ projectSlug, + name, }: { /** * Project slug in the form `vcs-slug/org-name/repo-name`. The `/` characters may be URL-escaped. */ projectSlug: string; + /** + * The name of the environment variable. + */ + name: string; }): CancelablePromise<{ - items: Array<{ - /** - * The name of the environment variable. - */ - name: string; - /** - * The value of the environment variable. - */ - value: string; - }>; /** - * A token to pass as a `page-token` query parameter to return the next page of results. + * The name of the environment variable. */ - next_page_token: string; + name: string; + /** + * The value of the environment variable. + */ + value: string; }> { return __request(OpenAPI, { method: "GET", - url: "/project/{project-slug}/envvar", + url: "/project/{project-slug}/envvar/{name}", path: { "project-slug": projectSlug, + name: name, }, }); } @@ -331,41 +368,4 @@ export class ProjectService { }, }); } - /** - * Get a masked environment variable - * Returns the masked value of environment variable :name. - * @returns any The environment variable. - * @throws ApiError - */ - public static getEnvVar({ - projectSlug, - name, - }: { - /** - * Project slug in the form `vcs-slug/org-name/repo-name`. The `/` characters may be URL-escaped. - */ - projectSlug: string; - /** - * The name of the environment variable. - */ - name: string; - }): CancelablePromise<{ - /** - * The name of the environment variable. - */ - name: string; - /** - * The value of the environment variable. - */ - value: string; - }> { - return __request(OpenAPI, { - method: "GET", - url: "/project/{project-slug}/envvar/{name}", - path: { - "project-slug": projectSlug, - name: name, - }, - }); - } } diff --git a/client/services/ScheduleService.ts b/client/services/ScheduleService.ts index a5d0de3..e7a40ea 100644 --- a/client/services/ScheduleService.ts +++ b/client/services/ScheduleService.ts @@ -313,77 +313,18 @@ export class ScheduleService { }); } /** - * 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" - >; - /** - * Days in a month in which the schedule triggers. This is mutually exclusive with days in a week. - */ - "days-of-month"?: Array; - /** - * Months in which the schedule triggers. - */ - months?: Array< - | "MAR" - | "NOV" - | "DEC" - | "JUN" - | "MAY" - | "OCT" - | "FEB" - | "APR" - | "SEP" - | "AUG" - | "JAN" - | "JUL" - >; - }; - /** - * 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. @@ -510,28 +451,85 @@ 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. + * 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" + >; + /** + * Days in a month in which the schedule triggers. This is mutually exclusive with days in a week. + */ + "days-of-month"?: Array; + /** + * Months in which the schedule triggers. + */ + months?: Array< + | "MAR" + | "NOV" + | "DEC" + | "JUN" + | "MAY" + | "OCT" + | "FEB" + | "APR" + | "SEP" + | "AUG" + | "JAN" + | "JUL" + >; + }; + /** + * 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. @@ -658,11 +656,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 89befd5..5c768f4 100644 --- a/client/services/WebhookService.ts +++ b/client/services/WebhookService.ts @@ -203,6 +203,32 @@ 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 @@ -295,30 +321,4 @@ 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, - }, - }); - } } diff --git a/swagger.json b/swagger.json index 38518da..1a19447 100644 --- a/swagger.json +++ b/swagger.json @@ -26,6 +26,109 @@ ], "paths": { "/context": { + "post": { + "summary": "Create a new context", + "tags": ["Context"], + "operationId": "createContext", + "responses": { + "200": { + "description": "The new context", + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid", + "description": "The unique ID of the context." + }, + "name": { + "type": "string", + "description": "The user defined name of the context." + }, + "created_at": { + "type": "string", + "format": "date-time", + "description": "The date and time the context was created.", + "example": "2015-09-21T17:29:21.042Z" + } + }, + "required": ["id", "name", "created_at"], + "title": "Context" + } + } + } + }, + "default": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "message": { + "type": "string" + } + } + } + } + }, + "description": "Error response." + } + }, + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "The user defined name of the context." + }, + "owner": { + "oneOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "string", + "format": "uuid", + "description": "The unique ID of the owner of the context. Specify either this or slug." + }, + "type": { + "enum": ["account", "organization"], + "type": "string", + "description": "The type of the owner. Defaults to \"organization\". Accounts are only used as context owners in server.", + "example": "organization" + } + }, + "required": ["id"] + }, + { + "type": "object", + "properties": { + "slug": { + "type": "string", + "description": "A string that represents an organization. Specify either this or id. Cannot be used for accounts." + }, + "type": { + "enum": ["organization"], + "type": "string", + "description": "The type of owner. Defaults to \"organization\". Accounts are only used as context owners in server and must be specified by an id instead of a slug." + } + }, + "required": ["slug"] + } + ] + } + }, + "required": ["name", "owner"] + } + } + } + } + }, "get": { "summary": "List contexts", "description": "List all contexts for an owner.", @@ -132,37 +235,29 @@ "allowEmptyValue": true } ] - }, - "post": { - "summary": "Create a new context", + } + }, + "/context/{context-id}": { + "delete": { + "summary": "Delete a context", "tags": ["Context"], - "operationId": "createContext", + "operationId": "deleteContext", "responses": { "200": { - "description": "The new context", + "description": "A confirmation message", "content": { "application/json": { "schema": { "type": "object", "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "The unique ID of the context." - }, - "name": { - "type": "string", - "description": "The user defined name of the context." - }, - "created_at": { + "message": { "type": "string", - "format": "date-time", - "description": "The date and time the context was created.", - "example": "2015-09-21T17:29:21.042Z" + "description": "A human-readable message" } }, - "required": ["id", "name", "created_at"], - "title": "Context" + "required": ["message"], + "description": "message response", + "title": "MessageResponse" } } } @@ -183,61 +278,19 @@ "description": "Error response." } }, - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "name": { - "type": "string", - "description": "The user defined name of the context." - }, - "owner": { - "oneOf": [ - { - "type": "object", - "properties": { - "id": { - "type": "string", - "format": "uuid", - "description": "The unique ID of the owner of the context. Specify either this or slug." - }, - "type": { - "enum": ["account", "organization"], - "type": "string", - "description": "The type of the owner. Defaults to \"organization\". Accounts are only used as context owners in server.", - "example": "organization" - } - }, - "required": ["id"] - }, - { - "type": "object", - "properties": { - "slug": { - "type": "string", - "description": "A string that represents an organization. Specify either this or id. Cannot be used for accounts." - }, - "type": { - "enum": ["organization"], - "type": "string", - "description": "The type of owner. Defaults to \"organization\". Accounts are only used as context owners in server and must be specified by an id instead of a slug." - } - }, - "required": ["slug"] - } - ] - } - }, - "required": ["name", "owner"] - } - } + "parameters": [ + { + "in": "path", + "name": "context-id", + "description": "ID of the context (UUID)", + "schema": { + "type": "string", + "format": "uuid" + }, + "required": true } - } - } - }, - "/context/{context-id}": { + ] + }, "get": { "summary": "Get a context", "description": "Returns basic information about a context.", @@ -301,59 +354,6 @@ "required": true } ] - }, - "delete": { - "summary": "Delete a context", - "tags": ["Context"], - "operationId": "deleteContext", - "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": "context-id", - "description": "ID of the context (UUID)", - "schema": { - "type": "string", - "format": "uuid" - }, - "required": true - } - ] } }, "/context/{context-id}/environment-variable": { @@ -1529,7 +1529,7 @@ "/insights/{project-slug}/flaky-tests": { "get": { "summary": "Get flaky tests for a project", - "description": "Get a list of flaky tests for a given project. Flaky tests are branch agnostic. \n A flaky test is a test that passed and faliled in the same commit.", + "description": "Get a list of flaky tests for a given project. Flaky tests are branch agnostic. \n A flaky test is a test that passed and failed in the same commit.", "tags": ["Insights"], "operationId": "getFlakyTests", "responses": { @@ -4270,8 +4270,73 @@ } }, "/project/{project-slug}/checkout-key/{fingerprint}": { - "get": { - "summary": "Get a checkout key", + "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" + } + } + } + }, + "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 + }, + { + "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" + } + ] + }, + "get": { + "summary": "Get a checkout key", "description": "Returns an individual checkout key.", "tags": ["Project"], "operationId": "getCheckoutKey", @@ -4363,28 +4428,50 @@ "example": "c9:0b:1c:4f:d5:65:56:b9:ad:88:f9:81:2b:37:74:2f" } ] - }, - "delete": { - "summary": "Delete a checkout key", - "description": "Deletes the checkout key.", + } + }, + "/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.", "tags": ["Project"], - "operationId": "deleteCheckoutKey", + "operationId": "listEnvVars", "responses": { "200": { - "description": "A confirmation message.", + "description": "A sequence of environment variables.", "content": { "application/json": { "schema": { "type": "object", "properties": { - "message": { + "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", - "description": "A human-readable message" + "x-nullable": true, + "description": "A token to pass as a `page-token` query parameter to return the next page of results." } }, - "required": ["message"], - "description": "message response", - "title": "MessageResponse" + "required": ["items", "next_page_token"], + "title": "EnvironmentVariableListResponse" } } } @@ -4416,21 +4503,9 @@ "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.", @@ -4513,105 +4588,35 @@ } } } - }, - "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}": { - "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" } } } @@ -4656,32 +4661,27 @@ } ] }, - "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" } } } @@ -7113,11 +7113,11 @@ } ] }, - "patch": { - "summary": "Update a schedule", - "description": "Updates a schedule and returns the updated schedule.", + "get": { + "summary": "Get a schedule", + "description": "Get a schedule by id.", "tags": ["Schedule"], - "operationId": "updateSchedule", + "operationId": "getScheduleById", "responses": { "200": { "description": "A schedule object.", @@ -7392,130 +7392,13 @@ }, "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." - }, - "days-of-month": { - "type": "array", - "items": { - "type": "integer", - "format": "integer", - "description": "Day in a month, between 1 and 31." - }, - "description": "Days in a month in which the schedule triggers. This is mutually exclusive with days in a week." - }, - "months": { - "type": "array", - "items": { - "enum": [ - "MAR", - "NOV", - "DEC", - "JUN", - "MAY", - "OCT", - "FEB", - "APR", - "SEP", - "AUG", - "JAN", - "JUL" - ], - "type": "string", - "description": "Month, in three letters format." - }, - "description": "Months 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" - } - } - } - } + ] }, - "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.", @@ -7790,7 +7673,124 @@ }, "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." + }, + "days-of-month": { + "type": "array", + "items": { + "type": "integer", + "format": "integer", + "description": "Day in a month, between 1 and 31." + }, + "description": "Days in a month in which the schedule triggers. This is mutually exclusive with days in a week." + }, + "months": { + "type": "array", + "items": { + "enum": [ + "MAR", + "NOV", + "DEC", + "JUN", + "MAY", + "OCT", + "FEB", + "APR", + "SEP", + "AUG", + "JAN", + "JUL" + ], + "type": "string", + "description": "Month, in three letters format." + }, + "description": "Months 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}": { @@ -8282,6 +8282,59 @@ } ] }, + "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"], @@ -8432,59 +8485,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 - } - ] } }, "/workflow/{id}": {