@eigenpal/sdk 0.13.0 → 0.13.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # @eigenpal/sdk
2
2
 
3
+ ## 0.13.1
4
+
5
+ ### Patch Changes
6
+
7
+ - 56f8c5f: The TypeScript and Python SDKs now include `client.models.list()` so you can discover configured text, vision, and OCR models for the current environment from the public API catalog.
8
+ - 57ccf0b: The TypeScript SDK now handles generated request parameters without exposing prototype-chain properties.
9
+ - 56f8c5f: TypeScript and Python clients now expose `client.templates` for uploading, listing, inspecting, downloading, replacing, and deleting document templates. Uploads negotiate direct storage transfer when needed, existing reusable file IDs can be used without another upload, and downloads can target immutable revision IDs.
10
+
3
11
  ## 0.13.0
4
12
 
5
13
  ### Minor Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eigenpal/sdk",
3
- "version": "0.13.0",
3
+ "version": "0.13.2",
4
4
  "description": "Official TypeScript SDK for the EigenPal API",
5
5
  "type": "module",
6
6
  "main": "./src/index.ts",
@@ -27,7 +27,7 @@
27
27
  "@hey-api/client-fetch": "^0.13.1"
28
28
  },
29
29
  "devDependencies": {
30
- "@hey-api/openapi-ts": "^0.97.1",
30
+ "@hey-api/openapi-ts": "^0.97.3",
31
31
  "typescript": "^6.0.3"
32
32
  },
