extend-ai 1.9.0 → 1.11.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/.gitattributes +1 -0
- package/BaseClient.js +2 -2
- package/Client.d.ts +3 -0
- package/Client.js +43 -38
- package/api/resources/editTemplates/client/Client.d.ts +38 -0
- package/api/resources/editTemplates/client/Client.js +137 -0
- package/api/resources/editTemplates/client/index.d.ts +1 -0
- package/api/resources/editTemplates/client/index.js +17 -0
- package/api/resources/editTemplates/client/requests/EditTemplatesRetrieveRequest.d.ts +8 -0
- package/api/resources/editTemplates/client/requests/EditTemplatesRetrieveRequest.js +3 -0
- package/api/resources/editTemplates/client/requests/index.d.ts +1 -0
- package/api/resources/editTemplates/client/requests/index.js +2 -0
- package/api/resources/editTemplates/index.d.ts +1 -0
- package/api/resources/editTemplates/index.js +17 -0
- package/api/resources/evaluationSetRuns/client/Client.d.ts +34 -0
- package/api/resources/evaluationSetRuns/client/Client.js +101 -0
- package/api/resources/evaluationSetRuns/client/requests/EvaluationSetRunsCreateRequest.d.ts +27 -0
- package/api/resources/evaluationSetRuns/client/requests/EvaluationSetRunsCreateRequest.js +3 -0
- package/api/resources/evaluationSetRuns/client/requests/index.d.ts +1 -0
- package/api/resources/evaluationSetRuns/index.d.ts +1 -0
- package/api/resources/evaluationSetRuns/index.js +1 -0
- package/api/resources/evaluationSetRuns/types/EvaluationSetRunsCreateRequestEntity.d.ts +9 -0
- package/api/resources/evaluationSetRuns/types/EvaluationSetRunsCreateRequestEntity.js +3 -0
- package/api/resources/evaluationSetRuns/types/index.d.ts +1 -0
- package/api/resources/evaluationSetRuns/types/index.js +17 -0
- package/api/resources/extractors/client/Client.d.ts +25 -3
- package/api/resources/extractors/client/Client.js +25 -3
- package/api/resources/extractors/client/requests/ExtractorsCreateRequest.d.ts +31 -5
- package/api/resources/extractors/types/ExtractorsCreateRequestGenerate.d.ts +12 -0
- package/api/resources/extractors/types/ExtractorsCreateRequestGenerate.js +3 -0
- package/api/resources/extractors/types/ExtractorsCreateRequestGenerateFilesItem.d.ts +2 -0
- package/api/resources/extractors/types/ExtractorsCreateRequestGenerateFilesItem.js +3 -0
- package/api/resources/extractors/types/index.d.ts +2 -0
- package/api/resources/extractors/types/index.js +2 -0
- package/api/resources/index.d.ts +3 -0
- package/api/resources/index.js +4 -1
- package/api/resources/parseRuns/client/Client.d.ts +1 -1
- package/api/resources/parseRuns/client/Client.js +4 -2
- package/api/resources/parseRuns/client/requests/ParseRunsListRequest.d.ts +8 -0
- package/api/resources/webhookEndpoints/client/Client.d.ts +1 -1
- package/api/resources/webhookEndpoints/client/Client.js +1 -1
- package/api/resources/webhookEndpoints/client/requests/WebhookEndpointsCreateRequest.d.ts +1 -1
- package/api/types/ApiVersionEnum.d.ts +1 -9
- package/api/types/ApiVersionEnum.js +0 -9
- package/api/types/ClassifyAdvancedOptions.d.ts +2 -0
- package/api/types/ClassifyRun.d.ts +9 -11
- package/api/types/ClassifyRunSummary.d.ts +3 -5
- package/api/types/EditConfigAdvancedOptions.d.ts +1 -1
- package/api/types/EditRun.d.ts +1 -1
- package/api/types/EditTemplate.d.ts +26 -0
- package/api/types/EditTemplate.js +3 -0
- package/api/types/ExtractAdvancedOptions.d.ts +9 -0
- package/api/types/ExtractAdvancedOptionsCitationMode.d.ts +12 -0
- package/api/types/ExtractAdvancedOptionsCitationMode.js +15 -0
- package/api/types/ExtractRun.d.ts +14 -14
- package/api/types/ExtractRunSummary.d.ts +3 -3
- package/api/types/ParseRun.d.ts +1 -1
- package/api/types/ParseRunSource.d.ts +20 -0
- package/api/types/ParseRunSource.js +23 -0
- package/api/types/ParseRunStatus.d.ts +6 -0
- package/api/types/RunUsage.d.ts +14 -1
- package/api/types/RunUsageBreakdownEntry.d.ts +12 -0
- package/api/types/RunUsageBreakdownEntry.js +3 -0
- package/api/types/RunUsageBreakdownEntryObject.d.ts +9 -0
- package/api/types/RunUsageBreakdownEntryObject.js +12 -0
- package/api/types/RunUsageSummary.d.ts +19 -0
- package/api/types/RunUsageSummary.js +3 -0
- package/api/types/SplitRun.d.ts +9 -9
- package/api/types/SplitRunSummary.d.ts +3 -3
- package/api/types/StepRun.d.ts +28 -2
- package/api/types/WorkflowRun.d.ts +5 -0
- package/api/types/WorkflowRunSummary.d.ts +6 -1
- package/api/types/index.d.ts +6 -0
- package/api/types/index.js +6 -0
- package/package.json +1 -1
- package/reference.md +165 -5
- package/version.d.ts +1 -1
- package/version.js +1 -1
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type * as Extend from "../../../index";
|
|
2
|
+
/**
|
|
3
|
+
* Optional processor and version to run against the evaluation set. If omitted, the evaluation set's processor is run at its draft version.
|
|
4
|
+
*/
|
|
5
|
+
export interface EvaluationSetRunsCreateRequestEntity {
|
|
6
|
+
/** The ID of the extractor, classifier, or splitter to evaluate. */
|
|
7
|
+
id: string;
|
|
8
|
+
version?: Extend.ProcessorVersionString;
|
|
9
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./EvaluationSetRunsCreateRequestEntity";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./EvaluationSetRunsCreateRequestEntity"), exports);
|
|
@@ -37,6 +37,8 @@ export declare class ExtractorsClient {
|
|
|
37
37
|
/**
|
|
38
38
|
* Create a new extractor.
|
|
39
39
|
*
|
|
40
|
+
* You can optionally provide a `generate` object to automatically generate an extraction schema from sample documents using AI. `generate` is mutually exclusive with `config` and `cloneExtractorId`.
|
|
41
|
+
*
|
|
40
42
|
* @param {Extend.ExtractorsCreateRequest} request
|
|
41
43
|
* @param {ExtractorsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
42
44
|
*
|
|
@@ -57,21 +59,41 @@ export declare class ExtractorsClient {
|
|
|
57
59
|
* "type": "object",
|
|
58
60
|
* "properties": {
|
|
59
61
|
* "vendor_name": {
|
|
60
|
-
* "type":
|
|
62
|
+
* "type": [
|
|
63
|
+
* "string",
|
|
64
|
+
* "null"
|
|
65
|
+
* ],
|
|
61
66
|
* "description": "The name of the vendor"
|
|
62
67
|
* },
|
|
63
68
|
* "invoice_number": {
|
|
64
|
-
* "type":
|
|
69
|
+
* "type": [
|
|
70
|
+
* "string",
|
|
71
|
+
* "null"
|
|
72
|
+
* ],
|
|
65
73
|
* "description": "The invoice number"
|
|
66
74
|
* },
|
|
67
75
|
* "total_amount": {
|
|
68
|
-
* "type":
|
|
76
|
+
* "type": [
|
|
77
|
+
* "number",
|
|
78
|
+
* "null"
|
|
79
|
+
* ],
|
|
69
80
|
* "description": "The total amount due"
|
|
70
81
|
* }
|
|
71
82
|
* }
|
|
72
83
|
* }
|
|
73
84
|
* }
|
|
74
85
|
* })
|
|
86
|
+
*
|
|
87
|
+
* @example
|
|
88
|
+
* await client.extractors.create({
|
|
89
|
+
* name: "Invoice Extractor",
|
|
90
|
+
* generate: {
|
|
91
|
+
* files: [{
|
|
92
|
+
* url: "https://example.com/sample-invoice.pdf"
|
|
93
|
+
* }],
|
|
94
|
+
* instructions: "US tax invoice with line items, vendor details, and total amount"
|
|
95
|
+
* }
|
|
96
|
+
* })
|
|
75
97
|
*/
|
|
76
98
|
create(request: Extend.ExtractorsCreateRequest, requestOptions?: ExtractorsClient.RequestOptions): core.HttpResponsePromise<Extend.Extractor>;
|
|
77
99
|
private __create;
|
|
@@ -152,6 +152,8 @@ class ExtractorsClient {
|
|
|
152
152
|
/**
|
|
153
153
|
* Create a new extractor.
|
|
154
154
|
*
|
|
155
|
+
* You can optionally provide a `generate` object to automatically generate an extraction schema from sample documents using AI. `generate` is mutually exclusive with `config` and `cloneExtractorId`.
|
|
156
|
+
*
|
|
155
157
|
* @param {Extend.ExtractorsCreateRequest} request
|
|
156
158
|
* @param {ExtractorsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
157
159
|
*
|
|
@@ -172,21 +174,41 @@ class ExtractorsClient {
|
|
|
172
174
|
* "type": "object",
|
|
173
175
|
* "properties": {
|
|
174
176
|
* "vendor_name": {
|
|
175
|
-
* "type":
|
|
177
|
+
* "type": [
|
|
178
|
+
* "string",
|
|
179
|
+
* "null"
|
|
180
|
+
* ],
|
|
176
181
|
* "description": "The name of the vendor"
|
|
177
182
|
* },
|
|
178
183
|
* "invoice_number": {
|
|
179
|
-
* "type":
|
|
184
|
+
* "type": [
|
|
185
|
+
* "string",
|
|
186
|
+
* "null"
|
|
187
|
+
* ],
|
|
180
188
|
* "description": "The invoice number"
|
|
181
189
|
* },
|
|
182
190
|
* "total_amount": {
|
|
183
|
-
* "type":
|
|
191
|
+
* "type": [
|
|
192
|
+
* "number",
|
|
193
|
+
* "null"
|
|
194
|
+
* ],
|
|
184
195
|
* "description": "The total amount due"
|
|
185
196
|
* }
|
|
186
197
|
* }
|
|
187
198
|
* }
|
|
188
199
|
* }
|
|
189
200
|
* })
|
|
201
|
+
*
|
|
202
|
+
* @example
|
|
203
|
+
* await client.extractors.create({
|
|
204
|
+
* name: "Invoice Extractor",
|
|
205
|
+
* generate: {
|
|
206
|
+
* files: [{
|
|
207
|
+
* url: "https://example.com/sample-invoice.pdf"
|
|
208
|
+
* }],
|
|
209
|
+
* instructions: "US tax invoice with line items, vendor details, and total amount"
|
|
210
|
+
* }
|
|
211
|
+
* })
|
|
190
212
|
*/
|
|
191
213
|
create(request, requestOptions) {
|
|
192
214
|
return core.HttpResponsePromise.fromPromise(this.__create(request, requestOptions));
|
|
@@ -8,31 +8,57 @@ import type * as Extend from "../../../../index";
|
|
|
8
8
|
* "type": "object",
|
|
9
9
|
* "properties": {
|
|
10
10
|
* "vendor_name": {
|
|
11
|
-
* "type":
|
|
11
|
+
* "type": [
|
|
12
|
+
* "string",
|
|
13
|
+
* "null"
|
|
14
|
+
* ],
|
|
12
15
|
* "description": "The name of the vendor"
|
|
13
16
|
* },
|
|
14
17
|
* "invoice_number": {
|
|
15
|
-
* "type":
|
|
18
|
+
* "type": [
|
|
19
|
+
* "string",
|
|
20
|
+
* "null"
|
|
21
|
+
* ],
|
|
16
22
|
* "description": "The invoice number"
|
|
17
23
|
* },
|
|
18
24
|
* "total_amount": {
|
|
19
|
-
* "type":
|
|
25
|
+
* "type": [
|
|
26
|
+
* "number",
|
|
27
|
+
* "null"
|
|
28
|
+
* ],
|
|
20
29
|
* "description": "The total amount due"
|
|
21
30
|
* }
|
|
22
31
|
* }
|
|
23
32
|
* }
|
|
24
33
|
* }
|
|
25
34
|
* }
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* {
|
|
38
|
+
* name: "Invoice Extractor",
|
|
39
|
+
* generate: {
|
|
40
|
+
* files: [{
|
|
41
|
+
* url: "https://example.com/sample-invoice.pdf"
|
|
42
|
+
* }],
|
|
43
|
+
* instructions: "US tax invoice with line items, vendor details, and total amount"
|
|
44
|
+
* }
|
|
45
|
+
* }
|
|
26
46
|
*/
|
|
27
47
|
export interface ExtractorsCreateRequest {
|
|
28
48
|
/** The name of the extractor. */
|
|
29
49
|
name: string;
|
|
30
50
|
/**
|
|
31
|
-
* The ID of an existing extractor to clone. If provided, the new extractor will be created with the same config as the extractor with this ID. Cannot be provided together with `config`.
|
|
51
|
+
* The ID of an existing extractor to clone. If provided, the new extractor will be created with the same config as the extractor with this ID. Cannot be provided together with `config` or `generate`.
|
|
32
52
|
*
|
|
33
53
|
* Example: `"ex_BMdfq_yWM3sT-ZzvCnA3f"`
|
|
34
54
|
*/
|
|
35
55
|
cloneExtractorId?: string;
|
|
36
|
-
/** The configuration for the extractor. Cannot be provided together with `cloneExtractorId`. */
|
|
56
|
+
/** The configuration for the extractor. Cannot be provided together with `cloneExtractorId` or `generate`. */
|
|
37
57
|
config?: Extend.ExtractConfigJson;
|
|
58
|
+
/**
|
|
59
|
+
* If provided, an extraction schema is automatically generated from the supplied sample documents and applied to the extractor's draft. The response includes the extractor with the generated schema already in place.
|
|
60
|
+
*
|
|
61
|
+
* Cannot be provided together with `config` or `cloneExtractorId`.
|
|
62
|
+
*/
|
|
63
|
+
generate?: Extend.ExtractorsCreateRequestGenerate;
|
|
38
64
|
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type * as Extend from "../../../index";
|
|
2
|
+
/**
|
|
3
|
+
* If provided, an extraction schema is automatically generated from the supplied sample documents and applied to the extractor's draft. The response includes the extractor with the generated schema already in place.
|
|
4
|
+
*
|
|
5
|
+
* Cannot be provided together with `config` or `cloneExtractorId`.
|
|
6
|
+
*/
|
|
7
|
+
export interface ExtractorsCreateRequestGenerate {
|
|
8
|
+
/** One to five sample documents used to generate the schema. Each item is either a file URL (downloaded inline) or an existing Extend file ID. */
|
|
9
|
+
files: Extend.ExtractorsCreateRequestGenerateFilesItem[];
|
|
10
|
+
/** Optional, but recommended. Describe the type of document, kinds of fields you want to extract, key requirements, and rules to follow. More context is better. */
|
|
11
|
+
instructions?: string;
|
|
12
|
+
}
|
|
@@ -14,4 +14,6 @@ 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("./ExtractorsCreateRequestGenerate"), exports);
|
|
18
|
+
__exportStar(require("./ExtractorsCreateRequestGenerateFilesItem"), exports);
|
|
17
19
|
__exportStar(require("./ExtractorsListResponse"), exports);
|
package/api/resources/index.d.ts
CHANGED
|
@@ -17,11 +17,14 @@ export * from "./editRuns/types";
|
|
|
17
17
|
export * as editSchemas from "./editSchemas";
|
|
18
18
|
export * from "./editSchemas/client/requests";
|
|
19
19
|
export * from "./editSchemas/types";
|
|
20
|
+
export * as editTemplates from "./editTemplates";
|
|
21
|
+
export * from "./editTemplates/client/requests";
|
|
20
22
|
export * as evaluationSetItems from "./evaluationSetItems";
|
|
21
23
|
export * from "./evaluationSetItems/client/requests";
|
|
22
24
|
export * from "./evaluationSetItems/types";
|
|
23
25
|
export * as evaluationSetRuns from "./evaluationSetRuns";
|
|
24
26
|
export * from "./evaluationSetRuns/client/requests";
|
|
27
|
+
export * from "./evaluationSetRuns/types";
|
|
25
28
|
export * as evaluationSets from "./evaluationSets";
|
|
26
29
|
export * from "./evaluationSets/client/requests";
|
|
27
30
|
export * from "./evaluationSets/types";
|
package/api/resources/index.js
CHANGED
|
@@ -36,7 +36,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
36
36
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.workflowVersions = exports.workflows = exports.workflowRuns = exports.webhookSubscriptions = exports.webhookEndpoints = exports.splitterVersions = exports.splitters = exports.splitRuns = exports.processorVersion = exports.processorRun = exports.processor = exports.parseRuns = exports.files = exports.extractRuns = exports.extractorVersions = exports.extractors = exports.evaluationSets = exports.evaluationSetRuns = exports.evaluationSetItems = exports.editSchemas = exports.editRuns = exports.classifyRuns = exports.classifierVersions = exports.classifiers = exports.batchRuns = exports.batchProcessorRun = void 0;
|
|
39
|
+
exports.workflowVersions = exports.workflows = exports.workflowRuns = exports.webhookSubscriptions = exports.webhookEndpoints = exports.splitterVersions = exports.splitters = exports.splitRuns = exports.processorVersion = exports.processorRun = exports.processor = exports.parseRuns = exports.files = exports.extractRuns = exports.extractorVersions = exports.extractors = exports.evaluationSets = exports.evaluationSetRuns = exports.evaluationSetItems = exports.editTemplates = exports.editSchemas = exports.editRuns = exports.classifyRuns = exports.classifierVersions = exports.classifiers = exports.batchRuns = exports.batchProcessorRun = void 0;
|
|
40
40
|
exports.batchProcessorRun = __importStar(require("./batchProcessorRun"));
|
|
41
41
|
__exportStar(require("./batchProcessorRun/client/requests"), exports);
|
|
42
42
|
__exportStar(require("./batchProcessorRun/types"), exports);
|
|
@@ -56,11 +56,14 @@ __exportStar(require("./editRuns/types"), exports);
|
|
|
56
56
|
exports.editSchemas = __importStar(require("./editSchemas"));
|
|
57
57
|
__exportStar(require("./editSchemas/client/requests"), exports);
|
|
58
58
|
__exportStar(require("./editSchemas/types"), exports);
|
|
59
|
+
exports.editTemplates = __importStar(require("./editTemplates"));
|
|
60
|
+
__exportStar(require("./editTemplates/client/requests"), exports);
|
|
59
61
|
exports.evaluationSetItems = __importStar(require("./evaluationSetItems"));
|
|
60
62
|
__exportStar(require("./evaluationSetItems/client/requests"), exports);
|
|
61
63
|
__exportStar(require("./evaluationSetItems/types"), exports);
|
|
62
64
|
exports.evaluationSetRuns = __importStar(require("./evaluationSetRuns"));
|
|
63
65
|
__exportStar(require("./evaluationSetRuns/client/requests"), exports);
|
|
66
|
+
__exportStar(require("./evaluationSetRuns/types"), exports);
|
|
64
67
|
exports.evaluationSets = __importStar(require("./evaluationSets"));
|
|
65
68
|
__exportStar(require("./evaluationSets/client/requests"), exports);
|
|
66
69
|
__exportStar(require("./evaluationSets/types"), exports);
|
|
@@ -11,7 +11,7 @@ export declare class ParseRunsClient {
|
|
|
11
11
|
protected readonly _options: NormalizedClientOptionsWithAuth<ParseRunsClient.Options>;
|
|
12
12
|
constructor(options: ParseRunsClient.Options);
|
|
13
13
|
/**
|
|
14
|
-
* List parse runs, with optional filters for status, batch ID, and file name.
|
|
14
|
+
* List parse runs, with optional filters for status, batch ID, source, and file name.
|
|
15
15
|
*
|
|
16
16
|
* Returns a paginated list of parse runs. Use `GET /parse_runs/{id}` to retrieve the full result including output for a specific run.
|
|
17
17
|
*
|
|
@@ -56,7 +56,7 @@ class ParseRunsClient {
|
|
|
56
56
|
this._options = (0, BaseClient_1.normalizeClientOptionsWithAuth)(options);
|
|
57
57
|
}
|
|
58
58
|
/**
|
|
59
|
-
* List parse runs, with optional filters for status, batch ID, and file name.
|
|
59
|
+
* List parse runs, with optional filters for status, batch ID, source, and file name.
|
|
60
60
|
*
|
|
61
61
|
* Returns a paginated list of parse runs. Use `GET /parse_runs/{id}` to retrieve the full result including output for a specific run.
|
|
62
62
|
*
|
|
@@ -83,10 +83,12 @@ class ParseRunsClient {
|
|
|
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, batchId, fileNameContains, nextPageToken, maxPageSize, "x-extend-workspace-id": extendWorkspaceId, } = request;
|
|
86
|
+
const { status, batchId, source, sourceId, fileNameContains, nextPageToken, maxPageSize, "x-extend-workspace-id": extendWorkspaceId, } = request;
|
|
87
87
|
const _queryParams = {
|
|
88
88
|
status: status != null ? status : undefined,
|
|
89
89
|
batchId,
|
|
90
|
+
source: source != null ? source : undefined,
|
|
91
|
+
sourceId,
|
|
90
92
|
fileNameContains,
|
|
91
93
|
nextPageToken,
|
|
92
94
|
maxPageSize,
|
|
@@ -14,6 +14,14 @@ export interface ParseRunsListRequest {
|
|
|
14
14
|
* Example: `"bpar_Xj8mK2pL9nR4vT7qY5wZ"`
|
|
15
15
|
*/
|
|
16
16
|
batchId?: string;
|
|
17
|
+
/**
|
|
18
|
+
* Filters parse runs by the source that created them. If not provided, runs from all sources are returned.
|
|
19
|
+
*
|
|
20
|
+
* **Note:** When `batchId` is provided, it takes precedence and this filter is ignored.
|
|
21
|
+
*/
|
|
22
|
+
source?: Extend.ParseRunSource;
|
|
23
|
+
/** Filters runs by the source ID. */
|
|
24
|
+
sourceId?: Extend.RunSourceId;
|
|
17
25
|
/**
|
|
18
26
|
* Filters runs by the name of the file. Only returns runs where the file name contains this string.
|
|
19
27
|
*
|
|
@@ -56,7 +56,7 @@ export declare class WebhookEndpointsClient {
|
|
|
56
56
|
* url: "https://example.com/webhooks",
|
|
57
57
|
* name: "Production webhook",
|
|
58
58
|
* enabledEvents: ["extract_run.processed", "workflow.created"],
|
|
59
|
-
* apiVersion: "
|
|
59
|
+
* apiVersion: "apiVersion"
|
|
60
60
|
* })
|
|
61
61
|
*/
|
|
62
62
|
create(request: Extend.WebhookEndpointsCreateRequest, requestOptions?: WebhookEndpointsClient.RequestOptions): core.HttpResponsePromise<Extend.WebhookEndpointCreate>;
|
|
@@ -171,7 +171,7 @@ class WebhookEndpointsClient {
|
|
|
171
171
|
* url: "https://example.com/webhooks",
|
|
172
172
|
* name: "Production webhook",
|
|
173
173
|
* enabledEvents: ["extract_run.processed", "workflow.created"],
|
|
174
|
-
* apiVersion: "
|
|
174
|
+
* apiVersion: "apiVersion"
|
|
175
175
|
* })
|
|
176
176
|
*/
|
|
177
177
|
create(request, requestOptions) {
|
|
@@ -5,7 +5,7 @@ import type * as Extend from "../../../../index";
|
|
|
5
5
|
* url: "https://example.com/webhooks",
|
|
6
6
|
* name: "Production webhook",
|
|
7
7
|
* enabledEvents: ["extract_run.processed", "workflow.created"],
|
|
8
|
-
* apiVersion: "
|
|
8
|
+
* apiVersion: "apiVersion"
|
|
9
9
|
* }
|
|
10
10
|
*/
|
|
11
11
|
export interface WebhookEndpointsCreateRequest {
|
|
@@ -1,9 +1 @@
|
|
|
1
|
-
export
|
|
2
|
-
readonly TwoThousandTwentySix0209: "2026-02-09";
|
|
3
|
-
readonly TwoThousandTwentyFive0421: "2025-04-21";
|
|
4
|
-
readonly TwoThousandTwentyFour1223: "2024-12-23";
|
|
5
|
-
readonly TwoThousandTwentyFour1114: "2024-11-14";
|
|
6
|
-
readonly TwoThousandTwentyFour0730: "2024-07-30";
|
|
7
|
-
readonly TwoThousandTwentyFour0201: "2024-02-01";
|
|
8
|
-
};
|
|
9
|
-
export type ApiVersionEnum = (typeof ApiVersionEnum)[keyof typeof ApiVersionEnum] | string;
|
|
1
|
+
export type ApiVersionEnum = string;
|
|
@@ -1,12 +1,3 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
// This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
-
exports.ApiVersionEnum = void 0;
|
|
5
|
-
exports.ApiVersionEnum = {
|
|
6
|
-
TwoThousandTwentySix0209: "2026-02-09",
|
|
7
|
-
TwoThousandTwentyFive0421: "2025-04-21",
|
|
8
|
-
TwoThousandTwentyFour1223: "2024-12-23",
|
|
9
|
-
TwoThousandTwentyFour1114: "2024-11-14",
|
|
10
|
-
TwoThousandTwentyFour0730: "2024-07-30",
|
|
11
|
-
TwoThousandTwentyFour0201: "2024-02-01",
|
|
12
|
-
};
|
|
@@ -4,5 +4,7 @@ export interface ClassifyAdvancedOptions {
|
|
|
4
4
|
context?: Extend.ClassifyAdvancedOptionsContext;
|
|
5
5
|
/** Enable advanced multimodal processing for better handling of visual elements during classification. */
|
|
6
6
|
advancedMultimodalEnabled?: boolean;
|
|
7
|
+
/** Enable memory for enhanced processing by learning from past successful classifications. */
|
|
8
|
+
memoryEnabled?: boolean;
|
|
7
9
|
pageRanges?: Extend.PageRanges;
|
|
8
10
|
}
|
|
@@ -11,6 +11,13 @@ export interface ClassifyRun {
|
|
|
11
11
|
* Example: `"clr_Xj8mK2pL9nR4vT7qY5wZ"`
|
|
12
12
|
*/
|
|
13
13
|
id: string;
|
|
14
|
+
status: Extend.ProcessorRunStatus;
|
|
15
|
+
/**
|
|
16
|
+
* The final output, either reviewed or initial.
|
|
17
|
+
*
|
|
18
|
+
* **Availability:** Present when `status` is `"PROCESSED"`.
|
|
19
|
+
*/
|
|
20
|
+
output: Extend.ClassifyOutput | null;
|
|
14
21
|
/**
|
|
15
22
|
* The classifier that was used for this run.
|
|
16
23
|
*
|
|
@@ -23,13 +30,6 @@ export interface ClassifyRun {
|
|
|
23
30
|
* **Availability:** Present when a classifier reference was provided. Not present when using inline `config`.
|
|
24
31
|
*/
|
|
25
32
|
classifierVersion: Extend.ClassifierVersionSummary | null;
|
|
26
|
-
status: Extend.ProcessorRunStatus;
|
|
27
|
-
/**
|
|
28
|
-
* The final output, either reviewed or initial.
|
|
29
|
-
*
|
|
30
|
-
* **Availability:** Present when `status` is `"PROCESSED"`.
|
|
31
|
-
*/
|
|
32
|
-
output: Extend.ClassifyOutput | null;
|
|
33
33
|
/**
|
|
34
34
|
* The initial output from the classify run, before any review edits.
|
|
35
35
|
*
|
|
@@ -90,11 +90,9 @@ export interface ClassifyRun {
|
|
|
90
90
|
/** The URL to view the classify run in the Extend dashboard. */
|
|
91
91
|
dashboardUrl: string;
|
|
92
92
|
/**
|
|
93
|
-
* Usage credits consumed by this run.
|
|
93
|
+
* Usage credits consumed by this classify run.
|
|
94
94
|
*
|
|
95
|
-
* **Availability:**
|
|
96
|
-
* * Runs created before October 7, 2025
|
|
97
|
-
* * Customers on legacy billing systems
|
|
95
|
+
* **Availability:** Present when `status` is `"PROCESSED"`. Will not be returned for runs created before October 7, 2025 or for customers on legacy billing systems.
|
|
98
96
|
*/
|
|
99
97
|
usage: Extend.RunUsage | null;
|
|
100
98
|
createdAt: Extend.CreatedAt;
|
|
@@ -53,13 +53,11 @@ export interface ClassifyRunSummary {
|
|
|
53
53
|
/** The URL to view the classify run in the Extend dashboard. */
|
|
54
54
|
dashboardUrl: string;
|
|
55
55
|
/**
|
|
56
|
-
* Usage credits consumed by this run.
|
|
56
|
+
* Usage credits consumed by this classify run. Omits `breakdown` — fetch the full classify run by id to see the per-line items.
|
|
57
57
|
*
|
|
58
|
-
* **Availability:**
|
|
59
|
-
* * Runs created before October 7, 2025
|
|
60
|
-
* * Customers on legacy billing systems
|
|
58
|
+
* **Availability:** Present when `status` is `"PROCESSED"`. Will not be returned for runs created before October 7, 2025 or for customers on legacy billing systems.
|
|
61
59
|
*/
|
|
62
|
-
usage: Extend.
|
|
60
|
+
usage: Extend.RunUsageSummary | null;
|
|
63
61
|
createdAt: Extend.CreatedAt;
|
|
64
62
|
updatedAt: Extend.UpdatedAt;
|
|
65
63
|
}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
export interface EditConfigAdvancedOptions {
|
|
5
5
|
/** Whether to parse table regions as arrays of objects. Defaults to `false`. */
|
|
6
6
|
tableParsingEnabled?: boolean;
|
|
7
|
-
/** Whether to flatten
|
|
7
|
+
/** Whether to flatten PDF forms after editing (makes form fields non-editable). Defaults to `true`. */
|
|
8
8
|
flattenPdf?: boolean;
|
|
9
9
|
/** Whether to model radio fields as enums. This ensures only one radio widget is filled. Defaults to false. */
|
|
10
10
|
radioEnumsEnabled?: boolean;
|
package/api/types/EditRun.d.ts
CHANGED
|
@@ -62,7 +62,7 @@ export interface EditRun {
|
|
|
62
62
|
*/
|
|
63
63
|
metrics: Extend.EditRunMetrics | null;
|
|
64
64
|
/**
|
|
65
|
-
* Usage credits consumed by this run.
|
|
65
|
+
* Usage credits consumed by this edit run.
|
|
66
66
|
*
|
|
67
67
|
* **Availability:** Present when `status` is `"PROCESSED"`, the run was created after October 7, 2025, and the customer is on the current billing system.
|
|
68
68
|
*/
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import type * as Extend from "../index";
|
|
2
|
+
/**
|
|
3
|
+
* A saved edit template. Edit templates contain a source file, default edit configuration, and optional schema generation configuration that can be reused for edit runs.
|
|
4
|
+
*/
|
|
5
|
+
export interface EditTemplate {
|
|
6
|
+
/** The type of object. Will always be `"edit_template"`. */
|
|
7
|
+
object: "edit_template";
|
|
8
|
+
/**
|
|
9
|
+
* A unique identifier for the edit template.
|
|
10
|
+
*
|
|
11
|
+
* Example: `"edt_xK9mLPqRtN3vS8wF5hB2cQ"`
|
|
12
|
+
*/
|
|
13
|
+
id: string;
|
|
14
|
+
/** The name of the edit template. */
|
|
15
|
+
name: string;
|
|
16
|
+
/** The description of the edit template, if one was provided. */
|
|
17
|
+
description: string | null;
|
|
18
|
+
/** The source file associated with this edit template. */
|
|
19
|
+
file: Extend.FileSummary;
|
|
20
|
+
/** Default edit configuration saved on the template. Empty when no edit configuration was saved. */
|
|
21
|
+
config: Extend.EditConfig;
|
|
22
|
+
/** Optional schema generation configuration saved on the template. */
|
|
23
|
+
schemaConfig: Extend.EditSchemaGenerationConfig | null;
|
|
24
|
+
createdAt: Extend.CreatedAt;
|
|
25
|
+
updatedAt: Extend.UpdatedAt;
|
|
26
|
+
}
|
|
@@ -6,6 +6,13 @@ export interface ExtractAdvancedOptions {
|
|
|
6
6
|
advancedMultimodalEnabled?: boolean;
|
|
7
7
|
/** Whether to enable citations in the output. */
|
|
8
8
|
citationsEnabled?: boolean;
|
|
9
|
+
/**
|
|
10
|
+
* Controls the granularity of citations returned alongside extracted values. Requires `citationsEnabled=true` and a base processor version that supports bounding box citations.
|
|
11
|
+
* - `line`: Use OCR lines for citations. This can return one or more relevant OCR lines for each citation. This is the default mode.
|
|
12
|
+
* - `word`: Narrow each matched citation down to the relevant OCR word span when possible. Note: this might still return line citations in cases where the citation model is unable to reliably narrow down to a word-level citation. Typically, this only makes sense when you are doing array extraction and want precise word citations from a given cell in a table to match an array property, e.g. `line_items.total`.
|
|
13
|
+
* - `block`: Use parser blocks (e.g. full paragraphs, key-val regions, tables, lists, etc.) and return block-level polygons for each citation. Will have highest recall in terms of overlap with the extracted value source, but least granularity.
|
|
14
|
+
*/
|
|
15
|
+
citationMode?: Extend.ExtractAdvancedOptionsCitationMode;
|
|
9
16
|
/** Granularity for array citations. This requires citationsEnabled=true and a base processor version that supports property-level array citations (extraction_performance ≥ 4.4.0). */
|
|
10
17
|
arrayCitationStrategy?: Extend.ExtractAdvancedOptionsArrayCitationStrategy;
|
|
11
18
|
/** Strategy for handling large arrays in documents. */
|
|
@@ -25,4 +32,6 @@ export interface ExtractAdvancedOptions {
|
|
|
25
32
|
* To learn more, view the [Review Agent Documentation](https://docs.extend.ai/2026-02-09/product/extraction/review-agent)
|
|
26
33
|
*/
|
|
27
34
|
reviewAgent?: Extend.ExtractAdvancedOptionsReviewAgent;
|
|
35
|
+
/** Whether to include the current date as context for the model during extraction. Defaults to `false`. */
|
|
36
|
+
currentDateEnabled?: boolean;
|
|
28
37
|
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Controls the granularity of citations returned alongside extracted values. Requires `citationsEnabled=true` and a base processor version that supports bounding box citations.
|
|
3
|
+
* - `line`: Use OCR lines for citations. This can return one or more relevant OCR lines for each citation. This is the default mode.
|
|
4
|
+
* - `word`: Narrow each matched citation down to the relevant OCR word span when possible. Note: this might still return line citations in cases where the citation model is unable to reliably narrow down to a word-level citation. Typically, this only makes sense when you are doing array extraction and want precise word citations from a given cell in a table to match an array property, e.g. `line_items.total`.
|
|
5
|
+
* - `block`: Use parser blocks (e.g. full paragraphs, key-val regions, tables, lists, etc.) and return block-level polygons for each citation. Will have highest recall in terms of overlap with the extracted value source, but least granularity.
|
|
6
|
+
*/
|
|
7
|
+
export declare const ExtractAdvancedOptionsCitationMode: {
|
|
8
|
+
readonly Line: "line";
|
|
9
|
+
readonly Word: "word";
|
|
10
|
+
readonly Block: "block";
|
|
11
|
+
};
|
|
12
|
+
export type ExtractAdvancedOptionsCitationMode = (typeof ExtractAdvancedOptionsCitationMode)[keyof typeof ExtractAdvancedOptionsCitationMode] | string;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.ExtractAdvancedOptionsCitationMode = void 0;
|
|
5
|
+
/**
|
|
6
|
+
* Controls the granularity of citations returned alongside extracted values. Requires `citationsEnabled=true` and a base processor version that supports bounding box citations.
|
|
7
|
+
* - `line`: Use OCR lines for citations. This can return one or more relevant OCR lines for each citation. This is the default mode.
|
|
8
|
+
* - `word`: Narrow each matched citation down to the relevant OCR word span when possible. Note: this might still return line citations in cases where the citation model is unable to reliably narrow down to a word-level citation. Typically, this only makes sense when you are doing array extraction and want precise word citations from a given cell in a table to match an array property, e.g. `line_items.total`.
|
|
9
|
+
* - `block`: Use parser blocks (e.g. full paragraphs, key-val regions, tables, lists, etc.) and return block-level polygons for each citation. Will have highest recall in terms of overlap with the extracted value source, but least granularity.
|
|
10
|
+
*/
|
|
11
|
+
exports.ExtractAdvancedOptionsCitationMode = {
|
|
12
|
+
Line: "line",
|
|
13
|
+
Word: "word",
|
|
14
|
+
Block: "block",
|
|
15
|
+
};
|