@typeship-ax/cli 0.20.0 → 0.21.1

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.
Files changed (99) hide show
  1. package/AGENTS.md +3 -3
  2. package/README.md +2 -2
  3. package/api.json +7355 -6233
  4. package/api.md +332 -398
  5. package/dist/api-identity.d.ts.map +1 -1
  6. package/dist/api-identity.js +6 -1
  7. package/dist/cli.js +15 -15
  8. package/dist/core/http.d.ts +26 -14
  9. package/dist/core/http.d.ts.map +1 -1
  10. package/dist/core/http.js +90 -19
  11. package/dist/core/pagination.d.ts +8 -8
  12. package/dist/core/pagination.d.ts.map +1 -1
  13. package/dist/core/pagination.js +7 -16
  14. package/dist/errors.d.ts +4 -4
  15. package/dist/errors.d.ts.map +1 -1
  16. package/dist/errors.js +7 -7
  17. package/dist/index.d.ts +33 -19
  18. package/dist/index.d.ts.map +1 -1
  19. package/dist/index.js +37 -17
  20. package/dist/ops.d.ts +1 -1
  21. package/dist/ops.d.ts.map +1 -1
  22. package/dist/ops.js +39 -42
  23. package/dist/resources/api-keys.d.ts +10 -10
  24. package/dist/resources/api-keys.d.ts.map +1 -1
  25. package/dist/resources/api-keys.js +6 -6
  26. package/dist/resources/deliveries.d.ts +46 -0
  27. package/dist/resources/deliveries.d.ts.map +1 -0
  28. package/dist/resources/deliveries.js +70 -0
  29. package/dist/resources/drafts.d.ts +155 -0
  30. package/dist/resources/drafts.d.ts.map +1 -0
  31. package/dist/resources/drafts.js +230 -0
  32. package/dist/resources/files.d.ts +23 -0
  33. package/dist/resources/files.d.ts.map +1 -0
  34. package/dist/resources/files.js +38 -0
  35. package/dist/resources/generate.d.ts +14 -14
  36. package/dist/resources/generate.d.ts.map +1 -1
  37. package/dist/resources/generate.js +7 -7
  38. package/dist/resources/generations.d.ts +65 -21
  39. package/dist/resources/generations.d.ts.map +1 -1
  40. package/dist/resources/generations.js +67 -20
  41. package/dist/resources/organization.d.ts +18 -0
  42. package/dist/resources/organization.d.ts.map +1 -0
  43. package/dist/resources/{account.js → organization.js} +10 -10
  44. package/dist/resources/projects.d.ts +36 -126
  45. package/dist/resources/projects.d.ts.map +1 -1
  46. package/dist/resources/projects.js +21 -171
  47. package/dist/resources/publications.d.ts +46 -0
  48. package/dist/resources/publications.d.ts.map +1 -0
  49. package/dist/resources/publications.js +70 -0
  50. package/dist/resources/releases.d.ts +66 -0
  51. package/dist/resources/releases.d.ts.map +1 -0
  52. package/dist/resources/releases.js +101 -0
  53. package/dist/resources/spec-revisions.d.ts +85 -0
  54. package/dist/resources/spec-revisions.d.ts.map +1 -0
  55. package/dist/resources/spec-revisions.js +116 -0
  56. package/dist/resources/specs.d.ts +72 -0
  57. package/dist/resources/specs.d.ts.map +1 -0
  58. package/dist/resources/specs.js +107 -0
  59. package/dist/resources/targets.d.ts +42 -262
  60. package/dist/resources/targets.d.ts.map +1 -1
  61. package/dist/resources/targets.js +28 -407
  62. package/dist/schemas.d.ts.map +1 -1
  63. package/dist/schemas.js +149 -154
  64. package/dist/types.d.ts +1281 -1611
  65. package/dist/types.d.ts.map +1 -1
  66. package/dist/types.js +44 -49
  67. package/package.json +1 -1
  68. package/src/api-identity.ts +6 -2
  69. package/src/cli.ts +16 -16
  70. package/src/core/http.ts +89 -24
  71. package/src/core/pagination.ts +13 -23
  72. package/src/errors.ts +7 -7
  73. package/src/index.ts +41 -23
  74. package/src/ops.ts +40 -43
  75. package/src/resources/api-keys.ts +13 -16
  76. package/src/resources/deliveries.ts +139 -0
  77. package/src/resources/drafts.ts +422 -0
  78. package/src/resources/files.ts +68 -0
  79. package/src/resources/generate.ts +16 -19
  80. package/src/resources/generations.ts +146 -35
  81. package/src/resources/{account.ts → organization.ts} +14 -14
  82. package/src/resources/projects.ts +42 -337
  83. package/src/resources/publications.ts +139 -0
  84. package/src/resources/releases.ts +199 -0
  85. package/src/resources/spec-revisions.ts +237 -0
  86. package/src/resources/specs.ts +200 -0
  87. package/src/resources/targets.ts +57 -760
  88. package/src/schemas.ts +149 -154
  89. package/src/types.ts +1357 -1692
  90. package/dist/resources/account.d.ts +0 -18
  91. package/dist/resources/account.d.ts.map +0 -1
  92. package/dist/resources/definition-revisions.d.ts +0 -75
  93. package/dist/resources/definition-revisions.d.ts.map +0 -1
  94. package/dist/resources/definition-revisions.js +0 -142
  95. package/dist/resources/definitions.d.ts +0 -50
  96. package/dist/resources/definitions.d.ts.map +0 -1
  97. package/dist/resources/definitions.js +0 -73
  98. package/src/resources/definition-revisions.ts +0 -265
  99. package/src/resources/definitions.ts +0 -146
package/api.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # typeship — CLI reference
2
2
 
3
- API version 1.0.0. Package version 0.20.0. Generated by typeship.
3
+ API version 1.0.0. Package version 0.21.1. 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,7 +14,7 @@ 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 package from a Definition
17
+ Generate one package from a Spec
18
18
 
19
19
  `POST /generate`
20
20
 
@@ -24,26 +24,26 @@ Returns one generated package without creating a Project.
24
24
 
