From 411733609f1ed5c81497b725aeef979e3c1f618c Mon Sep 17 00:00:00 2001 From: GitHub Action Date: Sat, 10 Sep 2022 00:03:22 +0000 Subject: [PATCH] daily update 20220910T000322 --- client/services/ContextService.ts | 178 ++--- client/services/InsightsService.ts | 2 +- client/services/ProjectService.ts | 36 +- client/services/ScheduleService.ts | 192 ++--- client/services/WebhookService.ts | 216 ++--- swagger.json | 1198 ++++++++++++++-------------- 6 files changed, 911 insertions(+), 911 deletions(-) diff --git a/client/services/ContextService.ts b/client/services/ContextService.ts index 1906454..e9de478 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. @@ -61,62 +117,6 @@ 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", - }); - } /** * Delete a context * @returns any A confirmation message @@ -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/InsightsService.ts b/client/services/InsightsService.ts index 3c5930d..731de6e 100644 --- a/client/services/InsightsService.ts +++ b/client/services/InsightsService.ts @@ -506,7 +506,7 @@ export class InsightsService { } /** * Get all branches for a project - * Get a list of all branches for a specified project. The list will only contain branches currently available within Insights. + * Get a list of all branches for a specified project. The list will only contain branches currently available within Insights. The maximum number of branches returned by this endpoint is 5,000. * @returns any A list of branches for a project * @throws ApiError */ diff --git a/client/services/ProjectService.ts b/client/services/ProjectService.ts index afdbc5b..bacde5a 100644 --- a/client/services/ProjectService.ts +++ b/client/services/ProjectService.ts @@ -299,12 +299,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, }: { @@ -318,12 +318,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, @@ -332,12 +336,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, }: { @@ -351,16 +355,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, diff --git a/client/services/ScheduleService.ts b/client/services/ScheduleService.ts index acbd3fc..c28f73a 100644 --- a/client/services/ScheduleService.ts +++ b/client/services/ScheduleService.ts @@ -286,18 +286,77 @@ export class ScheduleService { }); } /** - * 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. @@ -424,112 +483,28 @@ export class ScheduleService { description: string; }> { return __request(OpenAPI, { - method: "GET", - url: "/schedule/{schedule-id}", - path: { - "schedule-id": scheduleId, - }, - }); - } - /** - * 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", + method: "PATCH", url: "/schedule/{schedule-id}", path: { "schedule-id": scheduleId, }, + body: requestBody, + mediaType: "application/json", }); } /** - * 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. @@ -656,13 +631,38 @@ export class ScheduleService { description: string; }> { return __request(OpenAPI, { - method: "PATCH", + method: "GET", + url: "/schedule/{schedule-id}", + path: { + "schedule-id": scheduleId, + }, + }); + } + /** + * 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, }, - body: requestBody, - mediaType: "application/json", }); } } diff --git a/client/services/WebhookService.ts b/client/services/WebhookService.ts index a9b488b..87d2bf1 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 @@ -83,56 +136,71 @@ export class WebhookService { }); } /** - * Create a webhook - * @returns any Error response. + * Get a webhook + * Get a webhook by id. + * @returns any A webhook * @throws ApiError */ - public static createWebhook({ - requestBody, + public static getWebhookById({ + webhookId, }: { - 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; + /** + * ID of the webhook (UUID) + */ + webhookId: string; + }): CancelablePromise<{ + /** + * 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; + /** + * The unique ID of the webhook + */ + id: string; + /** + * Masked value of the secret used to build an HMAC hash of the payload and passed as a header in the webhook request + */ + "signing-secret": string; + /** + * The date and time the webhook was last updated. + */ + "updated-at": string; + /** + * Name of the webhook + */ + name: string; + /** + * The date and time the webhook was created. + */ + "created-at": string; + /** + * The scope in which the relevant events that will trigger webhooks + */ + scope: { /** - * Secret used to build an HMAC hash of the payload and passed as a header in the webhook request + * ID of the scope being used (at the moment, only project ID is supported) */ - "signing-secret": string; + id: string; /** - * The scope in which the relevant events that will trigger webhooks + * Type of the scope being used */ - 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"; - }; + type: string; }; - }): CancelablePromise<{ - message?: string; + /** + * Events that will trigger the webhook + */ + events: Array<"workflow-completed" | "job-completed">; }> { return __request(OpenAPI, { - method: "POST", - url: "/webhook", - body: requestBody, - mediaType: "application/json", + method: "GET", + url: "/webhook/{webhook-id}", + path: { + "webhook-id": webhookId, + }, }); } /** @@ -253,72 +321,4 @@ export class WebhookService { }, }); } - /** - * Get a webhook - * Get a webhook by id. - * @returns any A webhook - * @throws ApiError - */ - public static getWebhookById({ - webhookId, - }: { - /** - * ID of the webhook (UUID) - */ - webhookId: string; - }): CancelablePromise<{ - /** - * 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; - /** - * The unique ID of the webhook - */ - id: string; - /** - * Masked value of the secret used to build an HMAC hash of the payload and passed as a header in the webhook request - */ - "signing-secret": string; - /** - * The date and time the webhook was last updated. - */ - "updated-at": string; - /** - * Name of the webhook - */ - name: string; - /** - * The date and time the webhook was created. - */ - "created-at": 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: string; - }; - /** - * Events that will trigger the webhook - */ - events: Array<"workflow-completed" | "job-completed">; - }> { - return __request(OpenAPI, { - method: "GET", - url: "/webhook/{webhook-id}", - path: { - "webhook-id": webhookId, - }, - }); - } } diff --git a/swagger.json b/swagger.json index 9e62482..bf8f64e 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,109 +235,6 @@ "allowEmptyValue": true } ] - }, - "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"] - } - } - } - } } }, "/context/{context-id}": { @@ -437,27 +437,53 @@ } }, "/context/{context-id}/environment-variable/{env-var-name}": { - "delete": { - "summary": "Remove an environment variable", - "description": "Delete an environment variable from a context.", + "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.", "tags": ["Context"], - "operationId": "deleteEnvironmentVariableFromContext", + "operationId": "addEnvironmentVariableToContext", "responses": { "200": { - "description": "A confirmation message", + "description": "The new environment variable", "content": { "application/json": { "schema": { - "type": "object", - "properties": { - "message": { - "type": "string", - "description": "A human-readable message" + "anyOf": [ + { + "type": "object", + "properties": { + "variable": { + "type": "string", + "description": "The name of the environment variable", + "example": "POSTGRES_USER" + }, + "created_at": { + "type": "string", + "format": "date-time", + "description": "The date and time the environment variable was created.", + "example": "2015-09-21T17:29:21.042Z" + }, + "context_id": { + "type": "string", + "format": "uuid", + "description": "ID of the context (UUID)" + } + }, + "required": ["variable", "created_at", "context_id"] + }, + { + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "A human-readable message" + } + }, + "required": ["message"], + "description": "message response", + "title": "MessageResponse" } - }, - "required": ["message"], - "description": "message response", - "title": "MessageResponse" + ] } } } @@ -479,16 +505,6 @@ } }, "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", @@ -498,56 +514,57 @@ "format": "uuid" }, "required": true + }, + { + "in": "path", + "name": "env-var-name", + "description": "The name of the environment variable", + "schema": { + "type": "string" + }, + "required": true, + "example": "POSTGRES_USER" } - ] + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "value": { + "type": "string", + "description": "The value of the environment variable", + "example": "some-secret-value" + } + }, + "required": ["value"] + } + } + } + } }, - "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.", + "delete": { + "summary": "Remove an environment variable", + "description": "Delete an environment variable from a context.", "tags": ["Context"], - "operationId": "addEnvironmentVariableToContext", + "operationId": "deleteEnvironmentVariableFromContext", "responses": { "200": { - "description": "The new environment variable", + "description": "A confirmation message", "content": { "application/json": { "schema": { - "anyOf": [ - { - "type": "object", - "properties": { - "variable": { - "type": "string", - "description": "The name of the environment variable", - "example": "POSTGRES_USER" - }, - "created_at": { - "type": "string", - "format": "date-time", - "description": "The date and time the environment variable was created.", - "example": "2015-09-21T17:29:21.042Z" - }, - "context_id": { - "type": "string", - "format": "uuid", - "description": "ID of the context (UUID)" - } - }, - "required": ["variable", "created_at", "context_id"] - }, - { - "type": "object", - "properties": { - "message": { - "type": "string", - "description": "A human-readable message" - } - }, - "required": ["message"], - "description": "message response", - "title": "MessageResponse" + "type": "object", + "properties": { + "message": { + "type": "string", + "description": "A human-readable message" } - ] + }, + "required": ["message"], + "description": "message response", + "title": "MessageResponse" } } } @@ -569,16 +586,6 @@ } }, "parameters": [ - { - "in": "path", - "name": "context-id", - "description": "ID of the context (UUID)", - "schema": { - "type": "string", - "format": "uuid" - }, - "required": true - }, { "in": "path", "name": "env-var-name", @@ -588,25 +595,18 @@ }, "required": true, "example": "POSTGRES_USER" + }, + { + "in": "path", + "name": "context-id", + "description": "ID of the context (UUID)", + "schema": { + "type": "string", + "format": "uuid" + }, + "required": true } - ], - "requestBody": { - "content": { - "application/json": { - "schema": { - "type": "object", - "properties": { - "value": { - "type": "string", - "description": "The value of the environment variable", - "example": "some-secret-value" - } - }, - "required": ["value"] - } - } - } - } + ] } }, "/insights/pages/{project-slug}/summary": { @@ -1473,7 +1473,7 @@ "/insights/{project-slug}/branches": { "get": { "summary": "Get all branches for a project", - "description": "Get a list of all branches for a specified project. The list will only contain branches currently available within Insights.", + "description": "Get a list of all branches for a specified project. The list will only contain branches currently available within Insights. The maximum number of branches returned by this endpoint is 5,000.", "tags": ["Insights"], "operationId": "getAllInsightsBranches", "responses": { @@ -4591,27 +4591,32 @@ } }, "/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" } } } @@ -7059,11 +7059,11 @@ } }, "/schedule/{schedule-id}": { - "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.", @@ -7338,67 +7338,130 @@ }, "required": true } - ] - }, - "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" - } + ], + "requestBody": { + "content": { + "application/json": { + "schema": { + "type": "object", + "properties": { + "description": { + "type": "string", + "x-nullable": true, + "description": "Description of the schedule." }, - "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 + "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" + } + } } - ] + } }, - "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.", @@ -7673,124 +7736,61 @@ }, "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" + ] + }, + "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 + } + ] } }, "/user/{id}": { @@ -7838,27 +7838,191 @@ "type": "string" } } - } + } + } + }, + "description": "Error response." + } + }, + "parameters": [ + { + "in": "path", + "name": "id", + "description": "The unique ID of the user.", + "schema": { + "type": "string", + "format": "uuid" + }, + "required": true + } + ] + } + }, + "/webhook": { + "post": { + "summary": "Create a webhook", + "tags": ["Webhook"], + "operationId": "createWebhook", + "responses": { + "201": { + "description": "A webhook", + "content": { + "application/json": { + "schema": { + "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" + } + } + } + }, + "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": "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)" + }, + "verify-tls": { + "type": "boolean", + "description": "Whether to enforce TLS certificate verification when delivering the webhook" + }, + "signing-secret": { + "type": "string", + "description": "Secret used to build an HMAC hash of the payload and passed as a header in the webhook request" + }, + "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": { + "enum": ["project"], + "type": "string", + "description": "Type of the scope being used" + } + }, + "required": ["id", "type"], + "description": "The scope in which the relevant events that will trigger webhooks" + } + }, + "required": [ + "name", + "events", + "url", + "verify-tls", + "signing-secret", + "scope" + ], + "description": "The parameters for a create webhook request" } - }, - "description": "Error response." - } - }, - "parameters": [ - { - "in": "path", - "name": "id", - "description": "The unique ID of the user.", - "schema": { - "type": "string", - "format": "uuid" - }, - "required": true + } } - ] - } - }, - "/webhook": { + } + }, "get": { "summary": "List webhooks", "description": "Get a list of webhook that match the given scope-type and scope-id", @@ -7999,13 +8163,16 @@ "required": true } ] - }, - "post": { - "summary": "Create a webhook", + } + }, + "/webhook/{webhook-id}": { + "get": { + "summary": "Get a webhook", + "description": "Get a webhook by id.", "tags": ["Webhook"], - "operationId": "createWebhook", + "operationId": "getWebhookById", "responses": { - "201": { + "200": { "description": "A webhook", "content": { "application/json": { @@ -8102,70 +8269,19 @@ "description": "Error response." } }, - "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)" - }, - "verify-tls": { - "type": "boolean", - "description": "Whether to enforce TLS certificate verification when delivering the webhook" - }, - "signing-secret": { - "type": "string", - "description": "Secret used to build an HMAC hash of the payload and passed as a header in the webhook request" - }, - "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": { - "enum": ["project"], - "type": "string", - "description": "Type of the scope being used" - } - }, - "required": ["id", "type"], - "description": "The scope in which the relevant events that will trigger webhooks" - } - }, - "required": [ - "name", - "events", - "url", - "verify-tls", - "signing-secret", - "scope" - ], - "description": "The parameters for a create webhook request" - } - } + "parameters": [ + { + "in": "path", + "name": "webhook-id", + "description": "ID of the webhook (UUID)", + "schema": { + "type": "string", + "format": "uuid" + }, + "required": true } - } - } - }, - "/webhook/{webhook-id}": { + ] + }, "put": { "summary": "Update a webhook", "tags": ["Webhook"], @@ -8369,122 +8485,6 @@ "required": true } ] - }, - "get": { - "summary": "Get a webhook", - "description": "Get a webhook by id.", - "tags": ["Webhook"], - "operationId": "getWebhookById", - "responses": { - "200": { - "description": "A webhook", - "content": { - "application/json": { - "schema": { - "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" - } - } - } - }, - "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}": {