@typeship-ax/cli 0.8.0 → 0.10.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 +31 -0
- package/README.md +26 -9
- package/api.json +3509 -800
- package/api.md +444 -494
- package/dist/api-identity.d.ts +40 -0
- package/dist/api-identity.d.ts.map +1 -0
- package/dist/api-identity.js +128 -0
- package/dist/auth-profiles.d.ts +30 -0
- package/dist/auth-profiles.d.ts.map +1 -0
- package/dist/auth-profiles.js +138 -0
- package/dist/cli.js +522 -355
- package/dist/console-login-check.d.ts +21 -0
- package/dist/console-login-check.d.ts.map +1 -0
- package/dist/console-login-check.js +107 -0
- package/dist/console-login-contract.d.ts +45 -0
- package/dist/console-login-contract.d.ts.map +1 -0
- package/dist/console-login-contract.js +40 -0
- package/dist/core/http.d.ts +17 -2
- package/dist/core/http.d.ts.map +1 -1
- package/dist/core/http.js +78 -17
- package/dist/credential-storage.d.ts +24 -0
- package/dist/credential-storage.d.ts.map +1 -0
- package/dist/credential-storage.js +207 -0
- package/dist/docs.d.ts +25 -0
- package/dist/docs.d.ts.map +1 -1
- package/dist/docs.js +144 -0
- package/dist/errors.d.ts +18 -10
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +24 -14
- package/dist/index.d.ts +10 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +20 -4
- package/dist/named-credentials.d.ts +21 -0
- package/dist/named-credentials.d.ts.map +1 -0
- package/dist/named-credentials.js +86 -0
- package/dist/oauth-login.d.ts +39 -0
- package/dist/oauth-login.d.ts.map +1 -0
- package/dist/oauth-login.js +171 -0
- package/dist/oauth-request.d.ts +21 -0
- package/dist/oauth-request.d.ts.map +1 -0
- package/dist/oauth-request.js +119 -0
- package/dist/oauth-session.d.ts +106 -0
- package/dist/oauth-session.d.ts.map +1 -0
- package/dist/oauth-session.js +244 -0
- package/dist/ops.d.ts +14 -1
- package/dist/ops.d.ts.map +1 -1
- package/dist/ops.js +34 -30
- package/dist/polling-login.d.ts +57 -0
- package/dist/polling-login.d.ts.map +1 -0
- package/dist/polling-login.js +204 -0
- package/dist/resources/account.d.ts +2 -2
- package/dist/resources/account.d.ts.map +1 -1
- package/dist/resources/account.js +1 -0
- package/dist/resources/api-keys.d.ts +3 -3
- package/dist/resources/api-keys.d.ts.map +1 -1
- package/dist/resources/api-keys.js +2 -0
- package/dist/resources/definition-revisions.d.ts +5 -5
- package/dist/resources/definition-revisions.d.ts.map +1 -1
- package/dist/resources/definition-revisions.js +4 -0
- package/dist/resources/definitions.d.ts +15 -4
- package/dist/resources/definitions.d.ts.map +1 -1
- package/dist/resources/definitions.js +11 -2
- package/dist/resources/generate.d.ts +14 -3
- package/dist/resources/generate.d.ts.map +1 -1
- package/dist/resources/generate.js +10 -2
- package/dist/resources/generations.d.ts +3 -3
- package/dist/resources/generations.d.ts.map +1 -1
- package/dist/resources/generations.js +2 -0
- package/dist/resources/projects.d.ts +56 -20
- package/dist/resources/projects.d.ts.map +1 -1
- package/dist/resources/projects.js +40 -4
- package/dist/resources/targets.d.ts +84 -10
- package/dist/resources/targets.d.ts.map +1 -1
- package/dist/resources/targets.js +127 -2
- package/dist/schemas.d.ts.map +1 -1
- package/dist/schemas.js +55 -26
- package/dist/types.d.ts +602 -123
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +24 -0
- package/package.json +2 -1
- package/src/api-identity.ts +98 -0
- package/src/auth-profiles.ts +114 -0
- package/src/cli.ts +444 -332
- package/src/console-login-check.ts +88 -0
- package/src/console-login-contract.ts +65 -0
- package/src/core/http.ts +88 -19
- package/src/credential-storage.ts +183 -0
- package/src/docs.ts +138 -0
- package/src/errors.ts +26 -15
- package/src/index.ts +29 -4
- package/src/named-credentials.ts +74 -0
- package/src/oauth-login.ts +184 -0
- package/src/oauth-request.ts +90 -0
- package/src/oauth-session.ts +258 -0
- package/src/ops.ts +48 -31
- package/src/polling-login.ts +165 -0
- package/src/resources/account.ts +3 -0
- package/src/resources/api-keys.ts +5 -0
- package/src/resources/definition-revisions.ts +9 -0
- package/src/resources/definitions.ts +25 -0
- package/src/resources/generate.ts +23 -0
- package/src/resources/generations.ts +5 -0
- package/src/resources/projects.ts +95 -7
- package/src/resources/targets.ts +241 -0
- package/src/schemas.ts +55 -26
- package/src/types.ts +640 -123
package/api.md
CHANGED
|
@@ -1,19 +1,25 @@
|
|
|
1
|
-
# typeship —
|
|
1
|
+
# typeship — CLI reference
|
|
2
2
|
|
|
3
|
-
API version 1.0.0. Package version 0.
|
|
3
|
+
API version 1.0.0. Package version 0.10.0. Generated by typeship; regenerate rather than editing.
|
|
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
|
|
|
7
|
-
|
|
7
|
+
API commands write JSON to stdout. Exit codes: `0` success, `1` request failure, `2` invalid usage. In agent mode, errors are JSON on stderr with `status`, `issues`, and `next_steps`; branch on `issues[].code`. Destructive operations require `--force` without an interactive terminal.
|
|
8
|
+
|
|
9
|
+
Use `--fields id,name` to project response fields. `--base-url <url>` overrides the endpoint. See [`README.md`](./README.md) for local setup and authentication.
|
|
10
|
+
|
|
11
|
+
For complete input and output schemas, use [`api.json`](./api.json), the machine-readable companion to this reference.
|
|
8
12
|
|
|
9
13
|
## generate
|
|
10
14
|
|
|
11
|
-
### `
|
|
15
|
+
### `typeship generate run [flags]`
|
|
12
16
|
|
|
13
17
|
Generate one Target from a Definition
|
|
14
18
|
|
|
15
19
|
`POST /generate`
|
|
16
20
|
|
|
21
|
+
Safety: **write** · Authentication: **optional**
|
|
22
|
+
|
|
17
23
|
Stateless generation: nothing is stored. Returns the full generated
|
|
18
24
|
package as files. Works without an API key: anonymous calls generate
|
|
19
25
|
the first 25 operations, rate limited per IP address, and the
|
|
@@ -23,32 +29,28 @@ that turns the run into a project once a person signs in. With a key, the free p
|
|
|
23
29
|
paid plans generate the complete Definition. A present but invalid key is a
|
|
24
30
|
401, not a downgrade to anonymous.
|
|
25
31
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
+
| Argument or flag | In | Type | Required | Description |
|
|
33
|
+
| --- | --- | --- | --- | --- |
|
|
34
|
+
| `--definition` | body | `json` | yes | A Definition for stateless generation, provided as exactly one URL or inline entrypoint. |
|
|
35
|
+
| `--target` | body | `object` | yes | Stateless generator descriptor; no persisted Target is created. |
|
|
36
|
+
| `--package-name` | body | `string` | no | npm package or Python distribution override. Valid only for the TypeScript and Python SDK targets. |
|
|
37
|
+
| `--module-path` | body | `string` | no | Go module path override. Valid only for the Go SDK. Linked projects derive this from the Go destination repository by default. |
|
|
38
|
+
| `--config` | body | `object` | no | Everything Typeship needs beyond the Definition, in one object: generation customization (globals, retries, pagination, readme) and how the generated tooling behaves (cli, mcp, package, docs_url). Plain configuration. Typeship never requires vendor extensions inside the Definition itself. Stateless generation also accepts GraphQL settings here; stored projects keep those settings on their Definition. |
|
|
39
|
+
| `--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. |
|
|
32
40
|
|
|
33
|
-
<
|
|
34
|
-
<summary>Wire arguments (CLI and MCP)</summary>
|
|
41
|
+
Use `--data '<json>'`, `--data @body.json`, or `--data -` to supply the request body. Field flags override matching body fields.
|
|
35
42
|
|
|
36
|
-
```
|
|
37
|
-
{
|
|
38
|
-
"definition": {
|
|
39
|
-
"url": "https://example.com"
|
|
40
|
-
},
|
|
41
|
-
"target": {
|
|
42
|
-
"generator": "typescript-sdk"
|
|
43
|
-
}
|
|
44
|
-
}
|
|
43
|
+
```sh
|
|
44
|
+
typeship generate run --definition '{"url":"https://example.com"}' --target '{"generator":"typescript-sdk"}'
|
|
45
45
|
```
|
|
46
46
|
|
|
47
|
-
|
|
47
|
+
Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
|
|
48
|
+
|
|
49
|
+
Read the full command contract with `typeship docs generate run --json`.
|
|
48
50
|
|
|
49
51
|
## projects
|
|
50
52
|
|
|
51
|
-
### `
|
|
53
|
+
### `typeship projects list [flags]`
|
|
52
54
|
|
|
53
55
|
List projects
|
|
54
56
|
|
|
@@ -56,66 +58,50 @@ List projects
|
|
|
56
58
|
|
|
57
59
|
Safety: **read** · Authentication: **required**
|
|
58
60
|
|
|
59
|
-
|
|
|
61
|
+
| Argument or flag | In | Type | Required | Description |
|
|
60
62
|
| --- | --- | --- | --- | --- |
|
|
61
|
-
|
|
|
62
|
-
|
|
|
63
|
-
|
|
64
|
-
Returns: `PagePromise<ProjectSummary>` — auto-paginating (`for await` walks every page)
|
|
65
|
-
Errors: `BadRequestError` (400), `UnauthorizedError` (401), `ForbiddenError` (403), `RateLimitedError` (429)
|
|
66
|
-
|
|
67
|
-
<details>
|
|
68
|
-
<summary>Wire arguments (CLI and MCP)</summary>
|
|
63
|
+
| `--limit` | query | `number` | no | Maximum number of resources to return. Default: 20. |
|
|
64
|
+
| `--cursor` | query | `string` | no | Opaque cursor from the preceding page's next_cursor. Valid only for the same account, operation, filters, and ordering that issued it. |
|
|
69
65
|
|
|
70
|
-
```
|
|
71
|
-
|
|
66
|
+
```sh
|
|
67
|
+
typeship projects list
|
|
72
68
|
```
|
|
73
69
|
|
|
74
|
-
|
|
70
|
+
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.
|
|
75
71
|
|
|
76
|
-
|
|
72
|
+
Read the full command contract with `typeship docs projects list --json`.
|
|
73
|
+
|
|
74
|
+
### `typeship projects create [flags]`
|
|
77
75
|
|
|
78
76
|
Create a project
|
|
79
77
|
|
|
80
78
|
`POST /projects`
|
|
81
79
|
|
|
82
|
-
Stores a URL- or GitHub-sourced project. Free includes one stored project, every selected target, and the first 25 operations, while keeping manual and automatic regeneration, history, destination pull requests, and preview checks. Stateless POST /generate does not consume this slot. Pro adds projects and generates every operation in the Definition.
|
|
83
|
-
|
|
84
80
|
Safety: **write** · Authentication: **required**
|
|
85
81
|
|
|
86
|
-
|
|
87
|
-
| --- | --- | --- | --- | --- |
|
|
88
|
-
| `idempotencyKey` | header | `string` | no | Uniquely identifies this creation attempt. Retrying the same request with the same key returns the original response instead of creating another project. Reusing a key with different parameters returns 409. |
|
|
89
|
-
|
|
90
|
-
Body: `CreateProjectRequest` (required)
|
|
91
|
-
|
|
92
|
-
Returns: `Project`
|
|
93
|
-
Errors: `BadRequestError` (400), `UnauthorizedError` (401), `PaymentRequiredError` (402), `ForbiddenError` (403), `ConflictError` (409), `UnprocessableEntityError` (422), `RateLimitedError` (429), `InternalServerError` (500)
|
|
94
|
-
|
|
95
|
-
<details>
|
|
96
|
-
<summary>Wire arguments (CLI and MCP)</summary>
|
|
82
|
+
Stores a URL- or GitHub-sourced project. Free includes one stored project, every selected target, and the first 25 operations, while keeping manual and automatic regeneration, history, destination pull requests, and preview checks. Stateless POST /generate does not consume this slot. Pro adds projects and generates every operation in the Definition.
|
|
97
83
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
]
|
|
113
|
-
}
|
|
84
|
+
| Argument or flag | In | Type | Required | Description |
|
|
85
|
+
| --- | --- | --- | --- | --- |
|
|
86
|
+
| `--name` | body | `string` | yes | — |
|
|
87
|
+
| `--definition` | body | `object` | yes | — |
|
|
88
|
+
| `--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: false. |
|
|
90
|
+
| `--relay-enabled` | body | `boolean` | no | Enable webhook relay sessions. Requires the CLI target and Pro. Default: false. |
|
|
91
|
+
| `--config` | body | `json` | no | Shared defaults inherited by every Target. GraphQL settings belong in definition.graphql. |
|
|
92
|
+
| `--idempotency-key` | header | `string` | no | Identifies one logical write for 24 hours. The key is scoped to the authenticated account and operation; account-less generation uses a hashed network identity. Retrying the same method, path, query, and JSON body replays the original response. Reusing the key with changed intent returns 409. After expiry the key starts a new write. |
|
|
93
|
+
|
|
94
|
+
Use `--data '<json>'`, `--data @body.json`, or `--data -` to supply the request body. Field flags override matching body fields.
|
|
95
|
+
|
|
96
|
+
```sh
|
|
97
|
+
typeship projects create --name example --definition '{"source":{"kind":"url","url":"https://example.com"}}' --targets '[{"name":"example","generator":"typescript-sdk"}]'
|
|
114
98
|
```
|
|
115
99
|
|
|
116
|
-
|
|
100
|
+
Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
|
|
101
|
+
|
|
102
|
+
Read the full command contract with `typeship docs projects create --json`.
|
|
117
103
|
|
|
118
|
-
### `
|
|
104
|
+
### `typeship projects retrieve <project_id> [flags]`
|
|
119
105
|
|
|
120
106
|
Retrieve a project
|
|
121
107
|
|
|
@@ -123,25 +109,21 @@ Retrieve a project
|
|
|
123
109
|
|
|
124
110
|
Safety: **read** · Authentication: **required**
|
|
125
111
|
|
|
126
|
-
|
|
127
|
-
| --- | --- | --- | --- | --- |
|
|
128
|
-
| `projectId` | path | `ProjectId` | yes | — |
|
|
129
|
-
|
|
130
|
-
Returns: `Project`
|
|
131
|
-
Errors: `UnauthorizedError` (401), `ForbiddenError` (403), `NotFoundError` (404), `RateLimitedError` (429)
|
|
112
|
+
Returns Project-owned fields only. List Targets separately for Target and Delivery data.
|
|
132
113
|
|
|
133
|
-
|
|
134
|
-
|
|
114
|
+
| Argument or flag | In | Type | Required | Description |
|
|
115
|
+
| --- | --- | --- | --- | --- |
|
|
116
|
+
| `<project_id>` | path | `string` | yes | Accepts an ID or an exact name (resolved via projects_list). IDs come from projects_list. |
|
|
135
117
|
|
|
136
|
-
```
|
|
137
|
-
|
|
138
|
-
"project_id": "prj_4f8k2m7x9q1v6b3n"
|
|
139
|
-
}
|
|
118
|
+
```sh
|
|
119
|
+
typeship projects retrieve prj_4f8k2m7x9q1v6b3n
|
|
140
120
|
```
|
|
141
121
|
|
|
142
|
-
|
|
122
|
+
Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
|
|
143
123
|
|
|
144
|
-
|
|
124
|
+
Read the full command contract with `typeship docs projects retrieve --json`.
|
|
125
|
+
|
|
126
|
+
### `typeship projects delete <project_id> [flags]`
|
|
145
127
|
|
|
146
128
|
Delete a project
|
|
147
129
|
|
|
@@ -149,25 +131,19 @@ Delete a project
|
|
|
149
131
|
|
|
150
132
|
Safety: **destructive** · Authentication: **required**
|
|
151
133
|
|
|
152
|
-
|
|
|
134
|
+
| Argument or flag | In | Type | Required | Description |
|
|
153
135
|
| --- | --- | --- | --- | --- |
|
|
154
|
-
|
|
|
155
|
-
|
|
156
|
-
Returns: `DeletedProject`
|
|
157
|
-
Errors: `UnauthorizedError` (401), `ForbiddenError` (403), `NotFoundError` (404), `RateLimitedError` (429)
|
|
158
|
-
|
|
159
|
-
<details>
|
|
160
|
-
<summary>Wire arguments (CLI and MCP)</summary>
|
|
136
|
+
| `<project_id>` | path | `string` | yes | Accepts an ID or an exact name (resolved via projects_list). IDs come from projects_list. |
|
|
161
137
|
|
|
162
|
-
```
|
|
163
|
-
|
|
164
|
-
"project_id": "prj_4f8k2m7x9q1v6b3n"
|
|
165
|
-
}
|
|
138
|
+
```sh
|
|
139
|
+
typeship projects delete prj_4f8k2m7x9q1v6b3n --force
|
|
166
140
|
```
|
|
167
141
|
|
|
168
|
-
|
|
142
|
+
Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
|
|
169
143
|
|
|
170
|
-
|
|
144
|
+
Read the full command contract with `typeship docs projects delete --json`.
|
|
145
|
+
|
|
146
|
+
### `typeship projects update <project_id> [flags]`
|
|
171
147
|
|
|
172
148
|
Update a project
|
|
173
149
|
|
|
@@ -175,144 +151,118 @@ Update a project
|
|
|
175
151
|
|
|
176
152
|
Safety: **write** · Authentication: **required**
|
|
177
153
|
|
|
178
|
-
|
|
|
154
|
+
| Argument or flag | In | Type | Required | Description |
|
|
179
155
|
| --- | --- | --- | --- | --- |
|
|
180
|
-
|
|
|
181
|
-
|
|
182
|
-
|
|
156
|
+
| `<project_id>` | path | `string` | yes | Accepts an ID or an exact name (resolved via projects_list). IDs come from projects_list. |
|
|
157
|
+
| `--name` | body | `string` | no | — |
|
|
158
|
+
| `--auto-generate` | body | `boolean` | no | — |
|
|
159
|
+
| `--relay-enabled` | body | `boolean` | no | Enable webhook relay sessions. Requires the CLI target and Pro. |
|
|
160
|
+
| `--config` | body | `json` | no | Replaces the Project's shared Target defaults. Send null to clear them. |
|
|
183
161
|
|
|
184
|
-
|
|
185
|
-
Errors: `BadRequestError` (400), `UnauthorizedError` (401), `PaymentRequiredError` (402), `ForbiddenError` (403), `NotFoundError` (404), `UnprocessableEntityError` (422), `RateLimitedError` (429)
|
|
162
|
+
Use `--data '<json>'`, `--data @body.json`, or `--data -` to supply the request body. Field flags override matching body fields.
|
|
186
163
|
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
```json
|
|
191
|
-
{
|
|
192
|
-
"project_id": "prj_4f8k2m7x9q1v6b3n"
|
|
193
|
-
}
|
|
164
|
+
```sh
|
|
165
|
+
typeship projects update prj_4f8k2m7x9q1v6b3n
|
|
194
166
|
```
|
|
195
167
|
|
|
196
|
-
|
|
168
|
+
Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
|
|
169
|
+
|
|
170
|
+
Read the full command contract with `typeship docs projects update --json`.
|
|
197
171
|
|
|
198
|
-
### `
|
|
172
|
+
### `typeship projects retrieve-diagnostics <project_id> [flags]`
|
|
199
173
|
|
|
200
174
|
Analyze a project's latest Definition Revision
|
|
201
175
|
|
|
202
176
|
`GET /projects/{project_id}/diagnostics`
|
|
203
177
|
|
|
204
|
-
Runs deterministic OpenAPI or GraphQL authorship checks against the latest observed immutable Definition Revision after applying the Definition's existing patches. Diagnostics group every affected location under a stable rule. Exact patches are included only when Typeship can derive the change without inventing API behavior.
|
|
205
|
-
|
|
206
178
|
Safety: **read** · Authentication: **required**
|
|
207
179
|
|
|
208
|
-
|
|
209
|
-
| --- | --- | --- | --- | --- |
|
|
210
|
-
| `projectId` | path | `ProjectId` | yes | — |
|
|
211
|
-
|
|
212
|
-
Returns: `DiagnosticReport`
|
|
213
|
-
Errors: `UnauthorizedError` (401), `ForbiddenError` (403), `NotFoundError` (404), `RateLimitedError` (429)
|
|
180
|
+
Runs deterministic OpenAPI or GraphQL authorship checks against the latest observed immutable Definition Revision after applying the Definition's existing patches. Diagnostics group every affected location under a stable rule. Exact patches are included only when Typeship can derive the change without inventing API behavior.
|
|
214
181
|
|
|
215
|
-
|
|
216
|
-
|
|
182
|
+
| Argument or flag | In | Type | Required | Description |
|
|
183
|
+
| --- | --- | --- | --- | --- |
|
|
184
|
+
| `<project_id>` | path | `string` | yes | Accepts an ID or an exact name (resolved via projects_list). IDs come from projects_list. |
|
|
217
185
|
|
|
218
|
-
```
|
|
219
|
-
|
|
220
|
-
"project_id": "prj_4f8k2m7x9q1v6b3n"
|
|
221
|
-
}
|
|
186
|
+
```sh
|
|
187
|
+
typeship projects retrieve-diagnostics prj_4f8k2m7x9q1v6b3n
|
|
222
188
|
```
|
|
223
189
|
|
|
224
|
-
|
|
190
|
+
Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
|
|
225
191
|
|
|
226
|
-
|
|
192
|
+
Read the full command contract with `typeship docs projects retrieve-diagnostics --json`.
|
|
193
|
+
|
|
194
|
+
### `typeship projects refresh-diagnostics <project_id> [flags]`
|
|
227
195
|
|
|
228
196
|
Refresh a project's Diagnostics from its configured source
|
|
229
197
|
|
|
230
198
|
`POST /projects/{project_id}/diagnostics`
|
|
231
199
|
|
|
232
|
-
Fetches the complete configured source, records a new immutable revision only when content changed, and returns its Diagnostics. This does not generate targets or consume a metered generation.
|
|
233
|
-
|
|
234
200
|
Safety: **write** · Authentication: **required**
|
|
235
201
|
|
|
236
|
-
|
|
237
|
-
| --- | --- | --- | --- | --- |
|
|
238
|
-
| `projectId` | path | `ProjectId` | yes | — |
|
|
239
|
-
|
|
240
|
-
Returns: `DiagnosticReport`
|
|
241
|
-
Errors: `UnauthorizedError` (401), `ForbiddenError` (403), `NotFoundError` (404), `UnprocessableEntityError` (422), `RateLimitedError` (429)
|
|
202
|
+
Fetches the complete configured source, records a new immutable revision only when content changed, and returns its Diagnostics. This does not generate targets or consume a metered generation.
|
|
242
203
|
|
|
243
|
-
|
|
244
|
-
|
|
204
|
+
| Argument or flag | In | Type | Required | Description |
|
|
205
|
+
| --- | --- | --- | --- | --- |
|
|
206
|
+
| `<project_id>` | path | `string` | yes | Accepts an ID or an exact name (resolved via projects_list). IDs come from projects_list. |
|
|
207
|
+
| `--idempotency-key` | header | `string` | no | Identifies one logical write for 24 hours. The key is scoped to the authenticated account and operation; account-less generation uses a hashed network identity. Retrying the same method, path, query, and JSON body replays the original response. Reusing the key with changed intent returns 409. After expiry the key starts a new write. |
|
|
245
208
|
|
|
246
|
-
```
|
|
247
|
-
|
|
248
|
-
"project_id": "prj_4f8k2m7x9q1v6b3n"
|
|
249
|
-
}
|
|
209
|
+
```sh
|
|
210
|
+
typeship projects refresh-diagnostics prj_4f8k2m7x9q1v6b3n
|
|
250
211
|
```
|
|
251
212
|
|
|
252
|
-
|
|
213
|
+
Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
|
|
253
214
|
|
|
254
|
-
|
|
215
|
+
Read the full command contract with `typeship docs projects refresh-diagnostics --json`.
|
|
216
|
+
|
|
217
|
+
### `typeship projects remediate-diagnostics <project_id> [flags]`
|
|
255
218
|
|
|
256
219
|
Apply exact, reviewed diagnostic remediations
|
|
257
220
|
|
|
258
221
|
`POST /projects/{project_id}/diagnostics/remediations`
|
|
259
222
|
|
|
260
|
-
Applies only deterministic patches. Repository sources receive an updateable source pull request; URL sources receive project overlays. Diagnostics that require API-owner intent return 422 and include an authoring_brief in the Diagnostic instead.
|
|
261
|
-
|
|
262
223
|
Safety: **write** · Authentication: **required**
|
|
263
224
|
|
|
264
|
-
|
|
265
|
-
| --- | --- | --- | --- | --- |
|
|
266
|
-
| `projectId` | path | `ProjectId` | yes | — |
|
|
267
|
-
|
|
268
|
-
Body: `DiagnosticRemediationRequest` (required)
|
|
225
|
+
Applies only deterministic patches. Repository sources receive an updateable source pull request; URL sources receive project overlays. Diagnostics that require API-owner intent return 422 and include an authoring_brief in the Diagnostic instead.
|
|
269
226
|
|
|
270
|
-
|
|
271
|
-
|
|
227
|
+
| Argument or flag | In | Type | Required | Description |
|
|
228
|
+
| --- | --- | --- | --- | --- |
|
|
229
|
+
| `<project_id>` | path | `string` | yes | Accepts an ID or an exact name (resolved via projects_list). IDs come from projects_list. |
|
|
230
|
+
| `--diagnostic-ids` | body | `array` | yes | Stable IDs of current diagnostics whose exact patches should be reviewed and applied. |
|
|
231
|
+
| `--idempotency-key` | header | `string` | no | Identifies one logical write for 24 hours. The key is scoped to the authenticated account and operation; account-less generation uses a hashed network identity. Retrying the same method, path, query, and JSON body replays the original response. Reusing the key with changed intent returns 409. After expiry the key starts a new write. |
|
|
272
232
|
|
|
273
|
-
<
|
|
274
|
-
<summary>Wire arguments (CLI and MCP)</summary>
|
|
233
|
+
Use `--data '<json>'`, `--data @body.json`, or `--data -` to supply the request body. Field flags override matching body fields.
|
|
275
234
|
|
|
276
|
-
```
|
|
277
|
-
|
|
278
|
-
"project_id": "prj_4f8k2m7x9q1v6b3n",
|
|
279
|
-
"diagnostic_ids": [
|
|
280
|
-
"value"
|
|
281
|
-
]
|
|
282
|
-
}
|
|
235
|
+
```sh
|
|
236
|
+
typeship projects remediate-diagnostics prj_4f8k2m7x9q1v6b3n --diagnostic-ids '["value"]'
|
|
283
237
|
```
|
|
284
238
|
|
|
285
|
-
|
|
239
|
+
Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
|
|
240
|
+
|
|
241
|
+
Read the full command contract with `typeship docs projects remediate-diagnostics --json`.
|
|
286
242
|
|
|
287
|
-
### `
|
|
243
|
+
### `typeship projects retrieve-integration-health <project_id> [flags]`
|
|
288
244
|
|
|
289
245
|
Diagnose a project's repository integrations
|
|
290
246
|
|
|
291
247
|
`GET /projects/{project_id}/integration-health`
|
|
292
248
|
|
|
293
|
-
Returns provider-neutral, machine-actionable source and destination access, Definition readability, source-approval label setup, required status names, and the latest durable webhook delivery. The Console renders this same result.
|
|
294
|
-
|
|
295
249
|
Safety: **read** · Authentication: **required**
|
|
296
250
|
|
|
297
|
-
|
|
298
|
-
| --- | --- | --- | --- | --- |
|
|
299
|
-
| `projectId` | path | `ProjectId` | yes | — |
|
|
300
|
-
|
|
301
|
-
Returns: `RepositoryIntegrationHealth`
|
|
302
|
-
Errors: `UnauthorizedError` (401), `ForbiddenError` (403), `NotFoundError` (404), `RateLimitedError` (429)
|
|
251
|
+
Returns provider-neutral, machine-actionable source and destination access, Definition readability, source-approval label setup, required status names, and the latest durable webhook delivery. The Console renders this same result.
|
|
303
252
|
|
|
304
|
-
|
|
305
|
-
|
|
253
|
+
| Argument or flag | In | Type | Required | Description |
|
|
254
|
+
| --- | --- | --- | --- | --- |
|
|
255
|
+
| `<project_id>` | path | `string` | yes | Accepts an ID or an exact name (resolved via projects_list). IDs come from projects_list. |
|
|
306
256
|
|
|
307
|
-
```
|
|
308
|
-
|
|
309
|
-
"project_id": "prj_4f8k2m7x9q1v6b3n"
|
|
310
|
-
}
|
|
257
|
+
```sh
|
|
258
|
+
typeship projects retrieve-integration-health prj_4f8k2m7x9q1v6b3n
|
|
311
259
|
```
|
|
312
260
|
|
|
313
|
-
|
|
261
|
+
Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
|
|
262
|
+
|
|
263
|
+
Read the full command contract with `typeship docs projects retrieve-integration-health --json`.
|
|
314
264
|
|
|
315
|
-
### `
|
|
265
|
+
### `typeship projects list-generations <project_id> [flags]`
|
|
316
266
|
|
|
317
267
|
List a project's generations
|
|
318
268
|
|
|
@@ -320,33 +270,29 @@ List a project's generations
|
|
|
320
270
|
|
|
321
271
|
Safety: **read** · Authentication: **required**
|
|
322
272
|
|
|
323
|
-
|
|
|
273
|
+
| Argument or flag | In | Type | Required | Description |
|
|
324
274
|
| --- | --- | --- | --- | --- |
|
|
325
|
-
|
|
|
326
|
-
|
|
|
327
|
-
|
|
|
328
|
-
| `
|
|
329
|
-
|
|
330
|
-
Returns: `PagePromise<Generation>` — auto-paginating (`for await` walks every page)
|
|
331
|
-
Errors: `BadRequestError` (400), `UnauthorizedError` (401), `ForbiddenError` (403), `NotFoundError` (404), `RateLimitedError` (429)
|
|
275
|
+
| `<project_id>` | path | `string` | yes | Accepts an ID or an exact name (resolved via projects_list). IDs come from projects_list. |
|
|
276
|
+
| `--limit` | query | `number` | no | Maximum number of resources to return. Default: 20. |
|
|
277
|
+
| `--cursor` | query | `string` | no | Opaque cursor from the preceding page's next_cursor. Valid only for the same account, operation, filters, and ordering that issued it. |
|
|
278
|
+
| `--target-id` | query | `string` | no | Only generations for this persisted Target. |
|
|
332
279
|
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
```json
|
|
337
|
-
{
|
|
338
|
-
"project_id": "prj_4f8k2m7x9q1v6b3n"
|
|
339
|
-
}
|
|
280
|
+
```sh
|
|
281
|
+
typeship projects list-generations prj_4f8k2m7x9q1v6b3n
|
|
340
282
|
```
|
|
341
283
|
|
|
342
|
-
|
|
284
|
+
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
|
+
|
|
286
|
+
Read the full command contract with `typeship docs projects list-generations --json`.
|
|
343
287
|
|
|
344
|
-
### `
|
|
288
|
+
### `typeship projects generate <project_id> [flags]`
|
|
345
289
|
|
|
346
290
|
Generate targets and open pull requests
|
|
347
291
|
|
|
348
292
|
`POST /projects/{project_id}/generations`
|
|
349
293
|
|
|
294
|
+
Safety: **write** · Authentication: **required**
|
|
295
|
+
|
|
350
296
|
Resolves the project's URL or GitHub source, generates every
|
|
351
297
|
configured delivery package, stores each result in the project's history,
|
|
352
298
|
and attempts to open a pull request in every configured destination.
|
|
@@ -355,29 +301,22 @@ commit, branch, or pull request is created and that generation reports
|
|
|
355
301
|
`pr_status: no_changes`. This is the same pipeline automatic
|
|
356
302
|
regeneration runs after a source change.
|
|
357
303
|
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
| Parameter | In | Type | Required | Description |
|
|
304
|
+
| Argument or flag | In | Type | Required | Description |
|
|
361
305
|
| --- | --- | --- | --- | --- |
|
|
362
|
-
|
|
|
306
|
+
| `<project_id>` | path | `string` | yes | Accepts an ID or an exact name (resolved via projects_list). IDs come from projects_list. |
|
|
307
|
+
| `--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. |
|
|
363
308
|
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
<details>
|
|
368
|
-
<summary>Wire arguments (CLI and MCP)</summary>
|
|
369
|
-
|
|
370
|
-
```json
|
|
371
|
-
{
|
|
372
|
-
"project_id": "prj_4f8k2m7x9q1v6b3n"
|
|
373
|
-
}
|
|
309
|
+
```sh
|
|
310
|
+
typeship projects generate prj_4f8k2m7x9q1v6b3n
|
|
374
311
|
```
|
|
375
312
|
|
|
376
|
-
|
|
313
|
+
Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
|
|
314
|
+
|
|
315
|
+
Read the full command contract with `typeship docs projects generate --json`.
|
|
377
316
|
|
|
378
317
|
## definitions
|
|
379
318
|
|
|
380
|
-
### `
|
|
319
|
+
### `typeship definitions retrieve <definition_id> [flags]`
|
|
381
320
|
|
|
382
321
|
Retrieve a Definition
|
|
383
322
|
|
|
@@ -385,57 +324,50 @@ Retrieve a Definition
|
|
|
385
324
|
|
|
386
325
|
Safety: **read** · Authentication: **required**
|
|
387
326
|
|
|
388
|
-
|
|
|
327
|
+
| Argument or flag | In | Type | Required | Description |
|
|
389
328
|
| --- | --- | --- | --- | --- |
|
|
390
|
-
|
|
|
391
|
-
|
|
392
|
-
Returns: `Definition`
|
|
393
|
-
Errors: `UnauthorizedError` (401), `ForbiddenError` (403), `NotFoundError` (404), `RateLimitedError` (429)
|
|
329
|
+
| `<definition_id>` | path | `string` | yes | — |
|
|
394
330
|
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
```json
|
|
399
|
-
{
|
|
400
|
-
"definition_id": "def_2p8m4q7k1v9d6h3c"
|
|
401
|
-
}
|
|
331
|
+
```sh
|
|
332
|
+
typeship definitions retrieve def_2p8m4q7k1v9d6h3c
|
|
402
333
|
```
|
|
403
334
|
|
|
404
|
-
|
|
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`.
|
|
405
338
|
|
|
406
|
-
### `
|
|
339
|
+
### `typeship definitions update <definition_id> [flags]`
|
|
407
340
|
|
|
408
341
|
Update and resolve a Definition
|
|
409
342
|
|
|
410
343
|
`PATCH /definitions/{definition_id}`
|
|
411
344
|
|
|
412
|
-
Resolves the complete document graph and records a new immutable revision before saving.
|
|
413
|
-
|
|
414
345
|
Safety: **write** · Authentication: **required**
|
|
415
346
|
|
|
416
|
-
|
|
417
|
-
| --- | --- | --- | --- | --- |
|
|
418
|
-
| `definitionId` | path | `DefinitionId` | yes | — |
|
|
419
|
-
|
|
420
|
-
Body: `DefinitionUpdateRequest` (required)
|
|
347
|
+
Resolves the complete document graph and records a new immutable revision before saving.
|
|
421
348
|
|
|
422
|
-
|
|
423
|
-
|
|
349
|
+
| Argument or flag | In | Type | Required | Description |
|
|
350
|
+
| --- | --- | --- | --- | --- |
|
|
351
|
+
| `<definition_id>` | path | `string` | yes | — |
|
|
352
|
+
| `--source` | body | `json` | no | — |
|
|
353
|
+
| `--patches` | body | `array` | no | — |
|
|
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. |
|
|
424
357
|
|
|
425
|
-
<
|
|
426
|
-
<summary>Wire arguments (CLI and MCP)</summary>
|
|
358
|
+
Use `--data '<json>'`, `--data @body.json`, or `--data -` to supply the request body. Field flags override matching body fields.
|
|
427
359
|
|
|
428
|
-
```
|
|
429
|
-
|
|
430
|
-
"definition_id": "def_2p8m4q7k1v9d6h3c"
|
|
431
|
-
}
|
|
360
|
+
```sh
|
|
361
|
+
typeship definitions update def_2p8m4q7k1v9d6h3c
|
|
432
362
|
```
|
|
433
363
|
|
|
434
|
-
|
|
364
|
+
Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
|
|
365
|
+
|
|
366
|
+
Read the full command contract with `typeship docs definitions update --json`.
|
|
435
367
|
|
|
436
368
|
## targets
|
|
437
369
|
|
|
438
|
-
### `
|
|
370
|
+
### `typeship targets list <project_id> [flags]`
|
|
439
371
|
|
|
440
372
|
List a project's Targets
|
|
441
373
|
|
|
@@ -443,60 +375,55 @@ List a project's Targets
|
|
|
443
375
|
|
|
444
376
|
Safety: **read** · Authentication: **required**
|
|
445
377
|
|
|
446
|
-
|
|
|
378
|
+
| Argument or flag | In | Type | Required | Description |
|
|
447
379
|
| --- | --- | --- | --- | --- |
|
|
448
|
-
|
|
|
449
|
-
|
|
|
450
|
-
|
|
|
380
|
+
| `<project_id>` | path | `string` | yes | Accepts an ID or an exact name (resolved via projects_list). IDs come from projects_list. |
|
|
381
|
+
| `--limit` | query | `number` | no | Maximum number of resources to return. Default: 20. |
|
|
382
|
+
| `--cursor` | query | `string` | no | Opaque cursor from the preceding page's next_cursor. Valid only for the same account, operation, filters, and ordering that issued it. |
|
|
451
383
|
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
<details>
|
|
456
|
-
<summary>Wire arguments (CLI and MCP)</summary>
|
|
457
|
-
|
|
458
|
-
```json
|
|
459
|
-
{
|
|
460
|
-
"project_id": "prj_4f8k2m7x9q1v6b3n"
|
|
461
|
-
}
|
|
384
|
+
```sh
|
|
385
|
+
typeship targets list prj_4f8k2m7x9q1v6b3n
|
|
462
386
|
```
|
|
463
387
|
|
|
464
|
-
|
|
388
|
+
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.
|
|
465
389
|
|
|
466
|
-
|
|
390
|
+
Read the full command contract with `typeship docs targets list --json`.
|
|
391
|
+
|
|
392
|
+
### `typeship targets create <project_id> [flags]`
|
|
467
393
|
|
|
468
394
|
Create an independently configured Target
|
|
469
395
|
|
|
470
396
|
`POST /projects/{project_id}/targets`
|
|
471
397
|
|
|
472
|
-
Several Targets may use the same generator with distinct configuration, Deliveries, and release streams.
|
|
473
|
-
|
|
474
398
|
Safety: **write** · Authentication: **required**
|
|
475
399
|
|
|
476
|
-
|
|
477
|
-
| --- | --- | --- | --- | --- |
|
|
478
|
-
| `projectId` | path | `ProjectId` | yes | — |
|
|
479
|
-
|
|
480
|
-
Body: `TargetFields` (required)
|
|
481
|
-
|
|
482
|
-
Returns: `TargetResponse`
|
|
483
|
-
Errors: `BadRequestError` (400), `UnauthorizedError` (401), `ForbiddenError` (403), `NotFoundError` (404), `ConflictError` (409), `UnprocessableEntityError` (422), `RateLimitedError` (429)
|
|
484
|
-
|
|
485
|
-
<details>
|
|
486
|
-
<summary>Wire arguments (CLI and MCP)</summary>
|
|
400
|
+
Several Targets may use the same generator with distinct configuration, Deliveries, and release streams.
|
|
487
401
|
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
402
|
+
| Argument or flag | In | Type | Required | Description |
|
|
403
|
+
| --- | --- | --- | --- | --- |
|
|
404
|
+
| `<project_id>` | path | `string` | yes | Accepts an ID or an exact name (resolved via projects_list). IDs come from projects_list. |
|
|
405
|
+
| `--name` | body | `string` | yes | — |
|
|
406
|
+
| `--definition-id` | body | `string` | yes | Unique identifier for a project's logical API Definition. |
|
|
407
|
+
| `--generator` | body | `string` | yes | Generator implementation selected by a Target. This is configuration, not identity; several Targets may use the same generator. |
|
|
408
|
+
| `--state` | body | `string` | no | Default: "active". |
|
|
409
|
+
| `--edition` | body | `string` | no | Default: "2026-08-24". |
|
|
410
|
+
| `--release-channel` | body | `string` | no | Default: "stable". |
|
|
411
|
+
| `--proposed-version` | body | `string` | no | Optional larger or prerelease SemVer for the next reviewed release. |
|
|
412
|
+
| `--config` | body | `json` | no | Target-specific overrides merged over Project.config. GraphQL settings are rejected here and belong to the Definition. |
|
|
413
|
+
| `--deliveries` | body | `array` | no | — |
|
|
414
|
+
| `--idempotency-key` | header | `string` | no | Identifies one logical write for 24 hours. The key is scoped to the authenticated account and operation; account-less generation uses a hashed network identity. Retrying the same method, path, query, and JSON body replays the original response. Reusing the key with changed intent returns 409. After expiry the key starts a new write. |
|
|
415
|
+
|
|
416
|
+
Use `--data '<json>'`, `--data @body.json`, or `--data -` to supply the request body. Field flags override matching body fields.
|
|
417
|
+
|
|
418
|
+
```sh
|
|
419
|
+
typeship targets create prj_4f8k2m7x9q1v6b3n --name example --definition-id def_2p8m4q7k1v9d6h3c --generator typescript-sdk
|
|
495
420
|
```
|
|
496
421
|
|
|
497
|
-
|
|
422
|
+
Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
|
|
423
|
+
|
|
424
|
+
Read the full command contract with `typeship docs targets create --json`.
|
|
498
425
|
|
|
499
|
-
### `
|
|
426
|
+
### `typeship targets retrieve <target_id> [flags]`
|
|
500
427
|
|
|
501
428
|
Retrieve a Target
|
|
502
429
|
|
|
@@ -504,53 +431,41 @@ Retrieve a Target
|
|
|
504
431
|
|
|
505
432
|
Safety: **read** · Authentication: **required**
|
|
506
433
|
|
|
507
|
-
|
|
|
434
|
+
| Argument or flag | In | Type | Required | Description |
|
|
508
435
|
| --- | --- | --- | --- | --- |
|
|
509
|
-
|
|
|
510
|
-
|
|
511
|
-
Returns: `TargetResponse`
|
|
512
|
-
Errors: `UnauthorizedError` (401), `ForbiddenError` (403), `NotFoundError` (404), `RateLimitedError` (429)
|
|
436
|
+
| `<target_id>` | path | `string` | yes | — |
|
|
513
437
|
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
```json
|
|
518
|
-
{
|
|
519
|
-
"target_id": "tgt_5m8q2v7k1p9d4h6c"
|
|
520
|
-
}
|
|
438
|
+
```sh
|
|
439
|
+
typeship targets retrieve tgt_5m8q2v7k1p9d4h6c
|
|
521
440
|
```
|
|
522
441
|
|
|
523
|
-
|
|
442
|
+
Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
|
|
443
|
+
|
|
444
|
+
Read the full command contract with `typeship docs targets retrieve --json`.
|
|
524
445
|
|
|
525
|
-
### `
|
|
446
|
+
### `typeship targets delete <target_id> [flags]`
|
|
526
447
|
|
|
527
448
|
Delete an unused Target
|
|
528
449
|
|
|
529
450
|
`DELETE /targets/{target_id}`
|
|
530
451
|
|
|
531
|
-
Targets with Generation or release history, or an active release candidate, must be disabled instead.
|
|
532
|
-
|
|
533
452
|
Safety: **destructive** · Authentication: **required**
|
|
534
453
|
|
|
535
|
-
|
|
536
|
-
| --- | --- | --- | --- | --- |
|
|
537
|
-
| `targetId` | path | `TargetId` | yes | — |
|
|
538
|
-
|
|
539
|
-
Returns: `DeletedTarget`
|
|
540
|
-
Errors: `UnauthorizedError` (401), `ForbiddenError` (403), `NotFoundError` (404), `ConflictError` (409), `RateLimitedError` (429)
|
|
454
|
+
Targets with Generation or release history, or an active release candidate, must be disabled instead.
|
|
541
455
|
|
|
542
|
-
|
|
543
|
-
|
|
456
|
+
| Argument or flag | In | Type | Required | Description |
|
|
457
|
+
| --- | --- | --- | --- | --- |
|
|
458
|
+
| `<target_id>` | path | `string` | yes | — |
|
|
544
459
|
|
|
545
|
-
```
|
|
546
|
-
|
|
547
|
-
"target_id": "tgt_5m8q2v7k1p9d4h6c"
|
|
548
|
-
}
|
|
460
|
+
```sh
|
|
461
|
+
typeship targets delete tgt_5m8q2v7k1p9d4h6c --force
|
|
549
462
|
```
|
|
550
463
|
|
|
551
|
-
|
|
464
|
+
Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
|
|
465
|
+
|
|
466
|
+
Read the full command contract with `typeship docs targets delete --json`.
|
|
552
467
|
|
|
553
|
-
### `
|
|
468
|
+
### `typeship targets update <target_id> [flags]`
|
|
554
469
|
|
|
555
470
|
Update a Target, its Deliveries, or its next reviewed version
|
|
556
471
|
|
|
@@ -558,55 +473,125 @@ Update a Target, its Deliveries, or its next reviewed version
|
|
|
558
473
|
|
|
559
474
|
Safety: **write** · Authentication: **required**
|
|
560
475
|
|
|
561
|
-
|
|
|
476
|
+
| Argument or flag | In | Type | Required | Description |
|
|
562
477
|
| --- | --- | --- | --- | --- |
|
|
563
|
-
|
|
|
478
|
+
| `<target_id>` | path | `string` | yes | — |
|
|
479
|
+
| `--name` | body | `string` | no | — |
|
|
480
|
+
| `--state` | body | `string` | no | — |
|
|
481
|
+
| `--edition` | body | `string` | no | — |
|
|
482
|
+
| `--release-channel` | body | `string` | no | — |
|
|
483
|
+
| `--proposed-version` | body | `string` | no | — |
|
|
484
|
+
| `--config` | body | `json` | no | Target-specific overrides merged over Project.config. GraphQL settings are rejected here and belong to the Definition. |
|
|
485
|
+
| `--deliveries` | body | `array` | no | — |
|
|
486
|
+
|
|
487
|
+
Use `--data '<json>'`, `--data @body.json`, or `--data -` to supply the request body. Field flags override matching body fields.
|
|
488
|
+
|
|
489
|
+
```sh
|
|
490
|
+
typeship targets update tgt_5m8q2v7k1p9d4h6c
|
|
491
|
+
```
|
|
564
492
|
|
|
565
|
-
|
|
493
|
+
Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
|
|
566
494
|
|
|
567
|
-
|
|
568
|
-
Errors: `BadRequestError` (400), `UnauthorizedError` (401), `ForbiddenError` (403), `NotFoundError` (404), `ConflictError` (409), `UnprocessableEntityError` (422), `RateLimitedError` (429)
|
|
495
|
+
Read the full command contract with `typeship docs targets update --json`.
|
|
569
496
|
|
|
570
|
-
<
|
|
571
|
-
<summary>Wire arguments (CLI and MCP)</summary>
|
|
497
|
+
### `typeship targets list-releases <target_id> [flags]`
|
|
572
498
|
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
499
|
+
List immutable releases for a Target
|
|
500
|
+
|
|
501
|
+
`GET /targets/{target_id}/releases`
|
|
502
|
+
|
|
503
|
+
Safety: **read** · Authentication: **required**
|
|
504
|
+
|
|
505
|
+
| Argument or flag | In | Type | Required | Description |
|
|
506
|
+
| --- | --- | --- | --- | --- |
|
|
507
|
+
| `<target_id>` | path | `string` | yes | — |
|
|
508
|
+
| `--limit` | query | `number` | no | Maximum number of resources to return. Default: 20. |
|
|
509
|
+
| `--cursor` | query | `string` | no | Opaque cursor from the preceding page's next_cursor. Valid only for the same account, operation, filters, and ordering that issued it. |
|
|
510
|
+
|
|
511
|
+
```sh
|
|
512
|
+
typeship targets list-releases tgt_5m8q2v7k1p9d4h6c
|
|
577
513
|
```
|
|
578
514
|
|
|
579
|
-
|
|
515
|
+
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.
|
|
580
516
|
|
|
581
|
-
|
|
517
|
+
Read the full command contract with `typeship docs targets list-releases --json`.
|
|
582
518
|
|
|
583
|
-
|
|
519
|
+
### `typeship targets retrieve-draft <target_id> [flags]`
|
|
584
520
|
|
|
585
|
-
|
|
521
|
+
Retrieve a Target's rolling Draft release
|
|
522
|
+
|
|
523
|
+
`GET /targets/{target_id}/draft`
|
|
586
524
|
|
|
587
525
|
Safety: **read** · Authentication: **required**
|
|
588
526
|
|
|
589
|
-
|
|
527
|
+
Returns Current, the cumulative Draft version and readiness, its exact head, and the optimistic release revision.
|
|
528
|
+
|
|
529
|
+
| Argument or flag | In | Type | Required | Description |
|
|
530
|
+
| --- | --- | --- | --- | --- |
|
|
531
|
+
| `<target_id>` | path | `string` | yes | — |
|
|
532
|
+
|
|
533
|
+
```sh
|
|
534
|
+
typeship targets retrieve-draft tgt_5m8q2v7k1p9d4h6c
|
|
535
|
+
```
|
|
536
|
+
|
|
537
|
+
Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
|
|
538
|
+
|
|
539
|
+
Read the full command contract with `typeship docs targets retrieve-draft --json`.
|
|
540
|
+
|
|
541
|
+
### `typeship targets update-draft <target_id> [flags]`
|
|
542
|
+
|
|
543
|
+
Select an exact Draft version or return to automatic versioning
|
|
544
|
+
|
|
545
|
+
`PATCH /targets/{target_id}/draft`
|
|
546
|
+
|
|
547
|
+
Safety: **write** · Authentication: **required**
|
|
548
|
+
|
|
549
|
+
Validates the selection against the cumulative required bump and regenerates the same rolling Draft pull request.
|
|
550
|
+
|
|
551
|
+
| Argument or flag | In | Type | Required | Description |
|
|
590
552
|
| --- | --- | --- | --- | --- |
|
|
591
|
-
|
|
|
592
|
-
| `
|
|
593
|
-
| `
|
|
553
|
+
| `<target_id>` | path | `string` | yes | — |
|
|
554
|
+
| `--body-version` | body | `string` | yes | Exact SemVer, or null to return to automatic selection. |
|
|
555
|
+
| `--expected-revision` | body | `number` | no | — |
|
|
556
|
+
|
|
557
|
+
Use `--data '<json>'`, `--data @body.json`, or `--data -` to supply the request body. Field flags override matching body fields.
|
|
558
|
+
|
|
559
|
+
```sh
|
|
560
|
+
typeship targets update-draft tgt_5m8q2v7k1p9d4h6c --body-version 1.0.0
|
|
561
|
+
```
|
|
562
|
+
|
|
563
|
+
Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
|
|
564
|
+
|
|
565
|
+
Read the full command contract with `typeship docs targets update-draft --json`.
|
|
594
566
|
|
|
595
|
-
|
|
596
|
-
Errors: `BadRequestError` (400), `UnauthorizedError` (401), `ForbiddenError` (403), `NotFoundError` (404), `RateLimitedError` (429)
|
|
567
|
+
### `typeship targets adopt-release <target_id> [flags]`
|
|
597
568
|
|
|
598
|
-
|
|
599
|
-
<summary>Wire arguments (CLI and MCP)</summary>
|
|
569
|
+
Adopt a verified existing package as Current
|
|
600
570
|
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
571
|
+
`POST /targets/{target_id}/adopt`
|
|
572
|
+
|
|
573
|
+
Safety: **write** · Authentication: **required**
|
|
574
|
+
|
|
575
|
+
Verifies the repository tag, package metadata, and registry artifact; records an Imported Current release; then opens the first Typeship Draft at the next major version because no trusted generated baseline exists yet.
|
|
576
|
+
|
|
577
|
+
| Argument or flag | In | Type | Required | Description |
|
|
578
|
+
| --- | --- | --- | --- | --- |
|
|
579
|
+
| `<target_id>` | path | `string` | yes | — |
|
|
580
|
+
| `--body-version` | body | `string` | yes | Exact already-published package version to make Current. |
|
|
581
|
+
| `--tag` | body | `string` | yes | Immutable repository tag containing the matching package source. |
|
|
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. |
|
|
583
|
+
|
|
584
|
+
Use `--data '<json>'`, `--data @body.json`, or `--data -` to supply the request body. Field flags override matching body fields.
|
|
585
|
+
|
|
586
|
+
```sh
|
|
587
|
+
typeship targets adopt-release tgt_5m8q2v7k1p9d4h6c --body-version 1.0.0 --tag value
|
|
605
588
|
```
|
|
606
589
|
|
|
607
|
-
|
|
590
|
+
Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
|
|
608
591
|
|
|
609
|
-
|
|
592
|
+
Read the full command contract with `typeship docs targets adopt-release --json`.
|
|
593
|
+
|
|
594
|
+
### `typeship targets retrieve-release <target_release_id> [flags]`
|
|
610
595
|
|
|
611
596
|
Retrieve an immutable Target release
|
|
612
597
|
|
|
@@ -614,173 +599,159 @@ Retrieve an immutable Target release
|
|
|
614
599
|
|
|
615
600
|
Safety: **read** · Authentication: **required**
|
|
616
601
|
|
|
617
|
-
|
|
|
602
|
+
| Argument or flag | In | Type | Required | Description |
|
|
618
603
|
| --- | --- | --- | --- | --- |
|
|
619
|
-
|
|
|
604
|
+
| `<target_release_id>` | path | `string` | yes | — |
|
|
605
|
+
|
|
606
|
+
```sh
|
|
607
|
+
typeship targets retrieve-release rel_7m2q8v4k1p9d5h6c
|
|
608
|
+
```
|
|
609
|
+
|
|
610
|
+
Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
|
|
611
|
+
|
|
612
|
+
Read the full command contract with `typeship docs targets retrieve-release --json`.
|
|
613
|
+
|
|
614
|
+
### `typeship targets republish-release <target_release_id> [flags]`
|
|
620
615
|
|
|
621
|
-
|
|
622
|
-
Errors: `UnauthorizedError` (401), `ForbiddenError` (403), `NotFoundError` (404), `RateLimitedError` (429)
|
|
616
|
+
Retry publication of an exact Target release
|
|
623
617
|
|
|
624
|
-
|
|
625
|
-
<summary>Wire arguments (CLI and MCP)</summary>
|
|
618
|
+
`POST /target_releases/{target_release_id}/republish`
|
|
626
619
|
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
620
|
+
Safety: **write** · Authentication: **required**
|
|
621
|
+
|
|
622
|
+
Dispatches the repository-owned republish workflow for this immutable version and accepted commit. It never selects the latest Draft or release.
|
|
623
|
+
|
|
624
|
+
| Argument or flag | In | Type | Required | Description |
|
|
625
|
+
| --- | --- | --- | --- | --- |
|
|
626
|
+
| `<target_release_id>` | path | `string` | yes | — |
|
|
627
|
+
| `--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. |
|
|
628
|
+
|
|
629
|
+
```sh
|
|
630
|
+
typeship targets republish-release rel_7m2q8v4k1p9d5h6c
|
|
631
631
|
```
|
|
632
632
|
|
|
633
|
-
|
|
633
|
+
Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
|
|
634
|
+
|
|
635
|
+
Read the full command contract with `typeship docs targets republish-release --json`.
|
|
634
636
|
|
|
635
637
|
## generations
|
|
636
638
|
|
|
637
|
-
### `
|
|
639
|
+
### `typeship generations retrieve <generation_id> [flags]`
|
|
638
640
|
|
|
639
641
|
Retrieve a generation
|
|
640
642
|
|
|
641
643
|
`GET /generations/{generation_id}`
|
|
642
644
|
|
|
643
|
-
Includes the generated files when the generation succeeded.
|
|
644
|
-
|
|
645
645
|
Safety: **read** · Authentication: **required**
|
|
646
646
|
|
|
647
|
-
|
|
648
|
-
| --- | --- | --- | --- | --- |
|
|
649
|
-
| `generationId` | path | `GenerationId` | yes | — |
|
|
650
|
-
|
|
651
|
-
Returns: `GenerationResponse`
|
|
652
|
-
Errors: `UnauthorizedError` (401), `ForbiddenError` (403), `NotFoundError` (404), `RateLimitedError` (429)
|
|
647
|
+
Includes the generated files when the generation succeeded.
|
|
653
648
|
|
|
654
|
-
|
|
655
|
-
|
|
649
|
+
| Argument or flag | In | Type | Required | Description |
|
|
650
|
+
| --- | --- | --- | --- | --- |
|
|
651
|
+
| `<generation_id>` | path | `string` | yes | — |
|
|
656
652
|
|
|
657
|
-
```
|
|
658
|
-
|
|
659
|
-
"generation_id": "gen_7h2p5d9c3m8w1k6q"
|
|
660
|
-
}
|
|
653
|
+
```sh
|
|
654
|
+
typeship generations retrieve gen_7h2p5d9c3m8w1k6q
|
|
661
655
|
```
|
|
662
656
|
|
|
663
|
-
|
|
657
|
+
Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
|
|
658
|
+
|
|
659
|
+
Read the full command contract with `typeship docs generations retrieve --json`.
|
|
664
660
|
|
|
665
|
-
### `
|
|
661
|
+
### `typeship generations retrieve-file <generation_id> [flags]`
|
|
666
662
|
|
|
667
663
|
Fetch one file from a generation
|
|
668
664
|
|
|
669
665
|
`GET /generations/{generation_id}/file`
|
|
670
666
|
|
|
671
|
-
Raw file content, for generations whose target was too large to inline (files_omitted true). The generation's files_index lists valid paths.
|
|
672
|
-
|
|
673
667
|
Safety: **read** · Authentication: **required**
|
|
674
668
|
|
|
675
|
-
|
|
676
|
-
| --- | --- | --- | --- | --- |
|
|
677
|
-
| `generationId` | path | `GenerationId` | yes | — |
|
|
678
|
-
| `path` | query | `string` | yes | Repo-relative path inside the generated package. |
|
|
679
|
-
|
|
680
|
-
Returns: `string`
|
|
681
|
-
Errors: `BadRequestError` (400), `UnauthorizedError` (401), `ForbiddenError` (403), `NotFoundError` (404), `RateLimitedError` (429)
|
|
669
|
+
Raw file content, for generations whose target was too large to inline (files_omitted true). The generation's files_index lists valid paths.
|
|
682
670
|
|
|
683
|
-
|
|
684
|
-
|
|
671
|
+
| Argument or flag | In | Type | Required | Description |
|
|
672
|
+
| --- | --- | --- | --- | --- |
|
|
673
|
+
| `<generation_id>` | path | `string` | yes | — |
|
|
674
|
+
| `--path` | query | `string` | yes | Repo-relative path inside the generated package. |
|
|
685
675
|
|
|
686
|
-
```
|
|
687
|
-
|
|
688
|
-
"generation_id": "gen_7h2p5d9c3m8w1k6q",
|
|
689
|
-
"path": "openapi.yaml"
|
|
690
|
-
}
|
|
676
|
+
```sh
|
|
677
|
+
typeship generations retrieve-file gen_7h2p5d9c3m8w1k6q --path openapi.yaml
|
|
691
678
|
```
|
|
692
679
|
|
|
693
|
-
|
|
680
|
+
Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
|
|
681
|
+
|
|
682
|
+
Read the full command contract with `typeship docs generations retrieve-file --json`.
|
|
694
683
|
|
|
695
684
|
## definitionRevisions
|
|
696
685
|
|
|
697
|
-
### `
|
|
686
|
+
### `typeship definition-revisions list <definition_id> [flags]`
|
|
698
687
|
|
|
699
688
|
List Definition Revisions
|
|
700
689
|
|
|
701
690
|
`GET /definitions/{definition_id}/revisions`
|
|
702
691
|
|
|
703
|
-
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.
|
|
704
|
-
|
|
705
692
|
Safety: **read** · Authentication: **required**
|
|
706
693
|
|
|
707
|
-
|
|
708
|
-
| --- | --- | --- | --- | --- |
|
|
709
|
-
| `definitionId` | path | `DefinitionId` | yes | — |
|
|
710
|
-
| `limit` | query | `number` | no | Maximum number of resources to return. |
|
|
711
|
-
| `cursor` | query | `string` | no | Opaque cursor from the preceding page's next_cursor. Valid only for the same account, operation, filters, and ordering that issued it. |
|
|
712
|
-
|
|
713
|
-
Returns: `PagePromise<DefinitionRevision>` — auto-paginating (`for await` walks every page)
|
|
714
|
-
Errors: `BadRequestError` (400), `UnauthorizedError` (401), `ForbiddenError` (403), `NotFoundError` (404), `RateLimitedError` (429)
|
|
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.
|
|
715
695
|
|
|
716
|
-
|
|
717
|
-
|
|
696
|
+
| Argument or flag | In | Type | Required | Description |
|
|
697
|
+
| --- | --- | --- | --- | --- |
|
|
698
|
+
| `<definition_id>` | path | `string` | yes | — |
|
|
699
|
+
| `--limit` | query | `number` | no | Maximum number of resources to return. Default: 20. |
|
|
700
|
+
| `--cursor` | query | `string` | no | Opaque cursor from the preceding page's next_cursor. Valid only for the same account, operation, filters, and ordering that issued it. |
|
|
718
701
|
|
|
719
|
-
```
|
|
720
|
-
|
|
721
|
-
"definition_id": "def_2p8m4q7k1v9d6h3c"
|
|
722
|
-
}
|
|
702
|
+
```sh
|
|
703
|
+
typeship definition-revisions list def_2p8m4q7k1v9d6h3c
|
|
723
704
|
```
|
|
724
705
|
|
|
725
|
-
|
|
706
|
+
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.
|
|
726
707
|
|
|
727
|
-
|
|
708
|
+
Read the full command contract with `typeship docs definition-revisions list --json`.
|
|
709
|
+
|
|
710
|
+
### `typeship definition-revisions retrieve <definition_revision_id> [flags]`
|
|
728
711
|
|
|
729
712
|
Retrieve a Definition Revision
|
|
730
713
|
|
|
731
714
|
`GET /definition_revisions/{definition_revision_id}`
|
|
732
715
|
|
|
733
|
-
Metadata for one immutable resolved document graph. Fetch its canonical content or individual source documents from the content endpoints.
|
|
734
|
-
|
|
735
716
|
Safety: **read** · Authentication: **required**
|
|
736
717
|
|
|
737
|
-
|
|
738
|
-
| --- | --- | --- | --- | --- |
|
|
739
|
-
| `definitionRevisionId` | path | `DefinitionRevisionId` | yes | — |
|
|
740
|
-
|
|
741
|
-
Returns: `DefinitionRevisionResponse`
|
|
742
|
-
Errors: `UnauthorizedError` (401), `ForbiddenError` (403), `NotFoundError` (404), `RateLimitedError` (429)
|
|
718
|
+
Metadata for one immutable resolved document graph. Fetch its canonical content or individual source documents from the content endpoints.
|
|
743
719
|
|
|
744
|
-
|
|
745
|
-
|
|
720
|
+
| Argument or flag | In | Type | Required | Description |
|
|
721
|
+
| --- | --- | --- | --- | --- |
|
|
722
|
+
| `<definition_revision_id>` | path | `string` | yes | — |
|
|
746
723
|
|
|
747
|
-
```
|
|
748
|
-
|
|
749
|
-
"definition_revision_id": "drev_6m1q8v4k2p9d7h3c"
|
|
750
|
-
}
|
|
724
|
+
```sh
|
|
725
|
+
typeship definition-revisions retrieve drev_6m1q8v4k2p9d7h3c
|
|
751
726
|
```
|
|
752
727
|
|
|
753
|
-
|
|
728
|
+
Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
|
|
754
729
|
|
|
755
|
-
|
|
730
|
+
Read the full command contract with `typeship docs definition-revisions retrieve --json`.
|
|
731
|
+
|
|
732
|
+
### `typeship definition-revisions retrieve-content <definition_revision_id> [flags]`
|
|
756
733
|
|
|
757
734
|
Retrieve a Definition Revision's canonical content
|
|
758
735
|
|
|
759
736
|
`GET /definition_revisions/{definition_revision_id}/content`
|
|
760
737
|
|
|
761
|
-
Returns the exact canonical resolved content identified by the revision's graph digest, suitable for saving or piping into a diff.
|
|
762
|
-
|
|
763
738
|
Safety: **read** · Authentication: **required**
|
|
764
739
|
|
|
765
|
-
|
|
766
|
-
| --- | --- | --- | --- | --- |
|
|
767
|
-
| `definitionRevisionId` | path | `DefinitionRevisionId` | yes | — |
|
|
768
|
-
|
|
769
|
-
Returns: `string`
|
|
770
|
-
Errors: `UnauthorizedError` (401), `ForbiddenError` (403), `NotFoundError` (404), `RateLimitedError` (429)
|
|
740
|
+
Returns the exact canonical resolved content identified by the revision's graph digest, suitable for saving or piping into a diff.
|
|
771
741
|
|
|
772
|
-
|
|
773
|
-
|
|
742
|
+
| Argument or flag | In | Type | Required | Description |
|
|
743
|
+
| --- | --- | --- | --- | --- |
|
|
744
|
+
| `<definition_revision_id>` | path | `string` | yes | — |
|
|
774
745
|
|
|
775
|
-
```
|
|
776
|
-
|
|
777
|
-
"definition_revision_id": "drev_6m1q8v4k2p9d7h3c"
|
|
778
|
-
}
|
|
746
|
+
```sh
|
|
747
|
+
typeship definition-revisions retrieve-content drev_6m1q8v4k2p9d7h3c
|
|
779
748
|
```
|
|
780
749
|
|
|
781
|
-
|
|
750
|
+
Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
|
|
751
|
+
|
|
752
|
+
Read the full command contract with `typeship docs definition-revisions retrieve-content --json`.
|
|
782
753
|
|
|
783
|
-
### `
|
|
754
|
+
### `typeship definition-revisions retrieve-document-content <definition_revision_id> <document_id> [flags]`
|
|
784
755
|
|
|
785
756
|
Retrieve one source document from a Definition Revision
|
|
786
757
|
|
|
@@ -788,104 +759,83 @@ Retrieve one source document from a Definition Revision
|
|
|
788
759
|
|
|
789
760
|
Safety: **read** · Authentication: **required**
|
|
790
761
|
|
|
791
|
-
|
|
|
762
|
+
| Argument or flag | In | Type | Required | Description |
|
|
792
763
|
| --- | --- | --- | --- | --- |
|
|
793
|
-
|
|
|
794
|
-
|
|
|
795
|
-
|
|
796
|
-
Returns: `string`
|
|
797
|
-
Errors: `UnauthorizedError` (401), `ForbiddenError` (403), `NotFoundError` (404), `RateLimitedError` (429)
|
|
798
|
-
|
|
799
|
-
<details>
|
|
800
|
-
<summary>Wire arguments (CLI and MCP)</summary>
|
|
764
|
+
| `<definition_revision_id>` | path | `string` | yes | — |
|
|
765
|
+
| `<document_id>` | path | `string` | yes | — |
|
|
801
766
|
|
|
802
|
-
```
|
|
803
|
-
|
|
804
|
-
"definition_revision_id": "drev_6m1q8v4k2p9d7h3c",
|
|
805
|
-
"document_id": "doc_8q2m5v1k9p4d7h3c"
|
|
806
|
-
}
|
|
767
|
+
```sh
|
|
768
|
+
typeship definition-revisions retrieve-document-content drev_6m1q8v4k2p9d7h3c doc_8q2m5v1k9p4d7h3c
|
|
807
769
|
```
|
|
808
770
|
|
|
809
|
-
|
|
771
|
+
Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
|
|
772
|
+
|
|
773
|
+
Read the full command contract with `typeship docs definition-revisions retrieve-document-content --json`.
|
|
810
774
|
|
|
811
775
|
## account
|
|
812
776
|
|
|
813
|
-
### `
|
|
777
|
+
### `typeship account retrieve [flags]`
|
|
814
778
|
|
|
815
779
|
The account behind the presented credentials
|
|
816
780
|
|
|
817
781
|
`GET /me`
|
|
818
782
|
|
|
819
|
-
Returns the account that owns the presented API key. This is also the
|
|
820
|
-
identity endpoint the generated typeship CLI's `whoami` calls.
|
|
821
|
-
|
|
822
783
|
Safety: **read** · Authentication: **required**
|
|
823
784
|
|
|
824
|
-
Returns
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
<details>
|
|
828
|
-
<summary>Wire arguments (CLI and MCP)</summary>
|
|
785
|
+
Returns the account that owns the presented API key. This is also the
|
|
786
|
+
identity endpoint the generated typeship CLI's `whoami` calls.
|
|
829
787
|
|
|
830
|
-
```
|
|
831
|
-
|
|
788
|
+
```sh
|
|
789
|
+
typeship account retrieve
|
|
832
790
|
```
|
|
833
791
|
|
|
834
|
-
|
|
792
|
+
Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
|
|
793
|
+
|
|
794
|
+
Read the full command contract with `typeship docs account retrieve --json`.
|
|
835
795
|
|
|
836
796
|
## apiKeys
|
|
837
797
|
|
|
838
|
-
### `
|
|
798
|
+
### `typeship api-keys list [flags]`
|
|
839
799
|
|
|
840
800
|
List API keys
|
|
841
801
|
|
|
842
802
|
`GET /api_keys`
|
|
843
803
|
|
|
844
|
-
Keys are never returned in full — only their identity and last four. Creation stays in the console deliberately: a leaked key that can mint more keys is a leaked account.
|
|
845
|
-
|
|
846
804
|
Safety: **read** · Authentication: **required**
|
|
847
805
|
|
|
848
|
-
|
|
849
|
-
| --- | --- | --- | --- | --- |
|
|
850
|
-
| `limit` | query | `number` | no | Maximum number of resources to return. |
|
|
851
|
-
| `cursor` | query | `string` | no | Opaque cursor from the preceding page's next_cursor. Valid only for the same account, operation, filters, and ordering that issued it. |
|
|
852
|
-
|
|
853
|
-
Returns: `PagePromise<ApiKey>` — auto-paginating (`for await` walks every page)
|
|
854
|
-
Errors: `BadRequestError` (400), `UnauthorizedError` (401), `ForbiddenError` (403), `RateLimitedError` (429)
|
|
806
|
+
Keys are never returned in full — only their identity and last four. Creation stays in the console deliberately: a leaked key that can mint more keys is a leaked account.
|
|
855
807
|
|
|
856
|
-
|
|
857
|
-
|
|
808
|
+
| Argument or flag | In | Type | Required | Description |
|
|
809
|
+
| --- | --- | --- | --- | --- |
|
|
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 account, operation, filters, and ordering that issued it. |
|
|
858
812
|
|
|
859
|
-
```
|
|
860
|
-
|
|
813
|
+
```sh
|
|
814
|
+
typeship api-keys list
|
|
861
815
|
```
|
|
862
816
|
|
|
863
|
-
|
|
817
|
+
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.
|
|
818
|
+
|
|
819
|
+
Read the full command contract with `typeship docs api-keys list --json`.
|
|
864
820
|
|
|
865
|
-
### `
|
|
821
|
+
### `typeship api-keys revoke <api_key_id> [flags]`
|
|
866
822
|
|
|
867
823
|
Revoke an API key
|
|
868
824
|
|
|
869
825
|
`DELETE /api_keys/{api_key_id}`
|
|
870
826
|
|
|
871
|
-
Idempotent: revoking an already-revoked key returns the same body, so a rotation script that re-runs does not have to special-case having already succeeded. An OAuth member may revoke a key they created; an organization admin may revoke any key. Organization API keys retain account-wide authority.
|
|
872
|
-
|
|
873
827
|
Safety: **destructive** · Authentication: **required**
|
|
874
828
|
|
|
875
|
-
|
|
876
|
-
| --- | --- | --- | --- | --- |
|
|
877
|
-
| `apiKeyId` | path | `string` | yes | — |
|
|
878
|
-
|
|
879
|
-
Returns: `ApiKeyResponse`
|
|
880
|
-
Errors: `UnauthorizedError` (401), `ForbiddenError` (403), `NotFoundError` (404), `RateLimitedError` (429)
|
|
829
|
+
Idempotent: revoking an already-revoked key returns the same body, so a rotation script that re-runs does not have to special-case having already succeeded. An OAuth member may revoke a key they created; an organization admin may revoke any key. Organization API keys retain account-wide authority.
|
|
881
830
|
|
|
882
|
-
|
|
883
|
-
|
|
831
|
+
| Argument or flag | In | Type | Required | Description |
|
|
832
|
+
| --- | --- | --- | --- | --- |
|
|
833
|
+
| `<api_key_id>` | path | `string` | yes | Accepts an ID or an exact name (resolved via api_keys_list). IDs come from api_keys_list. |
|
|
884
834
|
|
|
885
|
-
```
|
|
886
|
-
|
|
887
|
-
"api_key_id": "api_key_123"
|
|
888
|
-
}
|
|
835
|
+
```sh
|
|
836
|
+
typeship api-keys revoke api_key_123 --force
|
|
889
837
|
```
|
|
890
838
|
|
|
891
|
-
|
|
839
|
+
Output: the response payload as JSON on stdout. A successful response without a body produces `{"ok": true}`.
|
|
840
|
+
|
|
841
|
+
Read the full command contract with `typeship docs api-keys revoke --json`.
|