@typeship-ax/cli 0.6.0 → 0.9.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 (121) hide show
  1. package/AGENTS.md +31 -0
  2. package/README.md +26 -9
  3. package/api.json +6861 -3083
  4. package/api.md +508 -277
  5. package/dist/api-identity.d.ts +40 -0
  6. package/dist/api-identity.d.ts.map +1 -0
  7. package/dist/api-identity.js +128 -0
  8. package/dist/auth-profiles.d.ts +30 -0
  9. package/dist/auth-profiles.d.ts.map +1 -0
  10. package/dist/auth-profiles.js +138 -0
  11. package/dist/cli-agent.d.ts +9 -1
  12. package/dist/cli-agent.d.ts.map +1 -1
  13. package/dist/cli-agent.js +26 -9
  14. package/dist/cli.js +600 -582
  15. package/dist/console-login-check.d.ts +21 -0
  16. package/dist/console-login-check.d.ts.map +1 -0
  17. package/dist/console-login-check.js +107 -0
  18. package/dist/console-login-contract.d.ts +45 -0
  19. package/dist/console-login-contract.d.ts.map +1 -0
  20. package/dist/console-login-contract.js +40 -0
  21. package/dist/core/http.d.ts +21 -92
  22. package/dist/core/http.d.ts.map +1 -1
  23. package/dist/core/http.js +143 -221
  24. package/dist/core/pagination.d.ts.map +1 -1
  25. package/dist/core/pagination.js +6 -34
  26. package/dist/credential-storage.d.ts +24 -0
  27. package/dist/credential-storage.d.ts.map +1 -0
  28. package/dist/credential-storage.js +207 -0
  29. package/dist/dates.d.ts +0 -2
  30. package/dist/dates.d.ts.map +1 -1
  31. package/dist/dates.js +0 -1
  32. package/dist/docs.d.ts +36 -0
  33. package/dist/docs.d.ts.map +1 -0
  34. package/dist/docs.js +258 -0
  35. package/dist/errors.d.ts +42 -34
  36. package/dist/errors.d.ts.map +1 -1
  37. package/dist/errors.js +30 -20
  38. package/dist/index.d.ts +27 -12
  39. package/dist/index.d.ts.map +1 -1
  40. package/dist/index.js +40 -14
  41. package/dist/named-credentials.d.ts +21 -0
  42. package/dist/named-credentials.d.ts.map +1 -0
  43. package/dist/named-credentials.js +86 -0
  44. package/dist/oauth-login.d.ts +39 -0
  45. package/dist/oauth-login.d.ts.map +1 -0
  46. package/dist/oauth-login.js +171 -0
  47. package/dist/oauth-request.d.ts +21 -0
  48. package/dist/oauth-request.d.ts.map +1 -0
  49. package/dist/oauth-request.js +119 -0
  50. package/dist/oauth-session.d.ts +106 -0
  51. package/dist/oauth-session.d.ts.map +1 -0
  52. package/dist/oauth-session.js +244 -0
  53. package/dist/ops.d.ts +18 -0
  54. package/dist/ops.d.ts.map +1 -1
  55. package/dist/ops.js +31 -17
  56. package/dist/polling-login.d.ts +57 -0
  57. package/dist/polling-login.d.ts.map +1 -0
  58. package/dist/polling-login.js +204 -0
  59. package/dist/resources/account.d.ts +4 -4
  60. package/dist/resources/account.d.ts.map +1 -1
  61. package/dist/resources/account.js +1 -0
  62. package/dist/resources/api-keys.d.ts +13 -8
  63. package/dist/resources/api-keys.d.ts.map +1 -1
  64. package/dist/resources/api-keys.js +5 -1
  65. package/dist/resources/definition-revisions.d.ts +58 -0
  66. package/dist/resources/definition-revisions.d.ts.map +1 -0
  67. package/dist/resources/definition-revisions.js +114 -0
  68. package/dist/resources/definitions.d.ts +35 -0
  69. package/dist/resources/definitions.d.ts.map +1 -0
  70. package/dist/resources/definitions.js +60 -0
  71. package/dist/resources/generate.d.ts +18 -7
  72. package/dist/resources/generate.d.ts.map +1 -1
  73. package/dist/resources/generate.js +13 -5
  74. package/dist/resources/generations.d.ts +6 -6
  75. package/dist/resources/generations.d.ts.map +1 -1
  76. package/dist/resources/generations.js +3 -1
  77. package/dist/resources/projects.d.ts +111 -35
  78. package/dist/resources/projects.d.ts.map +1 -1
  79. package/dist/resources/projects.js +125 -15
  80. package/dist/resources/targets.d.ts +97 -0
  81. package/dist/resources/targets.d.ts.map +1 -0
  82. package/dist/resources/targets.js +197 -0
  83. package/dist/schemas.d.ts.map +1 -1
  84. package/dist/schemas.js +135 -62
  85. package/dist/types.d.ts +2072 -267
  86. package/dist/types.d.ts.map +1 -1
  87. package/dist/types.js +20 -3
  88. package/package.json +2 -1
  89. package/src/api-identity.ts +98 -0
  90. package/src/auth-profiles.ts +114 -0
  91. package/src/cli-agent.ts +28 -11
  92. package/src/cli.ts +528 -560
  93. package/src/console-login-check.ts +88 -0
  94. package/src/console-login-contract.ts +65 -0
  95. package/src/core/http.ts +156 -305
  96. package/src/core/pagination.ts +6 -30
  97. package/src/credential-storage.ts +183 -0
  98. package/src/dates.ts +0 -1
  99. package/src/docs.ts +239 -0
  100. package/src/errors.ts +52 -41
  101. package/src/index.ts +49 -14
  102. package/src/named-credentials.ts +74 -0
  103. package/src/oauth-login.ts +184 -0
  104. package/src/oauth-request.ts +90 -0
  105. package/src/oauth-session.ts +258 -0
  106. package/src/ops.ts +56 -17
  107. package/src/polling-login.ts +165 -0
  108. package/src/resources/account.ts +6 -3
  109. package/src/resources/api-keys.ts +27 -7
  110. package/src/resources/definition-revisions.ts +207 -0
  111. package/src/resources/definitions.ts +122 -0
  112. package/src/resources/generate.ts +29 -6
  113. package/src/resources/generations.ts +9 -4
  114. package/src/resources/projects.ts +274 -41
  115. package/src/resources/targets.ts +378 -0
  116. package/src/schemas.ts +135 -62
  117. package/src/types.ts +2273 -322
  118. package/dist/resources/spec-revisions.d.ts +0 -47
  119. package/dist/resources/spec-revisions.d.ts.map +0 -1
  120. package/dist/resources/spec-revisions.js +0 -90
  121. package/src/resources/spec-revisions.ts +0 -150
