extend-ai 0.0.13 → 0.0.14

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/Client.js CHANGED
@@ -82,8 +82,8 @@ class ExtendClient {
82
82
  "x-extend-api-version": (_a = _options === null || _options === void 0 ? void 0 : _options.extendApiVersion) !== null && _a !== void 0 ? _a : "2025-04-21",
83
83
  "X-Fern-Language": "JavaScript",
84
84
  "X-Fern-SDK-Name": "extend-ai",
85
- "X-Fern-SDK-Version": "0.0.13",
86
- "User-Agent": "extend-ai/0.0.13",
85
+ "X-Fern-SDK-Version": "0.0.14",
86
+ "User-Agent": "extend-ai/0.0.14",
87
87
  "X-Fern-Runtime": core.RUNTIME.type,
88
88
  "X-Fern-Runtime-Version": core.RUNTIME.version,
89
89
  }, _options === null || _options === void 0 ? void 0 : _options.headers) });
@@ -17,6 +17,15 @@ export interface ExtractionAdvancedOptions {
17
17
  arrayCitationStrategy?: Extend.ExtractionAdvancedOptionsArrayCitationStrategy;
18
18
  /** Whether to enable advanced figure parsing. */
19
19
  advancedFigureParsingEnabled?: boolean;
20
+ /**
21
+ * Configuration for the review agent that analyzes extraction results.
22
+ * When enabled, each field in the output metadata will include a `reviewAgentScore` (1-5)
23
+ * and may include additional `insights` of type `issue` or `review_summary` to help identify
24
+ * fields that may need manual review.
25
+ *
26
+ * To learn more, view the [Review Agent Documentation](https://docs.extend.ai/product/extraction/review-agent)
27
+ */
28
+ reviewAgent?: Extend.ExtractionAdvancedOptionsReviewAgent;
20
29
  /** Strategy for handling large arrays in documents. */
21
30
  arrayStrategy?: Extend.ArrayStrategy;
22
31
  chunkingOptions?: Extend.ExtractChunkingOptions;
@@ -0,0 +1,15 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ /**
5
+ * Configuration for the review agent that analyzes extraction results.
6
+ * When enabled, each field in the output metadata will include a `reviewAgentScore` (1-5)
7
+ * and may include additional `insights` of type `issue` or `review_summary` to help identify
8
+ * fields that may need manual review.
9
+ *
10
+ * To learn more, view the [Review Agent Documentation](https://docs.extend.ai/product/extraction/review-agent)
11
+ */
12
+ export interface ExtractionAdvancedOptionsReviewAgent {
13
+ /** Whether to enable the review agent for the extraction output. */
14
+ enabled?: boolean;
15
+ }
@@ -1,9 +1,15 @@
1
1
  /**
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
+ import * as Extend from "../index";
4
5
  export interface Insight {
5
- /** The type of insight. Will always be `"reasoning"` for now. */
6
- type: "reasoning";
7
- /** The content of the reasoning insight. */
6
+ /**
7
+ * The type of insight:
8
+ * - `reasoning`: Model reasoning about the extraction decision
9
+ * - `issue`: A potential problem or concern identified by the agentic confidence system
10
+ * - `review_summary`: A summary explanation from the agentic confidence system about why the field may need manual review
11
+ */
12
+ type: Extend.InsightType;
13
+ /** The content of the insight. */
8
14
  content: string;
9
15
  }
