@typeship-ax/cli 0.22.0 → 0.24.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 +13 -9
- package/README.md +14 -27
- package/api.json +8898 -9026
- package/api.md +370 -328
- package/dist/arguments.d.ts +54 -0
- package/dist/arguments.d.ts.map +1 -0
- package/dist/arguments.js +265 -0
- package/dist/cli-agent.d.ts +73 -9
- package/dist/cli-agent.d.ts.map +1 -1
- package/dist/cli-agent.js +331 -44
- package/dist/cli.js +802 -291
- package/dist/core/http.d.ts +162 -19
- package/dist/core/http.d.ts.map +1 -1
- package/dist/core/http.js +381 -48
- package/dist/core/pagination.d.ts +42 -6
- package/dist/core/pagination.d.ts.map +1 -1
- package/dist/core/pagination.js +111 -17
- package/dist/credential-storage.d.ts +10 -3
- package/dist/credential-storage.d.ts.map +1 -1
- package/dist/credential-storage.js +15 -6
- package/dist/dates.d.ts +1 -1
- package/dist/dates.js +1 -1
- package/dist/errors.d.ts +20 -84
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +20 -108
- package/dist/fields.d.ts +36 -0
- package/dist/fields.d.ts.map +1 -0
- package/dist/fields.js +187 -0
- package/dist/index.d.ts +28 -18
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +35 -25
- package/dist/named-credentials.d.ts +19 -0
- package/dist/named-credentials.d.ts.map +1 -1
- package/dist/named-credentials.js +81 -1
- package/dist/oauth-login.d.ts +8 -2
- package/dist/oauth-login.d.ts.map +1 -1
- package/dist/oauth-login.js +31 -19
- package/dist/oauth-request.d.ts +7 -1
- package/dist/oauth-request.d.ts.map +1 -1
- package/dist/oauth-request.js +26 -4
- package/dist/oauth-session.d.ts +13 -1
- package/dist/oauth-session.d.ts.map +1 -1
- package/dist/oauth-session.js +34 -18
- package/dist/ops.d.ts +58 -5
- package/dist/ops.d.ts.map +1 -1
- package/dist/ops.js +110 -41
- package/dist/polling-login.d.ts +8 -2
- package/dist/polling-login.d.ts.map +1 -1
- package/dist/polling-login.js +25 -11
- package/dist/resources/api-keys.d.ts +10 -7
- package/dist/resources/api-keys.d.ts.map +1 -1
- package/dist/resources/api-keys.js +10 -31
- package/dist/resources/deliveries.d.ts +89 -5
- package/dist/resources/deliveries.d.ts.map +1 -1
- package/dist/resources/deliveries.js +96 -19
- package/dist/resources/drafts.d.ts +16 -16
- package/dist/resources/drafts.d.ts.map +1 -1
- package/dist/resources/drafts.js +12 -65
- package/dist/resources/files.d.ts +4 -4
- package/dist/resources/files.d.ts.map +1 -1
- package/dist/resources/files.js +3 -12
- package/dist/resources/generations.d.ts +16 -16
- package/dist/resources/generations.d.ts.map +1 -1
- package/dist/resources/generations.js +23 -47
- package/dist/resources/organization.d.ts +4 -4
- package/dist/resources/organization.d.ts.map +1 -1
- package/dist/resources/organization.js +3 -10
- package/dist/resources/{generate.d.ts → packages.d.ts} +16 -16
- package/dist/resources/packages.d.ts.map +1 -0
- package/dist/resources/{generate.js → packages.js} +13 -29
- package/dist/resources/projects.d.ts +50 -50
- package/dist/resources/projects.d.ts.map +1 -1
- package/dist/resources/projects.js +60 -116
- package/dist/resources/releases.d.ts +22 -17
- package/dist/resources/releases.d.ts.map +1 -1
- package/dist/resources/releases.js +19 -40
- package/dist/resources/spec-revisions.d.ts +16 -7
- package/dist/resources/spec-revisions.d.ts.map +1 -1
- package/dist/resources/spec-revisions.js +7 -29
- package/dist/resources/specs.d.ts +7 -7
- package/dist/resources/specs.d.ts.map +1 -1
- package/dist/resources/specs.js +6 -34
- package/dist/resources/targets.d.ts +49 -49
- package/dist/resources/targets.d.ts.map +1 -1
- package/dist/resources/targets.js +59 -115
- package/dist/schemas.d.ts.map +1 -1
- package/dist/schemas.js +83 -81
- package/dist/search.d.ts +54 -0
- package/dist/search.d.ts.map +1 -0
- package/dist/search.js +421 -0
- package/dist/table.d.ts +28 -0
- package/dist/table.d.ts.map +1 -0
- package/dist/table.js +167 -0
- package/dist/type-docs.d.ts +61 -0
- package/dist/type-docs.d.ts.map +1 -0
- package/dist/type-docs.js +174 -0
- package/dist/types.d.ts +499 -339
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +18 -18
- package/package.json +5 -2
- package/src/arguments.ts +254 -0
- package/src/cli-agent.ts +351 -46
- package/src/cli.ts +753 -266
- package/src/core/http.ts +457 -58
- package/src/core/pagination.ts +129 -18
- package/src/credential-storage.ts +16 -6
- package/src/dates.ts +1 -1
- package/src/errors.ts +46 -115
- package/src/fields.ts +167 -0
- package/src/index.ts +45 -28
- package/src/named-credentials.ts +66 -1
- package/src/oauth-login.ts +36 -21
- package/src/oauth-request.ts +32 -6
- package/src/oauth-session.ts +37 -19
- package/src/ops.ts +146 -45
- package/src/polling-login.ts +24 -11
- package/src/resources/api-keys.ts +34 -48
- package/src/resources/deliveries.ts +213 -32
- package/src/resources/drafts.ts +62 -109
- package/src/resources/files.ts +19 -20
- package/src/resources/generations.ts +61 -79
- package/src/resources/organization.ts +11 -16
- package/src/resources/{generate.ts → packages.ts} +43 -51
- package/src/resources/projects.ts +145 -200
- package/src/resources/releases.ts +50 -67
- package/src/resources/spec-revisions.ts +40 -49
- package/src/resources/specs.ts +39 -59
- package/src/resources/targets.ts +144 -194
- package/src/schemas.ts +83 -81
- package/src/search.ts +434 -0
- package/src/table.ts +167 -0
- package/src/type-docs.ts +205 -0
- package/src/types.ts +538 -357
- package/dist/console-login-check.d.ts +0 -21
- package/dist/console-login-check.d.ts.map +0 -1
- package/dist/console-login-check.js +0 -107
- package/dist/console-login-contract.d.ts +0 -45
- package/dist/console-login-contract.d.ts.map +0 -1
- package/dist/console-login-contract.js +0 -40
- package/dist/resources/generate.d.ts.map +0 -1
- package/dist/resources/publications.d.ts +0 -47
- package/dist/resources/publications.d.ts.map +0 -1
- package/dist/resources/publications.js +0 -70
- package/src/console-login-check.ts +0 -88
- package/src/console-login-contract.ts +0 -65
- package/src/resources/publications.ts +0 -140
|
@@ -1,35 +1,40 @@
|
|
|
1
1
|
import { HttpCore, type RequestOptions } from "../core/http.js";
|
|
2
2
|
import { PagePromise } from "../core/pagination.js";
|
|
3
|
-
import { ResponseParseError, TransportError, UnexpectedApiError, ValidationError,
|
|
4
|
-
import type { ReleaseId, ReleaseRead, ReleaseResponseRead, TargetId } from "../types.js";
|
|
3
|
+
import { RateLimitError, ResponseParseError, TransportError, UnexpectedApiError, ValidationError, BadRequestError, ConflictError, ForbiddenError, NotFoundError, ServerError, UnauthorizedError } from "../errors.js";
|
|
4
|
+
import type { ErrorModelRead, ReleaseId, ReleaseRead, ReleaseResponseRead, TargetId } from "../types.js";
|
|
5
5
|
export declare class ReleasesResource {
|
|
6
6
|
private readonly _core;
|
|
7
7
|
constructor(_core: HttpCore);
|
|
8
8
|
/**
|
|
9
|
-
* List
|
|
9
|
+
* List Releases
|
|
10
10
|
*
|
|
11
11
|
* Auto-paginates: `for await (const item of …)` walks every page.
|
|
12
12
|
* `GET /releases`
|
|
13
13
|
*/
|
|
14
14
|
list(params?: ReleasesListParams, options?: RequestOptions): PagePromise<ReleaseRead, ReleasesListError>;
|
|
15
15
|
/**
|
|
16
|
-
* Get
|
|
16
|
+
* Get a Release
|
|
17
17
|
* `GET /releases/{release_id}`
|
|
18
18
|
*/
|
|
19
19
|
get(releaseId: ReleaseId, options?: RequestOptions): Promise<ReleaseResponseRead>;
|
|
20
20
|
/**
|
|
21
|
-
* Retry publishing
|
|
21
|
+
* Retry publishing a Release
|
|
22
22
|
*
|
|
23
|
-
*
|
|
24
|
-
* version and accepted commit, even if a newer
|
|
23
|
+
* Queues every failed or queued Publication of the release and starts its repository publishing
|
|
24
|
+
* workflow again. Publishing uses that release's version and accepted commit, even if a newer
|
|
25
|
+
* Draft or release exists. Completed Publications are not repeated.
|
|
25
26
|
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
27
|
+
* Returns `202` with the Release. Get the Release until each Publication reaches `completed` or
|
|
28
|
+
* `failed`.
|
|
29
|
+
*
|
|
30
|
+
* A `409 publication_not_retryable` means no Publication is queued or failed. A `502
|
|
31
|
+
* repository_unavailable` means the repository publishing workflow could not be dispatched, and
|
|
32
|
+
* nothing was changed.
|
|
28
33
|
*
|
|
29
34
|
* A `Idempotency-Key` UUID is generated per call (stable across retries) unless you pass one.
|
|
30
|
-
* `POST /releases/{release_id}/
|
|
35
|
+
* `POST /releases/{release_id}/retry`
|
|
31
36
|
*/
|
|
32
|
-
|
|
37
|
+
retry(releaseId: ReleaseId, params?: ReleasesRetryParams, options?: RequestOptions): Promise<ReleaseResponseRead>;
|
|
33
38
|
}
|
|
34
39
|
export interface ReleasesListParams {
|
|
35
40
|
/**
|
|
@@ -48,13 +53,13 @@ export interface ReleasesListParams {
|
|
|
48
53
|
*/
|
|
49
54
|
cursor?: string;
|
|
50
55
|
/** Only releases of this Target. */
|
|
51
|
-
|
|
56
|
+
target_id?: TargetId;
|
|
52
57
|
}
|
|
53
58
|
/** Typed errors `list` can throw. */
|
|
54
|
-
export type ReleasesListError = BadRequestError | UnauthorizedError | ForbiddenError | NotFoundError |
|
|
59
|
+
export type ReleasesListError = BadRequestError<ErrorModelRead> | UnauthorizedError<ErrorModelRead> | ForbiddenError<ErrorModelRead> | NotFoundError<ErrorModelRead> | RateLimitError<ErrorModelRead> | ServerError<ErrorModelRead> | RateLimitError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
|
|
55
60
|
/** Typed errors `get` can throw. */
|
|
56
|
-
export type ReleasesGetError = UnauthorizedError | ForbiddenError | NotFoundError |
|
|
57
|
-
export interface
|
|
61
|
+
export type ReleasesGetError = UnauthorizedError<ErrorModelRead> | ForbiddenError<ErrorModelRead> | NotFoundError<ErrorModelRead> | RateLimitError<ErrorModelRead> | ServerError<ErrorModelRead> | RateLimitError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
|
|
62
|
+
export interface ReleasesRetryParams {
|
|
58
63
|
/**
|
|
59
64
|
* Identifies one logical write for 24 hours. The key is scoped to the authenticated organization
|
|
60
65
|
* and operation; generation without an organization uses a hashed network identity. Retrying the
|
|
@@ -63,6 +68,6 @@ export interface ReleasesRepublishParams {
|
|
|
63
68
|
*/
|
|
64
69
|
idempotencyKey?: string;
|
|
65
70
|
}
|
|
66
|
-
/** Typed errors `
|
|
67
|
-
export type
|
|
71
|
+
/** Typed errors `retry` can throw. */
|
|
72
|
+
export type ReleasesRetryError = BadRequestError<ErrorModelRead> | UnauthorizedError<ErrorModelRead> | ForbiddenError<ErrorModelRead> | NotFoundError<ErrorModelRead> | ConflictError<ErrorModelRead> | RateLimitError<ErrorModelRead> | ServerError<ErrorModelRead> | RateLimitError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
|
|
68
73
|
//# sourceMappingURL=releases.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"releases.d.ts","sourceRoot":"","sources":["../../src/resources/releases.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,QAAQ,EAAE,KAAK,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAChE,OAAO,EAAY,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,EACL,kBAAkB,EAClB,cAAc,EACd,kBAAkB,EAClB,eAAe,EACf,eAAe,EACf,
|
|
1
|
+
{"version":3,"file":"releases.d.ts","sourceRoot":"","sources":["../../src/resources/releases.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,QAAQ,EAAE,KAAK,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAChE,OAAO,EAAY,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,EACL,cAAc,EACd,kBAAkB,EAClB,cAAc,EACd,kBAAkB,EAClB,eAAe,EACf,eAAe,EACf,aAAa,EACb,cAAc,EACd,aAAa,EACb,WAAW,EACX,iBAAiB,EAClB,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAEV,cAAc,EAEd,SAAS,EAGT,WAAW,EAEX,mBAAmB,EACnB,QAAQ,EACT,MAAM,aAAa,CAAC;AAErB,qBAAa,gBAAgB;IACf,OAA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MAAM,WAAW,mBAAmB;IAClC;;;;;OAKG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,sCAAsC;AACtC,MAAM,MAAM,kBAAkB,GAC1B,eAAe,CAAC,cAAc,CAAC,GAC/B,iBAAiB,CAAC,cAAc,CAAC,GACjC,cAAc,CAAC,cAAc,CAAC,GAC9B,aAAa,CAAC,cAAc,CAAC,GAC7B,aAAa,CAAC,cAAc,CAAC,GAC7B,cAAc,CAAC,cAAc,CAAC,GAC9B,WAAW,CAAC,cAAc,CAAC,GAC3B,cAAc,GACd,kBAAkB,GAClB,kBAAkB,GAClB,cAAc,GACd,eAAe,CAAC"}
|
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Generated by
|
|
1
|
+
// Typeship — releases resource.
|
|
2
|
+
// Generated by Typeship — https://typeship.dev
|
|
3
3
|
import { paginate } from "../core/pagination.js";
|
|
4
|
-
import { BadGatewayError, BadRequestError, ConflictError, ForbiddenError, InternalServerError, NotFoundError, RateLimitedError, UnauthorizedError, } from "../errors.js";
|
|
5
4
|
export class ReleasesResource {
|
|
6
5
|
_core;
|
|
7
6
|
constructor(_core) {
|
|
8
7
|
this._core = _core;
|
|
9
8
|
}
|
|
10
9
|
/**
|
|
11
|
-
* List
|
|
10
|
+
* List Releases
|
|
12
11
|
*
|
|
13
12
|
* Auto-paginates: `for await (const item of …)` walks every page.
|
|
14
13
|
* `GET /releases`
|
|
@@ -21,15 +20,7 @@ export class ReleasesResource {
|
|
|
21
20
|
query: {
|
|
22
21
|
limit: params?.limit,
|
|
23
22
|
cursor: params?.cursor,
|
|
24
|
-
target_id: params?.
|
|
25
|
-
},
|
|
26
|
-
errors: {
|
|
27
|
-
"400": BadRequestError,
|
|
28
|
-
"401": UnauthorizedError,
|
|
29
|
-
"403": ForbiddenError,
|
|
30
|
-
"404": NotFoundError,
|
|
31
|
-
"429": RateLimitedError,
|
|
32
|
-
"500": InternalServerError,
|
|
23
|
+
target_id: params?.target_id,
|
|
33
24
|
},
|
|
34
25
|
idempotent: true,
|
|
35
26
|
schemaKey: "releases.list",
|
|
@@ -44,7 +35,7 @@ export class ReleasesResource {
|
|
|
44
35
|
});
|
|
45
36
|
}
|
|
46
37
|
/**
|
|
47
|
-
* Get
|
|
38
|
+
* Get a Release
|
|
48
39
|
* `GET /releases/{release_id}`
|
|
49
40
|
*/
|
|
50
41
|
async get(releaseId, options) {
|
|
@@ -52,50 +43,38 @@ export class ReleasesResource {
|
|
|
52
43
|
method: "GET",
|
|
53
44
|
path: `/releases/${encodeURIComponent(String(releaseId))}`,
|
|
54
45
|
security: [{ "apiKey": [] }],
|
|
55
|
-
errors: {
|
|
56
|
-
"401": UnauthorizedError,
|
|
57
|
-
"403": ForbiddenError,
|
|
58
|
-
"404": NotFoundError,
|
|
59
|
-
"429": RateLimitedError,
|
|
60
|
-
"500": InternalServerError,
|
|
61
|
-
},
|
|
62
46
|
idempotent: true,
|
|
63
47
|
schemaKey: "releases.get",
|
|
64
48
|
options,
|
|
65
49
|
});
|
|
66
50
|
}
|
|
67
51
|
/**
|
|
68
|
-
* Retry publishing
|
|
52
|
+
* Retry publishing a Release
|
|
69
53
|
*
|
|
70
|
-
*
|
|
71
|
-
* version and accepted commit, even if a newer
|
|
54
|
+
* Queues every failed or queued Publication of the release and starts its repository publishing
|
|
55
|
+
* workflow again. Publishing uses that release's version and accepted commit, even if a newer
|
|
56
|
+
* Draft or release exists. Completed Publications are not repeated.
|
|
72
57
|
*
|
|
73
|
-
*
|
|
74
|
-
*
|
|
58
|
+
* Returns `202` with the Release. Get the Release until each Publication reaches `completed` or
|
|
59
|
+
* `failed`.
|
|
60
|
+
*
|
|
61
|
+
* A `409 publication_not_retryable` means no Publication is queued or failed. A `502
|
|
62
|
+
* repository_unavailable` means the repository publishing workflow could not be dispatched, and
|
|
63
|
+
* nothing was changed.
|
|
75
64
|
*
|
|
76
65
|
* A `Idempotency-Key` UUID is generated per call (stable across retries) unless you pass one.
|
|
77
|
-
* `POST /releases/{release_id}/
|
|
66
|
+
* `POST /releases/{release_id}/retry`
|
|
78
67
|
*/
|
|
79
|
-
async
|
|
68
|
+
async retry(releaseId, params, options) {
|
|
80
69
|
return this._core.requestData({
|
|
81
70
|
method: "POST",
|
|
82
|
-
path: `/releases/${encodeURIComponent(String(releaseId))}/
|
|
71
|
+
path: `/releases/${encodeURIComponent(String(releaseId))}/retry`,
|
|
83
72
|
security: [{ "apiKey": [] }],
|
|
84
73
|
headers: {
|
|
85
74
|
"Idempotency-Key": params?.idempotencyKey === undefined ? undefined : String(params?.idempotencyKey),
|
|
86
75
|
},
|
|
87
|
-
errors: {
|
|
88
|
-
"400": BadRequestError,
|
|
89
|
-
"401": UnauthorizedError,
|
|
90
|
-
"403": ForbiddenError,
|
|
91
|
-
"404": NotFoundError,
|
|
92
|
-
"409": ConflictError,
|
|
93
|
-
"429": RateLimitedError,
|
|
94
|
-
"500": InternalServerError,
|
|
95
|
-
"502": BadGatewayError,
|
|
96
|
-
},
|
|
97
76
|
idempotencyKey: "Idempotency-Key",
|
|
98
|
-
schemaKey: "releases.
|
|
77
|
+
schemaKey: "releases.retry",
|
|
99
78
|
options,
|
|
100
79
|
});
|
|
101
80
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { HttpCore, type RequestOptions } from "../core/http.js";
|
|
2
2
|
import { PagePromise } from "../core/pagination.js";
|
|
3
|
-
import { ResponseParseError, TransportError, UnexpectedApiError, ValidationError, BadRequestError, ForbiddenError,
|
|
4
|
-
import type { SpecId, SpecRevisionFileRead, SpecRevisionId, SpecRevisionRead, SpecRevisionResponseRead } from "../types.js";
|
|
3
|
+
import { RateLimitError, ResponseParseError, TransportError, UnexpectedApiError, ValidationError, BadRequestError, ForbiddenError, NotFoundError, ServerError, UnauthorizedError } from "../errors.js";
|
|
4
|
+
import type { ErrorModelRead, SpecId, SpecRevisionFileRead, SpecRevisionId, SpecRevisionRead, SpecRevisionResponseRead } from "../types.js";
|
|
5
5
|
export declare class SpecRevisionsResource {
|
|
6
6
|
private readonly _core;
|
|
7
7
|
constructor(_core: HttpCore);
|
|
@@ -20,7 +20,9 @@ export declare class SpecRevisionsResource {
|
|
|
20
20
|
*
|
|
21
21
|
* Returns metadata for a saved Spec Revision with a Diagnostics summary. Pass
|
|
22
22
|
* `include=diagnostics` to add every Diagnostic, evaluated with the Spec's current patches and
|
|
23
|
-
* Diagnostic policy.
|
|
23
|
+
* Diagnostic policy. Add `filter=blocking` to receive only the locations that fail the policy,
|
|
24
|
+
* which is what to fix when `diagnostic_summary.status` is blocked. List its source files and
|
|
25
|
+
* resolved document with listSpecRevisionFiles.
|
|
24
26
|
* `GET /spec-revisions/{spec_revision_id}`
|
|
25
27
|
*/
|
|
26
28
|
get(specRevisionId: SpecRevisionId, params?: SpecRevisionsGetParams, options?: RequestOptions): Promise<SpecRevisionResponseRead>;
|
|
@@ -52,19 +54,26 @@ export interface SpecRevisionsListParams {
|
|
|
52
54
|
*/
|
|
53
55
|
cursor?: string;
|
|
54
56
|
/** Only revisions of this Spec. */
|
|
55
|
-
|
|
57
|
+
spec_id?: SpecId;
|
|
56
58
|
}
|
|
57
59
|
/** Typed errors `list` can throw. */
|
|
58
|
-
export type SpecRevisionsListError = BadRequestError | UnauthorizedError | ForbiddenError | NotFoundError |
|
|
60
|
+
export type SpecRevisionsListError = BadRequestError<ErrorModelRead> | UnauthorizedError<ErrorModelRead> | ForbiddenError<ErrorModelRead> | NotFoundError<ErrorModelRead> | RateLimitError<ErrorModelRead> | ServerError<ErrorModelRead> | RateLimitError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
|
|
59
61
|
export interface SpecRevisionsGetParams {
|
|
60
62
|
/**
|
|
61
63
|
* Add related data to the response. `diagnostics` adds the `diagnostics` and `patch_diagnostics`
|
|
62
64
|
* arrays.
|
|
63
65
|
*/
|
|
64
66
|
include?: "diagnostics";
|
|
67
|
+
/**
|
|
68
|
+
* Narrow the included Diagnostics to matching locations. Requires include=diagnostics. blocking:
|
|
69
|
+
* locations that fail the Diagnostic policy. introduced: locations new since the baseline. A
|
|
70
|
+
* Diagnostic with no matching location is omitted. diagnostic_summary always describes the
|
|
71
|
+
* complete revision.
|
|
72
|
+
*/
|
|
73
|
+
filter?: "blocking" | "introduced";
|
|
65
74
|
}
|
|
66
75
|
/** Typed errors `get` can throw. */
|
|
67
|
-
export type SpecRevisionsGetError = BadRequestError | UnauthorizedError | ForbiddenError | NotFoundError |
|
|
76
|
+
export type SpecRevisionsGetError = BadRequestError<ErrorModelRead> | UnauthorizedError<ErrorModelRead> | ForbiddenError<ErrorModelRead> | NotFoundError<ErrorModelRead> | RateLimitError<ErrorModelRead> | ServerError<ErrorModelRead> | RateLimitError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
|
|
68
77
|
export interface SpecRevisionsListFilesParams {
|
|
69
78
|
/**
|
|
70
79
|
* Maximum number of resources to return. Omit for 20; otherwise supply base-10 digits
|
|
@@ -83,5 +92,5 @@ export interface SpecRevisionsListFilesParams {
|
|
|
83
92
|
cursor?: string;
|
|
84
93
|
}
|
|
85
94
|
/** Typed errors `listFiles` can throw. */
|
|
86
|
-
export type SpecRevisionsListFilesError = BadRequestError | UnauthorizedError | ForbiddenError | NotFoundError |
|
|
95
|
+
export type SpecRevisionsListFilesError = BadRequestError<ErrorModelRead> | UnauthorizedError<ErrorModelRead> | ForbiddenError<ErrorModelRead> | NotFoundError<ErrorModelRead> | RateLimitError<ErrorModelRead> | ServerError<ErrorModelRead> | RateLimitError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
|
|
87
96
|
//# sourceMappingURL=spec-revisions.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spec-revisions.d.ts","sourceRoot":"","sources":["../../src/resources/spec-revisions.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,QAAQ,EAAE,KAAK,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAChE,OAAO,EAAY,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,EACL,kBAAkB,EAClB,cAAc,EACd,kBAAkB,EAClB,eAAe,EACf,eAAe,EACf,cAAc,EACd,
|
|
1
|
+
{"version":3,"file":"spec-revisions.d.ts","sourceRoot":"","sources":["../../src/resources/spec-revisions.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,QAAQ,EAAE,KAAK,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAChE,OAAO,EAAY,WAAW,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,EACL,cAAc,EACd,kBAAkB,EAClB,cAAc,EACd,kBAAkB,EAClB,eAAe,EACf,eAAe,EACf,cAAc,EACd,aAAa,EACb,WAAW,EACX,iBAAiB,EAClB,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAEV,cAAc,EACd,MAAM,EAKN,oBAAoB,EACpB,cAAc,EAGd,gBAAgB,EAEhB,wBAAwB,EACzB,MAAM,aAAa,CAAC;AAErB,qBAAa,qBAAqB;IACpB,OAAO,CAAC,QAAQ,CAAC,KAAK;gBAAL,KAAK,EAAE,QAAQ;IAC5C;;;;;;;;OAQG;IACH,IAAI,CACF,MAAM,CAAC,EAAE,uBAAuB,EAChC,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,gBAAgB,EAAE,sBAAsB,CAAC;IAuBxD;;;;;;;;;OASG;IACG,GAAG,CACP,cAAc,EAAE,cAAc,EAC9B,MAAM,CAAC,EAAE,sBAAsB,EAC/B,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,wBAAwB,CAAC;IAepC;;;;;;;;OAQG;IACH,SAAS,CACP,cAAc,EAAE,cAAc,EAC9B,MAAM,CAAC,EAAE,4BAA4B,EACrC,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,oBAAoB,EAAE,2BAA2B,CAAC;CAqBlE;AAED,MAAM,WAAW,uBAAuB;IACtC;;;;;OAKG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;;;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B,GAClB,kBAAkB,GAClB,cAAc,GACd,eAAe,CAAC"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Generated by
|
|
1
|
+
// Typeship — specRevisions resource.
|
|
2
|
+
// Generated by Typeship — https://typeship.dev
|
|
3
3
|
import { paginate } from "../core/pagination.js";
|
|
4
|
-
import { BadRequestError, ForbiddenError, InternalServerError, NotFoundError, RateLimitedError, UnauthorizedError, } from "../errors.js";
|
|
5
4
|
export class SpecRevisionsResource {
|
|
6
5
|
_core;
|
|
7
6
|
constructor(_core) {
|
|
@@ -24,15 +23,7 @@ export class SpecRevisionsResource {
|
|
|
24
23
|
query: {
|
|
25
24
|
limit: params?.limit,
|
|
26
25
|
cursor: params?.cursor,
|
|
27
|
-
spec_id: params?.
|
|
28
|
-
},
|
|
29
|
-
errors: {
|
|
30
|
-
"400": BadRequestError,
|
|
31
|
-
"401": UnauthorizedError,
|
|
32
|
-
"403": ForbiddenError,
|
|
33
|
-
"404": NotFoundError,
|
|
34
|
-
"429": RateLimitedError,
|
|
35
|
-
"500": InternalServerError,
|
|
26
|
+
spec_id: params?.spec_id,
|
|
36
27
|
},
|
|
37
28
|
idempotent: true,
|
|
38
29
|
schemaKey: "specRevisions.list",
|
|
@@ -51,7 +42,9 @@ export class SpecRevisionsResource {
|
|
|
51
42
|
*
|
|
52
43
|
* Returns metadata for a saved Spec Revision with a Diagnostics summary. Pass
|
|
53
44
|
* `include=diagnostics` to add every Diagnostic, evaluated with the Spec's current patches and
|
|
54
|
-
* Diagnostic policy.
|
|
45
|
+
* Diagnostic policy. Add `filter=blocking` to receive only the locations that fail the policy,
|
|
46
|
+
* which is what to fix when `diagnostic_summary.status` is blocked. List its source files and
|
|
47
|
+
* resolved document with listSpecRevisionFiles.
|
|
55
48
|
* `GET /spec-revisions/{spec_revision_id}`
|
|
56
49
|
*/
|
|
57
50
|
async get(specRevisionId, params, options) {
|
|
@@ -61,14 +54,7 @@ export class SpecRevisionsResource {
|
|
|
61
54
|
security: [{ "apiKey": [] }],
|
|
62
55
|
query: {
|
|
63
56
|
include: params?.include,
|
|
64
|
-
|
|
65
|
-
errors: {
|
|
66
|
-
"400": BadRequestError,
|
|
67
|
-
"401": UnauthorizedError,
|
|
68
|
-
"403": ForbiddenError,
|
|
69
|
-
"404": NotFoundError,
|
|
70
|
-
"429": RateLimitedError,
|
|
71
|
-
"500": InternalServerError,
|
|
57
|
+
filter: params?.filter,
|
|
72
58
|
},
|
|
73
59
|
idempotent: true,
|
|
74
60
|
schemaKey: "specRevisions.get",
|
|
@@ -93,14 +79,6 @@ export class SpecRevisionsResource {
|
|
|
93
79
|
limit: params?.limit,
|
|
94
80
|
cursor: params?.cursor,
|
|
95
81
|
},
|
|
96
|
-
errors: {
|
|
97
|
-
"400": BadRequestError,
|
|
98
|
-
"401": UnauthorizedError,
|
|
99
|
-
"403": ForbiddenError,
|
|
100
|
-
"404": NotFoundError,
|
|
101
|
-
"429": RateLimitedError,
|
|
102
|
-
"500": InternalServerError,
|
|
103
|
-
},
|
|
104
82
|
idempotent: true,
|
|
105
83
|
schemaKey: "specRevisions.listFiles",
|
|
106
84
|
options,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HttpCore, type RequestOptions } from "../core/http.js";
|
|
2
|
-
import { ResponseParseError, TransportError, UnexpectedApiError, ValidationError,
|
|
3
|
-
import type { SpecId, SpecRead, SpecUpdateRequest } from "../types.js";
|
|
2
|
+
import { RateLimitError, ResponseParseError, TransportError, UnexpectedApiError, ValidationError, BadRequestError, ConflictError, ForbiddenError, NotFoundError, PreconditionFailedError, ServerError, UnauthorizedError, UnprocessableEntityError } from "../errors.js";
|
|
3
|
+
import type { ErrorModelRead, SpecId, SpecRead, SpecUpdateRequest } from "../types.js";
|
|
4
4
|
export declare class SpecsResource {
|
|
5
5
|
private readonly _core;
|
|
6
6
|
constructor(_core: HttpCore);
|
|
@@ -10,7 +10,7 @@ export declare class SpecsResource {
|
|
|
10
10
|
*/
|
|
11
11
|
get(specId: SpecId, options?: RequestOptions): Promise<SpecRead>;
|
|
12
12
|
/**
|
|
13
|
-
* Update
|
|
13
|
+
* Update a Spec
|
|
14
14
|
*
|
|
15
15
|
* Resolves the source files before saving the update and records a new Spec Revision when the
|
|
16
16
|
* source changes.
|
|
@@ -28,7 +28,7 @@ export declare class SpecsResource {
|
|
|
28
28
|
*/
|
|
29
29
|
update(specId: SpecId, body: SpecUpdateRequest, params?: SpecsUpdateParams, options?: RequestOptions): Promise<SpecRead>;
|
|
30
30
|
/**
|
|
31
|
-
* Refresh a Spec
|
|
31
|
+
* Refresh a Spec
|
|
32
32
|
*
|
|
33
33
|
* Fetches the configured source now and creates a new Spec Revision only when its content
|
|
34
34
|
* changes. Diagnostics then reads that revision. If automatic generation is enabled, refresh
|
|
@@ -41,7 +41,7 @@ export declare class SpecsResource {
|
|
|
41
41
|
refresh(specId: SpecId, params?: SpecsRefreshParams, options?: RequestOptions): Promise<SpecRead>;
|
|
42
42
|
}
|
|
43
43
|
/** Typed errors `get` can throw. */
|
|
44
|
-
export type SpecsGetError = UnauthorizedError | ForbiddenError | NotFoundError |
|
|
44
|
+
export type SpecsGetError = UnauthorizedError<ErrorModelRead> | ForbiddenError<ErrorModelRead> | NotFoundError<ErrorModelRead> | RateLimitError<ErrorModelRead> | ServerError<ErrorModelRead> | RateLimitError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
|
|
45
45
|
export interface SpecsUpdateParams {
|
|
46
46
|
/**
|
|
47
47
|
* ETag from a preceding response. The write applies only if the resource still has that version;
|
|
@@ -58,7 +58,7 @@ export interface SpecsUpdateParams {
|
|
|
58
58
|
idempotencyKey?: string;
|
|
59
59
|
}
|
|
60
60
|
/** Typed errors `update` can throw. */
|
|
61
|
-
export type SpecsUpdateError = BadRequestError | UnauthorizedError | ForbiddenError | NotFoundError | ConflictError | PreconditionFailedError | UnprocessableEntityError |
|
|
61
|
+
export type SpecsUpdateError = BadRequestError<ErrorModelRead> | UnauthorizedError<ErrorModelRead> | ForbiddenError<ErrorModelRead> | NotFoundError<ErrorModelRead> | ConflictError<ErrorModelRead> | PreconditionFailedError | UnprocessableEntityError<ErrorModelRead> | RateLimitError<ErrorModelRead> | ServerError<ErrorModelRead> | RateLimitError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
|
|
62
62
|
export interface SpecsRefreshParams {
|
|
63
63
|
/**
|
|
64
64
|
* Identifies one logical write for 24 hours. The key is scoped to the authenticated organization
|
|
@@ -69,5 +69,5 @@ export interface SpecsRefreshParams {
|
|
|
69
69
|
idempotencyKey?: string;
|
|
70
70
|
}
|
|
71
71
|
/** Typed errors `refresh` can throw. */
|
|
72
|
-
export type SpecsRefreshError = BadRequestError | UnauthorizedError | ForbiddenError | NotFoundError | ConflictError | UnprocessableEntityError |
|
|
72
|
+
export type SpecsRefreshError = BadRequestError<ErrorModelRead> | UnauthorizedError<ErrorModelRead> | ForbiddenError<ErrorModelRead> | NotFoundError<ErrorModelRead> | ConflictError<ErrorModelRead> | UnprocessableEntityError<ErrorModelRead> | RateLimitError<ErrorModelRead> | ServerError<ErrorModelRead> | RateLimitError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
|
|
73
73
|
//# sourceMappingURL=specs.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"specs.d.ts","sourceRoot":"","sources":["../../src/resources/specs.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,QAAQ,EAAE,KAAK,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAChE,OAAO,EACL,kBAAkB,EAClB,cAAc,EACd,kBAAkB,EAClB,eAAe,EACf,eAAe,EACf,
|
|
1
|
+
{"version":3,"file":"specs.d.ts","sourceRoot":"","sources":["../../src/resources/specs.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,QAAQ,EAAE,KAAK,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAChE,OAAO,EACL,cAAc,EACd,kBAAkB,EAClB,cAAc,EACd,kBAAkB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AAC,GAC/B,iBAAiB,CAAC,cAAc,CAAC,GACjC,cAAc,CAAC,cAAc,CAAC,GAC9B,aAAa,CAAC,cAAc,CAAC,GAC7B,aAAa,CAAC,cAAc,CAAC,GAC7B,uBAAuB,GACvB,wBAAwB,CAAC,cAAc,CAAC,GACxC,cAAc,CAAC,cAAc,CAAC,GAC9B,WAAW,CAAC,cAAc,CAAC,GAC3B,cAAc,GACd,kBAAkB,GAClB,kBAAkB,GAClB,cAAc,GACd,eAAe,CAAC;AAEpB,MAAM,WAAW,kBAAkB;IACjC;;;;;OAKG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,wCAAwC;AACxC,MAAM,MAAM,iBAAiB,GACzB,eAAe,CAAC,cAAc,CAAC,GAC/B,iBAAiB,CAAC,cAAc,CAAC,GACjC,cAAc,CAAC,cAAc,CAAC,GAC9B,aAAa,CAAC,cAAc,CAAC,GAC7B,aAAa,CAAC,cAAc,CAAC,GAC7B,wBAAwB,CAAC,cAAc,CAAC,GACxC,cAAc,CAAC,cAAc,CAAC,GAC9B,WAAW,CAAC,cAAc,CAAC,GAC3B,cAAc,GACd,kBAAkB,GAClB,kBAAkB,GAClB,cAAc,GACd,eAAe,CAAC"}
|
package/dist/resources/specs.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Generated by
|
|
3
|
-
import {
|
|
1
|
+
// Typeship — specs resource.
|
|
2
|
+
// Generated by Typeship — https://typeship.dev
|
|
3
|
+
import { PreconditionFailedError, } from "../errors.js";
|
|
4
4
|
export class SpecsResource {
|
|
5
5
|
_core;
|
|
6
6
|
constructor(_core) {
|
|
@@ -15,20 +15,13 @@ export class SpecsResource {
|
|
|
15
15
|
method: "GET",
|
|
16
16
|
path: `/specs/${encodeURIComponent(String(specId))}`,
|
|
17
17
|
security: [{ "apiKey": [] }],
|
|
18
|
-
errors: {
|
|
19
|
-
"401": UnauthorizedError,
|
|
20
|
-
"403": ForbiddenError,
|
|
21
|
-
"404": NotFoundError,
|
|
22
|
-
"429": RateLimitedError,
|
|
23
|
-
"500": InternalServerError,
|
|
24
|
-
},
|
|
25
18
|
idempotent: true,
|
|
26
19
|
schemaKey: "specs.get",
|
|
27
20
|
options,
|
|
28
21
|
});
|
|
29
22
|
}
|
|
30
23
|
/**
|
|
31
|
-
* Update
|
|
24
|
+
* Update a Spec
|
|
32
25
|
*
|
|
33
26
|
* Resolves the source files before saving the update and records a new Spec Revision when the
|
|
34
27
|
* source changes.
|
|
@@ -54,24 +47,14 @@ export class SpecsResource {
|
|
|
54
47
|
"Idempotency-Key": params?.idempotencyKey === undefined ? undefined : String(params?.idempotencyKey),
|
|
55
48
|
},
|
|
56
49
|
body,
|
|
57
|
-
errors: {
|
|
58
|
-
"400": BadRequestError,
|
|
59
|
-
"401": UnauthorizedError,
|
|
60
|
-
"403": ForbiddenError,
|
|
61
|
-
"404": NotFoundError,
|
|
62
|
-
"409": ConflictError,
|
|
63
|
-
"412": PreconditionFailedError,
|
|
64
|
-
"422": UnprocessableEntityError,
|
|
65
|
-
"429": RateLimitedError,
|
|
66
|
-
"500": InternalServerError,
|
|
67
|
-
},
|
|
50
|
+
errors: { "412": PreconditionFailedError },
|
|
68
51
|
idempotencyKey: "Idempotency-Key",
|
|
69
52
|
schemaKey: "specs.update",
|
|
70
53
|
options,
|
|
71
54
|
});
|
|
72
55
|
}
|
|
73
56
|
/**
|
|
74
|
-
* Refresh a Spec
|
|
57
|
+
* Refresh a Spec
|
|
75
58
|
*
|
|
76
59
|
* Fetches the configured source now and creates a new Spec Revision only when its content
|
|
77
60
|
* changes. Diagnostics then reads that revision. If automatic generation is enabled, refresh
|
|
@@ -89,17 +72,6 @@ export class SpecsResource {
|
|
|
89
72
|
headers: {
|
|
90
73
|
"Idempotency-Key": params?.idempotencyKey === undefined ? undefined : String(params?.idempotencyKey),
|
|
91
74
|
},
|
|
92
|
-
errors: {
|
|
93
|
-
"400": BadRequestError,
|
|
94
|
-
"401": UnauthorizedError,
|
|
95
|
-
"403": ForbiddenError,
|
|
96
|
-
"404": NotFoundError,
|
|
97
|
-
"409": ConflictError,
|
|
98
|
-
"422": UnprocessableEntityError,
|
|
99
|
-
"429": RateLimitedError,
|
|
100
|
-
"500": InternalServerError,
|
|
101
|
-
"502": BadGatewayError,
|
|
102
|
-
},
|
|
103
75
|
idempotencyKey: "Idempotency-Key",
|
|
104
76
|
schemaKey: "specs.refresh",
|
|
105
77
|
options,
|