@typeship-ax/cli 0.22.0 → 0.23.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.
Files changed (138) hide show
  1. package/AGENTS.md +12 -8
  2. package/README.md +14 -27
  3. package/api.json +8898 -9026
  4. package/api.md +369 -327
  5. package/dist/arguments.d.ts +47 -0
  6. package/dist/arguments.d.ts.map +1 -0
  7. package/dist/arguments.js +254 -0
  8. package/dist/cli-agent.d.ts +31 -8
  9. package/dist/cli-agent.d.ts.map +1 -1
  10. package/dist/cli-agent.js +146 -28
  11. package/dist/cli.js +483 -237
  12. package/dist/core/http.d.ts +162 -19
  13. package/dist/core/http.d.ts.map +1 -1
  14. package/dist/core/http.js +381 -48
  15. package/dist/core/pagination.d.ts +42 -6
  16. package/dist/core/pagination.d.ts.map +1 -1
  17. package/dist/core/pagination.js +111 -17
  18. package/dist/credential-storage.d.ts +10 -3
  19. package/dist/credential-storage.d.ts.map +1 -1
  20. package/dist/credential-storage.js +15 -6
  21. package/dist/dates.d.ts +1 -1
  22. package/dist/dates.js +1 -1
  23. package/dist/errors.d.ts +20 -84
  24. package/dist/errors.d.ts.map +1 -1
  25. package/dist/errors.js +20 -108
  26. package/dist/fields.d.ts +29 -0
  27. package/dist/fields.d.ts.map +1 -0
  28. package/dist/fields.js +101 -0
  29. package/dist/index.d.ts +28 -18
  30. package/dist/index.d.ts.map +1 -1
  31. package/dist/index.js +35 -25
  32. package/dist/named-credentials.d.ts +19 -0
  33. package/dist/named-credentials.d.ts.map +1 -1
  34. package/dist/named-credentials.js +81 -1
  35. package/dist/oauth-login.d.ts +8 -2
  36. package/dist/oauth-login.d.ts.map +1 -1
  37. package/dist/oauth-login.js +31 -19
  38. package/dist/oauth-request.d.ts +7 -1
  39. package/dist/oauth-request.d.ts.map +1 -1
  40. package/dist/oauth-request.js +26 -4
  41. package/dist/oauth-session.d.ts +13 -1
  42. package/dist/oauth-session.d.ts.map +1 -1
  43. package/dist/oauth-session.js +34 -18
  44. package/dist/ops.d.ts +53 -5
  45. package/dist/ops.d.ts.map +1 -1
  46. package/dist/ops.js +49 -40
  47. package/dist/polling-login.d.ts +8 -2
  48. package/dist/polling-login.d.ts.map +1 -1
  49. package/dist/polling-login.js +25 -11
  50. package/dist/resources/api-keys.d.ts +10 -7
  51. package/dist/resources/api-keys.d.ts.map +1 -1
  52. package/dist/resources/api-keys.js +10 -31
  53. package/dist/resources/deliveries.d.ts +88 -4
  54. package/dist/resources/deliveries.d.ts.map +1 -1
  55. package/dist/resources/deliveries.js +95 -18
  56. package/dist/resources/drafts.d.ts +15 -15
  57. package/dist/resources/drafts.d.ts.map +1 -1
  58. package/dist/resources/drafts.js +11 -64
  59. package/dist/resources/files.d.ts +4 -4
  60. package/dist/resources/files.d.ts.map +1 -1
  61. package/dist/resources/files.js +3 -12
  62. package/dist/resources/generations.d.ts +14 -14
  63. package/dist/resources/generations.d.ts.map +1 -1
  64. package/dist/resources/generations.js +21 -45
  65. package/dist/resources/organization.d.ts +4 -4
  66. package/dist/resources/organization.d.ts.map +1 -1
  67. package/dist/resources/organization.js +3 -10
  68. package/dist/resources/{generate.d.ts → packages.d.ts} +16 -16
  69. package/dist/resources/packages.d.ts.map +1 -0
  70. package/dist/resources/{generate.js → packages.js} +13 -29
  71. package/dist/resources/projects.d.ts +50 -50
  72. package/dist/resources/projects.d.ts.map +1 -1
  73. package/dist/resources/projects.js +60 -116
  74. package/dist/resources/releases.d.ts +21 -16
  75. package/dist/resources/releases.d.ts.map +1 -1
  76. package/dist/resources/releases.js +18 -39
  77. package/dist/resources/spec-revisions.d.ts +15 -6
  78. package/dist/resources/spec-revisions.d.ts.map +1 -1
  79. package/dist/resources/spec-revisions.js +6 -28
  80. package/dist/resources/specs.d.ts +7 -7
  81. package/dist/resources/specs.d.ts.map +1 -1
  82. package/dist/resources/specs.js +6 -34
  83. package/dist/resources/targets.d.ts +48 -48
  84. package/dist/resources/targets.d.ts.map +1 -1
  85. package/dist/resources/targets.js +58 -114
  86. package/dist/schemas.d.ts.map +1 -1
  87. package/dist/schemas.js +83 -81
  88. package/dist/search.d.ts +54 -0
  89. package/dist/search.d.ts.map +1 -0
  90. package/dist/search.js +421 -0
  91. package/dist/types.d.ts +499 -339
  92. package/dist/types.d.ts.map +1 -1
  93. package/dist/types.js +18 -18
  94. package/package.json +5 -2
  95. package/src/arguments.ts +242 -0
  96. package/src/cli-agent.ts +156 -30
  97. package/src/cli.ts +444 -211
  98. package/src/core/http.ts +457 -58
  99. package/src/core/pagination.ts +129 -18
  100. package/src/credential-storage.ts +16 -6
  101. package/src/dates.ts +1 -1
  102. package/src/errors.ts +46 -115
  103. package/src/fields.ts +91 -0
  104. package/src/index.ts +45 -28
  105. package/src/named-credentials.ts +66 -1
  106. package/src/oauth-login.ts +36 -21
  107. package/src/oauth-request.ts +32 -6
  108. package/src/oauth-session.ts +37 -19
  109. package/src/ops.ts +82 -44
  110. package/src/polling-login.ts +24 -11
  111. package/src/resources/api-keys.ts +34 -48
  112. package/src/resources/deliveries.ts +211 -30
  113. package/src/resources/drafts.ts +60 -107
  114. package/src/resources/files.ts +19 -20
  115. package/src/resources/generations.ts +57 -75
  116. package/src/resources/organization.ts +11 -16
  117. package/src/resources/{generate.ts → packages.ts} +43 -51
  118. package/src/resources/projects.ts +145 -200
  119. package/src/resources/releases.ts +48 -65
  120. package/src/resources/spec-revisions.ts +38 -47
  121. package/src/resources/specs.ts +39 -59
  122. package/src/resources/targets.ts +143 -193
  123. package/src/schemas.ts +83 -81
  124. package/src/search.ts +434 -0
  125. package/src/types.ts +538 -357
  126. package/dist/console-login-check.d.ts +0 -21
  127. package/dist/console-login-check.d.ts.map +0 -1
  128. package/dist/console-login-check.js +0 -107
  129. package/dist/console-login-contract.d.ts +0 -45
  130. package/dist/console-login-contract.d.ts.map +0 -1
  131. package/dist/console-login-contract.js +0 -40
  132. package/dist/resources/generate.d.ts.map +0 -1
  133. package/dist/resources/publications.d.ts +0 -47
  134. package/dist/resources/publications.d.ts.map +0 -1
  135. package/dist/resources/publications.js +0 -70
  136. package/src/console-login-check.ts +0 -88
  137. package/src/console-login-contract.ts +0 -65
  138. package/src/resources/publications.ts +0 -140
