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