33
33
  "publishConfig": {
package/src/client.ts CHANGED
@@ -16,7 +16,9 @@ import { DEFAULT_MULTIPART_MAX_BYTES, keysRequiringPreUpload } from './lib/uploa
16
16
  import { AuthResource } from './resources/auth';
17
17
  import { AutomationsResource } from './resources/automations';
18
18
  import { FilesResource } from './resources/files';
19
+ import { ModelsResource } from './resources/models';
19
20
  import { RunsResource } from './resources/runs';
21
+ import { TemplatesResource } from './resources/templates';
20
22
  import { buildTelemetryHeaders } from './telemetry';
21
23
 
22
24
  export interface EigenpalOptions {
@@ -139,12 +141,16 @@ export function isRunFinished(run: RunStartResponse): run is Run {
139
141
  export class EigenpalClient {
140
142
  /** API key identity and current tenant context. */
141
143
  public readonly auth: AuthResource;
144
+ /** Configured text, vision, and OCR models for this tenant environment. */
145
+ public readonly models: ModelsResource;
142
146
  /** Automation metadata across workflows and agents. Start runs with `client.run(...)`. */
143
147
  public readonly automations: AutomationsResource;
144
148
  /** Tenant-wide run operations across workflow, agent, manual, and eval runs. */
145
149
  public readonly runs: RunsResource;
146
150
  /** Reusable uploaded files that can be referenced by later runs. */
147
151
  public readonly files: FilesResource;
152
+ /** Tenant-scoped DOCX/XLSX templates with immutable content revisions. */
153
+ public readonly templates: TemplatesResource;
148
154
 
149
155
  /** Underlying hey-api client. Use `getRawClient()` for advanced cases. */
150
156
  private readonly client: Client;
@@ -188,9 +194,11 @@ export class EigenpalClient {
188
194
  this.installTimeoutInterceptor();
189
195
 
190
196
  this.auth = new AuthResource(this.client, this._request.bind(this));
197
+ this.models = new ModelsResource(this.client, this._request.bind(this));
191
198
  this.automations = new AutomationsResource(this.client, this._request.bind(this));
192
199
  this.runs = new RunsResource(this.client, this._request.bind(this));
193
200
  this.files = new FilesResource(this.client, this._request.bind(this));
201
+ this.templates = new TemplatesResource(this.client, this._request.bind(this), this.files);
194
202
  }
195
203
 
196
204
  /** Expose the underlying hey-api client for advanced use (custom interceptors, etc.). */
@@ -48,10 +48,7 @@ export const createClient = (config: Config = {}): Client => {
48
48
  };
49
49
 
50
50
  if (opts.security) {
51
- await setAuthParams({
52
- ...opts,
53
- security: opts.security,
54
- });
51
+ await setAuthParams(opts);
55
52
  }
56
53
 
57
54
  if (opts.requestValidator) {
@@ -151,12 +151,13 @@ type MethodFn = <
151
151
 
152
152
  type SseFn = <
153
153
  TData = unknown,
154
- TError = unknown,
154
+ // eslint-disable-next-line @typescript-eslint/no-unused-vars
155
+ _TError = unknown,
155
156
  ThrowOnError extends boolean = false,
156
157
  TResponseStyle extends ResponseStyle = 'fields',
157
158
  >(
158
159
  options: Omit<RequestOptions<never, TResponseStyle, ThrowOnError>, 'method'>,
159
- ) => Promise<ServerSentEventsResult<TData, TError>>;
160
+ ) => Promise<ServerSentEventsResult<TData>>;
160
161
 
161
162
  type RequestFn = <
162
163
  TData = unknown,
@@ -118,14 +118,12 @@ const checkForExistence = (
118
118
  return false;
119
119
  };
120
120
 
121
- export const setAuthParams = async ({
122
- security,
123
- ...options
124
- }: Pick<Required<RequestOptions>, 'security'> &
125
- Pick<RequestOptions, 'auth' | 'query'> & {
121
+ export async function setAuthParams(
122
+ options: Pick<RequestOptions, 'auth' | 'query' | 'security'> & {
126
123
  headers: Headers;
127
- }) => {
128
- for (const auth of security) {
124
+ },
125
+ ): Promise<void> {
126
+ for (const auth of options.security ?? []) {
129
127
  if (checkForExistence(options, auth.name)) {
130
128
  continue;
131
129
  }
@@ -154,7 +152,7 @@ export const setAuthParams = async ({
154
152
  break;
155
153
  }
156
154
  }
157
- };
155
+ }
158
156
 
159
157
  export const buildUrl: Client['buildUrl'] = (options) =>
160
158
  getUrl({
@@ -104,10 +104,10 @@ const stripEmptySlots = (params: Params) => {
104
104
 
105
105
  export const buildClientParams = (args: ReadonlyArray<unknown>, fields: FieldsConfig) => {
106
106
  const params: Params = {
107
- body: {},
108
- headers: {},
109
- path: {},
110
- query: {},
107
+ body: Object.create(null),
108
+ headers: Object.create(null),
109
+ path: Object.create(null),
110
+ query: Object.create(null),
111
111
  };
112
112
 
113
113
  const map = buildKeyMap(fields);
@@ -1,4 +1,4 @@
1
1
  // This file is auto-generated by @hey-api/openapi-ts
2
2
 
3
- export { authCheck, automationsDatasetExport, automationsDatasetImport, automationsEvaluatorsGet, automationsEvaluatorsUpdate, automationsExamplesCreate, automationsExamplesDelete, automationsExamplesExpectedFileDelete, automationsExamplesExpectedFileGet, automationsExamplesExpectedFilesCreate, automationsExamplesExpectedFilesList, automationsExamplesExpectedFileUpdate, automationsExamplesGet, automationsExamplesInputFileDelete, automationsExamplesInputFileGet, automationsExamplesInputFilesCreate, automationsExamplesInputFilesList, automationsExamplesInputFileUpdate, automationsExamplesList, automationsExamplesRun, automationsExamplesUpdate, automationsExperimentsCancel, automationsExperimentsCreate, automationsExperimentsCreateStream, automationsExperimentsExport, automationsExperimentsExportAll, automationsExperimentsGet, automationsExperimentsList, automationsGet, automationsList, automationsReviewsHealth, automationsSync, automationsTriggersGet, automationsVersionsCreate, automationsVersionsList, automationsVersionsPromote, automationsVersionsRestore, experimentsResolve, filesContentGet, filesCreate, filesDelete, filesGet, filesUploadsAbort, filesUploadsComplete, filesUploadsCreate, type Options, runsArtifactsGet, runsArtifactsList, runsCancel, runsEventsList, runsGet, runsList, runsPromote, runsRerun, runsReviewsClear, runsReviewsExpectedCreate, runsReviewsExpectedFileDelete, runsReviewsExpectedFileGet, runsReviewsExpectedFileUpdate, runsReviewsExpectedGet, runsReviewsGet, runsReviewsUpdate, runsScoresList, runsStart, runsStepsList, runsTraceGet, runsUsageGet } from './sdk.gen';
4
- export type { AbortFileUploadResponse, AgentRunExecution, ApiErrorEnvelope, ApiErrorIssue, AuthCheckData, AuthCheckError, AuthCheckErrors, AuthCheckResponse, AuthCheckResponse2, AuthCheckResponses, AutomationDatasetImportMultipartRequest, AutomationDetail, AutomationsDatasetExportData, AutomationsDatasetExportError, AutomationsDatasetExportErrors, AutomationsDatasetExportResponse, AutomationsDatasetExportResponses, AutomationsDatasetImportData, AutomationsDatasetImportError, AutomationsDatasetImportErrors, AutomationsDatasetImportResponse, AutomationsDatasetImportResponses, AutomationsEvaluatorsGetData, AutomationsEvaluatorsGetError, AutomationsEvaluatorsGetErrors, AutomationsEvaluatorsGetResponse, AutomationsEvaluatorsGetResponses, AutomationsEvaluatorsUpdateData, AutomationsEvaluatorsUpdateError, AutomationsEvaluatorsUpdateErrors, AutomationsEvaluatorsUpdateResponse, AutomationsEvaluatorsUpdateResponses, AutomationsExamplesCreateData, AutomationsExamplesCreateError, AutomationsExamplesCreateErrors, AutomationsExamplesCreateResponse, AutomationsExamplesCreateResponses, AutomationsExamplesDeleteData, AutomationsExamplesDeleteError, AutomationsExamplesDeleteErrors, AutomationsExamplesDeleteResponse, AutomationsExamplesDeleteResponses, AutomationsExamplesExpectedFileDeleteData, AutomationsExamplesExpectedFileDeleteError, AutomationsExamplesExpectedFileDeleteErrors, AutomationsExamplesExpectedFileDeleteResponses, AutomationsExamplesExpectedFileGetData, AutomationsExamplesExpectedFileGetError, AutomationsExamplesExpectedFileGetErrors, AutomationsExamplesExpectedFileGetResponse, AutomationsExamplesExpectedFileGetResponses, AutomationsExamplesExpectedFilesCreateData, AutomationsExamplesExpectedFilesCreateError, AutomationsExamplesExpectedFilesCreateErrors, AutomationsExamplesExpectedFilesCreateResponse, AutomationsExamplesExpectedFilesCreateResponses, AutomationsExamplesExpectedFilesListData, AutomationsExamplesExpectedFilesListError, AutomationsExamplesExpectedFilesListErrors, AutomationsExamplesExpectedFilesListResponse, AutomationsExamplesExpectedFilesListResponses, AutomationsExamplesExpectedFileUpdateData, AutomationsExamplesExpectedFileUpdateError, AutomationsExamplesExpectedFileUpdateErrors, AutomationsExamplesExpectedFileUpdateResponse, AutomationsExamplesExpectedFileUpdateResponses, AutomationsExamplesGetData, AutomationsExamplesGetError, AutomationsExamplesGetErrors, AutomationsExamplesGetResponse, AutomationsExamplesGetResponses, AutomationsExamplesInputFileDeleteData, AutomationsExamplesInputFileDeleteError, AutomationsExamplesInputFileDeleteErrors, AutomationsExamplesInputFileDeleteResponses, AutomationsExamplesInputFileGetData, AutomationsExamplesInputFileGetError, AutomationsExamplesInputFileGetErrors, AutomationsExamplesInputFileGetResponse, AutomationsExamplesInputFileGetResponses, AutomationsExamplesInputFilesCreateData, AutomationsExamplesInputFilesCreateError, AutomationsExamplesInputFilesCreateErrors, AutomationsExamplesInputFilesCreateResponse, AutomationsExamplesInputFilesCreateResponses, AutomationsExamplesInputFilesListData, AutomationsExamplesInputFilesListError, AutomationsExamplesInputFilesListErrors, AutomationsExamplesInputFilesListResponse, AutomationsExamplesInputFilesListResponses, AutomationsExamplesInputFileUpdateData, AutomationsExamplesInputFileUpdateError, AutomationsExamplesInputFileUpdateErrors, AutomationsExamplesInputFileUpdateResponse, AutomationsExamplesInputFileUpdateResponses, AutomationsExamplesListData, AutomationsExamplesListError, AutomationsExamplesListErrors, AutomationsExamplesListResponse, AutomationsExamplesListResponses, AutomationsExamplesRunData, AutomationsExamplesRunError, AutomationsExamplesRunErrors, AutomationsExamplesRunResponse, AutomationsExamplesRunResponses, AutomationsExamplesUpdateData, AutomationsExamplesUpdateError, AutomationsExamplesUpdateErrors, AutomationsExamplesUpdateResponse, AutomationsExamplesUpdateResponses, AutomationsExperimentsCancelData, AutomationsExperimentsCancelError, AutomationsExperimentsCancelErrors, AutomationsExperimentsCancelResponse, AutomationsExperimentsCancelResponses, AutomationsExperimentsCreateData, AutomationsExperimentsCreateError, AutomationsExperimentsCreateErrors, AutomationsExperimentsCreateResponse, AutomationsExperimentsCreateResponses, AutomationsExperimentsCreateStreamData, AutomationsExperimentsCreateStreamError, AutomationsExperimentsCreateStreamErrors, AutomationsExperimentsCreateStreamResponse, AutomationsExperimentsCreateStreamResponses, AutomationsExperimentsExportAllData, AutomationsExperimentsExportAllError, AutomationsExperimentsExportAllErrors, AutomationsExperimentsExportAllResponse, AutomationsExperimentsExportAllResponses, AutomationsExperimentsExportData, AutomationsExperimentsExportError, AutomationsExperimentsExportErrors, AutomationsExperimentsExportResponse, AutomationsExperimentsExportResponses, AutomationsExperimentsGetData, AutomationsExperimentsGetError, AutomationsExperimentsGetErrors, AutomationsExperimentsGetResponse, AutomationsExperimentsGetResponses, AutomationsExperimentsListData, AutomationsExperimentsListError, AutomationsExperimentsListErrors, AutomationsExperimentsListResponse, AutomationsExperimentsListResponses, AutomationsGetData, AutomationsGetError, AutomationsGetErrors, AutomationsGetResponse, AutomationsGetResponses, AutomationsListData, AutomationsListError, AutomationsListErrors, AutomationsListResponse, AutomationsListResponses, AutomationsReviewsHealthData, AutomationsReviewsHealthError, AutomationsReviewsHealthErrors, AutomationsReviewsHealthResponse, AutomationsReviewsHealthResponses, AutomationsSyncData, AutomationsSyncError, AutomationsSyncErrors, AutomationsSyncResponse, AutomationsSyncResponses, AutomationsTriggersGetData, AutomationsTriggersGetError, AutomationsTriggersGetErrors, AutomationsTriggersGetResponse, AutomationsTriggersGetResponses, AutomationSummary, AutomationsVersionsCreateData, AutomationsVersionsCreateError, AutomationsVersionsCreateErrors, AutomationsVersionsCreateResponse, AutomationsVersionsCreateResponses, AutomationsVersionsListData, AutomationsVersionsListError, AutomationsVersionsListErrors, AutomationsVersionsListResponse, AutomationsVersionsListResponses, AutomationsVersionsPromoteData, AutomationsVersionsPromoteError, AutomationsVersionsPromoteErrors, AutomationsVersionsPromoteResponse, AutomationsVersionsPromoteResponses, AutomationsVersionsRestoreData, AutomationsVersionsRestoreError, AutomationsVersionsRestoreErrors, AutomationsVersionsRestoreResponse, AutomationsVersionsRestoreResponses, AutomationTriggersResponse, AutomationTriggerState, AutomationType, AutomationVersion, ClientOptions, CreateAutomationVersionRequest, CreateFileMultipartRequest, CreateFileUploadSessionRequest, DatasetExample, DatasetExampleExpectedFileList, DatasetExampleExpectedFileRenameRequest, DatasetExampleExpectedFileRenameResponse, DatasetExampleExpectedFileUploadRequest, DatasetExampleExpectedFileUploadResponse, DatasetExampleInputFileList, DatasetExampleInputFileRenameRequest, DatasetExampleInputFileRenameResponse, DatasetExampleInputFileUploadRequest, DatasetExampleInputFileUploadResponse, DatasetExampleList, DatasetExampleMutation, DatasetExampleUpdate, DatasetImportResponse, DeleteFileResponse, EvalResult, EvaluatorConfigResponse, EvaluatorConfigUpdate, ExampleRunResponse, ExecutionStatus, Experiment, ExperimentCreate, ExperimentCreateResponse, ExperimentDetail, ExperimentRef, ExperimentsResolveData, ExperimentsResolveError, ExperimentsResolveErrors, ExperimentsResolveResponse, ExperimentsResolveResponses, File, FilesContentGetData, FilesContentGetError, FilesContentGetErrors, FilesContentGetResponses, FilesCreateData, FilesCreateError, FilesCreateErrors, FilesCreateResponse, FilesCreateResponses, FilesDeleteData, FilesDeleteError, FilesDeleteErrors, FilesDeleteResponse, FilesDeleteResponses, FilesGetData, FilesGetError, FilesGetErrors, FilesGetResponse, FilesGetResponses, FilesUploadsAbortData, FilesUploadsAbortError, FilesUploadsAbortErrors, FilesUploadsAbortResponse, FilesUploadsAbortResponses, FilesUploadsCompleteData, FilesUploadsCompleteError, FilesUploadsCompleteErrors, FilesUploadsCompleteResponse, FilesUploadsCompleteResponses, FilesUploadsCreateData, FilesUploadsCreateError, FilesUploadsCreateErrors, FilesUploadsCreateResponse, FilesUploadsCreateResponses, ListAutomationsResponse, ListAutomationVersionsResponse, MultipartFileUploadFallback, PresignedFileUploadSession, PromoteRunRequest, PromoteRunResponse, RestoreAutomationVersionRequest, Run, RunAccepted, RunArtifact, RunArtifactsResponse, RunCancelResponse, RunDebug, RunError, RunEval, RunEvent, RunEventsResponse, RunExecution, RunExecutionMeta, RunExecutionRetry, RunFile, RunInput, RunListItem, RunReview, RunReviewCorrection, RunReviewDetail, RunReviewExpectedArtifacts, RunReviewExpectedFileCopyRequest, RunReviewExpectedFileMutationResponse, RunReviewExpectedFileUpdateRequest, RunReviewExpectedFileUpdateResponse, RunReviewExpectedFileUploadRequest, RunReviewHealthBucket, RunReviewHealthConfidence, RunReviewHealthResponse, RunReviewHealthRollingPoint, RunReviewHealthSummary, RunReviewRequest, RunReviewSummary, RunsArtifactsGetData, RunsArtifactsGetError, RunsArtifactsGetErrors, RunsArtifactsGetResponses, RunsArtifactsListData, RunsArtifactsListError, RunsArtifactsListErrors, RunsArtifactsListResponse, RunsArtifactsListResponses, RunsCancelData, RunsCancelError, RunsCancelErrors, RunsCancelResponse, RunsCancelResponses, RunScoresResponse, RunsEventsListData, RunsEventsListError, RunsEventsListErrors, RunsEventsListResponse, RunsEventsListResponses, RunsGetData, RunsGetError, RunsGetErrors, RunsGetResponse, RunsGetResponses, RunsListData, RunsListError, RunsListErrors, RunsListResponse, RunsListResponse2, RunsListResponses, RunSource, RunSourceGit, RunsPromoteData, RunsPromoteError, RunsPromoteErrors, RunsPromoteResponse, RunsPromoteResponses, RunsRerunData, RunsRerunError, RunsRerunErrors, RunsRerunResponse, RunsRerunResponses, RunsReviewsClearData, RunsReviewsClearError, RunsReviewsClearErrors, RunsReviewsClearResponse, RunsReviewsClearResponses, RunsReviewsExpectedCreateData, RunsReviewsExpectedCreateError, RunsReviewsExpectedCreateErrors, RunsReviewsExpectedCreateResponse, RunsReviewsExpectedCreateResponses, RunsReviewsExpectedFileDeleteData, RunsReviewsExpectedFileDeleteError, RunsReviewsExpectedFileDeleteErrors, RunsReviewsExpectedFileDeleteResponse, RunsReviewsExpectedFileDeleteResponses, RunsReviewsExpectedFileGetData, RunsReviewsExpectedFileGetError, RunsReviewsExpectedFileGetErrors, RunsReviewsExpectedFileGetResponse, RunsReviewsExpectedFileGetResponses, RunsReviewsExpectedFileUpdateData, RunsReviewsExpectedFileUpdateError, RunsReviewsExpectedFileUpdateErrors, RunsReviewsExpectedFileUpdateResponse, RunsReviewsExpectedFileUpdateResponses, RunsReviewsExpectedGetData, RunsReviewsExpectedGetError, RunsReviewsExpectedGetErrors, RunsReviewsExpectedGetResponse, RunsReviewsExpectedGetResponses, RunsReviewsGetData, RunsReviewsGetError, RunsReviewsGetErrors, RunsReviewsGetResponse, RunsReviewsGetResponses, RunsReviewsUpdateData, RunsReviewsUpdateError, RunsReviewsUpdateErrors, RunsReviewsUpdateResponse, RunsReviewsUpdateResponses, RunsScoresListData, RunsScoresListError, RunsScoresListErrors, RunsScoresListResponse, RunsScoresListResponses, RunsStartData, RunsStartError, RunsStartErrors, RunsStartResponse, RunsStartResponses, RunsStepsListData, RunsStepsListError, RunsStepsListErrors, RunsStepsListResponse, RunsStepsListResponses, RunStartBody, RunStartMultipartRequest, RunStepsResponse, RunsTraceGetData, RunsTraceGetError, RunsTraceGetErrors, RunsTraceGetResponse, RunsTraceGetResponses, RunsUsageGetData, RunsUsageGetError, RunsUsageGetErrors, RunsUsageGetResponse, RunsUsageGetResponses, RunTiming, RunTraceEvent, RunTraceResponse, RunTrigger, RunUsage, RunUsageResponse, WorkflowRunExecution } from './types.gen';
3
+ export { authCheck, automationsDatasetExport, automationsDatasetImport, automationsEvaluatorsGet, automationsEvaluatorsUpdate, automationsExamplesCreate, automationsExamplesDelete, automationsExamplesExpectedFileDelete, automationsExamplesExpectedFileGet, automationsExamplesExpectedFilesCreate, automationsExamplesExpectedFilesList, automationsExamplesExpectedFileUpdate, automationsExamplesGet, automationsExamplesInputFileDelete, automationsExamplesInputFileGet, automationsExamplesInputFilesCreate, automationsExamplesInputFilesList, automationsExamplesInputFileUpdate, automationsExamplesList, automationsExamplesRun, automationsExamplesUpdate, automationsExperimentsCancel, automationsExperimentsCreate, automationsExperimentsCreateStream, automationsExperimentsExport, automationsExperimentsExportAll, automationsExperimentsGet, automationsExperimentsList, automationsGet, automationsList, automationsReviewsHealth, automationsSync, automationsTriggersGet, automationsVersionsCreate, automationsVersionsList, automationsVersionsPromote, automationsVersionsRestore, experimentsResolve, filesContentGet, filesCreate, filesDelete, filesGet, filesUploadsAbort, filesUploadsComplete, filesUploadsCreate, modelsList, type Options, runsArtifactsGet, runsArtifactsList, runsCancel, runsEventsList, runsGet, runsList, runsPromote, runsRerun, runsReviewsClear, runsReviewsExpectedCreate, runsReviewsExpectedFileDelete, runsReviewsExpectedFileGet, runsReviewsExpectedFileUpdate, runsReviewsExpectedGet, runsReviewsGet, runsReviewsUpdate, runsScoresList, runsStart, runsStepsList, runsTraceGet, runsUsageGet, templatesContentGet, templatesCreate, templatesDelete, templatesGet, templatesList, templatesReplace, templatesStaging } from './sdk.gen';
4
+ export type { AbortFileUploadResponse, AgentRunExecution, ApiErrorEnvelope, ApiErrorIssue, AuthCheckData, AuthCheckError, AuthCheckErrors, AuthCheckResponse, AuthCheckResponse2, AuthCheckResponses, AutomationDatasetImportMultipartRequest, AutomationDetail, AutomationsDatasetExportData, AutomationsDatasetExportError, AutomationsDatasetExportErrors, AutomationsDatasetExportResponse, AutomationsDatasetExportResponses, AutomationsDatasetImportData, AutomationsDatasetImportError, AutomationsDatasetImportErrors, AutomationsDatasetImportResponse, AutomationsDatasetImportResponses, AutomationsEvaluatorsGetData, AutomationsEvaluatorsGetError, AutomationsEvaluatorsGetErrors, AutomationsEvaluatorsGetResponse, AutomationsEvaluatorsGetResponses, AutomationsEvaluatorsUpdateData, AutomationsEvaluatorsUpdateError, AutomationsEvaluatorsUpdateErrors, AutomationsEvaluatorsUpdateResponse, AutomationsEvaluatorsUpdateResponses, AutomationsExamplesCreateData, AutomationsExamplesCreateError, AutomationsExamplesCreateErrors, AutomationsExamplesCreateResponse, AutomationsExamplesCreateResponses, AutomationsExamplesDeleteData, AutomationsExamplesDeleteError, AutomationsExamplesDeleteErrors, AutomationsExamplesDeleteResponse, AutomationsExamplesDeleteResponses, AutomationsExamplesExpectedFileDeleteData, AutomationsExamplesExpectedFileDeleteError, AutomationsExamplesExpectedFileDeleteErrors, AutomationsExamplesExpectedFileDeleteResponses, AutomationsExamplesExpectedFileGetData, AutomationsExamplesExpectedFileGetError, AutomationsExamplesExpectedFileGetErrors, AutomationsExamplesExpectedFileGetResponse, AutomationsExamplesExpectedFileGetResponses, AutomationsExamplesExpectedFilesCreateData, AutomationsExamplesExpectedFilesCreateError, AutomationsExamplesExpectedFilesCreateErrors, AutomationsExamplesExpectedFilesCreateResponse, AutomationsExamplesExpectedFilesCreateResponses, AutomationsExamplesExpectedFilesListData, AutomationsExamplesExpectedFilesListError, AutomationsExamplesExpectedFilesListErrors, AutomationsExamplesExpectedFilesListResponse, AutomationsExamplesExpectedFilesListResponses, AutomationsExamplesExpectedFileUpdateData, AutomationsExamplesExpectedFileUpdateError, AutomationsExamplesExpectedFileUpdateErrors, AutomationsExamplesExpectedFileUpdateResponse, AutomationsExamplesExpectedFileUpdateResponses, AutomationsExamplesGetData, AutomationsExamplesGetError, AutomationsExamplesGetErrors, AutomationsExamplesGetResponse, AutomationsExamplesGetResponses, AutomationsExamplesInputFileDeleteData, AutomationsExamplesInputFileDeleteError, AutomationsExamplesInputFileDeleteErrors, AutomationsExamplesInputFileDeleteResponses, AutomationsExamplesInputFileGetData, AutomationsExamplesInputFileGetError, AutomationsExamplesInputFileGetErrors, AutomationsExamplesInputFileGetResponse, AutomationsExamplesInputFileGetResponses, AutomationsExamplesInputFilesCreateData, AutomationsExamplesInputFilesCreateError, AutomationsExamplesInputFilesCreateErrors, AutomationsExamplesInputFilesCreateResponse, AutomationsExamplesInputFilesCreateResponses, AutomationsExamplesInputFilesListData, AutomationsExamplesInputFilesListError, AutomationsExamplesInputFilesListErrors, AutomationsExamplesInputFilesListResponse, AutomationsExamplesInputFilesListResponses, AutomationsExamplesInputFileUpdateData, AutomationsExamplesInputFileUpdateError, AutomationsExamplesInputFileUpdateErrors, AutomationsExamplesInputFileUpdateResponse, AutomationsExamplesInputFileUpdateResponses, AutomationsExamplesListData, AutomationsExamplesListError, AutomationsExamplesListErrors, AutomationsExamplesListResponse, AutomationsExamplesListResponses, AutomationsExamplesRunData, AutomationsExamplesRunError, AutomationsExamplesRunErrors, AutomationsExamplesRunResponse, AutomationsExamplesRunResponses, AutomationsExamplesUpdateData, AutomationsExamplesUpdateError, AutomationsExamplesUpdateErrors, AutomationsExamplesUpdateResponse, AutomationsExamplesUpdateResponses, AutomationsExperimentsCancelData, AutomationsExperimentsCancelError, AutomationsExperimentsCancelErrors, AutomationsExperimentsCancelResponse, AutomationsExperimentsCancelResponses, AutomationsExperimentsCreateData, AutomationsExperimentsCreateError, AutomationsExperimentsCreateErrors, AutomationsExperimentsCreateResponse, AutomationsExperimentsCreateResponses, AutomationsExperimentsCreateStreamData, AutomationsExperimentsCreateStreamError, AutomationsExperimentsCreateStreamErrors, AutomationsExperimentsCreateStreamResponse, AutomationsExperimentsCreateStreamResponses, AutomationsExperimentsExportAllData, AutomationsExperimentsExportAllError, AutomationsExperimentsExportAllErrors, AutomationsExperimentsExportAllResponse, AutomationsExperimentsExportAllResponses, AutomationsExperimentsExportData, AutomationsExperimentsExportError, AutomationsExperimentsExportErrors, AutomationsExperimentsExportResponse, AutomationsExperimentsExportResponses, AutomationsExperimentsGetData, AutomationsExperimentsGetError, AutomationsExperimentsGetErrors, AutomationsExperimentsGetResponse, AutomationsExperimentsGetResponses, AutomationsExperimentsListData, AutomationsExperimentsListError, AutomationsExperimentsListErrors, AutomationsExperimentsListResponse, AutomationsExperimentsListResponses, AutomationsGetData, AutomationsGetError, AutomationsGetErrors, AutomationsGetResponse, AutomationsGetResponses, AutomationsListData, AutomationsListError, AutomationsListErrors, AutomationsListResponse, AutomationsListResponses, AutomationsReviewsHealthData, AutomationsReviewsHealthError, AutomationsReviewsHealthErrors, AutomationsReviewsHealthResponse, AutomationsReviewsHealthResponses, AutomationsSyncData, AutomationsSyncError, AutomationsSyncErrors, AutomationsSyncResponse, AutomationsSyncResponses, AutomationsTriggersGetData, AutomationsTriggersGetError, AutomationsTriggersGetErrors, AutomationsTriggersGetResponse, AutomationsTriggersGetResponses, AutomationSummary, AutomationsVersionsCreateData, AutomationsVersionsCreateError, AutomationsVersionsCreateErrors, AutomationsVersionsCreateResponse, AutomationsVersionsCreateResponses, AutomationsVersionsListData, AutomationsVersionsListError, AutomationsVersionsListErrors, AutomationsVersionsListResponse, AutomationsVersionsListResponses, AutomationsVersionsPromoteData, AutomationsVersionsPromoteError, AutomationsVersionsPromoteErrors, AutomationsVersionsPromoteResponse, AutomationsVersionsPromoteResponses, AutomationsVersionsRestoreData, AutomationsVersionsRestoreError, AutomationsVersionsRestoreErrors, AutomationsVersionsRestoreResponse, AutomationsVersionsRestoreResponses, AutomationTriggersResponse, AutomationTriggerState, AutomationType, AutomationVersion, ClientOptions, CreateAutomationVersionRequest, CreatedTemplate, CreateFileMultipartRequest, CreateFileUploadSessionRequest, DatasetExample, DatasetExampleExpectedFileList, DatasetExampleExpectedFileRenameRequest, DatasetExampleExpectedFileRenameResponse, DatasetExampleExpectedFileUploadRequest, DatasetExampleExpectedFileUploadResponse, DatasetExampleInputFileList, DatasetExampleInputFileRenameRequest, DatasetExampleInputFileRenameResponse, DatasetExampleInputFileUploadRequest, DatasetExampleInputFileUploadResponse, DatasetExampleList, DatasetExampleMutation, DatasetExampleUpdate, DatasetImportResponse, DeleteFileResponse, DeleteTemplateResponse, EvalResult, EvaluatorConfigResponse, EvaluatorConfigUpdate, ExampleRunResponse, ExecutionStatus, Experiment, ExperimentCreate, ExperimentCreateResponse, ExperimentDetail, ExperimentRef, ExperimentsResolveData, ExperimentsResolveError, ExperimentsResolveErrors, ExperimentsResolveResponse, ExperimentsResolveResponses, File, FilesContentGetData, FilesContentGetError, FilesContentGetErrors, FilesContentGetResponses, FilesCreateData, FilesCreateError, FilesCreateErrors, FilesCreateResponse, FilesCreateResponses, FilesDeleteData, FilesDeleteError, FilesDeleteErrors, FilesDeleteResponse, FilesDeleteResponses, FilesGetData, FilesGetError, FilesGetErrors, FilesGetResponse, FilesGetResponses, FilesUploadsAbortData, FilesUploadsAbortError, FilesUploadsAbortErrors, FilesUploadsAbortResponse, FilesUploadsAbortResponses, FilesUploadsCompleteData, FilesUploadsCompleteError, FilesUploadsCompleteErrors, FilesUploadsCompleteResponse, FilesUploadsCompleteResponses, FilesUploadsCreateData, FilesUploadsCreateError, FilesUploadsCreateErrors, FilesUploadsCreateResponse, FilesUploadsCreateResponses, ListAutomationsResponse, ListAutomationVersionsResponse, ListModelsResponse, ListTemplatesResponse, ModelsListData, ModelsListError, ModelsListErrors, ModelsListResponse, ModelsListResponses, MultipartFileUploadFallback, PresignedFileUploadSession, PromoteRunRequest, PromoteRunResponse, PublicModel, PublicModelCost, PublicModelLimits, RestoreAutomationVersionRequest, Run, RunAccepted, RunArtifact, RunArtifactsResponse, RunCancelResponse, RunDebug, RunError, RunEval, RunEvent, RunEventsResponse, RunExecution, RunExecutionMeta, RunExecutionRetry, RunFile, RunInput, RunListItem, RunReview, RunReviewCorrection, RunReviewDetail, RunReviewExpectedArtifacts, RunReviewExpectedFileCopyRequest, RunReviewExpectedFileMutationResponse, RunReviewExpectedFileUpdateRequest, RunReviewExpectedFileUpdateResponse, RunReviewExpectedFileUploadRequest, RunReviewHealthBucket, RunReviewHealthConfidence, RunReviewHealthResponse, RunReviewHealthRollingPoint, RunReviewHealthSummary, RunReviewRequest, RunReviewSummary, RunsArtifactsGetData, RunsArtifactsGetError, RunsArtifactsGetErrors, RunsArtifactsGetResponses, RunsArtifactsListData, RunsArtifactsListError, RunsArtifactsListErrors, RunsArtifactsListResponse, RunsArtifactsListResponses, RunsCancelData, RunsCancelError, RunsCancelErrors, RunsCancelResponse, RunsCancelResponses, RunScoresResponse, RunsEventsListData, RunsEventsListError, RunsEventsListErrors, RunsEventsListResponse, RunsEventsListResponses, RunsGetData, RunsGetError, RunsGetErrors, RunsGetResponse, RunsGetResponses, RunsListData, RunsListError, RunsListErrors, RunsListResponse, RunsListResponse2, RunsListResponses, RunSource, RunSourceGit, RunsPromoteData, RunsPromoteError, RunsPromoteErrors, RunsPromoteResponse, RunsPromoteResponses, RunsRerunData, RunsRerunError, RunsRerunErrors, RunsRerunResponse, RunsRerunResponses, RunsReviewsClearData, RunsReviewsClearError, RunsReviewsClearErrors, RunsReviewsClearResponse, RunsReviewsClearResponses, RunsReviewsExpectedCreateData, RunsReviewsExpectedCreateError, RunsReviewsExpectedCreateErrors, RunsReviewsExpectedCreateResponse, RunsReviewsExpectedCreateResponses, RunsReviewsExpectedFileDeleteData, RunsReviewsExpectedFileDeleteError, RunsReviewsExpectedFileDeleteErrors, RunsReviewsExpectedFileDeleteResponse, RunsReviewsExpectedFileDeleteResponses, RunsReviewsExpectedFileGetData, RunsReviewsExpectedFileGetError, RunsReviewsExpectedFileGetErrors, RunsReviewsExpectedFileGetResponse, RunsReviewsExpectedFileGetResponses, RunsReviewsExpectedFileUpdateData, RunsReviewsExpectedFileUpdateError, RunsReviewsExpectedFileUpdateErrors, RunsReviewsExpectedFileUpdateResponse, RunsReviewsExpectedFileUpdateResponses, RunsReviewsExpectedGetData, RunsReviewsExpectedGetError, RunsReviewsExpectedGetErrors, RunsReviewsExpectedGetResponse, RunsReviewsExpectedGetResponses, RunsReviewsGetData, RunsReviewsGetError, RunsReviewsGetErrors, RunsReviewsGetResponse, RunsReviewsGetResponses, RunsReviewsUpdateData, RunsReviewsUpdateError, RunsReviewsUpdateErrors, RunsReviewsUpdateResponse, RunsReviewsUpdateResponses, RunsScoresListData, RunsScoresListError, RunsScoresListErrors, RunsScoresListResponse, RunsScoresListResponses, RunsStartData, RunsStartError, RunsStartErrors, RunsStartResponse, RunsStartResponses, RunsStepsListData, RunsStepsListError, RunsStepsListErrors, RunsStepsListResponse, RunsStepsListResponses, RunStartBody, RunStartMultipartRequest, RunStepsResponse, RunsTraceGetData, RunsTraceGetError, RunsTraceGetErrors, RunsTraceGetResponse, RunsTraceGetResponses, RunsUsageGetData, RunsUsageGetError, RunsUsageGetErrors, RunsUsageGetResponse, RunsUsageGetResponses, RunTiming, RunTraceEvent, RunTraceResponse, RunTrigger, RunUsage, RunUsageResponse, Template, TemplateFileReferenceRequest, TemplateReplaceRequest, TemplateRevision, TemplatesContentGetData, TemplatesContentGetError, TemplatesContentGetErrors, TemplatesContentGetResponse, TemplatesContentGetResponses, TemplatesCreateData, TemplatesCreateError, TemplatesCreateErrors, TemplatesCreateResponse, TemplatesCreateResponses, TemplatesDeleteData, TemplatesDeleteError, TemplatesDeleteErrors, TemplatesDeleteResponse, TemplatesDeleteResponses, TemplatesGetData, TemplatesGetError, TemplatesGetErrors, TemplatesGetResponse, TemplatesGetResponses, TemplatesListData, TemplatesListError, TemplatesListErrors, TemplatesListResponse, TemplatesListResponses, TemplatesReplaceData, TemplatesReplaceError, TemplatesReplaceErrors, TemplatesReplaceResponse, TemplatesReplaceResponses, TemplatesStagingData, TemplatesStagingError, TemplatesStagingErrors, TemplatesStagingResponse, TemplatesStagingResponses, TemplateStagingRequest, TemplateStagingResponse, WorkflowRunExecution } from './types.gen';
@@ -2,7 +2,7 @@
2
2
 
3
3
  import { type Client, formDataBodySerializer, type Options as Options2, type TDataShape } from './client';
4
4
  import { client } from './client.gen';
5
- import type { AuthCheckData, AuthCheckErrors, AuthCheckResponses, AutomationsDatasetExportData, AutomationsDatasetExportErrors, AutomationsDatasetExportResponses, AutomationsDatasetImportData, AutomationsDatasetImportErrors, AutomationsDatasetImportResponses, 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, AutomationsVersionsCreateData, AutomationsVersionsCreateErrors, AutomationsVersionsCreateResponses, AutomationsVersionsListData, AutomationsVersionsListErrors, AutomationsVersionsListResponses, AutomationsVersionsPromoteData, AutomationsVersionsPromoteErrors, AutomationsVersionsPromoteResponses, AutomationsVersionsRestoreData, AutomationsVersionsRestoreErrors, AutomationsVersionsRestoreResponses, ExperimentsResolveData, ExperimentsResolveErrors, ExperimentsResolveResponses, FilesContentGetData, FilesContentGetErrors, FilesContentGetResponses, FilesCreateData, FilesCreateErrors, FilesCreateResponses, FilesDeleteData, FilesDeleteErrors, FilesDeleteResponses, FilesGetData, FilesGetErrors, FilesGetResponses, FilesUploadsAbortData, FilesUploadsAbortErrors, FilesUploadsAbortResponses, FilesUploadsCompleteData, FilesUploadsCompleteErrors, FilesUploadsCompleteResponses, FilesUploadsCreateData, FilesUploadsCreateErrors, FilesUploadsCreateResponses, 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, RunsStepsListData, RunsStepsListErrors, RunsStepsListResponses, RunsTraceGetData, RunsTraceGetErrors, RunsTraceGetResponses, RunsUsageGetData, RunsUsageGetErrors, RunsUsageGetResponses } from './types.gen';
5
+ import type { AuthCheckData, AuthCheckErrors, AuthCheckResponses, AutomationsDatasetExportData, AutomationsDatasetExportErrors, AutomationsDatasetExportResponses, AutomationsDatasetImportData, AutomationsDatasetImportErrors, AutomationsDatasetImportResponses, 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, AutomationsVersionsCreateData, AutomationsVersionsCreateErrors, AutomationsVersionsCreateResponses, AutomationsVersionsListData, AutomationsVersionsListErrors, AutomationsVersionsListResponses, AutomationsVersionsPromoteData, AutomationsVersionsPromoteErrors, AutomationsVersionsPromoteResponses, AutomationsVersionsRestoreData, AutomationsVersionsRestoreErrors, AutomationsVersionsRestoreResponses, ExperimentsResolveData, ExperimentsResolveErrors, ExperimentsResolveResponses, FilesContentGetData, FilesContentGetErrors, FilesContentGetResponses, FilesCreateData, FilesCreateErrors, FilesCreateResponses, FilesDeleteData, FilesDeleteErrors, FilesDeleteResponses, FilesGetData, FilesGetErrors, FilesGetResponses, FilesUploadsAbortData, FilesUploadsAbortErrors, FilesUploadsAbortResponses, FilesUploadsCompleteData, FilesUploadsCompleteErrors, FilesUploadsCompleteResponses, FilesUploadsCreateData, FilesUploadsCreateErrors, FilesUploadsCreateResponses, ModelsListData, ModelsListErrors, ModelsListResponses, 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, 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
6
 
7
7
  export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean, TResponse = unknown> = Options2<TData, ThrowOnError, TResponse> & {
8
8
  /**
@@ -573,6 +573,17 @@ export const filesUploadsComplete = <ThrowOnError extends boolean = false>(optio
573
573
  ...options
574
574
  });
575
575
 
576
+ /**
577
+ * List configured models
578
+ *
579
+ * 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.
580
+ */
581
+ export const modelsList = <ThrowOnError extends boolean = false>(options?: Options<ModelsListData, ThrowOnError>) => (options?.client ?? client).get<ModelsListResponses, ModelsListErrors, ThrowOnError>({
582
+ security: [{ scheme: 'bearer', type: 'http' }],
583
+ url: '/v1/models',
584
+ ...options
585
+ });
586
+
576
587
  /**
577
588
  * List runs
578
589
  *
@@ -828,3 +839,92 @@ export const runsUsageGet = <ThrowOnError extends boolean = false>(options: Opti
828
839
  url: '/v1/runs/{id}/usage',
829
840
  ...options
830
841
  });
842
+
843
+ /**
844
+ * List templates
845
+ *
846
+ * List tenant-scoped DOCX and XLSX template resources.
847
+ */
848
+ export const templatesList = <ThrowOnError extends boolean = false>(options?: Options<TemplatesListData, ThrowOnError>) => (options?.client ?? client).get<TemplatesListResponses, TemplatesListErrors, ThrowOnError>({
849
+ security: [{ scheme: 'bearer', type: 'http' }],
850
+ url: '/v1/templates',
851
+ ...options
852
+ });
853
+
854
+ /**
855
+ * Upload template
856
+ *
857
+ * 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.
858
+ */
859
+ export const templatesCreate = <ThrowOnError extends boolean = false>(options: Options<TemplatesCreateData, ThrowOnError>) => (options.client ?? client).post<TemplatesCreateResponses, TemplatesCreateErrors, ThrowOnError>({
860
+ security: [{ scheme: 'bearer', type: 'http' }],
861
+ url: '/v1/templates',
862
+ ...options,
863
+ headers: {
864
+ 'Content-Type': 'application/json',
865
+ ...options.headers
866
+ }
867
+ });
868
+
869
+ /**
870
+ * Delete template
871
+ *
872
+ * 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.
873
+ */
874
+ export const templatesDelete = <ThrowOnError extends boolean = false>(options: Options<TemplatesDeleteData, ThrowOnError>) => (options.client ?? client).delete<TemplatesDeleteResponses, TemplatesDeleteErrors, ThrowOnError>({
875
+ security: [{ scheme: 'bearer', type: 'http' }],
876
+ url: '/v1/templates/{id}',
877
+ ...options
878
+ });
879
+
880
+ /**
881
+ * Inspect template
882
+ *
883
+ * Get template metadata, checksum, discovered tokens, grammar capabilities, and current immutable revision. Storage keys are never exposed.
884
+ */
885
+ export const templatesGet = <ThrowOnError extends boolean = false>(options: Options<TemplatesGetData, ThrowOnError>) => (options.client ?? client).get<TemplatesGetResponses, TemplatesGetErrors, ThrowOnError>({
886
+ security: [{ scheme: 'bearer', type: 'http' }],
887
+ url: '/v1/templates/{id}',
888
+ ...options
889
+ });
890
+
891
+ /**
892
+ * Create template revision
893
+ *
894
+ * 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.
895
+ */
896
+ export const templatesReplace = <ThrowOnError extends boolean = false>(options: Options<TemplatesReplaceData, ThrowOnError>) => (options.client ?? client).put<TemplatesReplaceResponses, TemplatesReplaceErrors, ThrowOnError>({
897
+ security: [{ scheme: 'bearer', type: 'http' }],
898
+ url: '/v1/templates/{id}',
899
+ ...options,
900
+ headers: {
901
+ 'Content-Type': 'application/json',
902
+ ...options.headers
903
+ }
904
+ });
905
+
906
+ /**
907
+ * Download template content
908
+ *
909
+ * 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.
910
+ */
911
+ export const templatesContentGet = <ThrowOnError extends boolean = false>(options: Options<TemplatesContentGetData, ThrowOnError>) => (options.client ?? client).get<TemplatesContentGetResponses, TemplatesContentGetErrors, ThrowOnError>({
912
+ security: [{ scheme: 'bearer', type: 'http' }],
913
+ url: '/v1/templates/{id}/content',
914
+ ...options
915
+ });
916
+
917
+ /**
918
+ * Finalize or hard-clean a staged template
919
+ *
920
+ * 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.
921
+ */
922
+ export const templatesStaging = <ThrowOnError extends boolean = false>(options: Options<TemplatesStagingData, ThrowOnError>) => (options.client ?? client).post<TemplatesStagingResponses, TemplatesStagingErrors, ThrowOnError>({
923
+ security: [{ scheme: 'bearer', type: 'http' }],
924
+ url: '/v1/templates/{id}/staging',
925
+ ...options,
926
+ headers: {
927
+ 'Content-Type': 'application/json',
928
+ ...options.headers
929
+ }
930
+ });
@@ -389,6 +389,31 @@ export type RunReviewExpectedFileUpdateRequest = {
389
389
  name: string;
390
390
  };
391
391
 
392
+ export type TemplateFileReferenceRequest = {
393
+ /**
394
+ * Reusable file id produced by the direct file upload flow. It is consumed as upload transport, not exposed as template identity.
395
+ */
396
+ fileId: string;
397
+ name?: string;
398
+ description?: string;
399
+ /**
400
+ * When true, the create response includes a one-time cleanupProof for unpublished CLI staging. Normal uploads omit this.
401
+ */
402
+ staged?: boolean;
403
+ };
404
+
405
+ export type TemplateReplaceRequest = {
406
+ /**
407
+ * Reusable file id produced by the direct file upload flow. It is consumed as upload transport, not exposed as template identity.
408
+ */
409
+ fileId: string;
410
+ };
411
+
412
+ export type TemplateStagingRequest = {
413
+ proof: string;
414
+ action: 'cleanup' | 'finalize';
415
+ };
416
+
392
417
  export type AuthCheckResponse = {
393
418
  ok: true;
394
419
  tenantId: string;
@@ -1025,6 +1050,47 @@ export type AbortFileUploadResponse = {
1025
1050
  aborted: true;
1026
1051
  };
1027
1052
 
1053
+ export type ListModelsResponse = {
1054
+ data: Array<PublicModel>;
1055
+ total: number;
1056
+ };
1057
+
1058
+ export type PublicModel = {
1059
+ id: string;
1060
+ kind: 'llm' | 'ocr';
1061
+ provider: string;
1062
+ label: string;
1063
+ capabilities: Array<'text' | 'vision' | 'ocr'>;
1064
+ configured: boolean;
1065
+ available: boolean;
1066
+ /**
1067
+ * Configuration state only: `configured` means credentials are present in this environment; `unconfigured` means the catalog entry exists but credentials are missing. This list does not probe live providers, so it never reports healthy/degraded/outage. `unknown` is reserved and is not emitted by this endpoint.
1068
+ */
1069
+ health: 'configured' | 'unconfigured' | 'unknown';
1070
+ defaultFor: Array<'text' | 'vision' | 'ocr'>;
1071
+ /**
1072
+ * `local` means on-prem / no cloud provider egress (`local: true` or tesseract). `hosted` means the provider is a cloud API. Endpoints are never returned.
1073
+ */
1074
+ location: 'local' | 'hosted';
1075
+ limits?: PublicModelLimits;
1076
+ /**
1077
+ * Static Eigenpal credit rates when known without a live vendor catalog. Omitted for OpenParser OCR and for LLMs (token prices are not part of this catalog).
1078
+ */
1079
+ cost?: PublicModelCost;
1080
+ aliases: Array<string>;
1081
+ tags: Array<string>;
1082
+ };
1083
+
1084
+ export type PublicModelLimits = {
1085
+ requestTimeoutSeconds?: number;
1086
+ maxConcurrentRequests?: number;
1087
+ };
1088
+
1089
+ export type PublicModelCost = {
1090
+ creditsPerPage?: number;
1091
+ unit: 'credits';
1092
+ };
1093
+
1028
1094
  export type RunsListResponse = {
1029
1095
  runs: Array<RunListItem>;
1030
1096
  nextCursor: string | null;
@@ -1591,6 +1657,94 @@ export type RunUsageResponse = {
1591
1657
  usage: RunUsage | null;
1592
1658
  };
1593
1659
 
1660
+ export type ListTemplatesResponse = {
1661
+ items: Array<Template>;
1662
+ total: number;
1663
+ };
1664
+
1665
+ export type Template = {
1666
+ /**
1667
+ * Stable logical template id (tmpl_…).
1668
+ */
1669
+ id: string;
1670
+ name: string;
1671
+ description?: string | null;
1672
+ filename: string;
1673
+ format: 'docx' | 'xlsx';
1674
+ mimeType: string;
1675
+ size?: number | null;
1676
+ sha256?: string | null;
1677
+ tokens: Array<{
1678
+ name: string;
1679
+ path?: Array<string>;
1680
+ kind?: 'variable' | 'loop';
1681
+ type?: 'string' | 'number' | 'date' | 'boolean' | 'array' | 'object';
1682
+ required?: boolean;
1683
+ description?: string;
1684
+ }>;
1685
+ grammar: {
1686
+ syntax: string;
1687
+ tokenDiscovery: boolean;
1688
+ capabilities: Array<string>;
1689
+ };
1690
+ currentRevision?: TemplateRevision | null;
1691
+ createdAt: string;
1692
+ updatedAt?: string | null;
1693
+ };
1694
+
1695
+ export type TemplateRevision = {
1696
+ /**
1697
+ * Immutable template revision id (tmpr_…).
1698
+ */
1699
+ id: string;
1700
+ number: number;
1701
+ sha256: string;
1702
+ createdAt: string;
1703
+ };
1704
+
1705
+ export type CreatedTemplate = {
1706
+ /**
1707
+ * Stable logical template id (tmpl_…).
1708
+ */
1709
+ id: string;
1710
+ name: string;
1711
+ description?: string | null;
1712
+ filename: string;
1713
+ format: 'docx' | 'xlsx';
1714
+ mimeType: string;
1715
+ size?: number | null;
1716
+ sha256?: string | null;
1717
+ tokens: Array<{
1718
+ name: string;
1719
+ path?: Array<string>;
1720
+ kind?: 'variable' | 'loop';
1721
+ type?: 'string' | 'number' | 'date' | 'boolean' | 'array' | 'object';
1722
+ required?: boolean;
1723
+ description?: string;
1724
+ }>;
1725
+ grammar: {
1726
+ syntax: string;
1727
+ tokenDiscovery: boolean;
1728
+ capabilities: Array<string>;
1729
+ };
1730
+ currentRevision?: TemplateRevision | null;
1731
+ createdAt: string;
1732
+ updatedAt?: string | null;
1733
+ /**
1734
+ * One-time proof to finalize or hard-clean this unpublished staged template. Returned only on staged create, never on GET or list.
1735
+ */
1736
+ cleanupProof?: string;
1737
+ };
1738
+
1739
+ export type DeleteTemplateResponse = {
1740
+ deleted: boolean;
1741
+ };
1742
+
1743
+ export type TemplateStagingResponse = {
1744
+ cleaned?: boolean;
1745
+ finalized?: boolean;
1746
+ };
1747
+
1594
1748
  export type AuthCheckData = {
1595
1749
  body?: never;
1596
1750
  path?: never;
@@ -4236,6 +4390,60 @@ export type FilesUploadsCompleteResponses = {
4236
4390
 
4237
4391
  export type FilesUploadsCompleteResponse = FilesUploadsCompleteResponses[keyof FilesUploadsCompleteResponses];
4238
4392
 
4393
+ export type ModelsListData = {
4394
+ body?: never;
4395
+ path?: never;
4396
+ query?: {
4397
+ /**
4398
+ * Return only models that support this capability (`text`, `vision`, or `ocr`).
4399
+ */
4400
+ capability?: 'text' | 'vision' | 'ocr';
4401
+ };
4402
+ url: '/v1/models';
4403
+ };
4404
+
4405
+ export type ModelsListErrors = {
4406
+ /**
4407
+ * Validation error. Request shape did not match the spec.
4408
+ */
4409
+ 400: ApiErrorEnvelope;
4410
+ /**
4411
+ * Missing or invalid API key
4412
+ */
4413
+ 401: ApiErrorEnvelope;
4414
+ /**
4415
+ * API key lacks required scope
4416
+ */
4417
+ 403: ApiErrorEnvelope;
4418
+ /**
4419
+ * Resource not found
4420
+ */
4421
+ 404: ApiErrorEnvelope;
4422
+ /**
4423
+ * Payload too large. Upload exceeded the per-request size cap.
4424
+ */
4425
+ 413: ApiErrorEnvelope;
4426
+ /**
4427
+ * Rate limit exceeded
4428
+ */
4429
+ 429: ApiErrorEnvelope;
4430
+ /**
4431
+ * Internal server error
4432
+ */
4433
+ 500: ApiErrorEnvelope;
4434
+ };
4435
+
4436
+ export type ModelsListError = ModelsListErrors[keyof ModelsListErrors];
4437
+
4438
+ export type ModelsListResponses = {
4439
+ /**
4440
+ * Configured models
4441
+ */
4442
+ 200: ListModelsResponse;
4443
+ };
4444
+
4445
+ export type ModelsListResponse = ModelsListResponses[keyof ModelsListResponses];
4446
+
4239
4447
  export type RunsListData = {
4240
4448
  body?: never;
4241
4449
  path?: never;
@@ -5456,3 +5664,391 @@ export type RunsUsageGetResponses = {
5456
5664
  };
5457
5665
 
5458
5666
  export type RunsUsageGetResponse = RunsUsageGetResponses[keyof RunsUsageGetResponses];
5667
+
5668
+ export type TemplatesListData = {
5669
+ body?: never;
5670
+ path?: never;
5671
+ query?: {
5672
+ limit?: number;
5673
+ offset?: number;
5674
+ };
5675
+ url: '/v1/templates';
5676
+ };
5677
+
5678
+ export type TemplatesListErrors = {
5679
+ /**
5680
+ * Validation error. Request shape did not match the spec.
5681
+ */
5682
+ 400: ApiErrorEnvelope;
5683
+ /**
5684
+ * Missing or invalid API key
5685
+ */
5686
+ 401: ApiErrorEnvelope;
5687
+ /**
5688
+ * API key lacks required scope
5689
+ */
5690
+ 403: ApiErrorEnvelope;
5691
+ /**
5692
+ * Resource not found
5693
+ */
5694
+ 404: ApiErrorEnvelope;
5695
+ /**
5696
+ * Payload too large. Upload exceeded the per-request size cap.
5697
+ */
5698
+ 413: ApiErrorEnvelope;
5699
+ /**
5700
+ * Rate limit exceeded
5701
+ */
5702
+ 429: ApiErrorEnvelope;
5703
+ /**
5704
+ * Internal server error
5705
+ */
5706
+ 500: ApiErrorEnvelope;
5707
+ };
5708
+
5709
+ export type TemplatesListError = TemplatesListErrors[keyof TemplatesListErrors];
5710
+
5711
+ export type TemplatesListResponses = {
5712
+ /**
5713
+ * Template resources
5714
+ */
5715
+ 200: ListTemplatesResponse;
5716
+ };
5717
+
5718
+ export type TemplatesListResponse = TemplatesListResponses[keyof TemplatesListResponses];
5719
+
5720
+ export type TemplatesCreateData = {
5721
+ body: TemplateFileReferenceRequest;
5722
+ path?: never;
5723
+ query?: never;
5724
+ url: '/v1/templates';
5725
+ };
5726
+
5727
+ export type TemplatesCreateErrors = {
5728
+ /**
5729
+ * Validation error. Request shape did not match the spec.
5730
+ */
5731
+ 400: ApiErrorEnvelope;
5732
+ /**
5733
+ * Missing or invalid API key
5734
+ */
5735
+ 401: ApiErrorEnvelope;
5736
+ /**
5737
+ * API key lacks required scope
5738
+ */
5739
+ 403: ApiErrorEnvelope;
5740
+ /**
5741
+ * Resource not found
5742
+ */
5743
+ 404: ApiErrorEnvelope;
5744
+ /**
5745
+ * Payload too large. Upload exceeded the per-request size cap.
5746
+ */
5747
+ 413: ApiErrorEnvelope;
5748
+ /**
5749
+ * Validation error. Request shape did not match the spec.
5750
+ */
5751
+ 422: ApiErrorEnvelope;
5752
+ /**
5753
+ * Rate limit exceeded
5754
+ */
5755
+ 429: ApiErrorEnvelope;
5756
+ /**
5757
+ * Internal server error
5758
+ */
5759
+ 500: ApiErrorEnvelope;
5760
+ };
5761
+
5762
+ export type TemplatesCreateError = TemplatesCreateErrors[keyof TemplatesCreateErrors];
5763
+
5764
+ export type TemplatesCreateResponses = {
5765
+ /**
5766
+ * Created template
5767
+ */
5768
+ 201: CreatedTemplate;
5769
+ };
5770
+
5771
+ export type TemplatesCreateResponse = TemplatesCreateResponses[keyof TemplatesCreateResponses];
5772
+
5773
+ export type TemplatesDeleteData = {
5774
+ body?: never;
5775
+ path: {
5776
+ /**
5777
+ * Logical template id (tmpl_…).
5778
+ */
5779
+ id: string;
5780
+ };
5781
+ query?: never;
5782
+ url: '/v1/templates/{id}';
5783
+ };
5784
+
5785
+ export type TemplatesDeleteErrors = {
5786
+ /**
5787
+ * Validation error. Request shape did not match the spec.
5788
+ */
5789
+ 400: ApiErrorEnvelope;
5790
+ /**
5791
+ * Missing or invalid API key
5792
+ */
5793
+ 401: ApiErrorEnvelope;
5794
+ /**
5795
+ * API key lacks required scope
5796
+ */
5797
+ 403: ApiErrorEnvelope;
5798
+ /**
5799
+ * Resource not found
5800
+ */
5801
+ 404: ApiErrorEnvelope;
5802
+ /**
5803
+ * Payload too large. Upload exceeded the per-request size cap.
5804
+ */
5805
+ 413: ApiErrorEnvelope;
5806
+ /**
5807
+ * Rate limit exceeded
5808
+ */
5809
+ 429: ApiErrorEnvelope;
5810
+ /**
5811
+ * Internal server error
5812
+ */
5813
+ 500: ApiErrorEnvelope;
5814
+ };
5815
+
5816
+ export type TemplatesDeleteError = TemplatesDeleteErrors[keyof TemplatesDeleteErrors];
5817
+
5818
+ export type TemplatesDeleteResponses = {
5819
+ /**
5820
+ * Template deleted
5821
+ */
5822
+ 200: DeleteTemplateResponse;
5823
+ };
5824
+
5825
+ export type TemplatesDeleteResponse = TemplatesDeleteResponses[keyof TemplatesDeleteResponses];
5826
+
5827
+ export type TemplatesGetData = {
5828
+ body?: never;
5829
+ path: {
5830
+ /**
5831
+ * Logical template id (tmpl_…).
5832
+ */
5833
+ id: string;
5834
+ };
5835
+ query?: never;
5836
+ url: '/v1/templates/{id}';
5837
+ };
5838
+
5839
+ export type TemplatesGetErrors = {
5840
+ /**
5841
+ * Validation error. Request shape did not match the spec.
5842
+ */
5843
+ 400: ApiErrorEnvelope;
5844
+ /**
5845
+ * Missing or invalid API key
5846
+ */
5847
+ 401: ApiErrorEnvelope;
5848
+ /**
5849
+ * API key lacks required scope
5850
+ */
5851
+ 403: ApiErrorEnvelope;
5852
+ /**
5853
+ * Resource not found
5854
+ */
5855
+ 404: ApiErrorEnvelope;
5856
+ /**
5857
+ * Payload too large. Upload exceeded the per-request size cap.
5858
+ */
5859
+ 413: ApiErrorEnvelope;
5860
+ /**
5861
+ * Rate limit exceeded
5862
+ */
5863
+ 429: ApiErrorEnvelope;
5864
+ /**
5865
+ * Internal server error
5866
+ */
5867
+ 500: ApiErrorEnvelope;
5868
+ };
5869
+
5870
+ export type TemplatesGetError = TemplatesGetErrors[keyof TemplatesGetErrors];
5871
+
5872
+ export type TemplatesGetResponses = {
5873
+ /**
5874
+ * Template inspection
5875
+ */
5876
+ 200: Template;
5877
+ };
5878
+
5879
+ export type TemplatesGetResponse = TemplatesGetResponses[keyof TemplatesGetResponses];
5880
+
5881
+ export type TemplatesReplaceData = {
5882
+ body: TemplateReplaceRequest;
5883
+ path: {
5884
+ /**
5885
+ * Logical template id (tmpl_…).
5886
+ */
5887
+ id: string;
5888
+ };
5889
+ query?: never;
5890
+ url: '/v1/templates/{id}';
5891
+ };
5892
+
5893
+ export type TemplatesReplaceErrors = {
5894
+ /**
5895
+ * Validation error. Request shape did not match the spec.
5896
+ */
5897
+ 400: ApiErrorEnvelope;
5898
+ /**
5899
+ * Missing or invalid API key
5900
+ */
5901
+ 401: ApiErrorEnvelope;
5902
+ /**
5903
+ * API key lacks required scope
5904
+ */
5905
+ 403: ApiErrorEnvelope;
5906
+ /**
5907
+ * Resource not found
5908
+ */
5909
+ 404: ApiErrorEnvelope;
5910
+ /**
5911
+ * Payload too large. Upload exceeded the per-request size cap.
5912
+ */
5913
+ 413: ApiErrorEnvelope;
5914
+ /**
5915
+ * Validation error. Request shape did not match the spec.
5916
+ */
5917
+ 422: ApiErrorEnvelope;
5918
+ /**
5919
+ * Rate limit exceeded
5920
+ */
5921
+ 429: ApiErrorEnvelope;
5922
+ /**
5923
+ * Internal server error
5924
+ */
5925
+ 500: ApiErrorEnvelope;
5926
+ };
5927
+
5928
+ export type TemplatesReplaceError = TemplatesReplaceErrors[keyof TemplatesReplaceErrors];
5929
+
5930
+ export type TemplatesReplaceResponses = {
5931
+ /**
5932
+ * Updated template
5933
+ */
5934
+ 200: Template;
5935
+ };
5936
+
5937
+ export type TemplatesReplaceResponse = TemplatesReplaceResponses[keyof TemplatesReplaceResponses];
5938
+
5939
+ export type TemplatesContentGetData = {
5940
+ body?: never;
5941
+ path: {
5942
+ /**
5943
+ * Logical template id (tmpl_…).
5944
+ */
5945
+ id: string;
5946
+ };
5947
+ query?: {
5948
+ /**
5949
+ * Immutable revision id (tmpr_…). Omit for the current content.
5950
+ */
5951
+ revisionId?: string;
5952
+ };
5953
+ url: '/v1/templates/{id}/content';
5954
+ };
5955
+
5956
+ export type TemplatesContentGetErrors = {
5957
+ /**
5958
+ * Validation error. Request shape did not match the spec.
5959
+ */
5960
+ 400: ApiErrorEnvelope;
5961
+ /**
5962
+ * Missing or invalid API key
5963
+ */
5964
+ 401: ApiErrorEnvelope;
5965
+ /**
5966
+ * API key lacks required scope
5967
+ */
5968
+ 403: ApiErrorEnvelope;
5969
+ /**
5970
+ * Resource not found
5971
+ */
5972
+ 404: ApiErrorEnvelope;
5973
+ /**
5974
+ * Payload too large. Upload exceeded the per-request size cap.
5975
+ */
5976
+ 413: ApiErrorEnvelope;
5977
+ /**
5978
+ * Rate limit exceeded
5979
+ */
5980
+ 429: ApiErrorEnvelope;
5981
+ /**
5982
+ * Internal server error
5983
+ */
5984
+ 500: ApiErrorEnvelope;
5985
+ };
5986
+
5987
+ export type TemplatesContentGetError = TemplatesContentGetErrors[keyof TemplatesContentGetErrors];
5988
+
5989
+ export type TemplatesContentGetResponses = {
5990
+ /**
5991
+ * Template file bytes (DOCX or XLSX).
5992
+ */
5993
+ 200: Blob | File;
5994
+ };
5995
+
5996
+ export type TemplatesContentGetResponse = TemplatesContentGetResponses[keyof TemplatesContentGetResponses];
5997
+
5998
+ export type TemplatesStagingData = {
5999
+ body: TemplateStagingRequest;
6000
+ path: {
6001
+ /**
6002
+ * Logical template id (tmpl_…).
6003
+ */
6004
+ id: string;
6005
+ };
6006
+ query?: never;
6007
+ url: '/v1/templates/{id}/staging';
6008
+ };
6009
+
6010
+ export type TemplatesStagingErrors = {
6011
+ /**
6012
+ * Validation error. Request shape did not match the spec.
6013
+ */
6014
+ 400: ApiErrorEnvelope;
6015
+ /**
6016
+ * Missing or invalid API key
6017
+ */
6018
+ 401: ApiErrorEnvelope;
6019
+ /**
6020
+ * API key lacks required scope
6021
+ */
6022
+ 403: ApiErrorEnvelope;
6023
+ /**
6024
+ * Resource not found
6025
+ */
6026
+ 404: ApiErrorEnvelope;
6027
+ /**
6028
+ * Conflict. The resource is in a state that forbids the request.
6029
+ */
6030
+ 409: ApiErrorEnvelope;
6031
+ /**
6032
+ * Payload too large. Upload exceeded the per-request size cap.
6033
+ */
6034
+ 413: ApiErrorEnvelope;
6035
+ /**
6036
+ * Rate limit exceeded
6037
+ */
6038
+ 429: ApiErrorEnvelope;
6039
+ /**
6040
+ * Internal server error
6041
+ */
6042
+ 500: ApiErrorEnvelope;
6043
+ };
6044
+
6045
+ export type TemplatesStagingError = TemplatesStagingErrors[keyof TemplatesStagingErrors];
6046
+
6047
+ export type TemplatesStagingResponses = {
6048
+ /**
6049
+ * Staging action applied
6050
+ */
6051
+ 200: TemplateStagingResponse;
6052
+ };
6053
+
6054
+ export type TemplatesStagingResponse = TemplatesStagingResponses[keyof TemplatesStagingResponses];
package/src/index.ts CHANGED
@@ -57,6 +57,10 @@ export type {
57
57
  CreateAutomationVersionRequest,
58
58
  ExecutionStatus,
59
59
  File,
60
+ ListModelsResponse,
61
+ PublicModel,
62
+ PublicModelCost,
63
+ PublicModelLimits,
60
64
  RestoreAutomationVersionRequest,
61
65
  Run,
62
66
  RunAccepted,
@@ -81,4 +85,6 @@ export type {
81
85
  RunsReviewsGetResponse,
82
86
  RunsReviewsUpdateResponse,
83
87
  RunsTraceGetResponse,
88
+ Template,
89
+ TemplateRevision,
84
90
  } from './generated/types.gen';
@@ -32,6 +32,12 @@ type UploadOptions = SignalOptions & {
32
32
  onProgress?: (uploadedBytes: number, totalBytes: number) => void;
33
33
  };
34
34
 
35
+ const UPLOAD_ABORT_CLEANUP_TIMEOUT_MS = 10_000;
36
+
37
+ function uploadAbortCleanupSignal(): AbortSignal {
38
+ return AbortSignal.timeout(UPLOAD_ABORT_CLEANUP_TIMEOUT_MS);
39
+ }
40
+
35
41
  export type CreateUploadInput = {
36
42
  filename: string;
37
43
  contentType: string;
@@ -72,22 +78,30 @@ export class FilesResource {
72
78
  );
73
79
 
74
80
  if (negotiation.transport === 'presigned-put') {
75
- const response = await fetch(negotiation.url, {
76
- method: 'PUT',
77
- headers: Object.fromEntries(
78
- Object.entries((negotiation.headers ?? {}) as Record<string, string>).filter(
79
- ([name]) => name.toLowerCase() !== 'content-length'
80
- )
81
- ),
82
- body: file,
83
- signal: options.signal,
84
- });
85
- if (!response.ok) {
86
- await this.abortUpload(negotiation.uploadId).catch(() => undefined);
87
- throw new Error(`Storage upload failed (${response.status}); retry the upload`);
81
+ try {
82
+ const response = await fetch(negotiation.url, {
83
+ method: 'PUT',
84
+ headers: Object.fromEntries(
85
+ Object.entries((negotiation.headers ?? {}) as Record<string, string>).filter(
86
+ ([name]) => name.toLowerCase() !== 'content-length'
87
+ )
88
+ ),
89
+ body: file,
90
+ signal: options.signal,
91
+ });
92
+ if (!response.ok) {
93
+ throw new Error(`Storage upload failed (${response.status}); retry the upload`);
94
+ }
95
+ options.onProgress?.(file.size, file.size);
96
+ return await this.completeUpload(negotiation.uploadId, options);
97
+ } catch (error) {
98
+ // Caller cancellation and response-loss also reach here. Cleanup must
99
+ // not inherit the failed/aborted signal, and must remain bounded.
100
+ await this.abortUpload(negotiation.uploadId, {
101
+ signal: uploadAbortCleanupSignal(),
102
+ }).catch(() => undefined);
103
+ throw error;
88
104
  }
89
- options.onProgress?.(file.size, file.size);
90
- return this.completeUpload(negotiation.uploadId, options);
91
105
  }
92
106
 
93
107
  const form = new FormData();
@@ -0,0 +1,30 @@
1
+ import type { OperationResult } from '../client';
2
+ import type { Client } from '../generated/client';
3
+ import { modelsList } from '../generated/sdk.gen';
4
+ import type { ListModelsResponse } from '../generated/types.gen';
5
+
6
+ type Dispatch = <T>(call: () => Promise<OperationResult<T>>) => Promise<T>;
7
+ type SignalOptions = { signal?: AbortSignal };
8
+
9
+ export class ModelsResource {
10
+ constructor(
11
+ private readonly client: Client,
12
+ private readonly dispatch: Dispatch
13
+ ) {}
14
+
15
+ /**
16
+ * List text, vision, and OCR models configured for this tenant environment.
17
+ * Catalog inventory only — not a live provider health probe.
18
+ */
19
+ async list(
20
+ options: SignalOptions & { capability?: 'text' | 'vision' | 'ocr' } = {}
21
+ ): Promise<ListModelsResponse> {
22
+ return this.dispatch(() =>
23
+ modelsList({
24
+ client: this.client,
25
+ query: { capability: options.capability },
26
+ signal: options.signal,
27
+ })
28
+ );
29
+ }
30
+ }
@@ -0,0 +1,153 @@
1
+ import type { OperationResult, RequestDispatchOptions } from '../client';
2
+ import type { Client } from '../generated/client';
3
+ import {
4
+ templatesContentGet,
5
+ templatesDelete,
6
+ templatesGet,
7
+ templatesList,
8
+ } from '../generated/sdk.gen';
9
+ import type { ListTemplatesResponse, Template } from '../generated/types.gen';
10
+ import type { FilesResource } from './files';
11
+
12
+ type Dispatch = <T>(
13
+ call: () => Promise<OperationResult<T>>,
14
+ options?: RequestDispatchOptions
15
+ ) => Promise<T>;
16
+ type SignalOptions = { signal?: AbortSignal };
17
+ type UploadOptions = SignalOptions & {
18
+ /** Required only when `file` is a nameless Blob. */
19
+ filename?: string;
20
+ name?: string;
21
+ description?: string;
22
+ };
23
+ type FileIdOptions = SignalOptions & {
24
+ name?: string;
25
+ description?: string;
26
+ };
27
+
28
+ const TEMPORARY_UPLOAD_CLEANUP_TIMEOUT_MS = 10_000;
29
+
30
+ function temporaryUploadCleanupSignal(): AbortSignal {
31
+ return AbortSignal.timeout(TEMPORARY_UPLOAD_CLEANUP_TIMEOUT_MS);
32
+ }
33
+
34
+ function filenameFor(file: Blob | File, filename?: string): string {
35
+ const resolved =
36
+ filename ?? (typeof File !== 'undefined' && file instanceof File ? file.name : undefined);
37
+ if (!resolved) throw new Error('filename is required when uploading a Blob');
38
+ return resolved;
39
+ }
40
+
41
+ export class TemplatesResource {
42
+ constructor(
43
+ private readonly client: Client,
44
+ private readonly dispatch: Dispatch,
45
+ private readonly files: FilesResource
46
+ ) {}
47
+
48
+ async list(
49
+ options: SignalOptions & { limit?: number; offset?: number } = {}
50
+ ): Promise<ListTemplatesResponse> {
51
+ return this.dispatch(() =>
52
+ templatesList({
53
+ client: this.client,
54
+ query: { limit: options.limit, offset: options.offset },
55
+ signal: options.signal,
56
+ })
57
+ );
58
+ }
59
+
60
+ async get(templateId: string, options: SignalOptions = {}): Promise<Template> {
61
+ return this.dispatch(() =>
62
+ templatesGet({ client: this.client, path: { id: templateId }, signal: options.signal })
63
+ );
64
+ }
65
+
66
+ async create(file: Blob | File, options: UploadOptions = {}): Promise<Template> {
67
+ const uploaded = await this.files.upload(file, {
68
+ filename: filenameFor(file, options.filename),
69
+ signal: options.signal,
70
+ });
71
+ try {
72
+ return await this.createFromFileId(uploaded.id, options);
73
+ } finally {
74
+ await this.files
75
+ .delete(uploaded.id, { signal: temporaryUploadCleanupSignal() })
76
+ .catch(() => undefined);
77
+ }
78
+ }
79
+
80
+ /** Create a template from an existing reusable `file_…` resource. */
81
+ async createFromFileId(fileId: string, options: FileIdOptions = {}): Promise<Template> {
82
+ return this.dispatch(
83
+ () =>
84
+ this.client.post({
85
+ url: '/v1/templates',
86
+ body: {
87
+ fileId,
88
+ name: options.name,
89
+ description: options.description,
90
+ },
91
+ signal: options.signal,
92
+ }) as Promise<OperationResult<Template>>
93
+ );
94
+ }
95
+
96
+ async replace(
97
+ templateId: string,
98
+ file: Blob | File,
99
+ options: Pick<UploadOptions, 'filename' | 'signal'> = {}
100
+ ): Promise<Template> {
101
+ const uploaded = await this.files.upload(file, {
102
+ filename: filenameFor(file, options.filename),
103
+ signal: options.signal,
104
+ });
105
+ try {
106
+ return await this.replaceFromFileId(templateId, uploaded.id, options);
107
+ } finally {
108
+ await this.files
109
+ .delete(uploaded.id, { signal: temporaryUploadCleanupSignal() })
110
+ .catch(() => undefined);
111
+ }
112
+ }
113
+
114
+ /** Append a revision from an existing reusable `file_…` resource. */
115
+ async replaceFromFileId(
116
+ templateId: string,
117
+ fileId: string,
118
+ options: SignalOptions = {}
119
+ ): Promise<Template> {
120
+ return this.dispatch(
121
+ () =>
122
+ this.client.put({
123
+ url: '/v1/templates/{id}',
124
+ path: { id: templateId },
125
+ body: { fileId },
126
+ signal: options.signal,
127
+ }) as Promise<OperationResult<Template>>
128
+ );
129
+ }
130
+
131
+ async download(
132
+ templateId: string,
133
+ options: SignalOptions & { revisionId?: string } = {}
134
+ ): Promise<Blob> {
135
+ return this.dispatch(
136
+ async () =>
137
+ (await templatesContentGet({
138
+ client: this.client,
139
+ path: { id: templateId },
140
+ query: { revisionId: options.revisionId },
141
+ parseAs: 'blob',
142
+ signal: options.signal,
143
+ })) as OperationResult<Blob>,
144
+ { responseKind: 'binary' }
145
+ );
146
+ }
147
+
148
+ async delete(templateId: string, options: SignalOptions = {}): Promise<{ deleted: boolean }> {
149
+ return this.dispatch(() =>
150
+ templatesDelete({ client: this.client, path: { id: templateId }, signal: options.signal })
151
+ );
152
+ }
153
+ }
package/src/telemetry.ts CHANGED
@@ -19,7 +19,7 @@
19
19
  export const SDK_LANGUAGE = 'typescript';
20
20
  // Rewritten at publish time by scripts/release/platform/render-sdk-versions.sh.
21
21
  // Keep this string literal exactly stable — sed matches on it.
22
- export const SDK_VERSION = '0.13.0';
22
+ export const SDK_VERSION = '0.13.2';
23
23
 
24
24
  function detectRuntime(): string {
25
25
  const g = globalThis as unknown as {