@@ -0,0 +1,15 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ /**
5
+ * The type of insight:
6
+ * - `reasoning`: Model reasoning about the extraction decision
7
+ * - `issue`: A potential problem or concern identified by the agentic confidence system
8
+ * - `review_summary`: A summary explanation from the agentic confidence system about why the field may need manual review
9
+ */
10
+ export type InsightType = "reasoning" | "issue" | "review_summary";
11
+ export declare const InsightType: {
12
+ readonly Reasoning: "reasoning";
13
+ readonly Issue: "issue";
14
+ readonly ReviewSummary: "review_summary";
15
+ };
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.InsightType = void 0;
7
+ exports.InsightType = {
8
+ Reasoning: "reasoning",
9
+ Issue: "issue",
10
+ ReviewSummary: "review_summary",
11
+ };
@@ -7,6 +7,18 @@ export interface JsonOutputMetadataValue {
7
7
  ocrConfidence?: number;
8
8
  /** Confidence score based on model logprobs */
9
9
  logprobsConfidence?: number;
10
+ /**
11
+ * A 1-5 score indicating the review agent's confidence in the extracted value.
12
+ * - 5: High confidence, no issues detected
13
+ * - 4: Good confidence, minor observations
14
+ * - 3: Moderate confidence, some uncertainty
15
+ * - 2: Low confidence, likely issues
16
+ * - 1: Very low confidence, significant problems detected
17
+ *
18
+ * These scores will be present when the `reviewAgent.enabled` flag is set to `true` in the processor config.
19
+ * To learn more, view the [Review Agent Documentation](https://docs.extend.ai/product/extraction/review-agent)
20
+ */
21
+ reviewAgentScore?: number;
10
22
  citations?: Extend.JsonOutputMetadataValueCitationsItem[];
11
- insights?: Extend.JsonOutputMetadataValueInsightsItem[];
23
+ insights?: Extend.Insight[];
12
24
  }
@@ -7,6 +7,15 @@ export interface OutputMetadataValue {
7
7
  ocrConfidence?: number;
8
8
  /** Confidence score based on model logprobs */
9
9
  logprobsConfidence?: number;
10
+ /**
11
+ * A 1-5 score indicating the review agent's confidence in the extracted value.
12
+ * - 5: High confidence, no issues detected
13
+ * - 4: Good confidence, minor observations
14
+ * - 3: Moderate confidence, some uncertainty
15
+ * - 2: Low confidence, likely issues
16
+ * - 1: Very low confidence, significant problems detected
17
+ */
18
+ reviewAgentScore?: number;
10
19
  citations?: Extend.Citation[];
11
20
  insights?: Extend.Insight[];
12
21
  }
@@ -127,6 +127,7 @@ export * from "./ClassificationAdvancedOptions";
127
127
  export * from "./ExtractionConfigBaseProcessor";
128
128
  export * from "./ExtractionConfig";
129
129
  export * from "./ExtractionAdvancedOptionsArrayCitationStrategy";
130
+ export * from "./ExtractionAdvancedOptionsReviewAgent";
130
131
  export * from "./ExtractionAdvancedOptionsExcelSheetSelectionStrategy";
131
132
  export * from "./ExtractionAdvancedOptions";
132
133
  export * from "./ExtractChunkingOptionsChunkingStrategy";
@@ -156,7 +157,6 @@ export * from "./ProvidedJsonOutput";
156
157
  export * from "./ExtractionOutput";
157
158
  export * from "./JsonOutputMetadataValueCitationsItemPolygonItem";
158
159
  export * from "./JsonOutputMetadataValueCitationsItem";
159
- export * from "./JsonOutputMetadataValueInsightsItem";
160
160
  export * from "./JsonOutputMetadataValue";
161
161
  export * from "./JsonOutput";
162
162
  export * from "./OutputMetadataValue";
@@ -169,6 +169,7 @@ export * from "./ExtractionFieldResult";
169
169
  export * from "./EnumOption";
170
170
  export * from "./ExtractionFieldResultReferenceBoundingBoxesItem";
171
171
  export * from "./ExtractionFieldResultReference";
172
+ export * from "./InsightType";
172
173
  export * from "./Insight";
173
174
  export * from "./ProvidedProcessorOutput";
174
175
  export * from "./ProcessorOutput";
@@ -143,6 +143,7 @@ __exportStar(require("./ClassificationAdvancedOptions"), exports);
143
143
  __exportStar(require("./ExtractionConfigBaseProcessor"), exports);
144
144
  __exportStar(require("./ExtractionConfig"), exports);
145
145
  __exportStar(require("./ExtractionAdvancedOptionsArrayCitationStrategy"), exports);
146
+ __exportStar(require("./ExtractionAdvancedOptionsReviewAgent"), exports);
146
147
  __exportStar(require("./ExtractionAdvancedOptionsExcelSheetSelectionStrategy"), exports);
147
148
  __exportStar(require("./ExtractionAdvancedOptions"), exports);
148
149
  __exportStar(require("./ExtractChunkingOptionsChunkingStrategy"), exports);
