@typeship-ax/cli 0.10.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 +10 -5
- package/README.md +5 -5
- package/api.json +9773 -4501
- package/api.md +501 -271
- package/dist/api-identity.d.ts.map +1 -1
- package/dist/api-identity.js +6 -1
- package/dist/cli-agent.d.ts +5 -5
- package/dist/cli-agent.d.ts.map +1 -1
- package/dist/cli-agent.js +14 -10
- package/dist/cli.js +158 -82
- package/dist/core/http.d.ts +29 -16
- package/dist/core/http.d.ts.map +1 -1
- package/dist/core/http.js +108 -25
- 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 +20 -13
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +29 -20
- package/dist/index.d.ts +37 -19
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +42 -18
- package/dist/ops.d.ts +5 -1
- package/dist/ops.d.ts.map +1 -1
- package/dist/ops.js +42 -35
- package/dist/polling-login.d.ts.map +1 -1
- package/dist/polling-login.js +11 -1
- package/dist/resources/api-keys.d.ts +44 -18
- package/dist/resources/api-keys.d.ts.map +1 -1
- package/dist/resources/api-keys.js +46 -14
- 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 +49 -20
- package/dist/resources/generate.d.ts.map +1 -1
- package/dist/resources/generate.js +56 -14
- package/dist/resources/generations.d.ts +70 -18
- package/dist/resources/generations.d.ts.map +1 -1
- package/dist/resources/generations.js +84 -16
- package/dist/resources/organization.d.ts +18 -0
- package/dist/resources/organization.d.ts.map +1 -0
- package/dist/resources/organization.js +32 -0
- package/dist/resources/projects.d.ts +87 -124
- package/dist/resources/projects.d.ts.map +1 -1
- package/dist/resources/projects.js +70 -173
- 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 +85 -105
- package/dist/resources/targets.d.ts.map +1 -1
- package/dist/resources/targets.js +70 -163
- package/dist/schemas.d.ts +1 -0
- package/dist/schemas.d.ts.map +1 -1
- package/dist/schemas.js +194 -139
- package/dist/types.d.ts +2626 -1141
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +90 -11
- package/package.json +3 -3
- package/src/api-identity.ts +6 -2
- package/src/cli-agent.ts +17 -13
- package/src/cli.ts +145 -77
- package/src/core/http.ts +106 -30
- package/src/core/pagination.ts +13 -23
- package/src/errors.ts +30 -20
- package/src/index.ts +46 -24
- package/src/ops.ts +47 -36
- package/src/polling-login.ts +10 -1
- package/src/resources/api-keys.ts +87 -19
- 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 +81 -19
- package/src/resources/generations.ts +167 -29
- package/src/resources/organization.ts +53 -0
- package/src/resources/projects.ts +129 -322
- 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 +135 -304
- package/src/schemas.ts +195 -140
- package/src/types.ts +2793 -1177
- package/dist/resources/account.d.ts +0 -18
- package/dist/resources/account.d.ts.map +0 -1
- package/dist/resources/account.js +0 -27
- package/dist/resources/definition-revisions.d.ts +0 -58
- package/dist/resources/definition-revisions.d.ts.map +0 -1
- package/dist/resources/definition-revisions.js +0 -114
- package/dist/resources/definitions.d.ts +0 -35
- package/dist/resources/definitions.d.ts.map +0 -1
- package/dist/resources/definitions.js +0 -60
- package/src/resources/account.ts +0 -46
- package/src/resources/definition-revisions.ts +0 -207
- package/src/resources/definitions.ts +0 -122
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,40 +14,66 @@ For complete input and output schemas, use [`api.json`](./api.json), the machine
|
|
|
14
14
|
|
|
15
15
|
### `typeship generate run [flags]`
|
|
16
16
|
|
|
17
|
-
Generate one
|
|
17
|
+
Generate one package from a Spec
|
|
18
18
|
|
|
19
19
|
`POST /generate`
|
|
20
20
|
|
|
21
21
|
Safety: **write** · Authentication: **optional**
|
|
22
22
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
it
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
23
|
+
Returns one generated package without creating a Project.
|
|
24
|
+
|
|
25
|
+
Supports [idempotent retries](https://typeship.dev/docs/typeship-api/idempotency); keyed responses include generated files in the replay cache.
|
|
26
|
+
|
|
27
|
+
Use `download.url` to save the complete ZIP, verify `download.sha256`, and extract it into an empty directory. The link expires at `download.expires_at` and grants access to anyone who has it. CLI, MCP, and SDK calls supply an idempotency key automatically. Agents should request `fields=["download","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
|
+
|
|
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
|
+
|
|
31
|
+
An anonymous URL request without source headers may return `claim.url`. Sign in through that link within seven days to save the recipe as a Project.
|
|
31
32
|
|
|
32
33
|
| Argument or flag | In | Type | Required | Description |
|
|
33
34
|
| --- | --- | --- | --- | --- |
|
|
34
|
-
| `--
|
|
35
|
-
| `--target` | body | `object` | yes |
|
|
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. |
|
|
36
37
|
| `--package-name` | body | `string` | no | npm package or Python distribution override. Valid only for the TypeScript and Python SDK targets. |
|
|
37
|
-
| `--module-path` | body | `string` | no | Go module path override. Valid only for the Go SDK.
|
|
38
|
-
| `--
|
|
39
|
-
| `--
|
|
38
|
+
| `--module-path` | body | `string` | no | Go module path override for the generated artifact's own module. Valid only for the Go SDK and Go CLI 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. |
|
|
40
42
|
|
|
41
43
|
Use `--data '<json>'`, `--data @body.json`, or `--data -` to supply the request body. Field flags override matching body fields.
|
|
42
44
|
|
|
43
45
|
```sh
|
|
44
|
-
typeship generate run --
|
|
46
|
+
typeship generate run --spec '{"url":"https://typeship.dev/examples/petstore/openapi.yaml"}' --target '{"type":"cli"}'
|
|
45
47
|
```
|
|
46
48
|
|
|
47
49
|
Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
|
|
48
50
|
|
|
49
51
|
Read the full command contract with `typeship docs generate run --json`.
|
|
50
52
|
|
|
53
|
+
### `typeship generate download-package [flags]`
|
|
54
|
+
|
|
55
|
+
Download a generated package
|
|
56
|
+
|
|
57
|
+
`GET /generate/download`
|
|
58
|
+
|
|
59
|
+
Safety: **read** · Authentication: **none**
|
|
60
|
+
|
|
61
|
+
Download the complete ZIP referenced by `generate_run`'s `download.url`. Pass the token from that URL. No API key is needed; the token grants access only to that exact package until its replay window expires. Keep the token private.
|
|
62
|
+
|
|
63
|
+
The local MCP server saves this binary response to disk. On a hosted MCP connection, download the original URL directly to your workspace. Verify the ZIP against `download.sha256` before extracting it into an empty directory. Expired or invalid tokens return `404`; a new generation creates a new download.
|
|
64
|
+
|
|
65
|
+
| Argument or flag | In | Type | Required | Description |
|
|
66
|
+
| --- | --- | --- | --- | --- |
|
|
67
|
+
| `--query-token` | query | `string` | yes | Private download token from download.url in the generation result. |
|
|
68
|
+
|
|
69
|
+
```sh
|
|
70
|
+
typeship generate download-package --query-token parcel_download_example_token_1234567890123
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
|
|
74
|
+
|
|
75
|
+
Read the full command contract with `typeship docs generate download-package --json`.
|
|
76
|
+
|
|
51
77
|
## projects
|
|
52
78
|
|
|
53
79
|
### `typeship projects list [flags]`
|
|
@@ -60,8 +86,8 @@ Safety: **read** · Authentication: **required**
|
|
|
60
86
|
|
|
61
87
|
| Argument or flag | In | Type | Required | Description |
|
|
62
88
|
| --- | --- | --- | --- | --- |
|
|
63
|
-
| `--limit` | query | `number` | no | Maximum number of resources to return. Default: 20. |
|
|
64
|
-
| `--cursor` | query | `string` | no | Opaque cursor from the preceding page's next_cursor. Valid only for the same
|
|
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 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. |
|
|
65
91
|
|
|
66
92
|
```sh
|
|
67
93
|
typeship projects list
|
|
@@ -79,49 +105,51 @@ Create a project
|
|
|
79
105
|
|
|
80
106
|
Safety: **write** · Authentication: **required**
|
|
81
107
|
|
|
82
|
-
|
|
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.
|
|
83
112
|
|
|
84
113
|
| Argument or flag | In | Type | Required | Description |
|
|
85
114
|
| --- | --- | --- | --- | --- |
|
|
86
115
|
| `--name` | body | `string` | yes | — |
|
|
87
|
-
| `--
|
|
116
|
+
| `--spec` | body | `object` | yes | — |
|
|
88
117
|
| `--targets` | body | `array` | yes | Initial first-class Targets. More than one may use the same generator with different identities or Deliveries. |
|
|
89
|
-
| `--auto-generate` | body | `boolean` | no | Whether Typeship should regenerate automatically when the source changes. Default:
|
|
90
|
-
| `--
|
|
91
|
-
| `--
|
|
92
|
-
| `--idempotency-key` | header | `string` | no | Identifies one logical write for 24 hours. The key is scoped to the authenticated account and operation; account-less generation uses a hashed network identity. Retrying the same method, path, query, and JSON body replays the original response. Reusing the key with changed intent returns 409. After expiry the key starts a new write. |
|
|
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. |
|
|
93
121
|
|
|
94
122
|
Use `--data '<json>'`, `--data @body.json`, or `--data -` to supply the request body. Field flags override matching body fields.
|
|
95
123
|
|
|
96
124
|
```sh
|
|
97
|
-
typeship projects create --name
|
|
125
|
+
typeship projects create --name 'Parcel API' --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}}]}]'
|
|
98
126
|
```
|
|
99
127
|
|
|
100
128
|
Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
|
|
101
129
|
|
|
102
130
|
Read the full command contract with `typeship docs projects create --json`.
|
|
103
131
|
|
|
104
|
-
### `typeship projects
|
|
132
|
+
### `typeship projects get <project_id> [flags]`
|
|
105
133
|
|
|
106
|
-
|
|
134
|
+
Get a project
|
|
107
135
|
|
|
108
136
|
`GET /projects/{project_id}`
|
|
109
137
|
|
|
110
138
|
Safety: **read** · Authentication: **required**
|
|
111
139
|
|
|
112
|
-
Returns Project
|
|
140
|
+
Returns the Project's settings and Spec ID. List its Targets separately to retrieve Target configuration and Deliveries.
|
|
113
141
|
|
|
114
142
|
| Argument or flag | In | Type | Required | Description |
|
|
115
143
|
| --- | --- | --- | --- | --- |
|
|
116
144
|
| `<project_id>` | path | `string` | yes | Accepts an ID or an exact name (resolved via projects_list). IDs come from projects_list. |
|
|
117
145
|
|
|
118
146
|
```sh
|
|
119
|
-
typeship projects
|
|
147
|
+
typeship projects get prj_4f8k2m7x9q1v6b3n
|
|
120
148
|
```
|
|
121
149
|
|
|
122
150
|
Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
|
|
123
151
|
|
|
124
|
-
Read the full command contract with `typeship docs projects
|
|
152
|
+
Read the full command contract with `typeship docs projects get --json`.
|
|
125
153
|
|
|
126
154
|
### `typeship projects delete <project_id> [flags]`
|
|
127
155
|
|
|
@@ -131,9 +159,13 @@ Delete a project
|
|
|
131
159
|
|
|
132
160
|
Safety: **destructive** · Authentication: **required**
|
|
133
161
|
|
|
162
|
+
A `502` response means the Project was not deleted because its release pull requests could not be retired. Retry deletion to finish retiring the remaining reviews. Repeating a completed deletion returns `404`.
|
|
163
|
+
See [conditional writes](https://typeship.dev/docs/typeship-api#conditional-writes) for ETag and If-Match.
|
|
164
|
+
|
|
134
165
|
| Argument or flag | In | Type | Required | Description |
|
|
135
166
|
| --- | --- | --- | --- | --- |
|
|
136
167
|
| `<project_id>` | path | `string` | yes | Accepts an ID or an exact name (resolved via projects_list). IDs come from projects_list. |
|
|
168
|
+
| `--if-match` | header | `string` | no | ETag from a preceding response. The write applies only if the resource still has that version; otherwise it returns 412 precondition_failed without changes. Omit to write the current version. See https://typeship.dev/docs/typeship-api#conditional-writes. |
|
|
137
169
|
|
|
138
170
|
```sh
|
|
139
171
|
typeship projects delete prj_4f8k2m7x9q1v6b3n --force
|
|
@@ -151,281 +183,273 @@ Update a project
|
|
|
151
183
|
|
|
152
184
|
Safety: **write** · Authentication: **required**
|
|
153
185
|
|
|
186
|
+
Omitted fields keep their current values. A supplied config replaces the entire stored object; null or an empty object clears it.
|
|
187
|
+
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.
|
|
189
|
+
|
|
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` 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.
|
|
192
|
+
See [conditional writes](https://typeship.dev/docs/typeship-api#conditional-writes) for ETag and If-Match.
|
|
193
|
+
|
|
154
194
|
| Argument or flag | In | Type | Required | Description |
|
|
155
195
|
| --- | --- | --- | --- | --- |
|
|
156
196
|
| `<project_id>` | path | `string` | yes | Accepts an ID or an exact name (resolved via projects_list). IDs come from projects_list. |
|
|
157
197
|
| `--name` | body | `string` | no | — |
|
|
158
198
|
| `--auto-generate` | body | `boolean` | no | — |
|
|
159
|
-
| `--relay-enabled` | body | `boolean` | no | Enable webhook relay sessions. Requires the CLI target and Pro. |
|
|
160
199
|
| `--config` | body | `json` | no | Replaces the Project's shared Target defaults. Send null to clear them. |
|
|
200
|
+
| `--if-match` | header | `string` | no | ETag from a preceding response. The write applies only if the resource still has that version; otherwise it returns 412 precondition_failed without changes. Omit to write the current version. See https://typeship.dev/docs/typeship-api#conditional-writes. |
|
|
161
201
|
|
|
162
202
|
Use `--data '<json>'`, `--data @body.json`, or `--data -` to supply the request body. Field flags override matching body fields.
|
|
163
203
|
|
|
164
204
|
```sh
|
|
165
|
-
typeship projects update prj_4f8k2m7x9q1v6b3n
|
|
205
|
+
typeship projects update prj_4f8k2m7x9q1v6b3n --auto-generate false
|
|
166
206
|
```
|
|
167
207
|
|
|
168
208
|
Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
|
|
169
209
|
|
|
170
210
|
Read the full command contract with `typeship docs projects update --json`.
|
|
171
211
|
|
|
172
|
-
### `typeship projects
|
|
212
|
+
### `typeship projects generate <project_id> [flags]`
|
|
173
213
|
|
|
174
|
-
|
|
214
|
+
Start generation for active Targets
|
|
175
215
|
|
|
176
|
-
`
|
|
216
|
+
`POST /projects/{project_id}/generate`
|
|
177
217
|
|
|
178
|
-
Safety: **
|
|
218
|
+
Safety: **write** · Authentication: **required**
|
|
179
219
|
|
|
180
|
-
|
|
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.
|
|
221
|
+
|
|
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.
|
|
181
223
|
|
|
182
224
|
| Argument or flag | In | Type | Required | Description |
|
|
183
225
|
| --- | --- | --- | --- | --- |
|
|
184
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.
|
|
185
231
|
|
|
186
232
|
```sh
|
|
187
|
-
typeship projects
|
|
233
|
+
typeship projects generate prj_4f8k2m7x9q1v6b3n --target-id tgt_5m8q2v7k1p9d4h6c
|
|
188
234
|
```
|
|
189
235
|
|
|
190
236
|
Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
|
|
191
237
|
|
|
192
|
-
Read the full command contract with `typeship docs projects
|
|
238
|
+
Read the full command contract with `typeship docs projects generate --json`.
|
|
193
239
|
|
|
194
|
-
|
|
240
|
+
## specs
|
|
195
241
|
|
|
196
|
-
|
|
242
|
+
### `typeship specs get <spec_id> [flags]`
|
|
197
243
|
|
|
198
|
-
|
|
244
|
+
Get a Spec
|
|
199
245
|
|
|
200
|
-
|
|
246
|
+
`GET /specs/{spec_id}`
|
|
201
247
|
|
|
202
|
-
|
|
248
|
+
Safety: **read** · Authentication: **required**
|
|
203
249
|
|
|
204
250
|
| Argument or flag | In | Type | Required | Description |
|
|
205
251
|
| --- | --- | --- | --- | --- |
|
|
206
|
-
| `<
|
|
207
|
-
| `--idempotency-key` | header | `string` | no | Identifies one logical write for 24 hours. The key is scoped to the authenticated account and operation; account-less generation uses a hashed network identity. Retrying the same method, path, query, and JSON body replays the original response. Reusing the key with changed intent returns 409. After expiry the key starts a new write. |
|
|
252
|
+
| `<spec_id>` | path | `string` | yes | — |
|
|
208
253
|
|
|
209
254
|
```sh
|
|
210
|
-
typeship
|
|
255
|
+
typeship specs get spec_2p8m4q7k1v9d6h3c
|
|
211
256
|
```
|
|
212
257
|
|
|
213
258
|
Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
|
|
214
259
|
|
|
215
|
-
Read the full command contract with `typeship docs
|
|
260
|
+
Read the full command contract with `typeship docs specs get --json`.
|
|
216
261
|
|
|
217
|
-
### `typeship
|
|
262
|
+
### `typeship specs update <spec_id> [flags]`
|
|
218
263
|
|
|
219
|
-
|
|
264
|
+
Update and resolve a Spec
|
|
220
265
|
|
|
221
|
-
`
|
|
266
|
+
`PATCH /specs/{spec_id}`
|
|
222
267
|
|
|
223
268
|
Safety: **write** · Authentication: **required**
|
|
224
269
|
|
|
225
|
-
|
|
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.
|
|
274
|
+
|
|
275
|
+
See [conditional writes](https://typeship.dev/docs/typeship-api#conditional-writes) for ETag and If-Match.
|
|
226
276
|
|
|
227
277
|
| Argument or flag | In | Type | Required | Description |
|
|
228
278
|
| --- | --- | --- | --- | --- |
|
|
229
|
-
| `<
|
|
230
|
-
| `--
|
|
231
|
-
| `--
|
|
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. |
|
|
232
286
|
|
|
233
287
|
Use `--data '<json>'`, `--data @body.json`, or `--data -` to supply the request body. Field flags override matching body fields.
|
|
234
288
|
|
|
235
289
|
```sh
|
|
236
|
-
typeship
|
|
290
|
+
typeship specs update spec_2p8m4q7k1v9d6h3c --source '{"type":"url","url":{"url":"https://api.parcel.example/openapi.json"}}'
|
|
237
291
|
```
|
|
238
292
|
|
|
239
293
|
Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
|
|
240
294
|
|
|
241
|
-
Read the full command contract with `typeship docs
|
|
295
|
+
Read the full command contract with `typeship docs specs update --json`.
|
|
242
296
|
|
|
243
|
-
### `typeship
|
|
297
|
+
### `typeship specs refresh <spec_id> [flags]`
|
|
244
298
|
|
|
245
|
-
|
|
299
|
+
Refresh a Spec from its configured source
|
|
246
300
|
|
|
247
|
-
`
|
|
301
|
+
`POST /specs/{spec_id}/refresh`
|
|
248
302
|
|
|
249
|
-
Safety: **
|
|
303
|
+
Safety: **write** · Authentication: **required**
|
|
250
304
|
|
|
251
|
-
|
|
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.
|
|
252
306
|
|
|
253
307
|
| Argument or flag | In | Type | Required | Description |
|
|
254
308
|
| --- | --- | --- | --- | --- |
|
|
255
|
-
| `<
|
|
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. |
|
|
256
311
|
|
|
257
312
|
```sh
|
|
258
|
-
typeship
|
|
313
|
+
typeship specs refresh spec_2p8m4q7k1v9d6h3c
|
|
259
314
|
```
|
|
260
315
|
|
|
261
316
|
Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
|
|
262
317
|
|
|
263
|
-
Read the full command contract with `typeship docs
|
|
318
|
+
Read the full command contract with `typeship docs specs refresh --json`.
|
|
319
|
+
|
|
320
|
+
## specRevisions
|
|
264
321
|
|
|
265
|
-
### `typeship
|
|
322
|
+
### `typeship spec-revisions list [flags]`
|
|
266
323
|
|
|
267
|
-
List
|
|
324
|
+
List Spec Revisions
|
|
268
325
|
|
|
269
|
-
`GET /
|
|
326
|
+
`GET /spec-revisions`
|
|
270
327
|
|
|
271
328
|
Safety: **read** · Authentication: **required**
|
|
272
329
|
|
|
330
|
+
Lists Spec Revisions, newest first. Source content is not included; list a revision's files with listSpecRevisionFiles.
|
|
331
|
+
|
|
273
332
|
| Argument or flag | In | Type | Required | Description |
|
|
274
333
|
| --- | --- | --- | --- | --- |
|
|
275
|
-
|
|
|
276
|
-
| `--
|
|
277
|
-
| `--
|
|
278
|
-
| `--target-id` | query | `string` | no | Only generations for this persisted Target. |
|
|
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. |
|
|
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. |
|
|
279
337
|
|
|
280
338
|
```sh
|
|
281
|
-
typeship
|
|
339
|
+
typeship spec-revisions list
|
|
282
340
|
```
|
|
283
341
|
|
|
284
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.
|
|
285
343
|
|
|
286
|
-
Read the full command contract with `typeship docs
|
|
344
|
+
Read the full command contract with `typeship docs spec-revisions list --json`.
|
|
287
345
|
|
|
288
|
-
### `typeship
|
|
346
|
+
### `typeship spec-revisions get <spec_revision_id> [flags]`
|
|
289
347
|
|
|
290
|
-
|
|
348
|
+
Get a Spec Revision
|
|
291
349
|
|
|
292
|
-
`
|
|
350
|
+
`GET /spec-revisions/{spec_revision_id}`
|
|
293
351
|
|
|
294
|
-
Safety: **
|
|
352
|
+
Safety: **read** · Authentication: **required**
|
|
295
353
|
|
|
296
|
-
|
|
297
|
-
configured delivery package, stores each result in the project's history,
|
|
298
|
-
and attempts to open a pull request in every configured destination.
|
|
299
|
-
When the complete generated tree already matches a destination, no
|
|
300
|
-
commit, branch, or pull request is created and that generation reports
|
|
301
|
-
`pr_status: no_changes`. This is the same pipeline automatic
|
|
302
|
-
regeneration runs after a source change.
|
|
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.
|
|
303
355
|
|
|
304
356
|
| Argument or flag | In | Type | Required | Description |
|
|
305
357
|
| --- | --- | --- | --- | --- |
|
|
306
|
-
| `<
|
|
307
|
-
| `--
|
|
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. |
|
|
308
360
|
|
|
309
361
|
```sh
|
|
310
|
-
typeship
|
|
362
|
+
typeship spec-revisions get srev_6m1q8v4k2p9d7h3c
|
|
311
363
|
```
|
|
312
364
|
|
|
313
365
|
Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
|
|
314
366
|
|
|
315
|
-
Read the full command contract with `typeship docs
|
|
316
|
-
|
|
317
|
-
## definitions
|
|
367
|
+
Read the full command contract with `typeship docs spec-revisions get --json`.
|
|
318
368
|
|
|
319
|
-
### `typeship
|
|
369
|
+
### `typeship spec-revisions list-files <spec_revision_id> [flags]`
|
|
320
370
|
|
|
321
|
-
|
|
371
|
+
List a Spec Revision's files
|
|
322
372
|
|
|
323
|
-
`GET /
|
|
373
|
+
`GET /spec-revisions/{spec_revision_id}/files`
|
|
324
374
|
|
|
325
375
|
Safety: **read** · Authentication: **required**
|
|
326
376
|
|
|
327
|
-
|
|
328
|
-
| --- | --- | --- | --- | --- |
|
|
329
|
-
| `<definition_id>` | path | `string` | yes | — |
|
|
330
|
-
|
|
331
|
-
```sh
|
|
332
|
-
typeship definitions retrieve def_2p8m4q7k1v9d6h3c
|
|
333
|
-
```
|
|
334
|
-
|
|
335
|
-
Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
|
|
336
|
-
|
|
337
|
-
Read the full command contract with `typeship docs definitions retrieve --json`.
|
|
338
|
-
|
|
339
|
-
### `typeship definitions update <definition_id> [flags]`
|
|
340
|
-
|
|
341
|
-
Update and resolve a Definition
|
|
342
|
-
|
|
343
|
-
`PATCH /definitions/{definition_id}`
|
|
344
|
-
|
|
345
|
-
Safety: **write** · Authentication: **required**
|
|
346
|
-
|
|
347
|
-
Resolves the complete document graph and records a new immutable revision before saving.
|
|
377
|
+
Lists the captured source files and the resolved document Typeship generated from, ordered by path. Read content with getFile.
|
|
348
378
|
|
|
349
379
|
| Argument or flag | In | Type | Required | Description |
|
|
350
380
|
| --- | --- | --- | --- | --- |
|
|
351
|
-
| `<
|
|
352
|
-
| `--
|
|
353
|
-
| `--
|
|
354
|
-
| `--graphql` | body | `json` | no | — |
|
|
355
|
-
| `--diagnostic-policy` | body | `object` | no | Source pull-request enforcement threshold, new-versus-complete baseline, and explicitly reviewed rule or location exceptions. |
|
|
356
|
-
| `--idempotency-key` | header | `string` | no | Identifies one logical write for 24 hours. The key is scoped to the authenticated account and operation; account-less generation uses a hashed network identity. Retrying the same method, path, query, and JSON body replays the original response. Reusing the key with changed intent returns 409. After expiry the key starts a new write. |
|
|
357
|
-
|
|
358
|
-
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. |
|
|
359
384
|
|
|
360
385
|
```sh
|
|
361
|
-
typeship
|
|
386
|
+
typeship spec-revisions list-files srev_6m1q8v4k2p9d7h3c
|
|
362
387
|
```
|
|
363
388
|
|
|
364
|
-
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.
|
|
365
390
|
|
|
366
|
-
Read the full command contract with `typeship docs
|
|
391
|
+
Read the full command contract with `typeship docs spec-revisions list-files --json`.
|
|
367
392
|
|
|
368
393
|
## targets
|
|
369
394
|
|
|
370
|
-
### `typeship targets list
|
|
395
|
+
### `typeship targets list [flags]`
|
|
371
396
|
|
|
372
|
-
List
|
|
397
|
+
List Targets
|
|
373
398
|
|
|
374
|
-
`GET /
|
|
399
|
+
`GET /targets`
|
|
375
400
|
|
|
376
401
|
Safety: **read** · Authentication: **required**
|
|
377
402
|
|
|
378
403
|
| Argument or flag | In | Type | Required | Description |
|
|
379
404
|
| --- | --- | --- | --- | --- |
|
|
380
|
-
|
|
|
381
|
-
| `--
|
|
382
|
-
| `--
|
|
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. |
|
|
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. |
|
|
383
408
|
|
|
384
409
|
```sh
|
|
385
|
-
typeship targets list
|
|
410
|
+
typeship targets list
|
|
386
411
|
```
|
|
387
412
|
|
|
388
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.
|
|
389
414
|
|
|
390
415
|
Read the full command contract with `typeship docs targets list --json`.
|
|
391
416
|
|
|
392
|
-
### `typeship targets create
|
|
417
|
+
### `typeship targets create [flags]`
|
|
393
418
|
|
|
394
419
|
Create an independently configured Target
|
|
395
420
|
|
|
396
|
-
`POST /
|
|
421
|
+
`POST /targets`
|
|
397
422
|
|
|
398
423
|
Safety: **write** · Authentication: **required**
|
|
399
424
|
|
|
400
|
-
|
|
425
|
+
Creates a Target with its own configuration, Deliveries, and release history. Multiple Targets can use the same generator.
|
|
401
426
|
|
|
402
427
|
| Argument or flag | In | Type | Required | Description |
|
|
403
428
|
| --- | --- | --- | --- | --- |
|
|
404
|
-
|
|
|
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. |
|
|
405
430
|
| `--name` | body | `string` | yes | — |
|
|
406
|
-
| `--
|
|
407
|
-
| `--
|
|
408
|
-
| `--
|
|
409
|
-
| `--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". |
|
|
410
434
|
| `--release-channel` | body | `string` | no | Default: "stable". |
|
|
411
|
-
| `--
|
|
412
|
-
| `--config` | body | `json` | no | Target-specific overrides merged over Project.config. GraphQL settings are rejected here and belong to the
|
|
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. |
|
|
413
437
|
| `--deliveries` | body | `array` | no | — |
|
|
414
|
-
| `--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. |
|
|
415
439
|
|
|
416
440
|
Use `--data '<json>'`, `--data @body.json`, or `--data -` to supply the request body. Field flags override matching body fields.
|
|
417
441
|
|
|
418
442
|
```sh
|
|
419
|
-
typeship targets create prj_4f8k2m7x9q1v6b3n --name
|
|
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}}]'
|
|
420
444
|
```
|
|
421
445
|
|
|
422
446
|
Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
|
|
423
447
|
|
|
424
448
|
Read the full command contract with `typeship docs targets create --json`.
|
|
425
449
|
|
|
426
|
-
### `typeship targets
|
|
450
|
+
### `typeship targets get <target_id> [flags]`
|
|
427
451
|
|
|
428
|
-
|
|
452
|
+
Get a Target
|
|
429
453
|
|
|
430
454
|
`GET /targets/{target_id}`
|
|
431
455
|
|
|
@@ -433,15 +457,15 @@ Safety: **read** · Authentication: **required**
|
|
|
433
457
|
|
|
434
458
|
| Argument or flag | In | Type | Required | Description |
|
|
435
459
|
| --- | --- | --- | --- | --- |
|
|
436
|
-
| `<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. |
|
|
437
461
|
|
|
438
462
|
```sh
|
|
439
|
-
typeship targets
|
|
463
|
+
typeship targets get tgt_5m8q2v7k1p9d4h6c
|
|
440
464
|
```
|
|
441
465
|
|
|
442
466
|
Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
|
|
443
467
|
|
|
444
|
-
Read the full command contract with `typeship docs targets
|
|
468
|
+
Read the full command contract with `typeship docs targets get --json`.
|
|
445
469
|
|
|
446
470
|
### `typeship targets delete <target_id> [flags]`
|
|
447
471
|
|
|
@@ -451,11 +475,14 @@ Delete an unused Target
|
|
|
451
475
|
|
|
452
476
|
Safety: **destructive** · Authentication: **required**
|
|
453
477
|
|
|
454
|
-
|
|
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.
|
|
479
|
+
|
|
480
|
+
See [conditional writes](https://typeship.dev/docs/typeship-api#conditional-writes) for ETag and If-Match.
|
|
455
481
|
|
|
456
482
|
| Argument or flag | In | Type | Required | Description |
|
|
457
483
|
| --- | --- | --- | --- | --- |
|
|
458
|
-
| `<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. |
|
|
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. |
|
|
459
486
|
|
|
460
487
|
```sh
|
|
461
488
|
typeship targets delete tgt_5m8q2v7k1p9d4h6c --force
|
|
@@ -467,331 +494,508 @@ Read the full command contract with `typeship docs targets delete --json`.
|
|
|
467
494
|
|
|
468
495
|
### `typeship targets update <target_id> [flags]`
|
|
469
496
|
|
|
470
|
-
Update a Target
|
|
497
|
+
Update a Target or its Deliveries
|
|
471
498
|
|
|
472
499
|
`PATCH /targets/{target_id}`
|
|
473
500
|
|
|
474
501
|
Safety: **write** · Authentication: **required**
|
|
475
502
|
|
|
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.
|
|
505
|
+
Omitting If-Match applies the update to the current resource; with If-Match, a stale ETag returns 412 precondition_failed without saving.
|
|
506
|
+
Select the next version through PATCH /drafts/{draft_id} on the Target's draft_id.
|
|
507
|
+
|
|
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.
|
|
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.
|
|
510
|
+
See [conditional writes](https://typeship.dev/docs/typeship-api#conditional-writes) for ETag and If-Match.
|
|
511
|
+
|
|
476
512
|
| Argument or flag | In | Type | Required | Description |
|
|
477
513
|
| --- | --- | --- | --- | --- |
|
|
478
|
-
| `<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. |
|
|
479
515
|
| `--name` | body | `string` | no | — |
|
|
480
|
-
| `--
|
|
481
|
-
| `--edition` | body | `string` | no | — |
|
|
516
|
+
| `--status` | body | `string` | no | — |
|
|
482
517
|
| `--release-channel` | body | `string` | no | — |
|
|
483
|
-
| `--
|
|
484
|
-
| `--config` | body | `json` | no |
|
|
485
|
-
| `--deliveries` | body | `array` | no |
|
|
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. |
|
|
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
|
+
| `--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
522
|
|
|
487
523
|
Use `--data '<json>'`, `--data @body.json`, or `--data -` to supply the request body. Field flags override matching body fields.
|
|
488
524
|
|
|
489
525
|
```sh
|
|
490
|
-
typeship targets update tgt_5m8q2v7k1p9d4h6c
|
|
526
|
+
typeship targets update tgt_5m8q2v7k1p9d4h6c --status disabled
|
|
491
527
|
```
|
|
492
528
|
|
|
493
529
|
Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
|
|
494
530
|
|
|
495
531
|
Read the full command contract with `typeship docs targets update --json`.
|
|
496
532
|
|
|
497
|
-
### `typeship targets
|
|
533
|
+
### `typeship targets adopt <target_id> [flags]`
|
|
498
534
|
|
|
499
|
-
|
|
535
|
+
Adopt a verified existing package as the latest release
|
|
500
536
|
|
|
501
|
-
`
|
|
537
|
+
`POST /targets/{target_id}/adopt`
|
|
538
|
+
|
|
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.
|
|
542
|
+
|
|
543
|
+
| Argument or flag | In | Type | Required | Description |
|
|
544
|
+
| --- | --- | --- | --- | --- |
|
|
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.
|
|
551
|
+
|
|
552
|
+
```sh
|
|
553
|
+
typeship targets adopt tgt_5m8q2v7k1p9d4h6c --body-version 1.0.0 --tag v1.0.0
|
|
554
|
+
```
|
|
555
|
+
|
|
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`.
|
|
559
|
+
|
|
560
|
+
## drafts
|
|
561
|
+
|
|
562
|
+
### `typeship drafts list [flags]`
|
|
563
|
+
|
|
564
|
+
List Drafts
|
|
565
|
+
|
|
566
|
+
`GET /drafts`
|
|
502
567
|
|
|
503
568
|
Safety: **read** · Authentication: **required**
|
|
504
569
|
|
|
570
|
+
Lists open and merged Drafts, newest first. Each Target has one open Draft; each merge adds a merged Draft.
|
|
571
|
+
|
|
505
572
|
| Argument or flag | In | Type | Required | Description |
|
|
506
573
|
| --- | --- | --- | --- | --- |
|
|
507
|
-
|
|
|
508
|
-
| `--
|
|
509
|
-
| `--
|
|
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. |
|
|
510
578
|
|
|
511
579
|
```sh
|
|
512
|
-
typeship
|
|
580
|
+
typeship drafts list
|
|
513
581
|
```
|
|
514
582
|
|
|
515
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.
|
|
516
584
|
|
|
517
|
-
Read the full command contract with `typeship docs
|
|
585
|
+
Read the full command contract with `typeship docs drafts list --json`.
|
|
518
586
|
|
|
519
|
-
### `typeship
|
|
587
|
+
### `typeship drafts get <draft_id> [flags]`
|
|
520
588
|
|
|
521
|
-
|
|
589
|
+
Get a Draft
|
|
522
590
|
|
|
523
|
-
`GET /
|
|
591
|
+
`GET /drafts/{draft_id}`
|
|
524
592
|
|
|
525
593
|
Safety: **read** · Authentication: **required**
|
|
526
594
|
|
|
527
|
-
Returns
|
|
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.
|
|
528
596
|
|
|
529
597
|
| Argument or flag | In | Type | Required | Description |
|
|
530
598
|
| --- | --- | --- | --- | --- |
|
|
531
|
-
| `<
|
|
599
|
+
| `<draft_id>` | path | `string` | yes | — |
|
|
532
600
|
|
|
533
601
|
```sh
|
|
534
|
-
typeship
|
|
602
|
+
typeship drafts get drf_3q7m1v8k2p5d9h4c
|
|
535
603
|
```
|
|
536
604
|
|
|
537
605
|
Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
|
|
538
606
|
|
|
539
|
-
Read the full command contract with `typeship docs
|
|
607
|
+
Read the full command contract with `typeship docs drafts get --json`.
|
|
540
608
|
|
|
541
|
-
### `typeship
|
|
609
|
+
### `typeship drafts update <draft_id> [flags]`
|
|
542
610
|
|
|
543
611
|
Select an exact Draft version or return to automatic versioning
|
|
544
612
|
|
|
545
|
-
`PATCH /
|
|
613
|
+
`PATCH /drafts/{draft_id}`
|
|
546
614
|
|
|
547
615
|
Safety: **write** · Authentication: **required**
|
|
548
616
|
|
|
549
|
-
|
|
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.
|
|
550
624
|
|
|
551
625
|
| Argument or flag | In | Type | Required | Description |
|
|
552
626
|
| --- | --- | --- | --- | --- |
|
|
553
|
-
| `<
|
|
554
|
-
| `--
|
|
555
|
-
| `--
|
|
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. |
|
|
556
630
|
|
|
557
631
|
Use `--data '<json>'`, `--data @body.json`, or `--data -` to supply the request body. Field flags override matching body fields.
|
|
558
632
|
|
|
559
633
|
```sh
|
|
560
|
-
typeship
|
|
634
|
+
typeship drafts update drf_3q7m1v8k2p5d9h4c --version-next 1.1.0
|
|
561
635
|
```
|
|
562
636
|
|
|
563
637
|
Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
|
|
564
638
|
|
|
565
|
-
Read the full command contract with `typeship docs
|
|
639
|
+
Read the full command contract with `typeship docs drafts update --json`.
|
|
566
640
|
|
|
567
|
-
### `typeship
|
|
641
|
+
### `typeship drafts list-files <draft_id> [flags]`
|
|
568
642
|
|
|
569
|
-
|
|
643
|
+
List customized and conflicted files on a Draft
|
|
570
644
|
|
|
571
|
-
`
|
|
645
|
+
`GET /drafts/{draft_id}/files`
|
|
646
|
+
|
|
647
|
+
Safety: **read** · Authentication: **required**
|
|
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
|
+
|
|
653
|
+
| Argument or flag | In | Type | Required | Description |
|
|
654
|
+
| --- | --- | --- | --- | --- |
|
|
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. |
|
|
659
|
+
|
|
660
|
+
```sh
|
|
661
|
+
typeship drafts list-files drf_3q7m1v8k2p5d9h4c
|
|
662
|
+
```
|
|
663
|
+
|
|
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.
|
|
665
|
+
|
|
666
|
+
Read the full command contract with `typeship docs drafts list-files --json`.
|
|
667
|
+
|
|
668
|
+
### `typeship drafts resolve <draft_id> [flags]`
|
|
669
|
+
|
|
670
|
+
Resolve selected Draft files
|
|
671
|
+
|
|
672
|
+
`POST /drafts/{draft_id}/resolve`
|
|
572
673
|
|
|
573
674
|
Safety: **write** · Authentication: **required**
|
|
574
675
|
|
|
575
|
-
|
|
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.
|
|
677
|
+
|
|
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.
|
|
576
679
|
|
|
577
680
|
| Argument or flag | In | Type | Required | Description |
|
|
578
681
|
| --- | --- | --- | --- | --- |
|
|
579
|
-
| `<
|
|
580
|
-
| `--
|
|
581
|
-
| `--
|
|
582
|
-
| `--idempotency-key` | header | `string` | no | Identifies one logical write for 24 hours. The key is scoped to the authenticated account and operation; account-less generation uses a hashed network identity. Retrying the same method, path, query, and JSON body replays the original response. Reusing the key with changed intent returns 409. After expiry the key starts a new write. |
|
|
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. |
|
|
583
685
|
|
|
584
686
|
Use `--data '<json>'`, `--data @body.json`, or `--data -` to supply the request body. Field flags override matching body fields.
|
|
585
687
|
|
|
586
688
|
```sh
|
|
587
|
-
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"}]'
|
|
588
690
|
```
|
|
589
691
|
|
|
590
692
|
Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
|
|
591
693
|
|
|
592
|
-
Read the full command contract with `typeship docs
|
|
694
|
+
Read the full command contract with `typeship docs drafts resolve --json`.
|
|
695
|
+
|
|
696
|
+
### `typeship drafts recover <draft_id> [flags]`
|
|
593
697
|
|
|
594
|
-
|
|
698
|
+
Approve recovery from rewritten default-branch history
|
|
595
699
|
|
|
596
|
-
|
|
700
|
+
`POST /drafts/{draft_id}/recover`
|
|
701
|
+
|
|
702
|
+
Safety: **write** · Authentication: **required**
|
|
597
703
|
|
|
598
|
-
`
|
|
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.
|
|
705
|
+
|
|
706
|
+
| Argument or flag | In | Type | Required | Description |
|
|
707
|
+
| --- | --- | --- | --- | --- |
|
|
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.
|
|
713
|
+
|
|
714
|
+
```sh
|
|
715
|
+
typeship drafts recover drf_3q7m1v8k2p5d9h4c --expected-default-sha 89abcdef0123456789abcdef0123456789abcdef --expected-head-sha 0123456789abcdef0123456789abcdef01234567
|
|
716
|
+
```
|
|
717
|
+
|
|
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`.
|
|
721
|
+
|
|
722
|
+
## releases
|
|
723
|
+
|
|
724
|
+
### `typeship releases list [flags]`
|
|
725
|
+
|
|
726
|
+
List releases
|
|
727
|
+
|
|
728
|
+
`GET /releases`
|
|
599
729
|
|
|
600
730
|
Safety: **read** · Authentication: **required**
|
|
601
731
|
|
|
602
732
|
| Argument or flag | In | Type | Required | Description |
|
|
603
733
|
| --- | --- | --- | --- | --- |
|
|
604
|
-
|
|
|
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. |
|
|
605
737
|
|
|
606
738
|
```sh
|
|
607
|
-
typeship
|
|
739
|
+
typeship releases list
|
|
740
|
+
```
|
|
741
|
+
|
|
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.
|
|
743
|
+
|
|
744
|
+
Read the full command contract with `typeship docs releases list --json`.
|
|
745
|
+
|
|
746
|
+
### `typeship releases get <release_id> [flags]`
|
|
747
|
+
|
|
748
|
+
Get an immutable release
|
|
749
|
+
|
|
750
|
+
`GET /releases/{release_id}`
|
|
751
|
+
|
|
752
|
+
Safety: **read** · Authentication: **required**
|
|
753
|
+
|
|
754
|
+
| Argument or flag | In | Type | Required | Description |
|
|
755
|
+
| --- | --- | --- | --- | --- |
|
|
756
|
+
| `<release_id>` | path | `string` | yes | — |
|
|
757
|
+
|
|
758
|
+
```sh
|
|
759
|
+
typeship releases get rel_7m2q8v4k1p9d5h6c
|
|
608
760
|
```
|
|
609
761
|
|
|
610
762
|
Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
|
|
611
763
|
|
|
612
|
-
Read the full command contract with `typeship docs
|
|
764
|
+
Read the full command contract with `typeship docs releases get --json`.
|
|
613
765
|
|
|
614
|
-
### `typeship
|
|
766
|
+
### `typeship releases republish <release_id> [flags]`
|
|
615
767
|
|
|
616
|
-
Retry
|
|
768
|
+
Retry publishing an exact release
|
|
617
769
|
|
|
618
|
-
`POST /
|
|
770
|
+
`POST /releases/{release_id}/republish`
|
|
619
771
|
|
|
620
772
|
Safety: **write** · Authentication: **required**
|
|
621
773
|
|
|
622
|
-
|
|
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.
|
|
775
|
+
|
|
776
|
+
A `502` response means the repository publishing workflow could not be dispatched.
|
|
623
777
|
|
|
624
778
|
| Argument or flag | In | Type | Required | Description |
|
|
625
779
|
| --- | --- | --- | --- | --- |
|
|
626
|
-
| `<
|
|
627
|
-
| `--idempotency-key` | header | `string` | no | Identifies one logical write for 24 hours. The key is scoped to the authenticated
|
|
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. |
|
|
628
782
|
|
|
629
783
|
```sh
|
|
630
|
-
typeship
|
|
784
|
+
typeship releases republish rel_7m2q8v4k1p9d5h6c
|
|
631
785
|
```
|
|
632
786
|
|
|
633
787
|
Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
|
|
634
788
|
|
|
635
|
-
Read the full command contract with `typeship docs
|
|
789
|
+
Read the full command contract with `typeship docs releases republish --json`.
|
|
636
790
|
|
|
637
|
-
##
|
|
791
|
+
## deliveries
|
|
638
792
|
|
|
639
|
-
### `typeship
|
|
793
|
+
### `typeship deliveries list [flags]`
|
|
640
794
|
|
|
641
|
-
|
|
795
|
+
List Deliveries
|
|
642
796
|
|
|
643
|
-
`GET /
|
|
797
|
+
`GET /deliveries`
|
|
798
|
+
|
|
799
|
+
Safety: **read** · Authentication: **required**
|
|
800
|
+
|
|
801
|
+
| Argument or flag | In | Type | Required | Description |
|
|
802
|
+
| --- | --- | --- | --- | --- |
|
|
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. |
|
|
806
|
+
|
|
807
|
+
```sh
|
|
808
|
+
typeship deliveries list
|
|
809
|
+
```
|
|
810
|
+
|
|
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.
|
|
812
|
+
|
|
813
|
+
Read the full command contract with `typeship docs deliveries list --json`.
|
|
814
|
+
|
|
815
|
+
### `typeship deliveries get <delivery_id> [flags]`
|
|
816
|
+
|
|
817
|
+
Get a Delivery
|
|
818
|
+
|
|
819
|
+
`GET /deliveries/{delivery_id}`
|
|
644
820
|
|
|
645
821
|
Safety: **read** · Authentication: **required**
|
|
646
822
|
|
|
647
|
-
|
|
823
|
+
Returns the configured repository or hosted MCP Delivery for a Target. A Delivery in another organization returns 404 not_found.
|
|
648
824
|
|
|
649
825
|
| Argument or flag | In | Type | Required | Description |
|
|
650
826
|
| --- | --- | --- | --- | --- |
|
|
651
|
-
| `<
|
|
827
|
+
| `<delivery_id>` | path | `string` | yes | — |
|
|
652
828
|
|
|
653
829
|
```sh
|
|
654
|
-
typeship
|
|
830
|
+
typeship deliveries get dlv_4q8m2v7k1p9d5h6c
|
|
655
831
|
```
|
|
656
832
|
|
|
657
833
|
Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
|
|
658
834
|
|
|
659
|
-
Read the full command contract with `typeship docs
|
|
835
|
+
Read the full command contract with `typeship docs deliveries get --json`.
|
|
836
|
+
|
|
837
|
+
## publications
|
|
660
838
|
|
|
661
|
-
### `typeship
|
|
839
|
+
### `typeship publications list [flags]`
|
|
662
840
|
|
|
663
|
-
|
|
841
|
+
List publications
|
|
664
842
|
|
|
665
|
-
`GET /
|
|
843
|
+
`GET /publications`
|
|
666
844
|
|
|
667
845
|
Safety: **read** · Authentication: **required**
|
|
668
846
|
|
|
669
|
-
|
|
847
|
+
| Argument or flag | In | Type | Required | Description |
|
|
848
|
+
| --- | --- | --- | --- | --- |
|
|
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. |
|
|
852
|
+
|
|
853
|
+
```sh
|
|
854
|
+
typeship publications list
|
|
855
|
+
```
|
|
856
|
+
|
|
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.
|
|
858
|
+
|
|
859
|
+
Read the full command contract with `typeship docs publications list --json`.
|
|
860
|
+
|
|
861
|
+
### `typeship publications get <publication_id> [flags]`
|
|
862
|
+
|
|
863
|
+
Get publishing status
|
|
864
|
+
|
|
865
|
+
`GET /publications/{publication_id}`
|
|
866
|
+
|
|
867
|
+
Safety: **read** · Authentication: **required**
|
|
868
|
+
|
|
869
|
+
Returns the registry publishing status for a release. A status in another organization returns 404 not_found.
|
|
670
870
|
|
|
671
871
|
| Argument or flag | In | Type | Required | Description |
|
|
672
872
|
| --- | --- | --- | --- | --- |
|
|
673
|
-
| `<
|
|
674
|
-
| `--path` | query | `string` | yes | Repo-relative path inside the generated package. |
|
|
873
|
+
| `<publication_id>` | path | `string` | yes | — |
|
|
675
874
|
|
|
676
875
|
```sh
|
|
677
|
-
typeship
|
|
876
|
+
typeship publications get pub_2m8q4v7k1p9d5h6c
|
|
678
877
|
```
|
|
679
878
|
|
|
680
879
|
Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
|
|
681
880
|
|
|
682
|
-
Read the full command contract with `typeship docs
|
|
881
|
+
Read the full command contract with `typeship docs publications get --json`.
|
|
683
882
|
|
|
684
|
-
##
|
|
883
|
+
## generations
|
|
685
884
|
|
|
686
|
-
### `typeship
|
|
885
|
+
### `typeship generations list [flags]`
|
|
687
886
|
|
|
688
|
-
List
|
|
887
|
+
List generations
|
|
689
888
|
|
|
690
|
-
`GET /
|
|
889
|
+
`GET /generations`
|
|
691
890
|
|
|
692
891
|
Safety: **read** · Authentication: **required**
|
|
693
892
|
|
|
694
|
-
Immutable snapshots of the complete resolved document graph this Definition observed, newest first. Content is available from the revision and document endpoints and is never embedded in a list response.
|
|
695
|
-
|
|
696
893
|
| Argument or flag | In | Type | Required | Description |
|
|
697
894
|
| --- | --- | --- | --- | --- |
|
|
698
|
-
|
|
|
699
|
-
| `--
|
|
700
|
-
| `--
|
|
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. |
|
|
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. |
|
|
701
900
|
|
|
702
901
|
```sh
|
|
703
|
-
typeship
|
|
902
|
+
typeship generations list
|
|
704
903
|
```
|
|
705
904
|
|
|
706
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.
|
|
707
906
|
|
|
708
|
-
Read the full command contract with `typeship docs
|
|
907
|
+
Read the full command contract with `typeship docs generations list --json`.
|
|
709
908
|
|
|
710
|
-
### `typeship
|
|
909
|
+
### `typeship generations get <generation_id> [flags]`
|
|
711
910
|
|
|
712
|
-
|
|
911
|
+
Get a generation
|
|
713
912
|
|
|
714
|
-
`GET /
|
|
913
|
+
`GET /generations/{generation_id}`
|
|
715
914
|
|
|
716
915
|
Safety: **read** · Authentication: **required**
|
|
717
916
|
|
|
718
|
-
|
|
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.
|
|
719
918
|
|
|
720
919
|
| Argument or flag | In | Type | Required | Description |
|
|
721
920
|
| --- | --- | --- | --- | --- |
|
|
722
|
-
| `<
|
|
921
|
+
| `<generation_id>` | path | `string` | yes | Accepts an ID or an exact name (resolved via generations_list). IDs come from generations_list. |
|
|
723
922
|
|
|
724
923
|
```sh
|
|
725
|
-
typeship
|
|
924
|
+
typeship generations get gen_7h2p5d9c3m8w1k6q
|
|
726
925
|
```
|
|
727
926
|
|
|
728
927
|
Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
|
|
729
928
|
|
|
730
|
-
Read the full command contract with `typeship docs
|
|
929
|
+
Read the full command contract with `typeship docs generations get --json`.
|
|
731
930
|
|
|
732
|
-
### `typeship
|
|
931
|
+
### `typeship generations list-files <generation_id> [flags]`
|
|
733
932
|
|
|
734
|
-
|
|
933
|
+
List a Generation's files
|
|
735
934
|
|
|
736
|
-
`GET /
|
|
935
|
+
`GET /generations/{generation_id}/files`
|
|
737
936
|
|
|
738
937
|
Safety: **read** · Authentication: **required**
|
|
739
938
|
|
|
740
|
-
|
|
939
|
+
Lists the generated package's files, ordered by path. Read content with getFile.
|
|
741
940
|
|
|
742
941
|
| Argument or flag | In | Type | Required | Description |
|
|
743
942
|
| --- | --- | --- | --- | --- |
|
|
744
|
-
| `<
|
|
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. |
|
|
745
946
|
|
|
746
947
|
```sh
|
|
747
|
-
typeship
|
|
948
|
+
typeship generations list-files gen_7h2p5d9c3m8w1k6q
|
|
748
949
|
```
|
|
749
950
|
|
|
750
|
-
Output:
|
|
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.
|
|
952
|
+
|
|
953
|
+
Read the full command contract with `typeship docs generations list-files --json`.
|
|
751
954
|
|
|
752
|
-
|
|
955
|
+
## files
|
|
753
956
|
|
|
754
|
-
### `typeship
|
|
957
|
+
### `typeship files get <file_id> [flags]`
|
|
755
958
|
|
|
756
|
-
|
|
959
|
+
Get a file
|
|
757
960
|
|
|
758
|
-
`GET /
|
|
961
|
+
`GET /files/{file_id}`
|
|
759
962
|
|
|
760
963
|
Safety: **read** · Authentication: **required**
|
|
761
964
|
|
|
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.
|
|
966
|
+
|
|
762
967
|
| Argument or flag | In | Type | Required | Description |
|
|
763
968
|
| --- | --- | --- | --- | --- |
|
|
764
|
-
| `<
|
|
765
|
-
|
|
|
969
|
+
| `<file_id>` | path | `string` | yes | — |
|
|
970
|
+
| `--cursor` | query | `string` | no | next_cursor from the preceding chunk of this file. |
|
|
766
971
|
|
|
767
972
|
```sh
|
|
768
|
-
typeship
|
|
973
|
+
typeship files get file_4k8m2v7q1p9d5h6c
|
|
769
974
|
```
|
|
770
975
|
|
|
771
976
|
Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
|
|
772
977
|
|
|
773
|
-
Read the full command contract with `typeship docs
|
|
978
|
+
Read the full command contract with `typeship docs files get --json`.
|
|
774
979
|
|
|
775
|
-
##
|
|
980
|
+
## organization
|
|
776
981
|
|
|
777
|
-
### `typeship
|
|
982
|
+
### `typeship organization get [flags]`
|
|
778
983
|
|
|
779
|
-
The
|
|
984
|
+
The organization behind the presented credentials
|
|
780
985
|
|
|
781
|
-
`GET /
|
|
986
|
+
`GET /organization`
|
|
782
987
|
|
|
783
988
|
Safety: **read** · Authentication: **required**
|
|
784
989
|
|
|
785
|
-
Returns the
|
|
786
|
-
identity endpoint the generated typeship CLI's `whoami` calls.
|
|
990
|
+
Returns the organization associated with your credential. The Typeship CLI uses this endpoint for `whoami`.
|
|
787
991
|
|
|
788
992
|
```sh
|
|
789
|
-
typeship
|
|
993
|
+
typeship organization get
|
|
790
994
|
```
|
|
791
995
|
|
|
792
996
|
Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
|
|
793
997
|
|
|
794
|
-
Read the full command contract with `typeship docs
|
|
998
|
+
Read the full command contract with `typeship docs organization get --json`.
|
|
795
999
|
|
|
796
1000
|
## apiKeys
|
|
797
1001
|
|
|
@@ -799,16 +1003,16 @@ Read the full command contract with `typeship docs account retrieve --json`.
|
|
|
799
1003
|
|
|
800
1004
|
List API keys
|
|
801
1005
|
|
|
802
|
-
`GET /
|
|
1006
|
+
`GET /api-keys`
|
|
803
1007
|
|
|
804
1008
|
Safety: **read** · Authentication: **required**
|
|
805
1009
|
|
|
806
|
-
|
|
1010
|
+
Lists key metadata and the last four characters of each key. Full keys are not returned. Create keys in the Console.
|
|
807
1011
|
|
|
808
1012
|
| Argument or flag | In | Type | Required | Description |
|
|
809
1013
|
| --- | --- | --- | --- | --- |
|
|
810
|
-
| `--limit` | query | `number` | no | Maximum number of resources to return. Default: 20. |
|
|
811
|
-
| `--cursor` | query | `string` | no | Opaque cursor from the preceding page's next_cursor. Valid only for the same
|
|
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. |
|
|
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. |
|
|
812
1016
|
|
|
813
1017
|
```sh
|
|
814
1018
|
typeship api-keys list
|
|
@@ -818,22 +1022,48 @@ Output: JSON with `items` and `hasMore`; when another page exists, `nextPage` co
|
|
|
818
1022
|
|
|
819
1023
|
Read the full command contract with `typeship docs api-keys list --json`.
|
|
820
1024
|
|
|
1025
|
+
### `typeship api-keys get <api_key_id> [flags]`
|
|
1026
|
+
|
|
1027
|
+
Get an API key
|
|
1028
|
+
|
|
1029
|
+
`GET /api-keys/{api_key_id}`
|
|
1030
|
+
|
|
1031
|
+
Safety: **read** · Authentication: **required**
|
|
1032
|
+
|
|
1033
|
+
Returns the key summary and its ETag for conditional revocation.
|
|
1034
|
+
|
|
1035
|
+
| Argument or flag | In | Type | Required | Description |
|
|
1036
|
+
| --- | --- | --- | --- | --- |
|
|
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. |
|
|
1038
|
+
|
|
1039
|
+
```sh
|
|
1040
|
+
typeship api-keys get apikey_2nY8mR6pQ4vK9cH3
|
|
1041
|
+
```
|
|
1042
|
+
|
|
1043
|
+
Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
|
|
1044
|
+
|
|
1045
|
+
Read the full command contract with `typeship docs api-keys get --json`.
|
|
1046
|
+
|
|
821
1047
|
### `typeship api-keys revoke <api_key_id> [flags]`
|
|
822
1048
|
|
|
823
1049
|
Revoke an API key
|
|
824
1050
|
|
|
825
|
-
`DELETE /
|
|
1051
|
+
`DELETE /api-keys/{api_key_id}`
|
|
826
1052
|
|
|
827
1053
|
Safety: **destructive** · Authentication: **required**
|
|
828
1054
|
|
|
829
|
-
|
|
1055
|
+
Revokes a key. Repeating the request returns the same result.
|
|
1056
|
+
|
|
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.
|
|
1058
|
+
See [conditional writes](https://typeship.dev/docs/typeship-api#conditional-writes) for ETag and If-Match.
|
|
830
1059
|
|
|
831
1060
|
| Argument or flag | In | Type | Required | Description |
|
|
832
1061
|
| --- | --- | --- | --- | --- |
|
|
833
1062
|
| `<api_key_id>` | path | `string` | yes | Accepts an ID or an exact name (resolved via api_keys_list). IDs come from api_keys_list. |
|
|
1063
|
+
| `--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. |
|
|
834
1064
|
|
|
835
1065
|
```sh
|
|
836
|
-
typeship api-keys revoke
|
|
1066
|
+
typeship api-keys revoke apikey_2nY8mR6pQ4vK9cH3 --force
|
|
837
1067
|
```
|
|
838
1068
|
|
|
839
1069
|
Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
|