extend-ai 1.1.0 → 1.3.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 +70 -8
- package/Client.js +78 -12
- package/api/client/requests/ClassifyRequest.d.ts +16 -1
- package/api/client/requests/EditRequest.d.ts +7 -1
- package/api/client/requests/ExtractRequest.d.ts +20 -1
- package/api/client/requests/ParseRequest.d.ts +2 -1
- package/api/client/requests/SplitRequest.d.ts +16 -1
- package/api/resources/batchProcessorRun/client/Client.d.ts +1 -1
- package/api/resources/batchProcessorRun/client/Client.js +1 -1
- package/api/resources/classifierVersions/client/Client.d.ts +2 -1
- package/api/resources/classifierVersions/client/Client.js +2 -1
- package/api/resources/classifierVersions/client/requests/ClassifierVersionsCreateRequest.d.ts +2 -1
- package/api/resources/classifiers/client/Client.d.ts +19 -2
- package/api/resources/classifiers/client/Client.js +19 -2
- package/api/resources/classifiers/client/requests/ClassifiersCreateRequest.d.ts +16 -1
- package/api/resources/classifiers/client/requests/ClassifiersUpdateRequest.d.ts +3 -1
- package/api/resources/classifyRuns/client/Client.d.ts +4 -1
- package/api/resources/classifyRuns/client/Client.js +4 -1
- package/api/resources/classifyRuns/client/requests/ClassifyRunsCreateRequest.d.ts +4 -1
- package/api/resources/editRuns/client/Client.d.ts +7 -1
- package/api/resources/editRuns/client/Client.js +7 -1
- package/api/resources/editRuns/client/requests/EditRunsCreateRequest.d.ts +7 -1
- package/api/resources/evaluationSetItems/client/Client.d.ts +16 -4
- package/api/resources/evaluationSetItems/client/Client.js +16 -4
- package/api/resources/evaluationSetItems/client/requests/EvaluationSetItemsCreateRequest.d.ts +8 -2
- package/api/resources/evaluationSetItems/client/requests/EvaluationSetItemsUpdateRequest.d.ts +7 -1
- package/api/resources/evaluationSets/client/Client.d.ts +4 -3
- package/api/resources/evaluationSets/client/Client.js +4 -3
- package/api/resources/evaluationSets/client/requests/EvaluationSetsCreateRequest.d.ts +3 -2
- package/api/resources/extractRuns/client/Client.d.ts +4 -1
- package/api/resources/extractRuns/client/Client.js +4 -1
- package/api/resources/extractRuns/client/requests/ExtractRunsCreateRequest.d.ts +4 -1
- package/api/resources/extractorVersions/client/Client.d.ts +2 -1
- package/api/resources/extractorVersions/client/Client.js +2 -1
- package/api/resources/extractorVersions/client/requests/ExtractorVersionsCreateRequest.d.ts +2 -1
- package/api/resources/extractors/client/Client.d.ts +23 -2
- package/api/resources/extractors/client/Client.js +23 -2
- package/api/resources/extractors/client/requests/ExtractorsCreateRequest.d.ts +20 -1
- package/api/resources/extractors/client/requests/ExtractorsUpdateRequest.d.ts +3 -1
- package/api/resources/files/client/Client.d.ts +1 -1
- package/api/resources/files/client/Client.js +1 -1
- package/api/resources/index.d.ts +6 -0
- package/api/resources/index.js +7 -1
- package/api/resources/parseRuns/client/Client.d.ts +2 -1
- package/api/resources/parseRuns/client/Client.js +2 -1
- package/api/resources/parseRuns/client/requests/ParseRunsCreateRequest.d.ts +2 -1
- package/api/resources/processorRun/client/Client.d.ts +3 -3
- package/api/resources/processorRun/client/Client.js +3 -3
- package/api/resources/processorRun/client/requests/ProcessorRunCreateRequest.d.ts +1 -1
- package/api/resources/splitRuns/client/Client.d.ts +4 -1
- package/api/resources/splitRuns/client/Client.js +4 -1
- package/api/resources/splitRuns/client/requests/SplitRunsCreateRequest.d.ts +4 -1
- package/api/resources/splitterVersions/client/Client.d.ts +2 -1
- package/api/resources/splitterVersions/client/Client.js +2 -1
- package/api/resources/splitterVersions/client/requests/SplitterVersionsCreateRequest.d.ts +2 -1
- package/api/resources/splitters/client/Client.d.ts +19 -2
- package/api/resources/splitters/client/Client.js +19 -2
- package/api/resources/splitters/client/requests/SplittersCreateRequest.d.ts +16 -1
- package/api/resources/splitters/client/requests/SplittersUpdateRequest.d.ts +3 -1
- package/api/resources/webhookEndpoints/client/Client.d.ts +133 -0
- package/api/resources/webhookEndpoints/client/Client.js +440 -0
- package/api/resources/webhookEndpoints/client/index.d.ts +1 -0
- package/api/resources/webhookEndpoints/client/index.js +17 -0
- package/api/resources/webhookEndpoints/client/requests/WebhookEndpointsCreateRequest.d.ts +21 -0
- package/api/resources/webhookEndpoints/client/requests/WebhookEndpointsCreateRequest.js +3 -0
- package/api/resources/webhookEndpoints/client/requests/WebhookEndpointsListRequest.d.ts +14 -0
- package/api/resources/webhookEndpoints/client/requests/WebhookEndpointsListRequest.js +3 -0
- package/api/resources/webhookEndpoints/client/requests/WebhookEndpointsUpdateRequest.d.ts +15 -0
- package/api/resources/webhookEndpoints/client/requests/WebhookEndpointsUpdateRequest.js +3 -0
- package/api/resources/webhookEndpoints/client/requests/index.d.ts +3 -0
- package/api/resources/webhookEndpoints/client/requests/index.js +2 -0
- package/api/resources/webhookEndpoints/index.d.ts +2 -0
- package/api/resources/webhookEndpoints/index.js +18 -0
- package/api/resources/webhookEndpoints/types/WebhookEndpointsDeleteResponse.d.ts +4 -0
- package/api/resources/webhookEndpoints/types/WebhookEndpointsDeleteResponse.js +3 -0
- package/api/resources/webhookEndpoints/types/WebhookEndpointsListResponse.d.ts +6 -0
- package/api/resources/webhookEndpoints/types/WebhookEndpointsListResponse.js +3 -0
- package/api/resources/webhookEndpoints/types/index.d.ts +2 -0
- package/api/resources/webhookEndpoints/types/index.js +18 -0
- package/api/resources/webhookSubscriptions/client/Client.d.ts +133 -0
- package/api/resources/webhookSubscriptions/client/Client.js +444 -0
- package/api/resources/webhookSubscriptions/client/index.d.ts +1 -0
- package/api/resources/webhookSubscriptions/client/index.js +17 -0
- package/api/resources/webhookSubscriptions/client/requests/WebhookSubscriptionsCreateRequest.d.ts +19 -0
- package/api/resources/webhookSubscriptions/client/requests/WebhookSubscriptionsCreateRequest.js +3 -0
- package/api/resources/webhookSubscriptions/client/requests/WebhookSubscriptionsListRequest.d.ts +16 -0
- package/api/resources/webhookSubscriptions/client/requests/WebhookSubscriptionsListRequest.js +3 -0
- package/api/resources/webhookSubscriptions/client/requests/WebhookSubscriptionsUpdateRequest.d.ts +11 -0
- package/api/resources/webhookSubscriptions/client/requests/WebhookSubscriptionsUpdateRequest.js +3 -0
- package/api/resources/webhookSubscriptions/client/requests/index.d.ts +3 -0
- package/api/resources/webhookSubscriptions/client/requests/index.js +2 -0
- package/api/resources/webhookSubscriptions/index.d.ts +2 -0
- package/api/resources/webhookSubscriptions/index.js +18 -0
- package/api/resources/webhookSubscriptions/types/WebhookSubscriptionsDeleteResponse.d.ts +4 -0
- package/api/resources/webhookSubscriptions/types/WebhookSubscriptionsDeleteResponse.js +3 -0
- package/api/resources/webhookSubscriptions/types/WebhookSubscriptionsListResponse.d.ts +6 -0
- package/api/resources/webhookSubscriptions/types/WebhookSubscriptionsListResponse.js +3 -0
- package/api/resources/webhookSubscriptions/types/index.d.ts +2 -0
- package/api/resources/webhookSubscriptions/types/index.js +18 -0
- package/api/resources/workflowRuns/client/Client.d.ts +22 -6
- package/api/resources/workflowRuns/client/Client.js +22 -6
- package/api/resources/workflowRuns/client/requests/WorkflowRunsCreateBatchRequest.d.ts +12 -2
- package/api/resources/workflowRuns/client/requests/WorkflowRunsCreateRequest.d.ts +3 -3
- package/api/resources/workflowRuns/client/requests/WorkflowRunsListRequest.d.ts +1 -1
- package/api/resources/workflowRuns/client/requests/WorkflowRunsUpdateRequest.d.ts +7 -1
- package/api/resources/workflowRuns/types/WorkflowRunsCreateRequestFile.d.ts +1 -1
- package/api/types/ExtractAdvancedOptions.d.ts +1 -1
- package/api/types/ExtractAdvancedOptionsReviewAgent.d.ts +1 -1
- package/api/types/ExtractConfigJson.d.ts +1 -1
- package/api/types/ExtractOutputMetadataValue.d.ts +1 -1
- package/api/types/ExtractOverrideConfigJson.d.ts +1 -1
- package/api/types/ExtractRun.d.ts +10 -2
- package/api/types/ExtractorVersion.d.ts +6 -1
- package/api/types/LegacyClassificationAdvancedOptions.d.ts +1 -1
- package/api/types/LegacyClassificationConfig.d.ts +2 -2
- package/api/types/LegacyClassificationConfigBaseProcessor.d.ts +1 -1
- package/api/types/LegacyClassificationConfigBaseProcessor.js +1 -1
- package/api/types/LegacyDocumentProcessorRunCredits.d.ts +2 -2
- package/api/types/LegacyExtractionAdvancedOptions.d.ts +2 -2
- package/api/types/LegacyExtractionAdvancedOptionsReviewAgent.d.ts +1 -1
- package/api/types/LegacyExtractionConfig.d.ts +3 -3
- package/api/types/LegacyExtractionConfigBaseProcessor.d.ts +1 -1
- package/api/types/LegacyExtractionConfigBaseProcessor.js +1 -1
- package/api/types/LegacyJsonOutputMetadataValue.d.ts +1 -1
- package/api/types/LegacySplitterAdvancedOptions.d.ts +1 -1
- package/api/types/LegacySplitterConfig.d.ts +2 -2
- package/api/types/LegacySplitterConfigBaseProcessor.d.ts +1 -1
- package/api/types/LegacySplitterConfigBaseProcessor.js +1 -1
- package/api/types/ParseConfig.d.ts +3 -1
- package/api/types/ParseConfigTarget.d.ts +1 -1
- package/api/types/ParseConfigTarget.js +1 -1
- package/api/types/WebhookAdvancedOptions.d.ts +9 -0
- package/api/types/WebhookAdvancedOptions.js +3 -0
- package/api/types/WebhookEndpoint.d.ts +18 -0
- package/api/types/WebhookEndpoint.js +3 -0
- package/api/types/WebhookEndpointCreate.d.ts +27 -0
- package/api/types/WebhookEndpointCreate.js +3 -0
- package/api/types/WebhookEndpointEventType.d.ts +32 -0
- package/api/types/WebhookEndpointEventType.js +35 -0
- package/api/types/WebhookEndpointStatus.d.ts +6 -0
- package/api/types/WebhookEndpointStatus.js +9 -0
- package/api/types/WebhookPayloadFormat.d.ts +11 -0
- package/api/types/WebhookPayloadFormat.js +14 -0
- package/api/types/WebhookPayloadOptions.d.ts +9 -0
- package/api/types/WebhookPayloadOptions.js +3 -0
- package/api/types/WebhookSubscription.d.ts +15 -0
- package/api/types/WebhookSubscription.js +3 -0
- package/api/types/WebhookSubscriptionEventType.d.ts +23 -0
- package/api/types/WebhookSubscriptionEventType.js +26 -0
- package/api/types/WebhookSubscriptionResourceType.d.ts +8 -0
- package/api/types/WebhookSubscriptionResourceType.js +11 -0
- package/api/types/index.d.ts +10 -0
- package/api/types/index.js +10 -0
- package/package.json +1 -1
- package/reference.md +897 -40
- 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.3.0",
|
|
48
|
+
"User-Agent": "extend-ai/1.3.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
|
@@ -18,6 +18,8 @@ import { ProcessorVersionClient } from "./api/resources/processorVersion/client/
|
|
|
18
18
|
import { SplitRunsClient } from "./api/resources/splitRuns/client/Client";
|
|
19
19
|
import { SplittersClient } from "./api/resources/splitters/client/Client";
|
|
20
20
|
import { SplitterVersionsClient } from "./api/resources/splitterVersions/client/Client";
|
|
21
|
+
import { WebhookEndpointsClient } from "./api/resources/webhookEndpoints/client/Client";
|
|
22
|
+
import { WebhookSubscriptionsClient } from "./api/resources/webhookSubscriptions/client/Client";
|
|
21
23
|
import { WorkflowRunsClient } from "./api/resources/workflowRuns/client/Client";
|
|
22
24
|
import { WorkflowsClient } from "./api/resources/workflows/client/Client";
|
|
23
25
|
import type { BaseClientOptions, BaseRequestOptions } from "./BaseClient";
|
|
@@ -51,6 +53,8 @@ export declare class ExtendClient {
|
|
|
51
53
|
protected _evaluationSets: EvaluationSetsClient | undefined;
|
|
52
54
|
protected _evaluationSetItems: EvaluationSetItemsClient | undefined;
|
|
53
55
|
protected _evaluationSetRuns: EvaluationSetRunsClient | undefined;
|
|
56
|
+
protected _webhookEndpoints: WebhookEndpointsClient | undefined;
|
|
57
|
+
protected _webhookSubscriptions: WebhookSubscriptionsClient | undefined;
|
|
54
58
|
constructor(options: ExtendClient.Options);
|
|
55
59
|
get files(): FilesClient;
|
|
56
60
|
get parseRuns(): ParseRunsClient;
|
|
@@ -73,6 +77,8 @@ export declare class ExtendClient {
|
|
|
73
77
|
get evaluationSets(): EvaluationSetsClient;
|
|
74
78
|
get evaluationSetItems(): EvaluationSetItemsClient;
|
|
75
79
|
get evaluationSetRuns(): EvaluationSetRunsClient;
|
|
80
|
+
get webhookEndpoints(): WebhookEndpointsClient;
|
|
81
|
+
get webhookSubscriptions(): WebhookSubscriptionsClient;
|
|
76
82
|
/**
|
|
77
83
|
* Parse a file synchronously, waiting for the result before returning. This endpoint has a **5-minute timeout** — if processing takes longer, the request will fail.
|
|
78
84
|
*
|
|
@@ -97,7 +103,8 @@ export declare class ExtendClient {
|
|
|
97
103
|
* @example
|
|
98
104
|
* await client.parse({
|
|
99
105
|
* file: {
|
|
100
|
-
* url: "
|
|
106
|
+
* url: "https://example.com/bank_statement.pdf",
|
|
107
|
+
* name: "bank_statement.pdf"
|
|
101
108
|
* }
|
|
102
109
|
* })
|
|
103
110
|
*/
|
|
@@ -127,7 +134,13 @@ export declare class ExtendClient {
|
|
|
127
134
|
* @example
|
|
128
135
|
* await client.edit({
|
|
129
136
|
* file: {
|
|
130
|
-
* url: "
|
|
137
|
+
* url: "https://example.com/form.pdf"
|
|
138
|
+
* },
|
|
139
|
+
* config: {
|
|
140
|
+
* instructions: "Fill out the form with the provided data",
|
|
141
|
+
* advancedOptions: {
|
|
142
|
+
* flattenPdf: true
|
|
143
|
+
* }
|
|
131
144
|
* }
|
|
132
145
|
* })
|
|
133
146
|
*/
|
|
@@ -140,7 +153,7 @@ export declare class ExtendClient {
|
|
|
140
153
|
*
|
|
141
154
|
* The Extract endpoint allows you to extract structured data from files using an existing extractor or an inline configuration.
|
|
142
155
|
*
|
|
143
|
-
* For more details, see the [Extract File guide](https://docs.extend.ai/2026-02-09/product/
|
|
156
|
+
* For more details, see the [Extract File guide](https://docs.extend.ai/2026-02-09/product/extraction/quick-start-5-minutes).
|
|
144
157
|
*
|
|
145
158
|
* @param {Extend.ExtractRequest} request
|
|
146
159
|
* @param {ExtendClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -156,8 +169,27 @@ export declare class ExtendClient {
|
|
|
156
169
|
*
|
|
157
170
|
* @example
|
|
158
171
|
* await client.extract({
|
|
172
|
+
* config: {
|
|
173
|
+
* schema: {
|
|
174
|
+
* "type": "object",
|
|
175
|
+
* "properties": {
|
|
176
|
+
* "vendor_name": {
|
|
177
|
+
* "type": "string",
|
|
178
|
+
* "description": "The name of the vendor"
|
|
179
|
+
* },
|
|
180
|
+
* "invoice_number": {
|
|
181
|
+
* "type": "string",
|
|
182
|
+
* "description": "The invoice number"
|
|
183
|
+
* },
|
|
184
|
+
* "total_amount": {
|
|
185
|
+
* "type": "number",
|
|
186
|
+
* "description": "The total amount due"
|
|
187
|
+
* }
|
|
188
|
+
* }
|
|
189
|
+
* }
|
|
190
|
+
* },
|
|
159
191
|
* file: {
|
|
160
|
-
* url: "
|
|
192
|
+
* url: "https://example.com/invoice.pdf"
|
|
161
193
|
* }
|
|
162
194
|
* })
|
|
163
195
|
*/
|
|
@@ -170,7 +202,7 @@ export declare class ExtendClient {
|
|
|
170
202
|
*
|
|
171
203
|
* The Classify endpoint allows you to classify documents using an existing classifier or an inline configuration.
|
|
172
204
|
*
|
|
173
|
-
* For more details, see the [Classify File guide](https://docs.extend.ai/2026-02-09/product/
|
|
205
|
+
* For more details, see the [Classify File guide](https://docs.extend.ai/2026-02-09/product/classification/configuring-a-classifier).
|
|
174
206
|
*
|
|
175
207
|
* @param {Extend.ClassifyRequest} request
|
|
176
208
|
* @param {ExtendClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -186,8 +218,23 @@ export declare class ExtendClient {
|
|
|
186
218
|
*
|
|
187
219
|
* @example
|
|
188
220
|
* await client.classify({
|
|
221
|
+
* config: {
|
|
222
|
+
* classifications: [{
|
|
223
|
+
* id: "invoice",
|
|
224
|
+
* type: "invoice",
|
|
225
|
+
* description: "An invoice or bill for goods or services"
|
|
226
|
+
* }, {
|
|
227
|
+
* id: "receipt",
|
|
228
|
+
* type: "receipt",
|
|
229
|
+
* description: "A receipt confirming payment"
|
|
230
|
+
* }, {
|
|
231
|
+
* id: "other",
|
|
232
|
+
* type: "other",
|
|
233
|
+
* description: "Any other document type"
|
|
234
|
+
* }]
|
|
235
|
+
* },
|
|
189
236
|
* file: {
|
|
190
|
-
* url: "
|
|
237
|
+
* url: "https://example.com/document.pdf"
|
|
191
238
|
* }
|
|
192
239
|
* })
|
|
193
240
|
*/
|
|
@@ -200,7 +247,7 @@ export declare class ExtendClient {
|
|
|
200
247
|
*
|
|
201
248
|
* The Split endpoint allows you to split documents into multiple parts using an existing splitter or an inline configuration.
|
|
202
249
|
*
|
|
203
|
-
* For more details, see the [Split File guide](https://docs.extend.ai/2026-02-09/product/splitting/
|
|
250
|
+
* For more details, see the [Split File guide](https://docs.extend.ai/2026-02-09/product/splitting/configuring-a-splitter).
|
|
204
251
|
*
|
|
205
252
|
* @param {Extend.SplitRequest} request
|
|
206
253
|
* @param {ExtendClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -216,8 +263,23 @@ export declare class ExtendClient {
|
|
|
216
263
|
*
|
|
217
264
|
* @example
|
|
218
265
|
* await client.split({
|
|
266
|
+
* config: {
|
|
267
|
+
* splitClassifications: [{
|
|
268
|
+
* id: "invoice",
|
|
269
|
+
* type: "invoice",
|
|
270
|
+
* description: "An invoice or bill for goods or services"
|
|
271
|
+
* }, {
|
|
272
|
+
* id: "receipt",
|
|
273
|
+
* type: "receipt",
|
|
274
|
+
* description: "A receipt confirming payment"
|
|
275
|
+
* }, {
|
|
276
|
+
* id: "other",
|
|
277
|
+
* type: "other",
|
|
278
|
+
* description: "Any other document type"
|
|
279
|
+
* }]
|
|
280
|
+
* },
|
|
219
281
|
* file: {
|
|
220
|
-
* url: "
|
|
282
|
+
* url: "https://example.com/multi-document.pdf"
|
|
221
283
|
* }
|
|
222
284
|
* })
|
|
223
285
|
*/
|
package/Client.js
CHANGED
|
@@ -75,8 +75,10 @@ const Client_16 = require("./api/resources/processorVersion/client/Client");
|
|
|
75
75
|
const Client_17 = require("./api/resources/splitRuns/client/Client");
|
|
76
76
|
const Client_18 = require("./api/resources/splitters/client/Client");
|
|
77
77
|
const Client_19 = require("./api/resources/splitterVersions/client/Client");
|
|
78
|
-
const Client_20 = require("./api/resources/
|
|
79
|
-
const Client_21 = require("./api/resources/
|
|
78
|
+
const Client_20 = require("./api/resources/webhookEndpoints/client/Client");
|
|
79
|
+
const Client_21 = require("./api/resources/webhookSubscriptions/client/Client");
|
|
80
|
+
const Client_22 = require("./api/resources/workflowRuns/client/Client");
|
|
81
|
+
const Client_23 = require("./api/resources/workflows/client/Client");
|
|
80
82
|
const BaseClient_1 = require("./BaseClient");
|
|
81
83
|
const core = __importStar(require("./core"));
|
|
82
84
|
const headers_1 = require("./core/headers");
|
|
@@ -137,11 +139,11 @@ class ExtendClient {
|
|
|
137
139
|
}
|
|
138
140
|
get workflows() {
|
|
139
141
|
var _a;
|
|
140
|
-
return ((_a = this._workflows) !== null && _a !== void 0 ? _a : (this._workflows = new
|
|
142
|
+
return ((_a = this._workflows) !== null && _a !== void 0 ? _a : (this._workflows = new Client_23.WorkflowsClient(this._options)));
|
|
141
143
|
}
|
|
142
144
|
get workflowRuns() {
|
|
143
145
|
var _a;
|
|
144
|
-
return ((_a = this._workflowRuns) !== null && _a !== void 0 ? _a : (this._workflowRuns = new
|
|
146
|
+
return ((_a = this._workflowRuns) !== null && _a !== void 0 ? _a : (this._workflowRuns = new Client_22.WorkflowRunsClient(this._options)));
|
|
145
147
|
}
|
|
146
148
|
get processorRun() {
|
|
147
149
|
var _a;
|
|
@@ -171,6 +173,14 @@ class ExtendClient {
|
|
|
171
173
|
var _a;
|
|
172
174
|
return ((_a = this._evaluationSetRuns) !== null && _a !== void 0 ? _a : (this._evaluationSetRuns = new Client_7.EvaluationSetRunsClient(this._options)));
|
|
173
175
|
}
|
|
176
|
+
get webhookEndpoints() {
|
|
177
|
+
var _a;
|
|
178
|
+
return ((_a = this._webhookEndpoints) !== null && _a !== void 0 ? _a : (this._webhookEndpoints = new Client_20.WebhookEndpointsClient(this._options)));
|
|
179
|
+
}
|
|
180
|
+
get webhookSubscriptions() {
|
|
181
|
+
var _a;
|
|
182
|
+
return ((_a = this._webhookSubscriptions) !== null && _a !== void 0 ? _a : (this._webhookSubscriptions = new Client_21.WebhookSubscriptionsClient(this._options)));
|
|
183
|
+
}
|
|
174
184
|
/**
|
|
175
185
|
* Parse a file synchronously, waiting for the result before returning. This endpoint has a **5-minute timeout** — if processing takes longer, the request will fail.
|
|
176
186
|
*
|
|
@@ -195,7 +205,8 @@ class ExtendClient {
|
|
|
195
205
|
* @example
|
|
196
206
|
* await client.parse({
|
|
197
207
|
* file: {
|
|
198
|
-
* url: "
|
|
208
|
+
* url: "https://example.com/bank_statement.pdf",
|
|
209
|
+
* name: "bank_statement.pdf"
|
|
199
210
|
* }
|
|
200
211
|
* })
|
|
201
212
|
*/
|
|
@@ -281,7 +292,13 @@ class ExtendClient {
|
|
|
281
292
|
* @example
|
|
282
293
|
* await client.edit({
|
|
283
294
|
* file: {
|
|
284
|
-
* url: "
|
|
295
|
+
* url: "https://example.com/form.pdf"
|
|
296
|
+
* },
|
|
297
|
+
* config: {
|
|
298
|
+
* instructions: "Fill out the form with the provided data",
|
|
299
|
+
* advancedOptions: {
|
|
300
|
+
* flattenPdf: true
|
|
301
|
+
* }
|
|
285
302
|
* }
|
|
286
303
|
* })
|
|
287
304
|
*/
|
|
@@ -346,7 +363,7 @@ class ExtendClient {
|
|
|
346
363
|
*
|
|
347
364
|
* The Extract endpoint allows you to extract structured data from files using an existing extractor or an inline configuration.
|
|
348
365
|
*
|
|
349
|
-
* For more details, see the [Extract File guide](https://docs.extend.ai/2026-02-09/product/
|
|
366
|
+
* For more details, see the [Extract File guide](https://docs.extend.ai/2026-02-09/product/extraction/quick-start-5-minutes).
|
|
350
367
|
*
|
|
351
368
|
* @param {Extend.ExtractRequest} request
|
|
352
369
|
* @param {ExtendClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -362,8 +379,27 @@ class ExtendClient {
|
|
|
362
379
|
*
|
|
363
380
|
* @example
|
|
364
381
|
* await client.extract({
|
|
382
|
+
* config: {
|
|
383
|
+
* schema: {
|
|
384
|
+
* "type": "object",
|
|
385
|
+
* "properties": {
|
|
386
|
+
* "vendor_name": {
|
|
387
|
+
* "type": "string",
|
|
388
|
+
* "description": "The name of the vendor"
|
|
389
|
+
* },
|
|
390
|
+
* "invoice_number": {
|
|
391
|
+
* "type": "string",
|
|
392
|
+
* "description": "The invoice number"
|
|
393
|
+
* },
|
|
394
|
+
* "total_amount": {
|
|
395
|
+
* "type": "number",
|
|
396
|
+
* "description": "The total amount due"
|
|
397
|
+
* }
|
|
398
|
+
* }
|
|
399
|
+
* }
|
|
400
|
+
* },
|
|
365
401
|
* file: {
|
|
366
|
-
* url: "
|
|
402
|
+
* url: "https://example.com/invoice.pdf"
|
|
367
403
|
* }
|
|
368
404
|
* })
|
|
369
405
|
*/
|
|
@@ -428,7 +464,7 @@ class ExtendClient {
|
|
|
428
464
|
*
|
|
429
465
|
* The Classify endpoint allows you to classify documents using an existing classifier or an inline configuration.
|
|
430
466
|
*
|
|
431
|
-
* For more details, see the [Classify File guide](https://docs.extend.ai/2026-02-09/product/
|
|
467
|
+
* For more details, see the [Classify File guide](https://docs.extend.ai/2026-02-09/product/classification/configuring-a-classifier).
|
|
432
468
|
*
|
|
433
469
|
* @param {Extend.ClassifyRequest} request
|
|
434
470
|
* @param {ExtendClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -444,8 +480,23 @@ class ExtendClient {
|
|
|
444
480
|
*
|
|
445
481
|
* @example
|
|
446
482
|
* await client.classify({
|
|
483
|
+
* config: {
|
|
484
|
+
* classifications: [{
|
|
485
|
+
* id: "invoice",
|
|
486
|
+
* type: "invoice",
|
|
487
|
+
* description: "An invoice or bill for goods or services"
|
|
488
|
+
* }, {
|
|
489
|
+
* id: "receipt",
|
|
490
|
+
* type: "receipt",
|
|
491
|
+
* description: "A receipt confirming payment"
|
|
492
|
+
* }, {
|
|
493
|
+
* id: "other",
|
|
494
|
+
* type: "other",
|
|
495
|
+
* description: "Any other document type"
|
|
496
|
+
* }]
|
|
497
|
+
* },
|
|
447
498
|
* file: {
|
|
448
|
-
* url: "
|
|
499
|
+
* url: "https://example.com/document.pdf"
|
|
449
500
|
* }
|
|
450
501
|
* })
|
|
451
502
|
*/
|
|
@@ -510,7 +561,7 @@ class ExtendClient {
|
|
|
510
561
|
*
|
|
511
562
|
* The Split endpoint allows you to split documents into multiple parts using an existing splitter or an inline configuration.
|
|
512
563
|
*
|
|
513
|
-
* For more details, see the [Split File guide](https://docs.extend.ai/2026-02-09/product/splitting/
|
|
564
|
+
* For more details, see the [Split File guide](https://docs.extend.ai/2026-02-09/product/splitting/configuring-a-splitter).
|
|
514
565
|
*
|
|
515
566
|
* @param {Extend.SplitRequest} request
|
|
516
567
|
* @param {ExtendClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -526,8 +577,23 @@ class ExtendClient {
|
|
|
526
577
|
*
|
|
527
578
|
* @example
|
|
528
579
|
* await client.split({
|
|
580
|
+
* config: {
|
|
581
|
+
* splitClassifications: [{
|
|
582
|
+
* id: "invoice",
|
|
583
|
+
* type: "invoice",
|
|
584
|
+
* description: "An invoice or bill for goods or services"
|
|
585
|
+
* }, {
|
|
586
|
+
* id: "receipt",
|
|
587
|
+
* type: "receipt",
|
|
588
|
+
* description: "A receipt confirming payment"
|
|
589
|
+
* }, {
|
|
590
|
+
* id: "other",
|
|
591
|
+
* type: "other",
|
|
592
|
+
* description: "Any other document type"
|
|
593
|
+
* }]
|
|
594
|
+
* },
|
|
529
595
|
* file: {
|
|
530
|
-
* url: "
|
|
596
|
+
* url: "https://example.com/multi-document.pdf"
|
|
531
597
|
* }
|
|
532
598
|
* })
|
|
533
599
|
*/
|
|
@@ -2,8 +2,23 @@ import type * as Extend from "../../index";
|
|
|
2
2
|
/**
|
|
3
3
|
* @example
|
|
4
4
|
* {
|
|
5
|
+
* config: {
|
|
6
|
+
* classifications: [{
|
|
7
|
+
* id: "invoice",
|
|
8
|
+
* type: "invoice",
|
|
9
|
+
* description: "An invoice or bill for goods or services"
|
|
10
|
+
* }, {
|
|
11
|
+
* id: "receipt",
|
|
12
|
+
* type: "receipt",
|
|
13
|
+
* description: "A receipt confirming payment"
|
|
14
|
+
* }, {
|
|
15
|
+
* id: "other",
|
|
16
|
+
* type: "other",
|
|
17
|
+
* description: "Any other document type"
|
|
18
|
+
* }]
|
|
19
|
+
* },
|
|
5
20
|
* file: {
|
|
6
|
-
* url: "
|
|
21
|
+
* url: "https://example.com/document.pdf"
|
|
7
22
|
* }
|
|
8
23
|
* }
|
|
9
24
|
*/
|
|
@@ -3,7 +3,13 @@ import type * as Extend from "../../index";
|
|
|
3
3
|
* @example
|
|
4
4
|
* {
|
|
5
5
|
* file: {
|
|
6
|
-
* url: "
|
|
6
|
+
* url: "https://example.com/form.pdf"
|
|
7
|
+
* },
|
|
8
|
+
* config: {
|
|
9
|
+
* instructions: "Fill out the form with the provided data",
|
|
10
|
+
* advancedOptions: {
|
|
11
|
+
* flattenPdf: true
|
|
12
|
+
* }
|
|
7
13
|
* }
|
|
8
14
|
* }
|
|
9
15
|
*/
|
|
@@ -2,8 +2,27 @@ import type * as Extend from "../../index";
|
|
|
2
2
|
/**
|
|
3
3
|
* @example
|
|
4
4
|
* {
|
|
5
|
+
* config: {
|
|
6
|
+
* schema: {
|
|
7
|
+
* "type": "object",
|
|
8
|
+
* "properties": {
|
|
9
|
+
* "vendor_name": {
|
|
10
|
+
* "type": "string",
|
|
11
|
+
* "description": "The name of the vendor"
|
|
12
|
+
* },
|
|
13
|
+
* "invoice_number": {
|
|
14
|
+
* "type": "string",
|
|
15
|
+
* "description": "The invoice number"
|
|
16
|
+
* },
|
|
17
|
+
* "total_amount": {
|
|
18
|
+
* "type": "number",
|
|
19
|
+
* "description": "The total amount due"
|
|
20
|
+
* }
|
|
21
|
+
* }
|
|
22
|
+
* }
|
|
23
|
+
* },
|
|
5
24
|
* file: {
|
|
6
|
-
* url: "
|
|
25
|
+
* url: "https://example.com/invoice.pdf"
|
|
7
26
|
* }
|
|
8
27
|
* }
|
|
9
28
|
*/
|
|
@@ -2,8 +2,23 @@ import type * as Extend from "../../index";
|
|
|
2
2
|
/**
|
|
3
3
|
* @example
|
|
4
4
|
* {
|
|
5
|
+
* config: {
|
|
6
|
+
* splitClassifications: [{
|
|
7
|
+
* id: "invoice",
|
|
8
|
+
* type: "invoice",
|
|
9
|
+
* description: "An invoice or bill for goods or services"
|
|
10
|
+
* }, {
|
|
11
|
+
* id: "receipt",
|
|
12
|
+
* type: "receipt",
|
|
13
|
+
* description: "A receipt confirming payment"
|
|
14
|
+
* }, {
|
|
15
|
+
* id: "other",
|
|
16
|
+
* type: "other",
|
|
17
|
+
* description: "Any other document type"
|
|
18
|
+
* }]
|
|
19
|
+
* },
|
|
5
20
|
* file: {
|
|
6
|
-
* url: "
|
|
21
|
+
* url: "https://example.com/multi-document.pdf"
|
|
7
22
|
* }
|
|
8
23
|
* }
|
|
9
24
|
*/
|
|
@@ -13,7 +13,7 @@ export declare class BatchProcessorRunClient {
|
|
|
13
13
|
/**
|
|
14
14
|
* Retrieve details about a batch processor run, including evaluation runs.
|
|
15
15
|
*
|
|
16
|
-
* **Deprecated:** This endpoint is maintained for backwards compatibility only and will be replaced in a future API version. Use [Get Evaluation Set Run](/2026-02-09/developers/api-reference/endpoints/evaluation/get-evaluation-set-run) for interacting with evaluation set runs.
|
|
16
|
+
* **Deprecated:** This endpoint is maintained for backwards compatibility only and will be replaced in a future API version. Use [Get Evaluation Set Run](https://docs.extend.ai/2026-02-09/developers/api-reference/endpoints/evaluation/get-evaluation-set-run) for interacting with evaluation set runs.
|
|
17
17
|
*
|
|
18
18
|
* @param {string} id - The unique identifier of the batch processor run to retrieve.
|
|
19
19
|
*
|
|
@@ -58,7 +58,7 @@ class BatchProcessorRunClient {
|
|
|
58
58
|
/**
|
|
59
59
|
* Retrieve details about a batch processor run, including evaluation runs.
|
|
60
60
|
*
|
|
61
|
-
* **Deprecated:** This endpoint is maintained for backwards compatibility only and will be replaced in a future API version. Use [Get Evaluation Set Run](/2026-02-09/developers/api-reference/endpoints/evaluation/get-evaluation-set-run) for interacting with evaluation set runs.
|
|
61
|
+
* **Deprecated:** This endpoint is maintained for backwards compatibility only and will be replaced in a future API version. Use [Get Evaluation Set Run](https://docs.extend.ai/2026-02-09/developers/api-reference/endpoints/evaluation/get-evaluation-set-run) for interacting with evaluation set runs.
|
|
62
62
|
*
|
|
63
63
|
* @param {string} id - The unique identifier of the batch processor run to retrieve.
|
|
64
64
|
*
|
|
@@ -59,7 +59,8 @@ export declare class ClassifierVersionsClient {
|
|
|
59
59
|
*
|
|
60
60
|
* @example
|
|
61
61
|
* await client.classifierVersions.create("classifier_id_here", {
|
|
62
|
-
* releaseType: "
|
|
62
|
+
* releaseType: "minor",
|
|
63
|
+
* description: "Added new document classification type"
|
|
63
64
|
* })
|
|
64
65
|
*/
|
|
65
66
|
create(classifierId: string, request: Extend.ClassifierVersionsCreateRequest, requestOptions?: ClassifierVersionsClient.RequestOptions): core.HttpResponsePromise<Extend.ClassifierVersion>;
|
|
@@ -162,7 +162,8 @@ class ClassifierVersionsClient {
|
|
|
162
162
|
*
|
|
163
163
|
* @example
|
|
164
164
|
* await client.classifierVersions.create("classifier_id_here", {
|
|
165
|
-
* releaseType: "
|
|
165
|
+
* releaseType: "minor",
|
|
166
|
+
* description: "Added new document classification type"
|
|
166
167
|
* })
|
|
167
168
|
*/
|
|
168
169
|
create(classifierId, request, requestOptions) {
|
|
@@ -51,7 +51,22 @@ export declare class ClassifiersClient {
|
|
|
51
51
|
*
|
|
52
52
|
* @example
|
|
53
53
|
* await client.classifiers.create({
|
|
54
|
-
* name: "
|
|
54
|
+
* name: "Document Classifier",
|
|
55
|
+
* config: {
|
|
56
|
+
* classifications: [{
|
|
57
|
+
* id: "invoice",
|
|
58
|
+
* type: "invoice",
|
|
59
|
+
* description: "An invoice or bill for goods or services"
|
|
60
|
+
* }, {
|
|
61
|
+
* id: "receipt",
|
|
62
|
+
* type: "receipt",
|
|
63
|
+
* description: "A receipt confirming payment"
|
|
64
|
+
* }, {
|
|
65
|
+
* id: "other",
|
|
66
|
+
* type: "other",
|
|
67
|
+
* description: "Any other document type"
|
|
68
|
+
* }]
|
|
69
|
+
* }
|
|
55
70
|
* })
|
|
56
71
|
*/
|
|
57
72
|
create(request: Extend.ClassifiersCreateRequest, requestOptions?: ClassifiersClient.RequestOptions): core.HttpResponsePromise<Extend.Classifier>;
|
|
@@ -97,7 +112,9 @@ export declare class ClassifiersClient {
|
|
|
97
112
|
* @throws {@link Extend.InternalServerError}
|
|
98
113
|
*
|
|
99
114
|
* @example
|
|
100
|
-
* await client.classifiers.update("classifier_id_here"
|
|
115
|
+
* await client.classifiers.update("classifier_id_here", {
|
|
116
|
+
* name: "Document Classifier v2"
|
|
117
|
+
* })
|
|
101
118
|
*/
|
|
102
119
|
update(id: string, request?: Extend.ClassifiersUpdateRequest, requestOptions?: ClassifiersClient.RequestOptions): core.HttpResponsePromise<Extend.Classifier>;
|
|
103
120
|
private __update;
|
|
@@ -152,7 +152,22 @@ class ClassifiersClient {
|
|
|
152
152
|
*
|
|
153
153
|
* @example
|
|
154
154
|
* await client.classifiers.create({
|
|
155
|
-
* name: "
|
|
155
|
+
* name: "Document Classifier",
|
|
156
|
+
* config: {
|
|
157
|
+
* classifications: [{
|
|
158
|
+
* id: "invoice",
|
|
159
|
+
* type: "invoice",
|
|
160
|
+
* description: "An invoice or bill for goods or services"
|
|
161
|
+
* }, {
|
|
162
|
+
* id: "receipt",
|
|
163
|
+
* type: "receipt",
|
|
164
|
+
* description: "A receipt confirming payment"
|
|
165
|
+
* }, {
|
|
166
|
+
* id: "other",
|
|
167
|
+
* type: "other",
|
|
168
|
+
* description: "Any other document type"
|
|
169
|
+
* }]
|
|
170
|
+
* }
|
|
156
171
|
* })
|
|
157
172
|
*/
|
|
158
173
|
create(request, requestOptions) {
|
|
@@ -299,7 +314,9 @@ class ClassifiersClient {
|
|
|
299
314
|
* @throws {@link Extend.InternalServerError}
|
|
300
315
|
*
|
|
301
316
|
* @example
|
|
302
|
-
* await client.classifiers.update("classifier_id_here"
|
|
317
|
+
* await client.classifiers.update("classifier_id_here", {
|
|
318
|
+
* name: "Document Classifier v2"
|
|
319
|
+
* })
|
|
303
320
|
*/
|
|
304
321
|
update(id, request = {}, requestOptions) {
|
|
305
322
|
return core.HttpResponsePromise.fromPromise(this.__update(id, request, requestOptions));
|
|
@@ -2,7 +2,22 @@ import type * as Extend from "../../../../index";
|
|
|
2
2
|
/**
|
|
3
3
|
* @example
|
|
4
4
|
* {
|
|
5
|
-
* name: "
|
|
5
|
+
* name: "Document Classifier",
|
|
6
|
+
* config: {
|
|
7
|
+
* classifications: [{
|
|
8
|
+
* id: "invoice",
|
|
9
|
+
* type: "invoice",
|
|
10
|
+
* description: "An invoice or bill for goods or services"
|
|
11
|
+
* }, {
|
|
12
|
+
* id: "receipt",
|
|
13
|
+
* type: "receipt",
|
|
14
|
+
* description: "A receipt confirming payment"
|
|
15
|
+
* }, {
|
|
16
|
+
* id: "other",
|
|
17
|
+
* type: "other",
|
|
18
|
+
* description: "Any other document type"
|
|
19
|
+
* }]
|
|
20
|
+
* }
|
|
6
21
|
* }
|
|
7
22
|
*/
|
|
8
23
|
export interface ClassifiersCreateRequest {
|
|
@@ -159,8 +159,11 @@ class ClassifyRunsClient {
|
|
|
159
159
|
*
|
|
160
160
|
* @example
|
|
161
161
|
* await client.classifyRuns.create({
|
|
162
|
+
* classifier: {
|
|
163
|
+
* id: "cl_1234567890"
|
|
164
|
+
* },
|
|
162
165
|
* file: {
|
|
163
|
-
* url: "
|
|
166
|
+
* url: "https://example.com/document.pdf"
|
|
164
167
|
* }
|
|
165
168
|
* })
|
|
166
169
|
*/
|