@typeship-ax/mcp 0.21.0 → 0.22.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +15 -11
- package/README.md +22 -53
- package/api.json +9998 -10118
- package/api.md +8983 -9120
- package/dist/arguments.d.ts +47 -0
- package/dist/arguments.d.ts.map +1 -0
- package/dist/arguments.js +254 -0
- package/dist/core/http.d.ts +162 -19
- package/dist/core/http.d.ts.map +1 -1
- package/dist/core/http.js +381 -48
- package/dist/core/pagination.d.ts +42 -6
- package/dist/core/pagination.d.ts.map +1 -1
- package/dist/core/pagination.js +111 -17
- package/dist/credential-storage.d.ts +10 -3
- package/dist/credential-storage.d.ts.map +1 -1
- package/dist/credential-storage.js +15 -6
- package/dist/dates.d.ts +1 -1
- package/dist/dates.js +1 -1
- package/dist/errors.d.ts +20 -84
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +20 -108
- package/dist/fields.d.ts +29 -0
- package/dist/fields.d.ts.map +1 -0
- package/dist/fields.js +101 -0
- package/dist/index.d.ts +28 -18
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +35 -25
- package/dist/mcp-authorization.d.ts.map +1 -1
- package/dist/mcp-authorization.js +34 -10
- package/dist/mcp-protocol.d.ts +87 -44
- package/dist/mcp-protocol.d.ts.map +1 -1
- package/dist/mcp-protocol.js +552 -478
- package/dist/mcp.d.ts.map +1 -1
- package/dist/mcp.js +127 -28
- package/dist/named-credentials.d.ts +19 -0
- package/dist/named-credentials.d.ts.map +1 -1
- package/dist/named-credentials.js +81 -1
- package/dist/oauth-request.d.ts +7 -1
- package/dist/oauth-request.d.ts.map +1 -1
- package/dist/oauth-request.js +26 -4
- package/dist/oauth-session.d.ts +13 -1
- package/dist/oauth-session.d.ts.map +1 -1
- package/dist/oauth-session.js +34 -18
- package/dist/ops.d.ts +53 -5
- package/dist/ops.d.ts.map +1 -1
- package/dist/ops.js +49 -40
- package/dist/resources/api-keys.d.ts +10 -7
- package/dist/resources/api-keys.d.ts.map +1 -1
- package/dist/resources/api-keys.js +10 -31
- package/dist/resources/deliveries.d.ts +88 -4
- package/dist/resources/deliveries.d.ts.map +1 -1
- package/dist/resources/deliveries.js +95 -18
- package/dist/resources/drafts.d.ts +15 -15
- package/dist/resources/drafts.d.ts.map +1 -1
- package/dist/resources/drafts.js +11 -64
- package/dist/resources/files.d.ts +4 -4
- package/dist/resources/files.d.ts.map +1 -1
- package/dist/resources/files.js +3 -12
- package/dist/resources/generations.d.ts +14 -14
- package/dist/resources/generations.d.ts.map +1 -1
- package/dist/resources/generations.js +21 -45
- package/dist/resources/organization.d.ts +4 -4
- package/dist/resources/organization.d.ts.map +1 -1
- package/dist/resources/organization.js +3 -10
- package/dist/resources/{generate.d.ts → packages.d.ts} +16 -16
- package/dist/resources/packages.d.ts.map +1 -0
- package/dist/resources/{generate.js → packages.js} +13 -29
- package/dist/resources/projects.d.ts +50 -50
- package/dist/resources/projects.d.ts.map +1 -1
- package/dist/resources/projects.js +60 -116
- package/dist/resources/releases.d.ts +21 -16
- package/dist/resources/releases.d.ts.map +1 -1
- package/dist/resources/releases.js +18 -39
- package/dist/resources/spec-revisions.d.ts +15 -6
- package/dist/resources/spec-revisions.d.ts.map +1 -1
- package/dist/resources/spec-revisions.js +6 -28
- package/dist/resources/specs.d.ts +7 -7
- package/dist/resources/specs.d.ts.map +1 -1
- package/dist/resources/specs.js +6 -34
- package/dist/resources/targets.d.ts +48 -48
- package/dist/resources/targets.d.ts.map +1 -1
- package/dist/resources/targets.js +58 -114
- package/dist/schemas.d.ts.map +1 -1
- package/dist/schemas.js +78 -76
- package/dist/search.d.ts +54 -0
- package/dist/search.d.ts.map +1 -0
- package/dist/search.js +421 -0
- package/dist/types.d.ts +499 -339
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +18 -18
- package/dist/worker.js +2 -2
- package/package.json +5 -2
- package/server.json +5 -5
- package/src/arguments.ts +242 -0
- package/src/core/http.ts +457 -58
- package/src/core/pagination.ts +129 -18
- package/src/credential-storage.ts +16 -6
- package/src/dates.ts +1 -1
- package/src/errors.ts +46 -115
- package/src/fields.ts +91 -0
- package/src/index.ts +45 -28
- package/src/mcp-authorization.ts +29 -9
- package/src/mcp-protocol.ts +580 -428
- package/src/mcp.ts +113 -26
- package/src/named-credentials.ts +66 -1
- package/src/oauth-request.ts +32 -6
- package/src/oauth-session.ts +37 -19
- package/src/ops.ts +82 -44
- package/src/resources/api-keys.ts +34 -48
- package/src/resources/deliveries.ts +211 -30
- package/src/resources/drafts.ts +60 -107
- package/src/resources/files.ts +19 -20
- package/src/resources/generations.ts +57 -75
- package/src/resources/organization.ts +11 -16
- package/src/resources/{generate.ts → packages.ts} +43 -51
- package/src/resources/projects.ts +145 -200
- package/src/resources/releases.ts +48 -65
- package/src/resources/spec-revisions.ts +38 -47
- package/src/resources/specs.ts +39 -59
- package/src/resources/targets.ts +143 -193
- package/src/schemas.ts +78 -76
- package/src/search.ts +434 -0
- package/src/types.ts +538 -357
- package/src/worker.ts +2 -2
- package/dist/resources/generate.d.ts.map +0 -1
- package/dist/resources/publications.d.ts +0 -47
- package/dist/resources/publications.d.ts.map +0 -1
- package/dist/resources/publications.js +0 -70
- package/src/resources/publications.ts +0 -140
|
@@ -1,19 +1,12 @@
|
|
|
1
1
|
import { HttpCore, type RequestOptions } from "../core/http.js";
|
|
2
2
|
import { PagePromise } from "../core/pagination.js";
|
|
3
|
-
import { ResponseParseError, TransportError, UnexpectedApiError, ValidationError,
|
|
4
|
-
import type { CreateProjectRequest, DeletedProjectRead, GenerateProjectRequest, GenerationBatchRead, ProjectId, ProjectRead,
|
|
3
|
+
import { RateLimitError, ResponseParseError, TransportError, UnexpectedApiError, ValidationError, BadRequestError, ConflictError, ForbiddenError, NotFoundError, PayloadTooLargeError, PaymentRequiredError, PreconditionFailedError, ServerError, UnauthorizedError, UnprocessableEntityError } from "../errors.js";
|
|
4
|
+
import type { CreateProjectRequest, DeletedProjectRead, ErrorModelRead, GenerateProjectRequest, GenerationBatchRead, ProjectId, ProjectRead, ProjectResponseRead, UpdateProjectRequest } from "../types.js";
|
|
5
5
|
export declare class ProjectsResource {
|
|
6
6
|
private readonly _core;
|
|
7
7
|
constructor(_core: HttpCore);
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
* Auto-paginates: `for await (const item of …)` walks every page.
|
|
12
|
-
* `GET /projects`
|
|
13
|
-
*/
|
|
14
|
-
list(params?: ProjectsListParams, options?: RequestOptions): PagePromise<ProjectSummaryRead, ProjectsListError>;
|
|
15
|
-
/**
|
|
16
|
-
* Create a project
|
|
9
|
+
* Create a Project
|
|
17
10
|
*
|
|
18
11
|
* Creates a Project from a URL or GitHub Spec.
|
|
19
12
|
* Automatic generation is enabled by default for a saved Project.
|
|
@@ -25,28 +18,24 @@ export declare class ProjectsResource {
|
|
|
25
18
|
* A `Idempotency-Key` UUID is generated per call (stable across retries) unless you pass one.
|
|
26
19
|
* `POST /projects`
|
|
27
20
|
*/
|
|
28
|
-
create(body: CreateProjectRequest, params?: ProjectsCreateParams, options?: RequestOptions): Promise<
|
|
21
|
+
create(body: CreateProjectRequest, params?: ProjectsCreateParams, options?: RequestOptions): Promise<ProjectResponseRead>;
|
|
29
22
|
/**
|
|
30
|
-
*
|
|
23
|
+
* List Projects
|
|
31
24
|
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
* `GET /projects/{project_id}`
|
|
25
|
+
* Auto-paginates: `for await (const item of …)` walks every page.
|
|
26
|
+
* `GET /projects`
|
|
35
27
|
*/
|
|
36
|
-
|
|
28
|
+
list(params?: ProjectsListParams, options?: RequestOptions): PagePromise<ProjectRead, ProjectsListError>;
|
|
37
29
|
/**
|
|
38
|
-
*
|
|
30
|
+
* Get a Project
|
|
39
31
|
*
|
|
40
|
-
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
* See [conditional writes](https://typeship.dev/docs/typeship-api#conditional-writes) for ETag
|
|
44
|
-
* and If-Match.
|
|
45
|
-
* `DELETE /projects/{project_id}`
|
|
32
|
+
* Returns the Project's settings and Spec ID. List its Targets separately to retrieve Target
|
|
33
|
+
* configuration and Deliveries.
|
|
34
|
+
* `GET /projects/{project_id}`
|
|
46
35
|
*/
|
|
47
|
-
|
|
36
|
+
get(projectId: ProjectId, options?: RequestOptions): Promise<ProjectResponseRead>;
|
|
48
37
|
/**
|
|
49
|
-
* Update a
|
|
38
|
+
* Update a Project
|
|
50
39
|
*
|
|
51
40
|
* Omitted fields keep their current values. A supplied config replaces the entire stored object;
|
|
52
41
|
* null or an empty object clears it.
|
|
@@ -57,16 +46,27 @@ export declare class ProjectsResource {
|
|
|
57
46
|
*
|
|
58
47
|
* A `409 target_busy` means a Target is publishing. Retrieve the Project, wait for publishing to
|
|
59
48
|
* finish, reconcile your update, and retry.
|
|
60
|
-
* A `502 follow_up_failed` means the Project was saved, but an obsolete
|
|
61
|
-
*
|
|
62
|
-
*
|
|
49
|
+
* A `502 follow_up_failed` means the Project was saved, but an obsolete Draft pull request could
|
|
50
|
+
* not be retired. Retrieve the Project and retry the same update to finish retiring reviews if
|
|
51
|
+
* that update is still desired.
|
|
63
52
|
* See [conditional writes](https://typeship.dev/docs/typeship-api#conditional-writes) for ETag
|
|
64
53
|
* and If-Match.
|
|
65
54
|
* `PATCH /projects/{project_id}`
|
|
66
55
|
*/
|
|
67
|
-
update(projectId: ProjectId, body: UpdateProjectRequest, params?: ProjectsUpdateParams, options?: RequestOptions): Promise<
|
|
56
|
+
update(projectId: ProjectId, body: UpdateProjectRequest, params?: ProjectsUpdateParams, options?: RequestOptions): Promise<ProjectResponseRead>;
|
|
57
|
+
/**
|
|
58
|
+
* Delete a Project
|
|
59
|
+
*
|
|
60
|
+
* A `502 repository_unavailable` means the Project was not deleted because its Draft pull
|
|
61
|
+
* requests could not be retired. Retry deletion to finish retiring the remaining reviews.
|
|
62
|
+
* Repeating a completed deletion returns `404`.
|
|
63
|
+
* See [conditional writes](https://typeship.dev/docs/typeship-api#conditional-writes) for ETag
|
|
64
|
+
* and If-Match.
|
|
65
|
+
* `DELETE /projects/{project_id}`
|
|
66
|
+
*/
|
|
67
|
+
delete(projectId: ProjectId, params?: ProjectsDeleteParams, options?: RequestOptions): Promise<DeletedProjectRead>;
|
|
68
68
|
/**
|
|
69
|
-
*
|
|
69
|
+
* Generate a Project's Targets
|
|
70
70
|
*
|
|
71
71
|
* Queues one Generation per active Target and returns their IDs. Retrieve each Generation until
|
|
72
72
|
* its status moves from `queued` to `running` and then `completed` or `failed`. `completed` means
|
|
@@ -84,6 +84,17 @@ export declare class ProjectsResource {
|
|
|
84
84
|
*/
|
|
85
85
|
generate(projectId: ProjectId, body?: GenerateProjectRequest, params?: ProjectsGenerateParams, options?: RequestOptions): Promise<GenerationBatchRead>;
|
|
86
86
|
}
|
|
87
|
+
export interface ProjectsCreateParams {
|
|
88
|
+
/**
|
|
89
|
+
* Identifies one logical write for 24 hours. The key is scoped to the authenticated organization
|
|
90
|
+
* and operation; generation without an organization uses a hashed network identity. Retrying the
|
|
91
|
+
* same method, path, query, If-Match header, and JSON body replays the original response. Reusing
|
|
92
|
+
* the key with changed intent returns 409. After expiry the key starts a new write.
|
|
93
|
+
*/
|
|
94
|
+
idempotencyKey?: string;
|
|
95
|
+
}
|
|
96
|
+
/** Typed errors `create` can throw. */
|
|
97
|
+
export type ProjectsCreateError = BadRequestError<ErrorModelRead> | UnauthorizedError<ErrorModelRead> | PaymentRequiredError | ForbiddenError<ErrorModelRead> | ConflictError<ErrorModelRead> | UnprocessableEntityError<ErrorModelRead> | RateLimitError<ErrorModelRead> | ServerError<ErrorModelRead> | RateLimitError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
|
|
87
98
|
export interface ProjectsListParams {
|
|
88
99
|
/**
|
|
89
100
|
* Maximum number of resources to return. Omit for 20; otherwise supply base-10 digits
|
|
@@ -102,21 +113,10 @@ export interface ProjectsListParams {
|
|
|
102
113
|
cursor?: string;
|
|
103
114
|
}
|
|
104
115
|
/** Typed errors `list` can throw. */
|
|
105
|
-
export type ProjectsListError = BadRequestError | UnauthorizedError | ForbiddenError |
|
|
106
|
-
export interface ProjectsCreateParams {
|
|
107
|
-
/**
|
|
108
|
-
* Identifies one logical write for 24 hours. The key is scoped to the authenticated organization
|
|
109
|
-
* and operation; generation without an organization uses a hashed network identity. Retrying the
|
|
110
|
-
* same method, path, query, If-Match header, and JSON body replays the original response. Reusing
|
|
111
|
-
* the key with changed intent returns 409. After expiry the key starts a new write.
|
|
112
|
-
*/
|
|
113
|
-
idempotencyKey?: string;
|
|
114
|
-
}
|
|
115
|
-
/** Typed errors `create` can throw. */
|
|
116
|
-
export type ProjectsCreateError = BadRequestError | UnauthorizedError | PaymentRequiredError | ForbiddenError | ConflictError | UnprocessableEntityError | RateLimitedError | InternalServerError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
|
|
116
|
+
export type ProjectsListError = BadRequestError<ErrorModelRead> | UnauthorizedError<ErrorModelRead> | ForbiddenError<ErrorModelRead> | RateLimitError<ErrorModelRead> | ServerError<ErrorModelRead> | RateLimitError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
|
|
117
117
|
/** Typed errors `get` can throw. */
|
|
118
|
-
export type ProjectsGetError = UnauthorizedError | ForbiddenError | NotFoundError |
|
|
119
|
-
export interface
|
|
118
|
+
export type ProjectsGetError = UnauthorizedError<ErrorModelRead> | ForbiddenError<ErrorModelRead> | NotFoundError<ErrorModelRead> | RateLimitError<ErrorModelRead> | ServerError<ErrorModelRead> | RateLimitError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
|
|
119
|
+
export interface ProjectsUpdateParams {
|
|
120
120
|
/**
|
|
121
121
|
* ETag from a preceding response. The write applies only if the resource still has that version;
|
|
122
122
|
* otherwise it returns 412 precondition_failed without changes. Omit to write the current
|
|
@@ -124,9 +124,9 @@ export interface ProjectsDeleteParams {
|
|
|
124
124
|
*/
|
|
125
125
|
ifMatch?: string;
|
|
126
126
|
}
|
|
127
|
-
/** Typed errors `
|
|
128
|
-
export type
|
|
129
|
-
export interface
|
|
127
|
+
/** Typed errors `update` can throw. */
|
|
128
|
+
export type ProjectsUpdateError = BadRequestError<ErrorModelRead> | UnauthorizedError<ErrorModelRead> | PaymentRequiredError | ForbiddenError<ErrorModelRead> | NotFoundError<ErrorModelRead> | ConflictError<ErrorModelRead> | PreconditionFailedError | UnprocessableEntityError<ErrorModelRead> | RateLimitError<ErrorModelRead> | ServerError<ErrorModelRead> | RateLimitError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
|
|
129
|
+
export interface ProjectsDeleteParams {
|
|
130
130
|
/**
|
|
131
131
|
* ETag from a preceding response. The write applies only if the resource still has that version;
|
|
132
132
|
* otherwise it returns 412 precondition_failed without changes. Omit to write the current
|
|
@@ -134,8 +134,8 @@ export interface ProjectsUpdateParams {
|
|
|
134
134
|
*/
|
|
135
135
|
ifMatch?: string;
|
|
136
136
|
}
|
|
137
|
-
/** Typed errors `
|
|
138
|
-
export type
|
|
137
|
+
/** Typed errors `delete` can throw. */
|
|
138
|
+
export type ProjectsDeleteError = BadRequestError<ErrorModelRead> | UnauthorizedError<ErrorModelRead> | ForbiddenError<ErrorModelRead> | NotFoundError<ErrorModelRead> | PreconditionFailedError | RateLimitError<ErrorModelRead> | ServerError<ErrorModelRead> | RateLimitError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
|
|
139
139
|
export interface ProjectsGenerateParams {
|
|
140
140
|
/**
|
|
141
141
|
* Identifies one logical write for 24 hours. The key is scoped to the authenticated organization
|
|
@@ -146,5 +146,5 @@ export interface ProjectsGenerateParams {
|
|
|
146
146
|
idempotencyKey?: string;
|
|
147
147
|
}
|
|
148
148
|
/** Typed errors `generate` can throw. */
|
|
149
|
-
export type ProjectsGenerateError = BadRequestError | UnauthorizedError | PaymentRequiredError | ForbiddenError | NotFoundError | ConflictError | PayloadTooLargeError | UnprocessableEntityError |
|
|
149
|
+
export type ProjectsGenerateError = BadRequestError<ErrorModelRead> | UnauthorizedError<ErrorModelRead> | PaymentRequiredError | ForbiddenError<ErrorModelRead> | NotFoundError<ErrorModelRead> | ConflictError<ErrorModelRead> | PayloadTooLargeError | UnprocessableEntityError<ErrorModelRead> | RateLimitError<ErrorModelRead> | ServerError<ErrorModelRead> | RateLimitError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
|
|
150
150
|
//# sourceMappingURL=projects.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"projects.d.ts","sourceRoot":"","sources":["../../src/resources/projects.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,QAAQ,EAAE,KAAK,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAChE,OAAO,EAAY,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,EACL,kBAAkB,EAClB,cAAc,EACd,kBAAkB,EAClB,eAAe,EACf,eAAe,EACf,
|
|
1
|
+
{"version":3,"file":"projects.d.ts","sourceRoot":"","sources":["../../src/resources/projects.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,QAAQ,EAAE,KAAK,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAChE,OAAO,EAAY,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,EACL,cAAc,EACd,kBAAkB,EAClB,cAAc,EACd,kBAAkB,EAClB,eAAe,EACf,eAAe,EACf,aAAa,EACb,cAAc,EACd,aAAa,EACb,oBAAoB,EACpB,oBAAoB,EACpB,uBAAuB,EACvB,WAAW,EACX,iBAAiB,EACjB,wBAAwB,EACzB,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EACV,oBAAoB,EAEpB,kBAAkB,EAElB,cAAc,EACd,sBAAsB,EAEtB,mBAAmB,EAEnB,SAAS,EAGT,WAAW,EAEX,mBAAmB,EACnB,oBAAoB,EACrB,MAAM,aAAa,CAAC;AAErB,qBAAa,gBAAgB;IACf,OAAO,CAAC,QAAQ,CAAC,KAAK;gBAAL,KA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AW,CAAC,cAAc,CAAC,GAC3B,cAAc,GACd,kBAAkB,GAClB,kBAAkB,GAClB,cAAc,GACd,eAAe,CAAC;AAEpB,MAAM,WAAW,oBAAoB;IACnC;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,uCAAuC;AACvC,MAAM,MAAM,mBAAmB,GAC3B,eAAe,CAAC,cAAc,CAAC,GAC/B,iBAAiB,CAAC,cAAc,CAAC,GACjC,cAAc,CAAC,cAAc,CAAC,GAC9B,aAAa,CAAC,cAAc,CAAC,GAC7B,uBAAuB,GACvB,cAAc,CAAC,cAAc,CAAC,GAC9B,WAAW,CAAC,cAAc,CAAC,GAC3B,cAAc,GACd,kBAAkB,GAClB,kBAAkB,GAClB,cAAc,GACd,eAAe,CAAC;AAEpB,MAAM,WAAW,sBAAsB;IACrC;;;;;OAKG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,yCAAyC;AACzC,MAAM,MAAM,qBAAqB,GAC7B,eAAe,CAAC,cAAc,CAAC,GAC/B,iBAAiB,CAAC,cAAc,CAAC,GACjC,oBAAoB,GACpB,cAAc,CAAC,cAAc,CAAC,GAC9B,aAAa,CAAC,cAAc,CAAC,GAC7B,aAAa,CAAC,cAAc,CAAC,GAC7B,oBAAoB,GACpB,wBAAwB,CAAC,cAAc,CAAC,GACxC,cAAc,CAAC,cAAc,CAAC,GAC9B,WAAW,CAAC,cAAc,CAAC,GAC3B,cAAc,GACd,kBAAkB,GAClB,kBAAkB,GAClB,cAAc,GACd,eAAe,CAAC"}
|
|
@@ -1,48 +1,14 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Generated by
|
|
1
|
+
// Typeship — projects resource.
|
|
2
|
+
// Generated by Typeship — https://typeship.dev
|
|
3
3
|
import { paginate } from "../core/pagination.js";
|
|
4
|
-
import {
|
|
4
|
+
import { PayloadTooLargeError, PaymentRequiredError, PreconditionFailedError, } from "../errors.js";
|
|
5
5
|
export class ProjectsResource {
|
|
6
6
|
_core;
|
|
7
7
|
constructor(_core) {
|
|
8
8
|
this._core = _core;
|
|
9
9
|
}
|
|
10
10
|
/**
|
|
11
|
-
*
|
|
12
|
-
*
|
|
13
|
-
* Auto-paginates: `for await (const item of …)` walks every page.
|
|
14
|
-
* `GET /projects`
|
|
15
|
-
*/
|
|
16
|
-
list(params, options) {
|
|
17
|
-
return paginate(this._core, {
|
|
18
|
-
method: "GET",
|
|
19
|
-
path: "/projects",
|
|
20
|
-
security: [{ "apiKey": [] }],
|
|
21
|
-
query: {
|
|
22
|
-
limit: params?.limit,
|
|
23
|
-
cursor: params?.cursor,
|
|
24
|
-
},
|
|
25
|
-
errors: {
|
|
26
|
-
"400": BadRequestError,
|
|
27
|
-
"401": UnauthorizedError,
|
|
28
|
-
"403": ForbiddenError,
|
|
29
|
-
"429": RateLimitedError,
|
|
30
|
-
"500": InternalServerError,
|
|
31
|
-
},
|
|
32
|
-
idempotent: true,
|
|
33
|
-
schemaKey: "projects.list",
|
|
34
|
-
options,
|
|
35
|
-
}, {
|
|
36
|
-
style: "cursor",
|
|
37
|
-
itemsField: "data",
|
|
38
|
-
cursorParam: "cursor",
|
|
39
|
-
nextCursorField: "next_cursor",
|
|
40
|
-
hasMoreField: "has_more",
|
|
41
|
-
limitParam: "limit",
|
|
42
|
-
});
|
|
43
|
-
}
|
|
44
|
-
/**
|
|
45
|
-
* Create a project
|
|
11
|
+
* Create a Project
|
|
46
12
|
*
|
|
47
13
|
* Creates a Project from a URL or GitHub Spec.
|
|
48
14
|
* Automatic generation is enabled by default for a saved Project.
|
|
@@ -63,80 +29,58 @@ export class ProjectsResource {
|
|
|
63
29
|
"Idempotency-Key": params?.idempotencyKey === undefined ? undefined : String(params?.idempotencyKey),
|
|
64
30
|
},
|
|
65
31
|
body,
|
|
66
|
-
errors: {
|
|
67
|
-
"400": BadRequestError,
|
|
68
|
-
"401": UnauthorizedError,
|
|
69
|
-
"402": PaymentRequiredError,
|
|
70
|
-
"403": ForbiddenError,
|
|
71
|
-
"409": ConflictError,
|
|
72
|
-
"422": UnprocessableEntityError,
|
|
73
|
-
"429": RateLimitedError,
|
|
74
|
-
"500": InternalServerError,
|
|
75
|
-
},
|
|
32
|
+
errors: { "402": PaymentRequiredError },
|
|
76
33
|
idempotencyKey: "Idempotency-Key",
|
|
77
34
|
schemaKey: "projects.create",
|
|
78
35
|
options,
|
|
79
36
|
});
|
|
80
37
|
}
|
|
81
38
|
/**
|
|
82
|
-
*
|
|
39
|
+
* List Projects
|
|
83
40
|
*
|
|
84
|
-
*
|
|
85
|
-
*
|
|
86
|
-
* `GET /projects/{project_id}`
|
|
41
|
+
* Auto-paginates: `for await (const item of …)` walks every page.
|
|
42
|
+
* `GET /projects`
|
|
87
43
|
*/
|
|
88
|
-
|
|
89
|
-
return this._core
|
|
44
|
+
list(params, options) {
|
|
45
|
+
return paginate(this._core, {
|
|
90
46
|
method: "GET",
|
|
91
|
-
path:
|
|
47
|
+
path: "/projects",
|
|
92
48
|
security: [{ "apiKey": [] }],
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
"404": NotFoundError,
|
|
97
|
-
"429": RateLimitedError,
|
|
98
|
-
"500": InternalServerError,
|
|
49
|
+
query: {
|
|
50
|
+
limit: params?.limit,
|
|
51
|
+
cursor: params?.cursor,
|
|
99
52
|
},
|
|
100
53
|
idempotent: true,
|
|
101
|
-
schemaKey: "projects.
|
|
54
|
+
schemaKey: "projects.list",
|
|
102
55
|
options,
|
|
56
|
+
}, {
|
|
57
|
+
style: "cursor",
|
|
58
|
+
itemsField: "data",
|
|
59
|
+
cursorParam: "cursor",
|
|
60
|
+
nextCursorField: "next_cursor",
|
|
61
|
+
hasMoreField: "has_more",
|
|
62
|
+
limitParam: "limit",
|
|
103
63
|
});
|
|
104
64
|
}
|
|
105
65
|
/**
|
|
106
|
-
*
|
|
66
|
+
* Get a Project
|
|
107
67
|
*
|
|
108
|
-
*
|
|
109
|
-
*
|
|
110
|
-
*
|
|
111
|
-
* See [conditional writes](https://typeship.dev/docs/typeship-api#conditional-writes) for ETag
|
|
112
|
-
* and If-Match.
|
|
113
|
-
* `DELETE /projects/{project_id}`
|
|
68
|
+
* Returns the Project's settings and Spec ID. List its Targets separately to retrieve Target
|
|
69
|
+
* configuration and Deliveries.
|
|
70
|
+
* `GET /projects/{project_id}`
|
|
114
71
|
*/
|
|
115
|
-
async
|
|
72
|
+
async get(projectId, options) {
|
|
116
73
|
return this._core.requestData({
|
|
117
|
-
method: "
|
|
74
|
+
method: "GET",
|
|
118
75
|
path: `/projects/${encodeURIComponent(String(projectId))}`,
|
|
119
76
|
security: [{ "apiKey": [] }],
|
|
120
|
-
headers: {
|
|
121
|
-
"If-Match": params?.ifMatch === undefined ? undefined : String(params?.ifMatch),
|
|
122
|
-
},
|
|
123
|
-
errors: {
|
|
124
|
-
"400": BadRequestError,
|
|
125
|
-
"401": UnauthorizedError,
|
|
126
|
-
"403": ForbiddenError,
|
|
127
|
-
"404": NotFoundError,
|
|
128
|
-
"412": PreconditionFailedError,
|
|
129
|
-
"429": RateLimitedError,
|
|
130
|
-
"500": InternalServerError,
|
|
131
|
-
"502": BadGatewayError,
|
|
132
|
-
},
|
|
133
77
|
idempotent: true,
|
|
134
|
-
schemaKey: "projects.
|
|
78
|
+
schemaKey: "projects.get",
|
|
135
79
|
options,
|
|
136
80
|
});
|
|
137
81
|
}
|
|
138
82
|
/**
|
|
139
|
-
* Update a
|
|
83
|
+
* Update a Project
|
|
140
84
|
*
|
|
141
85
|
* Omitted fields keep their current values. A supplied config replaces the entire stored object;
|
|
142
86
|
* null or an empty object clears it.
|
|
@@ -147,9 +91,9 @@ export class ProjectsResource {
|
|
|
147
91
|
*
|
|
148
92
|
* A `409 target_busy` means a Target is publishing. Retrieve the Project, wait for publishing to
|
|
149
93
|
* finish, reconcile your update, and retry.
|
|
150
|
-
* A `502 follow_up_failed` means the Project was saved, but an obsolete
|
|
151
|
-
*
|
|
152
|
-
*
|
|
94
|
+
* A `502 follow_up_failed` means the Project was saved, but an obsolete Draft pull request could
|
|
95
|
+
* not be retired. Retrieve the Project and retry the same update to finish retiring reviews if
|
|
96
|
+
* that update is still desired.
|
|
153
97
|
* See [conditional writes](https://typeship.dev/docs/typeship-api#conditional-writes) for ETag
|
|
154
98
|
* and If-Match.
|
|
155
99
|
* `PATCH /projects/{project_id}`
|
|
@@ -163,25 +107,37 @@ export class ProjectsResource {
|
|
|
163
107
|
"If-Match": params?.ifMatch === undefined ? undefined : String(params?.ifMatch),
|
|
164
108
|
},
|
|
165
109
|
body,
|
|
166
|
-
errors: {
|
|
167
|
-
"400": BadRequestError,
|
|
168
|
-
"401": UnauthorizedError,
|
|
169
|
-
"402": PaymentRequiredError,
|
|
170
|
-
"403": ForbiddenError,
|
|
171
|
-
"404": NotFoundError,
|
|
172
|
-
"409": ConflictError,
|
|
173
|
-
"412": PreconditionFailedError,
|
|
174
|
-
"422": UnprocessableEntityError,
|
|
175
|
-
"429": RateLimitedError,
|
|
176
|
-
"500": InternalServerError,
|
|
177
|
-
"502": BadGatewayError,
|
|
178
|
-
},
|
|
110
|
+
errors: { "402": PaymentRequiredError, "412": PreconditionFailedError },
|
|
179
111
|
schemaKey: "projects.update",
|
|
180
112
|
options,
|
|
181
113
|
});
|
|
182
114
|
}
|
|
183
115
|
/**
|
|
184
|
-
*
|
|
116
|
+
* Delete a Project
|
|
117
|
+
*
|
|
118
|
+
* A `502 repository_unavailable` means the Project was not deleted because its Draft pull
|
|
119
|
+
* requests could not be retired. Retry deletion to finish retiring the remaining reviews.
|
|
120
|
+
* Repeating a completed deletion returns `404`.
|
|
121
|
+
* See [conditional writes](https://typeship.dev/docs/typeship-api#conditional-writes) for ETag
|
|
122
|
+
* and If-Match.
|
|
123
|
+
* `DELETE /projects/{project_id}`
|
|
124
|
+
*/
|
|
125
|
+
async delete(projectId, params, options) {
|
|
126
|
+
return this._core.requestData({
|
|
127
|
+
method: "DELETE",
|
|
128
|
+
path: `/projects/${encodeURIComponent(String(projectId))}`,
|
|
129
|
+
security: [{ "apiKey": [] }],
|
|
130
|
+
headers: {
|
|
131
|
+
"If-Match": params?.ifMatch === undefined ? undefined : String(params?.ifMatch),
|
|
132
|
+
},
|
|
133
|
+
errors: { "412": PreconditionFailedError },
|
|
134
|
+
idempotent: true,
|
|
135
|
+
schemaKey: "projects.delete",
|
|
136
|
+
options,
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* Generate a Project's Targets
|
|
185
141
|
*
|
|
186
142
|
* Queues one Generation per active Target and returns their IDs. Retrieve each Generation until
|
|
187
143
|
* its status moves from `queued` to `running` and then `completed` or `failed`. `completed` means
|
|
@@ -206,19 +162,7 @@ export class ProjectsResource {
|
|
|
206
162
|
"Idempotency-Key": params?.idempotencyKey === undefined ? undefined : String(params?.idempotencyKey),
|
|
207
163
|
},
|
|
208
164
|
body,
|
|
209
|
-
errors: {
|
|
210
|
-
"400": BadRequestError,
|
|
211
|
-
"401": UnauthorizedError,
|
|
212
|
-
"402": PaymentRequiredError,
|
|
213
|
-
"403": ForbiddenError,
|
|
214
|
-
"404": NotFoundError,
|
|
215
|
-
"409": ConflictError,
|
|
216
|
-
"413": PayloadTooLargeError,
|
|
217
|
-
"422": UnprocessableEntityError,
|
|
218
|
-
"429": RateLimitedError,
|
|
219
|
-
"500": InternalServerError,
|
|
220
|
-
"502": BadGatewayError,
|
|
221
|
-
},
|
|
165
|
+
errors: { "402": PaymentRequiredError, "413": PayloadTooLargeError },
|
|
222
166
|
idempotencyKey: "Idempotency-Key",
|
|
223
167
|
schemaKey: "projects.generate",
|
|
224
168
|
options,
|
|
@@ -1,35 +1,40 @@
|
|
|
1
1
|
import { HttpCore, type RequestOptions } from "../core/http.js";
|
|
2
2
|
import { PagePromise } from "../core/pagination.js";
|
|
3
|
-
import { ResponseParseError, TransportError, UnexpectedApiError, ValidationError,
|
|
4
|
-
import type { ReleaseId, ReleaseRead, ReleaseResponseRead, TargetId } from "../types.js";
|
|
3
|
+
import { RateLimitError, ResponseParseError, TransportError, UnexpectedApiError, ValidationError, BadRequestError, ConflictError, ForbiddenError, NotFoundError, ServerError, UnauthorizedError } from "../errors.js";
|
|
4
|
+
import type { ErrorModelRead, ReleaseId, ReleaseRead, ReleaseResponseRead, TargetId } from "../types.js";
|
|
5
5
|
export declare class ReleasesResource {
|
|
6
6
|
private readonly _core;
|
|
7
7
|
constructor(_core: HttpCore);
|
|
8
8
|
/**
|
|
9
|
-
* List
|
|
9
|
+
* List Releases
|
|
10
10
|
*
|
|
11
11
|
* Auto-paginates: `for await (const item of …)` walks every page.
|
|
12
12
|
* `GET /releases`
|
|
13
13
|
*/
|
|
14
14
|
list(params?: ReleasesListParams, options?: RequestOptions): PagePromise<ReleaseRead, ReleasesListError>;
|
|
15
15
|
/**
|
|
16
|
-
* Get
|
|
16
|
+
* Get a Release
|
|
17
17
|
* `GET /releases/{release_id}`
|
|
18
18
|
*/
|
|
19
19
|
get(releaseId: ReleaseId, options?: RequestOptions): Promise<ReleaseResponseRead>;
|
|
20
20
|
/**
|
|
21
|
-
* Retry publishing
|
|
21
|
+
* Retry publishing a Release
|
|
22
22
|
*
|
|
23
|
-
*
|
|
24
|
-
* version and accepted commit, even if a newer
|
|
23
|
+
* Queues every failed or queued Publication of the release and starts its repository publishing
|
|
24
|
+
* workflow again. Publishing uses that release's version and accepted commit, even if a newer
|
|
25
|
+
* Draft or release exists. Completed Publications are not repeated.
|
|
25
26
|
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
27
|
+
* Returns `202` with the Release. Get the Release until each Publication reaches `completed` or
|
|
28
|
+
* `failed`.
|
|
29
|
+
*
|
|
30
|
+
* A `409 publication_not_retryable` means no Publication is queued or failed. A `502
|
|
31
|
+
* repository_unavailable` means the repository publishing workflow could not be dispatched, and
|
|
32
|
+
* nothing was changed.
|
|
28
33
|
*
|
|
29
34
|
* A `Idempotency-Key` UUID is generated per call (stable across retries) unless you pass one.
|
|
30
|
-
* `POST /releases/{release_id}/
|
|
35
|
+
* `POST /releases/{release_id}/retry`
|
|
31
36
|
*/
|
|
32
|
-
|
|
37
|
+
retry(releaseId: ReleaseId, params?: ReleasesRetryParams, options?: RequestOptions): Promise<ReleaseResponseRead>;
|
|
33
38
|
}
|
|
34
39
|
export interface ReleasesListParams {
|
|
35
40
|
/**
|
|
@@ -51,10 +56,10 @@ export interface ReleasesListParams {
|
|
|
51
56
|
targetId?: TargetId;
|
|
52
57
|
}
|
|
53
58
|
/** Typed errors `list` can throw. */
|
|
54
|
-
export type ReleasesListError = BadRequestError | UnauthorizedError | ForbiddenError | NotFoundError |
|
|
59
|
+
export type ReleasesListError = BadRequestError<ErrorModelRead> | UnauthorizedError<ErrorModelRead> | ForbiddenError<ErrorModelRead> | NotFoundError<ErrorModelRead> | RateLimitError<ErrorModelRead> | ServerError<ErrorModelRead> | RateLimitError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
|
|
55
60
|
/** Typed errors `get` can throw. */
|
|
56
|
-
export type ReleasesGetError = UnauthorizedError | ForbiddenError | NotFoundError |
|
|
57
|
-
export interface
|
|
61
|
+
export type ReleasesGetError = UnauthorizedError<ErrorModelRead> | ForbiddenError<ErrorModelRead> | NotFoundError<ErrorModelRead> | RateLimitError<ErrorModelRead> | ServerError<ErrorModelRead> | RateLimitError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
|
|
62
|
+
export interface ReleasesRetryParams {
|
|
58
63
|
/**
|
|
59
64
|
* Identifies one logical write for 24 hours. The key is scoped to the authenticated organization
|
|
60
65
|
* and operation; generation without an organization uses a hashed network identity. Retrying the
|
|
@@ -63,6 +68,6 @@ export interface ReleasesRepublishParams {
|
|
|
63
68
|
*/
|
|
64
69
|
idempotencyKey?: string;
|
|
65
70
|
}
|
|
66
|
-
/** Typed errors `
|
|
67
|
-
export type
|
|
71
|
+
/** Typed errors `retry` can throw. */
|
|
72
|
+
export type ReleasesRetryError = BadRequestError<ErrorModelRead> | UnauthorizedError<ErrorModelRead> | ForbiddenError<ErrorModelRead> | NotFoundError<ErrorModelRead> | ConflictError<ErrorModelRead> | RateLimitError<ErrorModelRead> | ServerError<ErrorModelRead> | RateLimitError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
|
|
68
73
|
//# sourceMappingURL=releases.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"releases.d.ts","sourceRoot":"","sources":["../../src/resources/releases.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,QAAQ,EAAE,KAAK,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAChE,OAAO,EAAY,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,EACL,kBAAkB,EAClB,cAAc,EACd,kBAAkB,EAClB,eAAe,EACf,eAAe,EACf,
|
|
1
|
+
{"version":3,"file":"releases.d.ts","sourceRoot":"","sources":["../../src/resources/releases.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,QAAQ,EAAE,KAAK,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAChE,OAAO,EAAY,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,EACL,cAAc,EACd,kBAAkB,EAClB,cAAc,EACd,kBAAkB,EAClB,eAAe,EACf,eAAe,EACf,aAAa,EACb,cAAc,EACd,aAAa,EACb,WAAW,EACX,iBAAiB,EAClB,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAEV,cAAc,EAEd,SAAS,EAGT,WAAW,EAEX,mBAAmB,EACnB,QAAQ,EACT,MAAM,aAAa,CAAC;AAErB,qBAAa,gBAAgB;IACf,OAAO,CAAC,QAAQ,CAAC,KAAK;gBAAL,KAAK,EAAE,QAAQ;IAC5C;;;;;OAKG;IACH,IAAI,CAAC,MAAM,CAAC,EAAE,kBAAkB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,WAAW,CAAC,WAAW,EAAE,iBAAiB,CAAC;IAuBxG;;;OAGG;IACG,GAAG,CAAC,SAAS,EAAE,SAAS,EAAE,OAAO,CA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a,CAAC,cAAc,CAAC,GAC7B,cAAc,CAAC,cAAc,CAAC,GAC9B,WAAW,CAAC,cAAc,CAAC,GAC3B,cAAc,GACd,kBAAkB,GAClB,kBAAkB,GAClB,cAAc,GACd,eAAe,CAAC"}
|
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Generated by
|
|
1
|
+
// Typeship — releases resource.
|
|
2
|
+
// Generated by Typeship — https://typeship.dev
|
|
3
3
|
import { paginate } from "../core/pagination.js";
|
|
4
|
-
import { BadGatewayError, BadRequestError, ConflictError, ForbiddenError, InternalServerError, NotFoundError, RateLimitedError, UnauthorizedError, } from "../errors.js";
|
|
5
4
|
export class ReleasesResource {
|
|
6
5
|
_core;
|
|
7
6
|
constructor(_core) {
|
|
8
7
|
this._core = _core;
|
|
9
8
|
}
|
|
10
9
|
/**
|
|
11
|
-
* List
|
|
10
|
+
* List Releases
|
|
12
11
|
*
|
|
13
12
|
* Auto-paginates: `for await (const item of …)` walks every page.
|
|
14
13
|
* `GET /releases`
|
|
@@ -23,14 +22,6 @@ export class ReleasesResource {
|
|
|
23
22
|
cursor: params?.cursor,
|
|
24
23
|
target_id: params?.targetId,
|
|
25
24
|
},
|
|
26
|
-
errors: {
|
|
27
|
-
"400": BadRequestError,
|
|
28
|
-
"401": UnauthorizedError,
|
|
29
|
-
"403": ForbiddenError,
|
|
30
|
-
"404": NotFoundError,
|
|
31
|
-
"429": RateLimitedError,
|
|
32
|
-
"500": InternalServerError,
|
|
33
|
-
},
|
|
34
25
|
idempotent: true,
|
|
35
26
|
schemaKey: "releases.list",
|
|
36
27
|
options,
|
|
@@ -44,7 +35,7 @@ export class ReleasesResource {
|
|
|
44
35
|
});
|
|
45
36
|
}
|
|
46
37
|
/**
|
|
47
|
-
* Get
|
|
38
|
+
* Get a Release
|
|
48
39
|
* `GET /releases/{release_id}`
|
|
49
40
|
*/
|
|
50
41
|
async get(releaseId, options) {
|
|
@@ -52,50 +43,38 @@ export class ReleasesResource {
|
|
|
52
43
|
method: "GET",
|
|
53
44
|
path: `/releases/${encodeURIComponent(String(releaseId))}`,
|
|
54
45
|
security: [{ "apiKey": [] }],
|
|
55
|
-
errors: {
|
|
56
|
-
"401": UnauthorizedError,
|
|
57
|
-
"403": ForbiddenError,
|
|
58
|
-
"404": NotFoundError,
|
|
59
|
-
"429": RateLimitedError,
|
|
60
|
-
"500": InternalServerError,
|
|
61
|
-
},
|
|
62
46
|
idempotent: true,
|
|
63
47
|
schemaKey: "releases.get",
|
|
64
48
|
options,
|
|
65
49
|
});
|
|
66
50
|
}
|
|
67
51
|
/**
|
|
68
|
-
* Retry publishing
|
|
52
|
+
* Retry publishing a Release
|
|
69
53
|
*
|
|
70
|
-
*
|
|
71
|
-
* version and accepted commit, even if a newer
|
|
54
|
+
* Queues every failed or queued Publication of the release and starts its repository publishing
|
|
55
|
+
* workflow again. Publishing uses that release's version and accepted commit, even if a newer
|
|
56
|
+
* Draft or release exists. Completed Publications are not repeated.
|
|
72
57
|
*
|
|
73
|
-
*
|
|
74
|
-
*
|
|
58
|
+
* Returns `202` with the Release. Get the Release until each Publication reaches `completed` or
|
|
59
|
+
* `failed`.
|
|
60
|
+
*
|
|
61
|
+
* A `409 publication_not_retryable` means no Publication is queued or failed. A `502
|
|
62
|
+
* repository_unavailable` means the repository publishing workflow could not be dispatched, and
|
|
63
|
+
* nothing was changed.
|
|
75
64
|
*
|
|
76
65
|
* A `Idempotency-Key` UUID is generated per call (stable across retries) unless you pass one.
|
|
77
|
-
* `POST /releases/{release_id}/
|
|
66
|
+
* `POST /releases/{release_id}/retry`
|
|
78
67
|
*/
|
|
79
|
-
async
|
|
68
|
+
async retry(releaseId, params, options) {
|
|
80
69
|
return this._core.requestData({
|
|
81
70
|
method: "POST",
|
|
82
|
-
path: `/releases/${encodeURIComponent(String(releaseId))}/
|
|
71
|
+
path: `/releases/${encodeURIComponent(String(releaseId))}/retry`,
|
|
83
72
|
security: [{ "apiKey": [] }],
|
|
84
73
|
headers: {
|
|
85
74
|
"Idempotency-Key": params?.idempotencyKey === undefined ? undefined : String(params?.idempotencyKey),
|
|
86
75
|
},
|
|
87
|
-
errors: {
|
|
88
|
-
"400": BadRequestError,
|
|
89
|
-
"401": UnauthorizedError,
|
|
90
|
-
"403": ForbiddenError,
|
|
91
|
-
"404": NotFoundError,
|
|
92
|
-
"409": ConflictError,
|
|
93
|
-
"429": RateLimitedError,
|
|
94
|
-
"500": InternalServerError,
|
|
95
|
-
"502": BadGatewayError,
|
|
96
|
-
},
|
|
97
76
|
idempotencyKey: "Idempotency-Key",
|
|
98
|
-
schemaKey: "releases.
|
|
77
|
+
schemaKey: "releases.retry",
|
|
99
78
|
options,
|
|
100
79
|
});
|
|
101
80
|
}
|