@typeship-ax/cli 0.9.1 → 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 +9 -4
- package/README.md +4 -4
- package/api.json +6257 -589
- package/api.md +475 -81
- package/dist/cli-agent.d.ts +5 -5
- package/dist/cli-agent.d.ts.map +1 -1
- package/dist/cli-agent.js +14 -10
- package/dist/cli.js +151 -75
- 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/ops.d.ts +4 -0
- package/dist/ops.d.ts.map +1 -1
- package/dist/ops.js +45 -31
- package/dist/polling-login.d.ts.map +1 -1
- package/dist/polling-login.js +11 -1
- package/dist/resources/account.d.ts +4 -4
- package/dist/resources/account.d.ts.map +1 -1
- package/dist/resources/account.js +10 -5
- package/dist/resources/api-keys.d.ts +40 -14
- package/dist/resources/api-keys.d.ts.map +1 -1
- package/dist/resources/api-keys.js +45 -13
- package/dist/resources/definition-revisions.d.ts +35 -18
- package/dist/resources/definition-revisions.d.ts.map +1 -1
- package/dist/resources/definition-revisions.js +43 -15
- package/dist/resources/definitions.d.ts +21 -6
- package/dist/resources/definitions.d.ts.map +1 -1
- package/dist/resources/definitions.js +16 -3
- package/dist/resources/generate.d.ts +44 -15
- package/dist/resources/generate.d.ts.map +1 -1
- package/dist/resources/generate.js +55 -13
- package/dist/resources/generations.d.ts +14 -6
- package/dist/resources/generations.d.ts.map +1 -1
- package/dist/resources/generations.js +26 -5
- package/dist/resources/projects.d.ts +106 -53
- package/dist/resources/projects.d.ts.map +1 -1
- package/dist/resources/projects.js +78 -31
- package/dist/resources/targets.d.ts +285 -22
- package/dist/resources/targets.d.ts.map +1 -1
- package/dist/resources/targets.js +408 -10
- package/dist/schemas.d.ts +1 -0
- package/dist/schemas.d.ts.map +1 -1
- package/dist/schemas.js +175 -102
- package/dist/types.d.ts +2162 -134
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +99 -2
- package/package.json +3 -3
- package/src/cli-agent.ts +17 -13
- package/src/cli.ts +138 -70
- package/src/core/http.ts +17 -6
- package/src/errors.ts +25 -15
- package/src/index.ts +9 -5
- package/src/ops.ts +49 -31
- package/src/polling-login.ts +10 -1
- package/src/resources/account.ts +11 -4
- package/src/resources/api-keys.ts +84 -13
- package/src/resources/definition-revisions.ts +74 -16
- package/src/resources/definitions.ts +28 -4
- package/src/resources/generate.ts +78 -13
- package/src/resources/generations.ts +31 -4
- package/src/resources/projects.ts +141 -39
- package/src/resources/targets.ts +756 -13
- package/src/schemas.ts +176 -103
- package/src/types.ts +2372 -189
package/api.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# typeship — CLI reference
|
|
2
2
|
|
|
3
|
-
API version 1.0.0. Package version 0.
|
|
3
|
+
API version 1.0.0. Package version 0.20.0. Generated by typeship.
|
|
4
4
|
|
|
5
5
|
Run `typeship help --json` for the command index. Path arguments are positional; flags use the names shown below. Arrays accept repeated flags, comma-separated values, or a JSON array; object values use JSON.
|
|
6
6
|
|
|
@@ -14,40 +14,66 @@ For complete input and output schemas, use [`api.json`](./api.json), the machine
|
|
|
14
14
|
|
|
15
15
|
### `typeship generate run [flags]`
|
|
16
16
|
|
|
17
|
-
Generate one
|
|
17
|
+
Generate one package from a Definition
|
|
18
18
|
|
|
19
19
|
`POST /generate`
|
|
20
20
|
|
|
21
21
|
Safety: **write** · Authentication: **optional**
|
|
22
22
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
it
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
23
|
+
Returns one generated package without creating a Project.
|
|
24
|
+
|
|
25
|
+
Supports [idempotent retries](https://typeship.dev/docs/typeship-api/idempotency); keyed responses include generated files in the replay cache.
|
|
26
|
+
|
|
27
|
+
Use `download.url` to save the complete ZIP, verify `download.sha256`, and extract it into an empty directory. The link expires at `download.expires_at` and grants access to anyone who has it. CLI, MCP, and SDK calls supply an idempotency key automatically. Agents should request `fields=["download","meta","warnings","limits","claim"]` to keep the MCP result compact; files can exceed the response limit. Download the ZIP instead of repeating generation to retrieve omitted files.
|
|
28
|
+
|
|
29
|
+
Anonymous and Free requests include the first 25 operations. Paid plans include all operations. Anonymous requests are rate limited by IP address. Check `limits` for omitted operations; an invalid API key returns `401`.
|
|
30
|
+
|
|
31
|
+
An anonymous URL request without source headers may return `claim.url`. Sign in through that link within seven days to save the recipe as a Project.
|
|
31
32
|
|
|
32
33
|
| Argument or flag | In | Type | Required | Description |
|
|
33
34
|
| --- | --- | --- | --- | --- |
|
|
34
|
-
| `--definition` | body | `json` | yes | A Definition for
|
|
35
|
-
| `--target` | body | `object` | yes |
|
|
35
|
+
| `--definition` | body | `json` | yes | A Definition for one-shot generation, provided as exactly one URL or inline entrypoint. |
|
|
36
|
+
| `--target` | body | `object` | yes | One-shot generator descriptor; no persisted Target is created. |
|
|
36
37
|
| `--package-name` | body | `string` | no | npm package or Python distribution override. Valid only for the TypeScript and Python SDK targets. |
|
|
37
|
-
| `--module-path` | body | `string` | no | Go module path override. Valid only for the Go SDK. Linked projects derive this from the Go destination repository by default. |
|
|
38
|
-
| `--
|
|
39
|
-
| `--
|
|
38
|
+
| `--module-path` | body | `string` | no | Go module path override for the generated artifact's own module. Valid only for the Go SDK and Go CLI outputs. Linked projects derive this from the Go destination repository by default. |
|
|
39
|
+
| `--go-sdk` | body | `object` | no | The exact paired Go SDK a go-cli generation is built on. Required when target.generator is go-cli and rejected otherwise. The descriptor is closed and immutable, because a CLI that pins a range or a branch pins nothing. |
|
|
40
|
+
| `--config` | body | `object` | no | Everything Typeship needs beyond the Definition, in one object: generation customization (globals, retries, pagination, readme) and how the generated tooling behaves (cli, mcp, package, docs_url). Plain configuration. Typeship never requires vendor extensions inside the Definition itself. One-shot generation also accepts GraphQL settings here; stored projects keep those settings on their Definition. |
|
|
41
|
+
| `--idempotency-key` | header | `string` | no | Identifies one logical write for 24 hours. The key is scoped to the authenticated account and operation; account-less generation uses a hashed network identity. Retrying the same method, path, query, If-Match header, and JSON body replays the original response. Reusing the key with changed intent returns 409. After expiry the key starts a new write. |
|
|
40
42
|
|
|
41
43
|
Use `--data '<json>'`, `--data @body.json`, or `--data -` to supply the request body. Field flags override matching body fields.
|
|
42
44
|
|
|
43
45
|
```sh
|
|
44
|
-
typeship generate run --definition '{"url":"https://
|
|
46
|
+
typeship generate run --definition '{"url":"https://typeship.dev/examples/petstore/openapi.yaml"}' --target '{"generator":"cli"}'
|
|
45
47
|
```
|
|
46
48
|
|
|
47
49
|
Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
|
|
48
50
|
|
|
49
51
|
Read the full command contract with `typeship docs generate run --json`.
|
|
50
52
|
|
|
53
|
+
### `typeship generate download-package [flags]`
|
|
54
|
+
|
|
55
|
+
Download a generated package
|
|
56
|
+
|
|
57
|
+
`GET /generate/download`
|
|
58
|
+
|
|
59
|
+
Safety: **read** · Authentication: **none**
|
|
60
|
+
|
|
61
|
+
Download the complete ZIP referenced by `generate_run`'s `download.url`. Pass the token from that URL. No API key is needed; the token grants access only to that exact package until its replay window expires. Keep the token private.
|
|
62
|
+
|
|
63
|
+
The local MCP server saves this binary response to disk. On a hosted MCP connection, download the original URL directly to your workspace. Verify the ZIP against `download.sha256` before extracting it into an empty directory. Expired or invalid tokens return `404`; a new generation creates a new download.
|
|
64
|
+
|
|
65
|
+
| Argument or flag | In | Type | Required | Description |
|
|
66
|
+
| --- | --- | --- | --- | --- |
|
|
67
|
+
| `--query-token` | query | `string` | yes | Private download token from download.url in the generation result. |
|
|
68
|
+
|
|
69
|
+
```sh
|
|
70
|
+
typeship generate download-package --query-token parcel_download_example_token_1234567890123
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
|
|
74
|
+
|
|
75
|
+
Read the full command contract with `typeship docs generate download-package --json`.
|
|
76
|
+
|
|
51
77
|
## projects
|
|
52
78
|
|
|
53
79
|
### `typeship projects list [flags]`
|
|
@@ -60,8 +86,8 @@ Safety: **read** · Authentication: **required**
|
|
|
60
86
|
|
|
61
87
|
| Argument or flag | In | Type | Required | Description |
|
|
62
88
|
| --- | --- | --- | --- | --- |
|
|
63
|
-
| `--limit` | query | `number` | no | Maximum number of resources to return. Default: 20. |
|
|
64
|
-
| `--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. |
|
|
89
|
+
| `--limit` | query | `number` | no | Maximum number of resources to return. Omit for 20; otherwise supply base-10 digits representing an integer from 1 to 100. Empty, malformed, or out-of-range values return 400 invalid_request. List query parameters must appear only once; unrecognized parameters also return 400. Default: 20. |
|
|
90
|
+
| `--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. Omit to start at the first page. Empty, malformed, or repeated cursors return 400 invalid_request. The page limit may change between requests. |
|
|
65
91
|
|
|
66
92
|
```sh
|
|
67
93
|
typeship projects list
|
|
@@ -79,7 +105,9 @@ Create a project
|
|
|
79
105
|
|
|
80
106
|
Safety: **write** · Authentication: **required**
|
|
81
107
|
|
|
82
|
-
|
|
108
|
+
Creates a Project from a URL or GitHub Definition.
|
|
109
|
+
|
|
110
|
+
Free includes one saved Project, all selected Targets, and the first 25 operations per Target, with regeneration, history, delivery pull requests, and previews. Pro supports additional Projects and all operations. One-shot generation does not use a Project slot.
|
|
83
111
|
|
|
84
112
|
| Argument or flag | In | Type | Required | Description |
|
|
85
113
|
| --- | --- | --- | --- | --- |
|
|
@@ -89,12 +117,12 @@ Stores a URL- or GitHub-sourced project. Free includes one stored project, every
|
|
|
89
117
|
| `--auto-generate` | body | `boolean` | no | Whether Typeship should regenerate automatically when the source changes. Default: false. |
|
|
90
118
|
| `--relay-enabled` | body | `boolean` | no | Enable webhook relay sessions. Requires the CLI target and Pro. Default: false. |
|
|
91
119
|
| `--config` | body | `json` | no | Shared defaults inherited by every Target. GraphQL settings belong in definition.graphql. |
|
|
92
|
-
| `--idempotency-key` | header | `string` | no | Identifies one logical write for 24 hours. The key is scoped to the authenticated account and operation; account-less generation uses a hashed network identity. Retrying the same method, path, query, and JSON body replays the original response. Reusing the key with changed intent returns 409. After expiry the key starts a new write. |
|
|
120
|
+
| `--idempotency-key` | header | `string` | no | Identifies one logical write for 24 hours. The key is scoped to the authenticated account and operation; account-less generation uses a hashed network identity. Retrying the same method, path, query, If-Match header, and JSON body replays the original response. Reusing the key with changed intent returns 409. After expiry the key starts a new write. |
|
|
93
121
|
|
|
94
122
|
Use `--data '<json>'`, `--data @body.json`, or `--data -` to supply the request body. Field flags override matching body fields.
|
|
95
123
|
|
|
96
124
|
```sh
|
|
97
|
-
typeship projects create --name
|
|
125
|
+
typeship projects create --name 'Parcel API' --definition '{"source":{"kind":"url","url":"https://api.parcel.example/openapi.json"}}' --targets '[{"name":"Parcel CLI","generator":"cli","deliveries":[{"kind":"repository","repository":{"provider":"github","identifier":"parcel-example/parcel-client"},"package_name":"parcel-client","publish_on_merge":false}]}]'
|
|
98
126
|
```
|
|
99
127
|
|
|
100
128
|
Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
|
|
@@ -109,7 +137,7 @@ Retrieve a project
|
|
|
109
137
|
|
|
110
138
|
Safety: **read** · Authentication: **required**
|
|
111
139
|
|
|
112
|
-
Returns Project
|
|
140
|
+
Returns the Project's settings and Definition ID. List its Targets separately to retrieve Target configuration and Deliveries.
|
|
113
141
|
|
|
114
142
|
| Argument or flag | In | Type | Required | Description |
|
|
115
143
|
| --- | --- | --- | --- | --- |
|
|
@@ -131,9 +159,13 @@ Delete a project
|
|
|
131
159
|
|
|
132
160
|
Safety: **destructive** · Authentication: **required**
|
|
133
161
|
|
|
162
|
+
A `502` response means the Project was not deleted because its release pull requests could not be retired. Retry deletion to finish retiring the remaining reviews. Repeating a completed deletion returns `404`.
|
|
163
|
+
See [conditional writes](https://typeship.dev/docs/typeship-api#conditional-writes) for ETag and If-Match.
|
|
164
|
+
|
|
134
165
|
| Argument or flag | In | Type | Required | Description |
|
|
135
166
|
| --- | --- | --- | --- | --- |
|
|
136
167
|
| `<project_id>` | path | `string` | yes | Accepts an ID or an exact name (resolved via projects_list). IDs come from projects_list. |
|
|
168
|
+
| `--if-match` | header | `string` | no | ETag from a preceding response. The write applies only if the resource still has that version; otherwise it returns 412 precondition_failed without changes. Omit to write the current version. See https://typeship.dev/docs/typeship-api#conditional-writes. |
|
|
137
169
|
|
|
138
170
|
```sh
|
|
139
171
|
typeship projects delete prj_4f8k2m7x9q1v6b3n --force
|
|
@@ -151,6 +183,13 @@ Update a project
|
|
|
151
183
|
|
|
152
184
|
Safety: **write** · Authentication: **required**
|
|
153
185
|
|
|
186
|
+
Omitted fields keep their current values. A supplied config replaces the entire stored object; null or an empty object clears it.
|
|
187
|
+
Omitting If-Match applies the update to the current resource; with If-Match, a stale ETag returns 412 precondition_failed without saving.
|
|
188
|
+
|
|
189
|
+
A `409 target_busy` means a Target is publishing. Retrieve the Project, wait for publication to finish, reconcile your update, and retry.
|
|
190
|
+
A `502` response means the Project was saved, but an obsolete release pull request could not be retired. Retrieve the Project and retry the same update to finish retiring reviews if that update is still desired.
|
|
191
|
+
See [conditional writes](https://typeship.dev/docs/typeship-api#conditional-writes) for ETag and If-Match.
|
|
192
|
+
|
|
154
193
|
| Argument or flag | In | Type | Required | Description |
|
|
155
194
|
| --- | --- | --- | --- | --- |
|
|
156
195
|
| `<project_id>` | path | `string` | yes | Accepts an ID or an exact name (resolved via projects_list). IDs come from projects_list. |
|
|
@@ -158,11 +197,12 @@ Safety: **write** · Authentication: **required**
|
|
|
158
197
|
| `--auto-generate` | body | `boolean` | no | — |
|
|
159
198
|
| `--relay-enabled` | body | `boolean` | no | Enable webhook relay sessions. Requires the CLI target and Pro. |
|
|
160
199
|
| `--config` | body | `json` | no | Replaces the Project's shared Target defaults. Send null to clear them. |
|
|
200
|
+
| `--if-match` | header | `string` | no | ETag from a preceding response. The write applies only if the resource still has that version; otherwise it returns 412 precondition_failed without changes. Omit to write the current version. See https://typeship.dev/docs/typeship-api#conditional-writes. |
|
|
161
201
|
|
|
162
202
|
Use `--data '<json>'`, `--data @body.json`, or `--data -` to supply the request body. Field flags override matching body fields.
|
|
163
203
|
|
|
164
204
|
```sh
|
|
165
|
-
typeship projects update prj_4f8k2m7x9q1v6b3n
|
|
205
|
+
typeship projects update prj_4f8k2m7x9q1v6b3n --auto-generate true
|
|
166
206
|
```
|
|
167
207
|
|
|
168
208
|
Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
|
|
@@ -177,7 +217,7 @@ Analyze a project's latest Definition Revision
|
|
|
177
217
|
|
|
178
218
|
Safety: **read** · Authentication: **required**
|
|
179
219
|
|
|
180
|
-
|
|
220
|
+
Checks the latest Definition Revision after applying its saved patches. Each finding groups affected locations under a stable rule ID. A suggested patch is included only when the Definition provides enough information to determine the correction.
|
|
181
221
|
|
|
182
222
|
| Argument or flag | In | Type | Required | Description |
|
|
183
223
|
| --- | --- | --- | --- | --- |
|
|
@@ -199,12 +239,12 @@ Refresh a project's Diagnostics from its configured source
|
|
|
199
239
|
|
|
200
240
|
Safety: **write** · Authentication: **required**
|
|
201
241
|
|
|
202
|
-
Fetches the
|
|
242
|
+
Fetches the configured source and returns updated Diagnostics. Creates a Definition Revision only when the content changes. Does not generate Targets or use a metered generation.
|
|
203
243
|
|
|
204
244
|
| Argument or flag | In | Type | Required | Description |
|
|
205
245
|
| --- | --- | --- | --- | --- |
|
|
206
246
|
| `<project_id>` | path | `string` | yes | Accepts an ID or an exact name (resolved via projects_list). IDs come from projects_list. |
|
|
207
|
-
| `--idempotency-key` | header | `string` | no | Identifies one logical write for 24 hours. The key is scoped to the authenticated account and operation; account-less generation uses a hashed network identity. Retrying the same method, path, query, and JSON body replays the original response. Reusing the key with changed intent returns 409. After expiry the key starts a new write. |
|
|
247
|
+
| `--idempotency-key` | header | `string` | no | Identifies one logical write for 24 hours. The key is scoped to the authenticated account and operation; account-less generation uses a hashed network identity. Retrying the same method, path, query, If-Match header, and JSON body replays the original response. Reusing the key with changed intent returns 409. After expiry the key starts a new write. |
|
|
208
248
|
|
|
209
249
|
```sh
|
|
210
250
|
typeship projects refresh-diagnostics prj_4f8k2m7x9q1v6b3n
|
|
@@ -222,18 +262,20 @@ Apply exact, reviewed diagnostic remediations
|
|
|
222
262
|
|
|
223
263
|
Safety: **write** · Authentication: **required**
|
|
224
264
|
|
|
225
|
-
Applies
|
|
265
|
+
Applies reviewed patches from Diagnostics. For a repository source, opens or updates a source pull request. For a URL source, saves Definition patches.
|
|
266
|
+
|
|
267
|
+
Findings that need an API-owner decision return `422`. Read the finding's `authoring_brief` and update the source instead.
|
|
226
268
|
|
|
227
269
|
| Argument or flag | In | Type | Required | Description |
|
|
228
270
|
| --- | --- | --- | --- | --- |
|
|
229
271
|
| `<project_id>` | path | `string` | yes | Accepts an ID or an exact name (resolved via projects_list). IDs come from projects_list. |
|
|
230
272
|
| `--diagnostic-ids` | body | `array` | yes | Stable IDs of current diagnostics whose exact patches should be reviewed and applied. |
|
|
231
|
-
| `--idempotency-key` | header | `string` | no | Identifies one logical write for 24 hours. The key is scoped to the authenticated account and operation; account-less generation uses a hashed network identity. Retrying the same method, path, query, and JSON body replays the original response. Reusing the key with changed intent returns 409. After expiry the key starts a new write. |
|
|
273
|
+
| `--idempotency-key` | header | `string` | no | Identifies one logical write for 24 hours. The key is scoped to the authenticated account and operation; account-less generation uses a hashed network identity. Retrying the same method, path, query, If-Match header, and JSON body replays the original response. Reusing the key with changed intent returns 409. After expiry the key starts a new write. |
|
|
232
274
|
|
|
233
275
|
Use `--data '<json>'`, `--data @body.json`, or `--data -` to supply the request body. Field flags override matching body fields.
|
|
234
276
|
|
|
235
277
|
```sh
|
|
236
|
-
typeship projects remediate-diagnostics prj_4f8k2m7x9q1v6b3n --diagnostic-ids '["
|
|
278
|
+
typeship projects remediate-diagnostics prj_4f8k2m7x9q1v6b3n --diagnostic-ids '["missing-operation-id"]'
|
|
237
279
|
```
|
|
238
280
|
|
|
239
281
|
Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
|
|
@@ -248,7 +290,7 @@ Diagnose a project's repository integrations
|
|
|
248
290
|
|
|
249
291
|
Safety: **read** · Authentication: **required**
|
|
250
292
|
|
|
251
|
-
|
|
293
|
+
Checks repository access, Definition readability, source-approval labels, and required checks. Includes the latest webhook delivery so you can investigate missing updates.
|
|
252
294
|
|
|
253
295
|
| Argument or flag | In | Type | Required | Description |
|
|
254
296
|
| --- | --- | --- | --- | --- |
|
|
@@ -273,8 +315,8 @@ Safety: **read** · Authentication: **required**
|
|
|
273
315
|
| Argument or flag | In | Type | Required | Description |
|
|
274
316
|
| --- | --- | --- | --- | --- |
|
|
275
317
|
| `<project_id>` | path | `string` | yes | Accepts an ID or an exact name (resolved via projects_list). IDs come from projects_list. |
|
|
276
|
-
| `--limit` | query | `number` | no | Maximum number of resources to return. Default: 20. |
|
|
277
|
-
| `--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. |
|
|
318
|
+
| `--limit` | query | `number` | no | Maximum number of resources to return. Omit for 20; otherwise supply base-10 digits representing an integer from 1 to 100. Empty, malformed, or out-of-range values return 400 invalid_request. List query parameters must appear only once; unrecognized parameters also return 400. Default: 20. |
|
|
319
|
+
| `--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. Omit to start at the first page. Empty, malformed, or repeated cursors return 400 invalid_request. The page limit may change between requests. |
|
|
278
320
|
| `--target-id` | query | `string` | no | Only generations for this persisted Target. |
|
|
279
321
|
|
|
280
322
|
```sh
|
|
@@ -287,27 +329,26 @@ Read the full command contract with `typeship docs projects list-generations --j
|
|
|
287
329
|
|
|
288
330
|
### `typeship projects generate <project_id> [flags]`
|
|
289
331
|
|
|
290
|
-
|
|
332
|
+
Start generation for active Targets
|
|
291
333
|
|
|
292
334
|
`POST /projects/{project_id}/generations`
|
|
293
335
|
|
|
294
336
|
Safety: **write** · Authentication: **required**
|
|
295
337
|
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
and
|
|
299
|
-
When the complete generated tree already matches a destination, no
|
|
300
|
-
commit, branch, or pull request is created and that generation reports
|
|
301
|
-
`pr_status: no_changes`. This is the same pipeline automatic
|
|
302
|
-
regeneration runs after a source change.
|
|
338
|
+
Queues one Generation per active Target and returns their IDs. Retrieve each Generation until its status moves from `queued` to `running` and then `succeeded` or `failed`. `succeeded` means generated files are saved; check Delivery and Draft status separately for repository delivery and pull requests. A Target already queued or running is returned without starting another Generation. A matching Idempotency-Key replay returns the same Generations with their current statuses.
|
|
339
|
+
|
|
340
|
+
If the package already matches a destination and no Draft is open, delivery reports `pr_status: no_changes` without creating a commit, branch, or pull request. An existing Draft stays open. Automatic generation uses the same workflow.
|
|
303
341
|
|
|
304
342
|
| Argument or flag | In | Type | Required | Description |
|
|
305
343
|
| --- | --- | --- | --- | --- |
|
|
306
344
|
| `<project_id>` | path | `string` | yes | Accepts an ID or an exact name (resolved via projects_list). IDs come from projects_list. |
|
|
307
|
-
| `--
|
|
345
|
+
| `--target-id` | body | `string` | no | Stable identifier for one configured generated product. |
|
|
346
|
+
| `--idempotency-key` | header | `string` | no | Identifies one logical write for 24 hours. The key is scoped to the authenticated account and operation; account-less generation uses a hashed network identity. Retrying the same method, path, query, If-Match header, and JSON body replays the original response. Reusing the key with changed intent returns 409. After expiry the key starts a new write. |
|
|
347
|
+
|
|
348
|
+
Use `--data '<json>'`, `--data @body.json`, or `--data -` to supply the request body. Field flags override matching body fields.
|
|
308
349
|
|
|
309
350
|
```sh
|
|
310
|
-
typeship projects generate prj_4f8k2m7x9q1v6b3n
|
|
351
|
+
typeship projects generate prj_4f8k2m7x9q1v6b3n --target-id tgt_5m8q2v7k1p9d4h6c
|
|
311
352
|
```
|
|
312
353
|
|
|
313
354
|
Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
|
|
@@ -344,21 +385,27 @@ Update and resolve a Definition
|
|
|
344
385
|
|
|
345
386
|
Safety: **write** · Authentication: **required**
|
|
346
387
|
|
|
347
|
-
Resolves the
|
|
388
|
+
Resolves the source documents before saving the update and records a new Definition Revision when the source changes.
|
|
389
|
+
Omitted fields remain unchanged; supplied objects and arrays replace the whole field.
|
|
390
|
+
If the Definition or its Project configuration changes during validation, returns 409 definition_changed without saving the rejected update. Retrieve the current Definition and Project, reconcile your changes,
|
|
391
|
+
and submit a new request with a new Idempotency-Key if using one.
|
|
392
|
+
|
|
393
|
+
See [conditional writes](https://typeship.dev/docs/typeship-api#conditional-writes) for ETag and If-Match.
|
|
348
394
|
|
|
349
395
|
| Argument or flag | In | Type | Required | Description |
|
|
350
396
|
| --- | --- | --- | --- | --- |
|
|
351
397
|
| `<definition_id>` | path | `string` | yes | — |
|
|
352
398
|
| `--source` | body | `json` | no | — |
|
|
353
|
-
| `--patches` | body | `array` | no |
|
|
354
|
-
| `--graphql` | body | `json` | no |
|
|
399
|
+
| `--patches` | body | `array` | no | Replace all patches in order. An empty array removes every patch; null is invalid. |
|
|
400
|
+
| `--graphql` | body | `json` | no | Replace all GraphQL settings. Null or an empty object clears them. |
|
|
355
401
|
| `--diagnostic-policy` | body | `object` | no | Source pull-request enforcement threshold, new-versus-complete baseline, and explicitly reviewed rule or location exceptions. |
|
|
356
|
-
| `--
|
|
402
|
+
| `--if-match` | header | `string` | no | ETag from a preceding response. The write applies only if the resource still has that version; otherwise it returns 412 precondition_failed without changes. Omit to write the current version. See https://typeship.dev/docs/typeship-api#conditional-writes. |
|
|
403
|
+
| `--idempotency-key` | header | `string` | no | Identifies one logical write for 24 hours. The key is scoped to the authenticated account and operation; account-less generation uses a hashed network identity. Retrying the same method, path, query, If-Match header, and JSON body replays the original response. Reusing the key with changed intent returns 409. After expiry the key starts a new write. |
|
|
357
404
|
|
|
358
405
|
Use `--data '<json>'`, `--data @body.json`, or `--data -` to supply the request body. Field flags override matching body fields.
|
|
359
406
|
|
|
360
407
|
```sh
|
|
361
|
-
typeship definitions update def_2p8m4q7k1v9d6h3c
|
|
408
|
+
typeship definitions update def_2p8m4q7k1v9d6h3c --source '{"kind":"url","url":"https://api.parcel.example/openapi.json"}'
|
|
362
409
|
```
|
|
363
410
|
|
|
364
411
|
Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
|
|
@@ -378,8 +425,8 @@ Safety: **read** · Authentication: **required**
|
|
|
378
425
|
| Argument or flag | In | Type | Required | Description |
|
|
379
426
|
| --- | --- | --- | --- | --- |
|
|
380
427
|
| `<project_id>` | path | `string` | yes | Accepts an ID or an exact name (resolved via projects_list). IDs come from projects_list. |
|
|
381
|
-
| `--limit` | query | `number` | no | Maximum number of resources to return. Default: 20. |
|
|
382
|
-
| `--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. |
|
|
428
|
+
| `--limit` | query | `number` | no | Maximum number of resources to return. Omit for 20; otherwise supply base-10 digits representing an integer from 1 to 100. Empty, malformed, or out-of-range values return 400 invalid_request. List query parameters must appear only once; unrecognized parameters also return 400. Default: 20. |
|
|
429
|
+
| `--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. Omit to start at the first page. Empty, malformed, or repeated cursors return 400 invalid_request. The page limit may change between requests. |
|
|
383
430
|
|
|
384
431
|
```sh
|
|
385
432
|
typeship targets list prj_4f8k2m7x9q1v6b3n
|
|
@@ -397,26 +444,27 @@ Create an independently configured Target
|
|
|
397
444
|
|
|
398
445
|
Safety: **write** · Authentication: **required**
|
|
399
446
|
|
|
400
|
-
|
|
447
|
+
Creates a Target with its own configuration, Deliveries, and release history. Multiple Targets can use the same generator.
|
|
401
448
|
|
|
402
449
|
| Argument or flag | In | Type | Required | Description |
|
|
403
450
|
| --- | --- | --- | --- | --- |
|
|
404
451
|
| `<project_id>` | path | `string` | yes | Accepts an ID or an exact name (resolved via projects_list). IDs come from projects_list. |
|
|
405
452
|
| `--name` | body | `string` | yes | — |
|
|
406
453
|
| `--definition-id` | body | `string` | yes | Unique identifier for a project's logical API Definition. |
|
|
407
|
-
| `--generator` | body | `string` | yes | Generator implementation selected by a Target. This is configuration, not identity; several Targets may use the same generator. |
|
|
454
|
+
| `--generator` | body | `string` | yes | Generator implementation selected by a Target. This is configuration, not identity; several Targets may use the same generator. cli is the TypeScript CLI; go-cli is the native Go CLI, a distinct product that imports one exact paired Go SDK module rather than a client of its own. |
|
|
408
455
|
| `--state` | body | `string` | no | Default: "active". |
|
|
409
456
|
| `--edition` | body | `string` | no | Default: "2026-08-24". |
|
|
410
457
|
| `--release-channel` | body | `string` | no | Default: "stable". |
|
|
411
458
|
| `--proposed-version` | body | `string` | no | Optional larger or prerelease SemVer for the next reviewed release. |
|
|
459
|
+
| `--checks` | body | `object` | no | Required checks run against the complete combined package. Generated checks and customer commands share one reproducible workflow; repository_required names existing repository checks. Supplying checks replaces all settings. Omitted generated restores build, package, and public_entrypoint; omitted repository_required and customer restore empty lists. An empty object restores these defaults. An empty array clears the corresponding list. |
|
|
412
460
|
| `--config` | body | `json` | no | Target-specific overrides merged over Project.config. GraphQL settings are rejected here and belong to the Definition. |
|
|
413
461
|
| `--deliveries` | body | `array` | no | — |
|
|
414
|
-
| `--idempotency-key` | header | `string` | no | Identifies one logical write for 24 hours. The key is scoped to the authenticated account and operation; account-less generation uses a hashed network identity. Retrying the same method, path, query, and JSON body replays the original response. Reusing the key with changed intent returns 409. After expiry the key starts a new write. |
|
|
462
|
+
| `--idempotency-key` | header | `string` | no | Identifies one logical write for 24 hours. The key is scoped to the authenticated account and operation; account-less generation uses a hashed network identity. Retrying the same method, path, query, If-Match header, and JSON body replays the original response. Reusing the key with changed intent returns 409. After expiry the key starts a new write. |
|
|
415
463
|
|
|
416
464
|
Use `--data '<json>'`, `--data @body.json`, or `--data -` to supply the request body. Field flags override matching body fields.
|
|
417
465
|
|
|
418
466
|
```sh
|
|
419
|
-
typeship targets create prj_4f8k2m7x9q1v6b3n --name
|
|
467
|
+
typeship targets create prj_4f8k2m7x9q1v6b3n --name 'Parcel CLI' --definition-id def_2p8m4q7k1v9d6h3c --generator cli --config '{"cli":{"command_name":"parcel"}}' --deliveries '[{"kind":"repository","repository":{"provider":"github","identifier":"parcel-example/parcel-client"},"package_name":"parcel-client","publish_on_merge":false}]'
|
|
420
468
|
```
|
|
421
469
|
|
|
422
470
|
Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
|
|
@@ -451,11 +499,14 @@ Delete an unused Target
|
|
|
451
499
|
|
|
452
500
|
Safety: **destructive** · Authentication: **required**
|
|
453
501
|
|
|
454
|
-
|
|
502
|
+
Deletes a Target with no Generation history, release history, or active Draft. A `409 resource_has_dependencies` means one of those resources still depends on it. Retrieve the Target, disable it instead, or resolve the dependency before retrying.
|
|
503
|
+
|
|
504
|
+
See [conditional writes](https://typeship.dev/docs/typeship-api#conditional-writes) for ETag and If-Match.
|
|
455
505
|
|
|
456
506
|
| Argument or flag | In | Type | Required | Description |
|
|
457
507
|
| --- | --- | --- | --- | --- |
|
|
458
508
|
| `<target_id>` | path | `string` | yes | — |
|
|
509
|
+
| `--if-match` | header | `string` | no | ETag from a preceding response. The write applies only if the resource still has that version; otherwise it returns 412 precondition_failed without changes. Omit to write the current version. See https://typeship.dev/docs/typeship-api#conditional-writes. |
|
|
459
510
|
|
|
460
511
|
```sh
|
|
461
512
|
typeship targets delete tgt_5m8q2v7k1p9d4h6c --force
|
|
@@ -473,6 +524,14 @@ Update a Target, its Deliveries, or its next reviewed version
|
|
|
473
524
|
|
|
474
525
|
Safety: **write** · Authentication: **required**
|
|
475
526
|
|
|
527
|
+
Omitted fields keep their current values. Supplied config, checks, and deliveries replace their complete stored values.
|
|
528
|
+
Omitting If-Match applies the update to the current resource; with If-Match, a stale ETag returns 412 precondition_failed without saving.
|
|
529
|
+
Send proposed_version by itself; use the Draft endpoint to select a version directly.
|
|
530
|
+
|
|
531
|
+
A `409 target_busy` means the Target is publishing; wait for it to finish. A `409 delivery_conflict` means another Target owns the requested repository tree; retrieve both Targets, choose a free destination, and retry.
|
|
532
|
+
A `502` response means the update was saved, but retiring an obsolete review or regenerating a version selection failed. Retrieve the Target and follow the error's retryable and suggested_action fields. Repeating an unfinished version selection resumes generation; repeating a completed selection starts no new work.
|
|
533
|
+
See [conditional writes](https://typeship.dev/docs/typeship-api#conditional-writes) for ETag and If-Match.
|
|
534
|
+
|
|
476
535
|
| Argument or flag | In | Type | Required | Description |
|
|
477
536
|
| --- | --- | --- | --- | --- |
|
|
478
537
|
| `<target_id>` | path | `string` | yes | — |
|
|
@@ -480,14 +539,16 @@ Safety: **write** · Authentication: **required**
|
|
|
480
539
|
| `--state` | body | `string` | no | — |
|
|
481
540
|
| `--edition` | body | `string` | no | — |
|
|
482
541
|
| `--release-channel` | body | `string` | no | — |
|
|
483
|
-
| `--proposed-version` | body | `string` | no |
|
|
484
|
-
| `--
|
|
485
|
-
| `--
|
|
542
|
+
| `--proposed-version` | body | `string` | no | Send only this field to select an exact SemVer, or null for automatic selection. The Target and Draft endpoints both support an optional If-Match precondition. |
|
|
543
|
+
| `--checks` | body | `object` | no | Required checks run against the complete combined package. Generated checks and customer commands share one reproducible workflow; repository_required names existing repository checks. Supplying checks replaces all settings. Omitted generated restores build, package, and public_entrypoint; omitted repository_required and customer restore empty lists. An empty object restores these defaults. An empty array clears the corresponding list. |
|
|
544
|
+
| `--config` | body | `json` | no | Replaces the complete stored override object. Send null or an empty object to resume Project inheritance. Effective values merge over Project.config; GraphQL settings belong to the Definition. |
|
|
545
|
+
| `--deliveries` | body | `array` | no | Replaces the Delivery set; include each kind you want to keep. Retained kinds preserve their ID, creation time, and hosted URL. Each supplied Delivery replaces its configuration, so omitted optional settings reset to their defaults. Omit deliveries to keep the existing set, or send [] to remove all Deliveries. Removing and later recreating a kind allocates a new ID and, for hosted_mcp, a new URL. |
|
|
546
|
+
| `--if-match` | header | `string` | no | ETag from a preceding response. The write applies only if the resource still has that version; otherwise it returns 412 precondition_failed without changes. Omit to write the current version. See https://typeship.dev/docs/typeship-api#conditional-writes. |
|
|
486
547
|
|
|
487
548
|
Use `--data '<json>'`, `--data @body.json`, or `--data -` to supply the request body. Field flags override matching body fields.
|
|
488
549
|
|
|
489
550
|
```sh
|
|
490
|
-
typeship targets update tgt_5m8q2v7k1p9d4h6c
|
|
551
|
+
typeship targets update tgt_5m8q2v7k1p9d4h6c --state disabled
|
|
491
552
|
```
|
|
492
553
|
|
|
493
554
|
Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
|
|
@@ -505,8 +566,8 @@ Safety: **read** · Authentication: **required**
|
|
|
505
566
|
| Argument or flag | In | Type | Required | Description |
|
|
506
567
|
| --- | --- | --- | --- | --- |
|
|
507
568
|
| `<target_id>` | path | `string` | yes | — |
|
|
508
|
-
| `--limit` | query | `number` | no | Maximum number of resources to return. Default: 20. |
|
|
509
|
-
| `--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. |
|
|
569
|
+
| `--limit` | query | `number` | no | Maximum number of resources to return. Omit for 20; otherwise supply base-10 digits representing an integer from 1 to 100. Empty, malformed, or out-of-range values return 400 invalid_request. List query parameters must appear only once; unrecognized parameters also return 400. Default: 20. |
|
|
570
|
+
| `--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. Omit to start at the first page. Empty, malformed, or repeated cursors return 400 invalid_request. The page limit may change between requests. |
|
|
510
571
|
|
|
511
572
|
```sh
|
|
512
573
|
typeship targets list-releases tgt_5m8q2v7k1p9d4h6c
|
|
@@ -516,11 +577,92 @@ Output: JSON with `items` and `hasMore`; when another page exists, `nextPage` co
|
|
|
516
577
|
|
|
517
578
|
Read the full command contract with `typeship docs targets list-releases --json`.
|
|
518
579
|
|
|
580
|
+
### `typeship targets retrieve-draft <target_id> [flags]`
|
|
581
|
+
|
|
582
|
+
Retrieve a Target's rolling Draft release
|
|
583
|
+
|
|
584
|
+
`GET /targets/{target_id}/draft`
|
|
585
|
+
|
|
586
|
+
Safety: **read** · Authentication: **required**
|
|
587
|
+
|
|
588
|
+
Returns the Draft's status and its one next step, Current's version, the proposed version, readiness, checks, and conflict counts. Every status is described on `status`. The response carries an `ETag`; send it in `If-Match` when updating the Draft to avoid changing a newer version selection.
|
|
589
|
+
|
|
590
|
+
| Argument or flag | In | Type | Required | Description |
|
|
591
|
+
| --- | --- | --- | --- | --- |
|
|
592
|
+
| `<target_id>` | path | `string` | yes | — |
|
|
593
|
+
|
|
594
|
+
```sh
|
|
595
|
+
typeship targets retrieve-draft tgt_5m8q2v7k1p9d4h6c
|
|
596
|
+
```
|
|
597
|
+
|
|
598
|
+
Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
|
|
599
|
+
|
|
600
|
+
Read the full command contract with `typeship docs targets retrieve-draft --json`.
|
|
601
|
+
|
|
602
|
+
### `typeship targets update-draft <target_id> [flags]`
|
|
603
|
+
|
|
604
|
+
Select an exact Draft version or return to automatic versioning
|
|
605
|
+
|
|
606
|
+
`PATCH /targets/{target_id}/draft`
|
|
607
|
+
|
|
608
|
+
Safety: **write** · Authentication: **required**
|
|
609
|
+
|
|
610
|
+
Checks your version choice against the required version bump, then regenerates the existing Draft pull request.
|
|
611
|
+
|
|
612
|
+
Send the Draft's `ETag` in `If-Match` to reject an intervening change with 412 precondition_failed before saving or regenerating. Omitting `If-Match` applies the selection to the current Draft. Version is required; null restores automatic selection.
|
|
613
|
+
|
|
614
|
+
A `502` response means the selected version was saved, but regeneration failed. Follow the error's retryable and suggested_action fields. Repeating an unfinished selection resumes generation; repeating a completed selection starts no new work. If using If-Match, retrieve the Draft and confirm the saved selection before retrying with its current ETag.
|
|
615
|
+
A `409 target_busy` means the Target is publishing; wait and retry. A `409 version_occupied` means the version is already released; retrieve the Draft and releases, choose a new version, and retry.
|
|
616
|
+
See [conditional writes](https://typeship.dev/docs/typeship-api#conditional-writes) for ETag and If-Match.
|
|
617
|
+
|
|
618
|
+
| Argument or flag | In | Type | Required | Description |
|
|
619
|
+
| --- | --- | --- | --- | --- |
|
|
620
|
+
| `<target_id>` | path | `string` | yes | — |
|
|
621
|
+
| `--body-version` | body | `string` | yes | Exact SemVer, or null to return to automatic selection. |
|
|
622
|
+
| `--if-match` | header | `string` | no | ETag from a preceding response. The write applies only if the resource still has that version; otherwise it returns 412 precondition_failed without changes. Omit to write the current version. See https://typeship.dev/docs/typeship-api#conditional-writes. |
|
|
623
|
+
|
|
624
|
+
Use `--data '<json>'`, `--data @body.json`, or `--data -` to supply the request body. Field flags override matching body fields.
|
|
625
|
+
|
|
626
|
+
```sh
|
|
627
|
+
typeship targets update-draft tgt_5m8q2v7k1p9d4h6c --body-version 1.1.0
|
|
628
|
+
```
|
|
629
|
+
|
|
630
|
+
Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
|
|
631
|
+
|
|
632
|
+
Read the full command contract with `typeship docs targets update-draft --json`.
|
|
633
|
+
|
|
634
|
+
### `typeship targets adopt-release <target_id> [flags]`
|
|
635
|
+
|
|
636
|
+
Adopt a verified existing package as Current
|
|
637
|
+
|
|
638
|
+
`POST /targets/{target_id}/adopt`
|
|
639
|
+
|
|
640
|
+
Safety: **write** · Authentication: **required**
|
|
641
|
+
|
|
642
|
+
Checks the repository tag, package metadata, and registry artifact, then records the package as an Imported Current release. Opens the first Typeship Draft at the next major version; review it to establish the baseline for preserving existing code.
|
|
643
|
+
|
|
644
|
+
| Argument or flag | In | Type | Required | Description |
|
|
645
|
+
| --- | --- | --- | --- | --- |
|
|
646
|
+
| `<target_id>` | path | `string` | yes | — |
|
|
647
|
+
| `--body-version` | body | `string` | yes | Exact already-published package version to make Current. |
|
|
648
|
+
| `--tag` | body | `string` | yes | Immutable repository tag containing the matching package source. |
|
|
649
|
+
| `--idempotency-key` | header | `string` | no | Identifies one logical write for 24 hours. The key is scoped to the authenticated account and operation; account-less generation uses a hashed network identity. Retrying the same method, path, query, If-Match header, and JSON body replays the original response. Reusing the key with changed intent returns 409. After expiry the key starts a new write. |
|
|
650
|
+
|
|
651
|
+
Use `--data '<json>'`, `--data @body.json`, or `--data -` to supply the request body. Field flags override matching body fields.
|
|
652
|
+
|
|
653
|
+
```sh
|
|
654
|
+
typeship targets adopt-release tgt_5m8q2v7k1p9d4h6c --body-version 1.0.0 --tag v1.0.0
|
|
655
|
+
```
|
|
656
|
+
|
|
657
|
+
Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
|
|
658
|
+
|
|
659
|
+
Read the full command contract with `typeship docs targets adopt-release --json`.
|
|
660
|
+
|
|
519
661
|
### `typeship targets retrieve-release <target_release_id> [flags]`
|
|
520
662
|
|
|
521
663
|
Retrieve an immutable Target release
|
|
522
664
|
|
|
523
|
-
`GET /
|
|
665
|
+
`GET /target-releases/{target_release_id}`
|
|
524
666
|
|
|
525
667
|
Safety: **read** · Authentication: **required**
|
|
526
668
|
|
|
@@ -536,6 +678,211 @@ Output: the response payload as JSON on stdout. A successful response without a
|
|
|
536
678
|
|
|
537
679
|
Read the full command contract with `typeship docs targets retrieve-release --json`.
|
|
538
680
|
|
|
681
|
+
### `typeship targets republish-release <target_release_id> [flags]`
|
|
682
|
+
|
|
683
|
+
Retry publication of an exact Target release
|
|
684
|
+
|
|
685
|
+
`POST /target-releases/{target_release_id}/republish`
|
|
686
|
+
|
|
687
|
+
Safety: **write** · Authentication: **required**
|
|
688
|
+
|
|
689
|
+
Retries publication of the specified release through its repository workflow. Uses that release's version and accepted commit, even if a newer Draft or release exists.
|
|
690
|
+
|
|
691
|
+
A `502` response means the repository publication workflow could not be dispatched.
|
|
692
|
+
|
|
693
|
+
| Argument or flag | In | Type | Required | Description |
|
|
694
|
+
| --- | --- | --- | --- | --- |
|
|
695
|
+
| `<target_release_id>` | path | `string` | yes | — |
|
|
696
|
+
| `--idempotency-key` | header | `string` | no | Identifies one logical write for 24 hours. The key is scoped to the authenticated account and operation; account-less generation uses a hashed network identity. Retrying the same method, path, query, If-Match header, and JSON body replays the original response. Reusing the key with changed intent returns 409. After expiry the key starts a new write. |
|
|
697
|
+
|
|
698
|
+
```sh
|
|
699
|
+
typeship targets republish-release rel_7m2q8v4k1p9d5h6c
|
|
700
|
+
```
|
|
701
|
+
|
|
702
|
+
Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
|
|
703
|
+
|
|
704
|
+
Read the full command contract with `typeship docs targets republish-release --json`.
|
|
705
|
+
|
|
706
|
+
### `typeship targets list-draft-files <target_id> [flags]`
|
|
707
|
+
|
|
708
|
+
List customized and conflicted files on a Draft
|
|
709
|
+
|
|
710
|
+
`GET /targets/{target_id}/draft/files`
|
|
711
|
+
|
|
712
|
+
Safety: **read** · Authentication: **required**
|
|
713
|
+
|
|
714
|
+
Lists the Draft's files that differ from the last accepted package or need a conflict decision, ordered by path, without file content. Each conflict names its kind, where the incoming version comes from, the saved decision, and the sides you can read with retrieveDraftFileContent. With `filter=history`, lists the files affected by a default-branch history rewrite instead; the list is empty when none is pending.
|
|
715
|
+
|
|
716
|
+
Returns `409 stale_draft` while Typeship has not integrated the Draft's latest commit (Draft status generating or branch_changed), or when the Draft changes between pages.
|
|
717
|
+
|
|
718
|
+
| Argument or flag | In | Type | Required | Description |
|
|
719
|
+
| --- | --- | --- | --- | --- |
|
|
720
|
+
| `<target_id>` | path | `string` | yes | — |
|
|
721
|
+
| `--filter` | query | `string` | no | conflicted: conflicts only. customized: files that differ from the last accepted package. history: files affected by a default-branch history rewrite. Omit for conflicted and customized files. |
|
|
722
|
+
| `--limit` | query | `number` | no | Maximum number of resources to return. Omit for 20; otherwise supply base-10 digits representing an integer from 1 to 100. Empty, malformed, or out-of-range values return 400 invalid_request. List query parameters must appear only once; unrecognized parameters also return 400. Default: 20. |
|
|
723
|
+
| `--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. Omit to start at the first page. Empty, malformed, or repeated cursors return 400 invalid_request. The page limit may change between requests. |
|
|
724
|
+
|
|
725
|
+
```sh
|
|
726
|
+
typeship targets list-draft-files tgt_5m8q2v7k1p9d4h6c
|
|
727
|
+
```
|
|
728
|
+
|
|
729
|
+
Output: JSON with `items` and `hasMore`; when another page exists, `nextPage` contains its arguments and `nextCommand` contains the command to fetch it. Use `--all` to stream every item from every page as NDJSON.
|
|
730
|
+
|
|
731
|
+
Read the full command contract with `typeship docs targets list-draft-files --json`.
|
|
732
|
+
|
|
733
|
+
### `typeship targets retrieve-draft-file-content <target_id> [flags]`
|
|
734
|
+
|
|
735
|
+
Read one side of a Draft file
|
|
736
|
+
|
|
737
|
+
`GET /targets/{target_id}/draft/files/content`
|
|
738
|
+
|
|
739
|
+
Safety: **read** · Authentication: **required**
|
|
740
|
+
|
|
741
|
+
Returns up to 24 KiB of one side of a conflicted or history-affected file: text as UTF-8, binary content as base64. Follow `next_cursor` with the same path and side to read the rest, and concatenate the chunks in order. A side where the file is absent returns 404.
|
|
742
|
+
|
|
743
|
+
| Argument or flag | In | Type | Required | Description |
|
|
744
|
+
| --- | --- | --- | --- | --- |
|
|
745
|
+
| `<target_id>` | path | `string` | yes | — |
|
|
746
|
+
| `--path` | query | `string` | yes | File path from listDraftFiles. |
|
|
747
|
+
| `--side` | query | `string` | yes | A side listed for the file. |
|
|
748
|
+
| `--cursor` | query | `string` | no | next_cursor from the preceding chunk of the same path and side. |
|
|
749
|
+
|
|
750
|
+
```sh
|
|
751
|
+
typeship targets retrieve-draft-file-content tgt_5m8q2v7k1p9d4h6c --path src/index.ts --side base
|
|
752
|
+
```
|
|
753
|
+
|
|
754
|
+
Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
|
|
755
|
+
|
|
756
|
+
Read the full command contract with `typeship docs targets retrieve-draft-file-content --json`.
|
|
757
|
+
|
|
758
|
+
### `typeship targets resolve-draft-conflicts <target_id> [flags]`
|
|
759
|
+
|
|
760
|
+
Resolve selected Draft conflicts
|
|
761
|
+
|
|
762
|
+
`POST /targets/{target_id}/draft/conflicts/resolve`
|
|
763
|
+
|
|
764
|
+
Safety: **write** · Authentication: **required**
|
|
765
|
+
|
|
766
|
+
Saves decisions for conflicts on the Draft's head_revision: keep the repository or incoming version, or supply the final content as text or, for binary files, base64. Decisions save together or not at all, and a decision can be replaced until it is applied. Use `dry_run` to validate them first.
|
|
767
|
+
|
|
768
|
+
Saving changes no files. When every conflict has a decision, `remaining_conflicts` is 0 and the Draft status becomes `needs_generation`: generate the Target to apply the decisions and run its checks. Applying them can report conflicts from the next merge stage.
|
|
769
|
+
|
|
770
|
+
| Argument or flag | In | Type | Required | Description |
|
|
771
|
+
| --- | --- | --- | --- | --- |
|
|
772
|
+
| `<target_id>` | path | `string` | yes | — |
|
|
773
|
+
| `--expected-head-revision` | body | `string` | yes | The Draft's head_revision. A newer Draft commit returns 409 stale_draft without saving. |
|
|
774
|
+
| `--resolutions` | body | `array` | yes | Unique current conflict paths. Final file content must total at most 2 MiB. Decisions save together or not at all. |
|
|
775
|
+
| `--dry-run` | body | `boolean` | no | Validate the decisions and return the planned files without saving. Default: false. |
|
|
776
|
+
|
|
777
|
+
Use `--data '<json>'`, `--data @body.json`, or `--data -` to supply the request body. Field flags override matching body fields.
|
|
778
|
+
|
|
779
|
+
```sh
|
|
780
|
+
typeship targets resolve-draft-conflicts tgt_5m8q2v7k1p9d4h6c --expected-head-revision 0123456789abcdef0123456789abcdef01234567 --resolutions '[{"path":"src/index.ts","keep":"content","mode":"100644","content":"export { ParcelClient } from \"./client.js\";\nexport type { Shipment, Label } from \"./types.js\";\nexport { createParcelClient } from \"./helper.js\";\n"}]'
|
|
781
|
+
```
|
|
782
|
+
|
|
783
|
+
Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
|
|
784
|
+
|
|
785
|
+
Read the full command contract with `typeship docs targets resolve-draft-conflicts --json`.
|
|
786
|
+
|
|
787
|
+
### `typeship targets discard-draft-customizations <target_id> [flags]`
|
|
788
|
+
|
|
789
|
+
Discard selected Draft customizations
|
|
790
|
+
|
|
791
|
+
`POST /targets/{target_id}/draft/customizations/discard`
|
|
792
|
+
|
|
793
|
+
Safety: **write** · Authentication: **required**
|
|
794
|
+
|
|
795
|
+
Replaces the listed customized paths that are not conflicts with the generated files, in one commit on the Draft branch. A listed file that exists only on the Draft is deleted. Use `dry_run` to see the planned writes and deletions first. Resolve conflicts with resolveDraftConflicts.
|
|
796
|
+
|
|
797
|
+
After the commit, the Draft status is `branch_changed` until Typeship integrates it from the repository's pull request event and reruns the checks; you do not need to generate the Target.
|
|
798
|
+
|
|
799
|
+
| Argument or flag | In | Type | Required | Description |
|
|
800
|
+
| --- | --- | --- | --- | --- |
|
|
801
|
+
| `<target_id>` | path | `string` | yes | — |
|
|
802
|
+
| `--expected-head-revision` | body | `string` | yes | The Draft's head_revision. A newer Draft commit returns 409 stale_draft without committing. |
|
|
803
|
+
| `--paths` | body | `array` | yes | Customized paths that are not conflicts, to replace with the generated files. A listed file that exists only on the Draft is deleted. |
|
|
804
|
+
| `--dry-run` | body | `boolean` | no | Return the planned writes and deletions without committing. Default: false. |
|
|
805
|
+
|
|
806
|
+
Use `--data '<json>'`, `--data @body.json`, or `--data -` to supply the request body. Field flags override matching body fields.
|
|
807
|
+
|
|
808
|
+
```sh
|
|
809
|
+
typeship targets discard-draft-customizations tgt_5m8q2v7k1p9d4h6c --expected-head-revision 0123456789abcdef0123456789abcdef01234567 --paths '["src/helper.ts"]' --dry-run true
|
|
810
|
+
```
|
|
811
|
+
|
|
812
|
+
Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
|
|
813
|
+
|
|
814
|
+
Read the full command contract with `typeship docs targets discard-draft-customizations --json`.
|
|
815
|
+
|
|
816
|
+
### `typeship targets recover-draft-history <target_id> [flags]`
|
|
817
|
+
|
|
818
|
+
Approve recovery from rewritten default-branch history
|
|
819
|
+
|
|
820
|
+
`POST /targets/{target_id}/draft/history/recover`
|
|
821
|
+
|
|
822
|
+
Safety: **write** · Authentication: **required**
|
|
823
|
+
|
|
824
|
+
When the Draft status is `history_rewritten`, review the affected files with `listDraftFiles` and `filter=history`, then approve with the Draft's `history_recovery` revisions. Approval saves the recovery without changing Git, and the Draft status becomes `needs_generation`: generate the Target to open a new Draft from the rewritten default branch. The previous Draft branch stays available, and overlapping code comes back as conflicts to resolve. A rewritten Draft branch alone needs no approval.
|
|
825
|
+
|
|
826
|
+
| Argument or flag | In | Type | Required | Description |
|
|
827
|
+
| --- | --- | --- | --- | --- |
|
|
828
|
+
| `<target_id>` | path | `string` | yes | — |
|
|
829
|
+
| `--expected-default-revision` | body | `string` | yes | The Draft's history_recovery.default_revision. |
|
|
830
|
+
| `--expected-head-revision` | body | `string` | yes | The Draft's history_recovery.head_revision; null when the Draft branch is absent. |
|
|
831
|
+
|
|
832
|
+
Use `--data '<json>'`, `--data @body.json`, or `--data -` to supply the request body. Field flags override matching body fields.
|
|
833
|
+
|
|
834
|
+
```sh
|
|
835
|
+
typeship targets recover-draft-history tgt_5m8q2v7k1p9d4h6c --expected-default-revision 89abcdef0123456789abcdef0123456789abcdef --expected-head-revision 0123456789abcdef0123456789abcdef01234567
|
|
836
|
+
```
|
|
837
|
+
|
|
838
|
+
Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
|
|
839
|
+
|
|
840
|
+
Read the full command contract with `typeship docs targets recover-draft-history --json`.
|
|
841
|
+
|
|
842
|
+
### `typeship targets retrieve-delivery <delivery_id> [flags]`
|
|
843
|
+
|
|
844
|
+
Retrieve a Delivery
|
|
845
|
+
|
|
846
|
+
`GET /deliveries/{delivery_id}`
|
|
847
|
+
|
|
848
|
+
Safety: **read** · Authentication: **required**
|
|
849
|
+
|
|
850
|
+
Returns the configured repository or hosted MCP Delivery for a Target. A Delivery in another organization returns 404 not_found.
|
|
851
|
+
|
|
852
|
+
| Argument or flag | In | Type | Required | Description |
|
|
853
|
+
| --- | --- | --- | --- | --- |
|
|
854
|
+
| `<delivery_id>` | path | `string` | yes | — |
|
|
855
|
+
|
|
856
|
+
```sh
|
|
857
|
+
typeship targets retrieve-delivery dlv_4q8m2v7k1p9d5h6c
|
|
858
|
+
```
|
|
859
|
+
|
|
860
|
+
Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
|
|
861
|
+
|
|
862
|
+
Read the full command contract with `typeship docs targets retrieve-delivery --json`.
|
|
863
|
+
|
|
864
|
+
### `typeship targets retrieve-publication <publication_id> [flags]`
|
|
865
|
+
|
|
866
|
+
Retrieve a Publication
|
|
867
|
+
|
|
868
|
+
`GET /publications/{publication_id}`
|
|
869
|
+
|
|
870
|
+
Safety: **read** · Authentication: **required**
|
|
871
|
+
|
|
872
|
+
Returns the current registry publication state for a Target Release. A Publication in another organization returns 404 not_found.
|
|
873
|
+
|
|
874
|
+
| Argument or flag | In | Type | Required | Description |
|
|
875
|
+
| --- | --- | --- | --- | --- |
|
|
876
|
+
| `<publication_id>` | path | `string` | yes | — |
|
|
877
|
+
|
|
878
|
+
```sh
|
|
879
|
+
typeship targets retrieve-publication pub_2m8q4v7k1p9d5h6c
|
|
880
|
+
```
|
|
881
|
+
|
|
882
|
+
Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
|
|
883
|
+
|
|
884
|
+
Read the full command contract with `typeship docs targets retrieve-publication --json`.
|
|
885
|
+
|
|
539
886
|
## generations
|
|
540
887
|
|
|
541
888
|
### `typeship generations retrieve <generation_id> [flags]`
|
|
@@ -546,7 +893,7 @@ Retrieve a generation
|
|
|
546
893
|
|
|
547
894
|
Safety: **read** · Authentication: **required**
|
|
548
895
|
|
|
549
|
-
|
|
896
|
+
Returns the current Generation status. `queued` and `running` mean generation is still in progress. `succeeded` means generated files are saved, not that repository delivery or a Draft is complete. Successful results include files, or a file index when the package is too large to inline.
|
|
550
897
|
|
|
551
898
|
| Argument or flag | In | Type | Required | Description |
|
|
552
899
|
| --- | --- | --- | --- | --- |
|
|
@@ -568,7 +915,7 @@ Fetch one file from a generation
|
|
|
568
915
|
|
|
569
916
|
Safety: **read** · Authentication: **required**
|
|
570
917
|
|
|
571
|
-
|
|
918
|
+
Returns one file's raw content. Use a path from `files_index` when the Generation reports `files_omitted: true`.
|
|
572
919
|
|
|
573
920
|
| Argument or flag | In | Type | Required | Description |
|
|
574
921
|
| --- | --- | --- | --- | --- |
|
|
@@ -576,7 +923,7 @@ Raw file content, for generations whose target was too large to inline (files_om
|
|
|
576
923
|
| `--path` | query | `string` | yes | Repo-relative path inside the generated package. |
|
|
577
924
|
|
|
578
925
|
```sh
|
|
579
|
-
typeship generations retrieve-file gen_7h2p5d9c3m8w1k6q --path
|
|
926
|
+
typeship generations retrieve-file gen_7h2p5d9c3m8w1k6q --path README.md
|
|
580
927
|
```
|
|
581
928
|
|
|
582
929
|
Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
|
|
@@ -593,13 +940,13 @@ List Definition Revisions
|
|
|
593
940
|
|
|
594
941
|
Safety: **read** · Authentication: **required**
|
|
595
942
|
|
|
596
|
-
|
|
943
|
+
Lists the Definition's revisions, newest first. Source content is not included; retrieve the revision content or individual documents separately.
|
|
597
944
|
|
|
598
945
|
| Argument or flag | In | Type | Required | Description |
|
|
599
946
|
| --- | --- | --- | --- | --- |
|
|
600
947
|
| `<definition_id>` | path | `string` | yes | — |
|
|
601
|
-
| `--limit` | query | `number` | no | Maximum number of resources to return. Default: 20. |
|
|
602
|
-
| `--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. |
|
|
948
|
+
| `--limit` | query | `number` | no | Maximum number of resources to return. Omit for 20; otherwise supply base-10 digits representing an integer from 1 to 100. Empty, malformed, or out-of-range values return 400 invalid_request. List query parameters must appear only once; unrecognized parameters also return 400. Default: 20. |
|
|
949
|
+
| `--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. Omit to start at the first page. Empty, malformed, or repeated cursors return 400 invalid_request. The page limit may change between requests. |
|
|
603
950
|
|
|
604
951
|
```sh
|
|
605
952
|
typeship definition-revisions list def_2p8m4q7k1v9d6h3c
|
|
@@ -613,11 +960,11 @@ Read the full command contract with `typeship docs definition-revisions list --j
|
|
|
613
960
|
|
|
614
961
|
Retrieve a Definition Revision
|
|
615
962
|
|
|
616
|
-
`GET /
|
|
963
|
+
`GET /definition-revisions/{definition_revision_id}`
|
|
617
964
|
|
|
618
965
|
Safety: **read** · Authentication: **required**
|
|
619
966
|
|
|
620
|
-
|
|
967
|
+
Returns metadata for a saved Definition Revision. Retrieve its resolved content or individual source documents separately.
|
|
621
968
|
|
|
622
969
|
| Argument or flag | In | Type | Required | Description |
|
|
623
970
|
| --- | --- | --- | --- | --- |
|
|
@@ -635,11 +982,11 @@ Read the full command contract with `typeship docs definition-revisions retrieve
|
|
|
635
982
|
|
|
636
983
|
Retrieve a Definition Revision's canonical content
|
|
637
984
|
|
|
638
|
-
`GET /
|
|
985
|
+
`GET /definition-revisions/{definition_revision_id}/content`
|
|
639
986
|
|
|
640
987
|
Safety: **read** · Authentication: **required**
|
|
641
988
|
|
|
642
|
-
Returns the
|
|
989
|
+
Returns the saved, resolved content for this revision. Save it locally or compare it with another revision.
|
|
643
990
|
|
|
644
991
|
| Argument or flag | In | Type | Required | Description |
|
|
645
992
|
| --- | --- | --- | --- | --- |
|
|
@@ -657,7 +1004,7 @@ Read the full command contract with `typeship docs definition-revisions retrieve
|
|
|
657
1004
|
|
|
658
1005
|
Retrieve one source document from a Definition Revision
|
|
659
1006
|
|
|
660
|
-
`GET /
|
|
1007
|
+
`GET /definition-revisions/{definition_revision_id}/documents/{document_id}/content`
|
|
661
1008
|
|
|
662
1009
|
Safety: **read** · Authentication: **required**
|
|
663
1010
|
|
|
@@ -674,6 +1021,28 @@ Output: the response payload as JSON on stdout. A successful response without a
|
|
|
674
1021
|
|
|
675
1022
|
Read the full command contract with `typeship docs definition-revisions retrieve-document-content --json`.
|
|
676
1023
|
|
|
1024
|
+
### `typeship definition-revisions retrieve-document <definition_document_id> [flags]`
|
|
1025
|
+
|
|
1026
|
+
Retrieve a Definition Document
|
|
1027
|
+
|
|
1028
|
+
`GET /definition-documents/{definition_document_id}`
|
|
1029
|
+
|
|
1030
|
+
Safety: **read** · Authentication: **required**
|
|
1031
|
+
|
|
1032
|
+
Returns metadata for one source document captured in a Definition Revision. Retrieve its content through the revision's document content endpoint. A document in another organization returns 404 not_found.
|
|
1033
|
+
|
|
1034
|
+
| Argument or flag | In | Type | Required | Description |
|
|
1035
|
+
| --- | --- | --- | --- | --- |
|
|
1036
|
+
| `<definition_document_id>` | path | `string` | yes | — |
|
|
1037
|
+
|
|
1038
|
+
```sh
|
|
1039
|
+
typeship definition-revisions retrieve-document doc_8q2m5v1k9p4d7h3c
|
|
1040
|
+
```
|
|
1041
|
+
|
|
1042
|
+
Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
|
|
1043
|
+
|
|
1044
|
+
Read the full command contract with `typeship docs definition-revisions retrieve-document --json`.
|
|
1045
|
+
|
|
677
1046
|
## account
|
|
678
1047
|
|
|
679
1048
|
### `typeship account retrieve [flags]`
|
|
@@ -684,8 +1053,7 @@ The account behind the presented credentials
|
|
|
684
1053
|
|
|
685
1054
|
Safety: **read** · Authentication: **required**
|
|
686
1055
|
|
|
687
|
-
Returns the account
|
|
688
|
-
identity endpoint the generated typeship CLI's `whoami` calls.
|
|
1056
|
+
Returns the account associated with your credential. The Typeship CLI uses this endpoint for `whoami`.
|
|
689
1057
|
|
|
690
1058
|
```sh
|
|
691
1059
|
typeship account retrieve
|
|
@@ -701,16 +1069,16 @@ Read the full command contract with `typeship docs account retrieve --json`.
|
|
|
701
1069
|
|
|
702
1070
|
List API keys
|
|
703
1071
|
|
|
704
|
-
`GET /
|
|
1072
|
+
`GET /api-keys`
|
|
705
1073
|
|
|
706
1074
|
Safety: **read** · Authentication: **required**
|
|
707
1075
|
|
|
708
|
-
|
|
1076
|
+
Lists key metadata and the last four characters of each key. Full keys are not returned. Create keys in the Console.
|
|
709
1077
|
|
|
710
1078
|
| Argument or flag | In | Type | Required | Description |
|
|
711
1079
|
| --- | --- | --- | --- | --- |
|
|
712
|
-
| `--limit` | query | `number` | no | Maximum number of resources to return. Default: 20. |
|
|
713
|
-
| `--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. |
|
|
1080
|
+
| `--limit` | query | `number` | no | Maximum number of resources to return. Omit for 20; otherwise supply base-10 digits representing an integer from 1 to 100. Empty, malformed, or out-of-range values return 400 invalid_request. List query parameters must appear only once; unrecognized parameters also return 400. Default: 20. |
|
|
1081
|
+
| `--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. Omit to start at the first page. Empty, malformed, or repeated cursors return 400 invalid_request. The page limit may change between requests. |
|
|
714
1082
|
|
|
715
1083
|
```sh
|
|
716
1084
|
typeship api-keys list
|
|
@@ -720,22 +1088,48 @@ Output: JSON with `items` and `hasMore`; when another page exists, `nextPage` co
|
|
|
720
1088
|
|
|
721
1089
|
Read the full command contract with `typeship docs api-keys list --json`.
|
|
722
1090
|
|
|
1091
|
+
### `typeship api-keys retrieve <api_key_id> [flags]`
|
|
1092
|
+
|
|
1093
|
+
Retrieve an API key
|
|
1094
|
+
|
|
1095
|
+
`GET /api-keys/{api_key_id}`
|
|
1096
|
+
|
|
1097
|
+
Safety: **read** · Authentication: **required**
|
|
1098
|
+
|
|
1099
|
+
Returns the key summary and its ETag for conditional revocation.
|
|
1100
|
+
|
|
1101
|
+
| Argument or flag | In | Type | Required | Description |
|
|
1102
|
+
| --- | --- | --- | --- | --- |
|
|
1103
|
+
| `<api_key_id>` | path | `string` | yes | Accepts an ID or an exact name (resolved via api_keys_list). IDs come from api_keys_list. |
|
|
1104
|
+
|
|
1105
|
+
```sh
|
|
1106
|
+
typeship api-keys retrieve apikey_2nY8mR6pQ4vK9cH3
|
|
1107
|
+
```
|
|
1108
|
+
|
|
1109
|
+
Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
|
|
1110
|
+
|
|
1111
|
+
Read the full command contract with `typeship docs api-keys retrieve --json`.
|
|
1112
|
+
|
|
723
1113
|
### `typeship api-keys revoke <api_key_id> [flags]`
|
|
724
1114
|
|
|
725
1115
|
Revoke an API key
|
|
726
1116
|
|
|
727
|
-
`DELETE /
|
|
1117
|
+
`DELETE /api-keys/{api_key_id}`
|
|
728
1118
|
|
|
729
1119
|
Safety: **destructive** · Authentication: **required**
|
|
730
1120
|
|
|
731
|
-
|
|
1121
|
+
Revokes a key. Repeating the request returns the same result.
|
|
1122
|
+
|
|
1123
|
+
With OAuth, members can revoke their own keys; organization admins can revoke any key. Organization API keys can revoke any key in their account.
|
|
1124
|
+
See [conditional writes](https://typeship.dev/docs/typeship-api#conditional-writes) for ETag and If-Match.
|
|
732
1125
|
|
|
733
1126
|
| Argument or flag | In | Type | Required | Description |
|
|
734
1127
|
| --- | --- | --- | --- | --- |
|
|
735
1128
|
| `<api_key_id>` | path | `string` | yes | Accepts an ID or an exact name (resolved via api_keys_list). IDs come from api_keys_list. |
|
|
1129
|
+
| `--if-match` | header | `string` | no | ETag from a preceding response. The write applies only if the resource still has that version; otherwise it returns 412 precondition_failed without changes. Omit to write the current version. See https://typeship.dev/docs/typeship-api#conditional-writes. |
|
|
736
1130
|
|
|
737
1131
|
```sh
|
|
738
|
-
typeship api-keys revoke
|
|
1132
|
+
typeship api-keys revoke apikey_2nY8mR6pQ4vK9cH3 --force
|
|
739
1133
|
```
|
|
740
1134
|
|
|
741
1135
|
Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
|