@typeship-ax/mcp 0.19.0 → 0.21.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 (103) hide show
  1. package/AGENTS.md +3 -3
  2. package/README.md +1 -1
  3. package/api.json +7519 -6363
  4. package/api.md +8015 -6765
  5. package/dist/api-identity.d.ts.map +1 -1
  6. package/dist/api-identity.js +6 -1
  7. package/dist/core/http.d.ts +26 -14
  8. package/dist/core/http.d.ts.map +1 -1
  9. package/dist/core/http.js +90 -19
  10. package/dist/core/pagination.d.ts +8 -8
  11. package/dist/core/pagination.d.ts.map +1 -1
  12. package/dist/core/pagination.js +7 -16
  13. package/dist/errors.d.ts +4 -4
  14. package/dist/errors.d.ts.map +1 -1
  15. package/dist/errors.js +7 -7
  16. package/dist/index.d.ts +33 -19
  17. package/dist/index.d.ts.map +1 -1
  18. package/dist/index.js +37 -17
  19. package/dist/mcp-protocol.js +2 -2
  20. package/dist/mcp.d.ts.map +1 -1
  21. package/dist/mcp.js +6 -5
  22. package/dist/ops.d.ts +1 -1
  23. package/dist/ops.d.ts.map +1 -1
  24. package/dist/ops.js +40 -43
  25. package/dist/resources/api-keys.d.ts +16 -15
  26. package/dist/resources/api-keys.d.ts.map +1 -1
  27. package/dist/resources/api-keys.js +6 -6
  28. package/dist/resources/deliveries.d.ts +47 -0
  29. package/dist/resources/deliveries.d.ts.map +1 -0
  30. package/dist/resources/deliveries.js +70 -0
  31. package/dist/resources/drafts.d.ts +157 -0
  32. package/dist/resources/drafts.d.ts.map +1 -0
  33. package/dist/resources/drafts.js +230 -0
  34. package/dist/resources/files.d.ts +23 -0
  35. package/dist/resources/files.d.ts.map +1 -0
  36. package/dist/resources/files.js +38 -0
  37. package/dist/resources/generate.d.ts +14 -14
  38. package/dist/resources/generate.d.ts.map +1 -1
  39. package/dist/resources/generate.js +7 -7
  40. package/dist/resources/generations.d.ts +67 -21
  41. package/dist/resources/generations.d.ts.map +1 -1
  42. package/dist/resources/generations.js +67 -20
  43. package/dist/resources/organization.d.ts +18 -0
  44. package/dist/resources/organization.d.ts.map +1 -0
  45. package/dist/resources/{account.js → organization.js} +10 -10
  46. package/dist/resources/projects.d.ts +50 -139
  47. package/dist/resources/projects.d.ts.map +1 -1
  48. package/dist/resources/projects.js +29 -179
  49. package/dist/resources/publications.d.ts +47 -0
  50. package/dist/resources/publications.d.ts.map +1 -0
  51. package/dist/resources/publications.js +70 -0
  52. package/dist/resources/releases.d.ts +68 -0
  53. package/dist/resources/releases.d.ts.map +1 -0
  54. package/dist/resources/releases.js +102 -0
  55. package/dist/resources/spec-revisions.d.ts +87 -0
  56. package/dist/resources/spec-revisions.d.ts.map +1 -0
  57. package/dist/resources/spec-revisions.js +116 -0
  58. package/dist/resources/specs.d.ts +73 -0
  59. package/dist/resources/specs.d.ts.map +1 -0
  60. package/dist/resources/specs.js +108 -0
  61. package/dist/resources/targets.d.ts +48 -267
  62. package/dist/resources/targets.d.ts.map +1 -1
  63. package/dist/resources/targets.js +28 -407
  64. package/dist/schemas.d.ts.map +1 -1
  65. package/dist/schemas.js +143 -149
  66. package/dist/types.d.ts +1320 -1637
  67. package/dist/types.d.ts.map +1 -1
  68. package/dist/types.js +84 -76
  69. package/package.json +1 -1
  70. package/server.json +2 -2
  71. package/src/api-identity.ts +6 -2
  72. package/src/core/http.ts +89 -24
  73. package/src/core/pagination.ts +13 -23
  74. package/src/errors.ts +7 -7
  75. package/src/index.ts +41 -23
  76. package/src/mcp-protocol.ts +2 -2
  77. package/src/mcp.ts +7 -6
  78. package/src/ops.ts +41 -44
  79. package/src/resources/api-keys.ts +19 -21
  80. package/src/resources/deliveries.ts +140 -0
  81. package/src/resources/drafts.ts +424 -0
  82. package/src/resources/files.ts +68 -0
  83. package/src/resources/generate.ts +16 -19
  84. package/src/resources/generations.ts +148 -35
  85. package/src/resources/{account.ts → organization.ts} +14 -14
  86. package/src/resources/projects.ts +56 -350
  87. package/src/resources/publications.ts +140 -0
  88. package/src/resources/releases.ts +201 -0
  89. package/src/resources/spec-revisions.ts +239 -0
  90. package/src/resources/specs.ts +201 -0
  91. package/src/resources/targets.ts +63 -765
  92. package/src/schemas.ts +143 -149
  93. package/src/types.ts +1418 -1740
  94. package/dist/resources/account.d.ts +0 -18
  95. package/dist/resources/account.d.ts.map +0 -1
  96. package/dist/resources/definition-revisions.d.ts +0 -75
  97. package/dist/resources/definition-revisions.d.ts.map +0 -1
  98. package/dist/resources/definition-revisions.js +0 -142
  99. package/dist/resources/definitions.d.ts +0 -50
  100. package/dist/resources/definitions.d.ts.map +0 -1
  101. package/dist/resources/definitions.js +0 -73
  102. package/src/resources/definition-revisions.ts +0 -265
  103. package/src/resources/definitions.ts +0 -146
