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