extend-ai 1.3.0 → 1.4.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 +4 -2
- package/Client.js +4 -2
- package/api/client/requests/SplitRequest.d.ts +4 -2
- package/api/resources/splitters/client/Client.d.ts +4 -2
- package/api/resources/splitters/client/Client.js +4 -2
- package/api/resources/splitters/client/requests/SplittersCreateRequest.d.ts +4 -2
- package/api/types/EditConfigAdvancedOptions.d.ts +4 -0
- package/api/types/EditJson.d.ts +2 -0
- package/api/types/LegacySplitterAdvancedOptions.d.ts +5 -1
- package/api/types/LegacySplitterAdvancedOptionsSplitMethod.d.ts +5 -1
- package/api/types/LegacySplitterAdvancedOptionsSplitMethod.js +5 -1
- package/api/types/SplitAdvancedOptions.d.ts +10 -2
- package/api/types/SplitAdvancedOptionsSplitMethod.d.ts +5 -1
- package/api/types/SplitAdvancedOptionsSplitMethod.js +5 -1
- package/api/types/SplitClassification.d.ts +19 -0
- package/api/types/SplitClassification.js +3 -0
- package/api/types/SplitClassifications.d.ts +5 -0
- package/api/types/SplitClassifications.js +3 -0
- package/api/types/SplitConfig.d.ts +1 -1
- package/api/types/SplitOverrideConfig.d.ts +1 -1
- package/api/types/index.d.ts +2 -0
- package/api/types/index.js +2 -0
- package/package.json +1 -1
- package/reference.md +8 -4
- package/version.d.ts +1 -1
- package/version.js +1 -1
package/BaseClient.js
CHANGED
|
@@ -44,8 +44,8 @@ function normalizeClientOptions(options) {
|
|
|
44
44
|
const headers = (0, headers_1.mergeHeaders)({
|
|
45
45
|
"X-Fern-Language": "JavaScript",
|
|
46
46
|
"X-Fern-SDK-Name": "extend-ai",
|
|
47
|
-
"X-Fern-SDK-Version": "1.
|
|
48
|
-
"User-Agent": "extend-ai/1.
|
|
47
|
+
"X-Fern-SDK-Version": "1.4.0",
|
|
48
|
+
"User-Agent": "extend-ai/1.4.0",
|
|
49
49
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
50
50
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
51
51
|
"x-extend-api-version": (_a = options === null || options === void 0 ? void 0 : options.extendApiVersion) !== null && _a !== void 0 ? _a : "2026-02-09",
|
package/Client.d.ts
CHANGED
|
@@ -267,11 +267,13 @@ export declare class ExtendClient {
|
|
|
267
267
|
* splitClassifications: [{
|
|
268
268
|
* id: "invoice",
|
|
269
269
|
* type: "invoice",
|
|
270
|
-
* description: "An invoice or bill for goods or services"
|
|
270
|
+
* description: "An invoice or bill for goods or services",
|
|
271
|
+
* identifierKey: "invoice number from the document header"
|
|
271
272
|
* }, {
|
|
272
273
|
* id: "receipt",
|
|
273
274
|
* type: "receipt",
|
|
274
|
-
* description: "A receipt confirming payment"
|
|
275
|
+
* description: "A receipt confirming payment",
|
|
276
|
+
* identifierKey: "receipt number"
|
|
275
277
|
* }, {
|
|
276
278
|
* id: "other",
|
|
277
279
|
* type: "other",
|
package/Client.js
CHANGED
|
@@ -581,11 +581,13 @@ class ExtendClient {
|
|
|
581
581
|
* splitClassifications: [{
|
|
582
582
|
* id: "invoice",
|
|
583
583
|
* type: "invoice",
|
|
584
|
-
* description: "An invoice or bill for goods or services"
|
|
584
|
+
* description: "An invoice or bill for goods or services",
|
|
585
|
+
* identifierKey: "invoice number from the document header"
|
|
585
586
|
* }, {
|
|
586
587
|
* id: "receipt",
|
|
587
588
|
* type: "receipt",
|
|
588
|
-
* description: "A receipt confirming payment"
|
|
589
|
+
* description: "A receipt confirming payment",
|
|
590
|
+
* identifierKey: "receipt number"
|
|
589
591
|
* }, {
|
|
590
592
|
* id: "other",
|
|
591
593
|
* type: "other",
|
|
@@ -6,11 +6,13 @@ import type * as Extend from "../../index";
|
|
|
6
6
|
* splitClassifications: [{
|
|
7
7
|
* id: "invoice",
|
|
8
8
|
* type: "invoice",
|
|
9
|
-
* description: "An invoice or bill for goods or services"
|
|
9
|
+
* description: "An invoice or bill for goods or services",
|
|
10
|
+
* identifierKey: "invoice number from the document header"
|
|
10
11
|
* }, {
|
|
11
12
|
* id: "receipt",
|
|
12
13
|
* type: "receipt",
|
|
13
|
-
* description: "A receipt confirming payment"
|
|
14
|
+
* description: "A receipt confirming payment",
|
|
15
|
+
* identifierKey: "receipt number"
|
|
14
16
|
* }, {
|
|
15
17
|
* id: "other",
|
|
16
18
|
* type: "other",
|
|
@@ -56,11 +56,13 @@ export declare class SplittersClient {
|
|
|
56
56
|
* splitClassifications: [{
|
|
57
57
|
* id: "invoice",
|
|
58
58
|
* type: "invoice",
|
|
59
|
-
* description: "An invoice or bill for goods or services"
|
|
59
|
+
* description: "An invoice or bill for goods or services",
|
|
60
|
+
* identifierKey: "invoice number from the document header"
|
|
60
61
|
* }, {
|
|
61
62
|
* id: "receipt",
|
|
62
63
|
* type: "receipt",
|
|
63
|
-
* description: "A receipt confirming payment"
|
|
64
|
+
* description: "A receipt confirming payment",
|
|
65
|
+
* identifierKey: "receipt number"
|
|
64
66
|
* }, {
|
|
65
67
|
* id: "other",
|
|
66
68
|
* type: "other",
|
|
@@ -157,11 +157,13 @@ class SplittersClient {
|
|
|
157
157
|
* splitClassifications: [{
|
|
158
158
|
* id: "invoice",
|
|
159
159
|
* type: "invoice",
|
|
160
|
-
* description: "An invoice or bill for goods or services"
|
|
160
|
+
* description: "An invoice or bill for goods or services",
|
|
161
|
+
* identifierKey: "invoice number from the document header"
|
|
161
162
|
* }, {
|
|
162
163
|
* id: "receipt",
|
|
163
164
|
* type: "receipt",
|
|
164
|
-
* description: "A receipt confirming payment"
|
|
165
|
+
* description: "A receipt confirming payment",
|
|
166
|
+
* identifierKey: "receipt number"
|
|
165
167
|
* }, {
|
|
166
168
|
* id: "other",
|
|
167
169
|
* type: "other",
|
|
@@ -7,11 +7,13 @@ import type * as Extend from "../../../../index";
|
|
|
7
7
|
* splitClassifications: [{
|
|
8
8
|
* id: "invoice",
|
|
9
9
|
* type: "invoice",
|
|
10
|
-
* description: "An invoice or bill for goods or services"
|
|
10
|
+
* description: "An invoice or bill for goods or services",
|
|
11
|
+
* identifierKey: "invoice number from the document header"
|
|
11
12
|
* }, {
|
|
12
13
|
* id: "receipt",
|
|
13
14
|
* type: "receipt",
|
|
14
|
-
* description: "A receipt confirming payment"
|
|
15
|
+
* description: "A receipt confirming payment",
|
|
16
|
+
* identifierKey: "receipt number"
|
|
15
17
|
* }, {
|
|
16
18
|
* id: "other",
|
|
17
19
|
* type: "other",
|
|
@@ -6,4 +6,8 @@ export interface EditConfigAdvancedOptions {
|
|
|
6
6
|
tableParsingEnabled?: boolean;
|
|
7
7
|
/** Whether to flatten the PDF (form widgets will not be editable with a PDF edit). Defaults to `true`. */
|
|
8
8
|
flattenPdf?: boolean;
|
|
9
|
+
/** Whether to model radio fields as enums. This ensures only one radio widget is filled. Defaults to false. */
|
|
10
|
+
radioEnumsEnabled?: boolean;
|
|
11
|
+
/** If enabled, only native AcroForm from the PDF will be imported and used in the schema (skips object detection). Defaults to false. */
|
|
12
|
+
nativeFieldsOnly?: boolean;
|
|
9
13
|
}
|
package/api/types/EditJson.d.ts
CHANGED
|
@@ -33,6 +33,8 @@ export interface EditJson {
|
|
|
33
33
|
*/
|
|
34
34
|
"extend_edit:field_type"?: Extend.EditJsonExtendEditFieldType;
|
|
35
35
|
"extend_edit:bbox"?: Extend.EditBoundingBox;
|
|
36
|
+
/** Array of bounding boxes for radio enums. Enum at index i corresponds to bbox at index i. */
|
|
37
|
+
"extend_edit:bboxes"?: Extend.EditBoundingBox[];
|
|
36
38
|
/** Zero-based page index where the field should be placed */
|
|
37
39
|
"extend_edit:page_index"?: number;
|
|
38
40
|
"extend_edit:text_edit_options"?: Extend.EditTextOptions;
|
|
@@ -2,7 +2,11 @@ import type * as Extend from "../index";
|
|
|
2
2
|
export interface LegacySplitterAdvancedOptions {
|
|
3
3
|
/** Custom rules for identifying split points. */
|
|
4
4
|
splitIdentifierRules?: string;
|
|
5
|
-
/**
|
|
5
|
+
/**
|
|
6
|
+
* The method to use for splitting documents. `high_precision` is more accurate but slower, while `low_latency` is faster but less precise.
|
|
7
|
+
*
|
|
8
|
+
* **Deprecated:** For `splitting_light` >= 1.3.0 and `splitting_performance` >= 1.5.0, this field has no impact and is ignored if provided. It is still accepted for compatibility with older integrations.
|
|
9
|
+
*/
|
|
6
10
|
splitMethod?: Extend.LegacySplitterAdvancedOptionsSplitMethod;
|
|
7
11
|
/** For Excel documents, split by worksheet. */
|
|
8
12
|
splitExcelDocumentsBySheetEnabled?: boolean;
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
/**
|
|
1
|
+
/**
|
|
2
|
+
* The method to use for splitting documents. `high_precision` is more accurate but slower, while `low_latency` is faster but less precise.
|
|
3
|
+
*
|
|
4
|
+
* **Deprecated:** For `splitting_light` >= 1.3.0 and `splitting_performance` >= 1.5.0, this field has no impact and is ignored if provided. It is still accepted for compatibility with older integrations.
|
|
5
|
+
*/
|
|
2
6
|
export declare const LegacySplitterAdvancedOptionsSplitMethod: {
|
|
3
7
|
readonly HighPrecision: "high_precision";
|
|
4
8
|
readonly LowLatency: "low_latency";
|
|
@@ -2,7 +2,11 @@
|
|
|
2
2
|
// This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.LegacySplitterAdvancedOptionsSplitMethod = void 0;
|
|
5
|
-
/**
|
|
5
|
+
/**
|
|
6
|
+
* The method to use for splitting documents. `high_precision` is more accurate but slower, while `low_latency` is faster but less precise.
|
|
7
|
+
*
|
|
8
|
+
* **Deprecated:** For `splitting_light` >= 1.3.0 and `splitting_performance` >= 1.5.0, this field has no impact and is ignored if provided. It is still accepted for compatibility with older integrations.
|
|
9
|
+
*/
|
|
6
10
|
exports.LegacySplitterAdvancedOptionsSplitMethod = {
|
|
7
11
|
HighPrecision: "high_precision",
|
|
8
12
|
LowLatency: "low_latency",
|
|
@@ -1,8 +1,16 @@
|
|
|
1
1
|
import type * as Extend from "../index";
|
|
2
2
|
export interface SplitAdvancedOptions {
|
|
3
|
-
/**
|
|
3
|
+
/**
|
|
4
|
+
* Custom rules for identifying split points.
|
|
5
|
+
*
|
|
6
|
+
* **Deprecated:** For `splitting_light` >= 1.3.0 and `splitting_performance` >= 1.5.0, use the `identifierKey` field on each classification in `splitClassifications` instead. This provides per-type identifier extraction rules rather than a single global rule. On those versions, this field is accepted but ignored if provided.
|
|
7
|
+
*/
|
|
4
8
|
splitIdentifierRules?: string;
|
|
5
|
-
/**
|
|
9
|
+
/**
|
|
10
|
+
* The method to use for splitting documents. `high_precision` is more accurate but slower, while `basic_precision` is faster but less precise.
|
|
11
|
+
*
|
|
12
|
+
* **Deprecated:** For `splitting_light` >= 1.3.0 and `splitting_performance` >= 1.5.0, this field has no impact and is ignored if provided. It is still accepted for compatibility with older integrations.
|
|
13
|
+
*/
|
|
6
14
|
splitMethod?: Extend.SplitAdvancedOptionsSplitMethod;
|
|
7
15
|
/** For Excel documents, split by worksheet. */
|
|
8
16
|
splitExcelDocumentsBySheetEnabled?: boolean;
|
|
@@ -1,4 +1,8 @@
|
|
|
1
|
-
/**
|
|
1
|
+
/**
|
|
2
|
+
* The method to use for splitting documents. `high_precision` is more accurate but slower, while `basic_precision` is faster but less precise.
|
|
3
|
+
*
|
|
4
|
+
* **Deprecated:** For `splitting_light` >= 1.3.0 and `splitting_performance` >= 1.5.0, this field has no impact and is ignored if provided. It is still accepted for compatibility with older integrations.
|
|
5
|
+
*/
|
|
2
6
|
export declare const SplitAdvancedOptionsSplitMethod: {
|
|
3
7
|
readonly HighPrecision: "high_precision";
|
|
4
8
|
readonly BasicPrecision: "basic_precision";
|
|
@@ -2,7 +2,11 @@
|
|
|
2
2
|
// This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
4
|
exports.SplitAdvancedOptionsSplitMethod = void 0;
|
|
5
|
-
/**
|
|
5
|
+
/**
|
|
6
|
+
* The method to use for splitting documents. `high_precision` is more accurate but slower, while `basic_precision` is faster but less precise.
|
|
7
|
+
*
|
|
8
|
+
* **Deprecated:** For `splitting_light` >= 1.3.0 and `splitting_performance` >= 1.5.0, this field has no impact and is ignored if provided. It is still accepted for compatibility with older integrations.
|
|
9
|
+
*/
|
|
6
10
|
exports.SplitAdvancedOptionsSplitMethod = {
|
|
7
11
|
HighPrecision: "high_precision",
|
|
8
12
|
BasicPrecision: "basic_precision",
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* A classification for document splitting. Extends the base Classification with an optional `identifierKey` field for per-type identifier extraction rules.
|
|
3
|
+
*/
|
|
4
|
+
export interface SplitClassification {
|
|
5
|
+
/** Unique identifier for the classification. We recommend lowercase, underscore-separated format. */
|
|
6
|
+
id: string;
|
|
7
|
+
/** Type identifier for the classification. */
|
|
8
|
+
type: string;
|
|
9
|
+
/** A detailed description of the classification. */
|
|
10
|
+
description: string;
|
|
11
|
+
/**
|
|
12
|
+
* A natural-language rule describing how to extract a unique identifier for subdocuments of this type. For example, `"Extract the invoice number from the document header"`.
|
|
13
|
+
*
|
|
14
|
+
* When provided, the splitter will extract the specified identifier for each subdocument of this type and include it in the output as the `identifier` field. This enables merging of related subdocuments that share the same extracted identifier.
|
|
15
|
+
*
|
|
16
|
+
* **Availability:** Supported on `splitting_light` >= 1.3.0 and `splitting_performance` >= 1.5.0. If provided on older versions, this field is accepted but ignored.
|
|
17
|
+
*/
|
|
18
|
+
identifierKey?: string;
|
|
19
|
+
}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import type * as Extend from "../index";
|
|
2
|
+
/**
|
|
3
|
+
* Array of split classifications that define the possible types of document sections. Must provide at least one classification. At least one classification must have the type `"other"`. Each classification item must have a unique id.
|
|
4
|
+
*/
|
|
5
|
+
export type SplitClassifications = Extend.SplitClassification[];
|
|
@@ -3,7 +3,7 @@ export interface SplitConfig {
|
|
|
3
3
|
baseProcessor?: Extend.SplitBaseProcessor;
|
|
4
4
|
/** The version of the `"splitting_performance"` or `"splitting_light"` processor to use. If not provided, the latest stable version for the selected `baseProcessor` will be used automatically. See [Splitting Changelog](https://docs.extend.ai/2026-02-09/changelog/splitting/splitting-performance) for more details. */
|
|
5
5
|
baseVersion?: string;
|
|
6
|
-
splitClassifications: Extend.
|
|
6
|
+
splitClassifications: Extend.SplitClassifications;
|
|
7
7
|
/** Custom rules to guide the document splitting process in natural language. */
|
|
8
8
|
splitRules?: string;
|
|
9
9
|
/** Advanced configuration options. */
|
|
@@ -7,7 +7,7 @@ export interface SplitOverrideConfig {
|
|
|
7
7
|
baseProcessor?: Extend.SplitBaseProcessor;
|
|
8
8
|
/** The version of the `"splitting_performance"` or `"splitting_light"` processor to use. If not provided, the latest stable version for the selected `baseProcessor` will be used automatically. See [Splitting Changelog](https://docs.extend.ai/2026-02-09/changelog/splitting/splitting-performance) for more details. */
|
|
9
9
|
baseVersion?: string;
|
|
10
|
-
splitClassifications?: Extend.
|
|
10
|
+
splitClassifications?: Extend.SplitClassifications;
|
|
11
11
|
/** Custom rules to guide the document splitting process in natural language. */
|
|
12
12
|
splitRules?: string;
|
|
13
13
|
/** Advanced configuration options. */
|
package/api/types/index.d.ts
CHANGED
|
@@ -282,6 +282,8 @@ export * from "./SortDir";
|
|
|
282
282
|
export * from "./SplitAdvancedOptions";
|
|
283
283
|
export * from "./SplitAdvancedOptionsSplitMethod";
|
|
284
284
|
export * from "./SplitBaseProcessor";
|
|
285
|
+
export * from "./SplitClassification";
|
|
286
|
+
export * from "./SplitClassifications";
|
|
285
287
|
export * from "./SplitConfig";
|
|
286
288
|
export * from "./SplitOutput";
|
|
287
289
|
export * from "./SplitOutputSplitsItem";
|
package/api/types/index.js
CHANGED
|
@@ -298,6 +298,8 @@ __exportStar(require("./SortDir"), exports);
|
|
|
298
298
|
__exportStar(require("./SplitAdvancedOptions"), exports);
|
|
299
299
|
__exportStar(require("./SplitAdvancedOptionsSplitMethod"), exports);
|
|
300
300
|
__exportStar(require("./SplitBaseProcessor"), exports);
|
|
301
|
+
__exportStar(require("./SplitClassification"), exports);
|
|
302
|
+
__exportStar(require("./SplitClassifications"), exports);
|
|
301
303
|
__exportStar(require("./SplitConfig"), exports);
|
|
302
304
|
__exportStar(require("./SplitOutput"), exports);
|
|
303
305
|
__exportStar(require("./SplitOutputSplitsItem"), exports);
|
package/package.json
CHANGED
package/reference.md
CHANGED
|
@@ -370,11 +370,13 @@ await client.split({
|
|
|
370
370
|
splitClassifications: [{
|
|
371
371
|
id: "invoice",
|
|
372
372
|
type: "invoice",
|
|
373
|
-
description: "An invoice or bill for goods or services"
|
|
373
|
+
description: "An invoice or bill for goods or services",
|
|
374
|
+
identifierKey: "invoice number from the document header"
|
|
374
375
|
}, {
|
|
375
376
|
id: "receipt",
|
|
376
377
|
type: "receipt",
|
|
377
|
-
description: "A receipt confirming payment"
|
|
378
|
+
description: "A receipt confirming payment",
|
|
379
|
+
identifierKey: "receipt number"
|
|
378
380
|
}, {
|
|
379
381
|
id: "other",
|
|
380
382
|
type: "other",
|
|
@@ -3332,11 +3334,13 @@ await client.splitters.create({
|
|
|
3332
3334
|
splitClassifications: [{
|
|
3333
3335
|
id: "invoice",
|
|
3334
3336
|
type: "invoice",
|
|
3335
|
-
description: "An invoice or bill for goods or services"
|
|
3337
|
+
description: "An invoice or bill for goods or services",
|
|
3338
|
+
identifierKey: "invoice number from the document header"
|
|
3336
3339
|
}, {
|
|
3337
3340
|
id: "receipt",
|
|
3338
3341
|
type: "receipt",
|
|
3339
|
-
description: "A receipt confirming payment"
|
|
3342
|
+
description: "A receipt confirming payment",
|
|
3343
|
+
identifierKey: "receipt number"
|
|
3340
3344
|
}, {
|
|
3341
3345
|
id: "other",
|
|
3342
3346
|
type: "other",
|
package/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "1.
|
|
1
|
+
export declare const SDK_VERSION = "1.4.0";
|
package/version.js
CHANGED