@typeship-ax/mcp 0.21.0 → 0.23.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 +54 -0
- package/dist/arguments.d.ts.map +1 -0
- package/dist/arguments.js +265 -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 +36 -0
- package/dist/fields.d.ts.map +1 -0
- package/dist/fields.js +187 -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 +108 -44
- package/dist/mcp-protocol.d.ts.map +1 -1
- package/dist/mcp-protocol.js +780 -484
- package/dist/mcp.d.ts.map +1 -1
- package/dist/mcp.js +129 -29
- 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 +58 -5
- package/dist/ops.d.ts.map +1 -1
- package/dist/ops.js +110 -41
- 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 +89 -5
- package/dist/resources/deliveries.d.ts.map +1 -1
- package/dist/resources/deliveries.js +96 -19
- package/dist/resources/drafts.d.ts +16 -16
- package/dist/resources/drafts.d.ts.map +1 -1
- package/dist/resources/drafts.js +12 -65
- 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 +16 -16
- package/dist/resources/generations.d.ts.map +1 -1
- package/dist/resources/generations.js +23 -47
- 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 +22 -17
- package/dist/resources/releases.d.ts.map +1 -1
- package/dist/resources/releases.js +19 -40
- package/dist/resources/spec-revisions.d.ts +16 -7
- package/dist/resources/spec-revisions.d.ts.map +1 -1
- package/dist/resources/spec-revisions.js +7 -29
- 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 +49 -49
- package/dist/resources/targets.d.ts.map +1 -1
- package/dist/resources/targets.js +59 -115
- 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/type-docs.d.ts +61 -0
- package/dist/type-docs.d.ts.map +1 -0
- package/dist/type-docs.js +174 -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 +254 -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 +167 -0
- package/src/index.ts +45 -28
- package/src/mcp-authorization.ts +29 -9
- package/src/mcp-protocol.ts +808 -435
- package/src/mcp.ts +115 -27
- 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 +146 -45
- package/src/resources/api-keys.ts +34 -48
- package/src/resources/deliveries.ts +213 -32
- package/src/resources/drafts.ts +62 -109
- package/src/resources/files.ts +19 -20
- package/src/resources/generations.ts +61 -79
- 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 +50 -67
- package/src/resources/spec-revisions.ts +40 -49
- package/src/resources/specs.ts +39 -59
- package/src/resources/targets.ts +144 -194
- package/src/schemas.ts +78 -76
- package/src/search.ts +434 -0
- package/src/type-docs.ts +205 -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
package/src/resources/drafts.ts
CHANGED
|
@@ -1,21 +1,20 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Generated by
|
|
1
|
+
// Typeship — drafts 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
|
PreconditionFailedError,
|
|
18
|
-
|
|
17
|
+
ServerError,
|
|
19
18
|
UnauthorizedError,
|
|
20
19
|
UnprocessableEntityError,
|
|
21
20
|
} from "../errors.js";
|
|
@@ -35,6 +34,8 @@ import type {
|
|
|
35
34
|
DraftResponseRead,
|
|
36
35
|
DraftStatus,
|
|
37
36
|
DraftUpdateRequest,
|
|
37
|
+
ErrorModel,
|
|
38
|
+
ErrorModelRead,
|
|
38
39
|
TargetId,
|
|
39
40
|
} from "../types.js";
|
|
40
41
|
|
|
@@ -57,17 +58,9 @@ export class DraftsResource {
|
|
|
57
58
|
query: {
|
|
58
59
|
limit: params?.limit,
|
|
59
60
|
cursor: params?.cursor,
|
|
60
|
-
target_id: params?.
|
|
61
|
+
target_id: params?.target_id,
|
|
61
62
|
status: params?.status,
|
|
62
63
|
},
|
|
63
|
-
errors: {
|
|
64
|
-
"400": BadRequestError,
|
|
65
|
-
"401": UnauthorizedError,
|
|
66
|
-
"403": ForbiddenError,
|
|
67
|
-
"404": NotFoundError,
|
|
68
|
-
"429": RateLimitedError,
|
|
69
|
-
"500": InternalServerError,
|
|
70
|
-
},
|
|
71
64
|
idempotent: true,
|
|
72
65
|
schemaKey: "drafts.list",
|
|
73
66
|
options,
|
|
@@ -85,9 +78,9 @@ export class DraftsResource {
|
|
|
85
78
|
* Get a Draft
|
|
86
79
|
*
|
|
87
80
|
* Returns the Draft's status. An open Draft also reports its typed reason when action is
|
|
88
|
-
* required, next version and its source,
|
|
89
|
-
* carries an `ETag`; send it in `If-Match` when
|
|
90
|
-
* version selection.
|
|
81
|
+
* required, next version and its source, compatibility and version assessment, blocking errors,
|
|
82
|
+
* checks, and conflict counts. The response carries an `ETag`; send it in `If-Match` when
|
|
83
|
+
* updating the Draft to avoid changing a newer version selection.
|
|
91
84
|
* `GET /drafts/{draft_id}`
|
|
92
85
|
*/
|
|
93
86
|
async get(draftId: DraftId, options?: RequestOptions): Promise<DraftResponseRead> {
|
|
@@ -95,13 +88,6 @@ export class DraftsResource {
|
|
|
95
88
|
method: "GET",
|
|
96
89
|
path: `/drafts/${encodeURIComponent(String(draftId))}`,
|
|
97
90
|
security: [{"apiKey":[]}],
|
|
98
|
-
errors: {
|
|
99
|
-
"401": UnauthorizedError,
|
|
100
|
-
"403": ForbiddenError,
|
|
101
|
-
"404": NotFoundError,
|
|
102
|
-
"429": RateLimitedError,
|
|
103
|
-
"500": InternalServerError,
|
|
104
|
-
},
|
|
105
91
|
idempotent: true,
|
|
106
92
|
schemaKey: "drafts.get",
|
|
107
93
|
options,
|
|
@@ -109,7 +95,7 @@ export class DraftsResource {
|
|
|
109
95
|
}
|
|
110
96
|
|
|
111
97
|
/**
|
|
112
|
-
*
|
|
98
|
+
* Update a Draft
|
|
113
99
|
*
|
|
114
100
|
* Checks your version choice against the required version bump, then regenerates the existing
|
|
115
101
|
* Draft pull request.
|
|
@@ -144,25 +130,14 @@ export class DraftsResource {
|
|
|
144
130
|
"If-Match": params?.ifMatch === undefined ? undefined : String(params?.ifMatch),
|
|
145
131
|
},
|
|
146
132
|
body,
|
|
147
|
-
errors: {
|
|
148
|
-
"400": BadRequestError,
|
|
149
|
-
"401": UnauthorizedError,
|
|
150
|
-
"403": ForbiddenError,
|
|
151
|
-
"404": NotFoundError,
|
|
152
|
-
"409": ConflictError,
|
|
153
|
-
"412": PreconditionFailedError,
|
|
154
|
-
"422": UnprocessableEntityError,
|
|
155
|
-
"429": RateLimitedError,
|
|
156
|
-
"500": InternalServerError,
|
|
157
|
-
"502": BadGatewayError,
|
|
158
|
-
},
|
|
133
|
+
errors: { "412": PreconditionFailedError },
|
|
159
134
|
schemaKey: "drafts.update",
|
|
160
135
|
options,
|
|
161
136
|
});
|
|
162
137
|
}
|
|
163
138
|
|
|
164
139
|
/**
|
|
165
|
-
* List
|
|
140
|
+
* List a Draft's files
|
|
166
141
|
*
|
|
167
142
|
* Lists the Draft's files that differ from the last merged package or need a conflict decision,
|
|
168
143
|
* ordered by path, without file content. Each conflict names its kind, the saved decision, and
|
|
@@ -189,15 +164,6 @@ export class DraftsResource {
|
|
|
189
164
|
limit: params?.limit,
|
|
190
165
|
cursor: params?.cursor,
|
|
191
166
|
},
|
|
192
|
-
errors: {
|
|
193
|
-
"400": BadRequestError,
|
|
194
|
-
"401": UnauthorizedError,
|
|
195
|
-
"403": ForbiddenError,
|
|
196
|
-
"404": NotFoundError,
|
|
197
|
-
"409": ConflictError,
|
|
198
|
-
"429": RateLimitedError,
|
|
199
|
-
"500": InternalServerError,
|
|
200
|
-
},
|
|
201
167
|
idempotent: true,
|
|
202
168
|
schemaKey: "drafts.listFiles",
|
|
203
169
|
options,
|
|
@@ -212,7 +178,7 @@ export class DraftsResource {
|
|
|
212
178
|
}
|
|
213
179
|
|
|
214
180
|
/**
|
|
215
|
-
* Resolve
|
|
181
|
+
* Resolve Draft conflicts
|
|
216
182
|
*
|
|
217
183
|
* Resolves conflicts on the Draft's head_sha: keep yours or generated, or supply final content as
|
|
218
184
|
* text or, for binary files, base64. Choosing generated for a customized path replaces it with
|
|
@@ -234,22 +200,13 @@ export class DraftsResource {
|
|
|
234
200
|
path: `/drafts/${encodeURIComponent(String(draftId))}/resolve`,
|
|
235
201
|
security: [{"apiKey":[]}],
|
|
236
202
|
body,
|
|
237
|
-
errors: {
|
|
238
|
-
"400": BadRequestError,
|
|
239
|
-
"401": UnauthorizedError,
|
|
240
|
-
"403": ForbiddenError,
|
|
241
|
-
"404": NotFoundError,
|
|
242
|
-
"409": ConflictError,
|
|
243
|
-
"429": RateLimitedError,
|
|
244
|
-
"500": InternalServerError,
|
|
245
|
-
},
|
|
246
203
|
schemaKey: "drafts.resolve",
|
|
247
204
|
options,
|
|
248
205
|
});
|
|
249
206
|
}
|
|
250
207
|
|
|
251
208
|
/**
|
|
252
|
-
*
|
|
209
|
+
* Recover a Draft's history
|
|
253
210
|
*
|
|
254
211
|
* When the Draft has status `action_required` and reason `history_rewritten`, review affected
|
|
255
212
|
* files with `listDraftFiles` and `filter=history`, then approve with the Draft's
|
|
@@ -269,15 +226,6 @@ export class DraftsResource {
|
|
|
269
226
|
path: `/drafts/${encodeURIComponent(String(draftId))}/recover`,
|
|
270
227
|
security: [{"apiKey":[]}],
|
|
271
228
|
body,
|
|
272
|
-
errors: {
|
|
273
|
-
"400": BadRequestError,
|
|
274
|
-
"401": UnauthorizedError,
|
|
275
|
-
"403": ForbiddenError,
|
|
276
|
-
"404": NotFoundError,
|
|
277
|
-
"409": ConflictError,
|
|
278
|
-
"429": RateLimitedError,
|
|
279
|
-
"500": InternalServerError,
|
|
280
|
-
},
|
|
281
229
|
schemaKey: "drafts.recover",
|
|
282
230
|
options,
|
|
283
231
|
});
|
|
@@ -301,19 +249,20 @@ export interface DraftsListParams {
|
|
|
301
249
|
*/
|
|
302
250
|
cursor?: string;
|
|
303
251
|
/** Only Drafts of this Target. */
|
|
304
|
-
|
|
252
|
+
target_id?: TargetId;
|
|
305
253
|
/** Only Drafts with this status. */
|
|
306
254
|
status?: DraftStatus;
|
|
307
255
|
}
|
|
308
256
|
|
|
309
257
|
/** Typed errors `list` can throw. */
|
|
310
258
|
export type DraftsListError =
|
|
311
|
-
| BadRequestError
|
|
312
|
-
| UnauthorizedError
|
|
313
|
-
| ForbiddenError
|
|
314
|
-
| NotFoundError
|
|
315
|
-
|
|
|
316
|
-
|
|
|
259
|
+
| BadRequestError<ErrorModelRead>
|
|
260
|
+
| UnauthorizedError<ErrorModelRead>
|
|
261
|
+
| ForbiddenError<ErrorModelRead>
|
|
262
|
+
| NotFoundError<ErrorModelRead>
|
|
263
|
+
| RateLimitError<ErrorModelRead>
|
|
264
|
+
| ServerError<ErrorModelRead>
|
|
265
|
+
| RateLimitError
|
|
317
266
|
| UnexpectedApiError
|
|
318
267
|
| ResponseParseError
|
|
319
268
|
| TransportError
|
|
@@ -321,11 +270,12 @@ export type DraftsListError =
|
|
|
321
270
|
|
|
322
271
|
/** Typed errors `get` can throw. */
|
|
323
272
|
export type DraftsGetError =
|
|
324
|
-
| UnauthorizedError
|
|
325
|
-
| ForbiddenError
|
|
326
|
-
| NotFoundError
|
|
327
|
-
|
|
|
328
|
-
|
|
|
273
|
+
| UnauthorizedError<ErrorModelRead>
|
|
274
|
+
| ForbiddenError<ErrorModelRead>
|
|
275
|
+
| NotFoundError<ErrorModelRead>
|
|
276
|
+
| RateLimitError<ErrorModelRead>
|
|
277
|
+
| ServerError<ErrorModelRead>
|
|
278
|
+
| RateLimitError
|
|
329
279
|
| UnexpectedApiError
|
|
330
280
|
| ResponseParseError
|
|
331
281
|
| TransportError
|
|
@@ -342,16 +292,16 @@ export interface DraftsUpdateParams {
|
|
|
342
292
|
|
|
343
293
|
/** Typed errors `update` can throw. */
|
|
344
294
|
export type DraftsUpdateError =
|
|
345
|
-
| BadRequestError
|
|
346
|
-
| UnauthorizedError
|
|
347
|
-
| ForbiddenError
|
|
348
|
-
| NotFoundError
|
|
349
|
-
| ConflictError
|
|
295
|
+
| BadRequestError<ErrorModelRead>
|
|
296
|
+
| UnauthorizedError<ErrorModelRead>
|
|
297
|
+
| ForbiddenError<ErrorModelRead>
|
|
298
|
+
| NotFoundError<ErrorModelRead>
|
|
299
|
+
| ConflictError<ErrorModelRead>
|
|
350
300
|
| PreconditionFailedError
|
|
351
|
-
| UnprocessableEntityError
|
|
352
|
-
|
|
|
353
|
-
|
|
|
354
|
-
|
|
|
301
|
+
| UnprocessableEntityError<ErrorModelRead>
|
|
302
|
+
| RateLimitError<ErrorModelRead>
|
|
303
|
+
| ServerError<ErrorModelRead>
|
|
304
|
+
| RateLimitError
|
|
355
305
|
| UnexpectedApiError
|
|
356
306
|
| ResponseParseError
|
|
357
307
|
| TransportError
|
|
@@ -383,13 +333,14 @@ export interface DraftsListFilesParams {
|
|
|
383
333
|
|
|
384
334
|
/** Typed errors `listFiles` can throw. */
|
|
385
335
|
export type DraftsListFilesError =
|
|
386
|
-
| BadRequestError
|
|
387
|
-
| UnauthorizedError
|
|
388
|
-
| ForbiddenError
|
|
389
|
-
| NotFoundError
|
|
390
|
-
| ConflictError
|
|
391
|
-
|
|
|
392
|
-
|
|
|
336
|
+
| BadRequestError<ErrorModelRead>
|
|
337
|
+
| UnauthorizedError<ErrorModelRead>
|
|
338
|
+
| ForbiddenError<ErrorModelRead>
|
|
339
|
+
| NotFoundError<ErrorModelRead>
|
|
340
|
+
| ConflictError<ErrorModelRead>
|
|
341
|
+
| RateLimitError<ErrorModelRead>
|
|
342
|
+
| ServerError<ErrorModelRead>
|
|
343
|
+
| RateLimitError
|
|
393
344
|
| UnexpectedApiError
|
|
394
345
|
| ResponseParseError
|
|
395
346
|
| TransportError
|
|
@@ -397,13 +348,14 @@ export type DraftsListFilesError =
|
|
|
397
348
|
|
|
398
349
|
/** Typed errors `resolve` can throw. */
|
|
399
350
|
export type DraftsResolveError =
|
|
400
|
-
| BadRequestError
|
|
401
|
-
| UnauthorizedError
|
|
402
|
-
| ForbiddenError
|
|
403
|
-
| NotFoundError
|
|
404
|
-
| ConflictError
|
|
405
|
-
|
|
|
406
|
-
|
|
|
351
|
+
| BadRequestError<ErrorModelRead>
|
|
352
|
+
| UnauthorizedError<ErrorModelRead>
|
|
353
|
+
| ForbiddenError<ErrorModelRead>
|
|
354
|
+
| NotFoundError<ErrorModelRead>
|
|
355
|
+
| ConflictError<ErrorModelRead>
|
|
356
|
+
| RateLimitError<ErrorModelRead>
|
|
357
|
+
| ServerError<ErrorModelRead>
|
|
358
|
+
| RateLimitError
|
|
407
359
|
| UnexpectedApiError
|
|
408
360
|
| ResponseParseError
|
|
409
361
|
| TransportError
|
|
@@ -411,13 +363,14 @@ export type DraftsResolveError =
|
|
|
411
363
|
|
|
412
364
|
/** Typed errors `recover` can throw. */
|
|
413
365
|
export type DraftsRecoverError =
|
|
414
|
-
| BadRequestError
|
|
415
|
-
| UnauthorizedError
|
|
416
|
-
| ForbiddenError
|
|
417
|
-
| NotFoundError
|
|
418
|
-
| ConflictError
|
|
419
|
-
|
|
|
420
|
-
|
|
|
366
|
+
| BadRequestError<ErrorModelRead>
|
|
367
|
+
| UnauthorizedError<ErrorModelRead>
|
|
368
|
+
| ForbiddenError<ErrorModelRead>
|
|
369
|
+
| NotFoundError<ErrorModelRead>
|
|
370
|
+
| ConflictError<ErrorModelRead>
|
|
371
|
+
| RateLimitError<ErrorModelRead>
|
|
372
|
+
| ServerError<ErrorModelRead>
|
|
373
|
+
| RateLimitError
|
|
421
374
|
| UnexpectedApiError
|
|
422
375
|
| ResponseParseError
|
|
423
376
|
| TransportError
|
package/src/resources/files.ts
CHANGED
|
@@ -1,25 +1,31 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Generated by
|
|
1
|
+
// Typeship — files 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
11
|
BadRequestError,
|
|
11
12
|
ForbiddenError,
|
|
12
|
-
InternalServerError,
|
|
13
13
|
NotFoundError,
|
|
14
|
-
|
|
14
|
+
ServerError,
|
|
15
15
|
UnauthorizedError,
|
|
16
16
|
} from "../errors.js";
|
|
17
|
-
import type {
|
|
17
|
+
import type {
|
|
18
|
+
ErrorModel,
|
|
19
|
+
ErrorModelRead,
|
|
20
|
+
FileId,
|
|
21
|
+
FileResponse,
|
|
22
|
+
FileResponseRead,
|
|
23
|
+
} from "../types.js";
|
|
18
24
|
|
|
19
25
|
export class FilesResource {
|
|
20
26
|
constructor(private readonly _core: HttpCore) {}
|
|
21
27
|
/**
|
|
22
|
-
* Get a
|
|
28
|
+
* Get a File
|
|
23
29
|
*
|
|
24
30
|
* Returns one bounded chunk of an immutable file: at most 24 KiB, as UTF-8 text or, for binary
|
|
25
31
|
* bytes, base64. When next_cursor is not null, repeat the request with cursor and concatenate the
|
|
@@ -34,14 +40,6 @@ export class FilesResource {
|
|
|
34
40
|
query: {
|
|
35
41
|
cursor: params?.cursor,
|
|
36
42
|
},
|
|
37
|
-
errors: {
|
|
38
|
-
"400": BadRequestError,
|
|
39
|
-
"401": UnauthorizedError,
|
|
40
|
-
"403": ForbiddenError,
|
|
41
|
-
"404": NotFoundError,
|
|
42
|
-
"429": RateLimitedError,
|
|
43
|
-
"500": InternalServerError,
|
|
44
|
-
},
|
|
45
43
|
idempotent: true,
|
|
46
44
|
schemaKey: "files.get",
|
|
47
45
|
options,
|
|
@@ -56,12 +54,13 @@ export interface FilesGetParams {
|
|
|
56
54
|
|
|
57
55
|
/** Typed errors `get` can throw. */
|
|
58
56
|
export type FilesGetError =
|
|
59
|
-
| BadRequestError
|
|
60
|
-
| UnauthorizedError
|
|
61
|
-
| ForbiddenError
|
|
62
|
-
| NotFoundError
|
|
63
|
-
|
|
|
64
|
-
|
|
|
57
|
+
| BadRequestError<ErrorModelRead>
|
|
58
|
+
| UnauthorizedError<ErrorModelRead>
|
|
59
|
+
| ForbiddenError<ErrorModelRead>
|
|
60
|
+
| NotFoundError<ErrorModelRead>
|
|
61
|
+
| RateLimitError<ErrorModelRead>
|
|
62
|
+
| ServerError<ErrorModelRead>
|
|
63
|
+
| RateLimitError
|
|
65
64
|
| UnexpectedApiError
|
|
66
65
|
| ResponseParseError
|
|
67
66
|
| TransportError
|
|
@@ -1,33 +1,35 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Generated by
|
|
1
|
+
// Typeship — generations 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
|
FileList,
|
|
20
22
|
FileListRead,
|
|
21
23
|
FileModel,
|
|
22
24
|
FileModelRead,
|
|
25
|
+
Generation,
|
|
23
26
|
GenerationId,
|
|
24
27
|
GenerationList,
|
|
25
28
|
GenerationListRead,
|
|
29
|
+
GenerationRead,
|
|
26
30
|
GenerationResponse,
|
|
27
31
|
GenerationResponseRead,
|
|
28
32
|
GenerationStatus,
|
|
29
|
-
GenerationSummary,
|
|
30
|
-
GenerationSummaryRead,
|
|
31
33
|
ProjectId,
|
|
32
34
|
TargetId,
|
|
33
35
|
} from "../types.js";
|
|
@@ -35,7 +37,26 @@ import type {
|
|
|
35
37
|
export class GenerationsResource {
|
|
36
38
|
constructor(private readonly _core: HttpCore) {}
|
|
37
39
|
/**
|
|
38
|
-
*
|
|
40
|
+
* Get a Generation
|
|
41
|
+
*
|
|
42
|
+
* Returns the status of that Generation. `queued` and `running` mean generation is still in
|
|
43
|
+
* progress. `completed` means generated files are saved, not that repository delivery or a Draft
|
|
44
|
+
* is complete. List its files with listGenerationFiles and read each with getFile.
|
|
45
|
+
* `GET /generations/{generation_id}`
|
|
46
|
+
*/
|
|
47
|
+
async get(generationId: GenerationId, options?: RequestOptions): Promise<GenerationResponseRead> {
|
|
48
|
+
return this._core.requestData<GenerationResponseRead, GenerationsGetError>({
|
|
49
|
+
method: "GET",
|
|
50
|
+
path: `/generations/${encodeURIComponent(String(generationId))}`,
|
|
51
|
+
security: [{"apiKey":[]}],
|
|
52
|
+
idempotent: true,
|
|
53
|
+
schemaKey: "generations.get",
|
|
54
|
+
options,
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* List Generations
|
|
39
60
|
*
|
|
40
61
|
* Auto-paginates: `for await (const item of …)` walks every page.
|
|
41
62
|
* `GET /generations`
|
|
@@ -43,26 +64,18 @@ export class GenerationsResource {
|
|
|
43
64
|
list(
|
|
44
65
|
params?: GenerationsListParams,
|
|
45
66
|
options?: RequestOptions,
|
|
46
|
-
): PagePromise<
|
|
47
|
-
return paginate<
|
|
67
|
+
): PagePromise<GenerationRead, GenerationsListError> {
|
|
68
|
+
return paginate<GenerationRead, GenerationsListError>(this._core, {
|
|
48
69
|
method: "GET",
|
|
49
70
|
path: "/generations",
|
|
50
71
|
security: [{"apiKey":[]}],
|
|
51
72
|
query: {
|
|
52
73
|
limit: params?.limit,
|
|
53
74
|
cursor: params?.cursor,
|
|
54
|
-
project_id: params?.
|
|
55
|
-
target_id: params?.
|
|
75
|
+
project_id: params?.project_id,
|
|
76
|
+
target_id: params?.target_id,
|
|
56
77
|
status: params?.status,
|
|
57
78
|
},
|
|
58
|
-
errors: {
|
|
59
|
-
"400": BadRequestError,
|
|
60
|
-
"401": UnauthorizedError,
|
|
61
|
-
"403": ForbiddenError,
|
|
62
|
-
"404": NotFoundError,
|
|
63
|
-
"429": RateLimitedError,
|
|
64
|
-
"500": InternalServerError,
|
|
65
|
-
},
|
|
66
79
|
idempotent: true,
|
|
67
80
|
schemaKey: "generations.list",
|
|
68
81
|
options,
|
|
@@ -76,32 +89,6 @@ export class GenerationsResource {
|
|
|
76
89
|
});
|
|
77
90
|
}
|
|
78
91
|
|
|
79
|
-
/**
|
|
80
|
-
* Get a generation
|
|
81
|
-
*
|
|
82
|
-
* Returns the status of that Generation. `queued` and `running` mean generation is still in
|
|
83
|
-
* progress. `completed` means generated files are saved, not that repository delivery or a Draft
|
|
84
|
-
* is complete. List its files with listGenerationFiles and read each with getFile.
|
|
85
|
-
* `GET /generations/{generation_id}`
|
|
86
|
-
*/
|
|
87
|
-
async get(generationId: GenerationId, options?: RequestOptions): Promise<GenerationResponseRead> {
|
|
88
|
-
return this._core.requestData<GenerationResponseRead, GenerationsGetError>({
|
|
89
|
-
method: "GET",
|
|
90
|
-
path: `/generations/${encodeURIComponent(String(generationId))}`,
|
|
91
|
-
security: [{"apiKey":[]}],
|
|
92
|
-
errors: {
|
|
93
|
-
"401": UnauthorizedError,
|
|
94
|
-
"403": ForbiddenError,
|
|
95
|
-
"404": NotFoundError,
|
|
96
|
-
"429": RateLimitedError,
|
|
97
|
-
"500": InternalServerError,
|
|
98
|
-
},
|
|
99
|
-
idempotent: true,
|
|
100
|
-
schemaKey: "generations.get",
|
|
101
|
-
options,
|
|
102
|
-
});
|
|
103
|
-
}
|
|
104
|
-
|
|
105
92
|
/**
|
|
106
93
|
* List a Generation's files
|
|
107
94
|
*
|
|
@@ -123,14 +110,6 @@ export class GenerationsResource {
|
|
|
123
110
|
limit: params?.limit,
|
|
124
111
|
cursor: params?.cursor,
|
|
125
112
|
},
|
|
126
|
-
errors: {
|
|
127
|
-
"400": BadRequestError,
|
|
128
|
-
"401": UnauthorizedError,
|
|
129
|
-
"403": ForbiddenError,
|
|
130
|
-
"404": NotFoundError,
|
|
131
|
-
"429": RateLimitedError,
|
|
132
|
-
"500": InternalServerError,
|
|
133
|
-
},
|
|
134
113
|
idempotent: true,
|
|
135
114
|
schemaKey: "generations.listFiles",
|
|
136
115
|
options,
|
|
@@ -164,6 +143,19 @@ export class GenerationsResource {
|
|
|
164
143
|
}
|
|
165
144
|
}
|
|
166
145
|
|
|
146
|
+
/** Typed errors `get` can throw. */
|
|
147
|
+
export type GenerationsGetError =
|
|
148
|
+
| UnauthorizedError<ErrorModelRead>
|
|
149
|
+
| ForbiddenError<ErrorModelRead>
|
|
150
|
+
| NotFoundError<ErrorModelRead>
|
|
151
|
+
| RateLimitError<ErrorModelRead>
|
|
152
|
+
| ServerError<ErrorModelRead>
|
|
153
|
+
| RateLimitError
|
|
154
|
+
| UnexpectedApiError
|
|
155
|
+
| ResponseParseError
|
|
156
|
+
| TransportError
|
|
157
|
+
| ValidationError;
|
|
158
|
+
|
|
167
159
|
export interface GenerationsListParams {
|
|
168
160
|
/**
|
|
169
161
|
* Maximum number of resources to return. Omit for 20; otherwise supply base-10 digits
|
|
@@ -181,33 +173,22 @@ export interface GenerationsListParams {
|
|
|
181
173
|
*/
|
|
182
174
|
cursor?: string;
|
|
183
175
|
/** Only Generations in this Project. */
|
|
184
|
-
|
|
176
|
+
project_id?: ProjectId;
|
|
185
177
|
/** Only Generations of this Target. */
|
|
186
|
-
|
|
178
|
+
target_id?: TargetId;
|
|
187
179
|
/** Only Generations with this status. */
|
|
188
180
|
status?: GenerationStatus;
|
|
189
181
|
}
|
|
190
182
|
|
|
191
183
|
/** Typed errors `list` can throw. */
|
|
192
184
|
export type GenerationsListError =
|
|
193
|
-
| BadRequestError
|
|
194
|
-
| UnauthorizedError
|
|
195
|
-
| ForbiddenError
|
|
196
|
-
| NotFoundError
|
|
197
|
-
|
|
|
198
|
-
|
|
|
199
|
-
|
|
|
200
|
-
| ResponseParseError
|
|
201
|
-
| TransportError
|
|
202
|
-
| ValidationError;
|
|
203
|
-
|
|
204
|
-
/** Typed errors `get` can throw. */
|
|
205
|
-
export type GenerationsGetError =
|
|
206
|
-
| UnauthorizedError
|
|
207
|
-
| ForbiddenError
|
|
208
|
-
| NotFoundError
|
|
209
|
-
| RateLimitedError
|
|
210
|
-
| InternalServerError
|
|
185
|
+
| BadRequestError<ErrorModelRead>
|
|
186
|
+
| UnauthorizedError<ErrorModelRead>
|
|
187
|
+
| ForbiddenError<ErrorModelRead>
|
|
188
|
+
| NotFoundError<ErrorModelRead>
|
|
189
|
+
| RateLimitError<ErrorModelRead>
|
|
190
|
+
| ServerError<ErrorModelRead>
|
|
191
|
+
| RateLimitError
|
|
211
192
|
| UnexpectedApiError
|
|
212
193
|
| ResponseParseError
|
|
213
194
|
| TransportError
|
|
@@ -233,12 +214,13 @@ export interface GenerationsListFilesParams {
|
|
|
233
214
|
|
|
234
215
|
/** Typed errors `listFiles` can throw. */
|
|
235
216
|
export type GenerationsListFilesError =
|
|
236
|
-
| BadRequestError
|
|
237
|
-
| UnauthorizedError
|
|
238
|
-
| ForbiddenError
|
|
239
|
-
| NotFoundError
|
|
240
|
-
|
|
|
241
|
-
|
|
|
217
|
+
| BadRequestError<ErrorModelRead>
|
|
218
|
+
| UnauthorizedError<ErrorModelRead>
|
|
219
|
+
| ForbiddenError<ErrorModelRead>
|
|
220
|
+
| NotFoundError<ErrorModelRead>
|
|
221
|
+
| RateLimitError<ErrorModelRead>
|
|
222
|
+
| ServerError<ErrorModelRead>
|
|
223
|
+
| RateLimitError
|
|
242
224
|
| UnexpectedApiError
|
|
243
225
|
| ResponseParseError
|
|
244
226
|
| TransportError
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Generated by
|
|
1
|
+
// Typeship — organization 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
11
|
ForbiddenError,
|
|
11
|
-
|
|
12
|
-
RateLimitedError,
|
|
12
|
+
ServerError,
|
|
13
13
|
UnauthorizedError,
|
|
14
14
|
} from "../errors.js";
|
|
15
|
-
import type { Organization, OrganizationRead } from "../types.js";
|
|
15
|
+
import type { ErrorModel, ErrorModelRead, Organization, OrganizationRead } from "../types.js";
|
|
16
16
|
|
|
17
17
|
export class OrganizationResource {
|
|
18
18
|
constructor(private readonly _core: HttpCore) {}
|
|
19
19
|
/**
|
|
20
|
-
*
|
|
20
|
+
* Get the Organization
|
|
21
21
|
*
|
|
22
22
|
* Returns the organization associated with your credential. The Typeship CLI uses this endpoint
|
|
23
23
|
* for `whoami`.
|
|
@@ -28,12 +28,6 @@ export class OrganizationResource {
|
|
|
28
28
|
method: "GET",
|
|
29
29
|
path: "/organization",
|
|
30
30
|
security: [{"apiKey":[]}],
|
|
31
|
-
errors: {
|
|
32
|
-
"401": UnauthorizedError,
|
|
33
|
-
"403": ForbiddenError,
|
|
34
|
-
"429": RateLimitedError,
|
|
35
|
-
"500": InternalServerError,
|
|
36
|
-
},
|
|
37
31
|
idempotent: true,
|
|
38
32
|
schemaKey: "organization.get",
|
|
39
33
|
options,
|
|
@@ -43,10 +37,11 @@ export class OrganizationResource {
|
|
|
43
37
|
|
|
44
38
|
/** Typed errors `get` can throw. */
|
|
45
39
|
export type OrganizationGetError =
|
|
46
|
-
| UnauthorizedError
|
|
47
|
-
| ForbiddenError
|
|
48
|
-
|
|
|
49
|
-
|
|
|
40
|
+
| UnauthorizedError<ErrorModelRead>
|
|
41
|
+
| ForbiddenError<ErrorModelRead>
|
|
42
|
+
| RateLimitError<ErrorModelRead>
|
|
43
|
+
| ServerError<ErrorModelRead>
|
|
44
|
+
| RateLimitError
|
|
50
45
|
| UnexpectedApiError
|
|
51
46
|
| ResponseParseError
|
|
52
47
|
| TransportError
|