@@ -172,7 +173,6 @@ __exportStar(require("./ProvidedJsonOutput"), exports);
172
173
  __exportStar(require("./ExtractionOutput"), exports);
173
174
  __exportStar(require("./JsonOutputMetadataValueCitationsItemPolygonItem"), exports);
174
175
  __exportStar(require("./JsonOutputMetadataValueCitationsItem"), exports);
175
- __exportStar(require("./JsonOutputMetadataValueInsightsItem"), exports);
176
176
  __exportStar(require("./JsonOutputMetadataValue"), exports);
177
177
  __exportStar(require("./JsonOutput"), exports);
178
178
  __exportStar(require("./OutputMetadataValue"), exports);
@@ -185,6 +185,7 @@ __exportStar(require("./ExtractionFieldResult"), exports);
185
185
  __exportStar(require("./EnumOption"), exports);
186
186
  __exportStar(require("./ExtractionFieldResultReferenceBoundingBoxesItem"), exports);
187
187
  __exportStar(require("./ExtractionFieldResultReference"), exports);
188
+ __exportStar(require("./InsightType"), exports);
188
189
  __exportStar(require("./Insight"), exports);
189
190
  __exportStar(require("./ProvidedProcessorOutput"), exports);
190
191
  __exportStar(require("./ProcessorOutput"), exports);
package/dist/Client.js CHANGED
@@ -82,8 +82,8 @@ class ExtendClient {
82
82
  "x-extend-api-version": (_a = _options === null || _options === void 0 ? void 0 : _options.extendApiVersion) !== null && _a !== void 0 ? _a : "2025-04-21",
83
83
  "X-Fern-Language": "JavaScript",
84
84
  "X-Fern-SDK-Name": "extend-ai",
85
- "X-Fern-SDK-Version": "0.0.13",
86
- "User-Agent": "extend-ai/0.0.13",
85
+ "X-Fern-SDK-Version": "0.0.14",
86
+ "User-Agent": "extend-ai/0.0.14",
87
87
  "X-Fern-Runtime": core.RUNTIME.type,
88
88
  "X-Fern-Runtime-Version": core.RUNTIME.version,
89
89
  }, _options === null || _options === void 0 ? void 0 : _options.headers) });