25
25
  Supports [idempotent retries](https://typeship.dev/docs/typeship-api/idempotency); keyed responses include generated files in the replay cache.
26
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.
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","coverage","warnings","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
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`.
29
+ Anonymous and Free requests include the first 25 operations. Paid plans include all operations. Anonymous requests are rate limited by IP address. Check `coverage` for omitted operations; an invalid API key returns `401`.
30
30
 
31
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.
32
32
 
33
33
  | Argument or flag | In | Type | Required | Description |
34
34
  | --- | --- | --- | --- | --- |
35
- | `--definition` | body | `json` | yes | A Definition for one-shot generation, provided as exactly one URL or inline entrypoint. |
35
+ | `--spec` | body | `json` | yes | A Spec for one-shot generation, provided as exactly one URL or inline entrypoint. |
36
36
  | `--target` | body | `object` | yes | One-shot generator descriptor; no persisted Target is created. |
37
37
  | `--package-name` | body | `string` | no | npm package or Python distribution override. Valid only for the TypeScript and Python SDK targets. |
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. |
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 Targets. 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.type 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 Spec, 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 Spec itself. One-shot generation also accepts GraphQL settings here; stored projects keep those settings on their Spec. |
41
+ | `--idempotency-key` | header | `string` | no | Identifies one logical write for 24 hours. The key is scoped to the authenticated organization and operation; generation without an organization 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. |
42
42
 
43
43
  Use `--data '<json>'`, `--data @body.json`, or `--data -` to supply the request body. Field flags override matching body fields.
44
44
 
45
45
  ```sh
46
- typeship generate run --definition '{"url":"https://typeship.dev/examples/petstore/openapi.yaml"}' --target '{"generator":"cli"}'
46
+ typeship generate run --spec '{"url":"https://typeship.dev/examples/petstore/openapi.yaml"}' --target '{"type":"cli"}'
47
47
  ```
48
48
 
49
49
  Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
@@ -87,7 +87,7 @@ Safety: **read** · Authentication: **required**
87
87
  | Argument or flag | In | Type | Required | Description |
88
88
  | --- | --- | --- | --- | --- |
89
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. |
90
+ | `--cursor` | query | `string` | no | Opaque cursor from the preceding page's next_cursor. Valid only for the same organization, 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. |
91
91
 
92
92
  ```sh
93
93
  typeship projects list
@@ -105,51 +105,51 @@ Create a project
105
105
 
106
106
  Safety: **write** · Authentication: **required**
107
107
 
108
- Creates a Project from a URL or GitHub Definition.
108
+ Creates a Project from a URL or GitHub Spec.
109
+ Automatic generation is enabled by default for a saved Project.
109
110
 
110
111
  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.
111
112
 
112
113
  | Argument or flag | In | Type | Required | Description |
113
114
  | --- | --- | --- | --- | --- |
114
115
  | `--name` | body | `string` | yes | — |
115
- | `--definition` | body | `object` | yes | — |
116
+ | `--spec` | body | `object` | yes | — |
116
117
  | `--targets` | body | `array` | yes | Initial first-class Targets. More than one may use the same generator with different identities or Deliveries. |
117
- | `--auto-generate` | body | `boolean` | no | Whether Typeship should regenerate automatically when the source changes. Default: false. |
118
- | `--relay-enabled` | body | `boolean` | no | Enable webhook relay sessions. Requires the CLI target and Pro. Default: false. |
119
- | `--config` | body | `json` | no | Shared defaults inherited by every Target. GraphQL settings belong in definition.graphql. |
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. |
118
+ | `--auto-generate` | body | `boolean` | no | Whether Typeship should regenerate automatically when the source or saved configuration changes. Default: true. |
119
+ | `--config` | body | `json` | no | Shared defaults inherited by every Target. GraphQL settings belong in spec.graphql. |
120
+ | `--idempotency-key` | header | `string` | no | Identifies one logical write for 24 hours. The key is scoped to the authenticated organization and operation; generation without an organization 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. |
121
121
 
122
122
  Use `--data '<json>'`, `--data @body.json`, or `--data -` to supply the request body. Field flags override matching body fields.
123
123
 
124
124
  ```sh
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}]}]'
125
+ typeship projects create --name 'Parcel API' --spec '{"source":{"type":"url","url":{"url":"https://api.parcel.example/openapi.json"}}}' --targets '[{"name":"Parcel CLI","type":"cli","deliveries":[{"type":"repository","repository":{"provider":"github","identifier":"parcel-example/parcel-client","package_name":"parcel-client","publish_on_merge":false}}]}]'
126
126
  ```
127
127
 
128
128
  Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
129
129
 
130
130
  Read the full command contract with `typeship docs projects create --json`.
131
131
 
132
- ### `typeship projects retrieve <project_id> [flags]`
132
+ ### `typeship projects get <project_id> [flags]`
133
133
 
134
- Retrieve a project
134
+ Get a project
135
135
 
136
136
  `GET /projects/{project_id}`
137
137
 
138
138
  Safety: **read** · Authentication: **required**
139
139
 
140
- Returns the Project's settings and Definition ID. List its Targets separately to retrieve Target configuration and Deliveries.
140
+ Returns the Project's settings and Spec ID. List its Targets separately to retrieve Target configuration and Deliveries.
141
141
 
142
142
  | Argument or flag | In | Type | Required | Description |
143
143
  | --- | --- | --- | --- | --- |
144
144
  | `<project_id>` | path | `string` | yes | Accepts an ID or an exact name (resolved via projects_list). IDs come from projects_list. |
145
145
 
146
146
  ```sh
147
- typeship projects retrieve prj_4f8k2m7x9q1v6b3n
147
+ typeship projects get prj_4f8k2m7x9q1v6b3n
148
148
  ```
149
149
 
150
150
  Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
151
151
 
152
- Read the full command contract with `typeship docs projects retrieve --json`.
152
+ Read the full command contract with `typeship docs projects get --json`.
153
153
 
154
154
  ### `typeship projects delete <project_id> [flags]`
155
155
 
@@ -184,9 +184,10 @@ Update a project
184
184
  Safety: **write** · Authentication: **required**
185
185
 
186
186
  Omitted fields keep their current values. A supplied config replaces the entire stored object; null or an empty object clears it.
187
+ With auto_generate enabled, changing shared config queues a Generation for each Target whose effective config changes. A queued or running Target reuses that Generation.
187
188
  Omitting If-Match applies the update to the current resource; with If-Match, a stale ETag returns 412 precondition_failed without saving.
188
189
 
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 `409 target_busy` means a Target is publishing. Retrieve the Project, wait for publishing to finish, reconcile your update, and retry.
190
191
  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
192
  See [conditional writes](https://typeship.dev/docs/typeship-api#conditional-writes) for ETag and If-Match.
192
193
 
@@ -195,252 +196,229 @@ See [conditional writes](https://typeship.dev/docs/typeship-api#conditional-writ
195
196
  | `<project_id>` | path | `string` | yes | Accepts an ID or an exact name (resolved via projects_list). IDs come from projects_list. |
196
197
  | `--name` | body | `string` | no | — |
197
198
  | `--auto-generate` | body | `boolean` | no | — |
198
- | `--relay-enabled` | body | `boolean` | no | Enable webhook relay sessions. Requires the CLI target and Pro. |
199
199
  | `--config` | body | `json` | no | Replaces the Project's shared Target defaults. Send null to clear them. |
200
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. |
201
201
 
202
202
  Use `--data '<json>'`, `--data @body.json`, or `--data -` to supply the request body. Field flags override matching body fields.
203
203
 
204
204
  ```sh
205
- typeship projects update prj_4f8k2m7x9q1v6b3n --auto-generate true
205
+ typeship projects update prj_4f8k2m7x9q1v6b3n --auto-generate false
206
206
  ```
207
207
 
208
208
  Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
209
209
 
210
210
  Read the full command contract with `typeship docs projects update --json`.
211
211
 
212
- ### `typeship projects retrieve-diagnostics <project_id> [flags]`
212
+ ### `typeship projects generate <project_id> [flags]`
213
213
 
214
- Analyze a project's latest Definition Revision
214
+ Start generation for active Targets
215
215
 
216
- `GET /projects/{project_id}/diagnostics`
216
+ `POST /projects/{project_id}/generate`
217
217
 
218
- Safety: **read** · Authentication: **required**
218
+ Safety: **write** · Authentication: **required**
219
+
220
+ Queues one Generation per active Target and returns their IDs. Retrieve each Generation until its status moves from `queued` to `running` and then `completed` or `failed`. `completed` 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.
219
221
 
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.
222
+ If the package already matches a destination and no Draft is open, delivery creates no commit, branch, or pull request. An existing Draft stays open. Automatic generation uses the same workflow.
221
223
 
222
224
  | Argument or flag | In | Type | Required | Description |
223
225
  | --- | --- | --- | --- | --- |
224
226
  | `<project_id>` | path | `string` | yes | Accepts an ID or an exact name (resolved via projects_list). IDs come from projects_list. |
227
+ | `--target-id` | body | `string` | no | Stable identifier for one configured generated product. Accepts an ID or an exact name (resolved via targets_list). IDs come from targets_list. |
228
+ | `--idempotency-key` | header | `string` | no | Identifies one logical write for 24 hours. The key is scoped to the authenticated organization and operation; generation without an organization 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. |
229
+
230
+ Use `--data '<json>'`, `--data @body.json`, or `--data -` to supply the request body. Field flags override matching body fields.
225
231
 
226
232
  ```sh
227
- typeship projects retrieve-diagnostics prj_4f8k2m7x9q1v6b3n
233
+ typeship projects generate prj_4f8k2m7x9q1v6b3n --target-id tgt_5m8q2v7k1p9d4h6c
228
234
  ```
229
235
 
230
236
  Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
231
237
 
232
- Read the full command contract with `typeship docs projects retrieve-diagnostics --json`.
238
+ Read the full command contract with `typeship docs projects generate --json`.
233
239
 
234
- ### `typeship projects refresh-diagnostics <project_id> [flags]`
240
+ ## specs
235
241
 
236
- Refresh a project's Diagnostics from its configured source
242
+ ### `typeship specs get <spec_id> [flags]`
237
243
 
238
- `POST /projects/{project_id}/diagnostics`
244
+ Get a Spec
239
245
 
240
- Safety: **write** · Authentication: **required**
246
+ `GET /specs/{spec_id}`
241
247
 
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.
248
+ Safety: **read** · Authentication: **required**
243
249
 
244
250
  | Argument or flag | In | Type | Required | Description |
245
251
  | --- | --- | --- | --- | --- |
246
- | `<project_id>` | path | `string` | yes | Accepts an ID or an exact name (resolved via projects_list). IDs come from projects_list. |
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. |
252
+ | `<spec_id>` | path | `string` | yes | — |
248
253
 
249
254
  ```sh
250
- typeship projects refresh-diagnostics prj_4f8k2m7x9q1v6b3n
255
+ typeship specs get spec_2p8m4q7k1v9d6h3c
251
256
  ```
252
257
 
253
258
  Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
254
259
 
255
- Read the full command contract with `typeship docs projects refresh-diagnostics --json`.
260
+ Read the full command contract with `typeship docs specs get --json`.
256
261
 
257
- ### `typeship projects remediate-diagnostics <project_id> [flags]`
262
+ ### `typeship specs update <spec_id> [flags]`
258
263
 
259
- Apply exact, reviewed diagnostic remediations
264
+ Update and resolve a Spec
260
265
 
261
- `POST /projects/{project_id}/diagnostics/remediations`
266
+ `PATCH /specs/{spec_id}`
262
267
 
263
268
  Safety: **write** · Authentication: **required**
264
269
 
265
- Applies reviewed patches from Diagnostics. For a repository source, opens or updates a source pull request. For a URL source, saves Definition patches.
270
+ Resolves the source files before saving the update and records a new Spec Revision when the source changes.
271
+ Omitted fields remain unchanged; supplied objects and arrays replace the whole field.
272
+ If the Spec or its Project configuration changes during validation, returns 409 resource_changed without saving the rejected update. Retrieve the current Spec and Project, reconcile your changes,
273
+ and submit a new request with a new Idempotency-Key if using one.
266
274
 
267
- Findings that need an API-owner decision return `422`. Read the finding's `authoring_brief` and update the source instead.
275
+ See [conditional writes](https://typeship.dev/docs/typeship-api#conditional-writes) for ETag and If-Match.
268
276
 
269
277
  | Argument or flag | In | Type | Required | Description |
270
278
  | --- | --- | --- | --- | --- |
271
- | `<project_id>` | path | `string` | yes | Accepts an ID or an exact name (resolved via projects_list). IDs come from projects_list. |
272
- | `--diagnostic-ids` | body | `array` | yes | Stable IDs of current diagnostics whose exact patches should be reviewed and applied. |
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. |
279
+ | `<spec_id>` | path | `string` | yes | — |
280
+ | `--source` | body | `json` | no | — |
281
+ | `--patches` | body | `array` | no | Replace all patches in order. An empty array removes every patch; null is invalid. |
282
+ | `--graphql` | body | `json` | no | Replace all GraphQL settings. Null or an empty object clears them. |
283
+ | `--diagnostic-policy` | body | `object` | no | Source pull-request enforcement threshold, new-versus-complete baseline, and explicitly reviewed rule or location exceptions. |
284
+ | `--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. |
285
+ | `--idempotency-key` | header | `string` | no | Identifies one logical write for 24 hours. The key is scoped to the authenticated organization and operation; generation without an organization 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. |
274
286
 
275
287
  Use `--data '<json>'`, `--data @body.json`, or `--data -` to supply the request body. Field flags override matching body fields.
276
288
 
277
289
  ```sh
278
- typeship projects remediate-diagnostics prj_4f8k2m7x9q1v6b3n --diagnostic-ids '["missing-operation-id"]'
290
+ typeship specs update spec_2p8m4q7k1v9d6h3c --source '{"type":"url","url":{"url":"https://api.parcel.example/openapi.json"}}'
279
291
  ```
280
292
 
281
293
  Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
282
294
 
283
- Read the full command contract with `typeship docs projects remediate-diagnostics --json`.
295
+ Read the full command contract with `typeship docs specs update --json`.
284
296
 
285
- ### `typeship projects retrieve-integration-health <project_id> [flags]`
297
+ ### `typeship specs refresh <spec_id> [flags]`
286
298
 
287
- Diagnose a project's repository integrations
299
+ Refresh a Spec from its configured source
288
300
 
289
- `GET /projects/{project_id}/integration-health`
301
+ `POST /specs/{spec_id}/refresh`
290
302
 
291
- Safety: **read** · Authentication: **required**
303
+ Safety: **write** · Authentication: **required**
292
304
 
293
- Checks repository access, Definition readability, source-approval labels, and required checks. Includes the latest webhook delivery so you can investigate missing updates.
305
+ Fetches the configured source now and creates a new Spec Revision only when its content changes. Diagnostics then reads that revision. If automatic generation is enabled, refresh queues generation for active Targets even when the source is unchanged.
294
306
 
295
307
  | Argument or flag | In | Type | Required | Description |
296
308
  | --- | --- | --- | --- | --- |
297
- | `<project_id>` | path | `string` | yes | Accepts an ID or an exact name (resolved via projects_list). IDs come from projects_list. |
309
+ | `<spec_id>` | path | `string` | yes | — |
310
+ | `--idempotency-key` | header | `string` | no | Identifies one logical write for 24 hours. The key is scoped to the authenticated organization and operation; generation without an organization 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. |
298
311
 
299
312
  ```sh
300
- typeship projects retrieve-integration-health prj_4f8k2m7x9q1v6b3n
313
+ typeship specs refresh spec_2p8m4q7k1v9d6h3c
301
314
  ```
302
315
 
303
316
  Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
304
317
 
305
- Read the full command contract with `typeship docs projects retrieve-integration-health --json`.
318
+ Read the full command contract with `typeship docs specs refresh --json`.
306
319
 
307
- ### `typeship projects list-generations <project_id> [flags]`
320
+ ## specRevisions
308
321
 
309
- List a project's generations
322
+ ### `typeship spec-revisions list [flags]`
310
323
 
311
- `GET /projects/{project_id}/generations`
324
+ List Spec Revisions
325
+
326
+ `GET /spec-revisions`
312
327
 
313
328
  Safety: **read** · Authentication: **required**
314
329
 
330
+ Lists Spec Revisions, newest first. Source content is not included; list a revision's files with listSpecRevisionFiles.
331
+
315
332
  | Argument or flag | In | Type | Required | Description |
316
333
  | --- | --- | --- | --- | --- |
317
- | `<project_id>` | path | `string` | yes | Accepts an ID or an exact name (resolved via projects_list). IDs come from projects_list. |
318
334
  | `--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. |
320
- | `--target-id` | query | `string` | no | Only generations for this persisted Target. |
335
+ | `--cursor` | query | `string` | no | Opaque cursor from the preceding page's next_cursor. Valid only for the same organization, 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. |
336
+ | `--spec-id` | query | `string` | no | Only revisions of this Spec. |
321
337
 
322
338
  ```sh
323
- typeship projects list-generations prj_4f8k2m7x9q1v6b3n
339
+ typeship spec-revisions list
324
340
  ```
325
341
 
326
342
  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.
327
343
 
328
- Read the full command contract with `typeship docs projects list-generations --json`.
344
+ Read the full command contract with `typeship docs spec-revisions list --json`.
329
345
 
330
- ### `typeship projects generate <project_id> [flags]`
331
-
332
- Start generation for active Targets
346
+ ### `typeship spec-revisions get <spec_revision_id> [flags]`
333
347
 
334
- `POST /projects/{project_id}/generations`
348
+ Get a Spec Revision
335
349
 
336
- Safety: **write** · Authentication: **required**
350
+ `GET /spec-revisions/{spec_revision_id}`
337
351
 
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.
352
+ Safety: **read** · Authentication: **required**
339
353
 
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.
354
+ Returns metadata for a saved Spec Revision with a Diagnostics summary. Pass `include=diagnostics` to add every Diagnostic, evaluated with the Spec's current patches and Diagnostic policy. List its source files and resolved document with listSpecRevisionFiles.
341
355
 
342
356
  | Argument or flag | In | Type | Required | Description |
343
357
  | --- | --- | --- | --- | --- |
344
- | `<project_id>` | path | `string` | yes | Accepts an ID or an exact name (resolved via projects_list). IDs come from projects_list. |
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.
358
+ | `<spec_revision_id>` | path | `string` | yes | — |
359
+ | `--include` | query | `string` | no | Add related data to the response. `diagnostics` adds the `diagnostics` and `patch_diagnostics` arrays. |
349
360
 
350
361
  ```sh
351
- typeship projects generate prj_4f8k2m7x9q1v6b3n --target-id tgt_5m8q2v7k1p9d4h6c
362
+ typeship spec-revisions get srev_6m1q8v4k2p9d7h3c
352
363
  ```
353
364
 
354
365
  Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
355
366
 
356
- Read the full command contract with `typeship docs projects generate --json`.
357
-
358
- ## definitions
367
+ Read the full command contract with `typeship docs spec-revisions get --json`.
359
368
 
360
- ### `typeship definitions retrieve <definition_id> [flags]`
369
+ ### `typeship spec-revisions list-files <spec_revision_id> [flags]`
361
370
 
362
- Retrieve a Definition
371
+ List a Spec Revision's files
363
372
 
364
- `GET /definitions/{definition_id}`
373
+ `GET /spec-revisions/{spec_revision_id}/files`
365
374
 
366
375
  Safety: **read** · Authentication: **required**
367
376
 
368
- | Argument or flag | In | Type | Required | Description |
369
- | --- | --- | --- | --- | --- |
370
- | `<definition_id>` | path | `string` | yes | — |
371
-
372
- ```sh
373
- typeship definitions retrieve def_2p8m4q7k1v9d6h3c
374
- ```
375
-
376
- Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
377
-
378
- Read the full command contract with `typeship docs definitions retrieve --json`.
379
-
380
- ### `typeship definitions update <definition_id> [flags]`
381
-
382
- Update and resolve a Definition
383
-
384
- `PATCH /definitions/{definition_id}`
385
-
386
- Safety: **write** · Authentication: **required**
387
-
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.
377
+ Lists the captured source files and the resolved document Typeship generated from, ordered by path. Read content with getFile.
394
378
 
395
379
  | Argument or flag | In | Type | Required | Description |
396
380
  | --- | --- | --- | --- | --- |
397
- | `<definition_id>` | path | `string` | yes | — |
398
- | `--source` | 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. |
401
- | `--diagnostic-policy` | body | `object` | no | Source pull-request enforcement threshold, new-versus-complete baseline, and explicitly reviewed rule or location exceptions. |
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. |
404
-
405
- Use `--data '<json>'`, `--data @body.json`, or `--data -` to supply the request body. Field flags override matching body fields.
381
+ | `<spec_revision_id>` | path | `string` | yes | — |
382
+ | `--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. |
383
+ | `--cursor` | query | `string` | no | Opaque cursor from the preceding page's next_cursor. Valid only for the same organization, 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. |
406
384
 
407
385
  ```sh
408
- typeship definitions update def_2p8m4q7k1v9d6h3c --source '{"kind":"url","url":"https://api.parcel.example/openapi.json"}'
386
+ typeship spec-revisions list-files srev_6m1q8v4k2p9d7h3c
409
387
  ```
410
388
 
411
- Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
389
+ 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.
412
390
 
413
- Read the full command contract with `typeship docs definitions update --json`.
391
+ Read the full command contract with `typeship docs spec-revisions list-files --json`.
414
392
 
415
393
  ## targets
416
394
 
417
- ### `typeship targets list <project_id> [flags]`
395
+ ### `typeship targets list [flags]`
418
396
 
419
- List a project's Targets
397
+ List Targets
420
398
 
421
- `GET /projects/{project_id}/targets`
399
+ `GET /targets`
422
400
 
423
401
  Safety: **read** · Authentication: **required**
424
402
 
425
403
  | Argument or flag | In | Type | Required | Description |
426
404
  | --- | --- | --- | --- | --- |
427
- | `<project_id>` | path | `string` | yes | Accepts an ID or an exact name (resolved via projects_list). IDs come from projects_list. |
428
405
  | `--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. |
406
+ | `--cursor` | query | `string` | no | Opaque cursor from the preceding page's next_cursor. Valid only for the same organization, 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. |
407
+ | `--project-id` | query | `string` | no | Only Targets in this Project. Accepts an ID or an exact name (resolved via projects_list). IDs come from projects_list. |
430
408
 
431
409
  ```sh
432
- typeship targets list prj_4f8k2m7x9q1v6b3n
410
+ typeship targets list
433
411
  ```
434
412
 
435
413
  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.
436
414
 
437
415
  Read the full command contract with `typeship docs targets list --json`.
438
416
 
439
- ### `typeship targets create <project_id> [flags]`
417
+ ### `typeship targets create [flags]`
440
418
 
441
419
  Create an independently configured Target
442
420
 
443
- `POST /projects/{project_id}/targets`
421
+ `POST /targets`
444
422
 
445
423
  Safety: **write** · Authentication: **required**
446
424
 
@@ -448,32 +426,30 @@ Creates a Target with its own configuration, Deliveries, and release history. Mu
448
426
 
449
427
  | Argument or flag | In | Type | Required | Description |
450
428
  | --- | --- | --- | --- | --- |
451
- | `<project_id>` | path | `string` | yes | Accepts an ID or an exact name (resolved via projects_list). IDs come from projects_list. |
429
+ | `--project-id` | body | `string` | yes | Unique identifier for a project. Accepts an ID or an exact name (resolved via projects_list). IDs come from projects_list. |
452
430
  | `--name` | body | `string` | yes | — |
453
- | `--definition-id` | body | `string` | yes | Unique identifier for a project's logical API Definition. |
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. |
455
- | `--state` | body | `string` | no | Default: "active". |
456
- | `--edition` | body | `string` | no | Default: "2026-08-24". |
431
+ | `--spec-id` | body | `string` | yes | Unique identifier for a project's logical API Spec. |
432
+ | `--type` | 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. |
433
+ | `--status` | body | `string` | no | Default: "active". |
457
434
  | `--release-channel` | body | `string` | no | Default: "stable". |
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. |
460
- | `--config` | body | `json` | no | Target-specific overrides merged over Project.config. GraphQL settings are rejected here and belong to the Definition. |
435
+ | `--checks` | body | `object` | no | Required checks run against the code in the Draft. 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. |
436
+ | `--config` | body | `json` | no | Target-specific overrides merged over Project.config. GraphQL settings are rejected here and belong to the Spec. |
461
437
  | `--deliveries` | body | `array` | no | — |
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. |
438
+ | `--idempotency-key` | header | `string` | no | Identifies one logical write for 24 hours. The key is scoped to the authenticated organization and operation; generation without an organization 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. |
463
439
 
464
440
  Use `--data '<json>'`, `--data @body.json`, or `--data -` to supply the request body. Field flags override matching body fields.
465
441
 
466
442
  ```sh
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}]'
443
+ typeship targets create --project-id prj_4f8k2m7x9q1v6b3n --name 'Parcel CLI' --spec-id spec_2p8m4q7k1v9d6h3c --type cli --config '{"cli":{"command_name":"parcel"}}' --deliveries '[{"type":"repository","repository":{"provider":"github","identifier":"parcel-example/parcel-client","package_name":"parcel-client","publish_on_merge":false}}]'
468
444
  ```
469
445
 
470
446
  Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
471
447
 
472
448
  Read the full command contract with `typeship docs targets create --json`.
473
449
 
474
- ### `typeship targets retrieve <target_id> [flags]`
450
+ ### `typeship targets get <target_id> [flags]`
475
451
 
476
- Retrieve a Target
452
+ Get a Target
477
453
 
478
454
  `GET /targets/{target_id}`
479
455
 
@@ -481,15 +457,15 @@ Safety: **read** · Authentication: **required**
481
457
 
482
458
  | Argument or flag | In | Type | Required | Description |
483
459
  | --- | --- | --- | --- | --- |
484
- | `<target_id>` | path | `string` | yes | — |
460
+ | `<target_id>` | path | `string` | yes | Accepts an ID or an exact name (resolved via targets_list). IDs come from targets_list. |
485
461
 
486
462
  ```sh
487
- typeship targets retrieve tgt_5m8q2v7k1p9d4h6c
463
+ typeship targets get tgt_5m8q2v7k1p9d4h6c
488
464
  ```
489
465
 
490
466
  Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
491
467
 
492
- Read the full command contract with `typeship docs targets retrieve --json`.
468
+ Read the full command contract with `typeship docs targets get --json`.
493
469
 
494
470
  ### `typeship targets delete <target_id> [flags]`
495
471
 
@@ -505,7 +481,7 @@ See [conditional writes](https://typeship.dev/docs/typeship-api#conditional-writ
505
481
 
506
482
  | Argument or flag | In | Type | Required | Description |
507
483
  | --- | --- | --- | --- | --- |
508
- | `<target_id>` | path | `string` | yes | — |
484
+ | `<target_id>` | path | `string` | yes | Accepts an ID or an exact name (resolved via targets_list). IDs come from targets_list. |
509
485
  | `--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. |
510
486
 
511
487
  ```sh
@@ -518,330 +494,327 @@ Read the full command contract with `typeship docs targets delete --json`.
518
494
 
519
495
  ### `typeship targets update <target_id> [flags]`
520
496
 
521
- Update a Target, its Deliveries, or its next reviewed version
497
+ Update a Target or its Deliveries
522
498
 
523
499
  `PATCH /targets/{target_id}`
524
500
 
525
501
  Safety: **write** · Authentication: **required**
526
502
 
527
503
  Omitted fields keep their current values. Supplied config, checks, and deliveries replace their complete stored values.
504
+ With Project auto_generate enabled, changing Target config, checks, or Deliveries queues that Target's Generation. A queued or running Target reuses that Generation.
528
505
  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.
506
+ Select the next version through PATCH /drafts/{draft_id} on the Target's draft_id.
530
507
 
531
508
  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.
509
+ A `502` response means the update was saved, but retiring an obsolete review or regenerating the Target failed. Retrieve the Target and follow the error's retryable and suggested_action fields.
533
510
  See [conditional writes](https://typeship.dev/docs/typeship-api#conditional-writes) for ETag and If-Match.
534
511
 
535
512
  | Argument or flag | In | Type | Required | Description |
536
513
  | --- | --- | --- | --- | --- |
537
- | `<target_id>` | path | `string` | yes | — |
514
+ | `<target_id>` | path | `string` | yes | Accepts an ID or an exact name (resolved via targets_list). IDs come from targets_list. |
538
515
  | `--name` | body | `string` | no | — |
539
- | `--state` | body | `string` | no | — |
540
- | `--edition` | body | `string` | no | — |
516
+ | `--status` | body | `string` | no | — |
541
517
  | `--release-channel` | body | `string` | no | — |
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. |
518
+ | `--checks` | body | `object` | no | Required checks run against the code in the Draft. 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. |
519
+ | `--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 Spec. |
545
520
  | `--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
521
  | `--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. |
547
522
 
548
523
  Use `--data '<json>'`, `--data @body.json`, or `--data -` to supply the request body. Field flags override matching body fields.
549
524
 
550
525
  ```sh
551
- typeship targets update tgt_5m8q2v7k1p9d4h6c --state disabled
526
+ typeship targets update tgt_5m8q2v7k1p9d4h6c --status disabled
552
527
  ```
553
528
 
554
529
  Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
555
530
 
556
531
  Read the full command contract with `typeship docs targets update --json`.
557
532
 
558
- ### `typeship targets list-releases <target_id> [flags]`
533
+ ### `typeship targets adopt <target_id> [flags]`
559
534
 
560
- List immutable releases for a Target
535
+ Adopt a verified existing package as the latest release
561
536
 
562
- `GET /targets/{target_id}/releases`
537
+ `POST /targets/{target_id}/adopt`
563
538
 
564
- Safety: **read** · Authentication: **required**
539
+ Safety: **write** · Authentication: **required**
540
+
541
+ Checks the repository tag, package metadata, and registry artifact, then records the package as an Imported latest release. Opens the first Typeship Draft at the next major version; review it to establish the baseline for preserving existing code.
565
542
 
566
543
  | Argument or flag | In | Type | Required | Description |
567
544
  | --- | --- | --- | --- | --- |
568
- | `<target_id>` | path | `string` | yes | — |
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. |
545
+ | `<target_id>` | path | `string` | yes | Accepts an ID or an exact name (resolved via targets_list). IDs come from targets_list. |
546
+ | `--body-version` | body | `string` | yes | Exact already-published package version to make the latest release. |
547
+ | `--tag` | body | `string` | yes | Immutable repository tag containing the matching package source. |
548
+ | `--idempotency-key` | header | `string` | no | Identifies one logical write for 24 hours. The key is scoped to the authenticated organization and operation; generation without an organization 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. |
549
+
550
+ Use `--data '<json>'`, `--data @body.json`, or `--data -` to supply the request body. Field flags override matching body fields.
571
551
 
572
552
  ```sh
573
- typeship targets list-releases tgt_5m8q2v7k1p9d4h6c
553
+ typeship targets adopt tgt_5m8q2v7k1p9d4h6c --body-version 1.0.0 --tag v1.0.0
574
554
  ```
575
555
 
576
- 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.
556
+ Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
557
+
558
+ Read the full command contract with `typeship docs targets adopt --json`.
577
559
 
578
- Read the full command contract with `typeship docs targets list-releases --json`.
560
+ ## drafts
579
561
 
580
- ### `typeship targets retrieve-draft <target_id> [flags]`
562
+ ### `typeship drafts list [flags]`
581
563
 
582
- Retrieve a Target's rolling Draft release
564
+ List Drafts
583
565
 
584
- `GET /targets/{target_id}/draft`
566
+ `GET /drafts`
585
567
 
586
568
  Safety: **read** · Authentication: **required**
587
569
 
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.
570
+ Lists open and merged Drafts, newest first. Each Target has one open Draft; each merge adds a merged Draft.
589
571
 
590
572
  | Argument or flag | In | Type | Required | Description |
591
573
  | --- | --- | --- | --- | --- |
592
- | `<target_id>` | path | `string` | yes | — |
574
+ | `--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. |
575
+ | `--cursor` | query | `string` | no | Opaque cursor from the preceding page's next_cursor. Valid only for the same organization, 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. |
576
+ | `--target-id` | query | `string` | no | Only Drafts of this Target. Accepts an ID or an exact name (resolved via targets_list). IDs come from targets_list. |
577
+ | `--status` | query | `string` | no | Only Drafts with this status. |
593
578
 
594
579
  ```sh
595
- typeship targets retrieve-draft tgt_5m8q2v7k1p9d4h6c
580
+ typeship drafts list
596
581
  ```
597
582
 
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`.
583
+ 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.
601
584
 
602
- ### `typeship targets update-draft <target_id> [flags]`
585
+ Read the full command contract with `typeship docs drafts list --json`.
603
586
 
604
- Select an exact Draft version or return to automatic versioning
587
+ ### `typeship drafts get <draft_id> [flags]`
605
588
 
606
- `PATCH /targets/{target_id}/draft`
589
+ Get a Draft
607
590
 
608
- Safety: **write** · Authentication: **required**
591
+ `GET /drafts/{draft_id}`
609
592
 
610
- Checks your version choice against the required version bump, then regenerates the existing Draft pull request.
593
+ Safety: **read** · Authentication: **required**
611
594
 
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.
595
+ Returns the Draft's status. An open Draft also reports its typed reason when action is required, next version and its source, readiness, checks, and conflict counts. The response carries an `ETag`; send it in `If-Match` when updating the Draft to avoid changing a newer version selection.
617
596
 
618
597
  | Argument or flag | In | Type | Required | Description |
619
598
  | --- | --- | --- | --- | --- |
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.
599
+ | `<draft_id>` | path | `string` | yes | — |
625
600
 
626
601
  ```sh
627
- typeship targets update-draft tgt_5m8q2v7k1p9d4h6c --body-version 1.1.0
602
+ typeship drafts get drf_3q7m1v8k2p5d9h4c
628
603
  ```
629
604
 
630
605
  Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
631
606
 
632
- Read the full command contract with `typeship docs targets update-draft --json`.
607
+ Read the full command contract with `typeship docs drafts get --json`.
633
608
 
634
- ### `typeship targets adopt-release <target_id> [flags]`
609
+ ### `typeship drafts update <draft_id> [flags]`
635
610
 
636
- Adopt a verified existing package as Current
611
+ Select an exact Draft version or return to automatic versioning
637
612
 
638
- `POST /targets/{target_id}/adopt`
613
+ `PATCH /drafts/{draft_id}`
639
614
 
640
615
  Safety: **write** · Authentication: **required**
641
616
 
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.
617
+ Checks your version choice against the required version bump, then regenerates the existing Draft pull request.
618
+
619
+ 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_next is required; null restores automatic selection.
620
+
621
+ 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.
622
+ A `409 draft_merged` means the Draft merged; retrieve the Target and select a version on its `draft_id`. 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.
623
+ See [conditional writes](https://typeship.dev/docs/typeship-api#conditional-writes) for ETag and If-Match.
643
624
 
644
625
  | Argument or flag | In | Type | Required | Description |
645
626
  | --- | --- | --- | --- | --- |
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. |
627
+ | `<draft_id>` | path | `string` | yes | — |
628
+ | `--version-next` | body | `string` | yes | Exact SemVer, or null to return to automatic selection. |
629
+ | `--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. |
650
630
 
651
631
  Use `--data '<json>'`, `--data @body.json`, or `--data -` to supply the request body. Field flags override matching body fields.
652
632
 
653
633
  ```sh
654
- typeship targets adopt-release tgt_5m8q2v7k1p9d4h6c --body-version 1.0.0 --tag v1.0.0
634
+ typeship drafts update drf_3q7m1v8k2p5d9h4c --version-next 1.1.0
655
635
  ```
656
636
 
657
637
  Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
658
638
 
659
- Read the full command contract with `typeship docs targets adopt-release --json`.
639
+ Read the full command contract with `typeship docs drafts update --json`.
660
640
 
661
- ### `typeship targets retrieve-release <target_release_id> [flags]`
641
+ ### `typeship drafts list-files <draft_id> [flags]`
662
642
 
663
- Retrieve an immutable Target release
643
+ List customized and conflicted files on a Draft
664
644
 
665
- `GET /target-releases/{target_release_id}`
645
+ `GET /drafts/{draft_id}/files`
666
646
 
667
647
  Safety: **read** · Authentication: **required**
668
648
 
649
+ Lists the Draft's files that differ from the last merged package or need a conflict decision, ordered by path, without file content. Each conflict names its kind, the saved decision, and the sides you can read with getFile. With `filter=history`, lists files affected by a default-branch history rewrite; the list is empty when none is pending.
650
+
651
+ Returns `409 resource_changed` while Typeship is carrying the Draft's latest commit forward (status working), or when the Draft changes between pages.
652
+
669
653
  | Argument or flag | In | Type | Required | Description |
670
654
  | --- | --- | --- | --- | --- |
671
- | `<target_release_id>` | path | `string` | yes | — |
655
+ | `<draft_id>` | path | `string` | yes | — |
656
+ | `--filter` | query | `string` | no | conflicted: conflicts only. customized: files that differ from the last merged package. history: files affected by a default-branch history rewrite. Omit for conflicted and customized files. |
657
+ | `--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. |
658
+ | `--cursor` | query | `string` | no | Opaque cursor from the preceding page's next_cursor. Valid only for the same organization, 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. |
672
659
 
673
660
  ```sh
674
- typeship targets retrieve-release rel_7m2q8v4k1p9d5h6c
661
+ typeship drafts list-files drf_3q7m1v8k2p5d9h4c
675
662
  ```
676
663
 
677
- Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
664
+ 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.
678
665
 
679
- Read the full command contract with `typeship docs targets retrieve-release --json`.
666
+ Read the full command contract with `typeship docs drafts list-files --json`.
680
667
 
681
- ### `typeship targets republish-release <target_release_id> [flags]`
668
+ ### `typeship drafts resolve <draft_id> [flags]`
682
669
 
683
- Retry publication of an exact Target release
670
+ Resolve selected Draft files
684
671
 
685
- `POST /target-releases/{target_release_id}/republish`
672
+ `POST /drafts/{draft_id}/resolve`
686
673
 
687
674
  Safety: **write** · Authentication: **required**
688
675
 
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.
676
+ Resolves conflicts on the Draft's head_sha: keep yours or generated, or supply final content as text or, for binary files, base64. Choosing generated for a customized path replaces it with the generated file, or deletes a Draft-only file.
690
677
 
691
- A `502` response means the repository publication workflow could not be dispatched.
678
+ Conflict decisions are saved together and can be replaced until applied. Choosing generated for customized paths commits those changes together on the Draft branch. Returns the Draft. When every conflict has a decision, `conflicts.decided` equals `conflicts.total` and Typeship continues the Draft and runs checks. Paths that already match the Draft change nothing.
692
679
 
693
680
  | Argument or flag | In | Type | Required | Description |
694
681
  | --- | --- | --- | --- | --- |
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. |
682
+ | `<draft_id>` | path | `string` | yes | — |
683
+ | `--expected-head-sha` | body | `string` | yes | The Draft's head_sha. A newer Draft commit returns 409 resource_changed without saving. |
684
+ | `--resolutions` | body | `array` | yes | Unique current conflict or customized paths. Choose generated to discard a customization, including a Draft-only file. Final file content must total at most 2 MiB. Decisions apply together or not at all. |
685
+
686
+ Use `--data '<json>'`, `--data @body.json`, or `--data -` to supply the request body. Field flags override matching body fields.
697
687
 
698
688
  ```sh
699
- typeship targets republish-release rel_7m2q8v4k1p9d5h6c
689
+ typeship drafts resolve drf_3q7m1v8k2p5d9h4c --expected-head-sha 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"}]'
700
690
  ```
701
691
 
702
692
  Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
703
693
 
704
- Read the full command contract with `typeship docs targets republish-release --json`.
694
+ Read the full command contract with `typeship docs drafts resolve --json`.
705
695
 
706
- ### `typeship targets list-draft-files <target_id> [flags]`
696
+ ### `typeship drafts recover <draft_id> [flags]`
707
697
 
708
- List customized and conflicted files on a Draft
709
-
710
- `GET /targets/{target_id}/draft/files`
698
+ Approve recovery from rewritten default-branch history
711
699
 
712
- Safety: **read** · Authentication: **required**
700
+ `POST /drafts/{draft_id}/recover`
713
701
 
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.
702
+ Safety: **write** · Authentication: **required**
715
703
 
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.
704
+ When the Draft has status `action_required` and reason `history_rewritten`, review affected files with `listDraftFiles` and `filter=history`, then approve with the Draft's `history_recovery` revisions. Approval saves the recovery without changing Git and returns the Draft; the next generation rebuilds it 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.
717
705
 
718
706
  | Argument or flag | In | Type | Required | Description |
719
707
  | --- | --- | --- | --- | --- |
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. |
708
+ | `<draft_id>` | path | `string` | yes | — |
709
+ | `--expected-default-sha` | body | `string` | yes | The Draft's history_recovery.default_sha. |
710
+ | `--expected-head-sha` | body | `string` | yes | The Draft's history_recovery.head_sha; null when the Draft branch is absent. |
711
+
712
+ Use `--data '<json>'`, `--data @body.json`, or `--data -` to supply the request body. Field flags override matching body fields.
724
713
 
725
714
  ```sh
726
- typeship targets list-draft-files tgt_5m8q2v7k1p9d4h6c
715
+ typeship drafts recover drf_3q7m1v8k2p5d9h4c --expected-default-sha 89abcdef0123456789abcdef0123456789abcdef --expected-head-sha 0123456789abcdef0123456789abcdef01234567
727
716
  ```
728
717
 
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.
718
+ Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
730
719
 
731
- Read the full command contract with `typeship docs targets list-draft-files --json`.
720
+ Read the full command contract with `typeship docs drafts recover --json`.
732
721
 
733
- ### `typeship targets retrieve-draft-file-content <target_id> [flags]`
722
+ ## releases
734
723
 
735
- Read one side of a Draft file
724
+ ### `typeship releases list [flags]`
736
725
 
737
- `GET /targets/{target_id}/draft/files/content`
726
+ List releases
738
727
 
739
- Safety: **read** · Authentication: **required**
728
+ `GET /releases`
740
729
 
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.
730
+ Safety: **read** · Authentication: **required**
742
731
 
743
732
  | Argument or flag | In | Type | Required | Description |
744
733
  | --- | --- | --- | --- | --- |
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. |
734
+ | `--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. |
735
+ | `--cursor` | query | `string` | no | Opaque cursor from the preceding page's next_cursor. Valid only for the same organization, 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. |
736
+ | `--target-id` | query | `string` | no | Only releases of this Target. Accepts an ID or an exact name (resolved via targets_list). IDs come from targets_list. |
749
737
 
750
738
  ```sh
751
- typeship targets retrieve-draft-file-content tgt_5m8q2v7k1p9d4h6c --path src/index.ts --side base
739
+ typeship releases list
752
740
  ```
753
741
 
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]`
742
+ 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.
759
743
 
760
- Resolve selected Draft conflicts
744
+ Read the full command contract with `typeship docs releases list --json`.
761
745
 
762
- `POST /targets/{target_id}/draft/conflicts/resolve`
746
+ ### `typeship releases get <release_id> [flags]`
763
747
 
764
- Safety: **write** · Authentication: **required**
748
+ Get an immutable release
765
749
 
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.
750
+ `GET /releases/{release_id}`
767
751
 
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.
752
+ Safety: **read** · Authentication: **required**
769
753
 
770
754
  | Argument or flag | In | Type | Required | Description |
771
755
  | --- | --- | --- | --- | --- |
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.
756
+ | `<release_id>` | path | `string` | yes | — |
778
757
 
779
758
  ```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"}]'
759
+ typeship releases get rel_7m2q8v4k1p9d5h6c
781
760
  ```
782
761
 
783
762
  Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
784
763
 
785
- Read the full command contract with `typeship docs targets resolve-draft-conflicts --json`.
764
+ Read the full command contract with `typeship docs releases get --json`.
786
765
 
787
- ### `typeship targets discard-draft-customizations <target_id> [flags]`
766
+ ### `typeship releases republish <release_id> [flags]`
788
767
 
789
- Discard selected Draft customizations
768
+ Retry publishing an exact release
790
769
 
791
- `POST /targets/{target_id}/draft/customizations/discard`
770
+ `POST /releases/{release_id}/republish`
792
771
 
793
772
  Safety: **write** · Authentication: **required**
794
773
 
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.
774
+ Retries publishing the specified release through its repository workflow. Uses that release's version and accepted commit, even if a newer Draft or release exists.
796
775
 
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.
776
+ A `502` response means the repository publishing workflow could not be dispatched.
798
777
 
799
778
  | Argument or flag | In | Type | Required | Description |
800
779
  | --- | --- | --- | --- | --- |
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.
780
+ | `<release_id>` | path | `string` | yes | — |
781
+ | `--idempotency-key` | header | `string` | no | Identifies one logical write for 24 hours. The key is scoped to the authenticated organization and operation; generation without an organization 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. |
807
782
 
808
783
  ```sh
809
- typeship targets discard-draft-customizations tgt_5m8q2v7k1p9d4h6c --expected-head-revision 0123456789abcdef0123456789abcdef01234567 --paths '["src/helper.ts"]' --dry-run true
784
+ typeship releases republish rel_7m2q8v4k1p9d5h6c
810
785
  ```
811
786
 
812
787
  Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
813
788
 
814
- Read the full command contract with `typeship docs targets discard-draft-customizations --json`.
789
+ Read the full command contract with `typeship docs releases republish --json`.
815
790
 
816
- ### `typeship targets recover-draft-history <target_id> [flags]`
791
+ ## deliveries
817
792
 
818
- Approve recovery from rewritten default-branch history
793
+ ### `typeship deliveries list [flags]`
819
794
 
820
- `POST /targets/{target_id}/draft/history/recover`
795
+ List Deliveries
821
796
 
822
- Safety: **write** · Authentication: **required**
797
+ `GET /deliveries`
823
798
 
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.
799
+ Safety: **read** · Authentication: **required**
825
800
 
826
801
  | Argument or flag | In | Type | Required | Description |
827
802
  | --- | --- | --- | --- | --- |
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.
803
+ | `--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. |
804
+ | `--cursor` | query | `string` | no | Opaque cursor from the preceding page's next_cursor. Valid only for the same organization, 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. |
805
+ | `--target-id` | query | `string` | no | Only Deliveries of this Target. Accepts an ID or an exact name (resolved via targets_list). IDs come from targets_list. |
833
806
 
834
807
  ```sh
835
- typeship targets recover-draft-history tgt_5m8q2v7k1p9d4h6c --expected-default-revision 89abcdef0123456789abcdef0123456789abcdef --expected-head-revision 0123456789abcdef0123456789abcdef01234567
808
+ typeship deliveries list
836
809
  ```
837
810
 
838
- Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
811
+ 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.
839
812
 
840
- Read the full command contract with `typeship docs targets recover-draft-history --json`.
813
+ Read the full command contract with `typeship docs deliveries list --json`.
841
814
 
842
- ### `typeship targets retrieve-delivery <delivery_id> [flags]`
815
+ ### `typeship deliveries get <delivery_id> [flags]`
843
816
 
844
- Retrieve a Delivery
817
+ Get a Delivery
845
818
 
846
819
  `GET /deliveries/{delivery_id}`
847
820
 
@@ -854,214 +827,175 @@ Returns the configured repository or hosted MCP Delivery for a Target. A Deliver
854
827
  | `<delivery_id>` | path | `string` | yes | — |
855
828
 
856
829
  ```sh
857
- typeship targets retrieve-delivery dlv_4q8m2v7k1p9d5h6c
830
+ typeship deliveries get dlv_4q8m2v7k1p9d5h6c
858
831
  ```
859
832
 
860
833
  Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
861
834
 
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}`
835
+ Read the full command contract with `typeship docs deliveries get --json`.
869
836
 
870
- Safety: **read** · Authentication: **required**
837
+ ## publications
871
838
 
872
- Returns the current registry publication state for a Target Release. A Publication in another organization returns 404 not_found.
839
+ ### `typeship publications list [flags]`
873
840
 
874
- | Argument or flag | In | Type | Required | Description |
875
- | --- | --- | --- | --- | --- |
876
- | `<publication_id>` | path | `string` | yes | — |
841
+ List publications
877
842
 
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
-
886
- ## generations
887
-
888
- ### `typeship generations retrieve <generation_id> [flags]`
889
-
890
- Retrieve a generation
891
-
892
- `GET /generations/{generation_id}`
843
+ `GET /publications`
893
844
 
894
845
  Safety: **read** · Authentication: **required**
895
846
 
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.
897
-
898
847
  | Argument or flag | In | Type | Required | Description |
899
848
  | --- | --- | --- | --- | --- |
900
- | `<generation_id>` | path | `string` | yes | — |
849
+ | `--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. |
850
+ | `--cursor` | query | `string` | no | Opaque cursor from the preceding page's next_cursor. Valid only for the same organization, 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. |
851
+ | `--release-id` | query | `string` | no | Only publications of this release. |
901
852
 
902
853
  ```sh
903
- typeship generations retrieve gen_7h2p5d9c3m8w1k6q
854
+ typeship publications list
904
855
  ```
905
856
 
906
- Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
857
+ 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.
907
858
 
908
- Read the full command contract with `typeship docs generations retrieve --json`.
859
+ Read the full command contract with `typeship docs publications list --json`.
909
860
 
910
- ### `typeship generations retrieve-file <generation_id> [flags]`
861
+ ### `typeship publications get <publication_id> [flags]`
911
862
 
912
- Fetch one file from a generation
863
+ Get publishing status
913
864
 
914
- `GET /generations/{generation_id}/file`
865
+ `GET /publications/{publication_id}`
915
866
 
916
867
  Safety: **read** · Authentication: **required**
917
868
 
918
- Returns one file's raw content. Use a path from `files_index` when the Generation reports `files_omitted: true`.
869
+ Returns the registry publishing status for a release. A status in another organization returns 404 not_found.
919
870
 
920
871
  | Argument or flag | In | Type | Required | Description |
921
872
  | --- | --- | --- | --- | --- |
922
- | `<generation_id>` | path | `string` | yes | — |
923
- | `--path` | query | `string` | yes | Repo-relative path inside the generated package. |
873
+ | `<publication_id>` | path | `string` | yes | — |
924
874
 
925
875
  ```sh
926
- typeship generations retrieve-file gen_7h2p5d9c3m8w1k6q --path README.md
876
+ typeship publications get pub_2m8q4v7k1p9d5h6c
927
877
  ```
928
878
 
929
879
  Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
930
880
 
931
- Read the full command contract with `typeship docs generations retrieve-file --json`.
881
+ Read the full command contract with `typeship docs publications get --json`.
932
882
 
933
- ## definitionRevisions
883
+ ## generations
934
884
 
935
- ### `typeship definition-revisions list <definition_id> [flags]`
885
+ ### `typeship generations list [flags]`
936
886
 
937
- List Definition Revisions
887
+ List generations
938
888
 
939
- `GET /definitions/{definition_id}/revisions`
889
+ `GET /generations`
940
890
 
941
891
  Safety: **read** · Authentication: **required**
942
892
 
943
- Lists the Definition's revisions, newest first. Source content is not included; retrieve the revision content or individual documents separately.
944
-
945
893
  | Argument or flag | In | Type | Required | Description |
946
894
  | --- | --- | --- | --- | --- |
947
- | `<definition_id>` | path | `string` | yes | — |
948
895
  | `--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. |
896
+ | `--cursor` | query | `string` | no | Opaque cursor from the preceding page's next_cursor. Valid only for the same organization, 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. |
897
+ | `--project-id` | query | `string` | no | Only Generations in this Project. Accepts an ID or an exact name (resolved via projects_list). IDs come from projects_list. |
898
+ | `--target-id` | query | `string` | no | Only Generations of this Target. Accepts an ID or an exact name (resolved via targets_list). IDs come from targets_list. |
899
+ | `--status` | query | `string` | no | Only Generations with this status. |
950
900
 
951
901
  ```sh
952
- typeship definition-revisions list def_2p8m4q7k1v9d6h3c
902
+ typeship generations list
953
903
  ```
954
904
 
955
905
  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.
956
906
 
957
- Read the full command contract with `typeship docs definition-revisions list --json`.
907
+ Read the full command contract with `typeship docs generations list --json`.
958
908
 
959
- ### `typeship definition-revisions retrieve <definition_revision_id> [flags]`
909
+ ### `typeship generations get <generation_id> [flags]`
960
910
 
961
- Retrieve a Definition Revision
911
+ Get a generation
962
912
 
963
- `GET /definition-revisions/{definition_revision_id}`
913
+ `GET /generations/{generation_id}`
964
914
 
965
915
  Safety: **read** · Authentication: **required**
966
916
 
967
- Returns metadata for a saved Definition Revision. Retrieve its resolved content or individual source documents separately.
917
+ Returns the status of that Generation. `queued` and `running` mean generation is still in progress. `completed` means generated files are saved, not that repository delivery or a Draft is complete. List its files with listGenerationFiles and read each with getFile.
968
918
 
969
919
  | Argument or flag | In | Type | Required | Description |
970
920
  | --- | --- | --- | --- | --- |
971
- | `<definition_revision_id>` | path | `string` | yes | — |
921
+ | `<generation_id>` | path | `string` | yes | Accepts an ID or an exact name (resolved via generations_list). IDs come from generations_list. |
972
922
 
973
923
  ```sh
974
- typeship definition-revisions retrieve drev_6m1q8v4k2p9d7h3c
924
+ typeship generations get gen_7h2p5d9c3m8w1k6q
975
925
  ```
976
926
 
977
927
  Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
978
928
 
979
- Read the full command contract with `typeship docs definition-revisions retrieve --json`.
929
+ Read the full command contract with `typeship docs generations get --json`.
980
930
 
981
- ### `typeship definition-revisions retrieve-content <definition_revision_id> [flags]`
931
+ ### `typeship generations list-files <generation_id> [flags]`
982
932
 
983
- Retrieve a Definition Revision's canonical content
933
+ List a Generation's files
984
934
 
985
- `GET /definition-revisions/{definition_revision_id}/content`
935
+ `GET /generations/{generation_id}/files`
986
936
 
987
937
  Safety: **read** · Authentication: **required**
988
938
 
989
- Returns the saved, resolved content for this revision. Save it locally or compare it with another revision.
939
+ Lists the generated package's files, ordered by path. Read content with getFile.
990
940
 
991
941
  | Argument or flag | In | Type | Required | Description |
992
942
  | --- | --- | --- | --- | --- |
993
- | `<definition_revision_id>` | path | `string` | yes | — |
943
+ | `<generation_id>` | path | `string` | yes | Accepts an ID or an exact name (resolved via generations_list). IDs come from generations_list. |
944
+ | `--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. |
945
+ | `--cursor` | query | `string` | no | Opaque cursor from the preceding page's next_cursor. Valid only for the same organization, 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. |
994
946
 
995
947
  ```sh
996
- typeship definition-revisions retrieve-content drev_6m1q8v4k2p9d7h3c
948
+ typeship generations list-files gen_7h2p5d9c3m8w1k6q
997
949
  ```
998
950
 
999
- Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
1000
-
1001
- Read the full command contract with `typeship docs definition-revisions retrieve-content --json`.
1002
-
1003
- ### `typeship definition-revisions retrieve-document-content <definition_revision_id> <document_id> [flags]`
1004
-
1005
- Retrieve one source document from a Definition Revision
1006
-
1007
- `GET /definition-revisions/{definition_revision_id}/documents/{document_id}/content`
1008
-
1009
- Safety: **read** · Authentication: **required**
1010
-
1011
- | Argument or flag | In | Type | Required | Description |
1012
- | --- | --- | --- | --- | --- |
1013
- | `<definition_revision_id>` | path | `string` | yes | — |
1014
- | `<document_id>` | path | `string` | yes | — |
1015
-
1016
- ```sh
1017
- typeship definition-revisions retrieve-document-content drev_6m1q8v4k2p9d7h3c doc_8q2m5v1k9p4d7h3c
1018
- ```
951
+ 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.
1019
952
 
1020
- Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
953
+ Read the full command contract with `typeship docs generations list-files --json`.
1021
954
 
1022
- Read the full command contract with `typeship docs definition-revisions retrieve-document-content --json`.
955
+ ## files
1023
956
 
1024
- ### `typeship definition-revisions retrieve-document <definition_document_id> [flags]`
957
+ ### `typeship files get <file_id> [flags]`
1025
958
 
1026
- Retrieve a Definition Document
959
+ Get a file
1027
960
 
1028
- `GET /definition-documents/{definition_document_id}`
961
+ `GET /files/{file_id}`
1029
962
 
1030
963
  Safety: **read** · Authentication: **required**
1031
964
 
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.
965
+ Returns one bounded chunk of an immutable file: at most 24 KiB, as UTF-8 text or, for binary bytes, base64. When next_cursor is not null, repeat the request with cursor and concatenate the chunks in order. A file ID always returns the same bytes.
1033
966
 
1034
967
  | Argument or flag | In | Type | Required | Description |
1035
968
  | --- | --- | --- | --- | --- |
1036
- | `<definition_document_id>` | path | `string` | yes | — |
969
+ | `<file_id>` | path | `string` | yes | — |
970
+ | `--cursor` | query | `string` | no | next_cursor from the preceding chunk of this file. |
1037
971
 
1038
972
  ```sh
1039
- typeship definition-revisions retrieve-document doc_8q2m5v1k9p4d7h3c
973
+ typeship files get file_4k8m2v7q1p9d5h6c
1040
974
  ```
1041
975
 
1042
976
  Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
1043
977
 
1044
- Read the full command contract with `typeship docs definition-revisions retrieve-document --json`.
978
+ Read the full command contract with `typeship docs files get --json`.
1045
979
 
1046
- ## account
980
+ ## organization
1047
981
 
1048
- ### `typeship account retrieve [flags]`
982
+ ### `typeship organization get [flags]`
1049
983
 
1050
- The account behind the presented credentials
984
+ The organization behind the presented credentials
1051
985
 
1052
- `GET /me`
986
+ `GET /organization`
1053
987
 
1054
988
  Safety: **read** · Authentication: **required**
1055
989
 
1056
- Returns the account associated with your credential. The Typeship CLI uses this endpoint for `whoami`.
990
+ Returns the organization associated with your credential. The Typeship CLI uses this endpoint for `whoami`.
1057
991
 
1058
992
  ```sh
1059
- typeship account retrieve
993
+ typeship organization get
1060
994
  ```
1061
995
 
1062
996
  Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
1063
997
 
1064
- Read the full command contract with `typeship docs account retrieve --json`.
998
+ Read the full command contract with `typeship docs organization get --json`.
1065
999
 
1066
1000
  ## apiKeys
1067
1001
 
@@ -1078,7 +1012,7 @@ Lists key metadata and the last four characters of each key. Full keys are not r
1078
1012
  | Argument or flag | In | Type | Required | Description |
1079
1013
  | --- | --- | --- | --- | --- |
1080
1014
  | `--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. |
1015
+ | `--cursor` | query | `string` | no | Opaque cursor from the preceding page's next_cursor. Valid only for the same organization, 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. |
1082
1016
 
1083
1017
  ```sh
1084
1018
  typeship api-keys list
@@ -1088,9 +1022,9 @@ Output: JSON with `items` and `hasMore`; when another page exists, `nextPage` co
1088
1022
 
1089
1023
  Read the full command contract with `typeship docs api-keys list --json`.
1090
1024
 
1091
- ### `typeship api-keys retrieve <api_key_id> [flags]`
1025
+ ### `typeship api-keys get <api_key_id> [flags]`
1092
1026
 
1093
- Retrieve an API key
1027
+ Get an API key
1094
1028
 
1095
1029
  `GET /api-keys/{api_key_id}`
1096
1030
 
@@ -1103,12 +1037,12 @@ Returns the key summary and its ETag for conditional revocation.
1103
1037
  | `<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
1038
 
1105
1039
  ```sh
1106
- typeship api-keys retrieve apikey_2nY8mR6pQ4vK9cH3
1040
+ typeship api-keys get apikey_2nY8mR6pQ4vK9cH3
1107
1041
  ```
1108
1042
 
1109
1043
  Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
1110
1044
 
1111
- Read the full command contract with `typeship docs api-keys retrieve --json`.
1045
+ Read the full command contract with `typeship docs api-keys get --json`.
1112
1046
 
1113
1047
  ### `typeship api-keys revoke <api_key_id> [flags]`
1114
1048
 
@@ -1120,7 +1054,7 @@ Safety: **destructive** · Authentication: **required**
1120
1054
 
1121
1055
  Revokes a key. Repeating the request returns the same result.
1122
1056
 
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.
1057
+ With OAuth, members can revoke their own keys; organization admins can revoke any key. Organization API keys can revoke any key in their organization.
1124
1058
  See [conditional writes](https://typeship.dev/docs/typeship-api#conditional-writes) for ETag and If-Match.
1125
1059
 
1126
1060
  | Argument or flag | In | Type | Required | Description |