@@ -4,9 +4,11 @@
4
4
  import { HttpCore, type ApiResult, type RequestOptions } from "../core/http.js";
5
5
  import { paginate, PagePromise } from "../core/pagination.js";
6
6
  import {
7
+ ResponseParseError,
7
8
  TransportError,
8
9
  UnexpectedApiError,
9
10
  ValidationError,
11
+ BadGatewayError,
10
12
  BadRequestError,
11
13
  ConflictError,
12
14
  ForbiddenError,
@@ -20,14 +22,28 @@ import {
20
22
  import type {
21
23
  CreateProjectRequest,
22
24
  DeletedProject,
23
- Generation,
25
+ DeletedProjectRead,
26
+ DiagnosticRemediation,
27
+ DiagnosticRemediationRead,
28
+ DiagnosticRemediationRequest,
29
+ DiagnosticReport,
30
+ DiagnosticReportRead,
24
31
  GenerationBatch,
32
+ GenerationBatchRead,
25
33
  GenerationList,
26
- GithubIntegrationHealth,
27
- OutputId,
34
+ GenerationListRead,
35
+ GenerationSummary,
36
+ GenerationSummaryRead,
28
37
  Project,
29
38
  ProjectId,
30
39
  ProjectList,
40
+ ProjectListRead,
41
+ ProjectRead,
42
+ ProjectSummary,
43
+ ProjectSummaryRead,
44
+ RepositoryIntegrationHealth,
45
+ RepositoryIntegrationHealthRead,
46
+ TargetId,
31
47
  UpdateProjectRequest,
32
48
  } from "../types.js";
33
49
 
@@ -39,10 +55,14 @@ export class ProjectsResource {
39
55
  * Auto-paginates: `for await (const item of …)` walks every page.
40
56
  * `GET /projects`
41
57
  */
42
- list(params?: ProjectsListParams, options?: RequestOptions): PagePromise<Project, ProjectsListError> {
43
- return paginate<Project, ProjectsListError>(this._core, {
58
+ list(
59
+ params?: ProjectsListParams,
60
+ options?: RequestOptions,
61
+ ): PagePromise<ProjectSummaryRead, ProjectsListError> {
62
+ return paginate<ProjectSummaryRead, ProjectsListError>(this._core, {
44
63
  method: "GET",
45
64
  path: "/projects",
65
+ security: [{"apiKey":[]}],
46
66
  query: {
47
67
  limit: params?.limit,
48
68
  cursor: params?.cursor,
@@ -70,9 +90,9 @@ export class ProjectsResource {
70
90
  * Create a project
71
91
  *
72
92
  * 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,
93
+ * target, and the first 25 operations, while keeping manual and automatic regeneration, history,
74
94
  * destination pull requests, and preview checks. Stateless POST /generate does not consume this
75
- * slot. Pro adds projects and the whole spec.
95
+ * slot. Pro adds projects and generates every operation in the Definition.
76
96
  *
77
97
  * A `Idempotency-Key` UUID is generated per call (stable across retries) unless you pass one.
78
98
  * `POST /projects`
@@ -81,10 +101,11 @@ export class ProjectsResource {
81
101
  body: CreateProjectRequest,
82
102
  params?: ProjectsCreateParams,
83
103
  options?: RequestOptions,
84
- ): Promise<ApiResult<Project, ProjectsCreateError>> {
85
- return this._core.request<Project, ProjectsCreateError>({
104
+ ): Promise<ApiResult<ProjectRead, ProjectsCreateError>> {
105
+ return this._core.request<ProjectRead, ProjectsCreateError>({
86
106
  method: "POST",
87
107
  path: "/projects",
108
+ security: [{"apiKey":[]}],
88
109
  headers: {
89
110
  "Idempotency-Key": params?.idempotencyKey === undefined ? undefined : String(params?.idempotencyKey),
90
111
  },
@@ -95,6 +116,7 @@ export class ProjectsResource {
95
116
  "402": PaymentRequiredError,
96
117
  "403": ForbiddenError,
97
118
  "409": ConflictError,
119
+ "422": UnprocessableEntityError,
98
120
  "429": RateLimitedError,
99
121
  "500": InternalServerError,
100
122
  },
@@ -106,15 +128,18 @@ export class ProjectsResource {
106
128
 
107
129
  /**
108
130
  * Retrieve a project
131
+ *
132
+ * Returns Project-owned fields only. List Targets separately for Target and Delivery data.
109
133
  * `GET /projects/{project_id}`
110
134
  */
111
135
  async retrieve(
112
136
  projectId: ProjectId,
113
137
  options?: RequestOptions,
114
- ): Promise<ApiResult<Project, ProjectsRetrieveError>> {
115
- return this._core.request<Project, ProjectsRetrieveError>({
138
+ ): Promise<ApiResult<ProjectRead, ProjectsRetrieveError>> {
139
+ return this._core.request<ProjectRead, ProjectsRetrieveError>({
116
140
  method: "GET",
117
141
  path: `/projects/${encodeURIComponent(String(projectId))}`,
142
+ security: [{"apiKey":[]}],
118
143
  errors: {
119
144
  "401": UnauthorizedError,
120
145
  "403": ForbiddenError,
@@ -134,10 +159,11 @@ export class ProjectsResource {
134
159
  async delete(
135
160
  projectId: ProjectId,
136
161
  options?: RequestOptions,
137
- ): Promise<ApiResult<DeletedProject, ProjectsDeleteError>> {
138
- return this._core.request<DeletedProject, ProjectsDeleteError>({
162
+ ): Promise<ApiResult<DeletedProjectRead, ProjectsDeleteError>> {
163
+ return this._core.request<DeletedProjectRead, ProjectsDeleteError>({
139
164
  method: "DELETE",
140
165
  path: `/projects/${encodeURIComponent(String(projectId))}`,
166
+ security: [{"apiKey":[]}],
141
167
  errors: {
142
168
  "401": UnauthorizedError,
143
169
  "403": ForbiddenError,
@@ -158,10 +184,11 @@ export class ProjectsResource {
158
184
  projectId: ProjectId,
159
185
  body: UpdateProjectRequest,
160
186
  options?: RequestOptions,
161
- ): Promise<ApiResult<Project, ProjectsUpdateError>> {
162
- return this._core.request<Project, ProjectsUpdateError>({
187
+ ): Promise<ApiResult<ProjectRead, ProjectsUpdateError>> {
188
+ return this._core.request<ProjectRead, ProjectsUpdateError>({
163
189
  method: "PATCH",
164
190
  path: `/projects/${encodeURIComponent(String(projectId))}`,
191
+ security: [{"apiKey":[]}],
165
192
  body,
166
193
  errors: {
167
194
  "400": BadRequestError,
@@ -169,7 +196,10 @@ export class ProjectsResource {
169
196
  "402": PaymentRequiredError,
170
197
  "403": ForbiddenError,
171
198
  "404": NotFoundError,
199
+ "409": ConflictError,
200
+ "422": UnprocessableEntityError,
172
201
  "429": RateLimitedError,
202
+ "502": BadGatewayError,
173
203
  },
174
204
  schemaKey: "projects.update",
175
205
  options,
@@ -177,20 +207,22 @@ export class ProjectsResource {
177
207
  }
178
208
 
179
209
  /**
180
- * Diagnose a project's GitHub integration
210
+ * Analyze a project's latest Definition Revision
181
211
  *
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`
212
+ * Runs deterministic OpenAPI or GraphQL authorship checks against the latest observed immutable
213
+ * Definition Revision after applying the Definition's existing patches. Diagnostics group every
214
+ * affected location under a stable rule. Exact patches are included only when Typeship can derive
215
+ * the change without inventing API behavior.
216
+ * `GET /projects/{project_id}/diagnostics`
186
217
  */
187
- async retrieveGithubHealth(
218
+ async retrieveDiagnostics(
188
219
  projectId: ProjectId,
189
220
  options?: RequestOptions,
190
- ): Promise<ApiResult<GithubIntegrationHealth, ProjectsRetrieveGithubHealthError>> {
191
- return this._core.request<GithubIntegrationHealth, ProjectsRetrieveGithubHealthError>({
221
+ ): Promise<ApiResult<DiagnosticReportRead, ProjectsRetrieveDiagnosticsError>> {
222
+ return this._core.request<DiagnosticReportRead, ProjectsRetrieveDiagnosticsError>({
192
223
  method: "GET",
193
- path: `/projects/${encodeURIComponent(String(projectId))}/github`,
224
+ path: `/projects/${encodeURIComponent(String(projectId))}/diagnostics`,
225
+ security: [{"apiKey":[]}],
194
226
  errors: {
195
227
  "401": UnauthorizedError,
196
228
  "403": ForbiddenError,
@@ -198,7 +230,110 @@ export class ProjectsResource {
198
230
  "429": RateLimitedError,
199
231
  },
200
232
  idempotent: true,
201
- schemaKey: "projects.retrieveGithubHealth",
233
+ schemaKey: "projects.retrieveDiagnostics",
234
+ options,
235
+ });
236
+ }
237
+
238
+ /**
239
+ * Refresh a project's Diagnostics from its configured source
240
+ *
241
+ * Fetches the complete configured source, records a new immutable revision only when content
242
+ * changed, and returns its Diagnostics. This does not generate targets or consume a metered
243
+ * generation.
244
+ *
245
+ * A `Idempotency-Key` UUID is generated per call (stable across retries) unless you pass one.
246
+ * `POST /projects/{project_id}/diagnostics`
247
+ */
248
+ async refreshDiagnostics(
249
+ projectId: ProjectId,
250
+ params?: ProjectsRefreshDiagnosticsParams,
251
+ options?: RequestOptions,
252
+ ): Promise<ApiResult<DiagnosticReportRead, ProjectsRefreshDiagnosticsError>> {
253
+ return this._core.request<DiagnosticReportRead, ProjectsRefreshDiagnosticsError>({
254
+ method: "POST",
255
+ path: `/projects/${encodeURIComponent(String(projectId))}/diagnostics`,
256
+ security: [{"apiKey":[]}],
257
+ headers: {
258
+ "Idempotency-Key": params?.idempotencyKey === undefined ? undefined : String(params?.idempotencyKey),
259
+ },
260
+ errors: {
261
+ "401": UnauthorizedError,
262
+ "403": ForbiddenError,
263
+ "404": NotFoundError,
264
+ "409": ConflictError,
265
+ "422": UnprocessableEntityError,
266
+ "429": RateLimitedError,
267
+ },
268
+ idempotencyKey: "Idempotency-Key",
269
+ schemaKey: "projects.refreshDiagnostics",
270
+ options,
271
+ });
272
+ }
273
+
274
+ /**
275
+ * Apply exact, reviewed diagnostic remediations
276
+ *
277
+ * Applies only deterministic patches. Repository sources receive an updateable source pull
278
+ * request; URL sources receive project overlays. Diagnostics that require API-owner intent return
279
+ * 422 and include an authoring_brief in the Diagnostic instead.
280
+ *
281
+ * A `Idempotency-Key` UUID is generated per call (stable across retries) unless you pass one.
282
+ * `POST /projects/{project_id}/diagnostics/remediations`
283
+ */
284
+ async remediateDiagnostics(
285
+ projectId: ProjectId,
286
+ body: DiagnosticRemediationRequest,
287
+ params?: ProjectsRemediateDiagnosticsParams,
288
+ options?: RequestOptions,
289
+ ): Promise<ApiResult<DiagnosticRemediationRead, ProjectsRemediateDiagnosticsError>> {
290
+ return this._core.request<DiagnosticRemediationRead, ProjectsRemediateDiagnosticsError>({
291
+ method: "POST",
292
+ path: `/projects/${encodeURIComponent(String(projectId))}/diagnostics/remediations`,
293
+ security: [{"apiKey":[]}],
294
+ headers: {
295
+ "Idempotency-Key": params?.idempotencyKey === undefined ? undefined : String(params?.idempotencyKey),
296
+ },
297
+ body,
298
+ errors: {
299
+ "400": BadRequestError,
300
+ "401": UnauthorizedError,
301
+ "403": ForbiddenError,
302
+ "404": NotFoundError,
303
+ "409": ConflictError,
304
+ "422": UnprocessableEntityError,
305
+ "429": RateLimitedError,
306
+ },
307
+ idempotencyKey: "Idempotency-Key",
308
+ schemaKey: "projects.remediateDiagnostics",
309
+ options,
310
+ });
311
+ }
312
+
313
+ /**
314
+ * Diagnose a project's repository integrations
315
+ *
316
+ * Returns provider-neutral, machine-actionable source and destination access, Definition
317
+ * readability, source-approval label setup, required status names, and the latest durable webhook
318
+ * delivery. The Console renders this same result.
319
+ * `GET /projects/{project_id}/integration-health`
320
+ */
321
+ async retrieveIntegrationHealth(
322
+ projectId: ProjectId,
323
+ options?: RequestOptions,
324
+ ): Promise<ApiResult<RepositoryIntegrationHealthRead, ProjectsRetrieveIntegrationHealthError>> {
325
+ return this._core.request<RepositoryIntegrationHealthRead, ProjectsRetrieveIntegrationHealthError>({
326
+ method: "GET",
327
+ path: `/projects/${encodeURIComponent(String(projectId))}/integration-health`,
328
+ security: [{"apiKey":[]}],
329
+ errors: {
330
+ "401": UnauthorizedError,
331
+ "403": ForbiddenError,
332
+ "404": NotFoundError,
333
+ "429": RateLimitedError,
334
+ },
335
+ idempotent: true,
336
+ schemaKey: "projects.retrieveIntegrationHealth",
202
337
  options,
203
338
  });
204
339
  }
@@ -213,14 +348,15 @@ export class ProjectsResource {
213
348
  projectId: ProjectId,
214
349
  params?: ProjectsListGenerationsParams,
215
350
  options?: RequestOptions,
216
- ): PagePromise<Generation, ProjectsListGenerationsError> {
217
- return paginate<Generation, ProjectsListGenerationsError>(this._core, {
351
+ ): PagePromise<GenerationSummaryRead, ProjectsListGenerationsError> {
352
+ return paginate<GenerationSummaryRead, ProjectsListGenerationsError>(this._core, {
218
353
  method: "GET",
219
354
  path: `/projects/${encodeURIComponent(String(projectId))}/generations`,
355
+ security: [{"apiKey":[]}],
220
356
  query: {
221
357
  limit: params?.limit,
222
358
  cursor: params?.cursor,
223
- output: params?.output,
359
+ target_id: params?.targetId,
224
360
  },
225
361
  errors: {
226
362
  "400": BadRequestError,
@@ -243,33 +379,42 @@ export class ProjectsResource {
243
379
  }
244
380
 
245
381
  /**
246
- * Generate outputs and open pull requests
382
+ * Generate targets and open pull requests
247
383
  *
248
- * Resolves the project's URL or repository source, generates every
384
+ * Resolves the project's URL or GitHub source, generates every
249
385
  * configured delivery package, stores each result in the project's history,
250
386
  * and attempts to open a pull request in every configured destination.
251
387
  * When the complete generated tree already matches a destination, no
252
388
  * commit, branch, or pull request is created and that generation reports
253
389
  * `pr_status: no_changes`. This is the same pipeline automatic
254
390
  * regeneration runs after a source change.
391
+ *
392
+ * A `Idempotency-Key` UUID is generated per call (stable across retries) unless you pass one.
255
393
  * `POST /projects/{project_id}/generations`
256
394
  */
257
395
  async generate(
258
396
  projectId: ProjectId,
397
+ params?: ProjectsGenerateParams,
259
398
  options?: RequestOptions,
260
- ): Promise<ApiResult<GenerationBatch, ProjectsGenerateError>> {
261
- return this._core.request<GenerationBatch, ProjectsGenerateError>({
399
+ ): Promise<ApiResult<GenerationBatchRead, ProjectsGenerateError>> {
400
+ return this._core.request<GenerationBatchRead, ProjectsGenerateError>({
262
401
  method: "POST",
263
402
  path: `/projects/${encodeURIComponent(String(projectId))}/generations`,
403
+ security: [{"apiKey":[]}],
404
+ headers: {
405
+ "Idempotency-Key": params?.idempotencyKey === undefined ? undefined : String(params?.idempotencyKey),
406
+ },
264
407
  errors: {
265
408
  "401": UnauthorizedError,
266
409
  "402": PaymentRequiredError,
267
410
  "403": ForbiddenError,
268
411
  "404": NotFoundError,
412
+ "409": ConflictError,
269
413
  "422": UnprocessableEntityError,
270
414
  "429": RateLimitedError,
271
415
  "500": InternalServerError,
272
416
  },
417
+ idempotencyKey: "Idempotency-Key",
273
418
  schemaKey: "projects.generate",
274
419
  options,
275
420
  });
@@ -279,7 +424,10 @@ export class ProjectsResource {
279
424
  export interface ProjectsListParams {
280
425
  /** Maximum number of resources to return. */
281
426
  limit?: number;
282
- /** Opaque cursor from the preceding page's next_cursor. */
427
+ /**
428
+ * Opaque cursor from the preceding page's next_cursor. Valid only for the same account,
429
+ * operation, filters, and ordering that issued it.
430
+ */
283
431
  cursor?: string;
284
432
  }
285
433
 
@@ -290,14 +438,16 @@ export type ProjectsListError =
290
438
  | ForbiddenError
291
439
  | RateLimitedError
292
440
  | UnexpectedApiError
441
+ | ResponseParseError
293
442
  | TransportError
294
443
  | ValidationError;
295
444
 
296
445
  export interface ProjectsCreateParams {
297
446
  /**
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.
447
+ * Identifies one logical write for 24 hours. The key is scoped to the authenticated account and
448
+ * operation; account-less generation uses a hashed network identity. Retrying the same method,
449
+ * path, query, and JSON body replays the original response. Reusing the key with changed intent
450
+ * returns 409. After expiry the key starts a new write.
301
451
  */
302
452
  idempotencyKey?: string;
303
453
  }
@@ -309,9 +459,11 @@ export type ProjectsCreateError =
309
459
  | PaymentRequiredError
310
460
  | ForbiddenError
311
461
  | ConflictError
462
+ | UnprocessableEntityError
312
463
  | RateLimitedError
313
464
  | InternalServerError
314
465
  | UnexpectedApiError
466
+ | ResponseParseError
315
467
  | TransportError
316
468
  | ValidationError;
317
469
 
@@ -322,6 +474,7 @@ export type ProjectsRetrieveError =
322
474
  | NotFoundError
323
475
  | RateLimitedError
324
476
  | UnexpectedApiError
477
+ | ResponseParseError
325
478
  | TransportError
326
479
  | ValidationError;
327
480
 
@@ -332,6 +485,7 @@ export type ProjectsDeleteError =
332
485
  | NotFoundError
333
486
  | RateLimitedError
334
487
  | UnexpectedApiError
488
+ | ResponseParseError
335
489
  | TransportError
336
490
  | ValidationError;
337
491
 
@@ -342,28 +496,94 @@ export type ProjectsUpdateError =
342
496
  | PaymentRequiredError
343
497
  | ForbiddenError
344
498
  | NotFoundError
499
+ | ConflictError
500
+ | UnprocessableEntityError
501
+ | RateLimitedError
502
+ | BadGatewayError
503
+ | UnexpectedApiError
504
+ | ResponseParseError
505
+ | TransportError
506
+ | ValidationError;
507
+
508
+ /** Every error `retrieveDiagnostics` can produce, as a discriminated union. */
509
+ export type ProjectsRetrieveDiagnosticsError =
510
+ | UnauthorizedError
511
+ | ForbiddenError
512
+ | NotFoundError
345
513
  | RateLimitedError
346
514
  | UnexpectedApiError
515
+ | ResponseParseError
347
516
  | TransportError
348
517
  | ValidationError;
349
518
 
350
- /** Every error `retrieveGithubHealth` can produce, as a discriminated union. */
351
- export type ProjectsRetrieveGithubHealthError =
519
+ export interface ProjectsRefreshDiagnosticsParams {
520
+ /**
521
+ * Identifies one logical write for 24 hours. The key is scoped to the authenticated account and
522
+ * operation; account-less generation uses a hashed network identity. Retrying the same method,
523
+ * path, query, and JSON body replays the original response. Reusing the key with changed intent
524
+ * returns 409. After expiry the key starts a new write.
525
+ */
526
+ idempotencyKey?: string;
527
+ }
528
+
529
+ /** Every error `refreshDiagnostics` can produce, as a discriminated union. */
530
+ export type ProjectsRefreshDiagnosticsError =
352
531
  | UnauthorizedError
353
532
  | ForbiddenError
354
533
  | NotFoundError
534
+ | ConflictError
535
+ | UnprocessableEntityError
355
536
  | RateLimitedError
356
537
  | UnexpectedApiError
538
+ | ResponseParseError
539
+ | TransportError
540
+ | ValidationError;
541
+
542
+ export interface ProjectsRemediateDiagnosticsParams {
543
+ /**
544
+ * Identifies one logical write for 24 hours. The key is scoped to the authenticated account and
545
+ * operation; account-less generation uses a hashed network identity. Retrying the same method,
546
+ * path, query, and JSON body replays the original response. Reusing the key with changed intent
547
+ * returns 409. After expiry the key starts a new write.
548
+ */
549
+ idempotencyKey?: string;
550
+ }
551
+
552
+ /** Every error `remediateDiagnostics` can produce, as a discriminated union. */
553
+ export type ProjectsRemediateDiagnosticsError =
554
+ | BadRequestError
555
+ | UnauthorizedError
556
+ | ForbiddenError
557
+ | NotFoundError
558
+ | ConflictError
559
+ | UnprocessableEntityError
560
+ | RateLimitedError
561
+ | UnexpectedApiError
562
+ | ResponseParseError
563
+ | TransportError
564
+ | ValidationError;
565
+
566
+ /** Every error `retrieveIntegrationHealth` can produce, as a discriminated union. */
567
+ export type ProjectsRetrieveIntegrationHealthError =
568
+ | UnauthorizedError
569
+ | ForbiddenError
570
+ | NotFoundError
571
+ | RateLimitedError
572
+ | UnexpectedApiError
573
+ | ResponseParseError
357
574
  | TransportError
358
575
  | ValidationError;
359
576
 
360
577
  export interface ProjectsListGenerationsParams {
361
578
  /** Maximum number of resources to return. */
362
579
  limit?: number;
363
- /** Opaque cursor from the preceding page's next_cursor. */
580
+ /**
581
+ * Opaque cursor from the preceding page's next_cursor. Valid only for the same account,
582
+ * operation, filters, and ordering that issued it.
583
+ */
364
584
  cursor?: string;
365
- /** Only generations for this output. */
366
- output?: OutputId;
585
+ /** Only generations for this persisted Target. */
586
+ targetId?: TargetId;
367
587
  }
368
588
 
369
589
  /** Every error `listGenerations` can produce, as a discriminated union. */
@@ -374,18 +594,31 @@ export type ProjectsListGenerationsError =
374
594
  | NotFoundError
375
595
  | RateLimitedError
376
596
  | UnexpectedApiError
597
+ | ResponseParseError
377
598
  | TransportError
378
599
  | ValidationError;
379
600
 
601
+ export interface ProjectsGenerateParams {
602
+ /**
603
+ * Identifies one logical write for 24 hours. The key is scoped to the authenticated account and
604
+ * operation; account-less generation uses a hashed network identity. Retrying the same method,
605
+ * path, query, and JSON body replays the original response. Reusing the key with changed intent
606
+ * returns 409. After expiry the key starts a new write.
607
+ */
608
+ idempotencyKey?: string;
609
+ }
610
+
380
611
  /** Every error `generate` can produce, as a discriminated union. */
381
612
  export type ProjectsGenerateError =
382
613
  | UnauthorizedError
383
614
  | PaymentRequiredError
384
615
  | ForbiddenError
385
616
  | NotFoundError
617
+ | ConflictError
386
618
  | UnprocessableEntityError
387
619
  | RateLimitedError
388
620
  | InternalServerError
389
621
  | UnexpectedApiError
622
+ | ResponseParseError
390
623
  | TransportError
391
624
  | ValidationError;