@typeship-ax/cli 0.20.0 → 0.21.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +3 -3
- package/README.md +2 -2
- package/api.json +7355 -6233
- package/api.md +332 -398
- package/dist/api-identity.d.ts.map +1 -1
- package/dist/api-identity.js +6 -1
- package/dist/cli.js +15 -15
- package/dist/core/http.d.ts +26 -14
- package/dist/core/http.d.ts.map +1 -1
- package/dist/core/http.js +90 -19
- package/dist/core/pagination.d.ts +8 -8
- package/dist/core/pagination.d.ts.map +1 -1
- package/dist/core/pagination.js +7 -16
- package/dist/errors.d.ts +4 -4
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +7 -7
- package/dist/index.d.ts +33 -19
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +37 -17
- package/dist/ops.d.ts +1 -1
- package/dist/ops.d.ts.map +1 -1
- package/dist/ops.js +39 -42
- package/dist/resources/api-keys.d.ts +10 -10
- package/dist/resources/api-keys.d.ts.map +1 -1
- package/dist/resources/api-keys.js +6 -6
- package/dist/resources/deliveries.d.ts +46 -0
- package/dist/resources/deliveries.d.ts.map +1 -0
- package/dist/resources/deliveries.js +70 -0
- package/dist/resources/drafts.d.ts +155 -0
- package/dist/resources/drafts.d.ts.map +1 -0
- package/dist/resources/drafts.js +230 -0
- package/dist/resources/files.d.ts +23 -0
- package/dist/resources/files.d.ts.map +1 -0
- package/dist/resources/files.js +38 -0
- package/dist/resources/generate.d.ts +14 -14
- package/dist/resources/generate.d.ts.map +1 -1
- package/dist/resources/generate.js +7 -7
- package/dist/resources/generations.d.ts +65 -21
- package/dist/resources/generations.d.ts.map +1 -1
- package/dist/resources/generations.js +67 -20
- package/dist/resources/organization.d.ts +18 -0
- package/dist/resources/organization.d.ts.map +1 -0
- package/dist/resources/{account.js → organization.js} +10 -10
- package/dist/resources/projects.d.ts +36 -126
- package/dist/resources/projects.d.ts.map +1 -1
- package/dist/resources/projects.js +21 -171
- package/dist/resources/publications.d.ts +46 -0
- package/dist/resources/publications.d.ts.map +1 -0
- package/dist/resources/publications.js +70 -0
- package/dist/resources/releases.d.ts +66 -0
- package/dist/resources/releases.d.ts.map +1 -0
- package/dist/resources/releases.js +101 -0
- package/dist/resources/spec-revisions.d.ts +85 -0
- package/dist/resources/spec-revisions.d.ts.map +1 -0
- package/dist/resources/spec-revisions.js +116 -0
- package/dist/resources/specs.d.ts +72 -0
- package/dist/resources/specs.d.ts.map +1 -0
- package/dist/resources/specs.js +107 -0
- package/dist/resources/targets.d.ts +42 -262
- package/dist/resources/targets.d.ts.map +1 -1
- package/dist/resources/targets.js +28 -407
- package/dist/schemas.d.ts.map +1 -1
- package/dist/schemas.js +149 -154
- package/dist/types.d.ts +1281 -1611
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +44 -49
- package/package.json +1 -1
- package/src/api-identity.ts +6 -2
- package/src/cli.ts +16 -16
- package/src/core/http.ts +89 -24
- package/src/core/pagination.ts +13 -23
- package/src/errors.ts +7 -7
- package/src/index.ts +41 -23
- package/src/ops.ts +40 -43
- package/src/resources/api-keys.ts +13 -16
- package/src/resources/deliveries.ts +139 -0
- package/src/resources/drafts.ts +422 -0
- package/src/resources/files.ts +68 -0
- package/src/resources/generate.ts +16 -19
- package/src/resources/generations.ts +146 -35
- package/src/resources/{account.ts → organization.ts} +14 -14
- package/src/resources/projects.ts +42 -337
- package/src/resources/publications.ts +139 -0
- package/src/resources/releases.ts +199 -0
- package/src/resources/spec-revisions.ts +237 -0
- package/src/resources/specs.ts +200 -0
- package/src/resources/targets.ts +57 -760
- package/src/schemas.ts +149 -154
- package/src/types.ts +1357 -1692
- package/dist/resources/account.d.ts +0 -18
- package/dist/resources/account.d.ts.map +0 -1
- package/dist/resources/definition-revisions.d.ts +0 -75
- package/dist/resources/definition-revisions.d.ts.map +0 -1
- package/dist/resources/definition-revisions.js +0 -142
- package/dist/resources/definitions.d.ts +0 -50
- package/dist/resources/definitions.d.ts.map +0 -1
- package/dist/resources/definitions.js +0 -73
- package/src/resources/definition-revisions.ts +0 -265
- package/src/resources/definitions.ts +0 -146
package/dist/types.d.ts
CHANGED
|
@@ -2,12 +2,10 @@
|
|
|
2
2
|
export type ProjectId = string;
|
|
3
3
|
/** Unique identifier for a generation. */
|
|
4
4
|
export type GenerationId = string;
|
|
5
|
-
/** Unique identifier for a project's logical API
|
|
6
|
-
export type
|
|
7
|
-
/** Unique identifier for
|
|
8
|
-
export type
|
|
9
|
-
/** Unique identifier for an immutable resolved Definition Revision. */
|
|
10
|
-
export type DefinitionRevisionId = string;
|
|
5
|
+
/** Unique identifier for a project's logical API Spec. */
|
|
6
|
+
export type SpecId = string;
|
|
7
|
+
/** Unique identifier for an immutable resolved Spec Revision. */
|
|
8
|
+
export type SpecRevisionId = string;
|
|
11
9
|
/** Server-generated identifier used to correlate this response with Typeship logs. */
|
|
12
10
|
export type RequestId = string;
|
|
13
11
|
/** Request-level metadata present at the top level of every JSON response. */
|
|
@@ -19,23 +17,25 @@ export type ListObject = "list";
|
|
|
19
17
|
/** Stable identifier for one configured generated product. */
|
|
20
18
|
export type TargetId = string;
|
|
21
19
|
export type DeliveryId = string;
|
|
22
|
-
|
|
20
|
+
/** Unique identifier for a Draft. */
|
|
21
|
+
export type DraftId = string;
|
|
22
|
+
export type ReleaseId = string;
|
|
23
23
|
export type PublicationId = string;
|
|
24
24
|
/**
|
|
25
25
|
* Generator implementation selected by a Target. This is configuration, not identity; several
|
|
26
|
-
* Targets may use the same generator. cli is the TypeScript CLI;
|
|
26
|
+
* Targets may use the same generator. cli is the TypeScript CLI; go_cli is the native Go CLI, a
|
|
27
27
|
* distinct product that imports one exact paired Go SDK module rather than a client of its own.
|
|
28
28
|
*/
|
|
29
29
|
export declare const GeneratorKind: {
|
|
30
|
-
readonly TYPESCRIPT_SDK: "typescript-sdk";
|
|
31
|
-
readonly PYTHON_SDK: "python-sdk";
|
|
32
|
-
readonly GO_SDK: "go-sdk";
|
|
33
30
|
readonly CLI: "cli";
|
|
34
|
-
readonly GO_CLI: "
|
|
31
|
+
readonly GO_CLI: "go_cli";
|
|
35
32
|
readonly MCP: "mcp";
|
|
33
|
+
readonly TYPESCRIPT_SDK: "typescript_sdk";
|
|
34
|
+
readonly PYTHON_SDK: "python_sdk";
|
|
35
|
+
readonly GO_SDK: "go_sdk";
|
|
36
36
|
};
|
|
37
37
|
export type GeneratorKind = (typeof GeneratorKind)[keyof typeof GeneratorKind];
|
|
38
|
-
export interface
|
|
38
|
+
export interface UrlSpecInput {
|
|
39
39
|
/**
|
|
40
40
|
* URL of an OpenAPI document, a GraphQL SDL file, or a GraphQL
|
|
41
41
|
* endpoint (introspected automatically). Fetched server-side.
|
|
@@ -48,8 +48,8 @@ export interface UrlDefinitionInput {
|
|
|
48
48
|
*/
|
|
49
49
|
headers?: Record<string, string>;
|
|
50
50
|
}
|
|
51
|
-
/** Response shape for
|
|
52
|
-
export interface
|
|
51
|
+
/** Response shape for UrlSpecInput. */
|
|
52
|
+
export interface UrlSpecInputRead {
|
|
53
53
|
/**
|
|
54
54
|
* URL of an OpenAPI document, a GraphQL SDL file, or a GraphQL
|
|
55
55
|
* endpoint (introspected automatically). Fetched server-side.
|
|
@@ -57,18 +57,18 @@ export interface UrlDefinitionInputRead {
|
|
|
57
57
|
*/
|
|
58
58
|
url: string;
|
|
59
59
|
}
|
|
60
|
-
export interface
|
|
61
|
-
/** Raw
|
|
60
|
+
export interface InlineSpecInput {
|
|
61
|
+
/** Raw Spec text (OpenAPI JSON/YAML or GraphQL SDL). Up to 10MB. */
|
|
62
62
|
inline: string;
|
|
63
63
|
}
|
|
64
|
-
/** A
|
|
65
|
-
export type
|
|
66
|
-
/** Response shape for
|
|
67
|
-
export type
|
|
64
|
+
/** A Spec for one-shot generation, provided as exactly one URL or inline entrypoint. */
|
|
65
|
+
export type SpecInput = UrlSpecInput | InlineSpecInput;
|
|
66
|
+
/** Response shape for SpecInput. */
|
|
67
|
+
export type SpecInputRead = UrlSpecInputRead | InlineSpecInput;
|
|
68
68
|
/**
|
|
69
|
-
* The exact paired Go SDK a
|
|
70
|
-
*
|
|
71
|
-
*
|
|
69
|
+
* The exact paired Go SDK a go_cli generation is built on. Required when target.type is go_cli and
|
|
70
|
+
* rejected otherwise. The descriptor is closed and immutable, because a CLI that pins a range or a
|
|
71
|
+
* branch pins nothing.
|
|
72
72
|
*/
|
|
73
73
|
export interface GoSdkDescriptor {
|
|
74
74
|
/**
|
|
@@ -83,15 +83,10 @@ export interface GoSdkDescriptor {
|
|
|
83
83
|
*/
|
|
84
84
|
version: string;
|
|
85
85
|
/**
|
|
86
|
-
* SHA-256 hex digest of the
|
|
87
|
-
*
|
|
86
|
+
* SHA-256 hex digest of the Spec the SDK was generated from. Must match the resolved Spec, or the
|
|
87
|
+
* request fails with spec_error.
|
|
88
88
|
*/
|
|
89
|
-
|
|
90
|
-
/**
|
|
91
|
-
* The generator edition the SDK was generated with. Only the current edition, 2026-08-24, is
|
|
92
|
-
* accepted.
|
|
93
|
-
*/
|
|
94
|
-
edition: string;
|
|
89
|
+
spec_digest: string;
|
|
95
90
|
/**
|
|
96
91
|
* Go package identifier of the SDK, when the module path's last element does not imply it.
|
|
97
92
|
* Optional.
|
|
@@ -99,10 +94,10 @@ export interface GoSdkDescriptor {
|
|
|
99
94
|
package_name?: string;
|
|
100
95
|
}
|
|
101
96
|
export interface GenerateRequest {
|
|
102
|
-
|
|
97
|
+
spec: SpecInput;
|
|
103
98
|
/** One-shot generator descriptor; no persisted Target is created. */
|
|
104
99
|
target: {
|
|
105
|
-
|
|
100
|
+
type: GeneratorKind;
|
|
106
101
|
};
|
|
107
102
|
/**
|
|
108
103
|
* npm package or Python distribution override. Valid only for the TypeScript and Python SDK
|
|
@@ -111,7 +106,7 @@ export interface GenerateRequest {
|
|
|
111
106
|
package_name?: string;
|
|
112
107
|
/**
|
|
113
108
|
* Go module path override for the generated artifact's own module. Valid only for the Go SDK and
|
|
114
|
-
* Go CLI
|
|
109
|
+
* Go CLI Targets. Projects derive this from the Go destination repository by default.
|
|
115
110
|
*/
|
|
116
111
|
module_path?: string;
|
|
117
112
|
go_sdk?: GoSdkDescriptor;
|
|
@@ -119,10 +114,10 @@ export interface GenerateRequest {
|
|
|
119
114
|
}
|
|
120
115
|
/** Response shape for GenerateRequest. */
|
|
121
116
|
export interface GenerateRequestRead {
|
|
122
|
-
|
|
117
|
+
spec: SpecInputRead;
|
|
123
118
|
/** One-shot generator descriptor; no persisted Target is created. */
|
|
124
119
|
target: {
|
|
125
|
-
|
|
120
|
+
type: GeneratorKind | (string & {});
|
|
126
121
|
};
|
|
127
122
|
/**
|
|
128
123
|
* npm package or Python distribution override. Valid only for the TypeScript and Python SDK
|
|
@@ -131,7 +126,7 @@ export interface GenerateRequestRead {
|
|
|
131
126
|
package_name?: string;
|
|
132
127
|
/**
|
|
133
128
|
* Go module path override for the generated artifact's own module. Valid only for the Go SDK and
|
|
134
|
-
* Go CLI
|
|
129
|
+
* Go CLI Targets. Projects derive this from the Go destination repository by default.
|
|
135
130
|
*/
|
|
136
131
|
module_path?: string;
|
|
137
132
|
go_sdk?: GoSdkDescriptor;
|
|
@@ -158,213 +153,173 @@ export interface GeneratedFileRead {
|
|
|
158
153
|
*/
|
|
159
154
|
mode?: ("100644" | "100755") | (string & {});
|
|
160
155
|
}
|
|
161
|
-
export interface
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
/** Detected OpenAPI version, "2.0", "3.0", or "3.1". */
|
|
169
|
-
oas_version: string;
|
|
170
|
-
/** True when the input was Swagger 2.0 and was converted. */
|
|
171
|
-
converted?: boolean;
|
|
172
|
-
/** Ecosystem-neutral identity of the generated artifact. */
|
|
173
|
-
artifact_name: string;
|
|
174
|
-
client_name: string;
|
|
175
|
-
/**
|
|
176
|
-
* Generator implementations present in this artifact. Persisted Target identity is reported on
|
|
177
|
-
* Generation.
|
|
178
|
-
*/
|
|
179
|
-
generators: GeneratorKind[];
|
|
180
|
-
/**
|
|
181
|
-
* Present for go-cli generations only. Names the exact paired Go SDK module and version the CLI
|
|
182
|
-
* was generated against, as its go.mod requires it.
|
|
183
|
-
*/
|
|
184
|
-
go_sdk?: {
|
|
185
|
-
/** Go module path of the SDK the Go CLI imports and pins. */
|
|
186
|
-
module_path: string;
|
|
187
|
-
/** Exact SDK module version the Go CLI requires, v-prefixed SemVer or a Go pseudo-version. */
|
|
188
|
-
version: string;
|
|
189
|
-
/** Go package identifier of the SDK, when the module path does not imply it. */
|
|
190
|
-
package_name?: string;
|
|
191
|
-
};
|
|
192
|
-
resource_count?: number;
|
|
193
|
-
operation_count?: number;
|
|
194
|
-
schema_count?: number;
|
|
195
|
-
paginated_operation_count?: number;
|
|
196
|
-
/** Operations beyond the plan's endpoint allowance, not generated. */
|
|
197
|
-
omitted_operation_count?: number;
|
|
198
|
-
/** METHOD/path identities of operations omitted by the generation cap. */
|
|
199
|
-
omitted_operations?: string[];
|
|
200
|
-
/** Pull request opened by this regeneration, when one was. */
|
|
201
|
-
pr_url?: string | null;
|
|
202
|
-
pr_number?: number | null;
|
|
203
|
-
/**
|
|
204
|
-
* Whether a destination pull request opened, was unnecessary because the generated tree already
|
|
205
|
-
* matched, or could not be opened.
|
|
206
|
-
*/
|
|
207
|
-
pr_status?: "opened" | "no_changes" | "blocked";
|
|
208
|
-
/**
|
|
209
|
-
* Markdown changelog entry for this regeneration, from the API surface diff. Absent on a first
|
|
210
|
-
* generation or when nothing changed.
|
|
211
|
-
*/
|
|
212
|
-
changelog?: string;
|
|
213
|
-
/**
|
|
214
|
-
* Breaking changes in the diff; removed methods and fields, changed types, inputs that became
|
|
215
|
-
* required.
|
|
216
|
-
*/
|
|
217
|
-
breaking_count?: number;
|
|
218
|
-
/**
|
|
219
|
-
* What the diff was measured against. destination uses the accepted repository state;
|
|
220
|
-
* last-generation uses the previous successful Generation; none means no baseline was available.
|
|
221
|
-
*/
|
|
222
|
-
baseline?: "destination" | "last-generation" | "none";
|
|
223
|
-
/** Objective compatibility of the generated API surface against the merged destination baseline. */
|
|
224
|
-
api_compatibility?: "compatible" | "breaking" | "unknown";
|
|
225
|
-
/**
|
|
226
|
-
* Objective compatibility of public package entry points and selected targets against the merged
|
|
227
|
-
* destination baseline.
|
|
228
|
-
*/
|
|
229
|
-
package_compatibility?: "compatible" | "breaking" | "unknown";
|
|
230
|
-
/**
|
|
231
|
-
* Whether the generated package version satisfies the cumulative change. Null when there is no
|
|
232
|
-
* prior version or analysis is unavailable.
|
|
233
|
-
*/
|
|
234
|
-
version_correct?: boolean | null;
|
|
235
|
-
/**
|
|
236
|
-
* The destination pull request's combined readiness decision for the exact bot-generated head.
|
|
237
|
-
* Compatibility and version correctness remain separate fields above.
|
|
238
|
-
*/
|
|
239
|
-
release_readiness?: "success" | "failure" | "pending" | "error";
|
|
240
|
-
/** The release-readiness decision in one line, as the commit status describes it. */
|
|
241
|
-
release_readiness_note?: string;
|
|
242
|
-
/** The package version the destination had before this regeneration. */
|
|
243
|
-
previous_version?: string;
|
|
244
|
-
/** Files changed by the customer relative to the accepted combined baseline. */
|
|
245
|
-
customer_change_count?: number;
|
|
246
|
-
integration_state?: "conflicted" | "checking" | "checks_failed" | "ready" | "accepted" | "outdated";
|
|
247
|
-
/** Separate compatibility result against the last published artifact. */
|
|
248
|
-
published_compatibility?: "compatible" | "breaking" | "unknown" | "not_applicable";
|
|
249
|
-
/** Version of the last published artifact used by published_compatibility. */
|
|
250
|
-
published_version?: string;
|
|
251
|
-
file_count?: number;
|
|
252
|
-
total_lines?: number;
|
|
253
|
-
/** Deterministic Diagnostic summary for the exact Definition Revision consumed. */
|
|
254
|
-
diagnostics?: {
|
|
255
|
-
format: "openapi" | "graphql";
|
|
256
|
-
summary: DiagnosticSummary;
|
|
257
|
-
};
|
|
156
|
+
export interface GenerationWarning {
|
|
157
|
+
/** Stable machine-readable warning code. */
|
|
158
|
+
code: string;
|
|
159
|
+
/** Human-readable explanation. */
|
|
160
|
+
message: string;
|
|
161
|
+
/** METHOD/path of the affected operation, when applicable. */
|
|
162
|
+
operation?: string;
|
|
258
163
|
}
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
/**
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
/**
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
/**
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
*
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
/**
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
*
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
164
|
+
export interface GenerationCoverage {
|
|
165
|
+
generated: number;
|
|
166
|
+
omitted: number;
|
|
167
|
+
total: number;
|
|
168
|
+
/** METHOD/path identities of operations omitted from the package. */
|
|
169
|
+
omitted_operations: string[];
|
|
170
|
+
/** Present when a plan or anonymous limit omitted operations. */
|
|
171
|
+
reason?: "anonymous" | "free_plan";
|
|
172
|
+
/**
|
|
173
|
+
* Sign-up link for anonymous capped runs.
|
|
174
|
+
* Format: uri
|
|
175
|
+
*/
|
|
176
|
+
signup_url?: string;
|
|
177
|
+
/**
|
|
178
|
+
* Upgrade link for capped signed-in runs.
|
|
179
|
+
* Format: uri
|
|
180
|
+
*/
|
|
181
|
+
upgrade_url?: string;
|
|
182
|
+
}
|
|
183
|
+
/** Response shape for GenerationCoverage. */
|
|
184
|
+
export interface GenerationCoverageRead {
|
|
185
|
+
generated: number;
|
|
186
|
+
omitted: number;
|
|
187
|
+
total: number;
|
|
188
|
+
/** METHOD/path identities of operations omitted from the package. */
|
|
189
|
+
omitted_operations: string[];
|
|
190
|
+
/** Present when a plan or anonymous limit omitted operations. */
|
|
191
|
+
reason?: ("anonymous" | "free_plan") | (string & {});
|
|
192
|
+
/**
|
|
193
|
+
* Sign-up link for anonymous capped runs.
|
|
194
|
+
* Format: uri
|
|
195
|
+
*/
|
|
196
|
+
signup_url?: string;
|
|
197
|
+
/**
|
|
198
|
+
* Upgrade link for capped signed-in runs.
|
|
199
|
+
* Format: uri
|
|
200
|
+
*/
|
|
201
|
+
upgrade_url?: string;
|
|
202
|
+
}
|
|
203
|
+
/**
|
|
204
|
+
* Unique identifier for one immutable file snapshot. An ID always returns the same bytes: a Spec
|
|
205
|
+
* Revision, a Generation, and each Draft side name their own file IDs, and a new Draft commit gets
|
|
206
|
+
* new IDs.
|
|
207
|
+
*/
|
|
208
|
+
export type FileId = string;
|
|
209
|
+
export interface FileModel {
|
|
210
|
+
id: FileId;
|
|
211
|
+
object: "file";
|
|
212
|
+
/** Path within the Spec Revision, Generation package, or Target package. */
|
|
213
|
+
path: string;
|
|
214
|
+
size_bytes: number;
|
|
215
|
+
/** Digest of the complete file. */
|
|
216
|
+
sha256: string;
|
|
217
|
+
/** utf8: content is text. base64: content is base64-encoded binary bytes. */
|
|
218
|
+
encoding: "utf8" | "base64";
|
|
219
|
+
/** Git file mode for package files; null for Spec source files. */
|
|
220
|
+
mode: GitFileMode | null;
|
|
221
|
+
/**
|
|
222
|
+
* When Typeship first issued this file ID.
|
|
223
|
+
* Format: date-time
|
|
224
|
+
*/
|
|
225
|
+
created_at: string;
|
|
226
|
+
}
|
|
227
|
+
/** Response shape for FileModel. */
|
|
228
|
+
export interface FileModelRead {
|
|
229
|
+
id: FileId;
|
|
230
|
+
object: "file" | (string & {});
|
|
231
|
+
/** Path within the Spec Revision, Generation package, or Target package. */
|
|
232
|
+
path: string;
|
|
233
|
+
size_bytes: number;
|
|
234
|
+
/** Digest of the complete file. */
|
|
235
|
+
sha256: string;
|
|
236
|
+
/** utf8: content is text. base64: content is base64-encoded binary bytes. */
|
|
237
|
+
encoding: ("utf8" | "base64") | (string & {});
|
|
238
|
+
/** Git file mode for package files; null for Spec source files. */
|
|
239
|
+
mode: GitFileMode | (string & {}) | null;
|
|
240
|
+
/**
|
|
241
|
+
* When Typeship first issued this file ID.
|
|
242
|
+
* Format: date-time
|
|
243
|
+
*/
|
|
244
|
+
created_at: string;
|
|
245
|
+
}
|
|
246
|
+
export type FileResponse = FileModel & {
|
|
247
|
+
/**
|
|
248
|
+
* At most 24 KiB of the file starting at offset, encoded as encoding says. Text chunks never
|
|
249
|
+
* split a character; concatenate chunks in order.
|
|
250
|
+
*/
|
|
251
|
+
content: string;
|
|
252
|
+
/** Byte offset of this chunk in the file. */
|
|
253
|
+
offset: number;
|
|
254
|
+
/** Pass as cursor to read the next chunk; null at the end of the file. */
|
|
255
|
+
next_cursor: string | null;
|
|
256
|
+
} & ResponseMetadata;
|
|
257
|
+
/** Response shape for FileResponse. */
|
|
258
|
+
export type FileResponseRead = FileModelRead & {
|
|
259
|
+
/**
|
|
260
|
+
* At most 24 KiB of the file starting at offset, encoded as encoding says. Text chunks never
|
|
261
|
+
* split a character; concatenate chunks in order.
|
|
262
|
+
*/
|
|
263
|
+
content: string;
|
|
264
|
+
/** Byte offset of this chunk in the file. */
|
|
265
|
+
offset: number;
|
|
266
|
+
/** Pass as cursor to read the next chunk; null at the end of the file. */
|
|
267
|
+
next_cursor: string | null;
|
|
268
|
+
} & ResponseMetadata;
|
|
269
|
+
export interface FileList {
|
|
270
|
+
object: ListObject;
|
|
271
|
+
data: FileModel[];
|
|
272
|
+
has_more: boolean;
|
|
273
|
+
next_cursor: string | null;
|
|
274
|
+
request_id: RequestId;
|
|
275
|
+
}
|
|
276
|
+
/** Response shape for FileList. */
|
|
277
|
+
export interface FileListRead {
|
|
278
|
+
object: ListObject;
|
|
279
|
+
data: FileModelRead[];
|
|
280
|
+
has_more: boolean;
|
|
281
|
+
next_cursor: string | null;
|
|
282
|
+
request_id: RequestId;
|
|
283
|
+
}
|
|
284
|
+
export type SpecRevisionFile = FileModel & {
|
|
285
|
+
/**
|
|
286
|
+
* entrypoint and reference: captured source files. resolved: the single normalized document
|
|
287
|
+
* Typeship generated from.
|
|
288
|
+
*/
|
|
289
|
+
role: "entrypoint" | "reference" | "resolved";
|
|
290
|
+
};
|
|
291
|
+
/** Response shape for SpecRevisionFile. */
|
|
292
|
+
export type SpecRevisionFileRead = FileModelRead & {
|
|
293
|
+
/**
|
|
294
|
+
* entrypoint and reference: captured source files. resolved: the single normalized document
|
|
295
|
+
* Typeship generated from.
|
|
296
|
+
*/
|
|
297
|
+
role: ("entrypoint" | "reference" | "resolved") | (string & {});
|
|
298
|
+
};
|
|
299
|
+
export interface SpecRevisionFileList {
|
|
300
|
+
object: ListObject;
|
|
301
|
+
data: SpecRevisionFile[];
|
|
302
|
+
has_more: boolean;
|
|
303
|
+
next_cursor: string | null;
|
|
304
|
+
request_id: RequestId;
|
|
305
|
+
}
|
|
306
|
+
/** Response shape for SpecRevisionFileList. */
|
|
307
|
+
export interface SpecRevisionFileListRead {
|
|
308
|
+
object: ListObject;
|
|
309
|
+
data: SpecRevisionFileRead[];
|
|
310
|
+
has_more: boolean;
|
|
311
|
+
next_cursor: string | null;
|
|
312
|
+
request_id: RequestId;
|
|
357
313
|
}
|
|
358
314
|
export interface GenerationResult {
|
|
359
315
|
files: GeneratedFile[];
|
|
360
316
|
download?: GenerationDownload;
|
|
361
|
-
warnings:
|
|
362
|
-
|
|
363
|
-
limits?: GenerationLimits;
|
|
317
|
+
warnings: GenerationWarning[];
|
|
318
|
+
coverage: GenerationCoverage;
|
|
364
319
|
/**
|
|
365
320
|
* Anonymous, URL-sourced generations only. A link a signed-in person can open to turn this run
|
|
366
|
-
* into a project in their organization (same
|
|
367
|
-
*
|
|
321
|
+
* into a project in their organization (same Spec, Target, and config). Lasts seven days. Null
|
|
322
|
+
* for inline Specs; absent on keyed calls.
|
|
368
323
|
*/
|
|
369
324
|
claim?: null | {
|
|
370
325
|
url: string;
|
|
@@ -377,13 +332,12 @@ export interface GenerationResult {
|
|
|
377
332
|
export interface GenerationResultRead {
|
|
378
333
|
files: GeneratedFileRead[];
|
|
379
334
|
download?: GenerationDownload;
|
|
380
|
-
warnings:
|
|
381
|
-
|
|
382
|
-
limits?: GenerationLimitsRead;
|
|
335
|
+
warnings: GenerationWarning[];
|
|
336
|
+
coverage: GenerationCoverageRead;
|
|
383
337
|
/**
|
|
384
338
|
* Anonymous, URL-sourced generations only. A link a signed-in person can open to turn this run
|
|
385
|
-
* into a project in their organization (same
|
|
386
|
-
*
|
|
339
|
+
* into a project in their organization (same Spec, Target, and config). Lasts seven days. Null
|
|
340
|
+
* for inline Specs; absent on keyed calls.
|
|
387
341
|
*/
|
|
388
342
|
claim?: null | {
|
|
389
343
|
url: string;
|
|
@@ -408,43 +362,7 @@ export interface GenerationDownload {
|
|
|
408
362
|
size_bytes: number;
|
|
409
363
|
file_count: number;
|
|
410
364
|
}
|
|
411
|
-
|
|
412
|
-
* Present when the generation was capped: by the free plan, or because the call was anonymous.
|
|
413
|
-
* Absent on uncapped generations.
|
|
414
|
-
*/
|
|
415
|
-
export interface GenerationLimits {
|
|
416
|
-
/** How many operations this generation was allowed to include. */
|
|
417
|
-
max_operations: number;
|
|
418
|
-
/** How many operations are present in the generated package. */
|
|
419
|
-
generated_operations: number;
|
|
420
|
-
/** How many operations in the Definition were left out. */
|
|
421
|
-
omitted_operations: number;
|
|
422
|
-
/** How many operations Typeship found in the complete Definition. */
|
|
423
|
-
total_operations: number;
|
|
424
|
-
reason: "anonymous" | "free_plan";
|
|
425
|
-
/** Anonymous calls only. Where to create an account. */
|
|
426
|
-
signup_url?: string;
|
|
427
|
-
/** Where the cap is lifted. */
|
|
428
|
-
upgrade_url: string;
|
|
429
|
-
}
|
|
430
|
-
/** Response shape for GenerationLimits. */
|
|
431
|
-
export interface GenerationLimitsRead {
|
|
432
|
-
/** How many operations this generation was allowed to include. */
|
|
433
|
-
max_operations: number;
|
|
434
|
-
/** How many operations are present in the generated package. */
|
|
435
|
-
generated_operations: number;
|
|
436
|
-
/** How many operations in the Definition were left out. */
|
|
437
|
-
omitted_operations: number;
|
|
438
|
-
/** How many operations Typeship found in the complete Definition. */
|
|
439
|
-
total_operations: number;
|
|
440
|
-
reason: ("anonymous" | "free_plan") | (string & {});
|
|
441
|
-
/** Anonymous calls only. Where to create an account. */
|
|
442
|
-
signup_url?: string;
|
|
443
|
-
/** Where the cap is lifted. */
|
|
444
|
-
upgrade_url: string;
|
|
445
|
-
}
|
|
446
|
-
export interface UrlDefinitionSource {
|
|
447
|
-
kind: "url";
|
|
365
|
+
export interface UrlSpecSourceSettings {
|
|
448
366
|
/**
|
|
449
367
|
* URL fetched for every generation.
|
|
450
368
|
* Format: uri
|
|
@@ -453,62 +371,75 @@ export interface UrlDefinitionSource {
|
|
|
453
371
|
/** Whether Typeship has stored write-only request headers for this URL. */
|
|
454
372
|
headers_configured: boolean;
|
|
455
373
|
}
|
|
456
|
-
/** Request shape for
|
|
457
|
-
export interface
|
|
458
|
-
kind: "url";
|
|
374
|
+
/** Request shape for UrlSpecSourceSettings. */
|
|
375
|
+
export interface UrlSpecSourceSettingsWrite {
|
|
459
376
|
/**
|
|
460
377
|
* URL fetched for every generation.
|
|
461
378
|
* Format: uri
|
|
462
379
|
*/
|
|
463
380
|
url: string;
|
|
464
381
|
}
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
/**
|
|
469
|
-
* URL fetched for every generation.
|
|
470
|
-
* Format: uri
|
|
471
|
-
*/
|
|
472
|
-
url: string;
|
|
473
|
-
/** Whether Typeship has stored write-only request headers for this URL. */
|
|
474
|
-
headers_configured: boolean;
|
|
382
|
+
export interface UrlSpecSource {
|
|
383
|
+
type: "url";
|
|
384
|
+
url: UrlSpecSourceSettings;
|
|
475
385
|
}
|
|
386
|
+
/** Request shape for UrlSpecSource. */
|
|
387
|
+
export interface UrlSpecSourceWrite {
|
|
388
|
+
type: "url";
|
|
389
|
+
url: UrlSpecSourceSettingsWrite;
|
|
390
|
+
}
|
|
391
|
+
/** Response shape for UrlSpecSource. */
|
|
392
|
+
export interface UrlSpecSourceRead {
|
|
393
|
+
type: "url" | (string & {});
|
|
394
|
+
url: UrlSpecSourceSettings;
|
|
395
|
+
}
|
|
396
|
+
/** GitHub is the only launch provider; the field is stable for future adapters. */
|
|
397
|
+
export declare const RepositoryProvider: {
|
|
398
|
+
readonly GITHUB: "github";
|
|
399
|
+
};
|
|
400
|
+
export type RepositoryProvider = (typeof RepositoryProvider)[keyof typeof RepositoryProvider];
|
|
401
|
+
/** Provider-native repository identity, opaque outside its adapter. */
|
|
402
|
+
export type RepositoryIdentifier = string;
|
|
476
403
|
export interface RepositoryReference {
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
/** Provider-native repository identity, opaque outside its adapter. */
|
|
480
|
-
identifier: string;
|
|
404
|
+
provider: RepositoryProvider;
|
|
405
|
+
identifier: RepositoryIdentifier;
|
|
481
406
|
}
|
|
482
407
|
/** Response shape for RepositoryReference. */
|
|
483
408
|
export interface RepositoryReferenceRead {
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
repository: RepositoryReferenceResponse;
|
|
492
|
-
/** Repository-relative Definition entrypoint. */
|
|
409
|
+
provider: RepositoryProvider | (string & {});
|
|
410
|
+
identifier: RepositoryIdentifier;
|
|
411
|
+
}
|
|
412
|
+
export interface RepositorySpecSourceSettings {
|
|
413
|
+
provider: RepositoryProvider;
|
|
414
|
+
identifier: RepositoryIdentifier;
|
|
415
|
+
/** Repository-relative Spec entrypoint. */
|
|
493
416
|
path: string;
|
|
494
417
|
}
|
|
495
|
-
/** Response shape for
|
|
496
|
-
export interface
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
/** Repository-relative
|
|
418
|
+
/** Response shape for RepositorySpecSourceSettings. */
|
|
419
|
+
export interface RepositorySpecSourceSettingsRead {
|
|
420
|
+
provider: RepositoryProvider | (string & {});
|
|
421
|
+
identifier: RepositoryIdentifier;
|
|
422
|
+
/** Repository-relative Spec entrypoint. */
|
|
500
423
|
path: string;
|
|
501
424
|
}
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
/** Response shape for
|
|
507
|
-
export
|
|
508
|
-
|
|
425
|
+
export interface RepositorySpecSource {
|
|
426
|
+
type: "repository";
|
|
427
|
+
repository: RepositorySpecSourceSettings;
|
|
428
|
+
}
|
|
429
|
+
/** Response shape for RepositorySpecSource. */
|
|
430
|
+
export interface RepositorySpecSourceRead {
|
|
431
|
+
type: "repository" | (string & {});
|
|
432
|
+
repository: RepositorySpecSourceSettingsRead;
|
|
433
|
+
}
|
|
434
|
+
/** The single source of truth for where a Project's Spec lives. */
|
|
435
|
+
export type SpecSource = UrlSpecSource | RepositorySpecSource;
|
|
436
|
+
/** Request shape for SpecSource. */
|
|
437
|
+
export type SpecSourceWrite = UrlSpecSourceWrite | RepositorySpecSource;
|
|
438
|
+
/** Response shape for SpecSource. */
|
|
439
|
+
export type SpecSourceRead = UrlSpecSourceRead | RepositorySpecSourceRead | Record<string, unknown> & {
|
|
440
|
+
type?: string;
|
|
509
441
|
};
|
|
510
|
-
export interface
|
|
511
|
-
kind: "url";
|
|
442
|
+
export interface UrlSpecSourceSettingsInput {
|
|
512
443
|
/**
|
|
513
444
|
* URL of an OpenAPI document, GraphQL SDL file, or GraphQL endpoint.
|
|
514
445
|
* Format: uri
|
|
@@ -522,39 +453,56 @@ export interface UrlDefinitionSourceInput {
|
|
|
522
453
|
*/
|
|
523
454
|
headers?: Record<string, string> | null;
|
|
524
455
|
}
|
|
525
|
-
/** Response shape for
|
|
526
|
-
export interface
|
|
527
|
-
kind: "url" | (string & {});
|
|
456
|
+
/** Response shape for UrlSpecSourceSettingsInput. */
|
|
457
|
+
export interface UrlSpecSourceSettingsInputRead {
|
|
528
458
|
/**
|
|
529
459
|
* URL of an OpenAPI document, GraphQL SDL file, or GraphQL endpoint.
|
|
530
460
|
* Format: uri
|
|
531
461
|
*/
|
|
532
462
|
url: string;
|
|
533
463
|
}
|
|
534
|
-
export interface
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
464
|
+
export interface UrlSpecSourceInput {
|
|
465
|
+
type: "url";
|
|
466
|
+
url: UrlSpecSourceSettingsInput;
|
|
467
|
+
}
|
|
468
|
+
/** Response shape for UrlSpecSourceInput. */
|
|
469
|
+
export interface UrlSpecSourceInputRead {
|
|
470
|
+
type: "url" | (string & {});
|
|
471
|
+
url: UrlSpecSourceSettingsInputRead;
|
|
472
|
+
}
|
|
473
|
+
export interface RepositorySpecSourceSettingsInput {
|
|
474
|
+
provider: RepositoryProvider;
|
|
475
|
+
identifier: RepositoryIdentifier;
|
|
476
|
+
/** Repository-relative Spec entrypoint. */
|
|
538
477
|
path: string;
|
|
539
478
|
}
|
|
540
|
-
/** Response shape for
|
|
541
|
-
export interface
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
/** Repository-relative
|
|
479
|
+
/** Response shape for RepositorySpecSourceSettingsInput. */
|
|
480
|
+
export interface RepositorySpecSourceSettingsInputRead {
|
|
481
|
+
provider: RepositoryProvider | (string & {});
|
|
482
|
+
identifier: RepositoryIdentifier;
|
|
483
|
+
/** Repository-relative Spec entrypoint. */
|
|
545
484
|
path: string;
|
|
546
485
|
}
|
|
547
|
-
export
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
486
|
+
export interface RepositorySpecSourceInput {
|
|
487
|
+
type: "repository";
|
|
488
|
+
repository: RepositorySpecSourceSettingsInput;
|
|
489
|
+
}
|
|
490
|
+
/** Response shape for RepositorySpecSourceInput. */
|
|
491
|
+
export interface RepositorySpecSourceInputRead {
|
|
492
|
+
type: "repository" | (string & {});
|
|
493
|
+
repository: RepositorySpecSourceSettingsInputRead;
|
|
494
|
+
}
|
|
495
|
+
export type SpecSourceInput = UrlSpecSourceInput | RepositorySpecSourceInput;
|
|
496
|
+
/** Response shape for SpecSourceInput. */
|
|
497
|
+
export type SpecSourceInputRead = UrlSpecSourceInputRead | RepositorySpecSourceInputRead | Record<string, unknown> & {
|
|
498
|
+
type?: string;
|
|
551
499
|
};
|
|
552
500
|
/**
|
|
553
|
-
* A fix applied to the resolved
|
|
501
|
+
* A fix applied to the resolved Spec before generation. Paths are JSON
|
|
554
502
|
* Pointers into the document. A patch whose target no longer exists is
|
|
555
503
|
* skipped and reported as a warning on the generation, never silently.
|
|
556
504
|
*/
|
|
557
|
-
export interface
|
|
505
|
+
export interface SpecPatch {
|
|
558
506
|
op: "set" | "append" | "remove" | "rename";
|
|
559
507
|
/**
|
|
560
508
|
* JSON-Pointer-style path. Pattern segments enable bulk fixes:
|
|
@@ -569,8 +517,8 @@ export interface DefinitionPatch {
|
|
|
569
517
|
to?: string | null;
|
|
570
518
|
reason?: string | null;
|
|
571
519
|
}
|
|
572
|
-
/** Response shape for
|
|
573
|
-
export interface
|
|
520
|
+
/** Response shape for SpecPatch. */
|
|
521
|
+
export interface SpecPatchRead {
|
|
574
522
|
op: ("set" | "append" | "remove" | "rename") | (string & {});
|
|
575
523
|
/**
|
|
576
524
|
* JSON-Pointer-style path. Pattern segments enable bulk fixes:
|
|
@@ -587,8 +535,10 @@ export interface DefinitionPatchRead {
|
|
|
587
535
|
}
|
|
588
536
|
/** One exact place where a Diagnostic rule found evidence. */
|
|
589
537
|
export interface DiagnosticLocation {
|
|
590
|
-
/** Source
|
|
591
|
-
|
|
538
|
+
/** Source file path from the Spec Revision when the finding maps to a captured file. */
|
|
539
|
+
file_path?: string;
|
|
540
|
+
/** The captured source file, present with file_path. Read it with getFile. */
|
|
541
|
+
file_id?: FileId;
|
|
592
542
|
/** JSON Pointer for OpenAPI, or schema coordinate for GraphQL. */
|
|
593
543
|
path: string;
|
|
594
544
|
/** Human-readable operation coordinate when the location belongs to an operation. */
|
|
@@ -604,9 +554,9 @@ export interface DiagnosticFix {
|
|
|
604
554
|
* spec_patch is an exact OpenAPI edit Typeship can derive; source_edit requires author intent or
|
|
605
555
|
* a lossless GraphQL source edit.
|
|
606
556
|
*/
|
|
607
|
-
|
|
608
|
-
/** Exact patches when
|
|
609
|
-
patches?:
|
|
557
|
+
type: "spec_patch" | "source_edit";
|
|
558
|
+
/** Exact patches when type is spec_patch. */
|
|
559
|
+
patches?: SpecPatchResponse[];
|
|
610
560
|
/** Source-level guidance when an exact patch would invent intent. */
|
|
611
561
|
instructions?: string;
|
|
612
562
|
}
|
|
@@ -618,37 +568,42 @@ export interface DiagnosticFixRead {
|
|
|
618
568
|
* spec_patch is an exact OpenAPI edit Typeship can derive; source_edit requires author intent or
|
|
619
569
|
* a lossless GraphQL source edit.
|
|
620
570
|
*/
|
|
621
|
-
|
|
622
|
-
/** Exact patches when
|
|
623
|
-
patches?:
|
|
571
|
+
type: ("spec_patch" | "source_edit") | (string & {});
|
|
572
|
+
/** Exact patches when type is spec_patch. */
|
|
573
|
+
patches?: SpecPatchResponseRead[];
|
|
624
574
|
/** Source-level guidance when an exact patch would invent intent. */
|
|
625
575
|
instructions?: string;
|
|
626
576
|
}
|
|
627
|
-
/**
|
|
577
|
+
/**
|
|
578
|
+
* Every occurrence of one Diagnostic rule in a Spec Revision, grouped into one decision.
|
|
579
|
+
* Diagnostics are evaluated when read, using the Spec's current patches and Diagnostic policy.
|
|
580
|
+
*/
|
|
628
581
|
export interface Diagnostic {
|
|
629
|
-
/** Stable rule identifier
|
|
582
|
+
/** Stable rule identifier, unique within a Spec Revision. Suppressions name it as rule_id. */
|
|
630
583
|
id: string;
|
|
584
|
+
object: "diagnostic";
|
|
585
|
+
/**
|
|
586
|
+
* Whether this Diagnostic fails the Spec's Diagnostic policy. Suppressed occurrences and, when
|
|
587
|
+
* only_new is set, occurrences present in the baseline never block.
|
|
588
|
+
*/
|
|
589
|
+
blocking: boolean;
|
|
590
|
+
/**
|
|
591
|
+
* Whether any occurrence is new since baseline_spec_revision_id in the Diagnostic summary. Always
|
|
592
|
+
* true when there is no baseline.
|
|
593
|
+
*/
|
|
594
|
+
introduced: boolean;
|
|
631
595
|
/** Whether the rule reports invalid behavior, material risk, or an improvement. */
|
|
632
596
|
severity: "error" | "warning" | "suggestion";
|
|
633
597
|
/** Product dimension affected by the diagnostic. */
|
|
634
598
|
category: "correctness" | "sdk_ergonomics" | "agent_usability" | "safety";
|
|
635
599
|
/** Concise statement of the root cause. */
|
|
636
600
|
title: string;
|
|
637
|
-
/**
|
|
638
|
-
|
|
639
|
-
/** Why consumers of generated CLI, MCP, or SDK surfaces care. */
|
|
640
|
-
impact: string;
|
|
601
|
+
/** One explanation of the finding and why it matters. */
|
|
602
|
+
message: string;
|
|
641
603
|
/** Public surfaces affected by the root cause. */
|
|
642
604
|
surfaces: Array<"api" | "sdk" | "cli" | "mcp">;
|
|
643
|
-
/**
|
|
644
|
-
* Whether the finding is provable from the Definition, a conservative review suggestion, or a
|
|
645
|
-
* documented Typeship implementation limitation.
|
|
646
|
-
*/
|
|
647
|
-
evidence_basis: "contract" | "heuristic" | "implementation";
|
|
648
|
-
/** Whether remediation requires intent that the Definition cannot prove. */
|
|
605
|
+
/** Whether remediation requires intent that the Spec cannot prove. */
|
|
649
606
|
owner_decision_required: boolean;
|
|
650
|
-
/** Concrete generated CLI, MCP, or SDK naming effect when Typeship can state it. */
|
|
651
|
-
surface_impact?: string;
|
|
652
607
|
/** All affected coordinates, kept under one grouped diagnostic. */
|
|
653
608
|
locations: DiagnosticLocation[];
|
|
654
609
|
fix?: DiagnosticFix;
|
|
@@ -660,29 +615,31 @@ export interface Diagnostic {
|
|
|
660
615
|
}
|
|
661
616
|
/** Response shape for Diagnostic. */
|
|
662
617
|
export interface DiagnosticRead {
|
|
663
|
-
/** Stable rule identifier
|
|
618
|
+
/** Stable rule identifier, unique within a Spec Revision. Suppressions name it as rule_id. */
|
|
664
619
|
id: string;
|
|
620
|
+
object: "diagnostic" | (string & {});
|
|
621
|
+
/**
|
|
622
|
+
* Whether this Diagnostic fails the Spec's Diagnostic policy. Suppressed occurrences and, when
|
|
623
|
+
* only_new is set, occurrences present in the baseline never block.
|
|
624
|
+
*/
|
|
625
|
+
blocking: boolean;
|
|
626
|
+
/**
|
|
627
|
+
* Whether any occurrence is new since baseline_spec_revision_id in the Diagnostic summary. Always
|
|
628
|
+
* true when there is no baseline.
|
|
629
|
+
*/
|
|
630
|
+
introduced: boolean;
|
|
665
631
|
/** Whether the rule reports invalid behavior, material risk, or an improvement. */
|
|
666
632
|
severity: ("error" | "warning" | "suggestion") | (string & {});
|
|
667
633
|
/** Product dimension affected by the diagnostic. */
|
|
668
634
|
category: ("correctness" | "sdk_ergonomics" | "agent_usability" | "safety") | (string & {});
|
|
669
635
|
/** Concise statement of the root cause. */
|
|
670
636
|
title: string;
|
|
671
|
-
/**
|
|
672
|
-
|
|
673
|
-
/** Why consumers of generated CLI, MCP, or SDK surfaces care. */
|
|
674
|
-
impact: string;
|
|
637
|
+
/** One explanation of the finding and why it matters. */
|
|
638
|
+
message: string;
|
|
675
639
|
/** Public surfaces affected by the root cause. */
|
|
676
640
|
surfaces: Array<("api" | "sdk" | "cli" | "mcp") | (string & {})>;
|
|
677
|
-
/**
|
|
678
|
-
* Whether the finding is provable from the Definition, a conservative review suggestion, or a
|
|
679
|
-
* documented Typeship implementation limitation.
|
|
680
|
-
*/
|
|
681
|
-
evidence_basis: ("contract" | "heuristic" | "implementation") | (string & {});
|
|
682
|
-
/** Whether remediation requires intent that the Definition cannot prove. */
|
|
641
|
+
/** Whether remediation requires intent that the Spec cannot prove. */
|
|
683
642
|
owner_decision_required: boolean;
|
|
684
|
-
/** Concrete generated CLI, MCP, or SDK naming effect when Typeship can state it. */
|
|
685
|
-
surface_impact?: string;
|
|
686
643
|
/** All affected coordinates, kept under one grouped diagnostic. */
|
|
687
644
|
locations: DiagnosticLocation[];
|
|
688
645
|
fix?: DiagnosticFixRead;
|
|
@@ -692,20 +649,50 @@ export interface DiagnosticRead {
|
|
|
692
649
|
*/
|
|
693
650
|
authoring_brief: string;
|
|
694
651
|
}
|
|
695
|
-
/**
|
|
652
|
+
/**
|
|
653
|
+
* Counts of grouped Diagnostics, one per rule. Retrieve the revision with include=diagnostics for
|
|
654
|
+
* each Diagnostic.
|
|
655
|
+
*/
|
|
696
656
|
export interface DiagnosticSummary {
|
|
697
|
-
/**
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
657
|
+
/**
|
|
658
|
+
* passed: no Diagnostic fails the Spec's Diagnostic policy. blocked: at least one does; retrieve
|
|
659
|
+
* with include=diagnostics and fix those marked blocking.
|
|
660
|
+
*/
|
|
661
|
+
status: "passed" | "blocked";
|
|
662
|
+
/** Diagnostics reporting invalid behavior. */
|
|
663
|
+
error_count: number;
|
|
664
|
+
/** Diagnostics reporting material risk. */
|
|
665
|
+
warning_count: number;
|
|
666
|
+
/** Diagnostics suggesting an improvement. */
|
|
667
|
+
suggestion_count: number;
|
|
668
|
+
/** Diagnostics that fail the Spec's Diagnostic policy. */
|
|
669
|
+
blocking_count: number;
|
|
670
|
+
/**
|
|
671
|
+
* The previous revision of this Spec that introduced Diagnostics are compared with, or null for
|
|
672
|
+
* the first revision.
|
|
673
|
+
*/
|
|
674
|
+
baseline_spec_revision_id: SpecRevisionId | null;
|
|
675
|
+
}
|
|
676
|
+
/** Response shape for DiagnosticSummary. */
|
|
677
|
+
export interface DiagnosticSummaryRead {
|
|
678
|
+
/**
|
|
679
|
+
* passed: no Diagnostic fails the Spec's Diagnostic policy. blocked: at least one does; retrieve
|
|
680
|
+
* with include=diagnostics and fix those marked blocking.
|
|
681
|
+
*/
|
|
682
|
+
status: ("passed" | "blocked") | (string & {});
|
|
683
|
+
/** Diagnostics reporting invalid behavior. */
|
|
684
|
+
error_count: number;
|
|
685
|
+
/** Diagnostics reporting material risk. */
|
|
686
|
+
warning_count: number;
|
|
687
|
+
/** Diagnostics suggesting an improvement. */
|
|
688
|
+
suggestion_count: number;
|
|
689
|
+
/** Diagnostics that fail the Spec's Diagnostic policy. */
|
|
690
|
+
blocking_count: number;
|
|
691
|
+
/**
|
|
692
|
+
* The previous revision of this Spec that introduced Diagnostics are compared with, or null for
|
|
693
|
+
* the first revision.
|
|
694
|
+
*/
|
|
695
|
+
baseline_spec_revision_id: SpecRevisionId | null;
|
|
709
696
|
}
|
|
710
697
|
export interface DiagnosticSuppression {
|
|
711
698
|
rule_id: string;
|
|
@@ -747,137 +734,18 @@ export interface DiagnosticPolicyRead {
|
|
|
747
734
|
/** Default: [] */
|
|
748
735
|
suppressions: DiagnosticSuppression[];
|
|
749
736
|
}
|
|
750
|
-
export interface
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
considered_occurrences: number;
|
|
754
|
-
suppressed_occurrences: number;
|
|
755
|
-
}
|
|
756
|
-
/** Response shape for DiagnosticEvaluation. */
|
|
757
|
-
export interface DiagnosticEvaluationRead {
|
|
758
|
-
state: ("pass" | "fail") | (string & {});
|
|
759
|
-
blocking: DiagnosticReferenceRead[];
|
|
760
|
-
considered_occurrences: number;
|
|
761
|
-
suppressed_occurrences: number;
|
|
762
|
-
}
|
|
763
|
-
/** Current-revision suppression usage for one stable Diagnostic rule. */
|
|
764
|
-
export interface DiagnosticSuppressionSignal {
|
|
765
|
-
rule_id: string;
|
|
766
|
-
/** Current occurrences of this rule that are not suppressed. */
|
|
767
|
-
active_occurrences: number;
|
|
768
|
-
suppressed_occurrences: number;
|
|
769
|
-
}
|
|
770
|
-
/**
|
|
771
|
-
* Current-revision signals for tuning Diagnostics policy. These counts do not claim that a
|
|
772
|
-
* suppression is a false positive or that runtime behavior has been verified.
|
|
773
|
-
*/
|
|
774
|
-
export interface DiagnosticQualitySignals {
|
|
775
|
-
suppressed_by_rule: DiagnosticSuppressionSignal[];
|
|
776
|
-
/** Reviewed exceptions whose rule or exact path no longer matches this revision. */
|
|
777
|
-
stale_suppressions: DiagnosticSuppressionResponse[];
|
|
778
|
-
}
|
|
779
|
-
/** Compact rule and location reference; full guidance appears once in diagnostics. */
|
|
780
|
-
export interface DiagnosticReference {
|
|
781
|
-
rule_id: string;
|
|
782
|
-
severity: "error" | "warning" | "suggestion";
|
|
783
|
-
title: string;
|
|
784
|
-
locations: DiagnosticLocation[];
|
|
785
|
-
}
|
|
786
|
-
/** Response shape for DiagnosticReference. */
|
|
787
|
-
export interface DiagnosticReferenceRead {
|
|
788
|
-
rule_id: string;
|
|
789
|
-
severity: ("error" | "warning" | "suggestion") | (string & {});
|
|
790
|
-
title: string;
|
|
791
|
-
locations: DiagnosticLocation[];
|
|
792
|
-
}
|
|
793
|
-
export interface DiagnosticDelta {
|
|
794
|
-
added: DiagnosticReference[];
|
|
795
|
-
resolved: DiagnosticReference[];
|
|
796
|
-
baseline_definition_revision_id: DefinitionRevisionId | null;
|
|
797
|
-
}
|
|
798
|
-
/** Response shape for DiagnosticDelta. */
|
|
799
|
-
export interface DiagnosticDeltaRead {
|
|
800
|
-
added: DiagnosticReferenceRead[];
|
|
801
|
-
resolved: DiagnosticReferenceRead[];
|
|
802
|
-
baseline_definition_revision_id: DefinitionRevisionId | null;
|
|
803
|
-
}
|
|
804
|
-
/**
|
|
805
|
-
* Deterministic Diagnostics for one immutable Definition Revision after existing patches. No
|
|
806
|
-
* model-generated facts or silent edits.
|
|
807
|
-
*/
|
|
808
|
-
export interface DiagnosticReport {
|
|
809
|
-
object: "diagnostic_report";
|
|
810
|
-
/** Contract format Typeship analyzed. */
|
|
811
|
-
format: "openapi" | "graphql";
|
|
812
|
-
project_id: ProjectId;
|
|
813
|
-
definition_revision_id: DefinitionRevisionId;
|
|
814
|
-
/** SHA-256 digest of the immutable raw source revision. */
|
|
815
|
-
source_sha256: string;
|
|
816
|
-
/** SHA-256 digest after applying the Definition's current patches. */
|
|
817
|
-
analyzed_sha256: string;
|
|
818
|
-
/** Loud misses or conflicts from the Definition's existing patches. */
|
|
819
|
-
patch_diagnostics: string[];
|
|
820
|
-
summary: DiagnosticSummary;
|
|
821
|
-
/** Stable grouped diagnostics, ordered by severity and rule identifier. */
|
|
822
|
-
diagnostics: Diagnostic[];
|
|
823
|
-
policy: DiagnosticPolicyResponse;
|
|
824
|
-
evaluation: DiagnosticEvaluation;
|
|
825
|
-
quality_signals: DiagnosticQualitySignals;
|
|
826
|
-
delta: DiagnosticDelta;
|
|
827
|
-
request_id: RequestId;
|
|
828
|
-
}
|
|
829
|
-
/** Response shape for DiagnosticReport. */
|
|
830
|
-
export interface DiagnosticReportRead {
|
|
831
|
-
object: "diagnostic_report" | (string & {});
|
|
832
|
-
/** Contract format Typeship analyzed. */
|
|
833
|
-
format: ("openapi" | "graphql") | (string & {});
|
|
834
|
-
project_id: ProjectId;
|
|
835
|
-
definition_revision_id: DefinitionRevisionId;
|
|
836
|
-
/** SHA-256 digest of the immutable raw source revision. */
|
|
837
|
-
source_sha256: string;
|
|
838
|
-
/** SHA-256 digest after applying the Definition's current patches. */
|
|
839
|
-
analyzed_sha256: string;
|
|
840
|
-
/** Loud misses or conflicts from the Definition's existing patches. */
|
|
841
|
-
patch_diagnostics: string[];
|
|
842
|
-
summary: DiagnosticSummary;
|
|
843
|
-
/** Stable grouped diagnostics, ordered by severity and rule identifier. */
|
|
844
|
-
diagnostics: DiagnosticRead[];
|
|
845
|
-
policy: DiagnosticPolicyResponseRead;
|
|
846
|
-
evaluation: DiagnosticEvaluationRead;
|
|
847
|
-
quality_signals: DiagnosticQualitySignals;
|
|
848
|
-
delta: DiagnosticDeltaRead;
|
|
849
|
-
request_id: RequestId;
|
|
850
|
-
}
|
|
851
|
-
export interface DiagnosticRemediationRequest {
|
|
852
|
-
/** Stable IDs of current diagnostics whose exact patches should be reviewed and applied. */
|
|
853
|
-
diagnostic_ids: string[];
|
|
854
|
-
}
|
|
855
|
-
export interface DiagnosticRemediation {
|
|
856
|
-
object: "diagnostic_remediation";
|
|
857
|
-
kind: "overlay" | "source_review";
|
|
858
|
-
patches_applied: number;
|
|
859
|
-
/**
|
|
860
|
-
* Source pull request for repository projects; absent for URL overlays.
|
|
861
|
-
* Format: uri
|
|
862
|
-
*/
|
|
863
|
-
review_url?: string | null;
|
|
864
|
-
request_id: RequestId;
|
|
737
|
+
export interface DiagnosticWarning {
|
|
738
|
+
code: "unsupported_format" | "invalid_document" | "invalid_patch" | "no_match" | "append_target_type" | "rename_target_type" | "rename_conflict";
|
|
739
|
+
message: string;
|
|
865
740
|
}
|
|
866
|
-
/** Response shape for
|
|
867
|
-
export interface
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
patches_applied: number;
|
|
871
|
-
/**
|
|
872
|
-
* Source pull request for repository projects; absent for URL overlays.
|
|
873
|
-
* Format: uri
|
|
874
|
-
*/
|
|
875
|
-
review_url?: string | null;
|
|
876
|
-
request_id: RequestId;
|
|
741
|
+
/** Response shape for DiagnosticWarning. */
|
|
742
|
+
export interface DiagnosticWarningRead {
|
|
743
|
+
code: ("unsupported_format" | "invalid_document" | "invalid_patch" | "no_match" | "append_target_type" | "rename_target_type" | "rename_conflict") | (string & {});
|
|
744
|
+
message: string;
|
|
877
745
|
}
|
|
878
|
-
export interface
|
|
879
|
-
|
|
880
|
-
|
|
746
|
+
export interface RepositoryDeliverySettingsInput {
|
|
747
|
+
provider: RepositoryProvider;
|
|
748
|
+
identifier: RepositoryIdentifier;
|
|
881
749
|
directory?: string | null;
|
|
882
750
|
/** npm or Python registry identity where applicable. */
|
|
883
751
|
package_name?: string | null;
|
|
@@ -889,10 +757,10 @@ export interface RepositoryDeliveryInput {
|
|
|
889
757
|
*/
|
|
890
758
|
publish_on_merge?: boolean;
|
|
891
759
|
}
|
|
892
|
-
/** Response shape for
|
|
893
|
-
export interface
|
|
894
|
-
|
|
895
|
-
|
|
760
|
+
/** Response shape for RepositoryDeliverySettingsInput. */
|
|
761
|
+
export interface RepositoryDeliverySettingsInputRead {
|
|
762
|
+
provider: RepositoryProvider | (string & {});
|
|
763
|
+
identifier: RepositoryIdentifier;
|
|
896
764
|
directory?: string | null;
|
|
897
765
|
/** npm or Python registry identity where applicable. */
|
|
898
766
|
package_name?: string | null;
|
|
@@ -904,29 +772,70 @@ export interface RepositoryDeliveryInputRead {
|
|
|
904
772
|
*/
|
|
905
773
|
publish_on_merge?: boolean;
|
|
906
774
|
}
|
|
775
|
+
export interface RepositoryDeliveryInput {
|
|
776
|
+
type: "repository";
|
|
777
|
+
repository: RepositoryDeliverySettingsInput;
|
|
778
|
+
}
|
|
779
|
+
/** Response shape for RepositoryDeliveryInput. */
|
|
780
|
+
export interface RepositoryDeliveryInputRead {
|
|
781
|
+
type: "repository" | (string & {});
|
|
782
|
+
repository: RepositoryDeliverySettingsInputRead;
|
|
783
|
+
}
|
|
907
784
|
export interface HostedMcpDeliveryInput {
|
|
908
|
-
|
|
785
|
+
type: "hosted_mcp";
|
|
909
786
|
}
|
|
910
787
|
/** Response shape for HostedMcpDeliveryInput. */
|
|
911
788
|
export interface HostedMcpDeliveryInputRead {
|
|
912
|
-
|
|
789
|
+
type: "hosted_mcp" | (string & {});
|
|
913
790
|
}
|
|
914
791
|
export type DeliveryInput = RepositoryDeliveryInput | HostedMcpDeliveryInput;
|
|
915
792
|
/** Response shape for DeliveryInput. */
|
|
916
793
|
export type DeliveryInputRead = RepositoryDeliveryInputRead | HostedMcpDeliveryInputRead | Record<string, unknown> & {
|
|
917
|
-
|
|
794
|
+
type?: string;
|
|
918
795
|
};
|
|
919
|
-
export interface
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
target_id: TargetId;
|
|
923
|
-
kind: "repository";
|
|
924
|
-
state: "active" | "disabled";
|
|
925
|
-
repository: RepositoryReferenceResponse;
|
|
796
|
+
export interface RepositoryDeliverySettings {
|
|
797
|
+
provider: RepositoryProvider;
|
|
798
|
+
identifier: RepositoryIdentifier;
|
|
926
799
|
directory: string | null;
|
|
927
800
|
package_name: string | null;
|
|
928
801
|
module_path: string | null;
|
|
929
802
|
publish_on_merge: boolean;
|
|
803
|
+
}
|
|
804
|
+
/** Response shape for RepositoryDeliverySettings. */
|
|
805
|
+
export interface RepositoryDeliverySettingsRead {
|
|
806
|
+
provider: RepositoryProvider | (string & {});
|
|
807
|
+
identifier: RepositoryIdentifier;
|
|
808
|
+
directory: string | null;
|
|
809
|
+
package_name: string | null;
|
|
810
|
+
module_path: string | null;
|
|
811
|
+
publish_on_merge: boolean;
|
|
812
|
+
}
|
|
813
|
+
export interface HostedMcpDeliverySettings {
|
|
814
|
+
/**
|
|
815
|
+
* Hosted MCP endpoint for this Target, or null while it is being provisioned.
|
|
816
|
+
* Format: uri
|
|
817
|
+
*/
|
|
818
|
+
url: string | null;
|
|
819
|
+
}
|
|
820
|
+
export interface RepositoryDelivery {
|
|
821
|
+
id: DeliveryId;
|
|
822
|
+
object: "delivery";
|
|
823
|
+
target_id: TargetId;
|
|
824
|
+
type: "repository";
|
|
825
|
+
/**
|
|
826
|
+
* active: the repository accepts generated changes. action_required: inspect issues for the
|
|
827
|
+
* correction. disabled: the Target is disabled and receives no changes.
|
|
828
|
+
*/
|
|
829
|
+
status: "active" | "action_required" | "disabled";
|
|
830
|
+
repository: RepositoryDeliverySettings;
|
|
831
|
+
issues: RepositoryDeliveryIssue[];
|
|
832
|
+
/** Repository check names Typeship expects before accepting a Draft. */
|
|
833
|
+
required_checks: string[];
|
|
834
|
+
/**
|
|
835
|
+
* Last observed repository event relevant to this Delivery, if available. A failed event adds an
|
|
836
|
+
* actionable issue.
|
|
837
|
+
*/
|
|
838
|
+
last_event: RepositoryDeliveryEvent | null;
|
|
930
839
|
/** Format: date-time */
|
|
931
840
|
created_at: string;
|
|
932
841
|
/** Format: date-time */
|
|
@@ -937,26 +846,65 @@ export interface RepositoryDeliveryRead {
|
|
|
937
846
|
id: DeliveryId;
|
|
938
847
|
object: "delivery" | (string & {});
|
|
939
848
|
target_id: TargetId;
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
849
|
+
type: "repository" | (string & {});
|
|
850
|
+
/**
|
|
851
|
+
* active: the repository accepts generated changes. action_required: inspect issues for the
|
|
852
|
+
* correction. disabled: the Target is disabled and receives no changes.
|
|
853
|
+
*/
|
|
854
|
+
status: ("active" | "action_required" | "disabled") | (string & {});
|
|
855
|
+
repository: RepositoryDeliverySettingsRead;
|
|
856
|
+
issues: RepositoryDeliveryIssueRead[];
|
|
857
|
+
/** Repository check names Typeship expects before accepting a Draft. */
|
|
858
|
+
required_checks: string[];
|
|
859
|
+
/**
|
|
860
|
+
* Last observed repository event relevant to this Delivery, if available. A failed event adds an
|
|
861
|
+
* actionable issue.
|
|
862
|
+
*/
|
|
863
|
+
last_event: RepositoryDeliveryEventRead | null;
|
|
947
864
|
/** Format: date-time */
|
|
948
865
|
created_at: string;
|
|
949
866
|
/** Format: date-time */
|
|
950
867
|
updated_at: string;
|
|
951
868
|
}
|
|
869
|
+
export interface RepositoryDeliveryIssue {
|
|
870
|
+
code: "app_not_installed" | "repository_unreachable" | "contents_write_missing" | "pull_request_missing" | "approval_label_missing" | "check_missing" | "event_failed";
|
|
871
|
+
/** Specific customer action or repository setting to inspect. */
|
|
872
|
+
message: string;
|
|
873
|
+
}
|
|
874
|
+
/** Response shape for RepositoryDeliveryIssue. */
|
|
875
|
+
export interface RepositoryDeliveryIssueRead {
|
|
876
|
+
code: ("app_not_installed" | "repository_unreachable" | "contents_write_missing" | "pull_request_missing" | "approval_label_missing" | "check_missing" | "event_failed") | (string & {});
|
|
877
|
+
/** Specific customer action or repository setting to inspect. */
|
|
878
|
+
message: string;
|
|
879
|
+
}
|
|
880
|
+
export interface RepositoryDeliveryEvent {
|
|
881
|
+
/** Repository event type. */
|
|
882
|
+
event: string;
|
|
883
|
+
/** superseded: a newer event for the same repository replaced this one before it finished. */
|
|
884
|
+
status: "queued" | "running" | "completed" | "failed" | "superseded";
|
|
885
|
+
/** Format: date-time */
|
|
886
|
+
created_at: string;
|
|
887
|
+
}
|
|
888
|
+
/** Response shape for RepositoryDeliveryEvent. */
|
|
889
|
+
export interface RepositoryDeliveryEventRead {
|
|
890
|
+
/** Repository event type. */
|
|
891
|
+
event: string;
|
|
892
|
+
/** superseded: a newer event for the same repository replaced this one before it finished. */
|
|
893
|
+
status: ("queued" | "running" | "completed" | "failed" | "superseded") | (string & {});
|
|
894
|
+
/** Format: date-time */
|
|
895
|
+
created_at: string;
|
|
896
|
+
}
|
|
952
897
|
export interface HostedMcpDelivery {
|
|
953
898
|
id: DeliveryId;
|
|
954
899
|
object: "delivery";
|
|
955
900
|
target_id: TargetId;
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
901
|
+
type: "hosted_mcp";
|
|
902
|
+
/**
|
|
903
|
+
* active: the endpoint serves the Target's latest accepted package. disabled: the Target is
|
|
904
|
+
* disabled and the endpoint is paused.
|
|
905
|
+
*/
|
|
906
|
+
status: "active" | "disabled";
|
|
907
|
+
hosted_mcp: HostedMcpDeliverySettings;
|
|
960
908
|
/** Format: date-time */
|
|
961
909
|
created_at: string;
|
|
962
910
|
/** Format: date-time */
|
|
@@ -967,10 +915,13 @@ export interface HostedMcpDeliveryRead {
|
|
|
967
915
|
id: DeliveryId;
|
|
968
916
|
object: "delivery" | (string & {});
|
|
969
917
|
target_id: TargetId;
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
918
|
+
type: "hosted_mcp" | (string & {});
|
|
919
|
+
/**
|
|
920
|
+
* active: the endpoint serves the Target's latest accepted package. disabled: the Target is
|
|
921
|
+
* disabled and the endpoint is paused.
|
|
922
|
+
*/
|
|
923
|
+
status: ("active" | "disabled") | (string & {});
|
|
924
|
+
hosted_mcp: HostedMcpDeliverySettings;
|
|
974
925
|
/** Format: date-time */
|
|
975
926
|
created_at: string;
|
|
976
927
|
/** Format: date-time */
|
|
@@ -979,25 +930,23 @@ export interface HostedMcpDeliveryRead {
|
|
|
979
930
|
export type Delivery = RepositoryDelivery | HostedMcpDelivery;
|
|
980
931
|
/** Response shape for Delivery. */
|
|
981
932
|
export type DeliveryRead = RepositoryDeliveryRead | HostedMcpDeliveryRead | Record<string, unknown> & {
|
|
982
|
-
|
|
933
|
+
type?: string;
|
|
983
934
|
};
|
|
984
935
|
/**
|
|
985
|
-
*
|
|
986
|
-
* Delivery.
|
|
936
|
+
* repository is present for a repository Delivery, with issues, required_checks, and last_event;
|
|
937
|
+
* hosted_mcp is present for a hosted_mcp Delivery.
|
|
987
938
|
*/
|
|
988
939
|
export interface DeliveryResponse {
|
|
989
940
|
id: DeliveryId;
|
|
990
941
|
object: "delivery";
|
|
991
942
|
target_id: TargetId;
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
repository?:
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
/** Format: uri */
|
|
1000
|
-
url?: string | null;
|
|
943
|
+
type: "repository" | "hosted_mcp";
|
|
944
|
+
status: "active" | "action_required" | "disabled";
|
|
945
|
+
repository?: RepositoryDeliverySettings;
|
|
946
|
+
issues?: RepositoryDeliveryIssue[];
|
|
947
|
+
required_checks?: string[];
|
|
948
|
+
last_event?: RepositoryDeliveryEvent | null;
|
|
949
|
+
hosted_mcp?: HostedMcpDeliverySettings;
|
|
1001
950
|
/** Format: date-time */
|
|
1002
951
|
created_at: string;
|
|
1003
952
|
/** Format: date-time */
|
|
@@ -1009,15 +958,13 @@ export interface DeliveryResponseRead {
|
|
|
1009
958
|
id: DeliveryId;
|
|
1010
959
|
object: "delivery" | (string & {});
|
|
1011
960
|
target_id: TargetId;
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
repository?:
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
/** Format: uri */
|
|
1020
|
-
url?: string | null;
|
|
961
|
+
type: ("repository" | "hosted_mcp") | (string & {});
|
|
962
|
+
status: ("active" | "action_required" | "disabled") | (string & {});
|
|
963
|
+
repository?: RepositoryDeliverySettingsRead;
|
|
964
|
+
issues?: RepositoryDeliveryIssueRead[];
|
|
965
|
+
required_checks?: string[];
|
|
966
|
+
last_event?: RepositoryDeliveryEventRead | null;
|
|
967
|
+
hosted_mcp?: HostedMcpDeliverySettings;
|
|
1021
968
|
/** Format: date-time */
|
|
1022
969
|
created_at: string;
|
|
1023
970
|
/** Format: date-time */
|
|
@@ -1025,24 +972,24 @@ export interface DeliveryResponseRead {
|
|
|
1025
972
|
request_id: RequestId;
|
|
1026
973
|
}
|
|
1027
974
|
/**
|
|
1028
|
-
* One Target generated from a sibling Target. A
|
|
975
|
+
* One Target generated from a sibling Target. A go_cli Target carries type go_sdk_module, naming
|
|
1029
976
|
* the Go SDK Target it is generated against.
|
|
1030
977
|
*/
|
|
1031
978
|
export interface TargetDependency {
|
|
1032
|
-
|
|
979
|
+
type: "go_sdk_module";
|
|
1033
980
|
target_id: TargetId;
|
|
1034
981
|
}
|
|
1035
982
|
/** Response shape for TargetDependency. */
|
|
1036
983
|
export interface TargetDependencyRead {
|
|
1037
|
-
|
|
984
|
+
type: "go_sdk_module" | (string & {});
|
|
1038
985
|
target_id: TargetId;
|
|
1039
986
|
}
|
|
1040
987
|
/**
|
|
1041
|
-
* Required checks run against the
|
|
1042
|
-
*
|
|
1043
|
-
*
|
|
1044
|
-
*
|
|
1045
|
-
*
|
|
988
|
+
* Required checks run against the code in the Draft. Generated checks and customer commands share
|
|
989
|
+
* one reproducible workflow; repository_required names existing repository checks. Supplying checks
|
|
990
|
+
* replaces all settings. Omitted generated restores build, package, and public_entrypoint; omitted
|
|
991
|
+
* repository_required and customer restore empty lists. An empty object restores these defaults. An
|
|
992
|
+
* empty array clears the corresponding list.
|
|
1046
993
|
*/
|
|
1047
994
|
export interface TargetChecks {
|
|
1048
995
|
/** Default: ["build","package","public_entrypoint"] */
|
|
@@ -1063,61 +1010,52 @@ export interface TargetChecksRead {
|
|
|
1063
1010
|
command: string;
|
|
1064
1011
|
}>;
|
|
1065
1012
|
}
|
|
1066
|
-
export interface
|
|
1013
|
+
export interface TargetCreateRequest {
|
|
1014
|
+
project_id: ProjectId;
|
|
1067
1015
|
name: string;
|
|
1068
|
-
|
|
1069
|
-
|
|
1016
|
+
spec_id: SpecId;
|
|
1017
|
+
type: GeneratorKind;
|
|
1070
1018
|
/** Default: "active" */
|
|
1071
|
-
|
|
1072
|
-
/** Default: "2026-08-24" */
|
|
1073
|
-
edition?: string;
|
|
1019
|
+
status?: "active" | "disabled";
|
|
1074
1020
|
/** Default: "stable" */
|
|
1075
1021
|
release_channel?: "stable" | "prerelease";
|
|
1076
|
-
/** Optional larger or prerelease SemVer for the next reviewed release. */
|
|
1077
|
-
proposed_version?: string | null;
|
|
1078
1022
|
checks?: TargetChecks;
|
|
1079
1023
|
/**
|
|
1080
1024
|
* Target-specific overrides merged over Project.config. GraphQL settings are rejected here and
|
|
1081
|
-
* belong to the
|
|
1025
|
+
* belong to the Spec.
|
|
1082
1026
|
*/
|
|
1083
1027
|
config?: TargetConfig | null;
|
|
1084
1028
|
deliveries?: DeliveryInput[];
|
|
1085
1029
|
}
|
|
1086
|
-
/** Response shape for
|
|
1087
|
-
export interface
|
|
1030
|
+
/** Response shape for TargetCreateRequest. */
|
|
1031
|
+
export interface TargetCreateRequestRead {
|
|
1032
|
+
project_id: ProjectId;
|
|
1088
1033
|
name: string;
|
|
1089
|
-
|
|
1090
|
-
|
|
1034
|
+
spec_id: SpecId;
|
|
1035
|
+
type: GeneratorKind | (string & {});
|
|
1091
1036
|
/** Default: "active" */
|
|
1092
|
-
|
|
1093
|
-
/** Default: "2026-08-24" */
|
|
1094
|
-
edition?: string;
|
|
1037
|
+
status?: ("active" | "disabled") | (string & {});
|
|
1095
1038
|
/** Default: "stable" */
|
|
1096
1039
|
release_channel?: ("stable" | "prerelease") | (string & {});
|
|
1097
|
-
/** Optional larger or prerelease SemVer for the next reviewed release. */
|
|
1098
|
-
proposed_version?: string | null;
|
|
1099
1040
|
checks?: TargetChecksRead;
|
|
1100
1041
|
/**
|
|
1101
1042
|
* Target-specific overrides merged over Project.config. GraphQL settings are rejected here and
|
|
1102
|
-
* belong to the
|
|
1043
|
+
* belong to the Spec.
|
|
1103
1044
|
*/
|
|
1104
1045
|
config?: TargetConfigRead | null;
|
|
1105
1046
|
deliveries?: DeliveryInputRead[];
|
|
1106
1047
|
}
|
|
1107
1048
|
export interface InitialTargetFields {
|
|
1108
1049
|
name: string;
|
|
1109
|
-
|
|
1050
|
+
type: GeneratorKind;
|
|
1110
1051
|
/** Default: "active" */
|
|
1111
|
-
|
|
1112
|
-
/** Default: "2026-08-24" */
|
|
1113
|
-
edition?: string;
|
|
1052
|
+
status?: "active" | "disabled";
|
|
1114
1053
|
/** Default: "stable" */
|
|
1115
1054
|
release_channel?: "stable" | "prerelease";
|
|
1116
|
-
proposed_version?: string | null;
|
|
1117
1055
|
checks?: TargetChecks;
|
|
1118
1056
|
/**
|
|
1119
1057
|
* Target-specific overrides merged over Project.config. GraphQL settings are rejected here and
|
|
1120
|
-
* belong to the
|
|
1058
|
+
* belong to the Spec.
|
|
1121
1059
|
*/
|
|
1122
1060
|
config?: TargetConfig | null;
|
|
1123
1061
|
deliveries?: DeliveryInput[];
|
|
@@ -1125,37 +1063,27 @@ export interface InitialTargetFields {
|
|
|
1125
1063
|
/** Response shape for InitialTargetFields. */
|
|
1126
1064
|
export interface InitialTargetFieldsRead {
|
|
1127
1065
|
name: string;
|
|
1128
|
-
|
|
1066
|
+
type: GeneratorKind | (string & {});
|
|
1129
1067
|
/** Default: "active" */
|
|
1130
|
-
|
|
1131
|
-
/** Default: "2026-08-24" */
|
|
1132
|
-
edition?: string;
|
|
1068
|
+
status?: ("active" | "disabled") | (string & {});
|
|
1133
1069
|
/** Default: "stable" */
|
|
1134
1070
|
release_channel?: ("stable" | "prerelease") | (string & {});
|
|
1135
|
-
proposed_version?: string | null;
|
|
1136
1071
|
checks?: TargetChecksRead;
|
|
1137
1072
|
/**
|
|
1138
1073
|
* Target-specific overrides merged over Project.config. GraphQL settings are rejected here and
|
|
1139
|
-
* belong to the
|
|
1074
|
+
* belong to the Spec.
|
|
1140
1075
|
*/
|
|
1141
1076
|
config?: TargetConfigRead | null;
|
|
1142
1077
|
deliveries?: DeliveryInputRead[];
|
|
1143
1078
|
}
|
|
1144
1079
|
export interface TargetUpdateRequest {
|
|
1145
1080
|
name?: string;
|
|
1146
|
-
|
|
1147
|
-
edition?: string;
|
|
1081
|
+
status?: "active" | "disabled";
|
|
1148
1082
|
release_channel?: "stable" | "prerelease";
|
|
1149
|
-
/**
|
|
1150
|
-
* Send only this field to select an exact SemVer, or null for automatic selection. The Target and
|
|
1151
|
-
* Draft endpoints both support an optional If-Match precondition.
|
|
1152
|
-
*/
|
|
1153
|
-
proposed_version?: string | null;
|
|
1154
1083
|
checks?: TargetChecks;
|
|
1155
1084
|
/**
|
|
1156
1085
|
* Replaces the complete stored override object. Send null or an empty object to resume Project
|
|
1157
|
-
* inheritance. Effective values merge over Project.config; GraphQL settings belong to the
|
|
1158
|
-
* Definition.
|
|
1086
|
+
* inheritance. Effective values merge over Project.config; GraphQL settings belong to the Spec.
|
|
1159
1087
|
*/
|
|
1160
1088
|
config?: TargetConfig | null;
|
|
1161
1089
|
/**
|
|
@@ -1170,19 +1098,12 @@ export interface TargetUpdateRequest {
|
|
|
1170
1098
|
/** Response shape for TargetUpdateRequest. */
|
|
1171
1099
|
export interface TargetUpdateRequestRead {
|
|
1172
1100
|
name?: string;
|
|
1173
|
-
|
|
1174
|
-
edition?: string;
|
|
1101
|
+
status?: ("active" | "disabled") | (string & {});
|
|
1175
1102
|
release_channel?: ("stable" | "prerelease") | (string & {});
|
|
1176
|
-
/**
|
|
1177
|
-
* Send only this field to select an exact SemVer, or null for automatic selection. The Target and
|
|
1178
|
-
* Draft endpoints both support an optional If-Match precondition.
|
|
1179
|
-
*/
|
|
1180
|
-
proposed_version?: string | null;
|
|
1181
1103
|
checks?: TargetChecksRead;
|
|
1182
1104
|
/**
|
|
1183
1105
|
* Replaces the complete stored override object. Send null or an empty object to resume Project
|
|
1184
|
-
* inheritance. Effective values merge over Project.config; GraphQL settings belong to the
|
|
1185
|
-
* Definition.
|
|
1106
|
+
* inheritance. Effective values merge over Project.config; GraphQL settings belong to the Spec.
|
|
1186
1107
|
*/
|
|
1187
1108
|
config?: TargetConfigRead | null;
|
|
1188
1109
|
/**
|
|
@@ -1194,36 +1115,35 @@ export interface TargetUpdateRequestRead {
|
|
|
1194
1115
|
*/
|
|
1195
1116
|
deliveries?: DeliveryInputRead[];
|
|
1196
1117
|
}
|
|
1118
|
+
/**
|
|
1119
|
+
* All Targets follow reviewed SemVer. Before 1.0.0, breaking changes require a minor version; the
|
|
1120
|
+
* policy is fixed rather than configurable.
|
|
1121
|
+
*/
|
|
1197
1122
|
export interface Target {
|
|
1198
1123
|
id: TargetId;
|
|
1199
1124
|
object: "target";
|
|
1200
1125
|
project_id: ProjectId;
|
|
1201
|
-
|
|
1126
|
+
spec_id: SpecId;
|
|
1202
1127
|
name: string;
|
|
1203
|
-
|
|
1128
|
+
type: GeneratorKind;
|
|
1204
1129
|
/**
|
|
1205
|
-
* Present only on a
|
|
1206
|
-
* Every other
|
|
1130
|
+
* Present only on a go_cli Target, naming the sibling Go SDK Target the CLI is generated against.
|
|
1131
|
+
* Every other Target type reports null.
|
|
1207
1132
|
*/
|
|
1208
1133
|
dependency: TargetDependency | null;
|
|
1209
|
-
|
|
1210
|
-
edition: string;
|
|
1134
|
+
status: "active" | "disabled";
|
|
1211
1135
|
release_channel: "stable" | "prerelease";
|
|
1212
|
-
version_policy: {
|
|
1213
|
-
mode: "reviewed_semver";
|
|
1214
|
-
pre1_breaking: "minor";
|
|
1215
|
-
};
|
|
1216
1136
|
/**
|
|
1217
|
-
* Read-only version of the Target's
|
|
1218
|
-
*
|
|
1137
|
+
* Read-only version of the Target's latest release, or null before its first release. Publishing
|
|
1138
|
+
* status is separate; inspect the release for its results.
|
|
1219
1139
|
*/
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1140
|
+
version_current: string | null;
|
|
1141
|
+
/** The Target's open Draft. After a merge it names the next Draft. */
|
|
1142
|
+
draft_id: DraftId;
|
|
1223
1143
|
checks: TargetChecksResponse;
|
|
1224
1144
|
/**
|
|
1225
|
-
* Target-specific overrides merged over Project.config. GraphQL settings are
|
|
1226
|
-
*
|
|
1145
|
+
* Target-specific overrides merged over Project.config. GraphQL settings are Spec-owned and never
|
|
1146
|
+
* appear here.
|
|
1227
1147
|
*/
|
|
1228
1148
|
config: TargetConfigResponse | null;
|
|
1229
1149
|
/** At most one repository and one hosted MCP Delivery. */
|
|
@@ -1239,27 +1159,15 @@ export interface TargetWrite {
|
|
|
1239
1159
|
id: TargetId;
|
|
1240
1160
|
object: "target";
|
|
1241
1161
|
project_id: ProjectId;
|
|
1242
|
-
|
|
1162
|
+
spec_id: SpecId;
|
|
1243
1163
|
name: string;
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
edition: string;
|
|
1164
|
+
type: GeneratorKind;
|
|
1165
|
+
status: "active" | "disabled";
|
|
1247
1166
|
release_channel: "stable" | "prerelease";
|
|
1248
|
-
version_policy: {
|
|
1249
|
-
mode: "reviewed_semver";
|
|
1250
|
-
pre1_breaking: "minor";
|
|
1251
|
-
};
|
|
1252
|
-
/**
|
|
1253
|
-
* Read-only version of the Target's Current release, or null before its first release. Registry
|
|
1254
|
-
* publication status is separate; inspect the Target Release for publication results.
|
|
1255
|
-
*/
|
|
1256
|
-
current_version: string | null;
|
|
1257
|
-
proposed_version: string | null;
|
|
1258
|
-
proposed_version_source: "console" | "api" | "github" | null;
|
|
1259
1167
|
checks: TargetChecksResponse;
|
|
1260
1168
|
/**
|
|
1261
|
-
* Target-specific overrides merged over Project.config. GraphQL settings are
|
|
1262
|
-
*
|
|
1169
|
+
* Target-specific overrides merged over Project.config. GraphQL settings are Spec-owned and never
|
|
1170
|
+
* appear here.
|
|
1263
1171
|
*/
|
|
1264
1172
|
config: TargetConfigResponse | null;
|
|
1265
1173
|
/** At most one repository and one hosted MCP Delivery. */
|
|
@@ -1275,32 +1183,27 @@ export interface TargetRead {
|
|
|
1275
1183
|
id: TargetId;
|
|
1276
1184
|
object: "target" | (string & {});
|
|
1277
1185
|
project_id: ProjectId;
|
|
1278
|
-
|
|
1186
|
+
spec_id: SpecId;
|
|
1279
1187
|
name: string;
|
|
1280
|
-
|
|
1188
|
+
type: GeneratorKind | (string & {});
|
|
1281
1189
|
/**
|
|
1282
|
-
* Present only on a
|
|
1283
|
-
* Every other
|
|
1190
|
+
* Present only on a go_cli Target, naming the sibling Go SDK Target the CLI is generated against.
|
|
1191
|
+
* Every other Target type reports null.
|
|
1284
1192
|
*/
|
|
1285
1193
|
dependency: TargetDependencyRead | null;
|
|
1286
|
-
|
|
1287
|
-
edition: string;
|
|
1194
|
+
status: ("active" | "disabled") | (string & {});
|
|
1288
1195
|
release_channel: ("stable" | "prerelease") | (string & {});
|
|
1289
|
-
version_policy: {
|
|
1290
|
-
mode: "reviewed_semver" | (string & {});
|
|
1291
|
-
pre1_breaking: "minor" | (string & {});
|
|
1292
|
-
};
|
|
1293
1196
|
/**
|
|
1294
|
-
* Read-only version of the Target's
|
|
1295
|
-
*
|
|
1197
|
+
* Read-only version of the Target's latest release, or null before its first release. Publishing
|
|
1198
|
+
* status is separate; inspect the release for its results.
|
|
1296
1199
|
*/
|
|
1297
|
-
|
|
1298
|
-
|
|
1299
|
-
|
|
1200
|
+
version_current: string | null;
|
|
1201
|
+
/** The Target's open Draft. After a merge it names the next Draft. */
|
|
1202
|
+
draft_id: DraftId;
|
|
1300
1203
|
checks: TargetChecksResponseRead;
|
|
1301
1204
|
/**
|
|
1302
|
-
* Target-specific overrides merged over Project.config. GraphQL settings are
|
|
1303
|
-
*
|
|
1205
|
+
* Target-specific overrides merged over Project.config. GraphQL settings are Spec-owned and never
|
|
1206
|
+
* appear here.
|
|
1304
1207
|
*/
|
|
1305
1208
|
config: TargetConfigResponseRead | null;
|
|
1306
1209
|
/** At most one repository and one hosted MCP Delivery. */
|
|
@@ -1316,6 +1219,51 @@ export type TargetResponse = Target & ResponseMetadata;
|
|
|
1316
1219
|
export type TargetResponseWrite = TargetWrite & ResponseMetadata;
|
|
1317
1220
|
/** Response shape for TargetResponse. */
|
|
1318
1221
|
export type TargetResponseRead = TargetRead & ResponseMetadata;
|
|
1222
|
+
export interface DeliveryList {
|
|
1223
|
+
object: ListObject;
|
|
1224
|
+
data: Delivery[];
|
|
1225
|
+
has_more: boolean;
|
|
1226
|
+
next_cursor: string | null;
|
|
1227
|
+
request_id: RequestId;
|
|
1228
|
+
}
|
|
1229
|
+
/** Response shape for DeliveryList. */
|
|
1230
|
+
export interface DeliveryListRead {
|
|
1231
|
+
object: ListObject;
|
|
1232
|
+
data: DeliveryRead[];
|
|
1233
|
+
has_more: boolean;
|
|
1234
|
+
next_cursor: string | null;
|
|
1235
|
+
request_id: RequestId;
|
|
1236
|
+
}
|
|
1237
|
+
export interface PublicationList {
|
|
1238
|
+
object: ListObject;
|
|
1239
|
+
data: Publication[];
|
|
1240
|
+
has_more: boolean;
|
|
1241
|
+
next_cursor: string | null;
|
|
1242
|
+
request_id: RequestId;
|
|
1243
|
+
}
|
|
1244
|
+
/** Response shape for PublicationList. */
|
|
1245
|
+
export interface PublicationListRead {
|
|
1246
|
+
object: ListObject;
|
|
1247
|
+
data: PublicationRead[];
|
|
1248
|
+
has_more: boolean;
|
|
1249
|
+
next_cursor: string | null;
|
|
1250
|
+
request_id: RequestId;
|
|
1251
|
+
}
|
|
1252
|
+
export interface DraftList {
|
|
1253
|
+
object: ListObject;
|
|
1254
|
+
data: Draft[];
|
|
1255
|
+
has_more: boolean;
|
|
1256
|
+
next_cursor: string | null;
|
|
1257
|
+
request_id: RequestId;
|
|
1258
|
+
}
|
|
1259
|
+
/** Response shape for DraftList. */
|
|
1260
|
+
export interface DraftListRead {
|
|
1261
|
+
object: ListObject;
|
|
1262
|
+
data: DraftRead[];
|
|
1263
|
+
has_more: boolean;
|
|
1264
|
+
next_cursor: string | null;
|
|
1265
|
+
request_id: RequestId;
|
|
1266
|
+
}
|
|
1319
1267
|
export interface TargetList {
|
|
1320
1268
|
object: ListObject;
|
|
1321
1269
|
data: Target[];
|
|
@@ -1339,9 +1287,9 @@ export interface TargetListRead {
|
|
|
1339
1287
|
next_cursor: string | null;
|
|
1340
1288
|
request_id: RequestId;
|
|
1341
1289
|
}
|
|
1342
|
-
export interface
|
|
1343
|
-
id:
|
|
1344
|
-
object: "
|
|
1290
|
+
export interface Release {
|
|
1291
|
+
id: ReleaseId;
|
|
1292
|
+
object: "release";
|
|
1345
1293
|
target_id: TargetId;
|
|
1346
1294
|
/** Null only for a verified release imported during package adoption. */
|
|
1347
1295
|
generation_id: GenerationId | null;
|
|
@@ -1349,22 +1297,33 @@ export interface TargetRelease {
|
|
|
1349
1297
|
/** Immutable package version released from this Target. */
|
|
1350
1298
|
version: string;
|
|
1351
1299
|
channel: "stable" | "prerelease";
|
|
1352
|
-
/** Delivery provider that accepted the release. */
|
|
1353
|
-
provider: string;
|
|
1354
1300
|
repository: RepositoryReferenceResponse | null;
|
|
1355
|
-
|
|
1356
|
-
/**
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1301
|
+
spec_revision_id: SpecRevisionId | null;
|
|
1302
|
+
/**
|
|
1303
|
+
* Git commit containing the accepted package. Compare it with the Delivery repository history or
|
|
1304
|
+
* checked-out commit.
|
|
1305
|
+
*/
|
|
1306
|
+
commit_sha: string;
|
|
1360
1307
|
checks: PackageCheck[];
|
|
1361
|
-
|
|
1308
|
+
approvals: CompatibilityApproval[];
|
|
1309
|
+
/**
|
|
1310
|
+
* For an adopted Release, compare the tag and registry URL with the published package and its
|
|
1311
|
+
* artifact digest. Null for a Release created by Typeship.
|
|
1312
|
+
*/
|
|
1362
1313
|
import_provenance: {
|
|
1314
|
+
/** Git tag to compare with the repository release, if available. */
|
|
1363
1315
|
tag: string | null;
|
|
1364
|
-
/**
|
|
1316
|
+
/**
|
|
1317
|
+
* Published package page to inspect, if available.
|
|
1318
|
+
* Format: uri
|
|
1319
|
+
*/
|
|
1365
1320
|
registry_url: string | null;
|
|
1321
|
+
/** Published artifact digest to compare with registry metadata, if available. */
|
|
1366
1322
|
artifact_digest: string | null;
|
|
1367
|
-
/**
|
|
1323
|
+
/**
|
|
1324
|
+
* When Typeship recorded the adopted package.
|
|
1325
|
+
* Format: date-time
|
|
1326
|
+
*/
|
|
1368
1327
|
imported_at: string | null;
|
|
1369
1328
|
} | null;
|
|
1370
1329
|
publications: Publication[];
|
|
@@ -1372,10 +1331,10 @@ export interface TargetRelease {
|
|
|
1372
1331
|
created_at: string;
|
|
1373
1332
|
request_id?: RequestId;
|
|
1374
1333
|
}
|
|
1375
|
-
/** Response shape for
|
|
1376
|
-
export interface
|
|
1377
|
-
id:
|
|
1378
|
-
object: "
|
|
1334
|
+
/** Response shape for Release. */
|
|
1335
|
+
export interface ReleaseRead {
|
|
1336
|
+
id: ReleaseId;
|
|
1337
|
+
object: "release" | (string & {});
|
|
1379
1338
|
target_id: TargetId;
|
|
1380
1339
|
/** Null only for a verified release imported during package adoption. */
|
|
1381
1340
|
generation_id: GenerationId | null;
|
|
@@ -1383,22 +1342,33 @@ export interface TargetReleaseRead {
|
|
|
1383
1342
|
/** Immutable package version released from this Target. */
|
|
1384
1343
|
version: string;
|
|
1385
1344
|
channel: ("stable" | "prerelease") | (string & {});
|
|
1386
|
-
/** Delivery provider that accepted the release. */
|
|
1387
|
-
provider: string;
|
|
1388
1345
|
repository: RepositoryReferenceResponseRead | null;
|
|
1389
|
-
|
|
1390
|
-
/**
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1346
|
+
spec_revision_id: SpecRevisionId | null;
|
|
1347
|
+
/**
|
|
1348
|
+
* Git commit containing the accepted package. Compare it with the Delivery repository history or
|
|
1349
|
+
* checked-out commit.
|
|
1350
|
+
*/
|
|
1351
|
+
commit_sha: string;
|
|
1394
1352
|
checks: PackageCheckRead[];
|
|
1395
|
-
|
|
1353
|
+
approvals: CompatibilityApprovalRead[];
|
|
1354
|
+
/**
|
|
1355
|
+
* For an adopted Release, compare the tag and registry URL with the published package and its
|
|
1356
|
+
* artifact digest. Null for a Release created by Typeship.
|
|
1357
|
+
*/
|
|
1396
1358
|
import_provenance: {
|
|
1359
|
+
/** Git tag to compare with the repository release, if available. */
|
|
1397
1360
|
tag: string | null;
|
|
1398
|
-
/**
|
|
1361
|
+
/**
|
|
1362
|
+
* Published package page to inspect, if available.
|
|
1363
|
+
* Format: uri
|
|
1364
|
+
*/
|
|
1399
1365
|
registry_url: string | null;
|
|
1366
|
+
/** Published artifact digest to compare with registry metadata, if available. */
|
|
1400
1367
|
artifact_digest: string | null;
|
|
1401
|
-
/**
|
|
1368
|
+
/**
|
|
1369
|
+
* When Typeship recorded the adopted package.
|
|
1370
|
+
* Format: date-time
|
|
1371
|
+
*/
|
|
1402
1372
|
imported_at: string | null;
|
|
1403
1373
|
} | null;
|
|
1404
1374
|
publications: PublicationRead[];
|
|
@@ -1406,20 +1376,20 @@ export interface TargetReleaseRead {
|
|
|
1406
1376
|
created_at: string;
|
|
1407
1377
|
request_id?: RequestId;
|
|
1408
1378
|
}
|
|
1409
|
-
export type
|
|
1410
|
-
/** Response shape for
|
|
1411
|
-
export type
|
|
1412
|
-
export interface
|
|
1379
|
+
export type ReleaseResponse = Release & ResponseMetadata;
|
|
1380
|
+
/** Response shape for ReleaseResponse. */
|
|
1381
|
+
export type ReleaseResponseRead = ReleaseRead & ResponseMetadata;
|
|
1382
|
+
export interface ReleaseList {
|
|
1413
1383
|
object: ListObject;
|
|
1414
|
-
data:
|
|
1384
|
+
data: Release[];
|
|
1415
1385
|
has_more: boolean;
|
|
1416
1386
|
next_cursor: string | null;
|
|
1417
1387
|
request_id: RequestId;
|
|
1418
1388
|
}
|
|
1419
|
-
/** Response shape for
|
|
1420
|
-
export interface
|
|
1389
|
+
/** Response shape for ReleaseList. */
|
|
1390
|
+
export interface ReleaseListRead {
|
|
1421
1391
|
object: ListObject;
|
|
1422
|
-
data:
|
|
1392
|
+
data: ReleaseRead[];
|
|
1423
1393
|
has_more: boolean;
|
|
1424
1394
|
next_cursor: string | null;
|
|
1425
1395
|
request_id: RequestId;
|
|
@@ -1427,9 +1397,9 @@ export interface TargetReleaseListRead {
|
|
|
1427
1397
|
export interface Publication {
|
|
1428
1398
|
id: PublicationId;
|
|
1429
1399
|
object: "publication";
|
|
1430
|
-
|
|
1400
|
+
release_id: ReleaseId;
|
|
1431
1401
|
destination: "github" | "npm" | "pypi" | "go" | "mcp";
|
|
1432
|
-
|
|
1402
|
+
status: "pending" | "publishing" | "published" | "failed" | "disabled";
|
|
1433
1403
|
attempt: number;
|
|
1434
1404
|
/** Format: uri */
|
|
1435
1405
|
run_url: string | null;
|
|
@@ -1442,6 +1412,10 @@ export interface Publication {
|
|
|
1442
1412
|
started_at: string | null;
|
|
1443
1413
|
/** Format: date-time */
|
|
1444
1414
|
finished_at: string | null;
|
|
1415
|
+
/** Milliseconds from started_at to finished_at; null until the attempt finishes. */
|
|
1416
|
+
runtime_ms: number | null;
|
|
1417
|
+
/** Format: date-time */
|
|
1418
|
+
created_at: string;
|
|
1445
1419
|
/** Format: date-time */
|
|
1446
1420
|
updated_at: string;
|
|
1447
1421
|
}
|
|
@@ -1449,9 +1423,9 @@ export interface Publication {
|
|
|
1449
1423
|
export interface PublicationRead {
|
|
1450
1424
|
id: PublicationId;
|
|
1451
1425
|
object: "publication" | (string & {});
|
|
1452
|
-
|
|
1426
|
+
release_id: ReleaseId;
|
|
1453
1427
|
destination: ("github" | "npm" | "pypi" | "go" | "mcp") | (string & {});
|
|
1454
|
-
|
|
1428
|
+
status: ("pending" | "publishing" | "published" | "failed" | "disabled") | (string & {});
|
|
1455
1429
|
attempt: number;
|
|
1456
1430
|
/** Format: uri */
|
|
1457
1431
|
run_url: string | null;
|
|
@@ -1464,216 +1438,250 @@ export interface PublicationRead {
|
|
|
1464
1438
|
started_at: string | null;
|
|
1465
1439
|
/** Format: date-time */
|
|
1466
1440
|
finished_at: string | null;
|
|
1441
|
+
/** Milliseconds from started_at to finished_at; null until the attempt finishes. */
|
|
1442
|
+
runtime_ms: number | null;
|
|
1443
|
+
/** Format: date-time */
|
|
1444
|
+
created_at: string;
|
|
1467
1445
|
/** Format: date-time */
|
|
1468
1446
|
updated_at: string;
|
|
1469
1447
|
}
|
|
1470
|
-
export type PublicationResponse = Publication &
|
|
1471
|
-
/** Format: date-time */
|
|
1472
|
-
created_at: string;
|
|
1473
|
-
} & ResponseMetadata;
|
|
1448
|
+
export type PublicationResponse = Publication & ResponseMetadata;
|
|
1474
1449
|
/** Response shape for PublicationResponse. */
|
|
1475
|
-
export type PublicationResponseRead = PublicationRead &
|
|
1476
|
-
/** Format: date-time */
|
|
1477
|
-
created_at: string;
|
|
1478
|
-
} & ResponseMetadata;
|
|
1479
|
-
export type TargetDraftSelection = {
|
|
1480
|
-
mode: "automatic";
|
|
1481
|
-
} | {
|
|
1482
|
-
mode: "exact";
|
|
1483
|
-
version: string;
|
|
1484
|
-
/** Where the selection was made. */
|
|
1485
|
-
source: "console" | "api" | "github" | null;
|
|
1486
|
-
};
|
|
1487
|
-
/** Response shape for TargetDraftSelection. */
|
|
1488
|
-
export type TargetDraftSelectionRead = {
|
|
1489
|
-
mode: "automatic" | (string & {});
|
|
1490
|
-
} | {
|
|
1491
|
-
mode: "exact" | (string & {});
|
|
1492
|
-
version: string;
|
|
1493
|
-
/** Where the selection was made. */
|
|
1494
|
-
source: ("console" | "api" | "github" | null) | (string & {}) | null;
|
|
1495
|
-
};
|
|
1450
|
+
export type PublicationResponseRead = PublicationRead & ResponseMetadata;
|
|
1496
1451
|
/**
|
|
1497
|
-
*
|
|
1498
|
-
* generating
|
|
1499
|
-
*
|
|
1500
|
-
*
|
|
1501
|
-
*
|
|
1502
|
-
* filter=conflicted and resolve them. needs_generation: saved conflict decisions, an approved
|
|
1503
|
-
* history recovery, or a settings change are not applied yet; generate the Target.
|
|
1504
|
-
* history_rewritten: the default branch no longer contains the accepted package; review files with
|
|
1505
|
-
* filter=history and approve history recovery. checking: package checks are running on
|
|
1506
|
-
* head_revision; retrieve the Draft again. failed: readiness failed or could not be assessed;
|
|
1507
|
-
* inspect readiness and checks, fix the package or pull request, and push to the Draft. ready:
|
|
1508
|
-
* every required check passed on head_revision; merge the pull request.
|
|
1452
|
+
* none: the open Draft has no pending change; generate the Target to start one. working: Typeship
|
|
1453
|
+
* is generating, carrying repository edits forward, applying decisions, or checking the Draft;
|
|
1454
|
+
* retrieve it again. action_required: use the typed reason to find the customer's next action.
|
|
1455
|
+
* ready: required checks passed on head_sha; merge the pull request. merged: the pull request
|
|
1456
|
+
* merged and the Draft is final; retrieve the Target for the draft_id of its next Draft.
|
|
1509
1457
|
*/
|
|
1510
1458
|
export declare const DraftStatus: {
|
|
1511
|
-
readonly
|
|
1512
|
-
readonly
|
|
1513
|
-
readonly
|
|
1514
|
-
readonly CONFLICTED: "conflicted";
|
|
1515
|
-
readonly NEEDS_GENERATION: "needs_generation";
|
|
1516
|
-
readonly HISTORY_REWRITTEN: "history_rewritten";
|
|
1517
|
-
readonly CHECKING: "checking";
|
|
1518
|
-
readonly FAILED: "failed";
|
|
1459
|
+
readonly NONE: "none";
|
|
1460
|
+
readonly WORKING: "working";
|
|
1461
|
+
readonly ACTION_REQUIRED: "action_required";
|
|
1519
1462
|
readonly READY: "ready";
|
|
1463
|
+
readonly MERGED: "merged";
|
|
1520
1464
|
};
|
|
1521
1465
|
export type DraftStatus = (typeof DraftStatus)[keyof typeof DraftStatus];
|
|
1522
|
-
|
|
1466
|
+
/**
|
|
1467
|
+
* conflict: resolve the listed files. checks_failed: correct failed package checks. review_failed:
|
|
1468
|
+
* correct the Draft title, version, or other readiness finding. checks_unavailable: restore a
|
|
1469
|
+
* required check. history_rewritten: review the affected files and approve recovery.
|
|
1470
|
+
*/
|
|
1471
|
+
export declare const DraftActionReason: {
|
|
1472
|
+
readonly CONFLICT: "conflict";
|
|
1473
|
+
readonly CHECKS_FAILED: "checks_failed";
|
|
1474
|
+
readonly REVIEW_FAILED: "review_failed";
|
|
1475
|
+
readonly CHECKS_UNAVAILABLE: "checks_unavailable";
|
|
1476
|
+
readonly HISTORY_REWRITTEN: "history_rewritten";
|
|
1477
|
+
};
|
|
1478
|
+
export type DraftActionReason = (typeof DraftActionReason)[keyof typeof DraftActionReason];
|
|
1479
|
+
export interface DraftConflicts {
|
|
1523
1480
|
/** Conflicts in the current merge stage. */
|
|
1524
1481
|
total: number;
|
|
1525
|
-
/** Conflicts with a saved decision for
|
|
1482
|
+
/** Conflicts with a saved decision for head_sha. */
|
|
1526
1483
|
decided: number;
|
|
1527
1484
|
}
|
|
1528
1485
|
/** The approval inputs for a default-branch history rewrite. */
|
|
1529
|
-
export interface
|
|
1530
|
-
/** Rewritten default-branch commit. Send it as
|
|
1531
|
-
|
|
1532
|
-
/** Draft commit Typeship last observed. Send it as
|
|
1533
|
-
|
|
1486
|
+
export interface DraftHistoryRecovery {
|
|
1487
|
+
/** Rewritten default-branch commit. Send it as expected_default_sha. */
|
|
1488
|
+
default_sha: string;
|
|
1489
|
+
/** Draft commit Typeship last observed. Send it as expected_head_sha. */
|
|
1490
|
+
head_sha: string | null;
|
|
1534
1491
|
/** Existing Draft branch that stays available after recovery opens a new Draft. */
|
|
1535
1492
|
preserved_branch: string | null;
|
|
1536
1493
|
}
|
|
1537
1494
|
/**
|
|
1538
|
-
* Readiness decision for the Draft's
|
|
1539
|
-
*
|
|
1495
|
+
* Readiness decision for the Draft's head_sha. Null readiness on the Draft means no Draft has been
|
|
1496
|
+
* generated.
|
|
1540
1497
|
*/
|
|
1541
|
-
export interface
|
|
1498
|
+
export interface DraftReadiness {
|
|
1542
1499
|
/**
|
|
1543
1500
|
* success means required checks passed; failure means the Draft needs correction or review; error
|
|
1544
1501
|
* means assessment could not finish; pending means checks have not finished.
|
|
1545
1502
|
*/
|
|
1546
|
-
|
|
1503
|
+
status: "success" | "failure" | "error" | "pending";
|
|
1547
1504
|
/** Human-readable explanation of the current decision. Do not parse it for control flow. */
|
|
1548
1505
|
description: string;
|
|
1549
|
-
/** API surface comparison against
|
|
1550
|
-
|
|
1506
|
+
/** API surface comparison against the latest release. unknown means analysis is unavailable. */
|
|
1507
|
+
compatibility_api: "compatible" | "breaking" | "unknown";
|
|
1551
1508
|
/**
|
|
1552
|
-
* Package and supported SDK source comparison against
|
|
1553
|
-
* incomplete or unavailable.
|
|
1509
|
+
* Package and supported SDK source comparison against the latest release. unknown means analysis
|
|
1510
|
+
* is incomplete or unavailable.
|
|
1554
1511
|
*/
|
|
1555
|
-
|
|
1512
|
+
compatibility_package: "compatible" | "breaking" | "unknown";
|
|
1556
1513
|
/** Whether the version satisfies the assessed change. Null when no verdict is available. */
|
|
1557
1514
|
version_correct: boolean | null;
|
|
1558
|
-
/**
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1515
|
+
/**
|
|
1516
|
+
* Minimum assessed version bump. Approval never waives an insufficient bump. Null when no bump
|
|
1517
|
+
* has been determined.
|
|
1518
|
+
*/
|
|
1519
|
+
bump_required: "major" | "minor" | "patch" | null;
|
|
1520
|
+
/** Latest release version used for the comparison. Null before the first release. */
|
|
1521
|
+
version_previous: string | null;
|
|
1562
1522
|
/** Draft title error that must be corrected before release. Null when none is recorded. */
|
|
1563
1523
|
title_error: string | null;
|
|
1564
1524
|
}
|
|
1565
|
-
/** Response shape for
|
|
1566
|
-
export interface
|
|
1525
|
+
/** Response shape for DraftReadiness. */
|
|
1526
|
+
export interface DraftReadinessRead {
|
|
1567
1527
|
/**
|
|
1568
1528
|
* success means required checks passed; failure means the Draft needs correction or review; error
|
|
1569
1529
|
* means assessment could not finish; pending means checks have not finished.
|
|
1570
1530
|
*/
|
|
1571
|
-
|
|
1531
|
+
status: ("success" | "failure" | "error" | "pending") | (string & {});
|
|
1572
1532
|
/** Human-readable explanation of the current decision. Do not parse it for control flow. */
|
|
1573
1533
|
description: string;
|
|
1574
|
-
/** API surface comparison against
|
|
1575
|
-
|
|
1534
|
+
/** API surface comparison against the latest release. unknown means analysis is unavailable. */
|
|
1535
|
+
compatibility_api: ("compatible" | "breaking" | "unknown") | (string & {});
|
|
1576
1536
|
/**
|
|
1577
|
-
* Package and supported SDK source comparison against
|
|
1578
|
-
* incomplete or unavailable.
|
|
1537
|
+
* Package and supported SDK source comparison against the latest release. unknown means analysis
|
|
1538
|
+
* is incomplete or unavailable.
|
|
1579
1539
|
*/
|
|
1580
|
-
|
|
1540
|
+
compatibility_package: ("compatible" | "breaking" | "unknown") | (string & {});
|
|
1581
1541
|
/** Whether the version satisfies the assessed change. Null when no verdict is available. */
|
|
1582
1542
|
version_correct: boolean | null;
|
|
1583
|
-
/**
|
|
1584
|
-
|
|
1585
|
-
|
|
1586
|
-
|
|
1543
|
+
/**
|
|
1544
|
+
* Minimum assessed version bump. Approval never waives an insufficient bump. Null when no bump
|
|
1545
|
+
* has been determined.
|
|
1546
|
+
*/
|
|
1547
|
+
bump_required: ("major" | "minor" | "patch" | null) | (string & {}) | null;
|
|
1548
|
+
/** Latest release version used for the comparison. Null before the first release. */
|
|
1549
|
+
version_previous: string | null;
|
|
1587
1550
|
/** Draft title error that must be corrected before release. Null when none is recorded. */
|
|
1588
1551
|
title_error: string | null;
|
|
1589
1552
|
}
|
|
1590
|
-
|
|
1591
|
-
|
|
1553
|
+
/**
|
|
1554
|
+
* One reviewed package change for a Target. A Target has one open Draft, named by its draft_id;
|
|
1555
|
+
* when the pull request merges, the Draft becomes merged and final, and the Target opens a new
|
|
1556
|
+
* Draft with a new ID.
|
|
1557
|
+
*/
|
|
1558
|
+
export interface Draft {
|
|
1559
|
+
id: DraftId;
|
|
1560
|
+
object: "draft";
|
|
1592
1561
|
target_id: TargetId;
|
|
1593
1562
|
project_id: ProjectId;
|
|
1594
1563
|
status: DraftStatus;
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1564
|
+
/** Present and required when status is action_required; absent otherwise. */
|
|
1565
|
+
reason?: DraftActionReason;
|
|
1566
|
+
/** Next version for this Draft, or null before a version is selected. */
|
|
1567
|
+
version_next: string | null;
|
|
1568
|
+
/** Where version_next was selected; null once the Draft merged. */
|
|
1569
|
+
version_source: "automatic" | "console" | "api" | "github" | null;
|
|
1570
|
+
readiness: DraftReadiness | null;
|
|
1599
1571
|
changes: {
|
|
1600
|
-
/** Cumulative changelog against
|
|
1572
|
+
/** Cumulative changelog against the latest release. */
|
|
1601
1573
|
changelog?: string | null;
|
|
1602
1574
|
breaking_count?: number | null;
|
|
1603
|
-
|
|
1575
|
+
version_previous?: string | null;
|
|
1604
1576
|
} | null;
|
|
1605
1577
|
/**
|
|
1606
|
-
* Draft commit that readiness, checks, and conflicts describe. Send it as
|
|
1607
|
-
*
|
|
1578
|
+
* Draft commit that readiness, checks, and conflicts describe. Send it as expected_head_sha when
|
|
1579
|
+
* resolving or discarding.
|
|
1608
1580
|
*/
|
|
1609
|
-
|
|
1610
|
-
/**
|
|
1611
|
-
|
|
1581
|
+
head_sha: string | null;
|
|
1582
|
+
/** The Draft pull request in the destination repository, or null before one is opened. */
|
|
1583
|
+
pull_request: {
|
|
1584
|
+
/** Format: uri */
|
|
1585
|
+
url: string;
|
|
1586
|
+
number: number;
|
|
1587
|
+
} | null;
|
|
1612
1588
|
/** Generation whose package this Draft contains. */
|
|
1613
1589
|
generation_id: GenerationId | null;
|
|
1590
|
+
/**
|
|
1591
|
+
* Release this Draft created when it merged; null while open, or when a merge changed only tests
|
|
1592
|
+
* or checks.
|
|
1593
|
+
*/
|
|
1594
|
+
release_id: ReleaseId | null;
|
|
1595
|
+
/**
|
|
1596
|
+
* When the Draft opened.
|
|
1597
|
+
* Format: date-time
|
|
1598
|
+
*/
|
|
1599
|
+
created_at: string;
|
|
1600
|
+
/** Format: date-time */
|
|
1601
|
+
updated_at: string;
|
|
1614
1602
|
/** Conflict counts for the current merge stage; null when the Draft has no conflicts. */
|
|
1615
|
-
conflicts:
|
|
1603
|
+
conflicts: DraftConflicts | null;
|
|
1616
1604
|
/**
|
|
1617
1605
|
* Files where the Draft differs from the last accepted package; null until the Draft is
|
|
1618
1606
|
* integrated.
|
|
1619
1607
|
*/
|
|
1620
1608
|
customized_files: number | null;
|
|
1621
|
-
/** Present only while status is history_rewritten. */
|
|
1622
|
-
history_recovery:
|
|
1609
|
+
/** Present only while status is action_required and reason is history_rewritten. */
|
|
1610
|
+
history_recovery: DraftHistoryRecovery | null;
|
|
1623
1611
|
request_id?: RequestId;
|
|
1624
1612
|
checks: PackageCheck[];
|
|
1625
1613
|
}
|
|
1626
|
-
/** Response shape for
|
|
1627
|
-
export interface
|
|
1628
|
-
|
|
1614
|
+
/** Response shape for Draft. */
|
|
1615
|
+
export interface DraftRead {
|
|
1616
|
+
id: DraftId;
|
|
1617
|
+
object: "draft" | (string & {});
|
|
1629
1618
|
target_id: TargetId;
|
|
1630
1619
|
project_id: ProjectId;
|
|
1631
1620
|
status: DraftStatus | (string & {});
|
|
1632
|
-
|
|
1633
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1621
|
+
/** Present and required when status is action_required; absent otherwise. */
|
|
1622
|
+
reason?: DraftActionReason | (string & {});
|
|
1623
|
+
/** Next version for this Draft, or null before a version is selected. */
|
|
1624
|
+
version_next: string | null;
|
|
1625
|
+
/** Where version_next was selected; null once the Draft merged. */
|
|
1626
|
+
version_source: ("automatic" | "console" | "api" | "github" | null) | (string & {}) | null;
|
|
1627
|
+
readiness: DraftReadinessRead | null;
|
|
1636
1628
|
changes: {
|
|
1637
|
-
/** Cumulative changelog against
|
|
1629
|
+
/** Cumulative changelog against the latest release. */
|
|
1638
1630
|
changelog?: string | null;
|
|
1639
1631
|
breaking_count?: number | null;
|
|
1640
|
-
|
|
1632
|
+
version_previous?: string | null;
|
|
1641
1633
|
} | null;
|
|
1642
1634
|
/**
|
|
1643
|
-
* Draft commit that readiness, checks, and conflicts describe. Send it as
|
|
1644
|
-
*
|
|
1635
|
+
* Draft commit that readiness, checks, and conflicts describe. Send it as expected_head_sha when
|
|
1636
|
+
* resolving or discarding.
|
|
1645
1637
|
*/
|
|
1646
|
-
|
|
1647
|
-
/**
|
|
1648
|
-
|
|
1638
|
+
head_sha: string | null;
|
|
1639
|
+
/** The Draft pull request in the destination repository, or null before one is opened. */
|
|
1640
|
+
pull_request: {
|
|
1641
|
+
/** Format: uri */
|
|
1642
|
+
url: string;
|
|
1643
|
+
number: number;
|
|
1644
|
+
} | null;
|
|
1649
1645
|
/** Generation whose package this Draft contains. */
|
|
1650
1646
|
generation_id: GenerationId | null;
|
|
1647
|
+
/**
|
|
1648
|
+
* Release this Draft created when it merged; null while open, or when a merge changed only tests
|
|
1649
|
+
* or checks.
|
|
1650
|
+
*/
|
|
1651
|
+
release_id: ReleaseId | null;
|
|
1652
|
+
/**
|
|
1653
|
+
* When the Draft opened.
|
|
1654
|
+
* Format: date-time
|
|
1655
|
+
*/
|
|
1656
|
+
created_at: string;
|
|
1657
|
+
/** Format: date-time */
|
|
1658
|
+
updated_at: string;
|
|
1651
1659
|
/** Conflict counts for the current merge stage; null when the Draft has no conflicts. */
|
|
1652
|
-
conflicts:
|
|
1660
|
+
conflicts: DraftConflicts | null;
|
|
1653
1661
|
/**
|
|
1654
1662
|
* Files where the Draft differs from the last accepted package; null until the Draft is
|
|
1655
1663
|
* integrated.
|
|
1656
1664
|
*/
|
|
1657
1665
|
customized_files: number | null;
|
|
1658
|
-
/** Present only while status is history_rewritten. */
|
|
1659
|
-
history_recovery:
|
|
1666
|
+
/** Present only while status is action_required and reason is history_rewritten. */
|
|
1667
|
+
history_recovery: DraftHistoryRecovery | null;
|
|
1660
1668
|
request_id?: RequestId;
|
|
1661
1669
|
checks: PackageCheckRead[];
|
|
1662
1670
|
}
|
|
1663
|
-
export type
|
|
1664
|
-
/** Response shape for
|
|
1665
|
-
export type
|
|
1666
|
-
export interface
|
|
1671
|
+
export type DraftResponse = Draft & ResponseMetadata;
|
|
1672
|
+
/** Response shape for DraftResponse. */
|
|
1673
|
+
export type DraftResponseRead = DraftRead & ResponseMetadata;
|
|
1674
|
+
export interface DraftUpdateRequest {
|
|
1667
1675
|
/** Exact SemVer, or null to return to automatic selection. */
|
|
1668
|
-
|
|
1676
|
+
version_next: string | null;
|
|
1669
1677
|
}
|
|
1670
1678
|
export interface PackageCheck {
|
|
1671
1679
|
name: string;
|
|
1672
1680
|
source: "typeship" | "customer" | "repository" | "compatibility";
|
|
1673
1681
|
required: boolean;
|
|
1674
|
-
|
|
1682
|
+
status: "pending" | "passed" | "failed" | "not_assessed";
|
|
1675
1683
|
reason: string;
|
|
1676
|
-
|
|
1684
|
+
commit_sha: string;
|
|
1677
1685
|
/** Format: uri */
|
|
1678
1686
|
url: string | null;
|
|
1679
1687
|
/** Format: date-time */
|
|
@@ -1684,180 +1692,98 @@ export interface PackageCheckRead {
|
|
|
1684
1692
|
name: string;
|
|
1685
1693
|
source: ("typeship" | "customer" | "repository" | "compatibility") | (string & {});
|
|
1686
1694
|
required: boolean;
|
|
1687
|
-
|
|
1695
|
+
status: ("pending" | "passed" | "failed" | "not_assessed") | (string & {});
|
|
1688
1696
|
reason: string;
|
|
1689
|
-
|
|
1697
|
+
commit_sha: string;
|
|
1690
1698
|
/** Format: uri */
|
|
1691
1699
|
url: string | null;
|
|
1692
1700
|
/** Format: date-time */
|
|
1693
1701
|
observed_at: string | null;
|
|
1694
1702
|
}
|
|
1695
|
-
export interface
|
|
1696
|
-
|
|
1703
|
+
export interface CompatibilityApproval {
|
|
1704
|
+
source: "source_pr" | "draft_pr";
|
|
1697
1705
|
reason: string;
|
|
1698
1706
|
approved_by: string;
|
|
1699
|
-
|
|
1707
|
+
approved_sha: string;
|
|
1700
1708
|
/** Format: date-time */
|
|
1701
1709
|
approved_at: string;
|
|
1702
1710
|
}
|
|
1703
|
-
/** Response shape for
|
|
1704
|
-
export interface
|
|
1705
|
-
|
|
1711
|
+
/** Response shape for CompatibilityApproval. */
|
|
1712
|
+
export interface CompatibilityApprovalRead {
|
|
1713
|
+
source: ("source_pr" | "draft_pr") | (string & {});
|
|
1706
1714
|
reason: string;
|
|
1707
1715
|
approved_by: string;
|
|
1708
|
-
|
|
1716
|
+
approved_sha: string;
|
|
1709
1717
|
/** Format: date-time */
|
|
1710
1718
|
approved_at: string;
|
|
1711
1719
|
}
|
|
1712
1720
|
export interface TargetAdoption {
|
|
1713
|
-
/** Exact already-published package version to make
|
|
1721
|
+
/** Exact already-published package version to make the latest release. */
|
|
1714
1722
|
version: string;
|
|
1715
1723
|
/** Immutable repository tag containing the matching package source. */
|
|
1716
1724
|
tag: string;
|
|
1717
1725
|
}
|
|
1718
|
-
export interface
|
|
1719
|
-
|
|
1720
|
-
message: string;
|
|
1721
|
-
}
|
|
1722
|
-
/** Response shape for RepositoryHealthIssue. */
|
|
1723
|
-
export interface RepositoryHealthIssueRead {
|
|
1724
|
-
code: ("connection_missing" | "definition_unreadable" | "contents_write_missing" | "review_write_missing" | "breaking_acknowledgement_missing" | "provider_unavailable") | (string & {});
|
|
1725
|
-
message: string;
|
|
1726
|
-
}
|
|
1727
|
-
export interface RepositoryHealth {
|
|
1728
|
-
repository: RepositoryReferenceResponse;
|
|
1729
|
-
roles: Array<"source" | "destination">;
|
|
1730
|
-
status: "ready" | "action_required";
|
|
1731
|
-
default_branch?: string;
|
|
1732
|
-
capabilities?: string[];
|
|
1733
|
-
/**
|
|
1734
|
-
* Whether a source repository has the optional typeship:breaking-approved policy label. Null when
|
|
1735
|
-
* the repository is not a source or labels could not be read.
|
|
1736
|
-
*/
|
|
1737
|
-
breaking_acknowledgement?: boolean | null;
|
|
1738
|
-
definition?: "readable" | "missing";
|
|
1739
|
-
issues: RepositoryHealthIssue[];
|
|
1740
|
-
}
|
|
1741
|
-
/** Response shape for RepositoryHealth. */
|
|
1742
|
-
export interface RepositoryHealthRead {
|
|
1743
|
-
repository: RepositoryReferenceResponseRead;
|
|
1744
|
-
roles: Array<("source" | "destination") | (string & {})>;
|
|
1745
|
-
status: ("ready" | "action_required") | (string & {});
|
|
1746
|
-
default_branch?: string;
|
|
1747
|
-
capabilities?: string[];
|
|
1748
|
-
/**
|
|
1749
|
-
* Whether a source repository has the optional typeship:breaking-approved policy label. Null when
|
|
1750
|
-
* the repository is not a source or labels could not be read.
|
|
1751
|
-
*/
|
|
1752
|
-
breaking_acknowledgement?: boolean | null;
|
|
1753
|
-
definition?: ("readable" | "missing") | (string & {});
|
|
1754
|
-
issues: RepositoryHealthIssueRead[];
|
|
1755
|
-
}
|
|
1756
|
-
export interface RepositoryEventHealth {
|
|
1757
|
-
provider: string;
|
|
1758
|
-
id: string;
|
|
1759
|
-
event: string;
|
|
1760
|
-
status: "queued" | "processing" | "succeeded" | "failed" | "superseded";
|
|
1761
|
-
error: string | null;
|
|
1762
|
-
/** Format: date-time */
|
|
1763
|
-
created_at: string;
|
|
1764
|
-
}
|
|
1765
|
-
/** Response shape for RepositoryEventHealth. */
|
|
1766
|
-
export interface RepositoryEventHealthRead {
|
|
1767
|
-
provider: string;
|
|
1768
|
-
id: string;
|
|
1769
|
-
event: string;
|
|
1770
|
-
status: ("queued" | "processing" | "succeeded" | "failed" | "superseded") | (string & {});
|
|
1771
|
-
error: string | null;
|
|
1772
|
-
/** Format: date-time */
|
|
1773
|
-
created_at: string;
|
|
1774
|
-
}
|
|
1775
|
-
export interface RepositoryIntegrationHealth {
|
|
1776
|
-
object: "repository_integration_health";
|
|
1777
|
-
project_id: ProjectId;
|
|
1778
|
-
status: "ready" | "action_required";
|
|
1779
|
-
repositories: RepositoryHealth[];
|
|
1780
|
-
required_checks: {
|
|
1781
|
-
source: string[];
|
|
1782
|
-
destination: string[];
|
|
1783
|
-
};
|
|
1784
|
-
last_event: RepositoryEventHealth | null;
|
|
1785
|
-
request_id: RequestId;
|
|
1786
|
-
}
|
|
1787
|
-
/** Response shape for RepositoryIntegrationHealth. */
|
|
1788
|
-
export interface RepositoryIntegrationHealthRead {
|
|
1789
|
-
object: "repository_integration_health" | (string & {});
|
|
1790
|
-
project_id: ProjectId;
|
|
1791
|
-
status: ("ready" | "action_required") | (string & {});
|
|
1792
|
-
repositories: RepositoryHealthRead[];
|
|
1793
|
-
required_checks: {
|
|
1794
|
-
source: string[];
|
|
1795
|
-
destination: string[];
|
|
1796
|
-
};
|
|
1797
|
-
last_event: RepositoryEventHealthRead | null;
|
|
1798
|
-
request_id: RequestId;
|
|
1799
|
-
}
|
|
1800
|
-
export interface DefinitionFields {
|
|
1801
|
-
source: DefinitionSourceInput;
|
|
1726
|
+
export interface SpecFields {
|
|
1727
|
+
source: SpecSourceInput;
|
|
1802
1728
|
/** Default: [] */
|
|
1803
|
-
patches?:
|
|
1729
|
+
patches?: SpecPatch[];
|
|
1804
1730
|
/** GraphQL-only endpoint, auth, environment, title, and scalar settings. */
|
|
1805
1731
|
graphql?: GraphqlSettings | null;
|
|
1806
1732
|
diagnostic_policy?: DiagnosticPolicy;
|
|
1807
1733
|
}
|
|
1808
|
-
/** Response shape for
|
|
1809
|
-
export interface
|
|
1810
|
-
source:
|
|
1734
|
+
/** Response shape for SpecFields. */
|
|
1735
|
+
export interface SpecFieldsRead {
|
|
1736
|
+
source: SpecSourceInputRead;
|
|
1811
1737
|
/** Default: [] */
|
|
1812
|
-
patches?:
|
|
1738
|
+
patches?: SpecPatchRead[];
|
|
1813
1739
|
/** GraphQL-only endpoint, auth, environment, title, and scalar settings. */
|
|
1814
1740
|
graphql?: GraphqlSettingsRead | null;
|
|
1815
1741
|
diagnostic_policy?: DiagnosticPolicyRead;
|
|
1816
1742
|
}
|
|
1817
|
-
export interface
|
|
1818
|
-
id:
|
|
1819
|
-
object: "
|
|
1743
|
+
export interface Spec {
|
|
1744
|
+
id: SpecId;
|
|
1745
|
+
object: "spec";
|
|
1820
1746
|
project_id: ProjectId;
|
|
1821
|
-
source:
|
|
1747
|
+
source: SpecSource;
|
|
1822
1748
|
format: "openapi" | "graphql" | null;
|
|
1823
|
-
patches:
|
|
1749
|
+
patches: SpecPatchResponse[];
|
|
1824
1750
|
graphql: GraphqlSettingsResponse | null;
|
|
1825
1751
|
diagnostic_policy: DiagnosticPolicyResponse;
|
|
1826
|
-
|
|
1752
|
+
revision_latest_id: SpecRevisionId | null;
|
|
1827
1753
|
/** Format: date-time */
|
|
1828
1754
|
created_at: string;
|
|
1829
1755
|
/** Format: date-time */
|
|
1830
1756
|
updated_at: string;
|
|
1831
1757
|
request_id: RequestId;
|
|
1832
1758
|
}
|
|
1833
|
-
/** Request shape for
|
|
1834
|
-
export interface
|
|
1835
|
-
id:
|
|
1836
|
-
object: "
|
|
1759
|
+
/** Request shape for Spec. */
|
|
1760
|
+
export interface SpecWrite {
|
|
1761
|
+
id: SpecId;
|
|
1762
|
+
object: "spec";
|
|
1837
1763
|
project_id: ProjectId;
|
|
1838
|
-
source:
|
|
1764
|
+
source: SpecSourceWrite;
|
|
1839
1765
|
format: "openapi" | "graphql" | null;
|
|
1840
|
-
patches:
|
|
1766
|
+
patches: SpecPatchResponse[];
|
|
1841
1767
|
graphql: GraphqlSettingsResponse | null;
|
|
1842
1768
|
diagnostic_policy: DiagnosticPolicyResponse;
|
|
1843
|
-
|
|
1769
|
+
revision_latest_id: SpecRevisionId | null;
|
|
1844
1770
|
/** Format: date-time */
|
|
1845
1771
|
created_at: string;
|
|
1846
1772
|
/** Format: date-time */
|
|
1847
1773
|
updated_at: string;
|
|
1848
1774
|
request_id: RequestId;
|
|
1849
1775
|
}
|
|
1850
|
-
/** Response shape for
|
|
1851
|
-
export interface
|
|
1852
|
-
id:
|
|
1853
|
-
object: "
|
|
1776
|
+
/** Response shape for Spec. */
|
|
1777
|
+
export interface SpecRead {
|
|
1778
|
+
id: SpecId;
|
|
1779
|
+
object: "spec" | (string & {});
|
|
1854
1780
|
project_id: ProjectId;
|
|
1855
|
-
source:
|
|
1781
|
+
source: SpecSourceRead;
|
|
1856
1782
|
format: ("openapi" | "graphql" | null) | (string & {}) | null;
|
|
1857
|
-
patches:
|
|
1783
|
+
patches: SpecPatchResponseRead[];
|
|
1858
1784
|
graphql: GraphqlSettingsResponseRead | null;
|
|
1859
1785
|
diagnostic_policy: DiagnosticPolicyResponseRead;
|
|
1860
|
-
|
|
1786
|
+
revision_latest_id: SpecRevisionId | null;
|
|
1861
1787
|
/** Format: date-time */
|
|
1862
1788
|
created_at: string;
|
|
1863
1789
|
/** Format: date-time */
|
|
@@ -1869,49 +1795,42 @@ export interface DefinitionRead {
|
|
|
1869
1795
|
* headers are preserved when the URL is unchanged and headers are omitted; null or empty headers
|
|
1870
1796
|
* clear them.
|
|
1871
1797
|
*/
|
|
1872
|
-
export interface
|
|
1873
|
-
source?:
|
|
1798
|
+
export interface SpecUpdateRequest {
|
|
1799
|
+
source?: SpecSourceInput;
|
|
1874
1800
|
/** Replace all patches in order. An empty array removes every patch; null is invalid. */
|
|
1875
|
-
patches?:
|
|
1801
|
+
patches?: SpecPatch[];
|
|
1876
1802
|
/** Replace all GraphQL settings. Null or an empty object clears them. */
|
|
1877
1803
|
graphql?: GraphqlSettings | null;
|
|
1878
1804
|
/** Replace the complete policy and suppression list. Null and an empty object are invalid. */
|
|
1879
1805
|
diagnostic_policy?: DiagnosticPolicy;
|
|
1880
1806
|
}
|
|
1881
|
-
/** Response shape for
|
|
1882
|
-
export interface
|
|
1883
|
-
source?:
|
|
1807
|
+
/** Response shape for SpecUpdateRequest. */
|
|
1808
|
+
export interface SpecUpdateRequestRead {
|
|
1809
|
+
source?: SpecSourceInputRead;
|
|
1884
1810
|
/** Replace all patches in order. An empty array removes every patch; null is invalid. */
|
|
1885
|
-
patches?:
|
|
1811
|
+
patches?: SpecPatchRead[];
|
|
1886
1812
|
/** Replace all GraphQL settings. Null or an empty object clears them. */
|
|
1887
1813
|
graphql?: GraphqlSettingsRead | null;
|
|
1888
1814
|
/** Replace the complete policy and suppression list. Null and an empty object are invalid. */
|
|
1889
1815
|
diagnostic_policy?: DiagnosticPolicyRead;
|
|
1890
1816
|
}
|
|
1891
1817
|
/**
|
|
1892
|
-
* Project-owned identity,
|
|
1893
|
-
*
|
|
1818
|
+
* Project-owned identity, Spec reference, generation controls, and shared configuration. Targets
|
|
1819
|
+
* and Deliveries are available only through their canonical Target endpoints.
|
|
1894
1820
|
*/
|
|
1895
1821
|
export interface Project {
|
|
1896
1822
|
id: ProjectId;
|
|
1897
1823
|
object: "project";
|
|
1898
1824
|
name: string;
|
|
1899
|
-
|
|
1825
|
+
spec_id: SpecId;
|
|
1900
1826
|
/**
|
|
1901
|
-
* Regenerate when the
|
|
1902
|
-
*
|
|
1903
|
-
* you asked for. Off means only "generate now" and POST /projects/{project_id}/generations
|
|
1904
|
-
* regenerate.
|
|
1827
|
+
* Regenerate when the Spec or saved configuration changes. Enabled by default for new Projects.
|
|
1828
|
+
* Set false to generate only when requested.
|
|
1905
1829
|
*/
|
|
1906
1830
|
auto_generate: boolean;
|
|
1907
|
-
/**
|
|
1908
|
-
* Whether the webhook relay is on, letting the generated CLI's webhooks listen command mint relay
|
|
1909
|
-
* sessions. Requires the cli target and Pro; turning the target off turns this off.
|
|
1910
|
-
*/
|
|
1911
|
-
relay_enabled: boolean;
|
|
1912
1831
|
/**
|
|
1913
1832
|
* Shared defaults inherited by every Target. A Target's config overrides these defaults; GraphQL
|
|
1914
|
-
* settings remain
|
|
1833
|
+
* settings remain Spec-owned.
|
|
1915
1834
|
*/
|
|
1916
1835
|
config: ProjectConfigResponse | null;
|
|
1917
1836
|
/** Format: date-time */
|
|
@@ -1926,22 +1845,15 @@ export interface Project {
|
|
|
1926
1845
|
/** Request shape for Project. */
|
|
1927
1846
|
export interface ProjectWrite {
|
|
1928
1847
|
name: string;
|
|
1929
|
-
|
|
1848
|
+
spec_id: SpecId;
|
|
1930
1849
|
/**
|
|
1931
|
-
* Regenerate when the
|
|
1932
|
-
*
|
|
1933
|
-
* you asked for. Off means only "generate now" and POST /projects/{project_id}/generations
|
|
1934
|
-
* regenerate.
|
|
1850
|
+
* Regenerate when the Spec or saved configuration changes. Enabled by default for new Projects.
|
|
1851
|
+
* Set false to generate only when requested.
|
|
1935
1852
|
*/
|
|
1936
1853
|
auto_generate: boolean;
|
|
1937
|
-
/**
|
|
1938
|
-
* Whether the webhook relay is on, letting the generated CLI's webhooks listen command mint relay
|
|
1939
|
-
* sessions. Requires the cli target and Pro; turning the target off turns this off.
|
|
1940
|
-
*/
|
|
1941
|
-
relay_enabled: boolean;
|
|
1942
1854
|
/**
|
|
1943
1855
|
* Shared defaults inherited by every Target. A Target's config overrides these defaults; GraphQL
|
|
1944
|
-
* settings remain
|
|
1856
|
+
* settings remain Spec-owned.
|
|
1945
1857
|
*/
|
|
1946
1858
|
config: ProjectConfigResponse | null;
|
|
1947
1859
|
request_id: RequestId;
|
|
@@ -1951,22 +1863,15 @@ export interface ProjectRead {
|
|
|
1951
1863
|
id: ProjectId;
|
|
1952
1864
|
object: "project" | (string & {});
|
|
1953
1865
|
name: string;
|
|
1954
|
-
|
|
1866
|
+
spec_id: SpecId;
|
|
1955
1867
|
/**
|
|
1956
|
-
* Regenerate when the
|
|
1957
|
-
*
|
|
1958
|
-
* you asked for. Off means only "generate now" and POST /projects/{project_id}/generations
|
|
1959
|
-
* regenerate.
|
|
1868
|
+
* Regenerate when the Spec or saved configuration changes. Enabled by default for new Projects.
|
|
1869
|
+
* Set false to generate only when requested.
|
|
1960
1870
|
*/
|
|
1961
1871
|
auto_generate: boolean;
|
|
1962
|
-
/**
|
|
1963
|
-
* Whether the webhook relay is on, letting the generated CLI's webhooks listen command mint relay
|
|
1964
|
-
* sessions. Requires the cli target and Pro; turning the target off turns this off.
|
|
1965
|
-
*/
|
|
1966
|
-
relay_enabled: boolean;
|
|
1967
1872
|
/**
|
|
1968
1873
|
* Shared defaults inherited by every Target. A Target's config overrides these defaults; GraphQL
|
|
1969
|
-
* settings remain
|
|
1874
|
+
* settings remain Spec-owned.
|
|
1970
1875
|
*/
|
|
1971
1876
|
config: ProjectConfigResponseRead | null;
|
|
1972
1877
|
/** Format: date-time */
|
|
@@ -1986,7 +1891,7 @@ export interface ProjectSummary {
|
|
|
1986
1891
|
id: ProjectId;
|
|
1987
1892
|
object: "project";
|
|
1988
1893
|
name: string;
|
|
1989
|
-
|
|
1894
|
+
spec_id: SpecId;
|
|
1990
1895
|
auto_generate: boolean;
|
|
1991
1896
|
/** Format: date-time */
|
|
1992
1897
|
created_at: string;
|
|
@@ -1998,7 +1903,7 @@ export interface ProjectSummaryRead {
|
|
|
1998
1903
|
id: ProjectId;
|
|
1999
1904
|
object: "project" | (string & {});
|
|
2000
1905
|
name: string;
|
|
2001
|
-
|
|
1906
|
+
spec_id: SpecId;
|
|
2002
1907
|
auto_generate: boolean;
|
|
2003
1908
|
/** Format: date-time */
|
|
2004
1909
|
created_at: string;
|
|
@@ -2007,52 +1912,42 @@ export interface ProjectSummaryRead {
|
|
|
2007
1912
|
}
|
|
2008
1913
|
export interface CreateProjectRequest {
|
|
2009
1914
|
name: string;
|
|
2010
|
-
|
|
1915
|
+
spec: SpecFields;
|
|
2011
1916
|
/**
|
|
2012
1917
|
* Initial first-class Targets. More than one may use the same generator with different identities
|
|
2013
1918
|
* or Deliveries.
|
|
2014
1919
|
*/
|
|
2015
1920
|
targets: InitialTargetFields[];
|
|
2016
1921
|
/**
|
|
2017
|
-
* Whether Typeship should regenerate automatically when the source
|
|
2018
|
-
*
|
|
1922
|
+
* Whether Typeship should regenerate automatically when the source or saved configuration
|
|
1923
|
+
* changes.
|
|
1924
|
+
* Default: true
|
|
2019
1925
|
*/
|
|
2020
1926
|
auto_generate?: boolean;
|
|
2021
|
-
/**
|
|
2022
|
-
* Enable webhook relay sessions. Requires the CLI target and Pro.
|
|
2023
|
-
* Default: false
|
|
2024
|
-
*/
|
|
2025
|
-
relay_enabled?: boolean;
|
|
2026
|
-
/** Shared defaults inherited by every Target. GraphQL settings belong in definition.graphql. */
|
|
1927
|
+
/** Shared defaults inherited by every Target. GraphQL settings belong in spec.graphql. */
|
|
2027
1928
|
config?: ProjectConfig | null;
|
|
2028
1929
|
}
|
|
2029
1930
|
/** Response shape for CreateProjectRequest. */
|
|
2030
1931
|
export interface CreateProjectRequestRead {
|
|
2031
1932
|
name: string;
|
|
2032
|
-
|
|
1933
|
+
spec: SpecFieldsRead;
|
|
2033
1934
|
/**
|
|
2034
1935
|
* Initial first-class Targets. More than one may use the same generator with different identities
|
|
2035
1936
|
* or Deliveries.
|
|
2036
1937
|
*/
|
|
2037
1938
|
targets: InitialTargetFieldsRead[];
|
|
2038
1939
|
/**
|
|
2039
|
-
* Whether Typeship should regenerate automatically when the source
|
|
2040
|
-
*
|
|
1940
|
+
* Whether Typeship should regenerate automatically when the source or saved configuration
|
|
1941
|
+
* changes.
|
|
1942
|
+
* Default: true
|
|
2041
1943
|
*/
|
|
2042
1944
|
auto_generate?: boolean;
|
|
2043
|
-
/**
|
|
2044
|
-
* Enable webhook relay sessions. Requires the CLI target and Pro.
|
|
2045
|
-
* Default: false
|
|
2046
|
-
*/
|
|
2047
|
-
relay_enabled?: boolean;
|
|
2048
|
-
/** Shared defaults inherited by every Target. GraphQL settings belong in definition.graphql. */
|
|
1945
|
+
/** Shared defaults inherited by every Target. GraphQL settings belong in spec.graphql. */
|
|
2049
1946
|
config?: ProjectConfigRead | null;
|
|
2050
1947
|
}
|
|
2051
1948
|
export interface UpdateProjectRequest {
|
|
2052
1949
|
name?: string;
|
|
2053
1950
|
auto_generate?: boolean;
|
|
2054
|
-
/** Enable webhook relay sessions. Requires the CLI target and Pro. */
|
|
2055
|
-
relay_enabled?: boolean;
|
|
2056
1951
|
/** Replaces the Project's shared Target defaults. Send null to clear them. */
|
|
2057
1952
|
config?: ProjectConfig | null;
|
|
2058
1953
|
}
|
|
@@ -2060,8 +1955,6 @@ export interface UpdateProjectRequest {
|
|
|
2060
1955
|
export interface UpdateProjectRequestRead {
|
|
2061
1956
|
name?: string;
|
|
2062
1957
|
auto_generate?: boolean;
|
|
2063
|
-
/** Enable webhook relay sessions. Requires the CLI target and Pro. */
|
|
2064
|
-
relay_enabled?: boolean;
|
|
2065
1958
|
/** Replaces the Project's shared Target defaults. Send null to clear them. */
|
|
2066
1959
|
config?: ProjectConfigRead | null;
|
|
2067
1960
|
}
|
|
@@ -2069,25 +1962,43 @@ export interface UpdateProjectRequestRead {
|
|
|
2069
1962
|
* The organization an API key belongs to. Members share its projects, keys, and plan; sign-in
|
|
2070
1963
|
* identity is not part of the API.
|
|
2071
1964
|
*/
|
|
2072
|
-
export interface
|
|
1965
|
+
export interface Organization {
|
|
1966
|
+
/** Opaque, output-only organization identifier. Copy it unchanged; its format is not a contract. */
|
|
2073
1967
|
id: string;
|
|
2074
|
-
object: "
|
|
1968
|
+
object: "organization";
|
|
1969
|
+
/** The organization's display name. */
|
|
1970
|
+
name: string;
|
|
1971
|
+
plan: "free" | "pro" | "enterprise";
|
|
1972
|
+
/** Format: date-time */
|
|
1973
|
+
created_at: string;
|
|
1974
|
+
/** Format: date-time */
|
|
1975
|
+
updated_at: string;
|
|
1976
|
+
request_id: RequestId;
|
|
1977
|
+
}
|
|
1978
|
+
/** Request shape for Organization. */
|
|
1979
|
+
export interface OrganizationWrite {
|
|
1980
|
+
object: "organization";
|
|
2075
1981
|
/** The organization's display name. */
|
|
2076
1982
|
name: string;
|
|
2077
1983
|
plan: "free" | "pro" | "enterprise";
|
|
2078
1984
|
/** Format: date-time */
|
|
2079
1985
|
created_at: string;
|
|
1986
|
+
/** Format: date-time */
|
|
1987
|
+
updated_at: string;
|
|
2080
1988
|
request_id: RequestId;
|
|
2081
1989
|
}
|
|
2082
|
-
/** Response shape for
|
|
2083
|
-
export interface
|
|
1990
|
+
/** Response shape for Organization. */
|
|
1991
|
+
export interface OrganizationRead {
|
|
1992
|
+
/** Opaque, output-only organization identifier. Copy it unchanged; its format is not a contract. */
|
|
2084
1993
|
id: string;
|
|
2085
|
-
object: "
|
|
1994
|
+
object: "organization" | (string & {});
|
|
2086
1995
|
/** The organization's display name. */
|
|
2087
1996
|
name: string;
|
|
2088
1997
|
plan: ("free" | "pro" | "enterprise") | (string & {});
|
|
2089
1998
|
/** Format: date-time */
|
|
2090
1999
|
created_at: string;
|
|
2000
|
+
/** Format: date-time */
|
|
2001
|
+
updated_at: string;
|
|
2091
2002
|
request_id: RequestId;
|
|
2092
2003
|
}
|
|
2093
2004
|
/**
|
|
@@ -2231,7 +2142,35 @@ export interface TargetAuthenticationConfig {
|
|
|
2231
2142
|
environments?: Record<string, TargetAuthenticationEnvironment> | null;
|
|
2232
2143
|
}
|
|
2233
2144
|
/** How the generated CLI behaves. Part of Config. */
|
|
2234
|
-
export interface CliBehavior {
|
|
2145
|
+
export interface CliBehavior {
|
|
2146
|
+
/** Command users run, independent of how the CLI is distributed. */
|
|
2147
|
+
command_name?: string | null;
|
|
2148
|
+
/**
|
|
2149
|
+
* Opt in to a once-a-day registry check that prints an upgrade hint. Off by default; generated
|
|
2150
|
+
* code phones nobody unless this is enabled.
|
|
2151
|
+
*/
|
|
2152
|
+
update_notice?: boolean;
|
|
2153
|
+
/**
|
|
2154
|
+
* Public HTTP(S) URL read by the optional changelog command in generated CLIs. Supports UTF-8
|
|
2155
|
+
* Markdown, plain text, and static HTML; embedded credentials are not allowed. Omit or clear to
|
|
2156
|
+
* disable, then regenerate.
|
|
2157
|
+
*/
|
|
2158
|
+
changelog_url?: string | null;
|
|
2159
|
+
/**
|
|
2160
|
+
* Where the generated CLI's feedback command sends users. GitHub issues/new URLs get a prefilled
|
|
2161
|
+
* title and environment details.
|
|
2162
|
+
*/
|
|
2163
|
+
support_url?: string | null;
|
|
2164
|
+
/**
|
|
2165
|
+
* Hosted MCP endpoint installed by the generated CLI instead of launching the package's local
|
|
2166
|
+
* stdio server.
|
|
2167
|
+
*/
|
|
2168
|
+
mcp_url?: string | null;
|
|
2169
|
+
/** GitHub owner/name of the skills package the generated CLI offers to install during init. */
|
|
2170
|
+
skills_repo?: string | null;
|
|
2171
|
+
}
|
|
2172
|
+
/** How the generated CLI behaves. Part of Config. */
|
|
2173
|
+
export interface TargetCliBehavior {
|
|
2235
2174
|
/** Command users run, independent of how the CLI is distributed. */
|
|
2236
2175
|
command_name?: string | null;
|
|
2237
2176
|
/**
|
|
@@ -2257,6 +2196,11 @@ export interface CliBehavior {
|
|
|
2257
2196
|
mcp_url?: string | null;
|
|
2258
2197
|
/** GitHub owner/name of the skills package the generated CLI offers to install during init. */
|
|
2259
2198
|
skills_repo?: string | null;
|
|
2199
|
+
/**
|
|
2200
|
+
* Enable webhook relay sessions for this CLI Target. Requires Pro. Turning it off prevents new
|
|
2201
|
+
* sessions.
|
|
2202
|
+
*/
|
|
2203
|
+
relay?: boolean;
|
|
2260
2204
|
}
|
|
2261
2205
|
/** How generated MCP servers and the Typeship-hosted endpoint behave. Part of Config. */
|
|
2262
2206
|
export interface McpBehavior {
|
|
@@ -2409,11 +2353,10 @@ export interface PackageBehavior {
|
|
|
2409
2353
|
go_package_name?: string | null;
|
|
2410
2354
|
}
|
|
2411
2355
|
/**
|
|
2412
|
-
* Everything Typeship needs beyond the
|
|
2413
|
-
*
|
|
2414
|
-
*
|
|
2415
|
-
*
|
|
2416
|
-
* settings on their Definition.
|
|
2356
|
+
* Everything Typeship needs beyond the Spec, in one object: generation customization (globals,
|
|
2357
|
+
* retries, pagination, readme) and how the generated tooling behaves (cli, mcp, package, docs_url).
|
|
2358
|
+
* Plain configuration. Typeship never requires vendor extensions inside the Spec itself. One-shot
|
|
2359
|
+
* generation also accepts GraphQL settings here; stored projects keep those settings on their Spec.
|
|
2417
2360
|
*/
|
|
2418
2361
|
export interface Config {
|
|
2419
2362
|
/**
|
|
@@ -2436,8 +2379,8 @@ export interface Config {
|
|
|
2436
2379
|
package?: PackageBehavior;
|
|
2437
2380
|
/**
|
|
2438
2381
|
* The API's documentation site. Read through its llms.txt by the generated CLI's docs command,
|
|
2439
|
-
* the MCP server's docs tools, and the package's AGENTS.md. Defaults to the
|
|
2440
|
-
*
|
|
2382
|
+
* the MCP server's docs tools, and the package's AGENTS.md. Defaults to the Spec's externalDocs
|
|
2383
|
+
* URL.
|
|
2441
2384
|
* Format: uri
|
|
2442
2385
|
*/
|
|
2443
2386
|
docs_url?: string | null;
|
|
@@ -2469,8 +2412,8 @@ export interface ConfigRead {
|
|
|
2469
2412
|
package?: PackageBehavior;
|
|
2470
2413
|
/**
|
|
2471
2414
|
* The API's documentation site. Read through its llms.txt by the generated CLI's docs command,
|
|
2472
|
-
* the MCP server's docs tools, and the package's AGENTS.md. Defaults to the
|
|
2473
|
-
*
|
|
2415
|
+
* the MCP server's docs tools, and the package's AGENTS.md. Defaults to the Spec's externalDocs
|
|
2416
|
+
* URL.
|
|
2474
2417
|
* Format: uri
|
|
2475
2418
|
*/
|
|
2476
2419
|
docs_url?: string | null;
|
|
@@ -2484,7 +2427,7 @@ export interface ConfigRead {
|
|
|
2484
2427
|
* Shared generated-client and tooling behavior for a stored Project. Every Target inherits these
|
|
2485
2428
|
* defaults. Target.config is merged over them for one Target; top-level values replace defaults
|
|
2486
2429
|
* while cli, mcp, auth, readme, and package merge by field. GraphQL-only source settings live on
|
|
2487
|
-
* the Project's
|
|
2430
|
+
* the Project's Spec and are rejected in both stored config scopes.
|
|
2488
2431
|
*/
|
|
2489
2432
|
export interface ProjectConfig {
|
|
2490
2433
|
/**
|
|
@@ -2506,8 +2449,8 @@ export interface ProjectConfig {
|
|
|
2506
2449
|
package?: PackageBehavior;
|
|
2507
2450
|
/**
|
|
2508
2451
|
* The API's documentation site. Read through its llms.txt by the generated CLI's docs command,
|
|
2509
|
-
* the MCP server's docs tools, and the package's AGENTS.md. Defaults to the
|
|
2510
|
-
*
|
|
2452
|
+
* the MCP server's docs tools, and the package's AGENTS.md. Defaults to the Spec's externalDocs
|
|
2453
|
+
* URL.
|
|
2511
2454
|
* Format: uri
|
|
2512
2455
|
*/
|
|
2513
2456
|
docs_url?: string | null;
|
|
@@ -2538,8 +2481,8 @@ export interface ProjectConfigRead {
|
|
|
2538
2481
|
package?: PackageBehavior;
|
|
2539
2482
|
/**
|
|
2540
2483
|
* The API's documentation site. Read through its llms.txt by the generated CLI's docs command,
|
|
2541
|
-
* the MCP server's docs tools, and the package's AGENTS.md. Defaults to the
|
|
2542
|
-
*
|
|
2484
|
+
* the MCP server's docs tools, and the package's AGENTS.md. Defaults to the Spec's externalDocs
|
|
2485
|
+
* URL.
|
|
2543
2486
|
* Format: uri
|
|
2544
2487
|
*/
|
|
2545
2488
|
docs_url?: string | null;
|
|
@@ -2568,14 +2511,14 @@ export interface TargetConfig {
|
|
|
2568
2511
|
*/
|
|
2569
2512
|
pagination?: Record<string, PaginationRule | boolean>;
|
|
2570
2513
|
auth?: TargetAuthenticationConfig;
|
|
2571
|
-
cli?:
|
|
2514
|
+
cli?: TargetCliBehavior;
|
|
2572
2515
|
mcp?: McpBehavior;
|
|
2573
2516
|
readme?: ReadmeBehavior;
|
|
2574
2517
|
package?: PackageBehavior;
|
|
2575
2518
|
/**
|
|
2576
2519
|
* The API's documentation site. Read through its llms.txt by the generated CLI's docs command,
|
|
2577
|
-
* the MCP server's docs tools, and the package's AGENTS.md. Defaults to the
|
|
2578
|
-
*
|
|
2520
|
+
* the MCP server's docs tools, and the package's AGENTS.md. Defaults to the Spec's externalDocs
|
|
2521
|
+
* URL.
|
|
2579
2522
|
* Format: uri
|
|
2580
2523
|
*/
|
|
2581
2524
|
docs_url?: string | null;
|
|
@@ -2600,14 +2543,14 @@ export interface TargetConfigRead {
|
|
|
2600
2543
|
*/
|
|
2601
2544
|
pagination?: Record<string, PaginationRuleRead | boolean>;
|
|
2602
2545
|
auth?: TargetAuthenticationConfig;
|
|
2603
|
-
cli?:
|
|
2546
|
+
cli?: TargetCliBehavior;
|
|
2604
2547
|
mcp?: McpBehaviorRead;
|
|
2605
2548
|
readme?: ReadmeBehavior;
|
|
2606
2549
|
package?: PackageBehavior;
|
|
2607
2550
|
/**
|
|
2608
2551
|
* The API's documentation site. Read through its llms.txt by the generated CLI's docs command,
|
|
2609
|
-
* the MCP server's docs tools, and the package's AGENTS.md. Defaults to the
|
|
2610
|
-
*
|
|
2552
|
+
* the MCP server's docs tools, and the package's AGENTS.md. Defaults to the Spec's externalDocs
|
|
2553
|
+
* URL.
|
|
2611
2554
|
* Format: uri
|
|
2612
2555
|
*/
|
|
2613
2556
|
docs_url?: string | null;
|
|
@@ -2715,7 +2658,7 @@ export interface RetryTuning {
|
|
|
2715
2658
|
}
|
|
2716
2659
|
export interface PaginationRule {
|
|
2717
2660
|
/** Default: "cursor" */
|
|
2718
|
-
style?: "cursor" | "
|
|
2661
|
+
style?: "cursor" | "cursor_from_last_id" | "page" | "offset";
|
|
2719
2662
|
/** Response field holding the item array. */
|
|
2720
2663
|
items_field: string;
|
|
2721
2664
|
cursor_param?: string;
|
|
@@ -2729,7 +2672,7 @@ export interface PaginationRule {
|
|
|
2729
2672
|
/** Response shape for PaginationRule. */
|
|
2730
2673
|
export interface PaginationRuleRead {
|
|
2731
2674
|
/** Default: "cursor" */
|
|
2732
|
-
style?: ("cursor" | "
|
|
2675
|
+
style?: ("cursor" | "cursor_from_last_id" | "page" | "offset") | (string & {});
|
|
2733
2676
|
/** Response field holding the item array. */
|
|
2734
2677
|
items_field: string;
|
|
2735
2678
|
cursor_param?: string;
|
|
@@ -2752,199 +2695,117 @@ export interface FileStubRead {
|
|
|
2752
2695
|
mode: ("100644" | "100755") | (string & {});
|
|
2753
2696
|
}
|
|
2754
2697
|
/**
|
|
2755
|
-
* A Generation moves from queued to running, then
|
|
2698
|
+
* A Generation moves from queued to running, then completes when its files are saved or fails.
|
|
2756
2699
|
* Delivery and Draft status are separate.
|
|
2757
2700
|
*/
|
|
2758
2701
|
export declare const GenerationStatus: {
|
|
2759
2702
|
readonly QUEUED: "queued";
|
|
2760
2703
|
readonly RUNNING: "running";
|
|
2761
|
-
readonly
|
|
2704
|
+
readonly COMPLETED: "completed";
|
|
2762
2705
|
readonly FAILED: "failed";
|
|
2763
2706
|
};
|
|
2764
2707
|
export type GenerationStatus = (typeof GenerationStatus)[keyof typeof GenerationStatus];
|
|
2765
2708
|
export declare const GenerationTrigger: {
|
|
2766
2709
|
readonly MANUAL: "manual";
|
|
2767
|
-
readonly
|
|
2768
|
-
readonly
|
|
2710
|
+
readonly SPEC_CHANGED: "spec_changed";
|
|
2711
|
+
readonly CONFIG_CHANGED: "config_changed";
|
|
2769
2712
|
readonly PREVIEW: "preview";
|
|
2770
2713
|
};
|
|
2771
2714
|
export type GenerationTrigger = (typeof GenerationTrigger)[keyof typeof GenerationTrigger];
|
|
2772
|
-
export interface GenerationProvenance {
|
|
2773
|
-
/** Pinned generator contract edition. */
|
|
2774
|
-
generator_edition: string;
|
|
2775
|
-
/**
|
|
2776
|
-
* Recorded configuration for this Generation in the public Config format, including inherited
|
|
2777
|
-
* Project defaults and Target overrides. Later edits do not change it. Source credentials are
|
|
2778
|
-
* never included. Null when no configuration was recorded.
|
|
2779
|
-
*/
|
|
2780
|
-
resolved_config: ConfigResponse | null;
|
|
2781
|
-
package_version: string | null;
|
|
2782
|
-
}
|
|
2783
|
-
/** Response shape for GenerationProvenance. */
|
|
2784
|
-
export interface GenerationProvenanceRead {
|
|
2785
|
-
/** Pinned generator contract edition. */
|
|
2786
|
-
generator_edition: string;
|
|
2787
|
-
/**
|
|
2788
|
-
* Recorded configuration for this Generation in the public Config format, including inherited
|
|
2789
|
-
* Project defaults and Target overrides. Later edits do not change it. Source credentials are
|
|
2790
|
-
* never included. Null when no configuration was recorded.
|
|
2791
|
-
*/
|
|
2792
|
-
resolved_config: ConfigResponseRead | null;
|
|
2793
|
-
package_version: string | null;
|
|
2794
|
-
}
|
|
2795
2715
|
export interface Generation {
|
|
2796
2716
|
id: GenerationId;
|
|
2797
2717
|
object: "generation";
|
|
2798
|
-
/**
|
|
2799
|
-
* Present and true when the generated target was too large to inline; files_index lists paths,
|
|
2800
|
-
* fetched one at a time via GET /generations/{generation_id}/file.
|
|
2801
|
-
*/
|
|
2802
|
-
files_omitted?: boolean;
|
|
2803
|
-
files_index?: FileStub[];
|
|
2804
2718
|
project_id: ProjectId;
|
|
2805
|
-
|
|
2719
|
+
spec_revision_id: SpecRevisionId | null;
|
|
2806
2720
|
status: GenerationStatus;
|
|
2807
2721
|
trigger: GenerationTrigger;
|
|
2808
|
-
/** Persisted Target identity. Null only for one-shot generation. */
|
|
2809
2722
|
target_id: TargetId | null;
|
|
2810
|
-
|
|
2811
|
-
|
|
2812
|
-
|
|
2813
|
-
/**
|
|
2814
|
-
|
|
2815
|
-
warnings:
|
|
2816
|
-
/**
|
|
2817
|
-
|
|
2818
|
-
/**
|
|
2723
|
+
type: GeneratorKind;
|
|
2724
|
+
/** Package name; null until known. */
|
|
2725
|
+
name: string | null;
|
|
2726
|
+
/** Package version; null until known. */
|
|
2727
|
+
version: string | null;
|
|
2728
|
+
warnings: GenerationWarning[];
|
|
2729
|
+
/** Operation coverage; null until generation has finished. */
|
|
2730
|
+
coverage: GenerationCoverage | null;
|
|
2731
|
+
/** Generated package files. List them with listGenerationFiles. */
|
|
2732
|
+
file_count: number;
|
|
2819
2733
|
errors: DomainError[];
|
|
2734
|
+
/**
|
|
2735
|
+
* Milliseconds from the start of the run until it completed or failed; null while queued or
|
|
2736
|
+
* running.
|
|
2737
|
+
*/
|
|
2738
|
+
runtime_ms: number | null;
|
|
2820
2739
|
/** Format: date-time */
|
|
2821
2740
|
created_at: string;
|
|
2822
|
-
|
|
2741
|
+
/** Format: date-time */
|
|
2742
|
+
updated_at: string;
|
|
2823
2743
|
}
|
|
2824
2744
|
/** Request shape for Generation. */
|
|
2825
2745
|
export interface GenerationWrite {
|
|
2826
2746
|
id: GenerationId;
|
|
2827
|
-
/**
|
|
2828
|
-
* Present and true when the generated target was too large to inline; files_index lists paths,
|
|
2829
|
-
* fetched one at a time via GET /generations/{generation_id}/file.
|
|
2830
|
-
*/
|
|
2831
|
-
files_omitted?: boolean;
|
|
2832
|
-
files_index?: FileStub[];
|
|
2833
2747
|
project_id: ProjectId;
|
|
2834
|
-
|
|
2748
|
+
spec_revision_id: SpecRevisionId | null;
|
|
2835
2749
|
status: GenerationStatus;
|
|
2836
2750
|
trigger: GenerationTrigger;
|
|
2837
|
-
/** Persisted Target identity. Null only for one-shot generation. */
|
|
2838
2751
|
target_id: TargetId | null;
|
|
2839
|
-
|
|
2840
|
-
|
|
2841
|
-
|
|
2842
|
-
/**
|
|
2843
|
-
|
|
2844
|
-
warnings:
|
|
2845
|
-
/**
|
|
2846
|
-
|
|
2847
|
-
/**
|
|
2752
|
+
type: GeneratorKind;
|
|
2753
|
+
/** Package name; null until known. */
|
|
2754
|
+
name: string | null;
|
|
2755
|
+
/** Package version; null until known. */
|
|
2756
|
+
version: string | null;
|
|
2757
|
+
warnings: GenerationWarning[];
|
|
2758
|
+
/** Operation coverage; null until generation has finished. */
|
|
2759
|
+
coverage: GenerationCoverage | null;
|
|
2760
|
+
/** Generated package files. List them with listGenerationFiles. */
|
|
2761
|
+
file_count: number;
|
|
2848
2762
|
errors: DomainError[];
|
|
2763
|
+
/**
|
|
2764
|
+
* Milliseconds from the start of the run until it completed or failed; null while queued or
|
|
2765
|
+
* running.
|
|
2766
|
+
*/
|
|
2767
|
+
runtime_ms: number | null;
|
|
2849
2768
|
/** Format: date-time */
|
|
2850
2769
|
created_at: string;
|
|
2851
|
-
|
|
2770
|
+
/** Format: date-time */
|
|
2771
|
+
updated_at: string;
|
|
2852
2772
|
}
|
|
2853
2773
|
/** Response shape for Generation. */
|
|
2854
2774
|
export interface GenerationRead {
|
|
2855
2775
|
id: GenerationId;
|
|
2856
2776
|
object: "generation" | (string & {});
|
|
2857
|
-
/**
|
|
2858
|
-
* Present and true when the generated target was too large to inline; files_index lists paths,
|
|
2859
|
-
* fetched one at a time via GET /generations/{generation_id}/file.
|
|
2860
|
-
*/
|
|
2861
|
-
files_omitted?: boolean;
|
|
2862
|
-
files_index?: FileStubRead[];
|
|
2863
2777
|
project_id: ProjectId;
|
|
2864
|
-
|
|
2778
|
+
spec_revision_id: SpecRevisionId | null;
|
|
2865
2779
|
status: GenerationStatus | (string & {});
|
|
2866
2780
|
trigger: GenerationTrigger | (string & {});
|
|
2867
|
-
/** Persisted Target identity. Null only for one-shot generation. */
|
|
2868
2781
|
target_id: TargetId | null;
|
|
2869
|
-
|
|
2870
|
-
|
|
2871
|
-
|
|
2872
|
-
/**
|
|
2873
|
-
|
|
2874
|
-
warnings:
|
|
2875
|
-
/**
|
|
2876
|
-
|
|
2877
|
-
/**
|
|
2782
|
+
type: GeneratorKind | (string & {});
|
|
2783
|
+
/** Package name; null until known. */
|
|
2784
|
+
name: string | null;
|
|
2785
|
+
/** Package version; null until known. */
|
|
2786
|
+
version: string | null;
|
|
2787
|
+
warnings: GenerationWarning[];
|
|
2788
|
+
/** Operation coverage; null until generation has finished. */
|
|
2789
|
+
coverage: GenerationCoverageRead | null;
|
|
2790
|
+
/** Generated package files. List them with listGenerationFiles. */
|
|
2791
|
+
file_count: number;
|
|
2878
2792
|
errors: DomainErrorRead[];
|
|
2793
|
+
/**
|
|
2794
|
+
* Milliseconds from the start of the run until it completed or failed; null while queued or
|
|
2795
|
+
* running.
|
|
2796
|
+
*/
|
|
2797
|
+
runtime_ms: number | null;
|
|
2879
2798
|
/** Format: date-time */
|
|
2880
2799
|
created_at: string;
|
|
2881
|
-
request_id?: RequestId;
|
|
2882
|
-
}
|
|
2883
|
-
/**
|
|
2884
|
-
* Generation metadata returned by collection endpoints. Generated file contents and file indexes
|
|
2885
|
-
* are available only from retrieve and create operations.
|
|
2886
|
-
*/
|
|
2887
|
-
export interface GenerationSummary {
|
|
2888
|
-
id: GenerationId;
|
|
2889
|
-
object: "generation";
|
|
2890
|
-
project_id: ProjectId;
|
|
2891
|
-
definition_revision_id: DefinitionRevisionId | null;
|
|
2892
|
-
status: GenerationStatus;
|
|
2893
|
-
trigger: GenerationTrigger;
|
|
2894
|
-
/** Persisted Target identity. Null only for one-shot generation. */
|
|
2895
|
-
target_id: TargetId | null;
|
|
2896
|
-
/** Resolved generator implementation; provenance rather than resource identity. */
|
|
2897
|
-
generator: GeneratorKind;
|
|
2898
|
-
provenance: GenerationProvenance;
|
|
2899
|
-
/** Null only for a failed or legacy generation that produced no metadata. */
|
|
2900
|
-
meta: GenerationMeta | null;
|
|
2901
|
-
warnings: string[];
|
|
2902
|
-
/** Recorded failures. Empty when this resource has no recorded failure. */
|
|
2903
|
-
errors: DomainError[];
|
|
2904
2800
|
/** Format: date-time */
|
|
2905
|
-
|
|
2801
|
+
updated_at: string;
|
|
2906
2802
|
}
|
|
2803
|
+
/** Generation metadata returned by collection endpoints. */
|
|
2804
|
+
export type GenerationSummary = Generation;
|
|
2907
2805
|
/** Request shape for GenerationSummary. */
|
|
2908
|
-
export
|
|
2909
|
-
id: GenerationId;
|
|
2910
|
-
project_id: ProjectId;
|
|
2911
|
-
definition_revision_id: DefinitionRevisionId | null;
|
|
2912
|
-
status: GenerationStatus;
|
|
2913
|
-
trigger: GenerationTrigger;
|
|
2914
|
-
/** Persisted Target identity. Null only for one-shot generation. */
|
|
2915
|
-
target_id: TargetId | null;
|
|
2916
|
-
/** Resolved generator implementation; provenance rather than resource identity. */
|
|
2917
|
-
generator: GeneratorKind;
|
|
2918
|
-
provenance: GenerationProvenance;
|
|
2919
|
-
/** Null only for a failed or legacy generation that produced no metadata. */
|
|
2920
|
-
meta: GenerationMeta | null;
|
|
2921
|
-
warnings: string[];
|
|
2922
|
-
/** Recorded failures. Empty when this resource has no recorded failure. */
|
|
2923
|
-
errors: DomainError[];
|
|
2924
|
-
/** Format: date-time */
|
|
2925
|
-
created_at: string;
|
|
2926
|
-
}
|
|
2806
|
+
export type GenerationSummaryWrite = GenerationWrite;
|
|
2927
2807
|
/** Response shape for GenerationSummary. */
|
|
2928
|
-
export
|
|
2929
|
-
id: GenerationId;
|
|
2930
|
-
object: "generation" | (string & {});
|
|
2931
|
-
project_id: ProjectId;
|
|
2932
|
-
definition_revision_id: DefinitionRevisionId | null;
|
|
2933
|
-
status: GenerationStatus | (string & {});
|
|
2934
|
-
trigger: GenerationTrigger | (string & {});
|
|
2935
|
-
/** Persisted Target identity. Null only for one-shot generation. */
|
|
2936
|
-
target_id: TargetId | null;
|
|
2937
|
-
/** Resolved generator implementation; provenance rather than resource identity. */
|
|
2938
|
-
generator: GeneratorKind | (string & {});
|
|
2939
|
-
provenance: GenerationProvenanceRead;
|
|
2940
|
-
/** Null only for a failed or legacy generation that produced no metadata. */
|
|
2941
|
-
meta: GenerationMetaRead | null;
|
|
2942
|
-
warnings: string[];
|
|
2943
|
-
/** Recorded failures. Empty when this resource has no recorded failure. */
|
|
2944
|
-
errors: DomainErrorRead[];
|
|
2945
|
-
/** Format: date-time */
|
|
2946
|
-
created_at: string;
|
|
2947
|
-
}
|
|
2808
|
+
export type GenerationSummaryRead = GenerationRead;
|
|
2948
2809
|
export type GenerationResponse = Generation & ResponseMetadata;
|
|
2949
2810
|
/** Request shape for GenerationResponse. */
|
|
2950
2811
|
export type GenerationResponseWrite = GenerationWrite & ResponseMetadata;
|
|
@@ -2953,7 +2814,7 @@ export type GenerationResponseRead = GenerationRead & ResponseMetadata;
|
|
|
2953
2814
|
/** A selected target that did not generate in a multi-target run. */
|
|
2954
2815
|
export interface GenerationFailure {
|
|
2955
2816
|
target_id: TargetId;
|
|
2956
|
-
|
|
2817
|
+
type: GeneratorKind;
|
|
2957
2818
|
status: "failed";
|
|
2958
2819
|
/** Recorded failures. Empty when this resource has no recorded failure. */
|
|
2959
2820
|
errors: DomainError[];
|
|
@@ -2961,7 +2822,7 @@ export interface GenerationFailure {
|
|
|
2961
2822
|
/** Response shape for GenerationFailure. */
|
|
2962
2823
|
export interface GenerationFailureRead {
|
|
2963
2824
|
target_id: TargetId;
|
|
2964
|
-
|
|
2825
|
+
type: GeneratorKind | (string & {});
|
|
2965
2826
|
status: "failed" | (string & {});
|
|
2966
2827
|
/** Recorded failures. Empty when this resource has no recorded failure. */
|
|
2967
2828
|
errors: DomainErrorRead[];
|
|
@@ -2995,6 +2856,11 @@ export interface ApiKey {
|
|
|
2995
2856
|
last_used_at: string | null;
|
|
2996
2857
|
/** Format: date-time */
|
|
2997
2858
|
created_at: string;
|
|
2859
|
+
/**
|
|
2860
|
+
* When the key last changed, such as its revocation.
|
|
2861
|
+
* Format: date-time
|
|
2862
|
+
*/
|
|
2863
|
+
updated_at: string;
|
|
2998
2864
|
request_id?: RequestId;
|
|
2999
2865
|
}
|
|
3000
2866
|
/** Response shape for ApiKey. */
|
|
@@ -3009,134 +2875,119 @@ export interface ApiKeyRead {
|
|
|
3009
2875
|
last_used_at: string | null;
|
|
3010
2876
|
/** Format: date-time */
|
|
3011
2877
|
created_at: string;
|
|
2878
|
+
/**
|
|
2879
|
+
* When the key last changed, such as its revocation.
|
|
2880
|
+
* Format: date-time
|
|
2881
|
+
*/
|
|
2882
|
+
updated_at: string;
|
|
3012
2883
|
request_id?: RequestId;
|
|
3013
2884
|
}
|
|
3014
2885
|
export type ApiKeyResponse = ApiKey & ResponseMetadata;
|
|
3015
2886
|
/** Response shape for ApiKeyResponse. */
|
|
3016
2887
|
export type ApiKeyResponseRead = ApiKeyRead & ResponseMetadata;
|
|
3017
|
-
export interface
|
|
3018
|
-
|
|
3019
|
-
|
|
3020
|
-
|
|
3021
|
-
|
|
3022
|
-
|
|
3023
|
-
export interface UrlDefinitionRevisionSourceRead {
|
|
3024
|
-
kind: "url" | (string & {});
|
|
3025
|
-
/** Format: uri */
|
|
3026
|
-
url: string;
|
|
3027
|
-
}
|
|
3028
|
-
export interface RepositoryDefinitionRevisionSource {
|
|
3029
|
-
kind: "repository";
|
|
3030
|
-
repository: RepositoryReferenceResponse;
|
|
3031
|
-
/** Repository-relative Definition entrypoint path. */
|
|
3032
|
-
path: string;
|
|
3033
|
-
/** Git ref resolved for this revision, when recorded. */
|
|
3034
|
-
ref?: string | null;
|
|
3035
|
-
/** Exact Git commit consumed, when recorded. */
|
|
3036
|
-
commit_sha?: string | null;
|
|
3037
|
-
}
|
|
3038
|
-
/** Response shape for RepositoryDefinitionRevisionSource. */
|
|
3039
|
-
export interface RepositoryDefinitionRevisionSourceRead {
|
|
3040
|
-
kind: "repository" | (string & {});
|
|
3041
|
-
repository: RepositoryReferenceResponseRead;
|
|
3042
|
-
/** Repository-relative Definition entrypoint path. */
|
|
3043
|
-
path: string;
|
|
3044
|
-
/** Git ref resolved for this revision, when recorded. */
|
|
3045
|
-
ref?: string | null;
|
|
3046
|
-
/** Exact Git commit consumed, when recorded. */
|
|
3047
|
-
commit_sha?: string | null;
|
|
3048
|
-
}
|
|
3049
|
-
export type DefinitionRevisionSource = UrlDefinitionRevisionSource | RepositoryDefinitionRevisionSource;
|
|
3050
|
-
/** Response shape for DefinitionRevisionSource. */
|
|
3051
|
-
export type DefinitionRevisionSourceRead = UrlDefinitionRevisionSourceRead | RepositoryDefinitionRevisionSourceRead | Record<string, unknown> & {
|
|
3052
|
-
kind?: string;
|
|
3053
|
-
};
|
|
3054
|
-
export interface DefinitionDocument {
|
|
3055
|
-
id: DefinitionDocumentId;
|
|
3056
|
-
role: "entrypoint" | "reference";
|
|
3057
|
-
/** Repository-relative path or same-origin URL captured in this revision. */
|
|
3058
|
-
coordinate: string;
|
|
3059
|
-
sha256: string;
|
|
3060
|
-
size_bytes: number;
|
|
2888
|
+
export interface UrlSpecRevisionSource {
|
|
2889
|
+
type: "url";
|
|
2890
|
+
url: {
|
|
2891
|
+
/** Format: uri */
|
|
2892
|
+
url: string;
|
|
2893
|
+
};
|
|
3061
2894
|
}
|
|
3062
|
-
/** Response shape for
|
|
3063
|
-
export interface
|
|
3064
|
-
|
|
3065
|
-
|
|
3066
|
-
|
|
3067
|
-
|
|
3068
|
-
|
|
3069
|
-
size_bytes: number;
|
|
2895
|
+
/** Response shape for UrlSpecRevisionSource. */
|
|
2896
|
+
export interface UrlSpecRevisionSourceRead {
|
|
2897
|
+
type: "url" | (string & {});
|
|
2898
|
+
url: {
|
|
2899
|
+
/** Format: uri */
|
|
2900
|
+
url: string;
|
|
2901
|
+
};
|
|
3070
2902
|
}
|
|
3071
|
-
export interface
|
|
3072
|
-
|
|
3073
|
-
|
|
3074
|
-
|
|
3075
|
-
|
|
3076
|
-
|
|
3077
|
-
|
|
3078
|
-
|
|
3079
|
-
|
|
3080
|
-
|
|
3081
|
-
|
|
3082
|
-
|
|
2903
|
+
export interface RepositorySpecRevisionSource {
|
|
2904
|
+
type: "repository";
|
|
2905
|
+
repository: {
|
|
2906
|
+
provider: RepositoryProvider;
|
|
2907
|
+
identifier: RepositoryIdentifier;
|
|
2908
|
+
/** Repository-relative Spec entrypoint path. */
|
|
2909
|
+
path: string;
|
|
2910
|
+
/** Git ref resolved for this revision, when recorded. */
|
|
2911
|
+
ref?: string | null;
|
|
2912
|
+
/** Exact Git commit consumed, when recorded. */
|
|
2913
|
+
commit_sha?: string | null;
|
|
2914
|
+
};
|
|
3083
2915
|
}
|
|
3084
|
-
/** Response shape for
|
|
3085
|
-
export interface
|
|
3086
|
-
|
|
3087
|
-
|
|
3088
|
-
|
|
3089
|
-
|
|
3090
|
-
|
|
3091
|
-
|
|
3092
|
-
|
|
3093
|
-
|
|
3094
|
-
|
|
3095
|
-
|
|
3096
|
-
|
|
2916
|
+
/** Response shape for RepositorySpecRevisionSource. */
|
|
2917
|
+
export interface RepositorySpecRevisionSourceRead {
|
|
2918
|
+
type: "repository" | (string & {});
|
|
2919
|
+
repository: {
|
|
2920
|
+
provider: RepositoryProvider | (string & {});
|
|
2921
|
+
identifier: RepositoryIdentifier;
|
|
2922
|
+
/** Repository-relative Spec entrypoint path. */
|
|
2923
|
+
path: string;
|
|
2924
|
+
/** Git ref resolved for this revision, when recorded. */
|
|
2925
|
+
ref?: string | null;
|
|
2926
|
+
/** Exact Git commit consumed, when recorded. */
|
|
2927
|
+
commit_sha?: string | null;
|
|
2928
|
+
};
|
|
3097
2929
|
}
|
|
3098
|
-
export
|
|
3099
|
-
|
|
3100
|
-
|
|
2930
|
+
export type SpecRevisionSource = UrlSpecRevisionSource | RepositorySpecRevisionSource;
|
|
2931
|
+
/** Response shape for SpecRevisionSource. */
|
|
2932
|
+
export type SpecRevisionSourceRead = UrlSpecRevisionSourceRead | RepositorySpecRevisionSourceRead | Record<string, unknown> & {
|
|
2933
|
+
type?: string;
|
|
2934
|
+
};
|
|
2935
|
+
export interface SpecRevision {
|
|
2936
|
+
id: SpecRevisionId;
|
|
2937
|
+
object: "spec_revision";
|
|
3101
2938
|
project_id: ProjectId;
|
|
3102
|
-
|
|
2939
|
+
spec_id: SpecId;
|
|
3103
2940
|
format: "openapi" | "graphql";
|
|
3104
|
-
|
|
3105
|
-
/**
|
|
3106
|
-
documents?: DefinitionDocument[];
|
|
3107
|
-
/** SHA-256 digest of every document coordinate, digest, and size in the resolved graph. */
|
|
2941
|
+
file_count: number;
|
|
2942
|
+
/** SHA-256 digest of every source file path, digest, and size in the resolved graph. */
|
|
3108
2943
|
sha256: string;
|
|
3109
|
-
/** Total bytes across all source
|
|
2944
|
+
/** Total bytes across all source files. */
|
|
3110
2945
|
size_bytes: number;
|
|
3111
2946
|
/** Origin recorded when this immutable revision was created. */
|
|
3112
|
-
source:
|
|
2947
|
+
source: SpecRevisionSource | null;
|
|
2948
|
+
/** Present on retrieve; list responses omit it. */
|
|
2949
|
+
diagnostic_summary?: DiagnosticSummary;
|
|
2950
|
+
/** Present only with include=diagnostics. Ordered by severity, then rule identifier. */
|
|
2951
|
+
diagnostics?: Diagnostic[];
|
|
2952
|
+
/**
|
|
2953
|
+
* Present only with include=diagnostics. Coded misses or conflicts from applying the Spec's
|
|
2954
|
+
* patches to this revision.
|
|
2955
|
+
*/
|
|
2956
|
+
patch_diagnostics?: DiagnosticWarning[];
|
|
3113
2957
|
/** Format: date-time */
|
|
3114
2958
|
created_at: string;
|
|
3115
2959
|
request_id?: RequestId;
|
|
3116
2960
|
}
|
|
3117
|
-
/** Response shape for
|
|
3118
|
-
export interface
|
|
3119
|
-
id:
|
|
3120
|
-
object: "
|
|
2961
|
+
/** Response shape for SpecRevision. */
|
|
2962
|
+
export interface SpecRevisionRead {
|
|
2963
|
+
id: SpecRevisionId;
|
|
2964
|
+
object: "spec_revision" | (string & {});
|
|
3121
2965
|
project_id: ProjectId;
|
|
3122
|
-
|
|
2966
|
+
spec_id: SpecId;
|
|
3123
2967
|
format: ("openapi" | "graphql") | (string & {});
|
|
3124
|
-
|
|
3125
|
-
/**
|
|
3126
|
-
documents?: DefinitionDocumentRead[];
|
|
3127
|
-
/** SHA-256 digest of every document coordinate, digest, and size in the resolved graph. */
|
|
2968
|
+
file_count: number;
|
|
2969
|
+
/** SHA-256 digest of every source file path, digest, and size in the resolved graph. */
|
|
3128
2970
|
sha256: string;
|
|
3129
|
-
/** Total bytes across all source
|
|
2971
|
+
/** Total bytes across all source files. */
|
|
3130
2972
|
size_bytes: number;
|
|
3131
2973
|
/** Origin recorded when this immutable revision was created. */
|
|
3132
|
-
source:
|
|
2974
|
+
source: SpecRevisionSourceRead | null;
|
|
2975
|
+
/** Present on retrieve; list responses omit it. */
|
|
2976
|
+
diagnostic_summary?: DiagnosticSummaryRead;
|
|
2977
|
+
/** Present only with include=diagnostics. Ordered by severity, then rule identifier. */
|
|
2978
|
+
diagnostics?: DiagnosticRead[];
|
|
2979
|
+
/**
|
|
2980
|
+
* Present only with include=diagnostics. Coded misses or conflicts from applying the Spec's
|
|
2981
|
+
* patches to this revision.
|
|
2982
|
+
*/
|
|
2983
|
+
patch_diagnostics?: DiagnosticWarningRead[];
|
|
3133
2984
|
/** Format: date-time */
|
|
3134
2985
|
created_at: string;
|
|
3135
2986
|
request_id?: RequestId;
|
|
3136
2987
|
}
|
|
3137
|
-
export type
|
|
3138
|
-
/** Response shape for
|
|
3139
|
-
export type
|
|
2988
|
+
export type SpecRevisionResponse = SpecRevision & ResponseMetadata;
|
|
2989
|
+
/** Response shape for SpecRevisionResponse. */
|
|
2990
|
+
export type SpecRevisionResponseRead = SpecRevisionRead & ResponseMetadata;
|
|
3140
2991
|
export interface ProjectList {
|
|
3141
2992
|
object: ListObject;
|
|
3142
2993
|
data: ProjectSummary[];
|
|
@@ -3185,19 +3036,19 @@ export interface GenerationListRead {
|
|
|
3185
3036
|
next_cursor: string | null;
|
|
3186
3037
|
request_id: RequestId;
|
|
3187
3038
|
}
|
|
3188
|
-
export interface
|
|
3039
|
+
export interface SpecRevisionList {
|
|
3189
3040
|
object: ListObject;
|
|
3190
|
-
data:
|
|
3041
|
+
data: SpecRevision[];
|
|
3191
3042
|
/** Whether another page is available after this one. */
|
|
3192
3043
|
has_more: boolean;
|
|
3193
3044
|
/** Pass this value as cursor to retrieve the next page; null on the last page. */
|
|
3194
3045
|
next_cursor: string | null;
|
|
3195
3046
|
request_id: RequestId;
|
|
3196
3047
|
}
|
|
3197
|
-
/** Response shape for
|
|
3198
|
-
export interface
|
|
3048
|
+
/** Response shape for SpecRevisionList. */
|
|
3049
|
+
export interface SpecRevisionListRead {
|
|
3199
3050
|
object: ListObject;
|
|
3200
|
-
data:
|
|
3051
|
+
data: SpecRevisionRead[];
|
|
3201
3052
|
/** Whether another page is available after this one. */
|
|
3202
3053
|
has_more: boolean;
|
|
3203
3054
|
/** Pass this value as cursor to retrieve the next page; null on the last page. */
|
|
@@ -3258,7 +3109,6 @@ export declare const ErrorType: {
|
|
|
3258
3109
|
readonly SOURCE_ERROR: "source_error";
|
|
3259
3110
|
readonly RATE_LIMIT_ERROR: "rate_limit_error";
|
|
3260
3111
|
readonly API_ERROR: "api_error";
|
|
3261
|
-
readonly UNKNOWN_ERROR: "unknown_error";
|
|
3262
3112
|
};
|
|
3263
3113
|
export type ErrorType = (typeof ErrorType)[keyof typeof ErrorType];
|
|
3264
3114
|
/** Stable programmatic identifier. Do not branch on message. */
|
|
@@ -3274,17 +3124,14 @@ export declare const ErrorCode: {
|
|
|
3274
3124
|
readonly SPEC_ERROR: "spec_error";
|
|
3275
3125
|
readonly FETCH_ERROR: "fetch_error";
|
|
3276
3126
|
readonly REPOSITORY_PROVIDER_UNSUPPORTED: "repository_provider_unsupported";
|
|
3277
|
-
readonly EDITION_UNAVAILABLE: "edition_unavailable";
|
|
3278
3127
|
readonly TARGET_BUSY: "target_busy";
|
|
3279
3128
|
readonly NO_DRAFT: "no_draft";
|
|
3280
|
-
readonly
|
|
3281
|
-
readonly
|
|
3129
|
+
readonly DRAFT_MERGED: "draft_merged";
|
|
3130
|
+
readonly RESOURCE_CHANGED: "resource_changed";
|
|
3282
3131
|
readonly INVALID_VERSION: "invalid_version";
|
|
3283
3132
|
readonly PRECONDITION_FAILED: "precondition_failed";
|
|
3284
|
-
readonly DEFINITION_CHANGED: "definition_changed";
|
|
3285
3133
|
readonly VERSION_OCCUPIED: "version_occupied";
|
|
3286
3134
|
readonly VERSION_TOO_LOW: "version_too_low";
|
|
3287
|
-
readonly RELEASE_ANALYSIS_STALE: "release_analysis_stale";
|
|
3288
3135
|
readonly TARGET_ALREADY_RELEASED: "target_already_released";
|
|
3289
3136
|
readonly ADOPTION_UNVERIFIED: "adoption_unverified";
|
|
3290
3137
|
readonly PUBLICATION_DISABLED: "publication_disabled";
|
|
@@ -3310,13 +3157,10 @@ export declare const ErrorCode: {
|
|
|
3310
3157
|
readonly DEPENDENCY_MODULE_PATH_MISSING: "dependency_module_path_missing";
|
|
3311
3158
|
readonly DEPENDENCY_UNRELEASED: "dependency_unreleased";
|
|
3312
3159
|
readonly DEPENDENCY_REVISION_MISMATCH: "dependency_revision_mismatch";
|
|
3313
|
-
readonly DEPENDENCY_EDITION_INCOMPATIBLE: "dependency_edition_incompatible";
|
|
3314
3160
|
readonly PUBLICATION_FAILED: "publication_failed";
|
|
3315
3161
|
readonly CUSTOMIZATION_CONFLICT: "customization_conflict";
|
|
3316
3162
|
readonly HISTORY_RECOVERY_REQUIRED: "history_recovery_required";
|
|
3317
3163
|
readonly CHECKS_UNAVAILABLE: "checks_unavailable";
|
|
3318
|
-
readonly GENERATION_STALE: "generation_stale";
|
|
3319
|
-
readonly UNCLASSIFIED_ERROR: "unclassified_error";
|
|
3320
3164
|
};
|
|
3321
3165
|
export type ErrorCode = (typeof ErrorCode)[keyof typeof ErrorCode];
|
|
3322
3166
|
export interface ErrorDetail {
|
|
@@ -3340,7 +3184,7 @@ export interface ErrorDetail {
|
|
|
3340
3184
|
message: string;
|
|
3341
3185
|
/**
|
|
3342
3186
|
* Whether another attempt can succeed without correcting the inputs. For a recorded failure,
|
|
3343
|
-
* start generation or
|
|
3187
|
+
* start generation or publishing again; retrieving the resource or replaying an idempotency key
|
|
3344
3188
|
* does not start another attempt.
|
|
3345
3189
|
*/
|
|
3346
3190
|
retryable: boolean;
|
|
@@ -3374,7 +3218,7 @@ export interface ErrorDetailRead {
|
|
|
3374
3218
|
message: string;
|
|
3375
3219
|
/**
|
|
3376
3220
|
* Whether another attempt can succeed without correcting the inputs. For a recorded failure,
|
|
3377
|
-
* start generation or
|
|
3221
|
+
* start generation or publishing again; retrieving the resource or replaying an idempotency key
|
|
3378
3222
|
* does not start another attempt.
|
|
3379
3223
|
*/
|
|
3380
3224
|
retryable: boolean;
|
|
@@ -3387,24 +3231,20 @@ export interface ErrorDetailRead {
|
|
|
3387
3231
|
docs_url: string;
|
|
3388
3232
|
}
|
|
3389
3233
|
export interface RepositoryReferenceResponse {
|
|
3390
|
-
|
|
3391
|
-
|
|
3392
|
-
/** Provider-native repository identity, opaque outside its adapter. */
|
|
3393
|
-
identifier: string;
|
|
3234
|
+
provider: RepositoryProvider;
|
|
3235
|
+
identifier: RepositoryIdentifier;
|
|
3394
3236
|
}
|
|
3395
3237
|
/** Response shape for RepositoryReferenceResponse. */
|
|
3396
3238
|
export interface RepositoryReferenceResponseRead {
|
|
3397
|
-
|
|
3398
|
-
|
|
3399
|
-
/** Provider-native repository identity, opaque outside its adapter. */
|
|
3400
|
-
identifier: string;
|
|
3239
|
+
provider: RepositoryProvider | (string & {});
|
|
3240
|
+
identifier: RepositoryIdentifier;
|
|
3401
3241
|
}
|
|
3402
3242
|
/**
|
|
3403
|
-
* A fix applied to the resolved
|
|
3243
|
+
* A fix applied to the resolved Spec before generation. Paths are JSON
|
|
3404
3244
|
* Pointers into the document. A patch whose target no longer exists is
|
|
3405
3245
|
* skipped and reported as a warning on the generation, never silently.
|
|
3406
3246
|
*/
|
|
3407
|
-
export interface
|
|
3247
|
+
export interface SpecPatchResponse {
|
|
3408
3248
|
op: "set" | "append" | "remove" | "rename";
|
|
3409
3249
|
/**
|
|
3410
3250
|
* JSON-Pointer-style path. Pattern segments enable bulk fixes:
|
|
@@ -3419,8 +3259,8 @@ export interface DefinitionPatchResponse {
|
|
|
3419
3259
|
to?: string | null;
|
|
3420
3260
|
reason?: string | null;
|
|
3421
3261
|
}
|
|
3422
|
-
/** Response shape for
|
|
3423
|
-
export interface
|
|
3262
|
+
/** Response shape for SpecPatchResponse. */
|
|
3263
|
+
export interface SpecPatchResponseRead {
|
|
3424
3264
|
op: ("set" | "append" | "remove" | "rename") | (string & {});
|
|
3425
3265
|
/**
|
|
3426
3266
|
* JSON-Pointer-style path. Pattern segments enable bulk fixes:
|
|
@@ -3476,11 +3316,11 @@ export interface DiagnosticPolicyResponseRead {
|
|
|
3476
3316
|
suppressions: DiagnosticSuppressionResponse[];
|
|
3477
3317
|
}
|
|
3478
3318
|
/**
|
|
3479
|
-
* Required checks run against the
|
|
3480
|
-
*
|
|
3481
|
-
*
|
|
3482
|
-
*
|
|
3483
|
-
*
|
|
3319
|
+
* Required checks run against the code in the Draft. Generated checks and customer commands share
|
|
3320
|
+
* one reproducible workflow; repository_required names existing repository checks. Supplying checks
|
|
3321
|
+
* replaces all settings. Omitted generated restores build, package, and public_entrypoint; omitted
|
|
3322
|
+
* repository_required and customer restore empty lists. An empty object restores these defaults. An
|
|
3323
|
+
* empty array clears the corresponding list.
|
|
3484
3324
|
*/
|
|
3485
3325
|
export interface TargetChecksResponse {
|
|
3486
3326
|
/** Default: ["build","package","public_entrypoint"] */
|
|
@@ -3669,6 +3509,39 @@ export interface CliBehaviorResponse {
|
|
|
3669
3509
|
/** GitHub owner/name of the skills package the generated CLI offers to install during init. */
|
|
3670
3510
|
skills_repo?: string | null;
|
|
3671
3511
|
}
|
|
3512
|
+
/** How the generated CLI behaves. Part of Config. */
|
|
3513
|
+
export interface TargetCliBehaviorResponse {
|
|
3514
|
+
/** Command users run, independent of how the CLI is distributed. */
|
|
3515
|
+
command_name?: string | null;
|
|
3516
|
+
/**
|
|
3517
|
+
* Opt in to a once-a-day registry check that prints an upgrade hint. Off by default; generated
|
|
3518
|
+
* code phones nobody unless this is enabled.
|
|
3519
|
+
*/
|
|
3520
|
+
update_notice?: boolean;
|
|
3521
|
+
/**
|
|
3522
|
+
* Public HTTP(S) URL read by the optional changelog command in generated CLIs. Supports UTF-8
|
|
3523
|
+
* Markdown, plain text, and static HTML; embedded credentials are not allowed. Omit or clear to
|
|
3524
|
+
* disable, then regenerate.
|
|
3525
|
+
*/
|
|
3526
|
+
changelog_url?: string | null;
|
|
3527
|
+
/**
|
|
3528
|
+
* Where the generated CLI's feedback command sends users. GitHub issues/new URLs get a prefilled
|
|
3529
|
+
* title and environment details.
|
|
3530
|
+
*/
|
|
3531
|
+
support_url?: string | null;
|
|
3532
|
+
/**
|
|
3533
|
+
* Hosted MCP endpoint installed by the generated CLI instead of launching the package's local
|
|
3534
|
+
* stdio server.
|
|
3535
|
+
*/
|
|
3536
|
+
mcp_url?: string | null;
|
|
3537
|
+
/** GitHub owner/name of the skills package the generated CLI offers to install during init. */
|
|
3538
|
+
skills_repo?: string | null;
|
|
3539
|
+
/**
|
|
3540
|
+
* Enable webhook relay sessions for this CLI Target. Requires Pro. Turning it off prevents new
|
|
3541
|
+
* sessions.
|
|
3542
|
+
*/
|
|
3543
|
+
relay?: boolean;
|
|
3544
|
+
}
|
|
3672
3545
|
/** How generated MCP servers and the Typeship-hosted endpoint behave. Part of Config. */
|
|
3673
3546
|
export interface McpBehaviorResponse {
|
|
3674
3547
|
/** Stable official MCP registry name, independent of the server runtime. */
|
|
@@ -3820,11 +3693,10 @@ export interface PackageBehaviorResponse {
|
|
|
3820
3693
|
go_package_name?: string | null;
|
|
3821
3694
|
}
|
|
3822
3695
|
/**
|
|
3823
|
-
* Everything Typeship needs beyond the
|
|
3824
|
-
*
|
|
3825
|
-
*
|
|
3826
|
-
*
|
|
3827
|
-
* settings on their Definition.
|
|
3696
|
+
* Everything Typeship needs beyond the Spec, in one object: generation customization (globals,
|
|
3697
|
+
* retries, pagination, readme) and how the generated tooling behaves (cli, mcp, package, docs_url).
|
|
3698
|
+
* Plain configuration. Typeship never requires vendor extensions inside the Spec itself. One-shot
|
|
3699
|
+
* generation also accepts GraphQL settings here; stored projects keep those settings on their Spec.
|
|
3828
3700
|
*/
|
|
3829
3701
|
export interface ConfigResponse {
|
|
3830
3702
|
/**
|
|
@@ -3847,8 +3719,8 @@ export interface ConfigResponse {
|
|
|
3847
3719
|
package?: PackageBehaviorResponse;
|
|
3848
3720
|
/**
|
|
3849
3721
|
* The API's documentation site. Read through its llms.txt by the generated CLI's docs command,
|
|
3850
|
-
* the MCP server's docs tools, and the package's AGENTS.md. Defaults to the
|
|
3851
|
-
*
|
|
3722
|
+
* the MCP server's docs tools, and the package's AGENTS.md. Defaults to the Spec's externalDocs
|
|
3723
|
+
* URL.
|
|
3852
3724
|
* Format: uri
|
|
3853
3725
|
*/
|
|
3854
3726
|
docs_url?: string | null;
|
|
@@ -3880,8 +3752,8 @@ export interface ConfigResponseRead {
|
|
|
3880
3752
|
package?: PackageBehaviorResponse;
|
|
3881
3753
|
/**
|
|
3882
3754
|
* The API's documentation site. Read through its llms.txt by the generated CLI's docs command,
|
|
3883
|
-
* the MCP server's docs tools, and the package's AGENTS.md. Defaults to the
|
|
3884
|
-
*
|
|
3755
|
+
* the MCP server's docs tools, and the package's AGENTS.md. Defaults to the Spec's externalDocs
|
|
3756
|
+
* URL.
|
|
3885
3757
|
* Format: uri
|
|
3886
3758
|
*/
|
|
3887
3759
|
docs_url?: string | null;
|
|
@@ -3895,7 +3767,7 @@ export interface ConfigResponseRead {
|
|
|
3895
3767
|
* Shared generated-client and tooling behavior for a stored Project. Every Target inherits these
|
|
3896
3768
|
* defaults. Target.config is merged over them for one Target; top-level values replace defaults
|
|
3897
3769
|
* while cli, mcp, auth, readme, and package merge by field. GraphQL-only source settings live on
|
|
3898
|
-
* the Project's
|
|
3770
|
+
* the Project's Spec and are rejected in both stored config scopes.
|
|
3899
3771
|
*/
|
|
3900
3772
|
export interface ProjectConfigResponse {
|
|
3901
3773
|
/**
|
|
@@ -3917,8 +3789,8 @@ export interface ProjectConfigResponse {
|
|
|
3917
3789
|
package?: PackageBehaviorResponse;
|
|
3918
3790
|
/**
|
|
3919
3791
|
* The API's documentation site. Read through its llms.txt by the generated CLI's docs command,
|
|
3920
|
-
* the MCP server's docs tools, and the package's AGENTS.md. Defaults to the
|
|
3921
|
-
*
|
|
3792
|
+
* the MCP server's docs tools, and the package's AGENTS.md. Defaults to the Spec's externalDocs
|
|
3793
|
+
* URL.
|
|
3922
3794
|
* Format: uri
|
|
3923
3795
|
*/
|
|
3924
3796
|
docs_url?: string | null;
|
|
@@ -3949,8 +3821,8 @@ export interface ProjectConfigResponseRead {
|
|
|
3949
3821
|
package?: PackageBehaviorResponse;
|
|
3950
3822
|
/**
|
|
3951
3823
|
* The API's documentation site. Read through its llms.txt by the generated CLI's docs command,
|
|
3952
|
-
* the MCP server's docs tools, and the package's AGENTS.md. Defaults to the
|
|
3953
|
-
*
|
|
3824
|
+
* the MCP server's docs tools, and the package's AGENTS.md. Defaults to the Spec's externalDocs
|
|
3825
|
+
* URL.
|
|
3954
3826
|
* Format: uri
|
|
3955
3827
|
*/
|
|
3956
3828
|
docs_url?: string | null;
|
|
@@ -3979,14 +3851,14 @@ export interface TargetConfigResponse {
|
|
|
3979
3851
|
*/
|
|
3980
3852
|
pagination?: Record<string, PaginationRuleResponse | boolean>;
|
|
3981
3853
|
auth?: TargetAuthenticationConfigResponse;
|
|
3982
|
-
cli?:
|
|
3854
|
+
cli?: TargetCliBehaviorResponse;
|
|
3983
3855
|
mcp?: McpBehaviorResponse;
|
|
3984
3856
|
readme?: ReadmeBehaviorResponse;
|
|
3985
3857
|
package?: PackageBehaviorResponse;
|
|
3986
3858
|
/**
|
|
3987
3859
|
* The API's documentation site. Read through its llms.txt by the generated CLI's docs command,
|
|
3988
|
-
* the MCP server's docs tools, and the package's AGENTS.md. Defaults to the
|
|
3989
|
-
*
|
|
3860
|
+
* the MCP server's docs tools, and the package's AGENTS.md. Defaults to the Spec's externalDocs
|
|
3861
|
+
* URL.
|
|
3990
3862
|
* Format: uri
|
|
3991
3863
|
*/
|
|
3992
3864
|
docs_url?: string | null;
|
|
@@ -4011,14 +3883,14 @@ export interface TargetConfigResponseRead {
|
|
|
4011
3883
|
*/
|
|
4012
3884
|
pagination?: Record<string, PaginationRuleResponseRead | boolean>;
|
|
4013
3885
|
auth?: TargetAuthenticationConfigResponse;
|
|
4014
|
-
cli?:
|
|
3886
|
+
cli?: TargetCliBehaviorResponse;
|
|
4015
3887
|
mcp?: McpBehaviorResponseRead;
|
|
4016
3888
|
readme?: ReadmeBehaviorResponse;
|
|
4017
3889
|
package?: PackageBehaviorResponse;
|
|
4018
3890
|
/**
|
|
4019
3891
|
* The API's documentation site. Read through its llms.txt by the generated CLI's docs command,
|
|
4020
|
-
* the MCP server's docs tools, and the package's AGENTS.md. Defaults to the
|
|
4021
|
-
*
|
|
3892
|
+
* the MCP server's docs tools, and the package's AGENTS.md. Defaults to the Spec's externalDocs
|
|
3893
|
+
* URL.
|
|
4022
3894
|
* Format: uri
|
|
4023
3895
|
*/
|
|
4024
3896
|
docs_url?: string | null;
|
|
@@ -4126,7 +3998,7 @@ export interface RetryTuningResponse {
|
|
|
4126
3998
|
}
|
|
4127
3999
|
export interface PaginationRuleResponse {
|
|
4128
4000
|
/** Default: "cursor" */
|
|
4129
|
-
style?: "cursor" | "
|
|
4001
|
+
style?: "cursor" | "cursor_from_last_id" | "page" | "offset";
|
|
4130
4002
|
/** Response field holding the item array. */
|
|
4131
4003
|
items_field: string;
|
|
4132
4004
|
cursor_param?: string;
|
|
@@ -4140,7 +4012,7 @@ export interface PaginationRuleResponse {
|
|
|
4140
4012
|
/** Response shape for PaginationRuleResponse. */
|
|
4141
4013
|
export interface PaginationRuleResponseRead {
|
|
4142
4014
|
/** Default: "cursor" */
|
|
4143
|
-
style?: ("cursor" | "
|
|
4015
|
+
style?: ("cursor" | "cursor_from_last_id" | "page" | "offset") | (string & {});
|
|
4144
4016
|
/** Response field holding the item array. */
|
|
4145
4017
|
items_field: string;
|
|
4146
4018
|
cursor_param?: string;
|
|
@@ -4168,86 +4040,75 @@ export declare const GitFileMode: {
|
|
|
4168
4040
|
};
|
|
4169
4041
|
export type GitFileMode = (typeof GitFileMode)[keyof typeof GitFileMode];
|
|
4170
4042
|
/**
|
|
4171
|
-
* One side of a Draft file comparison
|
|
4172
|
-
*
|
|
4173
|
-
*
|
|
4174
|
-
*
|
|
4043
|
+
* One side of a Draft file comparison: base is the last merged version, yours is your repository
|
|
4044
|
+
* edit, and generated is the new version Typeship proposes for this conflict stage. The conflict
|
|
4045
|
+
* source identifies whether that version comes from a Generation, the default branch, or a saved
|
|
4046
|
+
* Draft. Missing sides represent deleted or absent files.
|
|
4175
4047
|
*/
|
|
4176
4048
|
export declare const DraftFileSide: {
|
|
4177
4049
|
readonly BASE: "base";
|
|
4178
|
-
readonly
|
|
4179
|
-
readonly
|
|
4180
|
-
readonly ACCEPTED: "accepted";
|
|
4181
|
-
readonly DEFAULT: "default";
|
|
4182
|
-
readonly DRAFT: "draft";
|
|
4050
|
+
readonly YOURS: "yours";
|
|
4051
|
+
readonly GENERATED: "generated";
|
|
4183
4052
|
};
|
|
4184
4053
|
export type DraftFileSide = (typeof DraftFileSide)[keyof typeof DraftFileSide];
|
|
4185
|
-
|
|
4186
|
-
|
|
4187
|
-
|
|
4188
|
-
|
|
4189
|
-
|
|
4190
|
-
|
|
4191
|
-
|
|
4192
|
-
|
|
4193
|
-
export interface DraftFileSideSummaryRead {
|
|
4194
|
-
side: DraftFileSide | (string & {});
|
|
4195
|
-
mode: GitFileMode | (string & {});
|
|
4196
|
-
size_bytes: number;
|
|
4197
|
-
/** utf8 for text; base64 for binary content. */
|
|
4198
|
-
encoding: ("utf8" | "base64") | (string & {});
|
|
4054
|
+
/**
|
|
4055
|
+
* File IDs for each side of a conflict or history comparison. null means the file is absent on that
|
|
4056
|
+
* side.
|
|
4057
|
+
*/
|
|
4058
|
+
export interface DraftFileSides {
|
|
4059
|
+
base: FileId | null;
|
|
4060
|
+
yours: FileId | null;
|
|
4061
|
+
generated: FileId | null;
|
|
4199
4062
|
}
|
|
4200
4063
|
export interface DraftFileConflict {
|
|
4201
4064
|
/**
|
|
4202
|
-
* Why the
|
|
4203
|
-
* first Draft of an adopted package. file_ownership: generated output collides with a
|
|
4204
|
-
* added.
|
|
4065
|
+
* Why the Draft needs a decision. no_common_version: there is no last merged version to compare,
|
|
4066
|
+
* such as the first Draft of an adopted package. file_ownership: generated output collides with a
|
|
4067
|
+
* file you added. yours_deleted_generated_changed and generated_deleted_yours_changed: one side
|
|
4205
4068
|
* deleted a file the other changed. overlapping_text: both sides edited the same lines.
|
|
4206
4069
|
* too_large_to_merge: the file has too many changed lines to merge line by line. binary_changed
|
|
4207
4070
|
* and file_mode_changed: both sides changed binary content or the file mode.
|
|
4208
4071
|
*/
|
|
4209
|
-
|
|
4072
|
+
type: "no_common_version" | "file_ownership" | "yours_deleted_generated_changed" | "generated_deleted_yours_changed" | "overlapping_text" | "too_large_to_merge" | "binary_changed" | "file_mode_changed";
|
|
4210
4073
|
/**
|
|
4211
|
-
* Where the
|
|
4212
|
-
*
|
|
4213
|
-
*
|
|
4214
|
-
* stage with conflicts, so applying one stage's decisions can report conflicts from the next.
|
|
4074
|
+
* Where the code in this Draft comes from: newly generated files, commits on the default branch,
|
|
4075
|
+
* or edits from a Draft whose branch was rebased, reset, or deleted. Typeship may find another
|
|
4076
|
+
* conflict after these decisions are applied.
|
|
4215
4077
|
*/
|
|
4216
4078
|
source: "generation" | "default_branch" | "previous_draft";
|
|
4217
4079
|
/**
|
|
4218
|
-
* Decision saved for this conflict on
|
|
4219
|
-
*
|
|
4080
|
+
* Decision saved for this conflict on head_sha; null when none. Typeship continues when every
|
|
4081
|
+
* conflict has a decision.
|
|
4220
4082
|
*/
|
|
4221
|
-
decision: "
|
|
4083
|
+
decision: "yours" | "generated" | "content" | null;
|
|
4222
4084
|
}
|
|
4223
4085
|
/** Response shape for DraftFileConflict. */
|
|
4224
4086
|
export interface DraftFileConflictRead {
|
|
4225
4087
|
/**
|
|
4226
|
-
* Why the
|
|
4227
|
-
* first Draft of an adopted package. file_ownership: generated output collides with a
|
|
4228
|
-
* added.
|
|
4088
|
+
* Why the Draft needs a decision. no_common_version: there is no last merged version to compare,
|
|
4089
|
+
* such as the first Draft of an adopted package. file_ownership: generated output collides with a
|
|
4090
|
+
* file you added. yours_deleted_generated_changed and generated_deleted_yours_changed: one side
|
|
4229
4091
|
* deleted a file the other changed. overlapping_text: both sides edited the same lines.
|
|
4230
4092
|
* too_large_to_merge: the file has too many changed lines to merge line by line. binary_changed
|
|
4231
4093
|
* and file_mode_changed: both sides changed binary content or the file mode.
|
|
4232
4094
|
*/
|
|
4233
|
-
|
|
4095
|
+
type: ("no_common_version" | "file_ownership" | "yours_deleted_generated_changed" | "generated_deleted_yours_changed" | "overlapping_text" | "too_large_to_merge" | "binary_changed" | "file_mode_changed") | (string & {});
|
|
4234
4096
|
/**
|
|
4235
|
-
* Where the
|
|
4236
|
-
*
|
|
4237
|
-
*
|
|
4238
|
-
* stage with conflicts, so applying one stage's decisions can report conflicts from the next.
|
|
4097
|
+
* Where the code in this Draft comes from: newly generated files, commits on the default branch,
|
|
4098
|
+
* or edits from a Draft whose branch was rebased, reset, or deleted. Typeship may find another
|
|
4099
|
+
* conflict after these decisions are applied.
|
|
4239
4100
|
*/
|
|
4240
4101
|
source: ("generation" | "default_branch" | "previous_draft") | (string & {});
|
|
4241
4102
|
/**
|
|
4242
|
-
* Decision saved for this conflict on
|
|
4243
|
-
*
|
|
4103
|
+
* Decision saved for this conflict on head_sha; null when none. Typeship continues when every
|
|
4104
|
+
* conflict has a decision.
|
|
4244
4105
|
*/
|
|
4245
|
-
decision: ("
|
|
4106
|
+
decision: ("yours" | "generated" | "content" | null) | (string & {}) | null;
|
|
4246
4107
|
}
|
|
4247
4108
|
export interface DraftFileHistory {
|
|
4248
4109
|
/**
|
|
4249
|
-
* How the rewritten default branch differs from the last
|
|
4250
|
-
*
|
|
4110
|
+
* How the rewritten default branch differs from the last merged package; null when only the Draft
|
|
4111
|
+
* differs.
|
|
4251
4112
|
*/
|
|
4252
4113
|
change: "added" | "edited" | "deleted" | "mode_changed" | null;
|
|
4253
4114
|
/**
|
|
@@ -4259,8 +4120,8 @@ export interface DraftFileHistory {
|
|
|
4259
4120
|
/** Response shape for DraftFileHistory. */
|
|
4260
4121
|
export interface DraftFileHistoryRead {
|
|
4261
4122
|
/**
|
|
4262
|
-
* How the rewritten default branch differs from the last
|
|
4263
|
-
*
|
|
4123
|
+
* How the rewritten default branch differs from the last merged package; null when only the Draft
|
|
4124
|
+
* differs.
|
|
4264
4125
|
*/
|
|
4265
4126
|
change: ("added" | "edited" | "deleted" | "mode_changed" | null) | (string & {}) | null;
|
|
4266
4127
|
/**
|
|
@@ -4273,30 +4134,24 @@ export interface DraftFile {
|
|
|
4273
4134
|
object: "draft_file";
|
|
4274
4135
|
/** Path relative to the Target's package directory. */
|
|
4275
4136
|
path: string;
|
|
4276
|
-
/** How the Draft differs from the last
|
|
4137
|
+
/** How the Draft differs from the last merged package at this path; null when it does not. */
|
|
4277
4138
|
customization: "added" | "edited" | "deleted" | "mode_changed" | null;
|
|
4278
4139
|
conflict: DraftFileConflict | null;
|
|
4279
4140
|
history: DraftFileHistory | null;
|
|
4280
|
-
/**
|
|
4281
|
-
|
|
4282
|
-
* absent there. Listed for conflicts and history files.
|
|
4283
|
-
*/
|
|
4284
|
-
sides: DraftFileSideSummary[];
|
|
4141
|
+
/** File IDs to read with getFile for a conflict or history file; null for other customized files. */
|
|
4142
|
+
sides: DraftFileSides | null;
|
|
4285
4143
|
}
|
|
4286
4144
|
/** Response shape for DraftFile. */
|
|
4287
4145
|
export interface DraftFileRead {
|
|
4288
4146
|
object: "draft_file" | (string & {});
|
|
4289
4147
|
/** Path relative to the Target's package directory. */
|
|
4290
4148
|
path: string;
|
|
4291
|
-
/** How the Draft differs from the last
|
|
4149
|
+
/** How the Draft differs from the last merged package at this path; null when it does not. */
|
|
4292
4150
|
customization: ("added" | "edited" | "deleted" | "mode_changed" | null) | (string & {}) | null;
|
|
4293
4151
|
conflict: DraftFileConflictRead | null;
|
|
4294
4152
|
history: DraftFileHistoryRead | null;
|
|
4295
|
-
/**
|
|
4296
|
-
|
|
4297
|
-
* absent there. Listed for conflicts and history files.
|
|
4298
|
-
*/
|
|
4299
|
-
sides: DraftFileSideSummaryRead[];
|
|
4153
|
+
/** File IDs to read with getFile for a conflict or history file; null for other customized files. */
|
|
4154
|
+
sides: DraftFileSides | null;
|
|
4300
4155
|
}
|
|
4301
4156
|
export interface DraftFileList {
|
|
4302
4157
|
object: ListObject;
|
|
@@ -4313,60 +4168,10 @@ export interface DraftFileListRead {
|
|
|
4313
4168
|
next_cursor: string | null;
|
|
4314
4169
|
request_id: RequestId;
|
|
4315
4170
|
}
|
|
4316
|
-
export interface DraftFileContent {
|
|
4317
|
-
object: "draft_file_content";
|
|
4318
|
-
target_id: TargetId;
|
|
4319
|
-
path: string;
|
|
4320
|
-
side: DraftFileSide;
|
|
4321
|
-
/** utf8 means content is text; base64 means content is base64-encoded binary bytes. */
|
|
4322
|
-
encoding: "utf8" | "base64";
|
|
4323
|
-
/**
|
|
4324
|
-
* At most 24 KiB of the file starting at offset. Text chunks never split a character; concatenate
|
|
4325
|
-
* chunks in order.
|
|
4326
|
-
*/
|
|
4327
|
-
content: string;
|
|
4328
|
-
mode: GitFileMode;
|
|
4329
|
-
/** Size of the whole file in bytes. */
|
|
4330
|
-
size_bytes: number;
|
|
4331
|
-
/** Byte offset of this chunk in the file. */
|
|
4332
|
-
offset: number;
|
|
4333
|
-
/**
|
|
4334
|
-
* Pass as cursor, with the same path and side, to read the next chunk; null at the end of the
|
|
4335
|
-
* file.
|
|
4336
|
-
*/
|
|
4337
|
-
next_cursor: string | null;
|
|
4338
|
-
}
|
|
4339
|
-
/** Response shape for DraftFileContent. */
|
|
4340
|
-
export interface DraftFileContentRead {
|
|
4341
|
-
object: "draft_file_content" | (string & {});
|
|
4342
|
-
target_id: TargetId;
|
|
4343
|
-
path: string;
|
|
4344
|
-
side: DraftFileSide | (string & {});
|
|
4345
|
-
/** utf8 means content is text; base64 means content is base64-encoded binary bytes. */
|
|
4346
|
-
encoding: ("utf8" | "base64") | (string & {});
|
|
4347
|
-
/**
|
|
4348
|
-
* At most 24 KiB of the file starting at offset. Text chunks never split a character; concatenate
|
|
4349
|
-
* chunks in order.
|
|
4350
|
-
*/
|
|
4351
|
-
content: string;
|
|
4352
|
-
mode: GitFileMode | (string & {});
|
|
4353
|
-
/** Size of the whole file in bytes. */
|
|
4354
|
-
size_bytes: number;
|
|
4355
|
-
/** Byte offset of this chunk in the file. */
|
|
4356
|
-
offset: number;
|
|
4357
|
-
/**
|
|
4358
|
-
* Pass as cursor, with the same path and side, to read the next chunk; null at the end of the
|
|
4359
|
-
* file.
|
|
4360
|
-
*/
|
|
4361
|
-
next_cursor: string | null;
|
|
4362
|
-
}
|
|
4363
|
-
export type DraftFileContentResponse = DraftFileContent & ResponseMetadata;
|
|
4364
|
-
/** Response shape for DraftFileContentResponse. */
|
|
4365
|
-
export type DraftFileContentResponseRead = DraftFileContentRead & ResponseMetadata;
|
|
4366
4171
|
export type DraftConflictDecision = {
|
|
4367
4172
|
path: string;
|
|
4368
4173
|
/** Keep that version of the file exactly. Keeping an absent version deletes the path. */
|
|
4369
|
-
keep: "
|
|
4174
|
+
keep: "yours" | "generated";
|
|
4370
4175
|
} | {
|
|
4371
4176
|
path: string;
|
|
4372
4177
|
keep: "content";
|
|
@@ -4389,7 +4194,7 @@ export type DraftConflictDecision = {
|
|
|
4389
4194
|
export type DraftConflictDecisionRead = {
|
|
4390
4195
|
path: string;
|
|
4391
4196
|
/** Keep that version of the file exactly. Keeping an absent version deletes the path. */
|
|
4392
|
-
keep: ("
|
|
4197
|
+
keep: ("yours" | "generated") | (string & {});
|
|
4393
4198
|
} | {
|
|
4394
4199
|
path: string;
|
|
4395
4200
|
keep: "content" | (string & {});
|
|
@@ -4408,139 +4213,34 @@ export type DraftConflictDecisionRead = {
|
|
|
4408
4213
|
/** Delete this file. */
|
|
4409
4214
|
content: null;
|
|
4410
4215
|
};
|
|
4411
|
-
export interface
|
|
4412
|
-
/** The Draft's
|
|
4413
|
-
|
|
4216
|
+
export interface DraftResolveRequest {
|
|
4217
|
+
/** The Draft's head_sha. A newer Draft commit returns 409 resource_changed without saving. */
|
|
4218
|
+
expected_head_sha: string;
|
|
4414
4219
|
/**
|
|
4415
|
-
* Unique current conflict paths.
|
|
4220
|
+
* Unique current conflict or customized paths. Choose generated to discard a customization,
|
|
4221
|
+
* including a Draft-only file. Final file content must total at most 2 MiB. Decisions apply
|
|
4416
4222
|
* together or not at all.
|
|
4417
4223
|
*/
|
|
4418
4224
|
resolutions: DraftConflictDecision[];
|
|
4419
|
-
/**
|
|
4420
|
-
* Validate the decisions and return the planned files without saving.
|
|
4421
|
-
* Default: false
|
|
4422
|
-
*/
|
|
4423
|
-
dry_run?: boolean;
|
|
4424
4225
|
}
|
|
4425
|
-
/** Response shape for
|
|
4426
|
-
export interface
|
|
4427
|
-
/** The Draft's
|
|
4428
|
-
|
|
4226
|
+
/** Response shape for DraftResolveRequest. */
|
|
4227
|
+
export interface DraftResolveRequestRead {
|
|
4228
|
+
/** The Draft's head_sha. A newer Draft commit returns 409 resource_changed without saving. */
|
|
4229
|
+
expected_head_sha: string;
|
|
4429
4230
|
/**
|
|
4430
|
-
* Unique current conflict paths.
|
|
4231
|
+
* Unique current conflict or customized paths. Choose generated to discard a customization,
|
|
4232
|
+
* including a Draft-only file. Final file content must total at most 2 MiB. Decisions apply
|
|
4431
4233
|
* together or not at all.
|
|
4432
4234
|
*/
|
|
4433
4235
|
resolutions: DraftConflictDecisionRead[];
|
|
4434
|
-
/**
|
|
4435
|
-
* Validate the decisions and return the planned files without saving.
|
|
4436
|
-
* Default: false
|
|
4437
|
-
*/
|
|
4438
|
-
dry_run?: boolean;
|
|
4439
|
-
}
|
|
4440
|
-
export interface DiscardDraftCustomizations {
|
|
4441
|
-
/** The Draft's head_revision. A newer Draft commit returns 409 stale_draft without committing. */
|
|
4442
|
-
expected_head_revision: string;
|
|
4443
|
-
/**
|
|
4444
|
-
* Customized paths that are not conflicts, to replace with the generated files. A listed file
|
|
4445
|
-
* that exists only on the Draft is deleted.
|
|
4446
|
-
*/
|
|
4447
|
-
paths: string[];
|
|
4448
|
-
/**
|
|
4449
|
-
* Return the planned writes and deletions without committing.
|
|
4450
|
-
* Default: false
|
|
4451
|
-
*/
|
|
4452
|
-
dry_run?: boolean;
|
|
4453
|
-
}
|
|
4454
|
-
export interface DraftPlannedFile {
|
|
4455
|
-
path: string;
|
|
4456
|
-
/** keep: the Draft's version stays. write: the file gets new content. delete: the path is removed. */
|
|
4457
|
-
action: "keep" | "write" | "delete";
|
|
4458
|
-
mode: GitFileMode | null;
|
|
4459
|
-
/** Size of the resulting file; null when it is deleted. */
|
|
4460
|
-
size_bytes: number | null;
|
|
4461
|
-
}
|
|
4462
|
-
/** Response shape for DraftPlannedFile. */
|
|
4463
|
-
export interface DraftPlannedFileRead {
|
|
4464
|
-
path: string;
|
|
4465
|
-
/** keep: the Draft's version stays. write: the file gets new content. delete: the path is removed. */
|
|
4466
|
-
action: ("keep" | "write" | "delete") | (string & {});
|
|
4467
|
-
mode: GitFileMode | (string & {}) | null;
|
|
4468
|
-
/** Size of the resulting file; null when it is deleted. */
|
|
4469
|
-
size_bytes: number | null;
|
|
4470
|
-
}
|
|
4471
|
-
export interface DraftConflictResolution {
|
|
4472
|
-
object: "draft_conflict_resolution";
|
|
4473
|
-
target_id: TargetId;
|
|
4474
|
-
/** Draft commit the decisions belong to. */
|
|
4475
|
-
head_revision: string;
|
|
4476
|
-
/**
|
|
4477
|
-
* preview: nothing was saved. saved: the decisions are stored and apply when the Target is
|
|
4478
|
-
* generated.
|
|
4479
|
-
*/
|
|
4480
|
-
status: "preview" | "saved";
|
|
4481
|
-
files: DraftPlannedFile[];
|
|
4482
|
-
/**
|
|
4483
|
-
* Conflicts without a decision once these are saved. At 0 the Draft status becomes
|
|
4484
|
-
* needs_generation.
|
|
4485
|
-
*/
|
|
4486
|
-
remaining_conflicts: number;
|
|
4487
|
-
}
|
|
4488
|
-
/** Response shape for DraftConflictResolution. */
|
|
4489
|
-
export interface DraftConflictResolutionRead {
|
|
4490
|
-
object: "draft_conflict_resolution" | (string & {});
|
|
4491
|
-
target_id: TargetId;
|
|
4492
|
-
/** Draft commit the decisions belong to. */
|
|
4493
|
-
head_revision: string;
|
|
4494
|
-
/**
|
|
4495
|
-
* preview: nothing was saved. saved: the decisions are stored and apply when the Target is
|
|
4496
|
-
* generated.
|
|
4497
|
-
*/
|
|
4498
|
-
status: ("preview" | "saved") | (string & {});
|
|
4499
|
-
files: DraftPlannedFileRead[];
|
|
4500
|
-
/**
|
|
4501
|
-
* Conflicts without a decision once these are saved. At 0 the Draft status becomes
|
|
4502
|
-
* needs_generation.
|
|
4503
|
-
*/
|
|
4504
|
-
remaining_conflicts: number;
|
|
4505
|
-
}
|
|
4506
|
-
export type DraftConflictResolutionResponse = DraftConflictResolution & ResponseMetadata;
|
|
4507
|
-
/** Response shape for DraftConflictResolutionResponse. */
|
|
4508
|
-
export type DraftConflictResolutionResponseRead = DraftConflictResolutionRead & ResponseMetadata;
|
|
4509
|
-
export interface DraftCustomizationDiscard {
|
|
4510
|
-
object: "draft_customization_discard";
|
|
4511
|
-
target_id: TargetId;
|
|
4512
|
-
/** preview: the inspected Draft commit. committed: the new Draft commit. */
|
|
4513
|
-
head_revision: string;
|
|
4514
|
-
/**
|
|
4515
|
-
* preview: nothing was written. committed: one commit was added to the Draft branch; the Draft
|
|
4516
|
-
* status is branch_changed until Typeship integrates it.
|
|
4517
|
-
*/
|
|
4518
|
-
status: "preview" | "committed";
|
|
4519
|
-
files: DraftPlannedFile[];
|
|
4520
|
-
}
|
|
4521
|
-
/** Response shape for DraftCustomizationDiscard. */
|
|
4522
|
-
export interface DraftCustomizationDiscardRead {
|
|
4523
|
-
object: "draft_customization_discard" | (string & {});
|
|
4524
|
-
target_id: TargetId;
|
|
4525
|
-
/** preview: the inspected Draft commit. committed: the new Draft commit. */
|
|
4526
|
-
head_revision: string;
|
|
4527
|
-
/**
|
|
4528
|
-
* preview: nothing was written. committed: one commit was added to the Draft branch; the Draft
|
|
4529
|
-
* status is branch_changed until Typeship integrates it.
|
|
4530
|
-
*/
|
|
4531
|
-
status: ("preview" | "committed") | (string & {});
|
|
4532
|
-
files: DraftPlannedFileRead[];
|
|
4533
4236
|
}
|
|
4534
|
-
export type DraftCustomizationDiscardResponse = DraftCustomizationDiscard & ResponseMetadata;
|
|
4535
|
-
/** Response shape for DraftCustomizationDiscardResponse. */
|
|
4536
|
-
export type DraftCustomizationDiscardResponseRead = DraftCustomizationDiscardRead & ResponseMetadata;
|
|
4537
4237
|
export interface GenerateProjectRequest {
|
|
4538
4238
|
/** Generate only this active Target. Omit to generate all active Targets in the Project. */
|
|
4539
4239
|
target_id?: TargetId;
|
|
4540
4240
|
}
|
|
4541
|
-
/** The stage that failed. A delivery failure does not change a Generation's
|
|
4241
|
+
/** The stage that failed. A delivery failure does not change a completed Generation's status. */
|
|
4542
4242
|
export declare const FailurePhase: {
|
|
4543
|
-
readonly
|
|
4243
|
+
readonly SPEC: "spec";
|
|
4544
4244
|
readonly GENERATION: "generation";
|
|
4545
4245
|
readonly DELIVERY: "delivery";
|
|
4546
4246
|
readonly PUBLICATION: "publication";
|
|
@@ -4553,40 +4253,10 @@ export type DomainError = ErrorDetail & {
|
|
|
4553
4253
|
export type DomainErrorRead = ErrorDetailRead & {
|
|
4554
4254
|
phase: FailurePhase | (string & {});
|
|
4555
4255
|
};
|
|
4556
|
-
export interface
|
|
4557
|
-
/** The Draft's history_recovery.
|
|
4558
|
-
|
|
4559
|
-
/** The Draft's history_recovery.
|
|
4560
|
-
|
|
4561
|
-
}
|
|
4562
|
-
export interface DraftHistoryRecovery {
|
|
4563
|
-
object: "draft_history_recovery";
|
|
4564
|
-
target_id: TargetId;
|
|
4565
|
-
/**
|
|
4566
|
-
* approved: recovery is saved and the Draft status is needs_generation. not_needed: the default
|
|
4567
|
-
* branch still contains the accepted package.
|
|
4568
|
-
*/
|
|
4569
|
-
status: "approved" | "not_needed";
|
|
4570
|
-
default_revision: string;
|
|
4571
|
-
head_revision: string | null;
|
|
4572
|
-
/** Existing Draft branch that stays available when Generate opens the recovered Draft. */
|
|
4573
|
-
preserved_branch: string | null;
|
|
4574
|
-
}
|
|
4575
|
-
/** Response shape for DraftHistoryRecovery. */
|
|
4576
|
-
export interface DraftHistoryRecoveryRead {
|
|
4577
|
-
object: "draft_history_recovery" | (string & {});
|
|
4578
|
-
target_id: TargetId;
|
|
4579
|
-
/**
|
|
4580
|
-
* approved: recovery is saved and the Draft status is needs_generation. not_needed: the default
|
|
4581
|
-
* branch still contains the accepted package.
|
|
4582
|
-
*/
|
|
4583
|
-
status: ("approved" | "not_needed") | (string & {});
|
|
4584
|
-
default_revision: string;
|
|
4585
|
-
head_revision: string | null;
|
|
4586
|
-
/** Existing Draft branch that stays available when Generate opens the recovered Draft. */
|
|
4587
|
-
preserved_branch: string | null;
|
|
4256
|
+
export interface DraftRecoverRequest {
|
|
4257
|
+
/** The Draft's history_recovery.default_sha. */
|
|
4258
|
+
expected_default_sha: string;
|
|
4259
|
+
/** The Draft's history_recovery.head_sha; null when the Draft branch is absent. */
|
|
4260
|
+
expected_head_sha: string | null;
|
|
4588
4261
|
}
|
|
4589
|
-
export type DraftHistoryRecoveryResponse = DraftHistoryRecovery & ResponseMetadata;
|
|
4590
|
-
/** Response shape for DraftHistoryRecoveryResponse. */
|
|
4591
|
-
export type DraftHistoryRecoveryResponseRead = DraftHistoryRecoveryRead & ResponseMetadata;
|
|
4592
4262
|
//# sourceMappingURL=types.d.ts.map
|