@typeship-ax/mcp 0.19.0 → 0.20.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 +3 -3
- package/README.md +1 -1
- package/api.json +7440 -6316
- package/api.md +7856 -6638
- package/dist/api-identity.d.ts.map +1 -1
- package/dist/api-identity.js +6 -1
- package/dist/core/http.d.ts +26 -14
- package/dist/core/http.d.ts.map +1 -1
- package/dist/core/http.js +90 -19
- package/dist/core/pagination.d.ts +8 -8
- package/dist/core/pagination.d.ts.map +1 -1
- package/dist/core/pagination.js +7 -16
- package/dist/errors.d.ts +4 -4
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +7 -7
- package/dist/index.d.ts +33 -19
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +37 -17
- package/dist/mcp-protocol.js +2 -2
- package/dist/mcp.d.ts.map +1 -1
- package/dist/mcp.js +6 -5
- package/dist/ops.d.ts +1 -1
- package/dist/ops.d.ts.map +1 -1
- package/dist/ops.js +39 -42
- package/dist/resources/api-keys.d.ts +10 -10
- package/dist/resources/api-keys.d.ts.map +1 -1
- package/dist/resources/api-keys.js +6 -6
- package/dist/resources/deliveries.d.ts +46 -0
- package/dist/resources/deliveries.d.ts.map +1 -0
- package/dist/resources/deliveries.js +70 -0
- package/dist/resources/drafts.d.ts +155 -0
- package/dist/resources/drafts.d.ts.map +1 -0
- package/dist/resources/drafts.js +230 -0
- package/dist/resources/files.d.ts +23 -0
- package/dist/resources/files.d.ts.map +1 -0
- package/dist/resources/files.js +38 -0
- package/dist/resources/generate.d.ts +14 -14
- package/dist/resources/generate.d.ts.map +1 -1
- package/dist/resources/generate.js +7 -7
- package/dist/resources/generations.d.ts +65 -21
- package/dist/resources/generations.d.ts.map +1 -1
- package/dist/resources/generations.js +67 -20
- package/dist/resources/organization.d.ts +18 -0
- package/dist/resources/organization.d.ts.map +1 -0
- package/dist/resources/{account.js → organization.js} +10 -10
- package/dist/resources/projects.d.ts +36 -126
- package/dist/resources/projects.d.ts.map +1 -1
- package/dist/resources/projects.js +21 -171
- package/dist/resources/publications.d.ts +46 -0
- package/dist/resources/publications.d.ts.map +1 -0
- package/dist/resources/publications.js +70 -0
- package/dist/resources/releases.d.ts +66 -0
- package/dist/resources/releases.d.ts.map +1 -0
- package/dist/resources/releases.js +101 -0
- package/dist/resources/spec-revisions.d.ts +85 -0
- package/dist/resources/spec-revisions.d.ts.map +1 -0
- package/dist/resources/spec-revisions.js +116 -0
- package/dist/resources/specs.d.ts +72 -0
- package/dist/resources/specs.d.ts.map +1 -0
- package/dist/resources/specs.js +107 -0
- package/dist/resources/targets.d.ts +42 -262
- package/dist/resources/targets.d.ts.map +1 -1
- package/dist/resources/targets.js +28 -407
- package/dist/schemas.d.ts.map +1 -1
- package/dist/schemas.js +143 -149
- package/dist/types.d.ts +1281 -1611
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +44 -49
- package/package.json +1 -1
- package/server.json +2 -2
- package/src/api-identity.ts +6 -2
- package/src/core/http.ts +89 -24
- package/src/core/pagination.ts +13 -23
- package/src/errors.ts +7 -7
- package/src/index.ts +41 -23
- package/src/mcp-protocol.ts +2 -2
- package/src/mcp.ts +7 -6
- package/src/ops.ts +40 -43
- package/src/resources/api-keys.ts +13 -16
- package/src/resources/deliveries.ts +139 -0
- package/src/resources/drafts.ts +422 -0
- package/src/resources/files.ts +68 -0
- package/src/resources/generate.ts +16 -19
- package/src/resources/generations.ts +146 -35
- package/src/resources/{account.ts → organization.ts} +14 -14
- package/src/resources/projects.ts +42 -337
- package/src/resources/publications.ts +139 -0
- package/src/resources/releases.ts +199 -0
- package/src/resources/spec-revisions.ts +237 -0
- package/src/resources/specs.ts +200 -0
- package/src/resources/targets.ts +57 -760
- package/src/schemas.ts +143 -149
- package/src/types.ts +1357 -1692
- package/dist/resources/account.d.ts +0 -18
- package/dist/resources/account.d.ts.map +0 -1
- package/dist/resources/definition-revisions.d.ts +0 -75
- package/dist/resources/definition-revisions.d.ts.map +0 -1
- package/dist/resources/definition-revisions.js +0 -142
- package/dist/resources/definitions.d.ts +0 -50
- package/dist/resources/definitions.d.ts.map +0 -1
- package/dist/resources/definitions.js +0 -73
- package/src/resources/definition-revisions.ts +0 -265
- package/src/resources/definitions.ts +0 -146
|
@@ -8,19 +8,20 @@ export class TargetsResource {
|
|
|
8
8
|
this._core = _core;
|
|
9
9
|
}
|
|
10
10
|
/**
|
|
11
|
-
* List
|
|
11
|
+
* List Targets
|
|
12
12
|
*
|
|
13
13
|
* Auto-paginates: `for await (const item of …)` walks every page.
|
|
14
|
-
* `GET /
|
|
14
|
+
* `GET /targets`
|
|
15
15
|
*/
|
|
16
|
-
list(
|
|
16
|
+
list(params, options) {
|
|
17
17
|
return paginate(this._core, {
|
|
18
18
|
method: "GET",
|
|
19
|
-
path:
|
|
19
|
+
path: "/targets",
|
|
20
20
|
security: [{ "apiKey": [] }],
|
|
21
21
|
query: {
|
|
22
22
|
limit: params?.limit,
|
|
23
23
|
cursor: params?.cursor,
|
|
24
|
+
project_id: params?.projectId,
|
|
24
25
|
},
|
|
25
26
|
errors: {
|
|
26
27
|
"400": BadRequestError,
|
|
@@ -49,12 +50,12 @@ export class TargetsResource {
|
|
|
49
50
|
* can use the same generator.
|
|
50
51
|
*
|
|
51
52
|
* A `Idempotency-Key` UUID is generated per call (stable across retries) unless you pass one.
|
|
52
|
-
* `POST /
|
|
53
|
+
* `POST /targets`
|
|
53
54
|
*/
|
|
54
|
-
async create(
|
|
55
|
-
return this._core.
|
|
55
|
+
async create(body, params, options) {
|
|
56
|
+
return this._core.requestData({
|
|
56
57
|
method: "POST",
|
|
57
|
-
path:
|
|
58
|
+
path: "/targets",
|
|
58
59
|
security: [{ "apiKey": [] }],
|
|
59
60
|
headers: {
|
|
60
61
|
"Idempotency-Key": params?.idempotencyKey === undefined ? undefined : String(params?.idempotencyKey),
|
|
@@ -77,11 +78,11 @@ export class TargetsResource {
|
|
|
77
78
|
});
|
|
78
79
|
}
|
|
79
80
|
/**
|
|
80
|
-
*
|
|
81
|
+
* Get a Target
|
|
81
82
|
* `GET /targets/{target_id}`
|
|
82
83
|
*/
|
|
83
|
-
async
|
|
84
|
-
return this._core.
|
|
84
|
+
async get(targetId, options) {
|
|
85
|
+
return this._core.requestData({
|
|
85
86
|
method: "GET",
|
|
86
87
|
path: `/targets/${encodeURIComponent(String(targetId))}`,
|
|
87
88
|
security: [{ "apiKey": [] }],
|
|
@@ -93,7 +94,7 @@ export class TargetsResource {
|
|
|
93
94
|
"500": InternalServerError,
|
|
94
95
|
},
|
|
95
96
|
idempotent: true,
|
|
96
|
-
schemaKey: "targets.
|
|
97
|
+
schemaKey: "targets.get",
|
|
97
98
|
options,
|
|
98
99
|
});
|
|
99
100
|
}
|
|
@@ -109,7 +110,7 @@ export class TargetsResource {
|
|
|
109
110
|
* `DELETE /targets/{target_id}`
|
|
110
111
|
*/
|
|
111
112
|
async delete(targetId, params, options) {
|
|
112
|
-
return this._core.
|
|
113
|
+
return this._core.requestData({
|
|
113
114
|
method: "DELETE",
|
|
114
115
|
path: `/targets/${encodeURIComponent(String(targetId))}`,
|
|
115
116
|
security: [{ "apiKey": [] }],
|
|
@@ -132,27 +133,28 @@ export class TargetsResource {
|
|
|
132
133
|
});
|
|
133
134
|
}
|
|
134
135
|
/**
|
|
135
|
-
* Update a Target
|
|
136
|
+
* Update a Target or its Deliveries
|
|
136
137
|
*
|
|
137
138
|
* Omitted fields keep their current values. Supplied config, checks, and deliveries replace their
|
|
138
139
|
* complete stored values.
|
|
140
|
+
* With Project auto_generate enabled, changing Target config, checks, or Deliveries queues that
|
|
141
|
+
* Target's Generation. A queued or running Target reuses that Generation.
|
|
139
142
|
* Omitting If-Match applies the update to the current resource; with If-Match, a stale ETag
|
|
140
143
|
* returns 412 precondition_failed without saving.
|
|
141
|
-
*
|
|
144
|
+
* Select the next version through PATCH /drafts/{draft_id} on the Target's draft_id.
|
|
142
145
|
*
|
|
143
146
|
* A `409 target_busy` means the Target is publishing; wait for it to finish. A `409
|
|
144
147
|
* delivery_conflict` means another Target owns the requested repository tree; retrieve both
|
|
145
148
|
* Targets, choose a free destination, and retry.
|
|
146
|
-
* A `502` response means the update was saved, but retiring an obsolete review or regenerating
|
|
147
|
-
*
|
|
148
|
-
*
|
|
149
|
-
* repeating a completed selection starts no new work.
|
|
149
|
+
* A `502` response means the update was saved, but retiring an obsolete review or regenerating
|
|
150
|
+
* the Target failed. Retrieve the Target and follow the error's retryable and suggested_action
|
|
151
|
+
* fields.
|
|
150
152
|
* See [conditional writes](https://typeship.dev/docs/typeship-api#conditional-writes) for ETag
|
|
151
153
|
* and If-Match.
|
|
152
154
|
* `PATCH /targets/{target_id}`
|
|
153
155
|
*/
|
|
154
156
|
async update(targetId, body, params, options) {
|
|
155
|
-
return this._core.
|
|
157
|
+
return this._core.requestData({
|
|
156
158
|
method: "PATCH",
|
|
157
159
|
path: `/targets/${encodeURIComponent(String(targetId))}`,
|
|
158
160
|
security: [{ "apiKey": [] }],
|
|
@@ -178,124 +180,17 @@ export class TargetsResource {
|
|
|
178
180
|
});
|
|
179
181
|
}
|
|
180
182
|
/**
|
|
181
|
-
*
|
|
182
|
-
*
|
|
183
|
-
* Auto-paginates: `for await (const item of …)` walks every page.
|
|
184
|
-
* `GET /targets/{target_id}/releases`
|
|
185
|
-
*/
|
|
186
|
-
listReleases(targetId, params, options) {
|
|
187
|
-
return paginate(this._core, {
|
|
188
|
-
method: "GET",
|
|
189
|
-
path: `/targets/${encodeURIComponent(String(targetId))}/releases`,
|
|
190
|
-
security: [{ "apiKey": [] }],
|
|
191
|
-
query: {
|
|
192
|
-
limit: params?.limit,
|
|
193
|
-
cursor: params?.cursor,
|
|
194
|
-
},
|
|
195
|
-
errors: {
|
|
196
|
-
"400": BadRequestError,
|
|
197
|
-
"401": UnauthorizedError,
|
|
198
|
-
"403": ForbiddenError,
|
|
199
|
-
"404": NotFoundError,
|
|
200
|
-
"429": RateLimitedError,
|
|
201
|
-
"500": InternalServerError,
|
|
202
|
-
},
|
|
203
|
-
idempotent: true,
|
|
204
|
-
schemaKey: "targets.listReleases",
|
|
205
|
-
options,
|
|
206
|
-
}, {
|
|
207
|
-
style: "cursor",
|
|
208
|
-
itemsField: "data",
|
|
209
|
-
cursorParam: "cursor",
|
|
210
|
-
nextCursorField: "next_cursor",
|
|
211
|
-
hasMoreField: "has_more",
|
|
212
|
-
limitParam: "limit",
|
|
213
|
-
});
|
|
214
|
-
}
|
|
215
|
-
/**
|
|
216
|
-
* Retrieve a Target's rolling Draft release
|
|
217
|
-
*
|
|
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.
|
|
222
|
-
* `GET /targets/{target_id}/draft`
|
|
223
|
-
*/
|
|
224
|
-
async retrieveDraft(targetId, options) {
|
|
225
|
-
return this._core.request({
|
|
226
|
-
method: "GET",
|
|
227
|
-
path: `/targets/${encodeURIComponent(String(targetId))}/draft`,
|
|
228
|
-
security: [{ "apiKey": [] }],
|
|
229
|
-
errors: {
|
|
230
|
-
"401": UnauthorizedError,
|
|
231
|
-
"403": ForbiddenError,
|
|
232
|
-
"404": NotFoundError,
|
|
233
|
-
"429": RateLimitedError,
|
|
234
|
-
"500": InternalServerError,
|
|
235
|
-
},
|
|
236
|
-
idempotent: true,
|
|
237
|
-
schemaKey: "targets.retrieveDraft",
|
|
238
|
-
options,
|
|
239
|
-
});
|
|
240
|
-
}
|
|
241
|
-
/**
|
|
242
|
-
* Select an exact Draft version or return to automatic versioning
|
|
243
|
-
*
|
|
244
|
-
* Checks your version choice against the required version bump, then regenerates the existing
|
|
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.
|
|
260
|
-
* `PATCH /targets/{target_id}/draft`
|
|
261
|
-
*/
|
|
262
|
-
async updateDraft(targetId, body, params, options) {
|
|
263
|
-
return this._core.request({
|
|
264
|
-
method: "PATCH",
|
|
265
|
-
path: `/targets/${encodeURIComponent(String(targetId))}/draft`,
|
|
266
|
-
security: [{ "apiKey": [] }],
|
|
267
|
-
headers: {
|
|
268
|
-
"If-Match": params?.ifMatch === undefined ? undefined : String(params?.ifMatch),
|
|
269
|
-
},
|
|
270
|
-
body,
|
|
271
|
-
errors: {
|
|
272
|
-
"400": BadRequestError,
|
|
273
|
-
"401": UnauthorizedError,
|
|
274
|
-
"403": ForbiddenError,
|
|
275
|
-
"404": NotFoundError,
|
|
276
|
-
"409": ConflictError,
|
|
277
|
-
"412": PreconditionFailedError,
|
|
278
|
-
"422": UnprocessableEntityError,
|
|
279
|
-
"429": RateLimitedError,
|
|
280
|
-
"500": InternalServerError,
|
|
281
|
-
"502": BadGatewayError,
|
|
282
|
-
},
|
|
283
|
-
schemaKey: "targets.updateDraft",
|
|
284
|
-
options,
|
|
285
|
-
});
|
|
286
|
-
}
|
|
287
|
-
/**
|
|
288
|
-
* Adopt a verified existing package as Current
|
|
183
|
+
* Adopt a verified existing package as the latest release
|
|
289
184
|
*
|
|
290
185
|
* Checks the repository tag, package metadata, and registry artifact, then records the package as
|
|
291
|
-
* an Imported
|
|
292
|
-
*
|
|
186
|
+
* an Imported latest release. Opens the first Typeship Draft at the next major version; review it
|
|
187
|
+
* to establish the baseline for preserving existing code.
|
|
293
188
|
*
|
|
294
189
|
* A `Idempotency-Key` UUID is generated per call (stable across retries) unless you pass one.
|
|
295
190
|
* `POST /targets/{target_id}/adopt`
|
|
296
191
|
*/
|
|
297
|
-
async
|
|
298
|
-
return this._core.
|
|
192
|
+
async adopt(targetId, body, params, options) {
|
|
193
|
+
return this._core.requestData({
|
|
299
194
|
method: "POST",
|
|
300
195
|
path: `/targets/${encodeURIComponent(String(targetId))}/adopt`,
|
|
301
196
|
security: [{ "apiKey": [] }],
|
|
@@ -314,281 +209,7 @@ export class TargetsResource {
|
|
|
314
209
|
"500": InternalServerError,
|
|
315
210
|
},
|
|
316
211
|
idempotencyKey: "Idempotency-Key",
|
|
317
|
-
schemaKey: "targets.
|
|
318
|
-
options,
|
|
319
|
-
});
|
|
320
|
-
}
|
|
321
|
-
/**
|
|
322
|
-
* Retrieve an immutable Target release
|
|
323
|
-
* `GET /target-releases/{target_release_id}`
|
|
324
|
-
*/
|
|
325
|
-
async retrieveRelease(targetReleaseId, options) {
|
|
326
|
-
return this._core.request({
|
|
327
|
-
method: "GET",
|
|
328
|
-
path: `/target-releases/${encodeURIComponent(String(targetReleaseId))}`,
|
|
329
|
-
security: [{ "apiKey": [] }],
|
|
330
|
-
errors: {
|
|
331
|
-
"401": UnauthorizedError,
|
|
332
|
-
"403": ForbiddenError,
|
|
333
|
-
"404": NotFoundError,
|
|
334
|
-
"429": RateLimitedError,
|
|
335
|
-
"500": InternalServerError,
|
|
336
|
-
},
|
|
337
|
-
idempotent: true,
|
|
338
|
-
schemaKey: "targets.retrieveRelease",
|
|
339
|
-
options,
|
|
340
|
-
});
|
|
341
|
-
}
|
|
342
|
-
/**
|
|
343
|
-
* Retry publication of an exact Target release
|
|
344
|
-
*
|
|
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.
|
|
349
|
-
*
|
|
350
|
-
* A `Idempotency-Key` UUID is generated per call (stable across retries) unless you pass one.
|
|
351
|
-
* `POST /target-releases/{target_release_id}/republish`
|
|
352
|
-
*/
|
|
353
|
-
async republishRelease(targetReleaseId, params, options) {
|
|
354
|
-
return this._core.request({
|
|
355
|
-
method: "POST",
|
|
356
|
-
path: `/target-releases/${encodeURIComponent(String(targetReleaseId))}/republish`,
|
|
357
|
-
security: [{ "apiKey": [] }],
|
|
358
|
-
headers: {
|
|
359
|
-
"Idempotency-Key": params?.idempotencyKey === undefined ? undefined : String(params?.idempotencyKey),
|
|
360
|
-
},
|
|
361
|
-
errors: {
|
|
362
|
-
"400": BadRequestError,
|
|
363
|
-
"401": UnauthorizedError,
|
|
364
|
-
"403": ForbiddenError,
|
|
365
|
-
"404": NotFoundError,
|
|
366
|
-
"409": ConflictError,
|
|
367
|
-
"429": RateLimitedError,
|
|
368
|
-
"500": InternalServerError,
|
|
369
|
-
"502": BadGatewayError,
|
|
370
|
-
},
|
|
371
|
-
idempotencyKey: "Idempotency-Key",
|
|
372
|
-
schemaKey: "targets.republishRelease",
|
|
373
|
-
options,
|
|
374
|
-
});
|
|
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",
|
|
212
|
+
schemaKey: "targets.adopt",
|
|
592
213
|
options,
|
|
593
214
|
});
|
|
594
215
|
}
|
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,CA0CpE,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CA0KxC,CAAC"}
|