@typeship-ax/cli 0.20.0 → 0.21.1
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 +3 -3
- package/README.md +2 -2
- package/api.json +7355 -6233
- package/api.md +332 -398
- package/dist/api-identity.d.ts.map +1 -1
- package/dist/api-identity.js +6 -1
- package/dist/cli.js +15 -15
- package/dist/core/http.d.ts +26 -14
- package/dist/core/http.d.ts.map +1 -1
- package/dist/core/http.js +90 -19
- 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 +4 -4
- package/dist/errors.d.ts.map +1 -1
- package/dist/errors.js +7 -7
- package/dist/index.d.ts +33 -19
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +37 -17
- package/dist/ops.d.ts +1 -1
- package/dist/ops.d.ts.map +1 -1
- package/dist/ops.js +39 -42
- package/dist/resources/api-keys.d.ts +10 -10
- package/dist/resources/api-keys.d.ts.map +1 -1
- package/dist/resources/api-keys.js +6 -6
- 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 +14 -14
- package/dist/resources/generate.d.ts.map +1 -1
- package/dist/resources/generate.js +7 -7
- package/dist/resources/generations.d.ts +65 -21
- package/dist/resources/generations.d.ts.map +1 -1
- package/dist/resources/generations.js +67 -20
- package/dist/resources/organization.d.ts +18 -0
- package/dist/resources/organization.d.ts.map +1 -0
- package/dist/resources/{account.js → organization.js} +10 -10
- package/dist/resources/projects.d.ts +36 -126
- package/dist/resources/projects.d.ts.map +1 -1
- package/dist/resources/projects.js +21 -171
- 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 +42 -262
- package/dist/resources/targets.d.ts.map +1 -1
- package/dist/resources/targets.js +28 -407
- package/dist/schemas.d.ts.map +1 -1
- package/dist/schemas.js +149 -154
- package/dist/types.d.ts +1281 -1611
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +44 -49
- package/package.json +1 -1
- package/src/api-identity.ts +6 -2
- package/src/cli.ts +16 -16
- package/src/core/http.ts +89 -24
- package/src/core/pagination.ts +13 -23
- package/src/errors.ts +7 -7
- package/src/index.ts +41 -23
- package/src/ops.ts +40 -43
- package/src/resources/api-keys.ts +13 -16
- 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 +16 -19
- package/src/resources/generations.ts +146 -35
- package/src/resources/{account.ts → organization.ts} +14 -14
- package/src/resources/projects.ts +42 -337
- 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 +57 -760
- package/src/schemas.ts +149 -154
- package/src/types.ts +1357 -1692
- package/dist/resources/account.d.ts +0 -18
- package/dist/resources/account.d.ts.map +0 -1
- package/dist/resources/definition-revisions.d.ts +0 -75
- package/dist/resources/definition-revisions.d.ts.map +0 -1
- package/dist/resources/definition-revisions.js +0 -142
- package/dist/resources/definitions.d.ts +0 -50
- package/dist/resources/definitions.d.ts.map +0 -1
- package/dist/resources/definitions.js +0 -73
- package/src/resources/definition-revisions.ts +0 -265
- package/src/resources/definitions.ts +0 -146
|
@@ -1,146 +0,0 @@
|
|
|
1
|
-
// typeship — definitions resource.
|
|
2
|
-
// Generated by typeship — https://typeship.dev
|
|
3
|
-
|
|
4
|
-
import { HttpCore, type ApiResult, type RequestOptions } from "../core/http.js";
|
|
5
|
-
import {
|
|
6
|
-
ResponseParseError,
|
|
7
|
-
TransportError,
|
|
8
|
-
UnexpectedApiError,
|
|
9
|
-
ValidationError,
|
|
10
|
-
BadRequestError,
|
|
11
|
-
ConflictError,
|
|
12
|
-
ForbiddenError,
|
|
13
|
-
InternalServerError,
|
|
14
|
-
NotFoundError,
|
|
15
|
-
PreconditionFailedError,
|
|
16
|
-
RateLimitedError,
|
|
17
|
-
UnauthorizedError,
|
|
18
|
-
UnprocessableEntityError,
|
|
19
|
-
} from "../errors.js";
|
|
20
|
-
import type {
|
|
21
|
-
Definition,
|
|
22
|
-
DefinitionId,
|
|
23
|
-
DefinitionRead,
|
|
24
|
-
DefinitionUpdateRequest,
|
|
25
|
-
} from "../types.js";
|
|
26
|
-
|
|
27
|
-
export class DefinitionsResource {
|
|
28
|
-
constructor(private readonly _core: HttpCore) {}
|
|
29
|
-
/**
|
|
30
|
-
* Retrieve a Definition
|
|
31
|
-
* `GET /definitions/{definition_id}`
|
|
32
|
-
*/
|
|
33
|
-
async retrieve(
|
|
34
|
-
definitionId: DefinitionId,
|
|
35
|
-
options?: RequestOptions,
|
|
36
|
-
): Promise<ApiResult<DefinitionRead, DefinitionsRetrieveError>> {
|
|
37
|
-
return this._core.request<DefinitionRead, DefinitionsRetrieveError>({
|
|
38
|
-
method: "GET",
|
|
39
|
-
path: `/definitions/${encodeURIComponent(String(definitionId))}`,
|
|
40
|
-
security: [{"apiKey":[]}],
|
|
41
|
-
errors: {
|
|
42
|
-
"401": UnauthorizedError,
|
|
43
|
-
"403": ForbiddenError,
|
|
44
|
-
"404": NotFoundError,
|
|
45
|
-
"429": RateLimitedError,
|
|
46
|
-
"500": InternalServerError,
|
|
47
|
-
},
|
|
48
|
-
idempotent: true,
|
|
49
|
-
schemaKey: "definitions.retrieve",
|
|
50
|
-
options,
|
|
51
|
-
});
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
/**
|
|
55
|
-
* Update and resolve a Definition
|
|
56
|
-
*
|
|
57
|
-
* Resolves the source documents before saving the update and records a new Definition Revision
|
|
58
|
-
* when the source changes.
|
|
59
|
-
* Omitted fields remain unchanged; supplied objects and arrays replace the whole field.
|
|
60
|
-
* If the Definition or its Project configuration changes during validation, returns 409
|
|
61
|
-
* definition_changed without saving the rejected update. Retrieve the current Definition and
|
|
62
|
-
* Project, reconcile your changes,
|
|
63
|
-
* and submit a new request with a new Idempotency-Key if using one.
|
|
64
|
-
*
|
|
65
|
-
* See [conditional writes](https://typeship.dev/docs/typeship-api#conditional-writes) for ETag
|
|
66
|
-
* and If-Match.
|
|
67
|
-
*
|
|
68
|
-
* A `Idempotency-Key` UUID is generated per call (stable across retries) unless you pass one.
|
|
69
|
-
* `PATCH /definitions/{definition_id}`
|
|
70
|
-
*/
|
|
71
|
-
async update(
|
|
72
|
-
definitionId: DefinitionId,
|
|
73
|
-
body: DefinitionUpdateRequest,
|
|
74
|
-
params?: DefinitionsUpdateParams,
|
|
75
|
-
options?: RequestOptions,
|
|
76
|
-
): Promise<ApiResult<DefinitionRead, DefinitionsUpdateError>> {
|
|
77
|
-
return this._core.request<DefinitionRead, DefinitionsUpdateError>({
|
|
78
|
-
method: "PATCH",
|
|
79
|
-
path: `/definitions/${encodeURIComponent(String(definitionId))}`,
|
|
80
|
-
security: [{"apiKey":[]}],
|
|
81
|
-
headers: {
|
|
82
|
-
"If-Match": params?.ifMatch === undefined ? undefined : String(params?.ifMatch),
|
|
83
|
-
"Idempotency-Key": params?.idempotencyKey === undefined ? undefined : String(params?.idempotencyKey),
|
|
84
|
-
},
|
|
85
|
-
body,
|
|
86
|
-
errors: {
|
|
87
|
-
"400": BadRequestError,
|
|
88
|
-
"401": UnauthorizedError,
|
|
89
|
-
"403": ForbiddenError,
|
|
90
|
-
"404": NotFoundError,
|
|
91
|
-
"409": ConflictError,
|
|
92
|
-
"412": PreconditionFailedError,
|
|
93
|
-
"422": UnprocessableEntityError,
|
|
94
|
-
"429": RateLimitedError,
|
|
95
|
-
"500": InternalServerError,
|
|
96
|
-
},
|
|
97
|
-
idempotencyKey: "Idempotency-Key",
|
|
98
|
-
schemaKey: "definitions.update",
|
|
99
|
-
options,
|
|
100
|
-
});
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
/** Every error `retrieve` can produce, as a discriminated union. */
|
|
105
|
-
export type DefinitionsRetrieveError =
|
|
106
|
-
| UnauthorizedError
|
|
107
|
-
| ForbiddenError
|
|
108
|
-
| NotFoundError
|
|
109
|
-
| RateLimitedError
|
|
110
|
-
| InternalServerError
|
|
111
|
-
| UnexpectedApiError
|
|
112
|
-
| ResponseParseError
|
|
113
|
-
| TransportError
|
|
114
|
-
| ValidationError;
|
|
115
|
-
|
|
116
|
-
export interface DefinitionsUpdateParams {
|
|
117
|
-
/**
|
|
118
|
-
* ETag from a preceding response. The write applies only if the resource still has that version;
|
|
119
|
-
* otherwise it returns 412 precondition_failed without changes. Omit to write the current
|
|
120
|
-
* version. See https://typeship.dev/docs/typeship-api#conditional-writes.
|
|
121
|
-
*/
|
|
122
|
-
ifMatch?: string;
|
|
123
|
-
/**
|
|
124
|
-
* Identifies one logical write for 24 hours. The key is scoped to the authenticated account and
|
|
125
|
-
* operation; account-less generation uses a hashed network identity. Retrying the same method,
|
|
126
|
-
* path, query, If-Match header, and JSON body replays the original response. Reusing the key with
|
|
127
|
-
* changed intent returns 409. After expiry the key starts a new write.
|
|
128
|
-
*/
|
|
129
|
-
idempotencyKey?: string;
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
/** Every error `update` can produce, as a discriminated union. */
|
|
133
|
-
export type DefinitionsUpdateError =
|
|
134
|
-
| BadRequestError
|
|
135
|
-
| UnauthorizedError
|
|
136
|
-
| ForbiddenError
|
|
137
|
-
| NotFoundError
|
|
138
|
-
| ConflictError
|
|
139
|
-
| PreconditionFailedError
|
|
140
|
-
| UnprocessableEntityError
|
|
141
|
-
| RateLimitedError
|
|
142
|
-
| InternalServerError
|
|
143
|
-
| UnexpectedApiError
|
|
144
|
-
| ResponseParseError
|
|
145
|
-
| TransportError
|
|
146
|
-
| ValidationError;
|