@typeship-ax/cli 0.10.0 → 0.21.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 +10 -5
- package/README.md +5 -5
- package/api.json +9773 -4501
- package/api.md +501 -271
- package/dist/api-identity.d.ts.map +1 -1
- package/dist/api-identity.js +6 -1
- package/dist/cli-agent.d.ts +5 -5
- package/dist/cli-agent.d.ts.map +1 -1
- package/dist/cli-agent.js +14 -10
- package/dist/cli.js +158 -82
- package/dist/core/http.d.ts +29 -16
- package/dist/core/http.d.ts.map +1 -1
- package/dist/core/http.js +108 -25
- package/dist/core/pagination.d.ts +8 -8
- package/dist/core/pagination.d.ts.map +1 -1
- package/dist/core/pagination.js +7 -16
- package/dist/errors.d.ts +20 -13
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +29 -20
- package/dist/index.d.ts +37 -19
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +42 -18
- package/dist/ops.d.ts +5 -1
- package/dist/ops.d.ts.map +1 -1
- package/dist/ops.js +42 -35
- package/dist/polling-login.d.ts.map +1 -1
- package/dist/polling-login.js +11 -1
- package/dist/resources/api-keys.d.ts +44 -18
- package/dist/resources/api-keys.d.ts.map +1 -1
- package/dist/resources/api-keys.js +46 -14
- package/dist/resources/deliveries.d.ts +46 -0
- package/dist/resources/deliveries.d.ts.map +1 -0
- package/dist/resources/deliveries.js +70 -0
- package/dist/resources/drafts.d.ts +155 -0
- package/dist/resources/drafts.d.ts.map +1 -0
- package/dist/resources/drafts.js +230 -0
- package/dist/resources/files.d.ts +23 -0
- package/dist/resources/files.d.ts.map +1 -0
- package/dist/resources/files.js +38 -0
- package/dist/resources/generate.d.ts +49 -20
- package/dist/resources/generate.d.ts.map +1 -1
- package/dist/resources/generate.js +56 -14
- package/dist/resources/generations.d.ts +70 -18
- package/dist/resources/generations.d.ts.map +1 -1
- package/dist/resources/generations.js +84 -16
- package/dist/resources/organization.d.ts +18 -0
- package/dist/resources/organization.d.ts.map +1 -0
- package/dist/resources/organization.js +32 -0
- package/dist/resources/projects.d.ts +87 -124
- package/dist/resources/projects.d.ts.map +1 -1
- package/dist/resources/projects.js +70 -173
- package/dist/resources/publications.d.ts +46 -0
- package/dist/resources/publications.d.ts.map +1 -0
- package/dist/resources/publications.js +70 -0
- package/dist/resources/releases.d.ts +66 -0
- package/dist/resources/releases.d.ts.map +1 -0
- package/dist/resources/releases.js +101 -0
- package/dist/resources/spec-revisions.d.ts +85 -0
- package/dist/resources/spec-revisions.d.ts.map +1 -0
- package/dist/resources/spec-revisions.js +116 -0
- package/dist/resources/specs.d.ts +72 -0
- package/dist/resources/specs.d.ts.map +1 -0
- package/dist/resources/specs.js +107 -0
- package/dist/resources/targets.d.ts +85 -105
- package/dist/resources/targets.d.ts.map +1 -1
- package/dist/resources/targets.js +70 -163
- package/dist/schemas.d.ts +1 -0
- package/dist/schemas.d.ts.map +1 -1
- package/dist/schemas.js +194 -139
- package/dist/types.d.ts +2626 -1141
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +90 -11
- package/package.json +3 -3
- package/src/api-identity.ts +6 -2
- package/src/cli-agent.ts +17 -13
- package/src/cli.ts +145 -77
- package/src/core/http.ts +106 -30
- package/src/core/pagination.ts +13 -23
- package/src/errors.ts +30 -20
- package/src/index.ts +46 -24
- package/src/ops.ts +47 -36
- package/src/polling-login.ts +10 -1
- package/src/resources/api-keys.ts +87 -19
- package/src/resources/deliveries.ts +139 -0
- package/src/resources/drafts.ts +422 -0
- package/src/resources/files.ts +68 -0
- package/src/resources/generate.ts +81 -19
- package/src/resources/generations.ts +167 -29
- package/src/resources/organization.ts +53 -0
- package/src/resources/projects.ts +129 -322
- package/src/resources/publications.ts +139 -0
- package/src/resources/releases.ts +199 -0
- package/src/resources/spec-revisions.ts +237 -0
- package/src/resources/specs.ts +200 -0
- package/src/resources/targets.ts +135 -304
- package/src/schemas.ts +195 -140
- package/src/types.ts +2793 -1177
- package/dist/resources/account.d.ts +0 -18
- package/dist/resources/account.d.ts.map +0 -1
- package/dist/resources/account.js +0 -27
- package/dist/resources/definition-revisions.d.ts +0 -58
- package/dist/resources/definition-revisions.d.ts.map +0 -1
- package/dist/resources/definition-revisions.js +0 -114
- package/dist/resources/definitions.d.ts +0 -35
- package/dist/resources/definitions.d.ts.map +0 -1
- package/dist/resources/definitions.js +0 -60
- package/src/resources/account.ts +0 -46
- package/src/resources/definition-revisions.ts +0 -207
- package/src/resources/definitions.ts +0 -122
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import { HttpCore, type RequestOptions } from "../core/http.js";
|
|
2
|
+
import { PagePromise } from "../core/pagination.js";
|
|
3
|
+
import { ResponseParseError, TransportError, UnexpectedApiError, ValidationError, BadRequestError, ForbiddenError, InternalServerError, NotFoundError, RateLimitedError, UnauthorizedError } from "../errors.js";
|
|
4
|
+
import type { SpecId, SpecRevisionFileRead, SpecRevisionId, SpecRevisionRead, SpecRevisionResponseRead } from "../types.js";
|
|
5
|
+
export declare class SpecRevisionsResource {
|
|
6
|
+
private readonly _core;
|
|
7
|
+
constructor(_core: HttpCore);
|
|
8
|
+
/**
|
|
9
|
+
* List Spec Revisions
|
|
10
|
+
*
|
|
11
|
+
* Lists Spec Revisions, newest first. Source content is not included; list a revision's files
|
|
12
|
+
* with listSpecRevisionFiles.
|
|
13
|
+
*
|
|
14
|
+
* Auto-paginates: `for await (const item of …)` walks every page.
|
|
15
|
+
* `GET /spec-revisions`
|
|
16
|
+
*/
|
|
17
|
+
list(params?: SpecRevisionsListParams, options?: RequestOptions): PagePromise<SpecRevisionRead, SpecRevisionsListError>;
|
|
18
|
+
/**
|
|
19
|
+
* Get a Spec Revision
|
|
20
|
+
*
|
|
21
|
+
* Returns metadata for a saved Spec Revision with a Diagnostics summary. Pass
|
|
22
|
+
* `include=diagnostics` to add every Diagnostic, evaluated with the Spec's current patches and
|
|
23
|
+
* Diagnostic policy. List its source files and resolved document with listSpecRevisionFiles.
|
|
24
|
+
* `GET /spec-revisions/{spec_revision_id}`
|
|
25
|
+
*/
|
|
26
|
+
get(specRevisionId: SpecRevisionId, params?: SpecRevisionsGetParams, options?: RequestOptions): Promise<SpecRevisionResponseRead>;
|
|
27
|
+
/**
|
|
28
|
+
* List a Spec Revision's files
|
|
29
|
+
*
|
|
30
|
+
* Lists the captured source files and the resolved document Typeship generated from, ordered by
|
|
31
|
+
* path. Read content with getFile.
|
|
32
|
+
*
|
|
33
|
+
* Auto-paginates: `for await (const item of …)` walks every page.
|
|
34
|
+
* `GET /spec-revisions/{spec_revision_id}/files`
|
|
35
|
+
*/
|
|
36
|
+
listFiles(specRevisionId: SpecRevisionId, params?: SpecRevisionsListFilesParams, options?: RequestOptions): PagePromise<SpecRevisionFileRead, SpecRevisionsListFilesError>;
|
|
37
|
+
}
|
|
38
|
+
export interface SpecRevisionsListParams {
|
|
39
|
+
/**
|
|
40
|
+
* Maximum number of resources to return. Omit for 20; otherwise supply base-10 digits
|
|
41
|
+
* representing an integer from 1 to 100. Empty, malformed, or out-of-range values return 400
|
|
42
|
+
* invalid_request. List query parameters must appear only once; unrecognized parameters also
|
|
43
|
+
* return 400.
|
|
44
|
+
*/
|
|
45
|
+
limit?: number;
|
|
46
|
+
/**
|
|
47
|
+
* Opaque cursor from the preceding page's next_cursor. Valid only for the same organization,
|
|
48
|
+
* operation, filters, and ordering that issued it. Omit to start at the first page. Empty,
|
|
49
|
+
* malformed, or repeated cursors return 400 invalid_request. The page limit may change between
|
|
50
|
+
* requests.
|
|
51
|
+
*/
|
|
52
|
+
cursor?: string;
|
|
53
|
+
/** Only revisions of this Spec. */
|
|
54
|
+
specId?: SpecId;
|
|
55
|
+
}
|
|
56
|
+
/** Typed errors `list` can throw. */
|
|
57
|
+
export type SpecRevisionsListError = BadRequestError | UnauthorizedError | ForbiddenError | NotFoundError | RateLimitedError | InternalServerError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
|
|
58
|
+
export interface SpecRevisionsGetParams {
|
|
59
|
+
/**
|
|
60
|
+
* Add related data to the response. `diagnostics` adds the `diagnostics` and `patch_diagnostics`
|
|
61
|
+
* arrays.
|
|
62
|
+
*/
|
|
63
|
+
include?: "diagnostics";
|
|
64
|
+
}
|
|
65
|
+
/** Typed errors `get` can throw. */
|
|
66
|
+
export type SpecRevisionsGetError = BadRequestError | UnauthorizedError | ForbiddenError | NotFoundError | RateLimitedError | InternalServerError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
|
|
67
|
+
export interface SpecRevisionsListFilesParams {
|
|
68
|
+
/**
|
|
69
|
+
* Maximum number of resources to return. Omit for 20; otherwise supply base-10 digits
|
|
70
|
+
* representing an integer from 1 to 100. Empty, malformed, or out-of-range values return 400
|
|
71
|
+
* invalid_request. List query parameters must appear only once; unrecognized parameters also
|
|
72
|
+
* return 400.
|
|
73
|
+
*/
|
|
74
|
+
limit?: number;
|
|
75
|
+
/**
|
|
76
|
+
* Opaque cursor from the preceding page's next_cursor. Valid only for the same organization,
|
|
77
|
+
* operation, filters, and ordering that issued it. Omit to start at the first page. Empty,
|
|
78
|
+
* malformed, or repeated cursors return 400 invalid_request. The page limit may change between
|
|
79
|
+
* requests.
|
|
80
|
+
*/
|
|
81
|
+
cursor?: string;
|
|
82
|
+
}
|
|
83
|
+
/** Typed errors `listFiles` can throw. */
|
|
84
|
+
export type SpecRevisionsListFilesError = BadRequestError | UnauthorizedError | ForbiddenError | NotFoundError | RateLimitedError | InternalServerError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
|
|
85
|
+
//# sourceMappingURL=spec-revisions.d.ts.map
|
|
@@ -0,0 +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,mBAAmB,EACnB,aAAa,EACb,gBAAgB,EAChB,iBAAiB,EAClB,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EACV,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;IA+BxD;;;;;;;OAOG;IACG,GAAG,CACP,cAAc,EAAE,cAAc,EAC9B,MAAM,CAAC,EAAE,sBAAsB,EAC/B,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,wBAAwB,CAAC;IAsBpC;;;;;;;;OAQG;IACH,SAAS,CACP,cAAc,EAAE,cAAc,EAC9B,MAAM,CAAC,EAAE,4BAA4B,EACrC,OAAO,CAAC,EAAE,cAAc,GACvB,WAAW,CAAC,oBAAoB,EAAE,2BAA2B,CAAC;CA6BlE;AAED,MAAM,WAAW,uBAAuB;IACtC;;;;;OAKG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;;OAKG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,mCAAmC;IACnC,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,qCAAqC;AACrC,MAAM,MAAM,sBAAsB,GAC9B,eAAe,GACf,iBAAiB,GACjB,cAAc,GACd,aAAa,GACb,gBAAgB,GAChB,mBAAmB,GACnB,kBAAkB,GAClB,kBAAkB,GAClB,cAAc,GACd,eAAe,CAAC;AAEpB,MAAM,WAAW,sBAAsB;IACrC;;;OAGG;IACH,OAAO,CAAC,EAAE,aAAa,CAAC;CACzB;AAED,oCAAoC;AACpC,MAAM,MAAM,qBAAqB,GAC7B,eAAe,GACf,iBAAiB,GACjB,cAAc,GACd,aAAa,GACb,gBAAgB,GAChB,mBAAmB,GACnB,kBAAkB,GAClB,kBAAkB,GAClB,cAAc,GACd,eAAe,CAAC;AAEpB,MAAM,WAAW,4BAA4B;IAC3C;;;;;OAKG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;;OAKG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,0CAA0C;AAC1C,MAAM,MAAM,2BAA2B,GACnC,eAAe,GACf,iBAAiB,GACjB,cAAc,GACd,aAAa,GACb,gBAAgB,GAChB,mBAAmB,GACnB,kBAAkB,GAClB,kBAAkB,GAClB,cAAc,GACd,eAAe,CAAC"}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
// typeship — specRevisions resource.
|
|
2
|
+
// Generated by typeship — https://typeship.dev
|
|
3
|
+
import { paginate } from "../core/pagination.js";
|
|
4
|
+
import { BadRequestError, ForbiddenError, InternalServerError, NotFoundError, RateLimitedError, UnauthorizedError, } from "../errors.js";
|
|
5
|
+
export class SpecRevisionsResource {
|
|
6
|
+
_core;
|
|
7
|
+
constructor(_core) {
|
|
8
|
+
this._core = _core;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* List Spec Revisions
|
|
12
|
+
*
|
|
13
|
+
* Lists Spec Revisions, newest first. Source content is not included; list a revision's files
|
|
14
|
+
* with listSpecRevisionFiles.
|
|
15
|
+
*
|
|
16
|
+
* Auto-paginates: `for await (const item of …)` walks every page.
|
|
17
|
+
* `GET /spec-revisions`
|
|
18
|
+
*/
|
|
19
|
+
list(params, options) {
|
|
20
|
+
return paginate(this._core, {
|
|
21
|
+
method: "GET",
|
|
22
|
+
path: "/spec-revisions",
|
|
23
|
+
security: [{ "apiKey": [] }],
|
|
24
|
+
query: {
|
|
25
|
+
limit: params?.limit,
|
|
26
|
+
cursor: params?.cursor,
|
|
27
|
+
spec_id: params?.specId,
|
|
28
|
+
},
|
|
29
|
+
errors: {
|
|
30
|
+
"400": BadRequestError,
|
|
31
|
+
"401": UnauthorizedError,
|
|
32
|
+
"403": ForbiddenError,
|
|
33
|
+
"404": NotFoundError,
|
|
34
|
+
"429": RateLimitedError,
|
|
35
|
+
"500": InternalServerError,
|
|
36
|
+
},
|
|
37
|
+
idempotent: true,
|
|
38
|
+
schemaKey: "specRevisions.list",
|
|
39
|
+
options,
|
|
40
|
+
}, {
|
|
41
|
+
style: "cursor",
|
|
42
|
+
itemsField: "data",
|
|
43
|
+
cursorParam: "cursor",
|
|
44
|
+
nextCursorField: "next_cursor",
|
|
45
|
+
hasMoreField: "has_more",
|
|
46
|
+
limitParam: "limit",
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Get a Spec Revision
|
|
51
|
+
*
|
|
52
|
+
* Returns metadata for a saved Spec Revision with a Diagnostics summary. Pass
|
|
53
|
+
* `include=diagnostics` to add every Diagnostic, evaluated with the Spec's current patches and
|
|
54
|
+
* Diagnostic policy. List its source files and resolved document with listSpecRevisionFiles.
|
|
55
|
+
* `GET /spec-revisions/{spec_revision_id}`
|
|
56
|
+
*/
|
|
57
|
+
async get(specRevisionId, params, options) {
|
|
58
|
+
return this._core.requestData({
|
|
59
|
+
method: "GET",
|
|
60
|
+
path: `/spec-revisions/${encodeURIComponent(String(specRevisionId))}`,
|
|
61
|
+
security: [{ "apiKey": [] }],
|
|
62
|
+
query: {
|
|
63
|
+
include: params?.include,
|
|
64
|
+
},
|
|
65
|
+
errors: {
|
|
66
|
+
"400": BadRequestError,
|
|
67
|
+
"401": UnauthorizedError,
|
|
68
|
+
"403": ForbiddenError,
|
|
69
|
+
"404": NotFoundError,
|
|
70
|
+
"429": RateLimitedError,
|
|
71
|
+
"500": InternalServerError,
|
|
72
|
+
},
|
|
73
|
+
idempotent: true,
|
|
74
|
+
schemaKey: "specRevisions.get",
|
|
75
|
+
options,
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
/**
|
|
79
|
+
* List a Spec Revision's files
|
|
80
|
+
*
|
|
81
|
+
* Lists the captured source files and the resolved document Typeship generated from, ordered by
|
|
82
|
+
* path. Read content with getFile.
|
|
83
|
+
*
|
|
84
|
+
* Auto-paginates: `for await (const item of …)` walks every page.
|
|
85
|
+
* `GET /spec-revisions/{spec_revision_id}/files`
|
|
86
|
+
*/
|
|
87
|
+
listFiles(specRevisionId, params, options) {
|
|
88
|
+
return paginate(this._core, {
|
|
89
|
+
method: "GET",
|
|
90
|
+
path: `/spec-revisions/${encodeURIComponent(String(specRevisionId))}/files`,
|
|
91
|
+
security: [{ "apiKey": [] }],
|
|
92
|
+
query: {
|
|
93
|
+
limit: params?.limit,
|
|
94
|
+
cursor: params?.cursor,
|
|
95
|
+
},
|
|
96
|
+
errors: {
|
|
97
|
+
"400": BadRequestError,
|
|
98
|
+
"401": UnauthorizedError,
|
|
99
|
+
"403": ForbiddenError,
|
|
100
|
+
"404": NotFoundError,
|
|
101
|
+
"429": RateLimitedError,
|
|
102
|
+
"500": InternalServerError,
|
|
103
|
+
},
|
|
104
|
+
idempotent: true,
|
|
105
|
+
schemaKey: "specRevisions.listFiles",
|
|
106
|
+
options,
|
|
107
|
+
}, {
|
|
108
|
+
style: "cursor",
|
|
109
|
+
itemsField: "data",
|
|
110
|
+
cursorParam: "cursor",
|
|
111
|
+
nextCursorField: "next_cursor",
|
|
112
|
+
hasMoreField: "has_more",
|
|
113
|
+
limitParam: "limit",
|
|
114
|
+
});
|
|
115
|
+
}
|
|
116
|
+
}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { HttpCore, type RequestOptions } from "../core/http.js";
|
|
2
|
+
import { ResponseParseError, TransportError, UnexpectedApiError, ValidationError, BadGatewayError, BadRequestError, ConflictError, ForbiddenError, InternalServerError, NotFoundError, PreconditionFailedError, RateLimitedError, UnauthorizedError, UnprocessableEntityError } from "../errors.js";
|
|
3
|
+
import type { SpecId, SpecRead, SpecUpdateRequest } from "../types.js";
|
|
4
|
+
export declare class SpecsResource {
|
|
5
|
+
private readonly _core;
|
|
6
|
+
constructor(_core: HttpCore);
|
|
7
|
+
/**
|
|
8
|
+
* Get a Spec
|
|
9
|
+
* `GET /specs/{spec_id}`
|
|
10
|
+
*/
|
|
11
|
+
get(specId: SpecId, options?: RequestOptions): Promise<SpecRead>;
|
|
12
|
+
/**
|
|
13
|
+
* Update and resolve a Spec
|
|
14
|
+
*
|
|
15
|
+
* Resolves the source files before saving the update and records a new Spec Revision when the
|
|
16
|
+
* source changes.
|
|
17
|
+
* Omitted fields remain unchanged; supplied objects and arrays replace the whole field.
|
|
18
|
+
* If the Spec or its Project configuration changes during validation, returns 409
|
|
19
|
+
* resource_changed without saving the rejected update. Retrieve the current Spec and Project,
|
|
20
|
+
* reconcile your changes,
|
|
21
|
+
* and submit a new request with a new Idempotency-Key if using one.
|
|
22
|
+
*
|
|
23
|
+
* See [conditional writes](https://typeship.dev/docs/typeship-api#conditional-writes) for ETag
|
|
24
|
+
* and If-Match.
|
|
25
|
+
*
|
|
26
|
+
* A `Idempotency-Key` UUID is generated per call (stable across retries) unless you pass one.
|
|
27
|
+
* `PATCH /specs/{spec_id}`
|
|
28
|
+
*/
|
|
29
|
+
update(specId: SpecId, body: SpecUpdateRequest, params?: SpecsUpdateParams, options?: RequestOptions): Promise<SpecRead>;
|
|
30
|
+
/**
|
|
31
|
+
* Refresh a Spec from its configured source
|
|
32
|
+
*
|
|
33
|
+
* Fetches the configured source now and creates a new Spec Revision only when its content
|
|
34
|
+
* changes. Diagnostics then reads that revision. If automatic generation is enabled, refresh
|
|
35
|
+
* queues generation for active Targets even when the source is unchanged.
|
|
36
|
+
*
|
|
37
|
+
* A `Idempotency-Key` UUID is generated per call (stable across retries) unless you pass one.
|
|
38
|
+
* `POST /specs/{spec_id}/refresh`
|
|
39
|
+
*/
|
|
40
|
+
refresh(specId: SpecId, params?: SpecsRefreshParams, options?: RequestOptions): Promise<SpecRead>;
|
|
41
|
+
}
|
|
42
|
+
/** Typed errors `get` can throw. */
|
|
43
|
+
export type SpecsGetError = UnauthorizedError | ForbiddenError | NotFoundError | RateLimitedError | InternalServerError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
|
|
44
|
+
export interface SpecsUpdateParams {
|
|
45
|
+
/**
|
|
46
|
+
* ETag from a preceding response. The write applies only if the resource still has that version;
|
|
47
|
+
* otherwise it returns 412 precondition_failed without changes. Omit to write the current
|
|
48
|
+
* version. See https://typeship.dev/docs/typeship-api#conditional-writes.
|
|
49
|
+
*/
|
|
50
|
+
ifMatch?: string;
|
|
51
|
+
/**
|
|
52
|
+
* Identifies one logical write for 24 hours. The key is scoped to the authenticated organization
|
|
53
|
+
* and operation; generation without an organization uses a hashed network identity. Retrying the
|
|
54
|
+
* same method, path, query, If-Match header, and JSON body replays the original response. Reusing
|
|
55
|
+
* the key with changed intent returns 409. After expiry the key starts a new write.
|
|
56
|
+
*/
|
|
57
|
+
idempotencyKey?: string;
|
|
58
|
+
}
|
|
59
|
+
/** Typed errors `update` can throw. */
|
|
60
|
+
export type SpecsUpdateError = BadRequestError | UnauthorizedError | ForbiddenError | NotFoundError | ConflictError | PreconditionFailedError | UnprocessableEntityError | RateLimitedError | InternalServerError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
|
|
61
|
+
export interface SpecsRefreshParams {
|
|
62
|
+
/**
|
|
63
|
+
* Identifies one logical write for 24 hours. The key is scoped to the authenticated organization
|
|
64
|
+
* and operation; generation without an organization uses a hashed network identity. Retrying the
|
|
65
|
+
* same method, path, query, If-Match header, and JSON body replays the original response. Reusing
|
|
66
|
+
* the key with changed intent returns 409. After expiry the key starts a new write.
|
|
67
|
+
*/
|
|
68
|
+
idempotencyKey?: string;
|
|
69
|
+
}
|
|
70
|
+
/** Typed errors `refresh` can throw. */
|
|
71
|
+
export type SpecsRefreshError = BadRequestError | UnauthorizedError | ForbiddenError | NotFoundError | ConflictError | UnprocessableEntityError | RateLimitedError | InternalServerError | BadGatewayError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
|
|
72
|
+
//# sourceMappingURL=specs.d.ts.map
|
|
@@ -0,0 +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,eAAe,EACf,aAAa,EACb,cAAc,EACd,mBAAmB,EACnB,aAAa,EACb,uBAAuB,EACvB,gBAAgB,EAChB,iBAAiB,EACjB,wBAAwB,EACzB,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAAQ,MAAM,EAAE,QAAQ,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAE7E,qBAAa,aAAa;IACZ,OAAO,CAAC,QAAQ,CAAC,KAAK;gBAAL,KAAK,EAAE,QAAQ;IAC5C;;;OAGG;IACG,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,QAAQ,CAAC;IAkBtE;;;;;;;;;;;;;;;;OAgBG;IACG,MAAM,CACV,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,iBAAiB,EACvB,MAAM,CAAC,EAAE,iBAAiB,EAC1B,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,QAAQ,CAAC;IA2BpB;;;;;;;;;OASG;IACG,OAAO,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,kBAAkB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,QAAQ,CAAC;CAwBxG;AAED,oCAAoC;AACpC,MAAM,MAAM,aAAa,GACrB,iBAAiB,GACjB,cAAc,GACd,aAAa,GACb,gBAAgB,GAChB,mBAAmB,GACnB,kBAAkB,GAClB,kBAAkB,GAClB,cAAc,GACd,eAAe,CAAC;AAEpB,MAAM,WAAW,iBAAiB;IAChC;;;;OAIG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;;;OAKG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,uCAAuC;AACvC,MAAM,MAAM,gBAAgB,GACxB,eAAe,GACf,iBAAiB,GACjB,cAAc,GACd,aAAa,GACb,aAAa,GACb,uBAAuB,GACvB,wBAAwB,GACxB,gBAAgB,GAChB,mBAAmB,GACnB,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,GACf,iBAAiB,GACjB,cAAc,GACd,aAAa,GACb,aAAa,GACb,wBAAwB,GACxB,gBAAgB,GAChB,mBAAmB,GACnB,eAAe,GACf,kBAAkB,GAClB,kBAAkB,GAClB,cAAc,GACd,eAAe,CAAC"}
|
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
// typeship — specs resource.
|
|
2
|
+
// Generated by typeship — https://typeship.dev
|
|
3
|
+
import { BadGatewayError, BadRequestError, ConflictError, ForbiddenError, InternalServerError, NotFoundError, PreconditionFailedError, RateLimitedError, UnauthorizedError, UnprocessableEntityError, } from "../errors.js";
|
|
4
|
+
export class SpecsResource {
|
|
5
|
+
_core;
|
|
6
|
+
constructor(_core) {
|
|
7
|
+
this._core = _core;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Get a Spec
|
|
11
|
+
* `GET /specs/{spec_id}`
|
|
12
|
+
*/
|
|
13
|
+
async get(specId, options) {
|
|
14
|
+
return this._core.requestData({
|
|
15
|
+
method: "GET",
|
|
16
|
+
path: `/specs/${encodeURIComponent(String(specId))}`,
|
|
17
|
+
security: [{ "apiKey": [] }],
|
|
18
|
+
errors: {
|
|
19
|
+
"401": UnauthorizedError,
|
|
20
|
+
"403": ForbiddenError,
|
|
21
|
+
"404": NotFoundError,
|
|
22
|
+
"429": RateLimitedError,
|
|
23
|
+
"500": InternalServerError,
|
|
24
|
+
},
|
|
25
|
+
idempotent: true,
|
|
26
|
+
schemaKey: "specs.get",
|
|
27
|
+
options,
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Update and resolve a Spec
|
|
32
|
+
*
|
|
33
|
+
* Resolves the source files before saving the update and records a new Spec Revision when the
|
|
34
|
+
* source changes.
|
|
35
|
+
* Omitted fields remain unchanged; supplied objects and arrays replace the whole field.
|
|
36
|
+
* If the Spec or its Project configuration changes during validation, returns 409
|
|
37
|
+
* resource_changed without saving the rejected update. Retrieve the current Spec and Project,
|
|
38
|
+
* reconcile your changes,
|
|
39
|
+
* and submit a new request with a new Idempotency-Key if using one.
|
|
40
|
+
*
|
|
41
|
+
* See [conditional writes](https://typeship.dev/docs/typeship-api#conditional-writes) for ETag
|
|
42
|
+
* and If-Match.
|
|
43
|
+
*
|
|
44
|
+
* A `Idempotency-Key` UUID is generated per call (stable across retries) unless you pass one.
|
|
45
|
+
* `PATCH /specs/{spec_id}`
|
|
46
|
+
*/
|
|
47
|
+
async update(specId, body, params, options) {
|
|
48
|
+
return this._core.requestData({
|
|
49
|
+
method: "PATCH",
|
|
50
|
+
path: `/specs/${encodeURIComponent(String(specId))}`,
|
|
51
|
+
security: [{ "apiKey": [] }],
|
|
52
|
+
headers: {
|
|
53
|
+
"If-Match": params?.ifMatch === undefined ? undefined : String(params?.ifMatch),
|
|
54
|
+
"Idempotency-Key": params?.idempotencyKey === undefined ? undefined : String(params?.idempotencyKey),
|
|
55
|
+
},
|
|
56
|
+
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
|
+
},
|
|
68
|
+
idempotencyKey: "Idempotency-Key",
|
|
69
|
+
schemaKey: "specs.update",
|
|
70
|
+
options,
|
|
71
|
+
});
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Refresh a Spec from its configured source
|
|
75
|
+
*
|
|
76
|
+
* Fetches the configured source now and creates a new Spec Revision only when its content
|
|
77
|
+
* changes. Diagnostics then reads that revision. If automatic generation is enabled, refresh
|
|
78
|
+
* queues generation for active Targets even when the source is unchanged.
|
|
79
|
+
*
|
|
80
|
+
* A `Idempotency-Key` UUID is generated per call (stable across retries) unless you pass one.
|
|
81
|
+
* `POST /specs/{spec_id}/refresh`
|
|
82
|
+
*/
|
|
83
|
+
async refresh(specId, params, options) {
|
|
84
|
+
return this._core.requestData({
|
|
85
|
+
method: "POST",
|
|
86
|
+
path: `/specs/${encodeURIComponent(String(specId))}/refresh`,
|
|
87
|
+
security: [{ "apiKey": [] }],
|
|
88
|
+
headers: {
|
|
89
|
+
"Idempotency-Key": params?.idempotencyKey === undefined ? undefined : String(params?.idempotencyKey),
|
|
90
|
+
},
|
|
91
|
+
errors: {
|
|
92
|
+
"400": BadRequestError,
|
|
93
|
+
"401": UnauthorizedError,
|
|
94
|
+
"403": ForbiddenError,
|
|
95
|
+
"404": NotFoundError,
|
|
96
|
+
"409": ConflictError,
|
|
97
|
+
"422": UnprocessableEntityError,
|
|
98
|
+
"429": RateLimitedError,
|
|
99
|
+
"500": InternalServerError,
|
|
100
|
+
"502": BadGatewayError,
|
|
101
|
+
},
|
|
102
|
+
idempotencyKey: "Idempotency-Key",
|
|
103
|
+
schemaKey: "specs.refresh",
|
|
104
|
+
options,
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
}
|
|
@@ -1,160 +1,140 @@
|
|
|
1
|
-
import { HttpCore, type
|
|
1
|
+
import { HttpCore, type RequestOptions } from "../core/http.js";
|
|
2
2
|
import { PagePromise } from "../core/pagination.js";
|
|
3
|
-
import { ResponseParseError, TransportError, UnexpectedApiError, ValidationError, BadGatewayError, BadRequestError, ConflictError, ForbiddenError, NotFoundError, RateLimitedError, UnauthorizedError, UnprocessableEntityError } from "../errors.js";
|
|
4
|
-
import type { DeletedTargetRead, ProjectId,
|
|
3
|
+
import { ResponseParseError, TransportError, UnexpectedApiError, ValidationError, BadGatewayError, BadRequestError, ConflictError, ForbiddenError, InternalServerError, NotFoundError, PaymentRequiredError, PreconditionFailedError, RateLimitedError, UnauthorizedError, UnprocessableEntityError } from "../errors.js";
|
|
4
|
+
import type { DeletedTargetRead, ProjectId, ReleaseResponseRead, TargetAdoption, TargetCreateRequest, TargetId, TargetRead, TargetResponseRead, TargetUpdateRequest } from "../types.js";
|
|
5
5
|
export declare class TargetsResource {
|
|
6
6
|
private readonly _core;
|
|
7
7
|
constructor(_core: HttpCore);
|
|
8
8
|
/**
|
|
9
|
-
* List
|
|
9
|
+
* List Targets
|
|
10
10
|
*
|
|
11
11
|
* Auto-paginates: `for await (const item of …)` walks every page.
|
|
12
|
-
* `GET /
|
|
12
|
+
* `GET /targets`
|
|
13
13
|
*/
|
|
14
|
-
list(
|
|
14
|
+
list(params?: TargetsListParams, options?: RequestOptions): PagePromise<TargetRead, TargetsListError>;
|
|
15
15
|
/**
|
|
16
16
|
* Create an independently configured Target
|
|
17
17
|
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
18
|
+
* Creates a Target with its own configuration, Deliveries, and release history. Multiple Targets
|
|
19
|
+
* can use the same generator.
|
|
20
20
|
*
|
|
21
21
|
* A `Idempotency-Key` UUID is generated per call (stable across retries) unless you pass one.
|
|
22
|
-
* `POST /
|
|
22
|
+
* `POST /targets`
|
|
23
23
|
*/
|
|
24
|
-
create(
|
|
24
|
+
create(body: TargetCreateRequest, params?: TargetsCreateParams, options?: RequestOptions): Promise<TargetResponseRead>;
|
|
25
25
|
/**
|
|
26
|
-
*
|
|
26
|
+
* Get a Target
|
|
27
27
|
* `GET /targets/{target_id}`
|
|
28
28
|
*/
|
|
29
|
-
|
|
29
|
+
get(targetId: TargetId, options?: RequestOptions): Promise<TargetResponseRead>;
|
|
30
30
|
/**
|
|
31
31
|
* Delete an unused Target
|
|
32
32
|
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
*/
|
|
37
|
-
delete(targetId: TargetId, options?: RequestOptions): Promise<ApiResult<DeletedTargetRead, TargetsDeleteError>>;
|
|
38
|
-
/**
|
|
39
|
-
* Update a Target, its Deliveries, or its next reviewed version
|
|
40
|
-
* `PATCH /targets/{target_id}`
|
|
41
|
-
*/
|
|
42
|
-
update(targetId: TargetId, body: TargetUpdateRequest, options?: RequestOptions): Promise<ApiResult<TargetResponseRead, TargetsUpdateError>>;
|
|
43
|
-
/**
|
|
44
|
-
* List immutable releases for a Target
|
|
33
|
+
* Deletes a Target with no Generation history, release history, or active Draft. A `409
|
|
34
|
+
* resource_has_dependencies` means one of those resources still depends on it. Retrieve the
|
|
35
|
+
* Target, disable it instead, or resolve the dependency before retrying.
|
|
45
36
|
*
|
|
46
|
-
*
|
|
47
|
-
*
|
|
37
|
+
* See [conditional writes](https://typeship.dev/docs/typeship-api#conditional-writes) for ETag
|
|
38
|
+
* and If-Match.
|
|
39
|
+
* `DELETE /targets/{target_id}`
|
|
48
40
|
*/
|
|
49
|
-
|
|
41
|
+
delete(targetId: TargetId, params?: TargetsDeleteParams, options?: RequestOptions): Promise<DeletedTargetRead>;
|
|
50
42
|
/**
|
|
51
|
-
*
|
|
43
|
+
* Update a Target or its Deliveries
|
|
52
44
|
*
|
|
53
|
-
*
|
|
54
|
-
*
|
|
55
|
-
*
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
* Select
|
|
45
|
+
* Omitted fields keep their current values. Supplied config, checks, and deliveries replace their
|
|
46
|
+
* complete stored values.
|
|
47
|
+
* With Project auto_generate enabled, changing Target config, checks, or Deliveries queues that
|
|
48
|
+
* Target's Generation. A queued or running Target reuses that Generation.
|
|
49
|
+
* Omitting If-Match applies the update to the current resource; with If-Match, a stale ETag
|
|
50
|
+
* returns 412 precondition_failed without saving.
|
|
51
|
+
* Select the next version through PATCH /drafts/{draft_id} on the Target's draft_id.
|
|
60
52
|
*
|
|
61
|
-
*
|
|
62
|
-
*
|
|
63
|
-
*
|
|
53
|
+
* A `409 target_busy` means the Target is publishing; wait for it to finish. A `409
|
|
54
|
+
* delivery_conflict` means another Target owns the requested repository tree; retrieve both
|
|
55
|
+
* Targets, choose a free destination, and retry.
|
|
56
|
+
* A `502` response means the update was saved, but retiring an obsolete review or regenerating
|
|
57
|
+
* the Target failed. Retrieve the Target and follow the error's retryable and suggested_action
|
|
58
|
+
* fields.
|
|
59
|
+
* See [conditional writes](https://typeship.dev/docs/typeship-api#conditional-writes) for ETag
|
|
60
|
+
* and If-Match.
|
|
61
|
+
* `PATCH /targets/{target_id}`
|
|
64
62
|
*/
|
|
65
|
-
|
|
63
|
+
update(targetId: TargetId, body: TargetUpdateRequest, params?: TargetsUpdateParams, options?: RequestOptions): Promise<TargetResponseRead>;
|
|
66
64
|
/**
|
|
67
|
-
* Adopt a verified existing package as
|
|
65
|
+
* Adopt a verified existing package as the latest release
|
|
68
66
|
*
|
|
69
|
-
*
|
|
70
|
-
*
|
|
71
|
-
*
|
|
67
|
+
* Checks the repository tag, package metadata, and registry artifact, then records the package as
|
|
68
|
+
* an Imported latest release. Opens the first Typeship Draft at the next major version; review it
|
|
69
|
+
* to establish the baseline for preserving existing code.
|
|
72
70
|
*
|
|
73
71
|
* A `Idempotency-Key` UUID is generated per call (stable across retries) unless you pass one.
|
|
74
72
|
* `POST /targets/{target_id}/adopt`
|
|
75
73
|
*/
|
|
76
|
-
|
|
77
|
-
/**
|
|
78
|
-
* Retrieve an immutable Target release
|
|
79
|
-
* `GET /target_releases/{target_release_id}`
|
|
80
|
-
*/
|
|
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>>;
|
|
74
|
+
adopt(targetId: TargetId, body: TargetAdoption, params?: TargetsAdoptParams, options?: RequestOptions): Promise<ReleaseResponseRead>;
|
|
92
75
|
}
|
|
93
76
|
export interface TargetsListParams {
|
|
94
|
-
/**
|
|
77
|
+
/**
|
|
78
|
+
* Maximum number of resources to return. Omit for 20; otherwise supply base-10 digits
|
|
79
|
+
* representing an integer from 1 to 100. Empty, malformed, or out-of-range values return 400
|
|
80
|
+
* invalid_request. List query parameters must appear only once; unrecognized parameters also
|
|
81
|
+
* return 400.
|
|
82
|
+
*/
|
|
95
83
|
limit?: number;
|
|
96
84
|
/**
|
|
97
|
-
* Opaque cursor from the preceding page's next_cursor. Valid only for the same
|
|
98
|
-
* operation, filters, and ordering that issued it.
|
|
85
|
+
* Opaque cursor from the preceding page's next_cursor. Valid only for the same organization,
|
|
86
|
+
* operation, filters, and ordering that issued it. Omit to start at the first page. Empty,
|
|
87
|
+
* malformed, or repeated cursors return 400 invalid_request. The page limit may change between
|
|
88
|
+
* requests.
|
|
99
89
|
*/
|
|
100
90
|
cursor?: string;
|
|
91
|
+
/** Only Targets in this Project. */
|
|
92
|
+
projectId?: ProjectId;
|
|
101
93
|
}
|
|
102
|
-
/**
|
|
103
|
-
export type TargetsListError = BadRequestError | UnauthorizedError | ForbiddenError | NotFoundError | RateLimitedError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
|
|
94
|
+
/** Typed errors `list` can throw. */
|
|
95
|
+
export type TargetsListError = BadRequestError | UnauthorizedError | ForbiddenError | NotFoundError | RateLimitedError | InternalServerError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
|
|
104
96
|
export interface TargetsCreateParams {
|
|
105
97
|
/**
|
|
106
|
-
* Identifies one logical write for 24 hours. The key is scoped to the authenticated
|
|
107
|
-
* operation;
|
|
108
|
-
* path, query, and JSON body replays the original response. Reusing
|
|
109
|
-
* returns 409. After expiry the key starts a new write.
|
|
98
|
+
* Identifies one logical write for 24 hours. The key is scoped to the authenticated organization
|
|
99
|
+
* and operation; generation without an organization uses a hashed network identity. Retrying the
|
|
100
|
+
* same method, path, query, If-Match header, and JSON body replays the original response. Reusing
|
|
101
|
+
* the key with changed intent returns 409. After expiry the key starts a new write.
|
|
110
102
|
*/
|
|
111
103
|
idempotencyKey?: string;
|
|
112
104
|
}
|
|
113
|
-
/**
|
|
114
|
-
export type TargetsCreateError = BadRequestError | UnauthorizedError | ForbiddenError | NotFoundError | ConflictError | UnprocessableEntityError | RateLimitedError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
|
|
115
|
-
/**
|
|
116
|
-
export type
|
|
117
|
-
|
|
118
|
-
export type TargetsDeleteError = UnauthorizedError | ForbiddenError | NotFoundError | ConflictError | RateLimitedError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
|
|
119
|
-
/** Every error `update` can produce, as a discriminated union. */
|
|
120
|
-
export type TargetsUpdateError = BadRequestError | UnauthorizedError | ForbiddenError | NotFoundError | ConflictError | UnprocessableEntityError | RateLimitedError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
|
|
121
|
-
export interface TargetsListReleasesParams {
|
|
122
|
-
/** Maximum number of resources to return. */
|
|
123
|
-
limit?: number;
|
|
105
|
+
/** Typed errors `create` can throw. */
|
|
106
|
+
export type TargetsCreateError = BadRequestError | UnauthorizedError | PaymentRequiredError | ForbiddenError | NotFoundError | ConflictError | UnprocessableEntityError | RateLimitedError | InternalServerError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
|
|
107
|
+
/** Typed errors `get` can throw. */
|
|
108
|
+
export type TargetsGetError = UnauthorizedError | ForbiddenError | NotFoundError | RateLimitedError | InternalServerError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
|
|
109
|
+
export interface TargetsDeleteParams {
|
|
124
110
|
/**
|
|
125
|
-
*
|
|
126
|
-
*
|
|
111
|
+
* ETag from a preceding response. The write applies only if the resource still has that version;
|
|
112
|
+
* otherwise it returns 412 precondition_failed without changes. Omit to write the current
|
|
113
|
+
* version. See https://typeship.dev/docs/typeship-api#conditional-writes.
|
|
127
114
|
*/
|
|
128
|
-
|
|
115
|
+
ifMatch?: string;
|
|
129
116
|
}
|
|
130
|
-
/**
|
|
131
|
-
export type
|
|
132
|
-
|
|
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 {
|
|
117
|
+
/** Typed errors `delete` can throw. */
|
|
118
|
+
export type TargetsDeleteError = BadRequestError | UnauthorizedError | ForbiddenError | NotFoundError | ConflictError | PreconditionFailedError | RateLimitedError | InternalServerError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
|
|
119
|
+
export interface TargetsUpdateParams {
|
|
137
120
|
/**
|
|
138
|
-
*
|
|
139
|
-
*
|
|
140
|
-
*
|
|
141
|
-
* returns 409. After expiry the key starts a new write.
|
|
121
|
+
* ETag from a preceding response. The write applies only if the resource still has that version;
|
|
122
|
+
* otherwise it returns 412 precondition_failed without changes. Omit to write the current
|
|
123
|
+
* version. See https://typeship.dev/docs/typeship-api#conditional-writes.
|
|
142
124
|
*/
|
|
143
|
-
|
|
125
|
+
ifMatch?: string;
|
|
144
126
|
}
|
|
145
|
-
/**
|
|
146
|
-
export type
|
|
147
|
-
|
|
148
|
-
export type TargetsRetrieveReleaseError = UnauthorizedError | ForbiddenError | NotFoundError | RateLimitedError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
|
|
149
|
-
export interface TargetsRepublishReleaseParams {
|
|
127
|
+
/** Typed errors `update` can throw. */
|
|
128
|
+
export type TargetsUpdateError = BadRequestError | UnauthorizedError | PaymentRequiredError | ForbiddenError | NotFoundError | ConflictError | PreconditionFailedError | UnprocessableEntityError | RateLimitedError | InternalServerError | BadGatewayError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
|
|
129
|
+
export interface TargetsAdoptParams {
|
|
150
130
|
/**
|
|
151
|
-
* Identifies one logical write for 24 hours. The key is scoped to the authenticated
|
|
152
|
-
* operation;
|
|
153
|
-
* path, query, and JSON body replays the original response. Reusing
|
|
154
|
-
* returns 409. After expiry the key starts a new write.
|
|
131
|
+
* Identifies one logical write for 24 hours. The key is scoped to the authenticated organization
|
|
132
|
+
* and operation; generation without an organization uses a hashed network identity. Retrying the
|
|
133
|
+
* same method, path, query, If-Match header, and JSON body replays the original response. Reusing
|
|
134
|
+
* the key with changed intent returns 409. After expiry the key starts a new write.
|
|
155
135
|
*/
|
|
156
136
|
idempotencyKey?: string;
|
|
157
137
|
}
|
|
158
|
-
/**
|
|
159
|
-
export type
|
|
138
|
+
/** Typed errors `adopt` can throw. */
|
|
139
|
+
export type TargetsAdoptError = BadRequestError | UnauthorizedError | ForbiddenError | NotFoundError | ConflictError | UnprocessableEntityError | RateLimitedError | InternalServerError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
|
|
160
140
|
//# sourceMappingURL=targets.d.ts.map
|