@typeship-ax/cli 0.6.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.
Files changed (69) hide show
  1. package/LICENSE +9 -0
  2. package/README.md +40 -0
  3. package/api.json +5163 -0
  4. package/api.md +512 -0
  5. package/dist/cli-agent.d.ts +204 -0
  6. package/dist/cli-agent.d.ts.map +1 -0
  7. package/dist/cli-agent.js +525 -0
  8. package/dist/cli.d.ts +3 -0
  9. package/dist/cli.d.ts.map +1 -0
  10. package/dist/cli.js +2811 -0
  11. package/dist/core/http.d.ts +303 -0
  12. package/dist/core/http.d.ts.map +1 -0
  13. package/dist/core/http.js +770 -0
  14. package/dist/core/pagination.d.ts +51 -0
  15. package/dist/core/pagination.d.ts.map +1 -0
  16. package/dist/core/pagination.js +154 -0
  17. package/dist/dates.d.ts +33 -0
  18. package/dist/dates.d.ts.map +1 -0
  19. package/dist/dates.js +136 -0
  20. package/dist/errors.d.ts +81 -0
  21. package/dist/errors.d.ts.map +1 -0
  22. package/dist/errors.js +103 -0
  23. package/dist/index.d.ts +92 -0
  24. package/dist/index.d.ts.map +1 -0
  25. package/dist/index.js +86 -0
  26. package/dist/ops.d.ts +115 -0
  27. package/dist/ops.d.ts.map +1 -0
  28. package/dist/ops.js +79 -0
  29. package/dist/resources/account.d.ts +18 -0
  30. package/dist/resources/account.d.ts.map +1 -0
  31. package/dist/resources/account.js +26 -0
  32. package/dist/resources/api-keys.d.ts +37 -0
  33. package/dist/resources/api-keys.d.ts.map +1 -0
  34. package/dist/resources/api-keys.js +67 -0
  35. package/dist/resources/generate.d.ts +25 -0
  36. package/dist/resources/generate.d.ts.map +1 -0
  37. package/dist/resources/generate.js +41 -0
  38. package/dist/resources/generations.d.ts +31 -0
  39. package/dist/resources/generations.d.ts.map +1 -0
  40. package/dist/resources/generations.js +56 -0
  41. package/dist/resources/projects.d.ts +110 -0
  42. package/dist/resources/projects.d.ts.map +1 -0
  43. package/dist/resources/projects.js +220 -0
  44. package/dist/resources/spec-revisions.d.ts +47 -0
  45. package/dist/resources/spec-revisions.d.ts.map +1 -0
  46. package/dist/resources/spec-revisions.js +90 -0
  47. package/dist/schemas.d.ts +6 -0
  48. package/dist/schemas.d.ts.map +1 -0
  49. package/dist/schemas.js +88 -0
  50. package/dist/types.d.ts +759 -0
  51. package/dist/types.d.ts.map +1 -0
  52. package/dist/types.js +37 -0
  53. package/package.json +43 -0
  54. package/src/cli-agent.ts +685 -0
  55. package/src/cli.ts +2695 -0
  56. package/src/core/http.ts +1008 -0
  57. package/src/core/pagination.ts +195 -0
  58. package/src/dates.ts +126 -0
  59. package/src/errors.ts +117 -0
  60. package/src/index.ts +153 -0
  61. package/src/ops.ts +174 -0
  62. package/src/resources/account.ts +43 -0
  63. package/src/resources/api-keys.ts +105 -0
  64. package/src/resources/generate.ts +69 -0
  65. package/src/resources/generations.ts +100 -0
  66. package/src/resources/projects.ts +391 -0
  67. package/src/resources/spec-revisions.ts +150 -0
  68. package/src/schemas.ts +90 -0
  69. package/src/types.ts +825 -0
