@typeship-ax/cli 0.10.0 → 0.21.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +10 -5
- package/README.md +5 -5
- package/api.json +9773 -4501
- package/api.md +501 -271
- package/dist/api-identity.d.ts.map +1 -1
- package/dist/api-identity.js +6 -1
- package/dist/cli-agent.d.ts +5 -5
- package/dist/cli-agent.d.ts.map +1 -1
- package/dist/cli-agent.js +14 -10
- package/dist/cli.js +158 -82
- package/dist/core/http.d.ts +29 -16
- package/dist/core/http.d.ts.map +1 -1
- package/dist/core/http.js +108 -25
- package/dist/core/pagination.d.ts +8 -8
- package/dist/core/pagination.d.ts.map +1 -1
- package/dist/core/pagination.js +7 -16
- package/dist/errors.d.ts +20 -13
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +29 -20
- package/dist/index.d.ts +37 -19
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +42 -18
- package/dist/ops.d.ts +5 -1
- package/dist/ops.d.ts.map +1 -1
- package/dist/ops.js +42 -35
- package/dist/polling-login.d.ts.map +1 -1
- package/dist/polling-login.js +11 -1
- package/dist/resources/api-keys.d.ts +44 -18
- package/dist/resources/api-keys.d.ts.map +1 -1
- package/dist/resources/api-keys.js +46 -14
- package/dist/resources/deliveries.d.ts +46 -0
- package/dist/resources/deliveries.d.ts.map +1 -0
- package/dist/resources/deliveries.js +70 -0
- package/dist/resources/drafts.d.ts +155 -0
- package/dist/resources/drafts.d.ts.map +1 -0
- package/dist/resources/drafts.js +230 -0
- package/dist/resources/files.d.ts +23 -0
- package/dist/resources/files.d.ts.map +1 -0
- package/dist/resources/files.js +38 -0
- package/dist/resources/generate.d.ts +49 -20
- package/dist/resources/generate.d.ts.map +1 -1
- package/dist/resources/generate.js +56 -14
- package/dist/resources/generations.d.ts +70 -18
- package/dist/resources/generations.d.ts.map +1 -1
- package/dist/resources/generations.js +84 -16
- package/dist/resources/organization.d.ts +18 -0
- package/dist/resources/organization.d.ts.map +1 -0
- package/dist/resources/organization.js +32 -0
- package/dist/resources/projects.d.ts +87 -124
- package/dist/resources/projects.d.ts.map +1 -1
- package/dist/resources/projects.js +70 -173
- package/dist/resources/publications.d.ts +46 -0
- package/dist/resources/publications.d.ts.map +1 -0
- package/dist/resources/publications.js +70 -0
- package/dist/resources/releases.d.ts +66 -0
- package/dist/resources/releases.d.ts.map +1 -0
- package/dist/resources/releases.js +101 -0
- package/dist/resources/spec-revisions.d.ts +85 -0
- package/dist/resources/spec-revisions.d.ts.map +1 -0
- package/dist/resources/spec-revisions.js +116 -0
- package/dist/resources/specs.d.ts +72 -0
- package/dist/resources/specs.d.ts.map +1 -0
- package/dist/resources/specs.js +107 -0
- package/dist/resources/targets.d.ts +85 -105
- package/dist/resources/targets.d.ts.map +1 -1
- package/dist/resources/targets.js +70 -163
- package/dist/schemas.d.ts +1 -0
- package/dist/schemas.d.ts.map +1 -1
- package/dist/schemas.js +194 -139
- package/dist/types.d.ts +2626 -1141
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +90 -11
- package/package.json +3 -3
- package/src/api-identity.ts +6 -2
- package/src/cli-agent.ts +17 -13
- package/src/cli.ts +145 -77
- package/src/core/http.ts +106 -30
- package/src/core/pagination.ts +13 -23
- package/src/errors.ts +30 -20
- package/src/index.ts +46 -24
- package/src/ops.ts +47 -36
- package/src/polling-login.ts +10 -1
- package/src/resources/api-keys.ts +87 -19
- package/src/resources/deliveries.ts +139 -0
- package/src/resources/drafts.ts +422 -0
- package/src/resources/files.ts +68 -0
- package/src/resources/generate.ts +81 -19
- package/src/resources/generations.ts +167 -29
- package/src/resources/organization.ts +53 -0
- package/src/resources/projects.ts +129 -322
- package/src/resources/publications.ts +139 -0
- package/src/resources/releases.ts +199 -0
- package/src/resources/spec-revisions.ts +237 -0
- package/src/resources/specs.ts +200 -0
- package/src/resources/targets.ts +135 -304
- package/src/schemas.ts +195 -140
- package/src/types.ts +2793 -1177
- package/dist/resources/account.d.ts +0 -18
- package/dist/resources/account.d.ts.map +0 -1
- package/dist/resources/account.js +0 -27
- package/dist/resources/definition-revisions.d.ts +0 -58
- package/dist/resources/definition-revisions.d.ts.map +0 -1
- package/dist/resources/definition-revisions.js +0 -114
- package/dist/resources/definitions.d.ts +0 -35
- package/dist/resources/definitions.d.ts.map +0 -1
- package/dist/resources/definitions.js +0 -60
- package/src/resources/account.ts +0 -46
- package/src/resources/definition-revisions.ts +0 -207
- package/src/resources/definitions.ts +0 -122
package/src/types.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// typeship — API types.
|
|
2
|
-
// Generated by typeship — https://typeship.dev
|
|
2
|
+
// Generated by typeship — https://typeship.dev
|
|
3
3
|
|
|
4
4
|
/** Unique identifier for a project. */
|
|
5
5
|
export type ProjectId = string;
|
|
@@ -7,14 +7,11 @@ export type ProjectId = string;
|
|
|
7
7
|
/** Unique identifier for a generation. */
|
|
8
8
|
export type GenerationId = string;
|
|
9
9
|
|
|
10
|
-
/** Unique identifier for a project's logical API
|
|
11
|
-
export type
|
|
10
|
+
/** Unique identifier for a project's logical API Spec. */
|
|
11
|
+
export type SpecId = string;
|
|
12
12
|
|
|
13
|
-
/** Unique identifier for
|
|
14
|
-
export type
|
|
15
|
-
|
|
16
|
-
/** Unique identifier for an immutable resolved Definition Revision. */
|
|
17
|
-
export type DefinitionRevisionId = string;
|
|
13
|
+
/** Unique identifier for an immutable resolved Spec Revision. */
|
|
14
|
+
export type SpecRevisionId = string;
|
|
18
15
|
|
|
19
16
|
/** Server-generated identifier used to correlate this response with Typeship logs. */
|
|
20
17
|
export type RequestId = string;
|
|
@@ -32,24 +29,29 @@ export type TargetId = string;
|
|
|
32
29
|
|
|
33
30
|
export type DeliveryId = string;
|
|
34
31
|
|
|
35
|
-
|
|
32
|
+
/** Unique identifier for a Draft. */
|
|
33
|
+
export type DraftId = string;
|
|
34
|
+
|
|
35
|
+
export type ReleaseId = string;
|
|
36
36
|
|
|
37
37
|
export type PublicationId = string;
|
|
38
38
|
|
|
39
39
|
/**
|
|
40
40
|
* Generator implementation selected by a Target. This is configuration, not identity; several
|
|
41
|
-
* Targets may use the same generator.
|
|
41
|
+
* Targets may use the same generator. cli is the TypeScript CLI; go_cli is the native Go CLI, a
|
|
42
|
+
* distinct product that imports one exact paired Go SDK module rather than a client of its own.
|
|
42
43
|
*/
|
|
43
44
|
export const GeneratorKind = {
|
|
44
|
-
TYPESCRIPT_SDK: "typescript-sdk",
|
|
45
|
-
PYTHON_SDK: "python-sdk",
|
|
46
|
-
GO_SDK: "go-sdk",
|
|
47
45
|
CLI: "cli",
|
|
46
|
+
GO_CLI: "go_cli",
|
|
48
47
|
MCP: "mcp",
|
|
48
|
+
TYPESCRIPT_SDK: "typescript_sdk",
|
|
49
|
+
PYTHON_SDK: "python_sdk",
|
|
50
|
+
GO_SDK: "go_sdk",
|
|
49
51
|
} as const;
|
|
50
52
|
export type GeneratorKind = (typeof GeneratorKind)[keyof typeof GeneratorKind];
|
|
51
53
|
|
|
52
|
-
export interface
|
|
54
|
+
export interface UrlSpecInput {
|
|
53
55
|
/**
|
|
54
56
|
* URL of an OpenAPI document, a GraphQL SDL file, or a GraphQL
|
|
55
57
|
* endpoint (introspected automatically). Fetched server-side.
|
|
@@ -58,13 +60,13 @@ export interface UrlDefinitionInput {
|
|
|
58
60
|
url: string;
|
|
59
61
|
/**
|
|
60
62
|
* Request headers for a protected URL. Sent on the document GET and GraphQL introspection POST,
|
|
61
|
-
* never returned or retained by
|
|
63
|
+
* never returned or retained by one-shot generation.
|
|
62
64
|
*/
|
|
63
65
|
headers?: Record<string, string>;
|
|
64
66
|
}
|
|
65
67
|
|
|
66
|
-
/** Response shape for
|
|
67
|
-
export interface
|
|
68
|
+
/** Response shape for UrlSpecInput. */
|
|
69
|
+
export interface UrlSpecInputRead {
|
|
68
70
|
/**
|
|
69
71
|
* URL of an OpenAPI document, a GraphQL SDL file, or a GraphQL
|
|
70
72
|
* endpoint (introspected automatically). Fetched server-side.
|
|
@@ -73,22 +75,51 @@ export interface UrlDefinitionInputRead {
|
|
|
73
75
|
url: string;
|
|
74
76
|
}
|
|
75
77
|
|
|
76
|
-
export interface
|
|
77
|
-
/** Raw
|
|
78
|
+
export interface InlineSpecInput {
|
|
79
|
+
/** Raw Spec text (OpenAPI JSON/YAML or GraphQL SDL). Up to 10MB. */
|
|
78
80
|
inline: string;
|
|
79
81
|
}
|
|
80
82
|
|
|
81
|
-
/** A
|
|
82
|
-
export type
|
|
83
|
+
/** A Spec for one-shot generation, provided as exactly one URL or inline entrypoint. */
|
|
84
|
+
export type SpecInput = UrlSpecInput | InlineSpecInput;
|
|
83
85
|
|
|
84
|
-
/** Response shape for
|
|
85
|
-
export type
|
|
86
|
+
/** Response shape for SpecInput. */
|
|
87
|
+
export type SpecInputRead = UrlSpecInputRead | InlineSpecInput;
|
|
88
|
+
|
|
89
|
+
/**
|
|
90
|
+
* The exact paired Go SDK a go_cli generation is built on. Required when target.type is go_cli and
|
|
91
|
+
* rejected otherwise. The descriptor is closed and immutable, because a CLI that pins a range or a
|
|
92
|
+
* branch pins nothing.
|
|
93
|
+
*/
|
|
94
|
+
export interface GoSdkDescriptor {
|
|
95
|
+
/**
|
|
96
|
+
* Go module path of the SDK the CLI imports, for example github.com/acme/payments-go. Must be a
|
|
97
|
+
* valid Go module path.
|
|
98
|
+
*/
|
|
99
|
+
module_path: string;
|
|
100
|
+
/**
|
|
101
|
+
* Exact SDK module version the CLI requires: v-prefixed SemVer such as v1.2.3, or an immutable Go
|
|
102
|
+
* pseudo-version naming a commit such as v0.0.0-20240824120000-abcdef123456. Ranges, branches,
|
|
103
|
+
* and "latest" are rejected.
|
|
104
|
+
*/
|
|
105
|
+
version: string;
|
|
106
|
+
/**
|
|
107
|
+
* SHA-256 hex digest of the Spec the SDK was generated from. Must match the resolved Spec, or the
|
|
108
|
+
* request fails with spec_error.
|
|
109
|
+
*/
|
|
110
|
+
spec_digest: string;
|
|
111
|
+
/**
|
|
112
|
+
* Go package identifier of the SDK, when the module path's last element does not imply it.
|
|
113
|
+
* Optional.
|
|
114
|
+
*/
|
|
115
|
+
package_name?: string;
|
|
116
|
+
}
|
|
86
117
|
|
|
87
118
|
export interface GenerateRequest {
|
|
88
|
-
|
|
89
|
-
/**
|
|
119
|
+
spec: SpecInput;
|
|
120
|
+
/** One-shot generator descriptor; no persisted Target is created. */
|
|
90
121
|
target: {
|
|
91
|
-
|
|
122
|
+
type: GeneratorKind;
|
|
92
123
|
};
|
|
93
124
|
/**
|
|
94
125
|
* npm package or Python distribution override. Valid only for the TypeScript and Python SDK
|
|
@@ -96,19 +127,20 @@ export interface GenerateRequest {
|
|
|
96
127
|
*/
|
|
97
128
|
package_name?: string;
|
|
98
129
|
/**
|
|
99
|
-
* Go module path override
|
|
100
|
-
* destination repository by default.
|
|
130
|
+
* Go module path override for the generated artifact's own module. Valid only for the Go SDK and
|
|
131
|
+
* Go CLI Targets. Projects derive this from the Go destination repository by default.
|
|
101
132
|
*/
|
|
102
133
|
module_path?: string;
|
|
134
|
+
go_sdk?: GoSdkDescriptor;
|
|
103
135
|
config?: Config;
|
|
104
136
|
}
|
|
105
137
|
|
|
106
138
|
/** Response shape for GenerateRequest. */
|
|
107
139
|
export interface GenerateRequestRead {
|
|
108
|
-
|
|
109
|
-
/**
|
|
140
|
+
spec: SpecInputRead;
|
|
141
|
+
/** One-shot generator descriptor; no persisted Target is created. */
|
|
110
142
|
target: {
|
|
111
|
-
|
|
143
|
+
type: GeneratorKind | (string & {});
|
|
112
144
|
};
|
|
113
145
|
/**
|
|
114
146
|
* npm package or Python distribution override. Valid only for the TypeScript and Python SDK
|
|
@@ -116,10 +148,11 @@ export interface GenerateRequestRead {
|
|
|
116
148
|
*/
|
|
117
149
|
package_name?: string;
|
|
118
150
|
/**
|
|
119
|
-
* Go module path override
|
|
120
|
-
* destination repository by default.
|
|
151
|
+
* Go module path override for the generated artifact's own module. Valid only for the Go SDK and
|
|
152
|
+
* Go CLI Targets. Projects derive this from the Go destination repository by default.
|
|
121
153
|
*/
|
|
122
154
|
module_path?: string;
|
|
155
|
+
go_sdk?: GoSdkDescriptor;
|
|
123
156
|
config?: ConfigRead;
|
|
124
157
|
}
|
|
125
158
|
|
|
@@ -127,188 +160,206 @@ export interface GeneratedFile {
|
|
|
127
160
|
/** Repo-relative path inside the generated package. */
|
|
128
161
|
path: string;
|
|
129
162
|
content: string;
|
|
163
|
+
/**
|
|
164
|
+
* Exact Git file mode. Omitted one-shot outputs are regular files.
|
|
165
|
+
* Default: "100644"
|
|
166
|
+
*/
|
|
167
|
+
mode?: "100644" | "100755";
|
|
130
168
|
}
|
|
131
169
|
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
/**
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
converted?: boolean;
|
|
143
|
-
/** Ecosystem-neutral identity of the generated artifact. */
|
|
144
|
-
artifact_name: string;
|
|
145
|
-
client_name: string;
|
|
146
|
-
/**
|
|
147
|
-
* Generator implementations present in this artifact. Persisted Target identity is reported on
|
|
148
|
-
* Generation.
|
|
149
|
-
*/
|
|
150
|
-
generators: GeneratorKind[];
|
|
151
|
-
resource_count?: number;
|
|
152
|
-
operation_count?: number;
|
|
153
|
-
schema_count?: number;
|
|
154
|
-
paginated_operation_count?: number;
|
|
155
|
-
/** Operations beyond the plan's endpoint allowance, not generated. */
|
|
156
|
-
omitted_operation_count?: number;
|
|
157
|
-
/** METHOD/path identities of operations omitted by the generation cap. */
|
|
158
|
-
omitted_operations?: string[];
|
|
159
|
-
/** Pull request opened by this regeneration, when one was. */
|
|
160
|
-
pr_url?: string | null;
|
|
161
|
-
pr_number?: number | null;
|
|
162
|
-
/**
|
|
163
|
-
* Whether a destination pull request opened, was unnecessary because the generated tree already
|
|
164
|
-
* matched, or could not be opened.
|
|
165
|
-
*/
|
|
166
|
-
pr_status?: "opened" | "no_changes" | "blocked";
|
|
167
|
-
/**
|
|
168
|
-
* Why the configured destination pull request was not opened. Generation itself still succeeded;
|
|
169
|
-
* fix this action and regenerate.
|
|
170
|
-
*/
|
|
171
|
-
pr_error?: string;
|
|
172
|
-
/**
|
|
173
|
-
* Markdown changelog entry for this regeneration, from the API surface diff. Absent on a first
|
|
174
|
-
* generation or when nothing changed.
|
|
175
|
-
*/
|
|
176
|
-
changelog?: string;
|
|
177
|
-
/**
|
|
178
|
-
* Breaking changes in the diff; removed methods and fields, changed types, inputs that became
|
|
179
|
-
* required.
|
|
180
|
-
*/
|
|
181
|
-
breaking_count?: number;
|
|
182
|
-
/**
|
|
183
|
-
* What the diff was measured against; "destination" means the .typeship/surface.json merged in
|
|
184
|
-
* the destination repository.
|
|
185
|
-
*/
|
|
186
|
-
baseline?: "destination" | "none";
|
|
187
|
-
/** Objective compatibility of the generated API surface against the merged destination baseline. */
|
|
188
|
-
api_compatibility?: "compatible" | "breaking" | "unknown";
|
|
189
|
-
/**
|
|
190
|
-
* Objective compatibility of public package entry points and selected targets against the merged
|
|
191
|
-
* destination baseline.
|
|
192
|
-
*/
|
|
193
|
-
package_compatibility?: "compatible" | "breaking" | "unknown";
|
|
194
|
-
/**
|
|
195
|
-
* Whether the generated package version satisfies the cumulative change. Null when there is no
|
|
196
|
-
* prior version or analysis is unavailable.
|
|
197
|
-
*/
|
|
198
|
-
version_correct?: boolean | null;
|
|
199
|
-
/**
|
|
200
|
-
* The destination pull request's combined readiness decision for the exact bot-generated head.
|
|
201
|
-
* Compatibility and version correctness remain separate fields above.
|
|
202
|
-
*/
|
|
203
|
-
release_readiness?: "success" | "failure" | "error";
|
|
204
|
-
/** The release-readiness decision in one line, as the commit status describes it. */
|
|
205
|
-
release_readiness_note?: string;
|
|
206
|
-
/** The package version the destination had before this regeneration. */
|
|
207
|
-
previous_version?: string;
|
|
208
|
-
file_count?: number;
|
|
209
|
-
total_lines?: number;
|
|
210
|
-
/** Deterministic Diagnostic summary for the exact Definition Revision consumed. */
|
|
211
|
-
diagnostics?: {
|
|
212
|
-
format: "openapi" | "graphql";
|
|
213
|
-
summary: DiagnosticSummary;
|
|
214
|
-
};
|
|
170
|
+
/** Response shape for GeneratedFile. */
|
|
171
|
+
export interface GeneratedFileRead {
|
|
172
|
+
/** Repo-relative path inside the generated package. */
|
|
173
|
+
path: string;
|
|
174
|
+
content: string;
|
|
175
|
+
/**
|
|
176
|
+
* Exact Git file mode. Omitted one-shot outputs are regular files.
|
|
177
|
+
* Default: "100644"
|
|
178
|
+
*/
|
|
179
|
+
mode?: ("100644" | "100755") | (string & {});
|
|
215
180
|
}
|
|
216
181
|
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
/**
|
|
221
|
-
|
|
222
|
-
/**
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
/**
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
/**
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
/**
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
*
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
182
|
+
export interface GenerationWarning {
|
|
183
|
+
/** Stable machine-readable warning code. */
|
|
184
|
+
code: string;
|
|
185
|
+
/** Human-readable explanation. */
|
|
186
|
+
message: string;
|
|
187
|
+
/** METHOD/path of the affected operation, when applicable. */
|
|
188
|
+
operation?: string;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
export interface GenerationCoverage {
|
|
192
|
+
generated: number;
|
|
193
|
+
omitted: number;
|
|
194
|
+
total: number;
|
|
195
|
+
/** METHOD/path identities of operations omitted from the package. */
|
|
196
|
+
omitted_operations: string[];
|
|
197
|
+
/** Present when a plan or anonymous limit omitted operations. */
|
|
198
|
+
reason?: "anonymous" | "free_plan";
|
|
199
|
+
/**
|
|
200
|
+
* Sign-up link for anonymous capped runs.
|
|
201
|
+
* Format: uri
|
|
202
|
+
*/
|
|
203
|
+
signup_url?: string;
|
|
204
|
+
/**
|
|
205
|
+
* Upgrade link for capped signed-in runs.
|
|
206
|
+
* Format: uri
|
|
207
|
+
*/
|
|
208
|
+
upgrade_url?: string;
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
/** Response shape for GenerationCoverage. */
|
|
212
|
+
export interface GenerationCoverageRead {
|
|
213
|
+
generated: number;
|
|
214
|
+
omitted: number;
|
|
215
|
+
total: number;
|
|
216
|
+
/** METHOD/path identities of operations omitted from the package. */
|
|
217
|
+
omitted_operations: string[];
|
|
218
|
+
/** Present when a plan or anonymous limit omitted operations. */
|
|
219
|
+
reason?: ("anonymous" | "free_plan") | (string & {});
|
|
220
|
+
/**
|
|
221
|
+
* Sign-up link for anonymous capped runs.
|
|
222
|
+
* Format: uri
|
|
223
|
+
*/
|
|
224
|
+
signup_url?: string;
|
|
225
|
+
/**
|
|
226
|
+
* Upgrade link for capped signed-in runs.
|
|
227
|
+
* Format: uri
|
|
228
|
+
*/
|
|
229
|
+
upgrade_url?: string;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
/**
|
|
233
|
+
* Unique identifier for one immutable file snapshot. An ID always returns the same bytes: a Spec
|
|
234
|
+
* Revision, a Generation, and each Draft side name their own file IDs, and a new Draft commit gets
|
|
235
|
+
* new IDs.
|
|
236
|
+
*/
|
|
237
|
+
export type FileId = string;
|
|
238
|
+
|
|
239
|
+
export interface FileModel {
|
|
240
|
+
id: FileId;
|
|
241
|
+
object: "file";
|
|
242
|
+
/** Path within the Spec Revision, Generation package, or Target package. */
|
|
243
|
+
path: string;
|
|
244
|
+
size_bytes: number;
|
|
245
|
+
/** Digest of the complete file. */
|
|
246
|
+
sha256: string;
|
|
247
|
+
/** utf8: content is text. base64: content is base64-encoded binary bytes. */
|
|
248
|
+
encoding: "utf8" | "base64";
|
|
249
|
+
/** Git file mode for package files; null for Spec source files. */
|
|
250
|
+
mode: GitFileMode | null;
|
|
251
|
+
/**
|
|
252
|
+
* When Typeship first issued this file ID.
|
|
253
|
+
* Format: date-time
|
|
254
|
+
*/
|
|
255
|
+
created_at: string;
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
/** Response shape for FileModel. */
|
|
259
|
+
export interface FileModelRead {
|
|
260
|
+
id: FileId;
|
|
261
|
+
object: "file" | (string & {});
|
|
262
|
+
/** Path within the Spec Revision, Generation package, or Target package. */
|
|
263
|
+
path: string;
|
|
264
|
+
size_bytes: number;
|
|
265
|
+
/** Digest of the complete file. */
|
|
266
|
+
sha256: string;
|
|
267
|
+
/** utf8: content is text. base64: content is base64-encoded binary bytes. */
|
|
268
|
+
encoding: ("utf8" | "base64") | (string & {});
|
|
269
|
+
/** Git file mode for package files; null for Spec source files. */
|
|
270
|
+
mode: GitFileMode | (string & {}) | null;
|
|
271
|
+
/**
|
|
272
|
+
* When Typeship first issued this file ID.
|
|
273
|
+
* Format: date-time
|
|
274
|
+
*/
|
|
275
|
+
created_at: string;
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
export type FileResponse = FileModel & {
|
|
279
|
+
/**
|
|
280
|
+
* At most 24 KiB of the file starting at offset, encoded as encoding says. Text chunks never
|
|
281
|
+
* split a character; concatenate chunks in order.
|
|
282
|
+
*/
|
|
283
|
+
content: string;
|
|
284
|
+
/** Byte offset of this chunk in the file. */
|
|
285
|
+
offset: number;
|
|
286
|
+
/** Pass as cursor to read the next chunk; null at the end of the file. */
|
|
287
|
+
next_cursor: string | null;
|
|
288
|
+
} & ResponseMetadata;
|
|
289
|
+
|
|
290
|
+
/** Response shape for FileResponse. */
|
|
291
|
+
export type FileResponseRead = FileModelRead & {
|
|
292
|
+
/**
|
|
293
|
+
* At most 24 KiB of the file starting at offset, encoded as encoding says. Text chunks never
|
|
294
|
+
* split a character; concatenate chunks in order.
|
|
295
|
+
*/
|
|
296
|
+
content: string;
|
|
297
|
+
/** Byte offset of this chunk in the file. */
|
|
298
|
+
offset: number;
|
|
299
|
+
/** Pass as cursor to read the next chunk; null at the end of the file. */
|
|
300
|
+
next_cursor: string | null;
|
|
301
|
+
} & ResponseMetadata;
|
|
302
|
+
|
|
303
|
+
export interface FileList {
|
|
304
|
+
object: ListObject;
|
|
305
|
+
data: FileModel[];
|
|
306
|
+
has_more: boolean;
|
|
307
|
+
next_cursor: string | null;
|
|
308
|
+
request_id: RequestId;
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
/** Response shape for FileList. */
|
|
312
|
+
export interface FileListRead {
|
|
313
|
+
object: ListObject;
|
|
314
|
+
data: FileModelRead[];
|
|
315
|
+
has_more: boolean;
|
|
316
|
+
next_cursor: string | null;
|
|
317
|
+
request_id: RequestId;
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
export type SpecRevisionFile = FileModel & {
|
|
321
|
+
/**
|
|
322
|
+
* entrypoint and reference: captured source files. resolved: the single normalized document
|
|
323
|
+
* Typeship generated from.
|
|
324
|
+
*/
|
|
325
|
+
role: "entrypoint" | "reference" | "resolved";
|
|
326
|
+
};
|
|
327
|
+
|
|
328
|
+
/** Response shape for SpecRevisionFile. */
|
|
329
|
+
export type SpecRevisionFileRead = FileModelRead & {
|
|
330
|
+
/**
|
|
331
|
+
* entrypoint and reference: captured source files. resolved: the single normalized document
|
|
332
|
+
* Typeship generated from.
|
|
333
|
+
*/
|
|
334
|
+
role: ("entrypoint" | "reference" | "resolved") | (string & {});
|
|
335
|
+
};
|
|
336
|
+
|
|
337
|
+
export interface SpecRevisionFileList {
|
|
338
|
+
object: ListObject;
|
|
339
|
+
data: SpecRevisionFile[];
|
|
340
|
+
has_more: boolean;
|
|
341
|
+
next_cursor: string | null;
|
|
342
|
+
request_id: RequestId;
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
/** Response shape for SpecRevisionFileList. */
|
|
346
|
+
export interface SpecRevisionFileListRead {
|
|
347
|
+
object: ListObject;
|
|
348
|
+
data: SpecRevisionFileRead[];
|
|
349
|
+
has_more: boolean;
|
|
350
|
+
next_cursor: string | null;
|
|
351
|
+
request_id: RequestId;
|
|
301
352
|
}
|
|
302
353
|
|
|
303
354
|
export interface GenerationResult {
|
|
304
355
|
files: GeneratedFile[];
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
356
|
+
download?: GenerationDownload;
|
|
357
|
+
warnings: GenerationWarning[];
|
|
358
|
+
coverage: GenerationCoverage;
|
|
308
359
|
/**
|
|
309
360
|
* Anonymous, URL-sourced generations only. A link a signed-in person can open to turn this run
|
|
310
|
-
* into a project in their organization (same
|
|
311
|
-
*
|
|
361
|
+
* into a project in their organization (same Spec, Target, and config). Lasts seven days. Null
|
|
362
|
+
* for inline Specs; absent on keyed calls.
|
|
312
363
|
*/
|
|
313
364
|
claim?: null
|
|
314
365
|
| {
|
|
@@ -321,14 +372,14 @@ export interface GenerationResult {
|
|
|
321
372
|
|
|
322
373
|
/** Response shape for GenerationResult. */
|
|
323
374
|
export interface GenerationResultRead {
|
|
324
|
-
files:
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
375
|
+
files: GeneratedFileRead[];
|
|
376
|
+
download?: GenerationDownload;
|
|
377
|
+
warnings: GenerationWarning[];
|
|
378
|
+
coverage: GenerationCoverageRead;
|
|
328
379
|
/**
|
|
329
380
|
* Anonymous, URL-sourced generations only. A link a signed-in person can open to turn this run
|
|
330
|
-
* into a project in their organization (same
|
|
331
|
-
*
|
|
381
|
+
* into a project in their organization (same Spec, Target, and config). Lasts seven days. Null
|
|
382
|
+
* for inline Specs; absent on keyed calls.
|
|
332
383
|
*/
|
|
333
384
|
claim?: null
|
|
334
385
|
| {
|
|
@@ -340,44 +391,23 @@ export interface GenerationResultRead {
|
|
|
340
391
|
}
|
|
341
392
|
|
|
342
393
|
/**
|
|
343
|
-
*
|
|
344
|
-
*
|
|
394
|
+
* Complete package ZIP from this exact result. Present on requests with Idempotency-Key, including
|
|
395
|
+
* automatic CLI, MCP, and SDK keys. Download before expires_at, verify sha256, and extract into an
|
|
396
|
+
* empty directory. Anyone with this URL can download the package; keep it private. Reading does not
|
|
397
|
+
* generate again or extend the 24-hour replay window.
|
|
345
398
|
*/
|
|
346
|
-
export interface
|
|
347
|
-
/**
|
|
348
|
-
|
|
349
|
-
/**
|
|
350
|
-
|
|
351
|
-
/**
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
reason: "anonymous" | "free_plan";
|
|
356
|
-
/** Anonymous calls only. Where to create an account. */
|
|
357
|
-
signup_url?: string;
|
|
358
|
-
/** Where the cap is lifted. */
|
|
359
|
-
upgrade_url: string;
|
|
360
|
-
}
|
|
361
|
-
|
|
362
|
-
/** Response shape for GenerationLimits. */
|
|
363
|
-
export interface GenerationLimitsRead {
|
|
364
|
-
/** How many operations this generation was allowed to include. */
|
|
365
|
-
max_operations: number;
|
|
366
|
-
/** How many operations are present in the generated package. */
|
|
367
|
-
generated_operations: number;
|
|
368
|
-
/** How many operations in the Definition were left out. */
|
|
369
|
-
omitted_operations: number;
|
|
370
|
-
/** How many operations Typeship found in the complete Definition. */
|
|
371
|
-
total_operations: number;
|
|
372
|
-
reason: ("anonymous" | "free_plan") | (string & {});
|
|
373
|
-
/** Anonymous calls only. Where to create an account. */
|
|
374
|
-
signup_url?: string;
|
|
375
|
-
/** Where the cap is lifted. */
|
|
376
|
-
upgrade_url: string;
|
|
399
|
+
export interface GenerationDownload {
|
|
400
|
+
/** Format: uri */
|
|
401
|
+
url: string;
|
|
402
|
+
/** Format: date-time */
|
|
403
|
+
expires_at: string;
|
|
404
|
+
/** SHA-256 of the downloaded ZIP bytes. */
|
|
405
|
+
sha256: string;
|
|
406
|
+
size_bytes: number;
|
|
407
|
+
file_count: number;
|
|
377
408
|
}
|
|
378
409
|
|
|
379
|
-
export interface
|
|
380
|
-
kind: "url";
|
|
410
|
+
export interface UrlSpecSourceSettings {
|
|
381
411
|
/**
|
|
382
412
|
* URL fetched for every generation.
|
|
383
413
|
* Format: uri
|
|
@@ -387,9 +417,8 @@ export interface UrlDefinitionSource {
|
|
|
387
417
|
headers_configured: boolean;
|
|
388
418
|
}
|
|
389
419
|
|
|
390
|
-
/** Request shape for
|
|
391
|
-
export interface
|
|
392
|
-
kind: "url";
|
|
420
|
+
/** Request shape for UrlSpecSourceSettings. */
|
|
421
|
+
export interface UrlSpecSourceSettingsWrite {
|
|
393
422
|
/**
|
|
394
423
|
* URL fetched for every generation.
|
|
395
424
|
* Format: uri
|
|
@@ -397,61 +426,81 @@ export interface UrlDefinitionSourceWrite {
|
|
|
397
426
|
url: string;
|
|
398
427
|
}
|
|
399
428
|
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
429
|
+
export interface UrlSpecSource {
|
|
430
|
+
type: "url";
|
|
431
|
+
url: UrlSpecSourceSettings;
|
|
432
|
+
}
|
|
433
|
+
|
|
434
|
+
/** Request shape for UrlSpecSource. */
|
|
435
|
+
export interface UrlSpecSourceWrite {
|
|
436
|
+
type: "url";
|
|
437
|
+
url: UrlSpecSourceSettingsWrite;
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
/** Response shape for UrlSpecSource. */
|
|
441
|
+
export interface UrlSpecSourceRead {
|
|
442
|
+
type: "url" | (string & {});
|
|
443
|
+
url: UrlSpecSourceSettings;
|
|
410
444
|
}
|
|
411
445
|
|
|
446
|
+
/** GitHub is the only launch provider; the field is stable for future adapters. */
|
|
447
|
+
export const RepositoryProvider = {
|
|
448
|
+
GITHUB: "github",
|
|
449
|
+
} as const;
|
|
450
|
+
export type RepositoryProvider = (typeof RepositoryProvider)[keyof typeof RepositoryProvider];
|
|
451
|
+
|
|
452
|
+
/** Provider-native repository identity, opaque outside its adapter. */
|
|
453
|
+
export type RepositoryIdentifier = string;
|
|
454
|
+
|
|
412
455
|
export interface RepositoryReference {
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
/** Provider-native repository identity, opaque outside its adapter. */
|
|
416
|
-
identifier: string;
|
|
456
|
+
provider: RepositoryProvider;
|
|
457
|
+
identifier: RepositoryIdentifier;
|
|
417
458
|
}
|
|
418
459
|
|
|
419
460
|
/** Response shape for RepositoryReference. */
|
|
420
461
|
export interface RepositoryReferenceRead {
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
/** Provider-native repository identity, opaque outside its adapter. */
|
|
424
|
-
identifier: string;
|
|
462
|
+
provider: RepositoryProvider | (string & {});
|
|
463
|
+
identifier: RepositoryIdentifier;
|
|
425
464
|
}
|
|
426
465
|
|
|
427
|
-
export interface
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
/** Repository-relative
|
|
466
|
+
export interface RepositorySpecSourceSettings {
|
|
467
|
+
provider: RepositoryProvider;
|
|
468
|
+
identifier: RepositoryIdentifier;
|
|
469
|
+
/** Repository-relative Spec entrypoint. */
|
|
431
470
|
path: string;
|
|
432
471
|
}
|
|
433
472
|
|
|
434
|
-
/** Response shape for
|
|
435
|
-
export interface
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
/** Repository-relative
|
|
473
|
+
/** Response shape for RepositorySpecSourceSettings. */
|
|
474
|
+
export interface RepositorySpecSourceSettingsRead {
|
|
475
|
+
provider: RepositoryProvider | (string & {});
|
|
476
|
+
identifier: RepositoryIdentifier;
|
|
477
|
+
/** Repository-relative Spec entrypoint. */
|
|
439
478
|
path: string;
|
|
440
479
|
}
|
|
441
480
|
|
|
442
|
-
|
|
443
|
-
|
|
481
|
+
export interface RepositorySpecSource {
|
|
482
|
+
type: "repository";
|
|
483
|
+
repository: RepositorySpecSourceSettings;
|
|
484
|
+
}
|
|
485
|
+
|
|
486
|
+
/** Response shape for RepositorySpecSource. */
|
|
487
|
+
export interface RepositorySpecSourceRead {
|
|
488
|
+
type: "repository" | (string & {});
|
|
489
|
+
repository: RepositorySpecSourceSettingsRead;
|
|
490
|
+
}
|
|
491
|
+
|
|
492
|
+
/** The single source of truth for where a Project's Spec lives. */
|
|
493
|
+
export type SpecSource = UrlSpecSource | RepositorySpecSource;
|
|
444
494
|
|
|
445
|
-
/** Request shape for
|
|
446
|
-
export type
|
|
495
|
+
/** Request shape for SpecSource. */
|
|
496
|
+
export type SpecSourceWrite = UrlSpecSourceWrite | RepositorySpecSource;
|
|
447
497
|
|
|
448
|
-
/** Response shape for
|
|
449
|
-
export type
|
|
450
|
-
|
|
|
451
|
-
| Record<string, unknown> & {
|
|
498
|
+
/** Response shape for SpecSource. */
|
|
499
|
+
export type SpecSourceRead = UrlSpecSourceRead
|
|
500
|
+
| RepositorySpecSourceRead
|
|
501
|
+
| Record<string, unknown> & { type?: string };
|
|
452
502
|
|
|
453
|
-
export interface
|
|
454
|
-
kind: "url";
|
|
503
|
+
export interface UrlSpecSourceSettingsInput {
|
|
455
504
|
/**
|
|
456
505
|
* URL of an OpenAPI document, GraphQL SDL file, or GraphQL endpoint.
|
|
457
506
|
* Format: uri
|
|
@@ -466,9 +515,8 @@ export interface UrlDefinitionSourceInput {
|
|
|
466
515
|
headers?: Record<string, string> | null;
|
|
467
516
|
}
|
|
468
517
|
|
|
469
|
-
/** Response shape for
|
|
470
|
-
export interface
|
|
471
|
-
kind: "url" | (string & {});
|
|
518
|
+
/** Response shape for UrlSpecSourceSettingsInput. */
|
|
519
|
+
export interface UrlSpecSourceSettingsInputRead {
|
|
472
520
|
/**
|
|
473
521
|
* URL of an OpenAPI document, GraphQL SDL file, or GraphQL endpoint.
|
|
474
522
|
* Format: uri
|
|
@@ -476,34 +524,56 @@ export interface UrlDefinitionSourceInputRead {
|
|
|
476
524
|
url: string;
|
|
477
525
|
}
|
|
478
526
|
|
|
479
|
-
export interface
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
527
|
+
export interface UrlSpecSourceInput {
|
|
528
|
+
type: "url";
|
|
529
|
+
url: UrlSpecSourceSettingsInput;
|
|
530
|
+
}
|
|
531
|
+
|
|
532
|
+
/** Response shape for UrlSpecSourceInput. */
|
|
533
|
+
export interface UrlSpecSourceInputRead {
|
|
534
|
+
type: "url" | (string & {});
|
|
535
|
+
url: UrlSpecSourceSettingsInputRead;
|
|
536
|
+
}
|
|
537
|
+
|
|
538
|
+
export interface RepositorySpecSourceSettingsInput {
|
|
539
|
+
provider: RepositoryProvider;
|
|
540
|
+
identifier: RepositoryIdentifier;
|
|
541
|
+
/** Repository-relative Spec entrypoint. */
|
|
483
542
|
path: string;
|
|
484
543
|
}
|
|
485
544
|
|
|
486
|
-
/** Response shape for
|
|
487
|
-
export interface
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
/** Repository-relative
|
|
545
|
+
/** Response shape for RepositorySpecSourceSettingsInput. */
|
|
546
|
+
export interface RepositorySpecSourceSettingsInputRead {
|
|
547
|
+
provider: RepositoryProvider | (string & {});
|
|
548
|
+
identifier: RepositoryIdentifier;
|
|
549
|
+
/** Repository-relative Spec entrypoint. */
|
|
491
550
|
path: string;
|
|
492
551
|
}
|
|
493
552
|
|
|
494
|
-
export
|
|
553
|
+
export interface RepositorySpecSourceInput {
|
|
554
|
+
type: "repository";
|
|
555
|
+
repository: RepositorySpecSourceSettingsInput;
|
|
556
|
+
}
|
|
557
|
+
|
|
558
|
+
/** Response shape for RepositorySpecSourceInput. */
|
|
559
|
+
export interface RepositorySpecSourceInputRead {
|
|
560
|
+
type: "repository" | (string & {});
|
|
561
|
+
repository: RepositorySpecSourceSettingsInputRead;
|
|
562
|
+
}
|
|
563
|
+
|
|
564
|
+
export type SpecSourceInput = UrlSpecSourceInput | RepositorySpecSourceInput;
|
|
495
565
|
|
|
496
|
-
/** Response shape for
|
|
497
|
-
export type
|
|
498
|
-
|
|
|
499
|
-
| Record<string, unknown> & {
|
|
566
|
+
/** Response shape for SpecSourceInput. */
|
|
567
|
+
export type SpecSourceInputRead = UrlSpecSourceInputRead
|
|
568
|
+
| RepositorySpecSourceInputRead
|
|
569
|
+
| Record<string, unknown> & { type?: string };
|
|
500
570
|
|
|
501
571
|
/**
|
|
502
|
-
* A fix applied to the resolved
|
|
572
|
+
* A fix applied to the resolved Spec before generation. Paths are JSON
|
|
503
573
|
* Pointers into the document. A patch whose target no longer exists is
|
|
504
574
|
* skipped and reported as a warning on the generation, never silently.
|
|
505
575
|
*/
|
|
506
|
-
export interface
|
|
576
|
+
export interface SpecPatch {
|
|
507
577
|
op: "set" | "append" | "remove" | "rename";
|
|
508
578
|
/**
|
|
509
579
|
* JSON-Pointer-style path. Pattern segments enable bulk fixes:
|
|
@@ -519,8 +589,8 @@ export interface DefinitionPatch {
|
|
|
519
589
|
reason?: string | null;
|
|
520
590
|
}
|
|
521
591
|
|
|
522
|
-
/** Response shape for
|
|
523
|
-
export interface
|
|
592
|
+
/** Response shape for SpecPatch. */
|
|
593
|
+
export interface SpecPatchRead {
|
|
524
594
|
op: ("set" | "append" | "remove" | "rename") | (string & {});
|
|
525
595
|
/**
|
|
526
596
|
* JSON-Pointer-style path. Pattern segments enable bulk fixes:
|
|
@@ -538,8 +608,10 @@ export interface DefinitionPatchRead {
|
|
|
538
608
|
|
|
539
609
|
/** One exact place where a Diagnostic rule found evidence. */
|
|
540
610
|
export interface DiagnosticLocation {
|
|
541
|
-
/** Source
|
|
542
|
-
|
|
611
|
+
/** Source file path from the Spec Revision when the finding maps to a captured file. */
|
|
612
|
+
file_path?: string;
|
|
613
|
+
/** The captured source file, present with file_path. Read it with getFile. */
|
|
614
|
+
file_id?: FileId;
|
|
543
615
|
/** JSON Pointer for OpenAPI, or schema coordinate for GraphQL. */
|
|
544
616
|
path: string;
|
|
545
617
|
/** Human-readable operation coordinate when the location belongs to an operation. */
|
|
@@ -556,9 +628,9 @@ export interface DiagnosticFix {
|
|
|
556
628
|
* spec_patch is an exact OpenAPI edit Typeship can derive; source_edit requires author intent or
|
|
557
629
|
* a lossless GraphQL source edit.
|
|
558
630
|
*/
|
|
559
|
-
|
|
560
|
-
/** Exact patches when
|
|
561
|
-
patches?:
|
|
631
|
+
type: "spec_patch" | "source_edit";
|
|
632
|
+
/** Exact patches when type is spec_patch. */
|
|
633
|
+
patches?: SpecPatchResponse[];
|
|
562
634
|
/** Source-level guidance when an exact patch would invent intent. */
|
|
563
635
|
instructions?: string;
|
|
564
636
|
}
|
|
@@ -571,38 +643,43 @@ export interface DiagnosticFixRead {
|
|
|
571
643
|
* spec_patch is an exact OpenAPI edit Typeship can derive; source_edit requires author intent or
|
|
572
644
|
* a lossless GraphQL source edit.
|
|
573
645
|
*/
|
|
574
|
-
|
|
575
|
-
/** Exact patches when
|
|
576
|
-
patches?:
|
|
646
|
+
type: ("spec_patch" | "source_edit") | (string & {});
|
|
647
|
+
/** Exact patches when type is spec_patch. */
|
|
648
|
+
patches?: SpecPatchResponseRead[];
|
|
577
649
|
/** Source-level guidance when an exact patch would invent intent. */
|
|
578
650
|
instructions?: string;
|
|
579
651
|
}
|
|
580
652
|
|
|
581
|
-
/**
|
|
653
|
+
/**
|
|
654
|
+
* Every occurrence of one Diagnostic rule in a Spec Revision, grouped into one decision.
|
|
655
|
+
* Diagnostics are evaluated when read, using the Spec's current patches and Diagnostic policy.
|
|
656
|
+
*/
|
|
582
657
|
export interface Diagnostic {
|
|
583
|
-
/** Stable rule identifier
|
|
658
|
+
/** Stable rule identifier, unique within a Spec Revision. Suppressions name it as rule_id. */
|
|
584
659
|
id: string;
|
|
660
|
+
object: "diagnostic";
|
|
661
|
+
/**
|
|
662
|
+
* Whether this Diagnostic fails the Spec's Diagnostic policy. Suppressed occurrences and, when
|
|
663
|
+
* only_new is set, occurrences present in the baseline never block.
|
|
664
|
+
*/
|
|
665
|
+
blocking: boolean;
|
|
666
|
+
/**
|
|
667
|
+
* Whether any occurrence is new since baseline_spec_revision_id in the Diagnostic summary. Always
|
|
668
|
+
* true when there is no baseline.
|
|
669
|
+
*/
|
|
670
|
+
introduced: boolean;
|
|
585
671
|
/** Whether the rule reports invalid behavior, material risk, or an improvement. */
|
|
586
672
|
severity: "error" | "warning" | "suggestion";
|
|
587
673
|
/** Product dimension affected by the diagnostic. */
|
|
588
674
|
category: "correctness" | "sdk_ergonomics" | "agent_usability" | "safety";
|
|
589
675
|
/** Concise statement of the root cause. */
|
|
590
676
|
title: string;
|
|
591
|
-
/**
|
|
592
|
-
|
|
593
|
-
/** Why consumers of generated SDK, CLI, or MCP surfaces care. */
|
|
594
|
-
impact: string;
|
|
677
|
+
/** One explanation of the finding and why it matters. */
|
|
678
|
+
message: string;
|
|
595
679
|
/** Public surfaces affected by the root cause. */
|
|
596
680
|
surfaces: Array<"api" | "sdk" | "cli" | "mcp">;
|
|
597
|
-
/**
|
|
598
|
-
* Whether the finding is provable from the Definition, a conservative review suggestion, or a
|
|
599
|
-
* documented Typeship implementation limitation.
|
|
600
|
-
*/
|
|
601
|
-
evidence_basis: "contract" | "heuristic" | "implementation";
|
|
602
|
-
/** Whether remediation requires intent that the Definition cannot prove. */
|
|
681
|
+
/** Whether remediation requires intent that the Spec cannot prove. */
|
|
603
682
|
owner_decision_required: boolean;
|
|
604
|
-
/** Concrete generated SDK, CLI, or MCP naming effect when Typeship can state it. */
|
|
605
|
-
surface_impact?: string;
|
|
606
683
|
/** All affected coordinates, kept under one grouped diagnostic. */
|
|
607
684
|
locations: DiagnosticLocation[];
|
|
608
685
|
fix?: DiagnosticFix;
|
|
@@ -615,29 +692,31 @@ export interface Diagnostic {
|
|
|
615
692
|
|
|
616
693
|
/** Response shape for Diagnostic. */
|
|
617
694
|
export interface DiagnosticRead {
|
|
618
|
-
/** Stable rule identifier
|
|
695
|
+
/** Stable rule identifier, unique within a Spec Revision. Suppressions name it as rule_id. */
|
|
619
696
|
id: string;
|
|
697
|
+
object: "diagnostic" | (string & {});
|
|
698
|
+
/**
|
|
699
|
+
* Whether this Diagnostic fails the Spec's Diagnostic policy. Suppressed occurrences and, when
|
|
700
|
+
* only_new is set, occurrences present in the baseline never block.
|
|
701
|
+
*/
|
|
702
|
+
blocking: boolean;
|
|
703
|
+
/**
|
|
704
|
+
* Whether any occurrence is new since baseline_spec_revision_id in the Diagnostic summary. Always
|
|
705
|
+
* true when there is no baseline.
|
|
706
|
+
*/
|
|
707
|
+
introduced: boolean;
|
|
620
708
|
/** Whether the rule reports invalid behavior, material risk, or an improvement. */
|
|
621
709
|
severity: ("error" | "warning" | "suggestion") | (string & {});
|
|
622
710
|
/** Product dimension affected by the diagnostic. */
|
|
623
711
|
category: ("correctness" | "sdk_ergonomics" | "agent_usability" | "safety") | (string & {});
|
|
624
712
|
/** Concise statement of the root cause. */
|
|
625
713
|
title: string;
|
|
626
|
-
/**
|
|
627
|
-
|
|
628
|
-
/** Why consumers of generated SDK, CLI, or MCP surfaces care. */
|
|
629
|
-
impact: string;
|
|
714
|
+
/** One explanation of the finding and why it matters. */
|
|
715
|
+
message: string;
|
|
630
716
|
/** Public surfaces affected by the root cause. */
|
|
631
717
|
surfaces: Array<("api" | "sdk" | "cli" | "mcp") | (string & {})>;
|
|
632
|
-
/**
|
|
633
|
-
* Whether the finding is provable from the Definition, a conservative review suggestion, or a
|
|
634
|
-
* documented Typeship implementation limitation.
|
|
635
|
-
*/
|
|
636
|
-
evidence_basis: ("contract" | "heuristic" | "implementation") | (string & {});
|
|
637
|
-
/** Whether remediation requires intent that the Definition cannot prove. */
|
|
718
|
+
/** Whether remediation requires intent that the Spec cannot prove. */
|
|
638
719
|
owner_decision_required: boolean;
|
|
639
|
-
/** Concrete generated SDK, CLI, or MCP naming effect when Typeship can state it. */
|
|
640
|
-
surface_impact?: string;
|
|
641
720
|
/** All affected coordinates, kept under one grouped diagnostic. */
|
|
642
721
|
locations: DiagnosticLocation[];
|
|
643
722
|
fix?: DiagnosticFixRead;
|
|
@@ -648,20 +727,51 @@ export interface DiagnosticRead {
|
|
|
648
727
|
authoring_brief: string;
|
|
649
728
|
}
|
|
650
729
|
|
|
651
|
-
/**
|
|
730
|
+
/**
|
|
731
|
+
* Counts of grouped Diagnostics, one per rule. Retrieve the revision with include=diagnostics for
|
|
732
|
+
* each Diagnostic.
|
|
733
|
+
*/
|
|
652
734
|
export interface DiagnosticSummary {
|
|
653
|
-
/**
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
660
|
-
|
|
661
|
-
|
|
662
|
-
|
|
663
|
-
|
|
664
|
-
|
|
735
|
+
/**
|
|
736
|
+
* passed: no Diagnostic fails the Spec's Diagnostic policy. blocked: at least one does; retrieve
|
|
737
|
+
* with include=diagnostics and fix those marked blocking.
|
|
738
|
+
*/
|
|
739
|
+
status: "passed" | "blocked";
|
|
740
|
+
/** Diagnostics reporting invalid behavior. */
|
|
741
|
+
error_count: number;
|
|
742
|
+
/** Diagnostics reporting material risk. */
|
|
743
|
+
warning_count: number;
|
|
744
|
+
/** Diagnostics suggesting an improvement. */
|
|
745
|
+
suggestion_count: number;
|
|
746
|
+
/** Diagnostics that fail the Spec's Diagnostic policy. */
|
|
747
|
+
blocking_count: number;
|
|
748
|
+
/**
|
|
749
|
+
* The previous revision of this Spec that introduced Diagnostics are compared with, or null for
|
|
750
|
+
* the first revision.
|
|
751
|
+
*/
|
|
752
|
+
baseline_spec_revision_id: SpecRevisionId | null;
|
|
753
|
+
}
|
|
754
|
+
|
|
755
|
+
/** Response shape for DiagnosticSummary. */
|
|
756
|
+
export interface DiagnosticSummaryRead {
|
|
757
|
+
/**
|
|
758
|
+
* passed: no Diagnostic fails the Spec's Diagnostic policy. blocked: at least one does; retrieve
|
|
759
|
+
* with include=diagnostics and fix those marked blocking.
|
|
760
|
+
*/
|
|
761
|
+
status: ("passed" | "blocked") | (string & {});
|
|
762
|
+
/** Diagnostics reporting invalid behavior. */
|
|
763
|
+
error_count: number;
|
|
764
|
+
/** Diagnostics reporting material risk. */
|
|
765
|
+
warning_count: number;
|
|
766
|
+
/** Diagnostics suggesting an improvement. */
|
|
767
|
+
suggestion_count: number;
|
|
768
|
+
/** Diagnostics that fail the Spec's Diagnostic policy. */
|
|
769
|
+
blocking_count: number;
|
|
770
|
+
/**
|
|
771
|
+
* The previous revision of this Spec that introduced Diagnostics are compared with, or null for
|
|
772
|
+
* the first revision.
|
|
773
|
+
*/
|
|
774
|
+
baseline_spec_revision_id: SpecRevisionId | null;
|
|
665
775
|
}
|
|
666
776
|
|
|
667
777
|
export interface DiagnosticSuppression {
|
|
@@ -707,154 +817,36 @@ export interface DiagnosticPolicyRead {
|
|
|
707
817
|
suppressions: DiagnosticSuppression[];
|
|
708
818
|
}
|
|
709
819
|
|
|
710
|
-
export interface
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
state: ("pass" | "fail") | (string & {});
|
|
720
|
-
blocking: DiagnosticReferenceRead[];
|
|
721
|
-
considered_occurrences: number;
|
|
722
|
-
suppressed_occurrences: number;
|
|
723
|
-
}
|
|
724
|
-
|
|
725
|
-
/** Current-revision suppression usage for one stable Diagnostic rule. */
|
|
726
|
-
export interface DiagnosticSuppressionSignal {
|
|
727
|
-
rule_id: string;
|
|
728
|
-
/** Current occurrences of this rule that are not suppressed. */
|
|
729
|
-
active_occurrences: number;
|
|
730
|
-
suppressed_occurrences: number;
|
|
731
|
-
}
|
|
732
|
-
|
|
733
|
-
/**
|
|
734
|
-
* Current-revision signals for tuning Diagnostics policy. These counts do not claim that a
|
|
735
|
-
* suppression is a false positive or that runtime behavior has been verified.
|
|
736
|
-
*/
|
|
737
|
-
export interface DiagnosticQualitySignals {
|
|
738
|
-
suppressed_by_rule: DiagnosticSuppressionSignal[];
|
|
739
|
-
/** Reviewed exceptions whose rule or exact path no longer matches this revision. */
|
|
740
|
-
stale_suppressions: DiagnosticSuppression[];
|
|
741
|
-
}
|
|
742
|
-
|
|
743
|
-
/** Compact rule and location reference; full guidance appears once in diagnostics. */
|
|
744
|
-
export interface DiagnosticReference {
|
|
745
|
-
rule_id: string;
|
|
746
|
-
severity: "error" | "warning" | "suggestion";
|
|
747
|
-
title: string;
|
|
748
|
-
locations: DiagnosticLocation[];
|
|
749
|
-
}
|
|
750
|
-
|
|
751
|
-
/** Response shape for DiagnosticReference. */
|
|
752
|
-
export interface DiagnosticReferenceRead {
|
|
753
|
-
rule_id: string;
|
|
754
|
-
severity: ("error" | "warning" | "suggestion") | (string & {});
|
|
755
|
-
title: string;
|
|
756
|
-
locations: DiagnosticLocation[];
|
|
757
|
-
}
|
|
758
|
-
|
|
759
|
-
export interface DiagnosticDelta {
|
|
760
|
-
added: DiagnosticReference[];
|
|
761
|
-
resolved: DiagnosticReference[];
|
|
762
|
-
baseline_definition_revision_id: DefinitionRevisionId | null;
|
|
763
|
-
}
|
|
764
|
-
|
|
765
|
-
/** Response shape for DiagnosticDelta. */
|
|
766
|
-
export interface DiagnosticDeltaRead {
|
|
767
|
-
added: DiagnosticReferenceRead[];
|
|
768
|
-
resolved: DiagnosticReferenceRead[];
|
|
769
|
-
baseline_definition_revision_id: DefinitionRevisionId | null;
|
|
770
|
-
}
|
|
771
|
-
|
|
772
|
-
/**
|
|
773
|
-
* Deterministic Diagnostics for one immutable Definition Revision after existing patches. No
|
|
774
|
-
* model-generated facts or silent edits.
|
|
775
|
-
*/
|
|
776
|
-
export interface DiagnosticReport {
|
|
777
|
-
object: "diagnostic_report";
|
|
778
|
-
/** Contract format Typeship analyzed. */
|
|
779
|
-
format: "openapi" | "graphql";
|
|
780
|
-
project_id: ProjectId;
|
|
781
|
-
definition_revision_id: DefinitionRevisionId;
|
|
782
|
-
/** SHA-256 digest of the immutable raw source revision. */
|
|
783
|
-
source_sha256: string;
|
|
784
|
-
/** SHA-256 digest after applying the Definition's current patches. */
|
|
785
|
-
analyzed_sha256: string;
|
|
786
|
-
/** Loud misses or conflicts from the Definition's existing patches. */
|
|
787
|
-
patch_diagnostics: string[];
|
|
788
|
-
summary: DiagnosticSummary;
|
|
789
|
-
/** Stable grouped diagnostics, ordered by severity and rule identifier. */
|
|
790
|
-
diagnostics: Diagnostic[];
|
|
791
|
-
policy: DiagnosticPolicy;
|
|
792
|
-
evaluation: DiagnosticEvaluation;
|
|
793
|
-
quality_signals: DiagnosticQualitySignals;
|
|
794
|
-
delta: DiagnosticDelta;
|
|
795
|
-
request_id: RequestId;
|
|
796
|
-
}
|
|
797
|
-
|
|
798
|
-
/** Response shape for DiagnosticReport. */
|
|
799
|
-
export interface DiagnosticReportRead {
|
|
800
|
-
object: "diagnostic_report" | (string & {});
|
|
801
|
-
/** Contract format Typeship analyzed. */
|
|
802
|
-
format: ("openapi" | "graphql") | (string & {});
|
|
803
|
-
project_id: ProjectId;
|
|
804
|
-
definition_revision_id: DefinitionRevisionId;
|
|
805
|
-
/** SHA-256 digest of the immutable raw source revision. */
|
|
806
|
-
source_sha256: string;
|
|
807
|
-
/** SHA-256 digest after applying the Definition's current patches. */
|
|
808
|
-
analyzed_sha256: string;
|
|
809
|
-
/** Loud misses or conflicts from the Definition's existing patches. */
|
|
810
|
-
patch_diagnostics: string[];
|
|
811
|
-
summary: DiagnosticSummary;
|
|
812
|
-
/** Stable grouped diagnostics, ordered by severity and rule identifier. */
|
|
813
|
-
diagnostics: DiagnosticRead[];
|
|
814
|
-
policy: DiagnosticPolicyRead;
|
|
815
|
-
evaluation: DiagnosticEvaluationRead;
|
|
816
|
-
quality_signals: DiagnosticQualitySignals;
|
|
817
|
-
delta: DiagnosticDeltaRead;
|
|
818
|
-
request_id: RequestId;
|
|
819
|
-
}
|
|
820
|
-
|
|
821
|
-
export interface DiagnosticRemediationRequest {
|
|
822
|
-
/** Stable IDs of current diagnostics whose exact patches should be reviewed and applied. */
|
|
823
|
-
diagnostic_ids: string[];
|
|
824
|
-
}
|
|
825
|
-
|
|
826
|
-
export interface DiagnosticRemediation {
|
|
827
|
-
object: "diagnostic_remediation";
|
|
828
|
-
kind: "overlay" | "source_review";
|
|
829
|
-
patches_applied: number;
|
|
830
|
-
/**
|
|
831
|
-
* Source pull request for repository projects; absent for URL overlays.
|
|
832
|
-
* Format: uri
|
|
833
|
-
*/
|
|
834
|
-
review_url?: string | null;
|
|
835
|
-
request_id: RequestId;
|
|
820
|
+
export interface DiagnosticWarning {
|
|
821
|
+
code: "unsupported_format"
|
|
822
|
+
| "invalid_document"
|
|
823
|
+
| "invalid_patch"
|
|
824
|
+
| "no_match"
|
|
825
|
+
| "append_target_type"
|
|
826
|
+
| "rename_target_type"
|
|
827
|
+
| "rename_conflict";
|
|
828
|
+
message: string;
|
|
836
829
|
}
|
|
837
830
|
|
|
838
|
-
/** Response shape for
|
|
839
|
-
export interface
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
request_id: RequestId;
|
|
831
|
+
/** Response shape for DiagnosticWarning. */
|
|
832
|
+
export interface DiagnosticWarningRead {
|
|
833
|
+
code: ("unsupported_format"
|
|
834
|
+
| "invalid_document"
|
|
835
|
+
| "invalid_patch"
|
|
836
|
+
| "no_match"
|
|
837
|
+
| "append_target_type"
|
|
838
|
+
| "rename_target_type"
|
|
839
|
+
| "rename_conflict") | (string & {});
|
|
840
|
+
message: string;
|
|
849
841
|
}
|
|
850
842
|
|
|
851
|
-
export interface
|
|
852
|
-
|
|
853
|
-
|
|
843
|
+
export interface RepositoryDeliverySettingsInput {
|
|
844
|
+
provider: RepositoryProvider;
|
|
845
|
+
identifier: RepositoryIdentifier;
|
|
854
846
|
directory?: string | null;
|
|
855
847
|
/** npm or Python registry identity where applicable. */
|
|
856
848
|
package_name?: string | null;
|
|
857
|
-
/**
|
|
849
|
+
/** Go module identity for the Go SDK or Go CLI Target where applicable. */
|
|
858
850
|
module_path?: string | null;
|
|
859
851
|
/**
|
|
860
852
|
* Commit repository-owned registry automation and report publication after the Draft merges.
|
|
@@ -863,14 +855,14 @@ export interface RepositoryDeliveryInput {
|
|
|
863
855
|
publish_on_merge?: boolean;
|
|
864
856
|
}
|
|
865
857
|
|
|
866
|
-
/** Response shape for
|
|
867
|
-
export interface
|
|
868
|
-
|
|
869
|
-
|
|
858
|
+
/** Response shape for RepositoryDeliverySettingsInput. */
|
|
859
|
+
export interface RepositoryDeliverySettingsInputRead {
|
|
860
|
+
provider: RepositoryProvider | (string & {});
|
|
861
|
+
identifier: RepositoryIdentifier;
|
|
870
862
|
directory?: string | null;
|
|
871
863
|
/** npm or Python registry identity where applicable. */
|
|
872
864
|
package_name?: string | null;
|
|
873
|
-
/**
|
|
865
|
+
/** Go module identity for the Go SDK or Go CLI Target where applicable. */
|
|
874
866
|
module_path?: string | null;
|
|
875
867
|
/**
|
|
876
868
|
* Commit repository-owned registry automation and report publication after the Draft merges.
|
|
@@ -879,13 +871,24 @@ export interface RepositoryDeliveryInputRead {
|
|
|
879
871
|
publish_on_merge?: boolean;
|
|
880
872
|
}
|
|
881
873
|
|
|
874
|
+
export interface RepositoryDeliveryInput {
|
|
875
|
+
type: "repository";
|
|
876
|
+
repository: RepositoryDeliverySettingsInput;
|
|
877
|
+
}
|
|
878
|
+
|
|
879
|
+
/** Response shape for RepositoryDeliveryInput. */
|
|
880
|
+
export interface RepositoryDeliveryInputRead {
|
|
881
|
+
type: "repository" | (string & {});
|
|
882
|
+
repository: RepositoryDeliverySettingsInputRead;
|
|
883
|
+
}
|
|
884
|
+
|
|
882
885
|
export interface HostedMcpDeliveryInput {
|
|
883
|
-
|
|
886
|
+
type: "hosted_mcp";
|
|
884
887
|
}
|
|
885
888
|
|
|
886
889
|
/** Response shape for HostedMcpDeliveryInput. */
|
|
887
890
|
export interface HostedMcpDeliveryInputRead {
|
|
888
|
-
|
|
891
|
+
type: "hosted_mcp" | (string & {});
|
|
889
892
|
}
|
|
890
893
|
|
|
891
894
|
export type DeliveryInput = RepositoryDeliveryInput | HostedMcpDeliveryInput;
|
|
@@ -893,51 +896,141 @@ export type DeliveryInput = RepositoryDeliveryInput | HostedMcpDeliveryInput;
|
|
|
893
896
|
/** Response shape for DeliveryInput. */
|
|
894
897
|
export type DeliveryInputRead = RepositoryDeliveryInputRead
|
|
895
898
|
| HostedMcpDeliveryInputRead
|
|
896
|
-
| Record<string, unknown> & {
|
|
899
|
+
| Record<string, unknown> & { type?: string };
|
|
897
900
|
|
|
898
|
-
export interface
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
target_id: TargetId;
|
|
902
|
-
kind: "repository";
|
|
903
|
-
state: "active" | "disabled";
|
|
904
|
-
repository: RepositoryReference;
|
|
901
|
+
export interface RepositoryDeliverySettings {
|
|
902
|
+
provider: RepositoryProvider;
|
|
903
|
+
identifier: RepositoryIdentifier;
|
|
905
904
|
directory: string | null;
|
|
906
905
|
package_name: string | null;
|
|
907
906
|
module_path: string | null;
|
|
908
907
|
publish_on_merge: boolean;
|
|
909
|
-
/** Format: date-time */
|
|
910
|
-
created_at: string;
|
|
911
|
-
/** Format: date-time */
|
|
912
|
-
updated_at: string;
|
|
913
908
|
}
|
|
914
909
|
|
|
915
|
-
/** Response shape for
|
|
916
|
-
export interface
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
target_id: TargetId;
|
|
920
|
-
kind: "repository" | (string & {});
|
|
921
|
-
state: ("active" | "disabled") | (string & {});
|
|
922
|
-
repository: RepositoryReferenceRead;
|
|
910
|
+
/** Response shape for RepositoryDeliverySettings. */
|
|
911
|
+
export interface RepositoryDeliverySettingsRead {
|
|
912
|
+
provider: RepositoryProvider | (string & {});
|
|
913
|
+
identifier: RepositoryIdentifier;
|
|
923
914
|
directory: string | null;
|
|
924
915
|
package_name: string | null;
|
|
925
916
|
module_path: string | null;
|
|
926
917
|
publish_on_merge: boolean;
|
|
927
|
-
/** Format: date-time */
|
|
928
|
-
created_at: string;
|
|
929
|
-
/** Format: date-time */
|
|
930
|
-
updated_at: string;
|
|
931
918
|
}
|
|
932
919
|
|
|
933
|
-
export interface
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
state: "active" | "disabled";
|
|
939
|
-
/** Format: uri */
|
|
920
|
+
export interface HostedMcpDeliverySettings {
|
|
921
|
+
/**
|
|
922
|
+
* Hosted MCP endpoint for this Target, or null while it is being provisioned.
|
|
923
|
+
* Format: uri
|
|
924
|
+
*/
|
|
940
925
|
url: string | null;
|
|
926
|
+
}
|
|
927
|
+
|
|
928
|
+
export interface RepositoryDelivery {
|
|
929
|
+
id: DeliveryId;
|
|
930
|
+
object: "delivery";
|
|
931
|
+
target_id: TargetId;
|
|
932
|
+
type: "repository";
|
|
933
|
+
/**
|
|
934
|
+
* active: the repository accepts generated changes. action_required: inspect issues for the
|
|
935
|
+
* correction. disabled: the Target is disabled and receives no changes.
|
|
936
|
+
*/
|
|
937
|
+
status: "active" | "action_required" | "disabled";
|
|
938
|
+
repository: RepositoryDeliverySettings;
|
|
939
|
+
issues: RepositoryDeliveryIssue[];
|
|
940
|
+
/** Repository check names Typeship expects before accepting a Draft. */
|
|
941
|
+
required_checks: string[];
|
|
942
|
+
/**
|
|
943
|
+
* Last observed repository event relevant to this Delivery, if available. A failed event adds an
|
|
944
|
+
* actionable issue.
|
|
945
|
+
*/
|
|
946
|
+
last_event: RepositoryDeliveryEvent | null;
|
|
947
|
+
/** Format: date-time */
|
|
948
|
+
created_at: string;
|
|
949
|
+
/** Format: date-time */
|
|
950
|
+
updated_at: string;
|
|
951
|
+
}
|
|
952
|
+
|
|
953
|
+
/** Response shape for RepositoryDelivery. */
|
|
954
|
+
export interface RepositoryDeliveryRead {
|
|
955
|
+
id: DeliveryId;
|
|
956
|
+
object: "delivery" | (string & {});
|
|
957
|
+
target_id: TargetId;
|
|
958
|
+
type: "repository" | (string & {});
|
|
959
|
+
/**
|
|
960
|
+
* active: the repository accepts generated changes. action_required: inspect issues for the
|
|
961
|
+
* correction. disabled: the Target is disabled and receives no changes.
|
|
962
|
+
*/
|
|
963
|
+
status: ("active" | "action_required" | "disabled") | (string & {});
|
|
964
|
+
repository: RepositoryDeliverySettingsRead;
|
|
965
|
+
issues: RepositoryDeliveryIssueRead[];
|
|
966
|
+
/** Repository check names Typeship expects before accepting a Draft. */
|
|
967
|
+
required_checks: string[];
|
|
968
|
+
/**
|
|
969
|
+
* Last observed repository event relevant to this Delivery, if available. A failed event adds an
|
|
970
|
+
* actionable issue.
|
|
971
|
+
*/
|
|
972
|
+
last_event: RepositoryDeliveryEventRead | null;
|
|
973
|
+
/** Format: date-time */
|
|
974
|
+
created_at: string;
|
|
975
|
+
/** Format: date-time */
|
|
976
|
+
updated_at: string;
|
|
977
|
+
}
|
|
978
|
+
|
|
979
|
+
export interface RepositoryDeliveryIssue {
|
|
980
|
+
code: "app_not_installed"
|
|
981
|
+
| "repository_unreachable"
|
|
982
|
+
| "contents_write_missing"
|
|
983
|
+
| "pull_request_missing"
|
|
984
|
+
| "approval_label_missing"
|
|
985
|
+
| "check_missing"
|
|
986
|
+
| "event_failed";
|
|
987
|
+
/** Specific customer action or repository setting to inspect. */
|
|
988
|
+
message: string;
|
|
989
|
+
}
|
|
990
|
+
|
|
991
|
+
/** Response shape for RepositoryDeliveryIssue. */
|
|
992
|
+
export interface RepositoryDeliveryIssueRead {
|
|
993
|
+
code: ("app_not_installed"
|
|
994
|
+
| "repository_unreachable"
|
|
995
|
+
| "contents_write_missing"
|
|
996
|
+
| "pull_request_missing"
|
|
997
|
+
| "approval_label_missing"
|
|
998
|
+
| "check_missing"
|
|
999
|
+
| "event_failed") | (string & {});
|
|
1000
|
+
/** Specific customer action or repository setting to inspect. */
|
|
1001
|
+
message: string;
|
|
1002
|
+
}
|
|
1003
|
+
|
|
1004
|
+
export interface RepositoryDeliveryEvent {
|
|
1005
|
+
/** Repository event type. */
|
|
1006
|
+
event: string;
|
|
1007
|
+
/** superseded: a newer event for the same repository replaced this one before it finished. */
|
|
1008
|
+
status: "queued" | "running" | "completed" | "failed" | "superseded";
|
|
1009
|
+
/** Format: date-time */
|
|
1010
|
+
created_at: string;
|
|
1011
|
+
}
|
|
1012
|
+
|
|
1013
|
+
/** Response shape for RepositoryDeliveryEvent. */
|
|
1014
|
+
export interface RepositoryDeliveryEventRead {
|
|
1015
|
+
/** Repository event type. */
|
|
1016
|
+
event: string;
|
|
1017
|
+
/** superseded: a newer event for the same repository replaced this one before it finished. */
|
|
1018
|
+
status: ("queued" | "running" | "completed" | "failed" | "superseded") | (string & {});
|
|
1019
|
+
/** Format: date-time */
|
|
1020
|
+
created_at: string;
|
|
1021
|
+
}
|
|
1022
|
+
|
|
1023
|
+
export interface HostedMcpDelivery {
|
|
1024
|
+
id: DeliveryId;
|
|
1025
|
+
object: "delivery";
|
|
1026
|
+
target_id: TargetId;
|
|
1027
|
+
type: "hosted_mcp";
|
|
1028
|
+
/**
|
|
1029
|
+
* active: the endpoint serves the Target's latest accepted package. disabled: the Target is
|
|
1030
|
+
* disabled and the endpoint is paused.
|
|
1031
|
+
*/
|
|
1032
|
+
status: "active" | "disabled";
|
|
1033
|
+
hosted_mcp: HostedMcpDeliverySettings;
|
|
941
1034
|
/** Format: date-time */
|
|
942
1035
|
created_at: string;
|
|
943
1036
|
/** Format: date-time */
|
|
@@ -949,10 +1042,13 @@ export interface HostedMcpDeliveryRead {
|
|
|
949
1042
|
id: DeliveryId;
|
|
950
1043
|
object: "delivery" | (string & {});
|
|
951
1044
|
target_id: TargetId;
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
955
|
-
|
|
1045
|
+
type: "hosted_mcp" | (string & {});
|
|
1046
|
+
/**
|
|
1047
|
+
* active: the endpoint serves the Target's latest accepted package. disabled: the Target is
|
|
1048
|
+
* disabled and the endpoint is paused.
|
|
1049
|
+
*/
|
|
1050
|
+
status: ("active" | "disabled") | (string & {});
|
|
1051
|
+
hosted_mcp: HostedMcpDeliverySettings;
|
|
956
1052
|
/** Format: date-time */
|
|
957
1053
|
created_at: string;
|
|
958
1054
|
/** Format: date-time */
|
|
@@ -964,44 +1060,124 @@ export type Delivery = RepositoryDelivery | HostedMcpDelivery;
|
|
|
964
1060
|
/** Response shape for Delivery. */
|
|
965
1061
|
export type DeliveryRead = RepositoryDeliveryRead
|
|
966
1062
|
| HostedMcpDeliveryRead
|
|
967
|
-
| Record<string, unknown> & {
|
|
1063
|
+
| Record<string, unknown> & { type?: string };
|
|
1064
|
+
|
|
1065
|
+
/**
|
|
1066
|
+
* repository is present for a repository Delivery, with issues, required_checks, and last_event;
|
|
1067
|
+
* hosted_mcp is present for a hosted_mcp Delivery.
|
|
1068
|
+
*/
|
|
1069
|
+
export interface DeliveryResponse {
|
|
1070
|
+
id: DeliveryId;
|
|
1071
|
+
object: "delivery";
|
|
1072
|
+
target_id: TargetId;
|
|
1073
|
+
type: "repository" | "hosted_mcp";
|
|
1074
|
+
status: "active" | "action_required" | "disabled";
|
|
1075
|
+
repository?: RepositoryDeliverySettings;
|
|
1076
|
+
issues?: RepositoryDeliveryIssue[];
|
|
1077
|
+
required_checks?: string[];
|
|
1078
|
+
last_event?: RepositoryDeliveryEvent | null;
|
|
1079
|
+
hosted_mcp?: HostedMcpDeliverySettings;
|
|
1080
|
+
/** Format: date-time */
|
|
1081
|
+
created_at: string;
|
|
1082
|
+
/** Format: date-time */
|
|
1083
|
+
updated_at: string;
|
|
1084
|
+
request_id: RequestId;
|
|
1085
|
+
}
|
|
1086
|
+
|
|
1087
|
+
/** Response shape for DeliveryResponse. */
|
|
1088
|
+
export interface DeliveryResponseRead {
|
|
1089
|
+
id: DeliveryId;
|
|
1090
|
+
object: "delivery" | (string & {});
|
|
1091
|
+
target_id: TargetId;
|
|
1092
|
+
type: ("repository" | "hosted_mcp") | (string & {});
|
|
1093
|
+
status: ("active" | "action_required" | "disabled") | (string & {});
|
|
1094
|
+
repository?: RepositoryDeliverySettingsRead;
|
|
1095
|
+
issues?: RepositoryDeliveryIssueRead[];
|
|
1096
|
+
required_checks?: string[];
|
|
1097
|
+
last_event?: RepositoryDeliveryEventRead | null;
|
|
1098
|
+
hosted_mcp?: HostedMcpDeliverySettings;
|
|
1099
|
+
/** Format: date-time */
|
|
1100
|
+
created_at: string;
|
|
1101
|
+
/** Format: date-time */
|
|
1102
|
+
updated_at: string;
|
|
1103
|
+
request_id: RequestId;
|
|
1104
|
+
}
|
|
1105
|
+
|
|
1106
|
+
/**
|
|
1107
|
+
* One Target generated from a sibling Target. A go_cli Target carries type go_sdk_module, naming
|
|
1108
|
+
* the Go SDK Target it is generated against.
|
|
1109
|
+
*/
|
|
1110
|
+
export interface TargetDependency {
|
|
1111
|
+
type: "go_sdk_module";
|
|
1112
|
+
target_id: TargetId;
|
|
1113
|
+
}
|
|
1114
|
+
|
|
1115
|
+
/** Response shape for TargetDependency. */
|
|
1116
|
+
export interface TargetDependencyRead {
|
|
1117
|
+
type: "go_sdk_module" | (string & {});
|
|
1118
|
+
target_id: TargetId;
|
|
1119
|
+
}
|
|
1120
|
+
|
|
1121
|
+
/**
|
|
1122
|
+
* Required checks run against the code in the Draft. Generated checks and customer commands share
|
|
1123
|
+
* one reproducible workflow; repository_required names existing repository checks. Supplying checks
|
|
1124
|
+
* replaces all settings. Omitted generated restores build, package, and public_entrypoint; omitted
|
|
1125
|
+
* repository_required and customer restore empty lists. An empty object restores these defaults. An
|
|
1126
|
+
* empty array clears the corresponding list.
|
|
1127
|
+
*/
|
|
1128
|
+
export interface TargetChecks {
|
|
1129
|
+
/** Default: ["build","package","public_entrypoint"] */
|
|
1130
|
+
generated?: Array<"build" | "package" | "public_entrypoint">;
|
|
1131
|
+
repository_required?: string[];
|
|
1132
|
+
customer?: Array<{
|
|
1133
|
+
name: string;
|
|
1134
|
+
command: string;
|
|
1135
|
+
}>;
|
|
1136
|
+
}
|
|
1137
|
+
|
|
1138
|
+
/** Response shape for TargetChecks. */
|
|
1139
|
+
export interface TargetChecksRead {
|
|
1140
|
+
/** Default: ["build","package","public_entrypoint"] */
|
|
1141
|
+
generated?: Array<("build" | "package" | "public_entrypoint") | (string & {})>;
|
|
1142
|
+
repository_required?: string[];
|
|
1143
|
+
customer?: Array<{
|
|
1144
|
+
name: string;
|
|
1145
|
+
command: string;
|
|
1146
|
+
}>;
|
|
1147
|
+
}
|
|
968
1148
|
|
|
969
|
-
export interface
|
|
1149
|
+
export interface TargetCreateRequest {
|
|
1150
|
+
project_id: ProjectId;
|
|
970
1151
|
name: string;
|
|
971
|
-
|
|
972
|
-
|
|
1152
|
+
spec_id: SpecId;
|
|
1153
|
+
type: GeneratorKind;
|
|
973
1154
|
/** Default: "active" */
|
|
974
|
-
|
|
975
|
-
/** Default: "2026-08-24" */
|
|
976
|
-
edition?: string;
|
|
1155
|
+
status?: "active" | "disabled";
|
|
977
1156
|
/** Default: "stable" */
|
|
978
1157
|
release_channel?: "stable" | "prerelease";
|
|
979
|
-
|
|
980
|
-
proposed_version?: string | null;
|
|
1158
|
+
checks?: TargetChecks;
|
|
981
1159
|
/**
|
|
982
1160
|
* Target-specific overrides merged over Project.config. GraphQL settings are rejected here and
|
|
983
|
-
* belong to the
|
|
1161
|
+
* belong to the Spec.
|
|
984
1162
|
*/
|
|
985
1163
|
config?: TargetConfig | null;
|
|
986
1164
|
deliveries?: DeliveryInput[];
|
|
987
1165
|
}
|
|
988
1166
|
|
|
989
|
-
/** Response shape for
|
|
990
|
-
export interface
|
|
1167
|
+
/** Response shape for TargetCreateRequest. */
|
|
1168
|
+
export interface TargetCreateRequestRead {
|
|
1169
|
+
project_id: ProjectId;
|
|
991
1170
|
name: string;
|
|
992
|
-
|
|
993
|
-
|
|
1171
|
+
spec_id: SpecId;
|
|
1172
|
+
type: GeneratorKind | (string & {});
|
|
994
1173
|
/** Default: "active" */
|
|
995
|
-
|
|
996
|
-
/** Default: "2026-08-24" */
|
|
997
|
-
edition?: string;
|
|
1174
|
+
status?: ("active" | "disabled") | (string & {});
|
|
998
1175
|
/** Default: "stable" */
|
|
999
1176
|
release_channel?: ("stable" | "prerelease") | (string & {});
|
|
1000
|
-
|
|
1001
|
-
proposed_version?: string | null;
|
|
1177
|
+
checks?: TargetChecksRead;
|
|
1002
1178
|
/**
|
|
1003
1179
|
* Target-specific overrides merged over Project.config. GraphQL settings are rejected here and
|
|
1004
|
-
* belong to the
|
|
1180
|
+
* belong to the Spec.
|
|
1005
1181
|
*/
|
|
1006
1182
|
config?: TargetConfigRead | null;
|
|
1007
1183
|
deliveries?: DeliveryInputRead[];
|
|
@@ -1009,17 +1185,15 @@ export interface TargetFieldsRead {
|
|
|
1009
1185
|
|
|
1010
1186
|
export interface InitialTargetFields {
|
|
1011
1187
|
name: string;
|
|
1012
|
-
|
|
1188
|
+
type: GeneratorKind;
|
|
1013
1189
|
/** Default: "active" */
|
|
1014
|
-
|
|
1015
|
-
/** Default: "2026-08-24" */
|
|
1016
|
-
edition?: string;
|
|
1190
|
+
status?: "active" | "disabled";
|
|
1017
1191
|
/** Default: "stable" */
|
|
1018
1192
|
release_channel?: "stable" | "prerelease";
|
|
1019
|
-
|
|
1193
|
+
checks?: TargetChecks;
|
|
1020
1194
|
/**
|
|
1021
1195
|
* Target-specific overrides merged over Project.config. GraphQL settings are rejected here and
|
|
1022
|
-
* belong to the
|
|
1196
|
+
* belong to the Spec.
|
|
1023
1197
|
*/
|
|
1024
1198
|
config?: TargetConfig | null;
|
|
1025
1199
|
deliveries?: DeliveryInput[];
|
|
@@ -1028,17 +1202,15 @@ export interface InitialTargetFields {
|
|
|
1028
1202
|
/** Response shape for InitialTargetFields. */
|
|
1029
1203
|
export interface InitialTargetFieldsRead {
|
|
1030
1204
|
name: string;
|
|
1031
|
-
|
|
1205
|
+
type: GeneratorKind | (string & {});
|
|
1032
1206
|
/** Default: "active" */
|
|
1033
|
-
|
|
1034
|
-
/** Default: "2026-08-24" */
|
|
1035
|
-
edition?: string;
|
|
1207
|
+
status?: ("active" | "disabled") | (string & {});
|
|
1036
1208
|
/** Default: "stable" */
|
|
1037
1209
|
release_channel?: ("stable" | "prerelease") | (string & {});
|
|
1038
|
-
|
|
1210
|
+
checks?: TargetChecksRead;
|
|
1039
1211
|
/**
|
|
1040
1212
|
* Target-specific overrides merged over Project.config. GraphQL settings are rejected here and
|
|
1041
|
-
* belong to the
|
|
1213
|
+
* belong to the Spec.
|
|
1042
1214
|
*/
|
|
1043
1215
|
config?: TargetConfigRead | null;
|
|
1044
1216
|
deliveries?: DeliveryInputRead[];
|
|
@@ -1046,63 +1218,101 @@ export interface InitialTargetFieldsRead {
|
|
|
1046
1218
|
|
|
1047
1219
|
export interface TargetUpdateRequest {
|
|
1048
1220
|
name?: string;
|
|
1049
|
-
|
|
1050
|
-
edition?: string;
|
|
1221
|
+
status?: "active" | "disabled";
|
|
1051
1222
|
release_channel?: "stable" | "prerelease";
|
|
1052
|
-
|
|
1223
|
+
checks?: TargetChecks;
|
|
1053
1224
|
/**
|
|
1054
|
-
*
|
|
1055
|
-
* belong to the
|
|
1225
|
+
* Replaces the complete stored override object. Send null or an empty object to resume Project
|
|
1226
|
+
* inheritance. Effective values merge over Project.config; GraphQL settings belong to the Spec.
|
|
1056
1227
|
*/
|
|
1057
1228
|
config?: TargetConfig | null;
|
|
1229
|
+
/**
|
|
1230
|
+
* Replaces the Delivery set; include each kind you want to keep. Retained kinds preserve their
|
|
1231
|
+
* ID, creation time, and hosted URL. Each supplied Delivery replaces its configuration, so
|
|
1232
|
+
* omitted optional settings reset to their defaults. Omit deliveries to keep the existing set, or
|
|
1233
|
+
* send [] to remove all Deliveries. Removing and later recreating a kind allocates a new ID and,
|
|
1234
|
+
* for hosted_mcp, a new URL.
|
|
1235
|
+
*/
|
|
1058
1236
|
deliveries?: DeliveryInput[];
|
|
1059
1237
|
}
|
|
1060
1238
|
|
|
1061
1239
|
/** Response shape for TargetUpdateRequest. */
|
|
1062
1240
|
export interface TargetUpdateRequestRead {
|
|
1063
1241
|
name?: string;
|
|
1064
|
-
|
|
1065
|
-
edition?: string;
|
|
1242
|
+
status?: ("active" | "disabled") | (string & {});
|
|
1066
1243
|
release_channel?: ("stable" | "prerelease") | (string & {});
|
|
1067
|
-
|
|
1244
|
+
checks?: TargetChecksRead;
|
|
1068
1245
|
/**
|
|
1069
|
-
*
|
|
1070
|
-
* belong to the
|
|
1246
|
+
* Replaces the complete stored override object. Send null or an empty object to resume Project
|
|
1247
|
+
* inheritance. Effective values merge over Project.config; GraphQL settings belong to the Spec.
|
|
1071
1248
|
*/
|
|
1072
1249
|
config?: TargetConfigRead | null;
|
|
1250
|
+
/**
|
|
1251
|
+
* Replaces the Delivery set; include each kind you want to keep. Retained kinds preserve their
|
|
1252
|
+
* ID, creation time, and hosted URL. Each supplied Delivery replaces its configuration, so
|
|
1253
|
+
* omitted optional settings reset to their defaults. Omit deliveries to keep the existing set, or
|
|
1254
|
+
* send [] to remove all Deliveries. Removing and later recreating a kind allocates a new ID and,
|
|
1255
|
+
* for hosted_mcp, a new URL.
|
|
1256
|
+
*/
|
|
1073
1257
|
deliveries?: DeliveryInputRead[];
|
|
1074
1258
|
}
|
|
1075
1259
|
|
|
1260
|
+
/**
|
|
1261
|
+
* All Targets follow reviewed SemVer. Before 1.0.0, breaking changes require a minor version; the
|
|
1262
|
+
* policy is fixed rather than configurable.
|
|
1263
|
+
*/
|
|
1076
1264
|
export interface Target {
|
|
1077
1265
|
id: TargetId;
|
|
1078
1266
|
object: "target";
|
|
1079
1267
|
project_id: ProjectId;
|
|
1080
|
-
|
|
1268
|
+
spec_id: SpecId;
|
|
1081
1269
|
name: string;
|
|
1082
|
-
|
|
1083
|
-
|
|
1084
|
-
|
|
1270
|
+
type: GeneratorKind;
|
|
1271
|
+
/**
|
|
1272
|
+
* Present only on a go_cli Target, naming the sibling Go SDK Target the CLI is generated against.
|
|
1273
|
+
* Every other Target type reports null.
|
|
1274
|
+
*/
|
|
1275
|
+
dependency: TargetDependency | null;
|
|
1276
|
+
status: "active" | "disabled";
|
|
1085
1277
|
release_channel: "stable" | "prerelease";
|
|
1086
|
-
version_policy: {
|
|
1087
|
-
mode: "reviewed_semver";
|
|
1088
|
-
pre1_breaking: "minor";
|
|
1089
|
-
};
|
|
1090
1278
|
/**
|
|
1091
|
-
*
|
|
1092
|
-
*
|
|
1093
|
-
* @deprecated
|
|
1279
|
+
* Read-only version of the Target's latest release, or null before its first release. Publishing
|
|
1280
|
+
* status is separate; inspect the release for its results.
|
|
1094
1281
|
*/
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
/**
|
|
1100
|
-
|
|
1282
|
+
version_current: string | null;
|
|
1283
|
+
/** The Target's open Draft. After a merge it names the next Draft. */
|
|
1284
|
+
draft_id: DraftId;
|
|
1285
|
+
checks: TargetChecksResponse;
|
|
1286
|
+
/**
|
|
1287
|
+
* Target-specific overrides merged over Project.config. GraphQL settings are Spec-owned and never
|
|
1288
|
+
* appear here.
|
|
1289
|
+
*/
|
|
1290
|
+
config: TargetConfigResponse | null;
|
|
1291
|
+
/** At most one repository and one hosted MCP Delivery. */
|
|
1292
|
+
deliveries: Delivery[];
|
|
1293
|
+
/** Format: date-time */
|
|
1294
|
+
created_at: string;
|
|
1295
|
+
/** Format: date-time */
|
|
1296
|
+
updated_at: string;
|
|
1297
|
+
request_id?: RequestId;
|
|
1298
|
+
}
|
|
1299
|
+
|
|
1300
|
+
/** Request shape for Target. */
|
|
1301
|
+
export interface TargetWrite {
|
|
1302
|
+
id: TargetId;
|
|
1303
|
+
object: "target";
|
|
1304
|
+
project_id: ProjectId;
|
|
1305
|
+
spec_id: SpecId;
|
|
1306
|
+
name: string;
|
|
1307
|
+
type: GeneratorKind;
|
|
1308
|
+
status: "active" | "disabled";
|
|
1309
|
+
release_channel: "stable" | "prerelease";
|
|
1310
|
+
checks: TargetChecksResponse;
|
|
1101
1311
|
/**
|
|
1102
|
-
* Target-specific overrides merged over Project.config. GraphQL settings are
|
|
1103
|
-
*
|
|
1312
|
+
* Target-specific overrides merged over Project.config. GraphQL settings are Spec-owned and never
|
|
1313
|
+
* appear here.
|
|
1104
1314
|
*/
|
|
1105
|
-
config:
|
|
1315
|
+
config: TargetConfigResponse | null;
|
|
1106
1316
|
/** At most one repository and one hosted MCP Delivery. */
|
|
1107
1317
|
deliveries: Delivery[];
|
|
1108
1318
|
/** Format: date-time */
|
|
@@ -1117,32 +1327,29 @@ export interface TargetRead {
|
|
|
1117
1327
|
id: TargetId;
|
|
1118
1328
|
object: "target" | (string & {});
|
|
1119
1329
|
project_id: ProjectId;
|
|
1120
|
-
|
|
1330
|
+
spec_id: SpecId;
|
|
1121
1331
|
name: string;
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1332
|
+
type: GeneratorKind | (string & {});
|
|
1333
|
+
/**
|
|
1334
|
+
* Present only on a go_cli Target, naming the sibling Go SDK Target the CLI is generated against.
|
|
1335
|
+
* Every other Target type reports null.
|
|
1336
|
+
*/
|
|
1337
|
+
dependency: TargetDependencyRead | null;
|
|
1338
|
+
status: ("active" | "disabled") | (string & {});
|
|
1125
1339
|
release_channel: ("stable" | "prerelease") | (string & {});
|
|
1126
|
-
version_policy: {
|
|
1127
|
-
mode: "reviewed_semver" | (string & {});
|
|
1128
|
-
pre1_breaking: "minor" | (string & {});
|
|
1129
|
-
};
|
|
1130
1340
|
/**
|
|
1131
|
-
*
|
|
1132
|
-
*
|
|
1133
|
-
* @deprecated
|
|
1341
|
+
* Read-only version of the Target's latest release, or null before its first release. Publishing
|
|
1342
|
+
* status is separate; inspect the release for its results.
|
|
1134
1343
|
*/
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
/** Optimistic concurrency revision for Draft selections. */
|
|
1140
|
-
release_revision: number;
|
|
1344
|
+
version_current: string | null;
|
|
1345
|
+
/** The Target's open Draft. After a merge it names the next Draft. */
|
|
1346
|
+
draft_id: DraftId;
|
|
1347
|
+
checks: TargetChecksResponseRead;
|
|
1141
1348
|
/**
|
|
1142
|
-
* Target-specific overrides merged over Project.config. GraphQL settings are
|
|
1143
|
-
*
|
|
1349
|
+
* Target-specific overrides merged over Project.config. GraphQL settings are Spec-owned and never
|
|
1350
|
+
* appear here.
|
|
1144
1351
|
*/
|
|
1145
|
-
config:
|
|
1352
|
+
config: TargetConfigResponseRead | null;
|
|
1146
1353
|
/** At most one repository and one hosted MCP Delivery. */
|
|
1147
1354
|
deliveries: DeliveryRead[];
|
|
1148
1355
|
/** Format: date-time */
|
|
@@ -1154,9 +1361,63 @@ export interface TargetRead {
|
|
|
1154
1361
|
|
|
1155
1362
|
export type TargetResponse = Target & ResponseMetadata;
|
|
1156
1363
|
|
|
1364
|
+
/** Request shape for TargetResponse. */
|
|
1365
|
+
export type TargetResponseWrite = TargetWrite & ResponseMetadata;
|
|
1366
|
+
|
|
1157
1367
|
/** Response shape for TargetResponse. */
|
|
1158
1368
|
export type TargetResponseRead = TargetRead & ResponseMetadata;
|
|
1159
1369
|
|
|
1370
|
+
export interface DeliveryList {
|
|
1371
|
+
object: ListObject;
|
|
1372
|
+
data: Delivery[];
|
|
1373
|
+
has_more: boolean;
|
|
1374
|
+
next_cursor: string | null;
|
|
1375
|
+
request_id: RequestId;
|
|
1376
|
+
}
|
|
1377
|
+
|
|
1378
|
+
/** Response shape for DeliveryList. */
|
|
1379
|
+
export interface DeliveryListRead {
|
|
1380
|
+
object: ListObject;
|
|
1381
|
+
data: DeliveryRead[];
|
|
1382
|
+
has_more: boolean;
|
|
1383
|
+
next_cursor: string | null;
|
|
1384
|
+
request_id: RequestId;
|
|
1385
|
+
}
|
|
1386
|
+
|
|
1387
|
+
export interface PublicationList {
|
|
1388
|
+
object: ListObject;
|
|
1389
|
+
data: Publication[];
|
|
1390
|
+
has_more: boolean;
|
|
1391
|
+
next_cursor: string | null;
|
|
1392
|
+
request_id: RequestId;
|
|
1393
|
+
}
|
|
1394
|
+
|
|
1395
|
+
/** Response shape for PublicationList. */
|
|
1396
|
+
export interface PublicationListRead {
|
|
1397
|
+
object: ListObject;
|
|
1398
|
+
data: PublicationRead[];
|
|
1399
|
+
has_more: boolean;
|
|
1400
|
+
next_cursor: string | null;
|
|
1401
|
+
request_id: RequestId;
|
|
1402
|
+
}
|
|
1403
|
+
|
|
1404
|
+
export interface DraftList {
|
|
1405
|
+
object: ListObject;
|
|
1406
|
+
data: Draft[];
|
|
1407
|
+
has_more: boolean;
|
|
1408
|
+
next_cursor: string | null;
|
|
1409
|
+
request_id: RequestId;
|
|
1410
|
+
}
|
|
1411
|
+
|
|
1412
|
+
/** Response shape for DraftList. */
|
|
1413
|
+
export interface DraftListRead {
|
|
1414
|
+
object: ListObject;
|
|
1415
|
+
data: DraftRead[];
|
|
1416
|
+
has_more: boolean;
|
|
1417
|
+
next_cursor: string | null;
|
|
1418
|
+
request_id: RequestId;
|
|
1419
|
+
}
|
|
1420
|
+
|
|
1160
1421
|
export interface TargetList {
|
|
1161
1422
|
object: ListObject;
|
|
1162
1423
|
data: Target[];
|
|
@@ -1165,6 +1426,15 @@ export interface TargetList {
|
|
|
1165
1426
|
request_id: RequestId;
|
|
1166
1427
|
}
|
|
1167
1428
|
|
|
1429
|
+
/** Request shape for TargetList. */
|
|
1430
|
+
export interface TargetListWrite {
|
|
1431
|
+
object: ListObject;
|
|
1432
|
+
data: TargetWrite[];
|
|
1433
|
+
has_more: boolean;
|
|
1434
|
+
next_cursor: string | null;
|
|
1435
|
+
request_id: RequestId;
|
|
1436
|
+
}
|
|
1437
|
+
|
|
1168
1438
|
/** Response shape for TargetList. */
|
|
1169
1439
|
export interface TargetListRead {
|
|
1170
1440
|
object: ListObject;
|
|
@@ -1174,9 +1444,9 @@ export interface TargetListRead {
|
|
|
1174
1444
|
request_id: RequestId;
|
|
1175
1445
|
}
|
|
1176
1446
|
|
|
1177
|
-
export interface
|
|
1178
|
-
id:
|
|
1179
|
-
object: "
|
|
1447
|
+
export interface Release {
|
|
1448
|
+
id: ReleaseId;
|
|
1449
|
+
object: "release";
|
|
1180
1450
|
target_id: TargetId;
|
|
1181
1451
|
/** Null only for a verified release imported during package adoption. */
|
|
1182
1452
|
generation_id: GenerationId | null;
|
|
@@ -1184,18 +1454,33 @@ export interface TargetRelease {
|
|
|
1184
1454
|
/** Immutable package version released from this Target. */
|
|
1185
1455
|
version: string;
|
|
1186
1456
|
channel: "stable" | "prerelease";
|
|
1187
|
-
|
|
1188
|
-
|
|
1189
|
-
|
|
1190
|
-
|
|
1191
|
-
|
|
1192
|
-
|
|
1457
|
+
repository: RepositoryReferenceResponse | null;
|
|
1458
|
+
spec_revision_id: SpecRevisionId | null;
|
|
1459
|
+
/**
|
|
1460
|
+
* Git commit containing the accepted package. Compare it with the Delivery repository history or
|
|
1461
|
+
* checked-out commit.
|
|
1462
|
+
*/
|
|
1463
|
+
commit_sha: string;
|
|
1464
|
+
checks: PackageCheck[];
|
|
1465
|
+
approvals: CompatibilityApproval[];
|
|
1466
|
+
/**
|
|
1467
|
+
* For an adopted Release, compare the tag and registry URL with the published package and its
|
|
1468
|
+
* artifact digest. Null for a Release created by Typeship.
|
|
1469
|
+
*/
|
|
1193
1470
|
import_provenance: {
|
|
1471
|
+
/** Git tag to compare with the repository release, if available. */
|
|
1194
1472
|
tag: string | null;
|
|
1195
|
-
/**
|
|
1473
|
+
/**
|
|
1474
|
+
* Published package page to inspect, if available.
|
|
1475
|
+
* Format: uri
|
|
1476
|
+
*/
|
|
1196
1477
|
registry_url: string | null;
|
|
1478
|
+
/** Published artifact digest to compare with registry metadata, if available. */
|
|
1197
1479
|
artifact_digest: string | null;
|
|
1198
|
-
/**
|
|
1480
|
+
/**
|
|
1481
|
+
* When Typeship recorded the adopted package.
|
|
1482
|
+
* Format: date-time
|
|
1483
|
+
*/
|
|
1199
1484
|
imported_at: string | null;
|
|
1200
1485
|
}
|
|
1201
1486
|
| null;
|
|
@@ -1205,10 +1490,10 @@ export interface TargetRelease {
|
|
|
1205
1490
|
request_id?: RequestId;
|
|
1206
1491
|
}
|
|
1207
1492
|
|
|
1208
|
-
/** Response shape for
|
|
1209
|
-
export interface
|
|
1210
|
-
id:
|
|
1211
|
-
object: "
|
|
1493
|
+
/** Response shape for Release. */
|
|
1494
|
+
export interface ReleaseRead {
|
|
1495
|
+
id: ReleaseId;
|
|
1496
|
+
object: "release" | (string & {});
|
|
1212
1497
|
target_id: TargetId;
|
|
1213
1498
|
/** Null only for a verified release imported during package adoption. */
|
|
1214
1499
|
generation_id: GenerationId | null;
|
|
@@ -1216,18 +1501,33 @@ export interface TargetReleaseRead {
|
|
|
1216
1501
|
/** Immutable package version released from this Target. */
|
|
1217
1502
|
version: string;
|
|
1218
1503
|
channel: ("stable" | "prerelease") | (string & {});
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1504
|
+
repository: RepositoryReferenceResponseRead | null;
|
|
1505
|
+
spec_revision_id: SpecRevisionId | null;
|
|
1506
|
+
/**
|
|
1507
|
+
* Git commit containing the accepted package. Compare it with the Delivery repository history or
|
|
1508
|
+
* checked-out commit.
|
|
1509
|
+
*/
|
|
1510
|
+
commit_sha: string;
|
|
1511
|
+
checks: PackageCheckRead[];
|
|
1512
|
+
approvals: CompatibilityApprovalRead[];
|
|
1513
|
+
/**
|
|
1514
|
+
* For an adopted Release, compare the tag and registry URL with the published package and its
|
|
1515
|
+
* artifact digest. Null for a Release created by Typeship.
|
|
1516
|
+
*/
|
|
1225
1517
|
import_provenance: {
|
|
1518
|
+
/** Git tag to compare with the repository release, if available. */
|
|
1226
1519
|
tag: string | null;
|
|
1227
|
-
/**
|
|
1520
|
+
/**
|
|
1521
|
+
* Published package page to inspect, if available.
|
|
1522
|
+
* Format: uri
|
|
1523
|
+
*/
|
|
1228
1524
|
registry_url: string | null;
|
|
1525
|
+
/** Published artifact digest to compare with registry metadata, if available. */
|
|
1229
1526
|
artifact_digest: string | null;
|
|
1230
|
-
/**
|
|
1527
|
+
/**
|
|
1528
|
+
* When Typeship recorded the adopted package.
|
|
1529
|
+
* Format: date-time
|
|
1530
|
+
*/
|
|
1231
1531
|
imported_at: string | null;
|
|
1232
1532
|
}
|
|
1233
1533
|
| null;
|
|
@@ -1237,23 +1537,23 @@ export interface TargetReleaseRead {
|
|
|
1237
1537
|
request_id?: RequestId;
|
|
1238
1538
|
}
|
|
1239
1539
|
|
|
1240
|
-
export type
|
|
1540
|
+
export type ReleaseResponse = Release & ResponseMetadata;
|
|
1241
1541
|
|
|
1242
|
-
/** Response shape for
|
|
1243
|
-
export type
|
|
1542
|
+
/** Response shape for ReleaseResponse. */
|
|
1543
|
+
export type ReleaseResponseRead = ReleaseRead & ResponseMetadata;
|
|
1244
1544
|
|
|
1245
|
-
export interface
|
|
1545
|
+
export interface ReleaseList {
|
|
1246
1546
|
object: ListObject;
|
|
1247
|
-
data:
|
|
1547
|
+
data: Release[];
|
|
1248
1548
|
has_more: boolean;
|
|
1249
1549
|
next_cursor: string | null;
|
|
1250
1550
|
request_id: RequestId;
|
|
1251
1551
|
}
|
|
1252
1552
|
|
|
1253
|
-
/** Response shape for
|
|
1254
|
-
export interface
|
|
1553
|
+
/** Response shape for ReleaseList. */
|
|
1554
|
+
export interface ReleaseListRead {
|
|
1255
1555
|
object: ListObject;
|
|
1256
|
-
data:
|
|
1556
|
+
data: ReleaseRead[];
|
|
1257
1557
|
has_more: boolean;
|
|
1258
1558
|
next_cursor: string | null;
|
|
1259
1559
|
request_id: RequestId;
|
|
@@ -1262,20 +1562,25 @@ export interface TargetReleaseListRead {
|
|
|
1262
1562
|
export interface Publication {
|
|
1263
1563
|
id: PublicationId;
|
|
1264
1564
|
object: "publication";
|
|
1265
|
-
|
|
1565
|
+
release_id: ReleaseId;
|
|
1266
1566
|
destination: "github" | "npm" | "pypi" | "go" | "mcp";
|
|
1267
|
-
|
|
1567
|
+
status: "pending" | "publishing" | "published" | "failed" | "disabled";
|
|
1268
1568
|
attempt: number;
|
|
1269
1569
|
/** Format: uri */
|
|
1270
1570
|
run_url: string | null;
|
|
1271
1571
|
/** Format: uri */
|
|
1272
1572
|
registry_url: string | null;
|
|
1273
1573
|
artifact_digest: string | null;
|
|
1274
|
-
|
|
1574
|
+
/** Recorded failures. Empty when this resource has no recorded failure. */
|
|
1575
|
+
errors: DomainError[];
|
|
1275
1576
|
/** Format: date-time */
|
|
1276
1577
|
started_at: string | null;
|
|
1277
1578
|
/** Format: date-time */
|
|
1278
1579
|
finished_at: string | null;
|
|
1580
|
+
/** Milliseconds from started_at to finished_at; null until the attempt finishes. */
|
|
1581
|
+
runtime_ms: number | null;
|
|
1582
|
+
/** Format: date-time */
|
|
1583
|
+
created_at: string;
|
|
1279
1584
|
/** Format: date-time */
|
|
1280
1585
|
updated_at: string;
|
|
1281
1586
|
}
|
|
@@ -1284,235 +1589,356 @@ export interface Publication {
|
|
|
1284
1589
|
export interface PublicationRead {
|
|
1285
1590
|
id: PublicationId;
|
|
1286
1591
|
object: "publication" | (string & {});
|
|
1287
|
-
|
|
1592
|
+
release_id: ReleaseId;
|
|
1288
1593
|
destination: ("github" | "npm" | "pypi" | "go" | "mcp") | (string & {});
|
|
1289
|
-
|
|
1594
|
+
status: ("pending" | "publishing" | "published" | "failed" | "disabled") | (string & {});
|
|
1290
1595
|
attempt: number;
|
|
1291
1596
|
/** Format: uri */
|
|
1292
1597
|
run_url: string | null;
|
|
1293
1598
|
/** Format: uri */
|
|
1294
1599
|
registry_url: string | null;
|
|
1295
1600
|
artifact_digest: string | null;
|
|
1296
|
-
|
|
1601
|
+
/** Recorded failures. Empty when this resource has no recorded failure. */
|
|
1602
|
+
errors: DomainErrorRead[];
|
|
1297
1603
|
/** Format: date-time */
|
|
1298
1604
|
started_at: string | null;
|
|
1299
1605
|
/** Format: date-time */
|
|
1300
1606
|
finished_at: string | null;
|
|
1607
|
+
/** Milliseconds from started_at to finished_at; null until the attempt finishes. */
|
|
1608
|
+
runtime_ms: number | null;
|
|
1609
|
+
/** Format: date-time */
|
|
1610
|
+
created_at: string;
|
|
1301
1611
|
/** Format: date-time */
|
|
1302
1612
|
updated_at: string;
|
|
1303
1613
|
}
|
|
1304
1614
|
|
|
1305
|
-
export type
|
|
1306
|
-
|
|
1615
|
+
export type PublicationResponse = Publication & ResponseMetadata;
|
|
1616
|
+
|
|
1617
|
+
/** Response shape for PublicationResponse. */
|
|
1618
|
+
export type PublicationResponseRead = PublicationRead & ResponseMetadata;
|
|
1619
|
+
|
|
1620
|
+
/**
|
|
1621
|
+
* none: the open Draft has no pending change; generate the Target to start one. working: Typeship
|
|
1622
|
+
* is generating, carrying repository edits forward, applying decisions, or checking the Draft;
|
|
1623
|
+
* retrieve it again. action_required: use the typed reason to find the customer's next action.
|
|
1624
|
+
* ready: required checks passed on head_sha; merge the pull request. merged: the pull request
|
|
1625
|
+
* merged and the Draft is final; retrieve the Target for the draft_id of its next Draft.
|
|
1626
|
+
*/
|
|
1627
|
+
export const DraftStatus = {
|
|
1628
|
+
NONE: "none",
|
|
1629
|
+
WORKING: "working",
|
|
1630
|
+
ACTION_REQUIRED: "action_required",
|
|
1631
|
+
READY: "ready",
|
|
1632
|
+
MERGED: "merged",
|
|
1633
|
+
} as const;
|
|
1634
|
+
export type DraftStatus = (typeof DraftStatus)[keyof typeof DraftStatus];
|
|
1635
|
+
|
|
1636
|
+
/**
|
|
1637
|
+
* conflict: resolve the listed files. checks_failed: correct failed package checks. review_failed:
|
|
1638
|
+
* correct the Draft title, version, or other readiness finding. checks_unavailable: restore a
|
|
1639
|
+
* required check. history_rewritten: review the affected files and approve recovery.
|
|
1640
|
+
*/
|
|
1641
|
+
export const DraftActionReason = {
|
|
1642
|
+
CONFLICT: "conflict",
|
|
1643
|
+
CHECKS_FAILED: "checks_failed",
|
|
1644
|
+
REVIEW_FAILED: "review_failed",
|
|
1645
|
+
CHECKS_UNAVAILABLE: "checks_unavailable",
|
|
1646
|
+
HISTORY_REWRITTEN: "history_rewritten",
|
|
1647
|
+
} as const;
|
|
1648
|
+
export type DraftActionReason = (typeof DraftActionReason)[keyof typeof DraftActionReason];
|
|
1649
|
+
|
|
1650
|
+
export interface DraftConflicts {
|
|
1651
|
+
/** Conflicts in the current merge stage. */
|
|
1652
|
+
total: number;
|
|
1653
|
+
/** Conflicts with a saved decision for head_sha. */
|
|
1654
|
+
decided: number;
|
|
1307
1655
|
}
|
|
1308
|
-
| {
|
|
1309
|
-
mode: "exact";
|
|
1310
|
-
version: string;
|
|
1311
|
-
source: "console" | "api" | "github" | null;
|
|
1312
|
-
actor: string | null;
|
|
1313
|
-
};
|
|
1314
1656
|
|
|
1315
|
-
/**
|
|
1316
|
-
export
|
|
1317
|
-
|
|
1657
|
+
/** The approval inputs for a default-branch history rewrite. */
|
|
1658
|
+
export interface DraftHistoryRecovery {
|
|
1659
|
+
/** Rewritten default-branch commit. Send it as expected_default_sha. */
|
|
1660
|
+
default_sha: string;
|
|
1661
|
+
/** Draft commit Typeship last observed. Send it as expected_head_sha. */
|
|
1662
|
+
head_sha: string | null;
|
|
1663
|
+
/** Existing Draft branch that stays available after recovery opens a new Draft. */
|
|
1664
|
+
preserved_branch: string | null;
|
|
1665
|
+
}
|
|
1666
|
+
|
|
1667
|
+
/**
|
|
1668
|
+
* Readiness decision for the Draft's head_sha. Null readiness on the Draft means no Draft has been
|
|
1669
|
+
* generated.
|
|
1670
|
+
*/
|
|
1671
|
+
export interface DraftReadiness {
|
|
1672
|
+
/**
|
|
1673
|
+
* success means required checks passed; failure means the Draft needs correction or review; error
|
|
1674
|
+
* means assessment could not finish; pending means checks have not finished.
|
|
1675
|
+
*/
|
|
1676
|
+
status: "success" | "failure" | "error" | "pending";
|
|
1677
|
+
/** Human-readable explanation of the current decision. Do not parse it for control flow. */
|
|
1678
|
+
description: string;
|
|
1679
|
+
/** API surface comparison against the latest release. unknown means analysis is unavailable. */
|
|
1680
|
+
compatibility_api: "compatible" | "breaking" | "unknown";
|
|
1681
|
+
/**
|
|
1682
|
+
* Package and supported SDK source comparison against the latest release. unknown means analysis
|
|
1683
|
+
* is incomplete or unavailable.
|
|
1684
|
+
*/
|
|
1685
|
+
compatibility_package: "compatible" | "breaking" | "unknown";
|
|
1686
|
+
/** Whether the version satisfies the assessed change. Null when no verdict is available. */
|
|
1687
|
+
version_correct: boolean | null;
|
|
1688
|
+
/**
|
|
1689
|
+
* Minimum assessed version bump. Approval never waives an insufficient bump. Null when no bump
|
|
1690
|
+
* has been determined.
|
|
1691
|
+
*/
|
|
1692
|
+
bump_required: "major" | "minor" | "patch" | null;
|
|
1693
|
+
/** Latest release version used for the comparison. Null before the first release. */
|
|
1694
|
+
version_previous: string | null;
|
|
1695
|
+
/** Draft title error that must be corrected before release. Null when none is recorded. */
|
|
1696
|
+
title_error: string | null;
|
|
1697
|
+
}
|
|
1698
|
+
|
|
1699
|
+
/** Response shape for DraftReadiness. */
|
|
1700
|
+
export interface DraftReadinessRead {
|
|
1701
|
+
/**
|
|
1702
|
+
* success means required checks passed; failure means the Draft needs correction or review; error
|
|
1703
|
+
* means assessment could not finish; pending means checks have not finished.
|
|
1704
|
+
*/
|
|
1705
|
+
status: ("success" | "failure" | "error" | "pending") | (string & {});
|
|
1706
|
+
/** Human-readable explanation of the current decision. Do not parse it for control flow. */
|
|
1707
|
+
description: string;
|
|
1708
|
+
/** API surface comparison against the latest release. unknown means analysis is unavailable. */
|
|
1709
|
+
compatibility_api: ("compatible" | "breaking" | "unknown") | (string & {});
|
|
1710
|
+
/**
|
|
1711
|
+
* Package and supported SDK source comparison against the latest release. unknown means analysis
|
|
1712
|
+
* is incomplete or unavailable.
|
|
1713
|
+
*/
|
|
1714
|
+
compatibility_package: ("compatible" | "breaking" | "unknown") | (string & {});
|
|
1715
|
+
/** Whether the version satisfies the assessed change. Null when no verdict is available. */
|
|
1716
|
+
version_correct: boolean | null;
|
|
1717
|
+
/**
|
|
1718
|
+
* Minimum assessed version bump. Approval never waives an insufficient bump. Null when no bump
|
|
1719
|
+
* has been determined.
|
|
1720
|
+
*/
|
|
1721
|
+
bump_required: ("major" | "minor" | "patch" | null) | (string & {}) | null;
|
|
1722
|
+
/** Latest release version used for the comparison. Null before the first release. */
|
|
1723
|
+
version_previous: string | null;
|
|
1724
|
+
/** Draft title error that must be corrected before release. Null when none is recorded. */
|
|
1725
|
+
title_error: string | null;
|
|
1318
1726
|
}
|
|
1319
|
-
| {
|
|
1320
|
-
mode: "exact" | (string & {});
|
|
1321
|
-
version: string;
|
|
1322
|
-
source: ("console" | "api" | "github" | null) | (string & {}) | null;
|
|
1323
|
-
actor: string | null;
|
|
1324
|
-
};
|
|
1325
1727
|
|
|
1326
|
-
|
|
1327
|
-
|
|
1728
|
+
/**
|
|
1729
|
+
* One reviewed package change for a Target. A Target has one open Draft, named by its draft_id;
|
|
1730
|
+
* when the pull request merges, the Draft becomes merged and final, and the Target opens a new
|
|
1731
|
+
* Draft with a new ID.
|
|
1732
|
+
*/
|
|
1733
|
+
export interface Draft {
|
|
1734
|
+
id: DraftId;
|
|
1735
|
+
object: "draft";
|
|
1328
1736
|
target_id: TargetId;
|
|
1329
|
-
|
|
1330
|
-
|
|
1331
|
-
|
|
1332
|
-
|
|
1333
|
-
|
|
1737
|
+
project_id: ProjectId;
|
|
1738
|
+
status: DraftStatus;
|
|
1739
|
+
/** Present and required when status is action_required; absent otherwise. */
|
|
1740
|
+
reason?: DraftActionReason;
|
|
1741
|
+
/** Next version for this Draft, or null before a version is selected. */
|
|
1742
|
+
version_next: string | null;
|
|
1743
|
+
/** Where version_next was selected; null once the Draft merged. */
|
|
1744
|
+
version_source: "automatic" | "console" | "api" | "github" | null;
|
|
1745
|
+
readiness: DraftReadiness | null;
|
|
1334
1746
|
changes: {
|
|
1335
|
-
/** Cumulative changelog against
|
|
1747
|
+
/** Cumulative changelog against the latest release. */
|
|
1336
1748
|
changelog?: string | null;
|
|
1337
1749
|
breaking_count?: number | null;
|
|
1338
|
-
|
|
1750
|
+
version_previous?: string | null;
|
|
1339
1751
|
}
|
|
1340
1752
|
| null;
|
|
1341
|
-
|
|
1342
|
-
|
|
1343
|
-
|
|
1753
|
+
/**
|
|
1754
|
+
* Draft commit that readiness, checks, and conflicts describe. Send it as expected_head_sha when
|
|
1755
|
+
* resolving or discarding.
|
|
1756
|
+
*/
|
|
1757
|
+
head_sha: string | null;
|
|
1758
|
+
/** The Draft pull request in the destination repository, or null before one is opened. */
|
|
1759
|
+
pull_request: {
|
|
1760
|
+
/** Format: uri */
|
|
1761
|
+
url: string;
|
|
1762
|
+
number: number;
|
|
1763
|
+
} | null;
|
|
1764
|
+
/** Generation whose package this Draft contains. */
|
|
1765
|
+
generation_id: GenerationId | null;
|
|
1766
|
+
/**
|
|
1767
|
+
* Release this Draft created when it merged; null while open, or when a merge changed only tests
|
|
1768
|
+
* or checks.
|
|
1769
|
+
*/
|
|
1770
|
+
release_id: ReleaseId | null;
|
|
1771
|
+
/**
|
|
1772
|
+
* When the Draft opened.
|
|
1773
|
+
* Format: date-time
|
|
1774
|
+
*/
|
|
1775
|
+
created_at: string;
|
|
1776
|
+
/** Format: date-time */
|
|
1777
|
+
updated_at: string;
|
|
1778
|
+
/** Conflict counts for the current merge stage; null when the Draft has no conflicts. */
|
|
1779
|
+
conflicts: DraftConflicts | null;
|
|
1780
|
+
/**
|
|
1781
|
+
* Files where the Draft differs from the last accepted package; null until the Draft is
|
|
1782
|
+
* integrated.
|
|
1783
|
+
*/
|
|
1784
|
+
customized_files: number | null;
|
|
1785
|
+
/** Present only while status is action_required and reason is history_rewritten. */
|
|
1786
|
+
history_recovery: DraftHistoryRecovery | null;
|
|
1344
1787
|
request_id?: RequestId;
|
|
1788
|
+
checks: PackageCheck[];
|
|
1345
1789
|
}
|
|
1346
1790
|
|
|
1347
|
-
/** Response shape for
|
|
1348
|
-
export interface
|
|
1349
|
-
|
|
1791
|
+
/** Response shape for Draft. */
|
|
1792
|
+
export interface DraftRead {
|
|
1793
|
+
id: DraftId;
|
|
1794
|
+
object: "draft" | (string & {});
|
|
1350
1795
|
target_id: TargetId;
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
|
|
1796
|
+
project_id: ProjectId;
|
|
1797
|
+
status: DraftStatus | (string & {});
|
|
1798
|
+
/** Present and required when status is action_required; absent otherwise. */
|
|
1799
|
+
reason?: DraftActionReason | (string & {});
|
|
1800
|
+
/** Next version for this Draft, or null before a version is selected. */
|
|
1801
|
+
version_next: string | null;
|
|
1802
|
+
/** Where version_next was selected; null once the Draft merged. */
|
|
1803
|
+
version_source: ("automatic" | "console" | "api" | "github" | null) | (string & {}) | null;
|
|
1804
|
+
readiness: DraftReadinessRead | null;
|
|
1356
1805
|
changes: {
|
|
1357
|
-
/** Cumulative changelog against
|
|
1806
|
+
/** Cumulative changelog against the latest release. */
|
|
1358
1807
|
changelog?: string | null;
|
|
1359
1808
|
breaking_count?: number | null;
|
|
1360
|
-
|
|
1809
|
+
version_previous?: string | null;
|
|
1361
1810
|
}
|
|
1362
1811
|
| null;
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
1812
|
+
/**
|
|
1813
|
+
* Draft commit that readiness, checks, and conflicts describe. Send it as expected_head_sha when
|
|
1814
|
+
* resolving or discarding.
|
|
1815
|
+
*/
|
|
1816
|
+
head_sha: string | null;
|
|
1817
|
+
/** The Draft pull request in the destination repository, or null before one is opened. */
|
|
1818
|
+
pull_request: {
|
|
1819
|
+
/** Format: uri */
|
|
1820
|
+
url: string;
|
|
1821
|
+
number: number;
|
|
1822
|
+
} | null;
|
|
1823
|
+
/** Generation whose package this Draft contains. */
|
|
1824
|
+
generation_id: GenerationId | null;
|
|
1825
|
+
/**
|
|
1826
|
+
* Release this Draft created when it merged; null while open, or when a merge changed only tests
|
|
1827
|
+
* or checks.
|
|
1828
|
+
*/
|
|
1829
|
+
release_id: ReleaseId | null;
|
|
1830
|
+
/**
|
|
1831
|
+
* When the Draft opened.
|
|
1832
|
+
* Format: date-time
|
|
1833
|
+
*/
|
|
1834
|
+
created_at: string;
|
|
1835
|
+
/** Format: date-time */
|
|
1836
|
+
updated_at: string;
|
|
1837
|
+
/** Conflict counts for the current merge stage; null when the Draft has no conflicts. */
|
|
1838
|
+
conflicts: DraftConflicts | null;
|
|
1839
|
+
/**
|
|
1840
|
+
* Files where the Draft differs from the last accepted package; null until the Draft is
|
|
1841
|
+
* integrated.
|
|
1842
|
+
*/
|
|
1843
|
+
customized_files: number | null;
|
|
1844
|
+
/** Present only while status is action_required and reason is history_rewritten. */
|
|
1845
|
+
history_recovery: DraftHistoryRecovery | null;
|
|
1366
1846
|
request_id?: RequestId;
|
|
1847
|
+
checks: PackageCheckRead[];
|
|
1367
1848
|
}
|
|
1368
1849
|
|
|
1369
|
-
export type
|
|
1850
|
+
export type DraftResponse = Draft & ResponseMetadata;
|
|
1370
1851
|
|
|
1371
|
-
/** Response shape for
|
|
1372
|
-
export type
|
|
1852
|
+
/** Response shape for DraftResponse. */
|
|
1853
|
+
export type DraftResponseRead = DraftRead & ResponseMetadata;
|
|
1373
1854
|
|
|
1374
|
-
export interface
|
|
1855
|
+
export interface DraftUpdateRequest {
|
|
1375
1856
|
/** Exact SemVer, or null to return to automatic selection. */
|
|
1376
|
-
|
|
1377
|
-
expected_revision?: number;
|
|
1378
|
-
}
|
|
1379
|
-
|
|
1380
|
-
export interface TargetAdoption {
|
|
1381
|
-
/** Exact already-published package version to make Current. */
|
|
1382
|
-
version: string;
|
|
1383
|
-
/** Immutable repository tag containing the matching package source. */
|
|
1384
|
-
tag: string;
|
|
1385
|
-
}
|
|
1386
|
-
|
|
1387
|
-
export interface RepositoryHealthIssue {
|
|
1388
|
-
code: "connection_missing"
|
|
1389
|
-
| "definition_unreadable"
|
|
1390
|
-
| "contents_write_missing"
|
|
1391
|
-
| "review_write_missing"
|
|
1392
|
-
| "breaking_acknowledgement_missing"
|
|
1393
|
-
| "provider_unavailable";
|
|
1394
|
-
message: string;
|
|
1395
|
-
}
|
|
1396
|
-
|
|
1397
|
-
/** Response shape for RepositoryHealthIssue. */
|
|
1398
|
-
export interface RepositoryHealthIssueRead {
|
|
1399
|
-
code: ("connection_missing"
|
|
1400
|
-
| "definition_unreadable"
|
|
1401
|
-
| "contents_write_missing"
|
|
1402
|
-
| "review_write_missing"
|
|
1403
|
-
| "breaking_acknowledgement_missing"
|
|
1404
|
-
| "provider_unavailable") | (string & {});
|
|
1405
|
-
message: string;
|
|
1406
|
-
}
|
|
1407
|
-
|
|
1408
|
-
export interface RepositoryHealth {
|
|
1409
|
-
repository: RepositoryReference;
|
|
1410
|
-
roles: Array<"source" | "destination">;
|
|
1411
|
-
status: "ready" | "action_required";
|
|
1412
|
-
default_branch?: string;
|
|
1413
|
-
capabilities?: string[];
|
|
1414
|
-
/**
|
|
1415
|
-
* Whether a source repository has the optional typeship:breaking-approved policy label. Null when
|
|
1416
|
-
* the repository is not a source or labels could not be read.
|
|
1417
|
-
*/
|
|
1418
|
-
breaking_acknowledgement?: boolean | null;
|
|
1419
|
-
definition?: "readable" | "missing";
|
|
1420
|
-
issues: RepositoryHealthIssue[];
|
|
1857
|
+
version_next: string | null;
|
|
1421
1858
|
}
|
|
1422
1859
|
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
status:
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
/**
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
breaking_acknowledgement?: boolean | null;
|
|
1435
|
-
definition?: ("readable" | "missing") | (string & {});
|
|
1436
|
-
issues: RepositoryHealthIssueRead[];
|
|
1860
|
+
export interface PackageCheck {
|
|
1861
|
+
name: string;
|
|
1862
|
+
source: "typeship" | "customer" | "repository" | "compatibility";
|
|
1863
|
+
required: boolean;
|
|
1864
|
+
status: "pending" | "passed" | "failed" | "not_assessed";
|
|
1865
|
+
reason: string;
|
|
1866
|
+
commit_sha: string;
|
|
1867
|
+
/** Format: uri */
|
|
1868
|
+
url: string | null;
|
|
1869
|
+
/** Format: date-time */
|
|
1870
|
+
observed_at: string | null;
|
|
1437
1871
|
}
|
|
1438
1872
|
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1873
|
+
/** Response shape for PackageCheck. */
|
|
1874
|
+
export interface PackageCheckRead {
|
|
1875
|
+
name: string;
|
|
1876
|
+
source: ("typeship" | "customer" | "repository" | "compatibility") | (string & {});
|
|
1877
|
+
required: boolean;
|
|
1878
|
+
status: ("pending" | "passed" | "failed" | "not_assessed") | (string & {});
|
|
1879
|
+
reason: string;
|
|
1880
|
+
commit_sha: string;
|
|
1881
|
+
/** Format: uri */
|
|
1882
|
+
url: string | null;
|
|
1445
1883
|
/** Format: date-time */
|
|
1446
|
-
|
|
1884
|
+
observed_at: string | null;
|
|
1447
1885
|
}
|
|
1448
1886
|
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
status: ("queued" | "processing" | "succeeded" | "failed" | "superseded") | (string & {});
|
|
1455
|
-
error: string | null;
|
|
1887
|
+
export interface CompatibilityApproval {
|
|
1888
|
+
source: "source_pr" | "draft_pr";
|
|
1889
|
+
reason: string;
|
|
1890
|
+
approved_by: string;
|
|
1891
|
+
approved_sha: string;
|
|
1456
1892
|
/** Format: date-time */
|
|
1457
|
-
|
|
1893
|
+
approved_at: string;
|
|
1458
1894
|
}
|
|
1459
1895
|
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
};
|
|
1469
|
-
last_event: RepositoryEventHealth | null;
|
|
1470
|
-
request_id: RequestId;
|
|
1896
|
+
/** Response shape for CompatibilityApproval. */
|
|
1897
|
+
export interface CompatibilityApprovalRead {
|
|
1898
|
+
source: ("source_pr" | "draft_pr") | (string & {});
|
|
1899
|
+
reason: string;
|
|
1900
|
+
approved_by: string;
|
|
1901
|
+
approved_sha: string;
|
|
1902
|
+
/** Format: date-time */
|
|
1903
|
+
approved_at: string;
|
|
1471
1904
|
}
|
|
1472
1905
|
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
|
|
1477
|
-
|
|
1478
|
-
repositories: RepositoryHealthRead[];
|
|
1479
|
-
required_checks: {
|
|
1480
|
-
source: string[];
|
|
1481
|
-
destination: string[];
|
|
1482
|
-
};
|
|
1483
|
-
last_event: RepositoryEventHealthRead | null;
|
|
1484
|
-
request_id: RequestId;
|
|
1906
|
+
export interface TargetAdoption {
|
|
1907
|
+
/** Exact already-published package version to make the latest release. */
|
|
1908
|
+
version: string;
|
|
1909
|
+
/** Immutable repository tag containing the matching package source. */
|
|
1910
|
+
tag: string;
|
|
1485
1911
|
}
|
|
1486
1912
|
|
|
1487
|
-
export interface
|
|
1488
|
-
source:
|
|
1913
|
+
export interface SpecFields {
|
|
1914
|
+
source: SpecSourceInput;
|
|
1489
1915
|
/** Default: [] */
|
|
1490
|
-
patches?:
|
|
1916
|
+
patches?: SpecPatch[];
|
|
1491
1917
|
/** GraphQL-only endpoint, auth, environment, title, and scalar settings. */
|
|
1492
1918
|
graphql?: GraphqlSettings | null;
|
|
1493
1919
|
diagnostic_policy?: DiagnosticPolicy;
|
|
1494
1920
|
}
|
|
1495
1921
|
|
|
1496
|
-
/** Response shape for
|
|
1497
|
-
export interface
|
|
1498
|
-
source:
|
|
1922
|
+
/** Response shape for SpecFields. */
|
|
1923
|
+
export interface SpecFieldsRead {
|
|
1924
|
+
source: SpecSourceInputRead;
|
|
1499
1925
|
/** Default: [] */
|
|
1500
|
-
patches?:
|
|
1926
|
+
patches?: SpecPatchRead[];
|
|
1501
1927
|
/** GraphQL-only endpoint, auth, environment, title, and scalar settings. */
|
|
1502
1928
|
graphql?: GraphqlSettingsRead | null;
|
|
1503
1929
|
diagnostic_policy?: DiagnosticPolicyRead;
|
|
1504
1930
|
}
|
|
1505
1931
|
|
|
1506
|
-
export interface
|
|
1507
|
-
id:
|
|
1508
|
-
object: "
|
|
1932
|
+
export interface Spec {
|
|
1933
|
+
id: SpecId;
|
|
1934
|
+
object: "spec";
|
|
1509
1935
|
project_id: ProjectId;
|
|
1510
|
-
source:
|
|
1936
|
+
source: SpecSource;
|
|
1511
1937
|
format: "openapi" | "graphql" | null;
|
|
1512
|
-
patches:
|
|
1513
|
-
graphql:
|
|
1514
|
-
diagnostic_policy:
|
|
1515
|
-
|
|
1938
|
+
patches: SpecPatchResponse[];
|
|
1939
|
+
graphql: GraphqlSettingsResponse | null;
|
|
1940
|
+
diagnostic_policy: DiagnosticPolicyResponse;
|
|
1941
|
+
revision_latest_id: SpecRevisionId | null;
|
|
1516
1942
|
/** Format: date-time */
|
|
1517
1943
|
created_at: string;
|
|
1518
1944
|
/** Format: date-time */
|
|
@@ -1520,17 +1946,17 @@ export interface Definition {
|
|
|
1520
1946
|
request_id: RequestId;
|
|
1521
1947
|
}
|
|
1522
1948
|
|
|
1523
|
-
/** Request shape for
|
|
1524
|
-
export interface
|
|
1525
|
-
id:
|
|
1526
|
-
object: "
|
|
1949
|
+
/** Request shape for Spec. */
|
|
1950
|
+
export interface SpecWrite {
|
|
1951
|
+
id: SpecId;
|
|
1952
|
+
object: "spec";
|
|
1527
1953
|
project_id: ProjectId;
|
|
1528
|
-
source:
|
|
1954
|
+
source: SpecSourceWrite;
|
|
1529
1955
|
format: "openapi" | "graphql" | null;
|
|
1530
|
-
patches:
|
|
1531
|
-
graphql:
|
|
1532
|
-
diagnostic_policy:
|
|
1533
|
-
|
|
1956
|
+
patches: SpecPatchResponse[];
|
|
1957
|
+
graphql: GraphqlSettingsResponse | null;
|
|
1958
|
+
diagnostic_policy: DiagnosticPolicyResponse;
|
|
1959
|
+
revision_latest_id: SpecRevisionId | null;
|
|
1534
1960
|
/** Format: date-time */
|
|
1535
1961
|
created_at: string;
|
|
1536
1962
|
/** Format: date-time */
|
|
@@ -1538,17 +1964,17 @@ export interface DefinitionWrite {
|
|
|
1538
1964
|
request_id: RequestId;
|
|
1539
1965
|
}
|
|
1540
1966
|
|
|
1541
|
-
/** Response shape for
|
|
1542
|
-
export interface
|
|
1543
|
-
id:
|
|
1544
|
-
object: "
|
|
1967
|
+
/** Response shape for Spec. */
|
|
1968
|
+
export interface SpecRead {
|
|
1969
|
+
id: SpecId;
|
|
1970
|
+
object: "spec" | (string & {});
|
|
1545
1971
|
project_id: ProjectId;
|
|
1546
|
-
source:
|
|
1972
|
+
source: SpecSourceRead;
|
|
1547
1973
|
format: ("openapi" | "graphql" | null) | (string & {}) | null;
|
|
1548
|
-
patches:
|
|
1549
|
-
graphql:
|
|
1550
|
-
diagnostic_policy:
|
|
1551
|
-
|
|
1974
|
+
patches: SpecPatchResponseRead[];
|
|
1975
|
+
graphql: GraphqlSettingsResponseRead | null;
|
|
1976
|
+
diagnostic_policy: DiagnosticPolicyResponseRead;
|
|
1977
|
+
revision_latest_id: SpecRevisionId | null;
|
|
1552
1978
|
/** Format: date-time */
|
|
1553
1979
|
created_at: string;
|
|
1554
1980
|
/** Format: date-time */
|
|
@@ -1556,47 +1982,51 @@ export interface DefinitionRead {
|
|
|
1556
1982
|
request_id: RequestId;
|
|
1557
1983
|
}
|
|
1558
1984
|
|
|
1559
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
1985
|
+
/**
|
|
1986
|
+
* Omitted fields remain unchanged. Supplied objects and arrays replace the whole field. URL source
|
|
1987
|
+
* headers are preserved when the URL is unchanged and headers are omitted; null or empty headers
|
|
1988
|
+
* clear them.
|
|
1989
|
+
*/
|
|
1990
|
+
export interface SpecUpdateRequest {
|
|
1991
|
+
source?: SpecSourceInput;
|
|
1992
|
+
/** Replace all patches in order. An empty array removes every patch; null is invalid. */
|
|
1993
|
+
patches?: SpecPatch[];
|
|
1994
|
+
/** Replace all GraphQL settings. Null or an empty object clears them. */
|
|
1562
1995
|
graphql?: GraphqlSettings | null;
|
|
1996
|
+
/** Replace the complete policy and suppression list. Null and an empty object are invalid. */
|
|
1563
1997
|
diagnostic_policy?: DiagnosticPolicy;
|
|
1564
1998
|
}
|
|
1565
1999
|
|
|
1566
|
-
/** Response shape for
|
|
1567
|
-
export interface
|
|
1568
|
-
source?:
|
|
1569
|
-
patches
|
|
2000
|
+
/** Response shape for SpecUpdateRequest. */
|
|
2001
|
+
export interface SpecUpdateRequestRead {
|
|
2002
|
+
source?: SpecSourceInputRead;
|
|
2003
|
+
/** Replace all patches in order. An empty array removes every patch; null is invalid. */
|
|
2004
|
+
patches?: SpecPatchRead[];
|
|
2005
|
+
/** Replace all GraphQL settings. Null or an empty object clears them. */
|
|
1570
2006
|
graphql?: GraphqlSettingsRead | null;
|
|
2007
|
+
/** Replace the complete policy and suppression list. Null and an empty object are invalid. */
|
|
1571
2008
|
diagnostic_policy?: DiagnosticPolicyRead;
|
|
1572
2009
|
}
|
|
1573
2010
|
|
|
1574
2011
|
/**
|
|
1575
|
-
* Project-owned identity,
|
|
1576
|
-
*
|
|
2012
|
+
* Project-owned identity, Spec reference, generation controls, and shared configuration. Targets
|
|
2013
|
+
* and Deliveries are available only through their canonical Target endpoints.
|
|
1577
2014
|
*/
|
|
1578
2015
|
export interface Project {
|
|
1579
2016
|
id: ProjectId;
|
|
1580
2017
|
object: "project";
|
|
1581
2018
|
name: string;
|
|
1582
|
-
|
|
2019
|
+
spec_id: SpecId;
|
|
1583
2020
|
/**
|
|
1584
|
-
* Regenerate when the
|
|
1585
|
-
*
|
|
1586
|
-
* you asked for. Off means only "generate now" and POST /projects/{project_id}/generations
|
|
1587
|
-
* regenerate.
|
|
2021
|
+
* Regenerate when the Spec or saved configuration changes. Enabled by default for new Projects.
|
|
2022
|
+
* Set false to generate only when requested.
|
|
1588
2023
|
*/
|
|
1589
2024
|
auto_generate: boolean;
|
|
1590
|
-
/**
|
|
1591
|
-
* Whether the webhook relay is on, letting the generated CLI's webhooks listen command mint relay
|
|
1592
|
-
* sessions. Requires the cli target and Pro; turning the target off turns this off.
|
|
1593
|
-
*/
|
|
1594
|
-
relay_enabled: boolean;
|
|
1595
2025
|
/**
|
|
1596
2026
|
* Shared defaults inherited by every Target. A Target's config overrides these defaults; GraphQL
|
|
1597
|
-
* settings remain
|
|
2027
|
+
* settings remain Spec-owned.
|
|
1598
2028
|
*/
|
|
1599
|
-
config:
|
|
2029
|
+
config: ProjectConfigResponse | null;
|
|
1600
2030
|
/** Format: date-time */
|
|
1601
2031
|
created_at: string;
|
|
1602
2032
|
/**
|
|
@@ -1610,24 +2040,17 @@ export interface Project {
|
|
|
1610
2040
|
/** Request shape for Project. */
|
|
1611
2041
|
export interface ProjectWrite {
|
|
1612
2042
|
name: string;
|
|
1613
|
-
|
|
2043
|
+
spec_id: SpecId;
|
|
1614
2044
|
/**
|
|
1615
|
-
* Regenerate when the
|
|
1616
|
-
*
|
|
1617
|
-
* you asked for. Off means only "generate now" and POST /projects/{project_id}/generations
|
|
1618
|
-
* regenerate.
|
|
2045
|
+
* Regenerate when the Spec or saved configuration changes. Enabled by default for new Projects.
|
|
2046
|
+
* Set false to generate only when requested.
|
|
1619
2047
|
*/
|
|
1620
2048
|
auto_generate: boolean;
|
|
1621
|
-
/**
|
|
1622
|
-
* Whether the webhook relay is on, letting the generated CLI's webhooks listen command mint relay
|
|
1623
|
-
* sessions. Requires the cli target and Pro; turning the target off turns this off.
|
|
1624
|
-
*/
|
|
1625
|
-
relay_enabled: boolean;
|
|
1626
2049
|
/**
|
|
1627
2050
|
* Shared defaults inherited by every Target. A Target's config overrides these defaults; GraphQL
|
|
1628
|
-
* settings remain
|
|
2051
|
+
* settings remain Spec-owned.
|
|
1629
2052
|
*/
|
|
1630
|
-
config:
|
|
2053
|
+
config: ProjectConfigResponse | null;
|
|
1631
2054
|
request_id: RequestId;
|
|
1632
2055
|
}
|
|
1633
2056
|
|
|
@@ -1636,24 +2059,17 @@ export interface ProjectRead {
|
|
|
1636
2059
|
id: ProjectId;
|
|
1637
2060
|
object: "project" | (string & {});
|
|
1638
2061
|
name: string;
|
|
1639
|
-
|
|
2062
|
+
spec_id: SpecId;
|
|
1640
2063
|
/**
|
|
1641
|
-
* Regenerate when the
|
|
1642
|
-
*
|
|
1643
|
-
* you asked for. Off means only "generate now" and POST /projects/{project_id}/generations
|
|
1644
|
-
* regenerate.
|
|
2064
|
+
* Regenerate when the Spec or saved configuration changes. Enabled by default for new Projects.
|
|
2065
|
+
* Set false to generate only when requested.
|
|
1645
2066
|
*/
|
|
1646
2067
|
auto_generate: boolean;
|
|
1647
|
-
/**
|
|
1648
|
-
* Whether the webhook relay is on, letting the generated CLI's webhooks listen command mint relay
|
|
1649
|
-
* sessions. Requires the cli target and Pro; turning the target off turns this off.
|
|
1650
|
-
*/
|
|
1651
|
-
relay_enabled: boolean;
|
|
1652
2068
|
/**
|
|
1653
2069
|
* Shared defaults inherited by every Target. A Target's config overrides these defaults; GraphQL
|
|
1654
|
-
* settings remain
|
|
2070
|
+
* settings remain Spec-owned.
|
|
1655
2071
|
*/
|
|
1656
|
-
config:
|
|
2072
|
+
config: ProjectConfigResponseRead | null;
|
|
1657
2073
|
/** Format: date-time */
|
|
1658
2074
|
created_at: string;
|
|
1659
2075
|
/**
|
|
@@ -1672,7 +2088,7 @@ export interface ProjectSummary {
|
|
|
1672
2088
|
id: ProjectId;
|
|
1673
2089
|
object: "project";
|
|
1674
2090
|
name: string;
|
|
1675
|
-
|
|
2091
|
+
spec_id: SpecId;
|
|
1676
2092
|
auto_generate: boolean;
|
|
1677
2093
|
/** Format: date-time */
|
|
1678
2094
|
created_at: string;
|
|
@@ -1685,7 +2101,7 @@ export interface ProjectSummaryRead {
|
|
|
1685
2101
|
id: ProjectId;
|
|
1686
2102
|
object: "project" | (string & {});
|
|
1687
2103
|
name: string;
|
|
1688
|
-
|
|
2104
|
+
spec_id: SpecId;
|
|
1689
2105
|
auto_generate: boolean;
|
|
1690
2106
|
/** Format: date-time */
|
|
1691
2107
|
created_at: string;
|
|
@@ -1695,54 +2111,44 @@ export interface ProjectSummaryRead {
|
|
|
1695
2111
|
|
|
1696
2112
|
export interface CreateProjectRequest {
|
|
1697
2113
|
name: string;
|
|
1698
|
-
|
|
2114
|
+
spec: SpecFields;
|
|
1699
2115
|
/**
|
|
1700
2116
|
* Initial first-class Targets. More than one may use the same generator with different identities
|
|
1701
2117
|
* or Deliveries.
|
|
1702
2118
|
*/
|
|
1703
2119
|
targets: InitialTargetFields[];
|
|
1704
2120
|
/**
|
|
1705
|
-
* Whether Typeship should regenerate automatically when the source
|
|
1706
|
-
*
|
|
2121
|
+
* Whether Typeship should regenerate automatically when the source or saved configuration
|
|
2122
|
+
* changes.
|
|
2123
|
+
* Default: true
|
|
1707
2124
|
*/
|
|
1708
2125
|
auto_generate?: boolean;
|
|
1709
|
-
/**
|
|
1710
|
-
* Enable webhook relay sessions. Requires the CLI target and Pro.
|
|
1711
|
-
* Default: false
|
|
1712
|
-
*/
|
|
1713
|
-
relay_enabled?: boolean;
|
|
1714
|
-
/** Shared defaults inherited by every Target. GraphQL settings belong in definition.graphql. */
|
|
2126
|
+
/** Shared defaults inherited by every Target. GraphQL settings belong in spec.graphql. */
|
|
1715
2127
|
config?: ProjectConfig | null;
|
|
1716
2128
|
}
|
|
1717
2129
|
|
|
1718
2130
|
/** Response shape for CreateProjectRequest. */
|
|
1719
2131
|
export interface CreateProjectRequestRead {
|
|
1720
2132
|
name: string;
|
|
1721
|
-
|
|
2133
|
+
spec: SpecFieldsRead;
|
|
1722
2134
|
/**
|
|
1723
2135
|
* Initial first-class Targets. More than one may use the same generator with different identities
|
|
1724
2136
|
* or Deliveries.
|
|
1725
2137
|
*/
|
|
1726
2138
|
targets: InitialTargetFieldsRead[];
|
|
1727
2139
|
/**
|
|
1728
|
-
* Whether Typeship should regenerate automatically when the source
|
|
1729
|
-
*
|
|
2140
|
+
* Whether Typeship should regenerate automatically when the source or saved configuration
|
|
2141
|
+
* changes.
|
|
2142
|
+
* Default: true
|
|
1730
2143
|
*/
|
|
1731
2144
|
auto_generate?: boolean;
|
|
1732
|
-
/**
|
|
1733
|
-
* Enable webhook relay sessions. Requires the CLI target and Pro.
|
|
1734
|
-
* Default: false
|
|
1735
|
-
*/
|
|
1736
|
-
relay_enabled?: boolean;
|
|
1737
|
-
/** Shared defaults inherited by every Target. GraphQL settings belong in definition.graphql. */
|
|
2145
|
+
/** Shared defaults inherited by every Target. GraphQL settings belong in spec.graphql. */
|
|
1738
2146
|
config?: ProjectConfigRead | null;
|
|
1739
2147
|
}
|
|
1740
2148
|
|
|
1741
2149
|
export interface UpdateProjectRequest {
|
|
1742
2150
|
name?: string;
|
|
1743
2151
|
auto_generate?: boolean;
|
|
1744
|
-
/** Enable webhook relay sessions. Requires the CLI target and Pro. */
|
|
1745
|
-
relay_enabled?: boolean;
|
|
1746
2152
|
/** Replaces the Project's shared Target defaults. Send null to clear them. */
|
|
1747
2153
|
config?: ProjectConfig | null;
|
|
1748
2154
|
}
|
|
@@ -1751,8 +2157,6 @@ export interface UpdateProjectRequest {
|
|
|
1751
2157
|
export interface UpdateProjectRequestRead {
|
|
1752
2158
|
name?: string;
|
|
1753
2159
|
auto_generate?: boolean;
|
|
1754
|
-
/** Enable webhook relay sessions. Requires the CLI target and Pro. */
|
|
1755
|
-
relay_enabled?: boolean;
|
|
1756
2160
|
/** Replaces the Project's shared Target defaults. Send null to clear them. */
|
|
1757
2161
|
config?: ProjectConfigRead | null;
|
|
1758
2162
|
}
|
|
@@ -1761,26 +2165,45 @@ export interface UpdateProjectRequestRead {
|
|
|
1761
2165
|
* The organization an API key belongs to. Members share its projects, keys, and plan; sign-in
|
|
1762
2166
|
* identity is not part of the API.
|
|
1763
2167
|
*/
|
|
1764
|
-
export interface
|
|
2168
|
+
export interface Organization {
|
|
2169
|
+
/** Opaque, output-only organization identifier. Copy it unchanged; its format is not a contract. */
|
|
1765
2170
|
id: string;
|
|
1766
|
-
object: "
|
|
2171
|
+
object: "organization";
|
|
2172
|
+
/** The organization's display name. */
|
|
2173
|
+
name: string;
|
|
2174
|
+
plan: "free" | "pro" | "enterprise";
|
|
2175
|
+
/** Format: date-time */
|
|
2176
|
+
created_at: string;
|
|
2177
|
+
/** Format: date-time */
|
|
2178
|
+
updated_at: string;
|
|
2179
|
+
request_id: RequestId;
|
|
2180
|
+
}
|
|
2181
|
+
|
|
2182
|
+
/** Request shape for Organization. */
|
|
2183
|
+
export interface OrganizationWrite {
|
|
2184
|
+
object: "organization";
|
|
1767
2185
|
/** The organization's display name. */
|
|
1768
2186
|
name: string;
|
|
1769
2187
|
plan: "free" | "pro" | "enterprise";
|
|
1770
2188
|
/** Format: date-time */
|
|
1771
2189
|
created_at: string;
|
|
2190
|
+
/** Format: date-time */
|
|
2191
|
+
updated_at: string;
|
|
1772
2192
|
request_id: RequestId;
|
|
1773
2193
|
}
|
|
1774
2194
|
|
|
1775
|
-
/** Response shape for
|
|
1776
|
-
export interface
|
|
2195
|
+
/** Response shape for Organization. */
|
|
2196
|
+
export interface OrganizationRead {
|
|
2197
|
+
/** Opaque, output-only organization identifier. Copy it unchanged; its format is not a contract. */
|
|
1777
2198
|
id: string;
|
|
1778
|
-
object: "
|
|
2199
|
+
object: "organization" | (string & {});
|
|
1779
2200
|
/** The organization's display name. */
|
|
1780
2201
|
name: string;
|
|
1781
2202
|
plan: ("free" | "pro" | "enterprise") | (string & {});
|
|
1782
2203
|
/** Format: date-time */
|
|
1783
2204
|
created_at: string;
|
|
2205
|
+
/** Format: date-time */
|
|
2206
|
+
updated_at: string;
|
|
1784
2207
|
request_id: RequestId;
|
|
1785
2208
|
}
|
|
1786
2209
|
|
|
@@ -1865,19 +2288,28 @@ export interface OAuthApplicationRead {
|
|
|
1865
2288
|
|
|
1866
2289
|
/**
|
|
1867
2290
|
* Authenticated identity read used to verify a login before it is saved. Operation is auto-detected
|
|
1868
|
-
* when omitted
|
|
1869
|
-
*
|
|
2291
|
+
* when omitted or null. At least one of subject_field, account_field, or organization_field must be
|
|
2292
|
+
* a non-null JSON Pointer. Null clears an individual mapping while another remains. Set
|
|
2293
|
+
* identity_verification itself to null to remove the whole policy.
|
|
1870
2294
|
*/
|
|
1871
|
-
export
|
|
2295
|
+
export type IdentityVerification = {
|
|
1872
2296
|
/** resource.method of a safe identity read with no required arguments. */
|
|
1873
|
-
operation?: string;
|
|
2297
|
+
operation?: string | null;
|
|
1874
2298
|
/** JSON Pointer to the stable caller ID in the identity response. */
|
|
1875
|
-
subject_field?: string;
|
|
2299
|
+
subject_field?: string | null;
|
|
1876
2300
|
/** JSON Pointer to the customer account ID. */
|
|
1877
|
-
account_field?: string;
|
|
2301
|
+
account_field?: string | null;
|
|
1878
2302
|
/** JSON Pointer to the customer organization ID. */
|
|
1879
|
-
organization_field?: string;
|
|
2303
|
+
organization_field?: string | null;
|
|
2304
|
+
} & ({
|
|
2305
|
+
subject_field: string;
|
|
1880
2306
|
}
|
|
2307
|
+
| {
|
|
2308
|
+
account_field: string;
|
|
2309
|
+
}
|
|
2310
|
+
| {
|
|
2311
|
+
organization_field: string;
|
|
2312
|
+
});
|
|
1881
2313
|
|
|
1882
2314
|
/** OAuth application and request-value overrides for one named API environment. */
|
|
1883
2315
|
export interface AuthenticationEnvironment {
|
|
@@ -1890,7 +2322,7 @@ export interface AuthenticationEnvironment {
|
|
|
1890
2322
|
|
|
1891
2323
|
/**
|
|
1892
2324
|
* Public authentication defaults for generated clients and tools. Stored Projects own the OAuth
|
|
1893
|
-
* server, application catalog, and identity policy;
|
|
2325
|
+
* server, application catalog, and identity policy; one-shot generation accepts the same shape for
|
|
1894
2326
|
* one run. Runtime credentials and client secrets are never accepted.
|
|
1895
2327
|
*/
|
|
1896
2328
|
export interface AuthenticationConfig {
|
|
@@ -1934,6 +2366,41 @@ export interface CliBehavior {
|
|
|
1934
2366
|
* code phones nobody unless this is enabled.
|
|
1935
2367
|
*/
|
|
1936
2368
|
update_notice?: boolean;
|
|
2369
|
+
/**
|
|
2370
|
+
* Public HTTP(S) URL read by the optional changelog command in generated CLIs. Supports UTF-8
|
|
2371
|
+
* Markdown, plain text, and static HTML; embedded credentials are not allowed. Omit or clear to
|
|
2372
|
+
* disable, then regenerate.
|
|
2373
|
+
*/
|
|
2374
|
+
changelog_url?: string | null;
|
|
2375
|
+
/**
|
|
2376
|
+
* Where the generated CLI's feedback command sends users. GitHub issues/new URLs get a prefilled
|
|
2377
|
+
* title and environment details.
|
|
2378
|
+
*/
|
|
2379
|
+
support_url?: string | null;
|
|
2380
|
+
/**
|
|
2381
|
+
* Hosted MCP endpoint installed by the generated CLI instead of launching the package's local
|
|
2382
|
+
* stdio server.
|
|
2383
|
+
*/
|
|
2384
|
+
mcp_url?: string | null;
|
|
2385
|
+
/** GitHub owner/name of the skills package the generated CLI offers to install during init. */
|
|
2386
|
+
skills_repo?: string | null;
|
|
2387
|
+
}
|
|
2388
|
+
|
|
2389
|
+
/** How the generated CLI behaves. Part of Config. */
|
|
2390
|
+
export interface TargetCliBehavior {
|
|
2391
|
+
/** Command users run, independent of how the CLI is distributed. */
|
|
2392
|
+
command_name?: string | null;
|
|
2393
|
+
/**
|
|
2394
|
+
* Opt in to a once-a-day registry check that prints an upgrade hint. Off by default; generated
|
|
2395
|
+
* code phones nobody unless this is enabled.
|
|
2396
|
+
*/
|
|
2397
|
+
update_notice?: boolean;
|
|
2398
|
+
/**
|
|
2399
|
+
* Public HTTP(S) URL read by the optional changelog command in generated CLIs. Supports UTF-8
|
|
2400
|
+
* Markdown, plain text, and static HTML; embedded credentials are not allowed. Omit or clear to
|
|
2401
|
+
* disable, then regenerate.
|
|
2402
|
+
*/
|
|
2403
|
+
changelog_url?: string | null;
|
|
1937
2404
|
/**
|
|
1938
2405
|
* Where the generated CLI's feedback command sends users. GitHub issues/new URLs get a prefilled
|
|
1939
2406
|
* title and environment details.
|
|
@@ -1946,6 +2413,11 @@ export interface CliBehavior {
|
|
|
1946
2413
|
mcp_url?: string | null;
|
|
1947
2414
|
/** GitHub owner/name of the skills package the generated CLI offers to install during init. */
|
|
1948
2415
|
skills_repo?: string | null;
|
|
2416
|
+
/**
|
|
2417
|
+
* Enable webhook relay sessions for this CLI Target. Requires Pro. Turning it off prevents new
|
|
2418
|
+
* sessions.
|
|
2419
|
+
*/
|
|
2420
|
+
relay?: boolean;
|
|
1949
2421
|
}
|
|
1950
2422
|
|
|
1951
2423
|
/** How generated MCP servers and the Typeship-hosted endpoint behave. Part of Config. */
|
|
@@ -2105,11 +2577,10 @@ export interface PackageBehavior {
|
|
|
2105
2577
|
}
|
|
2106
2578
|
|
|
2107
2579
|
/**
|
|
2108
|
-
* Everything Typeship needs beyond the
|
|
2109
|
-
*
|
|
2110
|
-
*
|
|
2111
|
-
*
|
|
2112
|
-
* settings on their Definition.
|
|
2580
|
+
* Everything Typeship needs beyond the Spec, in one object: generation customization (globals,
|
|
2581
|
+
* retries, pagination, readme) and how the generated tooling behaves (cli, mcp, package, docs_url).
|
|
2582
|
+
* Plain configuration. Typeship never requires vendor extensions inside the Spec itself. One-shot
|
|
2583
|
+
* generation also accepts GraphQL settings here; stored projects keep those settings on their Spec.
|
|
2113
2584
|
*/
|
|
2114
2585
|
export interface Config {
|
|
2115
2586
|
/**
|
|
@@ -2132,8 +2603,9 @@ export interface Config {
|
|
|
2132
2603
|
package?: PackageBehavior;
|
|
2133
2604
|
/**
|
|
2134
2605
|
* The API's documentation site. Read through its llms.txt by the generated CLI's docs command,
|
|
2135
|
-
* the MCP server's docs tools, and the package's AGENTS.md. Defaults to the
|
|
2136
|
-
*
|
|
2606
|
+
* the MCP server's docs tools, and the package's AGENTS.md. Defaults to the Spec's externalDocs
|
|
2607
|
+
* URL.
|
|
2608
|
+
* Format: uri
|
|
2137
2609
|
*/
|
|
2138
2610
|
docs_url?: string | null;
|
|
2139
2611
|
/**
|
|
@@ -2165,8 +2637,9 @@ export interface ConfigRead {
|
|
|
2165
2637
|
package?: PackageBehavior;
|
|
2166
2638
|
/**
|
|
2167
2639
|
* The API's documentation site. Read through its llms.txt by the generated CLI's docs command,
|
|
2168
|
-
* the MCP server's docs tools, and the package's AGENTS.md. Defaults to the
|
|
2169
|
-
*
|
|
2640
|
+
* the MCP server's docs tools, and the package's AGENTS.md. Defaults to the Spec's externalDocs
|
|
2641
|
+
* URL.
|
|
2642
|
+
* Format: uri
|
|
2170
2643
|
*/
|
|
2171
2644
|
docs_url?: string | null;
|
|
2172
2645
|
/**
|
|
@@ -2180,7 +2653,7 @@ export interface ConfigRead {
|
|
|
2180
2653
|
* Shared generated-client and tooling behavior for a stored Project. Every Target inherits these
|
|
2181
2654
|
* defaults. Target.config is merged over them for one Target; top-level values replace defaults
|
|
2182
2655
|
* while cli, mcp, auth, readme, and package merge by field. GraphQL-only source settings live on
|
|
2183
|
-
* the Project's
|
|
2656
|
+
* the Project's Spec and are rejected in both stored config scopes.
|
|
2184
2657
|
*/
|
|
2185
2658
|
export interface ProjectConfig {
|
|
2186
2659
|
/**
|
|
@@ -2202,8 +2675,9 @@ export interface ProjectConfig {
|
|
|
2202
2675
|
package?: PackageBehavior;
|
|
2203
2676
|
/**
|
|
2204
2677
|
* The API's documentation site. Read through its llms.txt by the generated CLI's docs command,
|
|
2205
|
-
* the MCP server's docs tools, and the package's AGENTS.md. Defaults to the
|
|
2206
|
-
*
|
|
2678
|
+
* the MCP server's docs tools, and the package's AGENTS.md. Defaults to the Spec's externalDocs
|
|
2679
|
+
* URL.
|
|
2680
|
+
* Format: uri
|
|
2207
2681
|
*/
|
|
2208
2682
|
docs_url?: string | null;
|
|
2209
2683
|
/**
|
|
@@ -2234,8 +2708,9 @@ export interface ProjectConfigRead {
|
|
|
2234
2708
|
package?: PackageBehavior;
|
|
2235
2709
|
/**
|
|
2236
2710
|
* The API's documentation site. Read through its llms.txt by the generated CLI's docs command,
|
|
2237
|
-
* the MCP server's docs tools, and the package's AGENTS.md. Defaults to the
|
|
2238
|
-
*
|
|
2711
|
+
* the MCP server's docs tools, and the package's AGENTS.md. Defaults to the Spec's externalDocs
|
|
2712
|
+
* URL.
|
|
2713
|
+
* Format: uri
|
|
2239
2714
|
*/
|
|
2240
2715
|
docs_url?: string | null;
|
|
2241
2716
|
/**
|
|
@@ -2251,33 +2726,67 @@ export interface ProjectConfigRead {
|
|
|
2251
2726
|
* Self-hosted MCP access may be overridden for a Target-specific deployment.
|
|
2252
2727
|
*/
|
|
2253
2728
|
export interface TargetConfig {
|
|
2729
|
+
/**
|
|
2730
|
+
* Wire names of query/header parameters that become settable once on the generated client and
|
|
2731
|
+
* auto-apply to every operation that accepts them; per-call values win. Names that match nothing
|
|
2732
|
+
* are reported as generation warnings.
|
|
2733
|
+
*/
|
|
2254
2734
|
globals?: string[];
|
|
2255
2735
|
retries?: RetryTuning;
|
|
2736
|
+
/**
|
|
2737
|
+
* Per-operation pagination control, keyed by operationId or "METHOD /path". Unmatched keys are
|
|
2738
|
+
* reported as generation warnings.
|
|
2739
|
+
*/
|
|
2256
2740
|
pagination?: Record<string, PaginationRule | boolean>;
|
|
2257
2741
|
auth?: TargetAuthenticationConfig;
|
|
2258
|
-
cli?:
|
|
2742
|
+
cli?: TargetCliBehavior;
|
|
2259
2743
|
mcp?: McpBehavior;
|
|
2260
2744
|
readme?: ReadmeBehavior;
|
|
2261
2745
|
package?: PackageBehavior;
|
|
2262
|
-
/**
|
|
2746
|
+
/**
|
|
2747
|
+
* The API's documentation site. Read through its llms.txt by the generated CLI's docs command,
|
|
2748
|
+
* the MCP server's docs tools, and the package's AGENTS.md. Defaults to the Spec's externalDocs
|
|
2749
|
+
* URL.
|
|
2750
|
+
* Format: uri
|
|
2751
|
+
*/
|
|
2263
2752
|
docs_url?: string | null;
|
|
2264
|
-
/**
|
|
2753
|
+
/**
|
|
2754
|
+
* Exact llms.txt URL when the documentation site does not publish it at docs_url + /llms.txt.
|
|
2755
|
+
* Format: uri
|
|
2756
|
+
*/
|
|
2265
2757
|
docs_index_url?: string | null;
|
|
2266
2758
|
}
|
|
2267
2759
|
|
|
2268
2760
|
/** Response shape for TargetConfig. */
|
|
2269
2761
|
export interface TargetConfigRead {
|
|
2762
|
+
/**
|
|
2763
|
+
* Wire names of query/header parameters that become settable once on the generated client and
|
|
2764
|
+
* auto-apply to every operation that accepts them; per-call values win. Names that match nothing
|
|
2765
|
+
* are reported as generation warnings.
|
|
2766
|
+
*/
|
|
2270
2767
|
globals?: string[];
|
|
2271
2768
|
retries?: RetryTuning;
|
|
2769
|
+
/**
|
|
2770
|
+
* Per-operation pagination control, keyed by operationId or "METHOD /path". Unmatched keys are
|
|
2771
|
+
* reported as generation warnings.
|
|
2772
|
+
*/
|
|
2272
2773
|
pagination?: Record<string, PaginationRuleRead | boolean>;
|
|
2273
2774
|
auth?: TargetAuthenticationConfig;
|
|
2274
|
-
cli?:
|
|
2775
|
+
cli?: TargetCliBehavior;
|
|
2275
2776
|
mcp?: McpBehaviorRead;
|
|
2276
2777
|
readme?: ReadmeBehavior;
|
|
2277
2778
|
package?: PackageBehavior;
|
|
2278
|
-
/**
|
|
2779
|
+
/**
|
|
2780
|
+
* The API's documentation site. Read through its llms.txt by the generated CLI's docs command,
|
|
2781
|
+
* the MCP server's docs tools, and the package's AGENTS.md. Defaults to the Spec's externalDocs
|
|
2782
|
+
* URL.
|
|
2783
|
+
* Format: uri
|
|
2784
|
+
*/
|
|
2279
2785
|
docs_url?: string | null;
|
|
2280
|
-
/**
|
|
2786
|
+
/**
|
|
2787
|
+
* Exact llms.txt URL when the documentation site does not publish it at docs_url + /llms.txt.
|
|
2788
|
+
* Format: uri
|
|
2789
|
+
*/
|
|
2281
2790
|
docs_index_url?: string | null;
|
|
2282
2791
|
}
|
|
2283
2792
|
|
|
@@ -2382,7 +2891,7 @@ export interface RetryTuning {
|
|
|
2382
2891
|
|
|
2383
2892
|
export interface PaginationRule {
|
|
2384
2893
|
/** Default: "cursor" */
|
|
2385
|
-
style?: "cursor" | "
|
|
2894
|
+
style?: "cursor" | "cursor_from_last_id" | "page" | "offset";
|
|
2386
2895
|
/** Response field holding the item array. */
|
|
2387
2896
|
items_field: string;
|
|
2388
2897
|
cursor_param?: string;
|
|
@@ -2397,7 +2906,7 @@ export interface PaginationRule {
|
|
|
2397
2906
|
/** Response shape for PaginationRule. */
|
|
2398
2907
|
export interface PaginationRuleRead {
|
|
2399
2908
|
/** Default: "cursor" */
|
|
2400
|
-
style?: ("cursor" | "
|
|
2909
|
+
style?: ("cursor" | "cursor_from_last_id" | "page" | "offset") | (string & {});
|
|
2401
2910
|
/** Response field holding the item array. */
|
|
2402
2911
|
items_field: string;
|
|
2403
2912
|
cursor_param?: string;
|
|
@@ -2412,192 +2921,135 @@ export interface PaginationRuleRead {
|
|
|
2412
2921
|
export interface FileStub {
|
|
2413
2922
|
path: string;
|
|
2414
2923
|
bytes: number;
|
|
2924
|
+
mode: "100644" | "100755";
|
|
2925
|
+
}
|
|
2926
|
+
|
|
2927
|
+
/** Response shape for FileStub. */
|
|
2928
|
+
export interface FileStubRead {
|
|
2929
|
+
path: string;
|
|
2930
|
+
bytes: number;
|
|
2931
|
+
mode: ("100644" | "100755") | (string & {});
|
|
2415
2932
|
}
|
|
2416
2933
|
|
|
2934
|
+
/**
|
|
2935
|
+
* A Generation moves from queued to running, then completes when its files are saved or fails.
|
|
2936
|
+
* Delivery and Draft status are separate.
|
|
2937
|
+
*/
|
|
2417
2938
|
export const GenerationStatus = {
|
|
2418
|
-
|
|
2939
|
+
QUEUED: "queued",
|
|
2940
|
+
RUNNING: "running",
|
|
2941
|
+
COMPLETED: "completed",
|
|
2419
2942
|
FAILED: "failed",
|
|
2420
2943
|
} as const;
|
|
2421
2944
|
export type GenerationStatus = (typeof GenerationStatus)[keyof typeof GenerationStatus];
|
|
2422
2945
|
|
|
2423
2946
|
export const GenerationTrigger = {
|
|
2424
2947
|
MANUAL: "manual",
|
|
2425
|
-
|
|
2426
|
-
|
|
2948
|
+
SPEC_CHANGED: "spec_changed",
|
|
2949
|
+
CONFIG_CHANGED: "config_changed",
|
|
2427
2950
|
PREVIEW: "preview",
|
|
2428
2951
|
} as const;
|
|
2429
2952
|
export type GenerationTrigger = (typeof GenerationTrigger)[keyof typeof GenerationTrigger];
|
|
2430
2953
|
|
|
2431
|
-
export interface GenerationProvenance {
|
|
2432
|
-
/** Pinned generator contract edition. */
|
|
2433
|
-
generator_edition: string;
|
|
2434
|
-
/** Exact engine build identifier used for replay and support. */
|
|
2435
|
-
engine_build: string;
|
|
2436
|
-
/**
|
|
2437
|
-
* Immutable effective Target configuration used by this run; source credentials are never
|
|
2438
|
-
* included.
|
|
2439
|
-
*/
|
|
2440
|
-
resolved_config: Record<string, unknown> | null;
|
|
2441
|
-
config_hash: string | null;
|
|
2442
|
-
/** Resolved generator and entitlement plan used to select the emitted public surface. */
|
|
2443
|
-
surface_plan: Record<string, unknown> | null;
|
|
2444
|
-
surface_plan_hash: string | null;
|
|
2445
|
-
entitlement_cap: number | null;
|
|
2446
|
-
package_version: string | null;
|
|
2447
|
-
}
|
|
2448
|
-
|
|
2449
2954
|
export interface Generation {
|
|
2450
2955
|
id: GenerationId;
|
|
2451
2956
|
object: "generation";
|
|
2452
|
-
/**
|
|
2453
|
-
* Present and true when the generated target was too large to inline; files_index lists paths,
|
|
2454
|
-
* fetched one at a time via GET /generations/{generation_id}/file.
|
|
2455
|
-
*/
|
|
2456
|
-
files_omitted?: boolean;
|
|
2457
|
-
files_index?: FileStub[];
|
|
2458
2957
|
project_id: ProjectId;
|
|
2459
|
-
|
|
2958
|
+
spec_revision_id: SpecRevisionId | null;
|
|
2460
2959
|
status: GenerationStatus;
|
|
2461
2960
|
trigger: GenerationTrigger;
|
|
2462
|
-
/** Persisted Target identity. Null only for stateless generation. */
|
|
2463
2961
|
target_id: TargetId | null;
|
|
2464
|
-
|
|
2465
|
-
|
|
2466
|
-
|
|
2467
|
-
/**
|
|
2468
|
-
|
|
2469
|
-
warnings:
|
|
2470
|
-
/**
|
|
2471
|
-
|
|
2472
|
-
|
|
2962
|
+
type: GeneratorKind;
|
|
2963
|
+
/** Package name; null until known. */
|
|
2964
|
+
name: string | null;
|
|
2965
|
+
/** Package version; null until known. */
|
|
2966
|
+
version: string | null;
|
|
2967
|
+
warnings: GenerationWarning[];
|
|
2968
|
+
/** Operation coverage; null until generation has finished. */
|
|
2969
|
+
coverage: GenerationCoverage | null;
|
|
2970
|
+
/** Generated package files. List them with listGenerationFiles. */
|
|
2971
|
+
file_count: number;
|
|
2972
|
+
errors: DomainError[];
|
|
2973
|
+
/**
|
|
2974
|
+
* Milliseconds from the start of the run until it completed or failed; null while queued or
|
|
2975
|
+
* running.
|
|
2976
|
+
*/
|
|
2977
|
+
runtime_ms: number | null;
|
|
2473
2978
|
/** Format: date-time */
|
|
2474
2979
|
created_at: string;
|
|
2475
|
-
|
|
2980
|
+
/** Format: date-time */
|
|
2981
|
+
updated_at: string;
|
|
2476
2982
|
}
|
|
2477
2983
|
|
|
2478
2984
|
/** Request shape for Generation. */
|
|
2479
2985
|
export interface GenerationWrite {
|
|
2480
2986
|
id: GenerationId;
|
|
2481
|
-
/**
|
|
2482
|
-
* Present and true when the generated target was too large to inline; files_index lists paths,
|
|
2483
|
-
* fetched one at a time via GET /generations/{generation_id}/file.
|
|
2484
|
-
*/
|
|
2485
|
-
files_omitted?: boolean;
|
|
2486
|
-
files_index?: FileStub[];
|
|
2487
2987
|
project_id: ProjectId;
|
|
2488
|
-
|
|
2988
|
+
spec_revision_id: SpecRevisionId | null;
|
|
2489
2989
|
status: GenerationStatus;
|
|
2490
2990
|
trigger: GenerationTrigger;
|
|
2491
|
-
/** Persisted Target identity. Null only for stateless generation. */
|
|
2492
2991
|
target_id: TargetId | null;
|
|
2493
|
-
|
|
2494
|
-
|
|
2495
|
-
|
|
2496
|
-
/**
|
|
2497
|
-
|
|
2498
|
-
warnings:
|
|
2499
|
-
/**
|
|
2500
|
-
|
|
2501
|
-
|
|
2992
|
+
type: GeneratorKind;
|
|
2993
|
+
/** Package name; null until known. */
|
|
2994
|
+
name: string | null;
|
|
2995
|
+
/** Package version; null until known. */
|
|
2996
|
+
version: string | null;
|
|
2997
|
+
warnings: GenerationWarning[];
|
|
2998
|
+
/** Operation coverage; null until generation has finished. */
|
|
2999
|
+
coverage: GenerationCoverage | null;
|
|
3000
|
+
/** Generated package files. List them with listGenerationFiles. */
|
|
3001
|
+
file_count: number;
|
|
3002
|
+
errors: DomainError[];
|
|
3003
|
+
/**
|
|
3004
|
+
* Milliseconds from the start of the run until it completed or failed; null while queued or
|
|
3005
|
+
* running.
|
|
3006
|
+
*/
|
|
3007
|
+
runtime_ms: number | null;
|
|
2502
3008
|
/** Format: date-time */
|
|
2503
3009
|
created_at: string;
|
|
2504
|
-
|
|
3010
|
+
/** Format: date-time */
|
|
3011
|
+
updated_at: string;
|
|
2505
3012
|
}
|
|
2506
3013
|
|
|
2507
3014
|
/** Response shape for Generation. */
|
|
2508
3015
|
export interface GenerationRead {
|
|
2509
3016
|
id: GenerationId;
|
|
2510
3017
|
object: "generation" | (string & {});
|
|
2511
|
-
/**
|
|
2512
|
-
* Present and true when the generated target was too large to inline; files_index lists paths,
|
|
2513
|
-
* fetched one at a time via GET /generations/{generation_id}/file.
|
|
2514
|
-
*/
|
|
2515
|
-
files_omitted?: boolean;
|
|
2516
|
-
files_index?: FileStub[];
|
|
2517
3018
|
project_id: ProjectId;
|
|
2518
|
-
|
|
3019
|
+
spec_revision_id: SpecRevisionId | null;
|
|
2519
3020
|
status: GenerationStatus | (string & {});
|
|
2520
3021
|
trigger: GenerationTrigger | (string & {});
|
|
2521
|
-
/** Persisted Target identity. Null only for stateless generation. */
|
|
2522
3022
|
target_id: TargetId | null;
|
|
2523
|
-
|
|
2524
|
-
|
|
2525
|
-
|
|
2526
|
-
/**
|
|
2527
|
-
|
|
2528
|
-
warnings:
|
|
2529
|
-
/**
|
|
2530
|
-
|
|
2531
|
-
|
|
3023
|
+
type: GeneratorKind | (string & {});
|
|
3024
|
+
/** Package name; null until known. */
|
|
3025
|
+
name: string | null;
|
|
3026
|
+
/** Package version; null until known. */
|
|
3027
|
+
version: string | null;
|
|
3028
|
+
warnings: GenerationWarning[];
|
|
3029
|
+
/** Operation coverage; null until generation has finished. */
|
|
3030
|
+
coverage: GenerationCoverageRead | null;
|
|
3031
|
+
/** Generated package files. List them with listGenerationFiles. */
|
|
3032
|
+
file_count: number;
|
|
3033
|
+
errors: DomainErrorRead[];
|
|
3034
|
+
/**
|
|
3035
|
+
* Milliseconds from the start of the run until it completed or failed; null while queued or
|
|
3036
|
+
* running.
|
|
3037
|
+
*/
|
|
3038
|
+
runtime_ms: number | null;
|
|
2532
3039
|
/** Format: date-time */
|
|
2533
3040
|
created_at: string;
|
|
2534
|
-
request_id?: RequestId;
|
|
2535
|
-
}
|
|
2536
|
-
|
|
2537
|
-
/**
|
|
2538
|
-
* Generation metadata returned by collection endpoints. Generated file contents and file indexes
|
|
2539
|
-
* are available only from retrieve and create operations.
|
|
2540
|
-
*/
|
|
2541
|
-
export interface GenerationSummary {
|
|
2542
|
-
id: GenerationId;
|
|
2543
|
-
object: "generation";
|
|
2544
|
-
project_id: ProjectId;
|
|
2545
|
-
definition_revision_id: DefinitionRevisionId | null;
|
|
2546
|
-
status: GenerationStatus;
|
|
2547
|
-
trigger: GenerationTrigger;
|
|
2548
|
-
/** Persisted Target identity. Null only for stateless generation. */
|
|
2549
|
-
target_id: TargetId | null;
|
|
2550
|
-
/** Resolved generator implementation; provenance rather than resource identity. */
|
|
2551
|
-
generator: GeneratorKind;
|
|
2552
|
-
provenance: GenerationProvenance;
|
|
2553
|
-
/** Null only for a failed or legacy generation that produced no metadata. */
|
|
2554
|
-
meta: GenerationMeta | null;
|
|
2555
|
-
warnings: string[];
|
|
2556
|
-
error: string | null;
|
|
2557
3041
|
/** Format: date-time */
|
|
2558
|
-
|
|
3042
|
+
updated_at: string;
|
|
2559
3043
|
}
|
|
2560
3044
|
|
|
3045
|
+
/** Generation metadata returned by collection endpoints. */
|
|
3046
|
+
export type GenerationSummary = Generation;
|
|
3047
|
+
|
|
2561
3048
|
/** Request shape for GenerationSummary. */
|
|
2562
|
-
export
|
|
2563
|
-
id: GenerationId;
|
|
2564
|
-
project_id: ProjectId;
|
|
2565
|
-
definition_revision_id: DefinitionRevisionId | null;
|
|
2566
|
-
status: GenerationStatus;
|
|
2567
|
-
trigger: GenerationTrigger;
|
|
2568
|
-
/** Persisted Target identity. Null only for stateless generation. */
|
|
2569
|
-
target_id: TargetId | null;
|
|
2570
|
-
/** Resolved generator implementation; provenance rather than resource identity. */
|
|
2571
|
-
generator: GeneratorKind;
|
|
2572
|
-
provenance: GenerationProvenance;
|
|
2573
|
-
/** Null only for a failed or legacy generation that produced no metadata. */
|
|
2574
|
-
meta: GenerationMeta | null;
|
|
2575
|
-
warnings: string[];
|
|
2576
|
-
error: string | null;
|
|
2577
|
-
/** Format: date-time */
|
|
2578
|
-
created_at: string;
|
|
2579
|
-
}
|
|
3049
|
+
export type GenerationSummaryWrite = GenerationWrite;
|
|
2580
3050
|
|
|
2581
3051
|
/** Response shape for GenerationSummary. */
|
|
2582
|
-
export
|
|
2583
|
-
id: GenerationId;
|
|
2584
|
-
object: "generation" | (string & {});
|
|
2585
|
-
project_id: ProjectId;
|
|
2586
|
-
definition_revision_id: DefinitionRevisionId | null;
|
|
2587
|
-
status: GenerationStatus | (string & {});
|
|
2588
|
-
trigger: GenerationTrigger | (string & {});
|
|
2589
|
-
/** Persisted Target identity. Null only for stateless generation. */
|
|
2590
|
-
target_id: TargetId | null;
|
|
2591
|
-
/** Resolved generator implementation; provenance rather than resource identity. */
|
|
2592
|
-
generator: GeneratorKind | (string & {});
|
|
2593
|
-
provenance: GenerationProvenance;
|
|
2594
|
-
/** Null only for a failed or legacy generation that produced no metadata. */
|
|
2595
|
-
meta: GenerationMetaRead | null;
|
|
2596
|
-
warnings: string[];
|
|
2597
|
-
error: string | null;
|
|
2598
|
-
/** Format: date-time */
|
|
2599
|
-
created_at: string;
|
|
2600
|
-
}
|
|
3052
|
+
export type GenerationSummaryRead = GenerationRead;
|
|
2601
3053
|
|
|
2602
3054
|
export type GenerationResponse = Generation & ResponseMetadata;
|
|
2603
3055
|
|
|
@@ -2610,37 +3062,39 @@ export type GenerationResponseRead = GenerationRead & ResponseMetadata;
|
|
|
2610
3062
|
/** A selected target that did not generate in a multi-target run. */
|
|
2611
3063
|
export interface GenerationFailure {
|
|
2612
3064
|
target_id: TargetId;
|
|
2613
|
-
|
|
3065
|
+
type: GeneratorKind;
|
|
2614
3066
|
status: "failed";
|
|
2615
|
-
|
|
3067
|
+
/** Recorded failures. Empty when this resource has no recorded failure. */
|
|
3068
|
+
errors: DomainError[];
|
|
2616
3069
|
}
|
|
2617
3070
|
|
|
2618
3071
|
/** Response shape for GenerationFailure. */
|
|
2619
3072
|
export interface GenerationFailureRead {
|
|
2620
3073
|
target_id: TargetId;
|
|
2621
|
-
|
|
3074
|
+
type: GeneratorKind | (string & {});
|
|
2622
3075
|
status: "failed" | (string & {});
|
|
2623
|
-
|
|
3076
|
+
/** Recorded failures. Empty when this resource has no recorded failure. */
|
|
3077
|
+
errors: DomainErrorRead[];
|
|
2624
3078
|
}
|
|
2625
3079
|
|
|
2626
3080
|
/**
|
|
2627
|
-
*
|
|
2628
|
-
*
|
|
3081
|
+
* One Generation per selected Target. Retrieve each Generation for current status and generated
|
|
3082
|
+
* files.
|
|
2629
3083
|
*/
|
|
2630
3084
|
export interface GenerationBatch {
|
|
2631
|
-
data:
|
|
3085
|
+
data: GenerationSummary[];
|
|
2632
3086
|
request_id: RequestId;
|
|
2633
3087
|
}
|
|
2634
3088
|
|
|
2635
3089
|
/** Request shape for GenerationBatch. */
|
|
2636
3090
|
export interface GenerationBatchWrite {
|
|
2637
|
-
data:
|
|
3091
|
+
data: GenerationSummaryWrite[];
|
|
2638
3092
|
request_id: RequestId;
|
|
2639
3093
|
}
|
|
2640
3094
|
|
|
2641
3095
|
/** Response shape for GenerationBatch. */
|
|
2642
3096
|
export interface GenerationBatchRead {
|
|
2643
|
-
data:
|
|
3097
|
+
data: GenerationSummaryRead[];
|
|
2644
3098
|
request_id: RequestId;
|
|
2645
3099
|
}
|
|
2646
3100
|
|
|
@@ -2655,6 +3109,11 @@ export interface ApiKey {
|
|
|
2655
3109
|
last_used_at: string | null;
|
|
2656
3110
|
/** Format: date-time */
|
|
2657
3111
|
created_at: string;
|
|
3112
|
+
/**
|
|
3113
|
+
* When the key last changed, such as its revocation.
|
|
3114
|
+
* Format: date-time
|
|
3115
|
+
*/
|
|
3116
|
+
updated_at: string;
|
|
2658
3117
|
request_id?: RequestId;
|
|
2659
3118
|
}
|
|
2660
3119
|
|
|
@@ -2670,6 +3129,11 @@ export interface ApiKeyRead {
|
|
|
2670
3129
|
last_used_at: string | null;
|
|
2671
3130
|
/** Format: date-time */
|
|
2672
3131
|
created_at: string;
|
|
3132
|
+
/**
|
|
3133
|
+
* When the key last changed, such as its revocation.
|
|
3134
|
+
* Format: date-time
|
|
3135
|
+
*/
|
|
3136
|
+
updated_at: string;
|
|
2673
3137
|
request_id?: RequestId;
|
|
2674
3138
|
}
|
|
2675
3139
|
|
|
@@ -2678,113 +3142,118 @@ export type ApiKeyResponse = ApiKey & ResponseMetadata;
|
|
|
2678
3142
|
/** Response shape for ApiKeyResponse. */
|
|
2679
3143
|
export type ApiKeyResponseRead = ApiKeyRead & ResponseMetadata;
|
|
2680
3144
|
|
|
2681
|
-
export interface
|
|
2682
|
-
|
|
2683
|
-
|
|
2684
|
-
|
|
2685
|
-
|
|
2686
|
-
|
|
2687
|
-
/** Response shape for UrlDefinitionRevisionSource. */
|
|
2688
|
-
export interface UrlDefinitionRevisionSourceRead {
|
|
2689
|
-
kind: "url" | (string & {});
|
|
2690
|
-
/** Format: uri */
|
|
2691
|
-
url: string;
|
|
3145
|
+
export interface UrlSpecRevisionSource {
|
|
3146
|
+
type: "url";
|
|
3147
|
+
url: {
|
|
3148
|
+
/** Format: uri */
|
|
3149
|
+
url: string;
|
|
3150
|
+
};
|
|
2692
3151
|
}
|
|
2693
3152
|
|
|
2694
|
-
|
|
2695
|
-
|
|
2696
|
-
|
|
2697
|
-
|
|
2698
|
-
|
|
2699
|
-
|
|
2700
|
-
|
|
2701
|
-
/** Exact Git commit consumed, when recorded. */
|
|
2702
|
-
commit_sha?: string | null;
|
|
3153
|
+
/** Response shape for UrlSpecRevisionSource. */
|
|
3154
|
+
export interface UrlSpecRevisionSourceRead {
|
|
3155
|
+
type: "url" | (string & {});
|
|
3156
|
+
url: {
|
|
3157
|
+
/** Format: uri */
|
|
3158
|
+
url: string;
|
|
3159
|
+
};
|
|
2703
3160
|
}
|
|
2704
3161
|
|
|
2705
|
-
|
|
2706
|
-
|
|
2707
|
-
|
|
2708
|
-
|
|
2709
|
-
|
|
2710
|
-
|
|
2711
|
-
|
|
2712
|
-
|
|
2713
|
-
|
|
2714
|
-
|
|
3162
|
+
export interface RepositorySpecRevisionSource {
|
|
3163
|
+
type: "repository";
|
|
3164
|
+
repository: {
|
|
3165
|
+
provider: RepositoryProvider;
|
|
3166
|
+
identifier: RepositoryIdentifier;
|
|
3167
|
+
/** Repository-relative Spec entrypoint path. */
|
|
3168
|
+
path: string;
|
|
3169
|
+
/** Git ref resolved for this revision, when recorded. */
|
|
3170
|
+
ref?: string | null;
|
|
3171
|
+
/** Exact Git commit consumed, when recorded. */
|
|
3172
|
+
commit_sha?: string | null;
|
|
3173
|
+
};
|
|
2715
3174
|
}
|
|
2716
3175
|
|
|
2717
|
-
|
|
2718
|
-
|
|
2719
|
-
|
|
2720
|
-
|
|
2721
|
-
|
|
2722
|
-
|
|
2723
|
-
|
|
2724
|
-
|
|
2725
|
-
|
|
2726
|
-
|
|
2727
|
-
|
|
2728
|
-
|
|
2729
|
-
|
|
2730
|
-
size_bytes: number;
|
|
3176
|
+
/** Response shape for RepositorySpecRevisionSource. */
|
|
3177
|
+
export interface RepositorySpecRevisionSourceRead {
|
|
3178
|
+
type: "repository" | (string & {});
|
|
3179
|
+
repository: {
|
|
3180
|
+
provider: RepositoryProvider | (string & {});
|
|
3181
|
+
identifier: RepositoryIdentifier;
|
|
3182
|
+
/** Repository-relative Spec entrypoint path. */
|
|
3183
|
+
path: string;
|
|
3184
|
+
/** Git ref resolved for this revision, when recorded. */
|
|
3185
|
+
ref?: string | null;
|
|
3186
|
+
/** Exact Git commit consumed, when recorded. */
|
|
3187
|
+
commit_sha?: string | null;
|
|
3188
|
+
};
|
|
2731
3189
|
}
|
|
2732
3190
|
|
|
2733
|
-
|
|
2734
|
-
export interface DefinitionDocumentRead {
|
|
2735
|
-
id: DefinitionDocumentId;
|
|
2736
|
-
role: ("entrypoint" | "reference") | (string & {});
|
|
2737
|
-
/** Repository-relative path or same-origin URL captured in this revision. */
|
|
2738
|
-
coordinate: string;
|
|
2739
|
-
sha256: string;
|
|
2740
|
-
size_bytes: number;
|
|
2741
|
-
}
|
|
3191
|
+
export type SpecRevisionSource = UrlSpecRevisionSource | RepositorySpecRevisionSource;
|
|
2742
3192
|
|
|
2743
|
-
|
|
2744
|
-
|
|
2745
|
-
|
|
3193
|
+
/** Response shape for SpecRevisionSource. */
|
|
3194
|
+
export type SpecRevisionSourceRead = UrlSpecRevisionSourceRead
|
|
3195
|
+
| RepositorySpecRevisionSourceRead
|
|
3196
|
+
| Record<string, unknown> & { type?: string };
|
|
3197
|
+
|
|
3198
|
+
export interface SpecRevision {
|
|
3199
|
+
id: SpecRevisionId;
|
|
3200
|
+
object: "spec_revision";
|
|
2746
3201
|
project_id: ProjectId;
|
|
2747
|
-
|
|
3202
|
+
spec_id: SpecId;
|
|
2748
3203
|
format: "openapi" | "graphql";
|
|
2749
|
-
|
|
2750
|
-
/**
|
|
2751
|
-
documents?: DefinitionDocument[];
|
|
2752
|
-
/** SHA-256 digest of every document coordinate, digest, and size in the resolved graph. */
|
|
3204
|
+
file_count: number;
|
|
3205
|
+
/** SHA-256 digest of every source file path, digest, and size in the resolved graph. */
|
|
2753
3206
|
sha256: string;
|
|
2754
|
-
/** Total bytes across all source
|
|
3207
|
+
/** Total bytes across all source files. */
|
|
2755
3208
|
size_bytes: number;
|
|
2756
3209
|
/** Origin recorded when this immutable revision was created. */
|
|
2757
|
-
source:
|
|
3210
|
+
source: SpecRevisionSource | null;
|
|
3211
|
+
/** Present on retrieve; list responses omit it. */
|
|
3212
|
+
diagnostic_summary?: DiagnosticSummary;
|
|
3213
|
+
/** Present only with include=diagnostics. Ordered by severity, then rule identifier. */
|
|
3214
|
+
diagnostics?: Diagnostic[];
|
|
3215
|
+
/**
|
|
3216
|
+
* Present only with include=diagnostics. Coded misses or conflicts from applying the Spec's
|
|
3217
|
+
* patches to this revision.
|
|
3218
|
+
*/
|
|
3219
|
+
patch_diagnostics?: DiagnosticWarning[];
|
|
2758
3220
|
/** Format: date-time */
|
|
2759
3221
|
created_at: string;
|
|
2760
3222
|
request_id?: RequestId;
|
|
2761
3223
|
}
|
|
2762
3224
|
|
|
2763
|
-
/** Response shape for
|
|
2764
|
-
export interface
|
|
2765
|
-
id:
|
|
2766
|
-
object: "
|
|
3225
|
+
/** Response shape for SpecRevision. */
|
|
3226
|
+
export interface SpecRevisionRead {
|
|
3227
|
+
id: SpecRevisionId;
|
|
3228
|
+
object: "spec_revision" | (string & {});
|
|
2767
3229
|
project_id: ProjectId;
|
|
2768
|
-
|
|
3230
|
+
spec_id: SpecId;
|
|
2769
3231
|
format: ("openapi" | "graphql") | (string & {});
|
|
2770
|
-
|
|
2771
|
-
/**
|
|
2772
|
-
documents?: DefinitionDocumentRead[];
|
|
2773
|
-
/** SHA-256 digest of every document coordinate, digest, and size in the resolved graph. */
|
|
3232
|
+
file_count: number;
|
|
3233
|
+
/** SHA-256 digest of every source file path, digest, and size in the resolved graph. */
|
|
2774
3234
|
sha256: string;
|
|
2775
|
-
/** Total bytes across all source
|
|
3235
|
+
/** Total bytes across all source files. */
|
|
2776
3236
|
size_bytes: number;
|
|
2777
3237
|
/** Origin recorded when this immutable revision was created. */
|
|
2778
|
-
source:
|
|
3238
|
+
source: SpecRevisionSourceRead | null;
|
|
3239
|
+
/** Present on retrieve; list responses omit it. */
|
|
3240
|
+
diagnostic_summary?: DiagnosticSummaryRead;
|
|
3241
|
+
/** Present only with include=diagnostics. Ordered by severity, then rule identifier. */
|
|
3242
|
+
diagnostics?: DiagnosticRead[];
|
|
3243
|
+
/**
|
|
3244
|
+
* Present only with include=diagnostics. Coded misses or conflicts from applying the Spec's
|
|
3245
|
+
* patches to this revision.
|
|
3246
|
+
*/
|
|
3247
|
+
patch_diagnostics?: DiagnosticWarningRead[];
|
|
2779
3248
|
/** Format: date-time */
|
|
2780
3249
|
created_at: string;
|
|
2781
3250
|
request_id?: RequestId;
|
|
2782
3251
|
}
|
|
2783
3252
|
|
|
2784
|
-
export type
|
|
3253
|
+
export type SpecRevisionResponse = SpecRevision & ResponseMetadata;
|
|
2785
3254
|
|
|
2786
|
-
/** Response shape for
|
|
2787
|
-
export type
|
|
3255
|
+
/** Response shape for SpecRevisionResponse. */
|
|
3256
|
+
export type SpecRevisionResponseRead = SpecRevisionRead & ResponseMetadata;
|
|
2788
3257
|
|
|
2789
3258
|
export interface ProjectList {
|
|
2790
3259
|
object: ListObject;
|
|
@@ -2839,9 +3308,9 @@ export interface GenerationListRead {
|
|
|
2839
3308
|
request_id: RequestId;
|
|
2840
3309
|
}
|
|
2841
3310
|
|
|
2842
|
-
export interface
|
|
3311
|
+
export interface SpecRevisionList {
|
|
2843
3312
|
object: ListObject;
|
|
2844
|
-
data:
|
|
3313
|
+
data: SpecRevision[];
|
|
2845
3314
|
/** Whether another page is available after this one. */
|
|
2846
3315
|
has_more: boolean;
|
|
2847
3316
|
/** Pass this value as cursor to retrieve the next page; null on the last page. */
|
|
@@ -2849,10 +3318,10 @@ export interface DefinitionRevisionList {
|
|
|
2849
3318
|
request_id: RequestId;
|
|
2850
3319
|
}
|
|
2851
3320
|
|
|
2852
|
-
/** Response shape for
|
|
2853
|
-
export interface
|
|
3321
|
+
/** Response shape for SpecRevisionList. */
|
|
3322
|
+
export interface SpecRevisionListRead {
|
|
2854
3323
|
object: ListObject;
|
|
2855
|
-
data:
|
|
3324
|
+
data: SpecRevisionRead[];
|
|
2856
3325
|
/** Whether another page is available after this one. */
|
|
2857
3326
|
has_more: boolean;
|
|
2858
3327
|
/** Pass this value as cursor to retrieve the next page; null on the last page. */
|
|
@@ -2932,16 +3401,18 @@ export const ErrorCode = {
|
|
|
2932
3401
|
INSUFFICIENT_SCOPE: "insufficient_scope",
|
|
2933
3402
|
FORBIDDEN: "forbidden",
|
|
2934
3403
|
NOT_FOUND: "not_found",
|
|
3404
|
+
METHOD_NOT_ALLOWED: "method_not_allowed",
|
|
2935
3405
|
SPEC_ERROR: "spec_error",
|
|
2936
3406
|
FETCH_ERROR: "fetch_error",
|
|
2937
3407
|
REPOSITORY_PROVIDER_UNSUPPORTED: "repository_provider_unsupported",
|
|
2938
|
-
EDITION_UNAVAILABLE: "edition_unavailable",
|
|
2939
3408
|
TARGET_BUSY: "target_busy",
|
|
3409
|
+
NO_DRAFT: "no_draft",
|
|
3410
|
+
DRAFT_MERGED: "draft_merged",
|
|
3411
|
+
RESOURCE_CHANGED: "resource_changed",
|
|
2940
3412
|
INVALID_VERSION: "invalid_version",
|
|
2941
|
-
|
|
3413
|
+
PRECONDITION_FAILED: "precondition_failed",
|
|
2942
3414
|
VERSION_OCCUPIED: "version_occupied",
|
|
2943
3415
|
VERSION_TOO_LOW: "version_too_low",
|
|
2944
|
-
RELEASE_ANALYSIS_STALE: "release_analysis_stale",
|
|
2945
3416
|
TARGET_ALREADY_RELEASED: "target_already_released",
|
|
2946
3417
|
ADOPTION_UNVERIFIED: "adoption_unverified",
|
|
2947
3418
|
PUBLICATION_DISABLED: "publication_disabled",
|
|
@@ -2956,17 +3427,48 @@ export const ErrorCode = {
|
|
|
2956
3427
|
PAYLOAD_TOO_LARGE: "payload_too_large",
|
|
2957
3428
|
RATE_LIMITED: "rate_limited",
|
|
2958
3429
|
INTERNAL_ERROR: "internal_error",
|
|
3430
|
+
DEPENDENCY_MISSING: "dependency_missing",
|
|
3431
|
+
DEPENDENCY_NOT_FOUND: "dependency_not_found",
|
|
3432
|
+
DEPENDENCY_SELF: "dependency_self",
|
|
3433
|
+
DEPENDENCY_CYCLE: "dependency_cycle",
|
|
3434
|
+
DEPENDENCY_CROSS_PROJECT: "dependency_cross_project",
|
|
3435
|
+
DEPENDENCY_CROSS_LINEAGE: "dependency_cross_lineage",
|
|
3436
|
+
DEPENDENCY_WRONG_GENERATOR: "dependency_wrong_generator",
|
|
3437
|
+
DEPENDENCY_DISABLED: "dependency_disabled",
|
|
3438
|
+
DEPENDENCY_MODULE_PATH_MISSING: "dependency_module_path_missing",
|
|
3439
|
+
DEPENDENCY_UNRELEASED: "dependency_unreleased",
|
|
3440
|
+
DEPENDENCY_REVISION_MISMATCH: "dependency_revision_mismatch",
|
|
3441
|
+
PUBLICATION_FAILED: "publication_failed",
|
|
3442
|
+
CUSTOMIZATION_CONFLICT: "customization_conflict",
|
|
3443
|
+
HISTORY_RECOVERY_REQUIRED: "history_recovery_required",
|
|
3444
|
+
CHECKS_UNAVAILABLE: "checks_unavailable",
|
|
2959
3445
|
} as const;
|
|
2960
3446
|
export type ErrorCode = (typeof ErrorCode)[keyof typeof ErrorCode];
|
|
2961
3447
|
|
|
2962
3448
|
export interface ErrorDetail {
|
|
2963
3449
|
type: ErrorType;
|
|
2964
3450
|
code: ErrorCode;
|
|
2965
|
-
|
|
3451
|
+
phase?: FailurePhase;
|
|
3452
|
+
/** The affected Target when an operation reports failures for multiple Targets. */
|
|
3453
|
+
target_id?: TargetId;
|
|
3454
|
+
/**
|
|
3455
|
+
* JSON Pointer to the invalid field within the request part named by in. When in is omitted, the
|
|
3456
|
+
* pointer refers to the request body. Header pointers use lowercase header names, such as
|
|
3457
|
+
* /idempotency-key.
|
|
3458
|
+
*/
|
|
2966
3459
|
field?: string;
|
|
3460
|
+
/**
|
|
3461
|
+
* Request part containing field. Query-parameter errors use query; header errors use header. Body
|
|
3462
|
+
* errors use body or omit in.
|
|
3463
|
+
*/
|
|
3464
|
+
in?: "body" | "query" | "header";
|
|
2967
3465
|
/** Human-readable explanation. Its wording may change. */
|
|
2968
3466
|
message: string;
|
|
2969
|
-
/**
|
|
3467
|
+
/**
|
|
3468
|
+
* Whether another attempt can succeed without correcting the inputs. For a recorded failure,
|
|
3469
|
+
* start generation or publishing again; retrieving the resource or replaying an idempotency key
|
|
3470
|
+
* does not start another attempt.
|
|
3471
|
+
*/
|
|
2970
3472
|
retryable: boolean;
|
|
2971
3473
|
/** Stable, concise recovery instruction suitable for a person or agent. */
|
|
2972
3474
|
suggested_action: string;
|
|
@@ -2981,11 +3483,27 @@ export interface ErrorDetail {
|
|
|
2981
3483
|
export interface ErrorDetailRead {
|
|
2982
3484
|
type: ErrorType | (string & {});
|
|
2983
3485
|
code: ErrorCode | (string & {});
|
|
2984
|
-
|
|
3486
|
+
phase?: FailurePhase | (string & {});
|
|
3487
|
+
/** The affected Target when an operation reports failures for multiple Targets. */
|
|
3488
|
+
target_id?: TargetId;
|
|
3489
|
+
/**
|
|
3490
|
+
* JSON Pointer to the invalid field within the request part named by in. When in is omitted, the
|
|
3491
|
+
* pointer refers to the request body. Header pointers use lowercase header names, such as
|
|
3492
|
+
* /idempotency-key.
|
|
3493
|
+
*/
|
|
2985
3494
|
field?: string;
|
|
3495
|
+
/**
|
|
3496
|
+
* Request part containing field. Query-parameter errors use query; header errors use header. Body
|
|
3497
|
+
* errors use body or omit in.
|
|
3498
|
+
*/
|
|
3499
|
+
in?: ("body" | "query" | "header") | (string & {});
|
|
2986
3500
|
/** Human-readable explanation. Its wording may change. */
|
|
2987
3501
|
message: string;
|
|
2988
|
-
/**
|
|
3502
|
+
/**
|
|
3503
|
+
* Whether another attempt can succeed without correcting the inputs. For a recorded failure,
|
|
3504
|
+
* start generation or publishing again; retrieving the resource or replaying an idempotency key
|
|
3505
|
+
* does not start another attempt.
|
|
3506
|
+
*/
|
|
2989
3507
|
retryable: boolean;
|
|
2990
3508
|
/** Stable, concise recovery instruction suitable for a person or agent. */
|
|
2991
3509
|
suggested_action: string;
|
|
@@ -2996,13 +3514,1111 @@ export interface ErrorDetailRead {
|
|
|
2996
3514
|
docs_url: string;
|
|
2997
3515
|
}
|
|
2998
3516
|
|
|
2999
|
-
export interface
|
|
3000
|
-
|
|
3001
|
-
|
|
3517
|
+
export interface RepositoryReferenceResponse {
|
|
3518
|
+
provider: RepositoryProvider;
|
|
3519
|
+
identifier: RepositoryIdentifier;
|
|
3002
3520
|
}
|
|
3003
3521
|
|
|
3004
|
-
/** Response shape for
|
|
3005
|
-
export interface
|
|
3006
|
-
|
|
3007
|
-
|
|
3522
|
+
/** Response shape for RepositoryReferenceResponse. */
|
|
3523
|
+
export interface RepositoryReferenceResponseRead {
|
|
3524
|
+
provider: RepositoryProvider | (string & {});
|
|
3525
|
+
identifier: RepositoryIdentifier;
|
|
3526
|
+
}
|
|
3527
|
+
|
|
3528
|
+
/**
|
|
3529
|
+
* A fix applied to the resolved Spec before generation. Paths are JSON
|
|
3530
|
+
* Pointers into the document. A patch whose target no longer exists is
|
|
3531
|
+
* skipped and reported as a warning on the generation, never silently.
|
|
3532
|
+
*/
|
|
3533
|
+
export interface SpecPatchResponse {
|
|
3534
|
+
op: "set" | "append" | "remove" | "rename";
|
|
3535
|
+
/**
|
|
3536
|
+
* JSON-Pointer-style path. Pattern segments enable bulk fixes:
|
|
3537
|
+
* * (any child), ** (any depth), [key=value] (filter), e.g.
|
|
3538
|
+
* /paths/**\/parameters/[name=account_id]/schema/type. Renaming a
|
|
3539
|
+
* schema under /components/schemas also rewrites its $refs.
|
|
3540
|
+
*/
|
|
3541
|
+
path: string;
|
|
3542
|
+
/** set only; the replacement value. */
|
|
3543
|
+
value?: unknown;
|
|
3544
|
+
/** rename only; the new key name. */
|
|
3545
|
+
to?: string | null;
|
|
3546
|
+
reason?: string | null;
|
|
3547
|
+
}
|
|
3548
|
+
|
|
3549
|
+
/** Response shape for SpecPatchResponse. */
|
|
3550
|
+
export interface SpecPatchResponseRead {
|
|
3551
|
+
op: ("set" | "append" | "remove" | "rename") | (string & {});
|
|
3552
|
+
/**
|
|
3553
|
+
* JSON-Pointer-style path. Pattern segments enable bulk fixes:
|
|
3554
|
+
* * (any child), ** (any depth), [key=value] (filter), e.g.
|
|
3555
|
+
* /paths/**\/parameters/[name=account_id]/schema/type. Renaming a
|
|
3556
|
+
* schema under /components/schemas also rewrites its $refs.
|
|
3557
|
+
*/
|
|
3558
|
+
path: string;
|
|
3559
|
+
/** set only; the replacement value. */
|
|
3560
|
+
value?: unknown;
|
|
3561
|
+
/** rename only; the new key name. */
|
|
3562
|
+
to?: string | null;
|
|
3563
|
+
reason?: string | null;
|
|
3564
|
+
}
|
|
3565
|
+
|
|
3566
|
+
export interface DiagnosticSuppressionResponse {
|
|
3567
|
+
rule_id: string;
|
|
3568
|
+
/** Exact schema coordinate. Omit only to suppress every occurrence of the rule. */
|
|
3569
|
+
path?: string;
|
|
3570
|
+
/** The reviewed product decision behind this exception. */
|
|
3571
|
+
reason: string;
|
|
3572
|
+
}
|
|
3573
|
+
|
|
3574
|
+
/**
|
|
3575
|
+
* Source pull-request enforcement threshold, new-versus-complete baseline, and explicitly reviewed
|
|
3576
|
+
* rule or location exceptions.
|
|
3577
|
+
*/
|
|
3578
|
+
export interface DiagnosticPolicyResponse {
|
|
3579
|
+
/**
|
|
3580
|
+
* Severity threshold that fails the API change review check.
|
|
3581
|
+
* Default: "error"
|
|
3582
|
+
*/
|
|
3583
|
+
fail_on: "never" | "error" | "warning";
|
|
3584
|
+
/**
|
|
3585
|
+
* Enforce only occurrences introduced by the proposed source change.
|
|
3586
|
+
* Default: true
|
|
3587
|
+
*/
|
|
3588
|
+
only_new: boolean;
|
|
3589
|
+
/** Default: [] */
|
|
3590
|
+
suppressions: DiagnosticSuppressionResponse[];
|
|
3591
|
+
}
|
|
3592
|
+
|
|
3593
|
+
/** Response shape for DiagnosticPolicyResponse. */
|
|
3594
|
+
export interface DiagnosticPolicyResponseRead {
|
|
3595
|
+
/**
|
|
3596
|
+
* Severity threshold that fails the API change review check.
|
|
3597
|
+
* Default: "error"
|
|
3598
|
+
*/
|
|
3599
|
+
fail_on: ("never" | "error" | "warning") | (string & {});
|
|
3600
|
+
/**
|
|
3601
|
+
* Enforce only occurrences introduced by the proposed source change.
|
|
3602
|
+
* Default: true
|
|
3603
|
+
*/
|
|
3604
|
+
only_new: boolean;
|
|
3605
|
+
/** Default: [] */
|
|
3606
|
+
suppressions: DiagnosticSuppressionResponse[];
|
|
3607
|
+
}
|
|
3608
|
+
|
|
3609
|
+
/**
|
|
3610
|
+
* Required checks run against the code in the Draft. Generated checks and customer commands share
|
|
3611
|
+
* one reproducible workflow; repository_required names existing repository checks. Supplying checks
|
|
3612
|
+
* replaces all settings. Omitted generated restores build, package, and public_entrypoint; omitted
|
|
3613
|
+
* repository_required and customer restore empty lists. An empty object restores these defaults. An
|
|
3614
|
+
* empty array clears the corresponding list.
|
|
3615
|
+
*/
|
|
3616
|
+
export interface TargetChecksResponse {
|
|
3617
|
+
/** Default: ["build","package","public_entrypoint"] */
|
|
3618
|
+
generated?: Array<"build" | "package" | "public_entrypoint">;
|
|
3619
|
+
repository_required?: string[];
|
|
3620
|
+
customer?: Array<{
|
|
3621
|
+
name: string;
|
|
3622
|
+
command: string;
|
|
3623
|
+
}>;
|
|
3624
|
+
}
|
|
3625
|
+
|
|
3626
|
+
/** Response shape for TargetChecksResponse. */
|
|
3627
|
+
export interface TargetChecksResponseRead {
|
|
3628
|
+
/** Default: ["build","package","public_entrypoint"] */
|
|
3629
|
+
generated?: Array<("build" | "package" | "public_entrypoint") | (string & {})>;
|
|
3630
|
+
repository_required?: string[];
|
|
3631
|
+
customer?: Array<{
|
|
3632
|
+
name: string;
|
|
3633
|
+
command: string;
|
|
3634
|
+
}>;
|
|
3635
|
+
}
|
|
3636
|
+
|
|
3637
|
+
/**
|
|
3638
|
+
* Authorization-server metadata used by generated OAuth flows. Secrets and runtime credentials are
|
|
3639
|
+
* never accepted here.
|
|
3640
|
+
*/
|
|
3641
|
+
export interface OAuthServerResponse {
|
|
3642
|
+
/**
|
|
3643
|
+
* Exact authorization-server issuer, including any tenant path.
|
|
3644
|
+
* Format: uri
|
|
3645
|
+
*/
|
|
3646
|
+
issuer?: string | null;
|
|
3647
|
+
/**
|
|
3648
|
+
* Exact metadata URL when it cannot be derived from the issuer.
|
|
3649
|
+
* Format: uri
|
|
3650
|
+
*/
|
|
3651
|
+
discovery_url?: string | null;
|
|
3652
|
+
/**
|
|
3653
|
+
* Authorization endpoint override.
|
|
3654
|
+
* Format: uri
|
|
3655
|
+
*/
|
|
3656
|
+
authorization_url?: string | null;
|
|
3657
|
+
/**
|
|
3658
|
+
* Token endpoint override.
|
|
3659
|
+
* Format: uri
|
|
3660
|
+
*/
|
|
3661
|
+
token_url?: string | null;
|
|
3662
|
+
/**
|
|
3663
|
+
* Device-authorization endpoint override.
|
|
3664
|
+
* Format: uri
|
|
3665
|
+
*/
|
|
3666
|
+
device_authorization_url?: string | null;
|
|
3667
|
+
/** Default scopes requested during login. */
|
|
3668
|
+
scopes?: string[] | null;
|
|
3669
|
+
/** Default audience included in authorization and token requests. */
|
|
3670
|
+
audience?: string | null;
|
|
3671
|
+
/**
|
|
3672
|
+
* Protected API resource included in authorization and token requests.
|
|
3673
|
+
* Format: uri
|
|
3674
|
+
*/
|
|
3675
|
+
resource?: string | null;
|
|
3676
|
+
}
|
|
3677
|
+
|
|
3678
|
+
/**
|
|
3679
|
+
* OAuth application available to generated products. Public clients support interactive login;
|
|
3680
|
+
* confidential clients support runtime-supplied machine credentials. Client secrets are never
|
|
3681
|
+
* stored.
|
|
3682
|
+
*/
|
|
3683
|
+
export interface OAuthApplicationResponse {
|
|
3684
|
+
/** OAuth client identifier. */
|
|
3685
|
+
client_id: string;
|
|
3686
|
+
/** Interactive login method. Browser login uses Authorization Code with PKCE. */
|
|
3687
|
+
login_method?: "browser" | "device" | null;
|
|
3688
|
+
/** How a runtime-supplied client secret is sent for machine grants. */
|
|
3689
|
+
client_auth_method?: "post" | "basic" | null;
|
|
3690
|
+
/**
|
|
3691
|
+
* Loopback callback URL for browser login.
|
|
3692
|
+
* Format: uri
|
|
3693
|
+
*/
|
|
3694
|
+
redirect_uri?: string | null;
|
|
3695
|
+
/** Provider parameter used to request an organization during browser login. */
|
|
3696
|
+
organization_parameter?: "organization" | "organization_id" | null;
|
|
3697
|
+
}
|
|
3698
|
+
|
|
3699
|
+
/** Response shape for OAuthApplicationResponse. */
|
|
3700
|
+
export interface OAuthApplicationResponseRead {
|
|
3701
|
+
/** OAuth client identifier. */
|
|
3702
|
+
client_id: string;
|
|
3703
|
+
/** Interactive login method. Browser login uses Authorization Code with PKCE. */
|
|
3704
|
+
login_method?: ("browser" | "device" | null) | (string & {}) | null;
|
|
3705
|
+
/** How a runtime-supplied client secret is sent for machine grants. */
|
|
3706
|
+
client_auth_method?: ("post" | "basic" | null) | (string & {}) | null;
|
|
3707
|
+
/**
|
|
3708
|
+
* Loopback callback URL for browser login.
|
|
3709
|
+
* Format: uri
|
|
3710
|
+
*/
|
|
3711
|
+
redirect_uri?: string | null;
|
|
3712
|
+
/** Provider parameter used to request an organization during browser login. */
|
|
3713
|
+
organization_parameter?: ("organization" | "organization_id" | null) | (string & {}) | null;
|
|
3714
|
+
}
|
|
3715
|
+
|
|
3716
|
+
/**
|
|
3717
|
+
* Authenticated identity read used to verify a login before it is saved. Operation is auto-detected
|
|
3718
|
+
* when omitted or null. At least one of subject_field, account_field, or organization_field must be
|
|
3719
|
+
* a non-null JSON Pointer. Null clears an individual mapping while another remains. Set
|
|
3720
|
+
* identity_verification itself to null to remove the whole policy.
|
|
3721
|
+
*/
|
|
3722
|
+
export type IdentityVerificationResponse = {
|
|
3723
|
+
/** resource.method of a safe identity read with no required arguments. */
|
|
3724
|
+
operation?: string | null;
|
|
3725
|
+
/** JSON Pointer to the stable caller ID in the identity response. */
|
|
3726
|
+
subject_field?: string | null;
|
|
3727
|
+
/** JSON Pointer to the customer account ID. */
|
|
3728
|
+
account_field?: string | null;
|
|
3729
|
+
/** JSON Pointer to the customer organization ID. */
|
|
3730
|
+
organization_field?: string | null;
|
|
3731
|
+
} & ({
|
|
3732
|
+
subject_field: string;
|
|
3733
|
+
}
|
|
3734
|
+
| {
|
|
3735
|
+
account_field: string;
|
|
3736
|
+
}
|
|
3737
|
+
| {
|
|
3738
|
+
organization_field: string;
|
|
3739
|
+
});
|
|
3740
|
+
|
|
3741
|
+
/** OAuth application and request-value overrides for one named API environment. */
|
|
3742
|
+
export interface AuthenticationEnvironmentResponse {
|
|
3743
|
+
oauth_application?: string | null;
|
|
3744
|
+
scopes?: string[] | null;
|
|
3745
|
+
audience?: string | null;
|
|
3746
|
+
/** Format: uri */
|
|
3747
|
+
resource?: string | null;
|
|
3748
|
+
}
|
|
3749
|
+
|
|
3750
|
+
/**
|
|
3751
|
+
* Public authentication defaults for generated clients and tools. Stored Projects own the OAuth
|
|
3752
|
+
* server, application catalog, and identity policy; one-shot generation accepts the same shape for
|
|
3753
|
+
* one run. Runtime credentials and client secrets are never accepted.
|
|
3754
|
+
*/
|
|
3755
|
+
export interface AuthenticationConfigResponse {
|
|
3756
|
+
oauth_server?: OAuthServerResponse | null;
|
|
3757
|
+
/** OAuth applications keyed by a stable name. */
|
|
3758
|
+
oauth_applications?: Record<string, OAuthApplicationResponse> | null;
|
|
3759
|
+
/** Default OAuth application used by generated products. */
|
|
3760
|
+
oauth_application?: string | null;
|
|
3761
|
+
identity_verification?: IdentityVerificationResponse | null;
|
|
3762
|
+
/**
|
|
3763
|
+
* Base URL of a custom browser-approval backend implementing the start, status, and revoke
|
|
3764
|
+
* contract. Used only when OAuth is not configured.
|
|
3765
|
+
* Format: uri
|
|
3766
|
+
*/
|
|
3767
|
+
approval_url?: string | null;
|
|
3768
|
+
/** Authentication selections keyed by generated API environment name. */
|
|
3769
|
+
environments?: Record<string, AuthenticationEnvironmentResponse> | null;
|
|
3770
|
+
}
|
|
3771
|
+
|
|
3772
|
+
export interface TargetAuthenticationEnvironmentResponse {
|
|
3773
|
+
oauth_application?: string | null;
|
|
3774
|
+
}
|
|
3775
|
+
|
|
3776
|
+
/**
|
|
3777
|
+
* Selects a Project OAuth application for one Target. OAuth server metadata, applications, and
|
|
3778
|
+
* identity policy remain Project-owned.
|
|
3779
|
+
*/
|
|
3780
|
+
export interface TargetAuthenticationConfigResponse {
|
|
3781
|
+
/** Project OAuth application to use. Omit to inherit the Project default. */
|
|
3782
|
+
oauth_application?: string | null;
|
|
3783
|
+
/** Project OAuth application selections keyed by API environment. */
|
|
3784
|
+
environments?: Record<string, TargetAuthenticationEnvironmentResponse> | null;
|
|
3785
|
+
}
|
|
3786
|
+
|
|
3787
|
+
/** How the generated CLI behaves. Part of Config. */
|
|
3788
|
+
export interface CliBehaviorResponse {
|
|
3789
|
+
/** Command users run, independent of how the CLI is distributed. */
|
|
3790
|
+
command_name?: string | null;
|
|
3791
|
+
/**
|
|
3792
|
+
* Opt in to a once-a-day registry check that prints an upgrade hint. Off by default; generated
|
|
3793
|
+
* code phones nobody unless this is enabled.
|
|
3794
|
+
*/
|
|
3795
|
+
update_notice?: boolean;
|
|
3796
|
+
/**
|
|
3797
|
+
* Public HTTP(S) URL read by the optional changelog command in generated CLIs. Supports UTF-8
|
|
3798
|
+
* Markdown, plain text, and static HTML; embedded credentials are not allowed. Omit or clear to
|
|
3799
|
+
* disable, then regenerate.
|
|
3800
|
+
*/
|
|
3801
|
+
changelog_url?: string | null;
|
|
3802
|
+
/**
|
|
3803
|
+
* Where the generated CLI's feedback command sends users. GitHub issues/new URLs get a prefilled
|
|
3804
|
+
* title and environment details.
|
|
3805
|
+
*/
|
|
3806
|
+
support_url?: string | null;
|
|
3807
|
+
/**
|
|
3808
|
+
* Hosted MCP endpoint installed by the generated CLI instead of launching the package's local
|
|
3809
|
+
* stdio server.
|
|
3810
|
+
*/
|
|
3811
|
+
mcp_url?: string | null;
|
|
3812
|
+
/** GitHub owner/name of the skills package the generated CLI offers to install during init. */
|
|
3813
|
+
skills_repo?: string | null;
|
|
3814
|
+
}
|
|
3815
|
+
|
|
3816
|
+
/** How the generated CLI behaves. Part of Config. */
|
|
3817
|
+
export interface TargetCliBehaviorResponse {
|
|
3818
|
+
/** Command users run, independent of how the CLI is distributed. */
|
|
3819
|
+
command_name?: string | null;
|
|
3820
|
+
/**
|
|
3821
|
+
* Opt in to a once-a-day registry check that prints an upgrade hint. Off by default; generated
|
|
3822
|
+
* code phones nobody unless this is enabled.
|
|
3823
|
+
*/
|
|
3824
|
+
update_notice?: boolean;
|
|
3825
|
+
/**
|
|
3826
|
+
* Public HTTP(S) URL read by the optional changelog command in generated CLIs. Supports UTF-8
|
|
3827
|
+
* Markdown, plain text, and static HTML; embedded credentials are not allowed. Omit or clear to
|
|
3828
|
+
* disable, then regenerate.
|
|
3829
|
+
*/
|
|
3830
|
+
changelog_url?: string | null;
|
|
3831
|
+
/**
|
|
3832
|
+
* Where the generated CLI's feedback command sends users. GitHub issues/new URLs get a prefilled
|
|
3833
|
+
* title and environment details.
|
|
3834
|
+
*/
|
|
3835
|
+
support_url?: string | null;
|
|
3836
|
+
/**
|
|
3837
|
+
* Hosted MCP endpoint installed by the generated CLI instead of launching the package's local
|
|
3838
|
+
* stdio server.
|
|
3839
|
+
*/
|
|
3840
|
+
mcp_url?: string | null;
|
|
3841
|
+
/** GitHub owner/name of the skills package the generated CLI offers to install during init. */
|
|
3842
|
+
skills_repo?: string | null;
|
|
3843
|
+
/**
|
|
3844
|
+
* Enable webhook relay sessions for this CLI Target. Requires Pro. Turning it off prevents new
|
|
3845
|
+
* sessions.
|
|
3846
|
+
*/
|
|
3847
|
+
relay?: boolean;
|
|
3848
|
+
}
|
|
3849
|
+
|
|
3850
|
+
/** How generated MCP servers and the Typeship-hosted endpoint behave. Part of Config. */
|
|
3851
|
+
export interface McpBehaviorResponse {
|
|
3852
|
+
/** Stable official MCP registry name, independent of the server runtime. */
|
|
3853
|
+
registry_name?: string | null;
|
|
3854
|
+
/**
|
|
3855
|
+
* Authorization for callers connecting to a generated MCP server deployed over HTTP. The hosting
|
|
3856
|
+
* application resolves upstream API credentials separately at runtime. This setting does not
|
|
3857
|
+
* apply to the Typeship-hosted endpoint.
|
|
3858
|
+
*/
|
|
3859
|
+
access?: {
|
|
3860
|
+
/**
|
|
3861
|
+
* Exact issuer allowed to sign MCP connection tokens.
|
|
3862
|
+
* Format: uri
|
|
3863
|
+
*/
|
|
3864
|
+
issuer: string;
|
|
3865
|
+
/**
|
|
3866
|
+
* Canonical public URL of the self-hosted MCP endpoint that connection tokens must target.
|
|
3867
|
+
* Format: uri
|
|
3868
|
+
*/
|
|
3869
|
+
resource: string;
|
|
3870
|
+
/**
|
|
3871
|
+
* Public signing-key endpoint. Omit to discover it from the issuer.
|
|
3872
|
+
* Format: uri
|
|
3873
|
+
*/
|
|
3874
|
+
jwks_url?: string;
|
|
3875
|
+
/** Minimum scopes required to connect to the self-hosted MCP server. */
|
|
3876
|
+
scopes?: string[];
|
|
3877
|
+
};
|
|
3878
|
+
/**
|
|
3879
|
+
* MCP tool shape. meta collapses per-operation tools into search_docs, read_docs, and execute so
|
|
3880
|
+
* large APIs don't flood an agent's context window. Auto considers the serialized tool schemas,
|
|
3881
|
+
* switching near 10k tokens or above 100 operations.
|
|
3882
|
+
*/
|
|
3883
|
+
tool_mode?: "auto" | "operations" | "meta";
|
|
3884
|
+
/**
|
|
3885
|
+
* Guidance appended to the MCP server's instructions, which agents read once when they connect
|
|
3886
|
+
* (server/discover): what to call first, conventions the spec does not state, what not to do.
|
|
3887
|
+
* Carried by the package's server and the hosted endpoint alike.
|
|
3888
|
+
*/
|
|
3889
|
+
instructions?: string | null;
|
|
3890
|
+
/**
|
|
3891
|
+
* Hand-written MCP tool descriptions keyed by operationId or "METHOD /path". Each replaces the
|
|
3892
|
+
* text typeship derives for that operation (summary, first sentence, method and path, deprecation
|
|
3893
|
+
* and auth notes). For flows the spec cannot describe, such as a multi-step upload. Keys that
|
|
3894
|
+
* match no operation are reported as generation warnings.
|
|
3895
|
+
*/
|
|
3896
|
+
tool_descriptions?: Record<string, string>;
|
|
3897
|
+
/**
|
|
3898
|
+
* Exact name-or-ID resolver overrides keyed first by the target operationId or "METHOD /path",
|
|
3899
|
+
* then by its wire argument name. A resolver names one read collection operation plus 1-4 item
|
|
3900
|
+
* fields to match case-insensitively; false opts that argument out of strict inference.
|
|
3901
|
+
*/
|
|
3902
|
+
reference_resolvers?: Record<string, Record<string, false
|
|
3903
|
+
| {
|
|
3904
|
+
/** OperationId, "METHOD /path", MCP tool name, or dotted resource.method of the list operation. */
|
|
3905
|
+
via: string;
|
|
3906
|
+
/** Item fields compared exactly and case-insensitively, such as name, slug, key, or email. */
|
|
3907
|
+
match: string[];
|
|
3908
|
+
/** Item field substituted into the requested argument. Defaults to id. */
|
|
3909
|
+
id?: string;
|
|
3910
|
+
}>>;
|
|
3911
|
+
}
|
|
3912
|
+
|
|
3913
|
+
/** Response shape for McpBehaviorResponse. */
|
|
3914
|
+
export interface McpBehaviorResponseRead {
|
|
3915
|
+
/** Stable official MCP registry name, independent of the server runtime. */
|
|
3916
|
+
registry_name?: string | null;
|
|
3917
|
+
/**
|
|
3918
|
+
* Authorization for callers connecting to a generated MCP server deployed over HTTP. The hosting
|
|
3919
|
+
* application resolves upstream API credentials separately at runtime. This setting does not
|
|
3920
|
+
* apply to the Typeship-hosted endpoint.
|
|
3921
|
+
*/
|
|
3922
|
+
access?: {
|
|
3923
|
+
/**
|
|
3924
|
+
* Exact issuer allowed to sign MCP connection tokens.
|
|
3925
|
+
* Format: uri
|
|
3926
|
+
*/
|
|
3927
|
+
issuer: string;
|
|
3928
|
+
/**
|
|
3929
|
+
* Canonical public URL of the self-hosted MCP endpoint that connection tokens must target.
|
|
3930
|
+
* Format: uri
|
|
3931
|
+
*/
|
|
3932
|
+
resource: string;
|
|
3933
|
+
/**
|
|
3934
|
+
* Public signing-key endpoint. Omit to discover it from the issuer.
|
|
3935
|
+
* Format: uri
|
|
3936
|
+
*/
|
|
3937
|
+
jwks_url?: string;
|
|
3938
|
+
/** Minimum scopes required to connect to the self-hosted MCP server. */
|
|
3939
|
+
scopes?: string[];
|
|
3940
|
+
};
|
|
3941
|
+
/**
|
|
3942
|
+
* MCP tool shape. meta collapses per-operation tools into search_docs, read_docs, and execute so
|
|
3943
|
+
* large APIs don't flood an agent's context window. Auto considers the serialized tool schemas,
|
|
3944
|
+
* switching near 10k tokens or above 100 operations.
|
|
3945
|
+
*/
|
|
3946
|
+
tool_mode?: ("auto" | "operations" | "meta") | (string & {});
|
|
3947
|
+
/**
|
|
3948
|
+
* Guidance appended to the MCP server's instructions, which agents read once when they connect
|
|
3949
|
+
* (server/discover): what to call first, conventions the spec does not state, what not to do.
|
|
3950
|
+
* Carried by the package's server and the hosted endpoint alike.
|
|
3951
|
+
*/
|
|
3952
|
+
instructions?: string | null;
|
|
3953
|
+
/**
|
|
3954
|
+
* Hand-written MCP tool descriptions keyed by operationId or "METHOD /path". Each replaces the
|
|
3955
|
+
* text typeship derives for that operation (summary, first sentence, method and path, deprecation
|
|
3956
|
+
* and auth notes). For flows the spec cannot describe, such as a multi-step upload. Keys that
|
|
3957
|
+
* match no operation are reported as generation warnings.
|
|
3958
|
+
*/
|
|
3959
|
+
tool_descriptions?: Record<string, string>;
|
|
3960
|
+
/**
|
|
3961
|
+
* Exact name-or-ID resolver overrides keyed first by the target operationId or "METHOD /path",
|
|
3962
|
+
* then by its wire argument name. A resolver names one read collection operation plus 1-4 item
|
|
3963
|
+
* fields to match case-insensitively; false opts that argument out of strict inference.
|
|
3964
|
+
*/
|
|
3965
|
+
reference_resolvers?: Record<string, Record<string, false | (string & {})
|
|
3966
|
+
| {
|
|
3967
|
+
/** OperationId, "METHOD /path", MCP tool name, or dotted resource.method of the list operation. */
|
|
3968
|
+
via: string;
|
|
3969
|
+
/** Item fields compared exactly and case-insensitively, such as name, slug, key, or email. */
|
|
3970
|
+
match: string[];
|
|
3971
|
+
/** Item field substituted into the requested argument. Defaults to id. */
|
|
3972
|
+
id?: string;
|
|
3973
|
+
}>>;
|
|
3974
|
+
}
|
|
3975
|
+
|
|
3976
|
+
/** Generated README behavior. Part of Config. */
|
|
3977
|
+
export interface ReadmeBehaviorResponse {
|
|
3978
|
+
/**
|
|
3979
|
+
* operationId or "METHOD /path" to feature as the README's first API call. It must be present in
|
|
3980
|
+
* the generated package and callable with no required input beyond path placeholders. Missing or
|
|
3981
|
+
* unsuitable choices produce a warning and use the automatic example.
|
|
3982
|
+
*/
|
|
3983
|
+
quickstart_operation?: string | null;
|
|
3984
|
+
}
|
|
3985
|
+
|
|
3986
|
+
/**
|
|
3987
|
+
* Published-package metadata the API spec does not own. Repository is derived from each
|
|
3988
|
+
* destination.
|
|
3989
|
+
*/
|
|
3990
|
+
export interface PackageBehaviorResponse {
|
|
3991
|
+
/** Homepage written into registry metadata. */
|
|
3992
|
+
homepage?: string | null;
|
|
3993
|
+
/** SPDX identifier written into registry metadata. Defaults to info.license. */
|
|
3994
|
+
license?: string | null;
|
|
3995
|
+
/**
|
|
3996
|
+
* Exact LICENSE file contents. Supply this for licences the engine does not build in; MIT is
|
|
3997
|
+
* built in when copyright is also set.
|
|
3998
|
+
*/
|
|
3999
|
+
license_text?: string | null;
|
|
4000
|
+
/** Copyright line used in generated license files. */
|
|
4001
|
+
copyright?: string | null;
|
|
4002
|
+
/** Go identifier when the destination repository name is unsuitable. */
|
|
4003
|
+
go_package_name?: string | null;
|
|
4004
|
+
}
|
|
4005
|
+
|
|
4006
|
+
/**
|
|
4007
|
+
* Everything Typeship needs beyond the Spec, in one object: generation customization (globals,
|
|
4008
|
+
* retries, pagination, readme) and how the generated tooling behaves (cli, mcp, package, docs_url).
|
|
4009
|
+
* Plain configuration. Typeship never requires vendor extensions inside the Spec itself. One-shot
|
|
4010
|
+
* generation also accepts GraphQL settings here; stored projects keep those settings on their Spec.
|
|
4011
|
+
*/
|
|
4012
|
+
export interface ConfigResponse {
|
|
4013
|
+
/**
|
|
4014
|
+
* Wire names of query/header parameters that become settable once on the generated client and
|
|
4015
|
+
* auto-apply to every operation that accepts them; per-call values win. Names that match nothing
|
|
4016
|
+
* are reported as generation warnings.
|
|
4017
|
+
*/
|
|
4018
|
+
globals?: string[];
|
|
4019
|
+
retries?: RetryTuningResponse;
|
|
4020
|
+
/**
|
|
4021
|
+
* Per-operation pagination control, keyed by operationId or "METHOD /path". Unmatched keys are
|
|
4022
|
+
* reported as generation warnings.
|
|
4023
|
+
*/
|
|
4024
|
+
pagination?: Record<string, PaginationRuleResponse | boolean>;
|
|
4025
|
+
graphql?: GraphqlSettingsResponse;
|
|
4026
|
+
auth?: AuthenticationConfigResponse;
|
|
4027
|
+
cli?: CliBehaviorResponse;
|
|
4028
|
+
mcp?: McpBehaviorResponse;
|
|
4029
|
+
readme?: ReadmeBehaviorResponse;
|
|
4030
|
+
package?: PackageBehaviorResponse;
|
|
4031
|
+
/**
|
|
4032
|
+
* The API's documentation site. Read through its llms.txt by the generated CLI's docs command,
|
|
4033
|
+
* the MCP server's docs tools, and the package's AGENTS.md. Defaults to the Spec's externalDocs
|
|
4034
|
+
* URL.
|
|
4035
|
+
* Format: uri
|
|
4036
|
+
*/
|
|
4037
|
+
docs_url?: string | null;
|
|
4038
|
+
/**
|
|
4039
|
+
* Exact llms.txt URL when the documentation site does not publish it at docs_url + /llms.txt.
|
|
4040
|
+
* Format: uri
|
|
4041
|
+
*/
|
|
4042
|
+
docs_index_url?: string | null;
|
|
4043
|
+
}
|
|
4044
|
+
|
|
4045
|
+
/** Response shape for ConfigResponse. */
|
|
4046
|
+
export interface ConfigResponseRead {
|
|
4047
|
+
/**
|
|
4048
|
+
* Wire names of query/header parameters that become settable once on the generated client and
|
|
4049
|
+
* auto-apply to every operation that accepts them; per-call values win. Names that match nothing
|
|
4050
|
+
* are reported as generation warnings.
|
|
4051
|
+
*/
|
|
4052
|
+
globals?: string[];
|
|
4053
|
+
retries?: RetryTuningResponse;
|
|
4054
|
+
/**
|
|
4055
|
+
* Per-operation pagination control, keyed by operationId or "METHOD /path". Unmatched keys are
|
|
4056
|
+
* reported as generation warnings.
|
|
4057
|
+
*/
|
|
4058
|
+
pagination?: Record<string, PaginationRuleResponseRead | boolean>;
|
|
4059
|
+
graphql?: GraphqlSettingsResponseRead;
|
|
4060
|
+
auth?: AuthenticationConfigResponse;
|
|
4061
|
+
cli?: CliBehaviorResponse;
|
|
4062
|
+
mcp?: McpBehaviorResponseRead;
|
|
4063
|
+
readme?: ReadmeBehaviorResponse;
|
|
4064
|
+
package?: PackageBehaviorResponse;
|
|
4065
|
+
/**
|
|
4066
|
+
* The API's documentation site. Read through its llms.txt by the generated CLI's docs command,
|
|
4067
|
+
* the MCP server's docs tools, and the package's AGENTS.md. Defaults to the Spec's externalDocs
|
|
4068
|
+
* URL.
|
|
4069
|
+
* Format: uri
|
|
4070
|
+
*/
|
|
4071
|
+
docs_url?: string | null;
|
|
4072
|
+
/**
|
|
4073
|
+
* Exact llms.txt URL when the documentation site does not publish it at docs_url + /llms.txt.
|
|
4074
|
+
* Format: uri
|
|
4075
|
+
*/
|
|
4076
|
+
docs_index_url?: string | null;
|
|
4077
|
+
}
|
|
4078
|
+
|
|
4079
|
+
/**
|
|
4080
|
+
* Shared generated-client and tooling behavior for a stored Project. Every Target inherits these
|
|
4081
|
+
* defaults. Target.config is merged over them for one Target; top-level values replace defaults
|
|
4082
|
+
* while cli, mcp, auth, readme, and package merge by field. GraphQL-only source settings live on
|
|
4083
|
+
* the Project's Spec and are rejected in both stored config scopes.
|
|
4084
|
+
*/
|
|
4085
|
+
export interface ProjectConfigResponse {
|
|
4086
|
+
/**
|
|
4087
|
+
* Wire names of query/header parameters that become settable once on the generated client and
|
|
4088
|
+
* auto-apply to every operation that accepts them; per-call values win. Names that match nothing
|
|
4089
|
+
* are reported as generation warnings.
|
|
4090
|
+
*/
|
|
4091
|
+
globals?: string[];
|
|
4092
|
+
retries?: RetryTuningResponse;
|
|
4093
|
+
/**
|
|
4094
|
+
* Per-operation pagination control, keyed by operationId or "METHOD /path". Unmatched keys are
|
|
4095
|
+
* reported as generation warnings.
|
|
4096
|
+
*/
|
|
4097
|
+
pagination?: Record<string, PaginationRuleResponse | boolean>;
|
|
4098
|
+
auth?: AuthenticationConfigResponse;
|
|
4099
|
+
cli?: CliBehaviorResponse;
|
|
4100
|
+
mcp?: McpBehaviorResponse;
|
|
4101
|
+
readme?: ReadmeBehaviorResponse;
|
|
4102
|
+
package?: PackageBehaviorResponse;
|
|
4103
|
+
/**
|
|
4104
|
+
* The API's documentation site. Read through its llms.txt by the generated CLI's docs command,
|
|
4105
|
+
* the MCP server's docs tools, and the package's AGENTS.md. Defaults to the Spec's externalDocs
|
|
4106
|
+
* URL.
|
|
4107
|
+
* Format: uri
|
|
4108
|
+
*/
|
|
4109
|
+
docs_url?: string | null;
|
|
4110
|
+
/**
|
|
4111
|
+
* Exact llms.txt URL when the documentation site does not publish it at docs_url + /llms.txt.
|
|
4112
|
+
* Format: uri
|
|
4113
|
+
*/
|
|
4114
|
+
docs_index_url?: string | null;
|
|
4115
|
+
}
|
|
4116
|
+
|
|
4117
|
+
/** Response shape for ProjectConfigResponse. */
|
|
4118
|
+
export interface ProjectConfigResponseRead {
|
|
4119
|
+
/**
|
|
4120
|
+
* Wire names of query/header parameters that become settable once on the generated client and
|
|
4121
|
+
* auto-apply to every operation that accepts them; per-call values win. Names that match nothing
|
|
4122
|
+
* are reported as generation warnings.
|
|
4123
|
+
*/
|
|
4124
|
+
globals?: string[];
|
|
4125
|
+
retries?: RetryTuningResponse;
|
|
4126
|
+
/**
|
|
4127
|
+
* Per-operation pagination control, keyed by operationId or "METHOD /path". Unmatched keys are
|
|
4128
|
+
* reported as generation warnings.
|
|
4129
|
+
*/
|
|
4130
|
+
pagination?: Record<string, PaginationRuleResponseRead | boolean>;
|
|
4131
|
+
auth?: AuthenticationConfigResponse;
|
|
4132
|
+
cli?: CliBehaviorResponse;
|
|
4133
|
+
mcp?: McpBehaviorResponseRead;
|
|
4134
|
+
readme?: ReadmeBehaviorResponse;
|
|
4135
|
+
package?: PackageBehaviorResponse;
|
|
4136
|
+
/**
|
|
4137
|
+
* The API's documentation site. Read through its llms.txt by the generated CLI's docs command,
|
|
4138
|
+
* the MCP server's docs tools, and the package's AGENTS.md. Defaults to the Spec's externalDocs
|
|
4139
|
+
* URL.
|
|
4140
|
+
* Format: uri
|
|
4141
|
+
*/
|
|
4142
|
+
docs_url?: string | null;
|
|
4143
|
+
/**
|
|
4144
|
+
* Exact llms.txt URL when the documentation site does not publish it at docs_url + /llms.txt.
|
|
4145
|
+
* Format: uri
|
|
4146
|
+
*/
|
|
4147
|
+
docs_index_url?: string | null;
|
|
4148
|
+
}
|
|
4149
|
+
|
|
4150
|
+
/**
|
|
4151
|
+
* Target-specific generation and delivery overrides. Authentication may only select a Project-owned
|
|
4152
|
+
* OAuth application. OAuth server metadata, applications, and identity policy remain Project-owned.
|
|
4153
|
+
* Self-hosted MCP access may be overridden for a Target-specific deployment.
|
|
4154
|
+
*/
|
|
4155
|
+
export interface TargetConfigResponse {
|
|
4156
|
+
/**
|
|
4157
|
+
* Wire names of query/header parameters that become settable once on the generated client and
|
|
4158
|
+
* auto-apply to every operation that accepts them; per-call values win. Names that match nothing
|
|
4159
|
+
* are reported as generation warnings.
|
|
4160
|
+
*/
|
|
4161
|
+
globals?: string[];
|
|
4162
|
+
retries?: RetryTuningResponse;
|
|
4163
|
+
/**
|
|
4164
|
+
* Per-operation pagination control, keyed by operationId or "METHOD /path". Unmatched keys are
|
|
4165
|
+
* reported as generation warnings.
|
|
4166
|
+
*/
|
|
4167
|
+
pagination?: Record<string, PaginationRuleResponse | boolean>;
|
|
4168
|
+
auth?: TargetAuthenticationConfigResponse;
|
|
4169
|
+
cli?: TargetCliBehaviorResponse;
|
|
4170
|
+
mcp?: McpBehaviorResponse;
|
|
4171
|
+
readme?: ReadmeBehaviorResponse;
|
|
4172
|
+
package?: PackageBehaviorResponse;
|
|
4173
|
+
/**
|
|
4174
|
+
* The API's documentation site. Read through its llms.txt by the generated CLI's docs command,
|
|
4175
|
+
* the MCP server's docs tools, and the package's AGENTS.md. Defaults to the Spec's externalDocs
|
|
4176
|
+
* URL.
|
|
4177
|
+
* Format: uri
|
|
4178
|
+
*/
|
|
4179
|
+
docs_url?: string | null;
|
|
4180
|
+
/**
|
|
4181
|
+
* Exact llms.txt URL when the documentation site does not publish it at docs_url + /llms.txt.
|
|
4182
|
+
* Format: uri
|
|
4183
|
+
*/
|
|
4184
|
+
docs_index_url?: string | null;
|
|
4185
|
+
}
|
|
4186
|
+
|
|
4187
|
+
/** Response shape for TargetConfigResponse. */
|
|
4188
|
+
export interface TargetConfigResponseRead {
|
|
4189
|
+
/**
|
|
4190
|
+
* Wire names of query/header parameters that become settable once on the generated client and
|
|
4191
|
+
* auto-apply to every operation that accepts them; per-call values win. Names that match nothing
|
|
4192
|
+
* are reported as generation warnings.
|
|
4193
|
+
*/
|
|
4194
|
+
globals?: string[];
|
|
4195
|
+
retries?: RetryTuningResponse;
|
|
4196
|
+
/**
|
|
4197
|
+
* Per-operation pagination control, keyed by operationId or "METHOD /path". Unmatched keys are
|
|
4198
|
+
* reported as generation warnings.
|
|
4199
|
+
*/
|
|
4200
|
+
pagination?: Record<string, PaginationRuleResponseRead | boolean>;
|
|
4201
|
+
auth?: TargetAuthenticationConfigResponse;
|
|
4202
|
+
cli?: TargetCliBehaviorResponse;
|
|
4203
|
+
mcp?: McpBehaviorResponseRead;
|
|
4204
|
+
readme?: ReadmeBehaviorResponse;
|
|
4205
|
+
package?: PackageBehaviorResponse;
|
|
4206
|
+
/**
|
|
4207
|
+
* The API's documentation site. Read through its llms.txt by the generated CLI's docs command,
|
|
4208
|
+
* the MCP server's docs tools, and the package's AGENTS.md. Defaults to the Spec's externalDocs
|
|
4209
|
+
* URL.
|
|
4210
|
+
* Format: uri
|
|
4211
|
+
*/
|
|
4212
|
+
docs_url?: string | null;
|
|
4213
|
+
/**
|
|
4214
|
+
* Exact llms.txt URL when the documentation site does not publish it at docs_url + /llms.txt.
|
|
4215
|
+
* Format: uri
|
|
4216
|
+
*/
|
|
4217
|
+
docs_index_url?: string | null;
|
|
4218
|
+
}
|
|
4219
|
+
|
|
4220
|
+
/** What a GraphQL schema cannot say about itself. Ignored for OpenAPI specs. */
|
|
4221
|
+
export interface GraphqlSettingsResponse {
|
|
4222
|
+
/**
|
|
4223
|
+
* The URL every request is POSTed to; the generated client's default baseUrl. Defaults to the URL
|
|
4224
|
+
* the schema was fetched from. Without either, baseUrl is a required client option.
|
|
4225
|
+
* Format: uri
|
|
4226
|
+
*/
|
|
4227
|
+
endpoint?: string;
|
|
4228
|
+
/**
|
|
4229
|
+
* Named endpoints (sandbox, production). Each becomes a client environment; the first is the
|
|
4230
|
+
* default unless endpoint is set.
|
|
4231
|
+
*/
|
|
4232
|
+
environments?: Array<{
|
|
4233
|
+
name: string;
|
|
4234
|
+
/** Format: uri */
|
|
4235
|
+
url: string;
|
|
4236
|
+
}>;
|
|
4237
|
+
/**
|
|
4238
|
+
* How requests authenticate. bearer sends Authorization: Bearer; basic is for key-pair APIs
|
|
4239
|
+
* (public key as username, private key as password); api_key sends a header named by
|
|
4240
|
+
* api_key_header; none generates no auth option.
|
|
4241
|
+
* Default: "bearer"
|
|
4242
|
+
*/
|
|
4243
|
+
auth?: "bearer" | "basic" | "api_key" | "none";
|
|
4244
|
+
/**
|
|
4245
|
+
* Header carrying the key when auth is api_key. Required for that mode; Typeship does not invent
|
|
4246
|
+
* a vendor-specific header name.
|
|
4247
|
+
*/
|
|
4248
|
+
api_key_header?: string;
|
|
4249
|
+
/**
|
|
4250
|
+
* The API's name; drives the package and client names ("Acme" gives acme and AcmeClient).
|
|
4251
|
+
* Defaults to a name derived from the endpoint's host.
|
|
4252
|
+
*/
|
|
4253
|
+
title?: string;
|
|
4254
|
+
/**
|
|
4255
|
+
* JSON representation of each custom scalar, keyed by GraphQL scalar name. Unmapped scalars
|
|
4256
|
+
* generate as the language's untyped JSON value and produce a warning. Unmatched keys warn.
|
|
4257
|
+
*/
|
|
4258
|
+
scalars?: Record<string, "string" | "integer" | "number" | "boolean" | "json">;
|
|
4259
|
+
}
|
|
4260
|
+
|
|
4261
|
+
/** Response shape for GraphqlSettingsResponse. */
|
|
4262
|
+
export interface GraphqlSettingsResponseRead {
|
|
4263
|
+
/**
|
|
4264
|
+
* The URL every request is POSTed to; the generated client's default baseUrl. Defaults to the URL
|
|
4265
|
+
* the schema was fetched from. Without either, baseUrl is a required client option.
|
|
4266
|
+
* Format: uri
|
|
4267
|
+
*/
|
|
4268
|
+
endpoint?: string;
|
|
4269
|
+
/**
|
|
4270
|
+
* Named endpoints (sandbox, production). Each becomes a client environment; the first is the
|
|
4271
|
+
* default unless endpoint is set.
|
|
4272
|
+
*/
|
|
4273
|
+
environments?: Array<{
|
|
4274
|
+
name: string;
|
|
4275
|
+
/** Format: uri */
|
|
4276
|
+
url: string;
|
|
4277
|
+
}>;
|
|
4278
|
+
/**
|
|
4279
|
+
* How requests authenticate. bearer sends Authorization: Bearer; basic is for key-pair APIs
|
|
4280
|
+
* (public key as username, private key as password); api_key sends a header named by
|
|
4281
|
+
* api_key_header; none generates no auth option.
|
|
4282
|
+
* Default: "bearer"
|
|
4283
|
+
*/
|
|
4284
|
+
auth?: ("bearer" | "basic" | "api_key" | "none") | (string & {});
|
|
4285
|
+
/**
|
|
4286
|
+
* Header carrying the key when auth is api_key. Required for that mode; Typeship does not invent
|
|
4287
|
+
* a vendor-specific header name.
|
|
4288
|
+
*/
|
|
4289
|
+
api_key_header?: string;
|
|
4290
|
+
/**
|
|
4291
|
+
* The API's name; drives the package and client names ("Acme" gives acme and AcmeClient).
|
|
4292
|
+
* Defaults to a name derived from the endpoint's host.
|
|
4293
|
+
*/
|
|
4294
|
+
title?: string;
|
|
4295
|
+
/**
|
|
4296
|
+
* JSON representation of each custom scalar, keyed by GraphQL scalar name. Unmapped scalars
|
|
4297
|
+
* generate as the language's untyped JSON value and produce a warning. Unmatched keys warn.
|
|
4298
|
+
*/
|
|
4299
|
+
scalars?: Record<string, ("string" | "integer" | "number" | "boolean" | "json") | (string & {})>;
|
|
4300
|
+
}
|
|
4301
|
+
|
|
4302
|
+
/**
|
|
4303
|
+
* Retry behavior. Top-level fields adjust every operation; operations maps operationId or "METHOD
|
|
4304
|
+
* /path" keys to per-operation overrides.
|
|
4305
|
+
*/
|
|
4306
|
+
export interface RetryTuningResponse {
|
|
4307
|
+
max_retries?: number;
|
|
4308
|
+
/** Replaces the default retryable set (408, 429, 500, 502, 503, 504). */
|
|
4309
|
+
statuses?: number[];
|
|
4310
|
+
initial_delay_ms?: number;
|
|
4311
|
+
max_delay_ms?: number;
|
|
4312
|
+
/** Also retry non-idempotent methods (POST/PATCH). */
|
|
4313
|
+
retry_non_idempotent?: boolean;
|
|
4314
|
+
/** Shorthand for max_retries 0. */
|
|
4315
|
+
disabled?: boolean;
|
|
4316
|
+
operations?: Record<string, RetryTuningResponse>;
|
|
4317
|
+
}
|
|
4318
|
+
|
|
4319
|
+
export interface PaginationRuleResponse {
|
|
4320
|
+
/** Default: "cursor" */
|
|
4321
|
+
style?: "cursor" | "cursor_from_last_id" | "page" | "offset";
|
|
4322
|
+
/** Response field holding the item array. */
|
|
4323
|
+
items_field: string;
|
|
4324
|
+
cursor_param?: string;
|
|
4325
|
+
next_cursor_field?: string;
|
|
4326
|
+
has_more_field?: string;
|
|
4327
|
+
id_field?: string;
|
|
4328
|
+
page_param?: string;
|
|
4329
|
+
offset_param?: string;
|
|
4330
|
+
limit_param?: string;
|
|
4331
|
+
}
|
|
4332
|
+
|
|
4333
|
+
/** Response shape for PaginationRuleResponse. */
|
|
4334
|
+
export interface PaginationRuleResponseRead {
|
|
4335
|
+
/** Default: "cursor" */
|
|
4336
|
+
style?: ("cursor" | "cursor_from_last_id" | "page" | "offset") | (string & {});
|
|
4337
|
+
/** Response field holding the item array. */
|
|
4338
|
+
items_field: string;
|
|
4339
|
+
cursor_param?: string;
|
|
4340
|
+
next_cursor_field?: string;
|
|
4341
|
+
has_more_field?: string;
|
|
4342
|
+
id_field?: string;
|
|
4343
|
+
page_param?: string;
|
|
4344
|
+
offset_param?: string;
|
|
4345
|
+
limit_param?: string;
|
|
4346
|
+
}
|
|
4347
|
+
|
|
4348
|
+
export interface ErrorModel {
|
|
4349
|
+
errors: ErrorDetail[];
|
|
4350
|
+
request_id: RequestId;
|
|
4351
|
+
}
|
|
4352
|
+
|
|
4353
|
+
/** Response shape for ErrorModel. */
|
|
4354
|
+
export interface ErrorModelRead {
|
|
4355
|
+
errors: ErrorDetailRead[];
|
|
4356
|
+
request_id: RequestId;
|
|
4357
|
+
}
|
|
4358
|
+
|
|
4359
|
+
/** Git file mode. 100755 is executable; 120000 is a symbolic link whose content is its target. */
|
|
4360
|
+
export const GitFileMode = {
|
|
4361
|
+
V_100644: "100644",
|
|
4362
|
+
V_100755: "100755",
|
|
4363
|
+
V_120000: "120000",
|
|
4364
|
+
} as const;
|
|
4365
|
+
export type GitFileMode = (typeof GitFileMode)[keyof typeof GitFileMode];
|
|
4366
|
+
|
|
4367
|
+
/**
|
|
4368
|
+
* One side of a Draft file comparison: base is the last merged version, yours is your repository
|
|
4369
|
+
* edit, and generated is the new version Typeship proposes for this conflict stage. The conflict
|
|
4370
|
+
* source identifies whether that version comes from a Generation, the default branch, or a saved
|
|
4371
|
+
* Draft. Missing sides represent deleted or absent files.
|
|
4372
|
+
*/
|
|
4373
|
+
export const DraftFileSide = {
|
|
4374
|
+
BASE: "base",
|
|
4375
|
+
YOURS: "yours",
|
|
4376
|
+
GENERATED: "generated",
|
|
4377
|
+
} as const;
|
|
4378
|
+
export type DraftFileSide = (typeof DraftFileSide)[keyof typeof DraftFileSide];
|
|
4379
|
+
|
|
4380
|
+
/**
|
|
4381
|
+
* File IDs for each side of a conflict or history comparison. null means the file is absent on that
|
|
4382
|
+
* side.
|
|
4383
|
+
*/
|
|
4384
|
+
export interface DraftFileSides {
|
|
4385
|
+
base: FileId | null;
|
|
4386
|
+
yours: FileId | null;
|
|
4387
|
+
generated: FileId | null;
|
|
4388
|
+
}
|
|
4389
|
+
|
|
4390
|
+
export interface DraftFileConflict {
|
|
4391
|
+
/**
|
|
4392
|
+
* Why the Draft needs a decision. no_common_version: there is no last merged version to compare,
|
|
4393
|
+
* such as the first Draft of an adopted package. file_ownership: generated output collides with a
|
|
4394
|
+
* file you added. yours_deleted_generated_changed and generated_deleted_yours_changed: one side
|
|
4395
|
+
* deleted a file the other changed. overlapping_text: both sides edited the same lines.
|
|
4396
|
+
* too_large_to_merge: the file has too many changed lines to merge line by line. binary_changed
|
|
4397
|
+
* and file_mode_changed: both sides changed binary content or the file mode.
|
|
4398
|
+
*/
|
|
4399
|
+
type: "no_common_version"
|
|
4400
|
+
| "file_ownership"
|
|
4401
|
+
| "yours_deleted_generated_changed"
|
|
4402
|
+
| "generated_deleted_yours_changed"
|
|
4403
|
+
| "overlapping_text"
|
|
4404
|
+
| "too_large_to_merge"
|
|
4405
|
+
| "binary_changed"
|
|
4406
|
+
| "file_mode_changed";
|
|
4407
|
+
/**
|
|
4408
|
+
* Where the code in this Draft comes from: newly generated files, commits on the default branch,
|
|
4409
|
+
* or edits from a Draft whose branch was rebased, reset, or deleted. Typeship may find another
|
|
4410
|
+
* conflict after these decisions are applied.
|
|
4411
|
+
*/
|
|
4412
|
+
source: "generation" | "default_branch" | "previous_draft";
|
|
4413
|
+
/**
|
|
4414
|
+
* Decision saved for this conflict on head_sha; null when none. Typeship continues when every
|
|
4415
|
+
* conflict has a decision.
|
|
4416
|
+
*/
|
|
4417
|
+
decision: "yours" | "generated" | "content" | null;
|
|
4418
|
+
}
|
|
4419
|
+
|
|
4420
|
+
/** Response shape for DraftFileConflict. */
|
|
4421
|
+
export interface DraftFileConflictRead {
|
|
4422
|
+
/**
|
|
4423
|
+
* Why the Draft needs a decision. no_common_version: there is no last merged version to compare,
|
|
4424
|
+
* such as the first Draft of an adopted package. file_ownership: generated output collides with a
|
|
4425
|
+
* file you added. yours_deleted_generated_changed and generated_deleted_yours_changed: one side
|
|
4426
|
+
* deleted a file the other changed. overlapping_text: both sides edited the same lines.
|
|
4427
|
+
* too_large_to_merge: the file has too many changed lines to merge line by line. binary_changed
|
|
4428
|
+
* and file_mode_changed: both sides changed binary content or the file mode.
|
|
4429
|
+
*/
|
|
4430
|
+
type: ("no_common_version"
|
|
4431
|
+
| "file_ownership"
|
|
4432
|
+
| "yours_deleted_generated_changed"
|
|
4433
|
+
| "generated_deleted_yours_changed"
|
|
4434
|
+
| "overlapping_text"
|
|
4435
|
+
| "too_large_to_merge"
|
|
4436
|
+
| "binary_changed"
|
|
4437
|
+
| "file_mode_changed") | (string & {});
|
|
4438
|
+
/**
|
|
4439
|
+
* Where the code in this Draft comes from: newly generated files, commits on the default branch,
|
|
4440
|
+
* or edits from a Draft whose branch was rebased, reset, or deleted. Typeship may find another
|
|
4441
|
+
* conflict after these decisions are applied.
|
|
4442
|
+
*/
|
|
4443
|
+
source: ("generation" | "default_branch" | "previous_draft") | (string & {});
|
|
4444
|
+
/**
|
|
4445
|
+
* Decision saved for this conflict on head_sha; null when none. Typeship continues when every
|
|
4446
|
+
* conflict has a decision.
|
|
4447
|
+
*/
|
|
4448
|
+
decision: ("yours" | "generated" | "content" | null) | (string & {}) | null;
|
|
4449
|
+
}
|
|
4450
|
+
|
|
4451
|
+
export interface DraftFileHistory {
|
|
4452
|
+
/**
|
|
4453
|
+
* How the rewritten default branch differs from the last merged package; null when only the Draft
|
|
4454
|
+
* differs.
|
|
4455
|
+
*/
|
|
4456
|
+
change: "added" | "edited" | "deleted" | "mode_changed" | null;
|
|
4457
|
+
/**
|
|
4458
|
+
* The Draft branch has a different version than the rewritten default branch. Recovery carries
|
|
4459
|
+
* the Draft version forward.
|
|
4460
|
+
*/
|
|
4461
|
+
draft_differs: boolean;
|
|
4462
|
+
}
|
|
4463
|
+
|
|
4464
|
+
/** Response shape for DraftFileHistory. */
|
|
4465
|
+
export interface DraftFileHistoryRead {
|
|
4466
|
+
/**
|
|
4467
|
+
* How the rewritten default branch differs from the last merged package; null when only the Draft
|
|
4468
|
+
* differs.
|
|
4469
|
+
*/
|
|
4470
|
+
change: ("added" | "edited" | "deleted" | "mode_changed" | null) | (string & {}) | null;
|
|
4471
|
+
/**
|
|
4472
|
+
* The Draft branch has a different version than the rewritten default branch. Recovery carries
|
|
4473
|
+
* the Draft version forward.
|
|
4474
|
+
*/
|
|
4475
|
+
draft_differs: boolean;
|
|
4476
|
+
}
|
|
4477
|
+
|
|
4478
|
+
export interface DraftFile {
|
|
4479
|
+
object: "draft_file";
|
|
4480
|
+
/** Path relative to the Target's package directory. */
|
|
4481
|
+
path: string;
|
|
4482
|
+
/** How the Draft differs from the last merged package at this path; null when it does not. */
|
|
4483
|
+
customization: "added" | "edited" | "deleted" | "mode_changed" | null;
|
|
4484
|
+
conflict: DraftFileConflict | null;
|
|
4485
|
+
history: DraftFileHistory | null;
|
|
4486
|
+
/** File IDs to read with getFile for a conflict or history file; null for other customized files. */
|
|
4487
|
+
sides: DraftFileSides | null;
|
|
4488
|
+
}
|
|
4489
|
+
|
|
4490
|
+
/** Response shape for DraftFile. */
|
|
4491
|
+
export interface DraftFileRead {
|
|
4492
|
+
object: "draft_file" | (string & {});
|
|
4493
|
+
/** Path relative to the Target's package directory. */
|
|
4494
|
+
path: string;
|
|
4495
|
+
/** How the Draft differs from the last merged package at this path; null when it does not. */
|
|
4496
|
+
customization: ("added" | "edited" | "deleted" | "mode_changed" | null) | (string & {}) | null;
|
|
4497
|
+
conflict: DraftFileConflictRead | null;
|
|
4498
|
+
history: DraftFileHistoryRead | null;
|
|
4499
|
+
/** File IDs to read with getFile for a conflict or history file; null for other customized files. */
|
|
4500
|
+
sides: DraftFileSides | null;
|
|
4501
|
+
}
|
|
4502
|
+
|
|
4503
|
+
export interface DraftFileList {
|
|
4504
|
+
object: ListObject;
|
|
4505
|
+
data: DraftFile[];
|
|
4506
|
+
has_more: boolean;
|
|
4507
|
+
next_cursor: string | null;
|
|
4508
|
+
request_id: RequestId;
|
|
4509
|
+
}
|
|
4510
|
+
|
|
4511
|
+
/** Response shape for DraftFileList. */
|
|
4512
|
+
export interface DraftFileListRead {
|
|
4513
|
+
object: ListObject;
|
|
4514
|
+
data: DraftFileRead[];
|
|
4515
|
+
has_more: boolean;
|
|
4516
|
+
next_cursor: string | null;
|
|
4517
|
+
request_id: RequestId;
|
|
4518
|
+
}
|
|
4519
|
+
|
|
4520
|
+
export type DraftConflictDecision = {
|
|
4521
|
+
path: string;
|
|
4522
|
+
/** Keep that version of the file exactly. Keeping an absent version deletes the path. */
|
|
4523
|
+
keep: "yours" | "generated";
|
|
4524
|
+
}
|
|
4525
|
+
| {
|
|
4526
|
+
path: string;
|
|
4527
|
+
keep: "content";
|
|
4528
|
+
/** Final file text, stored as UTF-8. An empty string creates an empty file. */
|
|
4529
|
+
content: string;
|
|
4530
|
+
mode: GitFileMode;
|
|
4531
|
+
}
|
|
4532
|
+
| {
|
|
4533
|
+
path: string;
|
|
4534
|
+
keep: "content";
|
|
4535
|
+
/** Final file bytes as canonical base64, for binary files. */
|
|
4536
|
+
content_base64: string;
|
|
4537
|
+
mode: GitFileMode;
|
|
4538
|
+
}
|
|
4539
|
+
| {
|
|
4540
|
+
path: string;
|
|
4541
|
+
keep: "content";
|
|
4542
|
+
/** Delete this file. */
|
|
4543
|
+
content: null;
|
|
4544
|
+
};
|
|
4545
|
+
|
|
4546
|
+
/** Response shape for DraftConflictDecision. */
|
|
4547
|
+
export type DraftConflictDecisionRead = {
|
|
4548
|
+
path: string;
|
|
4549
|
+
/** Keep that version of the file exactly. Keeping an absent version deletes the path. */
|
|
4550
|
+
keep: ("yours" | "generated") | (string & {});
|
|
4551
|
+
}
|
|
4552
|
+
| {
|
|
4553
|
+
path: string;
|
|
4554
|
+
keep: "content" | (string & {});
|
|
4555
|
+
/** Final file text, stored as UTF-8. An empty string creates an empty file. */
|
|
4556
|
+
content: string;
|
|
4557
|
+
mode: GitFileMode | (string & {});
|
|
4558
|
+
}
|
|
4559
|
+
| {
|
|
4560
|
+
path: string;
|
|
4561
|
+
keep: "content" | (string & {});
|
|
4562
|
+
/** Final file bytes as canonical base64, for binary files. */
|
|
4563
|
+
content_base64: string;
|
|
4564
|
+
mode: GitFileMode | (string & {});
|
|
4565
|
+
}
|
|
4566
|
+
| {
|
|
4567
|
+
path: string;
|
|
4568
|
+
keep: "content" | (string & {});
|
|
4569
|
+
/** Delete this file. */
|
|
4570
|
+
content: null;
|
|
4571
|
+
};
|
|
4572
|
+
|
|
4573
|
+
export interface DraftResolveRequest {
|
|
4574
|
+
/** The Draft's head_sha. A newer Draft commit returns 409 resource_changed without saving. */
|
|
4575
|
+
expected_head_sha: string;
|
|
4576
|
+
/**
|
|
4577
|
+
* Unique current conflict or customized paths. Choose generated to discard a customization,
|
|
4578
|
+
* including a Draft-only file. Final file content must total at most 2 MiB. Decisions apply
|
|
4579
|
+
* together or not at all.
|
|
4580
|
+
*/
|
|
4581
|
+
resolutions: DraftConflictDecision[];
|
|
4582
|
+
}
|
|
4583
|
+
|
|
4584
|
+
/** Response shape for DraftResolveRequest. */
|
|
4585
|
+
export interface DraftResolveRequestRead {
|
|
4586
|
+
/** The Draft's head_sha. A newer Draft commit returns 409 resource_changed without saving. */
|
|
4587
|
+
expected_head_sha: string;
|
|
4588
|
+
/**
|
|
4589
|
+
* Unique current conflict or customized paths. Choose generated to discard a customization,
|
|
4590
|
+
* including a Draft-only file. Final file content must total at most 2 MiB. Decisions apply
|
|
4591
|
+
* together or not at all.
|
|
4592
|
+
*/
|
|
4593
|
+
resolutions: DraftConflictDecisionRead[];
|
|
4594
|
+
}
|
|
4595
|
+
|
|
4596
|
+
export interface GenerateProjectRequest {
|
|
4597
|
+
/** Generate only this active Target. Omit to generate all active Targets in the Project. */
|
|
4598
|
+
target_id?: TargetId;
|
|
4599
|
+
}
|
|
4600
|
+
|
|
4601
|
+
/** The stage that failed. A delivery failure does not change a completed Generation's status. */
|
|
4602
|
+
export const FailurePhase = {
|
|
4603
|
+
SPEC: "spec",
|
|
4604
|
+
GENERATION: "generation",
|
|
4605
|
+
DELIVERY: "delivery",
|
|
4606
|
+
PUBLICATION: "publication",
|
|
4607
|
+
} as const;
|
|
4608
|
+
export type FailurePhase = (typeof FailurePhase)[keyof typeof FailurePhase];
|
|
4609
|
+
|
|
4610
|
+
export type DomainError = ErrorDetail & {
|
|
4611
|
+
phase: FailurePhase;
|
|
4612
|
+
};
|
|
4613
|
+
|
|
4614
|
+
/** Response shape for DomainError. */
|
|
4615
|
+
export type DomainErrorRead = ErrorDetailRead & {
|
|
4616
|
+
phase: FailurePhase | (string & {});
|
|
4617
|
+
};
|
|
4618
|
+
|
|
4619
|
+
export interface DraftRecoverRequest {
|
|
4620
|
+
/** The Draft's history_recovery.default_sha. */
|
|
4621
|
+
expected_default_sha: string;
|
|
4622
|
+
/** The Draft's history_recovery.head_sha; null when the Draft branch is absent. */
|
|
4623
|
+
expected_head_sha: string | null;
|
|
3008
4624
|
}
|