@typeship-ax/mcp 0.10.0 → 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 +4539 -616
- package/api.md +3827 -673
- 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 -35
- 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 +240 -40
- package/dist/resources/targets.d.ts.map +1 -1
- package/dist/resources/targets.js +307 -21
- package/dist/schemas.d.ts.map +1 -1
- package/dist/schemas.js +130 -78
- package/dist/types.d.ts +1969 -154
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +87 -3
- 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 -35
- 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 +561 -27
- package/src/schemas.ts +130 -78
- package/src/types.ts +2105 -154
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// typeship — targets resource.
|
|
2
|
-
// Generated by typeship — https://typeship.dev
|
|
2
|
+
// Generated by typeship — https://typeship.dev
|
|
3
3
|
import { paginate } from "../core/pagination.js";
|
|
4
|
-
import { BadGatewayError, BadRequestError, ConflictError, ForbiddenError, NotFoundError, RateLimitedError, UnauthorizedError, UnprocessableEntityError, } from "../errors.js";
|
|
4
|
+
import { BadGatewayError, BadRequestError, ConflictError, ForbiddenError, InternalServerError, NotFoundError, PaymentRequiredError, PreconditionFailedError, RateLimitedError, UnauthorizedError, UnprocessableEntityError, } from "../errors.js";
|
|
5
5
|
export class TargetsResource {
|
|
6
6
|
_core;
|
|
7
7
|
constructor(_core) {
|
|
@@ -28,6 +28,7 @@ export class TargetsResource {
|
|
|
28
28
|
"403": ForbiddenError,
|
|
29
29
|
"404": NotFoundError,
|
|
30
30
|
"429": RateLimitedError,
|
|
31
|
+
"500": InternalServerError,
|
|
31
32
|
},
|
|
32
33
|
idempotent: true,
|
|
33
34
|
schemaKey: "targets.list",
|
|
@@ -44,8 +45,8 @@ export class TargetsResource {
|
|
|
44
45
|
/**
|
|
45
46
|
* Create an independently configured Target
|
|
46
47
|
*
|
|
47
|
-
*
|
|
48
|
-
*
|
|
48
|
+
* Creates a Target with its own configuration, Deliveries, and release history. Multiple Targets
|
|
49
|
+
* can use the same generator.
|
|
49
50
|
*
|
|
50
51
|
* A `Idempotency-Key` UUID is generated per call (stable across retries) unless you pass one.
|
|
51
52
|
* `POST /projects/{project_id}/targets`
|
|
@@ -62,11 +63,13 @@ export class TargetsResource {
|
|
|
62
63
|
errors: {
|
|
63
64
|
"400": BadRequestError,
|
|
64
65
|
"401": UnauthorizedError,
|
|
66
|
+
"402": PaymentRequiredError,
|
|
65
67
|
"403": ForbiddenError,
|
|
66
68
|
"404": NotFoundError,
|
|
67
69
|
"409": ConflictError,
|
|
68
70
|
"422": UnprocessableEntityError,
|
|
69
71
|
"429": RateLimitedError,
|
|
72
|
+
"500": InternalServerError,
|
|
70
73
|
},
|
|
71
74
|
idempotencyKey: "Idempotency-Key",
|
|
72
75
|
schemaKey: "targets.create",
|
|
@@ -87,6 +90,7 @@ export class TargetsResource {
|
|
|
87
90
|
"403": ForbiddenError,
|
|
88
91
|
"404": NotFoundError,
|
|
89
92
|
"429": RateLimitedError,
|
|
93
|
+
"500": InternalServerError,
|
|
90
94
|
},
|
|
91
95
|
idempotent: true,
|
|
92
96
|
schemaKey: "targets.retrieve",
|
|
@@ -96,21 +100,31 @@ export class TargetsResource {
|
|
|
96
100
|
/**
|
|
97
101
|
* Delete an unused Target
|
|
98
102
|
*
|
|
99
|
-
*
|
|
100
|
-
*
|
|
103
|
+
* Deletes a Target with no Generation history, release history, or active Draft. A `409
|
|
104
|
+
* resource_has_dependencies` means one of those resources still depends on it. Retrieve the
|
|
105
|
+
* Target, disable it instead, or resolve the dependency before retrying.
|
|
106
|
+
*
|
|
107
|
+
* See [conditional writes](https://typeship.dev/docs/typeship-api#conditional-writes) for ETag
|
|
108
|
+
* and If-Match.
|
|
101
109
|
* `DELETE /targets/{target_id}`
|
|
102
110
|
*/
|
|
103
|
-
async delete(targetId, options) {
|
|
111
|
+
async delete(targetId, params, options) {
|
|
104
112
|
return this._core.request({
|
|
105
113
|
method: "DELETE",
|
|
106
114
|
path: `/targets/${encodeURIComponent(String(targetId))}`,
|
|
107
115
|
security: [{ "apiKey": [] }],
|
|
116
|
+
headers: {
|
|
117
|
+
"If-Match": params?.ifMatch === undefined ? undefined : String(params?.ifMatch),
|
|
118
|
+
},
|
|
108
119
|
errors: {
|
|
120
|
+
"400": BadRequestError,
|
|
109
121
|
"401": UnauthorizedError,
|
|
110
122
|
"403": ForbiddenError,
|
|
111
123
|
"404": NotFoundError,
|
|
112
124
|
"409": ConflictError,
|
|
125
|
+
"412": PreconditionFailedError,
|
|
113
126
|
"429": RateLimitedError,
|
|
127
|
+
"500": InternalServerError,
|
|
114
128
|
},
|
|
115
129
|
idempotent: true,
|
|
116
130
|
schemaKey: "targets.delete",
|
|
@@ -119,22 +133,45 @@ export class TargetsResource {
|
|
|
119
133
|
}
|
|
120
134
|
/**
|
|
121
135
|
* Update a Target, its Deliveries, or its next reviewed version
|
|
136
|
+
*
|
|
137
|
+
* Omitted fields keep their current values. Supplied config, checks, and deliveries replace their
|
|
138
|
+
* complete stored values.
|
|
139
|
+
* Omitting If-Match applies the update to the current resource; with If-Match, a stale ETag
|
|
140
|
+
* returns 412 precondition_failed without saving.
|
|
141
|
+
* Send proposed_version by itself; use the Draft endpoint to select a version directly.
|
|
142
|
+
*
|
|
143
|
+
* A `409 target_busy` means the Target is publishing; wait for it to finish. A `409
|
|
144
|
+
* delivery_conflict` means another Target owns the requested repository tree; retrieve both
|
|
145
|
+
* Targets, choose a free destination, and retry.
|
|
146
|
+
* A `502` response means the update was saved, but retiring an obsolete review or regenerating a
|
|
147
|
+
* version selection failed. Retrieve the Target and follow the error's retryable and
|
|
148
|
+
* suggested_action fields. Repeating an unfinished version selection resumes generation;
|
|
149
|
+
* repeating a completed selection starts no new work.
|
|
150
|
+
* See [conditional writes](https://typeship.dev/docs/typeship-api#conditional-writes) for ETag
|
|
151
|
+
* and If-Match.
|
|
122
152
|
* `PATCH /targets/{target_id}`
|
|
123
153
|
*/
|
|
124
|
-
async update(targetId, body, options) {
|
|
154
|
+
async update(targetId, body, params, options) {
|
|
125
155
|
return this._core.request({
|
|
126
156
|
method: "PATCH",
|
|
127
157
|
path: `/targets/${encodeURIComponent(String(targetId))}`,
|
|
128
158
|
security: [{ "apiKey": [] }],
|
|
159
|
+
headers: {
|
|
160
|
+
"If-Match": params?.ifMatch === undefined ? undefined : String(params?.ifMatch),
|
|
161
|
+
},
|
|
129
162
|
body,
|
|
130
163
|
errors: {
|
|
131
164
|
"400": BadRequestError,
|
|
132
165
|
"401": UnauthorizedError,
|
|
166
|
+
"402": PaymentRequiredError,
|
|
133
167
|
"403": ForbiddenError,
|
|
134
168
|
"404": NotFoundError,
|
|
135
169
|
"409": ConflictError,
|
|
170
|
+
"412": PreconditionFailedError,
|
|
136
171
|
"422": UnprocessableEntityError,
|
|
137
172
|
"429": RateLimitedError,
|
|
173
|
+
"500": InternalServerError,
|
|
174
|
+
"502": BadGatewayError,
|
|
138
175
|
},
|
|
139
176
|
schemaKey: "targets.update",
|
|
140
177
|
options,
|
|
@@ -161,6 +198,7 @@ export class TargetsResource {
|
|
|
161
198
|
"403": ForbiddenError,
|
|
162
199
|
"404": NotFoundError,
|
|
163
200
|
"429": RateLimitedError,
|
|
201
|
+
"500": InternalServerError,
|
|
164
202
|
},
|
|
165
203
|
idempotent: true,
|
|
166
204
|
schemaKey: "targets.listReleases",
|
|
@@ -177,8 +215,10 @@ export class TargetsResource {
|
|
|
177
215
|
/**
|
|
178
216
|
* Retrieve a Target's rolling Draft release
|
|
179
217
|
*
|
|
180
|
-
* Returns
|
|
181
|
-
*
|
|
218
|
+
* Returns the Draft's status and its one next step, Current's version, the proposed version,
|
|
219
|
+
* readiness, checks, and conflict counts. Every status is described on `status`. The response
|
|
220
|
+
* carries an `ETag`; send it in `If-Match` when updating the Draft to avoid changing a newer
|
|
221
|
+
* version selection.
|
|
182
222
|
* `GET /targets/{target_id}/draft`
|
|
183
223
|
*/
|
|
184
224
|
async retrieveDraft(targetId, options) {
|
|
@@ -191,6 +231,7 @@ export class TargetsResource {
|
|
|
191
231
|
"403": ForbiddenError,
|
|
192
232
|
"404": NotFoundError,
|
|
193
233
|
"429": RateLimitedError,
|
|
234
|
+
"500": InternalServerError,
|
|
194
235
|
},
|
|
195
236
|
idempotent: true,
|
|
196
237
|
schemaKey: "targets.retrieveDraft",
|
|
@@ -200,15 +241,32 @@ export class TargetsResource {
|
|
|
200
241
|
/**
|
|
201
242
|
* Select an exact Draft version or return to automatic versioning
|
|
202
243
|
*
|
|
203
|
-
*
|
|
244
|
+
* Checks your version choice against the required version bump, then regenerates the existing
|
|
204
245
|
* Draft pull request.
|
|
246
|
+
*
|
|
247
|
+
* Send the Draft's `ETag` in `If-Match` to reject an intervening change with 412
|
|
248
|
+
* precondition_failed before saving or regenerating. Omitting `If-Match` applies the selection to
|
|
249
|
+
* the current Draft. Version is required; null restores automatic selection.
|
|
250
|
+
*
|
|
251
|
+
* A `502` response means the selected version was saved, but regeneration failed. Follow the
|
|
252
|
+
* error's retryable and suggested_action fields. Repeating an unfinished selection resumes
|
|
253
|
+
* generation; repeating a completed selection starts no new work. If using If-Match, retrieve the
|
|
254
|
+
* Draft and confirm the saved selection before retrying with its current ETag.
|
|
255
|
+
* A `409 target_busy` means the Target is publishing; wait and retry. A `409 version_occupied`
|
|
256
|
+
* means the version is already released; retrieve the Draft and releases, choose a new version,
|
|
257
|
+
* and retry.
|
|
258
|
+
* See [conditional writes](https://typeship.dev/docs/typeship-api#conditional-writes) for ETag
|
|
259
|
+
* and If-Match.
|
|
205
260
|
* `PATCH /targets/{target_id}/draft`
|
|
206
261
|
*/
|
|
207
|
-
async updateDraft(targetId, body, options) {
|
|
262
|
+
async updateDraft(targetId, body, params, options) {
|
|
208
263
|
return this._core.request({
|
|
209
264
|
method: "PATCH",
|
|
210
265
|
path: `/targets/${encodeURIComponent(String(targetId))}/draft`,
|
|
211
266
|
security: [{ "apiKey": [] }],
|
|
267
|
+
headers: {
|
|
268
|
+
"If-Match": params?.ifMatch === undefined ? undefined : String(params?.ifMatch),
|
|
269
|
+
},
|
|
212
270
|
body,
|
|
213
271
|
errors: {
|
|
214
272
|
"400": BadRequestError,
|
|
@@ -216,8 +274,11 @@ export class TargetsResource {
|
|
|
216
274
|
"403": ForbiddenError,
|
|
217
275
|
"404": NotFoundError,
|
|
218
276
|
"409": ConflictError,
|
|
277
|
+
"412": PreconditionFailedError,
|
|
219
278
|
"422": UnprocessableEntityError,
|
|
220
279
|
"429": RateLimitedError,
|
|
280
|
+
"500": InternalServerError,
|
|
281
|
+
"502": BadGatewayError,
|
|
221
282
|
},
|
|
222
283
|
schemaKey: "targets.updateDraft",
|
|
223
284
|
options,
|
|
@@ -226,9 +287,9 @@ export class TargetsResource {
|
|
|
226
287
|
/**
|
|
227
288
|
* Adopt a verified existing package as Current
|
|
228
289
|
*
|
|
229
|
-
*
|
|
230
|
-
* Current release
|
|
231
|
-
*
|
|
290
|
+
* Checks the repository tag, package metadata, and registry artifact, then records the package as
|
|
291
|
+
* an Imported Current release. Opens the first Typeship Draft at the next major version; review
|
|
292
|
+
* it to establish the baseline for preserving existing code.
|
|
232
293
|
*
|
|
233
294
|
* A `Idempotency-Key` UUID is generated per call (stable across retries) unless you pass one.
|
|
234
295
|
* `POST /targets/{target_id}/adopt`
|
|
@@ -250,6 +311,7 @@ export class TargetsResource {
|
|
|
250
311
|
"409": ConflictError,
|
|
251
312
|
"422": UnprocessableEntityError,
|
|
252
313
|
"429": RateLimitedError,
|
|
314
|
+
"500": InternalServerError,
|
|
253
315
|
},
|
|
254
316
|
idempotencyKey: "Idempotency-Key",
|
|
255
317
|
schemaKey: "targets.adoptRelease",
|
|
@@ -258,18 +320,19 @@ export class TargetsResource {
|
|
|
258
320
|
}
|
|
259
321
|
/**
|
|
260
322
|
* Retrieve an immutable Target release
|
|
261
|
-
* `GET /
|
|
323
|
+
* `GET /target-releases/{target_release_id}`
|
|
262
324
|
*/
|
|
263
325
|
async retrieveRelease(targetReleaseId, options) {
|
|
264
326
|
return this._core.request({
|
|
265
327
|
method: "GET",
|
|
266
|
-
path: `/
|
|
328
|
+
path: `/target-releases/${encodeURIComponent(String(targetReleaseId))}`,
|
|
267
329
|
security: [{ "apiKey": [] }],
|
|
268
330
|
errors: {
|
|
269
331
|
"401": UnauthorizedError,
|
|
270
332
|
"403": ForbiddenError,
|
|
271
333
|
"404": NotFoundError,
|
|
272
334
|
"429": RateLimitedError,
|
|
335
|
+
"500": InternalServerError,
|
|
273
336
|
},
|
|
274
337
|
idempotent: true,
|
|
275
338
|
schemaKey: "targets.retrieveRelease",
|
|
@@ -279,26 +342,30 @@ export class TargetsResource {
|
|
|
279
342
|
/**
|
|
280
343
|
* Retry publication of an exact Target release
|
|
281
344
|
*
|
|
282
|
-
*
|
|
283
|
-
* commit
|
|
345
|
+
* Retries publication of the specified release through its repository workflow. Uses that
|
|
346
|
+
* release's version and accepted commit, even if a newer Draft or release exists.
|
|
347
|
+
*
|
|
348
|
+
* A `502` response means the repository publication workflow could not be dispatched.
|
|
284
349
|
*
|
|
285
350
|
* A `Idempotency-Key` UUID is generated per call (stable across retries) unless you pass one.
|
|
286
|
-
* `POST /
|
|
351
|
+
* `POST /target-releases/{target_release_id}/republish`
|
|
287
352
|
*/
|
|
288
353
|
async republishRelease(targetReleaseId, params, options) {
|
|
289
354
|
return this._core.request({
|
|
290
355
|
method: "POST",
|
|
291
|
-
path: `/
|
|
356
|
+
path: `/target-releases/${encodeURIComponent(String(targetReleaseId))}/republish`,
|
|
292
357
|
security: [{ "apiKey": [] }],
|
|
293
358
|
headers: {
|
|
294
359
|
"Idempotency-Key": params?.idempotencyKey === undefined ? undefined : String(params?.idempotencyKey),
|
|
295
360
|
},
|
|
296
361
|
errors: {
|
|
362
|
+
"400": BadRequestError,
|
|
297
363
|
"401": UnauthorizedError,
|
|
298
364
|
"403": ForbiddenError,
|
|
299
365
|
"404": NotFoundError,
|
|
300
366
|
"409": ConflictError,
|
|
301
367
|
"429": RateLimitedError,
|
|
368
|
+
"500": InternalServerError,
|
|
302
369
|
"502": BadGatewayError,
|
|
303
370
|
},
|
|
304
371
|
idempotencyKey: "Idempotency-Key",
|
|
@@ -306,4 +373,223 @@ export class TargetsResource {
|
|
|
306
373
|
options,
|
|
307
374
|
});
|
|
308
375
|
}
|
|
376
|
+
/**
|
|
377
|
+
* List customized and conflicted files on a Draft
|
|
378
|
+
*
|
|
379
|
+
* Lists the Draft's files that differ from the last accepted package or need a conflict decision,
|
|
380
|
+
* ordered by path, without file content. Each conflict names its kind, where the incoming version
|
|
381
|
+
* comes from, the saved decision, and the sides you can read with retrieveDraftFileContent. With
|
|
382
|
+
* `filter=history`, lists the files affected by a default-branch history rewrite instead; the
|
|
383
|
+
* list is empty when none is pending.
|
|
384
|
+
*
|
|
385
|
+
* Returns `409 stale_draft` while Typeship has not integrated the Draft's latest commit (Draft
|
|
386
|
+
* status generating or branch_changed), or when the Draft changes between pages.
|
|
387
|
+
*
|
|
388
|
+
* Auto-paginates: `for await (const item of …)` walks every page.
|
|
389
|
+
* `GET /targets/{target_id}/draft/files`
|
|
390
|
+
*/
|
|
391
|
+
listDraftFiles(targetId, params, options) {
|
|
392
|
+
return paginate(this._core, {
|
|
393
|
+
method: "GET",
|
|
394
|
+
path: `/targets/${encodeURIComponent(String(targetId))}/draft/files`,
|
|
395
|
+
security: [{ "apiKey": [] }],
|
|
396
|
+
query: {
|
|
397
|
+
filter: params?.filter,
|
|
398
|
+
limit: params?.limit,
|
|
399
|
+
cursor: params?.cursor,
|
|
400
|
+
},
|
|
401
|
+
errors: {
|
|
402
|
+
"400": BadRequestError,
|
|
403
|
+
"401": UnauthorizedError,
|
|
404
|
+
"403": ForbiddenError,
|
|
405
|
+
"404": NotFoundError,
|
|
406
|
+
"409": ConflictError,
|
|
407
|
+
"429": RateLimitedError,
|
|
408
|
+
"500": InternalServerError,
|
|
409
|
+
},
|
|
410
|
+
idempotent: true,
|
|
411
|
+
schemaKey: "targets.listDraftFiles",
|
|
412
|
+
options,
|
|
413
|
+
}, {
|
|
414
|
+
style: "cursor",
|
|
415
|
+
itemsField: "data",
|
|
416
|
+
cursorParam: "cursor",
|
|
417
|
+
nextCursorField: "next_cursor",
|
|
418
|
+
hasMoreField: "has_more",
|
|
419
|
+
limitParam: "limit",
|
|
420
|
+
});
|
|
421
|
+
}
|
|
422
|
+
/**
|
|
423
|
+
* Read one side of a Draft file
|
|
424
|
+
*
|
|
425
|
+
* Returns up to 24 KiB of one side of a conflicted or history-affected file: text as UTF-8,
|
|
426
|
+
* binary content as base64. Follow `next_cursor` with the same path and side to read the rest,
|
|
427
|
+
* and concatenate the chunks in order. A side where the file is absent returns 404.
|
|
428
|
+
* `GET /targets/{target_id}/draft/files/content`
|
|
429
|
+
*/
|
|
430
|
+
async retrieveDraftFileContent(targetId, params, options) {
|
|
431
|
+
return this._core.request({
|
|
432
|
+
method: "GET",
|
|
433
|
+
path: `/targets/${encodeURIComponent(String(targetId))}/draft/files/content`,
|
|
434
|
+
security: [{ "apiKey": [] }],
|
|
435
|
+
query: {
|
|
436
|
+
path: params.path,
|
|
437
|
+
side: params.side,
|
|
438
|
+
cursor: params.cursor,
|
|
439
|
+
},
|
|
440
|
+
errors: {
|
|
441
|
+
"400": BadRequestError,
|
|
442
|
+
"401": UnauthorizedError,
|
|
443
|
+
"403": ForbiddenError,
|
|
444
|
+
"404": NotFoundError,
|
|
445
|
+
"409": ConflictError,
|
|
446
|
+
"429": RateLimitedError,
|
|
447
|
+
"500": InternalServerError,
|
|
448
|
+
},
|
|
449
|
+
idempotent: true,
|
|
450
|
+
schemaKey: "targets.retrieveDraftFileContent",
|
|
451
|
+
options,
|
|
452
|
+
});
|
|
453
|
+
}
|
|
454
|
+
/**
|
|
455
|
+
* Resolve selected Draft conflicts
|
|
456
|
+
*
|
|
457
|
+
* Saves decisions for conflicts on the Draft's head_revision: keep the repository or incoming
|
|
458
|
+
* version, or supply the final content as text or, for binary files, base64. Decisions save
|
|
459
|
+
* together or not at all, and a decision can be replaced until it is applied. Use `dry_run` to
|
|
460
|
+
* validate them first.
|
|
461
|
+
*
|
|
462
|
+
* Saving changes no files. When every conflict has a decision, `remaining_conflicts` is 0 and the
|
|
463
|
+
* Draft status becomes `needs_generation`: generate the Target to apply the decisions and run its
|
|
464
|
+
* checks. Applying them can report conflicts from the next merge stage.
|
|
465
|
+
* `POST /targets/{target_id}/draft/conflicts/resolve`
|
|
466
|
+
*/
|
|
467
|
+
async resolveDraftConflicts(targetId, body, options) {
|
|
468
|
+
return this._core.request({
|
|
469
|
+
method: "POST",
|
|
470
|
+
path: `/targets/${encodeURIComponent(String(targetId))}/draft/conflicts/resolve`,
|
|
471
|
+
security: [{ "apiKey": [] }],
|
|
472
|
+
body,
|
|
473
|
+
errors: {
|
|
474
|
+
"400": BadRequestError,
|
|
475
|
+
"401": UnauthorizedError,
|
|
476
|
+
"403": ForbiddenError,
|
|
477
|
+
"404": NotFoundError,
|
|
478
|
+
"409": ConflictError,
|
|
479
|
+
"429": RateLimitedError,
|
|
480
|
+
"500": InternalServerError,
|
|
481
|
+
},
|
|
482
|
+
schemaKey: "targets.resolveDraftConflicts",
|
|
483
|
+
options,
|
|
484
|
+
});
|
|
485
|
+
}
|
|
486
|
+
/**
|
|
487
|
+
* Discard selected Draft customizations
|
|
488
|
+
*
|
|
489
|
+
* Replaces the listed customized paths that are not conflicts with the generated files, in one
|
|
490
|
+
* commit on the Draft branch. A listed file that exists only on the Draft is deleted. Use
|
|
491
|
+
* `dry_run` to see the planned writes and deletions first. Resolve conflicts with
|
|
492
|
+
* resolveDraftConflicts.
|
|
493
|
+
*
|
|
494
|
+
* After the commit, the Draft status is `branch_changed` until Typeship integrates it from the
|
|
495
|
+
* repository's pull request event and reruns the checks; you do not need to generate the Target.
|
|
496
|
+
* `POST /targets/{target_id}/draft/customizations/discard`
|
|
497
|
+
*/
|
|
498
|
+
async discardDraftCustomizations(targetId, body, options) {
|
|
499
|
+
return this._core.request({
|
|
500
|
+
method: "POST",
|
|
501
|
+
path: `/targets/${encodeURIComponent(String(targetId))}/draft/customizations/discard`,
|
|
502
|
+
security: [{ "apiKey": [] }],
|
|
503
|
+
body,
|
|
504
|
+
errors: {
|
|
505
|
+
"400": BadRequestError,
|
|
506
|
+
"401": UnauthorizedError,
|
|
507
|
+
"403": ForbiddenError,
|
|
508
|
+
"404": NotFoundError,
|
|
509
|
+
"409": ConflictError,
|
|
510
|
+
"429": RateLimitedError,
|
|
511
|
+
"500": InternalServerError,
|
|
512
|
+
},
|
|
513
|
+
schemaKey: "targets.discardDraftCustomizations",
|
|
514
|
+
options,
|
|
515
|
+
});
|
|
516
|
+
}
|
|
517
|
+
/**
|
|
518
|
+
* Approve recovery from rewritten default-branch history
|
|
519
|
+
*
|
|
520
|
+
* When the Draft status is `history_rewritten`, review the affected files with `listDraftFiles`
|
|
521
|
+
* and `filter=history`, then approve with the Draft's `history_recovery` revisions. Approval
|
|
522
|
+
* saves the recovery without changing Git, and the Draft status becomes `needs_generation`:
|
|
523
|
+
* generate the Target to open a new Draft from the rewritten default branch. The previous Draft
|
|
524
|
+
* branch stays available, and overlapping code comes back as conflicts to resolve. A rewritten
|
|
525
|
+
* Draft branch alone needs no approval.
|
|
526
|
+
* `POST /targets/{target_id}/draft/history/recover`
|
|
527
|
+
*/
|
|
528
|
+
async recoverDraftHistory(targetId, body, options) {
|
|
529
|
+
return this._core.request({
|
|
530
|
+
method: "POST",
|
|
531
|
+
path: `/targets/${encodeURIComponent(String(targetId))}/draft/history/recover`,
|
|
532
|
+
security: [{ "apiKey": [] }],
|
|
533
|
+
body,
|
|
534
|
+
errors: {
|
|
535
|
+
"400": BadRequestError,
|
|
536
|
+
"401": UnauthorizedError,
|
|
537
|
+
"403": ForbiddenError,
|
|
538
|
+
"404": NotFoundError,
|
|
539
|
+
"409": ConflictError,
|
|
540
|
+
"429": RateLimitedError,
|
|
541
|
+
"500": InternalServerError,
|
|
542
|
+
},
|
|
543
|
+
schemaKey: "targets.recoverDraftHistory",
|
|
544
|
+
options,
|
|
545
|
+
});
|
|
546
|
+
}
|
|
547
|
+
/**
|
|
548
|
+
* Retrieve a Delivery
|
|
549
|
+
*
|
|
550
|
+
* Returns the configured repository or hosted MCP Delivery for a Target. A Delivery in another
|
|
551
|
+
* organization returns 404 not_found.
|
|
552
|
+
* `GET /deliveries/{delivery_id}`
|
|
553
|
+
*/
|
|
554
|
+
async retrieveDelivery(deliveryId, options) {
|
|
555
|
+
return this._core.request({
|
|
556
|
+
method: "GET",
|
|
557
|
+
path: `/deliveries/${encodeURIComponent(String(deliveryId))}`,
|
|
558
|
+
security: [{ "apiKey": [] }],
|
|
559
|
+
errors: {
|
|
560
|
+
"401": UnauthorizedError,
|
|
561
|
+
"403": ForbiddenError,
|
|
562
|
+
"404": NotFoundError,
|
|
563
|
+
"429": RateLimitedError,
|
|
564
|
+
"500": InternalServerError,
|
|
565
|
+
},
|
|
566
|
+
idempotent: true,
|
|
567
|
+
schemaKey: "targets.retrieveDelivery",
|
|
568
|
+
options,
|
|
569
|
+
});
|
|
570
|
+
}
|
|
571
|
+
/**
|
|
572
|
+
* Retrieve a Publication
|
|
573
|
+
*
|
|
574
|
+
* Returns the current registry publication state for a Target Release. A Publication in another
|
|
575
|
+
* organization returns 404 not_found.
|
|
576
|
+
* `GET /publications/{publication_id}`
|
|
577
|
+
*/
|
|
578
|
+
async retrievePublication(publicationId, options) {
|
|
579
|
+
return this._core.request({
|
|
580
|
+
method: "GET",
|
|
581
|
+
path: `/publications/${encodeURIComponent(String(publicationId))}`,
|
|
582
|
+
security: [{ "apiKey": [] }],
|
|
583
|
+
errors: {
|
|
584
|
+
"401": UnauthorizedError,
|
|
585
|
+
"403": ForbiddenError,
|
|
586
|
+
"404": NotFoundError,
|
|
587
|
+
"429": RateLimitedError,
|
|
588
|
+
"500": InternalServerError,
|
|
589
|
+
},
|
|
590
|
+
idempotent: true,
|
|
591
|
+
schemaKey: "targets.retrievePublication",
|
|
592
|
+
options,
|
|
593
|
+
});
|
|
594
|
+
}
|
|
309
595
|
}
|
package/dist/schemas.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../src/schemas.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE;IAAE,GAAG,CAAC,EAAE,OAAO,CAAC;IAAC,GAAG,CAAC,EAAE,OAAO,CAAA;CAAE,
|
|
1
|
+
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../src/schemas.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE;IAAE,GAAG,CAAC,EAAE,OAAO,CAAC;IAAC,GAAG,CAAC,EAAE,OAAO,CAAA;CAAE,CA6CpE,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CA6KxC,CAAC"}
|