extend-ai 1.7.0 → 1.9.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 +50 -0
- package/api/resources/batchRuns/client/Client.js +143 -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/parseRuns/client/Client.d.ts +77 -0
- package/api/resources/parseRuns/client/Client.js +189 -0
- package/api/resources/parseRuns/client/requests/ParseRunsCreateBatchRequest.d.ts +35 -0
- package/api/resources/parseRuns/client/requests/ParseRunsCreateBatchRequest.js +3 -0
- package/api/resources/parseRuns/client/requests/ParseRunsListRequest.d.ts +27 -0
- package/api/resources/parseRuns/client/requests/ParseRunsListRequest.js +3 -0
- package/api/resources/parseRuns/client/requests/index.d.ts +2 -0
- package/api/resources/parseRuns/types/ParseRunsCreateBatchRequestInputsItem.d.ts +6 -0
- package/api/resources/parseRuns/types/ParseRunsCreateBatchRequestInputsItem.js +3 -0
- package/api/resources/parseRuns/types/ParseRunsCreateBatchRequestInputsItemFile.d.ts +5 -0
- package/api/resources/parseRuns/types/ParseRunsCreateBatchRequestInputsItemFile.js +3 -0
- package/api/resources/parseRuns/types/ParseRunsListRequestStatus.d.ts +7 -0
- package/api/resources/parseRuns/types/ParseRunsListRequestStatus.js +10 -0
- package/api/resources/parseRuns/types/ParseRunsListResponse.d.ts +6 -0
- package/api/resources/parseRuns/types/ParseRunsListResponse.js +3 -0
- package/api/resources/parseRuns/types/index.d.ts +4 -0
- package/api/resources/parseRuns/types/index.js +4 -0
- 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/BatchParseRunCompletedWebhookEvent.d.ts +6 -0
- package/api/types/BatchParseRunCompletedWebhookEvent.js +3 -0
- package/api/types/BatchParseRunFailedWebhookEvent.d.ts +6 -0
- package/api/types/BatchParseRunFailedWebhookEvent.js +3 -0
- 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/ParseRun.d.ts +10 -1
- package/api/types/ParseRunStatusEnum.d.ts +2 -0
- package/api/types/ParseRunStatusEnum.js +2 -0
- package/api/types/ProcessorRunStatus.d.ts +2 -0
- package/api/types/ProcessorRunStatus.js +2 -0
- package/api/types/WebhookEndpointEventType.d.ts +4 -0
- package/api/types/WebhookEndpointEventType.js +4 -0
- package/api/types/WebhookEvent.d.ts +13 -1
- package/api/types/WebhookSubscriptionEventType.d.ts +5 -3
- package/api/types/WebhookSubscriptionEventType.js +5 -3
- package/api/types/index.d.ts +7 -8
- package/api/types/index.js +7 -8
- package/package.json +1 -1
- package/reference.md +574 -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
|
@@ -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 /parse_runs/batch`, `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
|
+
}
|
|
@@ -13,4 +13,6 @@ export interface ParseConfigBlockOptions {
|
|
|
13
13
|
keyValue?: Extend.ParseConfigBlockOptionsKeyValue;
|
|
14
14
|
/** Options for barcode blocks. */
|
|
15
15
|
barcodes?: Extend.ParseConfigBlockOptionsBarcodes;
|
|
16
|
+
/** Options for formula blocks. */
|
|
17
|
+
formulas?: Extend.ParseConfigBlockOptionsFormulas;
|
|
16
18
|
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Options for formula blocks.
|
|
3
|
+
*/
|
|
4
|
+
export interface ParseConfigBlockOptionsFormulas {
|
|
5
|
+
/** Whether to enable formula detection and parsing. When enabled, mathematical formulas and equations are detected and their LaTeX representations are included in the output. When disabled, formulas will be detected as text blocks and may not be accurately parsed. */
|
|
6
|
+
enabled?: boolean;
|
|
7
|
+
}
|
package/api/types/ParseRun.d.ts
CHANGED
|
@@ -11,10 +11,19 @@ export interface ParseRun {
|
|
|
11
11
|
* Example: `"pr_xK9mLPqRtN3vS8wF5hB2cQ"`
|
|
12
12
|
*/
|
|
13
13
|
id: string;
|
|
14
|
-
/**
|
|
14
|
+
/**
|
|
15
|
+
* The ID of the batch this run belongs to, if created via `POST /parse_runs/batch`.
|
|
16
|
+
*
|
|
17
|
+
* **Availability:** Present when the run was submitted as part of a batch.
|
|
18
|
+
*
|
|
19
|
+
* Example: `"bpar_Xj8mK2pL9nR4vT7qY5wZ"`
|
|
20
|
+
*/
|
|
21
|
+
batchId?: string | null;
|
|
22
|
+
/** The file that was parsed. This file can be used as a parameter for other Extend endpoints, such as `POST /workflow_runs`. May be `null` for batch parse runs where file ingestion failed. */
|
|
15
23
|
file: Extend.FileSummary;
|
|
16
24
|
/**
|
|
17
25
|
* The status of the parse run:
|
|
26
|
+
* * `"PENDING"` - The run has been created and is waiting to be processed. Only applies to runs created via `POST /parse_runs/batch`.
|
|
18
27
|
* * `"PROCESSING"` - The file is still being processed
|
|
19
28
|
* * `"PROCESSED"` - The file was successfully processed
|
|
20
29
|
* * `"FAILED"` - The processing failed (see `failureReason` for details)
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* The status of the parse run:
|
|
3
|
+
* * `"PENDING"` - The run has been created and is waiting to be processed. Only applies to runs created via `POST /parse_runs/batch`.
|
|
3
4
|
* * `"PROCESSING"` - The file is still being processed
|
|
4
5
|
* * `"PROCESSED"` - The file was successfully processed
|
|
5
6
|
* * `"FAILED"` - The processing failed (see `failureReason` for details)
|
|
6
7
|
*/
|
|
7
8
|
export declare const ParseRunStatusEnum: {
|
|
9
|
+
readonly Pending: "PENDING";
|
|
8
10
|
readonly Processing: "PROCESSING";
|
|
9
11
|
readonly Processed: "PROCESSED";
|
|
10
12
|
readonly Failed: "FAILED";
|
|
@@ -4,11 +4,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
4
4
|
exports.ParseRunStatusEnum = void 0;
|
|
5
5
|
/**
|
|
6
6
|
* The status of the parse run:
|
|
7
|
+
* * `"PENDING"` - The run has been created and is waiting to be processed. Only applies to runs created via `POST /parse_runs/batch`.
|
|
7
8
|
* * `"PROCESSING"` - The file is still being processed
|
|
8
9
|
* * `"PROCESSED"` - The file was successfully processed
|
|
9
10
|
* * `"FAILED"` - The processing failed (see `failureReason` for details)
|
|
10
11
|
*/
|
|
11
12
|
exports.ParseRunStatusEnum = {
|
|
13
|
+
Pending: "PENDING",
|
|
12
14
|
Processing: "PROCESSING",
|
|
13
15
|
Processed: "PROCESSED",
|
|
14
16
|
Failed: "FAILED",
|
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* The status of a processor run (extract, classify, or split):
|
|
3
|
+
* * `"PENDING"` - The run has been created and is waiting to be processed
|
|
3
4
|
* * `"PROCESSING"` - The run is in progress
|
|
4
5
|
* * `"PROCESSED"` - The run completed successfully
|
|
5
6
|
* * `"FAILED"` - The run failed
|
|
6
7
|
* * `"CANCELLED"` - The run was cancelled
|
|
7
8
|
*/
|
|
8
9
|
export declare const ProcessorRunStatus: {
|
|
10
|
+
readonly Pending: "PENDING";
|
|
9
11
|
readonly Processing: "PROCESSING";
|
|
10
12
|
readonly Processed: "PROCESSED";
|
|
11
13
|
readonly Failed: "FAILED";
|
|
@@ -4,12 +4,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
4
4
|
exports.ProcessorRunStatus = void 0;
|
|
5
5
|
/**
|
|
6
6
|
* The status of a processor run (extract, classify, or split):
|
|
7
|
+
* * `"PENDING"` - The run has been created and is waiting to be processed
|
|
7
8
|
* * `"PROCESSING"` - The run is in progress
|
|
8
9
|
* * `"PROCESSED"` - The run completed successfully
|
|
9
10
|
* * `"FAILED"` - The run failed
|
|
10
11
|
* * `"CANCELLED"` - The run was cancelled
|
|
11
12
|
*/
|
|
12
13
|
exports.ProcessorRunStatus = {
|
|
14
|
+
Pending: "PENDING",
|
|
13
15
|
Processing: "PROCESSING",
|
|
14
16
|
Processed: "PROCESSED",
|
|
15
17
|
Failed: "FAILED",
|
|
@@ -10,6 +10,10 @@ export declare const WebhookEndpointEventType: {
|
|
|
10
10
|
readonly ClassifyRunFailed: "classify_run.failed";
|
|
11
11
|
readonly SplitRunProcessed: "split_run.processed";
|
|
12
12
|
readonly SplitRunFailed: "split_run.failed";
|
|
13
|
+
readonly BatchProcessorRunProcessed: "batch_processor_run.processed";
|
|
14
|
+
readonly BatchProcessorRunFailed: "batch_processor_run.failed";
|
|
15
|
+
readonly BatchParseRunProcessed: "batch_parse_run.processed";
|
|
16
|
+
readonly BatchParseRunFailed: "batch_parse_run.failed";
|
|
13
17
|
readonly ExtractorCreated: "extractor.created";
|
|
14
18
|
readonly ExtractorUpdated: "extractor.updated";
|
|
15
19
|
readonly ExtractorDeleted: "extractor.deleted";
|
|
@@ -14,6 +14,10 @@ exports.WebhookEndpointEventType = {
|
|
|
14
14
|
ClassifyRunFailed: "classify_run.failed",
|
|
15
15
|
SplitRunProcessed: "split_run.processed",
|
|
16
16
|
SplitRunFailed: "split_run.failed",
|
|
17
|
+
BatchProcessorRunProcessed: "batch_processor_run.processed",
|
|
18
|
+
BatchProcessorRunFailed: "batch_processor_run.failed",
|
|
19
|
+
BatchParseRunProcessed: "batch_parse_run.processed",
|
|
20
|
+
BatchParseRunFailed: "batch_parse_run.failed",
|
|
17
21
|
ExtractorCreated: "extractor.created",
|
|
18
22
|
ExtractorUpdated: "extractor.updated",
|
|
19
23
|
ExtractorDeleted: "extractor.deleted",
|