@typeship-ax/cli 0.22.0 → 0.23.1
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 +12 -8
- package/README.md +14 -27
- package/api.json +8898 -9026
- package/api.md +369 -327
- package/dist/arguments.d.ts +47 -0
- package/dist/arguments.d.ts.map +1 -0
- package/dist/arguments.js +254 -0
- package/dist/cli-agent.d.ts +31 -8
- package/dist/cli-agent.d.ts.map +1 -1
- package/dist/cli-agent.js +146 -28
- package/dist/cli.js +483 -237
- 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/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-login.d.ts +8 -2
- package/dist/oauth-login.d.ts.map +1 -1
- package/dist/oauth-login.js +31 -19
- 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/polling-login.d.ts +8 -2
- package/dist/polling-login.d.ts.map +1 -1
- package/dist/polling-login.js +25 -11
- 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 +83 -81
- 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/package.json +5 -2
- package/src/arguments.ts +242 -0
- package/src/cli-agent.ts +156 -30
- package/src/cli.ts +444 -211
- 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/named-credentials.ts +66 -1
- package/src/oauth-login.ts +36 -21
- package/src/oauth-request.ts +32 -6
- package/src/oauth-session.ts +37 -19
- package/src/ops.ts +82 -44
- package/src/polling-login.ts +24 -11
- 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 +83 -81
- package/src/search.ts +434 -0
- package/src/types.ts +538 -357
- package/dist/console-login-check.d.ts +0 -21
- package/dist/console-login-check.d.ts.map +0 -1
- package/dist/console-login-check.js +0 -107
- package/dist/console-login-contract.d.ts +0 -45
- package/dist/console-login-contract.d.ts.map +0 -1
- package/dist/console-login-contract.js +0 -40
- 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/console-login-check.ts +0 -88
- package/src/console-login-contract.ts +0 -65
- package/src/resources/publications.ts +0 -140
|
@@ -1,23 +1,24 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Generated by
|
|
1
|
+
// Typeship — releases resource.
|
|
2
|
+
// Generated by Typeship — https://typeship.dev
|
|
3
3
|
|
|
4
4
|
import { HttpCore, type RequestOptions } from "../core/http.js";
|
|
5
5
|
import { paginate, PagePromise } from "../core/pagination.js";
|
|
6
6
|
import {
|
|
7
|
+
RateLimitError,
|
|
7
8
|
ResponseParseError,
|
|
8
9
|
TransportError,
|
|
9
10
|
UnexpectedApiError,
|
|
10
11
|
ValidationError,
|
|
11
|
-
BadGatewayError,
|
|
12
12
|
BadRequestError,
|
|
13
13
|
ConflictError,
|
|
14
14
|
ForbiddenError,
|
|
15
|
-
InternalServerError,
|
|
16
15
|
NotFoundError,
|
|
17
|
-
|
|
16
|
+
ServerError,
|
|
18
17
|
UnauthorizedError,
|
|
19
18
|
} from "../errors.js";
|
|
20
19
|
import type {
|
|
20
|
+
ErrorModel,
|
|
21
|
+
ErrorModelRead,
|
|
21
22
|
Release,
|
|
22
23
|
ReleaseId,
|
|
23
24
|
ReleaseList,
|
|
@@ -31,7 +32,7 @@ import type {
|
|
|
31
32
|
export class ReleasesResource {
|
|
32
33
|
constructor(private readonly _core: HttpCore) {}
|
|
33
34
|
/**
|
|
34
|
-
* List
|
|
35
|
+
* List Releases
|
|
35
36
|
*
|
|
36
37
|
* Auto-paginates: `for await (const item of …)` walks every page.
|
|
37
38
|
* `GET /releases`
|
|
@@ -46,14 +47,6 @@ export class ReleasesResource {
|
|
|
46
47
|
cursor: params?.cursor,
|
|
47
48
|
target_id: params?.targetId,
|
|
48
49
|
},
|
|
49
|
-
errors: {
|
|
50
|
-
"400": BadRequestError,
|
|
51
|
-
"401": UnauthorizedError,
|
|
52
|
-
"403": ForbiddenError,
|
|
53
|
-
"404": NotFoundError,
|
|
54
|
-
"429": RateLimitedError,
|
|
55
|
-
"500": InternalServerError,
|
|
56
|
-
},
|
|
57
50
|
idempotent: true,
|
|
58
51
|
schemaKey: "releases.list",
|
|
59
52
|
options,
|
|
@@ -68,7 +61,7 @@ export class ReleasesResource {
|
|
|
68
61
|
}
|
|
69
62
|
|
|
70
63
|
/**
|
|
71
|
-
* Get
|
|
64
|
+
* Get a Release
|
|
72
65
|
* `GET /releases/{release_id}`
|
|
73
66
|
*/
|
|
74
67
|
async get(releaseId: ReleaseId, options?: RequestOptions): Promise<ReleaseResponseRead> {
|
|
@@ -76,13 +69,6 @@ export class ReleasesResource {
|
|
|
76
69
|
method: "GET",
|
|
77
70
|
path: `/releases/${encodeURIComponent(String(releaseId))}`,
|
|
78
71
|
security: [{"apiKey":[]}],
|
|
79
|
-
errors: {
|
|
80
|
-
"401": UnauthorizedError,
|
|
81
|
-
"403": ForbiddenError,
|
|
82
|
-
"404": NotFoundError,
|
|
83
|
-
"429": RateLimitedError,
|
|
84
|
-
"500": InternalServerError,
|
|
85
|
-
},
|
|
86
72
|
idempotent: true,
|
|
87
73
|
schemaKey: "releases.get",
|
|
88
74
|
options,
|
|
@@ -90,41 +76,36 @@ export class ReleasesResource {
|
|
|
90
76
|
}
|
|
91
77
|
|
|
92
78
|
/**
|
|
93
|
-
* Retry publishing
|
|
79
|
+
* Retry publishing a Release
|
|
94
80
|
*
|
|
95
|
-
*
|
|
96
|
-
* version and accepted commit, even if a newer
|
|
81
|
+
* Queues every failed or queued Publication of the release and starts its repository publishing
|
|
82
|
+
* workflow again. Publishing uses that release's version and accepted commit, even if a newer
|
|
83
|
+
* Draft or release exists. Completed Publications are not repeated.
|
|
97
84
|
*
|
|
98
|
-
*
|
|
99
|
-
*
|
|
85
|
+
* Returns `202` with the Release. Get the Release until each Publication reaches `completed` or
|
|
86
|
+
* `failed`.
|
|
87
|
+
*
|
|
88
|
+
* A `409 publication_not_retryable` means no Publication is queued or failed. A `502
|
|
89
|
+
* repository_unavailable` means the repository publishing workflow could not be dispatched, and
|
|
90
|
+
* nothing was changed.
|
|
100
91
|
*
|
|
101
92
|
* A `Idempotency-Key` UUID is generated per call (stable across retries) unless you pass one.
|
|
102
|
-
* `POST /releases/{release_id}/
|
|
93
|
+
* `POST /releases/{release_id}/retry`
|
|
103
94
|
*/
|
|
104
|
-
async
|
|
95
|
+
async retry(
|
|
105
96
|
releaseId: ReleaseId,
|
|
106
|
-
params?:
|
|
97
|
+
params?: ReleasesRetryParams,
|
|
107
98
|
options?: RequestOptions,
|
|
108
99
|
): Promise<ReleaseResponseRead> {
|
|
109
|
-
return this._core.requestData<ReleaseResponseRead,
|
|
100
|
+
return this._core.requestData<ReleaseResponseRead, ReleasesRetryError>({
|
|
110
101
|
method: "POST",
|
|
111
|
-
path: `/releases/${encodeURIComponent(String(releaseId))}/
|
|
102
|
+
path: `/releases/${encodeURIComponent(String(releaseId))}/retry`,
|
|
112
103
|
security: [{"apiKey":[]}],
|
|
113
104
|
headers: {
|
|
114
105
|
"Idempotency-Key": params?.idempotencyKey === undefined ? undefined : String(params?.idempotencyKey),
|
|
115
106
|
},
|
|
116
|
-
errors: {
|
|
117
|
-
"400": BadRequestError,
|
|
118
|
-
"401": UnauthorizedError,
|
|
119
|
-
"403": ForbiddenError,
|
|
120
|
-
"404": NotFoundError,
|
|
121
|
-
"409": ConflictError,
|
|
122
|
-
"429": RateLimitedError,
|
|
123
|
-
"500": InternalServerError,
|
|
124
|
-
"502": BadGatewayError,
|
|
125
|
-
},
|
|
126
107
|
idempotencyKey: "Idempotency-Key",
|
|
127
|
-
schemaKey: "releases.
|
|
108
|
+
schemaKey: "releases.retry",
|
|
128
109
|
options,
|
|
129
110
|
});
|
|
130
111
|
}
|
|
@@ -152,12 +133,13 @@ export interface ReleasesListParams {
|
|
|
152
133
|
|
|
153
134
|
/** Typed errors `list` can throw. */
|
|
154
135
|
export type ReleasesListError =
|
|
155
|
-
| BadRequestError
|
|
156
|
-
| UnauthorizedError
|
|
157
|
-
| ForbiddenError
|
|
158
|
-
| NotFoundError
|
|
159
|
-
|
|
|
160
|
-
|
|
|
136
|
+
| BadRequestError<ErrorModelRead>
|
|
137
|
+
| UnauthorizedError<ErrorModelRead>
|
|
138
|
+
| ForbiddenError<ErrorModelRead>
|
|
139
|
+
| NotFoundError<ErrorModelRead>
|
|
140
|
+
| RateLimitError<ErrorModelRead>
|
|
141
|
+
| ServerError<ErrorModelRead>
|
|
142
|
+
| RateLimitError
|
|
161
143
|
| UnexpectedApiError
|
|
162
144
|
| ResponseParseError
|
|
163
145
|
| TransportError
|
|
@@ -165,17 +147,18 @@ export type ReleasesListError =
|
|
|
165
147
|
|
|
166
148
|
/** Typed errors `get` can throw. */
|
|
167
149
|
export type ReleasesGetError =
|
|
168
|
-
| UnauthorizedError
|
|
169
|
-
| ForbiddenError
|
|
170
|
-
| NotFoundError
|
|
171
|
-
|
|
|
172
|
-
|
|
|
150
|
+
| UnauthorizedError<ErrorModelRead>
|
|
151
|
+
| ForbiddenError<ErrorModelRead>
|
|
152
|
+
| NotFoundError<ErrorModelRead>
|
|
153
|
+
| RateLimitError<ErrorModelRead>
|
|
154
|
+
| ServerError<ErrorModelRead>
|
|
155
|
+
| RateLimitError
|
|
173
156
|
| UnexpectedApiError
|
|
174
157
|
| ResponseParseError
|
|
175
158
|
| TransportError
|
|
176
159
|
| ValidationError;
|
|
177
160
|
|
|
178
|
-
export interface
|
|
161
|
+
export interface ReleasesRetryParams {
|
|
179
162
|
/**
|
|
180
163
|
* Identifies one logical write for 24 hours. The key is scoped to the authenticated organization
|
|
181
164
|
* and operation; generation without an organization uses a hashed network identity. Retrying the
|
|
@@ -185,16 +168,16 @@ export interface ReleasesRepublishParams {
|
|
|
185
168
|
idempotencyKey?: string;
|
|
186
169
|
}
|
|
187
170
|
|
|
188
|
-
/** Typed errors `
|
|
189
|
-
export type
|
|
190
|
-
| BadRequestError
|
|
191
|
-
| UnauthorizedError
|
|
192
|
-
| ForbiddenError
|
|
193
|
-
| NotFoundError
|
|
194
|
-
| ConflictError
|
|
195
|
-
|
|
|
196
|
-
|
|
|
197
|
-
|
|
|
171
|
+
/** Typed errors `retry` can throw. */
|
|
172
|
+
export type ReleasesRetryError =
|
|
173
|
+
| BadRequestError<ErrorModelRead>
|
|
174
|
+
| UnauthorizedError<ErrorModelRead>
|
|
175
|
+
| ForbiddenError<ErrorModelRead>
|
|
176
|
+
| NotFoundError<ErrorModelRead>
|
|
177
|
+
| ConflictError<ErrorModelRead>
|
|
178
|
+
| RateLimitError<ErrorModelRead>
|
|
179
|
+
| ServerError<ErrorModelRead>
|
|
180
|
+
| RateLimitError
|
|
198
181
|
| UnexpectedApiError
|
|
199
182
|
| ResponseParseError
|
|
200
183
|
| TransportError
|
|
@@ -1,21 +1,23 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Generated by
|
|
1
|
+
// Typeship — specRevisions resource.
|
|
2
|
+
// Generated by Typeship — https://typeship.dev
|
|
3
3
|
|
|
4
4
|
import { HttpCore, type RequestOptions } from "../core/http.js";
|
|
5
5
|
import { paginate, PagePromise } from "../core/pagination.js";
|
|
6
6
|
import {
|
|
7
|
+
RateLimitError,
|
|
7
8
|
ResponseParseError,
|
|
8
9
|
TransportError,
|
|
9
10
|
UnexpectedApiError,
|
|
10
11
|
ValidationError,
|
|
11
12
|
BadRequestError,
|
|
12
13
|
ForbiddenError,
|
|
13
|
-
InternalServerError,
|
|
14
14
|
NotFoundError,
|
|
15
|
-
|
|
15
|
+
ServerError,
|
|
16
16
|
UnauthorizedError,
|
|
17
17
|
} from "../errors.js";
|
|
18
18
|
import type {
|
|
19
|
+
ErrorModel,
|
|
20
|
+
ErrorModelRead,
|
|
19
21
|
SpecId,
|
|
20
22
|
SpecRevision,
|
|
21
23
|
SpecRevisionFile,
|
|
@@ -54,14 +56,6 @@ export class SpecRevisionsResource {
|
|
|
54
56
|
cursor: params?.cursor,
|
|
55
57
|
spec_id: params?.specId,
|
|
56
58
|
},
|
|
57
|
-
errors: {
|
|
58
|
-
"400": BadRequestError,
|
|
59
|
-
"401": UnauthorizedError,
|
|
60
|
-
"403": ForbiddenError,
|
|
61
|
-
"404": NotFoundError,
|
|
62
|
-
"429": RateLimitedError,
|
|
63
|
-
"500": InternalServerError,
|
|
64
|
-
},
|
|
65
59
|
idempotent: true,
|
|
66
60
|
schemaKey: "specRevisions.list",
|
|
67
61
|
options,
|
|
@@ -80,7 +74,9 @@ export class SpecRevisionsResource {
|
|
|
80
74
|
*
|
|
81
75
|
* Returns metadata for a saved Spec Revision with a Diagnostics summary. Pass
|
|
82
76
|
* `include=diagnostics` to add every Diagnostic, evaluated with the Spec's current patches and
|
|
83
|
-
* Diagnostic policy.
|
|
77
|
+
* Diagnostic policy. Add `filter=blocking` to receive only the locations that fail the policy,
|
|
78
|
+
* which is what to fix when `diagnostic_summary.status` is blocked. List its source files and
|
|
79
|
+
* resolved document with listSpecRevisionFiles.
|
|
84
80
|
* `GET /spec-revisions/{spec_revision_id}`
|
|
85
81
|
*/
|
|
86
82
|
async get(
|
|
@@ -94,14 +90,7 @@ export class SpecRevisionsResource {
|
|
|
94
90
|
security: [{"apiKey":[]}],
|
|
95
91
|
query: {
|
|
96
92
|
include: params?.include,
|
|
97
|
-
|
|
98
|
-
errors: {
|
|
99
|
-
"400": BadRequestError,
|
|
100
|
-
"401": UnauthorizedError,
|
|
101
|
-
"403": ForbiddenError,
|
|
102
|
-
"404": NotFoundError,
|
|
103
|
-
"429": RateLimitedError,
|
|
104
|
-
"500": InternalServerError,
|
|
93
|
+
filter: params?.filter,
|
|
105
94
|
},
|
|
106
95
|
idempotent: true,
|
|
107
96
|
schemaKey: "specRevisions.get",
|
|
@@ -131,14 +120,6 @@ export class SpecRevisionsResource {
|
|
|
131
120
|
limit: params?.limit,
|
|
132
121
|
cursor: params?.cursor,
|
|
133
122
|
},
|
|
134
|
-
errors: {
|
|
135
|
-
"400": BadRequestError,
|
|
136
|
-
"401": UnauthorizedError,
|
|
137
|
-
"403": ForbiddenError,
|
|
138
|
-
"404": NotFoundError,
|
|
139
|
-
"429": RateLimitedError,
|
|
140
|
-
"500": InternalServerError,
|
|
141
|
-
},
|
|
142
123
|
idempotent: true,
|
|
143
124
|
schemaKey: "specRevisions.listFiles",
|
|
144
125
|
options,
|
|
@@ -175,12 +156,13 @@ export interface SpecRevisionsListParams {
|
|
|
175
156
|
|
|
176
157
|
/** Typed errors `list` can throw. */
|
|
177
158
|
export type SpecRevisionsListError =
|
|
178
|
-
| BadRequestError
|
|
179
|
-
| UnauthorizedError
|
|
180
|
-
| ForbiddenError
|
|
181
|
-
| NotFoundError
|
|
182
|
-
|
|
|
183
|
-
|
|
|
159
|
+
| BadRequestError<ErrorModelRead>
|
|
160
|
+
| UnauthorizedError<ErrorModelRead>
|
|
161
|
+
| ForbiddenError<ErrorModelRead>
|
|
162
|
+
| NotFoundError<ErrorModelRead>
|
|
163
|
+
| RateLimitError<ErrorModelRead>
|
|
164
|
+
| ServerError<ErrorModelRead>
|
|
165
|
+
| RateLimitError
|
|
184
166
|
| UnexpectedApiError
|
|
185
167
|
| ResponseParseError
|
|
186
168
|
| TransportError
|
|
@@ -192,16 +174,24 @@ export interface SpecRevisionsGetParams {
|
|
|
192
174
|
* arrays.
|
|
193
175
|
*/
|
|
194
176
|
include?: "diagnostics";
|
|
177
|
+
/**
|
|
178
|
+
* Narrow the included Diagnostics to matching locations. Requires include=diagnostics. blocking:
|
|
179
|
+
* locations that fail the Diagnostic policy. introduced: locations new since the baseline. A
|
|
180
|
+
* Diagnostic with no matching location is omitted. diagnostic_summary always describes the
|
|
181
|
+
* complete revision.
|
|
182
|
+
*/
|
|
183
|
+
filter?: "blocking" | "introduced";
|
|
195
184
|
}
|
|
196
185
|
|
|
197
186
|
/** Typed errors `get` can throw. */
|
|
198
187
|
export type SpecRevisionsGetError =
|
|
199
|
-
| BadRequestError
|
|
200
|
-
| UnauthorizedError
|
|
201
|
-
| ForbiddenError
|
|
202
|
-
| NotFoundError
|
|
203
|
-
|
|
|
204
|
-
|
|
|
188
|
+
| BadRequestError<ErrorModelRead>
|
|
189
|
+
| UnauthorizedError<ErrorModelRead>
|
|
190
|
+
| ForbiddenError<ErrorModelRead>
|
|
191
|
+
| NotFoundError<ErrorModelRead>
|
|
192
|
+
| RateLimitError<ErrorModelRead>
|
|
193
|
+
| ServerError<ErrorModelRead>
|
|
194
|
+
| RateLimitError
|
|
205
195
|
| UnexpectedApiError
|
|
206
196
|
| ResponseParseError
|
|
207
197
|
| TransportError
|
|
@@ -227,12 +217,13 @@ export interface SpecRevisionsListFilesParams {
|
|
|
227
217
|
|
|
228
218
|
/** Typed errors `listFiles` can throw. */
|
|
229
219
|
export type SpecRevisionsListFilesError =
|
|
230
|
-
| BadRequestError
|
|
231
|
-
| UnauthorizedError
|
|
232
|
-
| ForbiddenError
|
|
233
|
-
| NotFoundError
|
|
234
|
-
|
|
|
235
|
-
|
|
|
220
|
+
| BadRequestError<ErrorModelRead>
|
|
221
|
+
| UnauthorizedError<ErrorModelRead>
|
|
222
|
+
| ForbiddenError<ErrorModelRead>
|
|
223
|
+
| NotFoundError<ErrorModelRead>
|
|
224
|
+
| RateLimitError<ErrorModelRead>
|
|
225
|
+
| ServerError<ErrorModelRead>
|
|
226
|
+
| RateLimitError
|
|
236
227
|
| UnexpectedApiError
|
|
237
228
|
| ResponseParseError
|
|
238
229
|
| TransportError
|
package/src/resources/specs.ts
CHANGED
|
@@ -1,24 +1,30 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Generated by
|
|
1
|
+
// Typeship — specs resource.
|
|
2
|
+
// Generated by Typeship — https://typeship.dev
|
|
3
3
|
|
|
4
4
|
import { HttpCore, type RequestOptions } from "../core/http.js";
|
|
5
5
|
import {
|
|
6
|
+
RateLimitError,
|
|
6
7
|
ResponseParseError,
|
|
7
8
|
TransportError,
|
|
8
9
|
UnexpectedApiError,
|
|
9
10
|
ValidationError,
|
|
10
|
-
BadGatewayError,
|
|
11
11
|
BadRequestError,
|
|
12
12
|
ConflictError,
|
|
13
13
|
ForbiddenError,
|
|
14
|
-
InternalServerError,
|
|
15
14
|
NotFoundError,
|
|
16
15
|
PreconditionFailedError,
|
|
17
|
-
|
|
16
|
+
ServerError,
|
|
18
17
|
UnauthorizedError,
|
|
19
18
|
UnprocessableEntityError,
|
|
20
19
|
} from "../errors.js";
|
|
21
|
-
import type {
|
|
20
|
+
import type {
|
|
21
|
+
ErrorModel,
|
|
22
|
+
ErrorModelRead,
|
|
23
|
+
Spec,
|
|
24
|
+
SpecId,
|
|
25
|
+
SpecRead,
|
|
26
|
+
SpecUpdateRequest,
|
|
27
|
+
} from "../types.js";
|
|
22
28
|
|
|
23
29
|
export class SpecsResource {
|
|
24
30
|
constructor(private readonly _core: HttpCore) {}
|
|
@@ -31,13 +37,6 @@ export class SpecsResource {
|
|
|
31
37
|
method: "GET",
|
|
32
38
|
path: `/specs/${encodeURIComponent(String(specId))}`,
|
|
33
39
|
security: [{"apiKey":[]}],
|
|
34
|
-
errors: {
|
|
35
|
-
"401": UnauthorizedError,
|
|
36
|
-
"403": ForbiddenError,
|
|
37
|
-
"404": NotFoundError,
|
|
38
|
-
"429": RateLimitedError,
|
|
39
|
-
"500": InternalServerError,
|
|
40
|
-
},
|
|
41
40
|
idempotent: true,
|
|
42
41
|
schemaKey: "specs.get",
|
|
43
42
|
options,
|
|
@@ -45,7 +44,7 @@ export class SpecsResource {
|
|
|
45
44
|
}
|
|
46
45
|
|
|
47
46
|
/**
|
|
48
|
-
* Update
|
|
47
|
+
* Update a Spec
|
|
49
48
|
*
|
|
50
49
|
* Resolves the source files before saving the update and records a new Spec Revision when the
|
|
51
50
|
* source changes.
|
|
@@ -76,17 +75,7 @@ export class SpecsResource {
|
|
|
76
75
|
"Idempotency-Key": params?.idempotencyKey === undefined ? undefined : String(params?.idempotencyKey),
|
|
77
76
|
},
|
|
78
77
|
body,
|
|
79
|
-
errors: {
|
|
80
|
-
"400": BadRequestError,
|
|
81
|
-
"401": UnauthorizedError,
|
|
82
|
-
"403": ForbiddenError,
|
|
83
|
-
"404": NotFoundError,
|
|
84
|
-
"409": ConflictError,
|
|
85
|
-
"412": PreconditionFailedError,
|
|
86
|
-
"422": UnprocessableEntityError,
|
|
87
|
-
"429": RateLimitedError,
|
|
88
|
-
"500": InternalServerError,
|
|
89
|
-
},
|
|
78
|
+
errors: { "412": PreconditionFailedError },
|
|
90
79
|
idempotencyKey: "Idempotency-Key",
|
|
91
80
|
schemaKey: "specs.update",
|
|
92
81
|
options,
|
|
@@ -94,7 +83,7 @@ export class SpecsResource {
|
|
|
94
83
|
}
|
|
95
84
|
|
|
96
85
|
/**
|
|
97
|
-
* Refresh a Spec
|
|
86
|
+
* Refresh a Spec
|
|
98
87
|
*
|
|
99
88
|
* Fetches the configured source now and creates a new Spec Revision only when its content
|
|
100
89
|
* changes. Diagnostics then reads that revision. If automatic generation is enabled, refresh
|
|
@@ -112,17 +101,6 @@ export class SpecsResource {
|
|
|
112
101
|
headers: {
|
|
113
102
|
"Idempotency-Key": params?.idempotencyKey === undefined ? undefined : String(params?.idempotencyKey),
|
|
114
103
|
},
|
|
115
|
-
errors: {
|
|
116
|
-
"400": BadRequestError,
|
|
117
|
-
"401": UnauthorizedError,
|
|
118
|
-
"403": ForbiddenError,
|
|
119
|
-
"404": NotFoundError,
|
|
120
|
-
"409": ConflictError,
|
|
121
|
-
"422": UnprocessableEntityError,
|
|
122
|
-
"429": RateLimitedError,
|
|
123
|
-
"500": InternalServerError,
|
|
124
|
-
"502": BadGatewayError,
|
|
125
|
-
},
|
|
126
104
|
idempotencyKey: "Idempotency-Key",
|
|
127
105
|
schemaKey: "specs.refresh",
|
|
128
106
|
options,
|
|
@@ -132,11 +110,12 @@ export class SpecsResource {
|
|
|
132
110
|
|
|
133
111
|
/** Typed errors `get` can throw. */
|
|
134
112
|
export type SpecsGetError =
|
|
135
|
-
| UnauthorizedError
|
|
136
|
-
| ForbiddenError
|
|
137
|
-
| NotFoundError
|
|
138
|
-
|
|
|
139
|
-
|
|
|
113
|
+
| UnauthorizedError<ErrorModelRead>
|
|
114
|
+
| ForbiddenError<ErrorModelRead>
|
|
115
|
+
| NotFoundError<ErrorModelRead>
|
|
116
|
+
| RateLimitError<ErrorModelRead>
|
|
117
|
+
| ServerError<ErrorModelRead>
|
|
118
|
+
| RateLimitError
|
|
140
119
|
| UnexpectedApiError
|
|
141
120
|
| ResponseParseError
|
|
142
121
|
| TransportError
|
|
@@ -160,15 +139,16 @@ export interface SpecsUpdateParams {
|
|
|
160
139
|
|
|
161
140
|
/** Typed errors `update` can throw. */
|
|
162
141
|
export type SpecsUpdateError =
|
|
163
|
-
| BadRequestError
|
|
164
|
-
| UnauthorizedError
|
|
165
|
-
| ForbiddenError
|
|
166
|
-
| NotFoundError
|
|
167
|
-
| ConflictError
|
|
142
|
+
| BadRequestError<ErrorModelRead>
|
|
143
|
+
| UnauthorizedError<ErrorModelRead>
|
|
144
|
+
| ForbiddenError<ErrorModelRead>
|
|
145
|
+
| NotFoundError<ErrorModelRead>
|
|
146
|
+
| ConflictError<ErrorModelRead>
|
|
168
147
|
| PreconditionFailedError
|
|
169
|
-
| UnprocessableEntityError
|
|
170
|
-
|
|
|
171
|
-
|
|
|
148
|
+
| UnprocessableEntityError<ErrorModelRead>
|
|
149
|
+
| RateLimitError<ErrorModelRead>
|
|
150
|
+
| ServerError<ErrorModelRead>
|
|
151
|
+
| RateLimitError
|
|
172
152
|
| UnexpectedApiError
|
|
173
153
|
| ResponseParseError
|
|
174
154
|
| TransportError
|
|
@@ -186,15 +166,15 @@ export interface SpecsRefreshParams {
|
|
|
186
166
|
|
|
187
167
|
/** Typed errors `refresh` can throw. */
|
|
188
168
|
export type SpecsRefreshError =
|
|
189
|
-
| BadRequestError
|
|
190
|
-
| UnauthorizedError
|
|
191
|
-
| ForbiddenError
|
|
192
|
-
| NotFoundError
|
|
193
|
-
| ConflictError
|
|
194
|
-
| UnprocessableEntityError
|
|
195
|
-
|
|
|
196
|
-
|
|
|
197
|
-
|
|
|
169
|
+
| BadRequestError<ErrorModelRead>
|
|
170
|
+
| UnauthorizedError<ErrorModelRead>
|
|
171
|
+
| ForbiddenError<ErrorModelRead>
|
|
172
|
+
| NotFoundError<ErrorModelRead>
|
|
173
|
+
| ConflictError<ErrorModelRead>
|
|
174
|
+
| UnprocessableEntityError<ErrorModelRead>
|
|
175
|
+
| RateLimitError<ErrorModelRead>
|
|
176
|
+
| ServerError<ErrorModelRead>
|
|
177
|
+
| RateLimitError
|
|
198
178
|
| UnexpectedApiError
|
|
199
179
|
| ResponseParseError
|
|
200
180
|
| TransportError
|