@typeship-ax/mcp 0.6.0 → 0.8.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/README.md +1 -1
- package/api.json +5597 -3010
- package/api.md +433 -54
- package/dist/core/http.d.ts +6 -92
- package/dist/core/http.d.ts.map +1 -1
- package/dist/core/http.js +70 -209
- package/dist/core/pagination.d.ts.map +1 -1
- package/dist/core/pagination.js +6 -34
- package/dist/dates.d.ts +0 -2
- package/dist/dates.d.ts.map +1 -1
- package/dist/dates.js +0 -1
- package/dist/docs.d.ts +11 -0
- package/dist/docs.d.ts.map +1 -0
- package/dist/docs.js +114 -0
- package/dist/errors.d.ts +27 -27
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +7 -7
- package/dist/index.d.ts +19 -11
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +23 -13
- package/dist/mcp-protocol.d.ts +19 -24
- package/dist/mcp-protocol.d.ts.map +1 -1
- package/dist/mcp-protocol.js +160 -124
- package/dist/mcp.js +16 -19
- package/dist/ops.d.ts +5 -0
- package/dist/ops.d.ts.map +1 -1
- package/dist/ops.js +31 -17
- package/dist/resources/account.d.ts +2 -2
- package/dist/resources/account.d.ts.map +1 -1
- package/dist/resources/api-keys.d.ts +10 -5
- package/dist/resources/api-keys.d.ts.map +1 -1
- package/dist/resources/api-keys.js +3 -1
- package/dist/resources/definition-revisions.d.ts +58 -0
- package/dist/resources/definition-revisions.d.ts.map +1 -0
- package/dist/resources/definition-revisions.js +110 -0
- package/dist/resources/definitions.d.ts +24 -0
- package/dist/resources/definitions.d.ts.map +1 -0
- package/dist/resources/definitions.js +51 -0
- package/dist/resources/generate.d.ts +5 -5
- package/dist/resources/generate.d.ts.map +1 -1
- package/dist/resources/generate.js +3 -3
- package/dist/resources/generations.d.ts +3 -3
- package/dist/resources/generations.d.ts.map +1 -1
- package/dist/resources/generations.js +1 -1
- package/dist/resources/projects.d.ts +66 -26
- package/dist/resources/projects.d.ts.map +1 -1
- package/dist/resources/projects.js +87 -13
- package/dist/resources/targets.d.ts +86 -0
- package/dist/resources/targets.d.ts.map +1 -0
- package/dist/resources/targets.js +184 -0
- package/dist/schemas.d.ts.map +1 -1
- package/dist/schemas.js +119 -62
- package/dist/types.d.ts +1761 -222
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +9 -3
- package/package.json +1 -1
- package/src/core/http.ts +75 -293
- package/src/core/pagination.ts +6 -30
- package/src/dates.ts +0 -1
- package/src/docs.ts +101 -0
- package/src/errors.ts +30 -30
- package/src/index.ts +23 -13
- package/src/mcp-protocol.ts +170 -120
- package/src/mcp.ts +22 -22
- package/src/ops.ts +43 -17
- package/src/resources/account.ts +3 -3
- package/src/resources/api-keys.ts +22 -7
- package/src/resources/definition-revisions.ts +198 -0
- package/src/resources/definitions.ts +97 -0
- package/src/resources/generate.ts +6 -6
- package/src/resources/generations.ts +4 -4
- package/src/resources/projects.ts +182 -37
- package/src/resources/targets.ts +346 -0
- package/src/schemas.ts +119 -62
- package/src/types.ts +1947 -281
- package/dist/resources/spec-revisions.d.ts +0 -47
- package/dist/resources/spec-revisions.d.ts.map +0 -1
- package/dist/resources/spec-revisions.js +0 -90
- package/src/resources/spec-revisions.ts +0 -150
package/api.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# typeship — API reference
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
API version 1.0.0. Package version 0.8.0. Generated by typeship; regenerate rather than editing.
|
|
4
4
|
|
|
5
5
|
All methods return `ApiResult<T, E>`: check `result.ok`, or `unwrap(result)` to throw typed errors.
|
|
6
6
|
|
|
@@ -10,7 +10,7 @@ For complete input and output schemas, use [`api.json`](./api.json), the machine
|
|
|
10
10
|
|
|
11
11
|
### `client.generate.run(body)`
|
|
12
12
|
|
|
13
|
-
Generate
|
|
13
|
+
Generate one Target from a Definition
|
|
14
14
|
|
|
15
15
|
`POST /generate`
|
|
16
16
|
|
|
@@ -18,9 +18,9 @@ Stateless generation: nothing is stored. Returns the full generated
|
|
|
18
18
|
package as files. Works without an API key: anonymous calls generate
|
|
19
19
|
the first 25 operations, rate limited per IP address, and the
|
|
20
20
|
response's `limits` object says what was held back and where to lift
|
|
21
|
-
it; anonymous calls from a
|
|
21
|
+
it; anonymous calls from a Definition URL also carry `claim.url`, a link
|
|
22
22
|
that turns the run into a project once a person signs in. With a key, the free plan generates the first 25 operations and
|
|
23
|
-
paid plans generate the
|
|
23
|
+
paid plans generate the complete Definition. A present but invalid key is a
|
|
24
24
|
401, not a downgrade to anonymous.
|
|
25
25
|
|
|
26
26
|
Safety: **write** · Authentication: **optional**
|
|
@@ -35,12 +35,12 @@ Errors: `BadRequestError` (400), `UnauthorizedError` (401), `ForbiddenError` (40
|
|
|
35
35
|
|
|
36
36
|
```json
|
|
37
37
|
{
|
|
38
|
-
"
|
|
38
|
+
"definition": {
|
|
39
39
|
"url": "https://example.com"
|
|
40
40
|
},
|
|
41
|
-
"
|
|
42
|
-
"typescript-sdk"
|
|
43
|
-
|
|
41
|
+
"target": {
|
|
42
|
+
"generator": "typescript-sdk"
|
|
43
|
+
}
|
|
44
44
|
}
|
|
45
45
|
```
|
|
46
46
|
|
|
@@ -59,9 +59,9 @@ Safety: **read** · Authentication: **required**
|
|
|
59
59
|
| Parameter | In | Type | Required | Description |
|
|
60
60
|
| --- | --- | --- | --- | --- |
|
|
61
61
|
| `limit` | query | `number` | no | Maximum number of resources to return. |
|
|
62
|
-
| `cursor` | query | `string` | no | Opaque cursor from the preceding page's next_cursor. |
|
|
62
|
+
| `cursor` | query | `string` | no | Opaque cursor from the preceding page's next_cursor. Valid only for the same account, operation, filters, and ordering that issued it. |
|
|
63
63
|
|
|
64
|
-
Returns: `PagePromise<
|
|
64
|
+
Returns: `PagePromise<ProjectSummary>` — auto-paginating (`for await` walks every page)
|
|
65
65
|
Errors: `BadRequestError` (400), `UnauthorizedError` (401), `ForbiddenError` (403), `RateLimitedError` (429)
|
|
66
66
|
|
|
67
67
|
<details>
|
|
@@ -79,7 +79,7 @@ Create a project
|
|
|
79
79
|
|
|
80
80
|
`POST /projects`
|
|
81
81
|
|
|
82
|
-
Stores a URL- or GitHub-sourced project. Free includes one stored project, every selected
|
|
82
|
+
Stores a URL- or GitHub-sourced project. Free includes one stored project, every selected target, and the first 25 operations, while keeping manual and automatic regeneration, history, destination pull requests, and preview checks. Stateless POST /generate does not consume this slot. Pro adds projects and generates every operation in the Definition.
|
|
83
83
|
|
|
84
84
|
Safety: **write** · Authentication: **required**
|
|
85
85
|
|
|
@@ -90,7 +90,7 @@ Safety: **write** · Authentication: **required**
|
|
|
90
90
|
Body: `CreateProjectRequest` (required)
|
|
91
91
|
|
|
92
92
|
Returns: `Project`
|
|
93
|
-
Errors: `BadRequestError` (400), `UnauthorizedError` (401), `PaymentRequiredError` (402), `ForbiddenError` (403), `ConflictError` (409), `RateLimitedError` (429), `InternalServerError` (500)
|
|
93
|
+
Errors: `BadRequestError` (400), `UnauthorizedError` (401), `PaymentRequiredError` (402), `ForbiddenError` (403), `ConflictError` (409), `UnprocessableEntityError` (422), `RateLimitedError` (429), `InternalServerError` (500)
|
|
94
94
|
|
|
95
95
|
<details>
|
|
96
96
|
<summary>Wire arguments (CLI and MCP)</summary>
|
|
@@ -98,12 +98,17 @@ Errors: `BadRequestError` (400), `UnauthorizedError` (401), `PaymentRequiredErro
|
|
|
98
98
|
```json
|
|
99
99
|
{
|
|
100
100
|
"name": "example",
|
|
101
|
-
"
|
|
102
|
-
"
|
|
103
|
-
|
|
101
|
+
"definition": {
|
|
102
|
+
"source": {
|
|
103
|
+
"kind": "url",
|
|
104
|
+
"url": "https://example.com"
|
|
105
|
+
}
|
|
104
106
|
},
|
|
105
|
-
"
|
|
106
|
-
|
|
107
|
+
"targets": [
|
|
108
|
+
{
|
|
109
|
+
"name": "example",
|
|
110
|
+
"generator": "typescript-sdk"
|
|
111
|
+
}
|
|
107
112
|
]
|
|
108
113
|
}
|
|
109
114
|
```
|
|
@@ -177,7 +182,7 @@ Safety: **write** · Authentication: **required**
|
|
|
177
182
|
Body: `UpdateProjectRequest` (required)
|
|
178
183
|
|
|
179
184
|
Returns: `Project`
|
|
180
|
-
Errors: `BadRequestError` (400), `UnauthorizedError` (401), `PaymentRequiredError` (402), `ForbiddenError` (403), `NotFoundError` (404), `RateLimitedError` (429)
|
|
185
|
+
Errors: `BadRequestError` (400), `UnauthorizedError` (401), `PaymentRequiredError` (402), `ForbiddenError` (403), `NotFoundError` (404), `UnprocessableEntityError` (422), `RateLimitedError` (429)
|
|
181
186
|
|
|
182
187
|
<details>
|
|
183
188
|
<summary>Wire arguments (CLI and MCP)</summary>
|
|
@@ -190,13 +195,13 @@ Errors: `BadRequestError` (400), `UnauthorizedError` (401), `PaymentRequiredErro
|
|
|
190
195
|
|
|
191
196
|
</details>
|
|
192
197
|
|
|
193
|
-
### `client.projects.
|
|
198
|
+
### `client.projects.retrieveDiagnostics(projectId)`
|
|
194
199
|
|
|
195
|
-
|
|
200
|
+
Analyze a project's latest Definition Revision
|
|
196
201
|
|
|
197
|
-
`GET /projects/{project_id}/
|
|
202
|
+
`GET /projects/{project_id}/diagnostics`
|
|
198
203
|
|
|
199
|
-
|
|
204
|
+
Runs deterministic OpenAPI or GraphQL authorship checks against the latest observed immutable Definition Revision after applying the Definition's existing patches. Diagnostics group every affected location under a stable rule. Exact patches are included only when Typeship can derive the change without inventing API behavior.
|
|
200
205
|
|
|
201
206
|
Safety: **read** · Authentication: **required**
|
|
202
207
|
|
|
@@ -204,7 +209,96 @@ Safety: **read** · Authentication: **required**
|
|
|
204
209
|
| --- | --- | --- | --- | --- |
|
|
205
210
|
| `projectId` | path | `ProjectId` | yes | — |
|
|
206
211
|
|
|
207
|
-
Returns: `
|
|
212
|
+
Returns: `DiagnosticReport`
|
|
213
|
+
Errors: `UnauthorizedError` (401), `ForbiddenError` (403), `NotFoundError` (404), `RateLimitedError` (429)
|
|
214
|
+
|
|
215
|
+
<details>
|
|
216
|
+
<summary>Wire arguments (CLI and MCP)</summary>
|
|
217
|
+
|
|
218
|
+
```json
|
|
219
|
+
{
|
|
220
|
+
"project_id": "prj_4f8k2m7x9q1v6b3n"
|
|
221
|
+
}
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
</details>
|
|
225
|
+
|
|
226
|
+
### `client.projects.refreshDiagnostics(projectId)`
|
|
227
|
+
|
|
228
|
+
Refresh a project's Diagnostics from its configured source
|
|
229
|
+
|
|
230
|
+
`POST /projects/{project_id}/diagnostics`
|
|
231
|
+
|
|
232
|
+
Fetches the complete configured source, records a new immutable revision only when content changed, and returns its Diagnostics. This does not generate targets or consume a metered generation.
|
|
233
|
+
|
|
234
|
+
Safety: **write** · Authentication: **required**
|
|
235
|
+
|
|
236
|
+
| Parameter | In | Type | Required | Description |
|
|
237
|
+
| --- | --- | --- | --- | --- |
|
|
238
|
+
| `projectId` | path | `ProjectId` | yes | — |
|
|
239
|
+
|
|
240
|
+
Returns: `DiagnosticReport`
|
|
241
|
+
Errors: `UnauthorizedError` (401), `ForbiddenError` (403), `NotFoundError` (404), `UnprocessableEntityError` (422), `RateLimitedError` (429)
|
|
242
|
+
|
|
243
|
+
<details>
|
|
244
|
+
<summary>Wire arguments (CLI and MCP)</summary>
|
|
245
|
+
|
|
246
|
+
```json
|
|
247
|
+
{
|
|
248
|
+
"project_id": "prj_4f8k2m7x9q1v6b3n"
|
|
249
|
+
}
|
|
250
|
+
```
|
|
251
|
+
|
|
252
|
+
</details>
|
|
253
|
+
|
|
254
|
+
### `client.projects.remediateDiagnostics(projectId, body)`
|
|
255
|
+
|
|
256
|
+
Apply exact, reviewed diagnostic remediations
|
|
257
|
+
|
|
258
|
+
`POST /projects/{project_id}/diagnostics/remediations`
|
|
259
|
+
|
|
260
|
+
Applies only deterministic patches. Repository sources receive an updateable source pull request; URL sources receive project overlays. Diagnostics that require API-owner intent return 422 and include an authoring_brief in the Diagnostic instead.
|
|
261
|
+
|
|
262
|
+
Safety: **write** · Authentication: **required**
|
|
263
|
+
|
|
264
|
+
| Parameter | In | Type | Required | Description |
|
|
265
|
+
| --- | --- | --- | --- | --- |
|
|
266
|
+
| `projectId` | path | `ProjectId` | yes | — |
|
|
267
|
+
|
|
268
|
+
Body: `DiagnosticRemediationRequest` (required)
|
|
269
|
+
|
|
270
|
+
Returns: `DiagnosticRemediation`
|
|
271
|
+
Errors: `BadRequestError` (400), `UnauthorizedError` (401), `ForbiddenError` (403), `NotFoundError` (404), `UnprocessableEntityError` (422), `RateLimitedError` (429)
|
|
272
|
+
|
|
273
|
+
<details>
|
|
274
|
+
<summary>Wire arguments (CLI and MCP)</summary>
|
|
275
|
+
|
|
276
|
+
```json
|
|
277
|
+
{
|
|
278
|
+
"project_id": "prj_4f8k2m7x9q1v6b3n",
|
|
279
|
+
"diagnostic_ids": [
|
|
280
|
+
"value"
|
|
281
|
+
]
|
|
282
|
+
}
|
|
283
|
+
```
|
|
284
|
+
|
|
285
|
+
</details>
|
|
286
|
+
|
|
287
|
+
### `client.projects.retrieveIntegrationHealth(projectId)`
|
|
288
|
+
|
|
289
|
+
Diagnose a project's repository integrations
|
|
290
|
+
|
|
291
|
+
`GET /projects/{project_id}/integration-health`
|
|
292
|
+
|
|
293
|
+
Returns provider-neutral, machine-actionable source and destination access, Definition readability, source-approval label setup, required status names, and the latest durable webhook delivery. The Console renders this same result.
|
|
294
|
+
|
|
295
|
+
Safety: **read** · Authentication: **required**
|
|
296
|
+
|
|
297
|
+
| Parameter | In | Type | Required | Description |
|
|
298
|
+
| --- | --- | --- | --- | --- |
|
|
299
|
+
| `projectId` | path | `ProjectId` | yes | — |
|
|
300
|
+
|
|
301
|
+
Returns: `RepositoryIntegrationHealth`
|
|
208
302
|
Errors: `UnauthorizedError` (401), `ForbiddenError` (403), `NotFoundError` (404), `RateLimitedError` (429)
|
|
209
303
|
|
|
210
304
|
<details>
|
|
@@ -230,8 +324,8 @@ Safety: **read** · Authentication: **required**
|
|
|
230
324
|
| --- | --- | --- | --- | --- |
|
|
231
325
|
| `projectId` | path | `ProjectId` | yes | — |
|
|
232
326
|
| `limit` | query | `number` | no | Maximum number of resources to return. |
|
|
233
|
-
| `cursor` | query | `string` | no | Opaque cursor from the preceding page's next_cursor. |
|
|
234
|
-
| `
|
|
327
|
+
| `cursor` | query | `string` | no | Opaque cursor from the preceding page's next_cursor. Valid only for the same account, operation, filters, and ordering that issued it. |
|
|
328
|
+
| `targetId` | query | `TargetId` | no | Only generations for this persisted Target. |
|
|
235
329
|
|
|
236
330
|
Returns: `PagePromise<Generation>` — auto-paginating (`for await` walks every page)
|
|
237
331
|
Errors: `BadRequestError` (400), `UnauthorizedError` (401), `ForbiddenError` (403), `NotFoundError` (404), `RateLimitedError` (429)
|
|
@@ -249,11 +343,11 @@ Errors: `BadRequestError` (400), `UnauthorizedError` (401), `ForbiddenError` (40
|
|
|
249
343
|
|
|
250
344
|
### `client.projects.generate(projectId)`
|
|
251
345
|
|
|
252
|
-
Generate
|
|
346
|
+
Generate targets and open pull requests
|
|
253
347
|
|
|
254
348
|
`POST /projects/{project_id}/generations`
|
|
255
349
|
|
|
256
|
-
Resolves the project's URL or
|
|
350
|
+
Resolves the project's URL or GitHub source, generates every
|
|
257
351
|
configured delivery package, stores each result in the project's history,
|
|
258
352
|
and attempts to open a pull request in every configured destination.
|
|
259
353
|
When the complete generated tree already matches a destination, no
|
|
@@ -281,6 +375,263 @@ Errors: `UnauthorizedError` (401), `PaymentRequiredError` (402), `ForbiddenError
|
|
|
281
375
|
|
|
282
376
|
</details>
|
|
283
377
|
|
|
378
|
+
## definitions
|
|
379
|
+
|
|
380
|
+
### `client.definitions.retrieve(definitionId)`
|
|
381
|
+
|
|
382
|
+
Retrieve a Definition
|
|
383
|
+
|
|
384
|
+
`GET /definitions/{definition_id}`
|
|
385
|
+
|
|
386
|
+
Safety: **read** · Authentication: **required**
|
|
387
|
+
|
|
388
|
+
| Parameter | In | Type | Required | Description |
|
|
389
|
+
| --- | --- | --- | --- | --- |
|
|
390
|
+
| `definitionId` | path | `DefinitionId` | yes | — |
|
|
391
|
+
|
|
392
|
+
Returns: `Definition`
|
|
393
|
+
Errors: `UnauthorizedError` (401), `ForbiddenError` (403), `NotFoundError` (404), `RateLimitedError` (429)
|
|
394
|
+
|
|
395
|
+
<details>
|
|
396
|
+
<summary>Wire arguments (CLI and MCP)</summary>
|
|
397
|
+
|
|
398
|
+
```json
|
|
399
|
+
{
|
|
400
|
+
"definition_id": "def_2p8m4q7k1v9d6h3c"
|
|
401
|
+
}
|
|
402
|
+
```
|
|
403
|
+
|
|
404
|
+
</details>
|
|
405
|
+
|
|
406
|
+
### `client.definitions.update(definitionId, body)`
|
|
407
|
+
|
|
408
|
+
Update and resolve a Definition
|
|
409
|
+
|
|
410
|
+
`PATCH /definitions/{definition_id}`
|
|
411
|
+
|
|
412
|
+
Resolves the complete document graph and records a new immutable revision before saving.
|
|
413
|
+
|
|
414
|
+
Safety: **write** · Authentication: **required**
|
|
415
|
+
|
|
416
|
+
| Parameter | In | Type | Required | Description |
|
|
417
|
+
| --- | --- | --- | --- | --- |
|
|
418
|
+
| `definitionId` | path | `DefinitionId` | yes | — |
|
|
419
|
+
|
|
420
|
+
Body: `DefinitionUpdateRequest` (required)
|
|
421
|
+
|
|
422
|
+
Returns: `Definition`
|
|
423
|
+
Errors: `BadRequestError` (400), `UnauthorizedError` (401), `ForbiddenError` (403), `NotFoundError` (404), `UnprocessableEntityError` (422), `RateLimitedError` (429)
|
|
424
|
+
|
|
425
|
+
<details>
|
|
426
|
+
<summary>Wire arguments (CLI and MCP)</summary>
|
|
427
|
+
|
|
428
|
+
```json
|
|
429
|
+
{
|
|
430
|
+
"definition_id": "def_2p8m4q7k1v9d6h3c"
|
|
431
|
+
}
|
|
432
|
+
```
|
|
433
|
+
|
|
434
|
+
</details>
|
|
435
|
+
|
|
436
|
+
## targets
|
|
437
|
+
|
|
438
|
+
### `client.targets.list(projectId, params)`
|
|
439
|
+
|
|
440
|
+
List a project's Targets
|
|
441
|
+
|
|
442
|
+
`GET /projects/{project_id}/targets`
|
|
443
|
+
|
|
444
|
+
Safety: **read** · Authentication: **required**
|
|
445
|
+
|
|
446
|
+
| Parameter | In | Type | Required | Description |
|
|
447
|
+
| --- | --- | --- | --- | --- |
|
|
448
|
+
| `projectId` | path | `ProjectId` | yes | — |
|
|
449
|
+
| `limit` | query | `number` | no | Maximum number of resources to return. |
|
|
450
|
+
| `cursor` | query | `string` | no | Opaque cursor from the preceding page's next_cursor. Valid only for the same account, operation, filters, and ordering that issued it. |
|
|
451
|
+
|
|
452
|
+
Returns: `PagePromise<Target>` — auto-paginating (`for await` walks every page)
|
|
453
|
+
Errors: `BadRequestError` (400), `UnauthorizedError` (401), `ForbiddenError` (403), `NotFoundError` (404), `RateLimitedError` (429)
|
|
454
|
+
|
|
455
|
+
<details>
|
|
456
|
+
<summary>Wire arguments (CLI and MCP)</summary>
|
|
457
|
+
|
|
458
|
+
```json
|
|
459
|
+
{
|
|
460
|
+
"project_id": "prj_4f8k2m7x9q1v6b3n"
|
|
461
|
+
}
|
|
462
|
+
```
|
|
463
|
+
|
|
464
|
+
</details>
|
|
465
|
+
|
|
466
|
+
### `client.targets.create(projectId, body)`
|
|
467
|
+
|
|
468
|
+
Create an independently configured Target
|
|
469
|
+
|
|
470
|
+
`POST /projects/{project_id}/targets`
|
|
471
|
+
|
|
472
|
+
Several Targets may use the same generator with distinct configuration, Deliveries, and release streams.
|
|
473
|
+
|
|
474
|
+
Safety: **write** · Authentication: **required**
|
|
475
|
+
|
|
476
|
+
| Parameter | In | Type | Required | Description |
|
|
477
|
+
| --- | --- | --- | --- | --- |
|
|
478
|
+
| `projectId` | path | `ProjectId` | yes | — |
|
|
479
|
+
|
|
480
|
+
Body: `TargetFields` (required)
|
|
481
|
+
|
|
482
|
+
Returns: `TargetResponse`
|
|
483
|
+
Errors: `BadRequestError` (400), `UnauthorizedError` (401), `ForbiddenError` (403), `NotFoundError` (404), `ConflictError` (409), `UnprocessableEntityError` (422), `RateLimitedError` (429)
|
|
484
|
+
|
|
485
|
+
<details>
|
|
486
|
+
<summary>Wire arguments (CLI and MCP)</summary>
|
|
487
|
+
|
|
488
|
+
```json
|
|
489
|
+
{
|
|
490
|
+
"project_id": "prj_4f8k2m7x9q1v6b3n",
|
|
491
|
+
"name": "example",
|
|
492
|
+
"definition_id": "def_2p8m4q7k1v9d6h3c",
|
|
493
|
+
"generator": "typescript-sdk"
|
|
494
|
+
}
|
|
495
|
+
```
|
|
496
|
+
|
|
497
|
+
</details>
|
|
498
|
+
|
|
499
|
+
### `client.targets.retrieve(targetId)`
|
|
500
|
+
|
|
501
|
+
Retrieve a Target
|
|
502
|
+
|
|
503
|
+
`GET /targets/{target_id}`
|
|
504
|
+
|
|
505
|
+
Safety: **read** · Authentication: **required**
|
|
506
|
+
|
|
507
|
+
| Parameter | In | Type | Required | Description |
|
|
508
|
+
| --- | --- | --- | --- | --- |
|
|
509
|
+
| `targetId` | path | `TargetId` | yes | — |
|
|
510
|
+
|
|
511
|
+
Returns: `TargetResponse`
|
|
512
|
+
Errors: `UnauthorizedError` (401), `ForbiddenError` (403), `NotFoundError` (404), `RateLimitedError` (429)
|
|
513
|
+
|
|
514
|
+
<details>
|
|
515
|
+
<summary>Wire arguments (CLI and MCP)</summary>
|
|
516
|
+
|
|
517
|
+
```json
|
|
518
|
+
{
|
|
519
|
+
"target_id": "tgt_5m8q2v7k1p9d4h6c"
|
|
520
|
+
}
|
|
521
|
+
```
|
|
522
|
+
|
|
523
|
+
</details>
|
|
524
|
+
|
|
525
|
+
### `client.targets.delete(targetId)`
|
|
526
|
+
|
|
527
|
+
Delete an unused Target
|
|
528
|
+
|
|
529
|
+
`DELETE /targets/{target_id}`
|
|
530
|
+
|
|
531
|
+
Targets with Generation or release history, or an active release candidate, must be disabled instead.
|
|
532
|
+
|
|
533
|
+
Safety: **destructive** · Authentication: **required**
|
|
534
|
+
|
|
535
|
+
| Parameter | In | Type | Required | Description |
|
|
536
|
+
| --- | --- | --- | --- | --- |
|
|
537
|
+
| `targetId` | path | `TargetId` | yes | — |
|
|
538
|
+
|
|
539
|
+
Returns: `DeletedTarget`
|
|
540
|
+
Errors: `UnauthorizedError` (401), `ForbiddenError` (403), `NotFoundError` (404), `ConflictError` (409), `RateLimitedError` (429)
|
|
541
|
+
|
|
542
|
+
<details>
|
|
543
|
+
<summary>Wire arguments (CLI and MCP)</summary>
|
|
544
|
+
|
|
545
|
+
```json
|
|
546
|
+
{
|
|
547
|
+
"target_id": "tgt_5m8q2v7k1p9d4h6c"
|
|
548
|
+
}
|
|
549
|
+
```
|
|
550
|
+
|
|
551
|
+
</details>
|
|
552
|
+
|
|
553
|
+
### `client.targets.update(targetId, body)`
|
|
554
|
+
|
|
555
|
+
Update a Target, its Deliveries, or its next reviewed version
|
|
556
|
+
|
|
557
|
+
`PATCH /targets/{target_id}`
|
|
558
|
+
|
|
559
|
+
Safety: **write** · Authentication: **required**
|
|
560
|
+
|
|
561
|
+
| Parameter | In | Type | Required | Description |
|
|
562
|
+
| --- | --- | --- | --- | --- |
|
|
563
|
+
| `targetId` | path | `TargetId` | yes | — |
|
|
564
|
+
|
|
565
|
+
Body: `TargetUpdateRequest` (required)
|
|
566
|
+
|
|
567
|
+
Returns: `TargetResponse`
|
|
568
|
+
Errors: `BadRequestError` (400), `UnauthorizedError` (401), `ForbiddenError` (403), `NotFoundError` (404), `ConflictError` (409), `UnprocessableEntityError` (422), `RateLimitedError` (429)
|
|
569
|
+
|
|
570
|
+
<details>
|
|
571
|
+
<summary>Wire arguments (CLI and MCP)</summary>
|
|
572
|
+
|
|
573
|
+
```json
|
|
574
|
+
{
|
|
575
|
+
"target_id": "tgt_5m8q2v7k1p9d4h6c"
|
|
576
|
+
}
|
|
577
|
+
```
|
|
578
|
+
|
|
579
|
+
</details>
|
|
580
|
+
|
|
581
|
+
### `client.targets.listReleases(targetId, params)`
|
|
582
|
+
|
|
583
|
+
List immutable releases for a Target
|
|
584
|
+
|
|
585
|
+
`GET /targets/{target_id}/releases`
|
|
586
|
+
|
|
587
|
+
Safety: **read** · Authentication: **required**
|
|
588
|
+
|
|
589
|
+
| Parameter | In | Type | Required | Description |
|
|
590
|
+
| --- | --- | --- | --- | --- |
|
|
591
|
+
| `targetId` | path | `TargetId` | yes | — |
|
|
592
|
+
| `limit` | query | `number` | no | Maximum number of resources to return. |
|
|
593
|
+
| `cursor` | query | `string` | no | Opaque cursor from the preceding page's next_cursor. Valid only for the same account, operation, filters, and ordering that issued it. |
|
|
594
|
+
|
|
595
|
+
Returns: `PagePromise<TargetRelease>` — auto-paginating (`for await` walks every page)
|
|
596
|
+
Errors: `BadRequestError` (400), `UnauthorizedError` (401), `ForbiddenError` (403), `NotFoundError` (404), `RateLimitedError` (429)
|
|
597
|
+
|
|
598
|
+
<details>
|
|
599
|
+
<summary>Wire arguments (CLI and MCP)</summary>
|
|
600
|
+
|
|
601
|
+
```json
|
|
602
|
+
{
|
|
603
|
+
"target_id": "tgt_5m8q2v7k1p9d4h6c"
|
|
604
|
+
}
|
|
605
|
+
```
|
|
606
|
+
|
|
607
|
+
</details>
|
|
608
|
+
|
|
609
|
+
### `client.targets.retrieveRelease(targetReleaseId)`
|
|
610
|
+
|
|
611
|
+
Retrieve an immutable Target release
|
|
612
|
+
|
|
613
|
+
`GET /target_releases/{target_release_id}`
|
|
614
|
+
|
|
615
|
+
Safety: **read** · Authentication: **required**
|
|
616
|
+
|
|
617
|
+
| Parameter | In | Type | Required | Description |
|
|
618
|
+
| --- | --- | --- | --- | --- |
|
|
619
|
+
| `targetReleaseId` | path | `TargetReleaseId` | yes | — |
|
|
620
|
+
|
|
621
|
+
Returns: `TargetReleaseResponse`
|
|
622
|
+
Errors: `UnauthorizedError` (401), `ForbiddenError` (403), `NotFoundError` (404), `RateLimitedError` (429)
|
|
623
|
+
|
|
624
|
+
<details>
|
|
625
|
+
<summary>Wire arguments (CLI and MCP)</summary>
|
|
626
|
+
|
|
627
|
+
```json
|
|
628
|
+
{
|
|
629
|
+
"target_release_id": "rel_7m2q8v4k1p9d5h6c"
|
|
630
|
+
}
|
|
631
|
+
```
|
|
632
|
+
|
|
633
|
+
</details>
|
|
634
|
+
|
|
284
635
|
## generations
|
|
285
636
|
|
|
286
637
|
### `client.generations.retrieve(generationId)`
|
|
@@ -297,7 +648,7 @@ Safety: **read** · Authentication: **required**
|
|
|
297
648
|
| --- | --- | --- | --- | --- |
|
|
298
649
|
| `generationId` | path | `GenerationId` | yes | — |
|
|
299
650
|
|
|
300
|
-
Returns: `
|
|
651
|
+
Returns: `GenerationResponse`
|
|
301
652
|
Errors: `UnauthorizedError` (401), `ForbiddenError` (403), `NotFoundError` (404), `RateLimitedError` (429)
|
|
302
653
|
|
|
303
654
|
<details>
|
|
@@ -317,7 +668,7 @@ Fetch one file from a generation
|
|
|
317
668
|
|
|
318
669
|
`GET /generations/{generation_id}/file`
|
|
319
670
|
|
|
320
|
-
Raw file content, for generations whose
|
|
671
|
+
Raw file content, for generations whose target was too large to inline (files_omitted true). The generation's files_index lists valid paths.
|
|
321
672
|
|
|
322
673
|
Safety: **read** · Authentication: **required**
|
|
323
674
|
|
|
@@ -341,25 +692,25 @@ Errors: `BadRequestError` (400), `UnauthorizedError` (401), `ForbiddenError` (40
|
|
|
341
692
|
|
|
342
693
|
</details>
|
|
343
694
|
|
|
344
|
-
##
|
|
695
|
+
## definitionRevisions
|
|
345
696
|
|
|
346
|
-
### `client.
|
|
697
|
+
### `client.definitionRevisions.list(definitionId, params)`
|
|
347
698
|
|
|
348
|
-
List
|
|
699
|
+
List Definition Revisions
|
|
349
700
|
|
|
350
|
-
`GET /
|
|
701
|
+
`GET /definitions/{definition_id}/revisions`
|
|
351
702
|
|
|
352
|
-
Immutable snapshots of the
|
|
703
|
+
Immutable snapshots of the complete resolved document graph this Definition observed, newest first. Content is available from the revision and document endpoints and is never embedded in a list response.
|
|
353
704
|
|
|
354
705
|
Safety: **read** · Authentication: **required**
|
|
355
706
|
|
|
356
707
|
| Parameter | In | Type | Required | Description |
|
|
357
708
|
| --- | --- | --- | --- | --- |
|
|
358
|
-
| `
|
|
709
|
+
| `definitionId` | path | `DefinitionId` | yes | — |
|
|
359
710
|
| `limit` | query | `number` | no | Maximum number of resources to return. |
|
|
360
|
-
| `cursor` | query | `string` | no | Opaque cursor from the preceding page's next_cursor. |
|
|
711
|
+
| `cursor` | query | `string` | no | Opaque cursor from the preceding page's next_cursor. Valid only for the same account, operation, filters, and ordering that issued it. |
|
|
361
712
|
|
|
362
|
-
Returns: `PagePromise<
|
|
713
|
+
Returns: `PagePromise<DefinitionRevision>` — auto-paginating (`for await` walks every page)
|
|
363
714
|
Errors: `BadRequestError` (400), `UnauthorizedError` (401), `ForbiddenError` (403), `NotFoundError` (404), `RateLimitedError` (429)
|
|
364
715
|
|
|
365
716
|
<details>
|
|
@@ -367,27 +718,27 @@ Errors: `BadRequestError` (400), `UnauthorizedError` (401), `ForbiddenError` (40
|
|
|
367
718
|
|
|
368
719
|
```json
|
|
369
720
|
{
|
|
370
|
-
"
|
|
721
|
+
"definition_id": "def_2p8m4q7k1v9d6h3c"
|
|
371
722
|
}
|
|
372
723
|
```
|
|
373
724
|
|
|
374
725
|
</details>
|
|
375
726
|
|
|
376
|
-
### `client.
|
|
727
|
+
### `client.definitionRevisions.retrieve(definitionRevisionId)`
|
|
377
728
|
|
|
378
|
-
Retrieve a
|
|
729
|
+
Retrieve a Definition Revision
|
|
379
730
|
|
|
380
|
-
`GET /
|
|
731
|
+
`GET /definition_revisions/{definition_revision_id}`
|
|
381
732
|
|
|
382
|
-
Metadata for one immutable
|
|
733
|
+
Metadata for one immutable resolved document graph. Fetch its canonical content or individual source documents from the content endpoints.
|
|
383
734
|
|
|
384
735
|
Safety: **read** · Authentication: **required**
|
|
385
736
|
|
|
386
737
|
| Parameter | In | Type | Required | Description |
|
|
387
738
|
| --- | --- | --- | --- | --- |
|
|
388
|
-
| `
|
|
739
|
+
| `definitionRevisionId` | path | `DefinitionRevisionId` | yes | — |
|
|
389
740
|
|
|
390
|
-
Returns: `
|
|
741
|
+
Returns: `DefinitionRevisionResponse`
|
|
391
742
|
Errors: `UnauthorizedError` (401), `ForbiddenError` (403), `NotFoundError` (404), `RateLimitedError` (429)
|
|
392
743
|
|
|
393
744
|
<details>
|
|
@@ -395,25 +746,52 @@ Errors: `UnauthorizedError` (401), `ForbiddenError` (403), `NotFoundError` (404)
|
|
|
395
746
|
|
|
396
747
|
```json
|
|
397
748
|
{
|
|
398
|
-
"
|
|
749
|
+
"definition_revision_id": "drev_6m1q8v4k2p9d7h3c"
|
|
399
750
|
}
|
|
400
751
|
```
|
|
401
752
|
|
|
402
753
|
</details>
|
|
403
754
|
|
|
404
|
-
### `client.
|
|
755
|
+
### `client.definitionRevisions.retrieveContent(definitionRevisionId)`
|
|
756
|
+
|
|
757
|
+
Retrieve a Definition Revision's canonical content
|
|
758
|
+
|
|
759
|
+
`GET /definition_revisions/{definition_revision_id}/content`
|
|
760
|
+
|
|
761
|
+
Returns the exact canonical resolved content identified by the revision's graph digest, suitable for saving or piping into a diff.
|
|
762
|
+
|
|
763
|
+
Safety: **read** · Authentication: **required**
|
|
764
|
+
|
|
765
|
+
| Parameter | In | Type | Required | Description |
|
|
766
|
+
| --- | --- | --- | --- | --- |
|
|
767
|
+
| `definitionRevisionId` | path | `DefinitionRevisionId` | yes | — |
|
|
768
|
+
|
|
769
|
+
Returns: `string`
|
|
770
|
+
Errors: `UnauthorizedError` (401), `ForbiddenError` (403), `NotFoundError` (404), `RateLimitedError` (429)
|
|
771
|
+
|
|
772
|
+
<details>
|
|
773
|
+
<summary>Wire arguments (CLI and MCP)</summary>
|
|
774
|
+
|
|
775
|
+
```json
|
|
776
|
+
{
|
|
777
|
+
"definition_revision_id": "drev_6m1q8v4k2p9d7h3c"
|
|
778
|
+
}
|
|
779
|
+
```
|
|
780
|
+
|
|
781
|
+
</details>
|
|
405
782
|
|
|
406
|
-
|
|
783
|
+
### `client.definitionRevisions.retrieveDocumentContent(definitionRevisionId, documentId)`
|
|
407
784
|
|
|
408
|
-
|
|
785
|
+
Retrieve one source document from a Definition Revision
|
|
409
786
|
|
|
410
|
-
|
|
787
|
+
`GET /definition_revisions/{definition_revision_id}/documents/{document_id}/content`
|
|
411
788
|
|
|
412
789
|
Safety: **read** · Authentication: **required**
|
|
413
790
|
|
|
414
791
|
| Parameter | In | Type | Required | Description |
|
|
415
792
|
| --- | --- | --- | --- | --- |
|
|
416
|
-
| `
|
|
793
|
+
| `definitionRevisionId` | path | `DefinitionRevisionId` | yes | — |
|
|
794
|
+
| `documentId` | path | `DefinitionDocumentId` | yes | — |
|
|
417
795
|
|
|
418
796
|
Returns: `string`
|
|
419
797
|
Errors: `UnauthorizedError` (401), `ForbiddenError` (403), `NotFoundError` (404), `RateLimitedError` (429)
|
|
@@ -423,7 +801,8 @@ Errors: `UnauthorizedError` (401), `ForbiddenError` (403), `NotFoundError` (404)
|
|
|
423
801
|
|
|
424
802
|
```json
|
|
425
803
|
{
|
|
426
|
-
"
|
|
804
|
+
"definition_revision_id": "drev_6m1q8v4k2p9d7h3c",
|
|
805
|
+
"document_id": "doc_8q2m5v1k9p4d7h3c"
|
|
427
806
|
}
|
|
428
807
|
```
|
|
429
808
|
|
|
@@ -469,7 +848,7 @@ Safety: **read** · Authentication: **required**
|
|
|
469
848
|
| Parameter | In | Type | Required | Description |
|
|
470
849
|
| --- | --- | --- | --- | --- |
|
|
471
850
|
| `limit` | query | `number` | no | Maximum number of resources to return. |
|
|
472
|
-
| `cursor` | query | `string` | no | Opaque cursor from the preceding page's next_cursor. |
|
|
851
|
+
| `cursor` | query | `string` | no | Opaque cursor from the preceding page's next_cursor. Valid only for the same account, operation, filters, and ordering that issued it. |
|
|
473
852
|
|
|
474
853
|
Returns: `PagePromise<ApiKey>` — auto-paginating (`for await` walks every page)
|
|
475
854
|
Errors: `BadRequestError` (400), `UnauthorizedError` (401), `ForbiddenError` (403), `RateLimitedError` (429)
|
|
@@ -489,7 +868,7 @@ Revoke an API key
|
|
|
489
868
|
|
|
490
869
|
`DELETE /api_keys/{api_key_id}`
|
|
491
870
|
|
|
492
|
-
Idempotent: revoking an already-revoked key returns the same body, so a rotation script that re-runs does not have to special-case having already succeeded.
|
|
871
|
+
Idempotent: revoking an already-revoked key returns the same body, so a rotation script that re-runs does not have to special-case having already succeeded. An OAuth member may revoke a key they created; an organization admin may revoke any key. Organization API keys retain account-wide authority.
|
|
493
872
|
|
|
494
873
|
Safety: **destructive** · Authentication: **required**
|
|
495
874
|
|
|
@@ -497,7 +876,7 @@ Safety: **destructive** · Authentication: **required**
|
|
|
497
876
|
| --- | --- | --- | --- | --- |
|
|
498
877
|
| `apiKeyId` | path | `string` | yes | — |
|
|
499
878
|
|
|
500
|
-
Returns: `
|
|
879
|
+
Returns: `ApiKeyResponse`
|
|
501
880
|
Errors: `UnauthorizedError` (401), `ForbiddenError` (403), `NotFoundError` (404), `RateLimitedError` (429)
|
|
502
881
|
|
|
503
882
|
<details>
|