@typeship-ax/mcp 0.9.1 → 0.19.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 +10 -4
- package/README.md +16 -5
- package/api.json +6055 -645
- package/api.md +5225 -567
- package/dist/core/http.d.ts +3 -2
- package/dist/core/http.d.ts.map +1 -1
- package/dist/core/http.js +18 -6
- package/dist/errors.d.ts +17 -10
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +24 -15
- package/dist/index.d.ts +7 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +9 -5
- package/dist/mcp-protocol.d.ts +10 -6
- package/dist/mcp-protocol.d.ts.map +1 -1
- package/dist/mcp-protocol.js +108 -37
- package/dist/mcp.d.ts.map +1 -1
- package/dist/mcp.js +36 -17
- package/dist/ops.d.ts +4 -0
- package/dist/ops.d.ts.map +1 -1
- package/dist/ops.js +45 -31
- package/dist/resources/account.d.ts +4 -4
- package/dist/resources/account.d.ts.map +1 -1
- package/dist/resources/account.js +10 -5
- package/dist/resources/api-keys.d.ts +40 -14
- package/dist/resources/api-keys.d.ts.map +1 -1
- package/dist/resources/api-keys.js +45 -13
- package/dist/resources/definition-revisions.d.ts +35 -18
- package/dist/resources/definition-revisions.d.ts.map +1 -1
- package/dist/resources/definition-revisions.js +43 -15
- package/dist/resources/definitions.d.ts +21 -6
- package/dist/resources/definitions.d.ts.map +1 -1
- package/dist/resources/definitions.js +16 -3
- package/dist/resources/generate.d.ts +44 -15
- package/dist/resources/generate.d.ts.map +1 -1
- package/dist/resources/generate.js +55 -13
- package/dist/resources/generations.d.ts +14 -6
- package/dist/resources/generations.d.ts.map +1 -1
- package/dist/resources/generations.js +26 -5
- package/dist/resources/projects.d.ts +106 -53
- package/dist/resources/projects.d.ts.map +1 -1
- package/dist/resources/projects.js +78 -31
- package/dist/resources/targets.d.ts +285 -22
- package/dist/resources/targets.d.ts.map +1 -1
- package/dist/resources/targets.js +408 -10
- package/dist/schemas.d.ts.map +1 -1
- package/dist/schemas.js +138 -73
- package/dist/types.d.ts +2162 -134
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +99 -2
- package/package.json +3 -3
- package/server.json +3 -3
- package/src/core/http.ts +17 -6
- package/src/errors.ts +25 -15
- package/src/index.ts +9 -5
- package/src/mcp-protocol.ts +93 -36
- package/src/mcp.ts +32 -15
- package/src/ops.ts +49 -31
- package/src/resources/account.ts +11 -4
- package/src/resources/api-keys.ts +84 -13
- package/src/resources/definition-revisions.ts +74 -16
- package/src/resources/definitions.ts +28 -4
- package/src/resources/generate.ts +78 -13
- package/src/resources/generations.ts +31 -4
- package/src/resources/projects.ts +141 -39
- package/src/resources/targets.ts +756 -13
- package/src/schemas.ts +138 -73
- package/src/types.ts +2372 -189
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// typeship — generations resource.
|
|
2
|
-
// Generated by typeship — https://typeship.dev
|
|
2
|
+
// Generated by typeship — https://typeship.dev
|
|
3
3
|
|
|
4
4
|
import { HttpCore, type ApiResult, type RequestOptions } from "../core/http.js";
|
|
5
5
|
import {
|
|
@@ -9,6 +9,7 @@ import {
|
|
|
9
9
|
ValidationError,
|
|
10
10
|
BadRequestError,
|
|
11
11
|
ForbiddenError,
|
|
12
|
+
InternalServerError,
|
|
12
13
|
NotFoundError,
|
|
13
14
|
RateLimitedError,
|
|
14
15
|
UnauthorizedError,
|
|
@@ -20,7 +21,10 @@ export class GenerationsResource {
|
|
|
20
21
|
/**
|
|
21
22
|
* Retrieve a generation
|
|
22
23
|
*
|
|
23
|
-
*
|
|
24
|
+
* Returns the current Generation status. `queued` and `running` mean generation is still in
|
|
25
|
+
* progress. `succeeded` means generated files are saved, not that repository delivery or a Draft
|
|
26
|
+
* is complete. Successful results include files, or a file index when the package is too large to
|
|
27
|
+
* inline.
|
|
24
28
|
* `GET /generations/{generation_id}`
|
|
25
29
|
*/
|
|
26
30
|
async retrieve(
|
|
@@ -36,6 +40,7 @@ export class GenerationsResource {
|
|
|
36
40
|
"403": ForbiddenError,
|
|
37
41
|
"404": NotFoundError,
|
|
38
42
|
"429": RateLimitedError,
|
|
43
|
+
"500": InternalServerError,
|
|
39
44
|
},
|
|
40
45
|
idempotent: true,
|
|
41
46
|
schemaKey: "generations.retrieve",
|
|
@@ -46,8 +51,8 @@ export class GenerationsResource {
|
|
|
46
51
|
/**
|
|
47
52
|
* Fetch one file from a generation
|
|
48
53
|
*
|
|
49
|
-
*
|
|
50
|
-
*
|
|
54
|
+
* Returns one file's raw content. Use a path from `files_index` when the Generation reports
|
|
55
|
+
* `files_omitted: true`.
|
|
51
56
|
* `GET /generations/{generation_id}/file`
|
|
52
57
|
*/
|
|
53
58
|
async retrieveFile(
|
|
@@ -68,12 +73,32 @@ export class GenerationsResource {
|
|
|
68
73
|
"403": ForbiddenError,
|
|
69
74
|
"404": NotFoundError,
|
|
70
75
|
"429": RateLimitedError,
|
|
76
|
+
"500": InternalServerError,
|
|
71
77
|
},
|
|
72
78
|
idempotent: true,
|
|
73
79
|
schemaKey: "generations.retrieveFile",
|
|
74
80
|
options,
|
|
75
81
|
});
|
|
76
82
|
}
|
|
83
|
+
|
|
84
|
+
/** Poll until files are generated or the Generation fails. */
|
|
85
|
+
async wait(
|
|
86
|
+
generationId: GenerationId,
|
|
87
|
+
options: RequestOptions & { intervalMs?: number; waitTimeoutMs?: number } = {},
|
|
88
|
+
): Promise<ApiResult<GenerationResponseRead, GenerationsRetrieveError>> {
|
|
89
|
+
const { intervalMs = 1_000, waitTimeoutMs = 600_000, ...requestOptions } = options;
|
|
90
|
+
const deadline = Date.now() + waitTimeoutMs;
|
|
91
|
+
while (true) {
|
|
92
|
+
if (requestOptions.signal?.aborted) {
|
|
93
|
+
throw requestOptions.signal.reason ?? new Error("Generation wait aborted.");
|
|
94
|
+
}
|
|
95
|
+
const result = await this.retrieve(generationId, requestOptions);
|
|
96
|
+
if (!result.ok || (result.data.status !== "queued" && result.data.status !== "running")) return result;
|
|
97
|
+
if (Date.now() >= deadline) throw new Error("Timed out waiting for Generation " + generationId + ".");
|
|
98
|
+
await new Promise<void>((resolve) =>
|
|
99
|
+
setTimeout(resolve, Math.min(intervalMs, deadline - Date.now())));
|
|
100
|
+
}
|
|
101
|
+
}
|
|
77
102
|
}
|
|
78
103
|
|
|
79
104
|
/** Every error `retrieve` can produce, as a discriminated union. */
|
|
@@ -82,6 +107,7 @@ export type GenerationsRetrieveError =
|
|
|
82
107
|
| ForbiddenError
|
|
83
108
|
| NotFoundError
|
|
84
109
|
| RateLimitedError
|
|
110
|
+
| InternalServerError
|
|
85
111
|
| UnexpectedApiError
|
|
86
112
|
| ResponseParseError
|
|
87
113
|
| TransportError
|
|
@@ -99,6 +125,7 @@ export type GenerationsRetrieveFileError =
|
|
|
99
125
|
| ForbiddenError
|
|
100
126
|
| NotFoundError
|
|
101
127
|
| RateLimitedError
|
|
128
|
+
| InternalServerError
|
|
102
129
|
| UnexpectedApiError
|
|
103
130
|
| ResponseParseError
|
|
104
131
|
| TransportError
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// typeship — projects resource.
|
|
2
|
-
// Generated by typeship — https://typeship.dev
|
|
2
|
+
// Generated by typeship — https://typeship.dev
|
|
3
3
|
|
|
4
4
|
import { HttpCore, type ApiResult, type RequestOptions } from "../core/http.js";
|
|
5
5
|
import { paginate, PagePromise } from "../core/pagination.js";
|
|
@@ -14,7 +14,9 @@ import {
|
|
|
14
14
|
ForbiddenError,
|
|
15
15
|
InternalServerError,
|
|
16
16
|
NotFoundError,
|
|
17
|
+
PayloadTooLargeError,
|
|
17
18
|
PaymentRequiredError,
|
|
19
|
+
PreconditionFailedError,
|
|
18
20
|
RateLimitedError,
|
|
19
21
|
UnauthorizedError,
|
|
20
22
|
UnprocessableEntityError,
|
|
@@ -28,6 +30,7 @@ import type {
|
|
|
28
30
|
DiagnosticRemediationRequest,
|
|
29
31
|
DiagnosticReport,
|
|
30
32
|
DiagnosticReportRead,
|
|
33
|
+
GenerateProjectRequest,
|
|
31
34
|
GenerationBatch,
|
|
32
35
|
GenerationBatchRead,
|
|
33
36
|
GenerationList,
|
|
@@ -72,6 +75,7 @@ export class ProjectsResource {
|
|
|
72
75
|
"401": UnauthorizedError,
|
|
73
76
|
"403": ForbiddenError,
|
|
74
77
|
"429": RateLimitedError,
|
|
78
|
+
"500": InternalServerError,
|
|
75
79
|
},
|
|
76
80
|
idempotent: true,
|
|
77
81
|
schemaKey: "projects.list",
|
|
@@ -89,10 +93,11 @@ export class ProjectsResource {
|
|
|
89
93
|
/**
|
|
90
94
|
* Create a project
|
|
91
95
|
*
|
|
92
|
-
*
|
|
93
|
-
*
|
|
94
|
-
*
|
|
95
|
-
*
|
|
96
|
+
* Creates a Project from a URL or GitHub Definition.
|
|
97
|
+
*
|
|
98
|
+
* Free includes one saved Project, all selected Targets, and the first 25 operations per Target,
|
|
99
|
+
* with regeneration, history, delivery pull requests, and previews. Pro supports additional
|
|
100
|
+
* Projects and all operations. One-shot generation does not use a Project slot.
|
|
96
101
|
*
|
|
97
102
|
* A `Idempotency-Key` UUID is generated per call (stable across retries) unless you pass one.
|
|
98
103
|
* `POST /projects`
|
|
@@ -129,7 +134,8 @@ export class ProjectsResource {
|
|
|
129
134
|
/**
|
|
130
135
|
* Retrieve a project
|
|
131
136
|
*
|
|
132
|
-
* Returns Project
|
|
137
|
+
* Returns the Project's settings and Definition ID. List its Targets separately to retrieve
|
|
138
|
+
* Target configuration and Deliveries.
|
|
133
139
|
* `GET /projects/{project_id}`
|
|
134
140
|
*/
|
|
135
141
|
async retrieve(
|
|
@@ -145,6 +151,7 @@ export class ProjectsResource {
|
|
|
145
151
|
"403": ForbiddenError,
|
|
146
152
|
"404": NotFoundError,
|
|
147
153
|
"429": RateLimitedError,
|
|
154
|
+
"500": InternalServerError,
|
|
148
155
|
},
|
|
149
156
|
idempotent: true,
|
|
150
157
|
schemaKey: "projects.retrieve",
|
|
@@ -154,21 +161,35 @@ export class ProjectsResource {
|
|
|
154
161
|
|
|
155
162
|
/**
|
|
156
163
|
* Delete a project
|
|
164
|
+
*
|
|
165
|
+
* A `502` response means the Project was not deleted because its release pull requests could not
|
|
166
|
+
* be retired. Retry deletion to finish retiring the remaining reviews. Repeating a completed
|
|
167
|
+
* deletion returns `404`.
|
|
168
|
+
* See [conditional writes](https://typeship.dev/docs/typeship-api#conditional-writes) for ETag
|
|
169
|
+
* and If-Match.
|
|
157
170
|
* `DELETE /projects/{project_id}`
|
|
158
171
|
*/
|
|
159
172
|
async delete(
|
|
160
173
|
projectId: ProjectId,
|
|
174
|
+
params?: ProjectsDeleteParams,
|
|
161
175
|
options?: RequestOptions,
|
|
162
176
|
): Promise<ApiResult<DeletedProjectRead, ProjectsDeleteError>> {
|
|
163
177
|
return this._core.request<DeletedProjectRead, ProjectsDeleteError>({
|
|
164
178
|
method: "DELETE",
|
|
165
179
|
path: `/projects/${encodeURIComponent(String(projectId))}`,
|
|
166
180
|
security: [{"apiKey":[]}],
|
|
181
|
+
headers: {
|
|
182
|
+
"If-Match": params?.ifMatch === undefined ? undefined : String(params?.ifMatch),
|
|
183
|
+
},
|
|
167
184
|
errors: {
|
|
185
|
+
"400": BadRequestError,
|
|
168
186
|
"401": UnauthorizedError,
|
|
169
187
|
"403": ForbiddenError,
|
|
170
188
|
"404": NotFoundError,
|
|
189
|
+
"412": PreconditionFailedError,
|
|
171
190
|
"429": RateLimitedError,
|
|
191
|
+
"500": InternalServerError,
|
|
192
|
+
"502": BadGatewayError,
|
|
172
193
|
},
|
|
173
194
|
idempotent: true,
|
|
174
195
|
schemaKey: "projects.delete",
|
|
@@ -178,17 +199,34 @@ export class ProjectsResource {
|
|
|
178
199
|
|
|
179
200
|
/**
|
|
180
201
|
* Update a project
|
|
202
|
+
*
|
|
203
|
+
* Omitted fields keep their current values. A supplied config replaces the entire stored object;
|
|
204
|
+
* null or an empty object clears it.
|
|
205
|
+
* Omitting If-Match applies the update to the current resource; with If-Match, a stale ETag
|
|
206
|
+
* returns 412 precondition_failed without saving.
|
|
207
|
+
*
|
|
208
|
+
* A `409 target_busy` means a Target is publishing. Retrieve the Project, wait for publication to
|
|
209
|
+
* finish, reconcile your update, and retry.
|
|
210
|
+
* A `502` response means the Project was saved, but an obsolete release pull request could not be
|
|
211
|
+
* retired. Retrieve the Project and retry the same update to finish retiring reviews if that
|
|
212
|
+
* update is still desired.
|
|
213
|
+
* See [conditional writes](https://typeship.dev/docs/typeship-api#conditional-writes) for ETag
|
|
214
|
+
* and If-Match.
|
|
181
215
|
* `PATCH /projects/{project_id}`
|
|
182
216
|
*/
|
|
183
217
|
async update(
|
|
184
218
|
projectId: ProjectId,
|
|
185
219
|
body: UpdateProjectRequest,
|
|
220
|
+
params?: ProjectsUpdateParams,
|
|
186
221
|
options?: RequestOptions,
|
|
187
222
|
): Promise<ApiResult<ProjectRead, ProjectsUpdateError>> {
|
|
188
223
|
return this._core.request<ProjectRead, ProjectsUpdateError>({
|
|
189
224
|
method: "PATCH",
|
|
190
225
|
path: `/projects/${encodeURIComponent(String(projectId))}`,
|
|
191
226
|
security: [{"apiKey":[]}],
|
|
227
|
+
headers: {
|
|
228
|
+
"If-Match": params?.ifMatch === undefined ? undefined : String(params?.ifMatch),
|
|
229
|
+
},
|
|
192
230
|
body,
|
|
193
231
|
errors: {
|
|
194
232
|
"400": BadRequestError,
|
|
@@ -197,8 +235,10 @@ export class ProjectsResource {
|
|
|
197
235
|
"403": ForbiddenError,
|
|
198
236
|
"404": NotFoundError,
|
|
199
237
|
"409": ConflictError,
|
|
238
|
+
"412": PreconditionFailedError,
|
|
200
239
|
"422": UnprocessableEntityError,
|
|
201
240
|
"429": RateLimitedError,
|
|
241
|
+
"500": InternalServerError,
|
|
202
242
|
"502": BadGatewayError,
|
|
203
243
|
},
|
|
204
244
|
schemaKey: "projects.update",
|
|
@@ -209,10 +249,9 @@ export class ProjectsResource {
|
|
|
209
249
|
/**
|
|
210
250
|
* Analyze a project's latest Definition Revision
|
|
211
251
|
*
|
|
212
|
-
*
|
|
213
|
-
*
|
|
214
|
-
*
|
|
215
|
-
* the change without inventing API behavior.
|
|
252
|
+
* Checks the latest Definition Revision after applying its saved patches. Each finding groups
|
|
253
|
+
* affected locations under a stable rule ID. A suggested patch is included only when the
|
|
254
|
+
* Definition provides enough information to determine the correction.
|
|
216
255
|
* `GET /projects/{project_id}/diagnostics`
|
|
217
256
|
*/
|
|
218
257
|
async retrieveDiagnostics(
|
|
@@ -228,6 +267,7 @@ export class ProjectsResource {
|
|
|
228
267
|
"403": ForbiddenError,
|
|
229
268
|
"404": NotFoundError,
|
|
230
269
|
"429": RateLimitedError,
|
|
270
|
+
"500": InternalServerError,
|
|
231
271
|
},
|
|
232
272
|
idempotent: true,
|
|
233
273
|
schemaKey: "projects.retrieveDiagnostics",
|
|
@@ -238,9 +278,8 @@ export class ProjectsResource {
|
|
|
238
278
|
/**
|
|
239
279
|
* Refresh a project's Diagnostics from its configured source
|
|
240
280
|
*
|
|
241
|
-
* Fetches the
|
|
242
|
-
*
|
|
243
|
-
* generation.
|
|
281
|
+
* Fetches the configured source and returns updated Diagnostics. Creates a Definition Revision
|
|
282
|
+
* only when the content changes. Does not generate Targets or use a metered generation.
|
|
244
283
|
*
|
|
245
284
|
* A `Idempotency-Key` UUID is generated per call (stable across retries) unless you pass one.
|
|
246
285
|
* `POST /projects/{project_id}/diagnostics`
|
|
@@ -258,12 +297,14 @@ export class ProjectsResource {
|
|
|
258
297
|
"Idempotency-Key": params?.idempotencyKey === undefined ? undefined : String(params?.idempotencyKey),
|
|
259
298
|
},
|
|
260
299
|
errors: {
|
|
300
|
+
"400": BadRequestError,
|
|
261
301
|
"401": UnauthorizedError,
|
|
262
302
|
"403": ForbiddenError,
|
|
263
303
|
"404": NotFoundError,
|
|
264
304
|
"409": ConflictError,
|
|
265
305
|
"422": UnprocessableEntityError,
|
|
266
306
|
"429": RateLimitedError,
|
|
307
|
+
"500": InternalServerError,
|
|
267
308
|
},
|
|
268
309
|
idempotencyKey: "Idempotency-Key",
|
|
269
310
|
schemaKey: "projects.refreshDiagnostics",
|
|
@@ -274,9 +315,11 @@ export class ProjectsResource {
|
|
|
274
315
|
/**
|
|
275
316
|
* Apply exact, reviewed diagnostic remediations
|
|
276
317
|
*
|
|
277
|
-
* Applies
|
|
278
|
-
* request
|
|
279
|
-
*
|
|
318
|
+
* Applies reviewed patches from Diagnostics. For a repository source, opens or updates a source
|
|
319
|
+
* pull request. For a URL source, saves Definition patches.
|
|
320
|
+
*
|
|
321
|
+
* Findings that need an API-owner decision return `422`. Read the finding's `authoring_brief` and
|
|
322
|
+
* update the source instead.
|
|
280
323
|
*
|
|
281
324
|
* A `Idempotency-Key` UUID is generated per call (stable across retries) unless you pass one.
|
|
282
325
|
* `POST /projects/{project_id}/diagnostics/remediations`
|
|
@@ -303,6 +346,7 @@ export class ProjectsResource {
|
|
|
303
346
|
"409": ConflictError,
|
|
304
347
|
"422": UnprocessableEntityError,
|
|
305
348
|
"429": RateLimitedError,
|
|
349
|
+
"500": InternalServerError,
|
|
306
350
|
},
|
|
307
351
|
idempotencyKey: "Idempotency-Key",
|
|
308
352
|
schemaKey: "projects.remediateDiagnostics",
|
|
@@ -313,9 +357,8 @@ export class ProjectsResource {
|
|
|
313
357
|
/**
|
|
314
358
|
* Diagnose a project's repository integrations
|
|
315
359
|
*
|
|
316
|
-
*
|
|
317
|
-
*
|
|
318
|
-
* delivery. The Console renders this same result.
|
|
360
|
+
* Checks repository access, Definition readability, source-approval labels, and required checks.
|
|
361
|
+
* Includes the latest webhook delivery so you can investigate missing updates.
|
|
319
362
|
* `GET /projects/{project_id}/integration-health`
|
|
320
363
|
*/
|
|
321
364
|
async retrieveIntegrationHealth(
|
|
@@ -331,6 +374,7 @@ export class ProjectsResource {
|
|
|
331
374
|
"403": ForbiddenError,
|
|
332
375
|
"404": NotFoundError,
|
|
333
376
|
"429": RateLimitedError,
|
|
377
|
+
"500": InternalServerError,
|
|
334
378
|
},
|
|
335
379
|
idempotent: true,
|
|
336
380
|
schemaKey: "projects.retrieveIntegrationHealth",
|
|
@@ -364,6 +408,7 @@ export class ProjectsResource {
|
|
|
364
408
|
"403": ForbiddenError,
|
|
365
409
|
"404": NotFoundError,
|
|
366
410
|
"429": RateLimitedError,
|
|
411
|
+
"500": InternalServerError,
|
|
367
412
|
},
|
|
368
413
|
idempotent: true,
|
|
369
414
|
schemaKey: "projects.listGenerations",
|
|
@@ -379,21 +424,25 @@ export class ProjectsResource {
|
|
|
379
424
|
}
|
|
380
425
|
|
|
381
426
|
/**
|
|
382
|
-
*
|
|
427
|
+
* Start generation for active Targets
|
|
428
|
+
*
|
|
429
|
+
* Queues one Generation per active Target and returns their IDs. Retrieve each Generation until
|
|
430
|
+
* its status moves from `queued` to `running` and then `succeeded` or `failed`. `succeeded` means
|
|
431
|
+
* generated files are saved; check Delivery and Draft status separately for repository delivery
|
|
432
|
+
* and pull requests. A Target already queued or running is returned without starting another
|
|
433
|
+
* Generation. A matching Idempotency-Key replay returns the same Generations with their current
|
|
434
|
+
* statuses.
|
|
383
435
|
*
|
|
384
|
-
*
|
|
385
|
-
*
|
|
386
|
-
*
|
|
387
|
-
* When the complete generated tree already matches a destination, no
|
|
388
|
-
* commit, branch, or pull request is created and that generation reports
|
|
389
|
-
* `pr_status: no_changes`. This is the same pipeline automatic
|
|
390
|
-
* regeneration runs after a source change.
|
|
436
|
+
* If the package already matches a destination and no Draft is open, delivery reports `pr_status:
|
|
437
|
+
* no_changes` without creating a commit, branch, or pull request. An existing Draft stays open.
|
|
438
|
+
* Automatic generation uses the same workflow.
|
|
391
439
|
*
|
|
392
440
|
* A `Idempotency-Key` UUID is generated per call (stable across retries) unless you pass one.
|
|
393
441
|
* `POST /projects/{project_id}/generations`
|
|
394
442
|
*/
|
|
395
443
|
async generate(
|
|
396
444
|
projectId: ProjectId,
|
|
445
|
+
body?: GenerateProjectRequest,
|
|
397
446
|
params?: ProjectsGenerateParams,
|
|
398
447
|
options?: RequestOptions,
|
|
399
448
|
): Promise<ApiResult<GenerationBatchRead, ProjectsGenerateError>> {
|
|
@@ -404,15 +453,19 @@ export class ProjectsResource {
|
|
|
404
453
|
headers: {
|
|
405
454
|
"Idempotency-Key": params?.idempotencyKey === undefined ? undefined : String(params?.idempotencyKey),
|
|
406
455
|
},
|
|
456
|
+
body,
|
|
407
457
|
errors: {
|
|
458
|
+
"400": BadRequestError,
|
|
408
459
|
"401": UnauthorizedError,
|
|
409
460
|
"402": PaymentRequiredError,
|
|
410
461
|
"403": ForbiddenError,
|
|
411
462
|
"404": NotFoundError,
|
|
412
463
|
"409": ConflictError,
|
|
464
|
+
"413": PayloadTooLargeError,
|
|
413
465
|
"422": UnprocessableEntityError,
|
|
414
466
|
"429": RateLimitedError,
|
|
415
467
|
"500": InternalServerError,
|
|
468
|
+
"502": BadGatewayError,
|
|
416
469
|
},
|
|
417
470
|
idempotencyKey: "Idempotency-Key",
|
|
418
471
|
schemaKey: "projects.generate",
|
|
@@ -422,11 +475,18 @@ export class ProjectsResource {
|
|
|
422
475
|
}
|
|
423
476
|
|
|
424
477
|
export interface ProjectsListParams {
|
|
425
|
-
/**
|
|
478
|
+
/**
|
|
479
|
+
* Maximum number of resources to return. Omit for 20; otherwise supply base-10 digits
|
|
480
|
+
* representing an integer from 1 to 100. Empty, malformed, or out-of-range values return 400
|
|
481
|
+
* invalid_request. List query parameters must appear only once; unrecognized parameters also
|
|
482
|
+
* return 400.
|
|
483
|
+
*/
|
|
426
484
|
limit?: number;
|
|
427
485
|
/**
|
|
428
486
|
* Opaque cursor from the preceding page's next_cursor. Valid only for the same account,
|
|
429
|
-
* operation, filters, and ordering that issued it.
|
|
487
|
+
* operation, filters, and ordering that issued it. Omit to start at the first page. Empty,
|
|
488
|
+
* malformed, or repeated cursors return 400 invalid_request. The page limit may change between
|
|
489
|
+
* requests.
|
|
430
490
|
*/
|
|
431
491
|
cursor?: string;
|
|
432
492
|
}
|
|
@@ -437,6 +497,7 @@ export type ProjectsListError =
|
|
|
437
497
|
| UnauthorizedError
|
|
438
498
|
| ForbiddenError
|
|
439
499
|
| RateLimitedError
|
|
500
|
+
| InternalServerError
|
|
440
501
|
| UnexpectedApiError
|
|
441
502
|
| ResponseParseError
|
|
442
503
|
| TransportError
|
|
@@ -446,8 +507,8 @@ export interface ProjectsCreateParams {
|
|
|
446
507
|
/**
|
|
447
508
|
* Identifies one logical write for 24 hours. The key is scoped to the authenticated account and
|
|
448
509
|
* operation; account-less generation uses a hashed network identity. Retrying the same method,
|
|
449
|
-
* path, query, and JSON body replays the original response. Reusing the key with
|
|
450
|
-
* returns 409. After expiry the key starts a new write.
|
|
510
|
+
* path, query, If-Match header, and JSON body replays the original response. Reusing the key with
|
|
511
|
+
* changed intent returns 409. After expiry the key starts a new write.
|
|
451
512
|
*/
|
|
452
513
|
idempotencyKey?: string;
|
|
453
514
|
}
|
|
@@ -473,22 +534,45 @@ export type ProjectsRetrieveError =
|
|
|
473
534
|
| ForbiddenError
|
|
474
535
|
| NotFoundError
|
|
475
536
|
| RateLimitedError
|
|
537
|
+
| InternalServerError
|
|
476
538
|
| UnexpectedApiError
|
|
477
539
|
| ResponseParseError
|
|
478
540
|
| TransportError
|
|
479
541
|
| ValidationError;
|
|
480
542
|
|
|
543
|
+
export interface ProjectsDeleteParams {
|
|
544
|
+
/**
|
|
545
|
+
* ETag from a preceding response. The write applies only if the resource still has that version;
|
|
546
|
+
* otherwise it returns 412 precondition_failed without changes. Omit to write the current
|
|
547
|
+
* version. See https://typeship.dev/docs/typeship-api#conditional-writes.
|
|
548
|
+
*/
|
|
549
|
+
ifMatch?: string;
|
|
550
|
+
}
|
|
551
|
+
|
|
481
552
|
/** Every error `delete` can produce, as a discriminated union. */
|
|
482
553
|
export type ProjectsDeleteError =
|
|
554
|
+
| BadRequestError
|
|
483
555
|
| UnauthorizedError
|
|
484
556
|
| ForbiddenError
|
|
485
557
|
| NotFoundError
|
|
558
|
+
| PreconditionFailedError
|
|
486
559
|
| RateLimitedError
|
|
560
|
+
| InternalServerError
|
|
561
|
+
| BadGatewayError
|
|
487
562
|
| UnexpectedApiError
|
|
488
563
|
| ResponseParseError
|
|
489
564
|
| TransportError
|
|
490
565
|
| ValidationError;
|
|
491
566
|
|
|
567
|
+
export interface ProjectsUpdateParams {
|
|
568
|
+
/**
|
|
569
|
+
* ETag from a preceding response. The write applies only if the resource still has that version;
|
|
570
|
+
* otherwise it returns 412 precondition_failed without changes. Omit to write the current
|
|
571
|
+
* version. See https://typeship.dev/docs/typeship-api#conditional-writes.
|
|
572
|
+
*/
|
|
573
|
+
ifMatch?: string;
|
|
574
|
+
}
|
|
575
|
+
|
|
492
576
|
/** Every error `update` can produce, as a discriminated union. */
|
|
493
577
|
export type ProjectsUpdateError =
|
|
494
578
|
| BadRequestError
|
|
@@ -497,8 +581,10 @@ export type ProjectsUpdateError =
|
|
|
497
581
|
| ForbiddenError
|
|
498
582
|
| NotFoundError
|
|
499
583
|
| ConflictError
|
|
584
|
+
| PreconditionFailedError
|
|
500
585
|
| UnprocessableEntityError
|
|
501
586
|
| RateLimitedError
|
|
587
|
+
| InternalServerError
|
|
502
588
|
| BadGatewayError
|
|
503
589
|
| UnexpectedApiError
|
|
504
590
|
| ResponseParseError
|
|
@@ -511,6 +597,7 @@ export type ProjectsRetrieveDiagnosticsError =
|
|
|
511
597
|
| ForbiddenError
|
|
512
598
|
| NotFoundError
|
|
513
599
|
| RateLimitedError
|
|
600
|
+
| InternalServerError
|
|
514
601
|
| UnexpectedApiError
|
|
515
602
|
| ResponseParseError
|
|
516
603
|
| TransportError
|
|
@@ -520,20 +607,22 @@ export interface ProjectsRefreshDiagnosticsParams {
|
|
|
520
607
|
/**
|
|
521
608
|
* Identifies one logical write for 24 hours. The key is scoped to the authenticated account and
|
|
522
609
|
* operation; account-less generation uses a hashed network identity. Retrying the same method,
|
|
523
|
-
* path, query, and JSON body replays the original response. Reusing the key with
|
|
524
|
-
* returns 409. After expiry the key starts a new write.
|
|
610
|
+
* path, query, If-Match header, and JSON body replays the original response. Reusing the key with
|
|
611
|
+
* changed intent returns 409. After expiry the key starts a new write.
|
|
525
612
|
*/
|
|
526
613
|
idempotencyKey?: string;
|
|
527
614
|
}
|
|
528
615
|
|
|
529
616
|
/** Every error `refreshDiagnostics` can produce, as a discriminated union. */
|
|
530
617
|
export type ProjectsRefreshDiagnosticsError =
|
|
618
|
+
| BadRequestError
|
|
531
619
|
| UnauthorizedError
|
|
532
620
|
| ForbiddenError
|
|
533
621
|
| NotFoundError
|
|
534
622
|
| ConflictError
|
|
535
623
|
| UnprocessableEntityError
|
|
536
624
|
| RateLimitedError
|
|
625
|
+
| InternalServerError
|
|
537
626
|
| UnexpectedApiError
|
|
538
627
|
| ResponseParseError
|
|
539
628
|
| TransportError
|
|
@@ -543,8 +632,8 @@ export interface ProjectsRemediateDiagnosticsParams {
|
|
|
543
632
|
/**
|
|
544
633
|
* Identifies one logical write for 24 hours. The key is scoped to the authenticated account and
|
|
545
634
|
* operation; account-less generation uses a hashed network identity. Retrying the same method,
|
|
546
|
-
* path, query, and JSON body replays the original response. Reusing the key with
|
|
547
|
-
* returns 409. After expiry the key starts a new write.
|
|
635
|
+
* path, query, If-Match header, and JSON body replays the original response. Reusing the key with
|
|
636
|
+
* changed intent returns 409. After expiry the key starts a new write.
|
|
548
637
|
*/
|
|
549
638
|
idempotencyKey?: string;
|
|
550
639
|
}
|
|
@@ -558,6 +647,7 @@ export type ProjectsRemediateDiagnosticsError =
|
|
|
558
647
|
| ConflictError
|
|
559
648
|
| UnprocessableEntityError
|
|
560
649
|
| RateLimitedError
|
|
650
|
+
| InternalServerError
|
|
561
651
|
| UnexpectedApiError
|
|
562
652
|
| ResponseParseError
|
|
563
653
|
| TransportError
|
|
@@ -569,17 +659,25 @@ export type ProjectsRetrieveIntegrationHealthError =
|
|
|
569
659
|
| ForbiddenError
|
|
570
660
|
| NotFoundError
|
|
571
661
|
| RateLimitedError
|
|
662
|
+
| InternalServerError
|
|
572
663
|
| UnexpectedApiError
|
|
573
664
|
| ResponseParseError
|
|
574
665
|
| TransportError
|
|
575
666
|
| ValidationError;
|
|
576
667
|
|
|
577
668
|
export interface ProjectsListGenerationsParams {
|
|
578
|
-
/**
|
|
669
|
+
/**
|
|
670
|
+
* Maximum number of resources to return. Omit for 20; otherwise supply base-10 digits
|
|
671
|
+
* representing an integer from 1 to 100. Empty, malformed, or out-of-range values return 400
|
|
672
|
+
* invalid_request. List query parameters must appear only once; unrecognized parameters also
|
|
673
|
+
* return 400.
|
|
674
|
+
*/
|
|
579
675
|
limit?: number;
|
|
580
676
|
/**
|
|
581
677
|
* Opaque cursor from the preceding page's next_cursor. Valid only for the same account,
|
|
582
|
-
* operation, filters, and ordering that issued it.
|
|
678
|
+
* operation, filters, and ordering that issued it. Omit to start at the first page. Empty,
|
|
679
|
+
* malformed, or repeated cursors return 400 invalid_request. The page limit may change between
|
|
680
|
+
* requests.
|
|
583
681
|
*/
|
|
584
682
|
cursor?: string;
|
|
585
683
|
/** Only generations for this persisted Target. */
|
|
@@ -593,6 +691,7 @@ export type ProjectsListGenerationsError =
|
|
|
593
691
|
| ForbiddenError
|
|
594
692
|
| NotFoundError
|
|
595
693
|
| RateLimitedError
|
|
694
|
+
| InternalServerError
|
|
596
695
|
| UnexpectedApiError
|
|
597
696
|
| ResponseParseError
|
|
598
697
|
| TransportError
|
|
@@ -602,22 +701,25 @@ export interface ProjectsGenerateParams {
|
|
|
602
701
|
/**
|
|
603
702
|
* Identifies one logical write for 24 hours. The key is scoped to the authenticated account and
|
|
604
703
|
* operation; account-less generation uses a hashed network identity. Retrying the same method,
|
|
605
|
-
* path, query, and JSON body replays the original response. Reusing the key with
|
|
606
|
-
* returns 409. After expiry the key starts a new write.
|
|
704
|
+
* path, query, If-Match header, and JSON body replays the original response. Reusing the key with
|
|
705
|
+
* changed intent returns 409. After expiry the key starts a new write.
|
|
607
706
|
*/
|
|
608
707
|
idempotencyKey?: string;
|
|
609
708
|
}
|
|
610
709
|
|
|
611
710
|
/** Every error `generate` can produce, as a discriminated union. */
|
|
612
711
|
export type ProjectsGenerateError =
|
|
712
|
+
| BadRequestError
|
|
613
713
|
| UnauthorizedError
|
|
614
714
|
| PaymentRequiredError
|
|
615
715
|
| ForbiddenError
|
|
616
716
|
| NotFoundError
|
|
617
717
|
| ConflictError
|
|
718
|
+
| PayloadTooLargeError
|
|
618
719
|
| UnprocessableEntityError
|
|
619
720
|
| RateLimitedError
|
|
620
721
|
| InternalServerError
|
|
722
|
+
| BadGatewayError
|
|
621
723
|
| UnexpectedApiError
|
|
622
724
|
| ResponseParseError
|
|
623
725
|
| TransportError
|