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