@typeship-ax/mcp 0.9.1 → 0.10.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 +1 -1
- package/README.md +1 -1
- package/api.json +1510 -23
- package/api.md +1526 -22
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -3
- package/dist/mcp.js +1 -1
- package/dist/ops.d.ts.map +1 -1
- package/dist/ops.js +12 -8
- package/dist/resources/targets.d.ts +65 -2
- package/dist/resources/targets.d.ts.map +1 -1
- package/dist/resources/targets.js +113 -1
- package/dist/schemas.d.ts.map +1 -1
- package/dist/schemas.js +19 -6
- package/dist/types.d.ts +217 -4
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +13 -0
- package/package.json +1 -1
- package/server.json +2 -2
- package/src/index.ts +3 -3
- package/src/mcp.ts +1 -1
- package/src/ops.ts +12 -8
- package/src/resources/targets.ts +209 -0
- package/src/schemas.ts +19 -6
- package/src/types.ts +236 -4
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { HttpCore, type ApiResult, type RequestOptions } from "../core/http.js";
|
|
2
2
|
import { PagePromise } from "../core/pagination.js";
|
|
3
|
-
import { ResponseParseError, TransportError, UnexpectedApiError, ValidationError, BadRequestError, ConflictError, ForbiddenError, NotFoundError, RateLimitedError, UnauthorizedError, UnprocessableEntityError } from "../errors.js";
|
|
4
|
-
import type { DeletedTargetRead, ProjectId, TargetFields, TargetId, TargetRead, TargetReleaseId, TargetReleaseRead, TargetReleaseResponseRead, TargetResponseRead, TargetUpdateRequest } from "../types.js";
|
|
3
|
+
import { ResponseParseError, TransportError, UnexpectedApiError, ValidationError, BadGatewayError, BadRequestError, ConflictError, ForbiddenError, NotFoundError, RateLimitedError, UnauthorizedError, UnprocessableEntityError } from "../errors.js";
|
|
4
|
+
import type { DeletedTargetRead, ProjectId, TargetAdoption, TargetDraftResponseRead, TargetDraftUpdate, TargetFields, TargetId, TargetRead, TargetReleaseId, TargetReleaseRead, TargetReleaseResponseRead, TargetResponseRead, TargetUpdateRequest } from "../types.js";
|
|
5
5
|
export declare class TargetsResource {
|
|
6
6
|
private readonly _core;
|
|
7
7
|
constructor(_core: HttpCore);
|
|
@@ -47,11 +47,48 @@ export declare class TargetsResource {
|
|
|
47
47
|
* `GET /targets/{target_id}/releases`
|
|
48
48
|
*/
|
|
49
49
|
listReleases(targetId: TargetId, params?: TargetsListReleasesParams, options?: RequestOptions): PagePromise<TargetReleaseRead, TargetsListReleasesError>;
|
|
50
|
+
/**
|
|
51
|
+
* Retrieve a Target's rolling Draft release
|
|
52
|
+
*
|
|
53
|
+
* Returns Current, the cumulative Draft version and readiness, its exact head, and the optimistic
|
|
54
|
+
* release revision.
|
|
55
|
+
* `GET /targets/{target_id}/draft`
|
|
56
|
+
*/
|
|
57
|
+
retrieveDraft(targetId: TargetId, options?: RequestOptions): Promise<ApiResult<TargetDraftResponseRead, TargetsRetrieveDraftError>>;
|
|
58
|
+
/**
|
|
59
|
+
* Select an exact Draft version or return to automatic versioning
|
|
60
|
+
*
|
|
61
|
+
* Validates the selection against the cumulative required bump and regenerates the same rolling
|
|
62
|
+
* Draft pull request.
|
|
63
|
+
* `PATCH /targets/{target_id}/draft`
|
|
64
|
+
*/
|
|
65
|
+
updateDraft(targetId: TargetId, body: TargetDraftUpdate, options?: RequestOptions): Promise<ApiResult<TargetDraftResponseRead, TargetsUpdateDraftError>>;
|
|
66
|
+
/**
|
|
67
|
+
* Adopt a verified existing package as Current
|
|
68
|
+
*
|
|
69
|
+
* Verifies the repository tag, package metadata, and registry artifact; records an Imported
|
|
70
|
+
* Current release; then opens the first Typeship Draft at the next major version because no
|
|
71
|
+
* trusted generated baseline exists yet.
|
|
72
|
+
*
|
|
73
|
+
* A `Idempotency-Key` UUID is generated per call (stable across retries) unless you pass one.
|
|
74
|
+
* `POST /targets/{target_id}/adopt`
|
|
75
|
+
*/
|
|
76
|
+
adoptRelease(targetId: TargetId, body: TargetAdoption, params?: TargetsAdoptReleaseParams, options?: RequestOptions): Promise<ApiResult<TargetReleaseResponseRead, TargetsAdoptReleaseError>>;
|
|
50
77
|
/**
|
|
51
78
|
* Retrieve an immutable Target release
|
|
52
79
|
* `GET /target_releases/{target_release_id}`
|
|
53
80
|
*/
|
|
54
81
|
retrieveRelease(targetReleaseId: TargetReleaseId, options?: RequestOptions): Promise<ApiResult<TargetReleaseResponseRead, TargetsRetrieveReleaseError>>;
|
|
82
|
+
/**
|
|
83
|
+
* Retry publication of an exact Target release
|
|
84
|
+
*
|
|
85
|
+
* Dispatches the repository-owned republish workflow for this immutable version and accepted
|
|
86
|
+
* commit. It never selects the latest Draft or release.
|
|
87
|
+
*
|
|
88
|
+
* A `Idempotency-Key` UUID is generated per call (stable across retries) unless you pass one.
|
|
89
|
+
* `POST /target_releases/{target_release_id}/republish`
|
|
90
|
+
*/
|
|
91
|
+
republishRelease(targetReleaseId: TargetReleaseId, params?: TargetsRepublishReleaseParams, options?: RequestOptions): Promise<ApiResult<TargetReleaseResponseRead, TargetsRepublishReleaseError>>;
|
|
55
92
|
}
|
|
56
93
|
export interface TargetsListParams {
|
|
57
94
|
/** Maximum number of resources to return. */
|
|
@@ -92,6 +129,32 @@ export interface TargetsListReleasesParams {
|
|
|
92
129
|
}
|
|
93
130
|
/** Every error `listReleases` can produce, as a discriminated union. */
|
|
94
131
|
export type TargetsListReleasesError = BadRequestError | UnauthorizedError | ForbiddenError | NotFoundError | RateLimitedError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
|
|
132
|
+
/** Every error `retrieveDraft` can produce, as a discriminated union. */
|
|
133
|
+
export type TargetsRetrieveDraftError = UnauthorizedError | ForbiddenError | NotFoundError | RateLimitedError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
|
|
134
|
+
/** Every error `updateDraft` can produce, as a discriminated union. */
|
|
135
|
+
export type TargetsUpdateDraftError = BadRequestError | UnauthorizedError | ForbiddenError | NotFoundError | ConflictError | UnprocessableEntityError | RateLimitedError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
|
|
136
|
+
export interface TargetsAdoptReleaseParams {
|
|
137
|
+
/**
|
|
138
|
+
* Identifies one logical write for 24 hours. The key is scoped to the authenticated account and
|
|
139
|
+
* operation; account-less generation uses a hashed network identity. Retrying the same method,
|
|
140
|
+
* path, query, and JSON body replays the original response. Reusing the key with changed intent
|
|
141
|
+
* returns 409. After expiry the key starts a new write.
|
|
142
|
+
*/
|
|
143
|
+
idempotencyKey?: string;
|
|
144
|
+
}
|
|
145
|
+
/** Every error `adoptRelease` can produce, as a discriminated union. */
|
|
146
|
+
export type TargetsAdoptReleaseError = BadRequestError | UnauthorizedError | ForbiddenError | NotFoundError | ConflictError | UnprocessableEntityError | RateLimitedError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
|
|
95
147
|
/** Every error `retrieveRelease` can produce, as a discriminated union. */
|
|
96
148
|
export type TargetsRetrieveReleaseError = UnauthorizedError | ForbiddenError | NotFoundError | RateLimitedError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
|
|
149
|
+
export interface TargetsRepublishReleaseParams {
|
|
150
|
+
/**
|
|
151
|
+
* Identifies one logical write for 24 hours. The key is scoped to the authenticated account and
|
|
152
|
+
* operation; account-less generation uses a hashed network identity. Retrying the same method,
|
|
153
|
+
* path, query, and JSON body replays the original response. Reusing the key with changed intent
|
|
154
|
+
* returns 409. After expiry the key starts a new write.
|
|
155
|
+
*/
|
|
156
|
+
idempotencyKey?: string;
|
|
157
|
+
}
|
|
158
|
+
/** Every error `republishRelease` can produce, as a discriminated union. */
|
|
159
|
+
export type TargetsRepublishReleaseError = UnauthorizedError | ForbiddenError | NotFoundError | ConflictError | RateLimitedError | BadGatewayError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
|
|
97
160
|
//# sourceMappingURL=targets.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"targets.d.ts","sourceRoot":"","sources":["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MAAM,wBAAwB,GAChC,eAAe,GACf,iBAAiB,GACjB,cAAc,GACd,aAAa,GACb,aAAa,GACb,wBAAwB,GACxB,gBAAgB,GAChB,kBAAkB,GAClB,kBAAkB,GAClB,cAAc,GACd,eAAe,CAAC;AAEpB,2EAA2E;AAC3E,MAAM,MAAM,2BAA2B,GACnC,iBAAiB,GACjB,cAAc,GACd,aAAa,GACb,gBAAgB,GAChB,kBAAkB,GAClB,kBAAkB,GAClB,cAAc,GACd,eAAe,CAAC;AAEpB,MAAM,WAAW,6BAA6B;IAC5C;;;;;OAKG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,4EAA4E;AAC5E,MAAM,MAAM,4BAA4B,GACpC,iBAAiB,GACjB,cAAc,GACd,aAAa,GACb,aAAa,GACb,gBAAgB,GAChB,eAAe,GACf,kBAAkB,GAClB,kBAAkB,GAClB,cAAc,GACd,eAAe,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// typeship — targets resource.
|
|
2
2
|
// Generated by typeship — https://typeship.dev — do not edit by hand.
|
|
3
3
|
import { paginate } from "../core/pagination.js";
|
|
4
|
-
import { BadRequestError, ConflictError, ForbiddenError, NotFoundError, RateLimitedError, UnauthorizedError, UnprocessableEntityError, } from "../errors.js";
|
|
4
|
+
import { BadGatewayError, BadRequestError, ConflictError, ForbiddenError, NotFoundError, RateLimitedError, UnauthorizedError, UnprocessableEntityError, } from "../errors.js";
|
|
5
5
|
export class TargetsResource {
|
|
6
6
|
_core;
|
|
7
7
|
constructor(_core) {
|
|
@@ -174,6 +174,88 @@ export class TargetsResource {
|
|
|
174
174
|
limitParam: "limit",
|
|
175
175
|
});
|
|
176
176
|
}
|
|
177
|
+
/**
|
|
178
|
+
* Retrieve a Target's rolling Draft release
|
|
179
|
+
*
|
|
180
|
+
* Returns Current, the cumulative Draft version and readiness, its exact head, and the optimistic
|
|
181
|
+
* release revision.
|
|
182
|
+
* `GET /targets/{target_id}/draft`
|
|
183
|
+
*/
|
|
184
|
+
async retrieveDraft(targetId, options) {
|
|
185
|
+
return this._core.request({
|
|
186
|
+
method: "GET",
|
|
187
|
+
path: `/targets/${encodeURIComponent(String(targetId))}/draft`,
|
|
188
|
+
security: [{ "apiKey": [] }],
|
|
189
|
+
errors: {
|
|
190
|
+
"401": UnauthorizedError,
|
|
191
|
+
"403": ForbiddenError,
|
|
192
|
+
"404": NotFoundError,
|
|
193
|
+
"429": RateLimitedError,
|
|
194
|
+
},
|
|
195
|
+
idempotent: true,
|
|
196
|
+
schemaKey: "targets.retrieveDraft",
|
|
197
|
+
options,
|
|
198
|
+
});
|
|
199
|
+
}
|
|
200
|
+
/**
|
|
201
|
+
* Select an exact Draft version or return to automatic versioning
|
|
202
|
+
*
|
|
203
|
+
* Validates the selection against the cumulative required bump and regenerates the same rolling
|
|
204
|
+
* Draft pull request.
|
|
205
|
+
* `PATCH /targets/{target_id}/draft`
|
|
206
|
+
*/
|
|
207
|
+
async updateDraft(targetId, body, options) {
|
|
208
|
+
return this._core.request({
|
|
209
|
+
method: "PATCH",
|
|
210
|
+
path: `/targets/${encodeURIComponent(String(targetId))}/draft`,
|
|
211
|
+
security: [{ "apiKey": [] }],
|
|
212
|
+
body,
|
|
213
|
+
errors: {
|
|
214
|
+
"400": BadRequestError,
|
|
215
|
+
"401": UnauthorizedError,
|
|
216
|
+
"403": ForbiddenError,
|
|
217
|
+
"404": NotFoundError,
|
|
218
|
+
"409": ConflictError,
|
|
219
|
+
"422": UnprocessableEntityError,
|
|
220
|
+
"429": RateLimitedError,
|
|
221
|
+
},
|
|
222
|
+
schemaKey: "targets.updateDraft",
|
|
223
|
+
options,
|
|
224
|
+
});
|
|
225
|
+
}
|
|
226
|
+
/**
|
|
227
|
+
* Adopt a verified existing package as Current
|
|
228
|
+
*
|
|
229
|
+
* Verifies the repository tag, package metadata, and registry artifact; records an Imported
|
|
230
|
+
* Current release; then opens the first Typeship Draft at the next major version because no
|
|
231
|
+
* trusted generated baseline exists yet.
|
|
232
|
+
*
|
|
233
|
+
* A `Idempotency-Key` UUID is generated per call (stable across retries) unless you pass one.
|
|
234
|
+
* `POST /targets/{target_id}/adopt`
|
|
235
|
+
*/
|
|
236
|
+
async adoptRelease(targetId, body, params, options) {
|
|
237
|
+
return this._core.request({
|
|
238
|
+
method: "POST",
|
|
239
|
+
path: `/targets/${encodeURIComponent(String(targetId))}/adopt`,
|
|
240
|
+
security: [{ "apiKey": [] }],
|
|
241
|
+
headers: {
|
|
242
|
+
"Idempotency-Key": params?.idempotencyKey === undefined ? undefined : String(params?.idempotencyKey),
|
|
243
|
+
},
|
|
244
|
+
body,
|
|
245
|
+
errors: {
|
|
246
|
+
"400": BadRequestError,
|
|
247
|
+
"401": UnauthorizedError,
|
|
248
|
+
"403": ForbiddenError,
|
|
249
|
+
"404": NotFoundError,
|
|
250
|
+
"409": ConflictError,
|
|
251
|
+
"422": UnprocessableEntityError,
|
|
252
|
+
"429": RateLimitedError,
|
|
253
|
+
},
|
|
254
|
+
idempotencyKey: "Idempotency-Key",
|
|
255
|
+
schemaKey: "targets.adoptRelease",
|
|
256
|
+
options,
|
|
257
|
+
});
|
|
258
|
+
}
|
|
177
259
|
/**
|
|
178
260
|
* Retrieve an immutable Target release
|
|
179
261
|
* `GET /target_releases/{target_release_id}`
|
|
@@ -194,4 +276,34 @@ export class TargetsResource {
|
|
|
194
276
|
options,
|
|
195
277
|
});
|
|
196
278
|
}
|
|
279
|
+
/**
|
|
280
|
+
* Retry publication of an exact Target release
|
|
281
|
+
*
|
|
282
|
+
* Dispatches the repository-owned republish workflow for this immutable version and accepted
|
|
283
|
+
* commit. It never selects the latest Draft or release.
|
|
284
|
+
*
|
|
285
|
+
* A `Idempotency-Key` UUID is generated per call (stable across retries) unless you pass one.
|
|
286
|
+
* `POST /target_releases/{target_release_id}/republish`
|
|
287
|
+
*/
|
|
288
|
+
async republishRelease(targetReleaseId, params, options) {
|
|
289
|
+
return this._core.request({
|
|
290
|
+
method: "POST",
|
|
291
|
+
path: `/target_releases/${encodeURIComponent(String(targetReleaseId))}/republish`,
|
|
292
|
+
security: [{ "apiKey": [] }],
|
|
293
|
+
headers: {
|
|
294
|
+
"Idempotency-Key": params?.idempotencyKey === undefined ? undefined : String(params?.idempotencyKey),
|
|
295
|
+
},
|
|
296
|
+
errors: {
|
|
297
|
+
"401": UnauthorizedError,
|
|
298
|
+
"403": ForbiddenError,
|
|
299
|
+
"404": NotFoundError,
|
|
300
|
+
"409": ConflictError,
|
|
301
|
+
"429": RateLimitedError,
|
|
302
|
+
"502": BadGatewayError,
|
|
303
|
+
},
|
|
304
|
+
idempotencyKey: "Idempotency-Key",
|
|
305
|
+
schemaKey: "targets.republishRelease",
|
|
306
|
+
options,
|
|
307
|
+
});
|
|
308
|
+
}
|
|
197
309
|
}
|
package/dist/schemas.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../src/schemas.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE;IAAE,GAAG,CAAC,EAAE,OAAO,CAAC;IAAC,GAAG,CAAC,EAAE,OAAO,CAAA;CAAE,
|
|
1
|
+
{"version":3,"file":"schemas.d.ts","sourceRoot":"","sources":["../src/schemas.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE;IAAE,GAAG,CAAC,EAAE,OAAO,CAAC;IAAC,GAAG,CAAC,EAAE,OAAO,CAAA;CAAE,CAmCpE,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAmIxC,CAAC"}
|
package/dist/schemas.js
CHANGED
|
@@ -25,7 +25,11 @@ export const SCHEMAS = {
|
|
|
25
25
|
"targets.delete": { "res": { "$ref": "res:DeletedTarget" } },
|
|
26
26
|
"targets.update": { "req": { "$ref": "req:TargetUpdateRequest" }, "res": { "$ref": "res:TargetResponse" } },
|
|
27
27
|
"targets.listReleases": { "res": { "$ref": "res:TargetReleaseList" } },
|
|
28
|
+
"targets.retrieveDraft": { "res": { "$ref": "res:TargetDraftResponse" } },
|
|
29
|
+
"targets.updateDraft": { "req": { "$ref": "req:TargetDraftUpdate" }, "res": { "$ref": "res:TargetDraftResponse" } },
|
|
30
|
+
"targets.adoptRelease": { "req": { "$ref": "req:TargetAdoption" }, "res": { "$ref": "res:TargetReleaseResponse" } },
|
|
28
31
|
"targets.retrieveRelease": { "res": { "$ref": "res:TargetReleaseResponse" } },
|
|
32
|
+
"targets.republishRelease": { "res": { "$ref": "res:TargetReleaseResponse" } },
|
|
29
33
|
"generations.retrieve": { "res": { "$ref": "res:GenerationResponse" } },
|
|
30
34
|
"generations.retrieveFile": { "res": { "type": "string" } },
|
|
31
35
|
"definitionRevisions.list": { "res": { "$ref": "res:DefinitionRevisionList" } },
|
|
@@ -77,7 +81,7 @@ export const DEFS = {
|
|
|
77
81
|
"req:TargetConfig": { "type": "object", "additionalProperties": false, "properties": { "globals": { "type": "array", "maxItems": 20, "items": { "type": "string" } }, "retries": { "$ref": "req:RetryTuning" }, "pagination": { "type": "object" }, "auth": { "$ref": "req:TargetAuthenticationConfig" }, "cli": { "$ref": "req:CliBehavior" }, "mcp": { "$ref": "req:McpBehavior" }, "readme": { "$ref": "req:ReadmeBehavior" }, "package": { "$ref": "req:PackageBehavior" }, "docs_url": { "type": ["string", "null"] }, "docs_index_url": { "type": ["string", "null"] } } },
|
|
78
82
|
"req:TargetAuthenticationConfig": { "type": "object", "additionalProperties": false, "properties": { "oauth_application": { "type": ["string", "null"], "maxLength": 64, "pattern": "^[a-z][a-z0-9_-]{0,63}$" }, "environments": { "type": ["object", "null"] } } },
|
|
79
83
|
"req:DeliveryInput": { "anyOf": [{ "$ref": "req:RepositoryDeliveryInput" }, { "$ref": "req:HostedMcpDeliveryInput" }] },
|
|
80
|
-
"req:RepositoryDeliveryInput": { "type": "object", "additionalProperties": false, "properties": { "kind": { "type": "string", "const": "repository" }, "repository": { "$ref": "req:RepositoryReference" }, "directory": { "type": ["string", "null"] }, "package_name": { "type": ["string", "null"] }, "module_path": { "type": ["string", "null"] } }, "required": ["kind", "repository"] },
|
|
84
|
+
"req:RepositoryDeliveryInput": { "type": "object", "additionalProperties": false, "properties": { "kind": { "type": "string", "const": "repository" }, "repository": { "$ref": "req:RepositoryReference" }, "directory": { "type": ["string", "null"] }, "package_name": { "type": ["string", "null"] }, "module_path": { "type": ["string", "null"] }, "publish_on_merge": { "type": "boolean" } }, "required": ["kind", "repository"] },
|
|
81
85
|
"req:HostedMcpDeliveryInput": { "type": "object", "additionalProperties": false, "properties": { "kind": { "type": "string", "const": "hosted_mcp" } }, "required": ["kind"] },
|
|
82
86
|
"req:ProjectConfig": { "type": "object", "additionalProperties": false, "properties": { "globals": { "type": "array", "maxItems": 20, "items": { "type": "string" } }, "retries": { "$ref": "req:RetryTuning" }, "pagination": { "type": "object" }, "auth": { "$ref": "req:AuthenticationConfig" }, "cli": { "$ref": "req:CliBehavior" }, "mcp": { "$ref": "req:McpBehavior" }, "readme": { "$ref": "req:ReadmeBehavior" }, "package": { "$ref": "req:PackageBehavior" }, "docs_url": { "type": ["string", "null"] }, "docs_index_url": { "type": ["string", "null"] } } },
|
|
83
87
|
"res:Project": { "type": "object", "additionalProperties": false, "properties": { "id": { "$ref": "res:ProjectId" }, "object": { "type": "string" }, "name": { "type": "string", "maxLength": 80 }, "definition_id": { "$ref": "res:DefinitionId" }, "auto_generate": { "type": "boolean" }, "relay_enabled": { "type": "boolean" }, "config": { "anyOf": [{ "$ref": "res:ProjectConfig" }, { "type": "null" }] }, "created_at": { "type": "string" }, "updated_at": { "type": "string" }, "request_id": { "$ref": "res:RequestId" } }, "required": ["id", "object", "name", "definition_id", "auto_generate", "relay_enabled", "config", "created_at", "updated_at", "request_id"] },
|
|
@@ -92,9 +96,9 @@ export const DEFS = {
|
|
|
92
96
|
"res:PackageBehavior": { "type": "object", "additionalProperties": false, "properties": { "homepage": { "type": ["string", "null"] }, "license": { "type": ["string", "null"], "maxLength": 200 }, "license_text": { "type": ["string", "null"], "maxLength": 100000 }, "copyright": { "type": ["string", "null"], "maxLength": 200 }, "go_package_name": { "type": ["string", "null"] } } },
|
|
93
97
|
"res:DeletedProject": { "type": "object", "additionalProperties": false, "properties": { "id": { "$ref": "res:ProjectId" }, "object": { "type": "string" }, "deleted": { "type": "boolean" }, "request_id": { "$ref": "res:RequestId" } }, "required": ["id", "object", "deleted", "request_id"] },
|
|
94
98
|
"req:UpdateProjectRequest": { "type": "object", "additionalProperties": false, "properties": { "name": { "type": "string", "minLength": 1, "maxLength": 80 }, "auto_generate": { "type": "boolean" }, "relay_enabled": { "type": "boolean" }, "config": { "anyOf": [{ "$ref": "req:ProjectConfig" }, { "type": "null" }] } } },
|
|
95
|
-
"res:DiagnosticReport": { "type": "object", "additionalProperties": false, "properties": { "object": { "type": "string" }, "format": { "type": "string" }, "project_id": { "$ref": "res:ProjectId" }, "definition_revision_id": { "$ref": "res:DefinitionRevisionId" }, "source_sha256": { "type": "string", "pattern": "^[a-f0-9]{64}$" }, "analyzed_sha256": { "type": "string", "pattern": "^[a-f0-9]{64}$" }, "patch_diagnostics": { "type": "array", "items": { "type": "string" } }, "summary": { "$ref": "res:DiagnosticSummary" }, "diagnostics": { "type": "array", "items": { "$ref": "res:Diagnostic" } }, "policy": { "$ref": "res:DiagnosticPolicy" }, "evaluation": { "$ref": "res:DiagnosticEvaluation" }, "delta": { "$ref": "res:DiagnosticDelta" }, "request_id": { "$ref": "res:RequestId" } }, "required": ["object", "format", "project_id", "definition_revision_id", "source_sha256", "analyzed_sha256", "patch_diagnostics", "summary", "diagnostics", "policy", "evaluation", "delta", "request_id"] },
|
|
99
|
+
"res:DiagnosticReport": { "type": "object", "additionalProperties": false, "properties": { "object": { "type": "string" }, "format": { "type": "string" }, "project_id": { "$ref": "res:ProjectId" }, "definition_revision_id": { "$ref": "res:DefinitionRevisionId" }, "source_sha256": { "type": "string", "pattern": "^[a-f0-9]{64}$" }, "analyzed_sha256": { "type": "string", "pattern": "^[a-f0-9]{64}$" }, "patch_diagnostics": { "type": "array", "items": { "type": "string" } }, "summary": { "$ref": "res:DiagnosticSummary" }, "diagnostics": { "type": "array", "items": { "$ref": "res:Diagnostic" } }, "policy": { "$ref": "res:DiagnosticPolicy" }, "evaluation": { "$ref": "res:DiagnosticEvaluation" }, "quality_signals": { "$ref": "res:DiagnosticQualitySignals" }, "delta": { "$ref": "res:DiagnosticDelta" }, "request_id": { "$ref": "res:RequestId" } }, "required": ["object", "format", "project_id", "definition_revision_id", "source_sha256", "analyzed_sha256", "patch_diagnostics", "summary", "diagnostics", "policy", "evaluation", "quality_signals", "delta", "request_id"] },
|
|
96
100
|
"res:DefinitionRevisionId": { "type": "string", "pattern": "^drev_[a-z0-9]{16}$" },
|
|
97
|
-
"res:Diagnostic": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string" }, "severity": { "type": "string" }, "category": { "type": "string" }, "title": { "type": "string" }, "description": { "type": "string" }, "impact": { "type": "string" }, "surfaces": { "type": "array", "items": { "type": "string" } }, "locations": { "type": "array", "minItems": 1, "items": { "$ref": "res:DiagnosticLocation" } }, "fix": { "$ref": "res:DiagnosticFix" }, "authoring_brief": { "type": "string" } }, "required": ["id", "severity", "category", "title", "description", "impact", "surfaces", "locations", "authoring_brief"] },
|
|
101
|
+
"res:Diagnostic": { "type": "object", "additionalProperties": false, "properties": { "id": { "type": "string" }, "severity": { "type": "string" }, "category": { "type": "string" }, "title": { "type": "string" }, "description": { "type": "string" }, "impact": { "type": "string" }, "surfaces": { "type": "array", "items": { "type": "string" } }, "evidence_basis": { "type": "string" }, "owner_decision_required": { "type": "boolean" }, "surface_impact": { "type": "string" }, "locations": { "type": "array", "minItems": 1, "items": { "$ref": "res:DiagnosticLocation" } }, "fix": { "$ref": "res:DiagnosticFix" }, "authoring_brief": { "type": "string" } }, "required": ["id", "severity", "category", "title", "description", "impact", "surfaces", "evidence_basis", "owner_decision_required", "locations", "authoring_brief"] },
|
|
98
102
|
"res:DiagnosticLocation": { "type": "object", "additionalProperties": false, "properties": { "document": { "type": "string" }, "path": { "type": "string" }, "operation": { "type": "string" }, "evidence": { "type": "string" } }, "required": ["path"] },
|
|
99
103
|
"res:DiagnosticFix": { "type": "object", "additionalProperties": false, "properties": { "title": { "type": "string" }, "kind": { "type": "string" }, "patches": { "type": "array", "items": { "$ref": "res:DefinitionPatch" } }, "instructions": { "type": "string" } }, "required": ["title", "kind"] },
|
|
100
104
|
"res:DefinitionPatch": { "type": "object", "additionalProperties": false, "properties": { "op": { "type": "string" }, "path": { "type": "string" }, "value": {}, "to": { "type": ["string", "null"] }, "reason": { "type": ["string", "null"] } }, "required": ["op", "path"] },
|
|
@@ -102,6 +106,8 @@ export const DEFS = {
|
|
|
102
106
|
"res:DiagnosticSuppression": { "type": "object", "additionalProperties": false, "properties": { "rule_id": { "type": "string", "maxLength": 160 }, "path": { "type": "string", "maxLength": 4096 }, "reason": { "type": "string", "minLength": 1, "maxLength": 500 } }, "required": ["rule_id", "reason"] },
|
|
103
107
|
"res:DiagnosticEvaluation": { "type": "object", "additionalProperties": false, "properties": { "state": { "type": "string" }, "blocking": { "type": "array", "items": { "$ref": "res:DiagnosticReference" } }, "considered_occurrences": { "type": "integer", "minimum": 0 }, "suppressed_occurrences": { "type": "integer", "minimum": 0 } }, "required": ["state", "blocking", "considered_occurrences", "suppressed_occurrences"] },
|
|
104
108
|
"res:DiagnosticReference": { "type": "object", "additionalProperties": false, "properties": { "rule_id": { "type": "string" }, "severity": { "type": "string" }, "title": { "type": "string" }, "locations": { "type": "array", "minItems": 1, "items": { "$ref": "res:DiagnosticLocation" } } }, "required": ["rule_id", "severity", "title", "locations"] },
|
|
109
|
+
"res:DiagnosticQualitySignals": { "type": "object", "additionalProperties": false, "properties": { "suppressed_by_rule": { "type": "array", "items": { "$ref": "res:DiagnosticSuppressionSignal" } }, "stale_suppressions": { "type": "array", "items": { "$ref": "res:DiagnosticSuppression" } } }, "required": ["suppressed_by_rule", "stale_suppressions"] },
|
|
110
|
+
"res:DiagnosticSuppressionSignal": { "type": "object", "additionalProperties": false, "properties": { "rule_id": { "type": "string" }, "active_occurrences": { "type": "integer", "minimum": 0 }, "suppressed_occurrences": { "type": "integer", "minimum": 1 } }, "required": ["rule_id", "active_occurrences", "suppressed_occurrences"] },
|
|
105
111
|
"res:DiagnosticDelta": { "type": "object", "additionalProperties": false, "properties": { "added": { "type": "array", "items": { "$ref": "res:DiagnosticReference" } }, "resolved": { "type": "array", "items": { "$ref": "res:DiagnosticReference" } }, "baseline_definition_revision_id": { "anyOf": [{ "$ref": "res:DefinitionRevisionId" }, { "type": "null" }] } }, "required": ["added", "resolved", "baseline_definition_revision_id"] },
|
|
106
112
|
"req:DiagnosticRemediationRequest": { "type": "object", "additionalProperties": false, "properties": { "diagnostic_ids": { "type": "array", "minItems": 1, "maxItems": 50, "items": { "type": "string" } } }, "required": ["diagnostic_ids"] },
|
|
107
113
|
"res:DiagnosticRemediation": { "type": "object", "additionalProperties": false, "properties": { "object": { "type": "string" }, "kind": { "type": "string" }, "patches_applied": { "type": "integer", "minimum": 0 }, "review_url": { "type": ["string", "null"] }, "request_id": { "$ref": "res:RequestId" } }, "required": ["object", "kind", "patches_applied", "request_id"] },
|
|
@@ -126,11 +132,11 @@ export const DEFS = {
|
|
|
126
132
|
"res:GraphqlSettings": { "type": "object", "additionalProperties": false, "properties": { "endpoint": { "type": "string" }, "environments": { "type": "array", "maxItems": 10, "items": { "type": "object", "additionalProperties": false, "properties": { "name": { "type": "string" }, "url": { "type": "string" } }, "required": ["name", "url"] } }, "auth": { "type": "string" }, "api_key_header": { "type": "string" }, "title": { "type": "string", "maxLength": 80 }, "scalars": { "type": "object" } } },
|
|
127
133
|
"req:DefinitionUpdateRequest": { "type": "object", "additionalProperties": false, "properties": { "source": { "$ref": "req:DefinitionSourceInput" }, "patches": { "type": "array", "maxItems": 50, "items": { "$ref": "req:DefinitionPatch" } }, "graphql": { "anyOf": [{ "$ref": "req:GraphqlSettings" }, { "type": "null" }] }, "diagnostic_policy": { "$ref": "req:DiagnosticPolicy" } } },
|
|
128
134
|
"res:TargetList": { "type": "object", "additionalProperties": false, "properties": { "object": { "$ref": "res:ListObject" }, "data": { "type": "array", "items": { "$ref": "res:Target" } }, "has_more": { "type": "boolean" }, "next_cursor": { "type": ["string", "null"] }, "request_id": { "$ref": "res:RequestId" } }, "required": ["object", "data", "has_more", "next_cursor", "request_id"] },
|
|
129
|
-
"res:Target": { "type": "object", "additionalProperties": false, "properties": { "id": { "$ref": "res:TargetId" }, "object": { "type": "string" }, "project_id": { "$ref": "res:ProjectId" }, "definition_id": { "$ref": "res:DefinitionId" }, "name": { "type": "string" }, "generator": { "$ref": "res:GeneratorKind" }, "state": { "type": "string" }, "edition": { "type": "string" }, "release_channel": { "type": "string" }, "version_policy": { "type": "object", "additionalProperties": false, "properties": { "mode": { "type": "string" }, "pre1_breaking": { "type": "string" } }, "required": ["mode", "pre1_breaking"] }, "current_version": { "type": "string" }, "proposed_version": { "type": ["string", "null"] }, "config": { "anyOf": [{ "$ref": "res:TargetConfig" }, { "type": "null" }] }, "deliveries": { "type": "array", "maxItems": 2, "items": { "$ref": "res:Delivery" } }, "created_at": { "type": "string" }, "updated_at": { "type": "string" }, "request_id": { "$ref": "res:RequestId" } }, "required": ["id", "object", "project_id", "definition_id", "name", "generator", "state", "edition", "release_channel", "version_policy", "current_version", "proposed_version", "config", "deliveries", "created_at", "updated_at"] },
|
|
135
|
+
"res:Target": { "type": "object", "additionalProperties": false, "properties": { "id": { "$ref": "res:TargetId" }, "object": { "type": "string" }, "project_id": { "$ref": "res:ProjectId" }, "definition_id": { "$ref": "res:DefinitionId" }, "name": { "type": "string" }, "generator": { "$ref": "res:GeneratorKind" }, "state": { "type": "string" }, "edition": { "type": "string" }, "release_channel": { "type": "string" }, "version_policy": { "type": "object", "additionalProperties": false, "properties": { "mode": { "type": "string" }, "pre1_breaking": { "type": "string" } }, "required": ["mode", "pre1_breaking"] }, "current_version": { "type": ["string", "null"] }, "proposed_version": { "type": ["string", "null"] }, "proposed_version_source": { "type": ["string", "null"] }, "proposed_version_actor": { "type": ["string", "null"] }, "release_revision": { "type": "integer", "minimum": 0 }, "config": { "anyOf": [{ "$ref": "res:TargetConfig" }, { "type": "null" }] }, "deliveries": { "type": "array", "maxItems": 2, "items": { "$ref": "res:Delivery" } }, "created_at": { "type": "string" }, "updated_at": { "type": "string" }, "request_id": { "$ref": "res:RequestId" } }, "required": ["id", "object", "project_id", "definition_id", "name", "generator", "state", "edition", "release_channel", "version_policy", "current_version", "proposed_version", "proposed_version_source", "proposed_version_actor", "release_revision", "config", "deliveries", "created_at", "updated_at"] },
|
|
130
136
|
"res:TargetConfig": { "type": "object", "additionalProperties": false, "properties": { "globals": { "type": "array", "maxItems": 20, "items": { "type": "string" } }, "retries": { "$ref": "res:RetryTuning" }, "pagination": { "type": "object" }, "auth": { "$ref": "res:TargetAuthenticationConfig" }, "cli": { "$ref": "res:CliBehavior" }, "mcp": { "$ref": "res:McpBehavior" }, "readme": { "$ref": "res:ReadmeBehavior" }, "package": { "$ref": "res:PackageBehavior" }, "docs_url": { "type": ["string", "null"] }, "docs_index_url": { "type": ["string", "null"] } } },
|
|
131
137
|
"res:TargetAuthenticationConfig": { "type": "object", "additionalProperties": false, "properties": { "oauth_application": { "type": ["string", "null"], "maxLength": 64, "pattern": "^[a-z][a-z0-9_-]{0,63}$" }, "environments": { "type": ["object", "null"] } } },
|
|
132
138
|
"res:Delivery": { "anyOf": [{ "$ref": "res:RepositoryDelivery" }, { "$ref": "res:HostedMcpDelivery" }, { "type": "object" }] },
|
|
133
|
-
"res:RepositoryDelivery": { "type": "object", "additionalProperties": false, "properties": { "id": { "$ref": "res:DeliveryId" }, "object": { "type": "string" }, "target_id": { "$ref": "res:TargetId" }, "kind": { "type": "string" }, "state": { "type": "string" }, "repository": { "$ref": "res:RepositoryReference" }, "directory": { "type": ["string", "null"] }, "package_name": { "type": ["string", "null"] }, "module_path": { "type": ["string", "null"] }, "created_at": { "type": "string" }, "updated_at": { "type": "string" } }, "required": ["id", "object", "target_id", "kind", "state", "repository", "directory", "package_name", "module_path", "created_at", "updated_at"] },
|
|
139
|
+
"res:RepositoryDelivery": { "type": "object", "additionalProperties": false, "properties": { "id": { "$ref": "res:DeliveryId" }, "object": { "type": "string" }, "target_id": { "$ref": "res:TargetId" }, "kind": { "type": "string" }, "state": { "type": "string" }, "repository": { "$ref": "res:RepositoryReference" }, "directory": { "type": ["string", "null"] }, "package_name": { "type": ["string", "null"] }, "module_path": { "type": ["string", "null"] }, "publish_on_merge": { "type": "boolean" }, "created_at": { "type": "string" }, "updated_at": { "type": "string" } }, "required": ["id", "object", "target_id", "kind", "state", "repository", "directory", "package_name", "module_path", "publish_on_merge", "created_at", "updated_at"] },
|
|
134
140
|
"res:DeliveryId": { "type": "string", "pattern": "^dlv_[a-z0-9]{16}$" },
|
|
135
141
|
"res:HostedMcpDelivery": { "type": "object", "additionalProperties": false, "properties": { "id": { "$ref": "res:DeliveryId" }, "object": { "type": "string" }, "target_id": { "$ref": "res:TargetId" }, "kind": { "type": "string" }, "state": { "type": "string" }, "url": { "type": ["string", "null"] }, "created_at": { "type": "string" }, "updated_at": { "type": "string" } }, "required": ["id", "object", "target_id", "kind", "state", "url", "created_at", "updated_at"] },
|
|
136
142
|
"req:TargetFields": { "type": "object", "additionalProperties": false, "properties": { "name": { "type": "string", "minLength": 1, "maxLength": 80 }, "definition_id": { "$ref": "req:DefinitionId" }, "generator": { "$ref": "req:GeneratorKind" }, "state": { "type": "string", "enum": ["active", "disabled"] }, "edition": { "type": "string" }, "release_channel": { "type": "string", "enum": ["stable", "prerelease"] }, "proposed_version": { "type": ["string", "null"] }, "config": { "anyOf": [{ "$ref": "req:TargetConfig" }, { "type": "null" }] }, "deliveries": { "type": "array", "maxItems": 2, "items": { "$ref": "req:DeliveryInput" } } }, "required": ["name", "definition_id", "generator"] },
|
|
@@ -140,8 +146,15 @@ export const DEFS = {
|
|
|
140
146
|
"res:DeletedTarget": { "type": "object", "additionalProperties": false, "properties": { "id": { "$ref": "res:TargetId" }, "object": { "type": "string" }, "deleted": { "type": "boolean" }, "request_id": { "$ref": "res:RequestId" } }, "required": ["id", "object", "deleted", "request_id"] },
|
|
141
147
|
"req:TargetUpdateRequest": { "type": "object", "additionalProperties": false, "properties": { "name": { "type": "string", "minLength": 1, "maxLength": 80 }, "state": { "type": "string", "enum": ["active", "disabled"] }, "edition": { "type": "string" }, "release_channel": { "type": "string", "enum": ["stable", "prerelease"] }, "proposed_version": { "type": ["string", "null"] }, "config": { "anyOf": [{ "$ref": "req:TargetConfig" }, { "type": "null" }] }, "deliveries": { "type": "array", "maxItems": 2, "items": { "$ref": "req:DeliveryInput" } } } },
|
|
142
148
|
"res:TargetReleaseList": { "type": "object", "additionalProperties": false, "properties": { "object": { "$ref": "res:ListObject" }, "data": { "type": "array", "items": { "$ref": "res:TargetRelease" } }, "has_more": { "type": "boolean" }, "next_cursor": { "type": ["string", "null"] }, "request_id": { "$ref": "res:RequestId" } }, "required": ["object", "data", "has_more", "next_cursor", "request_id"] },
|
|
143
|
-
"res:TargetRelease": { "type": "object", "additionalProperties": false, "properties": { "id": { "$ref": "res:TargetReleaseId" }, "object": { "type": "string" }, "target_id": { "$ref": "res:TargetId" }, "generation_id": { "$ref": "res:GenerationId" }, "version": { "type": "string" }, "channel": { "type": "string" }, "provider": { "type": "string" }, "repository": { "anyOf": [{ "$ref": "res:RepositoryReference" }, { "type": "null" }] }, "definition_revision_id": { "anyOf": [{ "$ref": "res:DefinitionRevisionId" }, { "type": "null" }] }, "delivery_revision": { "type": "string" }, "created_at": { "type": "string" }, "request_id": { "$ref": "res:RequestId" } }, "required": ["id", "object", "target_id", "generation_id", "version", "channel", "provider", "repository", "definition_revision_id", "delivery_revision", "created_at"] },
|
|
149
|
+
"res:TargetRelease": { "type": "object", "additionalProperties": false, "properties": { "id": { "$ref": "res:TargetReleaseId" }, "object": { "type": "string" }, "target_id": { "$ref": "res:TargetId" }, "generation_id": { "anyOf": [{ "$ref": "res:GenerationId" }, { "type": "null" }] }, "origin": { "type": "string" }, "version": { "type": "string" }, "channel": { "type": "string" }, "provider": { "type": "string" }, "repository": { "anyOf": [{ "$ref": "res:RepositoryReference" }, { "type": "null" }] }, "definition_revision_id": { "anyOf": [{ "$ref": "res:DefinitionRevisionId" }, { "type": "null" }] }, "delivery_revision": { "type": "string" }, "import_provenance": { "type": ["object", "null"], "additionalProperties": false, "properties": { "tag": { "type": ["string", "null"] }, "registry_url": { "type": ["string", "null"] }, "artifact_digest": { "type": ["string", "null"] }, "imported_at": { "type": ["string", "null"] } }, "required": ["tag", "registry_url", "artifact_digest", "imported_at"] }, "publications": { "type": "array", "items": { "$ref": "res:Publication" } }, "created_at": { "type": "string" }, "request_id": { "$ref": "res:RequestId" } }, "required": ["id", "object", "target_id", "generation_id", "version", "channel", "origin", "provider", "repository", "definition_revision_id", "delivery_revision", "import_provenance", "publications", "created_at"] },
|
|
144
150
|
"res:TargetReleaseId": { "type": "string", "pattern": "^rel_[a-z0-9]{16}$" },
|
|
151
|
+
"res:Publication": { "type": "object", "additionalProperties": false, "properties": { "id": { "$ref": "res:PublicationId" }, "object": { "type": "string" }, "target_release_id": { "$ref": "res:TargetReleaseId" }, "destination": { "type": "string" }, "state": { "type": "string" }, "attempt": { "type": "integer", "minimum": 0 }, "run_url": { "type": ["string", "null"] }, "registry_url": { "type": ["string", "null"] }, "artifact_digest": { "type": ["string", "null"] }, "error": { "type": ["string", "null"] }, "started_at": { "type": ["string", "null"] }, "finished_at": { "type": ["string", "null"] }, "updated_at": { "type": "string" } }, "required": ["id", "object", "target_release_id", "destination", "state", "attempt", "run_url", "registry_url", "artifact_digest", "error", "started_at", "finished_at", "updated_at"] },
|
|
152
|
+
"res:PublicationId": { "type": "string", "pattern": "^pub_[a-z0-9]{16}$" },
|
|
153
|
+
"res:TargetDraftResponse": { "allOf": [{ "$ref": "res:TargetDraft" }, { "$ref": "res:ResponseMetadata" }] },
|
|
154
|
+
"res:TargetDraft": { "type": "object", "additionalProperties": false, "properties": { "object": { "type": "string" }, "target_id": { "$ref": "res:TargetId" }, "revision": { "type": "integer", "minimum": 0 }, "current_version": { "type": ["string", "null"] }, "version": { "type": ["string", "null"] }, "selection": { "$ref": "res:TargetDraftSelection" }, "readiness": { "type": ["object", "null"] }, "changes": { "type": ["object", "null"], "additionalProperties": false, "properties": { "changelog": { "type": ["string", "null"] }, "breaking_count": { "type": ["integer", "null"], "minimum": 0 }, "previous_version": { "type": ["string", "null"] } } }, "head_revision": { "type": ["string", "null"] }, "pull_request_url": { "type": ["string", "null"] }, "request_id": { "$ref": "res:RequestId" } }, "required": ["object", "target_id", "revision", "current_version", "version", "selection", "readiness", "changes", "head_revision", "pull_request_url"] },
|
|
155
|
+
"res:TargetDraftSelection": { "anyOf": [{ "type": "object", "additionalProperties": false, "properties": { "mode": { "type": "string" } }, "required": ["mode"] }, { "type": "object", "additionalProperties": false, "properties": { "mode": { "type": "string" }, "version": { "type": "string" }, "source": { "type": ["string", "null"] }, "actor": { "type": ["string", "null"] } }, "required": ["mode", "version", "source", "actor"] }] },
|
|
156
|
+
"req:TargetDraftUpdate": { "type": "object", "additionalProperties": false, "properties": { "version": { "type": ["string", "null"] }, "expected_revision": { "type": "integer", "minimum": 0 } }, "required": ["version"] },
|
|
157
|
+
"req:TargetAdoption": { "type": "object", "additionalProperties": false, "properties": { "version": { "type": "string" }, "tag": { "type": "string", "minLength": 1, "maxLength": 255 } }, "required": ["version", "tag"] },
|
|
145
158
|
"res:TargetReleaseResponse": { "allOf": [{ "$ref": "res:TargetRelease" }, { "$ref": "res:ResponseMetadata" }] },
|
|
146
159
|
"res:GenerationResponse": { "allOf": [{ "$ref": "res:Generation" }, { "$ref": "res:ResponseMetadata" }] },
|
|
147
160
|
"res:Generation": { "type": "object", "additionalProperties": false, "properties": { "id": { "$ref": "res:GenerationId" }, "object": { "type": "string" }, "files_omitted": { "type": "boolean" }, "files_index": { "type": "array", "items": { "$ref": "res:FileStub" } }, "project_id": { "$ref": "res:ProjectId" }, "definition_revision_id": { "anyOf": [{ "$ref": "res:DefinitionRevisionId" }, { "type": "null" }] }, "status": { "$ref": "res:GenerationStatus" }, "trigger": { "$ref": "res:GenerationTrigger" }, "target_id": { "anyOf": [{ "$ref": "res:TargetId" }, { "type": "null" }] }, "generator": { "$ref": "res:GeneratorKind" }, "provenance": { "$ref": "res:GenerationProvenance" }, "meta": { "anyOf": [{ "$ref": "res:GenerationMeta" }, { "type": "null" }] }, "warnings": { "type": "array", "items": { "type": "string" } }, "files": { "type": "array", "items": { "$ref": "res:GeneratedFile" } }, "error": { "type": ["string", "null"] }, "created_at": { "type": "string" }, "request_id": { "$ref": "res:RequestId" } }, "required": ["id", "object", "project_id", "definition_revision_id", "status", "trigger", "target_id", "generator", "provenance", "meta", "warnings", "error", "created_at"] },
|