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