@@ -17,6 +17,15 @@ export interface ExtractionAdvancedOptions {
17
17
  arrayCitationStrategy?: Extend.ExtractionAdvancedOptionsArrayCitationStrategy;
18
18
  /** Whether to enable advanced figure parsing. */
19
19
  advancedFigureParsingEnabled?: boolean;
20
+ /**
21
+ * Configuration for the review agent that analyzes extraction results.
22
+ * When enabled, each field in the output metadata will include a `reviewAgentScore` (1-5)
23
+ * and may include additional `insights` of type `issue` or `review_summary` to help identify
24
+ * fields that may need manual review.
25
+ *
26
+ * To learn more, view the [Review Agent Documentation](https://docs.extend.ai/product/extraction/review-agent)
27
+ */
28
+ reviewAgent?: Extend.ExtractionAdvancedOptionsReviewAgent;
20
29
  /** Strategy for handling large arrays in documents. */
21
30
  arrayStrategy?: Extend.ArrayStrategy;
22
31
  chunkingOptions?: Extend.ExtractChunkingOptions;
@@ -0,0 +1,15 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ /**
5
+ * Configuration for the review agent that analyzes extraction results.
6
+ * When enabled, each field in the output metadata will include a `reviewAgentScore` (1-5)
7
+ * and may include additional `insights` of type `issue` or `review_summary` to help identify
8
+ * fields that may need manual review.
9
+ *
10
+ * To learn more, view the [Review Agent Documentation](https://docs.extend.ai/product/extraction/review-agent)
11
+ */
12
+ export interface ExtractionAdvancedOptionsReviewAgent {
13
+ /** Whether to enable the review agent for the extraction output. */
14
+ enabled?: boolean;
15
+ }
@@ -1,9 +1,15 @@
1
1
  /**
2
2
  * This file was auto-generated by Fern from our API Definition.
3
3
  */
4
+ import * as Extend from "../index";
4
5
  export interface Insight {
5
- /** The type of insight. Will always be `"reasoning"` for now. */
6
- type: "reasoning";
7
- /** The content of the reasoning insight. */
6
+ /**
7
+ * The type of insight:
8
+ * - `reasoning`: Model reasoning about the extraction decision
9
+ * - `issue`: A potential problem or concern identified by the agentic confidence system
10
+ * - `review_summary`: A summary explanation from the agentic confidence system about why the field may need manual review
11
+ */
12
+ type: Extend.InsightType;
13
+ /** The content of the insight. */
8
14
  content: string;
9
15
  }
@@ -0,0 +1,15 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ /**
5
+ * The type of insight:
6
+ * - `reasoning`: Model reasoning about the extraction decision
7
+ * - `issue`: A potential problem or concern identified by the agentic confidence system
8
+ * - `review_summary`: A summary explanation from the agentic confidence system about why the field may need manual review
9
+ */
10
+ export type InsightType = "reasoning" | "issue" | "review_summary";
11
+ export declare const InsightType: {
12
+ readonly Reasoning: "reasoning";
13
+ readonly Issue: "issue";
14
+ readonly ReviewSummary: "review_summary";
15
+ };
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ /**
3
+ * This file was auto-generated by Fern from our API Definition.
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.InsightType = void 0;
7
+ exports.InsightType = {
8
+ Reasoning: "reasoning",
9
+ Issue: "issue",
10
+ ReviewSummary: "review_summary",
11
+ };
@@ -7,6 +7,18 @@ export interface JsonOutputMetadataValue {
7
7
  ocrConfidence?: number;
8
8
  /** Confidence score based on model logprobs */
9
9
  logprobsConfidence?: number;
10
+ /**
11
+ * A 1-5 score indicating the review agent's confidence in the extracted value.
12
+ * - 5: High confidence, no issues detected
13
+ * - 4: Good confidence, minor observations
14
+ * - 3: Moderate confidence, some uncertainty
15
+ * - 2: Low confidence, likely issues
16
+ * - 1: Very low confidence, significant problems detected
17
+ *
18
+ * These scores will be present when the `reviewAgent.enabled` flag is set to `true` in the processor config.
19
+ * To learn more, view the [Review Agent Documentation](https://docs.extend.ai/product/extraction/review-agent)
20
+ */
21
+ reviewAgentScore?: number;
10
22
  citations?: Extend.JsonOutputMetadataValueCitationsItem[];
11
- insights?: Extend.JsonOutputMetadataValueInsightsItem[];
23
+ insights?: Extend.Insight[];
12
24
  }
@@ -7,6 +7,15 @@ export interface OutputMetadataValue {
7
7
  ocrConfidence?: number;
8
8
  /** Confidence score based on model logprobs */
9
9
  logprobsConfidence?: number;
10
+ /**
11
+ * A 1-5 score indicating the review agent's confidence in the extracted value.
12
+ * - 5: High confidence, no issues detected
13
+ * - 4: Good confidence, minor observations
14
+ * - 3: Moderate confidence, some uncertainty
15
+ * - 2: Low confidence, likely issues
16
+ * - 1: Very low confidence, significant problems detected
17
+ */
18
+ reviewAgentScore?: number;
10
19
  citations?: Extend.Citation[];
11
20
  insights?: Extend.Insight[];
12
21
  }
@@ -127,6 +127,7 @@ export * from "./ClassificationAdvancedOptions";
127
127
  export * from "./ExtractionConfigBaseProcessor";
128
128
  export * from "./ExtractionConfig";
129
129
  export * from "./ExtractionAdvancedOptionsArrayCitationStrategy";
130
+ export * from "./ExtractionAdvancedOptionsReviewAgent";
130
131
  export * from "./ExtractionAdvancedOptionsExcelSheetSelectionStrategy";
131
132
  export * from "./ExtractionAdvancedOptions";
132
133
  export * from "./ExtractChunkingOptionsChunkingStrategy";
@@ -156,7 +157,6 @@ export * from "./ProvidedJsonOutput";
156
157
  export * from "./ExtractionOutput";
157
158
  export * from "./JsonOutputMetadataValueCitationsItemPolygonItem";
158
159
  export * from "./JsonOutputMetadataValueCitationsItem";
