@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,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,
|
|
4
|
-
import type { DraftFileRead, DraftId, DraftRead, DraftRecoverRequest, DraftResolveRequest, DraftResponseRead, DraftStatus, DraftUpdateRequest, TargetId } from "../types.js";
|
|
3
|
+
import { RateLimitError, ResponseParseError, TransportError, UnexpectedApiError, ValidationError, BadRequestError, ConflictError, ForbiddenError, NotFoundError, PreconditionFailedError, ServerError, UnauthorizedError, UnprocessableEntityError } from "../errors.js";
|
|
4
|
+
import type { DraftFileRead, DraftId, DraftRead, DraftRecoverRequest, DraftResolveRequest, DraftResponseRead, DraftStatus, DraftUpdateRequest, ErrorModelRead, TargetId } from "../types.js";
|
|
5
5
|
export declare class DraftsResource {
|
|
6
6
|
private readonly _core;
|
|
7
7
|
constructor(_core: HttpCore);
|
|
@@ -19,14 +19,14 @@ export declare class DraftsResource {
|
|
|
19
19
|
* Get a Draft
|
|
20
20
|
*
|
|
21
21
|
* Returns the Draft's status. An open Draft also reports its typed reason when action is
|
|
22
|
-
* required, next version and its source,
|
|
23
|
-
* carries an `ETag`; send it in `If-Match` when
|
|
24
|
-
* version selection.
|
|
22
|
+
* required, next version and its source, compatibility and version assessment, blocking errors,
|
|
23
|
+
* checks, and conflict counts. The response carries an `ETag`; send it in `If-Match` when
|
|
24
|
+
* updating the Draft to avoid changing a newer version selection.
|
|
25
25
|
* `GET /drafts/{draft_id}`
|
|
26
26
|
*/
|
|
27
27
|
get(draftId: DraftId, options?: RequestOptions): Promise<DraftResponseRead>;
|
|
28
28
|
/**
|
|
29
|
-
*
|
|
29
|
+
* Update a Draft
|
|
30
30
|
*
|
|
31
31
|
* Checks your version choice against the required version bump, then regenerates the existing
|
|
32
32
|
* Draft pull request.
|
|
@@ -49,7 +49,7 @@ export declare class DraftsResource {
|
|
|
49
49
|
*/
|
|
50
50
|
update(draftId: DraftId, body: DraftUpdateRequest, params?: DraftsUpdateParams, options?: RequestOptions): Promise<DraftResponseRead>;
|
|
51
51
|
/**
|
|
52
|
-
* List
|
|
52
|
+
* List a Draft's files
|
|
53
53
|
*
|
|
54
54
|
* Lists the Draft's files that differ from the last merged package or need a conflict decision,
|
|
55
55
|
* ordered by path, without file content. Each conflict names its kind, the saved decision, and
|
|
@@ -64,7 +64,7 @@ export declare class DraftsResource {
|
|
|
64
64
|
*/
|
|
65
65
|
listFiles(draftId: DraftId, params?: DraftsListFilesParams, options?: RequestOptions): PagePromise<DraftFileRead, DraftsListFilesError>;
|
|
66
66
|
/**
|
|
67
|
-
* Resolve
|
|
67
|
+
* Resolve Draft conflicts
|
|
68
68
|
*
|
|
69
69
|
* Resolves conflicts on the Draft's head_sha: keep yours or generated, or supply final content as
|
|
70
70
|
* text or, for binary files, base64. Choosing generated for a customized path replaces it with
|
|
@@ -78,7 +78,7 @@ export declare class DraftsResource {
|
|
|
78
78
|
*/
|
|
79
79
|
resolve(draftId: DraftId, body: DraftResolveRequest, options?: RequestOptions): Promise<DraftResponseRead>;
|
|
80
80
|
/**
|
|
81
|
-
*
|
|
81
|
+
* Recover a Draft's history
|
|
82
82
|
*
|
|
83
83
|
* When the Draft has status `action_required` and reason `history_rewritten`, review affected
|
|
84
84
|
* files with `listDraftFiles` and `filter=history`, then approve with the Draft's
|
|
@@ -107,14 +107,14 @@ export interface DraftsListParams {
|
|
|
107
107
|
*/
|
|
108
108
|
cursor?: string;
|
|
109
109
|
/** Only Drafts of this Target. */
|
|
110
|
-
|
|
110
|
+
target_id?: TargetId;
|
|
111
111
|
/** Only Drafts with this status. */
|
|
112
112
|
status?: DraftStatus;
|
|
113
113
|
}
|
|
114
114
|
/** Typed errors `list` can throw. */
|
|
115
|
-
export type DraftsListError = BadRequestError | UnauthorizedError | ForbiddenError | NotFoundError |
|
|
115
|
+
export type DraftsListError = BadRequestError<ErrorModelRead> | UnauthorizedError<ErrorModelRead> | ForbiddenError<ErrorModelRead> | NotFoundError<ErrorModelRead> | RateLimitError<ErrorModelRead> | ServerError<ErrorModelRead> | RateLimitError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
|
|
116
116
|
/** Typed errors `get` can throw. */
|
|
117
|
-
export type DraftsGetError = UnauthorizedError | ForbiddenError | NotFoundError |
|
|
117
|
+
export type DraftsGetError = UnauthorizedError<ErrorModelRead> | ForbiddenError<ErrorModelRead> | NotFoundError<ErrorModelRead> | RateLimitError<ErrorModelRead> | ServerError<ErrorModelRead> | RateLimitError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
|
|
118
118
|
export interface DraftsUpdateParams {
|
|
119
119
|
/**
|
|
120
120
|
* ETag from a preceding response. The write applies only if the resource still has that version;
|
|
@@ -124,7 +124,7 @@ export interface DraftsUpdateParams {
|
|
|
124
124
|
ifMatch?: string;
|
|
125
125
|
}
|
|
126
126
|
/** Typed errors `update` can throw. */
|
|
127
|
-
export type DraftsUpdateError = BadRequestError | UnauthorizedError | ForbiddenError | NotFoundError | ConflictError | PreconditionFailedError | UnprocessableEntityError |
|
|
127
|
+
export type DraftsUpdateError = BadRequestError<ErrorModelRead> | UnauthorizedError<ErrorModelRead> | ForbiddenError<ErrorModelRead> | NotFoundError<ErrorModelRead> | ConflictError<ErrorModelRead> | PreconditionFailedError | UnprocessableEntityError<ErrorModelRead> | RateLimitError<ErrorModelRead> | ServerError<ErrorModelRead> | RateLimitError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
|
|
128
128
|
export interface DraftsListFilesParams {
|
|
129
129
|
/**
|
|
130
130
|
* conflicted: conflicts only. customized: files that differ from the last merged package.
|
|
@@ -149,9 +149,9 @@ export interface DraftsListFilesParams {
|
|
|
149
149
|
cursor?: string;
|
|
150
150
|
}
|
|
151
151
|
/** Typed errors `listFiles` can throw. */
|
|
152
|
-
export type DraftsListFilesError = BadRequestError | UnauthorizedError | ForbiddenError | NotFoundError | ConflictError |
|
|
152
|
+
export type DraftsListFilesError = BadRequestError<ErrorModelRead> | UnauthorizedError<ErrorModelRead> | ForbiddenError<ErrorModelRead> | NotFoundError<ErrorModelRead> | ConflictError<ErrorModelRead> | RateLimitError<ErrorModelRead> | ServerError<ErrorModelRead> | RateLimitError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
|
|
153
153
|
/** Typed errors `resolve` can throw. */
|
|
154
|
-
export type DraftsResolveError = BadRequestError | UnauthorizedError | ForbiddenError | NotFoundError | ConflictError |
|
|
154
|
+
export type DraftsResolveError = BadRequestError<ErrorModelRead> | UnauthorizedError<ErrorModelRead> | ForbiddenError<ErrorModelRead> | NotFoundError<ErrorModelRead> | ConflictError<ErrorModelRead> | RateLimitError<ErrorModelRead> | ServerError<ErrorModelRead> | RateLimitError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
|
|
155
155
|
/** Typed errors `recover` can throw. */
|
|
156
|
-
export type DraftsRecoverError = BadRequestError | UnauthorizedError | ForbiddenError | NotFoundError | ConflictError |
|
|
156
|
+
export type DraftsRecoverError = BadRequestError<ErrorModelRead> | UnauthorizedError<ErrorModelRead> | ForbiddenError<ErrorModelRead> | NotFoundError<ErrorModelRead> | ConflictError<ErrorModelRead> | RateLimitError<ErrorModelRead> | ServerError<ErrorModelRead> | RateLimitError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
|
|
157
157
|
//# sourceMappingURL=drafts.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"drafts.d.ts","sourceRoot":"","sources":["../../src/resources/drafts.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":"drafts.d.ts","sourceRoot":"","sources":["../../src/resources/drafts.ts"],"names":[],"mappings":"AAGA,OAAO,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AAiB,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"}
|
package/dist/resources/drafts.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Generated by
|
|
1
|
+
// Typeship — drafts resource.
|
|
2
|
+
// Generated by Typeship — https://typeship.dev
|
|
3
3
|
import { paginate } from "../core/pagination.js";
|
|
4
|
-
import {
|
|
4
|
+
import { PreconditionFailedError, } from "../errors.js";
|
|
5
5
|
export class DraftsResource {
|
|
6
6
|
_core;
|
|
7
7
|
constructor(_core) {
|
|
@@ -24,17 +24,9 @@ export class DraftsResource {
|
|
|
24
24
|
query: {
|
|
25
25
|
limit: params?.limit,
|
|
26
26
|
cursor: params?.cursor,
|
|
27
|
-
target_id: params?.
|
|
27
|
+
target_id: params?.target_id,
|
|
28
28
|
status: params?.status,
|
|
29
29
|
},
|
|
30
|
-
errors: {
|
|
31
|
-
"400": BadRequestError,
|
|
32
|
-
"401": UnauthorizedError,
|
|
33
|
-
"403": ForbiddenError,
|
|
34
|
-
"404": NotFoundError,
|
|
35
|
-
"429": RateLimitedError,
|
|
36
|
-
"500": InternalServerError,
|
|
37
|
-
},
|
|
38
30
|
idempotent: true,
|
|
39
31
|
schemaKey: "drafts.list",
|
|
40
32
|
options,
|
|
@@ -51,9 +43,9 @@ export class DraftsResource {
|
|
|
51
43
|
* Get a Draft
|
|
52
44
|
*
|
|
53
45
|
* Returns the Draft's status. An open Draft also reports its typed reason when action is
|
|
54
|
-
* required, next version and its source,
|
|
55
|
-
* carries an `ETag`; send it in `If-Match` when
|
|
56
|
-
* version selection.
|
|
46
|
+
* required, next version and its source, compatibility and version assessment, blocking errors,
|
|
47
|
+
* checks, and conflict counts. The response carries an `ETag`; send it in `If-Match` when
|
|
48
|
+
* updating the Draft to avoid changing a newer version selection.
|
|
57
49
|
* `GET /drafts/{draft_id}`
|
|
58
50
|
*/
|
|
59
51
|
async get(draftId, options) {
|
|
@@ -61,20 +53,13 @@ export class DraftsResource {
|
|
|
61
53
|
method: "GET",
|
|
62
54
|
path: `/drafts/${encodeURIComponent(String(draftId))}`,
|
|
63
55
|
security: [{ "apiKey": [] }],
|
|
64
|
-
errors: {
|
|
65
|
-
"401": UnauthorizedError,
|
|
66
|
-
"403": ForbiddenError,
|
|
67
|
-
"404": NotFoundError,
|
|
68
|
-
"429": RateLimitedError,
|
|
69
|
-
"500": InternalServerError,
|
|
70
|
-
},
|
|
71
56
|
idempotent: true,
|
|
72
57
|
schemaKey: "drafts.get",
|
|
73
58
|
options,
|
|
74
59
|
});
|
|
75
60
|
}
|
|
76
61
|
/**
|
|
77
|
-
*
|
|
62
|
+
* Update a Draft
|
|
78
63
|
*
|
|
79
64
|
* Checks your version choice against the required version bump, then regenerates the existing
|
|
80
65
|
* Draft pull request.
|
|
@@ -104,24 +89,13 @@ export class DraftsResource {
|
|
|
104
89
|
"If-Match": params?.ifMatch === undefined ? undefined : String(params?.ifMatch),
|
|
105
90
|
},
|
|
106
91
|
body,
|
|
107
|
-
errors: {
|
|
108
|
-
"400": BadRequestError,
|
|
109
|
-
"401": UnauthorizedError,
|
|
110
|
-
"403": ForbiddenError,
|
|
111
|
-
"404": NotFoundError,
|
|
112
|
-
"409": ConflictError,
|
|
113
|
-
"412": PreconditionFailedError,
|
|
114
|
-
"422": UnprocessableEntityError,
|
|
115
|
-
"429": RateLimitedError,
|
|
116
|
-
"500": InternalServerError,
|
|
117
|
-
"502": BadGatewayError,
|
|
118
|
-
},
|
|
92
|
+
errors: { "412": PreconditionFailedError },
|
|
119
93
|
schemaKey: "drafts.update",
|
|
120
94
|
options,
|
|
121
95
|
});
|
|
122
96
|
}
|
|
123
97
|
/**
|
|
124
|
-
* List
|
|
98
|
+
* List a Draft's files
|
|
125
99
|
*
|
|
126
100
|
* Lists the Draft's files that differ from the last merged package or need a conflict decision,
|
|
127
101
|
* ordered by path, without file content. Each conflict names its kind, the saved decision, and
|
|
@@ -144,15 +118,6 @@ export class DraftsResource {
|
|
|
144
118
|
limit: params?.limit,
|
|
145
119
|
cursor: params?.cursor,
|
|
146
120
|
},
|
|
147
|
-
errors: {
|
|
148
|
-
"400": BadRequestError,
|
|
149
|
-
"401": UnauthorizedError,
|
|
150
|
-
"403": ForbiddenError,
|
|
151
|
-
"404": NotFoundError,
|
|
152
|
-
"409": ConflictError,
|
|
153
|
-
"429": RateLimitedError,
|
|
154
|
-
"500": InternalServerError,
|
|
155
|
-
},
|
|
156
121
|
idempotent: true,
|
|
157
122
|
schemaKey: "drafts.listFiles",
|
|
158
123
|
options,
|
|
@@ -166,7 +131,7 @@ export class DraftsResource {
|
|
|
166
131
|
});
|
|
167
132
|
}
|
|
168
133
|
/**
|
|
169
|
-
* Resolve
|
|
134
|
+
* Resolve Draft conflicts
|
|
170
135
|
*
|
|
171
136
|
* Resolves conflicts on the Draft's head_sha: keep yours or generated, or supply final content as
|
|
172
137
|
* text or, for binary files, base64. Choosing generated for a customized path replaces it with
|
|
@@ -184,21 +149,12 @@ export class DraftsResource {
|
|
|
184
149
|
path: `/drafts/${encodeURIComponent(String(draftId))}/resolve`,
|
|
185
150
|
security: [{ "apiKey": [] }],
|
|
186
151
|
body,
|
|
187
|
-
errors: {
|
|
188
|
-
"400": BadRequestError,
|
|
189
|
-
"401": UnauthorizedError,
|
|
190
|
-
"403": ForbiddenError,
|
|
191
|
-
"404": NotFoundError,
|
|
192
|
-
"409": ConflictError,
|
|
193
|
-
"429": RateLimitedError,
|
|
194
|
-
"500": InternalServerError,
|
|
195
|
-
},
|
|
196
152
|
schemaKey: "drafts.resolve",
|
|
197
153
|
options,
|
|
198
154
|
});
|
|
199
155
|
}
|
|
200
156
|
/**
|
|
201
|
-
*
|
|
157
|
+
* Recover a Draft's history
|
|
202
158
|
*
|
|
203
159
|
* When the Draft has status `action_required` and reason `history_rewritten`, review affected
|
|
204
160
|
* files with `listDraftFiles` and `filter=history`, then approve with the Draft's
|
|
@@ -214,15 +170,6 @@ export class DraftsResource {
|
|
|
214
170
|
path: `/drafts/${encodeURIComponent(String(draftId))}/recover`,
|
|
215
171
|
security: [{ "apiKey": [] }],
|
|
216
172
|
body,
|
|
217
|
-
errors: {
|
|
218
|
-
"400": BadRequestError,
|
|
219
|
-
"401": UnauthorizedError,
|
|
220
|
-
"403": ForbiddenError,
|
|
221
|
-
"404": NotFoundError,
|
|
222
|
-
"409": ConflictError,
|
|
223
|
-
"429": RateLimitedError,
|
|
224
|
-
"500": InternalServerError,
|
|
225
|
-
},
|
|
226
173
|
schemaKey: "drafts.recover",
|
|
227
174
|
options,
|
|
228
175
|
});
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { HttpCore, type RequestOptions } from "../core/http.js";
|
|
2
|
-
import { ResponseParseError, TransportError, UnexpectedApiError, ValidationError, BadRequestError, ForbiddenError,
|
|
3
|
-
import type { FileId, FileResponseRead } from "../types.js";
|
|
2
|
+
import { RateLimitError, ResponseParseError, TransportError, UnexpectedApiError, ValidationError, BadRequestError, ForbiddenError, NotFoundError, ServerError, UnauthorizedError } from "../errors.js";
|
|
3
|
+
import type { ErrorModelRead, FileId, FileResponseRead } from "../types.js";
|
|
4
4
|
export declare class FilesResource {
|
|
5
5
|
private readonly _core;
|
|
6
6
|
constructor(_core: HttpCore);
|
|
7
7
|
/**
|
|
8
|
-
* Get a
|
|
8
|
+
* Get a File
|
|
9
9
|
*
|
|
10
10
|
* Returns one bounded chunk of an immutable file: at most 24 KiB, as UTF-8 text or, for binary
|
|
11
11
|
* bytes, base64. When next_cursor is not null, repeat the request with cursor and concatenate the
|
|
@@ -19,5 +19,5 @@ export interface FilesGetParams {
|
|
|
19
19
|
cursor?: string;
|
|
20
20
|
}
|
|
21
21
|
/** Typed errors `get` can throw. */
|
|
22
|
-
export type FilesGetError = BadRequestError | UnauthorizedError | ForbiddenError | NotFoundError |
|
|
22
|
+
export type FilesGetError = BadRequestError<ErrorModelRead> | UnauthorizedError<ErrorModelRead> | ForbiddenError<ErrorModelRead> | NotFoundError<ErrorModelRead> | RateLimitError<ErrorModelRead> | ServerError<ErrorModelRead> | RateLimitError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
|
|
23
23
|
//# sourceMappingURL=files.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"files.d.ts","sourceRoot":"","sources":["../../src/resources/files.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,cAAc,EACd,
|
|
1
|
+
{"version":3,"file":"files.d.ts","sourceRoot":"","sources":["../../src/resources/files.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,QAAQ,EAAE,KAAK,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAChE,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,EAEN,gBAAgB,EACjB,MAAM,aAAa,CAAC;AAErB,qBAAa,aAAa;IACZ,OAAO,CAAC,QAAQ,CAAC,KAAK;gBAAL,KAAK,EAAE,QAAQ;IAC5C;;;;;;;OAOG;IACG,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,cAAc,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,gBAAgB,CAAC;CAaxG;AAED,MAAM,WAAW,cAAc;IAC7B,yDAAyD;IACzD,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,oCAAoC;AACpC,MAAM,MAAM,aAAa,GACrB,eAAe,CAAC,cAAc,CAAC,GAC/B,iBAAiB,CAAC,cAAc,CAAC,GACjC,cAAc,CAAC,cAAc,CAAC,GAC9B,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"}
|
package/dist/resources/files.js
CHANGED
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Generated by
|
|
3
|
-
import { BadRequestError, ForbiddenError, InternalServerError, NotFoundError, RateLimitedError, UnauthorizedError, } from "../errors.js";
|
|
1
|
+
// Typeship — files resource.
|
|
2
|
+
// Generated by Typeship — https://typeship.dev
|
|
4
3
|
export class FilesResource {
|
|
5
4
|
_core;
|
|
6
5
|
constructor(_core) {
|
|
7
6
|
this._core = _core;
|
|
8
7
|
}
|
|
9
8
|
/**
|
|
10
|
-
* Get a
|
|
9
|
+
* Get a File
|
|
11
10
|
*
|
|
12
11
|
* Returns one bounded chunk of an immutable file: at most 24 KiB, as UTF-8 text or, for binary
|
|
13
12
|
* bytes, base64. When next_cursor is not null, repeat the request with cursor and concatenate the
|
|
@@ -22,14 +21,6 @@ export class FilesResource {
|
|
|
22
21
|
query: {
|
|
23
22
|
cursor: params?.cursor,
|
|
24
23
|
},
|
|
25
|
-
errors: {
|
|
26
|
-
"400": BadRequestError,
|
|
27
|
-
"401": UnauthorizedError,
|
|
28
|
-
"403": ForbiddenError,
|
|
29
|
-
"404": NotFoundError,
|
|
30
|
-
"429": RateLimitedError,
|
|
31
|
-
"500": InternalServerError,
|
|
32
|
-
},
|
|
33
24
|
idempotent: true,
|
|
34
25
|
schemaKey: "files.get",
|
|
35
26
|
options,
|
|
@@ -1,19 +1,12 @@
|
|
|
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 { FileModelRead, GenerationId, GenerationResponseRead, GenerationStatus,
|
|
3
|
+
import { RateLimitError, ResponseParseError, TransportError, UnexpectedApiError, ValidationError, BadRequestError, ForbiddenError, NotFoundError, ServerError, UnauthorizedError } from "../errors.js";
|
|
4
|
+
import type { ErrorModelRead, FileModelRead, GenerationId, GenerationRead, GenerationResponseRead, GenerationStatus, ProjectId, TargetId } from "../types.js";
|
|
5
5
|
export declare class GenerationsResource {
|
|
6
6
|
private readonly _core;
|
|
7
7
|
constructor(_core: HttpCore);
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
* Auto-paginates: `for await (const item of …)` walks every page.
|
|
12
|
-
* `GET /generations`
|
|
13
|
-
*/
|
|
14
|
-
list(params?: GenerationsListParams, options?: RequestOptions): PagePromise<GenerationSummaryRead, GenerationsListError>;
|
|
15
|
-
/**
|
|
16
|
-
* Get a generation
|
|
9
|
+
* Get a Generation
|
|
17
10
|
*
|
|
18
11
|
* Returns the status of that Generation. `queued` and `running` mean generation is still in
|
|
19
12
|
* progress. `completed` means generated files are saved, not that repository delivery or a Draft
|
|
@@ -21,6 +14,13 @@ export declare class GenerationsResource {
|
|
|
21
14
|
* `GET /generations/{generation_id}`
|
|
22
15
|
*/
|
|
23
16
|
get(generationId: GenerationId, options?: RequestOptions): Promise<GenerationResponseRead>;
|
|
17
|
+
/**
|
|
18
|
+
* List Generations
|
|
19
|
+
*
|
|
20
|
+
* Auto-paginates: `for await (const item of …)` walks every page.
|
|
21
|
+
* `GET /generations`
|
|
22
|
+
*/
|
|
23
|
+
list(params?: GenerationsListParams, options?: RequestOptions): PagePromise<GenerationRead, GenerationsListError>;
|
|
24
24
|
/**
|
|
25
25
|
* List a Generation's files
|
|
26
26
|
*
|
|
@@ -36,6 +36,8 @@ export declare class GenerationsResource {
|
|
|
36
36
|
waitTimeoutMs?: number;
|
|
37
37
|
}): Promise<GenerationResponseRead>;
|
|
38
38
|
}
|
|
39
|
+
/** Typed errors `get` can throw. */
|
|
40
|
+
export type GenerationsGetError = UnauthorizedError<ErrorModelRead> | ForbiddenError<ErrorModelRead> | NotFoundError<ErrorModelRead> | RateLimitError<ErrorModelRead> | ServerError<ErrorModelRead> | RateLimitError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
|
|
39
41
|
export interface GenerationsListParams {
|
|
40
42
|
/**
|
|
41
43
|
* Maximum number of resources to return. Omit for 20; otherwise supply base-10 digits
|
|
@@ -53,16 +55,14 @@ export interface GenerationsListParams {
|
|
|
53
55
|
*/
|
|
54
56
|
cursor?: string;
|
|
55
57
|
/** Only Generations in this Project. */
|
|
56
|
-
|
|
58
|
+
project_id?: ProjectId;
|
|
57
59
|
/** Only Generations of this Target. */
|
|
58
|
-
|
|
60
|
+
target_id?: TargetId;
|
|
59
61
|
/** Only Generations with this status. */
|
|
60
62
|
status?: GenerationStatus;
|
|
61
63
|
}
|
|
62
64
|
/** Typed errors `list` can throw. */
|
|
63
|
-
export type GenerationsListError = BadRequestError | UnauthorizedError | ForbiddenError | NotFoundError |
|
|
64
|
-
/** Typed errors `get` can throw. */
|
|
65
|
-
export type GenerationsGetError = UnauthorizedError | ForbiddenError | NotFoundError | RateLimitedError | InternalServerError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
|
|
65
|
+
export type GenerationsListError = BadRequestError<ErrorModelRead> | UnauthorizedError<ErrorModelRead> | ForbiddenError<ErrorModelRead> | NotFoundError<ErrorModelRead> | RateLimitError<ErrorModelRead> | ServerError<ErrorModelRead> | RateLimitError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
|
|
66
66
|
export interface GenerationsListFilesParams {
|
|
67
67
|
/**
|
|
68
68
|
* Maximum number of resources to return. Omit for 20; otherwise supply base-10 digits
|
|
@@ -81,5 +81,5 @@ export interface GenerationsListFilesParams {
|
|
|
81
81
|
cursor?: string;
|
|
82
82
|
}
|
|
83
83
|
/** Typed errors `listFiles` can throw. */
|
|
84
|
-
export type GenerationsListFilesError = BadRequestError | UnauthorizedError | ForbiddenError | NotFoundError |
|
|
84
|
+
export type GenerationsListFilesError = BadRequestError<ErrorModelRead> | UnauthorizedError<ErrorModelRead> | ForbiddenError<ErrorModelRead> | NotFoundError<ErrorModelRead> | RateLimitError<ErrorModelRead> | ServerError<ErrorModelRead> | RateLimitError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
|
|
85
85
|
//# sourceMappingURL=generations.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generations.d.ts","sourceRoot":"","sources":["../../src/resources/generations.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":"generations.d.ts","sourceRoot":"","sources":["../../src/resources/generations.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,EAId,aAAa,EAEb,YAAY,EAGZ,cAAc,EAEd,sBAAsB,EACtB,gBAAgB,EAChB,SAAS,EACT,QAAQ,EACT,MAAM,aAAa,CAAC;AAErB,qBAAa,mB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AgB,CAAC;CAC3B;AAED,qCAAqC;AACrC,MAAM,MAAM,oBAAoB,GAC5B,eAAe,CAAC,cAAc,CAAC,GAC/B,iBAAiB,CAAC,cAAc,CAAC,GACjC,cAAc,CAAC,cAAc,CAAC,GAC9B,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;AAEpB,MAAM,WAAW,0BAA0B;IACzC;;;;;OAKG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;;;OAMG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,0CAA0C;AAC1C,MAAM,MAAM,yBAAyB,GACjC,eAAe,CAAC,cAAc,CAAC,GAC/B,iBAAiB,CAAC,cAAc,CAAC,GACjC,cAAc,CAAC,cAAc,CAAC,GAC9B,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,31 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Generated by
|
|
1
|
+
// Typeship — generations 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 GenerationsResource {
|
|
6
5
|
_core;
|
|
7
6
|
constructor(_core) {
|
|
8
7
|
this._core = _core;
|
|
9
8
|
}
|
|
10
9
|
/**
|
|
11
|
-
*
|
|
10
|
+
* Get a Generation
|
|
11
|
+
*
|
|
12
|
+
* Returns the status of that Generation. `queued` and `running` mean generation is still in
|
|
13
|
+
* progress. `completed` means generated files are saved, not that repository delivery or a Draft
|
|
14
|
+
* is complete. List its files with listGenerationFiles and read each with getFile.
|
|
15
|
+
* `GET /generations/{generation_id}`
|
|
16
|
+
*/
|
|
17
|
+
async get(generationId, options) {
|
|
18
|
+
return this._core.requestData({
|
|
19
|
+
method: "GET",
|
|
20
|
+
path: `/generations/${encodeURIComponent(String(generationId))}`,
|
|
21
|
+
security: [{ "apiKey": [] }],
|
|
22
|
+
idempotent: true,
|
|
23
|
+
schemaKey: "generations.get",
|
|
24
|
+
options,
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* List Generations
|
|
12
29
|
*
|
|
13
30
|
* Auto-paginates: `for await (const item of …)` walks every page.
|
|
14
31
|
* `GET /generations`
|
|
@@ -21,18 +38,10 @@ export class GenerationsResource {
|
|
|
21
38
|
query: {
|
|
22
39
|
limit: params?.limit,
|
|
23
40
|
cursor: params?.cursor,
|
|
24
|
-
project_id: params?.
|
|
25
|
-
target_id: params?.
|
|
41
|
+
project_id: params?.project_id,
|
|
42
|
+
target_id: params?.target_id,
|
|
26
43
|
status: params?.status,
|
|
27
44
|
},
|
|
28
|
-
errors: {
|
|
29
|
-
"400": BadRequestError,
|
|
30
|
-
"401": UnauthorizedError,
|
|
31
|
-
"403": ForbiddenError,
|
|
32
|
-
"404": NotFoundError,
|
|
33
|
-
"429": RateLimitedError,
|
|
34
|
-
"500": InternalServerError,
|
|
35
|
-
},
|
|
36
45
|
idempotent: true,
|
|
37
46
|
schemaKey: "generations.list",
|
|
38
47
|
options,
|
|
@@ -45,31 +54,6 @@ export class GenerationsResource {
|
|
|
45
54
|
limitParam: "limit",
|
|
46
55
|
});
|
|
47
56
|
}
|
|
48
|
-
/**
|
|
49
|
-
* Get a generation
|
|
50
|
-
*
|
|
51
|
-
* Returns the status of that Generation. `queued` and `running` mean generation is still in
|
|
52
|
-
* progress. `completed` means generated files are saved, not that repository delivery or a Draft
|
|
53
|
-
* is complete. List its files with listGenerationFiles and read each with getFile.
|
|
54
|
-
* `GET /generations/{generation_id}`
|
|
55
|
-
*/
|
|
56
|
-
async get(generationId, options) {
|
|
57
|
-
return this._core.requestData({
|
|
58
|
-
method: "GET",
|
|
59
|
-
path: `/generations/${encodeURIComponent(String(generationId))}`,
|
|
60
|
-
security: [{ "apiKey": [] }],
|
|
61
|
-
errors: {
|
|
62
|
-
"401": UnauthorizedError,
|
|
63
|
-
"403": ForbiddenError,
|
|
64
|
-
"404": NotFoundError,
|
|
65
|
-
"429": RateLimitedError,
|
|
66
|
-
"500": InternalServerError,
|
|
67
|
-
},
|
|
68
|
-
idempotent: true,
|
|
69
|
-
schemaKey: "generations.get",
|
|
70
|
-
options,
|
|
71
|
-
});
|
|
72
|
-
}
|
|
73
57
|
/**
|
|
74
58
|
* List a Generation's files
|
|
75
59
|
*
|
|
@@ -87,14 +71,6 @@ export class GenerationsResource {
|
|
|
87
71
|
limit: params?.limit,
|
|
88
72
|
cursor: params?.cursor,
|
|
89
73
|
},
|
|
90
|
-
errors: {
|
|
91
|
-
"400": BadRequestError,
|
|
92
|
-
"401": UnauthorizedError,
|
|
93
|
-
"403": ForbiddenError,
|
|
94
|
-
"404": NotFoundError,
|
|
95
|
-
"429": RateLimitedError,
|
|
96
|
-
"500": InternalServerError,
|
|
97
|
-
},
|
|
98
74
|
idempotent: true,
|
|
99
75
|
schemaKey: "generations.listFiles",
|
|
100
76
|
options,
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { HttpCore, type RequestOptions } from "../core/http.js";
|
|
2
|
-
import { ResponseParseError, TransportError, UnexpectedApiError, ValidationError, ForbiddenError,
|
|
3
|
-
import type { OrganizationRead } from "../types.js";
|
|
2
|
+
import { RateLimitError, ResponseParseError, TransportError, UnexpectedApiError, ValidationError, ForbiddenError, ServerError, UnauthorizedError } from "../errors.js";
|
|
3
|
+
import type { ErrorModelRead, OrganizationRead } from "../types.js";
|
|
4
4
|
export declare class OrganizationResource {
|
|
5
5
|
private readonly _core;
|
|
6
6
|
constructor(_core: HttpCore);
|
|
7
7
|
/**
|
|
8
|
-
*
|
|
8
|
+
* Get the Organization
|
|
9
9
|
*
|
|
10
10
|
* Returns the organization associated with your credential. The Typeship CLI uses this endpoint
|
|
11
11
|
* for `whoami`.
|
|
@@ -14,5 +14,5 @@ export declare class OrganizationResource {
|
|
|
14
14
|
get(options?: RequestOptions): Promise<OrganizationRead>;
|
|
15
15
|
}
|
|
16
16
|
/** Typed errors `get` can throw. */
|
|
17
|
-
export type OrganizationGetError = UnauthorizedError | ForbiddenError |
|
|
17
|
+
export type OrganizationGetError = UnauthorizedError<ErrorModelRead> | ForbiddenError<ErrorModelRead> | RateLimitError<ErrorModelRead> | ServerError<ErrorModelRead> | RateLimitError | UnexpectedApiError | ResponseParseError | TransportError | ValidationError;
|
|
18
18
|
//# sourceMappingURL=organization.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"organization.d.ts","sourceRoot":"","sources":["../../src/resources/organization.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,cAAc,EACd,
|
|
1
|
+
{"version":3,"file":"organization.d.ts","sourceRoot":"","sources":["../../src/resources/organization.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,QAAQ,EAAE,KAAK,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAChE,OAAO,EACL,cAAc,EACd,kBAAkB,EAClB,cAAc,EACd,kBAAkB,EAClB,eAAe,EACf,cAAc,EACd,WAAW,EACX,iBAAiB,EAClB,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EAAc,cAAc,EAAgB,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE9F,qBAAa,oBAAoB;IACnB,OAAO,CAAC,QAAQ,CAAC,KAAK;gBAAL,KAAK,EAAE,QAAQ;IAC5C;;;;;;OAMG;IACG,GAAG,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,gBAAgB,CAAC;CAU/D;AAED,oCAAoC;AACpC,MAAM,MAAM,oBAAoB,GAC5B,iBAAiB,CAAC,cAAc,CAAC,GACjC,cAAc,CAAC,cAAc,CAAC,GAC9B,cAAc,CAAC,cAAc,CAAC,GAC9B,WAAW,CAAC,cAAc,CAAC,GAC3B,cAAc,GACd,kBAAkB,GAClB,kBAAkB,GAClB,cAAc,GACd,eAAe,CAAC"}
|
|
@@ -1,13 +1,12 @@
|
|
|
1
|
-
//
|
|
2
|
-
// Generated by
|
|
3
|
-
import { ForbiddenError, InternalServerError, RateLimitedError, UnauthorizedError, } from "../errors.js";
|
|
1
|
+
// Typeship — organization resource.
|
|
2
|
+
// Generated by Typeship — https://typeship.dev
|
|
4
3
|
export class OrganizationResource {
|
|
5
4
|
_core;
|
|
6
5
|
constructor(_core) {
|
|
7
6
|
this._core = _core;
|
|
8
7
|
}
|
|
9
8
|
/**
|
|
10
|
-
*
|
|
9
|
+
* Get the Organization
|
|
11
10
|
*
|
|
12
11
|
* Returns the organization associated with your credential. The Typeship CLI uses this endpoint
|
|
13
12
|
* for `whoami`.
|
|
@@ -18,12 +17,6 @@ export class OrganizationResource {
|
|
|
18
17
|
method: "GET",
|
|
19
18
|
path: "/organization",
|
|
20
19
|
security: [{ "apiKey": [] }],
|
|
21
|
-
errors: {
|
|
22
|
-
"401": UnauthorizedError,
|
|
23
|
-
"403": ForbiddenError,
|
|
24
|
-
"429": RateLimitedError,
|
|
25
|
-
"500": InternalServerError,
|
|
26
|
-
},
|
|
27
20
|
idempotent: true,
|
|
28
21
|
schemaKey: "organization.get",
|
|
29
22
|
options,
|