@@ -1,21 +1,20 @@
1
- // typeship — drafts resource.
2
- // Generated by typeship — https://typeship.dev
1
+ // Typeship — drafts resource.
2
+ // Generated by Typeship — https://typeship.dev
3
3
 
4
4
  import { HttpCore, type RequestOptions } from "../core/http.js";
5
5
  import { paginate, PagePromise } from "../core/pagination.js";
6
6
  import {
7
+ RateLimitError,
7
8
  ResponseParseError,
8
9
  TransportError,
9
10
  UnexpectedApiError,
10
11
  ValidationError,
11
- BadGatewayError,
12
12
  BadRequestError,
13
13
  ConflictError,
14
14
  ForbiddenError,
15
- InternalServerError,
16
15
  NotFoundError,
17
16
  PreconditionFailedError,
18
- RateLimitedError,
17
+ ServerError,
19
18
  UnauthorizedError,
20
19
  UnprocessableEntityError,
21
20
  } from "../errors.js";
@@ -35,6 +34,8 @@ import type {
35
34
  DraftResponseRead,
36
35
  DraftStatus,
37
36
  DraftUpdateRequest,
37
+ ErrorModel,
38
+ ErrorModelRead,
38
39
  TargetId,
39
40
  } from "../types.js";
40
41
 
