extend-ai 1.7.0 → 1.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/BaseClient.js +2 -2
- package/Client.d.ts +3 -0
- package/Client.js +53 -48
- package/api/resources/batchRuns/client/Client.d.ts +49 -0
- package/api/resources/batchRuns/client/Client.js +142 -0
- package/api/resources/batchRuns/client/index.d.ts +1 -0
- package/api/resources/batchRuns/client/index.js +2 -0
- package/api/resources/batchRuns/index.d.ts +1 -0
- package/api/resources/batchRuns/index.js +17 -0
- package/api/resources/classifierVersions/client/Client.d.ts +6 -3
- package/api/resources/classifierVersions/client/Client.js +6 -3
- package/api/resources/classifyRuns/client/Client.d.ts +57 -0
- package/api/resources/classifyRuns/client/Client.js +111 -1
- package/api/resources/classifyRuns/client/requests/ClassifyRunsCreateBatchRequest.d.ts +38 -0
- package/api/resources/classifyRuns/client/requests/ClassifyRunsListRequest.d.ts +6 -0
- package/api/resources/classifyRuns/client/requests/index.d.ts +1 -0
- package/api/resources/classifyRuns/types/ClassifyRunsCreateBatchRequestClassifier.d.ts +11 -0
- package/api/resources/classifyRuns/types/ClassifyRunsCreateBatchRequestInputsItem.d.ts +6 -0
- package/api/resources/classifyRuns/types/ClassifyRunsCreateBatchRequestInputsItemFile.d.ts +5 -0
- package/api/resources/classifyRuns/types/index.d.ts +3 -0
- package/api/resources/classifyRuns/types/index.js +3 -0
- package/api/resources/extractRuns/client/Client.d.ts +57 -0
- package/api/resources/extractRuns/client/Client.js +111 -1
- package/api/resources/extractRuns/client/requests/ExtractRunsCreateBatchRequest.d.ts +38 -0
- package/api/resources/extractRuns/client/requests/ExtractRunsListRequest.d.ts +6 -0
- package/api/resources/extractRuns/client/requests/index.d.ts +1 -0
- package/api/resources/extractRuns/types/ExtractRunsCreateBatchRequestExtractor.d.ts +11 -0
- package/api/resources/extractRuns/types/ExtractRunsCreateBatchRequestInputsItem.d.ts +6 -0
- package/api/resources/extractRuns/types/ExtractRunsCreateBatchRequestInputsItem.js +3 -0
- package/api/resources/extractRuns/types/ExtractRunsCreateBatchRequestInputsItemFile.d.ts +5 -0
- package/api/resources/extractRuns/types/ExtractRunsCreateBatchRequestInputsItemFile.js +3 -0
- package/api/resources/extractRuns/types/index.d.ts +3 -0
- package/api/resources/extractRuns/types/index.js +3 -0
- package/api/resources/extractorVersions/client/Client.d.ts +6 -3
- package/api/resources/extractorVersions/client/Client.js +6 -3
- package/api/resources/index.d.ts +1 -0
- package/api/resources/index.js +2 -1
- package/api/resources/splitRuns/client/Client.d.ts +58 -0
- package/api/resources/splitRuns/client/Client.js +112 -1
- package/api/resources/splitRuns/client/requests/SplitRunsCreateBatchRequest.d.ts +38 -0
- package/api/resources/splitRuns/client/requests/SplitRunsCreateBatchRequest.js +3 -0
- package/api/resources/splitRuns/client/requests/SplitRunsListRequest.d.ts +6 -0
- package/api/resources/splitRuns/client/requests/index.d.ts +1 -0
- package/api/resources/splitRuns/types/SplitRunsCreateBatchRequestInputsItem.d.ts +6 -0
- package/api/resources/splitRuns/types/SplitRunsCreateBatchRequestInputsItem.js +3 -0
- package/api/resources/splitRuns/types/SplitRunsCreateBatchRequestInputsItemFile.d.ts +5 -0
- package/api/resources/splitRuns/types/SplitRunsCreateBatchRequestInputsItemFile.js +3 -0
- package/api/resources/splitRuns/types/SplitRunsCreateBatchRequestSplitter.d.ts +11 -0
- package/api/resources/splitRuns/types/SplitRunsCreateBatchRequestSplitter.js +3 -0
- package/api/resources/splitRuns/types/index.d.ts +3 -0
- package/api/resources/splitRuns/types/index.js +3 -0
- package/api/resources/splitterVersions/client/Client.d.ts +6 -3
- package/api/resources/splitterVersions/client/Client.js +6 -3
- package/api/resources/workflowVersions/client/Client.d.ts +6 -6
- package/api/resources/workflowVersions/client/Client.js +6 -6
- package/api/types/BatchProcessorRunCompletedWebhookEvent.d.ts +6 -0
- package/api/types/BatchProcessorRunCompletedWebhookEvent.js +3 -0
- package/api/types/BatchProcessorRunFailedWebhookEvent.d.ts +6 -0
- package/api/types/BatchProcessorRunFailedWebhookEvent.js +3 -0
- package/api/types/BatchRun.d.ts +9 -16
- package/api/types/BatchRunStatus.d.ts +7 -5
- package/api/types/BatchRunStatus.js +7 -5
- package/api/types/Block.d.ts +1 -0
- package/api/types/BlockDetails.d.ts +1 -1
- package/api/types/BlockType.d.ts +2 -0
- package/api/types/BlockType.js +2 -0
- package/api/types/FormulaDetails.d.ts +9 -0
- package/api/types/FormulaDetails.js +3 -0
- package/api/types/LegacyListProcessorsResponse.d.ts +1 -1
- package/api/types/ParseConfigAdvancedOptions.d.ts +10 -0
- package/api/types/ParseConfigAdvancedOptionsFormattingDetectionItem.d.ts +8 -0
- package/api/types/ParseConfigAdvancedOptionsFormattingDetectionItem.js +3 -0
- package/api/types/ParseConfigBlockOptions.d.ts +2 -0
- package/api/types/ParseConfigBlockOptionsFormulas.d.ts +7 -0
- package/api/types/ParseConfigBlockOptionsFormulas.js +3 -0
- package/api/types/ProcessorRunStatus.d.ts +2 -0
- package/api/types/ProcessorRunStatus.js +2 -0
- package/api/types/WebhookEndpointEventType.d.ts +2 -0
- package/api/types/WebhookEndpointEventType.js +2 -0
- package/api/types/WebhookEvent.d.ts +7 -1
- package/api/types/WebhookSubscriptionEventType.d.ts +5 -3
- package/api/types/WebhookSubscriptionEventType.js +5 -3
- package/api/types/index.d.ts +5 -8
- package/api/types/index.js +5 -8
- package/package.json +1 -1
- package/reference.md +410 -15
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/api/types/BatchProcessorRun.d.ts +0 -66
- package/api/types/BatchProcessorRunMetrics.d.ts +0 -6
- package/api/types/BatchProcessorRunOptions.d.ts +0 -9
- package/api/types/BatchProcessorRunSource.d.ts +0 -12
- package/api/types/BatchProcessorRunSource.js +0 -15
- package/api/types/BatchProcessorRunStatus.d.ts +0 -14
- package/api/types/BatchProcessorRunStatus.js +0 -17
- package/api/types/BatchRunEntity.d.ts +0 -18
- package/api/types/BatchRunEntityVersion.d.ts +0 -18
- package/api/types/BatchRunMetrics.d.ts +0 -6
- /package/api/{types/BatchProcessorRun.js → resources/classifyRuns/client/requests/ClassifyRunsCreateBatchRequest.js} +0 -0
- /package/api/{types/BatchProcessorRunMetrics.js → resources/classifyRuns/types/ClassifyRunsCreateBatchRequestClassifier.js} +0 -0
- /package/api/{types/BatchProcessorRunOptions.js → resources/classifyRuns/types/ClassifyRunsCreateBatchRequestInputsItem.js} +0 -0
- /package/api/{types/BatchRunEntity.js → resources/classifyRuns/types/ClassifyRunsCreateBatchRequestInputsItemFile.js} +0 -0
- /package/api/{types/BatchRunEntityVersion.js → resources/extractRuns/client/requests/ExtractRunsCreateBatchRequest.js} +0 -0
- /package/api/{types/BatchRunMetrics.js → resources/extractRuns/types/ExtractRunsCreateBatchRequestExtractor.js} +0 -0
|
@@ -136,4 +136,62 @@ export declare class SplitRunsClient {
|
|
|
136
136
|
*/
|
|
137
137
|
cancel(id: string, request?: Extend.SplitRunsCancelRequest, requestOptions?: SplitRunsClient.RequestOptions): core.HttpResponsePromise<Extend.SplitRun>;
|
|
138
138
|
private __cancel;
|
|
139
|
+
/**
|
|
140
|
+
* Submit up to **1,000 files** for splitting in a single request. Each file is processed as an independent split run using the same splitter and configuration.
|
|
141
|
+
*
|
|
142
|
+
* Unlike the single [Split File (Async)](https://docs.extend.ai/2026-02-09/developers/api-reference/endpoints/split/create-split-run) endpoint, this batch endpoint accepts an `inputs` array and immediately returns a `BatchRun` object containing a batch `id` and a `PENDING` status. The individual runs are then queued and processed asynchronously.
|
|
143
|
+
*
|
|
144
|
+
* **Monitoring results:**
|
|
145
|
+
* - **Webhooks (recommended):** Subscribe to `batch_processor_run.processed` and `batch_processor_run.failed` events. The webhook payload indicates the batch has finished — fetch individual run results using `GET /split_runs?batchId={id}`.
|
|
146
|
+
* - **Polling:** Call `GET /batch_runs/{id}` to check the overall batch status, and use `GET /split_runs` filtered by `batchId` to retrieve individual run results.
|
|
147
|
+
*
|
|
148
|
+
* **Notes:**
|
|
149
|
+
* - A processor reference (`splitter.id`) is required — inline `config` is not supported for batch requests.
|
|
150
|
+
* - `inputs` must contain between 1 and 1,000 items.
|
|
151
|
+
* - All inputs in a batch use the same splitter version and override config.
|
|
152
|
+
* - Raw text input (`FileFromText`) is not supported for split runs. Use a URL or file ID.
|
|
153
|
+
*
|
|
154
|
+
* @param {Extend.SplitRunsCreateBatchRequest} request
|
|
155
|
+
* @param {SplitRunsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
156
|
+
*
|
|
157
|
+
* @throws {@link Extend.BadRequestError}
|
|
158
|
+
* @throws {@link Extend.UnauthorizedError}
|
|
159
|
+
* @throws {@link Extend.PaymentRequiredError}
|
|
160
|
+
* @throws {@link Extend.ForbiddenError}
|
|
161
|
+
* @throws {@link Extend.NotFoundError}
|
|
162
|
+
* @throws {@link Extend.UnprocessableEntityError}
|
|
163
|
+
* @throws {@link Extend.TooManyRequestsError}
|
|
164
|
+
* @throws {@link Extend.InternalServerError}
|
|
165
|
+
*
|
|
166
|
+
* @example
|
|
167
|
+
* await client.splitRuns.createBatch({
|
|
168
|
+
* splitter: {
|
|
169
|
+
* id: "spl_xK9mLPqRtN3vS8wF5hB2cQ"
|
|
170
|
+
* },
|
|
171
|
+
* inputs: [{
|
|
172
|
+
* file: {
|
|
173
|
+
* url: "https://example.com/multi-doc1.pdf"
|
|
174
|
+
* },
|
|
175
|
+
* metadata: {
|
|
176
|
+
* "customerId": "cust_abc123"
|
|
177
|
+
* }
|
|
178
|
+
* }, {
|
|
179
|
+
* file: {
|
|
180
|
+
* url: "https://example.com/multi-doc2.pdf"
|
|
181
|
+
* },
|
|
182
|
+
* metadata: {
|
|
183
|
+
* "customerId": "cust_def456"
|
|
184
|
+
* }
|
|
185
|
+
* }, {
|
|
186
|
+
* file: {
|
|
187
|
+
* url: "https://example.com/multi-doc3.pdf"
|
|
188
|
+
* },
|
|
189
|
+
* metadata: {
|
|
190
|
+
* "customerId": "cust_ghi789"
|
|
191
|
+
* }
|
|
192
|
+
* }]
|
|
193
|
+
* })
|
|
194
|
+
*/
|
|
195
|
+
createBatch(request: Extend.SplitRunsCreateBatchRequest, requestOptions?: SplitRunsClient.RequestOptions): core.HttpResponsePromise<Extend.BatchRun>;
|
|
196
|
+
private __createBatch;
|
|
139
197
|
}
|
|
@@ -83,10 +83,11 @@ class SplitRunsClient {
|
|
|
83
83
|
__list() {
|
|
84
84
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
85
85
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
86
|
-
const { status, splitterId, sourceId, source, fileNameContains, sortBy, sortDir, nextPageToken, maxPageSize, "x-extend-workspace-id": extendWorkspaceId, } = request;
|
|
86
|
+
const { status, splitterId, batchId, sourceId, source, fileNameContains, sortBy, sortDir, nextPageToken, maxPageSize, "x-extend-workspace-id": extendWorkspaceId, } = request;
|
|
87
87
|
const _queryParams = {
|
|
88
88
|
status: status != null ? status : undefined,
|
|
89
89
|
splitterId,
|
|
90
|
+
batchId,
|
|
90
91
|
sourceId,
|
|
91
92
|
source: source != null ? source : undefined,
|
|
92
93
|
fileNameContains,
|
|
@@ -456,5 +457,115 @@ class SplitRunsClient {
|
|
|
456
457
|
return (0, handleNonStatusCodeError_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/split_runs/{id}/cancel");
|
|
457
458
|
});
|
|
458
459
|
}
|
|
460
|
+
/**
|
|
461
|
+
* Submit up to **1,000 files** for splitting in a single request. Each file is processed as an independent split run using the same splitter and configuration.
|
|
462
|
+
*
|
|
463
|
+
* Unlike the single [Split File (Async)](https://docs.extend.ai/2026-02-09/developers/api-reference/endpoints/split/create-split-run) endpoint, this batch endpoint accepts an `inputs` array and immediately returns a `BatchRun` object containing a batch `id` and a `PENDING` status. The individual runs are then queued and processed asynchronously.
|
|
464
|
+
*
|
|
465
|
+
* **Monitoring results:**
|
|
466
|
+
* - **Webhooks (recommended):** Subscribe to `batch_processor_run.processed` and `batch_processor_run.failed` events. The webhook payload indicates the batch has finished — fetch individual run results using `GET /split_runs?batchId={id}`.
|
|
467
|
+
* - **Polling:** Call `GET /batch_runs/{id}` to check the overall batch status, and use `GET /split_runs` filtered by `batchId` to retrieve individual run results.
|
|
468
|
+
*
|
|
469
|
+
* **Notes:**
|
|
470
|
+
* - A processor reference (`splitter.id`) is required — inline `config` is not supported for batch requests.
|
|
471
|
+
* - `inputs` must contain between 1 and 1,000 items.
|
|
472
|
+
* - All inputs in a batch use the same splitter version and override config.
|
|
473
|
+
* - Raw text input (`FileFromText`) is not supported for split runs. Use a URL or file ID.
|
|
474
|
+
*
|
|
475
|
+
* @param {Extend.SplitRunsCreateBatchRequest} request
|
|
476
|
+
* @param {SplitRunsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
477
|
+
*
|
|
478
|
+
* @throws {@link Extend.BadRequestError}
|
|
479
|
+
* @throws {@link Extend.UnauthorizedError}
|
|
480
|
+
* @throws {@link Extend.PaymentRequiredError}
|
|
481
|
+
* @throws {@link Extend.ForbiddenError}
|
|
482
|
+
* @throws {@link Extend.NotFoundError}
|
|
483
|
+
* @throws {@link Extend.UnprocessableEntityError}
|
|
484
|
+
* @throws {@link Extend.TooManyRequestsError}
|
|
485
|
+
* @throws {@link Extend.InternalServerError}
|
|
486
|
+
*
|
|
487
|
+
* @example
|
|
488
|
+
* await client.splitRuns.createBatch({
|
|
489
|
+
* splitter: {
|
|
490
|
+
* id: "spl_xK9mLPqRtN3vS8wF5hB2cQ"
|
|
491
|
+
* },
|
|
492
|
+
* inputs: [{
|
|
493
|
+
* file: {
|
|
494
|
+
* url: "https://example.com/multi-doc1.pdf"
|
|
495
|
+
* },
|
|
496
|
+
* metadata: {
|
|
497
|
+
* "customerId": "cust_abc123"
|
|
498
|
+
* }
|
|
499
|
+
* }, {
|
|
500
|
+
* file: {
|
|
501
|
+
* url: "https://example.com/multi-doc2.pdf"
|
|
502
|
+
* },
|
|
503
|
+
* metadata: {
|
|
504
|
+
* "customerId": "cust_def456"
|
|
505
|
+
* }
|
|
506
|
+
* }, {
|
|
507
|
+
* file: {
|
|
508
|
+
* url: "https://example.com/multi-doc3.pdf"
|
|
509
|
+
* },
|
|
510
|
+
* metadata: {
|
|
511
|
+
* "customerId": "cust_ghi789"
|
|
512
|
+
* }
|
|
513
|
+
* }]
|
|
514
|
+
* })
|
|
515
|
+
*/
|
|
516
|
+
createBatch(request, requestOptions) {
|
|
517
|
+
return core.HttpResponsePromise.fromPromise(this.__createBatch(request, requestOptions));
|
|
518
|
+
}
|
|
519
|
+
__createBatch(request, requestOptions) {
|
|
520
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
521
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
522
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
523
|
+
const _headers = (0, headers_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_1.mergeOnlyDefinedHeaders)({ "x-extend-api-version": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.extendApiVersion) !== null && _b !== void 0 ? _b : "2026-02-09" }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
524
|
+
const _response = yield ((_c = this._options.fetcher) !== null && _c !== void 0 ? _c : core.fetcher)({
|
|
525
|
+
url: core.url.join((_e = (_d = (yield core.Supplier.get(this._options.baseUrl))) !== null && _d !== void 0 ? _d : (yield core.Supplier.get(this._options.environment))) !== null && _e !== void 0 ? _e : environments.ExtendEnvironment.Production, "split_runs/batch"),
|
|
526
|
+
method: "POST",
|
|
527
|
+
headers: _headers,
|
|
528
|
+
contentType: "application/json",
|
|
529
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
530
|
+
requestType: "json",
|
|
531
|
+
body: request,
|
|
532
|
+
timeoutMs: ((_h = (_f = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _f !== void 0 ? _f : (_g = this._options) === null || _g === void 0 ? void 0 : _g.timeoutInSeconds) !== null && _h !== void 0 ? _h : 300) * 1000,
|
|
533
|
+
maxRetries: (_j = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _j !== void 0 ? _j : (_k = this._options) === null || _k === void 0 ? void 0 : _k.maxRetries,
|
|
534
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
535
|
+
fetchFn: (_l = this._options) === null || _l === void 0 ? void 0 : _l.fetch,
|
|
536
|
+
logging: this._options.logging,
|
|
537
|
+
});
|
|
538
|
+
if (_response.ok) {
|
|
539
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
540
|
+
}
|
|
541
|
+
if (_response.error.reason === "status-code") {
|
|
542
|
+
switch (_response.error.statusCode) {
|
|
543
|
+
case 400:
|
|
544
|
+
throw new Extend.BadRequestError(_response.error.body, _response.rawResponse);
|
|
545
|
+
case 401:
|
|
546
|
+
throw new Extend.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
547
|
+
case 402:
|
|
548
|
+
throw new Extend.PaymentRequiredError(_response.error.body, _response.rawResponse);
|
|
549
|
+
case 403:
|
|
550
|
+
throw new Extend.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
551
|
+
case 404:
|
|
552
|
+
throw new Extend.NotFoundError(_response.error.body, _response.rawResponse);
|
|
553
|
+
case 422:
|
|
554
|
+
throw new Extend.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
555
|
+
case 429:
|
|
556
|
+
throw new Extend.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
557
|
+
case 500:
|
|
558
|
+
throw new Extend.InternalServerError(_response.error.body, _response.rawResponse);
|
|
559
|
+
default:
|
|
560
|
+
throw new errors.ExtendError({
|
|
561
|
+
statusCode: _response.error.statusCode,
|
|
562
|
+
body: _response.error.body,
|
|
563
|
+
rawResponse: _response.rawResponse,
|
|
564
|
+
});
|
|
565
|
+
}
|
|
566
|
+
}
|
|
567
|
+
return (0, handleNonStatusCodeError_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/split_runs/batch");
|
|
568
|
+
});
|
|
569
|
+
}
|
|
459
570
|
}
|
|
460
571
|
exports.SplitRunsClient = SplitRunsClient;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type * as Extend from "../../../../index";
|
|
2
|
+
/**
|
|
3
|
+
* @example
|
|
4
|
+
* {
|
|
5
|
+
* splitter: {
|
|
6
|
+
* id: "spl_xK9mLPqRtN3vS8wF5hB2cQ"
|
|
7
|
+
* },
|
|
8
|
+
* inputs: [{
|
|
9
|
+
* file: {
|
|
10
|
+
* url: "https://example.com/multi-doc1.pdf"
|
|
11
|
+
* },
|
|
12
|
+
* metadata: {
|
|
13
|
+
* "customerId": "cust_abc123"
|
|
14
|
+
* }
|
|
15
|
+
* }, {
|
|
16
|
+
* file: {
|
|
17
|
+
* url: "https://example.com/multi-doc2.pdf"
|
|
18
|
+
* },
|
|
19
|
+
* metadata: {
|
|
20
|
+
* "customerId": "cust_def456"
|
|
21
|
+
* }
|
|
22
|
+
* }, {
|
|
23
|
+
* file: {
|
|
24
|
+
* url: "https://example.com/multi-doc3.pdf"
|
|
25
|
+
* },
|
|
26
|
+
* metadata: {
|
|
27
|
+
* "customerId": "cust_ghi789"
|
|
28
|
+
* }
|
|
29
|
+
* }]
|
|
30
|
+
* }
|
|
31
|
+
*/
|
|
32
|
+
export interface SplitRunsCreateBatchRequest {
|
|
33
|
+
/** Reference to the splitter to run against every input in this batch. */
|
|
34
|
+
splitter: Extend.SplitRunsCreateBatchRequestSplitter;
|
|
35
|
+
/** An array of inputs to process. Each item produces one split run. Must contain between 1 and 1,000 items. Raw text input is not supported — use a URL or file ID. */
|
|
36
|
+
inputs: Extend.SplitRunsCreateBatchRequestInputsItem[];
|
|
37
|
+
priority?: Extend.RunPriority;
|
|
38
|
+
}
|
|
@@ -13,6 +13,12 @@ export interface SplitRunsListRequest {
|
|
|
13
13
|
* Example: `"spl_BMdfq_yWM3sT-ZzvCnA3f"`
|
|
14
14
|
*/
|
|
15
15
|
splitterId?: string;
|
|
16
|
+
/**
|
|
17
|
+
* Filters runs by the batch they belong to. Only returns runs created as part of the specified batch.
|
|
18
|
+
*
|
|
19
|
+
* Example: `"bpr_Xj8mK2pL9nR4vT7qY5wZ"`
|
|
20
|
+
*/
|
|
21
|
+
batchId?: string;
|
|
16
22
|
/** Filters runs by the source ID. */
|
|
17
23
|
sourceId?: Extend.RunSourceId;
|
|
18
24
|
/** Filters runs by the source that created them. If not provided, runs from all sources are returned. */
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
export type { SplitRunsCancelRequest } from "./SplitRunsCancelRequest";
|
|
2
|
+
export type { SplitRunsCreateBatchRequest } from "./SplitRunsCreateBatchRequest";
|
|
2
3
|
export type { SplitRunsCreateRequest } from "./SplitRunsCreateRequest";
|
|
3
4
|
export type { SplitRunsDeleteRequest } from "./SplitRunsDeleteRequest";
|
|
4
5
|
export type { SplitRunsListRequest } from "./SplitRunsListRequest";
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type * as Extend from "../../../index";
|
|
2
|
+
export interface SplitRunsCreateBatchRequestInputsItem {
|
|
3
|
+
/** The file to split. Can be a URL or an Extend file ID. Raw text input is not supported. */
|
|
4
|
+
file: Extend.SplitRunsCreateBatchRequestInputsItemFile;
|
|
5
|
+
metadata?: Extend.RunMetadata;
|
|
6
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type * as Extend from "../../../index";
|
|
2
|
+
/**
|
|
3
|
+
* Reference to the splitter to run against every input in this batch.
|
|
4
|
+
*/
|
|
5
|
+
export interface SplitRunsCreateBatchRequestSplitter {
|
|
6
|
+
/** The ID of the splitter to use. */
|
|
7
|
+
id: string;
|
|
8
|
+
version?: Extend.ProcessorVersionString;
|
|
9
|
+
/** Optional partial configuration override applied to every run in this batch. Only the fields you provide will override the splitter's saved configuration. */
|
|
10
|
+
overrideConfig?: Extend.SplitOverrideConfig;
|
|
11
|
+
}
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
export * from "./SplitRunsCreateBatchRequestInputsItem";
|
|
2
|
+
export * from "./SplitRunsCreateBatchRequestInputsItemFile";
|
|
3
|
+
export * from "./SplitRunsCreateBatchRequestSplitter";
|
|
1
4
|
export * from "./SplitRunsCreateRequestFile";
|
|
2
5
|
export * from "./SplitRunsCreateRequestSplitter";
|
|
3
6
|
export * from "./SplitRunsDeleteResponse";
|
|
@@ -14,6 +14,9 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./SplitRunsCreateBatchRequestInputsItem"), exports);
|
|
18
|
+
__exportStar(require("./SplitRunsCreateBatchRequestInputsItemFile"), exports);
|
|
19
|
+
__exportStar(require("./SplitRunsCreateBatchRequestSplitter"), exports);
|
|
17
20
|
__exportStar(require("./SplitRunsCreateRequestFile"), exports);
|
|
18
21
|
__exportStar(require("./SplitRunsCreateRequestSplitter"), exports);
|
|
19
22
|
__exportStar(require("./SplitRunsDeleteResponse"), exports);
|
|
@@ -71,9 +71,12 @@ export declare class SplitterVersionsClient {
|
|
|
71
71
|
* @param {string} splitterId - The ID of the splitter.
|
|
72
72
|
*
|
|
73
73
|
* Example: `"spl_Xj8mK2pL9nR4vT7qY5wZ"`
|
|
74
|
-
* @param {string} versionId - The
|
|
74
|
+
* @param {string} versionId - The version to retrieve. Accepts any of the following:
|
|
75
75
|
*
|
|
76
|
-
*
|
|
76
|
+
* - `"draft"` — returns the current draft version
|
|
77
|
+
* - `"latest"` — returns the latest published version (falls back to draft if none published)
|
|
78
|
+
* - A version number (e.g. `"0.1"`, `"1.0"`) — returns that specific published version
|
|
79
|
+
* - A version ID (e.g. `"splv_QYk6jgHA_8CsO8rVWhyNC"`) — returns that specific version by ID
|
|
77
80
|
* @param {Extend.SplitterVersionsRetrieveRequest} request
|
|
78
81
|
* @param {SplitterVersionsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
79
82
|
*
|
|
@@ -87,7 +90,7 @@ export declare class SplitterVersionsClient {
|
|
|
87
90
|
* @throws {@link Extend.InternalServerError}
|
|
88
91
|
*
|
|
89
92
|
* @example
|
|
90
|
-
* await client.splitterVersions.retrieve("splitter_id_here", "
|
|
93
|
+
* await client.splitterVersions.retrieve("splitter_id_here", "draft")
|
|
91
94
|
*/
|
|
92
95
|
retrieve(splitterId: string, versionId: string, request?: Extend.SplitterVersionsRetrieveRequest, requestOptions?: SplitterVersionsClient.RequestOptions): core.HttpResponsePromise<Extend.SplitterVersion>;
|
|
93
96
|
private __retrieve;
|
|
@@ -241,9 +241,12 @@ class SplitterVersionsClient {
|
|
|
241
241
|
* @param {string} splitterId - The ID of the splitter.
|
|
242
242
|
*
|
|
243
243
|
* Example: `"spl_Xj8mK2pL9nR4vT7qY5wZ"`
|
|
244
|
-
* @param {string} versionId - The
|
|
244
|
+
* @param {string} versionId - The version to retrieve. Accepts any of the following:
|
|
245
245
|
*
|
|
246
|
-
*
|
|
246
|
+
* - `"draft"` — returns the current draft version
|
|
247
|
+
* - `"latest"` — returns the latest published version (falls back to draft if none published)
|
|
248
|
+
* - A version number (e.g. `"0.1"`, `"1.0"`) — returns that specific published version
|
|
249
|
+
* - A version ID (e.g. `"splv_QYk6jgHA_8CsO8rVWhyNC"`) — returns that specific version by ID
|
|
247
250
|
* @param {Extend.SplitterVersionsRetrieveRequest} request
|
|
248
251
|
* @param {SplitterVersionsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
249
252
|
*
|
|
@@ -257,7 +260,7 @@ class SplitterVersionsClient {
|
|
|
257
260
|
* @throws {@link Extend.InternalServerError}
|
|
258
261
|
*
|
|
259
262
|
* @example
|
|
260
|
-
* await client.splitterVersions.retrieve("splitter_id_here", "
|
|
263
|
+
* await client.splitterVersions.retrieve("splitter_id_here", "draft")
|
|
261
264
|
*/
|
|
262
265
|
retrieve(splitterId, versionId, request = {}, requestOptions) {
|
|
263
266
|
return core.HttpResponsePromise.fromPromise(this.__retrieve(splitterId, versionId, request, requestOptions));
|
|
@@ -59,13 +59,13 @@ export declare class WorkflowVersionsClient {
|
|
|
59
59
|
/**
|
|
60
60
|
* Get a specific version of a workflow, including its step definitions.
|
|
61
61
|
*
|
|
62
|
-
* The `versionId` parameter accepts:
|
|
63
|
-
* - `"draft"` — returns the current draft version
|
|
64
|
-
* - A version number (e.g. `"1"`, `"2"`) — returns that deployed version
|
|
65
|
-
* - An internal version ID (e.g. `"workflow_version_abc123"`) — returns that specific version
|
|
66
|
-
*
|
|
67
62
|
* @param {string} id - The ID of the workflow.
|
|
68
|
-
* @param {string} versionId - The version to retrieve.
|
|
63
|
+
* @param {string} versionId - The version to retrieve. Accepts any of the following:
|
|
64
|
+
*
|
|
65
|
+
* - `"draft"` — returns the current draft version
|
|
66
|
+
* - `"latest"` — returns the latest published version (falls back to draft if none published)
|
|
67
|
+
* - A version number (e.g. `"1"`, `"2"`) — returns that specific published version
|
|
68
|
+
* - A version ID (e.g. `"workflow_version_abc123"`) — returns that specific version by ID
|
|
69
69
|
* @param {WorkflowVersionsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
70
70
|
*
|
|
71
71
|
* @throws {@link Extend.BadRequestError}
|
|
@@ -211,13 +211,13 @@ class WorkflowVersionsClient {
|
|
|
211
211
|
/**
|
|
212
212
|
* Get a specific version of a workflow, including its step definitions.
|
|
213
213
|
*
|
|
214
|
-
* The `versionId` parameter accepts:
|
|
215
|
-
* - `"draft"` — returns the current draft version
|
|
216
|
-
* - A version number (e.g. `"1"`, `"2"`) — returns that deployed version
|
|
217
|
-
* - An internal version ID (e.g. `"workflow_version_abc123"`) — returns that specific version
|
|
218
|
-
*
|
|
219
214
|
* @param {string} id - The ID of the workflow.
|
|
220
|
-
* @param {string} versionId - The version to retrieve.
|
|
215
|
+
* @param {string} versionId - The version to retrieve. Accepts any of the following:
|
|
216
|
+
*
|
|
217
|
+
* - `"draft"` — returns the current draft version
|
|
218
|
+
* - `"latest"` — returns the latest published version (falls back to draft if none published)
|
|
219
|
+
* - A version number (e.g. `"1"`, `"2"`) — returns that specific published version
|
|
220
|
+
* - A version ID (e.g. `"workflow_version_abc123"`) — returns that specific version by ID
|
|
221
221
|
* @param {WorkflowVersionsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
222
222
|
*
|
|
223
223
|
* @throws {@link Extend.BadRequestError}
|
package/api/types/BatchRun.d.ts
CHANGED
|
@@ -1,27 +1,20 @@
|
|
|
1
1
|
import type * as Extend from "../index";
|
|
2
|
+
/**
|
|
3
|
+
* A batch run represents a batch of files submitted for processing via one of the batch endpoints (`POST /extract_runs/batch`, `POST /classify_runs/batch`, or `POST /split_runs/batch`). Use `GET /batch_runs/{id}` to poll the status.
|
|
4
|
+
*
|
|
5
|
+
* **Note:** This object is not used for workflow batch runs. See `POST /workflow_runs/batch` for workflow batching.
|
|
6
|
+
*/
|
|
2
7
|
export interface BatchRun {
|
|
3
|
-
/** The type of object.
|
|
8
|
+
/** The type of object. Always `"batch_run"`. */
|
|
4
9
|
object: "batch_run";
|
|
5
10
|
/**
|
|
6
11
|
* The unique identifier for this batch run.
|
|
7
12
|
*
|
|
8
|
-
* Example: `"
|
|
13
|
+
* Example: `"bpr_Xj8mK2pL9nR4vT7qY5wZ"`
|
|
9
14
|
*/
|
|
10
15
|
id: string;
|
|
11
|
-
/**
|
|
12
|
-
* The extractor, classifier, or splitter that was run.
|
|
13
|
-
*
|
|
14
|
-
* **Availability:** Present when an entity was provided when creating the batch run.
|
|
15
|
-
*/
|
|
16
|
-
entity: Extend.BatchRunEntity | null;
|
|
17
|
-
/**
|
|
18
|
-
* The version of the extractor, classifier, or splitter that was run.
|
|
19
|
-
*
|
|
20
|
-
* **Availability:** Present when an entity was provided when creating the batch run.
|
|
21
|
-
*/
|
|
22
|
-
entityVersion: Extend.BatchRunEntityVersion | null;
|
|
23
16
|
status: Extend.BatchRunStatus;
|
|
24
|
-
|
|
17
|
+
/** The number of individual runs in this batch. */
|
|
18
|
+
runCount: number;
|
|
25
19
|
createdAt: Extend.CreatedAt;
|
|
26
|
-
updatedAt: Extend.UpdatedAt;
|
|
27
20
|
}
|
|
@@ -1,14 +1,16 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The status of a run:
|
|
3
|
-
* * `"PENDING"` - The
|
|
4
|
-
* * `"PROCESSING"` - The
|
|
5
|
-
* * `"PROCESSED"` -
|
|
6
|
-
* * `"FAILED"` - The
|
|
2
|
+
* The status of a batch run:
|
|
3
|
+
* * `"PENDING"` - The batch has been created and is waiting to be processed
|
|
4
|
+
* * `"PROCESSING"` - The batch is currently being processed
|
|
5
|
+
* * `"PROCESSED"` - All runs in the batch have completed successfully
|
|
6
|
+
* * `"FAILED"` - The batch failed to process
|
|
7
|
+
* * `"CANCELLED"` - The batch was cancelled
|
|
7
8
|
*/
|
|
8
9
|
export declare const BatchRunStatus: {
|
|
9
10
|
readonly Pending: "PENDING";
|
|
10
11
|
readonly Processing: "PROCESSING";
|
|
11
12
|
readonly Processed: "PROCESSED";
|
|
12
13
|
readonly Failed: "FAILED";
|
|
14
|
+
readonly Cancelled: "CANCELLED";
|
|
13
15
|
};
|
|
14
16
|
export type BatchRunStatus = (typeof BatchRunStatus)[keyof typeof BatchRunStatus] | string;
|
|
@@ -3,15 +3,17 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.BatchRunStatus = void 0;
|
|
5
5
|
/**
|
|
6
|
-
* The status of a run:
|
|
7
|
-
* * `"PENDING"` - The
|
|
8
|
-
* * `"PROCESSING"` - The
|
|
9
|
-
* * `"PROCESSED"` -
|
|
10
|
-
* * `"FAILED"` - The
|
|
6
|
+
* The status of a batch run:
|
|
7
|
+
* * `"PENDING"` - The batch has been created and is waiting to be processed
|
|
8
|
+
* * `"PROCESSING"` - The batch is currently being processed
|
|
9
|
+
* * `"PROCESSED"` - All runs in the batch have completed successfully
|
|
10
|
+
* * `"FAILED"` - The batch failed to process
|
|
11
|
+
* * `"CANCELLED"` - The batch was cancelled
|
|
11
12
|
*/
|
|
12
13
|
exports.BatchRunStatus = {
|
|
13
14
|
Pending: "PENDING",
|
|
14
15
|
Processing: "PROCESSING",
|
|
15
16
|
Processed: "PROCESSED",
|
|
16
17
|
Failed: "FAILED",
|
|
18
|
+
Cancelled: "CANCELLED",
|
|
17
19
|
};
|
package/api/types/Block.d.ts
CHANGED
|
@@ -18,6 +18,7 @@ export interface Block {
|
|
|
18
18
|
* * `"key_value"` - Key-value pairs (e.g., form regions, key-val groups, etc)
|
|
19
19
|
* * `"page_number"` - Page number indicators
|
|
20
20
|
* * `"barcode"` - Barcodes and QR codes
|
|
21
|
+
* * `"formula"` - Mathematical formulas and equations
|
|
21
22
|
* * `"header"` - Page headers
|
|
22
23
|
* * `"footer"` - Page footers
|
|
23
24
|
*/
|
|
@@ -2,4 +2,4 @@ import type * as Extend from "../index";
|
|
|
2
2
|
/**
|
|
3
3
|
* Additional details specific to the block type. The schema depends on the block type.
|
|
4
4
|
*/
|
|
5
|
-
export type BlockDetails = Extend.TableDetails | Extend.TableCellDetails | Extend.FigureDetails | Extend.BarcodeDetails | Extend.KeyValueDetails | Extend.EmptyBlockDetails;
|
|
5
|
+
export type BlockDetails = Extend.TableDetails | Extend.TableCellDetails | Extend.FigureDetails | Extend.BarcodeDetails | Extend.FormulaDetails | Extend.KeyValueDetails | Extend.EmptyBlockDetails;
|
package/api/types/BlockType.d.ts
CHANGED
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
* * `"key_value"` - Key-value pairs (e.g., form regions, key-val groups, etc)
|
|
11
11
|
* * `"page_number"` - Page number indicators
|
|
12
12
|
* * `"barcode"` - Barcodes and QR codes
|
|
13
|
+
* * `"formula"` - Mathematical formulas and equations
|
|
13
14
|
* * `"header"` - Page headers
|
|
14
15
|
* * `"footer"` - Page footers
|
|
15
16
|
*/
|
|
@@ -24,6 +25,7 @@ export declare const BlockType: {
|
|
|
24
25
|
readonly KeyValue: "key_value";
|
|
25
26
|
readonly PageNumber: "page_number";
|
|
26
27
|
readonly Barcode: "barcode";
|
|
28
|
+
readonly Formula: "formula";
|
|
27
29
|
readonly Header: "header";
|
|
28
30
|
readonly Footer: "footer";
|
|
29
31
|
};
|
package/api/types/BlockType.js
CHANGED
|
@@ -14,6 +14,7 @@ exports.BlockType = void 0;
|
|
|
14
14
|
* * `"key_value"` - Key-value pairs (e.g., form regions, key-val groups, etc)
|
|
15
15
|
* * `"page_number"` - Page number indicators
|
|
16
16
|
* * `"barcode"` - Barcodes and QR codes
|
|
17
|
+
* * `"formula"` - Mathematical formulas and equations
|
|
17
18
|
* * `"header"` - Page headers
|
|
18
19
|
* * `"footer"` - Page footers
|
|
19
20
|
*/
|
|
@@ -28,6 +29,7 @@ exports.BlockType = {
|
|
|
28
29
|
KeyValue: "key_value",
|
|
29
30
|
PageNumber: "page_number",
|
|
30
31
|
Barcode: "barcode",
|
|
32
|
+
Formula: "formula",
|
|
31
33
|
Header: "header",
|
|
32
34
|
Footer: "footer",
|
|
33
35
|
};
|
|
@@ -39,4 +39,14 @@ export interface ParseConfigAdvancedOptions {
|
|
|
39
39
|
* * `low`: Lower quality, smaller file sizes, faster processing
|
|
40
40
|
*/
|
|
41
41
|
imageConversionQuality?: Extend.ParseConfigAdvancedOptionsImageConversionQuality;
|
|
42
|
+
/**
|
|
43
|
+
* Enable detection of formatting-based annotations in the document. Currently supports change tracking detection.
|
|
44
|
+
*
|
|
45
|
+
* When enabled, detected changes are represented inline within the `content` field of applicable blocks using standard HTML change-tracking elements: [`<ins>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/ins) for insertions and [`<del>`](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/del) for deletions, grouped inside a `<change>` wrapper.
|
|
46
|
+
*
|
|
47
|
+
* Affected block types: `text`, `heading`, `section_heading`, `header`, `footer`.
|
|
48
|
+
*
|
|
49
|
+
* **Note:** Requires `engine: "parse_performance"` with `engineVersion >= "2.0.0"`.
|
|
50
|
+
*/
|
|
51
|
+
formattingDetection?: Extend.ParseConfigAdvancedOptionsFormattingDetectionItem[];
|
|
42
52
|
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export interface ParseConfigAdvancedOptionsFormattingDetectionItem {
|
|
2
|
+
/**
|
|
3
|
+
* The type of formatting detection to enable.
|
|
4
|
+
*
|
|
5
|
+
* * `"change_tracking"` — Detect tracked changes (insertions, deletions, substitutions) indicated by strikethroughs, colored text, or underlines in the source document.
|
|
6
|
+
*/
|
|
7
|
+
type: "change_tracking";
|
|
8
|
+
}
|