@typeship-ax/cli 0.6.0 → 0.8.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/api.json +5597 -3010
- package/api.md +433 -54
- package/dist/cli-agent.d.ts +9 -1
- package/dist/cli-agent.d.ts.map +1 -1
- package/dist/cli-agent.js +26 -9
- package/dist/cli.js +83 -232
- package/dist/core/http.d.ts +6 -92
- package/dist/core/http.d.ts.map +1 -1
- package/dist/core/http.js +70 -209
- package/dist/core/pagination.d.ts.map +1 -1
- package/dist/core/pagination.js +6 -34
- package/dist/dates.d.ts +0 -2
- package/dist/dates.d.ts.map +1 -1
- package/dist/dates.js +0 -1
- package/dist/docs.d.ts +11 -0
- package/dist/docs.d.ts.map +1 -0
- package/dist/docs.js +114 -0
- package/dist/errors.d.ts +27 -27
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +7 -7
- package/dist/index.d.ts +19 -11
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +23 -13
- package/dist/ops.d.ts +5 -0
- package/dist/ops.d.ts.map +1 -1
- package/dist/ops.js +31 -17
- package/dist/resources/account.d.ts +2 -2
- package/dist/resources/account.d.ts.map +1 -1
- package/dist/resources/api-keys.d.ts +10 -5
- package/dist/resources/api-keys.d.ts.map +1 -1
- package/dist/resources/api-keys.js +3 -1
- package/dist/resources/definition-revisions.d.ts +58 -0
- package/dist/resources/definition-revisions.d.ts.map +1 -0
- package/dist/resources/definition-revisions.js +110 -0
- package/dist/resources/definitions.d.ts +24 -0
- package/dist/resources/definitions.d.ts.map +1 -0
- package/dist/resources/definitions.js +51 -0
- package/dist/resources/generate.d.ts +5 -5
- package/dist/resources/generate.d.ts.map +1 -1
- package/dist/resources/generate.js +3 -3
- package/dist/resources/generations.d.ts +3 -3
- package/dist/resources/generations.d.ts.map +1 -1
- package/dist/resources/generations.js +1 -1
- package/dist/resources/projects.d.ts +66 -26
- package/dist/resources/projects.d.ts.map +1 -1
- package/dist/resources/projects.js +87 -13
- package/dist/resources/targets.d.ts +86 -0
- package/dist/resources/targets.d.ts.map +1 -0
- package/dist/resources/targets.js +184 -0
- package/dist/schemas.d.ts.map +1 -1
- package/dist/schemas.js +119 -62
- package/dist/types.d.ts +1761 -222
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +9 -3
- package/package.json +1 -1
- package/src/cli-agent.ts +28 -11
- package/src/cli.ts +89 -233
- package/src/core/http.ts +75 -293
- package/src/core/pagination.ts +6 -30
- package/src/dates.ts +0 -1
- package/src/docs.ts +101 -0
- package/src/errors.ts +30 -30
- package/src/index.ts +23 -13
- package/src/ops.ts +43 -17
- package/src/resources/account.ts +3 -3
- package/src/resources/api-keys.ts +22 -7
- package/src/resources/definition-revisions.ts +198 -0
- package/src/resources/definitions.ts +97 -0
- package/src/resources/generate.ts +6 -6
- package/src/resources/generations.ts +4 -4
- package/src/resources/projects.ts +182 -37
- package/src/resources/targets.ts +346 -0
- package/src/schemas.ts +119 -62
- package/src/types.ts +1947 -281
- package/dist/resources/spec-revisions.d.ts +0 -47
- package/dist/resources/spec-revisions.d.ts.map +0 -1
- package/dist/resources/spec-revisions.js +0 -90
- package/src/resources/spec-revisions.ts +0 -150
package/src/types.ts
CHANGED
|
@@ -7,29 +7,47 @@ export type ProjectId = string;
|
|
|
7
7
|
/** Unique identifier for a generation. */
|
|
8
8
|
export type GenerationId = string;
|
|
9
9
|
|
|
10
|
-
/** Unique identifier for
|
|
11
|
-
export type
|
|
10
|
+
/** Unique identifier for a project's logical API Definition. */
|
|
11
|
+
export type DefinitionId = string;
|
|
12
12
|
|
|
13
|
-
/**
|
|
13
|
+
/** Unique identifier for a source document captured in a Definition Revision. */
|
|
14
|
+
export type DefinitionDocumentId = string;
|
|
15
|
+
|
|
16
|
+
/** Unique identifier for an immutable resolved Definition Revision. */
|
|
17
|
+
export type DefinitionRevisionId = string;
|
|
18
|
+
|
|
19
|
+
/** Server-generated identifier used to correlate this response with Typeship logs. */
|
|
14
20
|
export type RequestId = string;
|
|
15
21
|
|
|
22
|
+
/** Request-level metadata present at the top level of every JSON response. */
|
|
23
|
+
export interface ResponseMetadata {
|
|
24
|
+
request_id: RequestId;
|
|
25
|
+
}
|
|
26
|
+
|
|
16
27
|
/** Identifies a cursor-paginated collection. */
|
|
17
28
|
export type ListObject = "list";
|
|
18
29
|
|
|
30
|
+
/** Stable identifier for one configured generated product. */
|
|
31
|
+
export type TargetId = string;
|
|
32
|
+
|
|
33
|
+
export type DeliveryId = string;
|
|
34
|
+
|
|
35
|
+
export type TargetReleaseId = string;
|
|
36
|
+
|
|
19
37
|
/**
|
|
20
|
-
*
|
|
21
|
-
*
|
|
38
|
+
* Generator implementation selected by a Target. This is configuration, not identity; several
|
|
39
|
+
* Targets may use the same generator.
|
|
22
40
|
*/
|
|
23
|
-
export const
|
|
41
|
+
export const GeneratorKind = {
|
|
24
42
|
TYPESCRIPT_SDK: "typescript-sdk",
|
|
25
43
|
PYTHON_SDK: "python-sdk",
|
|
26
44
|
GO_SDK: "go-sdk",
|
|
27
45
|
CLI: "cli",
|
|
28
46
|
MCP: "mcp",
|
|
29
47
|
} as const;
|
|
30
|
-
export type
|
|
48
|
+
export type GeneratorKind = (typeof GeneratorKind)[keyof typeof GeneratorKind];
|
|
31
49
|
|
|
32
|
-
export interface
|
|
50
|
+
export interface UrlDefinitionInput {
|
|
33
51
|
/**
|
|
34
52
|
* URL of an OpenAPI document, a GraphQL SDL file, or a GraphQL
|
|
35
53
|
* endpoint (introspected automatically). Fetched server-side.
|
|
@@ -43,29 +61,66 @@ export interface UrlSpecInput {
|
|
|
43
61
|
headers?: Record<string, string>;
|
|
44
62
|
}
|
|
45
63
|
|
|
46
|
-
|
|
47
|
-
|
|
64
|
+
/** Response shape for UrlDefinitionInput. */
|
|
65
|
+
export interface UrlDefinitionInputRead {
|
|
66
|
+
/**
|
|
67
|
+
* URL of an OpenAPI document, a GraphQL SDL file, or a GraphQL
|
|
68
|
+
* endpoint (introspected automatically). Fetched server-side.
|
|
69
|
+
* Format: uri
|
|
70
|
+
*/
|
|
71
|
+
url: string;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export interface InlineDefinitionInput {
|
|
75
|
+
/** Raw Definition text (OpenAPI JSON/YAML or GraphQL SDL). Up to 10MB. */
|
|
48
76
|
inline: string;
|
|
49
77
|
}
|
|
50
78
|
|
|
51
|
-
/**
|
|
52
|
-
export type
|
|
79
|
+
/** A Definition for stateless generation, provided as exactly one URL or inline entrypoint. */
|
|
80
|
+
export type DefinitionInput = UrlDefinitionInput | InlineDefinitionInput;
|
|
81
|
+
|
|
82
|
+
/** Response shape for DefinitionInput. */
|
|
83
|
+
export type DefinitionInputRead = UrlDefinitionInputRead | InlineDefinitionInput;
|
|
53
84
|
|
|
54
85
|
export interface GenerateRequest {
|
|
55
|
-
|
|
86
|
+
definition: DefinitionInput;
|
|
87
|
+
/** Stateless generator descriptor; no persisted Target is created. */
|
|
88
|
+
target: {
|
|
89
|
+
generator: GeneratorKind;
|
|
90
|
+
};
|
|
56
91
|
/**
|
|
57
|
-
*
|
|
58
|
-
*
|
|
92
|
+
* npm package or Python distribution override. Valid only for the TypeScript and Python SDK
|
|
93
|
+
* targets.
|
|
59
94
|
*/
|
|
60
|
-
|
|
95
|
+
package_name?: string;
|
|
61
96
|
/**
|
|
62
|
-
*
|
|
63
|
-
*
|
|
97
|
+
* Go module path override. Valid only for the Go SDK. Linked projects derive this from the Go
|
|
98
|
+
* destination repository by default.
|
|
64
99
|
*/
|
|
65
|
-
|
|
100
|
+
module_path?: string;
|
|
66
101
|
config?: Config;
|
|
67
102
|
}
|
|
68
103
|
|
|
104
|
+
/** Response shape for GenerateRequest. */
|
|
105
|
+
export interface GenerateRequestRead {
|
|
106
|
+
definition: DefinitionInputRead;
|
|
107
|
+
/** Stateless generator descriptor; no persisted Target is created. */
|
|
108
|
+
target: {
|
|
109
|
+
generator: GeneratorKind | (string & {});
|
|
110
|
+
};
|
|
111
|
+
/**
|
|
112
|
+
* npm package or Python distribution override. Valid only for the TypeScript and Python SDK
|
|
113
|
+
* targets.
|
|
114
|
+
*/
|
|
115
|
+
package_name?: string;
|
|
116
|
+
/**
|
|
117
|
+
* Go module path override. Valid only for the Go SDK. Linked projects derive this from the Go
|
|
118
|
+
* destination repository by default.
|
|
119
|
+
*/
|
|
120
|
+
module_path?: string;
|
|
121
|
+
config?: ConfigRead;
|
|
122
|
+
}
|
|
123
|
+
|
|
69
124
|
export interface GeneratedFile {
|
|
70
125
|
/** Repo-relative path inside the generated package. */
|
|
71
126
|
path: string;
|
|
@@ -74,22 +129,31 @@ export interface GeneratedFile {
|
|
|
74
129
|
|
|
75
130
|
export interface GenerationMeta {
|
|
76
131
|
title: string;
|
|
132
|
+
/** Version declared by the customer's API Definition. It never controls package releases. */
|
|
133
|
+
api_version: string;
|
|
134
|
+
/** Package version selected by the Target's release stream for this generation. */
|
|
77
135
|
version: string;
|
|
78
136
|
spec_format?: "openapi" | "graphql";
|
|
79
|
-
/** Detected
|
|
137
|
+
/** Detected OpenAPI version, "2.0", "3.0", or "3.1". */
|
|
80
138
|
oas_version: string;
|
|
81
139
|
/** True when the input was Swagger 2.0 and was converted. */
|
|
82
140
|
converted?: boolean;
|
|
83
|
-
|
|
141
|
+
/** Ecosystem-neutral identity of the generated artifact. */
|
|
142
|
+
artifact_name: string;
|
|
84
143
|
client_name: string;
|
|
85
|
-
/**
|
|
86
|
-
|
|
144
|
+
/**
|
|
145
|
+
* Generator implementations present in this artifact. Persisted Target identity is reported on
|
|
146
|
+
* Generation.
|
|
147
|
+
*/
|
|
148
|
+
generators: GeneratorKind[];
|
|
87
149
|
resource_count?: number;
|
|
88
150
|
operation_count?: number;
|
|
89
151
|
schema_count?: number;
|
|
90
152
|
paginated_operation_count?: number;
|
|
91
153
|
/** Operations beyond the plan's endpoint allowance, not generated. */
|
|
92
154
|
omitted_operation_count?: number;
|
|
155
|
+
/** METHOD/path identities of operations omitted by the generation cap. */
|
|
156
|
+
omitted_operations?: string[];
|
|
93
157
|
/** Pull request opened by this regeneration, when one was. */
|
|
94
158
|
pr_url?: string | null;
|
|
95
159
|
pr_number?: number | null;
|
|
@@ -117,18 +181,121 @@ export interface GenerationMeta {
|
|
|
117
181
|
* What the diff was measured against; "destination" means the .typeship/surface.json merged in
|
|
118
182
|
* the destination repository.
|
|
119
183
|
*/
|
|
120
|
-
baseline?: "destination" | "
|
|
184
|
+
baseline?: "destination" | "none";
|
|
185
|
+
/** Objective compatibility of the generated API surface against the merged destination baseline. */
|
|
186
|
+
api_compatibility?: "compatible" | "breaking" | "unknown";
|
|
187
|
+
/**
|
|
188
|
+
* Objective compatibility of public package entry points and selected targets against the merged
|
|
189
|
+
* destination baseline.
|
|
190
|
+
*/
|
|
191
|
+
package_compatibility?: "compatible" | "breaking" | "unknown";
|
|
192
|
+
/**
|
|
193
|
+
* Whether the generated package version satisfies the cumulative change. Null when there is no
|
|
194
|
+
* prior version or analysis is unavailable.
|
|
195
|
+
*/
|
|
196
|
+
version_correct?: boolean | null;
|
|
197
|
+
/**
|
|
198
|
+
* The destination pull request's combined readiness decision for the exact bot-generated head.
|
|
199
|
+
* Compatibility and version correctness remain separate fields above.
|
|
200
|
+
*/
|
|
201
|
+
release_readiness?: "success" | "failure" | "error";
|
|
202
|
+
/** The release-readiness decision in one line, as the commit status describes it. */
|
|
203
|
+
release_readiness_note?: string;
|
|
204
|
+
/** The package version the destination had before this regeneration. */
|
|
205
|
+
previous_version?: string;
|
|
206
|
+
file_count?: number;
|
|
207
|
+
total_lines?: number;
|
|
208
|
+
/** Deterministic Diagnostic summary for the exact Definition Revision consumed. */
|
|
209
|
+
diagnostics?: {
|
|
210
|
+
format: "openapi" | "graphql";
|
|
211
|
+
summary: DiagnosticSummary;
|
|
212
|
+
};
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
/** Response shape for GenerationMeta. */
|
|
216
|
+
export interface GenerationMetaRead {
|
|
217
|
+
title: string;
|
|
218
|
+
/** Version declared by the customer's API Definition. It never controls package releases. */
|
|
219
|
+
api_version: string;
|
|
220
|
+
/** Package version selected by the Target's release stream for this generation. */
|
|
221
|
+
version: string;
|
|
222
|
+
spec_format?: ("openapi" | "graphql") | (string & {});
|
|
223
|
+
/** Detected OpenAPI version, "2.0", "3.0", or "3.1". */
|
|
224
|
+
oas_version: string;
|
|
225
|
+
/** True when the input was Swagger 2.0 and was converted. */
|
|
226
|
+
converted?: boolean;
|
|
227
|
+
/** Ecosystem-neutral identity of the generated artifact. */
|
|
228
|
+
artifact_name: string;
|
|
229
|
+
client_name: string;
|
|
230
|
+
/**
|
|
231
|
+
* Generator implementations present in this artifact. Persisted Target identity is reported on
|
|
232
|
+
* Generation.
|
|
233
|
+
*/
|
|
234
|
+
generators: Array<GeneratorKind | (string & {})>;
|
|
235
|
+
resource_count?: number;
|
|
236
|
+
operation_count?: number;
|
|
237
|
+
schema_count?: number;
|
|
238
|
+
paginated_operation_count?: number;
|
|
239
|
+
/** Operations beyond the plan's endpoint allowance, not generated. */
|
|
240
|
+
omitted_operation_count?: number;
|
|
241
|
+
/** METHOD/path identities of operations omitted by the generation cap. */
|
|
242
|
+
omitted_operations?: string[];
|
|
243
|
+
/** Pull request opened by this regeneration, when one was. */
|
|
244
|
+
pr_url?: string | null;
|
|
245
|
+
pr_number?: number | null;
|
|
246
|
+
/**
|
|
247
|
+
* Whether a destination pull request opened, was unnecessary because the generated tree already
|
|
248
|
+
* matched, or could not be opened.
|
|
249
|
+
*/
|
|
250
|
+
pr_status?: ("opened" | "no_changes" | "blocked") | (string & {});
|
|
251
|
+
/**
|
|
252
|
+
* Why the configured destination pull request was not opened. Generation itself still succeeded;
|
|
253
|
+
* fix this action and regenerate.
|
|
254
|
+
*/
|
|
255
|
+
pr_error?: string;
|
|
256
|
+
/**
|
|
257
|
+
* Markdown changelog entry for this regeneration, from the API surface diff. Absent on a first
|
|
258
|
+
* generation or when nothing changed.
|
|
259
|
+
*/
|
|
260
|
+
changelog?: string;
|
|
261
|
+
/**
|
|
262
|
+
* Breaking changes in the diff; removed methods and fields, changed types, inputs that became
|
|
263
|
+
* required.
|
|
264
|
+
*/
|
|
265
|
+
breaking_count?: number;
|
|
266
|
+
/**
|
|
267
|
+
* What the diff was measured against; "destination" means the .typeship/surface.json merged in
|
|
268
|
+
* the destination repository.
|
|
269
|
+
*/
|
|
270
|
+
baseline?: ("destination" | "none") | (string & {});
|
|
271
|
+
/** Objective compatibility of the generated API surface against the merged destination baseline. */
|
|
272
|
+
api_compatibility?: ("compatible" | "breaking" | "unknown") | (string & {});
|
|
273
|
+
/**
|
|
274
|
+
* Objective compatibility of public package entry points and selected targets against the merged
|
|
275
|
+
* destination baseline.
|
|
276
|
+
*/
|
|
277
|
+
package_compatibility?: ("compatible" | "breaking" | "unknown") | (string & {});
|
|
278
|
+
/**
|
|
279
|
+
* Whether the generated package version satisfies the cumulative change. Null when there is no
|
|
280
|
+
* prior version or analysis is unavailable.
|
|
281
|
+
*/
|
|
282
|
+
version_correct?: boolean | null;
|
|
121
283
|
/**
|
|
122
|
-
* The
|
|
123
|
-
*
|
|
284
|
+
* The destination pull request's combined readiness decision for the exact bot-generated head.
|
|
285
|
+
* Compatibility and version correctness remain separate fields above.
|
|
124
286
|
*/
|
|
125
|
-
|
|
126
|
-
/** The
|
|
127
|
-
|
|
287
|
+
release_readiness?: ("success" | "failure" | "error") | (string & {});
|
|
288
|
+
/** The release-readiness decision in one line, as the commit status describes it. */
|
|
289
|
+
release_readiness_note?: string;
|
|
128
290
|
/** The package version the destination had before this regeneration. */
|
|
129
291
|
previous_version?: string;
|
|
130
292
|
file_count?: number;
|
|
131
293
|
total_lines?: number;
|
|
294
|
+
/** Deterministic Diagnostic summary for the exact Definition Revision consumed. */
|
|
295
|
+
diagnostics?: {
|
|
296
|
+
format: ("openapi" | "graphql") | (string & {});
|
|
297
|
+
summary: DiagnosticSummary;
|
|
298
|
+
};
|
|
132
299
|
}
|
|
133
300
|
|
|
134
301
|
export interface GenerationResult {
|
|
@@ -138,8 +305,28 @@ export interface GenerationResult {
|
|
|
138
305
|
limits?: GenerationLimits;
|
|
139
306
|
/**
|
|
140
307
|
* Anonymous, URL-sourced generations only. A link a signed-in person can open to turn this run
|
|
141
|
-
* into a project in their organization (same
|
|
142
|
-
* for inline
|
|
308
|
+
* into a project in their organization (same Definition, Target, and config). Lasts seven days.
|
|
309
|
+
* Null for inline Definitions; absent on keyed calls.
|
|
310
|
+
*/
|
|
311
|
+
claim?: null
|
|
312
|
+
| {
|
|
313
|
+
url: string;
|
|
314
|
+
/** Format: date-time */
|
|
315
|
+
expires_at: string;
|
|
316
|
+
};
|
|
317
|
+
request_id: RequestId;
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
/** Response shape for GenerationResult. */
|
|
321
|
+
export interface GenerationResultRead {
|
|
322
|
+
files: GeneratedFile[];
|
|
323
|
+
warnings: string[];
|
|
324
|
+
meta: GenerationMetaRead;
|
|
325
|
+
limits?: GenerationLimitsRead;
|
|
326
|
+
/**
|
|
327
|
+
* Anonymous, URL-sourced generations only. A link a signed-in person can open to turn this run
|
|
328
|
+
* into a project in their organization (same Definition, Target, and config). Lasts seven days.
|
|
329
|
+
* Null for inline Definitions; absent on keyed calls.
|
|
143
330
|
*/
|
|
144
331
|
claim?: null
|
|
145
332
|
| {
|
|
@@ -147,6 +334,7 @@ export interface GenerationResult {
|
|
|
147
334
|
/** Format: date-time */
|
|
148
335
|
expires_at: string;
|
|
149
336
|
};
|
|
337
|
+
request_id: RequestId;
|
|
150
338
|
}
|
|
151
339
|
|
|
152
340
|
/**
|
|
@@ -156,8 +344,12 @@ export interface GenerationResult {
|
|
|
156
344
|
export interface GenerationLimits {
|
|
157
345
|
/** How many operations this generation was allowed to include. */
|
|
158
346
|
max_operations: number;
|
|
159
|
-
/** How many operations in the
|
|
347
|
+
/** How many operations are present in the generated package. */
|
|
348
|
+
generated_operations: number;
|
|
349
|
+
/** How many operations in the Definition were left out. */
|
|
160
350
|
omitted_operations: number;
|
|
351
|
+
/** How many operations Typeship found in the complete Definition. */
|
|
352
|
+
total_operations: number;
|
|
161
353
|
reason: "anonymous" | "free_plan";
|
|
162
354
|
/** Anonymous calls only. Where to create an account. */
|
|
163
355
|
signup_url?: string;
|
|
@@ -165,7 +357,24 @@ export interface GenerationLimits {
|
|
|
165
357
|
upgrade_url: string;
|
|
166
358
|
}
|
|
167
359
|
|
|
168
|
-
|
|
360
|
+
/** Response shape for GenerationLimits. */
|
|
361
|
+
export interface GenerationLimitsRead {
|
|
362
|
+
/** How many operations this generation was allowed to include. */
|
|
363
|
+
max_operations: number;
|
|
364
|
+
/** How many operations are present in the generated package. */
|
|
365
|
+
generated_operations: number;
|
|
366
|
+
/** How many operations in the Definition were left out. */
|
|
367
|
+
omitted_operations: number;
|
|
368
|
+
/** How many operations Typeship found in the complete Definition. */
|
|
369
|
+
total_operations: number;
|
|
370
|
+
reason: ("anonymous" | "free_plan") | (string & {});
|
|
371
|
+
/** Anonymous calls only. Where to create an account. */
|
|
372
|
+
signup_url?: string;
|
|
373
|
+
/** Where the cap is lifted. */
|
|
374
|
+
upgrade_url: string;
|
|
375
|
+
}
|
|
376
|
+
|
|
377
|
+
export interface UrlDefinitionSource {
|
|
169
378
|
kind: "url";
|
|
170
379
|
/**
|
|
171
380
|
* URL fetched for every generation.
|
|
@@ -176,18 +385,70 @@ export interface UrlProjectSource {
|
|
|
176
385
|
headers_configured: boolean;
|
|
177
386
|
}
|
|
178
387
|
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
388
|
+
/** Request shape for UrlDefinitionSource. */
|
|
389
|
+
export interface UrlDefinitionSourceWrite {
|
|
390
|
+
kind: "url";
|
|
391
|
+
/**
|
|
392
|
+
* URL fetched for every generation.
|
|
393
|
+
* Format: uri
|
|
394
|
+
*/
|
|
395
|
+
url: string;
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
/** Response shape for UrlDefinitionSource. */
|
|
399
|
+
export interface UrlDefinitionSourceRead {
|
|
400
|
+
kind: "url" | (string & {});
|
|
401
|
+
/**
|
|
402
|
+
* URL fetched for every generation.
|
|
403
|
+
* Format: uri
|
|
404
|
+
*/
|
|
405
|
+
url: string;
|
|
406
|
+
/** Whether Typeship has stored write-only request headers for this URL. */
|
|
407
|
+
headers_configured: boolean;
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
export interface RepositoryReference {
|
|
411
|
+
/** GitHub is the only launch provider; the field is stable for future adapters. */
|
|
412
|
+
provider: "github";
|
|
413
|
+
/** Provider-native repository identity, opaque outside its adapter. */
|
|
414
|
+
identifier: string;
|
|
415
|
+
}
|
|
416
|
+
|
|
417
|
+
/** Response shape for RepositoryReference. */
|
|
418
|
+
export interface RepositoryReferenceRead {
|
|
419
|
+
/** GitHub is the only launch provider; the field is stable for future adapters. */
|
|
420
|
+
provider: "github" | (string & {});
|
|
421
|
+
/** Provider-native repository identity, opaque outside its adapter. */
|
|
422
|
+
identifier: string;
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
export interface RepositoryDefinitionSource {
|
|
426
|
+
kind: "repository";
|
|
427
|
+
repository: RepositoryReference;
|
|
428
|
+
/** Repository-relative Definition entrypoint. */
|
|
429
|
+
path: string;
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
/** Response shape for RepositoryDefinitionSource. */
|
|
433
|
+
export interface RepositoryDefinitionSourceRead {
|
|
434
|
+
kind: "repository" | (string & {});
|
|
435
|
+
repository: RepositoryReferenceRead;
|
|
436
|
+
/** Repository-relative Definition entrypoint. */
|
|
184
437
|
path: string;
|
|
185
438
|
}
|
|
186
439
|
|
|
187
|
-
/** The single source of truth for where a
|
|
188
|
-
export type
|
|
440
|
+
/** The single source of truth for where a Project's Definition lives. */
|
|
441
|
+
export type DefinitionSource = UrlDefinitionSource | RepositoryDefinitionSource;
|
|
189
442
|
|
|
190
|
-
|
|
443
|
+
/** Request shape for DefinitionSource. */
|
|
444
|
+
export type DefinitionSourceWrite = UrlDefinitionSourceWrite | RepositoryDefinitionSource;
|
|
445
|
+
|
|
446
|
+
/** Response shape for DefinitionSource. */
|
|
447
|
+
export type DefinitionSourceRead = UrlDefinitionSourceRead
|
|
448
|
+
| RepositoryDefinitionSourceRead
|
|
449
|
+
| Record<string, unknown> & { kind?: string };
|
|
450
|
+
|
|
451
|
+
export interface UrlDefinitionSourceInput {
|
|
191
452
|
kind: "url";
|
|
192
453
|
/**
|
|
193
454
|
* URL of an OpenAPI document, GraphQL SDL file, or GraphQL endpoint.
|
|
@@ -203,22 +464,44 @@ export interface UrlProjectSourceInput {
|
|
|
203
464
|
headers?: Record<string, string> | null;
|
|
204
465
|
}
|
|
205
466
|
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
467
|
+
/** Response shape for UrlDefinitionSourceInput. */
|
|
468
|
+
export interface UrlDefinitionSourceInputRead {
|
|
469
|
+
kind: "url" | (string & {});
|
|
470
|
+
/**
|
|
471
|
+
* URL of an OpenAPI document, GraphQL SDL file, or GraphQL endpoint.
|
|
472
|
+
* Format: uri
|
|
473
|
+
*/
|
|
474
|
+
url: string;
|
|
475
|
+
}
|
|
476
|
+
|
|
477
|
+
export interface RepositoryDefinitionSourceInput {
|
|
478
|
+
kind: "repository";
|
|
479
|
+
repository: RepositoryReference;
|
|
480
|
+
/** Repository-relative Definition entrypoint. */
|
|
481
|
+
path: string;
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
/** Response shape for RepositoryDefinitionSourceInput. */
|
|
485
|
+
export interface RepositoryDefinitionSourceInputRead {
|
|
486
|
+
kind: "repository" | (string & {});
|
|
487
|
+
repository: RepositoryReferenceRead;
|
|
488
|
+
/** Repository-relative Definition entrypoint. */
|
|
211
489
|
path: string;
|
|
212
490
|
}
|
|
213
491
|
|
|
214
|
-
export type
|
|
492
|
+
export type DefinitionSourceInput = UrlDefinitionSourceInput | RepositoryDefinitionSourceInput;
|
|
493
|
+
|
|
494
|
+
/** Response shape for DefinitionSourceInput. */
|
|
495
|
+
export type DefinitionSourceInputRead = UrlDefinitionSourceInputRead
|
|
496
|
+
| RepositoryDefinitionSourceInputRead
|
|
497
|
+
| Record<string, unknown> & { kind?: string };
|
|
215
498
|
|
|
216
499
|
/**
|
|
217
|
-
* A fix applied to the
|
|
500
|
+
* A fix applied to the resolved Definition before generation. Paths are JSON
|
|
218
501
|
* Pointers into the document. A patch whose target no longer exists is
|
|
219
502
|
* skipped and reported as a warning on the generation, never silently.
|
|
220
503
|
*/
|
|
221
|
-
export interface
|
|
504
|
+
export interface DefinitionPatch {
|
|
222
505
|
op: "set" | "append" | "remove" | "rename";
|
|
223
506
|
/**
|
|
224
507
|
* JSON-Pointer-style path. Pattern segments enable bulk fixes:
|
|
@@ -234,223 +517,1080 @@ export interface SpecPatch {
|
|
|
234
517
|
reason?: string | null;
|
|
235
518
|
}
|
|
236
519
|
|
|
237
|
-
/**
|
|
238
|
-
export interface
|
|
239
|
-
|
|
240
|
-
repo?: string | null;
|
|
241
|
-
/** Directory the generated package is written to. */
|
|
242
|
-
directory?: string | null;
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
/** Registry identity and reviewed pull-request destination for one delivery package. */
|
|
246
|
-
export interface PackageDelivery {
|
|
520
|
+
/** Response shape for DefinitionPatch. */
|
|
521
|
+
export interface DefinitionPatchRead {
|
|
522
|
+
op: ("set" | "append" | "remove" | "rename") | (string & {});
|
|
247
523
|
/**
|
|
248
|
-
*
|
|
249
|
-
*
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
/**
|
|
253
|
-
* Release version for this output package. Null falls back to the legacy config.package.version,
|
|
254
|
-
* then the specification version.
|
|
524
|
+
* JSON-Pointer-style path. Pattern segments enable bulk fixes:
|
|
525
|
+
* * (any child), ** (any depth), [key=value] (filter), e.g.
|
|
526
|
+
* /paths/**\/parameters/[name=account_id]/schema/type. Renaming a
|
|
527
|
+
* schema under /components/schemas also rewrites its $refs.
|
|
255
528
|
*/
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
* version, destination pull request, and release lifecycle. Selected outputs must resolve to
|
|
263
|
-
* distinct repository-and-directory trees; the TypeScript SDK, CLI, and MCP packages must also have
|
|
264
|
-
* distinct npm names.
|
|
265
|
-
*/
|
|
266
|
-
export interface Packages {
|
|
267
|
-
"typescript-sdk"?: PackageDelivery;
|
|
268
|
-
"python-sdk"?: PackageDelivery;
|
|
269
|
-
"go-sdk"?: PackageDelivery;
|
|
270
|
-
cli?: PackageDelivery;
|
|
271
|
-
mcp?: PackageDelivery;
|
|
529
|
+
path: string;
|
|
530
|
+
/** set only; the replacement value. */
|
|
531
|
+
value?: unknown;
|
|
532
|
+
/** rename only; the new key name. */
|
|
533
|
+
to?: string | null;
|
|
534
|
+
reason?: string | null;
|
|
272
535
|
}
|
|
273
536
|
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
537
|
+
/** One exact place where a Diagnostic rule found evidence. */
|
|
538
|
+
export interface DiagnosticLocation {
|
|
539
|
+
/** Source document coordinate when the Definition contains multiple files. */
|
|
540
|
+
document?: string;
|
|
541
|
+
/** JSON Pointer for OpenAPI, or schema coordinate for GraphQL. */
|
|
542
|
+
path: string;
|
|
543
|
+
/** Human-readable operation coordinate when the location belongs to an operation. */
|
|
544
|
+
operation?: string;
|
|
545
|
+
/** Occurrence-specific evidence. This is not a remediation instruction. */
|
|
546
|
+
evidence?: string;
|
|
277
547
|
}
|
|
278
548
|
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
549
|
+
/** A reviewable remediation that does not invent API behavior. */
|
|
550
|
+
export interface DiagnosticFix {
|
|
551
|
+
/** Concise action for the API author. */
|
|
552
|
+
title: string;
|
|
553
|
+
/**
|
|
554
|
+
* spec_patch is an exact OpenAPI edit Typeship can derive; source_edit requires author intent or
|
|
555
|
+
* a lossless GraphQL source edit.
|
|
556
|
+
*/
|
|
557
|
+
kind: "spec_patch" | "source_edit";
|
|
558
|
+
/** Exact patches when kind is spec_patch. */
|
|
559
|
+
patches?: DefinitionPatch[];
|
|
560
|
+
/** Source-level guidance when an exact patch would invent intent. */
|
|
561
|
+
instructions?: string;
|
|
283
562
|
}
|
|
284
563
|
|
|
285
|
-
/**
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
564
|
+
/** Response shape for DiagnosticFix. */
|
|
565
|
+
export interface DiagnosticFixRead {
|
|
566
|
+
/** Concise action for the API author. */
|
|
567
|
+
title: string;
|
|
568
|
+
/**
|
|
569
|
+
* spec_patch is an exact OpenAPI edit Typeship can derive; source_edit requires author intent or
|
|
570
|
+
* a lossless GraphQL source edit.
|
|
571
|
+
*/
|
|
572
|
+
kind: ("spec_patch" | "source_edit") | (string & {});
|
|
573
|
+
/** Exact patches when kind is spec_patch. */
|
|
574
|
+
patches?: DefinitionPatchRead[];
|
|
575
|
+
/** Source-level guidance when an exact patch would invent intent. */
|
|
576
|
+
instructions?: string;
|
|
295
577
|
}
|
|
296
578
|
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
579
|
+
/** Every occurrence of one stable Diagnostic rule, grouped into one decision. */
|
|
580
|
+
export interface Diagnostic {
|
|
581
|
+
/** Stable rule identifier for automation and suppressions. */
|
|
582
|
+
id: string;
|
|
583
|
+
/** Whether the rule reports invalid behavior, material risk, or an improvement. */
|
|
584
|
+
severity: "error" | "warning" | "suggestion";
|
|
585
|
+
/** Product dimension affected by the diagnostic. */
|
|
586
|
+
category: "correctness" | "sdk_ergonomics" | "agent_usability" | "safety";
|
|
587
|
+
/** Concise statement of the root cause. */
|
|
588
|
+
title: string;
|
|
589
|
+
/** What the API author should change. */
|
|
590
|
+
description: string;
|
|
591
|
+
/** Why consumers of generated SDK, CLI, or MCP surfaces care. */
|
|
592
|
+
impact: string;
|
|
593
|
+
/** Public surfaces affected by the root cause. */
|
|
594
|
+
surfaces: Array<"api" | "sdk" | "cli" | "mcp">;
|
|
595
|
+
/** All affected coordinates, kept under one grouped diagnostic. */
|
|
596
|
+
locations: DiagnosticLocation[];
|
|
597
|
+
fix?: DiagnosticFix;
|
|
598
|
+
/**
|
|
599
|
+
* Grounded instructions an agent can use to edit the source. The brief preserves existing
|
|
600
|
+
* behavior and requires owner input when the contract cannot prove the missing product decision.
|
|
601
|
+
*/
|
|
602
|
+
authoring_brief: string;
|
|
304
603
|
}
|
|
305
604
|
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
605
|
+
/** Response shape for Diagnostic. */
|
|
606
|
+
export interface DiagnosticRead {
|
|
607
|
+
/** Stable rule identifier for automation and suppressions. */
|
|
608
|
+
id: string;
|
|
609
|
+
/** Whether the rule reports invalid behavior, material risk, or an improvement. */
|
|
610
|
+
severity: ("error" | "warning" | "suggestion") | (string & {});
|
|
611
|
+
/** Product dimension affected by the diagnostic. */
|
|
612
|
+
category: ("correctness" | "sdk_ergonomics" | "agent_usability" | "safety") | (string & {});
|
|
613
|
+
/** Concise statement of the root cause. */
|
|
614
|
+
title: string;
|
|
615
|
+
/** What the API author should change. */
|
|
616
|
+
description: string;
|
|
617
|
+
/** Why consumers of generated SDK, CLI, or MCP surfaces care. */
|
|
618
|
+
impact: string;
|
|
619
|
+
/** Public surfaces affected by the root cause. */
|
|
620
|
+
surfaces: Array<("api" | "sdk" | "cli" | "mcp") | (string & {})>;
|
|
621
|
+
/** All affected coordinates, kept under one grouped diagnostic. */
|
|
622
|
+
locations: DiagnosticLocation[];
|
|
623
|
+
fix?: DiagnosticFixRead;
|
|
624
|
+
/**
|
|
625
|
+
* Grounded instructions an agent can use to edit the source. The brief preserves existing
|
|
626
|
+
* behavior and requires owner input when the contract cannot prove the missing product decision.
|
|
627
|
+
*/
|
|
628
|
+
authoring_brief: string;
|
|
316
629
|
}
|
|
317
630
|
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
631
|
+
/** Counts distinguish decisions from the number of affected schema locations. */
|
|
632
|
+
export interface DiagnosticSummary {
|
|
633
|
+
/** Number of grouped rule diagnostics. */
|
|
634
|
+
diagnostics: number;
|
|
635
|
+
/** Total affected locations across all diagnostics. */
|
|
636
|
+
occurrences: number;
|
|
637
|
+
/** Grouped correctness errors. */
|
|
638
|
+
errors: number;
|
|
639
|
+
/** Grouped material risks. */
|
|
640
|
+
warnings: number;
|
|
641
|
+
/** Grouped improvements. */
|
|
642
|
+
suggestions: number;
|
|
643
|
+
/** Diagnostics with exact reviewable Definition patches. */
|
|
644
|
+
auto_fixable: number;
|
|
325
645
|
}
|
|
326
646
|
|
|
327
|
-
export interface
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
source: string[];
|
|
334
|
-
destination: string[];
|
|
335
|
-
};
|
|
336
|
-
last_delivery: GithubDeliveryHealth | null;
|
|
647
|
+
export interface DiagnosticSuppression {
|
|
648
|
+
rule_id: string;
|
|
649
|
+
/** Exact schema coordinate. Omit only to suppress every occurrence of the rule. */
|
|
650
|
+
path?: string;
|
|
651
|
+
/** The reviewed product decision behind this exception. */
|
|
652
|
+
reason: string;
|
|
337
653
|
}
|
|
338
654
|
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
packages: ProjectPackages;
|
|
345
|
-
/**
|
|
346
|
-
* Regenerate when the spec changes: on every push to the default branch for a repository source,
|
|
347
|
-
* every 30 minutes for a URL source. Off by default: the first generation is always one you asked
|
|
348
|
-
* for. Off means only "generate now" and POST /projects/{project_id}/generations regenerate.
|
|
349
|
-
*/
|
|
350
|
-
auto_regen: boolean;
|
|
351
|
-
spec_patches: SpecPatch[];
|
|
352
|
-
config: Config | null;
|
|
353
|
-
/**
|
|
354
|
-
* Whether the hosted MCP endpoint is on. Requires the MCP output and Enterprise; turning the
|
|
355
|
-
* output off turns this off.
|
|
356
|
-
*/
|
|
357
|
-
mcp_enabled: boolean;
|
|
358
|
-
/** Path of the hosted MCP endpoint while it is on; read-only. */
|
|
359
|
-
mcp_url: string | null;
|
|
360
|
-
/**
|
|
361
|
-
* Whether the webhook relay is on, letting the generated CLI's webhooks listen command mint relay
|
|
362
|
-
* sessions. Requires the cli output and Pro; turning the output off turns this off.
|
|
363
|
-
*/
|
|
364
|
-
relay_enabled: boolean;
|
|
655
|
+
/**
|
|
656
|
+
* Source pull-request enforcement threshold, new-versus-complete baseline, and explicitly reviewed
|
|
657
|
+
* rule or location exceptions.
|
|
658
|
+
*/
|
|
659
|
+
export interface DiagnosticPolicy {
|
|
365
660
|
/**
|
|
366
|
-
*
|
|
367
|
-
*
|
|
368
|
-
* is billed once; shared implementation runtimes are included.
|
|
661
|
+
* Severity threshold that fails the API change review check.
|
|
662
|
+
* Default: "error"
|
|
369
663
|
*/
|
|
370
|
-
|
|
371
|
-
/** Format: date-time */
|
|
372
|
-
created_at: string;
|
|
664
|
+
fail_on: "never" | "error" | "warning";
|
|
373
665
|
/**
|
|
374
|
-
*
|
|
375
|
-
*
|
|
666
|
+
* Enforce only occurrences introduced by the proposed source change.
|
|
667
|
+
* Default: true
|
|
376
668
|
*/
|
|
377
|
-
|
|
669
|
+
only_new: boolean;
|
|
670
|
+
/** Default: [] */
|
|
671
|
+
suppressions: DiagnosticSuppression[];
|
|
378
672
|
}
|
|
379
673
|
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
source: ProjectSourceInput;
|
|
383
|
-
/** First-class outputs Typeship will keep current for this project. */
|
|
384
|
-
outputs: OutputId[];
|
|
385
|
-
/**
|
|
386
|
-
* Initial package names, versions, and destinations. Omitted outputs use derived names and no
|
|
387
|
-
* destination.
|
|
388
|
-
*/
|
|
389
|
-
packages?: Packages;
|
|
390
|
-
/**
|
|
391
|
-
* Whether Typeship should regenerate automatically when the source changes.
|
|
392
|
-
* Default: false
|
|
393
|
-
*/
|
|
394
|
-
auto_regen?: boolean;
|
|
395
|
-
/** Initial patches. Omit or pass an empty array for none. */
|
|
396
|
-
spec_patches?: SpecPatch[];
|
|
674
|
+
/** Response shape for DiagnosticPolicy. */
|
|
675
|
+
export interface DiagnosticPolicyRead {
|
|
397
676
|
/**
|
|
398
|
-
*
|
|
399
|
-
* Default:
|
|
677
|
+
* Severity threshold that fails the API change review check.
|
|
678
|
+
* Default: "error"
|
|
400
679
|
*/
|
|
401
|
-
|
|
680
|
+
fail_on: ("never" | "error" | "warning") | (string & {});
|
|
402
681
|
/**
|
|
403
|
-
*
|
|
404
|
-
* Default:
|
|
682
|
+
* Enforce only occurrences introduced by the proposed source change.
|
|
683
|
+
* Default: true
|
|
405
684
|
*/
|
|
406
|
-
|
|
407
|
-
|
|
685
|
+
only_new: boolean;
|
|
686
|
+
/** Default: [] */
|
|
687
|
+
suppressions: DiagnosticSuppression[];
|
|
408
688
|
}
|
|
409
689
|
|
|
410
|
-
export interface
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
/**
|
|
416
|
-
* Replaces package configuration for every output. Include any existing output settings you want
|
|
417
|
-
* to keep.
|
|
418
|
-
*/
|
|
419
|
-
packages?: Packages;
|
|
420
|
-
auto_regen?: boolean;
|
|
421
|
-
/** Replaces the full patch list. Pass an empty array to clear it. */
|
|
422
|
-
spec_patches?: SpecPatch[];
|
|
423
|
-
/** Serve this project as a hosted MCP endpoint. Requires the MCP output and Enterprise. */
|
|
424
|
-
mcp_enabled?: boolean;
|
|
425
|
-
/** Enable webhook relay sessions. Requires the CLI output and Pro. */
|
|
426
|
-
relay_enabled?: boolean;
|
|
427
|
-
/** Replaces the entire configuration; pass null to clear it. */
|
|
428
|
-
config?: Config | null;
|
|
690
|
+
export interface DiagnosticEvaluation {
|
|
691
|
+
state: "pass" | "fail";
|
|
692
|
+
blocking: DiagnosticReference[];
|
|
693
|
+
considered_occurrences: number;
|
|
694
|
+
suppressed_occurrences: number;
|
|
429
695
|
}
|
|
430
696
|
|
|
431
|
-
/**
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
object: "account";
|
|
438
|
-
/** The organization's display name. */
|
|
439
|
-
name: string;
|
|
440
|
-
plan: "free" | "pro" | "enterprise";
|
|
441
|
-
/** Format: date-time */
|
|
442
|
-
created_at: string;
|
|
697
|
+
/** Response shape for DiagnosticEvaluation. */
|
|
698
|
+
export interface DiagnosticEvaluationRead {
|
|
699
|
+
state: ("pass" | "fail") | (string & {});
|
|
700
|
+
blocking: DiagnosticReferenceRead[];
|
|
701
|
+
considered_occurrences: number;
|
|
702
|
+
suppressed_occurrences: number;
|
|
443
703
|
}
|
|
444
704
|
|
|
445
|
-
/**
|
|
446
|
-
export interface
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
705
|
+
/** Compact rule and location reference; full guidance appears once in diagnostics. */
|
|
706
|
+
export interface DiagnosticReference {
|
|
707
|
+
rule_id: string;
|
|
708
|
+
severity: "error" | "warning" | "suggestion";
|
|
709
|
+
title: string;
|
|
710
|
+
locations: DiagnosticLocation[];
|
|
711
|
+
}
|
|
712
|
+
|
|
713
|
+
/** Response shape for DiagnosticReference. */
|
|
714
|
+
export interface DiagnosticReferenceRead {
|
|
715
|
+
rule_id: string;
|
|
716
|
+
severity: ("error" | "warning" | "suggestion") | (string & {});
|
|
717
|
+
title: string;
|
|
718
|
+
locations: DiagnosticLocation[];
|
|
719
|
+
}
|
|
720
|
+
|
|
721
|
+
export interface DiagnosticDelta {
|
|
722
|
+
added: DiagnosticReference[];
|
|
723
|
+
resolved: DiagnosticReference[];
|
|
724
|
+
baseline_definition_revision_id: DefinitionRevisionId | null;
|
|
725
|
+
}
|
|
726
|
+
|
|
727
|
+
/** Response shape for DiagnosticDelta. */
|
|
728
|
+
export interface DiagnosticDeltaRead {
|
|
729
|
+
added: DiagnosticReferenceRead[];
|
|
730
|
+
resolved: DiagnosticReferenceRead[];
|
|
731
|
+
baseline_definition_revision_id: DefinitionRevisionId | null;
|
|
732
|
+
}
|
|
733
|
+
|
|
734
|
+
/**
|
|
735
|
+
* Deterministic Diagnostics for one immutable Definition Revision after existing patches. No
|
|
736
|
+
* model-generated facts or silent edits.
|
|
737
|
+
*/
|
|
738
|
+
export interface DiagnosticReport {
|
|
739
|
+
object: "diagnostic_report";
|
|
740
|
+
/** Contract format Typeship analyzed. */
|
|
741
|
+
format: "openapi" | "graphql";
|
|
742
|
+
project_id: ProjectId;
|
|
743
|
+
definition_revision_id: DefinitionRevisionId;
|
|
744
|
+
/** SHA-256 digest of the immutable raw source revision. */
|
|
745
|
+
source_sha256: string;
|
|
746
|
+
/** SHA-256 digest after applying the Definition's current patches. */
|
|
747
|
+
analyzed_sha256: string;
|
|
748
|
+
/** Loud misses or conflicts from the Definition's existing patches. */
|
|
749
|
+
patch_diagnostics: string[];
|
|
750
|
+
summary: DiagnosticSummary;
|
|
751
|
+
/** Stable grouped diagnostics, ordered by severity and rule identifier. */
|
|
752
|
+
diagnostics: Diagnostic[];
|
|
753
|
+
policy: DiagnosticPolicy;
|
|
754
|
+
evaluation: DiagnosticEvaluation;
|
|
755
|
+
delta: DiagnosticDelta;
|
|
756
|
+
request_id: RequestId;
|
|
757
|
+
}
|
|
758
|
+
|
|
759
|
+
/** Response shape for DiagnosticReport. */
|
|
760
|
+
export interface DiagnosticReportRead {
|
|
761
|
+
object: "diagnostic_report" | (string & {});
|
|
762
|
+
/** Contract format Typeship analyzed. */
|
|
763
|
+
format: ("openapi" | "graphql") | (string & {});
|
|
764
|
+
project_id: ProjectId;
|
|
765
|
+
definition_revision_id: DefinitionRevisionId;
|
|
766
|
+
/** SHA-256 digest of the immutable raw source revision. */
|
|
767
|
+
source_sha256: string;
|
|
768
|
+
/** SHA-256 digest after applying the Definition's current patches. */
|
|
769
|
+
analyzed_sha256: string;
|
|
770
|
+
/** Loud misses or conflicts from the Definition's existing patches. */
|
|
771
|
+
patch_diagnostics: string[];
|
|
772
|
+
summary: DiagnosticSummary;
|
|
773
|
+
/** Stable grouped diagnostics, ordered by severity and rule identifier. */
|
|
774
|
+
diagnostics: DiagnosticRead[];
|
|
775
|
+
policy: DiagnosticPolicyRead;
|
|
776
|
+
evaluation: DiagnosticEvaluationRead;
|
|
777
|
+
delta: DiagnosticDeltaRead;
|
|
778
|
+
request_id: RequestId;
|
|
779
|
+
}
|
|
780
|
+
|
|
781
|
+
export interface DiagnosticRemediationRequest {
|
|
782
|
+
/** Stable IDs of current diagnostics whose exact patches should be reviewed and applied. */
|
|
783
|
+
diagnostic_ids: string[];
|
|
784
|
+
}
|
|
785
|
+
|
|
786
|
+
export interface DiagnosticRemediation {
|
|
787
|
+
object: "diagnostic_remediation";
|
|
788
|
+
kind: "overlay" | "source_review";
|
|
789
|
+
patches_applied: number;
|
|
790
|
+
/**
|
|
791
|
+
* Source pull request for repository projects; absent for URL overlays.
|
|
792
|
+
* Format: uri
|
|
793
|
+
*/
|
|
794
|
+
review_url?: string | null;
|
|
795
|
+
request_id: RequestId;
|
|
796
|
+
}
|
|
797
|
+
|
|
798
|
+
/** Response shape for DiagnosticRemediation. */
|
|
799
|
+
export interface DiagnosticRemediationRead {
|
|
800
|
+
object: "diagnostic_remediation" | (string & {});
|
|
801
|
+
kind: ("overlay" | "source_review") | (string & {});
|
|
802
|
+
patches_applied: number;
|
|
803
|
+
/**
|
|
804
|
+
* Source pull request for repository projects; absent for URL overlays.
|
|
805
|
+
* Format: uri
|
|
806
|
+
*/
|
|
807
|
+
review_url?: string | null;
|
|
808
|
+
request_id: RequestId;
|
|
809
|
+
}
|
|
810
|
+
|
|
811
|
+
export interface RepositoryDeliveryInput {
|
|
812
|
+
kind: "repository";
|
|
813
|
+
repository: RepositoryReference;
|
|
814
|
+
directory?: string | null;
|
|
815
|
+
/** npm or Python registry identity where applicable. */
|
|
816
|
+
package_name?: string | null;
|
|
817
|
+
/** Explicit Go module path where applicable. */
|
|
818
|
+
module_path?: string | null;
|
|
819
|
+
}
|
|
820
|
+
|
|
821
|
+
/** Response shape for RepositoryDeliveryInput. */
|
|
822
|
+
export interface RepositoryDeliveryInputRead {
|
|
823
|
+
kind: "repository" | (string & {});
|
|
824
|
+
repository: RepositoryReferenceRead;
|
|
825
|
+
directory?: string | null;
|
|
826
|
+
/** npm or Python registry identity where applicable. */
|
|
827
|
+
package_name?: string | null;
|
|
828
|
+
/** Explicit Go module path where applicable. */
|
|
829
|
+
module_path?: string | null;
|
|
830
|
+
}
|
|
831
|
+
|
|
832
|
+
export interface HostedMcpDeliveryInput {
|
|
833
|
+
kind: "hosted_mcp";
|
|
834
|
+
}
|
|
835
|
+
|
|
836
|
+
/** Response shape for HostedMcpDeliveryInput. */
|
|
837
|
+
export interface HostedMcpDeliveryInputRead {
|
|
838
|
+
kind: "hosted_mcp" | (string & {});
|
|
839
|
+
}
|
|
840
|
+
|
|
841
|
+
export type DeliveryInput = RepositoryDeliveryInput | HostedMcpDeliveryInput;
|
|
842
|
+
|
|
843
|
+
/** Response shape for DeliveryInput. */
|
|
844
|
+
export type DeliveryInputRead = RepositoryDeliveryInputRead
|
|
845
|
+
| HostedMcpDeliveryInputRead
|
|
846
|
+
| Record<string, unknown> & { kind?: string };
|
|
847
|
+
|
|
848
|
+
export interface RepositoryDelivery {
|
|
849
|
+
id: DeliveryId;
|
|
850
|
+
object: "delivery";
|
|
851
|
+
target_id: TargetId;
|
|
852
|
+
kind: "repository";
|
|
853
|
+
state: "active" | "disabled";
|
|
854
|
+
repository: RepositoryReference;
|
|
855
|
+
directory: string | null;
|
|
856
|
+
package_name: string | null;
|
|
857
|
+
module_path: string | null;
|
|
858
|
+
/** Format: date-time */
|
|
859
|
+
created_at: string;
|
|
860
|
+
/** Format: date-time */
|
|
861
|
+
updated_at: string;
|
|
862
|
+
}
|
|
863
|
+
|
|
864
|
+
/** Response shape for RepositoryDelivery. */
|
|
865
|
+
export interface RepositoryDeliveryRead {
|
|
866
|
+
id: DeliveryId;
|
|
867
|
+
object: "delivery" | (string & {});
|
|
868
|
+
target_id: TargetId;
|
|
869
|
+
kind: "repository" | (string & {});
|
|
870
|
+
state: ("active" | "disabled") | (string & {});
|
|
871
|
+
repository: RepositoryReferenceRead;
|
|
872
|
+
directory: string | null;
|
|
873
|
+
package_name: string | null;
|
|
874
|
+
module_path: string | null;
|
|
875
|
+
/** Format: date-time */
|
|
876
|
+
created_at: string;
|
|
877
|
+
/** Format: date-time */
|
|
878
|
+
updated_at: string;
|
|
879
|
+
}
|
|
880
|
+
|
|
881
|
+
export interface HostedMcpDelivery {
|
|
882
|
+
id: DeliveryId;
|
|
883
|
+
object: "delivery";
|
|
884
|
+
target_id: TargetId;
|
|
885
|
+
kind: "hosted_mcp";
|
|
886
|
+
state: "active" | "disabled";
|
|
887
|
+
/** Format: uri */
|
|
888
|
+
url: string | null;
|
|
889
|
+
/** Format: date-time */
|
|
890
|
+
created_at: string;
|
|
891
|
+
/** Format: date-time */
|
|
892
|
+
updated_at: string;
|
|
893
|
+
}
|
|
894
|
+
|
|
895
|
+
/** Response shape for HostedMcpDelivery. */
|
|
896
|
+
export interface HostedMcpDeliveryRead {
|
|
897
|
+
id: DeliveryId;
|
|
898
|
+
object: "delivery" | (string & {});
|
|
899
|
+
target_id: TargetId;
|
|
900
|
+
kind: "hosted_mcp" | (string & {});
|
|
901
|
+
state: ("active" | "disabled") | (string & {});
|
|
902
|
+
/** Format: uri */
|
|
903
|
+
url: string | null;
|
|
904
|
+
/** Format: date-time */
|
|
905
|
+
created_at: string;
|
|
906
|
+
/** Format: date-time */
|
|
907
|
+
updated_at: string;
|
|
908
|
+
}
|
|
909
|
+
|
|
910
|
+
export type Delivery = RepositoryDelivery | HostedMcpDelivery;
|
|
911
|
+
|
|
912
|
+
/** Response shape for Delivery. */
|
|
913
|
+
export type DeliveryRead = RepositoryDeliveryRead
|
|
914
|
+
| HostedMcpDeliveryRead
|
|
915
|
+
| Record<string, unknown> & { kind?: string };
|
|
916
|
+
|
|
917
|
+
export interface TargetFields {
|
|
918
|
+
name: string;
|
|
919
|
+
definition_id: DefinitionId;
|
|
920
|
+
generator: GeneratorKind;
|
|
921
|
+
/** Default: "active" */
|
|
922
|
+
state?: "active" | "disabled";
|
|
923
|
+
/** Default: "2026-08-24" */
|
|
924
|
+
edition?: string;
|
|
925
|
+
/** Default: "stable" */
|
|
926
|
+
release_channel?: "stable" | "prerelease";
|
|
927
|
+
/** Optional larger or prerelease SemVer for the next reviewed release. */
|
|
928
|
+
proposed_version?: string | null;
|
|
929
|
+
/**
|
|
930
|
+
* Target-specific overrides merged over Project.config. GraphQL settings are rejected here and
|
|
931
|
+
* belong to the Definition.
|
|
932
|
+
*/
|
|
933
|
+
config?: ProjectConfig | null;
|
|
934
|
+
deliveries?: DeliveryInput[];
|
|
935
|
+
}
|
|
936
|
+
|
|
937
|
+
/** Response shape for TargetFields. */
|
|
938
|
+
export interface TargetFieldsRead {
|
|
939
|
+
name: string;
|
|
940
|
+
definition_id: DefinitionId;
|
|
941
|
+
generator: GeneratorKind | (string & {});
|
|
942
|
+
/** Default: "active" */
|
|
943
|
+
state?: ("active" | "disabled") | (string & {});
|
|
944
|
+
/** Default: "2026-08-24" */
|
|
945
|
+
edition?: string;
|
|
946
|
+
/** Default: "stable" */
|
|
947
|
+
release_channel?: ("stable" | "prerelease") | (string & {});
|
|
948
|
+
/** Optional larger or prerelease SemVer for the next reviewed release. */
|
|
949
|
+
proposed_version?: string | null;
|
|
950
|
+
/**
|
|
951
|
+
* Target-specific overrides merged over Project.config. GraphQL settings are rejected here and
|
|
952
|
+
* belong to the Definition.
|
|
953
|
+
*/
|
|
954
|
+
config?: ProjectConfigRead | null;
|
|
955
|
+
deliveries?: DeliveryInputRead[];
|
|
956
|
+
}
|
|
957
|
+
|
|
958
|
+
export interface InitialTargetFields {
|
|
959
|
+
name: string;
|
|
960
|
+
generator: GeneratorKind;
|
|
961
|
+
/** Default: "active" */
|
|
962
|
+
state?: "active" | "disabled";
|
|
963
|
+
/** Default: "2026-08-24" */
|
|
964
|
+
edition?: string;
|
|
965
|
+
/** Default: "stable" */
|
|
966
|
+
release_channel?: "stable" | "prerelease";
|
|
967
|
+
proposed_version?: string | null;
|
|
968
|
+
/**
|
|
969
|
+
* Target-specific overrides merged over Project.config. GraphQL settings are rejected here and
|
|
970
|
+
* belong to the Definition.
|
|
971
|
+
*/
|
|
972
|
+
config?: ProjectConfig | null;
|
|
973
|
+
deliveries?: DeliveryInput[];
|
|
974
|
+
}
|
|
975
|
+
|
|
976
|
+
/** Response shape for InitialTargetFields. */
|
|
977
|
+
export interface InitialTargetFieldsRead {
|
|
978
|
+
name: string;
|
|
979
|
+
generator: GeneratorKind | (string & {});
|
|
980
|
+
/** Default: "active" */
|
|
981
|
+
state?: ("active" | "disabled") | (string & {});
|
|
982
|
+
/** Default: "2026-08-24" */
|
|
983
|
+
edition?: string;
|
|
984
|
+
/** Default: "stable" */
|
|
985
|
+
release_channel?: ("stable" | "prerelease") | (string & {});
|
|
986
|
+
proposed_version?: string | null;
|
|
987
|
+
/**
|
|
988
|
+
* Target-specific overrides merged over Project.config. GraphQL settings are rejected here and
|
|
989
|
+
* belong to the Definition.
|
|
990
|
+
*/
|
|
991
|
+
config?: ProjectConfigRead | null;
|
|
992
|
+
deliveries?: DeliveryInputRead[];
|
|
993
|
+
}
|
|
994
|
+
|
|
995
|
+
export interface TargetUpdateRequest {
|
|
996
|
+
name?: string;
|
|
997
|
+
state?: "active" | "disabled";
|
|
998
|
+
edition?: string;
|
|
999
|
+
release_channel?: "stable" | "prerelease";
|
|
1000
|
+
proposed_version?: string | null;
|
|
1001
|
+
/**
|
|
1002
|
+
* Target-specific overrides merged over Project.config. GraphQL settings are rejected here and
|
|
1003
|
+
* belong to the Definition.
|
|
1004
|
+
*/
|
|
1005
|
+
config?: ProjectConfig | null;
|
|
1006
|
+
deliveries?: DeliveryInput[];
|
|
1007
|
+
}
|
|
1008
|
+
|
|
1009
|
+
/** Response shape for TargetUpdateRequest. */
|
|
1010
|
+
export interface TargetUpdateRequestRead {
|
|
1011
|
+
name?: string;
|
|
1012
|
+
state?: ("active" | "disabled") | (string & {});
|
|
1013
|
+
edition?: string;
|
|
1014
|
+
release_channel?: ("stable" | "prerelease") | (string & {});
|
|
1015
|
+
proposed_version?: string | null;
|
|
1016
|
+
/**
|
|
1017
|
+
* Target-specific overrides merged over Project.config. GraphQL settings are rejected here and
|
|
1018
|
+
* belong to the Definition.
|
|
1019
|
+
*/
|
|
1020
|
+
config?: ProjectConfigRead | null;
|
|
1021
|
+
deliveries?: DeliveryInputRead[];
|
|
1022
|
+
}
|
|
1023
|
+
|
|
1024
|
+
export interface Target {
|
|
1025
|
+
id: TargetId;
|
|
1026
|
+
object: "target";
|
|
1027
|
+
project_id: ProjectId;
|
|
1028
|
+
definition_id: DefinitionId;
|
|
1029
|
+
name: string;
|
|
1030
|
+
generator: GeneratorKind;
|
|
1031
|
+
state: "active" | "disabled";
|
|
1032
|
+
edition: string;
|
|
1033
|
+
release_channel: "stable" | "prerelease";
|
|
1034
|
+
version_policy: {
|
|
1035
|
+
mode: "reviewed_semver";
|
|
1036
|
+
pre1_breaking: "minor";
|
|
1037
|
+
};
|
|
1038
|
+
current_version: string;
|
|
1039
|
+
proposed_version: string | null;
|
|
1040
|
+
/**
|
|
1041
|
+
* Target-specific overrides merged over Project.config. GraphQL settings are Definition-owned and
|
|
1042
|
+
* never appear here.
|
|
1043
|
+
*/
|
|
1044
|
+
config: ProjectConfig | null;
|
|
1045
|
+
deliveries: Delivery[];
|
|
1046
|
+
/** Format: date-time */
|
|
1047
|
+
created_at: string;
|
|
1048
|
+
/** Format: date-time */
|
|
1049
|
+
updated_at: string;
|
|
1050
|
+
request_id?: RequestId;
|
|
1051
|
+
}
|
|
1052
|
+
|
|
1053
|
+
/** Response shape for Target. */
|
|
1054
|
+
export interface TargetRead {
|
|
1055
|
+
id: TargetId;
|
|
1056
|
+
object: "target" | (string & {});
|
|
1057
|
+
project_id: ProjectId;
|
|
1058
|
+
definition_id: DefinitionId;
|
|
1059
|
+
name: string;
|
|
1060
|
+
generator: GeneratorKind | (string & {});
|
|
1061
|
+
state: ("active" | "disabled") | (string & {});
|
|
1062
|
+
edition: string;
|
|
1063
|
+
release_channel: ("stable" | "prerelease") | (string & {});
|
|
1064
|
+
version_policy: {
|
|
1065
|
+
mode: "reviewed_semver" | (string & {});
|
|
1066
|
+
pre1_breaking: "minor" | (string & {});
|
|
1067
|
+
};
|
|
1068
|
+
current_version: string;
|
|
1069
|
+
proposed_version: string | null;
|
|
1070
|
+
/**
|
|
1071
|
+
* Target-specific overrides merged over Project.config. GraphQL settings are Definition-owned and
|
|
1072
|
+
* never appear here.
|
|
1073
|
+
*/
|
|
1074
|
+
config: ProjectConfigRead | null;
|
|
1075
|
+
deliveries: DeliveryRead[];
|
|
1076
|
+
/** Format: date-time */
|
|
1077
|
+
created_at: string;
|
|
1078
|
+
/** Format: date-time */
|
|
1079
|
+
updated_at: string;
|
|
1080
|
+
request_id?: RequestId;
|
|
1081
|
+
}
|
|
1082
|
+
|
|
1083
|
+
export type TargetResponse = Target & ResponseMetadata;
|
|
1084
|
+
|
|
1085
|
+
/** Response shape for TargetResponse. */
|
|
1086
|
+
export type TargetResponseRead = TargetRead & ResponseMetadata;
|
|
1087
|
+
|
|
1088
|
+
export interface TargetList {
|
|
1089
|
+
object: ListObject;
|
|
1090
|
+
data: Target[];
|
|
1091
|
+
has_more: boolean;
|
|
1092
|
+
next_cursor: string | null;
|
|
1093
|
+
request_id: RequestId;
|
|
1094
|
+
}
|
|
1095
|
+
|
|
1096
|
+
/** Response shape for TargetList. */
|
|
1097
|
+
export interface TargetListRead {
|
|
1098
|
+
object: ListObject;
|
|
1099
|
+
data: TargetRead[];
|
|
1100
|
+
has_more: boolean;
|
|
1101
|
+
next_cursor: string | null;
|
|
1102
|
+
request_id: RequestId;
|
|
1103
|
+
}
|
|
1104
|
+
|
|
1105
|
+
export interface TargetRelease {
|
|
1106
|
+
id: TargetReleaseId;
|
|
1107
|
+
object: "target_release";
|
|
1108
|
+
target_id: TargetId;
|
|
1109
|
+
generation_id: GenerationId;
|
|
1110
|
+
/** Immutable package version released from this Target. */
|
|
1111
|
+
version: string;
|
|
1112
|
+
channel: "stable" | "prerelease";
|
|
1113
|
+
/** Delivery provider that accepted the release. */
|
|
1114
|
+
provider: string;
|
|
1115
|
+
repository: RepositoryReference | null;
|
|
1116
|
+
definition_revision_id: DefinitionRevisionId | null;
|
|
1117
|
+
/** Immutable provider-native revision that was merged or published. */
|
|
1118
|
+
delivery_revision: string;
|
|
1119
|
+
/** Format: date-time */
|
|
1120
|
+
created_at: string;
|
|
1121
|
+
request_id?: RequestId;
|
|
1122
|
+
}
|
|
1123
|
+
|
|
1124
|
+
/** Response shape for TargetRelease. */
|
|
1125
|
+
export interface TargetReleaseRead {
|
|
1126
|
+
id: TargetReleaseId;
|
|
1127
|
+
object: "target_release" | (string & {});
|
|
1128
|
+
target_id: TargetId;
|
|
1129
|
+
generation_id: GenerationId;
|
|
1130
|
+
/** Immutable package version released from this Target. */
|
|
1131
|
+
version: string;
|
|
1132
|
+
channel: ("stable" | "prerelease") | (string & {});
|
|
1133
|
+
/** Delivery provider that accepted the release. */
|
|
1134
|
+
provider: string;
|
|
1135
|
+
repository: RepositoryReferenceRead | null;
|
|
1136
|
+
definition_revision_id: DefinitionRevisionId | null;
|
|
1137
|
+
/** Immutable provider-native revision that was merged or published. */
|
|
1138
|
+
delivery_revision: string;
|
|
1139
|
+
/** Format: date-time */
|
|
1140
|
+
created_at: string;
|
|
1141
|
+
request_id?: RequestId;
|
|
1142
|
+
}
|
|
1143
|
+
|
|
1144
|
+
export type TargetReleaseResponse = TargetRelease & ResponseMetadata;
|
|
1145
|
+
|
|
1146
|
+
/** Response shape for TargetReleaseResponse. */
|
|
1147
|
+
export type TargetReleaseResponseRead = TargetReleaseRead & ResponseMetadata;
|
|
1148
|
+
|
|
1149
|
+
export interface TargetReleaseList {
|
|
1150
|
+
object: ListObject;
|
|
1151
|
+
data: TargetRelease[];
|
|
1152
|
+
has_more: boolean;
|
|
1153
|
+
next_cursor: string | null;
|
|
1154
|
+
request_id: RequestId;
|
|
1155
|
+
}
|
|
1156
|
+
|
|
1157
|
+
/** Response shape for TargetReleaseList. */
|
|
1158
|
+
export interface TargetReleaseListRead {
|
|
1159
|
+
object: ListObject;
|
|
1160
|
+
data: TargetReleaseRead[];
|
|
1161
|
+
has_more: boolean;
|
|
1162
|
+
next_cursor: string | null;
|
|
1163
|
+
request_id: RequestId;
|
|
1164
|
+
}
|
|
1165
|
+
|
|
1166
|
+
export interface RepositoryHealthIssue {
|
|
1167
|
+
code: "connection_missing"
|
|
1168
|
+
| "definition_unreadable"
|
|
1169
|
+
| "contents_write_missing"
|
|
1170
|
+
| "review_write_missing"
|
|
1171
|
+
| "breaking_acknowledgement_missing"
|
|
1172
|
+
| "provider_unavailable";
|
|
1173
|
+
message: string;
|
|
1174
|
+
}
|
|
1175
|
+
|
|
1176
|
+
/** Response shape for RepositoryHealthIssue. */
|
|
1177
|
+
export interface RepositoryHealthIssueRead {
|
|
1178
|
+
code: ("connection_missing"
|
|
1179
|
+
| "definition_unreadable"
|
|
1180
|
+
| "contents_write_missing"
|
|
1181
|
+
| "review_write_missing"
|
|
1182
|
+
| "breaking_acknowledgement_missing"
|
|
1183
|
+
| "provider_unavailable") | (string & {});
|
|
1184
|
+
message: string;
|
|
1185
|
+
}
|
|
1186
|
+
|
|
1187
|
+
export interface RepositoryHealth {
|
|
1188
|
+
repository: RepositoryReference;
|
|
1189
|
+
roles: Array<"source" | "destination">;
|
|
1190
|
+
status: "ready" | "action_required";
|
|
1191
|
+
default_branch?: string;
|
|
1192
|
+
capabilities?: string[];
|
|
1193
|
+
/**
|
|
1194
|
+
* Whether a source repository has the optional typeship:breaking-approved policy label. Null when
|
|
1195
|
+
* the repository is not a source or labels could not be read.
|
|
1196
|
+
*/
|
|
1197
|
+
breaking_acknowledgement?: boolean | null;
|
|
1198
|
+
definition?: "readable" | "missing";
|
|
1199
|
+
issues: RepositoryHealthIssue[];
|
|
1200
|
+
}
|
|
1201
|
+
|
|
1202
|
+
/** Response shape for RepositoryHealth. */
|
|
1203
|
+
export interface RepositoryHealthRead {
|
|
1204
|
+
repository: RepositoryReferenceRead;
|
|
1205
|
+
roles: Array<("source" | "destination") | (string & {})>;
|
|
1206
|
+
status: ("ready" | "action_required") | (string & {});
|
|
1207
|
+
default_branch?: string;
|
|
1208
|
+
capabilities?: string[];
|
|
1209
|
+
/**
|
|
1210
|
+
* Whether a source repository has the optional typeship:breaking-approved policy label. Null when
|
|
1211
|
+
* the repository is not a source or labels could not be read.
|
|
1212
|
+
*/
|
|
1213
|
+
breaking_acknowledgement?: boolean | null;
|
|
1214
|
+
definition?: ("readable" | "missing") | (string & {});
|
|
1215
|
+
issues: RepositoryHealthIssueRead[];
|
|
1216
|
+
}
|
|
1217
|
+
|
|
1218
|
+
export interface RepositoryEventHealth {
|
|
1219
|
+
provider: string;
|
|
1220
|
+
id: string;
|
|
1221
|
+
event: string;
|
|
1222
|
+
status: "queued" | "processing" | "succeeded" | "failed" | "superseded";
|
|
1223
|
+
error: string | null;
|
|
1224
|
+
/** Format: date-time */
|
|
1225
|
+
created_at: string;
|
|
1226
|
+
}
|
|
1227
|
+
|
|
1228
|
+
/** Response shape for RepositoryEventHealth. */
|
|
1229
|
+
export interface RepositoryEventHealthRead {
|
|
1230
|
+
provider: string;
|
|
1231
|
+
id: string;
|
|
1232
|
+
event: string;
|
|
1233
|
+
status: ("queued" | "processing" | "succeeded" | "failed" | "superseded") | (string & {});
|
|
1234
|
+
error: string | null;
|
|
1235
|
+
/** Format: date-time */
|
|
1236
|
+
created_at: string;
|
|
1237
|
+
}
|
|
1238
|
+
|
|
1239
|
+
export interface RepositoryIntegrationHealth {
|
|
1240
|
+
object: "repository_integration_health";
|
|
1241
|
+
project_id: ProjectId;
|
|
1242
|
+
status: "ready" | "action_required";
|
|
1243
|
+
repositories: RepositoryHealth[];
|
|
1244
|
+
required_checks: {
|
|
1245
|
+
source: string[];
|
|
1246
|
+
destination: string[];
|
|
1247
|
+
};
|
|
1248
|
+
last_event: RepositoryEventHealth | null;
|
|
1249
|
+
request_id: RequestId;
|
|
1250
|
+
}
|
|
1251
|
+
|
|
1252
|
+
/** Response shape for RepositoryIntegrationHealth. */
|
|
1253
|
+
export interface RepositoryIntegrationHealthRead {
|
|
1254
|
+
object: "repository_integration_health" | (string & {});
|
|
1255
|
+
project_id: ProjectId;
|
|
1256
|
+
status: ("ready" | "action_required") | (string & {});
|
|
1257
|
+
repositories: RepositoryHealthRead[];
|
|
1258
|
+
required_checks: {
|
|
1259
|
+
source: string[];
|
|
1260
|
+
destination: string[];
|
|
1261
|
+
};
|
|
1262
|
+
last_event: RepositoryEventHealthRead | null;
|
|
1263
|
+
request_id: RequestId;
|
|
1264
|
+
}
|
|
1265
|
+
|
|
1266
|
+
export interface DefinitionFields {
|
|
1267
|
+
source: DefinitionSourceInput;
|
|
1268
|
+
/** Default: [] */
|
|
1269
|
+
patches?: DefinitionPatch[];
|
|
1270
|
+
/** GraphQL-only endpoint, auth, environment, title, and scalar settings. */
|
|
1271
|
+
graphql?: GraphqlSettings | null;
|
|
1272
|
+
diagnostic_policy?: DiagnosticPolicy;
|
|
1273
|
+
}
|
|
1274
|
+
|
|
1275
|
+
/** Response shape for DefinitionFields. */
|
|
1276
|
+
export interface DefinitionFieldsRead {
|
|
1277
|
+
source: DefinitionSourceInputRead;
|
|
1278
|
+
/** Default: [] */
|
|
1279
|
+
patches?: DefinitionPatchRead[];
|
|
1280
|
+
/** GraphQL-only endpoint, auth, environment, title, and scalar settings. */
|
|
1281
|
+
graphql?: GraphqlSettingsRead | null;
|
|
1282
|
+
diagnostic_policy?: DiagnosticPolicyRead;
|
|
1283
|
+
}
|
|
1284
|
+
|
|
1285
|
+
export interface Definition {
|
|
1286
|
+
id: DefinitionId;
|
|
1287
|
+
object: "definition";
|
|
1288
|
+
project_id: ProjectId;
|
|
1289
|
+
source: DefinitionSource;
|
|
1290
|
+
format: "openapi" | "graphql" | null;
|
|
1291
|
+
patches: DefinitionPatch[];
|
|
1292
|
+
graphql: GraphqlSettings | null;
|
|
1293
|
+
diagnostic_policy: DiagnosticPolicy;
|
|
1294
|
+
latest_revision_id: DefinitionRevisionId | null;
|
|
1295
|
+
/** Format: date-time */
|
|
1296
|
+
created_at: string;
|
|
1297
|
+
/** Format: date-time */
|
|
1298
|
+
updated_at: string;
|
|
1299
|
+
request_id: RequestId;
|
|
1300
|
+
}
|
|
1301
|
+
|
|
1302
|
+
/** Request shape for Definition. */
|
|
1303
|
+
export interface DefinitionWrite {
|
|
1304
|
+
id: DefinitionId;
|
|
1305
|
+
object: "definition";
|
|
1306
|
+
project_id: ProjectId;
|
|
1307
|
+
source: DefinitionSourceWrite;
|
|
1308
|
+
format: "openapi" | "graphql" | null;
|
|
1309
|
+
patches: DefinitionPatch[];
|
|
1310
|
+
graphql: GraphqlSettings | null;
|
|
1311
|
+
diagnostic_policy: DiagnosticPolicy;
|
|
1312
|
+
latest_revision_id: DefinitionRevisionId | null;
|
|
1313
|
+
/** Format: date-time */
|
|
1314
|
+
created_at: string;
|
|
1315
|
+
/** Format: date-time */
|
|
1316
|
+
updated_at: string;
|
|
1317
|
+
request_id: RequestId;
|
|
1318
|
+
}
|
|
1319
|
+
|
|
1320
|
+
/** Response shape for Definition. */
|
|
1321
|
+
export interface DefinitionRead {
|
|
1322
|
+
id: DefinitionId;
|
|
1323
|
+
object: "definition" | (string & {});
|
|
1324
|
+
project_id: ProjectId;
|
|
1325
|
+
source: DefinitionSourceRead;
|
|
1326
|
+
format: ("openapi" | "graphql" | null) | (string & {}) | null;
|
|
1327
|
+
patches: DefinitionPatchRead[];
|
|
1328
|
+
graphql: GraphqlSettingsRead | null;
|
|
1329
|
+
diagnostic_policy: DiagnosticPolicyRead;
|
|
1330
|
+
latest_revision_id: DefinitionRevisionId | null;
|
|
1331
|
+
/** Format: date-time */
|
|
1332
|
+
created_at: string;
|
|
1333
|
+
/** Format: date-time */
|
|
1334
|
+
updated_at: string;
|
|
1335
|
+
request_id: RequestId;
|
|
1336
|
+
}
|
|
1337
|
+
|
|
1338
|
+
export interface DefinitionUpdateRequest {
|
|
1339
|
+
source?: DefinitionSourceInput;
|
|
1340
|
+
patches?: DefinitionPatch[];
|
|
1341
|
+
graphql?: GraphqlSettings | null;
|
|
1342
|
+
diagnostic_policy?: DiagnosticPolicy;
|
|
1343
|
+
}
|
|
1344
|
+
|
|
1345
|
+
/** Response shape for DefinitionUpdateRequest. */
|
|
1346
|
+
export interface DefinitionUpdateRequestRead {
|
|
1347
|
+
source?: DefinitionSourceInputRead;
|
|
1348
|
+
patches?: DefinitionPatchRead[];
|
|
1349
|
+
graphql?: GraphqlSettingsRead | null;
|
|
1350
|
+
diagnostic_policy?: DiagnosticPolicyRead;
|
|
1351
|
+
}
|
|
1352
|
+
|
|
1353
|
+
export interface Project {
|
|
1354
|
+
id: ProjectId;
|
|
1355
|
+
object: "project";
|
|
1356
|
+
name: string;
|
|
1357
|
+
definition_id: DefinitionId;
|
|
1358
|
+
/** All configured Targets, including disabled Targets and their saved Deliveries. */
|
|
1359
|
+
targets: Target[];
|
|
1360
|
+
/**
|
|
1361
|
+
* Flattened convenience view derived from the same Target bundles. Every Delivery retains
|
|
1362
|
+
* target_id so ownership is explicit.
|
|
1363
|
+
*/
|
|
1364
|
+
deliveries: Delivery[];
|
|
1365
|
+
/**
|
|
1366
|
+
* Regenerate when the Definition changes: on every push to the default branch for a repository
|
|
1367
|
+
* source, every 30 minutes for a URL source. Off by default: the first generation is always one
|
|
1368
|
+
* you asked for. Off means only "generate now" and POST /projects/{project_id}/generations
|
|
1369
|
+
* regenerate.
|
|
1370
|
+
*/
|
|
1371
|
+
auto_generate: boolean;
|
|
1372
|
+
/**
|
|
1373
|
+
* Whether the webhook relay is on, letting the generated CLI's webhooks listen command mint relay
|
|
1374
|
+
* sessions. Requires the cli target and Pro; turning the target off turns this off.
|
|
1375
|
+
*/
|
|
1376
|
+
relay_enabled: boolean;
|
|
1377
|
+
/**
|
|
1378
|
+
* Shared defaults inherited by every Target. A Target's config overrides these defaults; GraphQL
|
|
1379
|
+
* settings remain Definition-owned.
|
|
1380
|
+
*/
|
|
1381
|
+
config: ProjectConfig | null;
|
|
1382
|
+
/** Format: date-time */
|
|
1383
|
+
created_at: string;
|
|
1384
|
+
/**
|
|
1385
|
+
* When the project configuration last changed.
|
|
1386
|
+
* Format: date-time
|
|
1387
|
+
*/
|
|
1388
|
+
updated_at: string;
|
|
1389
|
+
request_id: RequestId;
|
|
1390
|
+
}
|
|
1391
|
+
|
|
1392
|
+
/** Request shape for Project. */
|
|
1393
|
+
export interface ProjectWrite {
|
|
1394
|
+
name: string;
|
|
1395
|
+
definition_id: DefinitionId;
|
|
1396
|
+
/** All configured Targets, including disabled Targets and their saved Deliveries. */
|
|
1397
|
+
targets: Target[];
|
|
1398
|
+
/**
|
|
1399
|
+
* Flattened convenience view derived from the same Target bundles. Every Delivery retains
|
|
1400
|
+
* target_id so ownership is explicit.
|
|
1401
|
+
*/
|
|
1402
|
+
deliveries: Delivery[];
|
|
1403
|
+
/**
|
|
1404
|
+
* Regenerate when the Definition changes: on every push to the default branch for a repository
|
|
1405
|
+
* source, every 30 minutes for a URL source. Off by default: the first generation is always one
|
|
1406
|
+
* you asked for. Off means only "generate now" and POST /projects/{project_id}/generations
|
|
1407
|
+
* regenerate.
|
|
1408
|
+
*/
|
|
1409
|
+
auto_generate: boolean;
|
|
1410
|
+
/**
|
|
1411
|
+
* Whether the webhook relay is on, letting the generated CLI's webhooks listen command mint relay
|
|
1412
|
+
* sessions. Requires the cli target and Pro; turning the target off turns this off.
|
|
1413
|
+
*/
|
|
1414
|
+
relay_enabled: boolean;
|
|
1415
|
+
/**
|
|
1416
|
+
* Shared defaults inherited by every Target. A Target's config overrides these defaults; GraphQL
|
|
1417
|
+
* settings remain Definition-owned.
|
|
1418
|
+
*/
|
|
1419
|
+
config: ProjectConfig | null;
|
|
1420
|
+
request_id: RequestId;
|
|
1421
|
+
}
|
|
1422
|
+
|
|
1423
|
+
/** Response shape for Project. */
|
|
1424
|
+
export interface ProjectRead {
|
|
1425
|
+
id: ProjectId;
|
|
1426
|
+
object: "project" | (string & {});
|
|
1427
|
+
name: string;
|
|
1428
|
+
definition_id: DefinitionId;
|
|
1429
|
+
/** All configured Targets, including disabled Targets and their saved Deliveries. */
|
|
1430
|
+
targets: TargetRead[];
|
|
1431
|
+
/**
|
|
1432
|
+
* Flattened convenience view derived from the same Target bundles. Every Delivery retains
|
|
1433
|
+
* target_id so ownership is explicit.
|
|
1434
|
+
*/
|
|
1435
|
+
deliveries: DeliveryRead[];
|
|
1436
|
+
/**
|
|
1437
|
+
* Regenerate when the Definition changes: on every push to the default branch for a repository
|
|
1438
|
+
* source, every 30 minutes for a URL source. Off by default: the first generation is always one
|
|
1439
|
+
* you asked for. Off means only "generate now" and POST /projects/{project_id}/generations
|
|
1440
|
+
* regenerate.
|
|
1441
|
+
*/
|
|
1442
|
+
auto_generate: boolean;
|
|
1443
|
+
/**
|
|
1444
|
+
* Whether the webhook relay is on, letting the generated CLI's webhooks listen command mint relay
|
|
1445
|
+
* sessions. Requires the cli target and Pro; turning the target off turns this off.
|
|
1446
|
+
*/
|
|
1447
|
+
relay_enabled: boolean;
|
|
1448
|
+
/**
|
|
1449
|
+
* Shared defaults inherited by every Target. A Target's config overrides these defaults; GraphQL
|
|
1450
|
+
* settings remain Definition-owned.
|
|
1451
|
+
*/
|
|
1452
|
+
config: ProjectConfigRead | null;
|
|
1453
|
+
/** Format: date-time */
|
|
1454
|
+
created_at: string;
|
|
1455
|
+
/**
|
|
1456
|
+
* When the project configuration last changed.
|
|
1457
|
+
* Format: date-time
|
|
1458
|
+
*/
|
|
1459
|
+
updated_at: string;
|
|
1460
|
+
request_id: RequestId;
|
|
1461
|
+
}
|
|
1462
|
+
|
|
1463
|
+
/**
|
|
1464
|
+
* Lean Project identity returned by collection endpoints. Retrieve the Project or list its Targets
|
|
1465
|
+
* for the complete aggregate.
|
|
1466
|
+
*/
|
|
1467
|
+
export interface ProjectSummary {
|
|
1468
|
+
id: ProjectId;
|
|
1469
|
+
object: "project";
|
|
1470
|
+
name: string;
|
|
1471
|
+
definition_id: DefinitionId;
|
|
1472
|
+
auto_generate: boolean;
|
|
1473
|
+
/** Format: date-time */
|
|
1474
|
+
created_at: string;
|
|
1475
|
+
/** Format: date-time */
|
|
1476
|
+
updated_at: string;
|
|
1477
|
+
}
|
|
1478
|
+
|
|
1479
|
+
/** Response shape for ProjectSummary. */
|
|
1480
|
+
export interface ProjectSummaryRead {
|
|
1481
|
+
id: ProjectId;
|
|
1482
|
+
object: "project" | (string & {});
|
|
1483
|
+
name: string;
|
|
1484
|
+
definition_id: DefinitionId;
|
|
1485
|
+
auto_generate: boolean;
|
|
1486
|
+
/** Format: date-time */
|
|
1487
|
+
created_at: string;
|
|
1488
|
+
/** Format: date-time */
|
|
1489
|
+
updated_at: string;
|
|
1490
|
+
}
|
|
1491
|
+
|
|
1492
|
+
export interface CreateProjectRequest {
|
|
1493
|
+
name: string;
|
|
1494
|
+
definition: DefinitionFields;
|
|
1495
|
+
/**
|
|
1496
|
+
* Initial first-class Targets. More than one may use the same generator with different identities
|
|
1497
|
+
* or Deliveries.
|
|
1498
|
+
*/
|
|
1499
|
+
targets: InitialTargetFields[];
|
|
1500
|
+
/**
|
|
1501
|
+
* Whether Typeship should regenerate automatically when the source changes.
|
|
1502
|
+
* Default: false
|
|
1503
|
+
*/
|
|
1504
|
+
auto_generate?: boolean;
|
|
1505
|
+
/**
|
|
1506
|
+
* Enable webhook relay sessions. Requires the CLI target and Pro.
|
|
1507
|
+
* Default: false
|
|
1508
|
+
*/
|
|
1509
|
+
relay_enabled?: boolean;
|
|
1510
|
+
/** Shared defaults inherited by every Target. GraphQL settings belong in definition.graphql. */
|
|
1511
|
+
config?: ProjectConfig | null;
|
|
1512
|
+
}
|
|
1513
|
+
|
|
1514
|
+
/** Response shape for CreateProjectRequest. */
|
|
1515
|
+
export interface CreateProjectRequestRead {
|
|
1516
|
+
name: string;
|
|
1517
|
+
definition: DefinitionFieldsRead;
|
|
1518
|
+
/**
|
|
1519
|
+
* Initial first-class Targets. More than one may use the same generator with different identities
|
|
1520
|
+
* or Deliveries.
|
|
1521
|
+
*/
|
|
1522
|
+
targets: InitialTargetFieldsRead[];
|
|
1523
|
+
/**
|
|
1524
|
+
* Whether Typeship should regenerate automatically when the source changes.
|
|
1525
|
+
* Default: false
|
|
1526
|
+
*/
|
|
1527
|
+
auto_generate?: boolean;
|
|
1528
|
+
/**
|
|
1529
|
+
* Enable webhook relay sessions. Requires the CLI target and Pro.
|
|
1530
|
+
* Default: false
|
|
1531
|
+
*/
|
|
1532
|
+
relay_enabled?: boolean;
|
|
1533
|
+
/** Shared defaults inherited by every Target. GraphQL settings belong in definition.graphql. */
|
|
1534
|
+
config?: ProjectConfigRead | null;
|
|
1535
|
+
}
|
|
1536
|
+
|
|
1537
|
+
export interface UpdateProjectRequest {
|
|
1538
|
+
name?: string;
|
|
1539
|
+
auto_generate?: boolean;
|
|
1540
|
+
/** Enable webhook relay sessions. Requires the CLI target and Pro. */
|
|
1541
|
+
relay_enabled?: boolean;
|
|
1542
|
+
/** Replaces the Project's shared Target defaults. Send null to clear them. */
|
|
1543
|
+
config?: ProjectConfig | null;
|
|
1544
|
+
}
|
|
1545
|
+
|
|
1546
|
+
/** Response shape for UpdateProjectRequest. */
|
|
1547
|
+
export interface UpdateProjectRequestRead {
|
|
1548
|
+
name?: string;
|
|
1549
|
+
auto_generate?: boolean;
|
|
1550
|
+
/** Enable webhook relay sessions. Requires the CLI target and Pro. */
|
|
1551
|
+
relay_enabled?: boolean;
|
|
1552
|
+
/** Replaces the Project's shared Target defaults. Send null to clear them. */
|
|
1553
|
+
config?: ProjectConfigRead | null;
|
|
1554
|
+
}
|
|
1555
|
+
|
|
1556
|
+
/**
|
|
1557
|
+
* The organization an API key belongs to. Members share its projects, keys, and plan; sign-in
|
|
1558
|
+
* identity is not part of the API.
|
|
1559
|
+
*/
|
|
1560
|
+
export interface Account {
|
|
1561
|
+
id: string;
|
|
1562
|
+
object: "account";
|
|
1563
|
+
/** The organization's display name. */
|
|
1564
|
+
name: string;
|
|
1565
|
+
plan: "free" | "pro" | "enterprise";
|
|
1566
|
+
/** Format: date-time */
|
|
1567
|
+
created_at: string;
|
|
1568
|
+
request_id: RequestId;
|
|
1569
|
+
}
|
|
1570
|
+
|
|
1571
|
+
/** Response shape for Account. */
|
|
1572
|
+
export interface AccountRead {
|
|
1573
|
+
id: string;
|
|
1574
|
+
object: "account" | (string & {});
|
|
1575
|
+
/** The organization's display name. */
|
|
1576
|
+
name: string;
|
|
1577
|
+
plan: ("free" | "pro" | "enterprise") | (string & {});
|
|
1578
|
+
/** Format: date-time */
|
|
1579
|
+
created_at: string;
|
|
1580
|
+
request_id: RequestId;
|
|
1581
|
+
}
|
|
1582
|
+
|
|
1583
|
+
/** How the generated CLI behaves. Part of Config. */
|
|
1584
|
+
export interface CliBehavior {
|
|
1585
|
+
/** Command users run, independent of how the CLI is distributed. */
|
|
1586
|
+
command_name?: string | null;
|
|
1587
|
+
/**
|
|
1588
|
+
* resource.method of a zero-argument GET that the generated CLI's whoami command calls. Overrides
|
|
1589
|
+
* auto-detection; a value that matches nothing is reported as a generation warning.
|
|
1590
|
+
*/
|
|
1591
|
+
whoami_operation?: string | null;
|
|
1592
|
+
/**
|
|
1593
|
+
* OAuth client id baked into the generated CLI for device-flow login. Without it, login prompts
|
|
454
1594
|
* for a pasted credential.
|
|
455
1595
|
*/
|
|
456
1596
|
oauth_client_id?: string | null;
|
|
@@ -490,6 +1630,8 @@ export interface CliBehavior {
|
|
|
490
1630
|
|
|
491
1631
|
/** How the generated MCP server and the hosted endpoint behave. Part of Config. */
|
|
492
1632
|
export interface McpBehavior {
|
|
1633
|
+
/** Stable official MCP registry name, independent of the server runtime. */
|
|
1634
|
+
registry_name?: string | null;
|
|
493
1635
|
/**
|
|
494
1636
|
* MCP tool shape. meta collapses per-operation tools into search_docs, read_docs, and execute so
|
|
495
1637
|
* large APIs don't flood an agent's context window. Auto considers the serialized tool schemas,
|
|
@@ -511,43 +1653,126 @@ export interface McpBehavior {
|
|
|
511
1653
|
tool_descriptions?: Record<string, string>;
|
|
512
1654
|
}
|
|
513
1655
|
|
|
1656
|
+
/** Response shape for McpBehavior. */
|
|
1657
|
+
export interface McpBehaviorRead {
|
|
1658
|
+
/** Stable official MCP registry name, independent of the server runtime. */
|
|
1659
|
+
registry_name?: string | null;
|
|
1660
|
+
/**
|
|
1661
|
+
* MCP tool shape. meta collapses per-operation tools into search_docs, read_docs, and execute so
|
|
1662
|
+
* large APIs don't flood an agent's context window. Auto considers the serialized tool schemas,
|
|
1663
|
+
* switching near 10k tokens or above 100 operations.
|
|
1664
|
+
*/
|
|
1665
|
+
tool_mode?: ("auto" | "operations" | "meta") | (string & {});
|
|
1666
|
+
/**
|
|
1667
|
+
* Guidance appended to the MCP server's instructions, which agents read once when they connect
|
|
1668
|
+
* (server/discover): what to call first, conventions the spec does not state, what not to do.
|
|
1669
|
+
* Carried by the package's server and the hosted endpoint alike.
|
|
1670
|
+
*/
|
|
1671
|
+
instructions?: string | null;
|
|
1672
|
+
/**
|
|
1673
|
+
* Hand-written MCP tool descriptions keyed by operationId or "METHOD /path". Each replaces the
|
|
1674
|
+
* text typeship derives for that operation (summary, first sentence, method and path, deprecation
|
|
1675
|
+
* and auth notes). For flows the spec cannot describe, such as a multi-step upload. Keys that
|
|
1676
|
+
* match no operation are reported as generation warnings.
|
|
1677
|
+
*/
|
|
1678
|
+
tool_descriptions?: Record<string, string>;
|
|
1679
|
+
}
|
|
1680
|
+
|
|
514
1681
|
/**
|
|
515
1682
|
* Published-package metadata the API spec does not own. Repository is derived from each
|
|
516
|
-
* destination
|
|
1683
|
+
* destination.
|
|
517
1684
|
*/
|
|
518
1685
|
export interface PackageBehavior {
|
|
519
|
-
/**
|
|
520
|
-
* Lockstep version fallback. Prefer packages.<output>.version so every SDK, CLI, and MCP package
|
|
521
|
-
* can advance independently.
|
|
522
|
-
* @deprecated
|
|
523
|
-
*/
|
|
524
|
-
version?: string | null;
|
|
525
1686
|
/** Homepage written into registry metadata. */
|
|
526
1687
|
homepage?: string | null;
|
|
527
1688
|
/** SPDX identifier written into registry metadata. Defaults to info.license. */
|
|
528
1689
|
license?: string | null;
|
|
529
1690
|
/**
|
|
530
|
-
* Exact LICENSE file contents. Supply this for licences the engine does not build in; MIT is
|
|
531
|
-
* built in when copyright is also set.
|
|
1691
|
+
* Exact LICENSE file contents. Supply this for licences the engine does not build in; MIT is
|
|
1692
|
+
* built in when copyright is also set.
|
|
1693
|
+
*/
|
|
1694
|
+
license_text?: string | null;
|
|
1695
|
+
/** Copyright line used in generated license files. */
|
|
1696
|
+
copyright?: string | null;
|
|
1697
|
+
/** Go identifier when the destination repository name is unsuitable. */
|
|
1698
|
+
go_package_name?: string | null;
|
|
1699
|
+
}
|
|
1700
|
+
|
|
1701
|
+
/**
|
|
1702
|
+
* Everything Typeship needs beyond the Definition, in one object: generation customization
|
|
1703
|
+
* (globals, retries, pagination) and how the generated tooling behaves (cli, mcp, package,
|
|
1704
|
+
* docs_url). Plain configuration. Typeship never requires vendor extensions inside the Definition
|
|
1705
|
+
* itself. Stateless generation also accepts GraphQL settings here; stored projects keep those
|
|
1706
|
+
* settings on their Definition.
|
|
1707
|
+
*/
|
|
1708
|
+
export interface Config {
|
|
1709
|
+
/**
|
|
1710
|
+
* Wire names of query/header parameters that become settable once on the generated client and
|
|
1711
|
+
* auto-apply to every operation that accepts them; per-call values win. Names that match nothing
|
|
1712
|
+
* are reported as generation warnings.
|
|
1713
|
+
*/
|
|
1714
|
+
globals?: string[];
|
|
1715
|
+
retries?: RetryTuning;
|
|
1716
|
+
/**
|
|
1717
|
+
* Per-operation pagination control, keyed by operationId or "METHOD /path". Unmatched keys are
|
|
1718
|
+
* reported as generation warnings.
|
|
1719
|
+
*/
|
|
1720
|
+
pagination?: Record<string, PaginationRule | boolean>;
|
|
1721
|
+
graphql?: GraphqlSettings;
|
|
1722
|
+
cli?: CliBehavior;
|
|
1723
|
+
mcp?: McpBehavior;
|
|
1724
|
+
package?: PackageBehavior;
|
|
1725
|
+
/**
|
|
1726
|
+
* The API's documentation site. Read through its llms.txt by the generated CLI's docs command,
|
|
1727
|
+
* the MCP server's docs tools, and the package's AGENTS.md. Defaults to the Definition's
|
|
1728
|
+
* externalDocs URL.
|
|
1729
|
+
*/
|
|
1730
|
+
docs_url?: string | null;
|
|
1731
|
+
/**
|
|
1732
|
+
* Exact llms.txt URL when the documentation site does not publish it at docs_url + /llms.txt.
|
|
1733
|
+
* Format: uri
|
|
1734
|
+
*/
|
|
1735
|
+
docs_index_url?: string | null;
|
|
1736
|
+
}
|
|
1737
|
+
|
|
1738
|
+
/** Response shape for Config. */
|
|
1739
|
+
export interface ConfigRead {
|
|
1740
|
+
/**
|
|
1741
|
+
* Wire names of query/header parameters that become settable once on the generated client and
|
|
1742
|
+
* auto-apply to every operation that accepts them; per-call values win. Names that match nothing
|
|
1743
|
+
* are reported as generation warnings.
|
|
1744
|
+
*/
|
|
1745
|
+
globals?: string[];
|
|
1746
|
+
retries?: RetryTuning;
|
|
1747
|
+
/**
|
|
1748
|
+
* Per-operation pagination control, keyed by operationId or "METHOD /path". Unmatched keys are
|
|
1749
|
+
* reported as generation warnings.
|
|
1750
|
+
*/
|
|
1751
|
+
pagination?: Record<string, PaginationRuleRead | boolean>;
|
|
1752
|
+
graphql?: GraphqlSettingsRead;
|
|
1753
|
+
cli?: CliBehavior;
|
|
1754
|
+
mcp?: McpBehaviorRead;
|
|
1755
|
+
package?: PackageBehavior;
|
|
1756
|
+
/**
|
|
1757
|
+
* The API's documentation site. Read through its llms.txt by the generated CLI's docs command,
|
|
1758
|
+
* the MCP server's docs tools, and the package's AGENTS.md. Defaults to the Definition's
|
|
1759
|
+
* externalDocs URL.
|
|
532
1760
|
*/
|
|
533
|
-
|
|
534
|
-
/**
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
go_package_name?: string | null;
|
|
540
|
-
/** Official MCP registry name written into package.json. */
|
|
541
|
-
mcp_name?: string | null;
|
|
1761
|
+
docs_url?: string | null;
|
|
1762
|
+
/**
|
|
1763
|
+
* Exact llms.txt URL when the documentation site does not publish it at docs_url + /llms.txt.
|
|
1764
|
+
* Format: uri
|
|
1765
|
+
*/
|
|
1766
|
+
docs_index_url?: string | null;
|
|
542
1767
|
}
|
|
543
1768
|
|
|
544
1769
|
/**
|
|
545
|
-
*
|
|
546
|
-
*
|
|
547
|
-
*
|
|
548
|
-
*
|
|
1770
|
+
* Shared generated-client and tooling behavior for a stored Project. Every Target inherits these
|
|
1771
|
+
* defaults. Target.config is merged over them for one Target; top-level values replace defaults
|
|
1772
|
+
* while cli, mcp, and package merge by field. GraphQL-only source settings live on the Project's
|
|
1773
|
+
* Definition and are rejected in both stored config scopes.
|
|
549
1774
|
*/
|
|
550
|
-
export interface
|
|
1775
|
+
export interface ProjectConfig {
|
|
551
1776
|
/**
|
|
552
1777
|
* Wire names of query/header parameters that become settable once on the generated client and
|
|
553
1778
|
* auto-apply to every operation that accepts them; per-call values win. Names that match nothing
|
|
@@ -560,16 +1785,50 @@ export interface Config {
|
|
|
560
1785
|
* reported as generation warnings.
|
|
561
1786
|
*/
|
|
562
1787
|
pagination?: Record<string, PaginationRule | boolean>;
|
|
563
|
-
graphql?: GraphqlSettings;
|
|
564
1788
|
cli?: CliBehavior;
|
|
565
1789
|
mcp?: McpBehavior;
|
|
566
1790
|
package?: PackageBehavior;
|
|
567
1791
|
/**
|
|
568
1792
|
* The API's documentation site. Read through its llms.txt by the generated CLI's docs command,
|
|
569
|
-
* the MCP server's docs tools, and the package's AGENTS.md. Defaults to the
|
|
570
|
-
* URL.
|
|
1793
|
+
* the MCP server's docs tools, and the package's AGENTS.md. Defaults to the Definition's
|
|
1794
|
+
* externalDocs URL.
|
|
1795
|
+
*/
|
|
1796
|
+
docs_url?: string | null;
|
|
1797
|
+
/**
|
|
1798
|
+
* Exact llms.txt URL when the documentation site does not publish it at docs_url + /llms.txt.
|
|
1799
|
+
* Format: uri
|
|
1800
|
+
*/
|
|
1801
|
+
docs_index_url?: string | null;
|
|
1802
|
+
}
|
|
1803
|
+
|
|
1804
|
+
/** Response shape for ProjectConfig. */
|
|
1805
|
+
export interface ProjectConfigRead {
|
|
1806
|
+
/**
|
|
1807
|
+
* Wire names of query/header parameters that become settable once on the generated client and
|
|
1808
|
+
* auto-apply to every operation that accepts them; per-call values win. Names that match nothing
|
|
1809
|
+
* are reported as generation warnings.
|
|
1810
|
+
*/
|
|
1811
|
+
globals?: string[];
|
|
1812
|
+
retries?: RetryTuning;
|
|
1813
|
+
/**
|
|
1814
|
+
* Per-operation pagination control, keyed by operationId or "METHOD /path". Unmatched keys are
|
|
1815
|
+
* reported as generation warnings.
|
|
1816
|
+
*/
|
|
1817
|
+
pagination?: Record<string, PaginationRuleRead | boolean>;
|
|
1818
|
+
cli?: CliBehavior;
|
|
1819
|
+
mcp?: McpBehaviorRead;
|
|
1820
|
+
package?: PackageBehavior;
|
|
1821
|
+
/**
|
|
1822
|
+
* The API's documentation site. Read through its llms.txt by the generated CLI's docs command,
|
|
1823
|
+
* the MCP server's docs tools, and the package's AGENTS.md. Defaults to the Definition's
|
|
1824
|
+
* externalDocs URL.
|
|
571
1825
|
*/
|
|
572
1826
|
docs_url?: string | null;
|
|
1827
|
+
/**
|
|
1828
|
+
* Exact llms.txt URL when the documentation site does not publish it at docs_url + /llms.txt.
|
|
1829
|
+
* Format: uri
|
|
1830
|
+
*/
|
|
1831
|
+
docs_index_url?: string | null;
|
|
573
1832
|
}
|
|
574
1833
|
|
|
575
1834
|
/** What a GraphQL schema cannot say about itself. Ignored for OpenAPI specs. */
|
|
@@ -602,8 +1861,8 @@ export interface GraphqlSettings {
|
|
|
602
1861
|
*/
|
|
603
1862
|
api_key_header?: string;
|
|
604
1863
|
/**
|
|
605
|
-
* The API's name; drives the package and client names ("
|
|
606
|
-
*
|
|
1864
|
+
* The API's name; drives the package and client names ("Acme" gives acme and AcmeClient).
|
|
1865
|
+
* Defaults to a name derived from the endpoint's host.
|
|
607
1866
|
*/
|
|
608
1867
|
title?: string;
|
|
609
1868
|
/**
|
|
@@ -613,6 +1872,47 @@ export interface GraphqlSettings {
|
|
|
613
1872
|
scalars?: Record<string, "string" | "integer" | "number" | "boolean" | "json">;
|
|
614
1873
|
}
|
|
615
1874
|
|
|
1875
|
+
/** Response shape for GraphqlSettings. */
|
|
1876
|
+
export interface GraphqlSettingsRead {
|
|
1877
|
+
/**
|
|
1878
|
+
* The URL every request is POSTed to; the generated client's default baseUrl. Defaults to the URL
|
|
1879
|
+
* the schema was fetched from. Without either, baseUrl is a required client option.
|
|
1880
|
+
* Format: uri
|
|
1881
|
+
*/
|
|
1882
|
+
endpoint?: string;
|
|
1883
|
+
/**
|
|
1884
|
+
* Named endpoints (sandbox, production). Each becomes a client environment; the first is the
|
|
1885
|
+
* default unless endpoint is set.
|
|
1886
|
+
*/
|
|
1887
|
+
environments?: Array<{
|
|
1888
|
+
name: string;
|
|
1889
|
+
/** Format: uri */
|
|
1890
|
+
url: string;
|
|
1891
|
+
}>;
|
|
1892
|
+
/**
|
|
1893
|
+
* How requests authenticate. bearer sends Authorization: Bearer; basic is for key-pair APIs
|
|
1894
|
+
* (public key as username, private key as password); api_key sends a header named by
|
|
1895
|
+
* api_key_header; none generates no auth option.
|
|
1896
|
+
* Default: "bearer"
|
|
1897
|
+
*/
|
|
1898
|
+
auth?: ("bearer" | "basic" | "api_key" | "none") | (string & {});
|
|
1899
|
+
/**
|
|
1900
|
+
* Header carrying the key when auth is api_key. Required for that mode; Typeship does not invent
|
|
1901
|
+
* a vendor-specific header name.
|
|
1902
|
+
*/
|
|
1903
|
+
api_key_header?: string;
|
|
1904
|
+
/**
|
|
1905
|
+
* The API's name; drives the package and client names ("Acme" gives acme and AcmeClient).
|
|
1906
|
+
* Defaults to a name derived from the endpoint's host.
|
|
1907
|
+
*/
|
|
1908
|
+
title?: string;
|
|
1909
|
+
/**
|
|
1910
|
+
* JSON representation of each custom scalar, keyed by GraphQL scalar name. Unmapped scalars
|
|
1911
|
+
* generate as the language's untyped JSON value and produce a warning. Unmatched keys warn.
|
|
1912
|
+
*/
|
|
1913
|
+
scalars?: Record<string, ("string" | "integer" | "number" | "boolean" | "json") | (string & {})>;
|
|
1914
|
+
}
|
|
1915
|
+
|
|
616
1916
|
/**
|
|
617
1917
|
* Retry behavior. Top-level fields adjust every operation; operations maps operationId or "METHOD
|
|
618
1918
|
* /path" keys to per-operation overrides.
|
|
@@ -644,6 +1944,21 @@ export interface PaginationRule {
|
|
|
644
1944
|
limit_param?: string;
|
|
645
1945
|
}
|
|
646
1946
|
|
|
1947
|
+
/** Response shape for PaginationRule. */
|
|
1948
|
+
export interface PaginationRuleRead {
|
|
1949
|
+
/** Default: "cursor" */
|
|
1950
|
+
style?: ("cursor" | "cursorFromLastId" | "page" | "offset") | (string & {});
|
|
1951
|
+
/** Response field holding the item array. */
|
|
1952
|
+
items_field: string;
|
|
1953
|
+
cursor_param?: string;
|
|
1954
|
+
next_cursor_field?: string;
|
|
1955
|
+
has_more_field?: string;
|
|
1956
|
+
id_field?: string;
|
|
1957
|
+
page_param?: string;
|
|
1958
|
+
offset_param?: string;
|
|
1959
|
+
limit_param?: string;
|
|
1960
|
+
}
|
|
1961
|
+
|
|
647
1962
|
export interface FileStub {
|
|
648
1963
|
path: string;
|
|
649
1964
|
bytes: number;
|
|
@@ -653,16 +1968,81 @@ export interface Generation {
|
|
|
653
1968
|
id: GenerationId;
|
|
654
1969
|
object: "generation";
|
|
655
1970
|
/**
|
|
656
|
-
* Present and true when the generated
|
|
1971
|
+
* Present and true when the generated target was too large to inline; files_index lists paths,
|
|
1972
|
+
* fetched one at a time via GET /generations/{generation_id}/file.
|
|
1973
|
+
*/
|
|
1974
|
+
files_omitted?: boolean;
|
|
1975
|
+
files_index?: FileStub[];
|
|
1976
|
+
project_id: ProjectId;
|
|
1977
|
+
definition_revision_id: DefinitionRevisionId | null;
|
|
1978
|
+
status: "succeeded" | "failed";
|
|
1979
|
+
trigger: "manual" | "webhook" | "poll" | "preview";
|
|
1980
|
+
/** Persisted Target identity. Null only for stateless generation. */
|
|
1981
|
+
target_id: TargetId | null;
|
|
1982
|
+
/** Resolved generator implementation; provenance rather than resource identity. */
|
|
1983
|
+
generator: GeneratorKind;
|
|
1984
|
+
provenance: {
|
|
1985
|
+
/** Pinned generator contract edition. */
|
|
1986
|
+
generator_edition: string;
|
|
1987
|
+
/** Exact engine build identifier used for replay and support. */
|
|
1988
|
+
engine_build: string;
|
|
1989
|
+
/**
|
|
1990
|
+
* Immutable effective Target configuration used by this run; source credentials are never
|
|
1991
|
+
* included.
|
|
1992
|
+
*/
|
|
1993
|
+
resolved_config: Record<string, unknown> | null;
|
|
1994
|
+
config_hash: string | null;
|
|
1995
|
+
/** Resolved generator and entitlement plan used to select the emitted public surface. */
|
|
1996
|
+
surface_plan: Record<string, unknown> | null;
|
|
1997
|
+
surface_plan_hash: string | null;
|
|
1998
|
+
entitlement_cap: number | null;
|
|
1999
|
+
package_version: string | null;
|
|
2000
|
+
};
|
|
2001
|
+
/** Null only for a failed or legacy generation that produced no metadata. */
|
|
2002
|
+
meta: GenerationMeta | null;
|
|
2003
|
+
warnings: string[];
|
|
2004
|
+
/** Present on retrieve and create; omitted in lists. */
|
|
2005
|
+
files?: GeneratedFile[];
|
|
2006
|
+
error: string | null;
|
|
2007
|
+
/** Format: date-time */
|
|
2008
|
+
created_at: string;
|
|
2009
|
+
request_id?: RequestId;
|
|
2010
|
+
}
|
|
2011
|
+
|
|
2012
|
+
/** Request shape for Generation. */
|
|
2013
|
+
export interface GenerationWrite {
|
|
2014
|
+
id: GenerationId;
|
|
2015
|
+
/**
|
|
2016
|
+
* Present and true when the generated target was too large to inline; files_index lists paths,
|
|
657
2017
|
* fetched one at a time via GET /generations/{generation_id}/file.
|
|
658
2018
|
*/
|
|
659
2019
|
files_omitted?: boolean;
|
|
660
2020
|
files_index?: FileStub[];
|
|
661
2021
|
project_id: ProjectId;
|
|
2022
|
+
definition_revision_id: DefinitionRevisionId | null;
|
|
662
2023
|
status: "succeeded" | "failed";
|
|
663
2024
|
trigger: "manual" | "webhook" | "poll" | "preview";
|
|
664
|
-
/**
|
|
665
|
-
|
|
2025
|
+
/** Persisted Target identity. Null only for stateless generation. */
|
|
2026
|
+
target_id: TargetId | null;
|
|
2027
|
+
/** Resolved generator implementation; provenance rather than resource identity. */
|
|
2028
|
+
generator: GeneratorKind;
|
|
2029
|
+
provenance: {
|
|
2030
|
+
/** Pinned generator contract edition. */
|
|
2031
|
+
generator_edition: string;
|
|
2032
|
+
/** Exact engine build identifier used for replay and support. */
|
|
2033
|
+
engine_build: string;
|
|
2034
|
+
/**
|
|
2035
|
+
* Immutable effective Target configuration used by this run; source credentials are never
|
|
2036
|
+
* included.
|
|
2037
|
+
*/
|
|
2038
|
+
resolved_config: Record<string, unknown> | null;
|
|
2039
|
+
config_hash: string | null;
|
|
2040
|
+
/** Resolved generator and entitlement plan used to select the emitted public surface. */
|
|
2041
|
+
surface_plan: Record<string, unknown> | null;
|
|
2042
|
+
surface_plan_hash: string | null;
|
|
2043
|
+
entitlement_cap: number | null;
|
|
2044
|
+
package_version: string | null;
|
|
2045
|
+
};
|
|
666
2046
|
/** Null only for a failed or legacy generation that produced no metadata. */
|
|
667
2047
|
meta: GenerationMeta | null;
|
|
668
2048
|
warnings: string[];
|
|
@@ -671,17 +2051,94 @@ export interface Generation {
|
|
|
671
2051
|
error: string | null;
|
|
672
2052
|
/** Format: date-time */
|
|
673
2053
|
created_at: string;
|
|
2054
|
+
request_id?: RequestId;
|
|
2055
|
+
}
|
|
2056
|
+
|
|
2057
|
+
/** Response shape for Generation. */
|
|
2058
|
+
export interface GenerationRead {
|
|
2059
|
+
id: GenerationId;
|
|
2060
|
+
object: "generation" | (string & {});
|
|
2061
|
+
/**
|
|
2062
|
+
* Present and true when the generated target was too large to inline; files_index lists paths,
|
|
2063
|
+
* fetched one at a time via GET /generations/{generation_id}/file.
|
|
2064
|
+
*/
|
|
2065
|
+
files_omitted?: boolean;
|
|
2066
|
+
files_index?: FileStub[];
|
|
2067
|
+
project_id: ProjectId;
|
|
2068
|
+
definition_revision_id: DefinitionRevisionId | null;
|
|
2069
|
+
status: ("succeeded" | "failed") | (string & {});
|
|
2070
|
+
trigger: ("manual" | "webhook" | "poll" | "preview") | (string & {});
|
|
2071
|
+
/** Persisted Target identity. Null only for stateless generation. */
|
|
2072
|
+
target_id: TargetId | null;
|
|
2073
|
+
/** Resolved generator implementation; provenance rather than resource identity. */
|
|
2074
|
+
generator: GeneratorKind | (string & {});
|
|
2075
|
+
provenance: {
|
|
2076
|
+
/** Pinned generator contract edition. */
|
|
2077
|
+
generator_edition: string;
|
|
2078
|
+
/** Exact engine build identifier used for replay and support. */
|
|
2079
|
+
engine_build: string;
|
|
2080
|
+
/**
|
|
2081
|
+
* Immutable effective Target configuration used by this run; source credentials are never
|
|
2082
|
+
* included.
|
|
2083
|
+
*/
|
|
2084
|
+
resolved_config: Record<string, unknown> | null;
|
|
2085
|
+
config_hash: string | null;
|
|
2086
|
+
/** Resolved generator and entitlement plan used to select the emitted public surface. */
|
|
2087
|
+
surface_plan: Record<string, unknown> | null;
|
|
2088
|
+
surface_plan_hash: string | null;
|
|
2089
|
+
entitlement_cap: number | null;
|
|
2090
|
+
package_version: string | null;
|
|
2091
|
+
};
|
|
2092
|
+
/** Null only for a failed or legacy generation that produced no metadata. */
|
|
2093
|
+
meta: GenerationMetaRead | null;
|
|
2094
|
+
warnings: string[];
|
|
2095
|
+
/** Present on retrieve and create; omitted in lists. */
|
|
2096
|
+
files?: GeneratedFile[];
|
|
2097
|
+
error: string | null;
|
|
2098
|
+
/** Format: date-time */
|
|
2099
|
+
created_at: string;
|
|
2100
|
+
request_id?: RequestId;
|
|
674
2101
|
}
|
|
675
2102
|
|
|
676
|
-
|
|
2103
|
+
export type GenerationResponse = Generation & ResponseMetadata;
|
|
2104
|
+
|
|
2105
|
+
/** Request shape for GenerationResponse. */
|
|
2106
|
+
export type GenerationResponseWrite = GenerationWrite & ResponseMetadata;
|
|
2107
|
+
|
|
2108
|
+
/** Response shape for GenerationResponse. */
|
|
2109
|
+
export type GenerationResponseRead = GenerationRead & ResponseMetadata;
|
|
2110
|
+
|
|
2111
|
+
/** A selected target that did not generate in a multi-target run. */
|
|
677
2112
|
export interface GenerationFailure {
|
|
678
|
-
|
|
2113
|
+
target_id: TargetId;
|
|
2114
|
+
generator: GeneratorKind;
|
|
679
2115
|
status: "failed";
|
|
680
2116
|
error: string;
|
|
681
2117
|
}
|
|
682
2118
|
|
|
2119
|
+
/** Response shape for GenerationFailure. */
|
|
2120
|
+
export interface GenerationFailureRead {
|
|
2121
|
+
target_id: TargetId;
|
|
2122
|
+
generator: GeneratorKind | (string & {});
|
|
2123
|
+
status: "failed" | (string & {});
|
|
2124
|
+
error: string;
|
|
2125
|
+
}
|
|
2126
|
+
|
|
683
2127
|
export interface GenerationBatch {
|
|
684
2128
|
data: Array<Generation | GenerationFailure>;
|
|
2129
|
+
request_id: RequestId;
|
|
2130
|
+
}
|
|
2131
|
+
|
|
2132
|
+
/** Request shape for GenerationBatch. */
|
|
2133
|
+
export interface GenerationBatchWrite {
|
|
2134
|
+
data: Array<GenerationWrite | GenerationFailure>;
|
|
2135
|
+
request_id: RequestId;
|
|
2136
|
+
}
|
|
2137
|
+
|
|
2138
|
+
/** Response shape for GenerationBatch. */
|
|
2139
|
+
export interface GenerationBatchRead {
|
|
2140
|
+
data: Array<GenerationRead | GenerationFailureRead>;
|
|
2141
|
+
request_id: RequestId;
|
|
685
2142
|
}
|
|
686
2143
|
|
|
687
2144
|
export interface ApiKey {
|
|
@@ -695,19 +2152,58 @@ export interface ApiKey {
|
|
|
695
2152
|
last_used_at: string | null;
|
|
696
2153
|
/** Format: date-time */
|
|
697
2154
|
created_at: string;
|
|
2155
|
+
request_id?: RequestId;
|
|
2156
|
+
}
|
|
2157
|
+
|
|
2158
|
+
/** Response shape for ApiKey. */
|
|
2159
|
+
export interface ApiKeyRead {
|
|
2160
|
+
id: string;
|
|
2161
|
+
object: "api_key" | (string & {});
|
|
2162
|
+
name: string;
|
|
2163
|
+
/** Last four characters of the secret; the secret itself is never stored. */
|
|
2164
|
+
last4: string;
|
|
2165
|
+
revoked: boolean;
|
|
2166
|
+
/** Format: date-time */
|
|
2167
|
+
last_used_at: string | null;
|
|
2168
|
+
/** Format: date-time */
|
|
2169
|
+
created_at: string;
|
|
2170
|
+
request_id?: RequestId;
|
|
698
2171
|
}
|
|
699
2172
|
|
|
700
|
-
export
|
|
2173
|
+
export type ApiKeyResponse = ApiKey & ResponseMetadata;
|
|
2174
|
+
|
|
2175
|
+
/** Response shape for ApiKeyResponse. */
|
|
2176
|
+
export type ApiKeyResponseRead = ApiKeyRead & ResponseMetadata;
|
|
2177
|
+
|
|
2178
|
+
export interface UrlDefinitionRevisionSource {
|
|
701
2179
|
kind: "url";
|
|
702
2180
|
/** Format: uri */
|
|
703
2181
|
url: string;
|
|
704
2182
|
}
|
|
705
2183
|
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
|
|
709
|
-
|
|
710
|
-
|
|
2184
|
+
/** Response shape for UrlDefinitionRevisionSource. */
|
|
2185
|
+
export interface UrlDefinitionRevisionSourceRead {
|
|
2186
|
+
kind: "url" | (string & {});
|
|
2187
|
+
/** Format: uri */
|
|
2188
|
+
url: string;
|
|
2189
|
+
}
|
|
2190
|
+
|
|
2191
|
+
export interface RepositoryDefinitionRevisionSource {
|
|
2192
|
+
kind: "repository";
|
|
2193
|
+
repository: RepositoryReference;
|
|
2194
|
+
/** Repository-relative Definition entrypoint path. */
|
|
2195
|
+
path: string;
|
|
2196
|
+
/** Git ref resolved for this revision, when recorded. */
|
|
2197
|
+
ref?: string | null;
|
|
2198
|
+
/** Exact Git commit consumed, when recorded. */
|
|
2199
|
+
commit_sha?: string | null;
|
|
2200
|
+
}
|
|
2201
|
+
|
|
2202
|
+
/** Response shape for RepositoryDefinitionRevisionSource. */
|
|
2203
|
+
export interface RepositoryDefinitionRevisionSourceRead {
|
|
2204
|
+
kind: "repository" | (string & {});
|
|
2205
|
+
repository: RepositoryReferenceRead;
|
|
2206
|
+
/** Repository-relative Definition entrypoint path. */
|
|
711
2207
|
path: string;
|
|
712
2208
|
/** Git ref resolved for this revision, when recorded. */
|
|
713
2209
|
ref?: string | null;
|
|
@@ -715,29 +2211,97 @@ export interface GithubSpecRevisionSource {
|
|
|
715
2211
|
commit_sha?: string | null;
|
|
716
2212
|
}
|
|
717
2213
|
|
|
718
|
-
export type
|
|
2214
|
+
export type DefinitionRevisionSource = UrlDefinitionRevisionSource | RepositoryDefinitionRevisionSource;
|
|
2215
|
+
|
|
2216
|
+
/** Response shape for DefinitionRevisionSource. */
|
|
2217
|
+
export type DefinitionRevisionSourceRead = UrlDefinitionRevisionSourceRead
|
|
2218
|
+
| RepositoryDefinitionRevisionSourceRead
|
|
2219
|
+
| Record<string, unknown> & { kind?: string };
|
|
2220
|
+
|
|
2221
|
+
export interface DefinitionDocument {
|
|
2222
|
+
id: DefinitionDocumentId;
|
|
2223
|
+
role: "entrypoint" | "reference";
|
|
2224
|
+
/** Repository-relative path or same-origin URL captured in this revision. */
|
|
2225
|
+
coordinate: string;
|
|
2226
|
+
sha256: string;
|
|
2227
|
+
size_bytes: number;
|
|
2228
|
+
}
|
|
2229
|
+
|
|
2230
|
+
/** Response shape for DefinitionDocument. */
|
|
2231
|
+
export interface DefinitionDocumentRead {
|
|
2232
|
+
id: DefinitionDocumentId;
|
|
2233
|
+
role: ("entrypoint" | "reference") | (string & {});
|
|
2234
|
+
/** Repository-relative path or same-origin URL captured in this revision. */
|
|
2235
|
+
coordinate: string;
|
|
2236
|
+
sha256: string;
|
|
2237
|
+
size_bytes: number;
|
|
2238
|
+
}
|
|
2239
|
+
|
|
2240
|
+
export interface DefinitionRevision {
|
|
2241
|
+
id: DefinitionRevisionId;
|
|
2242
|
+
object: "definition_revision";
|
|
2243
|
+
project_id: ProjectId;
|
|
2244
|
+
definition_id: DefinitionId;
|
|
2245
|
+
format: "openapi" | "graphql";
|
|
2246
|
+
document_count: number;
|
|
2247
|
+
/** Present on retrieve; list responses use document_count. */
|
|
2248
|
+
documents?: DefinitionDocument[];
|
|
2249
|
+
/** SHA-256 digest of every document coordinate, digest, and size in the resolved graph. */
|
|
2250
|
+
sha256: string;
|
|
2251
|
+
/** Total bytes across all source documents. */
|
|
2252
|
+
size_bytes: number;
|
|
2253
|
+
/** Origin recorded when this immutable revision was created. */
|
|
2254
|
+
source: DefinitionRevisionSource | null;
|
|
2255
|
+
/** Format: date-time */
|
|
2256
|
+
created_at: string;
|
|
2257
|
+
request_id?: RequestId;
|
|
2258
|
+
}
|
|
719
2259
|
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
2260
|
+
/** Response shape for DefinitionRevision. */
|
|
2261
|
+
export interface DefinitionRevisionRead {
|
|
2262
|
+
id: DefinitionRevisionId;
|
|
2263
|
+
object: "definition_revision" | (string & {});
|
|
723
2264
|
project_id: ProjectId;
|
|
724
|
-
|
|
2265
|
+
definition_id: DefinitionId;
|
|
2266
|
+
format: ("openapi" | "graphql") | (string & {});
|
|
2267
|
+
document_count: number;
|
|
2268
|
+
/** Present on retrieve; list responses use document_count. */
|
|
2269
|
+
documents?: DefinitionDocumentRead[];
|
|
2270
|
+
/** SHA-256 digest of every document coordinate, digest, and size in the resolved graph. */
|
|
725
2271
|
sha256: string;
|
|
726
|
-
/**
|
|
2272
|
+
/** Total bytes across all source documents. */
|
|
727
2273
|
size_bytes: number;
|
|
728
2274
|
/** Origin recorded when this immutable revision was created. */
|
|
729
|
-
source:
|
|
2275
|
+
source: DefinitionRevisionSourceRead | null;
|
|
730
2276
|
/** Format: date-time */
|
|
731
2277
|
created_at: string;
|
|
2278
|
+
request_id?: RequestId;
|
|
732
2279
|
}
|
|
733
2280
|
|
|
2281
|
+
export type DefinitionRevisionResponse = DefinitionRevision & ResponseMetadata;
|
|
2282
|
+
|
|
2283
|
+
/** Response shape for DefinitionRevisionResponse. */
|
|
2284
|
+
export type DefinitionRevisionResponseRead = DefinitionRevisionRead & ResponseMetadata;
|
|
2285
|
+
|
|
734
2286
|
export interface ProjectList {
|
|
735
2287
|
object: ListObject;
|
|
736
|
-
data:
|
|
2288
|
+
data: ProjectSummary[];
|
|
2289
|
+
/** Whether another page is available after this one. */
|
|
2290
|
+
has_more: boolean;
|
|
2291
|
+
/** Pass this value as cursor to retrieve the next page; null on the last page. */
|
|
2292
|
+
next_cursor: string | null;
|
|
2293
|
+
request_id: RequestId;
|
|
2294
|
+
}
|
|
2295
|
+
|
|
2296
|
+
/** Response shape for ProjectList. */
|
|
2297
|
+
export interface ProjectListRead {
|
|
2298
|
+
object: ListObject;
|
|
2299
|
+
data: ProjectSummaryRead[];
|
|
737
2300
|
/** Whether another page is available after this one. */
|
|
738
2301
|
has_more: boolean;
|
|
739
2302
|
/** Pass this value as cursor to retrieve the next page; null on the last page. */
|
|
740
2303
|
next_cursor: string | null;
|
|
2304
|
+
request_id: RequestId;
|
|
741
2305
|
}
|
|
742
2306
|
|
|
743
2307
|
export interface GenerationList {
|
|
@@ -747,15 +2311,50 @@ export interface GenerationList {
|
|
|
747
2311
|
has_more: boolean;
|
|
748
2312
|
/** Pass this value as cursor to retrieve the next page; null on the last page. */
|
|
749
2313
|
next_cursor: string | null;
|
|
2314
|
+
request_id: RequestId;
|
|
2315
|
+
}
|
|
2316
|
+
|
|
2317
|
+
/** Request shape for GenerationList. */
|
|
2318
|
+
export interface GenerationListWrite {
|
|
2319
|
+
object: ListObject;
|
|
2320
|
+
data: GenerationWrite[];
|
|
2321
|
+
/** Whether another page is available after this one. */
|
|
2322
|
+
has_more: boolean;
|
|
2323
|
+
/** Pass this value as cursor to retrieve the next page; null on the last page. */
|
|
2324
|
+
next_cursor: string | null;
|
|
2325
|
+
request_id: RequestId;
|
|
2326
|
+
}
|
|
2327
|
+
|
|
2328
|
+
/** Response shape for GenerationList. */
|
|
2329
|
+
export interface GenerationListRead {
|
|
2330
|
+
object: ListObject;
|
|
2331
|
+
data: GenerationRead[];
|
|
2332
|
+
/** Whether another page is available after this one. */
|
|
2333
|
+
has_more: boolean;
|
|
2334
|
+
/** Pass this value as cursor to retrieve the next page; null on the last page. */
|
|
2335
|
+
next_cursor: string | null;
|
|
2336
|
+
request_id: RequestId;
|
|
2337
|
+
}
|
|
2338
|
+
|
|
2339
|
+
export interface DefinitionRevisionList {
|
|
2340
|
+
object: ListObject;
|
|
2341
|
+
data: DefinitionRevision[];
|
|
2342
|
+
/** Whether another page is available after this one. */
|
|
2343
|
+
has_more: boolean;
|
|
2344
|
+
/** Pass this value as cursor to retrieve the next page; null on the last page. */
|
|
2345
|
+
next_cursor: string | null;
|
|
2346
|
+
request_id: RequestId;
|
|
750
2347
|
}
|
|
751
2348
|
|
|
752
|
-
|
|
2349
|
+
/** Response shape for DefinitionRevisionList. */
|
|
2350
|
+
export interface DefinitionRevisionListRead {
|
|
753
2351
|
object: ListObject;
|
|
754
|
-
data:
|
|
2352
|
+
data: DefinitionRevisionRead[];
|
|
755
2353
|
/** Whether another page is available after this one. */
|
|
756
2354
|
has_more: boolean;
|
|
757
2355
|
/** Pass this value as cursor to retrieve the next page; null on the last page. */
|
|
758
2356
|
next_cursor: string | null;
|
|
2357
|
+
request_id: RequestId;
|
|
759
2358
|
}
|
|
760
2359
|
|
|
761
2360
|
export interface ApiKeyList {
|
|
@@ -765,12 +2364,48 @@ export interface ApiKeyList {
|
|
|
765
2364
|
has_more: boolean;
|
|
766
2365
|
/** Pass this value as cursor to retrieve the next page; null on the last page. */
|
|
767
2366
|
next_cursor: string | null;
|
|
2367
|
+
request_id: RequestId;
|
|
2368
|
+
}
|
|
2369
|
+
|
|
2370
|
+
/** Response shape for ApiKeyList. */
|
|
2371
|
+
export interface ApiKeyListRead {
|
|
2372
|
+
object: ListObject;
|
|
2373
|
+
data: ApiKeyRead[];
|
|
2374
|
+
/** Whether another page is available after this one. */
|
|
2375
|
+
has_more: boolean;
|
|
2376
|
+
/** Pass this value as cursor to retrieve the next page; null on the last page. */
|
|
2377
|
+
next_cursor: string | null;
|
|
2378
|
+
request_id: RequestId;
|
|
768
2379
|
}
|
|
769
2380
|
|
|
770
2381
|
export interface DeletedProject {
|
|
771
2382
|
id: ProjectId;
|
|
772
2383
|
object: "project";
|
|
773
2384
|
deleted: true;
|
|
2385
|
+
request_id: RequestId;
|
|
2386
|
+
}
|
|
2387
|
+
|
|
2388
|
+
/** Response shape for DeletedProject. */
|
|
2389
|
+
export interface DeletedProjectRead {
|
|
2390
|
+
id: ProjectId;
|
|
2391
|
+
object: "project" | (string & {});
|
|
2392
|
+
deleted: true;
|
|
2393
|
+
request_id: RequestId;
|
|
2394
|
+
}
|
|
2395
|
+
|
|
2396
|
+
export interface DeletedTarget {
|
|
2397
|
+
id: TargetId;
|
|
2398
|
+
object: "target";
|
|
2399
|
+
deleted: true;
|
|
2400
|
+
request_id: RequestId;
|
|
2401
|
+
}
|
|
2402
|
+
|
|
2403
|
+
/** Response shape for DeletedTarget. */
|
|
2404
|
+
export interface DeletedTargetRead {
|
|
2405
|
+
id: TargetId;
|
|
2406
|
+
object: "target" | (string & {});
|
|
2407
|
+
deleted: true;
|
|
2408
|
+
request_id: RequestId;
|
|
774
2409
|
}
|
|
775
2410
|
|
|
776
2411
|
/** Stable category for deciding how to handle the error. */
|
|
@@ -791,9 +2426,15 @@ export const ErrorCode = {
|
|
|
791
2426
|
IDEMPOTENCY_KEY_REUSED: "idempotency_key_reused",
|
|
792
2427
|
UNAUTHORIZED: "unauthorized",
|
|
793
2428
|
ORGANIZATION_REQUIRED: "organization_required",
|
|
2429
|
+
INSUFFICIENT_SCOPE: "insufficient_scope",
|
|
2430
|
+
FORBIDDEN: "forbidden",
|
|
794
2431
|
NOT_FOUND: "not_found",
|
|
795
2432
|
SPEC_ERROR: "spec_error",
|
|
796
2433
|
FETCH_ERROR: "fetch_error",
|
|
2434
|
+
REPOSITORY_PROVIDER_UNSUPPORTED: "repository_provider_unsupported",
|
|
2435
|
+
EDITION_UNAVAILABLE: "edition_unavailable",
|
|
2436
|
+
DELIVERY_CONFLICT: "delivery_conflict",
|
|
2437
|
+
RESOURCE_HAS_DEPENDENCIES: "resource_has_dependencies",
|
|
797
2438
|
PLAN_LIMIT_REACHED: "plan_limit_reached",
|
|
798
2439
|
PAYLOAD_TOO_LARGE: "payload_too_large",
|
|
799
2440
|
RATE_LIMITED: "rate_limited",
|
|
@@ -819,7 +2460,32 @@ export interface ErrorDetail {
|
|
|
819
2460
|
docs_url: string;
|
|
820
2461
|
}
|
|
821
2462
|
|
|
2463
|
+
/** Response shape for ErrorDetail. */
|
|
2464
|
+
export interface ErrorDetailRead {
|
|
2465
|
+
type: ErrorType | (string & {});
|
|
2466
|
+
code: ErrorCode | (string & {});
|
|
2467
|
+
/** JSON Pointer to the invalid request field, when one field caused the error. */
|
|
2468
|
+
field?: string;
|
|
2469
|
+
/** Human-readable explanation. Its wording may change. */
|
|
2470
|
+
message: string;
|
|
2471
|
+
/** Whether retrying later can succeed without changing the request. */
|
|
2472
|
+
retryable: boolean;
|
|
2473
|
+
/** Stable, concise recovery instruction suitable for a person or agent. */
|
|
2474
|
+
suggested_action: string;
|
|
2475
|
+
/**
|
|
2476
|
+
* Documentation for this class of error.
|
|
2477
|
+
* Format: uri
|
|
2478
|
+
*/
|
|
2479
|
+
docs_url: string;
|
|
2480
|
+
}
|
|
2481
|
+
|
|
822
2482
|
export interface ErrorModel {
|
|
823
2483
|
errors: ErrorDetail[];
|
|
824
2484
|
request_id: RequestId;
|
|
825
2485
|
}
|
|
2486
|
+
|
|
2487
|
+
/** Response shape for ErrorModel. */
|
|
2488
|
+
export interface ErrorModelRead {
|
|
2489
|
+
errors: ErrorDetailRead[];
|
|
2490
|
+
request_id: RequestId;
|
|
2491
|
+
}
|