@typeship-ax/cli 0.22.0 → 0.23.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 (138) hide show
  1. package/AGENTS.md +12 -8
  2. package/README.md +14 -27
  3. package/api.json +8898 -9026
  4. package/api.md +369 -327
  5. package/dist/arguments.d.ts +47 -0
  6. package/dist/arguments.d.ts.map +1 -0
  7. package/dist/arguments.js +254 -0
  8. package/dist/cli-agent.d.ts +31 -8
  9. package/dist/cli-agent.d.ts.map +1 -1
  10. package/dist/cli-agent.js +146 -28
  11. package/dist/cli.js +483 -237
  12. package/dist/core/http.d.ts +162 -19
  13. package/dist/core/http.d.ts.map +1 -1
  14. package/dist/core/http.js +381 -48
  15. package/dist/core/pagination.d.ts +42 -6
  16. package/dist/core/pagination.d.ts.map +1 -1
  17. package/dist/core/pagination.js +111 -17
  18. package/dist/credential-storage.d.ts +10 -3
  19. package/dist/credential-storage.d.ts.map +1 -1
  20. package/dist/credential-storage.js +15 -6
  21. package/dist/dates.d.ts +1 -1
  22. package/dist/dates.js +1 -1
  23. package/dist/errors.d.ts +20 -84
  24. package/dist/errors.d.ts.map +1 -1
  25. package/dist/errors.js +20 -108
  26. package/dist/fields.d.ts +29 -0
  27. package/dist/fields.d.ts.map +1 -0
  28. package/dist/fields.js +101 -0
  29. package/dist/index.d.ts +28 -18
  30. package/dist/index.d.ts.map +1 -1
  31. package/dist/index.js +35 -25
  32. package/dist/named-credentials.d.ts +19 -0
  33. package/dist/named-credentials.d.ts.map +1 -1
  34. package/dist/named-credentials.js +81 -1
  35. package/dist/oauth-login.d.ts +8 -2
  36. package/dist/oauth-login.d.ts.map +1 -1
  37. package/dist/oauth-login.js +31 -19
  38. package/dist/oauth-request.d.ts +7 -1
  39. package/dist/oauth-request.d.ts.map +1 -1
  40. package/dist/oauth-request.js +26 -4
  41. package/dist/oauth-session.d.ts +13 -1
  42. package/dist/oauth-session.d.ts.map +1 -1
  43. package/dist/oauth-session.js +34 -18
  44. package/dist/ops.d.ts +53 -5
  45. package/dist/ops.d.ts.map +1 -1
  46. package/dist/ops.js +49 -40
  47. package/dist/polling-login.d.ts +8 -2
  48. package/dist/polling-login.d.ts.map +1 -1
  49. package/dist/polling-login.js +25 -11
  50. package/dist/resources/api-keys.d.ts +10 -7
  51. package/dist/resources/api-keys.d.ts.map +1 -1
  52. package/dist/resources/api-keys.js +10 -31
  53. package/dist/resources/deliveries.d.ts +88 -4
  54. package/dist/resources/deliveries.d.ts.map +1 -1
  55. package/dist/resources/deliveries.js +95 -18
  56. package/dist/resources/drafts.d.ts +15 -15
  57. package/dist/resources/drafts.d.ts.map +1 -1
  58. package/dist/resources/drafts.js +11 -64
  59. package/dist/resources/files.d.ts +4 -4
  60. package/dist/resources/files.d.ts.map +1 -1
  61. package/dist/resources/files.js +3 -12
  62. package/dist/resources/generations.d.ts +14 -14
  63. package/dist/resources/generations.d.ts.map +1 -1
  64. package/dist/resources/generations.js +21 -45
  65. package/dist/resources/organization.d.ts +4 -4
  66. package/dist/resources/organization.d.ts.map +1 -1
  67. package/dist/resources/organization.js +3 -10
  68. package/dist/resources/{generate.d.ts → packages.d.ts} +16 -16
  69. package/dist/resources/packages.d.ts.map +1 -0
  70. package/dist/resources/{generate.js → packages.js} +13 -29
  71. package/dist/resources/projects.d.ts +50 -50
  72. package/dist/resources/projects.d.ts.map +1 -1
  73. package/dist/resources/projects.js +60 -116
  74. package/dist/resources/releases.d.ts +21 -16
  75. package/dist/resources/releases.d.ts.map +1 -1
  76. package/dist/resources/releases.js +18 -39
  77. package/dist/resources/spec-revisions.d.ts +15 -6
  78. package/dist/resources/spec-revisions.d.ts.map +1 -1
  79. package/dist/resources/spec-revisions.js +6 -28
  80. package/dist/resources/specs.d.ts +7 -7
  81. package/dist/resources/specs.d.ts.map +1 -1
  82. package/dist/resources/specs.js +6 -34
  83. package/dist/resources/targets.d.ts +48 -48
  84. package/dist/resources/targets.d.ts.map +1 -1
  85. package/dist/resources/targets.js +58 -114
  86. package/dist/schemas.d.ts.map +1 -1
  87. package/dist/schemas.js +83 -81
  88. package/dist/search.d.ts +54 -0
  89. package/dist/search.d.ts.map +1 -0
  90. package/dist/search.js +421 -0
  91. package/dist/types.d.ts +499 -339
  92. package/dist/types.d.ts.map +1 -1
  93. package/dist/types.js +18 -18
  94. package/package.json +5 -2
  95. package/src/arguments.ts +242 -0
  96. package/src/cli-agent.ts +156 -30
  97. package/src/cli.ts +444 -211
  98. package/src/core/http.ts +457 -58
  99. package/src/core/pagination.ts +129 -18
  100. package/src/credential-storage.ts +16 -6
  101. package/src/dates.ts +1 -1
  102. package/src/errors.ts +46 -115
  103. package/src/fields.ts +91 -0
  104. package/src/index.ts +45 -28
  105. package/src/named-credentials.ts +66 -1
  106. package/src/oauth-login.ts +36 -21
  107. package/src/oauth-request.ts +32 -6
  108. package/src/oauth-session.ts +37 -19
  109. package/src/ops.ts +82 -44
  110. package/src/polling-login.ts +24 -11
  111. package/src/resources/api-keys.ts +34 -48
  112. package/src/resources/deliveries.ts +211 -30
  113. package/src/resources/drafts.ts +60 -107
  114. package/src/resources/files.ts +19 -20
  115. package/src/resources/generations.ts +57 -75
  116. package/src/resources/organization.ts +11 -16
  117. package/src/resources/{generate.ts → packages.ts} +43 -51
  118. package/src/resources/projects.ts +145 -200
  119. package/src/resources/releases.ts +48 -65
  120. package/src/resources/spec-revisions.ts +38 -47
  121. package/src/resources/specs.ts +39 -59
  122. package/src/resources/targets.ts +143 -193
  123. package/src/schemas.ts +83 -81
  124. package/src/search.ts +434 -0
  125. package/src/types.ts +538 -357
  126. package/dist/console-login-check.d.ts +0 -21
  127. package/dist/console-login-check.d.ts.map +0 -1
  128. package/dist/console-login-check.js +0 -107
  129. package/dist/console-login-contract.d.ts +0 -45
  130. package/dist/console-login-contract.d.ts.map +0 -1
  131. package/dist/console-login-contract.js +0 -40
  132. package/dist/resources/generate.d.ts.map +0 -1
  133. package/dist/resources/publications.d.ts +0 -47
  134. package/dist/resources/publications.d.ts.map +0 -1
  135. package/dist/resources/publications.js +0 -70
  136. package/src/console-login-check.ts +0 -88
  137. package/src/console-login-contract.ts +0 -65
  138. package/src/resources/publications.ts +0 -140
