@typeship-ax/mcp 0.9.1 → 0.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +10 -4
- package/README.md +16 -5
- package/api.json +6055 -645
- package/api.md +5225 -567
- package/dist/core/http.d.ts +3 -2
- package/dist/core/http.d.ts.map +1 -1
- package/dist/core/http.js +18 -6
- package/dist/errors.d.ts +17 -10
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +24 -15
- package/dist/index.d.ts +7 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +9 -5
- package/dist/mcp-protocol.d.ts +10 -6
- package/dist/mcp-protocol.d.ts.map +1 -1
- package/dist/mcp-protocol.js +108 -37
- package/dist/mcp.d.ts.map +1 -1
- package/dist/mcp.js +36 -17
- package/dist/ops.d.ts +4 -0
- package/dist/ops.d.ts.map +1 -1
- package/dist/ops.js +45 -31
- package/dist/resources/account.d.ts +4 -4
- package/dist/resources/account.d.ts.map +1 -1
- package/dist/resources/account.js +10 -5
- package/dist/resources/api-keys.d.ts +40 -14
- package/dist/resources/api-keys.d.ts.map +1 -1
- package/dist/resources/api-keys.js +45 -13
- package/dist/resources/definition-revisions.d.ts +35 -18
- package/dist/resources/definition-revisions.d.ts.map +1 -1
- package/dist/resources/definition-revisions.js +43 -15
- package/dist/resources/definitions.d.ts +21 -6
- package/dist/resources/definitions.d.ts.map +1 -1
- package/dist/resources/definitions.js +16 -3
- package/dist/resources/generate.d.ts +44 -15
- package/dist/resources/generate.d.ts.map +1 -1
- package/dist/resources/generate.js +55 -13
- package/dist/resources/generations.d.ts +14 -6
- package/dist/resources/generations.d.ts.map +1 -1
- package/dist/resources/generations.js +26 -5
- package/dist/resources/projects.d.ts +106 -53
- package/dist/resources/projects.d.ts.map +1 -1
- package/dist/resources/projects.js +78 -31
- package/dist/resources/targets.d.ts +285 -22
- package/dist/resources/targets.d.ts.map +1 -1
- package/dist/resources/targets.js +408 -10
- package/dist/schemas.d.ts.map +1 -1
- package/dist/schemas.js +138 -73
- package/dist/types.d.ts +2162 -134
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +99 -2
- package/package.json +3 -3
- package/server.json +3 -3
- package/src/core/http.ts +17 -6
- package/src/errors.ts +25 -15
- package/src/index.ts +9 -5
- package/src/mcp-protocol.ts +93 -36
- package/src/mcp.ts +32 -15
- package/src/ops.ts +49 -31
- package/src/resources/account.ts +11 -4
- package/src/resources/api-keys.ts +84 -13
- package/src/resources/definition-revisions.ts +74 -16
- package/src/resources/definitions.ts +28 -4
- package/src/resources/generate.ts +78 -13
- package/src/resources/generations.ts +31 -4
- package/src/resources/projects.ts +141 -39
- package/src/resources/targets.ts +756 -13
- package/src/schemas.ts +138 -73
- package/src/types.ts +2372 -189
package/dist/types.d.ts
CHANGED
|
@@ -20,15 +20,18 @@ export type ListObject = "list";
|
|
|
20
20
|
export type TargetId = string;
|
|
21
21
|
export type DeliveryId = string;
|
|
22
22
|
export type TargetReleaseId = string;
|
|
23
|
+
export type PublicationId = string;
|
|
23
24
|
/**
|
|
24
25
|
* Generator implementation selected by a Target. This is configuration, not identity; several
|
|
25
|
-
* Targets may use the same generator.
|
|
26
|
+
* Targets may use the same generator. cli is the TypeScript CLI; go-cli is the native Go CLI, a
|
|
27
|
+
* distinct product that imports one exact paired Go SDK module rather than a client of its own.
|
|
26
28
|
*/
|
|
27
29
|
export declare const GeneratorKind: {
|
|
28
30
|
readonly TYPESCRIPT_SDK: "typescript-sdk";
|
|
29
31
|
readonly PYTHON_SDK: "python-sdk";
|
|
30
32
|
readonly GO_SDK: "go-sdk";
|
|
31
33
|
readonly CLI: "cli";
|
|
34
|
+
readonly GO_CLI: "go-cli";
|
|
32
35
|
readonly MCP: "mcp";
|
|
33
36
|
};
|
|
34
37
|
export type GeneratorKind = (typeof GeneratorKind)[keyof typeof GeneratorKind];
|
|
@@ -41,7 +44,7 @@ export interface UrlDefinitionInput {
|
|
|
41
44
|
url: string;
|
|
42
45
|
/**
|
|
43
46
|
* Request headers for a protected URL. Sent on the document GET and GraphQL introspection POST,
|
|
44
|
-
* never returned or retained by
|
|
47
|
+
* never returned or retained by one-shot generation.
|
|
45
48
|
*/
|
|
46
49
|
headers?: Record<string, string>;
|
|
47
50
|
}
|
|
@@ -58,13 +61,46 @@ export interface InlineDefinitionInput {
|
|
|
58
61
|
/** Raw Definition text (OpenAPI JSON/YAML or GraphQL SDL). Up to 10MB. */
|
|
59
62
|
inline: string;
|
|
60
63
|
}
|
|
61
|
-
/** A Definition for
|
|
64
|
+
/** A Definition for one-shot generation, provided as exactly one URL or inline entrypoint. */
|
|
62
65
|
export type DefinitionInput = UrlDefinitionInput | InlineDefinitionInput;
|
|
63
66
|
/** Response shape for DefinitionInput. */
|
|
64
67
|
export type DefinitionInputRead = UrlDefinitionInputRead | InlineDefinitionInput;
|
|
68
|
+
/**
|
|
69
|
+
* The exact paired Go SDK a go-cli generation is built on. Required when target.generator is go-cli
|
|
70
|
+
* and rejected otherwise. The descriptor is closed and immutable, because a CLI that pins a range
|
|
71
|
+
* or a branch pins nothing.
|
|
72
|
+
*/
|
|
73
|
+
export interface GoSdkDescriptor {
|
|
74
|
+
/**
|
|
75
|
+
* Go module path of the SDK the CLI imports, for example github.com/acme/payments-go. Must be a
|
|
76
|
+
* valid Go module path.
|
|
77
|
+
*/
|
|
78
|
+
module_path: string;
|
|
79
|
+
/**
|
|
80
|
+
* Exact SDK module version the CLI requires: v-prefixed SemVer such as v1.2.3, or an immutable Go
|
|
81
|
+
* pseudo-version naming a commit such as v0.0.0-20240824120000-abcdef123456. Ranges, branches,
|
|
82
|
+
* and "latest" are rejected.
|
|
83
|
+
*/
|
|
84
|
+
version: string;
|
|
85
|
+
/**
|
|
86
|
+
* SHA-256 hex digest of the Definition the SDK was generated from. Must match the resolved
|
|
87
|
+
* Definition, or the request fails with spec_error.
|
|
88
|
+
*/
|
|
89
|
+
definition_digest: string;
|
|
90
|
+
/**
|
|
91
|
+
* The generator edition the SDK was generated with. Only the current edition, 2026-08-24, is
|
|
92
|
+
* accepted.
|
|
93
|
+
*/
|
|
94
|
+
edition: string;
|
|
95
|
+
/**
|
|
96
|
+
* Go package identifier of the SDK, when the module path's last element does not imply it.
|
|
97
|
+
* Optional.
|
|
98
|
+
*/
|
|
99
|
+
package_name?: string;
|
|
100
|
+
}
|
|
65
101
|
export interface GenerateRequest {
|
|
66
102
|
definition: DefinitionInput;
|
|
67
|
-
/**
|
|
103
|
+
/** One-shot generator descriptor; no persisted Target is created. */
|
|
68
104
|
target: {
|
|
69
105
|
generator: GeneratorKind;
|
|
70
106
|
};
|
|
@@ -74,16 +110,17 @@ export interface GenerateRequest {
|
|
|
74
110
|
*/
|
|
75
111
|
package_name?: string;
|
|
76
112
|
/**
|
|
77
|
-
* Go module path override
|
|
78
|
-
* destination repository by default.
|
|
113
|
+
* Go module path override for the generated artifact's own module. Valid only for the Go SDK and
|
|
114
|
+
* Go CLI outputs. Linked projects derive this from the Go destination repository by default.
|
|
79
115
|
*/
|
|
80
116
|
module_path?: string;
|
|
117
|
+
go_sdk?: GoSdkDescriptor;
|
|
81
118
|
config?: Config;
|
|
82
119
|
}
|
|
83
120
|
/** Response shape for GenerateRequest. */
|
|
84
121
|
export interface GenerateRequestRead {
|
|
85
122
|
definition: DefinitionInputRead;
|
|
86
|
-
/**
|
|
123
|
+
/** One-shot generator descriptor; no persisted Target is created. */
|
|
87
124
|
target: {
|
|
88
125
|
generator: GeneratorKind | (string & {});
|
|
89
126
|
};
|
|
@@ -93,16 +130,33 @@ export interface GenerateRequestRead {
|
|
|
93
130
|
*/
|
|
94
131
|
package_name?: string;
|
|
95
132
|
/**
|
|
96
|
-
* Go module path override
|
|
97
|
-
* destination repository by default.
|
|
133
|
+
* Go module path override for the generated artifact's own module. Valid only for the Go SDK and
|
|
134
|
+
* Go CLI outputs. Linked projects derive this from the Go destination repository by default.
|
|
98
135
|
*/
|
|
99
136
|
module_path?: string;
|
|
137
|
+
go_sdk?: GoSdkDescriptor;
|
|
100
138
|
config?: ConfigRead;
|
|
101
139
|
}
|
|
102
140
|
export interface GeneratedFile {
|
|
103
141
|
/** Repo-relative path inside the generated package. */
|
|
104
142
|
path: string;
|
|
105
143
|
content: string;
|
|
144
|
+
/**
|
|
145
|
+
* Exact Git file mode. Omitted one-shot outputs are regular files.
|
|
146
|
+
* Default: "100644"
|
|
147
|
+
*/
|
|
148
|
+
mode?: "100644" | "100755";
|
|
149
|
+
}
|
|
150
|
+
/** Response shape for GeneratedFile. */
|
|
151
|
+
export interface GeneratedFileRead {
|
|
152
|
+
/** Repo-relative path inside the generated package. */
|
|
153
|
+
path: string;
|
|
154
|
+
content: string;
|
|
155
|
+
/**
|
|
156
|
+
* Exact Git file mode. Omitted one-shot outputs are regular files.
|
|
157
|
+
* Default: "100644"
|
|
158
|
+
*/
|
|
159
|
+
mode?: ("100644" | "100755") | (string & {});
|
|
106
160
|
}
|
|
107
161
|
export interface GenerationMeta {
|
|
108
162
|
title: string;
|
|
@@ -123,6 +177,18 @@ export interface GenerationMeta {
|
|
|
123
177
|
* Generation.
|
|
124
178
|
*/
|
|
125
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
|
+
};
|
|
126
192
|
resource_count?: number;
|
|
127
193
|
operation_count?: number;
|
|
128
194
|
schema_count?: number;
|
|
@@ -139,11 +205,6 @@ export interface GenerationMeta {
|
|
|
139
205
|
* matched, or could not be opened.
|
|
140
206
|
*/
|
|
141
207
|
pr_status?: "opened" | "no_changes" | "blocked";
|
|
142
|
-
/**
|
|
143
|
-
* Why the configured destination pull request was not opened. Generation itself still succeeded;
|
|
144
|
-
* fix this action and regenerate.
|
|
145
|
-
*/
|
|
146
|
-
pr_error?: string;
|
|
147
208
|
/**
|
|
148
209
|
* Markdown changelog entry for this regeneration, from the API surface diff. Absent on a first
|
|
149
210
|
* generation or when nothing changed.
|
|
@@ -155,10 +216,10 @@ export interface GenerationMeta {
|
|
|
155
216
|
*/
|
|
156
217
|
breaking_count?: number;
|
|
157
218
|
/**
|
|
158
|
-
* What the diff was measured against
|
|
159
|
-
* the
|
|
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.
|
|
160
221
|
*/
|
|
161
|
-
baseline?: "destination" | "none";
|
|
222
|
+
baseline?: "destination" | "last-generation" | "none";
|
|
162
223
|
/** Objective compatibility of the generated API surface against the merged destination baseline. */
|
|
163
224
|
api_compatibility?: "compatible" | "breaking" | "unknown";
|
|
164
225
|
/**
|
|
@@ -175,11 +236,18 @@ export interface GenerationMeta {
|
|
|
175
236
|
* The destination pull request's combined readiness decision for the exact bot-generated head.
|
|
176
237
|
* Compatibility and version correctness remain separate fields above.
|
|
177
238
|
*/
|
|
178
|
-
release_readiness?: "success" | "failure" | "error";
|
|
239
|
+
release_readiness?: "success" | "failure" | "pending" | "error";
|
|
179
240
|
/** The release-readiness decision in one line, as the commit status describes it. */
|
|
180
241
|
release_readiness_note?: string;
|
|
181
242
|
/** The package version the destination had before this regeneration. */
|
|
182
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;
|
|
183
251
|
file_count?: number;
|
|
184
252
|
total_lines?: number;
|
|
185
253
|
/** Deterministic Diagnostic summary for the exact Definition Revision consumed. */
|
|
@@ -208,6 +276,18 @@ export interface GenerationMetaRead {
|
|
|
208
276
|
* Generation.
|
|
209
277
|
*/
|
|
210
278
|
generators: Array<GeneratorKind | (string & {})>;
|
|
279
|
+
/**
|
|
280
|
+
* Present for go-cli generations only. Names the exact paired Go SDK module and version the CLI
|
|
281
|
+
* was generated against, as its go.mod requires it.
|
|
282
|
+
*/
|
|
283
|
+
go_sdk?: {
|
|
284
|
+
/** Go module path of the SDK the Go CLI imports and pins. */
|
|
285
|
+
module_path: string;
|
|
286
|
+
/** Exact SDK module version the Go CLI requires, v-prefixed SemVer or a Go pseudo-version. */
|
|
287
|
+
version: string;
|
|
288
|
+
/** Go package identifier of the SDK, when the module path does not imply it. */
|
|
289
|
+
package_name?: string;
|
|
290
|
+
};
|
|
211
291
|
resource_count?: number;
|
|
212
292
|
operation_count?: number;
|
|
213
293
|
schema_count?: number;
|
|
@@ -224,11 +304,6 @@ export interface GenerationMetaRead {
|
|
|
224
304
|
* matched, or could not be opened.
|
|
225
305
|
*/
|
|
226
306
|
pr_status?: ("opened" | "no_changes" | "blocked") | (string & {});
|
|
227
|
-
/**
|
|
228
|
-
* Why the configured destination pull request was not opened. Generation itself still succeeded;
|
|
229
|
-
* fix this action and regenerate.
|
|
230
|
-
*/
|
|
231
|
-
pr_error?: string;
|
|
232
307
|
/**
|
|
233
308
|
* Markdown changelog entry for this regeneration, from the API surface diff. Absent on a first
|
|
234
309
|
* generation or when nothing changed.
|
|
@@ -240,10 +315,10 @@ export interface GenerationMetaRead {
|
|
|
240
315
|
*/
|
|
241
316
|
breaking_count?: number;
|
|
242
317
|
/**
|
|
243
|
-
* What the diff was measured against
|
|
244
|
-
* the
|
|
318
|
+
* What the diff was measured against. destination uses the accepted repository state;
|
|
319
|
+
* last-generation uses the previous successful Generation; none means no baseline was available.
|
|
245
320
|
*/
|
|
246
|
-
baseline?: ("destination" | "none") | (string & {});
|
|
321
|
+
baseline?: ("destination" | "last-generation" | "none") | (string & {});
|
|
247
322
|
/** Objective compatibility of the generated API surface against the merged destination baseline. */
|
|
248
323
|
api_compatibility?: ("compatible" | "breaking" | "unknown") | (string & {});
|
|
249
324
|
/**
|
|
@@ -260,11 +335,18 @@ export interface GenerationMetaRead {
|
|
|
260
335
|
* The destination pull request's combined readiness decision for the exact bot-generated head.
|
|
261
336
|
* Compatibility and version correctness remain separate fields above.
|
|
262
337
|
*/
|
|
263
|
-
release_readiness?: ("success" | "failure" | "error") | (string & {});
|
|
338
|
+
release_readiness?: ("success" | "failure" | "pending" | "error") | (string & {});
|
|
264
339
|
/** The release-readiness decision in one line, as the commit status describes it. */
|
|
265
340
|
release_readiness_note?: string;
|
|
266
341
|
/** The package version the destination had before this regeneration. */
|
|
267
342
|
previous_version?: string;
|
|
343
|
+
/** Files changed by the customer relative to the accepted combined baseline. */
|
|
344
|
+
customer_change_count?: number;
|
|
345
|
+
integration_state?: ("conflicted" | "checking" | "checks_failed" | "ready" | "accepted" | "outdated") | (string & {});
|
|
346
|
+
/** Separate compatibility result against the last published artifact. */
|
|
347
|
+
published_compatibility?: ("compatible" | "breaking" | "unknown" | "not_applicable") | (string & {});
|
|
348
|
+
/** Version of the last published artifact used by published_compatibility. */
|
|
349
|
+
published_version?: string;
|
|
268
350
|
file_count?: number;
|
|
269
351
|
total_lines?: number;
|
|
270
352
|
/** Deterministic Diagnostic summary for the exact Definition Revision consumed. */
|
|
@@ -275,6 +357,7 @@ export interface GenerationMetaRead {
|
|
|
275
357
|
}
|
|
276
358
|
export interface GenerationResult {
|
|
277
359
|
files: GeneratedFile[];
|
|
360
|
+
download?: GenerationDownload;
|
|
278
361
|
warnings: string[];
|
|
279
362
|
meta: GenerationMeta;
|
|
280
363
|
limits?: GenerationLimits;
|
|
@@ -292,7 +375,8 @@ export interface GenerationResult {
|
|
|
292
375
|
}
|
|
293
376
|
/** Response shape for GenerationResult. */
|
|
294
377
|
export interface GenerationResultRead {
|
|
295
|
-
files:
|
|
378
|
+
files: GeneratedFileRead[];
|
|
379
|
+
download?: GenerationDownload;
|
|
296
380
|
warnings: string[];
|
|
297
381
|
meta: GenerationMetaRead;
|
|
298
382
|
limits?: GenerationLimitsRead;
|
|
@@ -308,6 +392,22 @@ export interface GenerationResultRead {
|
|
|
308
392
|
};
|
|
309
393
|
request_id: RequestId;
|
|
310
394
|
}
|
|
395
|
+
/**
|
|
396
|
+
* Complete package ZIP from this exact result. Present on requests with Idempotency-Key, including
|
|
397
|
+
* automatic CLI, MCP, and SDK keys. Download before expires_at, verify sha256, and extract into an
|
|
398
|
+
* empty directory. Anyone with this URL can download the package; keep it private. Reading does not
|
|
399
|
+
* generate again or extend the 24-hour replay window.
|
|
400
|
+
*/
|
|
401
|
+
export interface GenerationDownload {
|
|
402
|
+
/** Format: uri */
|
|
403
|
+
url: string;
|
|
404
|
+
/** Format: date-time */
|
|
405
|
+
expires_at: string;
|
|
406
|
+
/** SHA-256 of the downloaded ZIP bytes. */
|
|
407
|
+
sha256: string;
|
|
408
|
+
size_bytes: number;
|
|
409
|
+
file_count: number;
|
|
410
|
+
}
|
|
311
411
|
/**
|
|
312
412
|
* Present when the generation was capped: by the free plan, or because the call was anonymous.
|
|
313
413
|
* Absent on uncapped generations.
|
|
@@ -388,14 +488,14 @@ export interface RepositoryReferenceRead {
|
|
|
388
488
|
}
|
|
389
489
|
export interface RepositoryDefinitionSource {
|
|
390
490
|
kind: "repository";
|
|
391
|
-
repository:
|
|
491
|
+
repository: RepositoryReferenceResponse;
|
|
392
492
|
/** Repository-relative Definition entrypoint. */
|
|
393
493
|
path: string;
|
|
394
494
|
}
|
|
395
495
|
/** Response shape for RepositoryDefinitionSource. */
|
|
396
496
|
export interface RepositoryDefinitionSourceRead {
|
|
397
497
|
kind: "repository" | (string & {});
|
|
398
|
-
repository:
|
|
498
|
+
repository: RepositoryReferenceResponseRead;
|
|
399
499
|
/** Repository-relative Definition entrypoint. */
|
|
400
500
|
path: string;
|
|
401
501
|
}
|
|
@@ -506,7 +606,7 @@ export interface DiagnosticFix {
|
|
|
506
606
|
*/
|
|
507
607
|
kind: "spec_patch" | "source_edit";
|
|
508
608
|
/** Exact patches when kind is spec_patch. */
|
|
509
|
-
patches?:
|
|
609
|
+
patches?: DefinitionPatchResponse[];
|
|
510
610
|
/** Source-level guidance when an exact patch would invent intent. */
|
|
511
611
|
instructions?: string;
|
|
512
612
|
}
|
|
@@ -520,7 +620,7 @@ export interface DiagnosticFixRead {
|
|
|
520
620
|
*/
|
|
521
621
|
kind: ("spec_patch" | "source_edit") | (string & {});
|
|
522
622
|
/** Exact patches when kind is spec_patch. */
|
|
523
|
-
patches?:
|
|
623
|
+
patches?: DefinitionPatchResponseRead[];
|
|
524
624
|
/** Source-level guidance when an exact patch would invent intent. */
|
|
525
625
|
instructions?: string;
|
|
526
626
|
}
|
|
@@ -536,10 +636,19 @@ export interface Diagnostic {
|
|
|
536
636
|
title: string;
|
|
537
637
|
/** What the API author should change. */
|
|
538
638
|
description: string;
|
|
539
|
-
/** Why consumers of generated
|
|
639
|
+
/** Why consumers of generated CLI, MCP, or SDK surfaces care. */
|
|
540
640
|
impact: string;
|
|
541
641
|
/** Public surfaces affected by the root cause. */
|
|
542
642
|
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. */
|
|
649
|
+
owner_decision_required: boolean;
|
|
650
|
+
/** Concrete generated CLI, MCP, or SDK naming effect when Typeship can state it. */
|
|
651
|
+
surface_impact?: string;
|
|
543
652
|
/** All affected coordinates, kept under one grouped diagnostic. */
|
|
544
653
|
locations: DiagnosticLocation[];
|
|
545
654
|
fix?: DiagnosticFix;
|
|
@@ -561,10 +670,19 @@ export interface DiagnosticRead {
|
|
|
561
670
|
title: string;
|
|
562
671
|
/** What the API author should change. */
|
|
563
672
|
description: string;
|
|
564
|
-
/** Why consumers of generated
|
|
673
|
+
/** Why consumers of generated CLI, MCP, or SDK surfaces care. */
|
|
565
674
|
impact: string;
|
|
566
675
|
/** Public surfaces affected by the root cause. */
|
|
567
676
|
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. */
|
|
683
|
+
owner_decision_required: boolean;
|
|
684
|
+
/** Concrete generated CLI, MCP, or SDK naming effect when Typeship can state it. */
|
|
685
|
+
surface_impact?: string;
|
|
568
686
|
/** All affected coordinates, kept under one grouped diagnostic. */
|
|
569
687
|
locations: DiagnosticLocation[];
|
|
570
688
|
fix?: DiagnosticFixRead;
|
|
@@ -642,6 +760,22 @@ export interface DiagnosticEvaluationRead {
|
|
|
642
760
|
considered_occurrences: number;
|
|
643
761
|
suppressed_occurrences: number;
|
|
644
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
|
+
}
|
|
645
779
|
/** Compact rule and location reference; full guidance appears once in diagnostics. */
|
|
646
780
|
export interface DiagnosticReference {
|
|
647
781
|
rule_id: string;
|
|
@@ -686,8 +820,9 @@ export interface DiagnosticReport {
|
|
|
686
820
|
summary: DiagnosticSummary;
|
|
687
821
|
/** Stable grouped diagnostics, ordered by severity and rule identifier. */
|
|
688
822
|
diagnostics: Diagnostic[];
|
|
689
|
-
policy:
|
|
823
|
+
policy: DiagnosticPolicyResponse;
|
|
690
824
|
evaluation: DiagnosticEvaluation;
|
|
825
|
+
quality_signals: DiagnosticQualitySignals;
|
|
691
826
|
delta: DiagnosticDelta;
|
|
692
827
|
request_id: RequestId;
|
|
693
828
|
}
|
|
@@ -707,8 +842,9 @@ export interface DiagnosticReportRead {
|
|
|
707
842
|
summary: DiagnosticSummary;
|
|
708
843
|
/** Stable grouped diagnostics, ordered by severity and rule identifier. */
|
|
709
844
|
diagnostics: DiagnosticRead[];
|
|
710
|
-
policy:
|
|
845
|
+
policy: DiagnosticPolicyResponseRead;
|
|
711
846
|
evaluation: DiagnosticEvaluationRead;
|
|
847
|
+
quality_signals: DiagnosticQualitySignals;
|
|
712
848
|
delta: DiagnosticDeltaRead;
|
|
713
849
|
request_id: RequestId;
|
|
714
850
|
}
|
|
@@ -745,8 +881,13 @@ export interface RepositoryDeliveryInput {
|
|
|
745
881
|
directory?: string | null;
|
|
746
882
|
/** npm or Python registry identity where applicable. */
|
|
747
883
|
package_name?: string | null;
|
|
748
|
-
/**
|
|
884
|
+
/** Go module identity for the Go SDK or Go CLI Target where applicable. */
|
|
749
885
|
module_path?: string | null;
|
|
886
|
+
/**
|
|
887
|
+
* Commit repository-owned registry automation and report publication after the Draft merges.
|
|
888
|
+
* Default: false
|
|
889
|
+
*/
|
|
890
|
+
publish_on_merge?: boolean;
|
|
750
891
|
}
|
|
751
892
|
/** Response shape for RepositoryDeliveryInput. */
|
|
752
893
|
export interface RepositoryDeliveryInputRead {
|
|
@@ -755,8 +896,13 @@ export interface RepositoryDeliveryInputRead {
|
|
|
755
896
|
directory?: string | null;
|
|
756
897
|
/** npm or Python registry identity where applicable. */
|
|
757
898
|
package_name?: string | null;
|
|
758
|
-
/**
|
|
899
|
+
/** Go module identity for the Go SDK or Go CLI Target where applicable. */
|
|
759
900
|
module_path?: string | null;
|
|
901
|
+
/**
|
|
902
|
+
* Commit repository-owned registry automation and report publication after the Draft merges.
|
|
903
|
+
* Default: false
|
|
904
|
+
*/
|
|
905
|
+
publish_on_merge?: boolean;
|
|
760
906
|
}
|
|
761
907
|
export interface HostedMcpDeliveryInput {
|
|
762
908
|
kind: "hosted_mcp";
|
|
@@ -776,10 +922,11 @@ export interface RepositoryDelivery {
|
|
|
776
922
|
target_id: TargetId;
|
|
777
923
|
kind: "repository";
|
|
778
924
|
state: "active" | "disabled";
|
|
779
|
-
repository:
|
|
925
|
+
repository: RepositoryReferenceResponse;
|
|
780
926
|
directory: string | null;
|
|
781
927
|
package_name: string | null;
|
|
782
928
|
module_path: string | null;
|
|
929
|
+
publish_on_merge: boolean;
|
|
783
930
|
/** Format: date-time */
|
|
784
931
|
created_at: string;
|
|
785
932
|
/** Format: date-time */
|
|
@@ -792,10 +939,11 @@ export interface RepositoryDeliveryRead {
|
|
|
792
939
|
target_id: TargetId;
|
|
793
940
|
kind: "repository" | (string & {});
|
|
794
941
|
state: ("active" | "disabled") | (string & {});
|
|
795
|
-
repository:
|
|
942
|
+
repository: RepositoryReferenceResponseRead;
|
|
796
943
|
directory: string | null;
|
|
797
944
|
package_name: string | null;
|
|
798
945
|
module_path: string | null;
|
|
946
|
+
publish_on_merge: boolean;
|
|
799
947
|
/** Format: date-time */
|
|
800
948
|
created_at: string;
|
|
801
949
|
/** Format: date-time */
|
|
@@ -833,6 +981,88 @@ export type Delivery = RepositoryDelivery | HostedMcpDelivery;
|
|
|
833
981
|
export type DeliveryRead = RepositoryDeliveryRead | HostedMcpDeliveryRead | Record<string, unknown> & {
|
|
834
982
|
kind?: string;
|
|
835
983
|
};
|
|
984
|
+
/**
|
|
985
|
+
* Repository fields are present for a repository Delivery; url is present for a hosted_mcp
|
|
986
|
+
* Delivery.
|
|
987
|
+
*/
|
|
988
|
+
export interface DeliveryResponse {
|
|
989
|
+
id: DeliveryId;
|
|
990
|
+
object: "delivery";
|
|
991
|
+
target_id: TargetId;
|
|
992
|
+
kind: "repository" | "hosted_mcp";
|
|
993
|
+
state: "active" | "disabled";
|
|
994
|
+
repository?: RepositoryReferenceResponse;
|
|
995
|
+
directory?: string | null;
|
|
996
|
+
package_name?: string | null;
|
|
997
|
+
module_path?: string | null;
|
|
998
|
+
publish_on_merge?: boolean;
|
|
999
|
+
/** Format: uri */
|
|
1000
|
+
url?: string | null;
|
|
1001
|
+
/** Format: date-time */
|
|
1002
|
+
created_at: string;
|
|
1003
|
+
/** Format: date-time */
|
|
1004
|
+
updated_at: string;
|
|
1005
|
+
request_id: RequestId;
|
|
1006
|
+
}
|
|
1007
|
+
/** Response shape for DeliveryResponse. */
|
|
1008
|
+
export interface DeliveryResponseRead {
|
|
1009
|
+
id: DeliveryId;
|
|
1010
|
+
object: "delivery" | (string & {});
|
|
1011
|
+
target_id: TargetId;
|
|
1012
|
+
kind: ("repository" | "hosted_mcp") | (string & {});
|
|
1013
|
+
state: ("active" | "disabled") | (string & {});
|
|
1014
|
+
repository?: RepositoryReferenceResponseRead;
|
|
1015
|
+
directory?: string | null;
|
|
1016
|
+
package_name?: string | null;
|
|
1017
|
+
module_path?: string | null;
|
|
1018
|
+
publish_on_merge?: boolean;
|
|
1019
|
+
/** Format: uri */
|
|
1020
|
+
url?: string | null;
|
|
1021
|
+
/** Format: date-time */
|
|
1022
|
+
created_at: string;
|
|
1023
|
+
/** Format: date-time */
|
|
1024
|
+
updated_at: string;
|
|
1025
|
+
request_id: RequestId;
|
|
1026
|
+
}
|
|
1027
|
+
/**
|
|
1028
|
+
* One Target generated from a sibling Target. A go-cli Target carries kind go_sdk_module, naming
|
|
1029
|
+
* the Go SDK Target it is generated against.
|
|
1030
|
+
*/
|
|
1031
|
+
export interface TargetDependency {
|
|
1032
|
+
kind: "go_sdk_module";
|
|
1033
|
+
target_id: TargetId;
|
|
1034
|
+
}
|
|
1035
|
+
/** Response shape for TargetDependency. */
|
|
1036
|
+
export interface TargetDependencyRead {
|
|
1037
|
+
kind: "go_sdk_module" | (string & {});
|
|
1038
|
+
target_id: TargetId;
|
|
1039
|
+
}
|
|
1040
|
+
/**
|
|
1041
|
+
* Required checks run against the complete combined package. Generated checks and customer commands
|
|
1042
|
+
* share one reproducible workflow; repository_required names existing repository checks. Supplying
|
|
1043
|
+
* checks replaces all settings. Omitted generated restores build, package, and public_entrypoint;
|
|
1044
|
+
* omitted repository_required and customer restore empty lists. An empty object restores these
|
|
1045
|
+
* defaults. An empty array clears the corresponding list.
|
|
1046
|
+
*/
|
|
1047
|
+
export interface TargetChecks {
|
|
1048
|
+
/** Default: ["build","package","public_entrypoint"] */
|
|
1049
|
+
generated?: Array<"build" | "package" | "public_entrypoint">;
|
|
1050
|
+
repository_required?: string[];
|
|
1051
|
+
customer?: Array<{
|
|
1052
|
+
name: string;
|
|
1053
|
+
command: string;
|
|
1054
|
+
}>;
|
|
1055
|
+
}
|
|
1056
|
+
/** Response shape for TargetChecks. */
|
|
1057
|
+
export interface TargetChecksRead {
|
|
1058
|
+
/** Default: ["build","package","public_entrypoint"] */
|
|
1059
|
+
generated?: Array<("build" | "package" | "public_entrypoint") | (string & {})>;
|
|
1060
|
+
repository_required?: string[];
|
|
1061
|
+
customer?: Array<{
|
|
1062
|
+
name: string;
|
|
1063
|
+
command: string;
|
|
1064
|
+
}>;
|
|
1065
|
+
}
|
|
836
1066
|
export interface TargetFields {
|
|
837
1067
|
name: string;
|
|
838
1068
|
definition_id: DefinitionId;
|
|
@@ -845,6 +1075,7 @@ export interface TargetFields {
|
|
|
845
1075
|
release_channel?: "stable" | "prerelease";
|
|
846
1076
|
/** Optional larger or prerelease SemVer for the next reviewed release. */
|
|
847
1077
|
proposed_version?: string | null;
|
|
1078
|
+
checks?: TargetChecks;
|
|
848
1079
|
/**
|
|
849
1080
|
* Target-specific overrides merged over Project.config. GraphQL settings are rejected here and
|
|
850
1081
|
* belong to the Definition.
|
|
@@ -865,6 +1096,7 @@ export interface TargetFieldsRead {
|
|
|
865
1096
|
release_channel?: ("stable" | "prerelease") | (string & {});
|
|
866
1097
|
/** Optional larger or prerelease SemVer for the next reviewed release. */
|
|
867
1098
|
proposed_version?: string | null;
|
|
1099
|
+
checks?: TargetChecksRead;
|
|
868
1100
|
/**
|
|
869
1101
|
* Target-specific overrides merged over Project.config. GraphQL settings are rejected here and
|
|
870
1102
|
* belong to the Definition.
|
|
@@ -882,6 +1114,7 @@ export interface InitialTargetFields {
|
|
|
882
1114
|
/** Default: "stable" */
|
|
883
1115
|
release_channel?: "stable" | "prerelease";
|
|
884
1116
|
proposed_version?: string | null;
|
|
1117
|
+
checks?: TargetChecks;
|
|
885
1118
|
/**
|
|
886
1119
|
* Target-specific overrides merged over Project.config. GraphQL settings are rejected here and
|
|
887
1120
|
* belong to the Definition.
|
|
@@ -900,6 +1133,7 @@ export interface InitialTargetFieldsRead {
|
|
|
900
1133
|
/** Default: "stable" */
|
|
901
1134
|
release_channel?: ("stable" | "prerelease") | (string & {});
|
|
902
1135
|
proposed_version?: string | null;
|
|
1136
|
+
checks?: TargetChecksRead;
|
|
903
1137
|
/**
|
|
904
1138
|
* Target-specific overrides merged over Project.config. GraphQL settings are rejected here and
|
|
905
1139
|
* belong to the Definition.
|
|
@@ -912,12 +1146,25 @@ export interface TargetUpdateRequest {
|
|
|
912
1146
|
state?: "active" | "disabled";
|
|
913
1147
|
edition?: string;
|
|
914
1148
|
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
|
+
*/
|
|
915
1153
|
proposed_version?: string | null;
|
|
1154
|
+
checks?: TargetChecks;
|
|
916
1155
|
/**
|
|
917
|
-
*
|
|
918
|
-
* belong to the
|
|
1156
|
+
* 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.
|
|
919
1159
|
*/
|
|
920
1160
|
config?: TargetConfig | null;
|
|
1161
|
+
/**
|
|
1162
|
+
* Replaces the Delivery set; include each kind you want to keep. Retained kinds preserve their
|
|
1163
|
+
* ID, creation time, and hosted URL. Each supplied Delivery replaces its configuration, so
|
|
1164
|
+
* omitted optional settings reset to their defaults. Omit deliveries to keep the existing set, or
|
|
1165
|
+
* send [] to remove all Deliveries. Removing and later recreating a kind allocates a new ID and,
|
|
1166
|
+
* for hosted_mcp, a new URL.
|
|
1167
|
+
*/
|
|
921
1168
|
deliveries?: DeliveryInput[];
|
|
922
1169
|
}
|
|
923
1170
|
/** Response shape for TargetUpdateRequest. */
|
|
@@ -926,15 +1173,69 @@ export interface TargetUpdateRequestRead {
|
|
|
926
1173
|
state?: ("active" | "disabled") | (string & {});
|
|
927
1174
|
edition?: string;
|
|
928
1175
|
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
|
+
*/
|
|
929
1180
|
proposed_version?: string | null;
|
|
1181
|
+
checks?: TargetChecksRead;
|
|
930
1182
|
/**
|
|
931
|
-
*
|
|
932
|
-
* belong to the
|
|
1183
|
+
* 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.
|
|
933
1186
|
*/
|
|
934
1187
|
config?: TargetConfigRead | null;
|
|
1188
|
+
/**
|
|
1189
|
+
* Replaces the Delivery set; include each kind you want to keep. Retained kinds preserve their
|
|
1190
|
+
* ID, creation time, and hosted URL. Each supplied Delivery replaces its configuration, so
|
|
1191
|
+
* omitted optional settings reset to their defaults. Omit deliveries to keep the existing set, or
|
|
1192
|
+
* send [] to remove all Deliveries. Removing and later recreating a kind allocates a new ID and,
|
|
1193
|
+
* for hosted_mcp, a new URL.
|
|
1194
|
+
*/
|
|
935
1195
|
deliveries?: DeliveryInputRead[];
|
|
936
1196
|
}
|
|
937
1197
|
export interface Target {
|
|
1198
|
+
id: TargetId;
|
|
1199
|
+
object: "target";
|
|
1200
|
+
project_id: ProjectId;
|
|
1201
|
+
definition_id: DefinitionId;
|
|
1202
|
+
name: string;
|
|
1203
|
+
generator: GeneratorKind;
|
|
1204
|
+
/**
|
|
1205
|
+
* Present only on a go-cli Target, naming the sibling Go SDK Target the CLI is generated against.
|
|
1206
|
+
* Every other generator reports null.
|
|
1207
|
+
*/
|
|
1208
|
+
dependency: TargetDependency | null;
|
|
1209
|
+
state: "active" | "disabled";
|
|
1210
|
+
edition: string;
|
|
1211
|
+
release_channel: "stable" | "prerelease";
|
|
1212
|
+
version_policy: {
|
|
1213
|
+
mode: "reviewed_semver";
|
|
1214
|
+
pre1_breaking: "minor";
|
|
1215
|
+
};
|
|
1216
|
+
/**
|
|
1217
|
+
* Read-only version of the Target's Current release, or null before its first release. Registry
|
|
1218
|
+
* publication status is separate; inspect the Target Release for publication results.
|
|
1219
|
+
*/
|
|
1220
|
+
current_version: string | null;
|
|
1221
|
+
proposed_version: string | null;
|
|
1222
|
+
proposed_version_source: "console" | "api" | "github" | null;
|
|
1223
|
+
checks: TargetChecksResponse;
|
|
1224
|
+
/**
|
|
1225
|
+
* Target-specific overrides merged over Project.config. GraphQL settings are Definition-owned and
|
|
1226
|
+
* never appear here.
|
|
1227
|
+
*/
|
|
1228
|
+
config: TargetConfigResponse | null;
|
|
1229
|
+
/** At most one repository and one hosted MCP Delivery. */
|
|
1230
|
+
deliveries: Delivery[];
|
|
1231
|
+
/** Format: date-time */
|
|
1232
|
+
created_at: string;
|
|
1233
|
+
/** Format: date-time */
|
|
1234
|
+
updated_at: string;
|
|
1235
|
+
request_id?: RequestId;
|
|
1236
|
+
}
|
|
1237
|
+
/** Request shape for Target. */
|
|
1238
|
+
export interface TargetWrite {
|
|
938
1239
|
id: TargetId;
|
|
939
1240
|
object: "target";
|
|
940
1241
|
project_id: ProjectId;
|
|
@@ -948,13 +1249,19 @@ export interface Target {
|
|
|
948
1249
|
mode: "reviewed_semver";
|
|
949
1250
|
pre1_breaking: "minor";
|
|
950
1251
|
};
|
|
951
|
-
|
|
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;
|
|
952
1257
|
proposed_version: string | null;
|
|
1258
|
+
proposed_version_source: "console" | "api" | "github" | null;
|
|
1259
|
+
checks: TargetChecksResponse;
|
|
953
1260
|
/**
|
|
954
1261
|
* Target-specific overrides merged over Project.config. GraphQL settings are Definition-owned and
|
|
955
1262
|
* never appear here.
|
|
956
1263
|
*/
|
|
957
|
-
config:
|
|
1264
|
+
config: TargetConfigResponse | null;
|
|
958
1265
|
/** At most one repository and one hosted MCP Delivery. */
|
|
959
1266
|
deliveries: Delivery[];
|
|
960
1267
|
/** Format: date-time */
|
|
@@ -971,6 +1278,11 @@ export interface TargetRead {
|
|
|
971
1278
|
definition_id: DefinitionId;
|
|
972
1279
|
name: string;
|
|
973
1280
|
generator: GeneratorKind | (string & {});
|
|
1281
|
+
/**
|
|
1282
|
+
* Present only on a go-cli Target, naming the sibling Go SDK Target the CLI is generated against.
|
|
1283
|
+
* Every other generator reports null.
|
|
1284
|
+
*/
|
|
1285
|
+
dependency: TargetDependencyRead | null;
|
|
974
1286
|
state: ("active" | "disabled") | (string & {});
|
|
975
1287
|
edition: string;
|
|
976
1288
|
release_channel: ("stable" | "prerelease") | (string & {});
|
|
@@ -978,13 +1290,19 @@ export interface TargetRead {
|
|
|
978
1290
|
mode: "reviewed_semver" | (string & {});
|
|
979
1291
|
pre1_breaking: "minor" | (string & {});
|
|
980
1292
|
};
|
|
981
|
-
|
|
1293
|
+
/**
|
|
1294
|
+
* Read-only version of the Target's Current release, or null before its first release. Registry
|
|
1295
|
+
* publication status is separate; inspect the Target Release for publication results.
|
|
1296
|
+
*/
|
|
1297
|
+
current_version: string | null;
|
|
982
1298
|
proposed_version: string | null;
|
|
1299
|
+
proposed_version_source: ("console" | "api" | "github" | null) | (string & {}) | null;
|
|
1300
|
+
checks: TargetChecksResponseRead;
|
|
983
1301
|
/**
|
|
984
1302
|
* Target-specific overrides merged over Project.config. GraphQL settings are Definition-owned and
|
|
985
1303
|
* never appear here.
|
|
986
1304
|
*/
|
|
987
|
-
config:
|
|
1305
|
+
config: TargetConfigResponseRead | null;
|
|
988
1306
|
/** At most one repository and one hosted MCP Delivery. */
|
|
989
1307
|
deliveries: DeliveryRead[];
|
|
990
1308
|
/** Format: date-time */
|
|
@@ -994,6 +1312,8 @@ export interface TargetRead {
|
|
|
994
1312
|
request_id?: RequestId;
|
|
995
1313
|
}
|
|
996
1314
|
export type TargetResponse = Target & ResponseMetadata;
|
|
1315
|
+
/** Request shape for TargetResponse. */
|
|
1316
|
+
export type TargetResponseWrite = TargetWrite & ResponseMetadata;
|
|
997
1317
|
/** Response shape for TargetResponse. */
|
|
998
1318
|
export type TargetResponseRead = TargetRead & ResponseMetadata;
|
|
999
1319
|
export interface TargetList {
|
|
@@ -1003,6 +1323,14 @@ export interface TargetList {
|
|
|
1003
1323
|
next_cursor: string | null;
|
|
1004
1324
|
request_id: RequestId;
|
|
1005
1325
|
}
|
|
1326
|
+
/** Request shape for TargetList. */
|
|
1327
|
+
export interface TargetListWrite {
|
|
1328
|
+
object: ListObject;
|
|
1329
|
+
data: TargetWrite[];
|
|
1330
|
+
has_more: boolean;
|
|
1331
|
+
next_cursor: string | null;
|
|
1332
|
+
request_id: RequestId;
|
|
1333
|
+
}
|
|
1006
1334
|
/** Response shape for TargetList. */
|
|
1007
1335
|
export interface TargetListRead {
|
|
1008
1336
|
object: ListObject;
|
|
@@ -1015,16 +1343,31 @@ export interface TargetRelease {
|
|
|
1015
1343
|
id: TargetReleaseId;
|
|
1016
1344
|
object: "target_release";
|
|
1017
1345
|
target_id: TargetId;
|
|
1018
|
-
|
|
1346
|
+
/** Null only for a verified release imported during package adoption. */
|
|
1347
|
+
generation_id: GenerationId | null;
|
|
1348
|
+
origin: "typeship" | "imported";
|
|
1019
1349
|
/** Immutable package version released from this Target. */
|
|
1020
1350
|
version: string;
|
|
1021
1351
|
channel: "stable" | "prerelease";
|
|
1022
1352
|
/** Delivery provider that accepted the release. */
|
|
1023
1353
|
provider: string;
|
|
1024
|
-
repository:
|
|
1354
|
+
repository: RepositoryReferenceResponse | null;
|
|
1025
1355
|
definition_revision_id: DefinitionRevisionId | null;
|
|
1026
1356
|
/** Immutable provider-native revision that was merged or published. */
|
|
1027
1357
|
delivery_revision: string;
|
|
1358
|
+
/** Digest of the exact accepted source tree used for publication. */
|
|
1359
|
+
source_digest: string | null;
|
|
1360
|
+
checks: PackageCheck[];
|
|
1361
|
+
accepted_risks: AcceptedCompatibilityRisk[];
|
|
1362
|
+
import_provenance: {
|
|
1363
|
+
tag: string | null;
|
|
1364
|
+
/** Format: uri */
|
|
1365
|
+
registry_url: string | null;
|
|
1366
|
+
artifact_digest: string | null;
|
|
1367
|
+
/** Format: date-time */
|
|
1368
|
+
imported_at: string | null;
|
|
1369
|
+
} | null;
|
|
1370
|
+
publications: Publication[];
|
|
1028
1371
|
/** Format: date-time */
|
|
1029
1372
|
created_at: string;
|
|
1030
1373
|
request_id?: RequestId;
|
|
@@ -1034,16 +1377,31 @@ export interface TargetReleaseRead {
|
|
|
1034
1377
|
id: TargetReleaseId;
|
|
1035
1378
|
object: "target_release" | (string & {});
|
|
1036
1379
|
target_id: TargetId;
|
|
1037
|
-
|
|
1380
|
+
/** Null only for a verified release imported during package adoption. */
|
|
1381
|
+
generation_id: GenerationId | null;
|
|
1382
|
+
origin: ("typeship" | "imported") | (string & {});
|
|
1038
1383
|
/** Immutable package version released from this Target. */
|
|
1039
1384
|
version: string;
|
|
1040
1385
|
channel: ("stable" | "prerelease") | (string & {});
|
|
1041
1386
|
/** Delivery provider that accepted the release. */
|
|
1042
1387
|
provider: string;
|
|
1043
|
-
repository:
|
|
1388
|
+
repository: RepositoryReferenceResponseRead | null;
|
|
1044
1389
|
definition_revision_id: DefinitionRevisionId | null;
|
|
1045
1390
|
/** Immutable provider-native revision that was merged or published. */
|
|
1046
1391
|
delivery_revision: string;
|
|
1392
|
+
/** Digest of the exact accepted source tree used for publication. */
|
|
1393
|
+
source_digest: string | null;
|
|
1394
|
+
checks: PackageCheckRead[];
|
|
1395
|
+
accepted_risks: AcceptedCompatibilityRiskRead[];
|
|
1396
|
+
import_provenance: {
|
|
1397
|
+
tag: string | null;
|
|
1398
|
+
/** Format: uri */
|
|
1399
|
+
registry_url: string | null;
|
|
1400
|
+
artifact_digest: string | null;
|
|
1401
|
+
/** Format: date-time */
|
|
1402
|
+
imported_at: string | null;
|
|
1403
|
+
} | null;
|
|
1404
|
+
publications: PublicationRead[];
|
|
1047
1405
|
/** Format: date-time */
|
|
1048
1406
|
created_at: string;
|
|
1049
1407
|
request_id?: RequestId;
|
|
@@ -1066,6 +1424,297 @@ export interface TargetReleaseListRead {
|
|
|
1066
1424
|
next_cursor: string | null;
|
|
1067
1425
|
request_id: RequestId;
|
|
1068
1426
|
}
|
|
1427
|
+
export interface Publication {
|
|
1428
|
+
id: PublicationId;
|
|
1429
|
+
object: "publication";
|
|
1430
|
+
target_release_id: TargetReleaseId;
|
|
1431
|
+
destination: "github" | "npm" | "pypi" | "go" | "mcp";
|
|
1432
|
+
state: "pending" | "publishing" | "published" | "failed" | "disabled";
|
|
1433
|
+
attempt: number;
|
|
1434
|
+
/** Format: uri */
|
|
1435
|
+
run_url: string | null;
|
|
1436
|
+
/** Format: uri */
|
|
1437
|
+
registry_url: string | null;
|
|
1438
|
+
artifact_digest: string | null;
|
|
1439
|
+
/** Recorded failures. Empty when this resource has no recorded failure. */
|
|
1440
|
+
errors: DomainError[];
|
|
1441
|
+
/** Format: date-time */
|
|
1442
|
+
started_at: string | null;
|
|
1443
|
+
/** Format: date-time */
|
|
1444
|
+
finished_at: string | null;
|
|
1445
|
+
/** Format: date-time */
|
|
1446
|
+
updated_at: string;
|
|
1447
|
+
}
|
|
1448
|
+
/** Response shape for Publication. */
|
|
1449
|
+
export interface PublicationRead {
|
|
1450
|
+
id: PublicationId;
|
|
1451
|
+
object: "publication" | (string & {});
|
|
1452
|
+
target_release_id: TargetReleaseId;
|
|
1453
|
+
destination: ("github" | "npm" | "pypi" | "go" | "mcp") | (string & {});
|
|
1454
|
+
state: ("pending" | "publishing" | "published" | "failed" | "disabled") | (string & {});
|
|
1455
|
+
attempt: number;
|
|
1456
|
+
/** Format: uri */
|
|
1457
|
+
run_url: string | null;
|
|
1458
|
+
/** Format: uri */
|
|
1459
|
+
registry_url: string | null;
|
|
1460
|
+
artifact_digest: string | null;
|
|
1461
|
+
/** Recorded failures. Empty when this resource has no recorded failure. */
|
|
1462
|
+
errors: DomainErrorRead[];
|
|
1463
|
+
/** Format: date-time */
|
|
1464
|
+
started_at: string | null;
|
|
1465
|
+
/** Format: date-time */
|
|
1466
|
+
finished_at: string | null;
|
|
1467
|
+
/** Format: date-time */
|
|
1468
|
+
updated_at: string;
|
|
1469
|
+
}
|
|
1470
|
+
export type PublicationResponse = Publication & {
|
|
1471
|
+
/** Format: date-time */
|
|
1472
|
+
created_at: string;
|
|
1473
|
+
} & ResponseMetadata;
|
|
1474
|
+
/** 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
|
+
};
|
|
1496
|
+
/**
|
|
1497
|
+
* The Draft's state and its one next step. no_draft: no Draft is open; generate the Target.
|
|
1498
|
+
* generating: Typeship is updating the Draft branch; retrieve the Draft again. branch_changed: the
|
|
1499
|
+
* Draft branch has a commit Typeship has not integrated, such as your push or a discard; Typeship
|
|
1500
|
+
* starts that integration from the repository event, so retrieve the Draft again, and generate the
|
|
1501
|
+
* Target only if the status persists. conflicted: some conflicts have no decision; list files with
|
|
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.
|
|
1509
|
+
*/
|
|
1510
|
+
export declare const DraftStatus: {
|
|
1511
|
+
readonly NO_DRAFT: "no_draft";
|
|
1512
|
+
readonly GENERATING: "generating";
|
|
1513
|
+
readonly BRANCH_CHANGED: "branch_changed";
|
|
1514
|
+
readonly CONFLICTED: "conflicted";
|
|
1515
|
+
readonly NEEDS_GENERATION: "needs_generation";
|
|
1516
|
+
readonly HISTORY_REWRITTEN: "history_rewritten";
|
|
1517
|
+
readonly CHECKING: "checking";
|
|
1518
|
+
readonly FAILED: "failed";
|
|
1519
|
+
readonly READY: "ready";
|
|
1520
|
+
};
|
|
1521
|
+
export type DraftStatus = (typeof DraftStatus)[keyof typeof DraftStatus];
|
|
1522
|
+
export interface TargetDraftConflicts {
|
|
1523
|
+
/** Conflicts in the current merge stage. */
|
|
1524
|
+
total: number;
|
|
1525
|
+
/** Conflicts with a saved decision for head_revision. */
|
|
1526
|
+
decided: number;
|
|
1527
|
+
}
|
|
1528
|
+
/** The approval inputs for a default-branch history rewrite. */
|
|
1529
|
+
export interface TargetDraftHistoryRecovery {
|
|
1530
|
+
/** Rewritten default-branch commit. Send it as expected_default_revision. */
|
|
1531
|
+
default_revision: string;
|
|
1532
|
+
/** Draft commit Typeship last observed. Send it as expected_head_revision. */
|
|
1533
|
+
head_revision: string | null;
|
|
1534
|
+
/** Existing Draft branch that stays available after recovery opens a new Draft. */
|
|
1535
|
+
preserved_branch: string | null;
|
|
1536
|
+
}
|
|
1537
|
+
/**
|
|
1538
|
+
* Readiness decision for the Draft's head_revision. Null readiness on the Draft means no candidate
|
|
1539
|
+
* exists.
|
|
1540
|
+
*/
|
|
1541
|
+
export interface TargetDraftReadiness {
|
|
1542
|
+
/**
|
|
1543
|
+
* success means required checks passed; failure means the Draft needs correction or review; error
|
|
1544
|
+
* means assessment could not finish; pending means checks have not finished.
|
|
1545
|
+
*/
|
|
1546
|
+
state: "success" | "failure" | "error" | "pending";
|
|
1547
|
+
/** Human-readable explanation of the current decision. Do not parse it for control flow. */
|
|
1548
|
+
description: string;
|
|
1549
|
+
/** API surface comparison against Current. unknown means analysis is unavailable. */
|
|
1550
|
+
api_compatibility: "compatible" | "breaking" | "unknown";
|
|
1551
|
+
/**
|
|
1552
|
+
* Package and supported SDK source comparison against Current. unknown means analysis is
|
|
1553
|
+
* incomplete or unavailable.
|
|
1554
|
+
*/
|
|
1555
|
+
package_compatibility: "compatible" | "breaking" | "unknown";
|
|
1556
|
+
/** Whether the version satisfies the assessed change. Null when no verdict is available. */
|
|
1557
|
+
version_correct: boolean | null;
|
|
1558
|
+
/** Minimum assessed version bump. Null when no bump has been determined. */
|
|
1559
|
+
required_bump: "major" | "minor" | "patch" | null;
|
|
1560
|
+
/** Version used for the comparison. Null when no comparison version is available. */
|
|
1561
|
+
previous_version: string | null;
|
|
1562
|
+
/** Draft title error that must be corrected before release. Null when none is recorded. */
|
|
1563
|
+
title_error: string | null;
|
|
1564
|
+
}
|
|
1565
|
+
/** Response shape for TargetDraftReadiness. */
|
|
1566
|
+
export interface TargetDraftReadinessRead {
|
|
1567
|
+
/**
|
|
1568
|
+
* success means required checks passed; failure means the Draft needs correction or review; error
|
|
1569
|
+
* means assessment could not finish; pending means checks have not finished.
|
|
1570
|
+
*/
|
|
1571
|
+
state: ("success" | "failure" | "error" | "pending") | (string & {});
|
|
1572
|
+
/** Human-readable explanation of the current decision. Do not parse it for control flow. */
|
|
1573
|
+
description: string;
|
|
1574
|
+
/** API surface comparison against Current. unknown means analysis is unavailable. */
|
|
1575
|
+
api_compatibility: ("compatible" | "breaking" | "unknown") | (string & {});
|
|
1576
|
+
/**
|
|
1577
|
+
* Package and supported SDK source comparison against Current. unknown means analysis is
|
|
1578
|
+
* incomplete or unavailable.
|
|
1579
|
+
*/
|
|
1580
|
+
package_compatibility: ("compatible" | "breaking" | "unknown") | (string & {});
|
|
1581
|
+
/** Whether the version satisfies the assessed change. Null when no verdict is available. */
|
|
1582
|
+
version_correct: boolean | null;
|
|
1583
|
+
/** Minimum assessed version bump. Null when no bump has been determined. */
|
|
1584
|
+
required_bump: ("major" | "minor" | "patch" | null) | (string & {}) | null;
|
|
1585
|
+
/** Version used for the comparison. Null when no comparison version is available. */
|
|
1586
|
+
previous_version: string | null;
|
|
1587
|
+
/** Draft title error that must be corrected before release. Null when none is recorded. */
|
|
1588
|
+
title_error: string | null;
|
|
1589
|
+
}
|
|
1590
|
+
export interface TargetDraft {
|
|
1591
|
+
object: "target_draft";
|
|
1592
|
+
target_id: TargetId;
|
|
1593
|
+
project_id: ProjectId;
|
|
1594
|
+
status: DraftStatus;
|
|
1595
|
+
current_version: string | null;
|
|
1596
|
+
version: string | null;
|
|
1597
|
+
selection: TargetDraftSelection;
|
|
1598
|
+
readiness: TargetDraftReadiness | null;
|
|
1599
|
+
changes: {
|
|
1600
|
+
/** Cumulative changelog against Current. */
|
|
1601
|
+
changelog?: string | null;
|
|
1602
|
+
breaking_count?: number | null;
|
|
1603
|
+
previous_version?: string | null;
|
|
1604
|
+
} | null;
|
|
1605
|
+
/**
|
|
1606
|
+
* Draft commit that readiness, checks, and conflicts describe. Send it as expected_head_revision
|
|
1607
|
+
* when resolving or discarding.
|
|
1608
|
+
*/
|
|
1609
|
+
head_revision: string | null;
|
|
1610
|
+
/** Format: uri */
|
|
1611
|
+
pull_request_url: string | null;
|
|
1612
|
+
/** Generation whose package this Draft contains. */
|
|
1613
|
+
generation_id: GenerationId | null;
|
|
1614
|
+
/** Conflict counts for the current merge stage; null when the Draft has no conflicts. */
|
|
1615
|
+
conflicts: TargetDraftConflicts | null;
|
|
1616
|
+
/**
|
|
1617
|
+
* Files where the Draft differs from the last accepted package; null until the Draft is
|
|
1618
|
+
* integrated.
|
|
1619
|
+
*/
|
|
1620
|
+
customized_files: number | null;
|
|
1621
|
+
/** Present only while status is history_rewritten. */
|
|
1622
|
+
history_recovery: TargetDraftHistoryRecovery | null;
|
|
1623
|
+
request_id?: RequestId;
|
|
1624
|
+
checks: PackageCheck[];
|
|
1625
|
+
}
|
|
1626
|
+
/** Response shape for TargetDraft. */
|
|
1627
|
+
export interface TargetDraftRead {
|
|
1628
|
+
object: "target_draft" | (string & {});
|
|
1629
|
+
target_id: TargetId;
|
|
1630
|
+
project_id: ProjectId;
|
|
1631
|
+
status: DraftStatus | (string & {});
|
|
1632
|
+
current_version: string | null;
|
|
1633
|
+
version: string | null;
|
|
1634
|
+
selection: TargetDraftSelectionRead;
|
|
1635
|
+
readiness: TargetDraftReadinessRead | null;
|
|
1636
|
+
changes: {
|
|
1637
|
+
/** Cumulative changelog against Current. */
|
|
1638
|
+
changelog?: string | null;
|
|
1639
|
+
breaking_count?: number | null;
|
|
1640
|
+
previous_version?: string | null;
|
|
1641
|
+
} | null;
|
|
1642
|
+
/**
|
|
1643
|
+
* Draft commit that readiness, checks, and conflicts describe. Send it as expected_head_revision
|
|
1644
|
+
* when resolving or discarding.
|
|
1645
|
+
*/
|
|
1646
|
+
head_revision: string | null;
|
|
1647
|
+
/** Format: uri */
|
|
1648
|
+
pull_request_url: string | null;
|
|
1649
|
+
/** Generation whose package this Draft contains. */
|
|
1650
|
+
generation_id: GenerationId | null;
|
|
1651
|
+
/** Conflict counts for the current merge stage; null when the Draft has no conflicts. */
|
|
1652
|
+
conflicts: TargetDraftConflicts | null;
|
|
1653
|
+
/**
|
|
1654
|
+
* Files where the Draft differs from the last accepted package; null until the Draft is
|
|
1655
|
+
* integrated.
|
|
1656
|
+
*/
|
|
1657
|
+
customized_files: number | null;
|
|
1658
|
+
/** Present only while status is history_rewritten. */
|
|
1659
|
+
history_recovery: TargetDraftHistoryRecovery | null;
|
|
1660
|
+
request_id?: RequestId;
|
|
1661
|
+
checks: PackageCheckRead[];
|
|
1662
|
+
}
|
|
1663
|
+
export type TargetDraftResponse = TargetDraft & ResponseMetadata;
|
|
1664
|
+
/** Response shape for TargetDraftResponse. */
|
|
1665
|
+
export type TargetDraftResponseRead = TargetDraftRead & ResponseMetadata;
|
|
1666
|
+
export interface TargetDraftUpdate {
|
|
1667
|
+
/** Exact SemVer, or null to return to automatic selection. */
|
|
1668
|
+
version: string | null;
|
|
1669
|
+
}
|
|
1670
|
+
export interface PackageCheck {
|
|
1671
|
+
name: string;
|
|
1672
|
+
source: "typeship" | "customer" | "repository" | "compatibility";
|
|
1673
|
+
required: boolean;
|
|
1674
|
+
state: "pending" | "passed" | "failed" | "not_assessed";
|
|
1675
|
+
reason: string;
|
|
1676
|
+
revision: string;
|
|
1677
|
+
/** Format: uri */
|
|
1678
|
+
url: string | null;
|
|
1679
|
+
/** Format: date-time */
|
|
1680
|
+
observed_at: string | null;
|
|
1681
|
+
}
|
|
1682
|
+
/** Response shape for PackageCheck. */
|
|
1683
|
+
export interface PackageCheckRead {
|
|
1684
|
+
name: string;
|
|
1685
|
+
source: ("typeship" | "customer" | "repository" | "compatibility") | (string & {});
|
|
1686
|
+
required: boolean;
|
|
1687
|
+
state: ("pending" | "passed" | "failed" | "not_assessed") | (string & {});
|
|
1688
|
+
reason: string;
|
|
1689
|
+
revision: string;
|
|
1690
|
+
/** Format: uri */
|
|
1691
|
+
url: string | null;
|
|
1692
|
+
/** Format: date-time */
|
|
1693
|
+
observed_at: string | null;
|
|
1694
|
+
}
|
|
1695
|
+
export interface AcceptedCompatibilityRisk {
|
|
1696
|
+
comparison: "current" | "published";
|
|
1697
|
+
reason: string;
|
|
1698
|
+
approved_by: string;
|
|
1699
|
+
approved_revision: string;
|
|
1700
|
+
/** Format: date-time */
|
|
1701
|
+
approved_at: string;
|
|
1702
|
+
}
|
|
1703
|
+
/** Response shape for AcceptedCompatibilityRisk. */
|
|
1704
|
+
export interface AcceptedCompatibilityRiskRead {
|
|
1705
|
+
comparison: ("current" | "published") | (string & {});
|
|
1706
|
+
reason: string;
|
|
1707
|
+
approved_by: string;
|
|
1708
|
+
approved_revision: string;
|
|
1709
|
+
/** Format: date-time */
|
|
1710
|
+
approved_at: string;
|
|
1711
|
+
}
|
|
1712
|
+
export interface TargetAdoption {
|
|
1713
|
+
/** Exact already-published package version to make Current. */
|
|
1714
|
+
version: string;
|
|
1715
|
+
/** Immutable repository tag containing the matching package source. */
|
|
1716
|
+
tag: string;
|
|
1717
|
+
}
|
|
1069
1718
|
export interface RepositoryHealthIssue {
|
|
1070
1719
|
code: "connection_missing" | "definition_unreadable" | "contents_write_missing" | "review_write_missing" | "breaking_acknowledgement_missing" | "provider_unavailable";
|
|
1071
1720
|
message: string;
|
|
@@ -1076,7 +1725,7 @@ export interface RepositoryHealthIssueRead {
|
|
|
1076
1725
|
message: string;
|
|
1077
1726
|
}
|
|
1078
1727
|
export interface RepositoryHealth {
|
|
1079
|
-
repository:
|
|
1728
|
+
repository: RepositoryReferenceResponse;
|
|
1080
1729
|
roles: Array<"source" | "destination">;
|
|
1081
1730
|
status: "ready" | "action_required";
|
|
1082
1731
|
default_branch?: string;
|
|
@@ -1091,7 +1740,7 @@ export interface RepositoryHealth {
|
|
|
1091
1740
|
}
|
|
1092
1741
|
/** Response shape for RepositoryHealth. */
|
|
1093
1742
|
export interface RepositoryHealthRead {
|
|
1094
|
-
repository:
|
|
1743
|
+
repository: RepositoryReferenceResponseRead;
|
|
1095
1744
|
roles: Array<("source" | "destination") | (string & {})>;
|
|
1096
1745
|
status: ("ready" | "action_required") | (string & {});
|
|
1097
1746
|
default_branch?: string;
|
|
@@ -1171,9 +1820,9 @@ export interface Definition {
|
|
|
1171
1820
|
project_id: ProjectId;
|
|
1172
1821
|
source: DefinitionSource;
|
|
1173
1822
|
format: "openapi" | "graphql" | null;
|
|
1174
|
-
patches:
|
|
1175
|
-
graphql:
|
|
1176
|
-
diagnostic_policy:
|
|
1823
|
+
patches: DefinitionPatchResponse[];
|
|
1824
|
+
graphql: GraphqlSettingsResponse | null;
|
|
1825
|
+
diagnostic_policy: DiagnosticPolicyResponse;
|
|
1177
1826
|
latest_revision_id: DefinitionRevisionId | null;
|
|
1178
1827
|
/** Format: date-time */
|
|
1179
1828
|
created_at: string;
|
|
@@ -1188,9 +1837,9 @@ export interface DefinitionWrite {
|
|
|
1188
1837
|
project_id: ProjectId;
|
|
1189
1838
|
source: DefinitionSourceWrite;
|
|
1190
1839
|
format: "openapi" | "graphql" | null;
|
|
1191
|
-
patches:
|
|
1192
|
-
graphql:
|
|
1193
|
-
diagnostic_policy:
|
|
1840
|
+
patches: DefinitionPatchResponse[];
|
|
1841
|
+
graphql: GraphqlSettingsResponse | null;
|
|
1842
|
+
diagnostic_policy: DiagnosticPolicyResponse;
|
|
1194
1843
|
latest_revision_id: DefinitionRevisionId | null;
|
|
1195
1844
|
/** Format: date-time */
|
|
1196
1845
|
created_at: string;
|
|
@@ -1205,9 +1854,9 @@ export interface DefinitionRead {
|
|
|
1205
1854
|
project_id: ProjectId;
|
|
1206
1855
|
source: DefinitionSourceRead;
|
|
1207
1856
|
format: ("openapi" | "graphql" | null) | (string & {}) | null;
|
|
1208
|
-
patches:
|
|
1209
|
-
graphql:
|
|
1210
|
-
diagnostic_policy:
|
|
1857
|
+
patches: DefinitionPatchResponseRead[];
|
|
1858
|
+
graphql: GraphqlSettingsResponseRead | null;
|
|
1859
|
+
diagnostic_policy: DiagnosticPolicyResponseRead;
|
|
1211
1860
|
latest_revision_id: DefinitionRevisionId | null;
|
|
1212
1861
|
/** Format: date-time */
|
|
1213
1862
|
created_at: string;
|
|
@@ -1215,17 +1864,28 @@ export interface DefinitionRead {
|
|
|
1215
1864
|
updated_at: string;
|
|
1216
1865
|
request_id: RequestId;
|
|
1217
1866
|
}
|
|
1867
|
+
/**
|
|
1868
|
+
* Omitted fields remain unchanged. Supplied objects and arrays replace the whole field. URL source
|
|
1869
|
+
* headers are preserved when the URL is unchanged and headers are omitted; null or empty headers
|
|
1870
|
+
* clear them.
|
|
1871
|
+
*/
|
|
1218
1872
|
export interface DefinitionUpdateRequest {
|
|
1219
1873
|
source?: DefinitionSourceInput;
|
|
1874
|
+
/** Replace all patches in order. An empty array removes every patch; null is invalid. */
|
|
1220
1875
|
patches?: DefinitionPatch[];
|
|
1876
|
+
/** Replace all GraphQL settings. Null or an empty object clears them. */
|
|
1221
1877
|
graphql?: GraphqlSettings | null;
|
|
1878
|
+
/** Replace the complete policy and suppression list. Null and an empty object are invalid. */
|
|
1222
1879
|
diagnostic_policy?: DiagnosticPolicy;
|
|
1223
1880
|
}
|
|
1224
1881
|
/** Response shape for DefinitionUpdateRequest. */
|
|
1225
1882
|
export interface DefinitionUpdateRequestRead {
|
|
1226
1883
|
source?: DefinitionSourceInputRead;
|
|
1884
|
+
/** Replace all patches in order. An empty array removes every patch; null is invalid. */
|
|
1227
1885
|
patches?: DefinitionPatchRead[];
|
|
1886
|
+
/** Replace all GraphQL settings. Null or an empty object clears them. */
|
|
1228
1887
|
graphql?: GraphqlSettingsRead | null;
|
|
1888
|
+
/** Replace the complete policy and suppression list. Null and an empty object are invalid. */
|
|
1229
1889
|
diagnostic_policy?: DiagnosticPolicyRead;
|
|
1230
1890
|
}
|
|
1231
1891
|
/**
|
|
@@ -1253,7 +1913,7 @@ export interface Project {
|
|
|
1253
1913
|
* Shared defaults inherited by every Target. A Target's config overrides these defaults; GraphQL
|
|
1254
1914
|
* settings remain Definition-owned.
|
|
1255
1915
|
*/
|
|
1256
|
-
config:
|
|
1916
|
+
config: ProjectConfigResponse | null;
|
|
1257
1917
|
/** Format: date-time */
|
|
1258
1918
|
created_at: string;
|
|
1259
1919
|
/**
|
|
@@ -1283,7 +1943,7 @@ export interface ProjectWrite {
|
|
|
1283
1943
|
* Shared defaults inherited by every Target. A Target's config overrides these defaults; GraphQL
|
|
1284
1944
|
* settings remain Definition-owned.
|
|
1285
1945
|
*/
|
|
1286
|
-
config:
|
|
1946
|
+
config: ProjectConfigResponse | null;
|
|
1287
1947
|
request_id: RequestId;
|
|
1288
1948
|
}
|
|
1289
1949
|
/** Response shape for Project. */
|
|
@@ -1308,7 +1968,7 @@ export interface ProjectRead {
|
|
|
1308
1968
|
* Shared defaults inherited by every Target. A Target's config overrides these defaults; GraphQL
|
|
1309
1969
|
* settings remain Definition-owned.
|
|
1310
1970
|
*/
|
|
1311
|
-
config:
|
|
1971
|
+
config: ProjectConfigResponseRead | null;
|
|
1312
1972
|
/** Format: date-time */
|
|
1313
1973
|
created_at: string;
|
|
1314
1974
|
/**
|
|
@@ -1508,19 +2168,26 @@ export interface OAuthApplicationRead {
|
|
|
1508
2168
|
}
|
|
1509
2169
|
/**
|
|
1510
2170
|
* Authenticated identity read used to verify a login before it is saved. Operation is auto-detected
|
|
1511
|
-
* when omitted
|
|
1512
|
-
*
|
|
2171
|
+
* when omitted or null. At least one of subject_field, account_field, or organization_field must be
|
|
2172
|
+
* a non-null JSON Pointer. Null clears an individual mapping while another remains. Set
|
|
2173
|
+
* identity_verification itself to null to remove the whole policy.
|
|
1513
2174
|
*/
|
|
1514
|
-
export
|
|
2175
|
+
export type IdentityVerification = {
|
|
1515
2176
|
/** resource.method of a safe identity read with no required arguments. */
|
|
1516
|
-
operation?: string;
|
|
2177
|
+
operation?: string | null;
|
|
1517
2178
|
/** JSON Pointer to the stable caller ID in the identity response. */
|
|
1518
|
-
subject_field?: string;
|
|
2179
|
+
subject_field?: string | null;
|
|
1519
2180
|
/** JSON Pointer to the customer account ID. */
|
|
1520
|
-
account_field?: string;
|
|
2181
|
+
account_field?: string | null;
|
|
1521
2182
|
/** JSON Pointer to the customer organization ID. */
|
|
1522
|
-
organization_field?: string;
|
|
1523
|
-
}
|
|
2183
|
+
organization_field?: string | null;
|
|
2184
|
+
} & ({
|
|
2185
|
+
subject_field: string;
|
|
2186
|
+
} | {
|
|
2187
|
+
account_field: string;
|
|
2188
|
+
} | {
|
|
2189
|
+
organization_field: string;
|
|
2190
|
+
});
|
|
1524
2191
|
/** OAuth application and request-value overrides for one named API environment. */
|
|
1525
2192
|
export interface AuthenticationEnvironment {
|
|
1526
2193
|
oauth_application?: string | null;
|
|
@@ -1531,7 +2198,7 @@ export interface AuthenticationEnvironment {
|
|
|
1531
2198
|
}
|
|
1532
2199
|
/**
|
|
1533
2200
|
* Public authentication defaults for generated clients and tools. Stored Projects own the OAuth
|
|
1534
|
-
* server, application catalog, and identity policy;
|
|
2201
|
+
* server, application catalog, and identity policy; one-shot generation accepts the same shape for
|
|
1535
2202
|
* one run. Runtime credentials and client secrets are never accepted.
|
|
1536
2203
|
*/
|
|
1537
2204
|
export interface AuthenticationConfig {
|
|
@@ -1572,6 +2239,12 @@ export interface CliBehavior {
|
|
|
1572
2239
|
* code phones nobody unless this is enabled.
|
|
1573
2240
|
*/
|
|
1574
2241
|
update_notice?: boolean;
|
|
2242
|
+
/**
|
|
2243
|
+
* Public HTTP(S) URL read by the optional changelog command in generated CLIs. Supports UTF-8
|
|
2244
|
+
* Markdown, plain text, and static HTML; embedded credentials are not allowed. Omit or clear to
|
|
2245
|
+
* disable, then regenerate.
|
|
2246
|
+
*/
|
|
2247
|
+
changelog_url?: string | null;
|
|
1575
2248
|
/**
|
|
1576
2249
|
* Where the generated CLI's feedback command sends users. GitHub issues/new URLs get a prefilled
|
|
1577
2250
|
* title and environment details.
|
|
@@ -1739,7 +2412,7 @@ export interface PackageBehavior {
|
|
|
1739
2412
|
* Everything Typeship needs beyond the Definition, in one object: generation customization
|
|
1740
2413
|
* (globals, retries, pagination, readme) and how the generated tooling behaves (cli, mcp, package,
|
|
1741
2414
|
* docs_url). Plain configuration. Typeship never requires vendor extensions inside the Definition
|
|
1742
|
-
* itself.
|
|
2415
|
+
* itself. One-shot generation also accepts GraphQL settings here; stored projects keep those
|
|
1743
2416
|
* settings on their Definition.
|
|
1744
2417
|
*/
|
|
1745
2418
|
export interface Config {
|
|
@@ -1765,6 +2438,7 @@ export interface Config {
|
|
|
1765
2438
|
* The API's documentation site. Read through its llms.txt by the generated CLI's docs command,
|
|
1766
2439
|
* the MCP server's docs tools, and the package's AGENTS.md. Defaults to the Definition's
|
|
1767
2440
|
* externalDocs URL.
|
|
2441
|
+
* Format: uri
|
|
1768
2442
|
*/
|
|
1769
2443
|
docs_url?: string | null;
|
|
1770
2444
|
/**
|
|
@@ -1797,6 +2471,7 @@ export interface ConfigRead {
|
|
|
1797
2471
|
* The API's documentation site. Read through its llms.txt by the generated CLI's docs command,
|
|
1798
2472
|
* the MCP server's docs tools, and the package's AGENTS.md. Defaults to the Definition's
|
|
1799
2473
|
* externalDocs URL.
|
|
2474
|
+
* Format: uri
|
|
1800
2475
|
*/
|
|
1801
2476
|
docs_url?: string | null;
|
|
1802
2477
|
/**
|
|
@@ -1833,6 +2508,7 @@ export interface ProjectConfig {
|
|
|
1833
2508
|
* The API's documentation site. Read through its llms.txt by the generated CLI's docs command,
|
|
1834
2509
|
* the MCP server's docs tools, and the package's AGENTS.md. Defaults to the Definition's
|
|
1835
2510
|
* externalDocs URL.
|
|
2511
|
+
* Format: uri
|
|
1836
2512
|
*/
|
|
1837
2513
|
docs_url?: string | null;
|
|
1838
2514
|
/**
|
|
@@ -1864,6 +2540,7 @@ export interface ProjectConfigRead {
|
|
|
1864
2540
|
* The API's documentation site. Read through its llms.txt by the generated CLI's docs command,
|
|
1865
2541
|
* the MCP server's docs tools, and the package's AGENTS.md. Defaults to the Definition's
|
|
1866
2542
|
* externalDocs URL.
|
|
2543
|
+
* Format: uri
|
|
1867
2544
|
*/
|
|
1868
2545
|
docs_url?: string | null;
|
|
1869
2546
|
/**
|
|
@@ -1878,32 +2555,66 @@ export interface ProjectConfigRead {
|
|
|
1878
2555
|
* Self-hosted MCP access may be overridden for a Target-specific deployment.
|
|
1879
2556
|
*/
|
|
1880
2557
|
export interface TargetConfig {
|
|
2558
|
+
/**
|
|
2559
|
+
* Wire names of query/header parameters that become settable once on the generated client and
|
|
2560
|
+
* auto-apply to every operation that accepts them; per-call values win. Names that match nothing
|
|
2561
|
+
* are reported as generation warnings.
|
|
2562
|
+
*/
|
|
1881
2563
|
globals?: string[];
|
|
1882
2564
|
retries?: RetryTuning;
|
|
2565
|
+
/**
|
|
2566
|
+
* Per-operation pagination control, keyed by operationId or "METHOD /path". Unmatched keys are
|
|
2567
|
+
* reported as generation warnings.
|
|
2568
|
+
*/
|
|
1883
2569
|
pagination?: Record<string, PaginationRule | boolean>;
|
|
1884
2570
|
auth?: TargetAuthenticationConfig;
|
|
1885
2571
|
cli?: CliBehavior;
|
|
1886
2572
|
mcp?: McpBehavior;
|
|
1887
2573
|
readme?: ReadmeBehavior;
|
|
1888
2574
|
package?: PackageBehavior;
|
|
1889
|
-
/**
|
|
1890
|
-
|
|
1891
|
-
|
|
1892
|
-
|
|
1893
|
-
|
|
2575
|
+
/**
|
|
2576
|
+
* 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 Definition's
|
|
2578
|
+
* externalDocs URL.
|
|
2579
|
+
* Format: uri
|
|
2580
|
+
*/
|
|
2581
|
+
docs_url?: string | null;
|
|
2582
|
+
/**
|
|
2583
|
+
* Exact llms.txt URL when the documentation site does not publish it at docs_url + /llms.txt.
|
|
2584
|
+
* Format: uri
|
|
2585
|
+
*/
|
|
2586
|
+
docs_index_url?: string | null;
|
|
2587
|
+
}
|
|
1894
2588
|
/** Response shape for TargetConfig. */
|
|
1895
2589
|
export interface TargetConfigRead {
|
|
2590
|
+
/**
|
|
2591
|
+
* Wire names of query/header parameters that become settable once on the generated client and
|
|
2592
|
+
* auto-apply to every operation that accepts them; per-call values win. Names that match nothing
|
|
2593
|
+
* are reported as generation warnings.
|
|
2594
|
+
*/
|
|
1896
2595
|
globals?: string[];
|
|
1897
2596
|
retries?: RetryTuning;
|
|
2597
|
+
/**
|
|
2598
|
+
* Per-operation pagination control, keyed by operationId or "METHOD /path". Unmatched keys are
|
|
2599
|
+
* reported as generation warnings.
|
|
2600
|
+
*/
|
|
1898
2601
|
pagination?: Record<string, PaginationRuleRead | boolean>;
|
|
1899
2602
|
auth?: TargetAuthenticationConfig;
|
|
1900
2603
|
cli?: CliBehavior;
|
|
1901
2604
|
mcp?: McpBehaviorRead;
|
|
1902
2605
|
readme?: ReadmeBehavior;
|
|
1903
2606
|
package?: PackageBehavior;
|
|
1904
|
-
/**
|
|
2607
|
+
/**
|
|
2608
|
+
* 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 Definition's
|
|
2610
|
+
* externalDocs URL.
|
|
2611
|
+
* Format: uri
|
|
2612
|
+
*/
|
|
1905
2613
|
docs_url?: string | null;
|
|
1906
|
-
/**
|
|
2614
|
+
/**
|
|
2615
|
+
* Exact llms.txt URL when the documentation site does not publish it at docs_url + /llms.txt.
|
|
2616
|
+
* Format: uri
|
|
2617
|
+
*/
|
|
1907
2618
|
docs_index_url?: string | null;
|
|
1908
2619
|
}
|
|
1909
2620
|
/** What a GraphQL schema cannot say about itself. Ignored for OpenAPI specs. */
|
|
@@ -2032,8 +2743,21 @@ export interface PaginationRuleRead {
|
|
|
2032
2743
|
export interface FileStub {
|
|
2033
2744
|
path: string;
|
|
2034
2745
|
bytes: number;
|
|
2746
|
+
mode: "100644" | "100755";
|
|
2747
|
+
}
|
|
2748
|
+
/** Response shape for FileStub. */
|
|
2749
|
+
export interface FileStubRead {
|
|
2750
|
+
path: string;
|
|
2751
|
+
bytes: number;
|
|
2752
|
+
mode: ("100644" | "100755") | (string & {});
|
|
2035
2753
|
}
|
|
2754
|
+
/**
|
|
2755
|
+
* A Generation moves from queued to running, then succeeds when its files are saved or fails.
|
|
2756
|
+
* Delivery and Draft status are separate.
|
|
2757
|
+
*/
|
|
2036
2758
|
export declare const GenerationStatus: {
|
|
2759
|
+
readonly QUEUED: "queued";
|
|
2760
|
+
readonly RUNNING: "running";
|
|
2037
2761
|
readonly SUCCEEDED: "succeeded";
|
|
2038
2762
|
readonly FAILED: "failed";
|
|
2039
2763
|
};
|
|
@@ -2048,18 +2772,24 @@ export type GenerationTrigger = (typeof GenerationTrigger)[keyof typeof Generati
|
|
|
2048
2772
|
export interface GenerationProvenance {
|
|
2049
2773
|
/** Pinned generator contract edition. */
|
|
2050
2774
|
generator_edition: string;
|
|
2051
|
-
/**
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
*
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
|
|
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;
|
|
2063
2793
|
package_version: string | null;
|
|
2064
2794
|
}
|
|
2065
2795
|
export interface Generation {
|
|
@@ -2075,17 +2805,18 @@ export interface Generation {
|
|
|
2075
2805
|
definition_revision_id: DefinitionRevisionId | null;
|
|
2076
2806
|
status: GenerationStatus;
|
|
2077
2807
|
trigger: GenerationTrigger;
|
|
2078
|
-
/** Persisted Target identity. Null only for
|
|
2808
|
+
/** Persisted Target identity. Null only for one-shot generation. */
|
|
2079
2809
|
target_id: TargetId | null;
|
|
2080
2810
|
/** Resolved generator implementation; provenance rather than resource identity. */
|
|
2081
2811
|
generator: GeneratorKind;
|
|
2082
2812
|
provenance: GenerationProvenance;
|
|
2083
|
-
/** Null
|
|
2813
|
+
/** Null while queued or running, or when a failed or legacy generation produced no metadata. */
|
|
2084
2814
|
meta: GenerationMeta | null;
|
|
2085
2815
|
warnings: string[];
|
|
2086
2816
|
/** Present on retrieve and create; omitted in lists. */
|
|
2087
2817
|
files?: GeneratedFile[];
|
|
2088
|
-
|
|
2818
|
+
/** Recorded failures. Empty when this resource has no recorded failure. */
|
|
2819
|
+
errors: DomainError[];
|
|
2089
2820
|
/** Format: date-time */
|
|
2090
2821
|
created_at: string;
|
|
2091
2822
|
request_id?: RequestId;
|
|
@@ -2103,17 +2834,18 @@ export interface GenerationWrite {
|
|
|
2103
2834
|
definition_revision_id: DefinitionRevisionId | null;
|
|
2104
2835
|
status: GenerationStatus;
|
|
2105
2836
|
trigger: GenerationTrigger;
|
|
2106
|
-
/** Persisted Target identity. Null only for
|
|
2837
|
+
/** Persisted Target identity. Null only for one-shot generation. */
|
|
2107
2838
|
target_id: TargetId | null;
|
|
2108
2839
|
/** Resolved generator implementation; provenance rather than resource identity. */
|
|
2109
2840
|
generator: GeneratorKind;
|
|
2110
2841
|
provenance: GenerationProvenance;
|
|
2111
|
-
/** Null
|
|
2842
|
+
/** Null while queued or running, or when a failed or legacy generation produced no metadata. */
|
|
2112
2843
|
meta: GenerationMeta | null;
|
|
2113
2844
|
warnings: string[];
|
|
2114
2845
|
/** Present on retrieve and create; omitted in lists. */
|
|
2115
2846
|
files?: GeneratedFile[];
|
|
2116
|
-
|
|
2847
|
+
/** Recorded failures. Empty when this resource has no recorded failure. */
|
|
2848
|
+
errors: DomainError[];
|
|
2117
2849
|
/** Format: date-time */
|
|
2118
2850
|
created_at: string;
|
|
2119
2851
|
request_id?: RequestId;
|
|
@@ -2127,22 +2859,23 @@ export interface GenerationRead {
|
|
|
2127
2859
|
* fetched one at a time via GET /generations/{generation_id}/file.
|
|
2128
2860
|
*/
|
|
2129
2861
|
files_omitted?: boolean;
|
|
2130
|
-
files_index?:
|
|
2862
|
+
files_index?: FileStubRead[];
|
|
2131
2863
|
project_id: ProjectId;
|
|
2132
2864
|
definition_revision_id: DefinitionRevisionId | null;
|
|
2133
2865
|
status: GenerationStatus | (string & {});
|
|
2134
2866
|
trigger: GenerationTrigger | (string & {});
|
|
2135
|
-
/** Persisted Target identity. Null only for
|
|
2867
|
+
/** Persisted Target identity. Null only for one-shot generation. */
|
|
2136
2868
|
target_id: TargetId | null;
|
|
2137
2869
|
/** Resolved generator implementation; provenance rather than resource identity. */
|
|
2138
2870
|
generator: GeneratorKind | (string & {});
|
|
2139
|
-
provenance:
|
|
2140
|
-
/** Null
|
|
2871
|
+
provenance: GenerationProvenanceRead;
|
|
2872
|
+
/** Null while queued or running, or when a failed or legacy generation produced no metadata. */
|
|
2141
2873
|
meta: GenerationMetaRead | null;
|
|
2142
2874
|
warnings: string[];
|
|
2143
2875
|
/** Present on retrieve and create; omitted in lists. */
|
|
2144
|
-
files?:
|
|
2145
|
-
|
|
2876
|
+
files?: GeneratedFileRead[];
|
|
2877
|
+
/** Recorded failures. Empty when this resource has no recorded failure. */
|
|
2878
|
+
errors: DomainErrorRead[];
|
|
2146
2879
|
/** Format: date-time */
|
|
2147
2880
|
created_at: string;
|
|
2148
2881
|
request_id?: RequestId;
|
|
@@ -2158,7 +2891,7 @@ export interface GenerationSummary {
|
|
|
2158
2891
|
definition_revision_id: DefinitionRevisionId | null;
|
|
2159
2892
|
status: GenerationStatus;
|
|
2160
2893
|
trigger: GenerationTrigger;
|
|
2161
|
-
/** Persisted Target identity. Null only for
|
|
2894
|
+
/** Persisted Target identity. Null only for one-shot generation. */
|
|
2162
2895
|
target_id: TargetId | null;
|
|
2163
2896
|
/** Resolved generator implementation; provenance rather than resource identity. */
|
|
2164
2897
|
generator: GeneratorKind;
|
|
@@ -2166,7 +2899,8 @@ export interface GenerationSummary {
|
|
|
2166
2899
|
/** Null only for a failed or legacy generation that produced no metadata. */
|
|
2167
2900
|
meta: GenerationMeta | null;
|
|
2168
2901
|
warnings: string[];
|
|
2169
|
-
|
|
2902
|
+
/** Recorded failures. Empty when this resource has no recorded failure. */
|
|
2903
|
+
errors: DomainError[];
|
|
2170
2904
|
/** Format: date-time */
|
|
2171
2905
|
created_at: string;
|
|
2172
2906
|
}
|
|
@@ -2177,7 +2911,7 @@ export interface GenerationSummaryWrite {
|
|
|
2177
2911
|
definition_revision_id: DefinitionRevisionId | null;
|
|
2178
2912
|
status: GenerationStatus;
|
|
2179
2913
|
trigger: GenerationTrigger;
|
|
2180
|
-
/** Persisted Target identity. Null only for
|
|
2914
|
+
/** Persisted Target identity. Null only for one-shot generation. */
|
|
2181
2915
|
target_id: TargetId | null;
|
|
2182
2916
|
/** Resolved generator implementation; provenance rather than resource identity. */
|
|
2183
2917
|
generator: GeneratorKind;
|
|
@@ -2185,7 +2919,8 @@ export interface GenerationSummaryWrite {
|
|
|
2185
2919
|
/** Null only for a failed or legacy generation that produced no metadata. */
|
|
2186
2920
|
meta: GenerationMeta | null;
|
|
2187
2921
|
warnings: string[];
|
|
2188
|
-
|
|
2922
|
+
/** Recorded failures. Empty when this resource has no recorded failure. */
|
|
2923
|
+
errors: DomainError[];
|
|
2189
2924
|
/** Format: date-time */
|
|
2190
2925
|
created_at: string;
|
|
2191
2926
|
}
|
|
@@ -2197,15 +2932,16 @@ export interface GenerationSummaryRead {
|
|
|
2197
2932
|
definition_revision_id: DefinitionRevisionId | null;
|
|
2198
2933
|
status: GenerationStatus | (string & {});
|
|
2199
2934
|
trigger: GenerationTrigger | (string & {});
|
|
2200
|
-
/** Persisted Target identity. Null only for
|
|
2935
|
+
/** Persisted Target identity. Null only for one-shot generation. */
|
|
2201
2936
|
target_id: TargetId | null;
|
|
2202
2937
|
/** Resolved generator implementation; provenance rather than resource identity. */
|
|
2203
2938
|
generator: GeneratorKind | (string & {});
|
|
2204
|
-
provenance:
|
|
2939
|
+
provenance: GenerationProvenanceRead;
|
|
2205
2940
|
/** Null only for a failed or legacy generation that produced no metadata. */
|
|
2206
2941
|
meta: GenerationMetaRead | null;
|
|
2207
2942
|
warnings: string[];
|
|
2208
|
-
|
|
2943
|
+
/** Recorded failures. Empty when this resource has no recorded failure. */
|
|
2944
|
+
errors: DomainErrorRead[];
|
|
2209
2945
|
/** Format: date-time */
|
|
2210
2946
|
created_at: string;
|
|
2211
2947
|
}
|
|
@@ -2219,31 +2955,33 @@ export interface GenerationFailure {
|
|
|
2219
2955
|
target_id: TargetId;
|
|
2220
2956
|
generator: GeneratorKind;
|
|
2221
2957
|
status: "failed";
|
|
2222
|
-
|
|
2958
|
+
/** Recorded failures. Empty when this resource has no recorded failure. */
|
|
2959
|
+
errors: DomainError[];
|
|
2223
2960
|
}
|
|
2224
2961
|
/** Response shape for GenerationFailure. */
|
|
2225
2962
|
export interface GenerationFailureRead {
|
|
2226
2963
|
target_id: TargetId;
|
|
2227
2964
|
generator: GeneratorKind | (string & {});
|
|
2228
2965
|
status: "failed" | (string & {});
|
|
2229
|
-
|
|
2966
|
+
/** Recorded failures. Empty when this resource has no recorded failure. */
|
|
2967
|
+
errors: DomainErrorRead[];
|
|
2230
2968
|
}
|
|
2231
2969
|
/**
|
|
2232
|
-
*
|
|
2233
|
-
*
|
|
2970
|
+
* One Generation per selected Target. Retrieve each Generation for current status and generated
|
|
2971
|
+
* files.
|
|
2234
2972
|
*/
|
|
2235
2973
|
export interface GenerationBatch {
|
|
2236
|
-
data:
|
|
2974
|
+
data: GenerationSummary[];
|
|
2237
2975
|
request_id: RequestId;
|
|
2238
2976
|
}
|
|
2239
2977
|
/** Request shape for GenerationBatch. */
|
|
2240
2978
|
export interface GenerationBatchWrite {
|
|
2241
|
-
data:
|
|
2979
|
+
data: GenerationSummaryWrite[];
|
|
2242
2980
|
request_id: RequestId;
|
|
2243
2981
|
}
|
|
2244
2982
|
/** Response shape for GenerationBatch. */
|
|
2245
2983
|
export interface GenerationBatchRead {
|
|
2246
|
-
data:
|
|
2984
|
+
data: GenerationSummaryRead[];
|
|
2247
2985
|
request_id: RequestId;
|
|
2248
2986
|
}
|
|
2249
2987
|
export interface ApiKey {
|
|
@@ -2289,7 +3027,7 @@ export interface UrlDefinitionRevisionSourceRead {
|
|
|
2289
3027
|
}
|
|
2290
3028
|
export interface RepositoryDefinitionRevisionSource {
|
|
2291
3029
|
kind: "repository";
|
|
2292
|
-
repository:
|
|
3030
|
+
repository: RepositoryReferenceResponse;
|
|
2293
3031
|
/** Repository-relative Definition entrypoint path. */
|
|
2294
3032
|
path: string;
|
|
2295
3033
|
/** Git ref resolved for this revision, when recorded. */
|
|
@@ -2300,7 +3038,7 @@ export interface RepositoryDefinitionRevisionSource {
|
|
|
2300
3038
|
/** Response shape for RepositoryDefinitionRevisionSource. */
|
|
2301
3039
|
export interface RepositoryDefinitionRevisionSourceRead {
|
|
2302
3040
|
kind: "repository" | (string & {});
|
|
2303
|
-
repository:
|
|
3041
|
+
repository: RepositoryReferenceResponseRead;
|
|
2304
3042
|
/** Repository-relative Definition entrypoint path. */
|
|
2305
3043
|
path: string;
|
|
2306
3044
|
/** Git ref resolved for this revision, when recorded. */
|
|
@@ -2330,6 +3068,33 @@ export interface DefinitionDocumentRead {
|
|
|
2330
3068
|
sha256: string;
|
|
2331
3069
|
size_bytes: number;
|
|
2332
3070
|
}
|
|
3071
|
+
export interface DefinitionDocumentResponse {
|
|
3072
|
+
id: DefinitionDocumentId;
|
|
3073
|
+
object: "definition_document";
|
|
3074
|
+
definition_revision_id: DefinitionRevisionId;
|
|
3075
|
+
role: "entrypoint" | "reference";
|
|
3076
|
+
/** Repository-relative path or same-origin URL captured in this revision. */
|
|
3077
|
+
coordinate: string;
|
|
3078
|
+
sha256: string;
|
|
3079
|
+
size_bytes: number;
|
|
3080
|
+
/** Format: date-time */
|
|
3081
|
+
created_at: string;
|
|
3082
|
+
request_id: RequestId;
|
|
3083
|
+
}
|
|
3084
|
+
/** Response shape for DefinitionDocumentResponse. */
|
|
3085
|
+
export interface DefinitionDocumentResponseRead {
|
|
3086
|
+
id: DefinitionDocumentId;
|
|
3087
|
+
object: "definition_document" | (string & {});
|
|
3088
|
+
definition_revision_id: DefinitionRevisionId;
|
|
3089
|
+
role: ("entrypoint" | "reference") | (string & {});
|
|
3090
|
+
/** Repository-relative path or same-origin URL captured in this revision. */
|
|
3091
|
+
coordinate: string;
|
|
3092
|
+
sha256: string;
|
|
3093
|
+
size_bytes: number;
|
|
3094
|
+
/** Format: date-time */
|
|
3095
|
+
created_at: string;
|
|
3096
|
+
request_id: RequestId;
|
|
3097
|
+
}
|
|
2333
3098
|
export interface DefinitionRevision {
|
|
2334
3099
|
id: DefinitionRevisionId;
|
|
2335
3100
|
object: "definition_revision";
|
|
@@ -2493,6 +3258,7 @@ export declare const ErrorType: {
|
|
|
2493
3258
|
readonly SOURCE_ERROR: "source_error";
|
|
2494
3259
|
readonly RATE_LIMIT_ERROR: "rate_limit_error";
|
|
2495
3260
|
readonly API_ERROR: "api_error";
|
|
3261
|
+
readonly UNKNOWN_ERROR: "unknown_error";
|
|
2496
3262
|
};
|
|
2497
3263
|
export type ErrorType = (typeof ErrorType)[keyof typeof ErrorType];
|
|
2498
3264
|
/** Stable programmatic identifier. Do not branch on message. */
|
|
@@ -2504,27 +3270,79 @@ export declare const ErrorCode: {
|
|
|
2504
3270
|
readonly INSUFFICIENT_SCOPE: "insufficient_scope";
|
|
2505
3271
|
readonly FORBIDDEN: "forbidden";
|
|
2506
3272
|
readonly NOT_FOUND: "not_found";
|
|
3273
|
+
readonly METHOD_NOT_ALLOWED: "method_not_allowed";
|
|
2507
3274
|
readonly SPEC_ERROR: "spec_error";
|
|
2508
3275
|
readonly FETCH_ERROR: "fetch_error";
|
|
2509
3276
|
readonly REPOSITORY_PROVIDER_UNSUPPORTED: "repository_provider_unsupported";
|
|
2510
3277
|
readonly EDITION_UNAVAILABLE: "edition_unavailable";
|
|
2511
3278
|
readonly TARGET_BUSY: "target_busy";
|
|
3279
|
+
readonly NO_DRAFT: "no_draft";
|
|
3280
|
+
readonly STALE_DRAFT: "stale_draft";
|
|
3281
|
+
readonly NO_CHANGES: "no_changes";
|
|
3282
|
+
readonly INVALID_VERSION: "invalid_version";
|
|
3283
|
+
readonly PRECONDITION_FAILED: "precondition_failed";
|
|
3284
|
+
readonly DEFINITION_CHANGED: "definition_changed";
|
|
3285
|
+
readonly VERSION_OCCUPIED: "version_occupied";
|
|
3286
|
+
readonly VERSION_TOO_LOW: "version_too_low";
|
|
3287
|
+
readonly RELEASE_ANALYSIS_STALE: "release_analysis_stale";
|
|
3288
|
+
readonly TARGET_ALREADY_RELEASED: "target_already_released";
|
|
3289
|
+
readonly ADOPTION_UNVERIFIED: "adoption_unverified";
|
|
3290
|
+
readonly PUBLICATION_DISABLED: "publication_disabled";
|
|
3291
|
+
readonly PUBLICATION_NOT_RETRYABLE: "publication_not_retryable";
|
|
3292
|
+
readonly PUBLICATION_RECOVERY_UNAVAILABLE: "publication_recovery_unavailable";
|
|
3293
|
+
readonly PUBLICATION_DISPATCH_FAILED: "publication_dispatch_failed";
|
|
3294
|
+
readonly REPOSITORY_DISCONNECTED: "repository_disconnected";
|
|
3295
|
+
readonly REGENERATION_FAILED: "regeneration_failed";
|
|
2512
3296
|
readonly DELIVERY_CONFLICT: "delivery_conflict";
|
|
2513
3297
|
readonly RESOURCE_HAS_DEPENDENCIES: "resource_has_dependencies";
|
|
2514
3298
|
readonly PLAN_LIMIT_REACHED: "plan_limit_reached";
|
|
2515
3299
|
readonly PAYLOAD_TOO_LARGE: "payload_too_large";
|
|
2516
3300
|
readonly RATE_LIMITED: "rate_limited";
|
|
2517
3301
|
readonly INTERNAL_ERROR: "internal_error";
|
|
3302
|
+
readonly DEPENDENCY_MISSING: "dependency_missing";
|
|
3303
|
+
readonly DEPENDENCY_NOT_FOUND: "dependency_not_found";
|
|
3304
|
+
readonly DEPENDENCY_SELF: "dependency_self";
|
|
3305
|
+
readonly DEPENDENCY_CYCLE: "dependency_cycle";
|
|
3306
|
+
readonly DEPENDENCY_CROSS_PROJECT: "dependency_cross_project";
|
|
3307
|
+
readonly DEPENDENCY_CROSS_LINEAGE: "dependency_cross_lineage";
|
|
3308
|
+
readonly DEPENDENCY_WRONG_GENERATOR: "dependency_wrong_generator";
|
|
3309
|
+
readonly DEPENDENCY_DISABLED: "dependency_disabled";
|
|
3310
|
+
readonly DEPENDENCY_MODULE_PATH_MISSING: "dependency_module_path_missing";
|
|
3311
|
+
readonly DEPENDENCY_UNRELEASED: "dependency_unreleased";
|
|
3312
|
+
readonly DEPENDENCY_REVISION_MISMATCH: "dependency_revision_mismatch";
|
|
3313
|
+
readonly DEPENDENCY_EDITION_INCOMPATIBLE: "dependency_edition_incompatible";
|
|
3314
|
+
readonly PUBLICATION_FAILED: "publication_failed";
|
|
3315
|
+
readonly CUSTOMIZATION_CONFLICT: "customization_conflict";
|
|
3316
|
+
readonly HISTORY_RECOVERY_REQUIRED: "history_recovery_required";
|
|
3317
|
+
readonly CHECKS_UNAVAILABLE: "checks_unavailable";
|
|
3318
|
+
readonly GENERATION_STALE: "generation_stale";
|
|
3319
|
+
readonly UNCLASSIFIED_ERROR: "unclassified_error";
|
|
2518
3320
|
};
|
|
2519
3321
|
export type ErrorCode = (typeof ErrorCode)[keyof typeof ErrorCode];
|
|
2520
3322
|
export interface ErrorDetail {
|
|
2521
3323
|
type: ErrorType;
|
|
2522
3324
|
code: ErrorCode;
|
|
2523
|
-
|
|
3325
|
+
phase?: FailurePhase;
|
|
3326
|
+
/** The affected Target when an operation reports failures for multiple Targets. */
|
|
3327
|
+
target_id?: TargetId;
|
|
3328
|
+
/**
|
|
3329
|
+
* JSON Pointer to the invalid field within the request part named by in. When in is omitted, the
|
|
3330
|
+
* pointer refers to the request body. Header pointers use lowercase header names, such as
|
|
3331
|
+
* /idempotency-key.
|
|
3332
|
+
*/
|
|
2524
3333
|
field?: string;
|
|
3334
|
+
/**
|
|
3335
|
+
* Request part containing field. Query-parameter errors use query; header errors use header. Body
|
|
3336
|
+
* errors use body or omit in.
|
|
3337
|
+
*/
|
|
3338
|
+
in?: "body" | "query" | "header";
|
|
2525
3339
|
/** Human-readable explanation. Its wording may change. */
|
|
2526
3340
|
message: string;
|
|
2527
|
-
/**
|
|
3341
|
+
/**
|
|
3342
|
+
* Whether another attempt can succeed without correcting the inputs. For a recorded failure,
|
|
3343
|
+
* start generation or publication again; retrieving the resource or replaying an idempotency key
|
|
3344
|
+
* does not start another attempt.
|
|
3345
|
+
*/
|
|
2528
3346
|
retryable: boolean;
|
|
2529
3347
|
/** Stable, concise recovery instruction suitable for a person or agent. */
|
|
2530
3348
|
suggested_action: string;
|
|
@@ -2538,11 +3356,27 @@ export interface ErrorDetail {
|
|
|
2538
3356
|
export interface ErrorDetailRead {
|
|
2539
3357
|
type: ErrorType | (string & {});
|
|
2540
3358
|
code: ErrorCode | (string & {});
|
|
2541
|
-
|
|
3359
|
+
phase?: FailurePhase | (string & {});
|
|
3360
|
+
/** The affected Target when an operation reports failures for multiple Targets. */
|
|
3361
|
+
target_id?: TargetId;
|
|
3362
|
+
/**
|
|
3363
|
+
* JSON Pointer to the invalid field within the request part named by in. When in is omitted, the
|
|
3364
|
+
* pointer refers to the request body. Header pointers use lowercase header names, such as
|
|
3365
|
+
* /idempotency-key.
|
|
3366
|
+
*/
|
|
2542
3367
|
field?: string;
|
|
3368
|
+
/**
|
|
3369
|
+
* Request part containing field. Query-parameter errors use query; header errors use header. Body
|
|
3370
|
+
* errors use body or omit in.
|
|
3371
|
+
*/
|
|
3372
|
+
in?: ("body" | "query" | "header") | (string & {});
|
|
2543
3373
|
/** Human-readable explanation. Its wording may change. */
|
|
2544
3374
|
message: string;
|
|
2545
|
-
/**
|
|
3375
|
+
/**
|
|
3376
|
+
* Whether another attempt can succeed without correcting the inputs. For a recorded failure,
|
|
3377
|
+
* start generation or publication again; retrieving the resource or replaying an idempotency key
|
|
3378
|
+
* does not start another attempt.
|
|
3379
|
+
*/
|
|
2546
3380
|
retryable: boolean;
|
|
2547
3381
|
/** Stable, concise recovery instruction suitable for a person or agent. */
|
|
2548
3382
|
suggested_action: string;
|
|
@@ -2552,13 +3386,1207 @@ export interface ErrorDetailRead {
|
|
|
2552
3386
|
*/
|
|
2553
3387
|
docs_url: string;
|
|
2554
3388
|
}
|
|
2555
|
-
export interface
|
|
2556
|
-
|
|
2557
|
-
|
|
3389
|
+
export interface RepositoryReferenceResponse {
|
|
3390
|
+
/** GitHub is the only launch provider; the field is stable for future adapters. */
|
|
3391
|
+
provider: "github";
|
|
3392
|
+
/** Provider-native repository identity, opaque outside its adapter. */
|
|
3393
|
+
identifier: string;
|
|
2558
3394
|
}
|
|
2559
|
-
/** Response shape for
|
|
2560
|
-
export interface
|
|
2561
|
-
|
|
2562
|
-
|
|
3395
|
+
/** Response shape for RepositoryReferenceResponse. */
|
|
3396
|
+
export interface RepositoryReferenceResponseRead {
|
|
3397
|
+
/** GitHub is the only launch provider; the field is stable for future adapters. */
|
|
3398
|
+
provider: "github" | (string & {});
|
|
3399
|
+
/** Provider-native repository identity, opaque outside its adapter. */
|
|
3400
|
+
identifier: string;
|
|
3401
|
+
}
|
|
3402
|
+
/**
|
|
3403
|
+
* A fix applied to the resolved Definition before generation. Paths are JSON
|
|
3404
|
+
* Pointers into the document. A patch whose target no longer exists is
|
|
3405
|
+
* skipped and reported as a warning on the generation, never silently.
|
|
3406
|
+
*/
|
|
3407
|
+
export interface DefinitionPatchResponse {
|
|
3408
|
+
op: "set" | "append" | "remove" | "rename";
|
|
3409
|
+
/**
|
|
3410
|
+
* JSON-Pointer-style path. Pattern segments enable bulk fixes:
|
|
3411
|
+
* * (any child), ** (any depth), [key=value] (filter), e.g.
|
|
3412
|
+
* /paths/**\/parameters/[name=account_id]/schema/type. Renaming a
|
|
3413
|
+
* schema under /components/schemas also rewrites its $refs.
|
|
3414
|
+
*/
|
|
3415
|
+
path: string;
|
|
3416
|
+
/** set only; the replacement value. */
|
|
3417
|
+
value?: unknown;
|
|
3418
|
+
/** rename only; the new key name. */
|
|
3419
|
+
to?: string | null;
|
|
3420
|
+
reason?: string | null;
|
|
3421
|
+
}
|
|
3422
|
+
/** Response shape for DefinitionPatchResponse. */
|
|
3423
|
+
export interface DefinitionPatchResponseRead {
|
|
3424
|
+
op: ("set" | "append" | "remove" | "rename") | (string & {});
|
|
3425
|
+
/**
|
|
3426
|
+
* JSON-Pointer-style path. Pattern segments enable bulk fixes:
|
|
3427
|
+
* * (any child), ** (any depth), [key=value] (filter), e.g.
|
|
3428
|
+
* /paths/**\/parameters/[name=account_id]/schema/type. Renaming a
|
|
3429
|
+
* schema under /components/schemas also rewrites its $refs.
|
|
3430
|
+
*/
|
|
3431
|
+
path: string;
|
|
3432
|
+
/** set only; the replacement value. */
|
|
3433
|
+
value?: unknown;
|
|
3434
|
+
/** rename only; the new key name. */
|
|
3435
|
+
to?: string | null;
|
|
3436
|
+
reason?: string | null;
|
|
3437
|
+
}
|
|
3438
|
+
export interface DiagnosticSuppressionResponse {
|
|
3439
|
+
rule_id: string;
|
|
3440
|
+
/** Exact schema coordinate. Omit only to suppress every occurrence of the rule. */
|
|
3441
|
+
path?: string;
|
|
3442
|
+
/** The reviewed product decision behind this exception. */
|
|
3443
|
+
reason: string;
|
|
3444
|
+
}
|
|
3445
|
+
/**
|
|
3446
|
+
* Source pull-request enforcement threshold, new-versus-complete baseline, and explicitly reviewed
|
|
3447
|
+
* rule or location exceptions.
|
|
3448
|
+
*/
|
|
3449
|
+
export interface DiagnosticPolicyResponse {
|
|
3450
|
+
/**
|
|
3451
|
+
* Severity threshold that fails the API change review check.
|
|
3452
|
+
* Default: "error"
|
|
3453
|
+
*/
|
|
3454
|
+
fail_on: "never" | "error" | "warning";
|
|
3455
|
+
/**
|
|
3456
|
+
* Enforce only occurrences introduced by the proposed source change.
|
|
3457
|
+
* Default: true
|
|
3458
|
+
*/
|
|
3459
|
+
only_new: boolean;
|
|
3460
|
+
/** Default: [] */
|
|
3461
|
+
suppressions: DiagnosticSuppressionResponse[];
|
|
3462
|
+
}
|
|
3463
|
+
/** Response shape for DiagnosticPolicyResponse. */
|
|
3464
|
+
export interface DiagnosticPolicyResponseRead {
|
|
3465
|
+
/**
|
|
3466
|
+
* Severity threshold that fails the API change review check.
|
|
3467
|
+
* Default: "error"
|
|
3468
|
+
*/
|
|
3469
|
+
fail_on: ("never" | "error" | "warning") | (string & {});
|
|
3470
|
+
/**
|
|
3471
|
+
* Enforce only occurrences introduced by the proposed source change.
|
|
3472
|
+
* Default: true
|
|
3473
|
+
*/
|
|
3474
|
+
only_new: boolean;
|
|
3475
|
+
/** Default: [] */
|
|
3476
|
+
suppressions: DiagnosticSuppressionResponse[];
|
|
3477
|
+
}
|
|
3478
|
+
/**
|
|
3479
|
+
* Required checks run against the complete combined package. Generated checks and customer commands
|
|
3480
|
+
* share one reproducible workflow; repository_required names existing repository checks. Supplying
|
|
3481
|
+
* checks replaces all settings. Omitted generated restores build, package, and public_entrypoint;
|
|
3482
|
+
* omitted repository_required and customer restore empty lists. An empty object restores these
|
|
3483
|
+
* defaults. An empty array clears the corresponding list.
|
|
3484
|
+
*/
|
|
3485
|
+
export interface TargetChecksResponse {
|
|
3486
|
+
/** Default: ["build","package","public_entrypoint"] */
|
|
3487
|
+
generated?: Array<"build" | "package" | "public_entrypoint">;
|
|
3488
|
+
repository_required?: string[];
|
|
3489
|
+
customer?: Array<{
|
|
3490
|
+
name: string;
|
|
3491
|
+
command: string;
|
|
3492
|
+
}>;
|
|
3493
|
+
}
|
|
3494
|
+
/** Response shape for TargetChecksResponse. */
|
|
3495
|
+
export interface TargetChecksResponseRead {
|
|
3496
|
+
/** Default: ["build","package","public_entrypoint"] */
|
|
3497
|
+
generated?: Array<("build" | "package" | "public_entrypoint") | (string & {})>;
|
|
3498
|
+
repository_required?: string[];
|
|
3499
|
+
customer?: Array<{
|
|
3500
|
+
name: string;
|
|
3501
|
+
command: string;
|
|
3502
|
+
}>;
|
|
3503
|
+
}
|
|
3504
|
+
/**
|
|
3505
|
+
* Authorization-server metadata used by generated OAuth flows. Secrets and runtime credentials are
|
|
3506
|
+
* never accepted here.
|
|
3507
|
+
*/
|
|
3508
|
+
export interface OAuthServerResponse {
|
|
3509
|
+
/**
|
|
3510
|
+
* Exact authorization-server issuer, including any tenant path.
|
|
3511
|
+
* Format: uri
|
|
3512
|
+
*/
|
|
3513
|
+
issuer?: string | null;
|
|
3514
|
+
/**
|
|
3515
|
+
* Exact metadata URL when it cannot be derived from the issuer.
|
|
3516
|
+
* Format: uri
|
|
3517
|
+
*/
|
|
3518
|
+
discovery_url?: string | null;
|
|
3519
|
+
/**
|
|
3520
|
+
* Authorization endpoint override.
|
|
3521
|
+
* Format: uri
|
|
3522
|
+
*/
|
|
3523
|
+
authorization_url?: string | null;
|
|
3524
|
+
/**
|
|
3525
|
+
* Token endpoint override.
|
|
3526
|
+
* Format: uri
|
|
3527
|
+
*/
|
|
3528
|
+
token_url?: string | null;
|
|
3529
|
+
/**
|
|
3530
|
+
* Device-authorization endpoint override.
|
|
3531
|
+
* Format: uri
|
|
3532
|
+
*/
|
|
3533
|
+
device_authorization_url?: string | null;
|
|
3534
|
+
/** Default scopes requested during login. */
|
|
3535
|
+
scopes?: string[] | null;
|
|
3536
|
+
/** Default audience included in authorization and token requests. */
|
|
3537
|
+
audience?: string | null;
|
|
3538
|
+
/**
|
|
3539
|
+
* Protected API resource included in authorization and token requests.
|
|
3540
|
+
* Format: uri
|
|
3541
|
+
*/
|
|
3542
|
+
resource?: string | null;
|
|
3543
|
+
}
|
|
3544
|
+
/**
|
|
3545
|
+
* OAuth application available to generated products. Public clients support interactive login;
|
|
3546
|
+
* confidential clients support runtime-supplied machine credentials. Client secrets are never
|
|
3547
|
+
* stored.
|
|
3548
|
+
*/
|
|
3549
|
+
export interface OAuthApplicationResponse {
|
|
3550
|
+
/** OAuth client identifier. */
|
|
3551
|
+
client_id: string;
|
|
3552
|
+
/** Interactive login method. Browser login uses Authorization Code with PKCE. */
|
|
3553
|
+
login_method?: "browser" | "device" | null;
|
|
3554
|
+
/** How a runtime-supplied client secret is sent for machine grants. */
|
|
3555
|
+
client_auth_method?: "post" | "basic" | null;
|
|
3556
|
+
/**
|
|
3557
|
+
* Loopback callback URL for browser login.
|
|
3558
|
+
* Format: uri
|
|
3559
|
+
*/
|
|
3560
|
+
redirect_uri?: string | null;
|
|
3561
|
+
/** Provider parameter used to request an organization during browser login. */
|
|
3562
|
+
organization_parameter?: "organization" | "organization_id" | null;
|
|
3563
|
+
}
|
|
3564
|
+
/** Response shape for OAuthApplicationResponse. */
|
|
3565
|
+
export interface OAuthApplicationResponseRead {
|
|
3566
|
+
/** OAuth client identifier. */
|
|
3567
|
+
client_id: string;
|
|
3568
|
+
/** Interactive login method. Browser login uses Authorization Code with PKCE. */
|
|
3569
|
+
login_method?: ("browser" | "device" | null) | (string & {}) | null;
|
|
3570
|
+
/** How a runtime-supplied client secret is sent for machine grants. */
|
|
3571
|
+
client_auth_method?: ("post" | "basic" | null) | (string & {}) | null;
|
|
3572
|
+
/**
|
|
3573
|
+
* Loopback callback URL for browser login.
|
|
3574
|
+
* Format: uri
|
|
3575
|
+
*/
|
|
3576
|
+
redirect_uri?: string | null;
|
|
3577
|
+
/** Provider parameter used to request an organization during browser login. */
|
|
3578
|
+
organization_parameter?: ("organization" | "organization_id" | null) | (string & {}) | null;
|
|
3579
|
+
}
|
|
3580
|
+
/**
|
|
3581
|
+
* Authenticated identity read used to verify a login before it is saved. Operation is auto-detected
|
|
3582
|
+
* when omitted or null. At least one of subject_field, account_field, or organization_field must be
|
|
3583
|
+
* a non-null JSON Pointer. Null clears an individual mapping while another remains. Set
|
|
3584
|
+
* identity_verification itself to null to remove the whole policy.
|
|
3585
|
+
*/
|
|
3586
|
+
export type IdentityVerificationResponse = {
|
|
3587
|
+
/** resource.method of a safe identity read with no required arguments. */
|
|
3588
|
+
operation?: string | null;
|
|
3589
|
+
/** JSON Pointer to the stable caller ID in the identity response. */
|
|
3590
|
+
subject_field?: string | null;
|
|
3591
|
+
/** JSON Pointer to the customer account ID. */
|
|
3592
|
+
account_field?: string | null;
|
|
3593
|
+
/** JSON Pointer to the customer organization ID. */
|
|
3594
|
+
organization_field?: string | null;
|
|
3595
|
+
} & ({
|
|
3596
|
+
subject_field: string;
|
|
3597
|
+
} | {
|
|
3598
|
+
account_field: string;
|
|
3599
|
+
} | {
|
|
3600
|
+
organization_field: string;
|
|
3601
|
+
});
|
|
3602
|
+
/** OAuth application and request-value overrides for one named API environment. */
|
|
3603
|
+
export interface AuthenticationEnvironmentResponse {
|
|
3604
|
+
oauth_application?: string | null;
|
|
3605
|
+
scopes?: string[] | null;
|
|
3606
|
+
audience?: string | null;
|
|
3607
|
+
/** Format: uri */
|
|
3608
|
+
resource?: string | null;
|
|
3609
|
+
}
|
|
3610
|
+
/**
|
|
3611
|
+
* Public authentication defaults for generated clients and tools. Stored Projects own the OAuth
|
|
3612
|
+
* server, application catalog, and identity policy; one-shot generation accepts the same shape for
|
|
3613
|
+
* one run. Runtime credentials and client secrets are never accepted.
|
|
3614
|
+
*/
|
|
3615
|
+
export interface AuthenticationConfigResponse {
|
|
3616
|
+
oauth_server?: OAuthServerResponse | null;
|
|
3617
|
+
/** OAuth applications keyed by a stable name. */
|
|
3618
|
+
oauth_applications?: Record<string, OAuthApplicationResponse> | null;
|
|
3619
|
+
/** Default OAuth application used by generated products. */
|
|
3620
|
+
oauth_application?: string | null;
|
|
3621
|
+
identity_verification?: IdentityVerificationResponse | null;
|
|
3622
|
+
/**
|
|
3623
|
+
* Base URL of a custom browser-approval backend implementing the start, status, and revoke
|
|
3624
|
+
* contract. Used only when OAuth is not configured.
|
|
3625
|
+
* Format: uri
|
|
3626
|
+
*/
|
|
3627
|
+
approval_url?: string | null;
|
|
3628
|
+
/** Authentication selections keyed by generated API environment name. */
|
|
3629
|
+
environments?: Record<string, AuthenticationEnvironmentResponse> | null;
|
|
3630
|
+
}
|
|
3631
|
+
export interface TargetAuthenticationEnvironmentResponse {
|
|
3632
|
+
oauth_application?: string | null;
|
|
3633
|
+
}
|
|
3634
|
+
/**
|
|
3635
|
+
* Selects a Project OAuth application for one Target. OAuth server metadata, applications, and
|
|
3636
|
+
* identity policy remain Project-owned.
|
|
3637
|
+
*/
|
|
3638
|
+
export interface TargetAuthenticationConfigResponse {
|
|
3639
|
+
/** Project OAuth application to use. Omit to inherit the Project default. */
|
|
3640
|
+
oauth_application?: string | null;
|
|
3641
|
+
/** Project OAuth application selections keyed by API environment. */
|
|
3642
|
+
environments?: Record<string, TargetAuthenticationEnvironmentResponse> | null;
|
|
3643
|
+
}
|
|
3644
|
+
/** How the generated CLI behaves. Part of Config. */
|
|
3645
|
+
export interface CliBehaviorResponse {
|
|
3646
|
+
/** Command users run, independent of how the CLI is distributed. */
|
|
3647
|
+
command_name?: string | null;
|
|
3648
|
+
/**
|
|
3649
|
+
* Opt in to a once-a-day registry check that prints an upgrade hint. Off by default; generated
|
|
3650
|
+
* code phones nobody unless this is enabled.
|
|
3651
|
+
*/
|
|
3652
|
+
update_notice?: boolean;
|
|
3653
|
+
/**
|
|
3654
|
+
* Public HTTP(S) URL read by the optional changelog command in generated CLIs. Supports UTF-8
|
|
3655
|
+
* Markdown, plain text, and static HTML; embedded credentials are not allowed. Omit or clear to
|
|
3656
|
+
* disable, then regenerate.
|
|
3657
|
+
*/
|
|
3658
|
+
changelog_url?: string | null;
|
|
3659
|
+
/**
|
|
3660
|
+
* Where the generated CLI's feedback command sends users. GitHub issues/new URLs get a prefilled
|
|
3661
|
+
* title and environment details.
|
|
3662
|
+
*/
|
|
3663
|
+
support_url?: string | null;
|
|
3664
|
+
/**
|
|
3665
|
+
* Hosted MCP endpoint installed by the generated CLI instead of launching the package's local
|
|
3666
|
+
* stdio server.
|
|
3667
|
+
*/
|
|
3668
|
+
mcp_url?: string | null;
|
|
3669
|
+
/** GitHub owner/name of the skills package the generated CLI offers to install during init. */
|
|
3670
|
+
skills_repo?: string | null;
|
|
3671
|
+
}
|
|
3672
|
+
/** How generated MCP servers and the Typeship-hosted endpoint behave. Part of Config. */
|
|
3673
|
+
export interface McpBehaviorResponse {
|
|
3674
|
+
/** Stable official MCP registry name, independent of the server runtime. */
|
|
3675
|
+
registry_name?: string | null;
|
|
3676
|
+
/**
|
|
3677
|
+
* Authorization for callers connecting to a generated MCP server deployed over HTTP. The hosting
|
|
3678
|
+
* application resolves upstream API credentials separately at runtime. This setting does not
|
|
3679
|
+
* apply to the Typeship-hosted endpoint.
|
|
3680
|
+
*/
|
|
3681
|
+
access?: {
|
|
3682
|
+
/**
|
|
3683
|
+
* Exact issuer allowed to sign MCP connection tokens.
|
|
3684
|
+
* Format: uri
|
|
3685
|
+
*/
|
|
3686
|
+
issuer: string;
|
|
3687
|
+
/**
|
|
3688
|
+
* Canonical public URL of the self-hosted MCP endpoint that connection tokens must target.
|
|
3689
|
+
* Format: uri
|
|
3690
|
+
*/
|
|
3691
|
+
resource: string;
|
|
3692
|
+
/**
|
|
3693
|
+
* Public signing-key endpoint. Omit to discover it from the issuer.
|
|
3694
|
+
* Format: uri
|
|
3695
|
+
*/
|
|
3696
|
+
jwks_url?: string;
|
|
3697
|
+
/** Minimum scopes required to connect to the self-hosted MCP server. */
|
|
3698
|
+
scopes?: string[];
|
|
3699
|
+
};
|
|
3700
|
+
/**
|
|
3701
|
+
* MCP tool shape. meta collapses per-operation tools into search_docs, read_docs, and execute so
|
|
3702
|
+
* large APIs don't flood an agent's context window. Auto considers the serialized tool schemas,
|
|
3703
|
+
* switching near 10k tokens or above 100 operations.
|
|
3704
|
+
*/
|
|
3705
|
+
tool_mode?: "auto" | "operations" | "meta";
|
|
3706
|
+
/**
|
|
3707
|
+
* Guidance appended to the MCP server's instructions, which agents read once when they connect
|
|
3708
|
+
* (server/discover): what to call first, conventions the spec does not state, what not to do.
|
|
3709
|
+
* Carried by the package's server and the hosted endpoint alike.
|
|
3710
|
+
*/
|
|
3711
|
+
instructions?: string | null;
|
|
3712
|
+
/**
|
|
3713
|
+
* Hand-written MCP tool descriptions keyed by operationId or "METHOD /path". Each replaces the
|
|
3714
|
+
* text typeship derives for that operation (summary, first sentence, method and path, deprecation
|
|
3715
|
+
* and auth notes). For flows the spec cannot describe, such as a multi-step upload. Keys that
|
|
3716
|
+
* match no operation are reported as generation warnings.
|
|
3717
|
+
*/
|
|
3718
|
+
tool_descriptions?: Record<string, string>;
|
|
3719
|
+
/**
|
|
3720
|
+
* Exact name-or-ID resolver overrides keyed first by the target operationId or "METHOD /path",
|
|
3721
|
+
* then by its wire argument name. A resolver names one read collection operation plus 1-4 item
|
|
3722
|
+
* fields to match case-insensitively; false opts that argument out of strict inference.
|
|
3723
|
+
*/
|
|
3724
|
+
reference_resolvers?: Record<string, Record<string, false | {
|
|
3725
|
+
/** OperationId, "METHOD /path", MCP tool name, or dotted resource.method of the list operation. */
|
|
3726
|
+
via: string;
|
|
3727
|
+
/** Item fields compared exactly and case-insensitively, such as name, slug, key, or email. */
|
|
3728
|
+
match: string[];
|
|
3729
|
+
/** Item field substituted into the requested argument. Defaults to id. */
|
|
3730
|
+
id?: string;
|
|
3731
|
+
}>>;
|
|
3732
|
+
}
|
|
3733
|
+
/** Response shape for McpBehaviorResponse. */
|
|
3734
|
+
export interface McpBehaviorResponseRead {
|
|
3735
|
+
/** Stable official MCP registry name, independent of the server runtime. */
|
|
3736
|
+
registry_name?: string | null;
|
|
3737
|
+
/**
|
|
3738
|
+
* Authorization for callers connecting to a generated MCP server deployed over HTTP. The hosting
|
|
3739
|
+
* application resolves upstream API credentials separately at runtime. This setting does not
|
|
3740
|
+
* apply to the Typeship-hosted endpoint.
|
|
3741
|
+
*/
|
|
3742
|
+
access?: {
|
|
3743
|
+
/**
|
|
3744
|
+
* Exact issuer allowed to sign MCP connection tokens.
|
|
3745
|
+
* Format: uri
|
|
3746
|
+
*/
|
|
3747
|
+
issuer: string;
|
|
3748
|
+
/**
|
|
3749
|
+
* Canonical public URL of the self-hosted MCP endpoint that connection tokens must target.
|
|
3750
|
+
* Format: uri
|
|
3751
|
+
*/
|
|
3752
|
+
resource: string;
|
|
3753
|
+
/**
|
|
3754
|
+
* Public signing-key endpoint. Omit to discover it from the issuer.
|
|
3755
|
+
* Format: uri
|
|
3756
|
+
*/
|
|
3757
|
+
jwks_url?: string;
|
|
3758
|
+
/** Minimum scopes required to connect to the self-hosted MCP server. */
|
|
3759
|
+
scopes?: string[];
|
|
3760
|
+
};
|
|
3761
|
+
/**
|
|
3762
|
+
* MCP tool shape. meta collapses per-operation tools into search_docs, read_docs, and execute so
|
|
3763
|
+
* large APIs don't flood an agent's context window. Auto considers the serialized tool schemas,
|
|
3764
|
+
* switching near 10k tokens or above 100 operations.
|
|
3765
|
+
*/
|
|
3766
|
+
tool_mode?: ("auto" | "operations" | "meta") | (string & {});
|
|
3767
|
+
/**
|
|
3768
|
+
* Guidance appended to the MCP server's instructions, which agents read once when they connect
|
|
3769
|
+
* (server/discover): what to call first, conventions the spec does not state, what not to do.
|
|
3770
|
+
* Carried by the package's server and the hosted endpoint alike.
|
|
3771
|
+
*/
|
|
3772
|
+
instructions?: string | null;
|
|
3773
|
+
/**
|
|
3774
|
+
* Hand-written MCP tool descriptions keyed by operationId or "METHOD /path". Each replaces the
|
|
3775
|
+
* text typeship derives for that operation (summary, first sentence, method and path, deprecation
|
|
3776
|
+
* and auth notes). For flows the spec cannot describe, such as a multi-step upload. Keys that
|
|
3777
|
+
* match no operation are reported as generation warnings.
|
|
3778
|
+
*/
|
|
3779
|
+
tool_descriptions?: Record<string, string>;
|
|
3780
|
+
/**
|
|
3781
|
+
* Exact name-or-ID resolver overrides keyed first by the target operationId or "METHOD /path",
|
|
3782
|
+
* then by its wire argument name. A resolver names one read collection operation plus 1-4 item
|
|
3783
|
+
* fields to match case-insensitively; false opts that argument out of strict inference.
|
|
3784
|
+
*/
|
|
3785
|
+
reference_resolvers?: Record<string, Record<string, false | (string & {}) | {
|
|
3786
|
+
/** OperationId, "METHOD /path", MCP tool name, or dotted resource.method of the list operation. */
|
|
3787
|
+
via: string;
|
|
3788
|
+
/** Item fields compared exactly and case-insensitively, such as name, slug, key, or email. */
|
|
3789
|
+
match: string[];
|
|
3790
|
+
/** Item field substituted into the requested argument. Defaults to id. */
|
|
3791
|
+
id?: string;
|
|
3792
|
+
}>>;
|
|
3793
|
+
}
|
|
3794
|
+
/** Generated README behavior. Part of Config. */
|
|
3795
|
+
export interface ReadmeBehaviorResponse {
|
|
3796
|
+
/**
|
|
3797
|
+
* operationId or "METHOD /path" to feature as the README's first API call. It must be present in
|
|
3798
|
+
* the generated package and callable with no required input beyond path placeholders. Missing or
|
|
3799
|
+
* unsuitable choices produce a warning and use the automatic example.
|
|
3800
|
+
*/
|
|
3801
|
+
quickstart_operation?: string | null;
|
|
3802
|
+
}
|
|
3803
|
+
/**
|
|
3804
|
+
* Published-package metadata the API spec does not own. Repository is derived from each
|
|
3805
|
+
* destination.
|
|
3806
|
+
*/
|
|
3807
|
+
export interface PackageBehaviorResponse {
|
|
3808
|
+
/** Homepage written into registry metadata. */
|
|
3809
|
+
homepage?: string | null;
|
|
3810
|
+
/** SPDX identifier written into registry metadata. Defaults to info.license. */
|
|
3811
|
+
license?: string | null;
|
|
3812
|
+
/**
|
|
3813
|
+
* Exact LICENSE file contents. Supply this for licences the engine does not build in; MIT is
|
|
3814
|
+
* built in when copyright is also set.
|
|
3815
|
+
*/
|
|
3816
|
+
license_text?: string | null;
|
|
3817
|
+
/** Copyright line used in generated license files. */
|
|
3818
|
+
copyright?: string | null;
|
|
3819
|
+
/** Go identifier when the destination repository name is unsuitable. */
|
|
3820
|
+
go_package_name?: string | null;
|
|
3821
|
+
}
|
|
3822
|
+
/**
|
|
3823
|
+
* Everything Typeship needs beyond the Definition, in one object: generation customization
|
|
3824
|
+
* (globals, retries, pagination, readme) and how the generated tooling behaves (cli, mcp, package,
|
|
3825
|
+
* docs_url). Plain configuration. Typeship never requires vendor extensions inside the Definition
|
|
3826
|
+
* itself. One-shot generation also accepts GraphQL settings here; stored projects keep those
|
|
3827
|
+
* settings on their Definition.
|
|
3828
|
+
*/
|
|
3829
|
+
export interface ConfigResponse {
|
|
3830
|
+
/**
|
|
3831
|
+
* Wire names of query/header parameters that become settable once on the generated client and
|
|
3832
|
+
* auto-apply to every operation that accepts them; per-call values win. Names that match nothing
|
|
3833
|
+
* are reported as generation warnings.
|
|
3834
|
+
*/
|
|
3835
|
+
globals?: string[];
|
|
3836
|
+
retries?: RetryTuningResponse;
|
|
3837
|
+
/**
|
|
3838
|
+
* Per-operation pagination control, keyed by operationId or "METHOD /path". Unmatched keys are
|
|
3839
|
+
* reported as generation warnings.
|
|
3840
|
+
*/
|
|
3841
|
+
pagination?: Record<string, PaginationRuleResponse | boolean>;
|
|
3842
|
+
graphql?: GraphqlSettingsResponse;
|
|
3843
|
+
auth?: AuthenticationConfigResponse;
|
|
3844
|
+
cli?: CliBehaviorResponse;
|
|
3845
|
+
mcp?: McpBehaviorResponse;
|
|
3846
|
+
readme?: ReadmeBehaviorResponse;
|
|
3847
|
+
package?: PackageBehaviorResponse;
|
|
3848
|
+
/**
|
|
3849
|
+
* 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 Definition's
|
|
3851
|
+
* externalDocs URL.
|
|
3852
|
+
* Format: uri
|
|
3853
|
+
*/
|
|
3854
|
+
docs_url?: string | null;
|
|
3855
|
+
/**
|
|
3856
|
+
* Exact llms.txt URL when the documentation site does not publish it at docs_url + /llms.txt.
|
|
3857
|
+
* Format: uri
|
|
3858
|
+
*/
|
|
3859
|
+
docs_index_url?: string | null;
|
|
3860
|
+
}
|
|
3861
|
+
/** Response shape for ConfigResponse. */
|
|
3862
|
+
export interface ConfigResponseRead {
|
|
3863
|
+
/**
|
|
3864
|
+
* Wire names of query/header parameters that become settable once on the generated client and
|
|
3865
|
+
* auto-apply to every operation that accepts them; per-call values win. Names that match nothing
|
|
3866
|
+
* are reported as generation warnings.
|
|
3867
|
+
*/
|
|
3868
|
+
globals?: string[];
|
|
3869
|
+
retries?: RetryTuningResponse;
|
|
3870
|
+
/**
|
|
3871
|
+
* Per-operation pagination control, keyed by operationId or "METHOD /path". Unmatched keys are
|
|
3872
|
+
* reported as generation warnings.
|
|
3873
|
+
*/
|
|
3874
|
+
pagination?: Record<string, PaginationRuleResponseRead | boolean>;
|
|
3875
|
+
graphql?: GraphqlSettingsResponseRead;
|
|
3876
|
+
auth?: AuthenticationConfigResponse;
|
|
3877
|
+
cli?: CliBehaviorResponse;
|
|
3878
|
+
mcp?: McpBehaviorResponseRead;
|
|
3879
|
+
readme?: ReadmeBehaviorResponse;
|
|
3880
|
+
package?: PackageBehaviorResponse;
|
|
3881
|
+
/**
|
|
3882
|
+
* 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 Definition's
|
|
3884
|
+
* externalDocs URL.
|
|
3885
|
+
* Format: uri
|
|
3886
|
+
*/
|
|
3887
|
+
docs_url?: string | null;
|
|
3888
|
+
/**
|
|
3889
|
+
* Exact llms.txt URL when the documentation site does not publish it at docs_url + /llms.txt.
|
|
3890
|
+
* Format: uri
|
|
3891
|
+
*/
|
|
3892
|
+
docs_index_url?: string | null;
|
|
3893
|
+
}
|
|
3894
|
+
/**
|
|
3895
|
+
* Shared generated-client and tooling behavior for a stored Project. Every Target inherits these
|
|
3896
|
+
* defaults. Target.config is merged over them for one Target; top-level values replace defaults
|
|
3897
|
+
* while cli, mcp, auth, readme, and package merge by field. GraphQL-only source settings live on
|
|
3898
|
+
* the Project's Definition and are rejected in both stored config scopes.
|
|
3899
|
+
*/
|
|
3900
|
+
export interface ProjectConfigResponse {
|
|
3901
|
+
/**
|
|
3902
|
+
* Wire names of query/header parameters that become settable once on the generated client and
|
|
3903
|
+
* auto-apply to every operation that accepts them; per-call values win. Names that match nothing
|
|
3904
|
+
* are reported as generation warnings.
|
|
3905
|
+
*/
|
|
3906
|
+
globals?: string[];
|
|
3907
|
+
retries?: RetryTuningResponse;
|
|
3908
|
+
/**
|
|
3909
|
+
* Per-operation pagination control, keyed by operationId or "METHOD /path". Unmatched keys are
|
|
3910
|
+
* reported as generation warnings.
|
|
3911
|
+
*/
|
|
3912
|
+
pagination?: Record<string, PaginationRuleResponse | boolean>;
|
|
3913
|
+
auth?: AuthenticationConfigResponse;
|
|
3914
|
+
cli?: CliBehaviorResponse;
|
|
3915
|
+
mcp?: McpBehaviorResponse;
|
|
3916
|
+
readme?: ReadmeBehaviorResponse;
|
|
3917
|
+
package?: PackageBehaviorResponse;
|
|
3918
|
+
/**
|
|
3919
|
+
* 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 Definition's
|
|
3921
|
+
* externalDocs URL.
|
|
3922
|
+
* Format: uri
|
|
3923
|
+
*/
|
|
3924
|
+
docs_url?: string | null;
|
|
3925
|
+
/**
|
|
3926
|
+
* Exact llms.txt URL when the documentation site does not publish it at docs_url + /llms.txt.
|
|
3927
|
+
* Format: uri
|
|
3928
|
+
*/
|
|
3929
|
+
docs_index_url?: string | null;
|
|
3930
|
+
}
|
|
3931
|
+
/** Response shape for ProjectConfigResponse. */
|
|
3932
|
+
export interface ProjectConfigResponseRead {
|
|
3933
|
+
/**
|
|
3934
|
+
* Wire names of query/header parameters that become settable once on the generated client and
|
|
3935
|
+
* auto-apply to every operation that accepts them; per-call values win. Names that match nothing
|
|
3936
|
+
* are reported as generation warnings.
|
|
3937
|
+
*/
|
|
3938
|
+
globals?: string[];
|
|
3939
|
+
retries?: RetryTuningResponse;
|
|
3940
|
+
/**
|
|
3941
|
+
* Per-operation pagination control, keyed by operationId or "METHOD /path". Unmatched keys are
|
|
3942
|
+
* reported as generation warnings.
|
|
3943
|
+
*/
|
|
3944
|
+
pagination?: Record<string, PaginationRuleResponseRead | boolean>;
|
|
3945
|
+
auth?: AuthenticationConfigResponse;
|
|
3946
|
+
cli?: CliBehaviorResponse;
|
|
3947
|
+
mcp?: McpBehaviorResponseRead;
|
|
3948
|
+
readme?: ReadmeBehaviorResponse;
|
|
3949
|
+
package?: PackageBehaviorResponse;
|
|
3950
|
+
/**
|
|
3951
|
+
* 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 Definition's
|
|
3953
|
+
* externalDocs URL.
|
|
3954
|
+
* Format: uri
|
|
3955
|
+
*/
|
|
3956
|
+
docs_url?: string | null;
|
|
3957
|
+
/**
|
|
3958
|
+
* Exact llms.txt URL when the documentation site does not publish it at docs_url + /llms.txt.
|
|
3959
|
+
* Format: uri
|
|
3960
|
+
*/
|
|
3961
|
+
docs_index_url?: string | null;
|
|
3962
|
+
}
|
|
3963
|
+
/**
|
|
3964
|
+
* Target-specific generation and delivery overrides. Authentication may only select a Project-owned
|
|
3965
|
+
* OAuth application. OAuth server metadata, applications, and identity policy remain Project-owned.
|
|
3966
|
+
* Self-hosted MCP access may be overridden for a Target-specific deployment.
|
|
3967
|
+
*/
|
|
3968
|
+
export interface TargetConfigResponse {
|
|
3969
|
+
/**
|
|
3970
|
+
* Wire names of query/header parameters that become settable once on the generated client and
|
|
3971
|
+
* auto-apply to every operation that accepts them; per-call values win. Names that match nothing
|
|
3972
|
+
* are reported as generation warnings.
|
|
3973
|
+
*/
|
|
3974
|
+
globals?: string[];
|
|
3975
|
+
retries?: RetryTuningResponse;
|
|
3976
|
+
/**
|
|
3977
|
+
* Per-operation pagination control, keyed by operationId or "METHOD /path". Unmatched keys are
|
|
3978
|
+
* reported as generation warnings.
|
|
3979
|
+
*/
|
|
3980
|
+
pagination?: Record<string, PaginationRuleResponse | boolean>;
|
|
3981
|
+
auth?: TargetAuthenticationConfigResponse;
|
|
3982
|
+
cli?: CliBehaviorResponse;
|
|
3983
|
+
mcp?: McpBehaviorResponse;
|
|
3984
|
+
readme?: ReadmeBehaviorResponse;
|
|
3985
|
+
package?: PackageBehaviorResponse;
|
|
3986
|
+
/**
|
|
3987
|
+
* 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 Definition's
|
|
3989
|
+
* externalDocs URL.
|
|
3990
|
+
* Format: uri
|
|
3991
|
+
*/
|
|
3992
|
+
docs_url?: string | null;
|
|
3993
|
+
/**
|
|
3994
|
+
* Exact llms.txt URL when the documentation site does not publish it at docs_url + /llms.txt.
|
|
3995
|
+
* Format: uri
|
|
3996
|
+
*/
|
|
3997
|
+
docs_index_url?: string | null;
|
|
3998
|
+
}
|
|
3999
|
+
/** Response shape for TargetConfigResponse. */
|
|
4000
|
+
export interface TargetConfigResponseRead {
|
|
4001
|
+
/**
|
|
4002
|
+
* Wire names of query/header parameters that become settable once on the generated client and
|
|
4003
|
+
* auto-apply to every operation that accepts them; per-call values win. Names that match nothing
|
|
4004
|
+
* are reported as generation warnings.
|
|
4005
|
+
*/
|
|
4006
|
+
globals?: string[];
|
|
4007
|
+
retries?: RetryTuningResponse;
|
|
4008
|
+
/**
|
|
4009
|
+
* Per-operation pagination control, keyed by operationId or "METHOD /path". Unmatched keys are
|
|
4010
|
+
* reported as generation warnings.
|
|
4011
|
+
*/
|
|
4012
|
+
pagination?: Record<string, PaginationRuleResponseRead | boolean>;
|
|
4013
|
+
auth?: TargetAuthenticationConfigResponse;
|
|
4014
|
+
cli?: CliBehaviorResponse;
|
|
4015
|
+
mcp?: McpBehaviorResponseRead;
|
|
4016
|
+
readme?: ReadmeBehaviorResponse;
|
|
4017
|
+
package?: PackageBehaviorResponse;
|
|
4018
|
+
/**
|
|
4019
|
+
* 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 Definition's
|
|
4021
|
+
* externalDocs URL.
|
|
4022
|
+
* Format: uri
|
|
4023
|
+
*/
|
|
4024
|
+
docs_url?: string | null;
|
|
4025
|
+
/**
|
|
4026
|
+
* Exact llms.txt URL when the documentation site does not publish it at docs_url + /llms.txt.
|
|
4027
|
+
* Format: uri
|
|
4028
|
+
*/
|
|
4029
|
+
docs_index_url?: string | null;
|
|
4030
|
+
}
|
|
4031
|
+
/** What a GraphQL schema cannot say about itself. Ignored for OpenAPI specs. */
|
|
4032
|
+
export interface GraphqlSettingsResponse {
|
|
4033
|
+
/**
|
|
4034
|
+
* The URL every request is POSTed to; the generated client's default baseUrl. Defaults to the URL
|
|
4035
|
+
* the schema was fetched from. Without either, baseUrl is a required client option.
|
|
4036
|
+
* Format: uri
|
|
4037
|
+
*/
|
|
4038
|
+
endpoint?: string;
|
|
4039
|
+
/**
|
|
4040
|
+
* Named endpoints (sandbox, production). Each becomes a client environment; the first is the
|
|
4041
|
+
* default unless endpoint is set.
|
|
4042
|
+
*/
|
|
4043
|
+
environments?: Array<{
|
|
4044
|
+
name: string;
|
|
4045
|
+
/** Format: uri */
|
|
4046
|
+
url: string;
|
|
4047
|
+
}>;
|
|
4048
|
+
/**
|
|
4049
|
+
* How requests authenticate. bearer sends Authorization: Bearer; basic is for key-pair APIs
|
|
4050
|
+
* (public key as username, private key as password); api_key sends a header named by
|
|
4051
|
+
* api_key_header; none generates no auth option.
|
|
4052
|
+
* Default: "bearer"
|
|
4053
|
+
*/
|
|
4054
|
+
auth?: "bearer" | "basic" | "api_key" | "none";
|
|
4055
|
+
/**
|
|
4056
|
+
* Header carrying the key when auth is api_key. Required for that mode; Typeship does not invent
|
|
4057
|
+
* a vendor-specific header name.
|
|
4058
|
+
*/
|
|
4059
|
+
api_key_header?: string;
|
|
4060
|
+
/**
|
|
4061
|
+
* The API's name; drives the package and client names ("Acme" gives acme and AcmeClient).
|
|
4062
|
+
* Defaults to a name derived from the endpoint's host.
|
|
4063
|
+
*/
|
|
4064
|
+
title?: string;
|
|
4065
|
+
/**
|
|
4066
|
+
* JSON representation of each custom scalar, keyed by GraphQL scalar name. Unmapped scalars
|
|
4067
|
+
* generate as the language's untyped JSON value and produce a warning. Unmatched keys warn.
|
|
4068
|
+
*/
|
|
4069
|
+
scalars?: Record<string, "string" | "integer" | "number" | "boolean" | "json">;
|
|
4070
|
+
}
|
|
4071
|
+
/** Response shape for GraphqlSettingsResponse. */
|
|
4072
|
+
export interface GraphqlSettingsResponseRead {
|
|
4073
|
+
/**
|
|
4074
|
+
* The URL every request is POSTed to; the generated client's default baseUrl. Defaults to the URL
|
|
4075
|
+
* the schema was fetched from. Without either, baseUrl is a required client option.
|
|
4076
|
+
* Format: uri
|
|
4077
|
+
*/
|
|
4078
|
+
endpoint?: string;
|
|
4079
|
+
/**
|
|
4080
|
+
* Named endpoints (sandbox, production). Each becomes a client environment; the first is the
|
|
4081
|
+
* default unless endpoint is set.
|
|
4082
|
+
*/
|
|
4083
|
+
environments?: Array<{
|
|
4084
|
+
name: string;
|
|
4085
|
+
/** Format: uri */
|
|
4086
|
+
url: string;
|
|
4087
|
+
}>;
|
|
4088
|
+
/**
|
|
4089
|
+
* How requests authenticate. bearer sends Authorization: Bearer; basic is for key-pair APIs
|
|
4090
|
+
* (public key as username, private key as password); api_key sends a header named by
|
|
4091
|
+
* api_key_header; none generates no auth option.
|
|
4092
|
+
* Default: "bearer"
|
|
4093
|
+
*/
|
|
4094
|
+
auth?: ("bearer" | "basic" | "api_key" | "none") | (string & {});
|
|
4095
|
+
/**
|
|
4096
|
+
* Header carrying the key when auth is api_key. Required for that mode; Typeship does not invent
|
|
4097
|
+
* a vendor-specific header name.
|
|
4098
|
+
*/
|
|
4099
|
+
api_key_header?: string;
|
|
4100
|
+
/**
|
|
4101
|
+
* The API's name; drives the package and client names ("Acme" gives acme and AcmeClient).
|
|
4102
|
+
* Defaults to a name derived from the endpoint's host.
|
|
4103
|
+
*/
|
|
4104
|
+
title?: string;
|
|
4105
|
+
/**
|
|
4106
|
+
* JSON representation of each custom scalar, keyed by GraphQL scalar name. Unmapped scalars
|
|
4107
|
+
* generate as the language's untyped JSON value and produce a warning. Unmatched keys warn.
|
|
4108
|
+
*/
|
|
4109
|
+
scalars?: Record<string, ("string" | "integer" | "number" | "boolean" | "json") | (string & {})>;
|
|
4110
|
+
}
|
|
4111
|
+
/**
|
|
4112
|
+
* Retry behavior. Top-level fields adjust every operation; operations maps operationId or "METHOD
|
|
4113
|
+
* /path" keys to per-operation overrides.
|
|
4114
|
+
*/
|
|
4115
|
+
export interface RetryTuningResponse {
|
|
4116
|
+
max_retries?: number;
|
|
4117
|
+
/** Replaces the default retryable set (408, 429, 500, 502, 503, 504). */
|
|
4118
|
+
statuses?: number[];
|
|
4119
|
+
initial_delay_ms?: number;
|
|
4120
|
+
max_delay_ms?: number;
|
|
4121
|
+
/** Also retry non-idempotent methods (POST/PATCH). */
|
|
4122
|
+
retry_non_idempotent?: boolean;
|
|
4123
|
+
/** Shorthand for max_retries 0. */
|
|
4124
|
+
disabled?: boolean;
|
|
4125
|
+
operations?: Record<string, RetryTuningResponse>;
|
|
4126
|
+
}
|
|
4127
|
+
export interface PaginationRuleResponse {
|
|
4128
|
+
/** Default: "cursor" */
|
|
4129
|
+
style?: "cursor" | "cursorFromLastId" | "page" | "offset";
|
|
4130
|
+
/** Response field holding the item array. */
|
|
4131
|
+
items_field: string;
|
|
4132
|
+
cursor_param?: string;
|
|
4133
|
+
next_cursor_field?: string;
|
|
4134
|
+
has_more_field?: string;
|
|
4135
|
+
id_field?: string;
|
|
4136
|
+
page_param?: string;
|
|
4137
|
+
offset_param?: string;
|
|
4138
|
+
limit_param?: string;
|
|
4139
|
+
}
|
|
4140
|
+
/** Response shape for PaginationRuleResponse. */
|
|
4141
|
+
export interface PaginationRuleResponseRead {
|
|
4142
|
+
/** Default: "cursor" */
|
|
4143
|
+
style?: ("cursor" | "cursorFromLastId" | "page" | "offset") | (string & {});
|
|
4144
|
+
/** Response field holding the item array. */
|
|
4145
|
+
items_field: string;
|
|
4146
|
+
cursor_param?: string;
|
|
4147
|
+
next_cursor_field?: string;
|
|
4148
|
+
has_more_field?: string;
|
|
4149
|
+
id_field?: string;
|
|
4150
|
+
page_param?: string;
|
|
4151
|
+
offset_param?: string;
|
|
4152
|
+
limit_param?: string;
|
|
4153
|
+
}
|
|
4154
|
+
export interface ErrorModel {
|
|
4155
|
+
errors: ErrorDetail[];
|
|
4156
|
+
request_id: RequestId;
|
|
4157
|
+
}
|
|
4158
|
+
/** Response shape for ErrorModel. */
|
|
4159
|
+
export interface ErrorModelRead {
|
|
4160
|
+
errors: ErrorDetailRead[];
|
|
4161
|
+
request_id: RequestId;
|
|
4162
|
+
}
|
|
4163
|
+
/** Git file mode. 100755 is executable; 120000 is a symbolic link whose content is its target. */
|
|
4164
|
+
export declare const GitFileMode: {
|
|
4165
|
+
readonly V_100644: "100644";
|
|
4166
|
+
readonly V_100755: "100755";
|
|
4167
|
+
readonly V_120000: "120000";
|
|
4168
|
+
};
|
|
4169
|
+
export type GitFileMode = (typeof GitFileMode)[keyof typeof GitFileMode];
|
|
4170
|
+
/**
|
|
4171
|
+
* One side of a Draft file comparison. A conflict has base (the common version before both
|
|
4172
|
+
* changes), repository (the file on the Draft), and incoming (the file the merge brings in). A
|
|
4173
|
+
* default-branch history rewrite has accepted (the last accepted package), default (the rewritten
|
|
4174
|
+
* default branch), and draft (the current Draft branch).
|
|
4175
|
+
*/
|
|
4176
|
+
export declare const DraftFileSide: {
|
|
4177
|
+
readonly BASE: "base";
|
|
4178
|
+
readonly REPOSITORY: "repository";
|
|
4179
|
+
readonly INCOMING: "incoming";
|
|
4180
|
+
readonly ACCEPTED: "accepted";
|
|
4181
|
+
readonly DEFAULT: "default";
|
|
4182
|
+
readonly DRAFT: "draft";
|
|
4183
|
+
};
|
|
4184
|
+
export type DraftFileSide = (typeof DraftFileSide)[keyof typeof DraftFileSide];
|
|
4185
|
+
export interface DraftFileSideSummary {
|
|
4186
|
+
side: DraftFileSide;
|
|
4187
|
+
mode: GitFileMode;
|
|
4188
|
+
size_bytes: number;
|
|
4189
|
+
/** utf8 for text; base64 for binary content. */
|
|
4190
|
+
encoding: "utf8" | "base64";
|
|
4191
|
+
}
|
|
4192
|
+
/** Response shape for DraftFileSideSummary. */
|
|
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 & {});
|
|
4199
|
+
}
|
|
4200
|
+
export interface DraftFileConflict {
|
|
4201
|
+
/**
|
|
4202
|
+
* Why the merge stopped. no_common_version: there is no earlier version to compare, such as the
|
|
4203
|
+
* first Draft of an adopted package. file_ownership: generated output collides with a file you
|
|
4204
|
+
* added. repository_deleted_incoming_changed and incoming_deleted_repository_changed: one side
|
|
4205
|
+
* deleted a file the other changed. overlapping_text: both sides edited the same lines.
|
|
4206
|
+
* too_large_to_merge: the file has too many changed lines to merge line by line. binary_changed
|
|
4207
|
+
* and file_mode_changed: both sides changed binary content or the file mode.
|
|
4208
|
+
*/
|
|
4209
|
+
kind: "no_common_version" | "file_ownership" | "repository_deleted_incoming_changed" | "incoming_deleted_repository_changed" | "overlapping_text" | "too_large_to_merge" | "binary_changed" | "file_mode_changed";
|
|
4210
|
+
/**
|
|
4211
|
+
* Where the incoming version comes from: the new Generation, commits on the default branch, or
|
|
4212
|
+
* the code of a Draft whose branch was rebased, reset, or deleted (its old branch is preserved).
|
|
4213
|
+
* The merge applies previous_draft, then default_branch, then generation, and stops at the first
|
|
4214
|
+
* stage with conflicts, so applying one stage's decisions can report conflicts from the next.
|
|
4215
|
+
*/
|
|
4216
|
+
source: "generation" | "default_branch" | "previous_draft";
|
|
4217
|
+
/**
|
|
4218
|
+
* Decision saved for this conflict on head_revision; null when none. Saved decisions apply when
|
|
4219
|
+
* the Target is generated.
|
|
4220
|
+
*/
|
|
4221
|
+
decision: "repository" | "incoming" | "content" | null;
|
|
4222
|
+
}
|
|
4223
|
+
/** Response shape for DraftFileConflict. */
|
|
4224
|
+
export interface DraftFileConflictRead {
|
|
4225
|
+
/**
|
|
4226
|
+
* Why the merge stopped. no_common_version: there is no earlier version to compare, such as the
|
|
4227
|
+
* first Draft of an adopted package. file_ownership: generated output collides with a file you
|
|
4228
|
+
* added. repository_deleted_incoming_changed and incoming_deleted_repository_changed: one side
|
|
4229
|
+
* deleted a file the other changed. overlapping_text: both sides edited the same lines.
|
|
4230
|
+
* too_large_to_merge: the file has too many changed lines to merge line by line. binary_changed
|
|
4231
|
+
* and file_mode_changed: both sides changed binary content or the file mode.
|
|
4232
|
+
*/
|
|
4233
|
+
kind: ("no_common_version" | "file_ownership" | "repository_deleted_incoming_changed" | "incoming_deleted_repository_changed" | "overlapping_text" | "too_large_to_merge" | "binary_changed" | "file_mode_changed") | (string & {});
|
|
4234
|
+
/**
|
|
4235
|
+
* Where the incoming version comes from: the new Generation, commits on the default branch, or
|
|
4236
|
+
* the code of a Draft whose branch was rebased, reset, or deleted (its old branch is preserved).
|
|
4237
|
+
* The merge applies previous_draft, then default_branch, then generation, and stops at the first
|
|
4238
|
+
* stage with conflicts, so applying one stage's decisions can report conflicts from the next.
|
|
4239
|
+
*/
|
|
4240
|
+
source: ("generation" | "default_branch" | "previous_draft") | (string & {});
|
|
4241
|
+
/**
|
|
4242
|
+
* Decision saved for this conflict on head_revision; null when none. Saved decisions apply when
|
|
4243
|
+
* the Target is generated.
|
|
4244
|
+
*/
|
|
4245
|
+
decision: ("repository" | "incoming" | "content" | null) | (string & {}) | null;
|
|
4246
|
+
}
|
|
4247
|
+
export interface DraftFileHistory {
|
|
4248
|
+
/**
|
|
4249
|
+
* How the rewritten default branch differs from the last accepted package; null when only the
|
|
4250
|
+
* Draft differs.
|
|
4251
|
+
*/
|
|
4252
|
+
change: "added" | "edited" | "deleted" | "mode_changed" | null;
|
|
4253
|
+
/**
|
|
4254
|
+
* The Draft branch has a different version than the rewritten default branch. Recovery carries
|
|
4255
|
+
* the Draft version forward.
|
|
4256
|
+
*/
|
|
4257
|
+
draft_differs: boolean;
|
|
4258
|
+
}
|
|
4259
|
+
/** Response shape for DraftFileHistory. */
|
|
4260
|
+
export interface DraftFileHistoryRead {
|
|
4261
|
+
/**
|
|
4262
|
+
* How the rewritten default branch differs from the last accepted package; null when only the
|
|
4263
|
+
* Draft differs.
|
|
4264
|
+
*/
|
|
4265
|
+
change: ("added" | "edited" | "deleted" | "mode_changed" | null) | (string & {}) | null;
|
|
4266
|
+
/**
|
|
4267
|
+
* The Draft branch has a different version than the rewritten default branch. Recovery carries
|
|
4268
|
+
* the Draft version forward.
|
|
4269
|
+
*/
|
|
4270
|
+
draft_differs: boolean;
|
|
4271
|
+
}
|
|
4272
|
+
export interface DraftFile {
|
|
4273
|
+
object: "draft_file";
|
|
4274
|
+
/** Path relative to the Target's package directory. */
|
|
4275
|
+
path: string;
|
|
4276
|
+
/** How the Draft differs from the last accepted package at this path; null when it does not. */
|
|
4277
|
+
customization: "added" | "edited" | "deleted" | "mode_changed" | null;
|
|
4278
|
+
conflict: DraftFileConflict | null;
|
|
4279
|
+
history: DraftFileHistory | null;
|
|
4280
|
+
/**
|
|
4281
|
+
* Sides of the comparison to read with retrieveDraftFileContent. A missing side means the file is
|
|
4282
|
+
* absent there. Listed for conflicts and history files.
|
|
4283
|
+
*/
|
|
4284
|
+
sides: DraftFileSideSummary[];
|
|
4285
|
+
}
|
|
4286
|
+
/** Response shape for DraftFile. */
|
|
4287
|
+
export interface DraftFileRead {
|
|
4288
|
+
object: "draft_file" | (string & {});
|
|
4289
|
+
/** Path relative to the Target's package directory. */
|
|
4290
|
+
path: string;
|
|
4291
|
+
/** How the Draft differs from the last accepted package at this path; null when it does not. */
|
|
4292
|
+
customization: ("added" | "edited" | "deleted" | "mode_changed" | null) | (string & {}) | null;
|
|
4293
|
+
conflict: DraftFileConflictRead | null;
|
|
4294
|
+
history: DraftFileHistoryRead | null;
|
|
4295
|
+
/**
|
|
4296
|
+
* Sides of the comparison to read with retrieveDraftFileContent. A missing side means the file is
|
|
4297
|
+
* absent there. Listed for conflicts and history files.
|
|
4298
|
+
*/
|
|
4299
|
+
sides: DraftFileSideSummaryRead[];
|
|
4300
|
+
}
|
|
4301
|
+
export interface DraftFileList {
|
|
4302
|
+
object: ListObject;
|
|
4303
|
+
data: DraftFile[];
|
|
4304
|
+
has_more: boolean;
|
|
4305
|
+
next_cursor: string | null;
|
|
4306
|
+
request_id: RequestId;
|
|
4307
|
+
}
|
|
4308
|
+
/** Response shape for DraftFileList. */
|
|
4309
|
+
export interface DraftFileListRead {
|
|
4310
|
+
object: ListObject;
|
|
4311
|
+
data: DraftFileRead[];
|
|
4312
|
+
has_more: boolean;
|
|
4313
|
+
next_cursor: string | null;
|
|
4314
|
+
request_id: RequestId;
|
|
4315
|
+
}
|
|
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
|
+
export type DraftConflictDecision = {
|
|
4367
|
+
path: string;
|
|
4368
|
+
/** Keep that version of the file exactly. Keeping an absent version deletes the path. */
|
|
4369
|
+
keep: "repository" | "incoming";
|
|
4370
|
+
} | {
|
|
4371
|
+
path: string;
|
|
4372
|
+
keep: "content";
|
|
4373
|
+
/** Final file text, stored as UTF-8. An empty string creates an empty file. */
|
|
4374
|
+
content: string;
|
|
4375
|
+
mode: GitFileMode;
|
|
4376
|
+
} | {
|
|
4377
|
+
path: string;
|
|
4378
|
+
keep: "content";
|
|
4379
|
+
/** Final file bytes as canonical base64, for binary files. */
|
|
4380
|
+
content_base64: string;
|
|
4381
|
+
mode: GitFileMode;
|
|
4382
|
+
} | {
|
|
4383
|
+
path: string;
|
|
4384
|
+
keep: "content";
|
|
4385
|
+
/** Delete this file. */
|
|
4386
|
+
content: null;
|
|
4387
|
+
};
|
|
4388
|
+
/** Response shape for DraftConflictDecision. */
|
|
4389
|
+
export type DraftConflictDecisionRead = {
|
|
4390
|
+
path: string;
|
|
4391
|
+
/** Keep that version of the file exactly. Keeping an absent version deletes the path. */
|
|
4392
|
+
keep: ("repository" | "incoming") | (string & {});
|
|
4393
|
+
} | {
|
|
4394
|
+
path: string;
|
|
4395
|
+
keep: "content" | (string & {});
|
|
4396
|
+
/** Final file text, stored as UTF-8. An empty string creates an empty file. */
|
|
4397
|
+
content: string;
|
|
4398
|
+
mode: GitFileMode | (string & {});
|
|
4399
|
+
} | {
|
|
4400
|
+
path: string;
|
|
4401
|
+
keep: "content" | (string & {});
|
|
4402
|
+
/** Final file bytes as canonical base64, for binary files. */
|
|
4403
|
+
content_base64: string;
|
|
4404
|
+
mode: GitFileMode | (string & {});
|
|
4405
|
+
} | {
|
|
4406
|
+
path: string;
|
|
4407
|
+
keep: "content" | (string & {});
|
|
4408
|
+
/** Delete this file. */
|
|
4409
|
+
content: null;
|
|
4410
|
+
};
|
|
4411
|
+
export interface ResolveDraftConflicts {
|
|
4412
|
+
/** The Draft's head_revision. A newer Draft commit returns 409 stale_draft without saving. */
|
|
4413
|
+
expected_head_revision: string;
|
|
4414
|
+
/**
|
|
4415
|
+
* Unique current conflict paths. Final file content must total at most 2 MiB. Decisions save
|
|
4416
|
+
* together or not at all.
|
|
4417
|
+
*/
|
|
4418
|
+
resolutions: DraftConflictDecision[];
|
|
4419
|
+
/**
|
|
4420
|
+
* Validate the decisions and return the planned files without saving.
|
|
4421
|
+
* Default: false
|
|
4422
|
+
*/
|
|
4423
|
+
dry_run?: boolean;
|
|
4424
|
+
}
|
|
4425
|
+
/** Response shape for ResolveDraftConflicts. */
|
|
4426
|
+
export interface ResolveDraftConflictsRead {
|
|
4427
|
+
/** The Draft's head_revision. A newer Draft commit returns 409 stale_draft without saving. */
|
|
4428
|
+
expected_head_revision: string;
|
|
4429
|
+
/**
|
|
4430
|
+
* Unique current conflict paths. Final file content must total at most 2 MiB. Decisions save
|
|
4431
|
+
* together or not at all.
|
|
4432
|
+
*/
|
|
4433
|
+
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
|
+
}
|
|
4534
|
+
export type DraftCustomizationDiscardResponse = DraftCustomizationDiscard & ResponseMetadata;
|
|
4535
|
+
/** Response shape for DraftCustomizationDiscardResponse. */
|
|
4536
|
+
export type DraftCustomizationDiscardResponseRead = DraftCustomizationDiscardRead & ResponseMetadata;
|
|
4537
|
+
export interface GenerateProjectRequest {
|
|
4538
|
+
/** Generate only this active Target. Omit to generate all active Targets in the Project. */
|
|
4539
|
+
target_id?: TargetId;
|
|
4540
|
+
}
|
|
4541
|
+
/** The stage that failed. A delivery failure does not change a Generation's succeeded status. */
|
|
4542
|
+
export declare const FailurePhase: {
|
|
4543
|
+
readonly DEFINITION: "definition";
|
|
4544
|
+
readonly GENERATION: "generation";
|
|
4545
|
+
readonly DELIVERY: "delivery";
|
|
4546
|
+
readonly PUBLICATION: "publication";
|
|
4547
|
+
};
|
|
4548
|
+
export type FailurePhase = (typeof FailurePhase)[keyof typeof FailurePhase];
|
|
4549
|
+
export type DomainError = ErrorDetail & {
|
|
4550
|
+
phase: FailurePhase;
|
|
4551
|
+
};
|
|
4552
|
+
/** Response shape for DomainError. */
|
|
4553
|
+
export type DomainErrorRead = ErrorDetailRead & {
|
|
4554
|
+
phase: FailurePhase | (string & {});
|
|
4555
|
+
};
|
|
4556
|
+
export interface RecoverDraftHistory {
|
|
4557
|
+
/** The Draft's history_recovery.default_revision. */
|
|
4558
|
+
expected_default_revision: string;
|
|
4559
|
+
/** The Draft's history_recovery.head_revision; null when the Draft branch is absent. */
|
|
4560
|
+
expected_head_revision: string | null;
|
|
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;
|
|
2563
4588
|
}
|
|
4589
|
+
export type DraftHistoryRecoveryResponse = DraftHistoryRecovery & ResponseMetadata;
|
|
4590
|
+
/** Response shape for DraftHistoryRecoveryResponse. */
|
|
4591
|
+
export type DraftHistoryRecoveryResponseRead = DraftHistoryRecoveryRead & ResponseMetadata;
|
|
2564
4592
|
//# sourceMappingURL=types.d.ts.map
|