@eigenpal/sdk 0.25.14 → 1.0.0-rc.2

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 (73) hide show
  1. package/README.md +27 -105
  2. package/dist/client.d.ts +164 -0
  3. package/dist/client.js +234 -0
  4. package/dist/core.d.ts +82 -0
  5. package/dist/core.js +311 -0
  6. package/dist/errors.d.ts +64 -0
  7. package/dist/errors.js +132 -0
  8. package/dist/generated/operations.gen.d.ts +336 -0
  9. package/dist/generated/operations.gen.js +135 -0
  10. package/dist/generated/public.gen.d.ts +2 -0
  11. package/dist/generated/public.gen.js +2 -0
  12. package/dist/generated/resources.gen.d.ts +490 -0
  13. package/dist/generated/resources.gen.js +659 -0
  14. package/dist/generated/types.gen.d.ts +2457 -0
  15. package/dist/generated/types.gen.js +2 -0
  16. package/dist/index.d.ts +20 -0
  17. package/dist/index.js +15 -0
  18. package/dist/lib/fetch-body.d.ts +23 -0
  19. package/dist/lib/fetch-body.js +66 -0
  20. package/dist/lib/files.d.ts +134 -0
  21. package/dist/lib/files.js +296 -0
  22. package/dist/lib/upload-app-chunked.d.ts +36 -0
  23. package/dist/lib/upload-app-chunked.js +94 -0
  24. package/dist/lib/upload-limits.d.ts +32 -0
  25. package/dist/lib/upload-limits.js +60 -0
  26. package/dist/lib/upload-presigned-multipart.d.ts +74 -0
  27. package/dist/lib/upload-presigned-multipart.js +212 -0
  28. package/dist/page.d.ts +30 -0
  29. package/dist/page.js +38 -0
  30. package/dist/resources.d.ts +85 -0
  31. package/dist/resources.js +247 -0
  32. package/dist/telemetry.d.ts +20 -0
  33. package/{src/telemetry.ts → dist/telemetry.js} +26 -31
  34. package/dist/upload-file.d.ts +31 -0
  35. package/dist/upload-file.js +286 -0
  36. package/{src/upload.ts → dist/upload.d.ts} +4 -4
  37. package/dist/upload.js +12 -0
  38. package/package.json +19 -15
  39. package/src/client.ts +0 -656
  40. package/src/errors.ts +0 -130
  41. package/src/generated/client/client.gen.ts +0 -277
  42. package/src/generated/client/index.ts +0 -27
  43. package/src/generated/client/types.gen.ts +0 -218
  44. package/src/generated/client/utils.gen.ts +0 -316
  45. package/src/generated/client.gen.ts +0 -18
  46. package/src/generated/core/auth.gen.ts +0 -48
  47. package/src/generated/core/bodySerializer.gen.ts +0 -82
  48. package/src/generated/core/params.gen.ts +0 -178
  49. package/src/generated/core/pathSerializer.gen.ts +0 -171
  50. package/src/generated/core/queryKeySerializer.gen.ts +0 -117
  51. package/src/generated/core/serverSentEvents.gen.ts +0 -242
  52. package/src/generated/core/types.gen.ts +0 -110
  53. package/src/generated/core/utils.gen.ts +0 -140
  54. package/src/generated/index.ts +0 -4
  55. package/src/generated/sdk.gen.ts +0 -1361
  56. package/src/generated/types.gen.ts +0 -9282
  57. package/src/index.ts +0 -120
  58. package/src/lib/fetch-body.ts +0 -92
  59. package/src/lib/files.ts +0 -390
  60. package/src/lib/upload-app-chunked.ts +0 -121
  61. package/src/lib/upload-limits.ts +0 -72
  62. package/src/lib/upload-presigned-multipart.ts +0 -285
  63. package/src/resources/auth.ts +0 -18
  64. package/src/resources/automations.ts +0 -830
  65. package/src/resources/dataset-review-requests.ts +0 -38
  66. package/src/resources/email-servers.ts +0 -95
  67. package/src/resources/files.ts +0 -592
  68. package/src/resources/folders.ts +0 -77
  69. package/src/resources/human-reviews.ts +0 -106
  70. package/src/resources/models.ts +0 -37
  71. package/src/resources/runs.ts +0 -350
  72. package/src/resources/templates.ts +0 -153
  73. package/src/runtime-config.ts +0 -14