159
- export * from "./JsonOutputMetadataValueInsightsItem";
160
160
  export * from "./JsonOutputMetadataValue";
161
161
  export * from "./JsonOutput";
162
162
  export * from "./OutputMetadataValue";
@@ -169,6 +169,7 @@ export * from "./ExtractionFieldResult";
169
169
  export * from "./EnumOption";
170
170
  export * from "./ExtractionFieldResultReferenceBoundingBoxesItem";
171
171
  export * from "./ExtractionFieldResultReference";
172
+ export * from "./InsightType";
172
173
  export * from "./Insight";
173
174
  export * from "./ProvidedProcessorOutput";
174
175
  export * from "./ProcessorOutput";
@@ -143,6 +143,7 @@ __exportStar(require("./ClassificationAdvancedOptions"), exports);
143
143
  __exportStar(require("./ExtractionConfigBaseProcessor"), exports);
144
144
  __exportStar(require("./ExtractionConfig"), exports);
145
145
  __exportStar(require("./ExtractionAdvancedOptionsArrayCitationStrategy"), exports);
146
+ __exportStar(require("./ExtractionAdvancedOptionsReviewAgent"), exports);
146
147
  __exportStar(require("./ExtractionAdvancedOptionsExcelSheetSelectionStrategy"), exports);
147
148
  __exportStar(require("./ExtractionAdvancedOptions"), exports);
148
149
  __exportStar(require("./ExtractChunkingOptionsChunkingStrategy"), exports);
@@ -172,7 +173,6 @@ __exportStar(require("./ProvidedJsonOutput"), exports);
172
173
  __exportStar(require("./ExtractionOutput"), exports);
173
174
  __exportStar(require("./JsonOutputMetadataValueCitationsItemPolygonItem"), exports);
174
175
  __exportStar(require("./JsonOutputMetadataValueCitationsItem"), exports);
175
- __exportStar(require("./JsonOutputMetadataValueInsightsItem"), exports);
176
176
  __exportStar(require("./JsonOutputMetadataValue"), exports);
177
177
  __exportStar(require("./JsonOutput"), exports);
178
178
  __exportStar(require("./OutputMetadataValue"), exports);
@@ -185,6 +185,7 @@ __exportStar(require("./ExtractionFieldResult"), exports);
185
185
  __exportStar(require("./EnumOption"), exports);
186
186
  __exportStar(require("./ExtractionFieldResultReferenceBoundingBoxesItem"), exports);
187
187
  __exportStar(require("./ExtractionFieldResultReference"), exports);
188
+ __exportStar(require("./InsightType"), exports);
188
189
  __exportStar(require("./Insight"), exports);
189
190
  __exportStar(require("./ProvidedProcessorOutput"), exports);
190
191
  __exportStar(require("./ProcessorOutput"), exports);
package/dist/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "0.0.13";
1
+ export declare const SDK_VERSION = "0.0.14";
package/dist/version.js CHANGED
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SDK_VERSION = void 0;
4
- exports.SDK_VERSION = "0.0.13";
4
+ exports.SDK_VERSION = "0.0.14";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "extend-ai",
3
- "version": "0.0.13",
3
+ "version": "0.0.14",
4
4
  "private": false,
5
5
  "repository": "github:extend-hq/extend-typescript-sdk",
6
6
  "main": "./index.js",
package/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "0.0.13";
1
+ export declare const SDK_VERSION = "0.0.14";
package/version.js CHANGED
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SDK_VERSION = void 0;
4
- exports.SDK_VERSION = "0.0.13";
4
+ exports.SDK_VERSION = "0.0.14";
@@ -1,9 +0,0 @@
1
- /**
2
- * This file was auto-generated by Fern from our API Definition.
3
- */
4
- export interface JsonOutputMetadataValueInsightsItem {
5
- /** The type of insight */
6
- type: "reasoning";
7
- /** The content of the insight */
8
- content: string;
9
- }
@@ -1,9 +0,0 @@
1
- /**
2
- * This file was auto-generated by Fern from our API Definition.
3
- */
4
- export interface JsonOutputMetadataValueInsightsItem {
5
- /** The type of insight */
6
- type: "reasoning";
7
- /** The content of the insight */
8
- content: string;
9
- }