@typeship-ax/cli 0.6.0 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/api.json +5597 -3010
- package/api.md +433 -54
- package/dist/cli-agent.d.ts +9 -1
- package/dist/cli-agent.d.ts.map +1 -1
- package/dist/cli-agent.js +26 -9
- package/dist/cli.js +83 -232
- package/dist/core/http.d.ts +6 -92
- package/dist/core/http.d.ts.map +1 -1
- package/dist/core/http.js +70 -209
- package/dist/core/pagination.d.ts.map +1 -1
- package/dist/core/pagination.js +6 -34
- package/dist/dates.d.ts +0 -2
- package/dist/dates.d.ts.map +1 -1
- package/dist/dates.js +0 -1
- package/dist/docs.d.ts +11 -0
- package/dist/docs.d.ts.map +1 -0
- package/dist/docs.js +114 -0
- package/dist/errors.d.ts +27 -27
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +7 -7
- package/dist/index.d.ts +19 -11
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +23 -13
- package/dist/ops.d.ts +5 -0
- package/dist/ops.d.ts.map +1 -1
- package/dist/ops.js +31 -17
- package/dist/resources/account.d.ts +2 -2
- package/dist/resources/account.d.ts.map +1 -1
- package/dist/resources/api-keys.d.ts +10 -5
- package/dist/resources/api-keys.d.ts.map +1 -1
- package/dist/resources/api-keys.js +3 -1
- package/dist/resources/definition-revisions.d.ts +58 -0
- package/dist/resources/definition-revisions.d.ts.map +1 -0
- package/dist/resources/definition-revisions.js +110 -0
- package/dist/resources/definitions.d.ts +24 -0
- package/dist/resources/definitions.d.ts.map +1 -0
- package/dist/resources/definitions.js +51 -0
- package/dist/resources/generate.d.ts +5 -5
- package/dist/resources/generate.d.ts.map +1 -1
- package/dist/resources/generate.js +3 -3
- package/dist/resources/generations.d.ts +3 -3
- package/dist/resources/generations.d.ts.map +1 -1
- package/dist/resources/generations.js +1 -1
- package/dist/resources/projects.d.ts +66 -26
- package/dist/resources/projects.d.ts.map +1 -1
- package/dist/resources/projects.js +87 -13
- package/dist/resources/targets.d.ts +86 -0
- package/dist/resources/targets.d.ts.map +1 -0
- package/dist/resources/targets.js +184 -0
- package/dist/schemas.d.ts.map +1 -1
- package/dist/schemas.js +119 -62
- package/dist/types.d.ts +1761 -222
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +9 -3
- package/package.json +1 -1
- package/src/cli-agent.ts +28 -11
- package/src/cli.ts +89 -233
- package/src/core/http.ts +75 -293
- package/src/core/pagination.ts +6 -30
- package/src/dates.ts +0 -1
- package/src/docs.ts +101 -0
- package/src/errors.ts +30 -30
- package/src/index.ts +23 -13
- package/src/ops.ts +43 -17
- package/src/resources/account.ts +3 -3
- package/src/resources/api-keys.ts +22 -7
- package/src/resources/definition-revisions.ts +198 -0
- package/src/resources/definitions.ts +97 -0
- package/src/resources/generate.ts +6 -6
- package/src/resources/generations.ts +4 -4
- package/src/resources/projects.ts +182 -37
- package/src/resources/targets.ts +346 -0
- package/src/schemas.ts +119 -62
- package/src/types.ts +1947 -281
- package/dist/resources/spec-revisions.d.ts +0 -47
- package/dist/resources/spec-revisions.d.ts.map +0 -1
- package/dist/resources/spec-revisions.js +0 -90
- package/src/resources/spec-revisions.ts +0 -150
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HttpCore, type ApiResult, type RequestOptions } from "../core/http.js";
|
|
2
2
|
import { TransportError, UnexpectedApiError, ValidationError, ForbiddenError, RateLimitedError, UnauthorizedError } from "../errors.js";
|
|
3
|
-
import type {
|
|
3
|
+
import type { AccountRead } from "../types.js";
|
|
4
4
|
export declare class AccountResource {
|
|
5
5
|
private readonly _core;
|
|
6
6
|
constructor(_core: HttpCore);
|
|
@@ -11,7 +11,7 @@ export declare class AccountResource {
|
|
|
11
11
|
* identity endpoint the generated typeship CLI's `whoami` calls.
|
|
12
12
|
* `GET /me`
|
|
13
13
|
*/
|
|
14
|
-
retrieve(options?: RequestOptions): Promise<ApiResult<
|
|
14
|
+
retrieve(options?: RequestOptions): Promise<ApiResult<AccountRead, AccountRetrieveError>>;
|
|
15
15
|
}
|
|
16
16
|
/** Every error `retrieve` can produce, as a discriminated union. */
|
|
17
17
|
export type AccountRetrieveError = UnauthorizedError | ForbiddenError | RateLimitedError | UnexpectedApiError | TransportError | ValidationError;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"account.d.ts","sourceRoot":"","sources":["../../src/resources/account.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,QAAQ,EAAE,KAAK,SAAS,EAAE,KAAK,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAChF,OAAO,EACL,cAAc,EACd,kBAAkB,EAClB,eAAe,EACf,cAAc,EACd,gBAAgB,EAChB,iBAAiB,EAClB,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"account.d.ts","sourceRoot":"","sources":["../../src/resources/account.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,QAAQ,EAAE,KAAK,SAAS,EAAE,KAAK,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAChF,OAAO,EACL,cAAc,EACd,kBAAkB,EAClB,eAAe,EACf,cAAc,EACd,gBAAgB,EAChB,iBAAiB,EAClB,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAAW,WAAW,EAAE,MAAM,aAAa,CAAC;AAExD,qBAAa,eAAe;IACd,OAAO,CAAC,QAAQ,CAAC,KAAK;gBAAL,KAAK,EAAE,QAAQ;IAC5C;;;;;;OAMG;IACG,QAAQ,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,SAAS,CAAC,WAAW,EAAE,oBAAoB,CAAC,CAAC;CAUhG;AAED,oEAAoE;AACpE,MAAM,MAAM,oBAAoB,GAC5B,iBAAiB,GACjB,cAAc,GACd,gBAAgB,GAChB,kBAAkB,GAClB,cAAc,GACd,eAAe,CAAC"}
|
|
@@ -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
3
|
import { TransportError, UnexpectedApiError, ValidationError, BadRequestError, ForbiddenError, NotFoundError, RateLimitedError, UnauthorizedError } from "../errors.js";
|
|
4
|
-
import type {
|
|
4
|
+
import type { ApiKeyRead, ApiKeyResponseRead } from "../types.js";
|
|
5
5
|
export declare class ApiKeysResource {
|
|
6
6
|
private readonly _core;
|
|
7
7
|
constructor(_core: HttpCore);
|
|
@@ -14,20 +14,25 @@ export declare class ApiKeysResource {
|
|
|
14
14
|
* Auto-paginates: `for await (const item of …)` walks every page.
|
|
15
15
|
* `GET /api_keys`
|
|
16
16
|
*/
|
|
17
|
-
list(params?: ApiKeysListParams, options?: RequestOptions): PagePromise<
|
|
17
|
+
list(params?: ApiKeysListParams, options?: RequestOptions): PagePromise<ApiKeyRead, ApiKeysListError>;
|
|
18
18
|
/**
|
|
19
19
|
* Revoke an API key
|
|
20
20
|
*
|
|
21
21
|
* Idempotent: revoking an already-revoked key returns the same body, so a rotation script that
|
|
22
|
-
* re-runs does not have to special-case having already succeeded.
|
|
22
|
+
* re-runs does not have to special-case having already succeeded. An OAuth member may revoke a
|
|
23
|
+
* key they created; an organization admin may revoke any key. Organization API keys retain
|
|
24
|
+
* account-wide authority.
|
|
23
25
|
* `DELETE /api_keys/{api_key_id}`
|
|
24
26
|
*/
|
|
25
|
-
revoke(apiKeyId: string, options?: RequestOptions): Promise<ApiResult<
|
|
27
|
+
revoke(apiKeyId: string, options?: RequestOptions): Promise<ApiResult<ApiKeyResponseRead, ApiKeysRevokeError>>;
|
|
26
28
|
}
|
|
27
29
|
export interface ApiKeysListParams {
|
|
28
30
|
/** Maximum number of resources to return. */
|
|
29
31
|
limit?: number;
|
|
30
|
-
/**
|
|
32
|
+
/**
|
|
33
|
+
* Opaque cursor from the preceding page's next_cursor. Valid only for the same account,
|
|
34
|
+
* operation, filters, and ordering that issued it.
|
|
35
|
+
*/
|
|
31
36
|
cursor?: string;
|
|
32
37
|
}
|
|
33
38
|
/** Every error `list` can produce, as a discriminated union. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api-keys.d.ts","sourceRoot":"","sources":["../../src/resources/api-keys.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,QAAQ,EAAE,KAAK,SAAS,EAAE,KAAK,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAChF,OAAO,EAAY,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,EACL,cAAc,EACd,kBAAkB,EAClB,eAAe,EACf,eAAe,EACf,cAAc,EACd,aAAa,EACb,gBAAgB,EAChB,iBAAiB,EAClB,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,
|
|
1
|
+
{"version":3,"file":"api-keys.d.ts","sourceRoot":"","sources":["../../src/resources/api-keys.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,QAAQ,EAAE,KAAK,SAAS,EAAE,KAAK,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAChF,OAAO,EAAY,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,EACL,cAAc,EACd,kBAAkB,EAClB,eAAe,EACf,eAAe,EACf,cAAc,EACd,aAAa,EACb,gBAAgB,EAChB,iBAAiB,EAClB,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAIV,UAAU,EAEV,kBAAkB,EACnB,MAAM,aAAa,CAAC;AAErB,qBAAa,eAAe;IACd,OAAO,CAAC,QAAQ,CAAC,KAAK;gBAAL,KAAK,EAAE,QAAQ;IAC5C;;;;;;;;OAQG;IACH,IAAI,CAAC,MAAM,CAAC,EAAE,iBAAiB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,WAAW,CAAC,UAAU,EAAE,gBAAgB,CAAC;IA2BrG;;;;;;;;OAQG;IACG,MAAM,CACV,QAAQ,EAAE,MAAM,EAChB,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,SAAS,CAAC,kBAAkB,EAAE,kBAAkB,CAAC,CAAC;CAe9D;AAED,MAAM,WAAW,iBAAiB;IAChC,6CAA6C;IAC7C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,gEAAgE;AAChE,MAAM,MAAM,gBAAgB,GACxB,eAAe,GACf,iBAAiB,GACjB,cAAc,GACd,gBAAgB,GAChB,kBAAkB,GAClB,cAAc,GACd,eAAe,CAAC;AAEpB,kEAAkE;AAClE,MAAM,MAAM,kBAAkB,GAC1B,iBAAiB,GACjB,cAAc,GACd,aAAa,GACb,gBAAgB,GAChB,kBAAkB,GAClB,cAAc,GACd,eAAe,CAAC"}
|
|
@@ -46,7 +46,9 @@ export class ApiKeysResource {
|
|
|
46
46
|
* Revoke an API key
|
|
47
47
|
*
|
|
48
48
|
* Idempotent: revoking an already-revoked key returns the same body, so a rotation script that
|
|
49
|
-
* re-runs does not have to special-case having already succeeded.
|
|
49
|
+
* re-runs does not have to special-case having already succeeded. An OAuth member may revoke a
|
|
50
|
+
* key they created; an organization admin may revoke any key. Organization API keys retain
|
|
51
|
+
* account-wide authority.
|
|
50
52
|
* `DELETE /api_keys/{api_key_id}`
|
|
51
53
|
*/
|
|
52
54
|
async revoke(apiKeyId, options) {
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { HttpCore, type ApiResult, type RequestOptions } from "../core/http.js";
|
|
2
|
+
import { PagePromise } from "../core/pagination.js";
|
|
3
|
+
import { TransportError, UnexpectedApiError, ValidationError, BadRequestError, ForbiddenError, NotFoundError, RateLimitedError, UnauthorizedError } from "../errors.js";
|
|
4
|
+
import type { DefinitionDocumentId, DefinitionId, DefinitionRevisionId, DefinitionRevisionRead, DefinitionRevisionResponseRead } from "../types.js";
|
|
5
|
+
export declare class DefinitionRevisionsResource {
|
|
6
|
+
private readonly _core;
|
|
7
|
+
constructor(_core: HttpCore);
|
|
8
|
+
/**
|
|
9
|
+
* List Definition Revisions
|
|
10
|
+
*
|
|
11
|
+
* Immutable snapshots of the complete resolved document graph this Definition observed, newest
|
|
12
|
+
* first. Content is available from the revision and document endpoints and is never embedded in a
|
|
13
|
+
* list response.
|
|
14
|
+
*
|
|
15
|
+
* Auto-paginates: `for await (const item of …)` walks every page.
|
|
16
|
+
* `GET /definitions/{definition_id}/revisions`
|
|
17
|
+
*/
|
|
18
|
+
list(definitionId: DefinitionId, params?: DefinitionRevisionsListParams, options?: RequestOptions): PagePromise<DefinitionRevisionRead, DefinitionRevisionsListError>;
|
|
19
|
+
/**
|
|
20
|
+
* Retrieve a Definition Revision
|
|
21
|
+
*
|
|
22
|
+
* Metadata for one immutable resolved document graph. Fetch its canonical content or individual
|
|
23
|
+
* source documents from the content endpoints.
|
|
24
|
+
* `GET /definition_revisions/{definition_revision_id}`
|
|
25
|
+
*/
|
|
26
|
+
retrieve(definitionRevisionId: DefinitionRevisionId, options?: RequestOptions): Promise<ApiResult<DefinitionRevisionResponseRead, DefinitionRevisionsRetrieveError>>;
|
|
27
|
+
/**
|
|
28
|
+
* Retrieve a Definition Revision's canonical content
|
|
29
|
+
*
|
|
30
|
+
* Returns the exact canonical resolved content identified by the revision's graph digest,
|
|
31
|
+
* suitable for saving or piping into a diff.
|
|
32
|
+
* `GET /definition_revisions/{definition_revision_id}/content`
|
|
33
|
+
*/
|
|
34
|
+
retrieveContent(definitionRevisionId: DefinitionRevisionId, options?: RequestOptions): Promise<ApiResult<string, DefinitionRevisionsRetrieveContentError>>;
|
|
35
|
+
/**
|
|
36
|
+
* Retrieve one source document from a Definition Revision
|
|
37
|
+
* `GET /definition_revisions/{definition_revision_id}/documents/{document_id}/content`
|
|
38
|
+
*/
|
|
39
|
+
retrieveDocumentContent(definitionRevisionId: DefinitionRevisionId, documentId: DefinitionDocumentId, options?: RequestOptions): Promise<ApiResult<string, DefinitionRevisionsRetrieveDocumentContentError>>;
|
|
40
|
+
}
|
|
41
|
+
export interface DefinitionRevisionsListParams {
|
|
42
|
+
/** Maximum number of resources to return. */
|
|
43
|
+
limit?: number;
|
|
44
|
+
/**
|
|
45
|
+
* Opaque cursor from the preceding page's next_cursor. Valid only for the same account,
|
|
46
|
+
* operation, filters, and ordering that issued it.
|
|
47
|
+
*/
|
|
48
|
+
cursor?: string;
|
|
49
|
+
}
|
|
50
|
+
/** Every error `list` can produce, as a discriminated union. */
|
|
51
|
+
export type DefinitionRevisionsListError = BadRequestError | UnauthorizedError | ForbiddenError | NotFoundError | RateLimitedError | UnexpectedApiError | TransportError | ValidationError;
|
|
52
|
+
/** Every error `retrieve` can produce, as a discriminated union. */
|
|
53
|
+
export type DefinitionRevisionsRetrieveError = UnauthorizedError | ForbiddenError | NotFoundError | RateLimitedError | UnexpectedApiError | TransportError | ValidationError;
|
|
54
|
+
/** Every error `retrieveContent` can produce, as a discriminated union. */
|
|
55
|
+
export type DefinitionRevisionsRetrieveContentError = UnauthorizedError | ForbiddenError | NotFoundError | RateLimitedError | UnexpectedApiError | TransportError | ValidationError;
|
|
56
|
+
/** Every error `retrieveDocumentContent` can produce, as a discriminated union. */
|
|
57
|
+
export type DefinitionRevisionsRetrieveDocumentContentError = UnauthorizedError | ForbiddenError | NotFoundError | RateLimitedError | UnexpectedApiError | TransportError | ValidationError;
|
|
58
|
+
//# sourceMappingURL=definition-revisions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"definition-revisions.d.ts","sourceRoot":"","sources":["../../src/resources/definition-revisions.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,QAAQ,EAAE,KAAK,SAAS,EAAE,KAAK,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAChF,OAAO,EAAY,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,EACL,cAAc,EACd,kBAAkB,EAClB,eAAe,EACf,eAAe,EACf,cAAc,EACd,aAAa,EACb,gBAAgB,EAChB,iBAAiB,EAClB,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EACV,oBAAoB,EACpB,YAAY,EAEZ,oBAAoB,EAGpB,sBAAsB,EAEtB,8BAA8B,EAC/B,MAAM,aAAa,CAAC;AAErB,qBAAa,2BAA2B;IAC1B,OAAO,CAAC,QAAQ,CAAC,KAAK;gBAAL,KAAK,EAAE,QAAQ;IAC5C;;;;;;;;;OASG;IACH,IAAI,CACF,YAAY,EAAE,YAAY,EAC1B,MAAM,CAAC,EAAE,6BAA6B,EACtC,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,sBAAsB,EAAE,4BAA4B,CAAC;IA4BpE;;;;;;OAMG;IACG,QAAQ,CACZ,oBAAoB,EAAE,oBAAoB,EAC1C,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,SAAS,CAAC,8BAA8B,EAAE,gCAAgC,CAAC,CAAC;IAgBvF;;;;;;OAMG;IACG,eAAe,CACnB,oBAAoB,EAAE,oBAAoB,EAC1C,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,SAAS,CAAC,MAAM,EAAE,uCAAuC,CAAC,CAAC;IAgBtE;;;OAGG;IACG,uBAAuB,CAC3B,oBAAoB,EAAE,oBAAoB,EAC1C,UAAU,EAAE,oBAAoB,EAChC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,SAAS,CAAC,MAAM,EAAE,+CAA+C,CAAC,CAAC;CAe/E;AAED,MAAM,WAAW,6BAA6B;IAC5C,6CAA6C;IAC7C,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,gEAAgE;AAChE,MAAM,MAAM,4BAA4B,GACpC,eAAe,GACf,iBAAiB,GACjB,cAAc,GACd,aAAa,GACb,gBAAgB,GAChB,kBAAkB,GAClB,cAAc,GACd,eAAe,CAAC;AAEpB,oEAAoE;AACpE,MAAM,MAAM,gCAAgC,GACxC,iBAAiB,GACjB,cAAc,GACd,aAAa,GACb,gBAAgB,GAChB,kBAAkB,GAClB,cAAc,GACd,eAAe,CAAC;AAEpB,2EAA2E;AAC3E,MAAM,MAAM,uCAAuC,GAC/C,iBAAiB,GACjB,cAAc,GACd,aAAa,GACb,gBAAgB,GAChB,kBAAkB,GAClB,cAAc,GACd,eAAe,CAAC;AAEpB,mFAAmF;AACnF,MAAM,MAAM,+CAA+C,GACvD,iBAAiB,GACjB,cAAc,GACd,aAAa,GACb,gBAAgB,GAChB,kBAAkB,GAClB,cAAc,GACd,eAAe,CAAC"}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
// typeship — definitionRevisions resource.
|
|
2
|
+
// Generated by typeship — https://typeship.dev — do not edit by hand.
|
|
3
|
+
import { paginate } from "../core/pagination.js";
|
|
4
|
+
import { BadRequestError, ForbiddenError, NotFoundError, RateLimitedError, UnauthorizedError, } from "../errors.js";
|
|
5
|
+
export class DefinitionRevisionsResource {
|
|
6
|
+
_core;
|
|
7
|
+
constructor(_core) {
|
|
8
|
+
this._core = _core;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* List Definition Revisions
|
|
12
|
+
*
|
|
13
|
+
* Immutable snapshots of the complete resolved document graph this Definition observed, newest
|
|
14
|
+
* first. Content is available from the revision and document endpoints and is never embedded in a
|
|
15
|
+
* list response.
|
|
16
|
+
*
|
|
17
|
+
* Auto-paginates: `for await (const item of …)` walks every page.
|
|
18
|
+
* `GET /definitions/{definition_id}/revisions`
|
|
19
|
+
*/
|
|
20
|
+
list(definitionId, params, options) {
|
|
21
|
+
return paginate(this._core, {
|
|
22
|
+
method: "GET",
|
|
23
|
+
path: `/definitions/${encodeURIComponent(String(definitionId))}/revisions`,
|
|
24
|
+
query: {
|
|
25
|
+
limit: params?.limit,
|
|
26
|
+
cursor: params?.cursor,
|
|
27
|
+
},
|
|
28
|
+
errors: {
|
|
29
|
+
"400": BadRequestError,
|
|
30
|
+
"401": UnauthorizedError,
|
|
31
|
+
"403": ForbiddenError,
|
|
32
|
+
"404": NotFoundError,
|
|
33
|
+
"429": RateLimitedError,
|
|
34
|
+
},
|
|
35
|
+
idempotent: true,
|
|
36
|
+
schemaKey: "definitionRevisions.list",
|
|
37
|
+
options,
|
|
38
|
+
}, {
|
|
39
|
+
style: "cursor",
|
|
40
|
+
itemsField: "data",
|
|
41
|
+
cursorParam: "cursor",
|
|
42
|
+
nextCursorField: "next_cursor",
|
|
43
|
+
hasMoreField: "has_more",
|
|
44
|
+
limitParam: "limit",
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Retrieve a Definition Revision
|
|
49
|
+
*
|
|
50
|
+
* Metadata for one immutable resolved document graph. Fetch its canonical content or individual
|
|
51
|
+
* source documents from the content endpoints.
|
|
52
|
+
* `GET /definition_revisions/{definition_revision_id}`
|
|
53
|
+
*/
|
|
54
|
+
async retrieve(definitionRevisionId, options) {
|
|
55
|
+
return this._core.request({
|
|
56
|
+
method: "GET",
|
|
57
|
+
path: `/definition_revisions/${encodeURIComponent(String(definitionRevisionId))}`,
|
|
58
|
+
errors: {
|
|
59
|
+
"401": UnauthorizedError,
|
|
60
|
+
"403": ForbiddenError,
|
|
61
|
+
"404": NotFoundError,
|
|
62
|
+
"429": RateLimitedError,
|
|
63
|
+
},
|
|
64
|
+
idempotent: true,
|
|
65
|
+
schemaKey: "definitionRevisions.retrieve",
|
|
66
|
+
options,
|
|
67
|
+
});
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Retrieve a Definition Revision's canonical content
|
|
71
|
+
*
|
|
72
|
+
* Returns the exact canonical resolved content identified by the revision's graph digest,
|
|
73
|
+
* suitable for saving or piping into a diff.
|
|
74
|
+
* `GET /definition_revisions/{definition_revision_id}/content`
|
|
75
|
+
*/
|
|
76
|
+
async retrieveContent(definitionRevisionId, options) {
|
|
77
|
+
return this._core.request({
|
|
78
|
+
method: "GET",
|
|
79
|
+
path: `/definition_revisions/${encodeURIComponent(String(definitionRevisionId))}/content`,
|
|
80
|
+
errors: {
|
|
81
|
+
"401": UnauthorizedError,
|
|
82
|
+
"403": ForbiddenError,
|
|
83
|
+
"404": NotFoundError,
|
|
84
|
+
"429": RateLimitedError,
|
|
85
|
+
},
|
|
86
|
+
idempotent: true,
|
|
87
|
+
schemaKey: "definitionRevisions.retrieveContent",
|
|
88
|
+
options,
|
|
89
|
+
});
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Retrieve one source document from a Definition Revision
|
|
93
|
+
* `GET /definition_revisions/{definition_revision_id}/documents/{document_id}/content`
|
|
94
|
+
*/
|
|
95
|
+
async retrieveDocumentContent(definitionRevisionId, documentId, options) {
|
|
96
|
+
return this._core.request({
|
|
97
|
+
method: "GET",
|
|
98
|
+
path: `/definition_revisions/${encodeURIComponent(String(definitionRevisionId))}/documents/${encodeURIComponent(String(documentId))}/content`,
|
|
99
|
+
errors: {
|
|
100
|
+
"401": UnauthorizedError,
|
|
101
|
+
"403": ForbiddenError,
|
|
102
|
+
"404": NotFoundError,
|
|
103
|
+
"429": RateLimitedError,
|
|
104
|
+
},
|
|
105
|
+
idempotent: true,
|
|
106
|
+
schemaKey: "definitionRevisions.retrieveDocumentContent",
|
|
107
|
+
options,
|
|
108
|
+
});
|
|
109
|
+
}
|
|
110
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { HttpCore, type ApiResult, type RequestOptions } from "../core/http.js";
|
|
2
|
+
import { TransportError, UnexpectedApiError, ValidationError, BadRequestError, ForbiddenError, NotFoundError, RateLimitedError, UnauthorizedError, UnprocessableEntityError } from "../errors.js";
|
|
3
|
+
import type { DefinitionId, DefinitionRead, DefinitionUpdateRequest } from "../types.js";
|
|
4
|
+
export declare class DefinitionsResource {
|
|
5
|
+
private readonly _core;
|
|
6
|
+
constructor(_core: HttpCore);
|
|
7
|
+
/**
|
|
8
|
+
* Retrieve a Definition
|
|
9
|
+
* `GET /definitions/{definition_id}`
|
|
10
|
+
*/
|
|
11
|
+
retrieve(definitionId: DefinitionId, options?: RequestOptions): Promise<ApiResult<DefinitionRead, DefinitionsRetrieveError>>;
|
|
12
|
+
/**
|
|
13
|
+
* Update and resolve a Definition
|
|
14
|
+
*
|
|
15
|
+
* Resolves the complete document graph and records a new immutable revision before saving.
|
|
16
|
+
* `PATCH /definitions/{definition_id}`
|
|
17
|
+
*/
|
|
18
|
+
update(definitionId: DefinitionId, body: DefinitionUpdateRequest, options?: RequestOptions): Promise<ApiResult<DefinitionRead, DefinitionsUpdateError>>;
|
|
19
|
+
}
|
|
20
|
+
/** Every error `retrieve` can produce, as a discriminated union. */
|
|
21
|
+
export type DefinitionsRetrieveError = UnauthorizedError | ForbiddenError | NotFoundError | RateLimitedError | UnexpectedApiError | TransportError | ValidationError;
|
|
22
|
+
/** Every error `update` can produce, as a discriminated union. */
|
|
23
|
+
export type DefinitionsUpdateError = BadRequestError | UnauthorizedError | ForbiddenError | NotFoundError | UnprocessableEntityError | RateLimitedError | UnexpectedApiError | TransportError | ValidationError;
|
|
24
|
+
//# sourceMappingURL=definitions.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"definitions.d.ts","sourceRoot":"","sources":["../../src/resources/definitions.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,QAAQ,EAAE,KAAK,SAAS,EAAE,KAAK,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAChF,OAAO,EACL,cAAc,EACd,kBAAkB,EAClB,eAAe,EACf,eAAe,EACf,cAAc,EACd,aAAa,EACb,gBAAgB,EAChB,iBAAiB,EACjB,wBAAwB,EACzB,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAEV,YAAY,EACZ,cAAc,EACd,uBAAuB,EACxB,MAAM,aAAa,CAAC;AAErB,qBAAa,mBAAmB;IAClB,OAAO,CAAC,QAAQ,CAAC,KAAK;gBAAL,KAAK,EAAE,QAAQ;IAC5C;;;OAGG;IACG,QAAQ,CACZ,YAAY,EAAE,YAAY,EAC1B,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,SAAS,CAAC,cAAc,EAAE,wBAAwB,CAAC,CAAC;IAgB/D;;;;;OAKG;IACG,MAAM,CACV,YAAY,EAAE,YAAY,EAC1B,IAAI,EAAE,uBAAuB,EAC7B,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,SAAS,CAAC,cAAc,EAAE,sBAAsB,CAAC,CAAC;CAiB9D;AAED,oEAAoE;AACpE,MAAM,MAAM,wBAAwB,GAChC,iBAAiB,GACjB,cAAc,GACd,aAAa,GACb,gBAAgB,GAChB,kBAAkB,GAClB,cAAc,GACd,eAAe,CAAC;AAEpB,kEAAkE;AAClE,MAAM,MAAM,sBAAsB,GAC9B,eAAe,GACf,iBAAiB,GACjB,cAAc,GACd,aAAa,GACb,wBAAwB,GACxB,gBAAgB,GAChB,kBAAkB,GAClB,cAAc,GACd,eAAe,CAAC"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
// typeship — definitions resource.
|
|
2
|
+
// Generated by typeship — https://typeship.dev — do not edit by hand.
|
|
3
|
+
import { BadRequestError, ForbiddenError, NotFoundError, RateLimitedError, UnauthorizedError, UnprocessableEntityError, } from "../errors.js";
|
|
4
|
+
export class DefinitionsResource {
|
|
5
|
+
_core;
|
|
6
|
+
constructor(_core) {
|
|
7
|
+
this._core = _core;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Retrieve a Definition
|
|
11
|
+
* `GET /definitions/{definition_id}`
|
|
12
|
+
*/
|
|
13
|
+
async retrieve(definitionId, options) {
|
|
14
|
+
return this._core.request({
|
|
15
|
+
method: "GET",
|
|
16
|
+
path: `/definitions/${encodeURIComponent(String(definitionId))}`,
|
|
17
|
+
errors: {
|
|
18
|
+
"401": UnauthorizedError,
|
|
19
|
+
"403": ForbiddenError,
|
|
20
|
+
"404": NotFoundError,
|
|
21
|
+
"429": RateLimitedError,
|
|
22
|
+
},
|
|
23
|
+
idempotent: true,
|
|
24
|
+
schemaKey: "definitions.retrieve",
|
|
25
|
+
options,
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Update and resolve a Definition
|
|
30
|
+
*
|
|
31
|
+
* Resolves the complete document graph and records a new immutable revision before saving.
|
|
32
|
+
* `PATCH /definitions/{definition_id}`
|
|
33
|
+
*/
|
|
34
|
+
async update(definitionId, body, options) {
|
|
35
|
+
return this._core.request({
|
|
36
|
+
method: "PATCH",
|
|
37
|
+
path: `/definitions/${encodeURIComponent(String(definitionId))}`,
|
|
38
|
+
body,
|
|
39
|
+
errors: {
|
|
40
|
+
"400": BadRequestError,
|
|
41
|
+
"401": UnauthorizedError,
|
|
42
|
+
"403": ForbiddenError,
|
|
43
|
+
"404": NotFoundError,
|
|
44
|
+
"422": UnprocessableEntityError,
|
|
45
|
+
"429": RateLimitedError,
|
|
46
|
+
},
|
|
47
|
+
schemaKey: "definitions.update",
|
|
48
|
+
options,
|
|
49
|
+
});
|
|
50
|
+
}
|
|
51
|
+
}
|
|
@@ -1,24 +1,24 @@
|
|
|
1
1
|
import { HttpCore, type ApiResult, type RequestOptions } from "../core/http.js";
|
|
2
2
|
import { TransportError, UnexpectedApiError, ValidationError, ApiResponseError, BadRequestError, ForbiddenError, PayloadTooLargeError, RateLimitedError, UnauthorizedError, UnprocessableEntityError } from "../errors.js";
|
|
3
|
-
import type { GenerateRequest,
|
|
3
|
+
import type { GenerateRequest, GenerationResultRead } from "../types.js";
|
|
4
4
|
export declare class GenerateResource {
|
|
5
5
|
private readonly _core;
|
|
6
6
|
constructor(_core: HttpCore);
|
|
7
7
|
/**
|
|
8
|
-
* Generate
|
|
8
|
+
* Generate one Target from a Definition
|
|
9
9
|
*
|
|
10
10
|
* Stateless generation: nothing is stored. Returns the full generated
|
|
11
11
|
* package as files. Works without an API key: anonymous calls generate
|
|
12
12
|
* the first 25 operations, rate limited per IP address, and the
|
|
13
13
|
* response's `limits` object says what was held back and where to lift
|
|
14
|
-
* it; anonymous calls from a
|
|
14
|
+
* it; anonymous calls from a Definition URL also carry `claim.url`, a link
|
|
15
15
|
* that turns the run into a project once a person signs in. With a key, the free plan generates
|
|
16
16
|
* the first 25 operations and
|
|
17
|
-
* paid plans generate the
|
|
17
|
+
* paid plans generate the complete Definition. A present but invalid key is a
|
|
18
18
|
* 401, not a downgrade to anonymous.
|
|
19
19
|
* `POST /generate`
|
|
20
20
|
*/
|
|
21
|
-
run(body: GenerateRequest, options?: RequestOptions): Promise<ApiResult<
|
|
21
|
+
run(body: GenerateRequest, options?: RequestOptions): Promise<ApiResult<GenerationResultRead, GenerateRunError>>;
|
|
22
22
|
}
|
|
23
23
|
/** Every error `run` can produce, as a discriminated union. */
|
|
24
24
|
export type GenerateRunError = BadRequestError | UnauthorizedError | ForbiddenError | PayloadTooLargeError | UnprocessableEntityError | RateLimitedError | ApiResponseError | UnexpectedApiError | TransportError | ValidationError;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate.d.ts","sourceRoot":"","sources":["../../src/resources/generate.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,QAAQ,EAAE,KAAK,SAAS,EAAE,KAAK,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAChF,OAAO,EACL,cAAc,EACd,kBAAkB,EAClB,eAAe,EACf,gBAAgB,EAChB,eAAe,EACf,cAAc,EACd,oBAAoB,EACpB,gBAAgB,EAChB,iBAAiB,EACjB,wBAAwB,EACzB,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAAE,eAAe,
|
|
1
|
+
{"version":3,"file":"generate.d.ts","sourceRoot":"","sources":["../../src/resources/generate.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,QAAQ,EAAE,KAAK,SAAS,EAAE,KAAK,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAChF,OAAO,EACL,cAAc,EACd,kBAAkB,EAClB,eAAe,EACf,gBAAgB,EAChB,eAAe,EACf,cAAc,EACd,oBAAoB,EACpB,gBAAgB,EAChB,iBAAiB,EACjB,wBAAwB,EACzB,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAAE,eAAe,EAAoB,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAE3F,qBAAa,gBAAgB;IACf,OAAO,CAAC,QAAQ,CAAC,KAAK;gBAAL,KAAK,EAAE,QAAQ;IAC5C;;;;;;;;;;;;;OAaG;IACG,GAAG,CACP,IAAI,EAAE,eAAe,EACrB,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,SAAS,CAAC,oBAAoB,EAAE,gBAAgB,CAAC,CAAC;CAkB9D;AAED,+DAA+D;AAC/D,MAAM,MAAM,gBAAgB,GACxB,eAAe,GACf,iBAAiB,GACjB,cAAc,GACd,oBAAoB,GACpB,wBAAwB,GACxB,gBAAgB,GAChB,gBAAgB,GAChB,kBAAkB,GAClB,cAAc,GACd,eAAe,CAAC"}
|
|
@@ -7,16 +7,16 @@ export class GenerateResource {
|
|
|
7
7
|
this._core = _core;
|
|
8
8
|
}
|
|
9
9
|
/**
|
|
10
|
-
* Generate
|
|
10
|
+
* Generate one Target from a Definition
|
|
11
11
|
*
|
|
12
12
|
* Stateless generation: nothing is stored. Returns the full generated
|
|
13
13
|
* package as files. Works without an API key: anonymous calls generate
|
|
14
14
|
* the first 25 operations, rate limited per IP address, and the
|
|
15
15
|
* response's `limits` object says what was held back and where to lift
|
|
16
|
-
* it; anonymous calls from a
|
|
16
|
+
* it; anonymous calls from a Definition URL also carry `claim.url`, a link
|
|
17
17
|
* that turns the run into a project once a person signs in. With a key, the free plan generates
|
|
18
18
|
* the first 25 operations and
|
|
19
|
-
* paid plans generate the
|
|
19
|
+
* paid plans generate the complete Definition. A present but invalid key is a
|
|
20
20
|
* 401, not a downgrade to anonymous.
|
|
21
21
|
* `POST /generate`
|
|
22
22
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HttpCore, type ApiResult, type RequestOptions } from "../core/http.js";
|
|
2
2
|
import { TransportError, UnexpectedApiError, ValidationError, BadRequestError, ForbiddenError, NotFoundError, RateLimitedError, UnauthorizedError } from "../errors.js";
|
|
3
|
-
import type {
|
|
3
|
+
import type { GenerationId, GenerationResponseRead } from "../types.js";
|
|
4
4
|
export declare class GenerationsResource {
|
|
5
5
|
private readonly _core;
|
|
6
6
|
constructor(_core: HttpCore);
|
|
@@ -10,11 +10,11 @@ export declare class GenerationsResource {
|
|
|
10
10
|
* Includes the generated files when the generation succeeded.
|
|
11
11
|
* `GET /generations/{generation_id}`
|
|
12
12
|
*/
|
|
13
|
-
retrieve(generationId: GenerationId, options?: RequestOptions): Promise<ApiResult<
|
|
13
|
+
retrieve(generationId: GenerationId, options?: RequestOptions): Promise<ApiResult<GenerationResponseRead, GenerationsRetrieveError>>;
|
|
14
14
|
/**
|
|
15
15
|
* Fetch one file from a generation
|
|
16
16
|
*
|
|
17
|
-
* Raw file content, for generations whose
|
|
17
|
+
* Raw file content, for generations whose target was too large to inline (files_omitted true).
|
|
18
18
|
* The generation's files_index lists valid paths.
|
|
19
19
|
* `GET /generations/{generation_id}/file`
|
|
20
20
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generations.d.ts","sourceRoot":"","sources":["../../src/resources/generations.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,QAAQ,EAAE,KAAK,SAAS,EAAE,KAAK,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAChF,OAAO,EACL,cAAc,EACd,kBAAkB,EAClB,eAAe,EACf,eAAe,EACf,cAAc,EACd,aAAa,EACb,gBAAgB,EAChB,iBAAiB,EAClB,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"generations.d.ts","sourceRoot":"","sources":["../../src/resources/generations.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,QAAQ,EAAE,KAAK,SAAS,EAAE,KAAK,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAChF,OAAO,EACL,cAAc,EACd,kBAAkB,EAClB,eAAe,EACf,eAAe,EACf,cAAc,EACd,aAAa,EACb,gBAAgB,EAChB,iBAAiB,EAClB,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAAE,YAAY,EAAsB,sBAAsB,EAAE,MAAM,aAAa,CAAC;AAE5F,qBAAa,mBAAmB;IAClB,OAAO,CAAC,QAAQ,CAAC,KAAK;gBAAL,KAAK,EAAE,QAAQ;IAC5C;;;;;OAKG;IACG,QAAQ,CACZ,YAAY,EAAE,YAAY,EAC1B,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,SAAS,CAAC,sBAAsB,EAAE,wBAAwB,CAAC,CAAC;IAgBvE;;;;;;OAMG;IACG,YAAY,CAChB,YAAY,EAAE,YAAY,EAC1B,MAAM,EAAE,6BAA6B,EACrC,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,SAAS,CAAC,MAAM,EAAE,4BAA4B,CAAC,CAAC;CAmB5D;AAED,oEAAoE;AACpE,MAAM,MAAM,wBAAwB,GAChC,iBAAiB,GACjB,cAAc,GACd,aAAa,GACb,gBAAgB,GAChB,kBAAkB,GAClB,cAAc,GACd,eAAe,CAAC;AAEpB,MAAM,WAAW,6BAA6B;IAC5C,uDAAuD;IACvD,IAAI,EAAE,MAAM,CAAC;CACd;AAED,wEAAwE;AACxE,MAAM,MAAM,4BAA4B,GACpC,eAAe,GACf,iBAAiB,GACjB,cAAc,GACd,aAAa,GACb,gBAAgB,GAChB,kBAAkB,GAClB,cAAc,GACd,eAAe,CAAC"}
|
|
@@ -30,7 +30,7 @@ export class GenerationsResource {
|
|
|
30
30
|
/**
|
|
31
31
|
* Fetch one file from a generation
|
|
32
32
|
*
|
|
33
|
-
* Raw file content, for generations whose
|
|
33
|
+
* Raw file content, for generations whose target was too large to inline (files_omitted true).
|
|
34
34
|
* The generation's files_index lists valid paths.
|
|
35
35
|
* `GET /generations/{generation_id}/file`
|
|
36
36
|
*/
|
|
@@ -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
3
|
import { TransportError, UnexpectedApiError, ValidationError, BadRequestError, ConflictError, ForbiddenError, InternalServerError, NotFoundError, PaymentRequiredError, RateLimitedError, UnauthorizedError, UnprocessableEntityError } from "../errors.js";
|
|
4
|
-
import type { CreateProjectRequest,
|
|
4
|
+
import type { CreateProjectRequest, DeletedProjectRead, DiagnosticRemediationRead, DiagnosticRemediationRequest, DiagnosticReportRead, GenerationBatchRead, GenerationRead, ProjectId, ProjectRead, ProjectSummaryRead, RepositoryIntegrationHealthRead, TargetId, UpdateProjectRequest } from "../types.js";
|
|
5
5
|
export declare class ProjectsResource {
|
|
6
6
|
private readonly _core;
|
|
7
7
|
constructor(_core: HttpCore);
|
|
@@ -11,54 +11,82 @@ export declare class ProjectsResource {
|
|
|
11
11
|
* Auto-paginates: `for await (const item of …)` walks every page.
|
|
12
12
|
* `GET /projects`
|
|
13
13
|
*/
|
|
14
|
-
list(params?: ProjectsListParams, options?: RequestOptions): PagePromise<
|
|
14
|
+
list(params?: ProjectsListParams, options?: RequestOptions): PagePromise<ProjectSummaryRead, ProjectsListError>;
|
|
15
15
|
/**
|
|
16
16
|
* Create a project
|
|
17
17
|
*
|
|
18
18
|
* Stores a URL- or GitHub-sourced project. Free includes one stored project, every selected
|
|
19
|
-
*
|
|
19
|
+
* target, and the first 25 operations, while keeping manual and automatic regeneration, history,
|
|
20
20
|
* destination pull requests, and preview checks. Stateless POST /generate does not consume this
|
|
21
|
-
* slot. Pro adds projects and the
|
|
21
|
+
* slot. Pro adds projects and generates every operation in the Definition.
|
|
22
22
|
*
|
|
23
23
|
* A `Idempotency-Key` UUID is generated per call (stable across retries) unless you pass one.
|
|
24
24
|
* `POST /projects`
|
|
25
25
|
*/
|
|
26
|
-
create(body: CreateProjectRequest, params?: ProjectsCreateParams, options?: RequestOptions): Promise<ApiResult<
|
|
26
|
+
create(body: CreateProjectRequest, params?: ProjectsCreateParams, options?: RequestOptions): Promise<ApiResult<ProjectRead, ProjectsCreateError>>;
|
|
27
27
|
/**
|
|
28
28
|
* Retrieve a project
|
|
29
29
|
* `GET /projects/{project_id}`
|
|
30
30
|
*/
|
|
31
|
-
retrieve(projectId: ProjectId, options?: RequestOptions): Promise<ApiResult<
|
|
31
|
+
retrieve(projectId: ProjectId, options?: RequestOptions): Promise<ApiResult<ProjectRead, ProjectsRetrieveError>>;
|
|
32
32
|
/**
|
|
33
33
|
* Delete a project
|
|
34
34
|
* `DELETE /projects/{project_id}`
|
|
35
35
|
*/
|
|
36
|
-
delete(projectId: ProjectId, options?: RequestOptions): Promise<ApiResult<
|
|
36
|
+
delete(projectId: ProjectId, options?: RequestOptions): Promise<ApiResult<DeletedProjectRead, ProjectsDeleteError>>;
|
|
37
37
|
/**
|
|
38
38
|
* Update a project
|
|
39
39
|
* `PATCH /projects/{project_id}`
|
|
40
40
|
*/
|
|
41
|
-
update(projectId: ProjectId, body: UpdateProjectRequest, options?: RequestOptions): Promise<ApiResult<
|
|
41
|
+
update(projectId: ProjectId, body: UpdateProjectRequest, options?: RequestOptions): Promise<ApiResult<ProjectRead, ProjectsUpdateError>>;
|
|
42
42
|
/**
|
|
43
|
-
*
|
|
43
|
+
* Analyze a project's latest Definition Revision
|
|
44
44
|
*
|
|
45
|
-
*
|
|
46
|
-
*
|
|
47
|
-
*
|
|
48
|
-
*
|
|
45
|
+
* Runs deterministic OpenAPI or GraphQL authorship checks against the latest observed immutable
|
|
46
|
+
* Definition Revision after applying the Definition's existing patches. Diagnostics group every
|
|
47
|
+
* affected location under a stable rule. Exact patches are included only when Typeship can derive
|
|
48
|
+
* the change without inventing API behavior.
|
|
49
|
+
* `GET /projects/{project_id}/diagnostics`
|
|
49
50
|
*/
|
|
50
|
-
|
|
51
|
+
retrieveDiagnostics(projectId: ProjectId, options?: RequestOptions): Promise<ApiResult<DiagnosticReportRead, ProjectsRetrieveDiagnosticsError>>;
|
|
52
|
+
/**
|
|
53
|
+
* Refresh a project's Diagnostics from its configured source
|
|
54
|
+
*
|
|
55
|
+
* Fetches the complete configured source, records a new immutable revision only when content
|
|
56
|
+
* changed, and returns its Diagnostics. This does not generate targets or consume a metered
|
|
57
|
+
* generation.
|
|
58
|
+
* `POST /projects/{project_id}/diagnostics`
|
|
59
|
+
*/
|
|
60
|
+
refreshDiagnostics(projectId: ProjectId, options?: RequestOptions): Promise<ApiResult<DiagnosticReportRead, ProjectsRefreshDiagnosticsError>>;
|
|
61
|
+
/**
|
|
62
|
+
* Apply exact, reviewed diagnostic remediations
|
|
63
|
+
*
|
|
64
|
+
* Applies only deterministic patches. Repository sources receive an updateable source pull
|
|
65
|
+
* request; URL sources receive project overlays. Diagnostics that require API-owner intent return
|
|
66
|
+
* 422 and include an authoring_brief in the Diagnostic instead.
|
|
67
|
+
* `POST /projects/{project_id}/diagnostics/remediations`
|
|
68
|
+
*/
|
|
69
|
+
remediateDiagnostics(projectId: ProjectId, body: DiagnosticRemediationRequest, options?: RequestOptions): Promise<ApiResult<DiagnosticRemediationRead, ProjectsRemediateDiagnosticsError>>;
|
|
70
|
+
/**
|
|
71
|
+
* Diagnose a project's repository integrations
|
|
72
|
+
*
|
|
73
|
+
* Returns provider-neutral, machine-actionable source and destination access, Definition
|
|
74
|
+
* readability, source-approval label setup, required status names, and the latest durable webhook
|
|
75
|
+
* delivery. The Console renders this same result.
|
|
76
|
+
* `GET /projects/{project_id}/integration-health`
|
|
77
|
+
*/
|
|
78
|
+
retrieveIntegrationHealth(projectId: ProjectId, options?: RequestOptions): Promise<ApiResult<RepositoryIntegrationHealthRead, ProjectsRetrieveIntegrationHealthError>>;
|
|
51
79
|
/**
|
|
52
80
|
* List a project's generations
|
|
53
81
|
*
|
|
54
82
|
* Auto-paginates: `for await (const item of …)` walks every page.
|
|
55
83
|
* `GET /projects/{project_id}/generations`
|
|
56
84
|
*/
|
|
57
|
-
listGenerations(projectId: ProjectId, params?: ProjectsListGenerationsParams, options?: RequestOptions): PagePromise<
|
|
85
|
+
listGenerations(projectId: ProjectId, params?: ProjectsListGenerationsParams, options?: RequestOptions): PagePromise<GenerationRead, ProjectsListGenerationsError>;
|
|
58
86
|
/**
|
|
59
|
-
* Generate
|
|
87
|
+
* Generate targets and open pull requests
|
|
60
88
|
*
|
|
61
|
-
* Resolves the project's URL or
|
|
89
|
+
* Resolves the project's URL or GitHub source, generates every
|
|
62
90
|
* configured delivery package, stores each result in the project's history,
|
|
63
91
|
* and attempts to open a pull request in every configured destination.
|
|
64
92
|
* When the complete generated tree already matches a destination, no
|
|
@@ -67,12 +95,15 @@ export declare class ProjectsResource {
|
|
|
67
95
|
* regeneration runs after a source change.
|
|
68
96
|
* `POST /projects/{project_id}/generations`
|
|
69
97
|
*/
|
|
70
|
-
generate(projectId: ProjectId, options?: RequestOptions): Promise<ApiResult<
|
|
98
|
+
generate(projectId: ProjectId, options?: RequestOptions): Promise<ApiResult<GenerationBatchRead, ProjectsGenerateError>>;
|
|
71
99
|
}
|
|
72
100
|
export interface ProjectsListParams {
|
|
73
101
|
/** Maximum number of resources to return. */
|
|
74
102
|
limit?: number;
|
|
75
|
-
/**
|
|
103
|
+
/**
|
|
104
|
+
* Opaque cursor from the preceding page's next_cursor. Valid only for the same account,
|
|
105
|
+
* operation, filters, and ordering that issued it.
|
|
106
|
+
*/
|
|
76
107
|
cursor?: string;
|
|
77
108
|
}
|
|
78
109
|
/** Every error `list` can produce, as a discriminated union. */
|
|
@@ -86,22 +117,31 @@ export interface ProjectsCreateParams {
|
|
|
86
117
|
idempotencyKey?: string;
|
|
87
118
|
}
|
|
88
119
|
/** Every error `create` can produce, as a discriminated union. */
|
|
89
|
-
export type ProjectsCreateError = BadRequestError | UnauthorizedError | PaymentRequiredError | ForbiddenError | ConflictError | RateLimitedError | InternalServerError | UnexpectedApiError | TransportError | ValidationError;
|
|
120
|
+
export type ProjectsCreateError = BadRequestError | UnauthorizedError | PaymentRequiredError | ForbiddenError | ConflictError | UnprocessableEntityError | RateLimitedError | InternalServerError | UnexpectedApiError | TransportError | ValidationError;
|
|
90
121
|
/** Every error `retrieve` can produce, as a discriminated union. */
|
|
91
122
|
export type ProjectsRetrieveError = UnauthorizedError | ForbiddenError | NotFoundError | RateLimitedError | UnexpectedApiError | TransportError | ValidationError;
|
|
92
123
|
/** Every error `delete` can produce, as a discriminated union. */
|
|
93
124
|
export type ProjectsDeleteError = UnauthorizedError | ForbiddenError | NotFoundError | RateLimitedError | UnexpectedApiError | TransportError | ValidationError;
|
|
94
125
|
/** Every error `update` can produce, as a discriminated union. */
|
|
95
|
-
export type ProjectsUpdateError = BadRequestError | UnauthorizedError | PaymentRequiredError | ForbiddenError | NotFoundError | RateLimitedError | UnexpectedApiError | TransportError | ValidationError;
|
|
96
|
-
/** Every error `
|
|
97
|
-
export type
|
|
126
|
+
export type ProjectsUpdateError = BadRequestError | UnauthorizedError | PaymentRequiredError | ForbiddenError | NotFoundError | UnprocessableEntityError | RateLimitedError | UnexpectedApiError | TransportError | ValidationError;
|
|
127
|
+
/** Every error `retrieveDiagnostics` can produce, as a discriminated union. */
|
|
128
|
+
export type ProjectsRetrieveDiagnosticsError = UnauthorizedError | ForbiddenError | NotFoundError | RateLimitedError | UnexpectedApiError | TransportError | ValidationError;
|
|
129
|
+
/** Every error `refreshDiagnostics` can produce, as a discriminated union. */
|
|
130
|
+
export type ProjectsRefreshDiagnosticsError = UnauthorizedError | ForbiddenError | NotFoundError | UnprocessableEntityError | RateLimitedError | UnexpectedApiError | TransportError | ValidationError;
|
|
131
|
+
/** Every error `remediateDiagnostics` can produce, as a discriminated union. */
|
|
132
|
+
export type ProjectsRemediateDiagnosticsError = BadRequestError | UnauthorizedError | ForbiddenError | NotFoundError | UnprocessableEntityError | RateLimitedError | UnexpectedApiError | TransportError | ValidationError;
|
|
133
|
+
/** Every error `retrieveIntegrationHealth` can produce, as a discriminated union. */
|
|
134
|
+
export type ProjectsRetrieveIntegrationHealthError = UnauthorizedError | ForbiddenError | NotFoundError | RateLimitedError | UnexpectedApiError | TransportError | ValidationError;
|
|
98
135
|
export interface ProjectsListGenerationsParams {
|
|
99
136
|
/** Maximum number of resources to return. */
|
|
100
137
|
limit?: number;
|
|
101
|
-
/**
|
|
138
|
+
/**
|
|
139
|
+
* Opaque cursor from the preceding page's next_cursor. Valid only for the same account,
|
|
140
|
+
* operation, filters, and ordering that issued it.
|
|
141
|
+
*/
|
|
102
142
|
cursor?: string;
|
|
103
|
-
/** Only generations for this
|
|
104
|
-
|
|
143
|
+
/** Only generations for this persisted Target. */
|
|
144
|
+
targetId?: TargetId;
|
|
105
145
|
}
|
|
106
146
|
/** Every error `listGenerations` can produce, as a discriminated union. */
|
|
107
147
|
export type ProjectsListGenerationsError = BadRequestError | UnauthorizedError | ForbiddenError | NotFoundError | RateLimitedError | UnexpectedApiError | TransportError | ValidationError;
|