@@ -0,0 +1,105 @@
1
+ // typeship — apiKeys resource.
2
+ // Generated by typeship — https://typeship.dev — do not edit by hand.
3
+
4
+ import { HttpCore, type ApiResult, type RequestOptions } from "../core/http.js";
5
+ import { paginate, PagePromise } from "../core/pagination.js";
6
+ import {
7
+ TransportError,
8
+ UnexpectedApiError,
9
+ ValidationError,
10
+ BadRequestError,
11
+ ForbiddenError,
12
+ NotFoundError,
13
+ RateLimitedError,
14
+ UnauthorizedError,
15
+ } from "../errors.js";
16
+ import type { ApiKey, ApiKeyList } from "../types.js";
17
+
18
+ export class ApiKeysResource {
19
+ constructor(private readonly _core: HttpCore) {}
20
+ /**
21
+ * List API keys
22
+ *
23
+ * Keys are never returned in full — only their identity and last four. Creation stays in the
24
+ * console deliberately: a leaked key that can mint more keys is a leaked account.
25
+ *
26
+ * Auto-paginates: `for await (const item of …)` walks every page.
27
+ * `GET /api_keys`
28
+ */
29
+ list(params?: ApiKeysListParams, options?: RequestOptions): PagePromise<ApiKey, ApiKeysListError> {
30
+ return paginate<ApiKey, ApiKeysListError>(this._core, {
31
+ method: "GET",
32
+ path: "/api_keys",
33
+ query: {
34
+ limit: params?.limit,
35
+ cursor: params?.cursor,
36
+ },
37
+ errors: {
38
+ "400": BadRequestError,
39
+ "401": UnauthorizedError,
40
+ "403": ForbiddenError,
41
+ "429": RateLimitedError,
42
+ },
43
+ idempotent: true,
44
+ schemaKey: "apiKeys.list",
45
+ options,
46
+ }, {
47
+ style: "cursor",
48
+ itemsField: "data",
49
+ cursorParam: "cursor",
50
+ nextCursorField: "next_cursor",
51
+ hasMoreField: "has_more",
52
+ limitParam: "limit",
53
+ });
54
+ }
55
+
56
+ /**
57
+ * Revoke an API key
58
+ *
59
+ * Idempotent: revoking an already-revoked key returns the same body, so a rotation script that
60
+ * re-runs does not have to special-case having already succeeded.
61
+ * `DELETE /api_keys/{api_key_id}`
62
+ */
63
+ async revoke(apiKeyId: string, options?: RequestOptions): Promise<ApiResult<ApiKey, ApiKeysRevokeError>> {
64
+ return this._core.request<ApiKey, ApiKeysRevokeError>({
65
+ method: "DELETE",
66
+ path: `/api_keys/${encodeURIComponent(String(apiKeyId))}`,
67
+ errors: {
68
+ "401": UnauthorizedError,
69
+ "403": ForbiddenError,
70
+ "404": NotFoundError,
71
+ "429": RateLimitedError,
72
+ },
73
+ idempotent: true,
74
+ schemaKey: "apiKeys.revoke",
75
+ options,
76
+ });
77
+ }
78
+ }
79
+
80
+ export interface ApiKeysListParams {
81
+ /** Maximum number of resources to return. */
82
+ limit?: number;
83
+ /** Opaque cursor from the preceding page's next_cursor. */
84
+ cursor?: string;
85
+ }
86
+
87
+ /** Every error `list` can produce, as a discriminated union. */
88
+ export type ApiKeysListError =
89
+ | BadRequestError
90
+ | UnauthorizedError
91
+ | ForbiddenError
92
+ | RateLimitedError
93
+ | UnexpectedApiError
94
+ | TransportError
95
+ | ValidationError;
96
+
97
+ /** Every error `revoke` can produce, as a discriminated union. */
98
+ export type ApiKeysRevokeError =
99
+ | UnauthorizedError
100
+ | ForbiddenError
101
+ | NotFoundError
102
+ | RateLimitedError
103
+ | UnexpectedApiError
104
+ | TransportError
105
+ | ValidationError;
@@ -0,0 +1,69 @@
1
+ // typeship — generate resource.
2
+ // Generated by typeship — https://typeship.dev — do not edit by hand.
3
+
4
+ import { HttpCore, type ApiResult, type RequestOptions } from "../core/http.js";
5
+ import {
6
+ TransportError,
7
+ UnexpectedApiError,
8
+ ValidationError,
9
+ ApiResponseError,
10
+ BadRequestError,
11
+ ForbiddenError,
12
+ PayloadTooLargeError,
13
+ RateLimitedError,
14
+ UnauthorizedError,
15
+ UnprocessableEntityError,
16
+ } from "../errors.js";
17
+ import type { GenerateRequest, GenerationResult } from "../types.js";
18
+
19
+ export class GenerateResource {
20
+ constructor(private readonly _core: HttpCore) {}
21
+ /**
22
+ * Generate a package from a spec
23
+ *
24
+ * Stateless generation: nothing is stored. Returns the full generated
25
+ * package as files. Works without an API key: anonymous calls generate
26
+ * the first 25 operations, rate limited per IP address, and the
27
+ * response's `limits` object says what was held back and where to lift
28
+ * it; anonymous calls from a spec URL also carry `claim.url`, a link
29
+ * that turns the run into a project once a person signs in. With a key, the free plan generates
30
+ * the first 25 operations and
31
+ * paid plans generate the whole spec. A present but invalid key is a
32
+ * 401, not a downgrade to anonymous.
33
+ * `POST /generate`
34
+ */
35
+ async run(
36
+ body: GenerateRequest,
37
+ options?: RequestOptions,
38
+ ): Promise<ApiResult<GenerationResult, GenerateRunError>> {
39
+ return this._core.request<GenerationResult, GenerateRunError>({
40
+ method: "POST",
41
+ path: "/generate",
42
+ body,
43
+ errors: {
44
+ "400": BadRequestError,
45
+ "401": UnauthorizedError,
46
+ "403": ForbiddenError,
47
+ "413": PayloadTooLargeError,
48
+ "422": UnprocessableEntityError,
49
+ "429": RateLimitedError,
50
+ default: ApiResponseError,
51
+ },
52
+ schemaKey: "generate.run",
53
+ options,
54
+ });
55
+ }
56
+ }
57
+
58
+ /** Every error `run` can produce, as a discriminated union. */
59
+ export type GenerateRunError =
60
+ | BadRequestError
61
+ | UnauthorizedError
62
+ | ForbiddenError
63
+ | PayloadTooLargeError
64
+ | UnprocessableEntityError
65
+ | RateLimitedError
66
+ | ApiResponseError
67
+ | UnexpectedApiError
68
+ | TransportError
69
+ | ValidationError;
@@ -0,0 +1,100 @@
1
+ // typeship — generations resource.
2
+ // Generated by typeship — https://typeship.dev — do not edit by hand.
3
+
4
+ import { HttpCore, type ApiResult, type RequestOptions } from "../core/http.js";
5
+ import {
6
+ TransportError,
7
+ UnexpectedApiError,
8
+ ValidationError,
9
+ BadRequestError,
10
+ ForbiddenError,
11
+ NotFoundError,
12
+ RateLimitedError,
13
+ UnauthorizedError,
14
+ } from "../errors.js";
15
+ import type { Generation, GenerationId } from "../types.js";
16
+
17
+ export class GenerationsResource {
18
+ constructor(private readonly _core: HttpCore) {}
19
+ /**
20
+ * Retrieve a generation
21
+ *
22
+ * Includes the generated files when the generation succeeded.
23
+ * `GET /generations/{generation_id}`
24
+ */
25
+ async retrieve(
26
+ generationId: GenerationId,
27
+ options?: RequestOptions,
28
+ ): Promise<ApiResult<Generation, GenerationsRetrieveError>> {
29
+ return this._core.request<Generation, GenerationsRetrieveError>({
30
+ method: "GET",
31
+ path: `/generations/${encodeURIComponent(String(generationId))}`,
32
+ errors: {
33
+ "401": UnauthorizedError,
34
+ "403": ForbiddenError,
35
+ "404": NotFoundError,
36
+ "429": RateLimitedError,
37
+ },
38
+ idempotent: true,
39
+ schemaKey: "generations.retrieve",
40
+ options,
41
+ });
42
+ }
43
+
44
+ /**
45
+ * Fetch one file from a generation
46
+ *
47
+ * Raw file content, for generations whose output was too large to inline (files_omitted true).
48
+ * The generation's files_index lists valid paths.
49
+ * `GET /generations/{generation_id}/file`
50
+ */
51
+ async retrieveFile(
52
+ generationId: GenerationId,
53
+ params: GenerationsRetrieveFileParams,
54
+ options?: RequestOptions,
55
+ ): Promise<ApiResult<string, GenerationsRetrieveFileError>> {
56
+ return this._core.request<string, GenerationsRetrieveFileError>({
57
+ method: "GET",
58
+ path: `/generations/${encodeURIComponent(String(generationId))}/file`,
59
+ query: {
60
+ path: params.path,
61
+ },
62
+ errors: {
63
+ "400": BadRequestError,
64
+ "401": UnauthorizedError,
65
+ "403": ForbiddenError,
66
+ "404": NotFoundError,
67
+ "429": RateLimitedError,
68
+ },
69
+ idempotent: true,
70
+ schemaKey: "generations.retrieveFile",
71
+ options,
72
+ });
73
+ }
74
+ }
75
+
76
+ /** Every error `retrieve` can produce, as a discriminated union. */
77
+ export type GenerationsRetrieveError =
78
+ | UnauthorizedError
79
+ | ForbiddenError
80
+ | NotFoundError
81
+ | RateLimitedError
82
+ | UnexpectedApiError
83
+ | TransportError
84
+ | ValidationError;
85
+
86
+ export interface GenerationsRetrieveFileParams {
87
+ /** Repo-relative path inside the generated package. */
88
+ path: string;
89
+ }
90
+
91
+ /** Every error `retrieveFile` can produce, as a discriminated union. */
92
+ export type GenerationsRetrieveFileError =
93
+ | BadRequestError
94
+ | UnauthorizedError
95
+ | ForbiddenError
96
+ | NotFoundError
97
+ | RateLimitedError
98
+ | UnexpectedApiError
99
+ | TransportError
100
+ | ValidationError;
@@ -0,0 +1,391 @@
1
+ // typeship — projects resource.
2
+ // Generated by typeship — https://typeship.dev — do not edit by hand.
3
+
4
+ import { HttpCore, type ApiResult, type RequestOptions } from "../core/http.js";
5
+ import { paginate, PagePromise } from "../core/pagination.js";
6
+ import {
7
+ TransportError,
8
+ UnexpectedApiError,
9
+ ValidationError,
10
+ BadRequestError,
11
+ ConflictError,
12
+ ForbiddenError,
13
+ InternalServerError,
14
+ NotFoundError,
15
+ PaymentRequiredError,
16
+ RateLimitedError,
17
+ UnauthorizedError,
18
+ UnprocessableEntityError,
19
+ } from "../errors.js";
20
+ import type {
21
+ CreateProjectRequest,
22
+ DeletedProject,
23
+ Generation,
24
+ GenerationBatch,
25
+ GenerationList,
26
+ GithubIntegrationHealth,
27
+ OutputId,
28
+ Project,
29
+ ProjectId,
30
+ ProjectList,
31
+ UpdateProjectRequest,
32
+ } from "../types.js";
33
+
34
+ export class ProjectsResource {
35
+ constructor(private readonly _core: HttpCore) {}
36
+ /**
37
+ * List projects
38
+ *
39
+ * Auto-paginates: `for await (const item of …)` walks every page.
40
+ * `GET /projects`
41
+ */
42
+ list(params?: ProjectsListParams, options?: RequestOptions): PagePromise<Project, ProjectsListError> {
43
+ return paginate<Project, ProjectsListError>(this._core, {
44
+ method: "GET",
45
+ path: "/projects",
46
+ query: {
47
+ limit: params?.limit,
48
+ cursor: params?.cursor,
49
+ },
50
+ errors: {
51
+ "400": BadRequestError,
52
+ "401": UnauthorizedError,
53
+ "403": ForbiddenError,
54
+ "429": RateLimitedError,
55
+ },
56
+ idempotent: true,
57
+ schemaKey: "projects.list",
58
+ options,
59
+ }, {
60
+ style: "cursor",
61
+ itemsField: "data",
62
+ cursorParam: "cursor",
63
+ nextCursorField: "next_cursor",
64
+ hasMoreField: "has_more",
65
+ limitParam: "limit",
66
+ });
67
+ }
68
+
69
+ /**
70
+ * Create a project
71
+ *
72
+ * Stores a URL- or GitHub-sourced project. Free includes one stored project, every selected
73
+ * output, and the first 25 operations, while keeping manual and automatic regeneration, history,
74
+ * destination pull requests, and preview checks. Stateless POST /generate does not consume this
75
+ * slot. Pro adds projects and the whole spec.
76
+ *
77
+ * A `Idempotency-Key` UUID is generated per call (stable across retries) unless you pass one.
78
+ * `POST /projects`
79
+ */
80
+ async create(
81
+ body: CreateProjectRequest,
82
+ params?: ProjectsCreateParams,
83
+ options?: RequestOptions,
84
+ ): Promise<ApiResult<Project, ProjectsCreateError>> {
85
+ return this._core.request<Project, ProjectsCreateError>({
86
+ method: "POST",
87
+ path: "/projects",
88
+ headers: {
89
+ "Idempotency-Key": params?.idempotencyKey === undefined ? undefined : String(params?.idempotencyKey),
90
+ },
91
+ body,
92
+ errors: {
93
+ "400": BadRequestError,
94
+ "401": UnauthorizedError,
95
+ "402": PaymentRequiredError,
96
+ "403": ForbiddenError,
97
+ "409": ConflictError,
98
+ "429": RateLimitedError,
99
+ "500": InternalServerError,
100
+ },
101
+ idempotencyKey: "Idempotency-Key",
102
+ schemaKey: "projects.create",
103
+ options,
104
+ });
105
+ }
106
+
107
+ /**
108
+ * Retrieve a project
109
+ * `GET /projects/{project_id}`
110
+ */
111
+ async retrieve(
112
+ projectId: ProjectId,
113
+ options?: RequestOptions,
114
+ ): Promise<ApiResult<Project, ProjectsRetrieveError>> {
115
+ return this._core.request<Project, ProjectsRetrieveError>({
116
+ method: "GET",
117
+ path: `/projects/${encodeURIComponent(String(projectId))}`,
118
+ errors: {
119
+ "401": UnauthorizedError,
120
+ "403": ForbiddenError,
121
+ "404": NotFoundError,
122
+ "429": RateLimitedError,
123
+ },
124
+ idempotent: true,
125
+ schemaKey: "projects.retrieve",
126
+ options,
127
+ });
128
+ }
129
+
130
+ /**
131
+ * Delete a project
132
+ * `DELETE /projects/{project_id}`
133
+ */
134
+ async delete(
135
+ projectId: ProjectId,
136
+ options?: RequestOptions,
137
+ ): Promise<ApiResult<DeletedProject, ProjectsDeleteError>> {
138
+ return this._core.request<DeletedProject, ProjectsDeleteError>({
139
+ method: "DELETE",
140
+ path: `/projects/${encodeURIComponent(String(projectId))}`,
141
+ errors: {
142
+ "401": UnauthorizedError,
143
+ "403": ForbiddenError,
144
+ "404": NotFoundError,
145
+ "429": RateLimitedError,
146
+ },
147
+ idempotent: true,
148
+ schemaKey: "projects.delete",
149
+ options,
150
+ });
151
+ }
152
+
153
+ /**
154
+ * Update a project
155
+ * `PATCH /projects/{project_id}`
156
+ */
157
+ async update(
158
+ projectId: ProjectId,
159
+ body: UpdateProjectRequest,
160
+ options?: RequestOptions,
161
+ ): Promise<ApiResult<Project, ProjectsUpdateError>> {
162
+ return this._core.request<Project, ProjectsUpdateError>({
163
+ method: "PATCH",
164
+ path: `/projects/${encodeURIComponent(String(projectId))}`,
165
+ body,
166
+ errors: {
167
+ "400": BadRequestError,
168
+ "401": UnauthorizedError,
169
+ "402": PaymentRequiredError,
170
+ "403": ForbiddenError,
171
+ "404": NotFoundError,
172
+ "429": RateLimitedError,
173
+ },
174
+ schemaKey: "projects.update",
175
+ options,
176
+ });
177
+ }
178
+
179
+ /**
180
+ * Diagnose a project's GitHub integration
181
+ *
182
+ * Returns machine-actionable source and destination access, spec readability, optional label
183
+ * setup, required status names, and the latest durable webhook delivery. The console renders this
184
+ * same result.
185
+ * `GET /projects/{project_id}/github`
186
+ */
187
+ async retrieveGithubHealth(
188
+ projectId: ProjectId,
189
+ options?: RequestOptions,
190
+ ): Promise<ApiResult<GithubIntegrationHealth, ProjectsRetrieveGithubHealthError>> {
191
+ return this._core.request<GithubIntegrationHealth, ProjectsRetrieveGithubHealthError>({
192
+ method: "GET",
193
+ path: `/projects/${encodeURIComponent(String(projectId))}/github`,
194
+ errors: {
195
+ "401": UnauthorizedError,
196
+ "403": ForbiddenError,
197
+ "404": NotFoundError,
198
+ "429": RateLimitedError,
199
+ },
200
+ idempotent: true,
201
+ schemaKey: "projects.retrieveGithubHealth",
202
+ options,
203
+ });
204
+ }
205
+
206
+ /**
207
+ * List a project's generations
208
+ *
209
+ * Auto-paginates: `for await (const item of …)` walks every page.
210
+ * `GET /projects/{project_id}/generations`
211
+ */
212
+ listGenerations(
213
+ projectId: ProjectId,
214
+ params?: ProjectsListGenerationsParams,
215
+ options?: RequestOptions,
216
+ ): PagePromise<Generation, ProjectsListGenerationsError> {
217
+ return paginate<Generation, ProjectsListGenerationsError>(this._core, {
218
+ method: "GET",
219
+ path: `/projects/${encodeURIComponent(String(projectId))}/generations`,
220
+ query: {
221
+ limit: params?.limit,
222
+ cursor: params?.cursor,
223
+ output: params?.output,
224
+ },
225
+ errors: {
226
+ "400": BadRequestError,
227
+ "401": UnauthorizedError,
228
+ "403": ForbiddenError,
229
+ "404": NotFoundError,
230
+ "429": RateLimitedError,
231
+ },
232
+ idempotent: true,
233
+ schemaKey: "projects.listGenerations",
234
+ options,
235
+ }, {
236
+ style: "cursor",
237
+ itemsField: "data",
238
+ cursorParam: "cursor",
239
+ nextCursorField: "next_cursor",
240
+ hasMoreField: "has_more",
241
+ limitParam: "limit",
242
+ });
243
+ }
244
+
245
+ /**
246
+ * Generate outputs and open pull requests
247
+ *
248
+ * Resolves the project's URL or repository source, generates every
249
+ * configured delivery package, stores each result in the project's history,
250
+ * and attempts to open a pull request in every configured destination.
251
+ * When the complete generated tree already matches a destination, no
252
+ * commit, branch, or pull request is created and that generation reports
253
+ * `pr_status: no_changes`. This is the same pipeline automatic
254
+ * regeneration runs after a source change.
255
+ * `POST /projects/{project_id}/generations`
256
+ */
257
+ async generate(
258
+ projectId: ProjectId,
259
+ options?: RequestOptions,
260
+ ): Promise<ApiResult<GenerationBatch, ProjectsGenerateError>> {
261
+ return this._core.request<GenerationBatch, ProjectsGenerateError>({
262
+ method: "POST",
263
+ path: `/projects/${encodeURIComponent(String(projectId))}/generations`,
264
+ errors: {
265
+ "401": UnauthorizedError,
266
+ "402": PaymentRequiredError,
267
+ "403": ForbiddenError,
268
+ "404": NotFoundError,
269
+ "422": UnprocessableEntityError,
270
+ "429": RateLimitedError,
271
+ "500": InternalServerError,
272
+ },
273
+ schemaKey: "projects.generate",
274
+ options,
275
+ });
276
+ }
277
+ }
278
+
279
+ export interface ProjectsListParams {
280
+ /** Maximum number of resources to return. */
281
+ limit?: number;
282
+ /** Opaque cursor from the preceding page's next_cursor. */
283
+ cursor?: string;
284
+ }
285
+
286
+ /** Every error `list` can produce, as a discriminated union. */
287
+ export type ProjectsListError =
288
+ | BadRequestError
289
+ | UnauthorizedError
290
+ | ForbiddenError
291
+ | RateLimitedError
292
+ | UnexpectedApiError
293
+ | TransportError
294
+ | ValidationError;
295
+
296
+ export interface ProjectsCreateParams {
297
+ /**
298
+ * Uniquely identifies this creation attempt. Retrying the same request with the same key returns
299
+ * the original response instead of creating another project. Reusing a key with different
300
+ * parameters returns 409.
301
+ */
302
+ idempotencyKey?: string;
303
+ }
304
+
305
+ /** Every error `create` can produce, as a discriminated union. */
306
+ export type ProjectsCreateError =
307
+ | BadRequestError
308
+ | UnauthorizedError
309
+ | PaymentRequiredError
310
+ | ForbiddenError
311
+ | ConflictError
312
+ | RateLimitedError
313
+ | InternalServerError
314
+ | UnexpectedApiError
315
+ | TransportError
316
+ | ValidationError;
317
+
318
+ /** Every error `retrieve` can produce, as a discriminated union. */
319
+ export type ProjectsRetrieveError =
320
+ | UnauthorizedError
321
+ | ForbiddenError
322
+ | NotFoundError
323
+ | RateLimitedError
324
+ | UnexpectedApiError
325
+ | TransportError
326
+ | ValidationError;
327
+
328
+ /** Every error `delete` can produce, as a discriminated union. */
329
+ export type ProjectsDeleteError =
330
+ | UnauthorizedError
331
+ | ForbiddenError
332
+ | NotFoundError
333
+ | RateLimitedError
334
+ | UnexpectedApiError
335
+ | TransportError
336
+ | ValidationError;
337
+
338
+ /** Every error `update` can produce, as a discriminated union. */
339
+ export type ProjectsUpdateError =
340
+ | BadRequestError
341
+ | UnauthorizedError
342
+ | PaymentRequiredError
343
+ | ForbiddenError
344
+ | NotFoundError
345
+ | RateLimitedError
346
+ | UnexpectedApiError
347
+ | TransportError
348
+ | ValidationError;
349
+
350
+ /** Every error `retrieveGithubHealth` can produce, as a discriminated union. */
351
+ export type ProjectsRetrieveGithubHealthError =
352
+ | UnauthorizedError
353
+ | ForbiddenError
354
+ | NotFoundError
355
+ | RateLimitedError
356
+ | UnexpectedApiError
357
+ | TransportError
358
+ | ValidationError;
359
+
360
+ export interface ProjectsListGenerationsParams {
361
+ /** Maximum number of resources to return. */
362
+ limit?: number;
363
+ /** Opaque cursor from the preceding page's next_cursor. */
364
+ cursor?: string;
365
+ /** Only generations for this output. */
366
+ output?: OutputId;
367
+ }
368
+
369
+ /** Every error `listGenerations` can produce, as a discriminated union. */
370
+ export type ProjectsListGenerationsError =
371
+ | BadRequestError
372
+ | UnauthorizedError
373
+ | ForbiddenError
374
+ | NotFoundError
375
+ | RateLimitedError
376
+ | UnexpectedApiError
377
+ | TransportError
378
+ | ValidationError;
379
+
380
+ /** Every error `generate` can produce, as a discriminated union. */
381
+ export type ProjectsGenerateError =
382
+ | UnauthorizedError
383
+ | PaymentRequiredError
384
+ | ForbiddenError
385
+ | NotFoundError
386
+ | UnprocessableEntityError
387
+ | RateLimitedError
388
+ | InternalServerError
389
+ | UnexpectedApiError
390
+ | TransportError
391
+ | ValidationError;