@@ -60,14 +61,6 @@ export class DraftsResource {
60
61
  target_id: params?.targetId,
61
62
  status: params?.status,
62
63
  },
63
- errors: {
64
- "400": BadRequestError,
65
- "401": UnauthorizedError,
66
- "403": ForbiddenError,
67
- "404": NotFoundError,
68
- "429": RateLimitedError,
69
- "500": InternalServerError,
70
- },
71
64
  idempotent: true,
72
65
  schemaKey: "drafts.list",
73
66
  options,
@@ -85,9 +78,9 @@ export class DraftsResource {
85
78
  * Get a Draft
86
79
  *
87
80
  * Returns the Draft's status. An open Draft also reports its typed reason when action is
88
- * required, next version and its source, readiness, checks, and conflict counts. The response
89
- * carries an `ETag`; send it in `If-Match` when updating the Draft to avoid changing a newer
90
- * version selection.
81
+ * required, next version and its source, compatibility and version assessment, blocking errors,
82
+ * checks, and conflict counts. The response carries an `ETag`; send it in `If-Match` when
83
+ * updating the Draft to avoid changing a newer version selection.
91
84
  * `GET /drafts/{draft_id}`
92
85
  */
93
86
  async get(draftId: DraftId, options?: RequestOptions): Promise<DraftResponseRead> {
@@ -95,13 +88,6 @@ export class DraftsResource {
95
88
  method: "GET",
96
89
  path: `/drafts/${encodeURIComponent(String(draftId))}`,
97
90
  security: [{"apiKey":[]}],
98
- errors: {
99
- "401": UnauthorizedError,
100
- "403": ForbiddenError,
101
- "404": NotFoundError,
102
- "429": RateLimitedError,
103
- "500": InternalServerError,
104
- },
105
91
  idempotent: true,
106
92
  schemaKey: "drafts.get",
107
93
  options,
@@ -109,7 +95,7 @@ export class DraftsResource {
109
95
  }
110
96
 
111
97
  /**
112
- * Select an exact Draft version or return to automatic versioning
98
+ * Update a Draft
113
99
  *
114
100
  * Checks your version choice against the required version bump, then regenerates the existing
115
101
  * Draft pull request.
@@ -144,25 +130,14 @@ export class DraftsResource {
144
130
  "If-Match": params?.ifMatch === undefined ? undefined : String(params?.ifMatch),
145
131
  },
146
132
  body,
147
- errors: {
148
- "400": BadRequestError,
149
- "401": UnauthorizedError,
150
- "403": ForbiddenError,
151
- "404": NotFoundError,
152
- "409": ConflictError,
153
- "412": PreconditionFailedError,
154
- "422": UnprocessableEntityError,
155
- "429": RateLimitedError,
156
- "500": InternalServerError,
157
- "502": BadGatewayError,
158
- },
133
+ errors: { "412": PreconditionFailedError },
159
134
  schemaKey: "drafts.update",
160
135
  options,
161
136
  });
162
137
  }
163
138
 
164
139
  /**
165
- * List customized and conflicted files on a Draft
140
+ * List a Draft's files
166
141
  *
167
142
  * Lists the Draft's files that differ from the last merged package or need a conflict decision,
168
143
  * ordered by path, without file content. Each conflict names its kind, the saved decision, and
@@ -189,15 +164,6 @@ export class DraftsResource {
189
164
  limit: params?.limit,
190
165
  cursor: params?.cursor,
191
166
  },
192
- errors: {
193
- "400": BadRequestError,
194
- "401": UnauthorizedError,
195
- "403": ForbiddenError,
196
- "404": NotFoundError,
197
- "409": ConflictError,
198
- "429": RateLimitedError,
199
- "500": InternalServerError,
200
- },
201
167
  idempotent: true,
202
168
  schemaKey: "drafts.listFiles",
203
169
  options,
@@ -212,7 +178,7 @@ export class DraftsResource {
212
178
  }
213
179
 
214
180
  /**
215
- * Resolve selected Draft files
181
+ * Resolve Draft conflicts
216
182
  *
217
183
  * Resolves conflicts on the Draft's head_sha: keep yours or generated, or supply final content as
218
184
  * text or, for binary files, base64. Choosing generated for a customized path replaces it with
@@ -234,22 +200,13 @@ export class DraftsResource {
234
200
  path: `/drafts/${encodeURIComponent(String(draftId))}/resolve`,
235
201
  security: [{"apiKey":[]}],
236
202
  body,
237
- errors: {
238
- "400": BadRequestError,
239
- "401": UnauthorizedError,
240
- "403": ForbiddenError,
241
- "404": NotFoundError,
242
- "409": ConflictError,
243
- "429": RateLimitedError,
244
- "500": InternalServerError,
245
- },
246
203
  schemaKey: "drafts.resolve",
247
204
  options,
248
205
  });
249
206
  }
250
207
 
251
208
  /**
252
- * Approve recovery from rewritten default-branch history
209
+ * Recover a Draft's history
253
210
  *
254
211
  * When the Draft has status `action_required` and reason `history_rewritten`, review affected
255
212
  * files with `listDraftFiles` and `filter=history`, then approve with the Draft's
@@ -269,15 +226,6 @@ export class DraftsResource {
269
226
  path: `/drafts/${encodeURIComponent(String(draftId))}/recover`,
270
227
  security: [{"apiKey":[]}],
271
228
  body,
272
- errors: {
273
- "400": BadRequestError,
274
- "401": UnauthorizedError,
275
- "403": ForbiddenError,
276
- "404": NotFoundError,
277
- "409": ConflictError,
278
- "429": RateLimitedError,
279
- "500": InternalServerError,
280
- },
281
229
  schemaKey: "drafts.recover",
282
230
  options,
283
231
  });
@@ -308,12 +256,13 @@ export interface DraftsListParams {
308
256
 
309
257
  /** Typed errors `list` can throw. */
310
258
  export type DraftsListError =
311
- | BadRequestError
312
- | UnauthorizedError
313
- | ForbiddenError
314
- | NotFoundError
315
- | RateLimitedError
316
- | InternalServerError
259
+ | BadRequestError<ErrorModelRead>
260
+ | UnauthorizedError<ErrorModelRead>
261
+ | ForbiddenError<ErrorModelRead>
262
+ | NotFoundError<ErrorModelRead>
263
+ | RateLimitError<ErrorModelRead>
264
+ | ServerError<ErrorModelRead>
265
+ | RateLimitError
317
266
  | UnexpectedApiError
318
267
  | ResponseParseError
319
268
  | TransportError
@@ -321,11 +270,12 @@ export type DraftsListError =
321
270
 
322
271
  /** Typed errors `get` can throw. */
323
272
  export type DraftsGetError =
324
- | UnauthorizedError
325
- | ForbiddenError
326
- | NotFoundError
327
- | RateLimitedError
328
- | InternalServerError
273
+ | UnauthorizedError<ErrorModelRead>
274
+ | ForbiddenError<ErrorModelRead>
275
+ | NotFoundError<ErrorModelRead>
276
+ | RateLimitError<ErrorModelRead>
277
+ | ServerError<ErrorModelRead>
278
+ | RateLimitError
329
279
  | UnexpectedApiError
330
280
  | ResponseParseError
331
281
  | TransportError
@@ -342,16 +292,16 @@ export interface DraftsUpdateParams {
342
292
 
343
293
  /** Typed errors `update` can throw. */
344
294
  export type DraftsUpdateError =
345
- | BadRequestError
346
- | UnauthorizedError
347
- | ForbiddenError
348
- | NotFoundError
349
- | ConflictError
295
+ | BadRequestError<ErrorModelRead>
296
+ | UnauthorizedError<ErrorModelRead>
297
+ | ForbiddenError<ErrorModelRead>
298
+ | NotFoundError<ErrorModelRead>
299
+ | ConflictError<ErrorModelRead>
350
300
  | PreconditionFailedError
351
- | UnprocessableEntityError
352
- | RateLimitedError
353
- | InternalServerError
354
- | BadGatewayError
301
+ | UnprocessableEntityError<ErrorModelRead>
302
+ | RateLimitError<ErrorModelRead>
303
+ | ServerError<ErrorModelRead>
304
+ | RateLimitError
355
305
  | UnexpectedApiError
356
306
  | ResponseParseError
357
307
  | TransportError
@@ -383,13 +333,14 @@ export interface DraftsListFilesParams {
383
333
 
384
334
  /** Typed errors `listFiles` can throw. */
385
335
  export type DraftsListFilesError =
386
- | BadRequestError
387
- | UnauthorizedError
388
- | ForbiddenError
389
- | NotFoundError
390
- | ConflictError
391
- | RateLimitedError
392
- | InternalServerError
336
+ | BadRequestError<ErrorModelRead>
337
+ | UnauthorizedError<ErrorModelRead>
338
+ | ForbiddenError<ErrorModelRead>
339
+ | NotFoundError<ErrorModelRead>
340
+ | ConflictError<ErrorModelRead>
341
+ | RateLimitError<ErrorModelRead>
342
+ | ServerError<ErrorModelRead>
343
+ | RateLimitError
393
344
  | UnexpectedApiError
394
345
  | ResponseParseError
395
346
  | TransportError
@@ -397,13 +348,14 @@ export type DraftsListFilesError =
397
348
 
398
349
  /** Typed errors `resolve` can throw. */
399
350
  export type DraftsResolveError =
400
- | BadRequestError
401
- | UnauthorizedError
402
- | ForbiddenError
403
- | NotFoundError
404
- | ConflictError
405
- | RateLimitedError
406
- | InternalServerError
351
+ | BadRequestError<ErrorModelRead>
352
+ | UnauthorizedError<ErrorModelRead>
353
+ | ForbiddenError<ErrorModelRead>
354
+ | NotFoundError<ErrorModelRead>
355
+ | ConflictError<ErrorModelRead>
356
+ | RateLimitError<ErrorModelRead>
357
+ | ServerError<ErrorModelRead>
358
+ | RateLimitError
407
359
  | UnexpectedApiError
408
360
  | ResponseParseError
409
361
  | TransportError
@@ -411,13 +363,14 @@ export type DraftsResolveError =
411
363
 
412
364
  /** Typed errors `recover` can throw. */
413
365
  export type DraftsRecoverError =
414
- | BadRequestError
415
- | UnauthorizedError
416
- | ForbiddenError
417
- | NotFoundError
418
- | ConflictError
419
- | RateLimitedError
420
- | InternalServerError
366
+ | BadRequestError<ErrorModelRead>
367
+ | UnauthorizedError<ErrorModelRead>
368
+ | ForbiddenError<ErrorModelRead>
369
+ | NotFoundError<ErrorModelRead>
370
+ | ConflictError<ErrorModelRead>
371
+ | RateLimitError<ErrorModelRead>
372
+ | ServerError<ErrorModelRead>
373
+ | RateLimitError
421
374
  | UnexpectedApiError
422
375
  | ResponseParseError
423
376
  | TransportError
@@ -1,25 +1,31 @@
1
- // typeship — files resource.
2
- // Generated by typeship — https://typeship.dev
1
+ // Typeship — files resource.
2
+ // Generated by Typeship — https://typeship.dev
3
3
 
4
4
  import { HttpCore, type RequestOptions } from "../core/http.js";
5
5
  import {
6
+ RateLimitError,
6
7
  ResponseParseError,
7
8
  TransportError,
8
9
  UnexpectedApiError,
9
10
  ValidationError,
10
11
  BadRequestError,
11
12
  ForbiddenError,
12
- InternalServerError,
13
13
  NotFoundError,
14
- RateLimitedError,
14
+ ServerError,
15
15
  UnauthorizedError,
16
16
  } from "../errors.js";
17
- import type { FileId, FileResponse, FileResponseRead } from "../types.js";
17
+ import type {
18
+ ErrorModel,
19
+ ErrorModelRead,
20
+ FileId,
21
+ FileResponse,
22
+ FileResponseRead,
23
+ } from "../types.js";
18
24
 
19
25
  export class FilesResource {
20
26
  constructor(private readonly _core: HttpCore) {}
21
27
  /**
22
- * Get a file
28
+ * Get a File
23
29
  *
24
30
  * Returns one bounded chunk of an immutable file: at most 24 KiB, as UTF-8 text or, for binary
25
31
  * bytes, base64. When next_cursor is not null, repeat the request with cursor and concatenate the
@@ -34,14 +40,6 @@ export class FilesResource {
34
40
  query: {
35
41
  cursor: params?.cursor,
36
42
  },
37
- errors: {
38
- "400": BadRequestError,
39
- "401": UnauthorizedError,
40
- "403": ForbiddenError,
41
- "404": NotFoundError,
42
- "429": RateLimitedError,
43
- "500": InternalServerError,
44
- },
45
43
  idempotent: true,
46
44
  schemaKey: "files.get",
47
45
  options,
@@ -56,12 +54,13 @@ export interface FilesGetParams {
56
54
 
57
55
  /** Typed errors `get` can throw. */
58
56
  export type FilesGetError =
59
- | BadRequestError
60
- | UnauthorizedError
61
- | ForbiddenError
62
- | NotFoundError
63
- | RateLimitedError
64
- | InternalServerError
57
+ | BadRequestError<ErrorModelRead>
58
+ | UnauthorizedError<ErrorModelRead>
59
+ | ForbiddenError<ErrorModelRead>
60
+ | NotFoundError<ErrorModelRead>
61
+ | RateLimitError<ErrorModelRead>
62
+ | ServerError<ErrorModelRead>
63
+ | RateLimitError
65
64
  | UnexpectedApiError
66
65
  | ResponseParseError
67
66
  | TransportError
@@ -1,33 +1,35 @@
1
- // typeship — generations resource.
2
- // Generated by typeship — https://typeship.dev
1
+ // Typeship — generations resource.
2
+ // Generated by Typeship — https://typeship.dev
3
3
 
4
4
  import { HttpCore, type RequestOptions } from "../core/http.js";
5
5
  import { paginate, PagePromise } from "../core/pagination.js";
6
6
  import {
7
+ RateLimitError,
7
8
  ResponseParseError,
8
9
  TransportError,
9
10
  UnexpectedApiError,
10
11
  ValidationError,
11
12
  BadRequestError,
12
13
  ForbiddenError,
13
- InternalServerError,
14
14
  NotFoundError,
15
- RateLimitedError,
15
+ ServerError,
16
16
  UnauthorizedError,
17
17
  } from "../errors.js";
18
18
  import type {
19
+ ErrorModel,
20
+ ErrorModelRead,
19
21
  FileList,
20
22
  FileListRead,
21
23
  FileModel,
22
24
  FileModelRead,
25
+ Generation,
23
26
  GenerationId,
24
27
  GenerationList,
25
28
  GenerationListRead,
29
+ GenerationRead,
26
30
  GenerationResponse,
27
31
  GenerationResponseRead,
28
32
  GenerationStatus,
29
- GenerationSummary,
30
- GenerationSummaryRead,
31
33
  ProjectId,
32
34
  TargetId,
33
35
  } from "../types.js";
@@ -35,7 +37,26 @@ import type {
35
37
  export class GenerationsResource {
36
38
  constructor(private readonly _core: HttpCore) {}
37
39
  /**
38
- * List generations
40
+ * Get a Generation
41
+ *
42
+ * Returns the status of that Generation. `queued` and `running` mean generation is still in
43
+ * progress. `completed` means generated files are saved, not that repository delivery or a Draft
44
+ * is complete. List its files with listGenerationFiles and read each with getFile.
45
+ * `GET /generations/{generation_id}`
46
+ */
47
+ async get(generationId: GenerationId, options?: RequestOptions): Promise<GenerationResponseRead> {
48
+ return this._core.requestData<GenerationResponseRead, GenerationsGetError>({
49
+ method: "GET",
50
+ path: `/generations/${encodeURIComponent(String(generationId))}`,
51
+ security: [{"apiKey":[]}],
52
+ idempotent: true,
53
+ schemaKey: "generations.get",
54
+ options,
55
+ });
56
+ }
57
+
58
+ /**
59
+ * List Generations
39
60
  *
40
61
  * Auto-paginates: `for await (const item of …)` walks every page.
41
62
  * `GET /generations`
@@ -43,8 +64,8 @@ export class GenerationsResource {
43
64
  list(
44
65
  params?: GenerationsListParams,
45
66
  options?: RequestOptions,
46
- ): PagePromise<GenerationSummaryRead, GenerationsListError> {
47
- return paginate<GenerationSummaryRead, GenerationsListError>(this._core, {
67
+ ): PagePromise<GenerationRead, GenerationsListError> {
68
+ return paginate<GenerationRead, GenerationsListError>(this._core, {
48
69
  method: "GET",
49
70
  path: "/generations",
50
71
  security: [{"apiKey":[]}],
@@ -55,14 +76,6 @@ export class GenerationsResource {
55
76
  target_id: params?.targetId,
56
77
  status: params?.status,
57
78
  },
58
- errors: {
59
- "400": BadRequestError,
60
- "401": UnauthorizedError,
61
- "403": ForbiddenError,
62
- "404": NotFoundError,
63
- "429": RateLimitedError,
64
- "500": InternalServerError,
65
- },
66
79
  idempotent: true,
67
80
  schemaKey: "generations.list",
68
81
  options,
@@ -76,32 +89,6 @@ export class GenerationsResource {
76
89
  });
77
90
  }
78
91
 
79
- /**
80
- * Get a generation
81
- *
82
- * Returns the status of that Generation. `queued` and `running` mean generation is still in
83
- * progress. `completed` means generated files are saved, not that repository delivery or a Draft
84
- * is complete. List its files with listGenerationFiles and read each with getFile.
85
- * `GET /generations/{generation_id}`
86
- */
87
- async get(generationId: GenerationId, options?: RequestOptions): Promise<GenerationResponseRead> {
88
- return this._core.requestData<GenerationResponseRead, GenerationsGetError>({
89
- method: "GET",
90
- path: `/generations/${encodeURIComponent(String(generationId))}`,
91
- security: [{"apiKey":[]}],
92
- errors: {
93
- "401": UnauthorizedError,
94
- "403": ForbiddenError,
95
- "404": NotFoundError,
96
- "429": RateLimitedError,
97
- "500": InternalServerError,
98
- },
99
- idempotent: true,
100
- schemaKey: "generations.get",
101
- options,
102
- });
103
- }
104
-
105
92
  /**
106
93
  * List a Generation's files
107
94
  *
@@ -123,14 +110,6 @@ export class GenerationsResource {
123
110
  limit: params?.limit,
124
111
  cursor: params?.cursor,
125
112
  },
126
- errors: {
127
- "400": BadRequestError,
128
- "401": UnauthorizedError,
129
- "403": ForbiddenError,
130
- "404": NotFoundError,
131
- "429": RateLimitedError,
132
- "500": InternalServerError,
133
- },
134
113
  idempotent: true,
135
114
  schemaKey: "generations.listFiles",
136
115
  options,
@@ -164,6 +143,19 @@ export class GenerationsResource {
164
143
  }
165
144
  }
166
145
 
146
+ /** Typed errors `get` can throw. */
147
+ export type GenerationsGetError =
148
+ | UnauthorizedError<ErrorModelRead>
149
+ | ForbiddenError<ErrorModelRead>
150
+ | NotFoundError<ErrorModelRead>
151
+ | RateLimitError<ErrorModelRead>
152
+ | ServerError<ErrorModelRead>
153
+ | RateLimitError
154
+ | UnexpectedApiError
155
+ | ResponseParseError
156
+ | TransportError
157
+ | ValidationError;
158
+
167
159
  export interface GenerationsListParams {
168
160
  /**
169
161
  * Maximum number of resources to return. Omit for 20; otherwise supply base-10 digits
@@ -190,24 +182,13 @@ export interface GenerationsListParams {
190
182
 
191
183
  /** Typed errors `list` can throw. */
192
184
  export type GenerationsListError =
193
- | BadRequestError
194
- | UnauthorizedError
195
- | ForbiddenError
196
- | NotFoundError
197
- | RateLimitedError
198
- | InternalServerError
199
- | UnexpectedApiError
200
- | ResponseParseError
201
- | TransportError
202
- | ValidationError;
203
-
204
- /** Typed errors `get` can throw. */
205
- export type GenerationsGetError =
206
- | UnauthorizedError
207
- | ForbiddenError
208
- | NotFoundError
209
- | RateLimitedError
210
- | InternalServerError
185
+ | BadRequestError<ErrorModelRead>
186
+ | UnauthorizedError<ErrorModelRead>
187
+ | ForbiddenError<ErrorModelRead>
188
+ | NotFoundError<ErrorModelRead>
189
+ | RateLimitError<ErrorModelRead>
190
+ | ServerError<ErrorModelRead>
191
+ | RateLimitError
211
192
  | UnexpectedApiError
212
193
  | ResponseParseError
213
194
  | TransportError
@@ -233,12 +214,13 @@ export interface GenerationsListFilesParams {
233
214
 
234
215
  /** Typed errors `listFiles` can throw. */
235
216
  export type GenerationsListFilesError =
236
- | BadRequestError
237
- | UnauthorizedError
238
- | ForbiddenError
239
- | NotFoundError
240
- | RateLimitedError
241
- | InternalServerError
217
+ | BadRequestError<ErrorModelRead>
218
+ | UnauthorizedError<ErrorModelRead>
219
+ | ForbiddenError<ErrorModelRead>
220
+ | NotFoundError<ErrorModelRead>
221
+ | RateLimitError<ErrorModelRead>
222
+ | ServerError<ErrorModelRead>
223
+ | RateLimitError
242
224
  | UnexpectedApiError
243
225
  | ResponseParseError
244
226
  | TransportError
@@ -1,23 +1,23 @@
1
- // typeship — organization resource.
2
- // Generated by typeship — https://typeship.dev
1
+ // Typeship — organization resource.
2
+ // Generated by Typeship — https://typeship.dev
3
3
 
4
4
  import { HttpCore, type RequestOptions } from "../core/http.js";
5
5
  import {
6
+ RateLimitError,
6
7
  ResponseParseError,
7
8
  TransportError,
8
9
  UnexpectedApiError,
9
10
  ValidationError,
10
11
  ForbiddenError,
11
- InternalServerError,
12
- RateLimitedError,
12
+ ServerError,
13
13
  UnauthorizedError,
14
14
  } from "../errors.js";
15
- import type { Organization, OrganizationRead } from "../types.js";
15
+ import type { ErrorModel, ErrorModelRead, Organization, OrganizationRead } from "../types.js";
16
16
 
17
17
  export class OrganizationResource {
18
18
  constructor(private readonly _core: HttpCore) {}
19
19
  /**
20
- * The organization behind the presented credentials
20
+ * Get the Organization
21
21
  *
22
22
  * Returns the organization associated with your credential. The Typeship CLI uses this endpoint
23
23
  * for `whoami`.
@@ -28,12 +28,6 @@ export class OrganizationResource {
28
28
  method: "GET",
29
29
  path: "/organization",
30
30
  security: [{"apiKey":[]}],
31
- errors: {
32
- "401": UnauthorizedError,
33
- "403": ForbiddenError,
34
- "429": RateLimitedError,
35
- "500": InternalServerError,
36
- },
37
31
  idempotent: true,
38
32
  schemaKey: "organization.get",
39
33
  options,
@@ -43,10 +37,11 @@ export class OrganizationResource {
43
37
 
44
38
  /** Typed errors `get` can throw. */
45
39
  export type OrganizationGetError =
46
- | UnauthorizedError
47
- | ForbiddenError
48
- | RateLimitedError
49
- | InternalServerError
40
+ | UnauthorizedError<ErrorModelRead>
41
+ | ForbiddenError<ErrorModelRead>
42
+ | RateLimitError<ErrorModelRead>
43
+ | ServerError<ErrorModelRead>
44
+ | RateLimitError
50
45
  | UnexpectedApiError
51
46
  | ResponseParseError
52
47
  | TransportError