@@ -1,7 +1,7 @@
1
1
  // typeship — projects resource.
2
2
  // Generated by typeship — https://typeship.dev
3
3
 
4
- import { HttpCore, type ApiResult, type RequestOptions } from "../core/http.js";
4
+ import { HttpCore, type RequestOptions } from "../core/http.js";
5
5
  import { paginate, PagePromise } from "../core/pagination.js";
6
6
  import {
7
7
  ResponseParseError,
@@ -25,18 +25,9 @@ import type {
25
25
  CreateProjectRequest,
26
26
  DeletedProject,
27
27
  DeletedProjectRead,
28
- DiagnosticRemediation,
29
- DiagnosticRemediationRead,
30
- DiagnosticRemediationRequest,
31
- DiagnosticReport,
32
- DiagnosticReportRead,
33
28
  GenerateProjectRequest,
34
29
  GenerationBatch,
35
30
  GenerationBatchRead,
36
- GenerationList,
37
- GenerationListRead,
38
- GenerationSummary,
39
- GenerationSummaryRead,
40
31
  Project,
41
32
  ProjectId,
42
33
  ProjectList,
@@ -44,9 +35,6 @@ import type {
44
35
  ProjectRead,
45
36
  ProjectSummary,
46
37
  ProjectSummaryRead,
47
- RepositoryIntegrationHealth,
48
- RepositoryIntegrationHealthRead,
49
- TargetId,
50
38
  UpdateProjectRequest,
51
39
  } from "../types.js";
52
40
 
@@ -93,7 +81,8 @@ export class ProjectsResource {
93
81
  /**
94
82
  * Create a project
95
83
  *
96
- * Creates a Project from a URL or GitHub Definition.
84
+ * Creates a Project from a URL or GitHub Spec.
85
+ * Automatic generation is enabled by default for a saved Project.
97
86
  *
98
87
  * Free includes one saved Project, all selected Targets, and the first 25 operations per Target,
99
88
  * with regeneration, history, delivery pull requests, and previews. Pro supports additional
@@ -106,8 +95,8 @@ export class ProjectsResource {
106
95
  body: CreateProjectRequest,
107
96
  params?: ProjectsCreateParams,
108
97
  options?: RequestOptions,
109
- ): Promise<ApiResult<ProjectRead, ProjectsCreateError>> {
110
- return this._core.request<ProjectRead, ProjectsCreateError>({
98
+ ): Promise<ProjectRead> {
99
+ return this._core.requestData<ProjectRead, ProjectsCreateError>({
111
100
  method: "POST",
112
101
  path: "/projects",
113
102
  security: [{"apiKey":[]}],
@@ -132,17 +121,14 @@ export class ProjectsResource {
132
121
  }
133
122
 
134
123
  /**
135
- * Retrieve a project
124
+ * Get a project
136
125
  *
137
- * Returns the Project's settings and Definition ID. List its Targets separately to retrieve
138
- * Target configuration and Deliveries.
126
+ * Returns the Project's settings and Spec ID. List its Targets separately to retrieve Target
127
+ * configuration and Deliveries.
139
128
  * `GET /projects/{project_id}`
140
129
  */
141
- async retrieve(
142
- projectId: ProjectId,
143
- options?: RequestOptions,
144
- ): Promise<ApiResult<ProjectRead, ProjectsRetrieveError>> {
145
- return this._core.request<ProjectRead, ProjectsRetrieveError>({
130
+ async get(projectId: ProjectId, options?: RequestOptions): Promise<ProjectRead> {
131
+ return this._core.requestData<ProjectRead, ProjectsGetError>({
146
132
  method: "GET",
147
133
  path: `/projects/${encodeURIComponent(String(projectId))}`,
148
134
  security: [{"apiKey":[]}],
@@ -154,7 +140,7 @@ export class ProjectsResource {
154
140
  "500": InternalServerError,
155
141
  },
156
142
  idempotent: true,
157
- schemaKey: "projects.retrieve",
143
+ schemaKey: "projects.get",
158
144
  options,
159
145
  });
160
146
  }
@@ -162,9 +148,9 @@ export class ProjectsResource {
162
148
  /**
163
149
  * Delete a project
164
150
  *
165
- * A `502` response means the Project was not deleted because its release pull requests could not
166
- * be retired. Retry deletion to finish retiring the remaining reviews. Repeating a completed
167
- * deletion returns `404`.
151
+ * A `502 repository_unavailable` means the Project was not deleted because its release pull
152
+ * requests could not be retired. Retry deletion to finish retiring the remaining reviews.
153
+ * Repeating a completed deletion returns `404`.
168
154
  * See [conditional writes](https://typeship.dev/docs/typeship-api#conditional-writes) for ETag
169
155
  * and If-Match.
170
156
  * `DELETE /projects/{project_id}`
@@ -173,8 +159,8 @@ export class ProjectsResource {
173
159
  projectId: ProjectId,
174
160
  params?: ProjectsDeleteParams,
175
161
  options?: RequestOptions,
176
- ): Promise<ApiResult<DeletedProjectRead, ProjectsDeleteError>> {
177
- return this._core.request<DeletedProjectRead, ProjectsDeleteError>({
162
+ ): Promise<DeletedProjectRead> {
163
+ return this._core.requestData<DeletedProjectRead, ProjectsDeleteError>({
178
164
  method: "DELETE",
179
165
  path: `/projects/${encodeURIComponent(String(projectId))}`,
180
166
  security: [{"apiKey":[]}],
@@ -202,14 +188,16 @@ export class ProjectsResource {
202
188
  *
203
189
  * Omitted fields keep their current values. A supplied config replaces the entire stored object;
204
190
  * null or an empty object clears it.
191
+ * With auto_generate enabled, changing shared config queues a Generation for each Target whose
192
+ * effective config changes. A queued or running Target reuses that Generation.
205
193
  * Omitting If-Match applies the update to the current resource; with If-Match, a stale ETag
206
194
  * returns 412 precondition_failed without saving.
207
195
  *
208
- * A `409 target_busy` means a Target is publishing. Retrieve the Project, wait for publication to
196
+ * A `409 target_busy` means a Target is publishing. Retrieve the Project, wait for publishing to
209
197
  * finish, reconcile your update, and retry.
210
- * A `502` response means the Project was saved, but an obsolete release pull request could not be
211
- * retired. Retrieve the Project and retry the same update to finish retiring reviews if that
212
- * update is still desired.
198
+ * A `502 follow_up_failed` means the Project was saved, but an obsolete release pull request
199
+ * could not be retired. Retrieve the Project and retry the same update to finish retiring reviews
200
+ * if that update is still desired.
213
201
  * See [conditional writes](https://typeship.dev/docs/typeship-api#conditional-writes) for ETag
214
202
  * and If-Match.
215
203
  * `PATCH /projects/{project_id}`
@@ -219,8 +207,8 @@ export class ProjectsResource {
219
207
  body: UpdateProjectRequest,
220
208
  params?: ProjectsUpdateParams,
221
209
  options?: RequestOptions,
222
- ): Promise<ApiResult<ProjectRead, ProjectsUpdateError>> {
223
- return this._core.request<ProjectRead, ProjectsUpdateError>({
210
+ ): Promise<ProjectRead> {
211
+ return this._core.requestData<ProjectRead, ProjectsUpdateError>({
224
212
  method: "PATCH",
225
213
  path: `/projects/${encodeURIComponent(String(projectId))}`,
226
214
  security: [{"apiKey":[]}],
@@ -246,209 +234,32 @@ export class ProjectsResource {
246
234
  });
247
235
  }
248
236
 
249
- /**
250
- * Analyze a project's latest Definition Revision
251
- *
252
- * Checks the latest Definition Revision after applying its saved patches. Each finding groups
253
- * affected locations under a stable rule ID. A suggested patch is included only when the
254
- * Definition provides enough information to determine the correction.
255
- * `GET /projects/{project_id}/diagnostics`
256
- */
257
- async retrieveDiagnostics(
258
- projectId: ProjectId,
259
- options?: RequestOptions,
260
- ): Promise<ApiResult<DiagnosticReportRead, ProjectsRetrieveDiagnosticsError>> {
261
- return this._core.request<DiagnosticReportRead, ProjectsRetrieveDiagnosticsError>({
262
- method: "GET",
263
- path: `/projects/${encodeURIComponent(String(projectId))}/diagnostics`,
264
- security: [{"apiKey":[]}],
265
- errors: {
266
- "401": UnauthorizedError,
267
- "403": ForbiddenError,
268
- "404": NotFoundError,
269
- "429": RateLimitedError,
270
- "500": InternalServerError,
271
- },
272
- idempotent: true,
273
- schemaKey: "projects.retrieveDiagnostics",
274
- options,
275
- });
276
- }
277
-
278
- /**
279
- * Refresh a project's Diagnostics from its configured source
280
- *
281
- * Fetches the configured source and returns updated Diagnostics. Creates a Definition Revision
282
- * only when the content changes. Does not generate Targets or use a metered generation.
283
- *
284
- * A `Idempotency-Key` UUID is generated per call (stable across retries) unless you pass one.
285
- * `POST /projects/{project_id}/diagnostics`
286
- */
287
- async refreshDiagnostics(
288
- projectId: ProjectId,
289
- params?: ProjectsRefreshDiagnosticsParams,
290
- options?: RequestOptions,
291
- ): Promise<ApiResult<DiagnosticReportRead, ProjectsRefreshDiagnosticsError>> {
292
- return this._core.request<DiagnosticReportRead, ProjectsRefreshDiagnosticsError>({
293
- method: "POST",
294
- path: `/projects/${encodeURIComponent(String(projectId))}/diagnostics`,
295
- security: [{"apiKey":[]}],
296
- headers: {
297
- "Idempotency-Key": params?.idempotencyKey === undefined ? undefined : String(params?.idempotencyKey),
298
- },
299
- errors: {
300
- "400": BadRequestError,
301
- "401": UnauthorizedError,
302
- "403": ForbiddenError,
303
- "404": NotFoundError,
304
- "409": ConflictError,
305
- "422": UnprocessableEntityError,
306
- "429": RateLimitedError,
307
- "500": InternalServerError,
308
- },
309
- idempotencyKey: "Idempotency-Key",
310
- schemaKey: "projects.refreshDiagnostics",
311
- options,
312
- });
313
- }
314
-
315
- /**
316
- * Apply exact, reviewed diagnostic remediations
317
- *
318
- * Applies reviewed patches from Diagnostics. For a repository source, opens or updates a source
319
- * pull request. For a URL source, saves Definition patches.
320
- *
321
- * Findings that need an API-owner decision return `422`. Read the finding's `authoring_brief` and
322
- * update the source instead.
323
- *
324
- * A `Idempotency-Key` UUID is generated per call (stable across retries) unless you pass one.
325
- * `POST /projects/{project_id}/diagnostics/remediations`
326
- */
327
- async remediateDiagnostics(
328
- projectId: ProjectId,
329
- body: DiagnosticRemediationRequest,
330
- params?: ProjectsRemediateDiagnosticsParams,
331
- options?: RequestOptions,
332
- ): Promise<ApiResult<DiagnosticRemediationRead, ProjectsRemediateDiagnosticsError>> {
333
- return this._core.request<DiagnosticRemediationRead, ProjectsRemediateDiagnosticsError>({
334
- method: "POST",
335
- path: `/projects/${encodeURIComponent(String(projectId))}/diagnostics/remediations`,
336
- security: [{"apiKey":[]}],
337
- headers: {
338
- "Idempotency-Key": params?.idempotencyKey === undefined ? undefined : String(params?.idempotencyKey),
339
- },
340
- body,
341
- errors: {
342
- "400": BadRequestError,
343
- "401": UnauthorizedError,
344
- "403": ForbiddenError,
345
- "404": NotFoundError,
346
- "409": ConflictError,
347
- "422": UnprocessableEntityError,
348
- "429": RateLimitedError,
349
- "500": InternalServerError,
350
- },
351
- idempotencyKey: "Idempotency-Key",
352
- schemaKey: "projects.remediateDiagnostics",
353
- options,
354
- });
355
- }
356
-
357
- /**
358
- * Diagnose a project's repository integrations
359
- *
360
- * Checks repository access, Definition readability, source-approval labels, and required checks.
361
- * Includes the latest webhook delivery so you can investigate missing updates.
362
- * `GET /projects/{project_id}/integration-health`
363
- */
364
- async retrieveIntegrationHealth(
365
- projectId: ProjectId,
366
- options?: RequestOptions,
367
- ): Promise<ApiResult<RepositoryIntegrationHealthRead, ProjectsRetrieveIntegrationHealthError>> {
368
- return this._core.request<RepositoryIntegrationHealthRead, ProjectsRetrieveIntegrationHealthError>({
369
- method: "GET",
370
- path: `/projects/${encodeURIComponent(String(projectId))}/integration-health`,
371
- security: [{"apiKey":[]}],
372
- errors: {
373
- "401": UnauthorizedError,
374
- "403": ForbiddenError,
375
- "404": NotFoundError,
376
- "429": RateLimitedError,
377
- "500": InternalServerError,
378
- },
379
- idempotent: true,
380
- schemaKey: "projects.retrieveIntegrationHealth",
381
- options,
382
- });
383
- }
384
-
385
- /**
386
- * List a project's generations
387
- *
388
- * Auto-paginates: `for await (const item of …)` walks every page.
389
- * `GET /projects/{project_id}/generations`
390
- */
391
- listGenerations(
392
- projectId: ProjectId,
393
- params?: ProjectsListGenerationsParams,
394
- options?: RequestOptions,
395
- ): PagePromise<GenerationSummaryRead, ProjectsListGenerationsError> {
396
- return paginate<GenerationSummaryRead, ProjectsListGenerationsError>(this._core, {
397
- method: "GET",
398
- path: `/projects/${encodeURIComponent(String(projectId))}/generations`,
399
- security: [{"apiKey":[]}],
400
- query: {
401
- limit: params?.limit,
402
- cursor: params?.cursor,
403
- target_id: params?.targetId,
404
- },
405
- errors: {
406
- "400": BadRequestError,
407
- "401": UnauthorizedError,
408
- "403": ForbiddenError,
409
- "404": NotFoundError,
410
- "429": RateLimitedError,
411
- "500": InternalServerError,
412
- },
413
- idempotent: true,
414
- schemaKey: "projects.listGenerations",
415
- options,
416
- }, {
417
- style: "cursor",
418
- itemsField: "data",
419
- cursorParam: "cursor",
420
- nextCursorField: "next_cursor",
421
- hasMoreField: "has_more",
422
- limitParam: "limit",
423
- });
424
- }
425
-
426
237
  /**
427
238
  * Start generation for active Targets
428
239
  *
429
240
  * Queues one Generation per active Target and returns their IDs. Retrieve each Generation until
430
- * its status moves from `queued` to `running` and then `succeeded` or `failed`. `succeeded` means
241
+ * its status moves from `queued` to `running` and then `completed` or `failed`. `completed` means
431
242
  * generated files are saved; check Delivery and Draft status separately for repository delivery
432
243
  * and pull requests. A Target already queued or running is returned without starting another
433
- * Generation. A matching Idempotency-Key replay returns the same Generations with their current
434
- * statuses.
244
+ * Generation. A `409 targets_inactive` means the Project has no active Target to generate. A
245
+ * matching Idempotency-Key replay returns the same Generations with their current statuses.
435
246
  *
436
- * If the package already matches a destination and no Draft is open, delivery reports `pr_status:
437
- * no_changes` without creating a commit, branch, or pull request. An existing Draft stays open.
438
- * Automatic generation uses the same workflow.
247
+ * If the package already matches a destination and no Draft is open, delivery creates no commit,
248
+ * branch, or pull request. An existing Draft stays open. Automatic generation uses the same
249
+ * workflow.
439
250
  *
440
251
  * A `Idempotency-Key` UUID is generated per call (stable across retries) unless you pass one.
441
- * `POST /projects/{project_id}/generations`
252
+ * `POST /projects/{project_id}/generate`
442
253
  */
443
254
  async generate(
444
255
  projectId: ProjectId,
445
256
  body?: GenerateProjectRequest,
446
257
  params?: ProjectsGenerateParams,
447
258
  options?: RequestOptions,
448
- ): Promise<ApiResult<GenerationBatchRead, ProjectsGenerateError>> {
449
- return this._core.request<GenerationBatchRead, ProjectsGenerateError>({
259
+ ): Promise<GenerationBatchRead> {
260
+ return this._core.requestData<GenerationBatchRead, ProjectsGenerateError>({
450
261
  method: "POST",
451
- path: `/projects/${encodeURIComponent(String(projectId))}/generations`,
262
+ path: `/projects/${encodeURIComponent(String(projectId))}/generate`,
452
263
  security: [{"apiKey":[]}],
453
264
  headers: {
454
265
  "Idempotency-Key": params?.idempotencyKey === undefined ? undefined : String(params?.idempotencyKey),
@@ -478,20 +289,21 @@ export interface ProjectsListParams {
478
289
  /**
479
290
  * Maximum number of resources to return. Omit for 20; otherwise supply base-10 digits
480
291
  * representing an integer from 1 to 100. Empty, malformed, or out-of-range values return 400
481
- * invalid_request. List query parameters must appear only once; unrecognized parameters also
482
- * return 400.
292
+ * input_invalid. List query parameters must appear only once; repeated or unrecognized parameters
293
+ * return 400 query_param_invalid.
483
294
  */
484
295
  limit?: number;
485
296
  /**
486
- * Opaque cursor from the preceding page's next_cursor. Valid only for the same account,
487
- * operation, filters, and ordering that issued it. Omit to start at the first page. Empty,
488
- * malformed, or repeated cursors return 400 invalid_request. The page limit may change between
489
- * requests.
297
+ * Opaque cursor from the preceding page's next_cursor. Valid only for the same organization,
298
+ * operation, filters, and ordering that issued it. Omit to start at the first page. Empty or
299
+ * malformed cursors, and cursors issued for different filters, return 400 cursor_invalid; start
300
+ * again from the first page. Repeated cursors return 400 query_param_invalid. The page limit may
301
+ * change between requests.
490
302
  */
491
303
  cursor?: string;
492
304
  }
493
305
 
494
- /** Every error `list` can produce, as a discriminated union. */
306
+ /** Typed errors `list` can throw. */
495
307
  export type ProjectsListError =
496
308
  | BadRequestError
497
309
  | UnauthorizedError
@@ -505,15 +317,15 @@ export type ProjectsListError =
505
317
 
506
318
  export interface ProjectsCreateParams {
507
319
  /**
508
- * Identifies one logical write for 24 hours. The key is scoped to the authenticated account and
509
- * operation; account-less generation uses a hashed network identity. Retrying the same method,
510
- * path, query, If-Match header, and JSON body replays the original response. Reusing the key with
511
- * changed intent returns 409. After expiry the key starts a new write.
320
+ * Identifies one logical write for 24 hours. The key is scoped to the authenticated organization
321
+ * and operation; generation without an organization uses a hashed network identity. Retrying the
322
+ * same method, path, query, If-Match header, and JSON body replays the original response. Reusing
323
+ * the key with changed intent returns 409. After expiry the key starts a new write.
512
324
  */
513
325
  idempotencyKey?: string;
514
326
  }
515
327
 
516
- /** Every error `create` can produce, as a discriminated union. */
328
+ /** Typed errors `create` can throw. */
517
329
  export type ProjectsCreateError =
518
330
  | BadRequestError
519
331
  | UnauthorizedError
@@ -528,8 +340,8 @@ export type ProjectsCreateError =
528
340
  | TransportError
529
341
  | ValidationError;
530
342
 
531
- /** Every error `retrieve` can produce, as a discriminated union. */
532
- export type ProjectsRetrieveError =
343
+ /** Typed errors `get` can throw. */
344
+ export type ProjectsGetError =
533
345
  | UnauthorizedError
534
346
  | ForbiddenError
535
347
  | NotFoundError
@@ -549,7 +361,7 @@ export interface ProjectsDeleteParams {
549
361
  ifMatch?: string;
550
362
  }
551
363
 
552
- /** Every error `delete` can produce, as a discriminated union. */
364
+ /** Typed errors `delete` can throw. */
553
365
  export type ProjectsDeleteError =
554
366
  | BadRequestError
555
367
  | UnauthorizedError
@@ -573,7 +385,7 @@ export interface ProjectsUpdateParams {
573
385
  ifMatch?: string;
574
386
  }
575
387
 
576
- /** Every error `update` can produce, as a discriminated union. */
388
+ /** Typed errors `update` can throw. */
577
389
  export type ProjectsUpdateError =
578
390
  | BadRequestError
579
391
  | UnauthorizedError
@@ -591,123 +403,17 @@ export type ProjectsUpdateError =
591
403
  | TransportError
592
404
  | ValidationError;
593
405
 
594
- /** Every error `retrieveDiagnostics` can produce, as a discriminated union. */
595
- export type ProjectsRetrieveDiagnosticsError =
596
- | UnauthorizedError
597
- | ForbiddenError
598
- | NotFoundError
599
- | RateLimitedError
600
- | InternalServerError
601
- | UnexpectedApiError
602
- | ResponseParseError
603
- | TransportError
604
- | ValidationError;
605
-
606
- export interface ProjectsRefreshDiagnosticsParams {
607
- /**
608
- * Identifies one logical write for 24 hours. The key is scoped to the authenticated account and
609
- * operation; account-less generation uses a hashed network identity. Retrying the same method,
610
- * path, query, If-Match header, and JSON body replays the original response. Reusing the key with
611
- * changed intent returns 409. After expiry the key starts a new write.
612
- */
613
- idempotencyKey?: string;
614
- }
615
-
616
- /** Every error `refreshDiagnostics` can produce, as a discriminated union. */
617
- export type ProjectsRefreshDiagnosticsError =
618
- | BadRequestError
619
- | UnauthorizedError
620
- | ForbiddenError
621
- | NotFoundError
622
- | ConflictError
623
- | UnprocessableEntityError
624
- | RateLimitedError
625
- | InternalServerError
626
- | UnexpectedApiError
627
- | ResponseParseError
628
- | TransportError
629
- | ValidationError;
630
-
631
- export interface ProjectsRemediateDiagnosticsParams {
632
- /**
633
- * Identifies one logical write for 24 hours. The key is scoped to the authenticated account and
634
- * operation; account-less generation uses a hashed network identity. Retrying the same method,
635
- * path, query, If-Match header, and JSON body replays the original response. Reusing the key with
636
- * changed intent returns 409. After expiry the key starts a new write.
637
- */
638
- idempotencyKey?: string;
639
- }
640
-
641
- /** Every error `remediateDiagnostics` can produce, as a discriminated union. */
642
- export type ProjectsRemediateDiagnosticsError =
643
- | BadRequestError
644
- | UnauthorizedError
645
- | ForbiddenError
646
- | NotFoundError
647
- | ConflictError
648
- | UnprocessableEntityError
649
- | RateLimitedError
650
- | InternalServerError
651
- | UnexpectedApiError
652
- | ResponseParseError
653
- | TransportError
654
- | ValidationError;
655
-
656
- /** Every error `retrieveIntegrationHealth` can produce, as a discriminated union. */
657
- export type ProjectsRetrieveIntegrationHealthError =
658
- | UnauthorizedError
659
- | ForbiddenError
660
- | NotFoundError
661
- | RateLimitedError
662
- | InternalServerError
663
- | UnexpectedApiError
664
- | ResponseParseError
665
- | TransportError
666
- | ValidationError;
667
-
668
- export interface ProjectsListGenerationsParams {
669
- /**
670
- * Maximum number of resources to return. Omit for 20; otherwise supply base-10 digits
671
- * representing an integer from 1 to 100. Empty, malformed, or out-of-range values return 400
672
- * invalid_request. List query parameters must appear only once; unrecognized parameters also
673
- * return 400.
674
- */
675
- limit?: number;
676
- /**
677
- * Opaque cursor from the preceding page's next_cursor. Valid only for the same account,
678
- * operation, filters, and ordering that issued it. Omit to start at the first page. Empty,
679
- * malformed, or repeated cursors return 400 invalid_request. The page limit may change between
680
- * requests.
681
- */
682
- cursor?: string;
683
- /** Only generations for this persisted Target. */
684
- targetId?: TargetId;
685
- }
686
-
687
- /** Every error `listGenerations` can produce, as a discriminated union. */
688
- export type ProjectsListGenerationsError =
689
- | BadRequestError
690
- | UnauthorizedError
691
- | ForbiddenError
692
- | NotFoundError
693
- | RateLimitedError
694
- | InternalServerError
695
- | UnexpectedApiError
696
- | ResponseParseError
697
- | TransportError
698
- | ValidationError;
699
-
700
406
  export interface ProjectsGenerateParams {
701
407
  /**
702
- * Identifies one logical write for 24 hours. The key is scoped to the authenticated account and
703
- * operation; account-less generation uses a hashed network identity. Retrying the same method,
704
- * path, query, If-Match header, and JSON body replays the original response. Reusing the key with
705
- * changed intent returns 409. After expiry the key starts a new write.
408
+ * Identifies one logical write for 24 hours. The key is scoped to the authenticated organization
409
+ * and operation; generation without an organization uses a hashed network identity. Retrying the
410
+ * same method, path, query, If-Match header, and JSON body replays the original response. Reusing
411
+ * the key with changed intent returns 409. After expiry the key starts a new write.
706
412
  */
707
413
  idempotencyKey?: string;
708
414
  }
709
415
 
710
- /** Every error `generate` can produce, as a discriminated union. */
416
+ /** Typed errors `generate` can throw. */
711
417
  export type ProjectsGenerateError =
712
418
  | BadRequestError
713
419
  | UnauthorizedError