@@ -1,1361 +0,0 @@
1
- // This file is auto-generated by @hey-api/openapi-ts
2
-
3
- import { type Client, type ClientMeta, formDataBodySerializer, type Options as Options2, type RequestResult, type TDataShape } from './client';
4
- import { client } from './client.gen';
5
- import type { AuthCheckData, AuthCheckErrors, AuthCheckResponses, AutomationsDatasetExportData, AutomationsDatasetExportErrors, AutomationsDatasetExportResponses, AutomationsDatasetImportData, AutomationsDatasetImportErrors, AutomationsDatasetImportResponses, AutomationsDatasetReviewRequestsCreateData, AutomationsDatasetReviewRequestsCreateErrors, AutomationsDatasetReviewRequestsCreateResponses, AutomationsDatasetReviewRequestsGetData, AutomationsDatasetReviewRequestsGetErrors, AutomationsDatasetReviewRequestsGetResponses, AutomationsDatasetReviewRequestsItemFileGetData, AutomationsDatasetReviewRequestsItemFileGetErrors, AutomationsDatasetReviewRequestsItemFileGetResponses, AutomationsDatasetReviewRequestsListData, AutomationsDatasetReviewRequestsListErrors, AutomationsDatasetReviewRequestsListEventsData, AutomationsDatasetReviewRequestsListEventsErrors, AutomationsDatasetReviewRequestsListEventsResponses, AutomationsDatasetReviewRequestsListItemsData, AutomationsDatasetReviewRequestsListItemsErrors, AutomationsDatasetReviewRequestsListItemsResponses, AutomationsDatasetReviewRequestsListResponses, AutomationsDatasetReviewRequestsUpdateData, AutomationsDatasetReviewRequestsUpdateErrors, AutomationsDatasetReviewRequestsUpdateItemData, AutomationsDatasetReviewRequestsUpdateItemErrors, AutomationsDatasetReviewRequestsUpdateItemResponses, AutomationsDatasetReviewRequestsUpdateResponses, AutomationsDeleteData, AutomationsDeleteErrors, AutomationsDeleteResponses, AutomationsEvaluatorsGetData, AutomationsEvaluatorsGetErrors, AutomationsEvaluatorsGetResponses, AutomationsEvaluatorsUpdateData, AutomationsEvaluatorsUpdateErrors, AutomationsEvaluatorsUpdateResponses, AutomationsExamplesCreateData, AutomationsExamplesCreateErrors, AutomationsExamplesCreateResponses, AutomationsExamplesDeleteData, AutomationsExamplesDeleteErrors, AutomationsExamplesDeleteResponses, AutomationsExamplesExpectedFileDeleteData, AutomationsExamplesExpectedFileDeleteErrors, AutomationsExamplesExpectedFileDeleteResponses, AutomationsExamplesExpectedFileGetData, AutomationsExamplesExpectedFileGetErrors, AutomationsExamplesExpectedFileGetResponses, AutomationsExamplesExpectedFilesCreateData, AutomationsExamplesExpectedFilesCreateErrors, AutomationsExamplesExpectedFilesCreateResponses, AutomationsExamplesExpectedFilesListData, AutomationsExamplesExpectedFilesListErrors, AutomationsExamplesExpectedFilesListResponses, AutomationsExamplesExpectedFileUpdateData, AutomationsExamplesExpectedFileUpdateErrors, AutomationsExamplesExpectedFileUpdateResponses, AutomationsExamplesGetData, AutomationsExamplesGetErrors, AutomationsExamplesGetResponses, AutomationsExamplesInputFileDeleteData, AutomationsExamplesInputFileDeleteErrors, AutomationsExamplesInputFileDeleteResponses, AutomationsExamplesInputFileGetData, AutomationsExamplesInputFileGetErrors, AutomationsExamplesInputFileGetResponses, AutomationsExamplesInputFilesCreateData, AutomationsExamplesInputFilesCreateErrors, AutomationsExamplesInputFilesCreateResponses, AutomationsExamplesInputFilesListData, AutomationsExamplesInputFilesListErrors, AutomationsExamplesInputFilesListResponses, AutomationsExamplesInputFileUpdateData, AutomationsExamplesInputFileUpdateErrors, AutomationsExamplesInputFileUpdateResponses, AutomationsExamplesListData, AutomationsExamplesListErrors, AutomationsExamplesListResponses, AutomationsExamplesRunData, AutomationsExamplesRunErrors, AutomationsExamplesRunResponses, AutomationsExamplesUpdateData, AutomationsExamplesUpdateErrors, AutomationsExamplesUpdateResponses, AutomationsExperimentsCancelData, AutomationsExperimentsCancelErrors, AutomationsExperimentsCancelResponses, AutomationsExperimentsCreateData, AutomationsExperimentsCreateErrors, AutomationsExperimentsCreateResponses, AutomationsExperimentsCreateStreamData, AutomationsExperimentsCreateStreamErrors, AutomationsExperimentsCreateStreamResponses, AutomationsExperimentsExportAllData, AutomationsExperimentsExportAllErrors, AutomationsExperimentsExportAllResponses, AutomationsExperimentsExportData, AutomationsExperimentsExportErrors, AutomationsExperimentsExportResponses, AutomationsExperimentsGetData, AutomationsExperimentsGetErrors, AutomationsExperimentsGetResponses, AutomationsExperimentsListData, AutomationsExperimentsListErrors, AutomationsExperimentsListResponses, AutomationsGetData, AutomationsGetErrors, AutomationsGetResponses, AutomationsListData, AutomationsListErrors, AutomationsListResponses, AutomationsReviewsHealthData, AutomationsReviewsHealthErrors, AutomationsReviewsHealthResponses, AutomationsSyncData, AutomationsSyncErrors, AutomationsSyncResponses, AutomationsTriggersGetData, AutomationsTriggersGetErrors, AutomationsTriggersGetResponses, AutomationsUpdateData, AutomationsUpdateErrors, AutomationsUpdateResponses, AutomationsVersionsCreateData, AutomationsVersionsCreateErrors, AutomationsVersionsCreateResponses, AutomationsVersionsListData, AutomationsVersionsListErrors, AutomationsVersionsListResponses, AutomationsVersionsPromoteData, AutomationsVersionsPromoteErrors, AutomationsVersionsPromoteResponses, AutomationsVersionsRestoreData, AutomationsVersionsRestoreErrors, AutomationsVersionsRestoreResponses, DatasetReviewRequestsListData, DatasetReviewRequestsListErrors, DatasetReviewRequestsListResponses, EmailServersCreateData, EmailServersCreateErrors, EmailServersCreateResponses, EmailServersDeleteData, EmailServersDeleteErrors, EmailServersDeleteResponses, EmailServersGetData, EmailServersGetErrors, EmailServersGetResponses, EmailServersListData, EmailServersListErrors, EmailServersListResponses, EmailServersTestData, EmailServersTestErrors, EmailServersTestResponses, EmailServersUpdateData, EmailServersUpdateErrors, EmailServersUpdateResponses, ExperimentsResolveData, ExperimentsResolveErrors, ExperimentsResolveResponses, FilesContentGetData, FilesContentGetErrors, FilesContentGetResponses, FilesCreateData, FilesCreateErrors, FilesCreateResponses, FilesDeleteData, FilesDeleteErrors, FilesDeleteResponses, FilesGetData, FilesGetErrors, FilesGetResponses, FilesUploadsAbortData, FilesUploadsAbortErrors, FilesUploadsAbortResponses, FilesUploadsChunksPutData, FilesUploadsChunksPutErrors, FilesUploadsChunksPutResponses, FilesUploadsCompleteData, FilesUploadsCompleteErrors, FilesUploadsCompleteResponses, FilesUploadsCreateData, FilesUploadsCreateErrors, FilesUploadsCreateResponses, FilesUploadsGetData, FilesUploadsGetErrors, FilesUploadsGetResponses, FilesUploadsPartsListData, FilesUploadsPartsListErrors, FilesUploadsPartsListResponses, FilesUploadsPartsPresignData, FilesUploadsPartsPresignErrors, FilesUploadsPartsPresignResponses, FoldersCreateData, FoldersCreateErrors, FoldersCreateResponses, FoldersDeleteData, FoldersDeleteErrors, FoldersDeleteResponses, FoldersGetData, FoldersGetErrors, FoldersGetResponses, FoldersListData, FoldersListErrors, FoldersListResponses, FoldersUpdateData, FoldersUpdateErrors, FoldersUpdateResponses, HumanReviewsApproveData, HumanReviewsApproveErrors, HumanReviewsApproveResponses, HumanReviewsConfirmFieldData, HumanReviewsConfirmFieldErrors, HumanReviewsConfirmFieldResponses, HumanReviewsFilesContentGetData, HumanReviewsFilesContentGetErrors, HumanReviewsFilesContentGetResponses, HumanReviewsGetData, HumanReviewsGetErrors, HumanReviewsGetResponses, HumanReviewsListData, HumanReviewsListErrors, HumanReviewsListResponses, HumanReviewsRejectData, HumanReviewsRejectErrors, HumanReviewsRejectResponses, ModelsListData, ModelsListErrors, ModelsListResponses, ModelsParserReadinessData, ModelsParserReadinessErrors, ModelsParserReadinessResponses, RunsArtifactsGetData, RunsArtifactsGetErrors, RunsArtifactsGetResponses, RunsArtifactsListData, RunsArtifactsListErrors, RunsArtifactsListResponses, RunsCancelData, RunsCancelErrors, RunsCancelResponses, RunsEventsListData, RunsEventsListErrors, RunsEventsListResponses, RunsGetData, RunsGetErrors, RunsGetResponses, RunsListData, RunsListErrors, RunsListResponses, RunsPromoteData, RunsPromoteErrors, RunsPromoteResponses, RunsRerunData, RunsRerunErrors, RunsRerunResponses, RunsReviewsClearData, RunsReviewsClearErrors, RunsReviewsClearResponses, RunsReviewsExpectedCreateData, RunsReviewsExpectedCreateErrors, RunsReviewsExpectedCreateResponses, RunsReviewsExpectedFileDeleteData, RunsReviewsExpectedFileDeleteErrors, RunsReviewsExpectedFileDeleteResponses, RunsReviewsExpectedFileGetData, RunsReviewsExpectedFileGetErrors, RunsReviewsExpectedFileGetResponses, RunsReviewsExpectedFileUpdateData, RunsReviewsExpectedFileUpdateErrors, RunsReviewsExpectedFileUpdateResponses, RunsReviewsExpectedGetData, RunsReviewsExpectedGetErrors, RunsReviewsExpectedGetResponses, RunsReviewsGetData, RunsReviewsGetErrors, RunsReviewsGetResponses, RunsReviewsUpdateData, RunsReviewsUpdateErrors, RunsReviewsUpdateResponses, RunsScoresListData, RunsScoresListErrors, RunsScoresListResponses, RunsStartData, RunsStartErrors, RunsStartResponses, RunsStepsGetData, RunsStepsGetErrors, RunsStepsGetResponses, RunsStepsListData, RunsStepsListErrors, RunsStepsListResponses, RunsTraceGetData, RunsTraceGetErrors, RunsTraceGetResponses, RunsUsageGetData, RunsUsageGetErrors, RunsUsageGetResponses, TemplatesContentGetData, TemplatesContentGetErrors, TemplatesContentGetResponses, TemplatesCreateData, TemplatesCreateErrors, TemplatesCreateResponses, TemplatesDeleteData, TemplatesDeleteErrors, TemplatesDeleteResponses, TemplatesGetData, TemplatesGetErrors, TemplatesGetResponses, TemplatesListData, TemplatesListErrors, TemplatesListResponses, TemplatesReplaceData, TemplatesReplaceErrors, TemplatesReplaceResponses, TemplatesStagingData, TemplatesStagingErrors, TemplatesStagingResponses } from './types.gen';
6
-
7
- export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean, TResponse = unknown> = Options2<TData, ThrowOnError, TResponse> & {
8
- /**
9
- * You can provide a client instance returned by `createClient()` instead of
10
- * individual options. This might be also useful if you want to implement a
11
- * custom client.
12
- */
13
- client?: Client;
14
- /**
15
- * You can pass arbitrary values through the `meta` object. This can be
16
- * used to access values that aren't defined as part of the SDK function.
17
- */
18
- meta?: keyof ClientMeta extends never ? Record<string, unknown> : ClientMeta;
19
- };
20
-
21
- /**
22
- * Check API key identity
23
- *
24
- * Return the tenant, user, API key, and scope represented by the current API key.
25
- */
26
- export const authCheck = <ThrowOnError extends boolean = false>(options?: Options<AuthCheckData, ThrowOnError>): RequestResult<AuthCheckResponses, AuthCheckErrors, ThrowOnError> => (options?.client ?? client).get<AuthCheckResponses, AuthCheckErrors, ThrowOnError>({
27
- security: [{ scheme: 'bearer', type: 'http' }],
28
- url: '/v1/auth/check',
29
- ...options
30
- });
31
-
32
- /**
33
- * List automations
34
- *
35
- * Returns workflows and agents through one runnable automation collection. Use `type` to narrow to workflows or agents, `search` to find automations by slug, name, or description, and `folderId` to list YAML workflows in a folder (`null` for root).
36
- */
37
- export const automationsList = <ThrowOnError extends boolean = false>(options?: Options<AutomationsListData, ThrowOnError>): RequestResult<AutomationsListResponses, AutomationsListErrors, ThrowOnError> => (options?.client ?? client).get<AutomationsListResponses, AutomationsListErrors, ThrowOnError>({
38
- security: [{ scheme: 'bearer', type: 'http' }],
39
- url: '/v1/automations',
40
- ...options
41
- });
42
-
43
- /**
44
- * Delete automation
45
- *
46
- * Delete a workflow or agent automation using the same cleanup as the dashboard. Workflows archive the automations registry parent and keep execution history. Agents delete the agent row, archive the registry parent, and best-effort-delete agent storage. Identifiers match GET.
47
- */
48
- export const automationsDelete = <ThrowOnError extends boolean = false>(options: Options<AutomationsDeleteData, ThrowOnError>): RequestResult<AutomationsDeleteResponses, AutomationsDeleteErrors, ThrowOnError> => (options.client ?? client).delete<AutomationsDeleteResponses, AutomationsDeleteErrors, ThrowOnError>({
49
- security: [{ scheme: 'bearer', type: 'http' }],
50
- url: '/v1/automations/{id}',
51
- ...options
52
- });
53
-
54
- /**
55
- * Get automation
56
- *
57
- * Get one runnable workflow or agent automation by id or typed alias.
58
- */
59
- export const automationsGet = <ThrowOnError extends boolean = false>(options: Options<AutomationsGetData, ThrowOnError>): RequestResult<AutomationsGetResponses, AutomationsGetErrors, ThrowOnError> => (options.client ?? client).get<AutomationsGetResponses, AutomationsGetErrors, ThrowOnError>({
60
- security: [{ scheme: 'bearer', type: 'http' }],
61
- url: '/v1/automations/{id}',
62
- ...options
63
- });
64
-
65
- /**
66
- * Move workflow automation
67
- *
68
- * Move a YAML workflow between organizing folders. `folderPath` auto-creates missing workflow folders; empty or `/` files the workflow at root. Agent automations have no database folder model and are rejected. Identifiers match GET (workflow id, automation id, or `workflows.<slug>`).
69
- */
70
- export const automationsUpdate = <ThrowOnError extends boolean = false>(options: Options<AutomationsUpdateData, ThrowOnError>): RequestResult<AutomationsUpdateResponses, AutomationsUpdateErrors, ThrowOnError> => (options.client ?? client).patch<AutomationsUpdateResponses, AutomationsUpdateErrors, ThrowOnError>({
71
- security: [{ scheme: 'bearer', type: 'http' }],
72
- url: '/v1/automations/{id}',
73
- ...options,
74
- headers: {
75
- 'Content-Type': 'application/json',
76
- ...options.headers
77
- }
78
- });
79
-
80
- /**
81
- * List dataset review requests
82
- *
83
- * List dataset review requests for one automation, including per-request progress.
84
- */
85
- export const automationsDatasetReviewRequestsList = <ThrowOnError extends boolean = false>(options: Options<AutomationsDatasetReviewRequestsListData, ThrowOnError>): RequestResult<AutomationsDatasetReviewRequestsListResponses, AutomationsDatasetReviewRequestsListErrors, ThrowOnError> => (options.client ?? client).get<AutomationsDatasetReviewRequestsListResponses, AutomationsDatasetReviewRequestsListErrors, ThrowOnError>({
86
- security: [{ scheme: 'bearer', type: 'http' }],
87
- url: '/v1/automations/{id}/dataset-review-requests',
88
- ...options
89
- });
90
-
91
- /**
92
- * Create dataset review request
93
- *
94
- * Snapshot selected dataset examples into a review request. Include instructions, focusFields to highlight, and ignoredFields for paths reviewers can skip. Optional itemNotes become commented events on those examples.
95
- */
96
- export const automationsDatasetReviewRequestsCreate = <ThrowOnError extends boolean = false>(options: Options<AutomationsDatasetReviewRequestsCreateData, ThrowOnError>): RequestResult<AutomationsDatasetReviewRequestsCreateResponses, AutomationsDatasetReviewRequestsCreateErrors, ThrowOnError> => (options.client ?? client).post<AutomationsDatasetReviewRequestsCreateResponses, AutomationsDatasetReviewRequestsCreateErrors, ThrowOnError>({
97
- security: [{ scheme: 'bearer', type: 'http' }],
98
- url: '/v1/automations/{id}/dataset-review-requests',
99
- ...options,
100
- headers: {
101
- 'Content-Type': 'application/json',
102
- ...options.headers
103
- }
104
- });
105
-
106
- /**
107
- * Get dataset review request
108
- *
109
- * Fetch one dataset review request with snapshotted items, progress, focus fields, ignored fields, and events.
110
- */
111
- export const automationsDatasetReviewRequestsGet = <ThrowOnError extends boolean = false>(options: Options<AutomationsDatasetReviewRequestsGetData, ThrowOnError>): RequestResult<AutomationsDatasetReviewRequestsGetResponses, AutomationsDatasetReviewRequestsGetErrors, ThrowOnError> => (options.client ?? client).get<AutomationsDatasetReviewRequestsGetResponses, AutomationsDatasetReviewRequestsGetErrors, ThrowOnError>({
112
- security: [{ scheme: 'bearer', type: 'http' }],
113
- url: '/v1/automations/{id}/dataset-review-requests/{reviewId}',
114
- ...options
115
- });
116
-
117
- /**
118
- * Update dataset review request
119
- *
120
- * Update review metadata or lifecycle status. Set status to `closed` when review is finished; a closed review accepts only a bare reopen back to `open`. Dataset reconciliation stays manual.
121
- */
122
- export const automationsDatasetReviewRequestsUpdate = <ThrowOnError extends boolean = false>(options: Options<AutomationsDatasetReviewRequestsUpdateData, ThrowOnError>): RequestResult<AutomationsDatasetReviewRequestsUpdateResponses, AutomationsDatasetReviewRequestsUpdateErrors, ThrowOnError> => (options.client ?? client).patch<AutomationsDatasetReviewRequestsUpdateResponses, AutomationsDatasetReviewRequestsUpdateErrors, ThrowOnError>({
123
- security: [{ scheme: 'bearer', type: 'http' }],
124
- url: '/v1/automations/{id}/dataset-review-requests/{reviewId}',
125
- ...options,
126
- headers: {
127
- 'Content-Type': 'application/json',
128
- ...options.headers
129
- }
130
- });
131
-
132
- /**
133
- * List dataset review events
134
- *
135
- * List audit events for one dataset review request.
136
- */
137
- export const automationsDatasetReviewRequestsListEvents = <ThrowOnError extends boolean = false>(options: Options<AutomationsDatasetReviewRequestsListEventsData, ThrowOnError>): RequestResult<AutomationsDatasetReviewRequestsListEventsResponses, AutomationsDatasetReviewRequestsListEventsErrors, ThrowOnError> => (options.client ?? client).get<AutomationsDatasetReviewRequestsListEventsResponses, AutomationsDatasetReviewRequestsListEventsErrors, ThrowOnError>({
138
- security: [{ scheme: 'bearer', type: 'http' }],
139
- url: '/v1/automations/{id}/dataset-review-requests/{reviewId}/events',
140
- ...options
141
- });
142
-
143
- /**
144
- * List dataset review items
145
- *
146
- * List items for one dataset review request, optionally filtered by item status.
147
- */
148
- export const automationsDatasetReviewRequestsListItems = <ThrowOnError extends boolean = false>(options: Options<AutomationsDatasetReviewRequestsListItemsData, ThrowOnError>): RequestResult<AutomationsDatasetReviewRequestsListItemsResponses, AutomationsDatasetReviewRequestsListItemsErrors, ThrowOnError> => (options.client ?? client).get<AutomationsDatasetReviewRequestsListItemsResponses, AutomationsDatasetReviewRequestsListItemsErrors, ThrowOnError>({
149
- security: [{ scheme: 'bearer', type: 'http' }],
150
- url: '/v1/automations/{id}/dataset-review-requests/{reviewId}/items',
151
- ...options
152
- });
153
-
154
- /**
155
- * Update dataset review item
156
- *
157
- * Approve, edit, remove, reopen, comment, or record a field-decision or file-decision on one review item while the parent request is draft, open, or paused. Pass `expectedUpdatedAt` from the item the client last observed. Pass `fieldPath` with `action: comment` or `action: field-decision`, `filePath` with `action: file-decision`. `action: edit-file` is multipart-only: send `file` bytes with `filePath` (correct an existing expected file) or `newPath` (upload a brand-new expected file) plus `expectedUpdatedAt`.
158
- */
159
- export const automationsDatasetReviewRequestsUpdateItem = <ThrowOnError extends boolean = false>(options: Options<AutomationsDatasetReviewRequestsUpdateItemData, ThrowOnError>): RequestResult<AutomationsDatasetReviewRequestsUpdateItemResponses, AutomationsDatasetReviewRequestsUpdateItemErrors, ThrowOnError> => (options.client ?? client).patch<AutomationsDatasetReviewRequestsUpdateItemResponses, AutomationsDatasetReviewRequestsUpdateItemErrors, ThrowOnError>({
160
- security: [{ scheme: 'bearer', type: 'http' }],
161
- url: '/v1/automations/{id}/dataset-review-requests/{reviewId}/items/{itemId}',
162
- ...options,
163
- headers: {
164
- 'Content-Type': 'application/json',
165
- ...options.headers
166
- }
167
- });
168
-
169
- /**
170
- * Download dataset review item file
171
- *
172
- * Download one input file (default) or expected-output file (`?kind=expected`) belonging to a review item. Authorized by `dataset_review:read` and scoped to files referenced in the item snapshot, so reviewers without workflow read can still preview documents. Expected files resolve to reviewer-corrected bytes when the item has a file overlay.
173
- */
174
- export const automationsDatasetReviewRequestsItemFileGet = <ThrowOnError extends boolean = false>(options: Options<AutomationsDatasetReviewRequestsItemFileGetData, ThrowOnError>): RequestResult<AutomationsDatasetReviewRequestsItemFileGetResponses, AutomationsDatasetReviewRequestsItemFileGetErrors, ThrowOnError> => (options.client ?? client).get<AutomationsDatasetReviewRequestsItemFileGetResponses, AutomationsDatasetReviewRequestsItemFileGetErrors, ThrowOnError>({
175
- security: [{ scheme: 'bearer', type: 'http' }],
176
- url: '/v1/automations/{id}/dataset-review-requests/{reviewId}/items/{itemId}/files/{path}',
177
- ...options
178
- });
179
-
180
- /**
181
- * Export automation dataset
182
- *
183
- * Download the automation dataset as a ZIP archive. The archive uses the examples/<name>/input and examples/<name>/expected folder convention, so it can be re-imported into another automation or environment. Cloud deployments may redirect large archives to a short-lived storage URL.
184
- */
185
- export const automationsDatasetExport = <ThrowOnError extends boolean = false>(options: Options<AutomationsDatasetExportData, ThrowOnError>): RequestResult<AutomationsDatasetExportResponses, AutomationsDatasetExportErrors, ThrowOnError> => (options.client ?? client).get<AutomationsDatasetExportResponses, AutomationsDatasetExportErrors, ThrowOnError>({
186
- security: [{ scheme: 'bearer', type: 'http' }],
187
- url: '/v1/automations/{id}/dataset/export',
188
- ...options
189
- });
190
-
191
- /**
192
- * Import automation dataset
193
- *
194
- * Import a dataset ZIP archive using the examples/<name>/input and examples/<name>/expected folder convention. Use `mode=append` for additive imports or `mode=replace` to replace the dataset.
195
- */
196
- export const automationsDatasetImport = <ThrowOnError extends boolean = false>(options: Options<AutomationsDatasetImportData, ThrowOnError>): RequestResult<AutomationsDatasetImportResponses, AutomationsDatasetImportErrors, ThrowOnError> => (options.client ?? client).post<AutomationsDatasetImportResponses, AutomationsDatasetImportErrors, ThrowOnError>({
197
- ...formDataBodySerializer,
198
- security: [{ scheme: 'bearer', type: 'http' }],
199
- url: '/v1/automations/{id}/dataset/import',
200
- ...options,
201
- headers: {
202
- 'Content-Type': null,
203
- ...options.headers
204
- }
205
- });
206
-
207
- /**
208
- * Get evaluators
209
- *
210
- * Fetch workflow evaluator YAML or agent evaluator metadata compiled from the requested sourceRef (latest release by default). Agent evaluations are defined in agent.ts and captured with each run. Automated scores are separate from human review verdicts.
211
- */
212
- export const automationsEvaluatorsGet = <ThrowOnError extends boolean = false>(options: Options<AutomationsEvaluatorsGetData, ThrowOnError>): RequestResult<AutomationsEvaluatorsGetResponses, AutomationsEvaluatorsGetErrors, ThrowOnError> => (options.client ?? client).get<AutomationsEvaluatorsGetResponses, AutomationsEvaluatorsGetErrors, ThrowOnError>({
213
- security: [{ scheme: 'bearer', type: 'http' }],
214
- url: '/v1/automations/{id}/evaluators',
215
- ...options
216
- });
217
-
218
- /**
219
- * Replace evaluators
220
- *
221
- * Replace evaluator YAML for a workflow. Agents reject YAML updates: define evaluators and a pass rule in agent.ts, then release.
222
- */
223
- export const automationsEvaluatorsUpdate = <ThrowOnError extends boolean = false>(options: Options<AutomationsEvaluatorsUpdateData, ThrowOnError>): RequestResult<AutomationsEvaluatorsUpdateResponses, AutomationsEvaluatorsUpdateErrors, ThrowOnError> => (options.client ?? client).put<AutomationsEvaluatorsUpdateResponses, AutomationsEvaluatorsUpdateErrors, ThrowOnError>({
224
- security: [{ scheme: 'bearer', type: 'http' }],
225
- url: '/v1/automations/{id}/evaluators',
226
- ...options,
227
- headers: {
228
- 'Content-Type': 'application/json',
229
- ...options.headers
230
- }
231
- });
232
-
233
- /**
234
- * List dataset examples
235
- *
236
- * List dataset examples for one automation. Examples contain input, expected output, expected files, metadata, and optional overrides used by evaluation runs. Pass `include=metadata` to return ids, names, metadata, and expected file refs without loading input or expected JSON.
237
- */
238
- export const automationsExamplesList = <ThrowOnError extends boolean = false>(options: Options<AutomationsExamplesListData, ThrowOnError>): RequestResult<AutomationsExamplesListResponses, AutomationsExamplesListErrors, ThrowOnError> => (options.client ?? client).get<AutomationsExamplesListResponses, AutomationsExamplesListErrors, ThrowOnError>({
239
- security: [{ scheme: 'bearer', type: 'http' }],
240
- url: '/v1/automations/{id}/examples',
241
- ...options
242
- });
243
-
244
- /**
245
- * Create dataset example
246
- *
247
- * Create one dataset example from JSON fields. Use dataset import for archive-based uploads and file-bearing examples.
248
- */
249
- export const automationsExamplesCreate = <ThrowOnError extends boolean = false>(options: Options<AutomationsExamplesCreateData, ThrowOnError>): RequestResult<AutomationsExamplesCreateResponses, AutomationsExamplesCreateErrors, ThrowOnError> => (options.client ?? client).post<AutomationsExamplesCreateResponses, AutomationsExamplesCreateErrors, ThrowOnError>({
250
- security: [{ scheme: 'bearer', type: 'http' }],
251
- url: '/v1/automations/{id}/examples',
252
- ...options,
253
- headers: {
254
- 'Content-Type': 'application/json',
255
- ...options.headers
256
- }
257
- });
258
-
259
- /**
260
- * Delete dataset example
261
- *
262
- * Delete one dataset example from the automation dataset. This removes the example from future experiments.
263
- */
264
- export const automationsExamplesDelete = <ThrowOnError extends boolean = false>(options: Options<AutomationsExamplesDeleteData, ThrowOnError>): RequestResult<AutomationsExamplesDeleteResponses, AutomationsExamplesDeleteErrors, ThrowOnError> => (options.client ?? client).delete<AutomationsExamplesDeleteResponses, AutomationsExamplesDeleteErrors, ThrowOnError>({
265
- security: [{ scheme: 'bearer', type: 'http' }],
266
- url: '/v1/automations/{id}/examples/{exampleId}',
267
- ...options
268
- });
269
-
270
- /**
271
- * Get dataset example
272
- *
273
- * Fetch one dataset example, including input, expected output, expected files, metadata, and overrides.
274
- */
275
- export const automationsExamplesGet = <ThrowOnError extends boolean = false>(options: Options<AutomationsExamplesGetData, ThrowOnError>): RequestResult<AutomationsExamplesGetResponses, AutomationsExamplesGetErrors, ThrowOnError> => (options.client ?? client).get<AutomationsExamplesGetResponses, AutomationsExamplesGetErrors, ThrowOnError>({
276
- security: [{ scheme: 'bearer', type: 'http' }],
277
- url: '/v1/automations/{id}/examples/{exampleId}',
278
- ...options
279
- });
280
-
281
- /**
282
- * Update dataset example
283
- *
284
- * Partially update a dataset example. Omitted fields are preserved; pass null for nullable fields to clear them.
285
- */
286
- export const automationsExamplesUpdate = <ThrowOnError extends boolean = false>(options: Options<AutomationsExamplesUpdateData, ThrowOnError>): RequestResult<AutomationsExamplesUpdateResponses, AutomationsExamplesUpdateErrors, ThrowOnError> => (options.client ?? client).patch<AutomationsExamplesUpdateResponses, AutomationsExamplesUpdateErrors, ThrowOnError>({
287
- security: [{ scheme: 'bearer', type: 'http' }],
288
- url: '/v1/automations/{id}/examples/{exampleId}',
289
- ...options,
290
- headers: {
291
- 'Content-Type': 'application/json',
292
- ...options.headers
293
- }
294
- });
295
-
296
- /**
297
- * List expected files
298
- *
299
- * List files stored under the expected folder for one automation dataset example.
300
- */
301
- export const automationsExamplesExpectedFilesList = <ThrowOnError extends boolean = false>(options: Options<AutomationsExamplesExpectedFilesListData, ThrowOnError>): RequestResult<AutomationsExamplesExpectedFilesListResponses, AutomationsExamplesExpectedFilesListErrors, ThrowOnError> => (options.client ?? client).get<AutomationsExamplesExpectedFilesListResponses, AutomationsExamplesExpectedFilesListErrors, ThrowOnError>({
302
- security: [{ scheme: 'bearer', type: 'http' }],
303
- url: '/v1/automations/{id}/examples/{exampleId}/expected',
304
- ...options
305
- });
306
-
307
- /**
308
- * Upload expected files
309
- *
310
- * Upload one or more files into the expected folder for an automation dataset example. Use `$file` references such as `expected/result.pdf` from expected JSON to compare file outputs.
311
- */
312
- export const automationsExamplesExpectedFilesCreate = <ThrowOnError extends boolean = false>(options: Options<AutomationsExamplesExpectedFilesCreateData, ThrowOnError>): RequestResult<AutomationsExamplesExpectedFilesCreateResponses, AutomationsExamplesExpectedFilesCreateErrors, ThrowOnError> => (options.client ?? client).post<AutomationsExamplesExpectedFilesCreateResponses, AutomationsExamplesExpectedFilesCreateErrors, ThrowOnError>({
313
- ...formDataBodySerializer,
314
- security: [{ scheme: 'bearer', type: 'http' }],
315
- url: '/v1/automations/{id}/examples/{exampleId}/expected',
316
- ...options,
317
- headers: {
318
- 'Content-Type': null,
319
- ...options.headers
320
- }
321
- });
322
-
323
- /**
324
- * Delete expected file
325
- *
326
- * Delete one file from an automation dataset example expected folder.
327
- */
328
- export const automationsExamplesExpectedFileDelete = <ThrowOnError extends boolean = false>(options: Options<AutomationsExamplesExpectedFileDeleteData, ThrowOnError>): RequestResult<AutomationsExamplesExpectedFileDeleteResponses, AutomationsExamplesExpectedFileDeleteErrors, ThrowOnError> => (options.client ?? client).delete<AutomationsExamplesExpectedFileDeleteResponses, AutomationsExamplesExpectedFileDeleteErrors, ThrowOnError>({
329
- security: [{ scheme: 'bearer', type: 'http' }],
330
- url: '/v1/automations/{id}/examples/{exampleId}/expected/{path}',
331
- ...options
332
- });
333
-
334
- /**
335
- * Download expected dataset file
336
- *
337
- * Download one expected file attached to an automation dataset example.
338
- */
339
- export const automationsExamplesExpectedFileGet = <ThrowOnError extends boolean = false>(options: Options<AutomationsExamplesExpectedFileGetData, ThrowOnError>): RequestResult<AutomationsExamplesExpectedFileGetResponses, AutomationsExamplesExpectedFileGetErrors, ThrowOnError> => (options.client ?? client).get<AutomationsExamplesExpectedFileGetResponses, AutomationsExamplesExpectedFileGetErrors, ThrowOnError>({
340
- security: [{ scheme: 'bearer', type: 'http' }],
341
- url: '/v1/automations/{id}/examples/{exampleId}/expected/{path}',
342
- ...options
343
- });
344
-
345
- /**
346
- * Rename expected file
347
- *
348
- * Rename one expected file attached to an automation dataset example. The parent folder is preserved.
349
- */
350
- export const automationsExamplesExpectedFileUpdate = <ThrowOnError extends boolean = false>(options: Options<AutomationsExamplesExpectedFileUpdateData, ThrowOnError>): RequestResult<AutomationsExamplesExpectedFileUpdateResponses, AutomationsExamplesExpectedFileUpdateErrors, ThrowOnError> => (options.client ?? client).patch<AutomationsExamplesExpectedFileUpdateResponses, AutomationsExamplesExpectedFileUpdateErrors, ThrowOnError>({
351
- security: [{ scheme: 'bearer', type: 'http' }],
352
- url: '/v1/automations/{id}/examples/{exampleId}/expected/{path}',
353
- ...options,
354
- headers: {
355
- 'Content-Type': 'application/json',
356
- ...options.headers
357
- }
358
- });
359
-
360
- /**
361
- * List input files
362
- *
363
- * List files stored under the input folder for one automation dataset example.
364
- */
365
- export const automationsExamplesInputFilesList = <ThrowOnError extends boolean = false>(options: Options<AutomationsExamplesInputFilesListData, ThrowOnError>): RequestResult<AutomationsExamplesInputFilesListResponses, AutomationsExamplesInputFilesListErrors, ThrowOnError> => (options.client ?? client).get<AutomationsExamplesInputFilesListResponses, AutomationsExamplesInputFilesListErrors, ThrowOnError>({
366
- security: [{ scheme: 'bearer', type: 'http' }],
367
- url: '/v1/automations/{id}/examples/{exampleId}/input',
368
- ...options
369
- });
370
-
371
- /**
372
- * Upload input files
373
- *
374
- * Upload one or more files into the input folder for an automation dataset example. Use `$file` references such as `input/invoice.pdf` from the example input JSON to consume them.
375
- */
376
- export const automationsExamplesInputFilesCreate = <ThrowOnError extends boolean = false>(options: Options<AutomationsExamplesInputFilesCreateData, ThrowOnError>): RequestResult<AutomationsExamplesInputFilesCreateResponses, AutomationsExamplesInputFilesCreateErrors, ThrowOnError> => (options.client ?? client).post<AutomationsExamplesInputFilesCreateResponses, AutomationsExamplesInputFilesCreateErrors, ThrowOnError>({
377
- ...formDataBodySerializer,
378
- security: [{ scheme: 'bearer', type: 'http' }],
379
- url: '/v1/automations/{id}/examples/{exampleId}/input',
380
- ...options,
381
- headers: {
382
- 'Content-Type': null,
383
- ...options.headers
384
- }
385
- });
386
-
387
- /**
388
- * Delete input file
389
- *
390
- * Delete one file from an automation dataset example input folder.
391
- */
392
- export const automationsExamplesInputFileDelete = <ThrowOnError extends boolean = false>(options: Options<AutomationsExamplesInputFileDeleteData, ThrowOnError>): RequestResult<AutomationsExamplesInputFileDeleteResponses, AutomationsExamplesInputFileDeleteErrors, ThrowOnError> => (options.client ?? client).delete<AutomationsExamplesInputFileDeleteResponses, AutomationsExamplesInputFileDeleteErrors, ThrowOnError>({
393
- security: [{ scheme: 'bearer', type: 'http' }],
394
- url: '/v1/automations/{id}/examples/{exampleId}/input/{path}',
395
- ...options
396
- });
397
-
398
- /**
399
- * Download input file
400
- *
401
- * Download one file from an automation dataset example input folder.
402
- */
403
- export const automationsExamplesInputFileGet = <ThrowOnError extends boolean = false>(options: Options<AutomationsExamplesInputFileGetData, ThrowOnError>): RequestResult<AutomationsExamplesInputFileGetResponses, AutomationsExamplesInputFileGetErrors, ThrowOnError> => (options.client ?? client).get<AutomationsExamplesInputFileGetResponses, AutomationsExamplesInputFileGetErrors, ThrowOnError>({
404
- security: [{ scheme: 'bearer', type: 'http' }],
405
- url: '/v1/automations/{id}/examples/{exampleId}/input/{path}',
406
- ...options
407
- });
408
-
409
- /**
410
- * Rename input file
411
- *
412
- * Rename one input file attached to an automation dataset example. The parent folder is preserved.
413
- */
414
- export const automationsExamplesInputFileUpdate = <ThrowOnError extends boolean = false>(options: Options<AutomationsExamplesInputFileUpdateData, ThrowOnError>): RequestResult<AutomationsExamplesInputFileUpdateResponses, AutomationsExamplesInputFileUpdateErrors, ThrowOnError> => (options.client ?? client).patch<AutomationsExamplesInputFileUpdateResponses, AutomationsExamplesInputFileUpdateErrors, ThrowOnError>({
415
- security: [{ scheme: 'bearer', type: 'http' }],
416
- url: '/v1/automations/{id}/examples/{exampleId}/input/{path}',
417
- ...options,
418
- headers: {
419
- 'Content-Type': 'application/json',
420
- ...options.headers
421
- }
422
- });
423
-
424
- /**
425
- * Run dataset example
426
- *
427
- * Start an asynchronous run using the input from one dataset example. Poll `GET /api/v1/runs/{id}` for completion and use run scores or review endpoints to review the result.
428
- */
429
- export const automationsExamplesRun = <ThrowOnError extends boolean = false>(options: Options<AutomationsExamplesRunData, ThrowOnError>): RequestResult<AutomationsExamplesRunResponses, AutomationsExamplesRunErrors, ThrowOnError> => (options.client ?? client).post<AutomationsExamplesRunResponses, AutomationsExamplesRunErrors, ThrowOnError>({
430
- security: [{ scheme: 'bearer', type: 'http' }],
431
- url: '/v1/automations/{id}/examples/{exampleId}/run',
432
- ...options
433
- });
434
-
435
- /**
436
- * List experiments
437
- *
438
- * List experiment batches for one automation. Each experiment runs selected dataset examples and records automated evaluator scores.
439
- */
440
- export const automationsExperimentsList = <ThrowOnError extends boolean = false>(options: Options<AutomationsExperimentsListData, ThrowOnError>): RequestResult<AutomationsExperimentsListResponses, AutomationsExperimentsListErrors, ThrowOnError> => (options.client ?? client).get<AutomationsExperimentsListResponses, AutomationsExperimentsListErrors, ThrowOnError>({
441
- security: [{ scheme: 'bearer', type: 'http' }],
442
- url: '/v1/automations/{id}/experiments',
443
- ...options
444
- });
445
-
446
- /**
447
- * Create experiment
448
- *
449
- * Start an asynchronous experiment batch for one automation. Omit `examples` to run the full dataset, or pass specific example ids to run a subset.
450
- */
451
- export const automationsExperimentsCreate = <ThrowOnError extends boolean = false>(options: Options<AutomationsExperimentsCreateData, ThrowOnError>): RequestResult<AutomationsExperimentsCreateResponses, AutomationsExperimentsCreateErrors, ThrowOnError> => (options.client ?? client).post<AutomationsExperimentsCreateResponses, AutomationsExperimentsCreateErrors, ThrowOnError>({
452
- security: [{ scheme: 'bearer', type: 'http' }],
453
- url: '/v1/automations/{id}/experiments',
454
- ...options,
455
- headers: {
456
- 'Content-Type': 'application/json',
457
- ...options.headers
458
- }
459
- });
460
-
461
- /**
462
- * Get experiment
463
- *
464
- * Fetch one experiment batch with its run summaries and evaluator results grouped by run id.
465
- */
466
- export const automationsExperimentsGet = <ThrowOnError extends boolean = false>(options: Options<AutomationsExperimentsGetData, ThrowOnError>): RequestResult<AutomationsExperimentsGetResponses, AutomationsExperimentsGetErrors, ThrowOnError> => (options.client ?? client).get<AutomationsExperimentsGetResponses, AutomationsExperimentsGetErrors, ThrowOnError>({
467
- security: [{ scheme: 'bearer', type: 'http' }],
468
- url: '/v1/automations/{id}/experiments/{experimentId}',
469
- ...options
470
- });
471
-
472
- /**
473
- * Cancel experiment
474
- *
475
- * Request cancellation for an experiment batch. Already-completed runs remain recorded; queued or running work is cancelled when possible.
476
- */
477
- export const automationsExperimentsCancel = <ThrowOnError extends boolean = false>(options: Options<AutomationsExperimentsCancelData, ThrowOnError>): RequestResult<AutomationsExperimentsCancelResponses, AutomationsExperimentsCancelErrors, ThrowOnError> => (options.client ?? client).post<AutomationsExperimentsCancelResponses, AutomationsExperimentsCancelErrors, ThrowOnError>({
478
- security: [{ scheme: 'bearer', type: 'http' }],
479
- url: '/v1/automations/{id}/experiments/{experimentId}/cancel',
480
- ...options
481
- });
482
-
483
- /**
484
- * Export experiment eval results
485
- *
486
- * Download eval result rows for a single experiment batch as CSV or JSON.
487
- */
488
- export const automationsExperimentsExport = <ThrowOnError extends boolean = false>(options: Options<AutomationsExperimentsExportData, ThrowOnError>): RequestResult<AutomationsExperimentsExportResponses, AutomationsExperimentsExportErrors, ThrowOnError> => (options.client ?? client).get<AutomationsExperimentsExportResponses, AutomationsExperimentsExportErrors, ThrowOnError>({
489
- security: [{ scheme: 'bearer', type: 'http' }],
490
- url: '/v1/automations/{id}/experiments/{experimentId}/export',
491
- ...options
492
- });
493
-
494
- /**
495
- * Export all experiment eval results
496
- *
497
- * Download every eval result row for an automation as CSV or JSON.
498
- */
499
- export const automationsExperimentsExportAll = <ThrowOnError extends boolean = false>(options: Options<AutomationsExperimentsExportAllData, ThrowOnError>): RequestResult<AutomationsExperimentsExportAllResponses, AutomationsExperimentsExportAllErrors, ThrowOnError> => (options.client ?? client).get<AutomationsExperimentsExportAllResponses, AutomationsExperimentsExportAllErrors, ThrowOnError>({
500
- security: [{ scheme: 'bearer', type: 'http' }],
501
- url: '/v1/automations/{id}/experiments/export',
502
- ...options
503
- });
504
-
505
- /**
506
- * Create automation experiment with NDJSON progress
507
- *
508
- * Starts a batch eval experiment for workflow or agent automations and streams per-run completion events as NDJSON.
509
- */
510
- export const automationsExperimentsCreateStream = <ThrowOnError extends boolean = false>(options: Options<AutomationsExperimentsCreateStreamData, ThrowOnError>): RequestResult<AutomationsExperimentsCreateStreamResponses, AutomationsExperimentsCreateStreamErrors, ThrowOnError> => (options.client ?? client).post<AutomationsExperimentsCreateStreamResponses, AutomationsExperimentsCreateStreamErrors, ThrowOnError>({
511
- security: [{ scheme: 'bearer', type: 'http' }],
512
- url: '/v1/automations/{id}/experiments/stream',
513
- ...options,
514
- headers: {
515
- 'Content-Type': 'application/json',
516
- ...options.headers
517
- }
518
- });
519
-
520
- /**
521
- * Get automation review health
522
- *
523
- * Aggregates reviewed correctness, review coverage, bucketed counts, and rolling-window confidence for one automation. Prefer this endpoint for single-automation monitoring dashboards.
524
- */
525
- export const automationsReviewsHealth = <ThrowOnError extends boolean = false>(options: Options<AutomationsReviewsHealthData, ThrowOnError>): RequestResult<AutomationsReviewsHealthResponses, AutomationsReviewsHealthErrors, ThrowOnError> => (options.client ?? client).get<AutomationsReviewsHealthResponses, AutomationsReviewsHealthErrors, ThrowOnError>({
526
- security: [{ scheme: 'bearer', type: 'http' }],
527
- url: '/v1/automations/{id}/reviews/health',
528
- ...options
529
- });
530
-
531
- /**
532
- * Sync automation from latest Git release
533
- *
534
- * Reconciles automation registry metadata and trigger projections from the latest Git source release. This operation is idempotent for unchanged source state: repeated calls against the same latest release leave the same automation registry state and may repeat the same warnings. Requires a Bearer API token for the organization and a user-backed API key. It does not publish source; it reads the already-published latest release manifest. Versioned targets are rejected with 400, missing organization/source/release/manifest state returns 404, invalid manifests return 400, and provider or persistence failures return 5xx.
535
- */
536
- export const automationsSync = <ThrowOnError extends boolean = false>(options: Options<AutomationsSyncData, ThrowOnError>): RequestResult<AutomationsSyncResponses, AutomationsSyncErrors, ThrowOnError> => (options.client ?? client).post<AutomationsSyncResponses, AutomationsSyncErrors, ThrowOnError>({
537
- security: [{ scheme: 'bearer', type: 'http' }],
538
- url: '/v1/automations/{id}/sync',
539
- ...options
540
- });
541
-
542
- /**
543
- * Get automation triggers
544
- *
545
- * Read trigger state for a workflow or agent automation. Trigger mutation is not public v1.
546
- */
547
- export const automationsTriggersGet = <ThrowOnError extends boolean = false>(options: Options<AutomationsTriggersGetData, ThrowOnError>): RequestResult<AutomationsTriggersGetResponses, AutomationsTriggersGetErrors, ThrowOnError> => (options.client ?? client).get<AutomationsTriggersGetResponses, AutomationsTriggersGetErrors, ThrowOnError>({
548
- security: [{ scheme: 'bearer', type: 'http' }],
549
- url: '/v1/automations/{id}/triggers',
550
- ...options
551
- });
552
-
553
- /**
554
- * List automation versions
555
- *
556
- * List versions for a workflow or agent automation. YAML workflow lists include tagged releases plus the current untagged snapshot when HEAD is untagged (for example after restore), so the current version is always present. Agent lists remain Git release tags.
557
- */
558
- export const automationsVersionsList = <ThrowOnError extends boolean = false>(options: Options<AutomationsVersionsListData, ThrowOnError>): RequestResult<AutomationsVersionsListResponses, AutomationsVersionsListErrors, ThrowOnError> => (options.client ?? client).get<AutomationsVersionsListResponses, AutomationsVersionsListErrors, ThrowOnError>({
559
- security: [{ scheme: 'bearer', type: 'http' }],
560
- url: '/v1/automations/{id}/versions',
561
- ...options
562
- });
563
-
564
- /**
565
- * Create a workflow version
566
- *
567
- * Create a tagged YAML workflow candidate from validated YAML or by copying an existing snapshot (`historyId`). Provide exactly one of `yaml` or `historyId`. Copy creates a new tagged row and leaves the source tag unchanged; it does not retag the original. Defaults to making the new version current. Set `activate: false` to keep it off live traffic until promote. That path requires an existing current workflow version and returns 400 if HEAD is empty. Agent automations are Git-backed and return 400. Requires a Bearer API key or a dashboard session.
568
- */
569
- export const automationsVersionsCreate = <ThrowOnError extends boolean = false>(options: Options<AutomationsVersionsCreateData, ThrowOnError>): RequestResult<AutomationsVersionsCreateResponses, AutomationsVersionsCreateErrors, ThrowOnError> => (options.client ?? client).post<AutomationsVersionsCreateResponses, AutomationsVersionsCreateErrors, ThrowOnError>({
570
- security: [{ scheme: 'bearer', type: 'http' }],
571
- url: '/v1/automations/{id}/versions',
572
- ...options,
573
- headers: {
574
- 'Content-Type': 'application/json',
575
- ...options.headers
576
- }
577
- });
578
-
579
- /**
580
- * Promote a workflow version
581
- *
582
- * Make an existing tagged YAML workflow candidate current without creating another history row. Only tagged version rows can be promoted; untagged snapshots (including restore HEAD) and missing ids return 404. Agent automations return 400. Requires a Bearer API key or a dashboard session.
583
- */
584
- export const automationsVersionsPromote = <ThrowOnError extends boolean = false>(options: Options<AutomationsVersionsPromoteData, ThrowOnError>): RequestResult<AutomationsVersionsPromoteResponses, AutomationsVersionsPromoteErrors, ThrowOnError> => (options.client ?? client).post<AutomationsVersionsPromoteResponses, AutomationsVersionsPromoteErrors, ThrowOnError>({
585
- security: [{ scheme: 'bearer', type: 'http' }],
586
- url: '/v1/automations/{id}/versions/{versionId}/promote',
587
- ...options
588
- });
589
-
590
- /**
591
- * Restore a workflow version
592
- *
593
- * Restore a YAML workflow automation by copying a previous snapshot into a new untagged current version. The source tag is left unchanged; the new HEAD appears in subsequent version lists as the untagged current row and cannot be promoted until you create a tagged copy. The JSON body may be `{}`; `message` is optional and defaults to a timestamped restore note. Agent automations return 400. Requires a Bearer API key or a dashboard session.
594
- */
595
- export const automationsVersionsRestore = <ThrowOnError extends boolean = false>(options: Options<AutomationsVersionsRestoreData, ThrowOnError>): RequestResult<AutomationsVersionsRestoreResponses, AutomationsVersionsRestoreErrors, ThrowOnError> => (options.client ?? client).post<AutomationsVersionsRestoreResponses, AutomationsVersionsRestoreErrors, ThrowOnError>({
596
- security: [{ scheme: 'bearer', type: 'http' }],
597
- url: '/v1/automations/{id}/versions/{versionId}/restore',
598
- ...options,
599
- headers: {
600
- 'Content-Type': 'application/json',
601
- ...options.headers
602
- }
603
- });
604
-
605
- /**
606
- * List dataset review requests across the tenant
607
- *
608
- * Tenant-wide inbox of dataset review requests with progress and automation display names. Gated by `dataset_review:read` (reviewers allowed; does not require `workflow:read`).
609
- */
610
- export const datasetReviewRequestsList = <ThrowOnError extends boolean = false>(options?: Options<DatasetReviewRequestsListData, ThrowOnError>): RequestResult<DatasetReviewRequestsListResponses, DatasetReviewRequestsListErrors, ThrowOnError> => (options?.client ?? client).get<DatasetReviewRequestsListResponses, DatasetReviewRequestsListErrors, ThrowOnError>({
611
- security: [{ scheme: 'bearer', type: 'http' }],
612
- url: '/v1/dataset-review-requests',
613
- ...options
614
- });
615
-
616
- /**
617
- * List email servers
618
- *
619
- * List outbound email servers for the current workspace. Secrets are never returned; each server includes configuration flags instead of credentials.
620
- */
621
- export const emailServersList = <ThrowOnError extends boolean = false>(options?: Options<EmailServersListData, ThrowOnError>): RequestResult<EmailServersListResponses, EmailServersListErrors, ThrowOnError> => (options?.client ?? client).get<EmailServersListResponses, EmailServersListErrors, ThrowOnError>({
622
- security: [{ scheme: 'bearer', type: 'http' }],
623
- url: '/v1/email-servers',
624
- ...options
625
- });
626
-
627
- /**
628
- * Create email server
629
- *
630
- * Create an outbound email server. Secrets are encrypted at rest and never returned. Names must be unique among live servers in the workspace.
631
- */
632
- export const emailServersCreate = <ThrowOnError extends boolean = false>(options: Options<EmailServersCreateData, ThrowOnError>): RequestResult<EmailServersCreateResponses, EmailServersCreateErrors, ThrowOnError> => (options.client ?? client).post<EmailServersCreateResponses, EmailServersCreateErrors, ThrowOnError>({
633
- security: [{ scheme: 'bearer', type: 'http' }],
634
- url: '/v1/email-servers',
635
- ...options,
636
- headers: {
637
- 'Content-Type': 'application/json',
638
- ...options.headers
639
- }
640
- });
641
-
642
- /**
643
- * Delete email server
644
- *
645
- * Soft-delete an outbound email server. Deleted ids are indistinguishable from missing.
646
- */
647
- export const emailServersDelete = <ThrowOnError extends boolean = false>(options: Options<EmailServersDeleteData, ThrowOnError>): RequestResult<EmailServersDeleteResponses, EmailServersDeleteErrors, ThrowOnError> => (options.client ?? client).delete<EmailServersDeleteResponses, EmailServersDeleteErrors, ThrowOnError>({
648
- security: [{ scheme: 'bearer', type: 'http' }],
649
- url: '/v1/email-servers/{id}',
650
- ...options
651
- });
652
-
653
- /**
654
- * Get email server
655
- *
656
- * Inspect a stored outbound email server. Cross-tenant and deleted ids are indistinguishable from missing. Secrets are never returned.
657
- */
658
- export const emailServersGet = <ThrowOnError extends boolean = false>(options: Options<EmailServersGetData, ThrowOnError>): RequestResult<EmailServersGetResponses, EmailServersGetErrors, ThrowOnError> => (options.client ?? client).get<EmailServersGetResponses, EmailServersGetErrors, ThrowOnError>({
659
- security: [{ scheme: 'bearer', type: 'http' }],
660
- url: '/v1/email-servers/{id}',
661
- ...options
662
- });
663
-
664
- /**
665
- * Update email server
666
- *
667
- * Rename, enable/disable, or replace transport configuration. Omitted secrets are retained only when the existing transport is compatible and, for SMTP, the host and username are unchanged. Changing transport or SMTP destination requires a complete valid target; a new password or explicit auth clearing is required when host or username changes.
668
- */
669
- export const emailServersUpdate = <ThrowOnError extends boolean = false>(options: Options<EmailServersUpdateData, ThrowOnError>): RequestResult<EmailServersUpdateResponses, EmailServersUpdateErrors, ThrowOnError> => (options.client ?? client).patch<EmailServersUpdateResponses, EmailServersUpdateErrors, ThrowOnError>({
670
- security: [{ scheme: 'bearer', type: 'http' }],
671
- url: '/v1/email-servers/{id}',
672
- ...options,
673
- headers: {
674
- 'Content-Type': 'application/json',
675
- ...options.headers
676
- }
677
- });
678
-
679
- /**
680
- * Test email server
681
- *
682
- * Send a concise connectivity email through the selected stored server. Disabled servers conflict. Provider failures are returned as a generic outcome and never include credentials or the test recipient.
683
- */
684
- export const emailServersTest = <ThrowOnError extends boolean = false>(options: Options<EmailServersTestData, ThrowOnError>): RequestResult<EmailServersTestResponses, EmailServersTestErrors, ThrowOnError> => (options.client ?? client).post<EmailServersTestResponses, EmailServersTestErrors, ThrowOnError>({
685
- security: [{ scheme: 'bearer', type: 'http' }],
686
- url: '/v1/email-servers/{id}/test',
687
- ...options,
688
- headers: {
689
- 'Content-Type': 'application/json',
690
- ...options.headers
691
- }
692
- });
693
-
694
- /**
695
- * Resolve experiment by id
696
- *
697
- * Returns the owning automation for an experiment batch id. Used when callers only know the experiment id.
698
- */
699
- export const experimentsResolve = <ThrowOnError extends boolean = false>(options: Options<ExperimentsResolveData, ThrowOnError>): RequestResult<ExperimentsResolveResponses, ExperimentsResolveErrors, ThrowOnError> => (options.client ?? client).get<ExperimentsResolveResponses, ExperimentsResolveErrors, ThrowOnError>({
700
- security: [{ scheme: 'bearer', type: 'http' }],
701
- url: '/v1/experiments/{experimentId}',
702
- ...options
703
- });
704
-
705
- /**
706
- * Upload file
707
- *
708
- * Upload a reusable file that can later be referenced by run inputs or dataset examples.
709
- */
710
- export const filesCreate = <ThrowOnError extends boolean = false>(options: Options<FilesCreateData, ThrowOnError>): RequestResult<FilesCreateResponses, FilesCreateErrors, ThrowOnError> => (options.client ?? client).post<FilesCreateResponses, FilesCreateErrors, ThrowOnError>({
711
- ...formDataBodySerializer,
712
- security: [{ scheme: 'bearer', type: 'http' }],
713
- url: '/v1/files',
714
- ...options,
715
- headers: {
716
- 'Content-Type': null,
717
- ...options.headers
718
- }
719
- });
720
-
721
- /**
722
- * Delete file
723
- *
724
- * Delete a reusable uploaded file. Past runs that referenced it stay readable until those runs are deleted.
725
- */
726
- export const filesDelete = <ThrowOnError extends boolean = false>(options: Options<FilesDeleteData, ThrowOnError>): RequestResult<FilesDeleteResponses, FilesDeleteErrors, ThrowOnError> => (options.client ?? client).delete<FilesDeleteResponses, FilesDeleteErrors, ThrowOnError>({
727
- security: [{ scheme: 'bearer', type: 'http' }],
728
- url: '/v1/files/{id}',
729
- ...options
730
- });
731
-
732
- /**
733
- * Get file metadata
734
- *
735
- * Get metadata for a reusable uploaded file.
736
- */
737
- export const filesGet = <ThrowOnError extends boolean = false>(options: Options<FilesGetData, ThrowOnError>): RequestResult<FilesGetResponses, FilesGetErrors, ThrowOnError> => (options.client ?? client).get<FilesGetResponses, FilesGetErrors, ThrowOnError>({
738
- security: [{ scheme: 'bearer', type: 'http' }],
739
- url: '/v1/files/{id}',
740
- ...options
741
- });
742
-
743
- /**
744
- * Download file content
745
- *
746
- * Download bytes for a reusable uploaded file. Direct-enabled deployments redirect responses above their configured body limit to a short-lived signed storage URL; multipart-only/on-prem deployments stream through the API.
747
- */
748
- export const filesContentGet = <ThrowOnError extends boolean = false>(options: Options<FilesContentGetData, ThrowOnError>): RequestResult<FilesContentGetResponses, FilesContentGetErrors, ThrowOnError> => (options.client ?? client).get<FilesContentGetResponses, FilesContentGetErrors, ThrowOnError>({
749
- security: [{ scheme: 'bearer', type: 'http' }],
750
- url: '/v1/files/{id}/content',
751
- ...options
752
- });
753
-
754
- /**
755
- * Prepare file upload
756
- *
757
- * Negotiate HTTP multipart for small bodies, a short-lived signed PUT under the single-object ceiling, storage-direct multipart (presigned-multipart) for larger files when storage supports MPU, or app-server http-chunked PUTs when direct uploads are disabled. The response transport is authoritative; clients must not guess from file size alone.
758
- */
759
- export const filesUploadsCreate = <ThrowOnError extends boolean = false>(options: Options<FilesUploadsCreateData, ThrowOnError>): RequestResult<FilesUploadsCreateResponses, FilesUploadsCreateErrors, ThrowOnError> => (options.client ?? client).post<FilesUploadsCreateResponses, FilesUploadsCreateErrors, ThrowOnError>({
760
- security: [{ scheme: 'bearer', type: 'http' }],
761
- url: '/v1/files/uploads',
762
- ...options,
763
- headers: {
764
- 'Content-Type': 'application/json',
765
- ...options.headers
766
- }
767
- });
768
-
769
- /**
770
- * Abort file upload
771
- *
772
- * Abort a pending storage-direct or http-chunked upload. Multipart sessions call AbortMultipartUpload; pending PUT objects and staged chunks are deleted. Completed canonical files are never deleted.
773
- */
774
- export const filesUploadsAbort = <ThrowOnError extends boolean = false>(options: Options<FilesUploadsAbortData, ThrowOnError>): RequestResult<FilesUploadsAbortResponses, FilesUploadsAbortErrors, ThrowOnError> => (options.client ?? client).delete<FilesUploadsAbortResponses, FilesUploadsAbortErrors, ThrowOnError>({
775
- security: [{ scheme: 'bearer', type: 'http' }],
776
- url: '/v1/files/uploads/{uploadId}',
777
- ...options
778
- });
779
-
780
- /**
781
- * Get file upload session
782
- *
783
- * Return session status for resume. Multipart sessions include authoritative uploaded parts from storage, not client-reported ETags.
784
- */
785
- export const filesUploadsGet = <ThrowOnError extends boolean = false>(options: Options<FilesUploadsGetData, ThrowOnError>): RequestResult<FilesUploadsGetResponses, FilesUploadsGetErrors, ThrowOnError> => (options.client ?? client).get<FilesUploadsGetResponses, FilesUploadsGetErrors, ThrowOnError>({
786
- security: [{ scheme: 'bearer', type: 'http' }],
787
- url: '/v1/files/uploads/{uploadId}',
788
- ...options
789
- });
790
-
791
- /**
792
- * Upload one file chunk
793
- *
794
- * Accept one raw body for an http-chunked session. Each chunk must match the negotiated size; chunks are accepted in order. Idempotent overwrite of the current index is allowed.
795
- */
796
- export const filesUploadsChunksPut = <ThrowOnError extends boolean = false>(options: Options<FilesUploadsChunksPutData, ThrowOnError>): RequestResult<FilesUploadsChunksPutResponses, FilesUploadsChunksPutErrors, ThrowOnError> => (options.client ?? client).put<FilesUploadsChunksPutResponses, FilesUploadsChunksPutErrors, ThrowOnError>({
797
- bodySerializer: null,
798
- security: [{ scheme: 'bearer', type: 'http' }],
799
- url: '/v1/files/uploads/{uploadId}/chunks/{chunkIndex}',
800
- ...options,
801
- headers: {
802
- 'Content-Type': 'application/octet-stream',
803
- ...options.headers
804
- }
805
- });
806
-
807
- /**
808
- * Complete file upload
809
- *
810
- * Verify a storage-direct pending object or assemble an http-chunked session into a reusable file. Safe to retry.
811
- */
812
- export const filesUploadsComplete = <ThrowOnError extends boolean = false>(options: Options<FilesUploadsCompleteData, ThrowOnError>): RequestResult<FilesUploadsCompleteResponses, FilesUploadsCompleteErrors, ThrowOnError> => (options.client ?? client).post<FilesUploadsCompleteResponses, FilesUploadsCompleteErrors, ThrowOnError>({
813
- security: [{ scheme: 'bearer', type: 'http' }],
814
- url: '/v1/files/uploads/{uploadId}/complete',
815
- ...options
816
- });
817
-
818
- /**
819
- * List uploaded multipart parts
820
- *
821
- * List authoritative uploaded parts from storage for resume. Do not trust client-only ETags.
822
- */
823
- export const filesUploadsPartsList = <ThrowOnError extends boolean = false>(options: Options<FilesUploadsPartsListData, ThrowOnError>): RequestResult<FilesUploadsPartsListResponses, FilesUploadsPartsListErrors, ThrowOnError> => (options.client ?? client).get<FilesUploadsPartsListResponses, FilesUploadsPartsListErrors, ThrowOnError>({
824
- security: [{ scheme: 'bearer', type: 'http' }],
825
- url: '/v1/files/uploads/{uploadId}/parts',
826
- ...options
827
- });
828
-
829
- /**
830
- * Presign one multipart upload part
831
- *
832
- * Mint a short-lived signed UploadPart URL for one validated part. Part URLs are not issued at session create.
833
- */
834
- export const filesUploadsPartsPresign = <ThrowOnError extends boolean = false>(options: Options<FilesUploadsPartsPresignData, ThrowOnError>): RequestResult<FilesUploadsPartsPresignResponses, FilesUploadsPartsPresignErrors, ThrowOnError> => (options.client ?? client).post<FilesUploadsPartsPresignResponses, FilesUploadsPartsPresignErrors, ThrowOnError>({
835
- security: [{ scheme: 'bearer', type: 'http' }],
836
- url: '/v1/files/uploads/{uploadId}/parts',
837
- ...options,
838
- headers: {
839
- 'Content-Type': 'application/json',
840
- ...options.headers
841
- }
842
- });
843
-
844
- /**
845
- * List folders
846
- *
847
- * List folders in one tree. `type` is required (`workflow` or `template`). Pass `tree=true` for the full nested tree with counts; otherwise list direct children of `parentId` (`null` for root). Deleting a folder later unfiles contained workflows or templates and does not delete them.
848
- */
849
- export const foldersList = <ThrowOnError extends boolean = false>(options: Options<FoldersListData, ThrowOnError>): RequestResult<FoldersListResponses, FoldersListErrors, ThrowOnError> => (options.client ?? client).get<FoldersListResponses, FoldersListErrors, ThrowOnError>({
850
- security: [{ scheme: 'bearer', type: 'http' }],
851
- url: '/v1/folders',
852
- ...options
853
- });
854
-
855
- /**
856
- * Create folder
857
- *
858
- * Create a folder in the workflow or template tree. `type` is required. Missing parents 404; a same-named sibling at that location returns 409. Nested agent directories in Git are source organization only and are not folders.
859
- */
860
- export const foldersCreate = <ThrowOnError extends boolean = false>(options: Options<FoldersCreateData, ThrowOnError>): RequestResult<FoldersCreateResponses, FoldersCreateErrors, ThrowOnError> => (options.client ?? client).post<FoldersCreateResponses, FoldersCreateErrors, ThrowOnError>({
861
- security: [{ scheme: 'bearer', type: 'http' }],
862
- url: '/v1/folders',
863
- ...options,
864
- headers: {
865
- 'Content-Type': 'application/json',
866
- ...options.headers
867
- }
868
- });
869
-
870
- /**
871
- * Delete folder
872
- *
873
- * Delete a folder and cascade-delete child folders. Workflows and templates in the tree are unfiled, not deleted.
874
- */
875
- export const foldersDelete = <ThrowOnError extends boolean = false>(options: Options<FoldersDeleteData, ThrowOnError>): RequestResult<FoldersDeleteResponses, FoldersDeleteErrors, ThrowOnError> => (options.client ?? client).delete<FoldersDeleteResponses, FoldersDeleteErrors, ThrowOnError>({
876
- security: [{ scheme: 'bearer', type: 'http' }],
877
- url: '/v1/folders/{id}',
878
- ...options
879
- });
880
-
881
- /**
882
- * Get folder
883
- *
884
- * Get one workflow or template folder by id.
885
- */
886
- export const foldersGet = <ThrowOnError extends boolean = false>(options: Options<FoldersGetData, ThrowOnError>): RequestResult<FoldersGetResponses, FoldersGetErrors, ThrowOnError> => (options.client ?? client).get<FoldersGetResponses, FoldersGetErrors, ThrowOnError>({
887
- security: [{ scheme: 'bearer', type: 'http' }],
888
- url: '/v1/folders/{id}',
889
- ...options
890
- });
891
-
892
- /**
893
- * Update folder
894
- *
895
- * Rename or reparent a folder. Moving a folder onto itself, into a descendant, or into the other tree is rejected. A same-named sibling at the destination returns 409.
896
- */
897
- export const foldersUpdate = <ThrowOnError extends boolean = false>(options: Options<FoldersUpdateData, ThrowOnError>): RequestResult<FoldersUpdateResponses, FoldersUpdateErrors, ThrowOnError> => (options.client ?? client).patch<FoldersUpdateResponses, FoldersUpdateErrors, ThrowOnError>({
898
- security: [{ scheme: 'bearer', type: 'http' }],
899
- url: '/v1/folders/{id}',
900
- ...options,
901
- headers: {
902
- 'Content-Type': 'application/json',
903
- ...options.headers
904
- }
905
- });
906
-
907
- /**
908
- * List pending human review tasks
909
- *
910
- * Cursor-paginated queue of pending human-review tasks for the tenant, oldest first.
911
- */
912
- export const humanReviewsList = <ThrowOnError extends boolean = false>(options?: Options<HumanReviewsListData, ThrowOnError>): RequestResult<HumanReviewsListResponses, HumanReviewsListErrors, ThrowOnError> => (options?.client ?? client).get<HumanReviewsListResponses, HumanReviewsListErrors, ThrowOnError>({
913
- security: [{ scheme: 'bearer', type: 'http' }],
914
- url: '/v1/human-reviews',
915
- ...options
916
- });
917
-
918
- /**
919
- * Get human review task
920
- *
921
- * Fetch one authorized human-review task with draft data, derived non-file input, files, and decisions.
922
- */
923
- export const humanReviewsGet = <ThrowOnError extends boolean = false>(options: Options<HumanReviewsGetData, ThrowOnError>): RequestResult<HumanReviewsGetResponses, HumanReviewsGetErrors, ThrowOnError> => (options.client ?? client).get<HumanReviewsGetResponses, HumanReviewsGetErrors, ThrowOnError>({
924
- security: [{ scheme: 'bearer', type: 'http' }],
925
- url: '/v1/human-reviews/{taskId}',
926
- ...options
927
- });
928
-
929
- /**
930
- * Approve human review task
931
- *
932
- * Approve a complete review task and resume the paused run. Requires every required field to be confirmed.
933
- */
934
- export const humanReviewsApprove = <ThrowOnError extends boolean = false>(options: Options<HumanReviewsApproveData, ThrowOnError>): RequestResult<HumanReviewsApproveResponses, HumanReviewsApproveErrors, ThrowOnError> => (options.client ?? client).post<HumanReviewsApproveResponses, HumanReviewsApproveErrors, ThrowOnError>({
935
- security: [{ scheme: 'bearer', type: 'http' }],
936
- url: '/v1/human-reviews/{taskId}/approve',
937
- ...options,
938
- headers: {
939
- 'Content-Type': 'application/json',
940
- ...options.headers
941
- }
942
- });
943
-
944
- /**
945
- * Confirm or edit a review field
946
- *
947
- * Confirm or edit a scalar field using optimistic concurrency and a durable idempotency key.
948
- */
949
- export const humanReviewsConfirmField = <ThrowOnError extends boolean = false>(options: Options<HumanReviewsConfirmFieldData, ThrowOnError>): RequestResult<HumanReviewsConfirmFieldResponses, HumanReviewsConfirmFieldErrors, ThrowOnError> => (options.client ?? client).put<HumanReviewsConfirmFieldResponses, HumanReviewsConfirmFieldErrors, ThrowOnError>({
950
- security: [{ scheme: 'bearer', type: 'http' }],
951
- url: '/v1/human-reviews/{taskId}/fields',
952
- ...options,
953
- headers: {
954
- 'Content-Type': 'application/json',
955
- ...options.headers
956
- }
957
- });
958
-
959
- /**
960
- * Download human review task file
961
- *
962
- * Download one file attached to a human-review task after strict tenant, task, and run ownership checks. Large cloud deployments may redirect to a short-lived signed storage URL.
963
- */
964
- export const humanReviewsFilesContentGet = <ThrowOnError extends boolean = false>(options: Options<HumanReviewsFilesContentGetData, ThrowOnError>): RequestResult<HumanReviewsFilesContentGetResponses, HumanReviewsFilesContentGetErrors, ThrowOnError> => (options.client ?? client).get<HumanReviewsFilesContentGetResponses, HumanReviewsFilesContentGetErrors, ThrowOnError>({
965
- security: [{ scheme: 'bearer', type: 'http' }],
966
- url: '/v1/human-reviews/{taskId}/files/{fileId}/content',
967
- ...options
968
- });
969
-
970
- /**
971
- * Reject human review task
972
- *
973
- * Reject a review task and fail the paused run with the supplied reason.
974
- */
975
- export const humanReviewsReject = <ThrowOnError extends boolean = false>(options: Options<HumanReviewsRejectData, ThrowOnError>): RequestResult<HumanReviewsRejectResponses, HumanReviewsRejectErrors, ThrowOnError> => (options.client ?? client).post<HumanReviewsRejectResponses, HumanReviewsRejectErrors, ThrowOnError>({
976
- security: [{ scheme: 'bearer', type: 'http' }],
977
- url: '/v1/human-reviews/{taskId}/reject',
978
- ...options,
979
- headers: {
980
- 'Content-Type': 'application/json',
981
- ...options.headers
982
- }
983
- });
984
-
985
- /**
986
- * List configured models
987
- *
988
- * List text, vision, and OCR models configured for this tenant's environment from the workspace model catalog. This is a cheap read-only inventory: it does not call providers. `health` is `configured` or `unconfigured` from local credentials, never a live probe. Secrets and provider endpoints are never returned.
989
- */
990
- export const modelsList = <ThrowOnError extends boolean = false>(options?: Options<ModelsListData, ThrowOnError>): RequestResult<ModelsListResponses, ModelsListErrors, ThrowOnError> => (options?.client ?? client).get<ModelsListResponses, ModelsListErrors, ThrowOnError>({
991
- security: [{ scheme: 'bearer', type: 'http' }],
992
- url: '/v1/models',
993
- ...options
994
- });
995
-
996
- /**
997
- * Inspect document parsing configuration
998
- *
999
- * Read deployment-approved OCR/vision defaults and configuration readiness for ai.parse-v2. Does not probe live providers or worker native binaries. Run document smoke tests to verify live readiness.
1000
- */
1001
- export const modelsParserReadiness = <ThrowOnError extends boolean = false>(options?: Options<ModelsParserReadinessData, ThrowOnError>): RequestResult<ModelsParserReadinessResponses, ModelsParserReadinessErrors, ThrowOnError> => (options?.client ?? client).get<ModelsParserReadinessResponses, ModelsParserReadinessErrors, ThrowOnError>({
1002
- security: [{ scheme: 'bearer', type: 'http' }],
1003
- url: '/v1/parsing/readiness',
1004
- ...options
1005
- });
1006
-
1007
- /**
1008
- * List runs
1009
- *
1010
- * List workflow and agent runs with cursor pagination.
1011
- */
1012
- export const runsList = <ThrowOnError extends boolean = false>(options?: Options<RunsListData, ThrowOnError>): RequestResult<RunsListResponses, RunsListErrors, ThrowOnError> => (options?.client ?? client).get<RunsListResponses, RunsListErrors, ThrowOnError>({
1013
- security: [{ scheme: 'bearer', type: 'http' }],
1014
- url: '/v1/runs',
1015
- ...options
1016
- });
1017
-
1018
- /**
1019
- * Start a run
1020
- *
1021
- * Start a run. Send JSON or multipart/form-data.
1022
- *
1023
- * How to read a run: the envelope is at the root. The automation business result is in `output` (per-automation, not this generic schema). HTTP 200 can report a failed run. Inspect `execution.status` and the structured `error` (`code`, `message`, `retryable`, and optional business `statusCode` and `step`). Status is `execution.status` (`execution.retry.nextRun.status` is a later retry). `input`, `usage`, and `debug` appear only with `?expand=`. `eval` is present only on eval-scoped runs.
1024
- */
1025
- export const runsStart = <ThrowOnError extends boolean = false>(options: Options<RunsStartData, ThrowOnError>): RequestResult<RunsStartResponses, RunsStartErrors, ThrowOnError> => (options.client ?? client).post<RunsStartResponses, RunsStartErrors, ThrowOnError>({
1026
- security: [{ scheme: 'bearer', type: 'http' }],
1027
- url: '/v1/runs',
1028
- ...options,
1029
- headers: {
1030
- 'Content-Type': 'application/json',
1031
- ...options.headers
1032
- }
1033
- });
1034
-
1035
- /**
1036
- * Get a run
1037
- *
1038
- * Fetch one run by id. By default this returns core metadata plus terminal output/error fields. Pass `?expand=input,usage,execution,debug` to include detailed sub-objects; `expand=execution` is also where embedded review and expected artifacts appear.
1039
- *
1040
- * How to read a run: the envelope is at the root. The automation business result is in `output` (per-automation, not this generic schema). HTTP 200 can report a failed run. Inspect `execution.status` and the structured `error` (`code`, `message`, `retryable`, and optional business `statusCode` and `step`). Status is `execution.status` (`execution.retry.nextRun.status` is a later retry). `input`, `usage`, and `debug` appear only with `?expand=`. `eval` is present only on eval-scoped runs.
1041
- */
1042
- export const runsGet = <ThrowOnError extends boolean = false>(options: Options<RunsGetData, ThrowOnError>): RequestResult<RunsGetResponses, RunsGetErrors, ThrowOnError> => (options.client ?? client).get<RunsGetResponses, RunsGetErrors, ThrowOnError>({
1043
- security: [{ scheme: 'bearer', type: 'http' }],
1044
- url: '/v1/runs/{id}',
1045
- ...options
1046
- });
1047
-
1048
- /**
1049
- * List run artifacts
1050
- *
1051
- * Returns a JSON list of downloadable artifact paths for a run. Pass `zip=1` to switch the response to a ZIP download containing output files.
1052
- */
1053
- export const runsArtifactsList = <ThrowOnError extends boolean = false>(options: Options<RunsArtifactsListData, ThrowOnError>): RequestResult<RunsArtifactsListResponses, RunsArtifactsListErrors, ThrowOnError> => (options.client ?? client).get<RunsArtifactsListResponses, RunsArtifactsListErrors, ThrowOnError>({
1054
- security: [{ scheme: 'bearer', type: 'http' }],
1055
- url: '/v1/runs/{id}/artifacts',
1056
- ...options
1057
- });
1058
-
1059
- /**
1060
- * Download run artifact
1061
- *
1062
- * Download one artifact by path. Cloud deployments may redirect to a short-lived storage URL for large files.
1063
- */
1064
- export const runsArtifactsGet = <ThrowOnError extends boolean = false>(options: Options<RunsArtifactsGetData, ThrowOnError>): RequestResult<RunsArtifactsGetResponses, RunsArtifactsGetErrors, ThrowOnError> => (options.client ?? client).get<RunsArtifactsGetResponses, RunsArtifactsGetErrors, ThrowOnError>({
1065
- security: [{ scheme: 'bearer', type: 'http' }],
1066
- url: '/v1/runs/{id}/artifacts/{path}',
1067
- ...options
1068
- });
1069
-
1070
- /**
1071
- * Cancel run
1072
- *
1073
- * Cancel a queued run or request cancellation of an in-flight run.
1074
- */
1075
- export const runsCancel = <ThrowOnError extends boolean = false>(options: Options<RunsCancelData, ThrowOnError>): RequestResult<RunsCancelResponses, RunsCancelErrors, ThrowOnError> => (options.client ?? client).post<RunsCancelResponses, RunsCancelErrors, ThrowOnError>({
1076
- security: [{ scheme: 'bearer', type: 'http' }],
1077
- url: '/v1/runs/{id}/cancel',
1078
- ...options
1079
- });
1080
-
1081
- /**
1082
- * List run events
1083
- *
1084
- * List a stable chronological lifecycle timeline for a run.
1085
- */
1086
- export const runsEventsList = <ThrowOnError extends boolean = false>(options: Options<RunsEventsListData, ThrowOnError>): RequestResult<RunsEventsListResponses, RunsEventsListErrors, ThrowOnError> => (options.client ?? client).get<RunsEventsListResponses, RunsEventsListErrors, ThrowOnError>({
1087
- security: [{ scheme: 'bearer', type: 'http' }],
1088
- url: '/v1/runs/{id}/events',
1089
- ...options
1090
- });
1091
-
1092
- /**
1093
- * Promote run to example
1094
- *
1095
- * Turn a reviewed run into a dataset example. The new example uses the run input and any corrected output/files stored through the review endpoints.
1096
- */
1097
- export const runsPromote = <ThrowOnError extends boolean = false>(options: Options<RunsPromoteData, ThrowOnError>): RequestResult<RunsPromoteResponses, RunsPromoteErrors, ThrowOnError> => (options.client ?? client).post<RunsPromoteResponses, RunsPromoteErrors, ThrowOnError>({
1098
- security: [{ scheme: 'bearer', type: 'http' }],
1099
- url: '/v1/runs/{id}/promote',
1100
- ...options,
1101
- headers: {
1102
- 'Content-Type': 'application/json',
1103
- ...options.headers
1104
- }
1105
- });
1106
-
1107
- /**
1108
- * Retry run
1109
- *
1110
- * Start a new run using the source run input. By default the retry uses the latest automation version; pass `version=original` to pin the same source version as the original run.
1111
- */
1112
- export const runsRerun = <ThrowOnError extends boolean = false>(options: Options<RunsRerunData, ThrowOnError>): RequestResult<RunsRerunResponses, RunsRerunErrors, ThrowOnError> => (options.client ?? client).post<RunsRerunResponses, RunsRerunErrors, ThrowOnError>({
1113
- security: [{ scheme: 'bearer', type: 'http' }],
1114
- url: '/v1/runs/{id}/rerun',
1115
- ...options
1116
- });
1117
-
1118
- /**
1119
- * Clear run review
1120
- *
1121
- * Deletes review metadata, corrections, and corrected files for the run.
1122
- */
1123
- export const runsReviewsClear = <ThrowOnError extends boolean = false>(options: Options<RunsReviewsClearData, ThrowOnError>): RequestResult<RunsReviewsClearResponses, RunsReviewsClearErrors, ThrowOnError> => (options.client ?? client).delete<RunsReviewsClearResponses, RunsReviewsClearErrors, ThrowOnError>({
1124
- security: [{ scheme: 'bearer', type: 'http' }],
1125
- url: '/v1/runs/{id}/reviews',
1126
- ...options
1127
- });
1128
-
1129
- /**
1130
- * Get run review
1131
- *
1132
- * Returns review metadata and corrections for a run. Corrected files are listed at GET /runs/{id}/reviews/expected; embed review + expected artifacts with GET /runs/{id}?expand=execution.
1133
- */
1134
- export const runsReviewsGet = <ThrowOnError extends boolean = false>(options: Options<RunsReviewsGetData, ThrowOnError>): RequestResult<RunsReviewsGetResponses, RunsReviewsGetErrors, ThrowOnError> => (options.client ?? client).get<RunsReviewsGetResponses, RunsReviewsGetErrors, ThrowOnError>({
1135
- security: [{ scheme: 'bearer', type: 'http' }],
1136
- url: '/v1/runs/{id}/reviews',
1137
- ...options
1138
- });
1139
-
1140
- /**
1141
- * Update run review
1142
- *
1143
- * Create or replace review metadata for a run.
1144
- */
1145
- export const runsReviewsUpdate = <ThrowOnError extends boolean = false>(options: Options<RunsReviewsUpdateData, ThrowOnError>): RequestResult<RunsReviewsUpdateResponses, RunsReviewsUpdateErrors, ThrowOnError> => (options.client ?? client).put<RunsReviewsUpdateResponses, RunsReviewsUpdateErrors, ThrowOnError>({
1146
- security: [{ scheme: 'bearer', type: 'http' }],
1147
- url: '/v1/runs/{id}/reviews',
1148
- ...options,
1149
- headers: {
1150
- 'Content-Type': 'application/json',
1151
- ...options.headers
1152
- }
1153
- });
1154
-
1155
- /**
1156
- * List corrected files
1157
- *
1158
- * Returns corrected artifact files attached to the run review. Review metadata and corrected JSON output live at GET /runs/{id}/reviews.
1159
- */
1160
- export const runsReviewsExpectedGet = <ThrowOnError extends boolean = false>(options: Options<RunsReviewsExpectedGetData, ThrowOnError>): RequestResult<RunsReviewsExpectedGetResponses, RunsReviewsExpectedGetErrors, ThrowOnError> => (options.client ?? client).get<RunsReviewsExpectedGetResponses, RunsReviewsExpectedGetErrors, ThrowOnError>({
1161
- security: [{ scheme: 'bearer', type: 'http' }],
1162
- url: '/v1/runs/{id}/reviews/expected',
1163
- ...options
1164
- });
1165
-
1166
- /**
1167
- * Add corrected file
1168
- *
1169
- * Attach one corrected file to a run review. Send multipart/form-data with `file` and optional `name` to upload a local file, or JSON with `outputFileName` and optional `expectedName` to copy an existing run output file.
1170
- */
1171
- export const runsReviewsExpectedCreate = <ThrowOnError extends boolean = false>(options: Options<RunsReviewsExpectedCreateData, ThrowOnError>): RequestResult<RunsReviewsExpectedCreateResponses, RunsReviewsExpectedCreateErrors, ThrowOnError> => (options.client ?? client).post<RunsReviewsExpectedCreateResponses, RunsReviewsExpectedCreateErrors, ThrowOnError>({
1172
- ...((options.body && typeof options.body === 'object' && 'file' in options.body) ? formDataBodySerializer : {}),
1173
- security: [{ scheme: 'bearer', type: 'http' }],
1174
- url: '/v1/runs/{id}/reviews/expected',
1175
- ...options,
1176
- headers: {
1177
- 'Content-Type': (options.body && typeof options.body === 'object' && 'file' in options.body) ? null : 'application/json',
1178
- ...options.headers
1179
- }
1180
- });
1181
-
1182
- /**
1183
- * Delete corrected artifact file
1184
- *
1185
- * Deletes one corrected artifact file attached to the run review.
1186
- */
1187
- export const runsReviewsExpectedFileDelete = <ThrowOnError extends boolean = false>(options: Options<RunsReviewsExpectedFileDeleteData, ThrowOnError>): RequestResult<RunsReviewsExpectedFileDeleteResponses, RunsReviewsExpectedFileDeleteErrors, ThrowOnError> => (options.client ?? client).delete<RunsReviewsExpectedFileDeleteResponses, RunsReviewsExpectedFileDeleteErrors, ThrowOnError>({
1188
- security: [{ scheme: 'bearer', type: 'http' }],
1189
- url: '/v1/runs/{id}/reviews/expected/{filename}',
1190
- ...options
1191
- });
1192
-
1193
- /**
1194
- * Download corrected artifact file
1195
- *
1196
- * Downloads one corrected artifact file attached to the run review. Use the `filename` returned by the corrected-output collection endpoint.
1197
- */
1198
- export const runsReviewsExpectedFileGet = <ThrowOnError extends boolean = false>(options: Options<RunsReviewsExpectedFileGetData, ThrowOnError>): RequestResult<RunsReviewsExpectedFileGetResponses, RunsReviewsExpectedFileGetErrors, ThrowOnError> => (options.client ?? client).get<RunsReviewsExpectedFileGetResponses, RunsReviewsExpectedFileGetErrors, ThrowOnError>({
1199
- security: [{ scheme: 'bearer', type: 'http' }],
1200
- url: '/v1/runs/{id}/reviews/expected/{filename}',
1201
- ...options
1202
- });
1203
-
1204
- /**
1205
- * Rename corrected artifact file
1206
- *
1207
- * Renames one corrected artifact file attached to the run review.
1208
- */
1209
- export const runsReviewsExpectedFileUpdate = <ThrowOnError extends boolean = false>(options: Options<RunsReviewsExpectedFileUpdateData, ThrowOnError>): RequestResult<RunsReviewsExpectedFileUpdateResponses, RunsReviewsExpectedFileUpdateErrors, ThrowOnError> => (options.client ?? client).patch<RunsReviewsExpectedFileUpdateResponses, RunsReviewsExpectedFileUpdateErrors, ThrowOnError>({
1210
- security: [{ scheme: 'bearer', type: 'http' }],
1211
- url: '/v1/runs/{id}/reviews/expected/{filename}',
1212
- ...options,
1213
- headers: {
1214
- 'Content-Type': 'application/json',
1215
- ...options.headers
1216
- }
1217
- });
1218
-
1219
- /**
1220
- * List run evaluator scores
1221
- *
1222
- * List automated evaluator results for one run. Use `score` for evaluator output and run reviews for human verdicts.
1223
- */
1224
- export const runsScoresList = <ThrowOnError extends boolean = false>(options: Options<RunsScoresListData, ThrowOnError>): RequestResult<RunsScoresListResponses, RunsScoresListErrors, ThrowOnError> => (options.client ?? client).get<RunsScoresListResponses, RunsScoresListErrors, ThrowOnError>({
1225
- security: [{ scheme: 'bearer', type: 'http' }],
1226
- url: '/v1/runs/{id}/scores',
1227
- ...options
1228
- });
1229
-
1230
- /**
1231
- * List run steps
1232
- *
1233
- * List slim workflow step rows for a run (no input/output payloads) plus the total count. Fetch a single step for full payloads.
1234
- */
1235
- export const runsStepsList = <ThrowOnError extends boolean = false>(options: Options<RunsStepsListData, ThrowOnError>): RequestResult<RunsStepsListResponses, RunsStepsListErrors, ThrowOnError> => (options.client ?? client).get<RunsStepsListResponses, RunsStepsListErrors, ThrowOnError>({
1236
- security: [{ scheme: 'bearer', type: 'http' }],
1237
- url: '/v1/runs/{id}/steps',
1238
- ...options
1239
- });
1240
-
1241
- /**
1242
- * Get a run step
1243
- *
1244
- * Return the full single step execution (including input/output) for on-demand inspection. The step must belong to this run or a child invoke-workflow run.
1245
- */
1246
- export const runsStepsGet = <ThrowOnError extends boolean = false>(options: Options<RunsStepsGetData, ThrowOnError>): RequestResult<RunsStepsGetResponses, RunsStepsGetErrors, ThrowOnError> => (options.client ?? client).get<RunsStepsGetResponses, RunsStepsGetErrors, ThrowOnError>({
1247
- security: [{ scheme: 'bearer', type: 'http' }],
1248
- url: '/v1/runs/{id}/steps/{stepExecutionId}',
1249
- ...options
1250
- });
1251
-
1252
- /**
1253
- * Get run trace
1254
- *
1255
- * Return low-level execution trace events for debugging one run. Workflow runs expose observability phases or step records; agent runs expose parsed trace.jsonl events. The shape is intentionally extensible, but common fields are documented.
1256
- */
1257
- export const runsTraceGet = <ThrowOnError extends boolean = false>(options: Options<RunsTraceGetData, ThrowOnError>): RequestResult<RunsTraceGetResponses, RunsTraceGetErrors, ThrowOnError> => (options.client ?? client).get<RunsTraceGetResponses, RunsTraceGetErrors, ThrowOnError>({
1258
- security: [{ scheme: 'bearer', type: 'http' }],
1259
- url: '/v1/runs/{id}/trace',
1260
- ...options
1261
- });
1262
-
1263
- /**
1264
- * Get run usage
1265
- *
1266
- * Get token, credit, duration, and execution usage for a run.
1267
- */
1268
- export const runsUsageGet = <ThrowOnError extends boolean = false>(options: Options<RunsUsageGetData, ThrowOnError>): RequestResult<RunsUsageGetResponses, RunsUsageGetErrors, ThrowOnError> => (options.client ?? client).get<RunsUsageGetResponses, RunsUsageGetErrors, ThrowOnError>({
1269
- security: [{ scheme: 'bearer', type: 'http' }],
1270
- url: '/v1/runs/{id}/usage',
1271
- ...options
1272
- });
1273
-
1274
- /**
1275
- * List templates
1276
- *
1277
- * List tenant-scoped DOCX and XLSX template resources.
1278
- */
1279
- export const templatesList = <ThrowOnError extends boolean = false>(options?: Options<TemplatesListData, ThrowOnError>): RequestResult<TemplatesListResponses, TemplatesListErrors, ThrowOnError> => (options?.client ?? client).get<TemplatesListResponses, TemplatesListErrors, ThrowOnError>({
1280
- security: [{ scheme: 'bearer', type: 'http' }],
1281
- url: '/v1/templates',
1282
- ...options
1283
- });
1284
-
1285
- /**
1286
- * Upload template
1287
- *
1288
- * Create a stable `tmpl_…` resource and its first immutable content revision from a reusable `fileId`. Public SDK helpers `create(file)` and `createFromFileId(fileId)` upload through the Files API when needed, then send this JSON body. Generated clients send `{ fileId }` JSON only. The HTTP route still accepts a multipart `file` for CLI/internal use; that path is not generated into the public SDKs.
1289
- */
1290
- export const templatesCreate = <ThrowOnError extends boolean = false>(options: Options<TemplatesCreateData, ThrowOnError>): RequestResult<TemplatesCreateResponses, TemplatesCreateErrors, ThrowOnError> => (options.client ?? client).post<TemplatesCreateResponses, TemplatesCreateErrors, ThrowOnError>({
1291
- security: [{ scheme: 'bearer', type: 'http' }],
1292
- url: '/v1/templates',
1293
- ...options,
1294
- headers: {
1295
- 'Content-Type': 'application/json',
1296
- ...options.headers
1297
- }
1298
- });
1299
-
1300
- /**
1301
- * Delete template
1302
- *
1303
- * Delete the mutable logical template. Immutable revisions are retained so workflows pinned with `templateRevisionId` continue to execute; unpinned workflows can no longer resolve the deleted `tmpl_…` id.
1304
- */
1305
- export const templatesDelete = <ThrowOnError extends boolean = false>(options: Options<TemplatesDeleteData, ThrowOnError>): RequestResult<TemplatesDeleteResponses, TemplatesDeleteErrors, ThrowOnError> => (options.client ?? client).delete<TemplatesDeleteResponses, TemplatesDeleteErrors, ThrowOnError>({
1306
- security: [{ scheme: 'bearer', type: 'http' }],
1307
- url: '/v1/templates/{id}',
1308
- ...options
1309
- });
1310
-
1311
- /**
1312
- * Inspect template
1313
- *
1314
- * Get template metadata, checksum, discovered tokens, grammar capabilities, and current immutable revision. Storage keys are never exposed.
1315
- */
1316
- export const templatesGet = <ThrowOnError extends boolean = false>(options: Options<TemplatesGetData, ThrowOnError>): RequestResult<TemplatesGetResponses, TemplatesGetErrors, ThrowOnError> => (options.client ?? client).get<TemplatesGetResponses, TemplatesGetErrors, ThrowOnError>({
1317
- security: [{ scheme: 'bearer', type: 'http' }],
1318
- url: '/v1/templates/{id}',
1319
- ...options
1320
- });
1321
-
1322
- /**
1323
- * Create template revision
1324
- *
1325
- * Append an immutable revision and advance the logical template pointer from a reusable `fileId`. Public SDK helpers `replace(file)` and `replaceFromFileId(fileId)` upload through the Files API when needed, then send this JSON body. Generated clients send `{ fileId }` JSON only. The HTTP route still accepts a multipart `file` for CLI/internal use; that path is not generated into the public SDKs.
1326
- */
1327
- export const templatesReplace = <ThrowOnError extends boolean = false>(options: Options<TemplatesReplaceData, ThrowOnError>): RequestResult<TemplatesReplaceResponses, TemplatesReplaceErrors, ThrowOnError> => (options.client ?? client).put<TemplatesReplaceResponses, TemplatesReplaceErrors, ThrowOnError>({
1328
- security: [{ scheme: 'bearer', type: 'http' }],
1329
- url: '/v1/templates/{id}',
1330
- ...options,
1331
- headers: {
1332
- 'Content-Type': 'application/json',
1333
- ...options.headers
1334
- }
1335
- });
1336
-
1337
- /**
1338
- * Download template content
1339
- *
1340
- * Download current bytes while the logical template exists, or a specific immutable revision using `revisionId`. Pinned revision downloads remain available after logical template deletion. Large objects may 302 to a short-lived signed storage URL.
1341
- */
1342
- export const templatesContentGet = <ThrowOnError extends boolean = false>(options: Options<TemplatesContentGetData, ThrowOnError>): RequestResult<TemplatesContentGetResponses, TemplatesContentGetErrors, ThrowOnError> => (options.client ?? client).get<TemplatesContentGetResponses, TemplatesContentGetErrors, ThrowOnError>({
1343
- security: [{ scheme: 'bearer', type: 'http' }],
1344
- url: '/v1/templates/{id}/content',
1345
- ...options
1346
- });
1347
-
1348
- /**
1349
- * Finalize or hard-clean a staged template
1350
- *
1351
- * Consume the one-time cleanupProof issued on a staged create. `finalize` makes the template live so later deletion keeps pinned revisions. `cleanup` hard-removes only unpublished resources from that staging attempt. Normal DELETE is unchanged and never takes this path.
1352
- */
1353
- export const templatesStaging = <ThrowOnError extends boolean = false>(options: Options<TemplatesStagingData, ThrowOnError>): RequestResult<TemplatesStagingResponses, TemplatesStagingErrors, ThrowOnError> => (options.client ?? client).post<TemplatesStagingResponses, TemplatesStagingErrors, ThrowOnError>({
1354
- security: [{ scheme: 'bearer', type: 'http' }],
1355
- url: '/v1/templates/{id}/staging',
1356
- ...options,
1357
- headers: {
1358
- 'Content-Type': 'application/json',
1359
- ...options.headers
1360
- }
1361
- });