package/api.md CHANGED
@@ -1,6 +1,6 @@
1
- # typeship — CLI reference
1
+ # Typeship — CLI reference
2
2
 
3
- API version 1.0.0. Package version 0.22.0. Generated by typeship.
3
+ API version 1.0.0. Package version 0.23.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
 
@@ -10,75 +10,43 @@ Use `--fields id,name` to project response fields. `--base-url <url>` overrides
10
10
 
11
11
  For complete input and output schemas, use [`api.json`](./api.json), the machine-readable companion to this reference.
12
12
 
13
- ## generate
14
-
15
- ### `typeship generate run [flags]`
16
-
17
- Generate one package from a Spec
18
-
19
- `POST /generate`
13
+ ## projects
20
14
 
21
- Safety: **write** · Authentication: **optional**
15
+ ### `typeship projects create [flags]`
22
16
 
23
- Returns one generated package without creating a Project.
17
+ Create a Project
24
18
 
25
- Supports [idempotent retries](https://typeship.dev/docs/typeship-api/idempotency); keyed responses include generated files in the replay cache.
19
+ `POST /projects`
26
20
 
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.
21
+ Safety: **write** · Authentication: **required**
28
22
 
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`.
23
+ Creates a Project from a URL or GitHub Spec.
24
+ Automatic generation is enabled by default for a saved Project.
30
25
 
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.
26
+ 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.
32
27
 
33
28
  | Argument or flag | In | Type | Required | Description |
34
29
  | --- | --- | --- | --- | --- |
35
- | `--spec` | body | `json` | yes | A Spec for one-shot generation, provided as exactly one URL or inline entrypoint. |
36
- | `--target` | body | `object` | yes | One-shot generator descriptor; no persisted Target is created. |
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 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. |
30
+ | `--name` | body | `string` | yes | — |
31
+ | `--spec` | body | `object` | yes | — |
32
+ | `--targets` | body | `array` | yes | Initial first-class Targets. More than one may use the same generator with different identities or Deliveries. |
33
+ | `--auto-generate` | body | `boolean` | no | Whether Typeship should regenerate automatically when the source or saved configuration changes. Default: true. |
34
+ | `--config` | body | `json` | no | Shared defaults inherited by every Target. GraphQL settings belong in spec.graphql. |
41
35
  | `--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
36
 
43
37
  Use `--data '<json>'`, `--data @body.json`, or `--data -` to supply the request body. Field flags override matching body fields.
44
38
 
45
39
  ```sh
46
- typeship generate run --spec '{"url":"https://typeship.dev/examples/petstore/openapi.yaml"}' --target '{"type":"cli"}'
47
- ```
48
-
49
- Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
50
-
51
- Read the full command contract with `typeship docs generate run --json`.
52
-
53
- ### `typeship generate download-package [flags]`
54
-
55
- Download a generated package
56
-
57
- `GET /generate/download`
58
-
59
- Safety: **read** · Authentication: **none**
60
-
61
- Download the complete ZIP referenced by `generate_run`'s `download.url`. Pass the token from that URL. No API key is needed; the token grants access only to that exact package until its replay window expires. Keep the token private.
62
-
63
- The local MCP server saves this binary response to disk. On a hosted MCP connection, download the original URL directly to your workspace. Verify the ZIP against `download.sha256` before extracting it into an empty directory. Expired or invalid tokens return `404`; a new generation creates a new download.
64
-
65
- | Argument or flag | In | Type | Required | Description |
66
- | --- | --- | --- | --- | --- |
67
- | `--query-token` | query | `string` | yes | Private download token from download.url in the generation result. |
68
-
69
- ```sh
70
- typeship generate download-package --query-token parcel_download_example_token_1234567890123
40
+ 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}}]}]'
71
41
  ```
72
42
 
73
43
  Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
74
44
 
75
- Read the full command contract with `typeship docs generate download-package --json`.
76
-
77
- ## projects
45
+ Read the full command contract with `typeship docs projects create --json`.
78
46
 
79
47
  ### `typeship projects list [flags]`
80
48
 
81
- List projects
49
+ List Projects
82
50
 
83
51
  `GET /projects`
84
52
 
@@ -97,41 +65,9 @@ Output: JSON with `items` and `hasMore`; when another page exists, `nextPage` co
97
65
 
98
66
  Read the full command contract with `typeship docs projects list --json`.
99
67
 
100
- ### `typeship projects create [flags]`
101
-
102
- Create a project
103
-
104
- `POST /projects`
105
-
106
- Safety: **write** · Authentication: **required**
107
-
108
- Creates a Project from a URL or GitHub Spec.
109
- Automatic generation is enabled by default for a saved Project.
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.
112
-
113
- | Argument or flag | In | Type | Required | Description |
114
- | --- | --- | --- | --- | --- |
115
- | `--name` | body | `string` | yes | — |
116
- | `--spec` | body | `object` | yes | — |
117
- | `--targets` | body | `array` | yes | Initial first-class Targets. More than one may use the same generator with different identities or Deliveries. |
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
-
122
- Use `--data '<json>'`, `--data @body.json`, or `--data -` to supply the request body. Field flags override matching body fields.
123
-
124
- ```sh
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
- ```
127
-
128
- Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
129
-
130
- Read the full command contract with `typeship docs projects create --json`.
131
-
132
68
  ### `typeship projects get <project_id> [flags]`
133
69
 
134
- Get a project
70
+ Get a Project
135
71
 
136
72
  `GET /projects/{project_id}`
137
73
 
@@ -151,67 +87,67 @@ Output: the response payload as JSON on stdout. A successful response without a
151
87
 
152
88
  Read the full command contract with `typeship docs projects get --json`.
153
89
 
154
- ### `typeship projects delete <project_id> [flags]`
90
+ ### `typeship projects update <project_id> [flags]`
155
91
 
156
- Delete a project
92
+ Update a Project
157
93
 
158
- `DELETE /projects/{project_id}`
94
+ `PATCH /projects/{project_id}`
159
95
 
160
- Safety: **destructive** · Authentication: **required**
96
+ Safety: **write** · Authentication: **required**
97
+
98
+ Omitted fields keep their current values. A supplied config replaces the entire stored object; null or an empty object clears it.
99
+ 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.
100
+ Omitting If-Match applies the update to the current resource; with If-Match, a stale ETag returns 412 precondition_failed without saving.
161
101
 
162
- A `502 repository_unavailable` means the Project was not deleted because its release pull requests could not be retired. Retry deletion to finish retiring the remaining reviews. Repeating a completed deletion returns `404`.
102
+ A `409 target_busy` means a Target is publishing. Retrieve the Project, wait for publishing to finish, reconcile your update, and retry.
103
+ A `502 follow_up_failed` means the Project was saved, but an obsolete Draft pull request could not be retired. Retrieve the Project and retry the same update to finish retiring reviews if that update is still desired.
163
104
  See [conditional writes](https://typeship.dev/docs/typeship-api#conditional-writes) for ETag and If-Match.
164
105
 
165
106
  | Argument or flag | In | Type | Required | Description |
166
107
  | --- | --- | --- | --- | --- |
167
108
  | `<project_id>` | path | `string` | yes | Accepts an ID or an exact name (resolved via projects_list). IDs come from projects_list. |
109
+ | `--name` | body | `string` | no | — |
110
+ | `--auto-generate` | body | `boolean` | no | — |
111
+ | `--config` | body | `json` | no | Replaces the Project's shared Target defaults. Send null to clear them. |
168
112
  | `--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. |
169
113
 
114
+ Use `--data '<json>'`, `--data @body.json`, or `--data -` to supply the request body. Field flags override matching body fields.
115
+
170
116
  ```sh
171
- typeship projects delete prj_4f8k2m7x9q1v6b3n --force
117
+ typeship projects update prj_4f8k2m7x9q1v6b3n --auto-generate false
172
118
  ```
173
119
 
174
120
  Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
175
121
 
176
- Read the full command contract with `typeship docs projects delete --json`.
177
-
178
- ### `typeship projects update <project_id> [flags]`
122
+ Read the full command contract with `typeship docs projects update --json`.
179
123
 
180
- Update a project
124
+ ### `typeship projects delete <project_id> [flags]`
181
125
 
182
- `PATCH /projects/{project_id}`
126
+ Delete a Project
183
127
 
184
- Safety: **write** · Authentication: **required**
128
+ `DELETE /projects/{project_id}`
185
129
 
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.
188
- Omitting If-Match applies the update to the current resource; with If-Match, a stale ETag returns 412 precondition_failed without saving.
130
+ Safety: **destructive** · Authentication: **required**
189
131
 
190
- A `409 target_busy` means a Target is publishing. Retrieve the Project, wait for publishing to finish, reconcile your update, and retry.
191
- A `502 follow_up_failed` 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.
132
+ A `502 repository_unavailable` means the Project was not deleted because its Draft pull requests could not be retired. Retry deletion to finish retiring the remaining reviews. Repeating a completed deletion returns `404`.
192
133
  See [conditional writes](https://typeship.dev/docs/typeship-api#conditional-writes) for ETag and If-Match.
193
134
 
194
135
  | Argument or flag | In | Type | Required | Description |
195
136
  | --- | --- | --- | --- | --- |
196
137
  | `<project_id>` | path | `string` | yes | Accepts an ID or an exact name (resolved via projects_list). IDs come from projects_list. |
197
- | `--name` | body | `string` | no | — |
198
- | `--auto-generate` | body | `boolean` | no | — |
199
- | `--config` | body | `json` | no | Replaces the Project's shared Target defaults. Send null to clear them. |
200
138
  | `--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
139
 
202
- Use `--data '<json>'`, `--data @body.json`, or `--data -` to supply the request body. Field flags override matching body fields.
203
-
204
140
  ```sh
205
- typeship projects update prj_4f8k2m7x9q1v6b3n --auto-generate false
141
+ typeship projects delete prj_4f8k2m7x9q1v6b3n --force
206
142
  ```
207
143
 
208
144
  Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
209
145
 
210
- Read the full command contract with `typeship docs projects update --json`.
146
+ Read the full command contract with `typeship docs projects delete --json`.
211
147
 
212
148
  ### `typeship projects generate <project_id> [flags]`
213
149
 
214
- Start generation for active Targets
150
+ Generate a Project's Targets
215
151
 
216
152
  `POST /projects/{project_id}/generate`
217
153
 
@@ -261,7 +197,7 @@ Read the full command contract with `typeship docs specs get --json`.
261
197
 
262
198
  ### `typeship specs update <spec_id> [flags]`
263
199
 
264
- Update and resolve a Spec
200
+ Update a Spec
265
201
 
266
202
  `PATCH /specs/{spec_id}`
267
203
 
@@ -296,7 +232,7 @@ Read the full command contract with `typeship docs specs update --json`.
296
232
 
297
233
  ### `typeship specs refresh <spec_id> [flags]`
298
234
 
299
- Refresh a Spec from its configured source
235
+ Refresh a Spec
300
236
 
301
237
  `POST /specs/{spec_id}/refresh`
302
238
 
@@ -351,12 +287,13 @@ Get a Spec Revision
351
287
 
352
288
  Safety: **read** · Authentication: **required**
353
289
 
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.
290
+ 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. Add `filter=blocking` to receive only the locations that fail the policy, which is what to fix when `diagnostic_summary.status` is blocked. List its source files and resolved document with listSpecRevisionFiles.
355
291
 
356
292
  | Argument or flag | In | Type | Required | Description |
357
293
  | --- | --- | --- | --- | --- |
358
294
  | `<spec_revision_id>` | path | `string` | yes | — |
359
295
  | `--include` | query | `string` | no | Add related data to the response. `diagnostics` adds the `diagnostics` and `patch_diagnostics` arrays. |
296
+ | `--filter` | query | `string` | no | Narrow the included Diagnostics to matching locations. Requires include=diagnostics. blocking: locations that fail the Diagnostic policy. introduced: locations new since the baseline. A Diagnostic with no matching location is omitted. diagnostic_summary always describes the complete revision. |
360
297
 
361
298
  ```sh
362
299
  typeship spec-revisions get srev_6m1q8v4k2p9d7h3c
@@ -392,31 +329,9 @@ Read the full command contract with `typeship docs spec-revisions list-files --j
392
329
 
393
330
  ## targets
394
331
 
395
- ### `typeship targets list [flags]`
396
-
397
- List Targets
398
-
399
- `GET /targets`
400
-
401
- Safety: **read** · Authentication: **required**
402
-
403
- | Argument or flag | In | Type | Required | Description |
404
- | --- | --- | --- | --- | --- |
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 input_invalid. List query parameters must appear only once; repeated or unrecognized parameters return 400 query_param_invalid. Default: 20. |
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 or malformed cursors, and cursors issued for different filters, return 400 cursor_invalid; start again from the first page. Repeated cursors return 400 query_param_invalid. 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. |
408
-
409
- ```sh
410
- typeship targets list
411
- ```
412
-
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.
414
-
415
- Read the full command contract with `typeship docs targets list --json`.
416
-
417
332
  ### `typeship targets create [flags]`
418
333
 
419
- Create an independently configured Target
334
+ Create a Target
420
335
 
421
336
  `POST /targets`
422
337
 
@@ -428,7 +343,6 @@ Creates a Target with its own configuration, Deliveries, and release history. Mu
428
343
  | --- | --- | --- | --- | --- |
429
344
  | `--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. |
430
345
  | `--name` | body | `string` | yes | — |
431
- | `--spec-id` | body | `string` | yes | Unique identifier for a project's logical API Spec. |
432
346
  | `--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
347
  | `--status` | body | `string` | no | Default: "active". |
434
348
  | `--release-channel` | body | `string` | no | Default: "stable". |
@@ -440,68 +354,65 @@ Creates a Target with its own configuration, Deliveries, and release history. Mu
440
354
  Use `--data '<json>'`, `--data @body.json`, or `--data -` to supply the request body. Field flags override matching body fields.
441
355
 
442
356
  ```sh
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}}]'
357
+ typeship targets create --project-id prj_4f8k2m7x9q1v6b3n --name 'Parcel CLI' --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}}]'
444
358
  ```
445
359
 
446
360
  Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
447
361
 
448
362
  Read the full command contract with `typeship docs targets create --json`.
449
363
 
450
- ### `typeship targets get <target_id> [flags]`
364
+ ### `typeship targets list [flags]`
451
365
 
452
- Get a Target
366
+ List Targets
453
367
 
454
- `GET /targets/{target_id}`
368
+ `GET /targets`
455
369
 
456
370
  Safety: **read** · Authentication: **required**
457
371
 
458
372
  | Argument or flag | In | Type | Required | Description |
459
373
  | --- | --- | --- | --- | --- |
460
- | `<target_id>` | path | `string` | yes | Accepts an ID or an exact name (resolved via targets_list). IDs come from targets_list. |
374
+ | `--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 input_invalid. List query parameters must appear only once; repeated or unrecognized parameters return 400 query_param_invalid. Default: 20. |
375
+ | `--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 or malformed cursors, and cursors issued for different filters, return 400 cursor_invalid; start again from the first page. Repeated cursors return 400 query_param_invalid. The page limit may change between requests. |
376
+ | `--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. |
461
377
 
462
378
  ```sh
463
- typeship targets get tgt_5m8q2v7k1p9d4h6c
379
+ typeship targets list
464
380
  ```
465
381
 
466
- Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
467
-
468
- Read the full command contract with `typeship docs targets get --json`.
469
-
470
- ### `typeship targets delete <target_id> [flags]`
382
+ 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.
471
383
 
472
- Delete an unused Target
384
+ Read the full command contract with `typeship docs targets list --json`.
473
385
 
474
- `DELETE /targets/{target_id}`
386
+ ### `typeship targets get <target_id> [flags]`
475
387
 
476
- Safety: **destructive** · Authentication: **required**
388
+ Get a Target
477
389
 
478
- Deletes a Target with no Generation history, release history, or active Draft. A `409 resource_has_dependencies` means one of those resources still depends on it. Retrieve the Target, disable it instead, or resolve the dependency before retrying.
390
+ `GET /targets/{target_id}`
479
391
 
480
- See [conditional writes](https://typeship.dev/docs/typeship-api#conditional-writes) for ETag and If-Match.
392
+ Safety: **read** · Authentication: **required**
481
393
 
482
394
  | Argument or flag | In | Type | Required | Description |
483
395
  | --- | --- | --- | --- | --- |
484
396
  | `<target_id>` | path | `string` | yes | Accepts an ID or an exact name (resolved via targets_list). IDs come from targets_list. |
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. |
486
397
 
487
398
  ```sh
488
- typeship targets delete tgt_5m8q2v7k1p9d4h6c --force
399
+ typeship targets get tgt_5m8q2v7k1p9d4h6c
489
400
  ```
490
401
 
491
402
  Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
492
403
 
493
- Read the full command contract with `typeship docs targets delete --json`.
404
+ Read the full command contract with `typeship docs targets get --json`.
494
405
 
495
406
  ### `typeship targets update <target_id> [flags]`
496
407
 
497
- Update a Target or its Deliveries
408
+ Update a Target
498
409
 
499
410
  `PATCH /targets/{target_id}`
500
411
 
501
412
  Safety: **write** · Authentication: **required**
502
413
 
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.
414
+ Omitted fields keep their current values. Supplied config and checks replace their complete stored values. Change Deliveries with createDelivery, updateDelivery, and deleteDelivery.
415
+ With Project auto_generate enabled, changing Target config or checks queues that Target's Generation. A queued or running Target reuses that Generation.
505
416
  Omitting If-Match applies the update to the current resource; with If-Match, a stale ETag returns 412 precondition_failed without saving.
506
417
  Select the next version through PATCH /drafts/{draft_id} on the Target's draft_id.
507
418
 
@@ -517,7 +428,6 @@ See [conditional writes](https://typeship.dev/docs/typeship-api#conditional-writ
517
428
  | `--release-channel` | body | `string` | no | — |
518
429
  | `--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
430
  | `--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. |
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. |
521
431
  | `--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. |
522
432
 
523
433
  Use `--data '<json>'`, `--data @body.json`, or `--data -` to supply the request body. Field flags override matching body fields.
@@ -530,9 +440,34 @@ Output: the response payload as JSON on stdout. A successful response without a
530
440
 
531
441
  Read the full command contract with `typeship docs targets update --json`.
532
442
 
443
+ ### `typeship targets delete <target_id> [flags]`
444
+
445
+ Delete a Target
446
+
447
+ `DELETE /targets/{target_id}`
448
+
449
+ Safety: **destructive** · Authentication: **required**
450
+
451
+ Deletes a Target with no Generation history, release history, or active Draft. A `409 resource_has_dependencies` means one of those resources still depends on it. Retrieve the Target, disable it instead, or resolve the dependency before retrying.
452
+
453
+ See [conditional writes](https://typeship.dev/docs/typeship-api#conditional-writes) for ETag and If-Match.
454
+
455
+ | Argument or flag | In | Type | Required | Description |
456
+ | --- | --- | --- | --- | --- |
457
+ | `<target_id>` | path | `string` | yes | Accepts an ID or an exact name (resolved via targets_list). IDs come from targets_list. |
458
+ | `--if-match` | header | `string` | no | ETag from a preceding response. The write applies only if the resource still has that version; otherwise it returns 412 precondition_failed without changes. Omit to write the current version. See https://typeship.dev/docs/typeship-api#conditional-writes. |
459
+
460
+ ```sh
461
+ typeship targets delete tgt_5m8q2v7k1p9d4h6c --force
462
+ ```
463
+
464
+ Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
465
+
466
+ Read the full command contract with `typeship docs targets delete --json`.
467
+
533
468
  ### `typeship targets adopt <target_id> [flags]`
534
469
 
535
- Adopt a verified existing package as the latest release
470
+ Adopt a package release
536
471
 
537
472
  `POST /targets/{target_id}/adopt`
538
473
 
@@ -557,336 +492,379 @@ Output: the response payload as JSON on stdout. A successful response without a
557
492
 
558
493
  Read the full command contract with `typeship docs targets adopt --json`.
559
494
 
560
- ## drafts
495
+ ## deliveries
561
496
 
562
- ### `typeship drafts list [flags]`
497
+ ### `typeship deliveries create [flags]`
563
498
 
564
- List Drafts
499
+ Create a Delivery
565
500
 
566
- `GET /drafts`
501
+ `POST /deliveries`
567
502
 
568
- Safety: **read** · Authentication: **required**
503
+ Safety: **write** · Authentication: **required**
569
504
 
570
- Lists open and merged Drafts, newest first. Each Target has one open Draft; each merge adds a merged Draft.
505
+ Adds a repository or hosted MCP Delivery to a Target. A Target has at most one Delivery of each type; a `409 delivery_exists` means it already has one, so update that Delivery instead.
506
+ With Project auto_generate enabled, adding a Delivery queues the Target's Generation. A queued or running Target reuses that Generation.
507
+
508
+ A `409 delivery_conflict` means another Target owns the requested repository directory. A `409 target_busy` means the Target is publishing; wait for it to finish.
509
+ A `502 follow_up_failed` means the Delivery was saved, but retiring an obsolete review or regenerating the Target failed. Get the Delivery and follow the error's retryable and suggested_action fields.
510
+
511
+ | Argument or flag | In | Type | Required | Description |
512
+ | --- | --- | --- | --- | --- |
513
+ | `--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. |
514
+
515
+ Use `--data '<json>'`, `--data @body.json`, or `--data -` to supply the request body. Field flags override matching body fields.
516
+
517
+ ```sh
518
+ typeship deliveries create --data '{"target_id":"tgt_5m8q2v7k1p9d4h6c","type":"repository","repository":{"provider":"github","identifier":"parcel-example/parcel-client","package_name":"parcel-client","publish_on_merge":false}}'
519
+ ```
520
+
521
+ Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
522
+
523
+ Read the full command contract with `typeship docs deliveries create --json`.
524
+
525
+ ### `typeship deliveries list [flags]`
526
+
527
+ List Deliveries
528
+
529
+ `GET /deliveries`
530
+
531
+ Safety: **read** · Authentication: **required**
571
532
 
572
533
  | Argument or flag | In | Type | Required | Description |
573
534
  | --- | --- | --- | --- | --- |
574
535
  | `--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 input_invalid. List query parameters must appear only once; repeated or unrecognized parameters return 400 query_param_invalid. Default: 20. |
575
536
  | `--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 or malformed cursors, and cursors issued for different filters, return 400 cursor_invalid; start again from the first page. Repeated cursors return 400 query_param_invalid. 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. |
537
+ | `--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. |
578
538
 
579
539
  ```sh
580
- typeship drafts list
540
+ typeship deliveries list
581
541
  ```
582
542
 
583
543
  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.
584
544
 
585
- Read the full command contract with `typeship docs drafts list --json`.
545
+ Read the full command contract with `typeship docs deliveries list --json`.
586
546
 
587
- ### `typeship drafts get <draft_id> [flags]`
547
+ ### `typeship deliveries get <delivery_id> [flags]`
588
548
 
589
- Get a Draft
549
+ Get a Delivery
590
550
 
591
- `GET /drafts/{draft_id}`
551
+ `GET /deliveries/{delivery_id}`
592
552
 
593
553
  Safety: **read** · Authentication: **required**
594
554
 
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.
555
+ Returns the configured repository or hosted MCP Delivery for a Target. A Delivery in another organization returns 404 resource_not_found.
596
556
 
597
557
  | Argument or flag | In | Type | Required | Description |
598
558
  | --- | --- | --- | --- | --- |
599
- | `<draft_id>` | path | `string` | yes | — |
559
+ | `<delivery_id>` | path | `string` | yes | — |
600
560
 
601
561
  ```sh
602
- typeship drafts get drf_3q7m1v8k2p5d9h4c
562
+ typeship deliveries get dlv_4q8m2v7k1p9d5h6c
603
563
  ```
604
564
 
605
565
  Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
606
566
 
607
- Read the full command contract with `typeship docs drafts get --json`.
567
+ Read the full command contract with `typeship docs deliveries get --json`.
608
568
 
609
- ### `typeship drafts update <draft_id> [flags]`
569
+ ### `typeship deliveries update <delivery_id> [flags]`
610
570
 
611
- Select an exact Draft version or return to automatic versioning
571
+ Update a Delivery
612
572
 
613
- `PATCH /drafts/{draft_id}`
573
+ `PATCH /deliveries/{delivery_id}`
614
574
 
615
575
  Safety: **write** · Authentication: **required**
616
576
 
617
- Checks your version choice against the required version bump, then regenerates the existing Draft pull request.
577
+ Replaces a repository Delivery's settings. Omitted optional settings reset to their defaults. Hosted MCP Deliveries have no settings to update.
578
+ With Project auto_generate enabled, changing a Delivery queues the Target's Generation. A queued or running Target reuses that Generation.
579
+ Omitting If-Match applies the update to the current Delivery; with If-Match, a stale ETag returns 412 precondition_failed without saving.
618
580
 
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.
581
+ A `409 delivery_conflict` means another Target owns the requested repository directory. A `409 target_busy` means the Target is publishing; wait for it to finish.
582
+ A `502 follow_up_failed` means the Delivery was saved, but retiring an obsolete review or regenerating the Target failed. Get the Delivery and follow the error's retryable and suggested_action fields.
583
+ See [conditional writes](https://typeship.dev/docs/typeship-api#conditional-writes) for ETag and If-Match.
624
584
 
625
585
  | Argument or flag | In | Type | Required | Description |
626
586
  | --- | --- | --- | --- | --- |
627
- | `<draft_id>` | path | `string` | yes | — |
628
- | `--version-next` | body | `string` | yes | Exact SemVer, or null to return to automatic selection. |
587
+ | `<delivery_id>` | path | `string` | yes | — |
588
+ | `--repository` | body | `object` | yes | — |
629
589
  | `--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. |
630
590
 
631
591
  Use `--data '<json>'`, `--data @body.json`, or `--data -` to supply the request body. Field flags override matching body fields.
632
592
 
633
593
  ```sh
634
- typeship drafts update drf_3q7m1v8k2p5d9h4c --version-next 1.1.0
594
+ typeship deliveries update dlv_4q8m2v7k1p9d5h6c --repository '{"provider":"github","identifier":"parcel-example/parcel-client","package_name":"parcel-client","publish_on_merge":true}'
635
595
  ```
636
596
 
637
597
  Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
638
598
 
639
- Read the full command contract with `typeship docs drafts update --json`.
599
+ Read the full command contract with `typeship docs deliveries update --json`.
640
600
 
641
- ### `typeship drafts list-files <draft_id> [flags]`
601
+ ### `typeship deliveries delete <delivery_id> [flags]`
642
602
 
643
- List customized and conflicted files on a Draft
603
+ Delete a Delivery
644
604
 
645
- `GET /drafts/{draft_id}/files`
605
+ `DELETE /deliveries/{delivery_id}`
646
606
 
647
- Safety: **read** · Authentication: **required**
607
+ Safety: **destructive** · Authentication: **required**
648
608
 
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.
609
+ Removes a Delivery from its Target. Removing a repository Delivery retires the Target's open Draft pull request; removing a hosted MCP Delivery stops serving its URL. Recreating the type later allocates a new ID and, for hosted MCP, a new URL.
650
610
 
651
- Returns `409 resource_changed` while Typeship is carrying the Draft's latest commit forward (status working), or when the Draft changes between pages.
611
+ A `409 target_busy` means the Target is publishing; wait for it to finish. A `502 follow_up_failed` means the Delivery was removed, but retiring an obsolete review or regenerating the Target failed.
612
+ See [conditional writes](https://typeship.dev/docs/typeship-api#conditional-writes) for ETag and If-Match.
652
613
 
653
614
  | Argument or flag | In | Type | Required | Description |
654
615
  | --- | --- | --- | --- | --- |
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 input_invalid. List query parameters must appear only once; repeated or unrecognized parameters return 400 query_param_invalid. 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 or malformed cursors, and cursors issued for different filters, return 400 cursor_invalid; start again from the first page. Repeated cursors return 400 query_param_invalid. The page limit may change between requests. |
616
+ | `<delivery_id>` | path | `string` | yes | — |
617
+ | `--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. |
659
618
 
660
619
  ```sh
661
- typeship drafts list-files drf_3q7m1v8k2p5d9h4c
620
+ typeship deliveries delete dlv_4q8m2v7k1p9d5h6c --force
662
621
  ```
663
622
 
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.
623
+ Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
665
624
 
666
- Read the full command contract with `typeship docs drafts list-files --json`.
625
+ Read the full command contract with `typeship docs deliveries delete --json`.
667
626
 
668
- ### `typeship drafts resolve <draft_id> [flags]`
627
+ ## generations
669
628
 
670
- Resolve selected Draft files
629
+ ### `typeship generations get <generation_id> [flags]`
671
630
 
672
- `POST /drafts/{draft_id}/resolve`
631
+ Get a Generation
673
632
 
674
- Safety: **write** · Authentication: **required**
633
+ `GET /generations/{generation_id}`
675
634
 
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.
635
+ Safety: **read** · Authentication: **required**
677
636
 
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.
637
+ 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.
679
638
 
680
639
  | Argument or flag | In | Type | Required | Description |
681
640
  | --- | --- | --- | --- | --- |
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.
641
+ | `<generation_id>` | path | `string` | yes | Accepts an ID or an exact name (resolved via generations_list). IDs come from generations_list. |
687
642
 
688
643
  ```sh
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"}]'
644
+ typeship generations get gen_7h2p5d9c3m8w1k6q
690
645
  ```
691
646
 
692
647
  Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
693
648
 
694
- Read the full command contract with `typeship docs drafts resolve --json`.
695
-
696
- ### `typeship drafts recover <draft_id> [flags]`
649
+ Read the full command contract with `typeship docs generations get --json`.
697
650
 
698
- Approve recovery from rewritten default-branch history
651
+ ### `typeship generations list [flags]`
699
652
 
700
- `POST /drafts/{draft_id}/recover`
653
+ List Generations
701
654
 
702
- Safety: **write** · Authentication: **required**
655
+ `GET /generations`
703
656
 
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.
657
+ Safety: **read** · Authentication: **required**
705
658
 
706
659
  | Argument or flag | In | Type | Required | Description |
707
660
  | --- | --- | --- | --- | --- |
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.
661
+ | `--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 input_invalid. List query parameters must appear only once; repeated or unrecognized parameters return 400 query_param_invalid. Default: 20. |
662
+ | `--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 or malformed cursors, and cursors issued for different filters, return 400 cursor_invalid; start again from the first page. Repeated cursors return 400 query_param_invalid. The page limit may change between requests. |
663
+ | `--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. |
664
+ | `--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. |
665
+ | `--status` | query | `string` | no | Only Generations with this status. |
713
666
 
714
667
  ```sh
715
- typeship drafts recover drf_3q7m1v8k2p5d9h4c --expected-default-sha 89abcdef0123456789abcdef0123456789abcdef --expected-head-sha 0123456789abcdef0123456789abcdef01234567
668
+ typeship generations list
716
669
  ```
717
670
 
718
- Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
719
-
720
- Read the full command contract with `typeship docs drafts recover --json`.
671
+ 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.
721
672
 
722
- ## releases
673
+ Read the full command contract with `typeship docs generations list --json`.
723
674
 
724
- ### `typeship releases list [flags]`
675
+ ### `typeship generations list-files <generation_id> [flags]`
725
676
 
726
- List releases
677
+ List a Generation's files
727
678
 
728
- `GET /releases`
679
+ `GET /generations/{generation_id}/files`
729
680
 
730
681
  Safety: **read** · Authentication: **required**
731
682
 
683
+ Lists the generated package's files, ordered by path. Read content with getFile.
684
+
732
685
  | Argument or flag | In | Type | Required | Description |
733
686
  | --- | --- | --- | --- | --- |
687
+ | `<generation_id>` | path | `string` | yes | Accepts an ID or an exact name (resolved via generations_list). IDs come from generations_list. |
734
688
  | `--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 input_invalid. List query parameters must appear only once; repeated or unrecognized parameters return 400 query_param_invalid. Default: 20. |
735
689
  | `--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 or malformed cursors, and cursors issued for different filters, return 400 cursor_invalid; start again from the first page. Repeated cursors return 400 query_param_invalid. 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. |
737
690
 
738
691
  ```sh
739
- typeship releases list
692
+ typeship generations list-files gen_7h2p5d9c3m8w1k6q
740
693
  ```
741
694
 
742
695
  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.
743
696
 
744
- Read the full command contract with `typeship docs releases list --json`.
697
+ Read the full command contract with `typeship docs generations list-files --json`.
745
698
 
746
- ### `typeship releases get <release_id> [flags]`
699
+ ## drafts
747
700
 
748
- Get an immutable release
701
+ ### `typeship drafts list [flags]`
749
702
 
750
- `GET /releases/{release_id}`
703
+ List Drafts
704
+
705
+ `GET /drafts`
751
706
 
752
707
  Safety: **read** · Authentication: **required**
753
708
 
709
+ Lists open and merged Drafts, newest first. Each Target has one open Draft; each merge adds a merged Draft.
710
+
754
711
  | Argument or flag | In | Type | Required | Description |
755
712
  | --- | --- | --- | --- | --- |
756
- | `<release_id>` | path | `string` | yes | — |
713
+ | `--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 input_invalid. List query parameters must appear only once; repeated or unrecognized parameters return 400 query_param_invalid. Default: 20. |
714
+ | `--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 or malformed cursors, and cursors issued for different filters, return 400 cursor_invalid; start again from the first page. Repeated cursors return 400 query_param_invalid. The page limit may change between requests. |
715
+ | `--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. |
716
+ | `--status` | query | `string` | no | Only Drafts with this status. |
757
717
 
758
718
  ```sh
759
- typeship releases get rel_7m2q8v4k1p9d5h6c
719
+ typeship drafts list
760
720
  ```
761
721
 
762
- Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
763
-
764
- Read the full command contract with `typeship docs releases get --json`.
722
+ 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.
765
723
 
766
- ### `typeship releases republish <release_id> [flags]`
724
+ Read the full command contract with `typeship docs drafts list --json`.
767
725
 
768
- Retry publishing an exact release
726
+ ### `typeship drafts get <draft_id> [flags]`
769
727
 
770
- `POST /releases/{release_id}/republish`
728
+ Get a Draft
771
729
 
772
- Safety: **write** · Authentication: **required**
730
+ `GET /drafts/{draft_id}`
773
731
 
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.
732
+ Safety: **read** · Authentication: **required**
775
733
 
776
- A `502 repository_unavailable` means the repository publishing workflow could not be dispatched, and nothing was changed.
734
+ Returns the Draft's status. An open Draft also reports its typed reason when action is required, next version and its source, compatibility and version assessment, blocking errors, 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.
777
735
 
778
736
  | Argument or flag | In | Type | Required | Description |
779
737
  | --- | --- | --- | --- | --- |
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. |
738
+ | `<draft_id>` | path | `string` | yes | — |
782
739
 
783
740
  ```sh
784
- typeship releases republish rel_7m2q8v4k1p9d5h6c
741
+ typeship drafts get drf_3q7m1v8k2p5d9h4c
785
742
  ```
786
743
 
787
744
  Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
788
745
 
789
- Read the full command contract with `typeship docs releases republish --json`.
746
+ Read the full command contract with `typeship docs drafts get --json`.
790
747
 
791
- ## deliveries
748
+ ### `typeship drafts update <draft_id> [flags]`
792
749
 
793
- ### `typeship deliveries list [flags]`
750
+ Update a Draft
794
751
 
795
- List Deliveries
752
+ `PATCH /drafts/{draft_id}`
796
753
 
797
- `GET /deliveries`
754
+ Safety: **write** · Authentication: **required**
798
755
 
799
- Safety: **read** · Authentication: **required**
756
+ Checks your version choice against the required version bump, then regenerates the existing Draft pull request.
757
+
758
+ 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.
759
+
760
+ 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.
761
+ 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.
762
+ See [conditional writes](https://typeship.dev/docs/typeship-api#conditional-writes) for ETag and If-Match.
800
763
 
801
764
  | Argument or flag | In | Type | Required | Description |
802
765
  | --- | --- | --- | --- | --- |
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 input_invalid. List query parameters must appear only once; repeated or unrecognized parameters return 400 query_param_invalid. 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 or malformed cursors, and cursors issued for different filters, return 400 cursor_invalid; start again from the first page. Repeated cursors return 400 query_param_invalid. 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. |
766
+ | `<draft_id>` | path | `string` | yes | — |
767
+ | `--version-next` | body | `string` | yes | Exact SemVer, or null to return to automatic selection. |
768
+ | `--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. |
769
+
770
+ Use `--data '<json>'`, `--data @body.json`, or `--data -` to supply the request body. Field flags override matching body fields.
806
771
 
807
772
  ```sh
808
- typeship deliveries list
773
+ typeship drafts update drf_3q7m1v8k2p5d9h4c --version-next 1.1.0
809
774
  ```
810
775
 
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.
776
+ Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
812
777
 
813
- Read the full command contract with `typeship docs deliveries list --json`.
778
+ Read the full command contract with `typeship docs drafts update --json`.
814
779
 
815
- ### `typeship deliveries get <delivery_id> [flags]`
780
+ ### `typeship drafts list-files <draft_id> [flags]`
816
781
 
817
- Get a Delivery
782
+ List a Draft's files
818
783
 
819
- `GET /deliveries/{delivery_id}`
784
+ `GET /drafts/{draft_id}/files`
820
785
 
821
786
  Safety: **read** · Authentication: **required**
822
787
 
823
- Returns the configured repository or hosted MCP Delivery for a Target. A Delivery in another organization returns 404 resource_not_found.
788
+ 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.
789
+
790
+ Returns `409 resource_changed` while Typeship is carrying the Draft's latest commit forward (status working), or when the Draft changes between pages.
824
791
 
825
792
  | Argument or flag | In | Type | Required | Description |
826
793
  | --- | --- | --- | --- | --- |
827
- | `<delivery_id>` | path | `string` | yes | — |
794
+ | `<draft_id>` | path | `string` | yes | — |
795
+ | `--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. |
796
+ | `--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 input_invalid. List query parameters must appear only once; repeated or unrecognized parameters return 400 query_param_invalid. Default: 20. |
797
+ | `--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 or malformed cursors, and cursors issued for different filters, return 400 cursor_invalid; start again from the first page. Repeated cursors return 400 query_param_invalid. The page limit may change between requests. |
828
798
 
829
799
  ```sh
830
- typeship deliveries get dlv_4q8m2v7k1p9d5h6c
800
+ typeship drafts list-files drf_3q7m1v8k2p5d9h4c
831
801
  ```
832
802
 
833
- Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
803
+ 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.
834
804
 
835
- Read the full command contract with `typeship docs deliveries get --json`.
805
+ Read the full command contract with `typeship docs drafts list-files --json`.
836
806
 
837
- ## publications
807
+ ### `typeship drafts resolve <draft_id> [flags]`
838
808
 
839
- ### `typeship publications list [flags]`
809
+ Resolve Draft conflicts
840
810
 
841
- List publications
811
+ `POST /drafts/{draft_id}/resolve`
842
812
 
843
- `GET /publications`
813
+ Safety: **write** · Authentication: **required**
844
814
 
845
- Safety: **read** · Authentication: **required**
815
+ 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.
816
+
817
+ 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.
846
818
 
847
819
  | Argument or flag | In | Type | Required | Description |
848
820
  | --- | --- | --- | --- | --- |
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 input_invalid. List query parameters must appear only once; repeated or unrecognized parameters return 400 query_param_invalid. 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 or malformed cursors, and cursors issued for different filters, return 400 cursor_invalid; start again from the first page. Repeated cursors return 400 query_param_invalid. The page limit may change between requests. |
851
- | `--release-id` | query | `string` | no | Only publications of this release. |
821
+ | `<draft_id>` | path | `string` | yes | — |
822
+ | `--expected-head-sha` | body | `string` | yes | The Draft's head_sha. A newer Draft commit returns 409 resource_changed without saving. |
823
+ | `--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. |
824
+
825
+ Use `--data '<json>'`, `--data @body.json`, or `--data -` to supply the request body. Field flags override matching body fields.
852
826
 
853
827
  ```sh
854
- typeship publications list
828
+ 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"}]'
855
829
  ```
856
830
 
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.
831
+ Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
858
832
 
859
- Read the full command contract with `typeship docs publications list --json`.
833
+ Read the full command contract with `typeship docs drafts resolve --json`.
860
834
 
861
- ### `typeship publications get <publication_id> [flags]`
835
+ ### `typeship drafts recover <draft_id> [flags]`
862
836
 
863
- Get publishing status
837
+ Recover a Draft's history
864
838
 
865
- `GET /publications/{publication_id}`
839
+ `POST /drafts/{draft_id}/recover`
866
840
 
867
- Safety: **read** · Authentication: **required**
841
+ Safety: **write** · Authentication: **required**
868
842
 
869
- Returns the registry publishing status for a release. A status in another organization returns 404 resource_not_found.
843
+ 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.
870
844
 
871
845
  | Argument or flag | In | Type | Required | Description |
872
846
  | --- | --- | --- | --- | --- |
873
- | `<publication_id>` | path | `string` | yes | — |
847
+ | `<draft_id>` | path | `string` | yes | — |
848
+ | `--expected-default-sha` | body | `string` | yes | The Draft's history_recovery.default_sha. |
849
+ | `--expected-head-sha` | body | `string` | yes | The Draft's history_recovery.head_sha; null when the Draft branch is absent. |
850
+
851
+ Use `--data '<json>'`, `--data @body.json`, or `--data -` to supply the request body. Field flags override matching body fields.
874
852
 
875
853
  ```sh
876
- typeship publications get pub_2m8q4v7k1p9d5h6c
854
+ typeship drafts recover drf_3q7m1v8k2p5d9h4c --expected-default-sha 89abcdef0123456789abcdef0123456789abcdef --expected-head-sha 0123456789abcdef0123456789abcdef01234567
877
855
  ```
878
856
 
879
857
  Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
880
858
 
881
- Read the full command contract with `typeship docs publications get --json`.
859
+ Read the full command contract with `typeship docs drafts recover --json`.
882
860
 
883
- ## generations
861
+ ## releases
884
862
 
885
- ### `typeship generations list [flags]`
863
+ ### `typeship releases list [flags]`
886
864
 
887
- List generations
865
+ List Releases
888
866
 
889
- `GET /generations`
867
+ `GET /releases`
890
868
 
891
869
  Safety: **read** · Authentication: **required**
892
870
 
@@ -894,69 +872,68 @@ Safety: **read** · Authentication: **required**
894
872
  | --- | --- | --- | --- | --- |
895
873
  | `--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 input_invalid. List query parameters must appear only once; repeated or unrecognized parameters return 400 query_param_invalid. Default: 20. |
896
874
  | `--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 or malformed cursors, and cursors issued for different filters, return 400 cursor_invalid; start again from the first page. Repeated cursors return 400 query_param_invalid. 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. |
875
+ | `--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. |
900
876
 
901
877
  ```sh
902
- typeship generations list
878
+ typeship releases list
903
879
  ```
904
880
 
905
881
  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.
906
882
 
907
- Read the full command contract with `typeship docs generations list --json`.
883
+ Read the full command contract with `typeship docs releases list --json`.
908
884
 
909
- ### `typeship generations get <generation_id> [flags]`
885
+ ### `typeship releases get <release_id> [flags]`
910
886
 
911
- Get a generation
887
+ Get a Release
912
888
 
913
- `GET /generations/{generation_id}`
889
+ `GET /releases/{release_id}`
914
890
 
915
891
  Safety: **read** · Authentication: **required**
916
892
 
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.
918
-
919
893
  | Argument or flag | In | Type | Required | Description |
920
894
  | --- | --- | --- | --- | --- |
921
- | `<generation_id>` | path | `string` | yes | Accepts an ID or an exact name (resolved via generations_list). IDs come from generations_list. |
895
+ | `<release_id>` | path | `string` | yes | — |
922
896
 
923
897
  ```sh
924
- typeship generations get gen_7h2p5d9c3m8w1k6q
898
+ typeship releases get rel_7m2q8v4k1p9d5h6c
925
899
  ```
926
900
 
927
901
  Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
928
902
 
929
- Read the full command contract with `typeship docs generations get --json`.
903
+ Read the full command contract with `typeship docs releases get --json`.
930
904
 
931
- ### `typeship generations list-files <generation_id> [flags]`
905
+ ### `typeship releases retry <release_id> [flags]`
932
906
 
933
- List a Generation's files
907
+ Retry publishing a Release
934
908
 
935
- `GET /generations/{generation_id}/files`
909
+ `POST /releases/{release_id}/retry`
936
910
 
937
- Safety: **read** · Authentication: **required**
911
+ Safety: **write** · Authentication: **required**
938
912
 
939
- Lists the generated package's files, ordered by path. Read content with getFile.
913
+ Queues every failed or queued Publication of the release and starts its repository publishing workflow again. Publishing uses that release's version and accepted commit, even if a newer Draft or release exists. Completed Publications are not repeated.
914
+
915
+ Returns `202` with the Release. Get the Release until each Publication reaches `completed` or `failed`.
916
+
917
+ A `409 publication_not_retryable` means no Publication is queued or failed. A `502 repository_unavailable` means the repository publishing workflow could not be dispatched, and nothing was changed.
940
918
 
941
919
  | Argument or flag | In | Type | Required | Description |
942
920
  | --- | --- | --- | --- | --- |
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 input_invalid. List query parameters must appear only once; repeated or unrecognized parameters return 400 query_param_invalid. 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 or malformed cursors, and cursors issued for different filters, return 400 cursor_invalid; start again from the first page. Repeated cursors return 400 query_param_invalid. The page limit may change between requests. |
921
+ | `<release_id>` | path | `string` | yes | — |
922
+ | `--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. |
946
923
 
947
924
  ```sh
948
- typeship generations list-files gen_7h2p5d9c3m8w1k6q
925
+ typeship releases retry rel_7m2q8v4k1p9d5h6c
949
926
  ```
950
927
 
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.
928
+ Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
952
929
 
953
- Read the full command contract with `typeship docs generations list-files --json`.
930
+ Read the full command contract with `typeship docs releases retry --json`.
954
931
 
955
932
  ## files
956
933
 
957
934
  ### `typeship files get <file_id> [flags]`
958
935
 
959
- Get a file
936
+ Get a File
960
937
 
961
938
  `GET /files/{file_id}`
962
939
 
@@ -977,11 +954,75 @@ Output: the response payload as JSON on stdout. A successful response without a
977
954
 
978
955
  Read the full command contract with `typeship docs files get --json`.
979
956
 
957
+ ## packages
958
+
959
+ ### `typeship packages generate [flags]`
960
+
961
+ Generate a package
962
+
963
+ `POST /generate`
964
+
965
+ Safety: **write** · Authentication: **optional**
966
+
967
+ Returns one generated package without creating a Project.
968
+
969
+ Supports [idempotent retries](https://typeship.dev/docs/typeship-api/idempotency); keyed responses include generated files in the replay cache.
970
+
971
+ 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.
972
+
973
+ 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`.
974
+
975
+ 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.
976
+
977
+ | Argument or flag | In | Type | Required | Description |
978
+ | --- | --- | --- | --- | --- |
979
+ | `--spec` | body | `json` | yes | A Spec for one-shot generation, provided as exactly one URL or inline entrypoint. |
980
+ | `--target` | body | `object` | yes | One-shot generator descriptor; no persisted Target is created. |
981
+ | `--package-name` | body | `string` | no | npm package or Python distribution override. Valid only for the TypeScript and Python SDK targets. |
982
+ | `--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. |
983
+ | `--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. |
984
+ | `--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. |
985
+ | `--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. |
986
+
987
+ Use `--data '<json>'`, `--data @body.json`, or `--data -` to supply the request body. Field flags override matching body fields.
988
+
989
+ ```sh
990
+ typeship packages generate --spec '{"url":"https://typeship.dev/examples/petstore/openapi.yaml"}' --target '{"type":"cli"}'
991
+ ```
992
+
993
+ Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
994
+
995
+ Read the full command contract with `typeship docs packages generate --json`.
996
+
997
+ ### `typeship packages download [flags]`
998
+
999
+ Download a generated package
1000
+
1001
+ `GET /generate/download`
1002
+
1003
+ Safety: **read** · Authentication: **none**
1004
+
1005
+ Download the complete ZIP referenced by `packages_generate`'s `download.url`. Pass the token from that URL. No API key is needed; the token grants access only to that exact package until its replay window expires. Keep the token private.
1006
+
1007
+ The local MCP server saves this binary response to disk. On a hosted MCP connection, download the original URL directly to your workspace. Verify the ZIP against `download.sha256` before extracting it into an empty directory. Expired or invalid tokens return `404`; a new generation creates a new download.
1008
+
1009
+ | Argument or flag | In | Type | Required | Description |
1010
+ | --- | --- | --- | --- | --- |
1011
+ | `--query-token` | query | `string` | yes | Private download token from download.url in the generation result. |
1012
+
1013
+ ```sh
1014
+ typeship packages download --query-token parcel_download_example_token_1234567890123
1015
+ ```
1016
+
1017
+ Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
1018
+
1019
+ Read the full command contract with `typeship docs packages download --json`.
1020
+
980
1021
  ## organization
981
1022
 
982
1023
  ### `typeship organization get [flags]`
983
1024
 
984
- The organization behind the presented credentials
1025
+ Get the Organization
985
1026
 
986
1027
  `GET /organization`
987
1028
 
@@ -1013,6 +1054,7 @@ Lists key metadata and the last four characters of each key. Full keys are not r
1013
1054
  | --- | --- | --- | --- | --- |
1014
1055
  | `--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 input_invalid. List query parameters must appear only once; repeated or unrecognized parameters return 400 query_param_invalid. Default: 20. |
1015
1056
  | `--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 or malformed cursors, and cursors issued for different filters, return 400 cursor_invalid; start again from the first page. Repeated cursors return 400 query_param_invalid. The page limit may change between requests. |
1057
+ | `--status` | query | `string` | no | Only keys with this status. |
1016
1058
 
1017
1059
  ```sh
1018
1060
  typeship api-keys list
@@ -1048,11 +1090,11 @@ Read the full command contract with `typeship docs api-keys get --json`.
1048
1090
 
1049
1091
  Revoke an API key
1050
1092
 
1051
- `DELETE /api-keys/{api_key_id}`
1093
+ `POST /api-keys/{api_key_id}/revoke`
1052
1094
 
1053
- Safety: **destructive** · Authentication: **required**
1095
+ Safety: **write** · Authentication: **required**
1054
1096
 
1055
- Revokes a key. Repeating the request returns the same result.
1097
+ Revokes a key immediately. The key stays listed with `status: revoked`. Repeating the request returns the same result.
1056
1098
 
1057
1099
  With OAuth, members can revoke their own keys; organization admins can revoke any key. Organization API keys can revoke any key in their organization.
1058
1100
  See [conditional writes](https://typeship.dev/docs/typeship-api#conditional-writes) for ETag and If-Match.
@@ -1063,7 +1105,7 @@ See [conditional writes](https://typeship.dev/docs/typeship-api#conditional-writ
1063
1105
  | `--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. |
1064
1106
 
1065
1107
  ```sh
1066
- typeship api-keys revoke apikey_2nY8mR6pQ4vK9cH3 --force
1108
+ typeship api-keys revoke apikey_2nY8mR6pQ4vK9cH3
1067
1109
  ```
1068
1110
 
1069
1111
  Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.