extend-ai 1.7.0 → 1.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/BaseClient.js +2 -2
- package/Client.d.ts +3 -0
- package/Client.js +53 -48
- package/api/resources/batchRuns/client/Client.d.ts +50 -0
- package/api/resources/batchRuns/client/Client.js +143 -0
- package/api/resources/batchRuns/client/index.d.ts +1 -0
- package/api/resources/batchRuns/client/index.js +2 -0
- package/api/resources/batchRuns/index.d.ts +1 -0
- package/api/resources/batchRuns/index.js +17 -0
- package/api/resources/classifierVersions/client/Client.d.ts +6 -3
- package/api/resources/classifierVersions/client/Client.js +6 -3
- package/api/resources/classifyRuns/client/Client.d.ts +57 -0
- package/api/resources/classifyRuns/client/Client.js +111 -1
- package/api/resources/classifyRuns/client/requests/ClassifyRunsCreateBatchRequest.d.ts +38 -0
- package/api/resources/classifyRuns/client/requests/ClassifyRunsListRequest.d.ts +6 -0
- package/api/resources/classifyRuns/client/requests/index.d.ts +1 -0
- package/api/resources/classifyRuns/types/ClassifyRunsCreateBatchRequestClassifier.d.ts +11 -0
- package/api/resources/classifyRuns/types/ClassifyRunsCreateBatchRequestInputsItem.d.ts +6 -0
- package/api/resources/classifyRuns/types/ClassifyRunsCreateBatchRequestInputsItemFile.d.ts +5 -0
- package/api/resources/classifyRuns/types/index.d.ts +3 -0
- package/api/resources/classifyRuns/types/index.js +3 -0
- package/api/resources/extractRuns/client/Client.d.ts +57 -0
- package/api/resources/extractRuns/client/Client.js +111 -1
- package/api/resources/extractRuns/client/requests/ExtractRunsCreateBatchRequest.d.ts +38 -0
- package/api/resources/extractRuns/client/requests/ExtractRunsListRequest.d.ts +6 -0
- package/api/resources/extractRuns/client/requests/index.d.ts +1 -0
- package/api/resources/extractRuns/types/ExtractRunsCreateBatchRequestExtractor.d.ts +11 -0
- package/api/resources/extractRuns/types/ExtractRunsCreateBatchRequestInputsItem.d.ts +6 -0
- package/api/resources/extractRuns/types/ExtractRunsCreateBatchRequestInputsItem.js +3 -0
- package/api/resources/extractRuns/types/ExtractRunsCreateBatchRequestInputsItemFile.d.ts +5 -0
- package/api/resources/extractRuns/types/ExtractRunsCreateBatchRequestInputsItemFile.js +3 -0
- package/api/resources/extractRuns/types/index.d.ts +3 -0
- package/api/resources/extractRuns/types/index.js +3 -0
- package/api/resources/extractorVersions/client/Client.d.ts +6 -3
- package/api/resources/extractorVersions/client/Client.js +6 -3
- package/api/resources/index.d.ts +1 -0
- package/api/resources/index.js +2 -1
- package/api/resources/parseRuns/client/Client.d.ts +77 -0
- package/api/resources/parseRuns/client/Client.js +189 -0
- package/api/resources/parseRuns/client/requests/ParseRunsCreateBatchRequest.d.ts +35 -0
- package/api/resources/parseRuns/client/requests/ParseRunsCreateBatchRequest.js +3 -0
- package/api/resources/parseRuns/client/requests/ParseRunsListRequest.d.ts +27 -0
- package/api/resources/parseRuns/client/requests/ParseRunsListRequest.js +3 -0
- package/api/resources/parseRuns/client/requests/index.d.ts +2 -0
- package/api/resources/parseRuns/types/ParseRunsCreateBatchRequestInputsItem.d.ts +6 -0
- package/api/resources/parseRuns/types/ParseRunsCreateBatchRequestInputsItem.js +3 -0
- package/api/resources/parseRuns/types/ParseRunsCreateBatchRequestInputsItemFile.d.ts +5 -0
- package/api/resources/parseRuns/types/ParseRunsCreateBatchRequestInputsItemFile.js +3 -0
- package/api/resources/parseRuns/types/ParseRunsListRequestStatus.d.ts +7 -0
- package/api/resources/parseRuns/types/ParseRunsListRequestStatus.js +10 -0
- package/api/resources/parseRuns/types/ParseRunsListResponse.d.ts +6 -0
- package/api/resources/parseRuns/types/ParseRunsListResponse.js +3 -0
- package/api/resources/parseRuns/types/index.d.ts +4 -0
- package/api/resources/parseRuns/types/index.js +4 -0
- package/api/resources/splitRuns/client/Client.d.ts +58 -0
- package/api/resources/splitRuns/client/Client.js +112 -1
- package/api/resources/splitRuns/client/requests/SplitRunsCreateBatchRequest.d.ts +38 -0
- package/api/resources/splitRuns/client/requests/SplitRunsCreateBatchRequest.js +3 -0
- package/api/resources/splitRuns/client/requests/SplitRunsListRequest.d.ts +6 -0
- package/api/resources/splitRuns/client/requests/index.d.ts +1 -0
- package/api/resources/splitRuns/types/SplitRunsCreateBatchRequestInputsItem.d.ts +6 -0
- package/api/resources/splitRuns/types/SplitRunsCreateBatchRequestInputsItem.js +3 -0
- package/api/resources/splitRuns/types/SplitRunsCreateBatchRequestInputsItemFile.d.ts +5 -0
- package/api/resources/splitRuns/types/SplitRunsCreateBatchRequestInputsItemFile.js +3 -0
- package/api/resources/splitRuns/types/SplitRunsCreateBatchRequestSplitter.d.ts +11 -0
- package/api/resources/splitRuns/types/SplitRunsCreateBatchRequestSplitter.js +3 -0
- package/api/resources/splitRuns/types/index.d.ts +3 -0
- package/api/resources/splitRuns/types/index.js +3 -0
- package/api/resources/splitterVersions/client/Client.d.ts +6 -3
- package/api/resources/splitterVersions/client/Client.js +6 -3
- package/api/resources/workflowVersions/client/Client.d.ts +6 -6
- package/api/resources/workflowVersions/client/Client.js +6 -6
- package/api/types/BatchParseRunCompletedWebhookEvent.d.ts +6 -0
- package/api/types/BatchParseRunCompletedWebhookEvent.js +3 -0
- package/api/types/BatchParseRunFailedWebhookEvent.d.ts +6 -0
- package/api/types/BatchParseRunFailedWebhookEvent.js +3 -0
- package/api/types/BatchProcessorRunCompletedWebhookEvent.d.ts +6 -0
- package/api/types/BatchProcessorRunCompletedWebhookEvent.js +3 -0
- package/api/types/BatchProcessorRunFailedWebhookEvent.d.ts +6 -0
- package/api/types/BatchProcessorRunFailedWebhookEvent.js +3 -0
- package/api/types/BatchRun.d.ts +9 -16
- package/api/types/BatchRunStatus.d.ts +7 -5
- package/api/types/BatchRunStatus.js +7 -5
- package/api/types/Block.d.ts +1 -0
- package/api/types/BlockDetails.d.ts +1 -1
- package/api/types/BlockType.d.ts +2 -0
- package/api/types/BlockType.js +2 -0
- package/api/types/FormulaDetails.d.ts +9 -0
- package/api/types/FormulaDetails.js +3 -0
- package/api/types/LegacyListProcessorsResponse.d.ts +1 -1
- package/api/types/ParseConfigAdvancedOptions.d.ts +10 -0
- package/api/types/ParseConfigAdvancedOptionsFormattingDetectionItem.d.ts +8 -0
- package/api/types/ParseConfigAdvancedOptionsFormattingDetectionItem.js +3 -0
- package/api/types/ParseConfigBlockOptions.d.ts +2 -0
- package/api/types/ParseConfigBlockOptionsFormulas.d.ts +7 -0
- package/api/types/ParseConfigBlockOptionsFormulas.js +3 -0
- package/api/types/ParseRun.d.ts +10 -1
- package/api/types/ParseRunStatusEnum.d.ts +2 -0
- package/api/types/ParseRunStatusEnum.js +2 -0
- package/api/types/ProcessorRunStatus.d.ts +2 -0
- package/api/types/ProcessorRunStatus.js +2 -0
- package/api/types/WebhookEndpointEventType.d.ts +4 -0
- package/api/types/WebhookEndpointEventType.js +4 -0
- package/api/types/WebhookEvent.d.ts +13 -1
- package/api/types/WebhookSubscriptionEventType.d.ts +5 -3
- package/api/types/WebhookSubscriptionEventType.js +5 -3
- package/api/types/index.d.ts +7 -8
- package/api/types/index.js +7 -8
- package/package.json +1 -1
- package/reference.md +574 -15
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/api/types/BatchProcessorRun.d.ts +0 -66
- package/api/types/BatchProcessorRunMetrics.d.ts +0 -6
- package/api/types/BatchProcessorRunOptions.d.ts +0 -9
- package/api/types/BatchProcessorRunSource.d.ts +0 -12
- package/api/types/BatchProcessorRunSource.js +0 -15
- package/api/types/BatchProcessorRunStatus.d.ts +0 -14
- package/api/types/BatchProcessorRunStatus.js +0 -17
- package/api/types/BatchRunEntity.d.ts +0 -18
- package/api/types/BatchRunEntityVersion.d.ts +0 -18
- package/api/types/BatchRunMetrics.d.ts +0 -6
- /package/api/{types/BatchProcessorRun.js → resources/classifyRuns/client/requests/ClassifyRunsCreateBatchRequest.js} +0 -0
- /package/api/{types/BatchProcessorRunMetrics.js → resources/classifyRuns/types/ClassifyRunsCreateBatchRequestClassifier.js} +0 -0
- /package/api/{types/BatchProcessorRunOptions.js → resources/classifyRuns/types/ClassifyRunsCreateBatchRequestInputsItem.js} +0 -0
- /package/api/{types/BatchRunEntity.js → resources/classifyRuns/types/ClassifyRunsCreateBatchRequestInputsItemFile.js} +0 -0
- /package/api/{types/BatchRunEntityVersion.js → resources/extractRuns/client/requests/ExtractRunsCreateBatchRequest.js} +0 -0
- /package/api/{types/BatchRunMetrics.js → resources/extractRuns/types/ExtractRunsCreateBatchRequestExtractor.js} +0 -0
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.9.0",
|
|
48
|
+
"User-Agent": "extend-ai/1.9.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
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as Extend from "./api/index";
|
|
2
2
|
import { BatchProcessorRunClient } from "./api/resources/batchProcessorRun/client/Client";
|
|
3
|
+
import { BatchRunsClient } from "./api/resources/batchRuns/client/Client";
|
|
3
4
|
import { ClassifiersClient } from "./api/resources/classifiers/client/Client";
|
|
4
5
|
import { ClassifierVersionsClient } from "./api/resources/classifierVersions/client/Client";
|
|
5
6
|
import { ClassifyRunsClient } from "./api/resources/classifyRuns/client/Client";
|
|
@@ -54,6 +55,7 @@ export declare class ExtendClient {
|
|
|
54
55
|
protected _processor: ProcessorClient | undefined;
|
|
55
56
|
protected _processorVersion: ProcessorVersionClient | undefined;
|
|
56
57
|
protected _batchProcessorRun: BatchProcessorRunClient | undefined;
|
|
58
|
+
protected _batchRuns: BatchRunsClient | undefined;
|
|
57
59
|
protected _evaluationSets: EvaluationSetsClient | undefined;
|
|
58
60
|
protected _evaluationSetItems: EvaluationSetItemsClient | undefined;
|
|
59
61
|
protected _evaluationSetRuns: EvaluationSetRunsClient | undefined;
|
|
@@ -80,6 +82,7 @@ export declare class ExtendClient {
|
|
|
80
82
|
get processor(): ProcessorClient;
|
|
81
83
|
get processorVersion(): ProcessorVersionClient;
|
|
82
84
|
get batchProcessorRun(): BatchProcessorRunClient;
|
|
85
|
+
get batchRuns(): BatchRunsClient;
|
|
83
86
|
get evaluationSets(): EvaluationSetsClient;
|
|
84
87
|
get evaluationSetItems(): EvaluationSetItemsClient;
|
|
85
88
|
get evaluationSetRuns(): EvaluationSetRunsClient;
|
package/Client.js
CHANGED
|
@@ -57,30 +57,31 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
57
57
|
exports.ExtendClient = void 0;
|
|
58
58
|
const Extend = __importStar(require("./api/index"));
|
|
59
59
|
const Client_1 = require("./api/resources/batchProcessorRun/client/Client");
|
|
60
|
-
const Client_2 = require("./api/resources/
|
|
61
|
-
const Client_3 = require("./api/resources/
|
|
62
|
-
const Client_4 = require("./api/resources/
|
|
63
|
-
const Client_5 = require("./api/resources/
|
|
64
|
-
const Client_6 = require("./api/resources/
|
|
65
|
-
const Client_7 = require("./api/resources/
|
|
66
|
-
const Client_8 = require("./api/resources/
|
|
67
|
-
const Client_9 = require("./api/resources/
|
|
68
|
-
const Client_10 = require("./api/resources/
|
|
69
|
-
const Client_11 = require("./api/resources/
|
|
70
|
-
const Client_12 = require("./api/resources/
|
|
71
|
-
const Client_13 = require("./api/resources/
|
|
72
|
-
const Client_14 = require("./api/resources/
|
|
73
|
-
const Client_15 = require("./api/resources/
|
|
74
|
-
const Client_16 = require("./api/resources/
|
|
75
|
-
const Client_17 = require("./api/resources/
|
|
76
|
-
const Client_18 = require("./api/resources/
|
|
77
|
-
const Client_19 = require("./api/resources/
|
|
78
|
-
const Client_20 = require("./api/resources/
|
|
79
|
-
const Client_21 = require("./api/resources/
|
|
80
|
-
const Client_22 = require("./api/resources/
|
|
81
|
-
const Client_23 = require("./api/resources/
|
|
82
|
-
const Client_24 = require("./api/resources/
|
|
83
|
-
const Client_25 = require("./api/resources/
|
|
60
|
+
const Client_2 = require("./api/resources/batchRuns/client/Client");
|
|
61
|
+
const Client_3 = require("./api/resources/classifiers/client/Client");
|
|
62
|
+
const Client_4 = require("./api/resources/classifierVersions/client/Client");
|
|
63
|
+
const Client_5 = require("./api/resources/classifyRuns/client/Client");
|
|
64
|
+
const Client_6 = require("./api/resources/editRuns/client/Client");
|
|
65
|
+
const Client_7 = require("./api/resources/editSchemas/client/Client");
|
|
66
|
+
const Client_8 = require("./api/resources/evaluationSetItems/client/Client");
|
|
67
|
+
const Client_9 = require("./api/resources/evaluationSetRuns/client/Client");
|
|
68
|
+
const Client_10 = require("./api/resources/evaluationSets/client/Client");
|
|
69
|
+
const Client_11 = require("./api/resources/extractors/client/Client");
|
|
70
|
+
const Client_12 = require("./api/resources/extractorVersions/client/Client");
|
|
71
|
+
const Client_13 = require("./api/resources/extractRuns/client/Client");
|
|
72
|
+
const Client_14 = require("./api/resources/files/client/Client");
|
|
73
|
+
const Client_15 = require("./api/resources/parseRuns/client/Client");
|
|
74
|
+
const Client_16 = require("./api/resources/processor/client/Client");
|
|
75
|
+
const Client_17 = require("./api/resources/processorRun/client/Client");
|
|
76
|
+
const Client_18 = require("./api/resources/processorVersion/client/Client");
|
|
77
|
+
const Client_19 = require("./api/resources/splitRuns/client/Client");
|
|
78
|
+
const Client_20 = require("./api/resources/splitters/client/Client");
|
|
79
|
+
const Client_21 = require("./api/resources/splitterVersions/client/Client");
|
|
80
|
+
const Client_22 = require("./api/resources/webhookEndpoints/client/Client");
|
|
81
|
+
const Client_23 = require("./api/resources/webhookSubscriptions/client/Client");
|
|
82
|
+
const Client_24 = require("./api/resources/workflowRuns/client/Client");
|
|
83
|
+
const Client_25 = require("./api/resources/workflows/client/Client");
|
|
84
|
+
const Client_26 = require("./api/resources/workflowVersions/client/Client");
|
|
84
85
|
const BaseClient_1 = require("./BaseClient");
|
|
85
86
|
const core = __importStar(require("./core"));
|
|
86
87
|
const headers_1 = require("./core/headers");
|
|
@@ -93,103 +94,107 @@ class ExtendClient {
|
|
|
93
94
|
}
|
|
94
95
|
get files() {
|
|
95
96
|
var _a;
|
|
96
|
-
return ((_a = this._files) !== null && _a !== void 0 ? _a : (this._files = new
|
|
97
|
+
return ((_a = this._files) !== null && _a !== void 0 ? _a : (this._files = new Client_14.FilesClient(this._options)));
|
|
97
98
|
}
|
|
98
99
|
get parseRuns() {
|
|
99
100
|
var _a;
|
|
100
|
-
return ((_a = this._parseRuns) !== null && _a !== void 0 ? _a : (this._parseRuns = new
|
|
101
|
+
return ((_a = this._parseRuns) !== null && _a !== void 0 ? _a : (this._parseRuns = new Client_15.ParseRunsClient(this._options)));
|
|
101
102
|
}
|
|
102
103
|
get editRuns() {
|
|
103
104
|
var _a;
|
|
104
|
-
return ((_a = this._editRuns) !== null && _a !== void 0 ? _a : (this._editRuns = new
|
|
105
|
+
return ((_a = this._editRuns) !== null && _a !== void 0 ? _a : (this._editRuns = new Client_6.EditRunsClient(this._options)));
|
|
105
106
|
}
|
|
106
107
|
get editSchemas() {
|
|
107
108
|
var _a;
|
|
108
|
-
return ((_a = this._editSchemas) !== null && _a !== void 0 ? _a : (this._editSchemas = new
|
|
109
|
+
return ((_a = this._editSchemas) !== null && _a !== void 0 ? _a : (this._editSchemas = new Client_7.EditSchemasClient(this._options)));
|
|
109
110
|
}
|
|
110
111
|
get extractRuns() {
|
|
111
112
|
var _a;
|
|
112
|
-
return ((_a = this._extractRuns) !== null && _a !== void 0 ? _a : (this._extractRuns = new
|
|
113
|
+
return ((_a = this._extractRuns) !== null && _a !== void 0 ? _a : (this._extractRuns = new Client_13.ExtractRunsClient(this._options)));
|
|
113
114
|
}
|
|
114
115
|
get extractors() {
|
|
115
116
|
var _a;
|
|
116
|
-
return ((_a = this._extractors) !== null && _a !== void 0 ? _a : (this._extractors = new
|
|
117
|
+
return ((_a = this._extractors) !== null && _a !== void 0 ? _a : (this._extractors = new Client_11.ExtractorsClient(this._options)));
|
|
117
118
|
}
|
|
118
119
|
get extractorVersions() {
|
|
119
120
|
var _a;
|
|
120
|
-
return ((_a = this._extractorVersions) !== null && _a !== void 0 ? _a : (this._extractorVersions = new
|
|
121
|
+
return ((_a = this._extractorVersions) !== null && _a !== void 0 ? _a : (this._extractorVersions = new Client_12.ExtractorVersionsClient(this._options)));
|
|
121
122
|
}
|
|
122
123
|
get classifyRuns() {
|
|
123
124
|
var _a;
|
|
124
|
-
return ((_a = this._classifyRuns) !== null && _a !== void 0 ? _a : (this._classifyRuns = new
|
|
125
|
+
return ((_a = this._classifyRuns) !== null && _a !== void 0 ? _a : (this._classifyRuns = new Client_5.ClassifyRunsClient(this._options)));
|
|
125
126
|
}
|
|
126
127
|
get classifiers() {
|
|
127
128
|
var _a;
|
|
128
|
-
return ((_a = this._classifiers) !== null && _a !== void 0 ? _a : (this._classifiers = new
|
|
129
|
+
return ((_a = this._classifiers) !== null && _a !== void 0 ? _a : (this._classifiers = new Client_3.ClassifiersClient(this._options)));
|
|
129
130
|
}
|
|
130
131
|
get classifierVersions() {
|
|
131
132
|
var _a;
|
|
132
|
-
return ((_a = this._classifierVersions) !== null && _a !== void 0 ? _a : (this._classifierVersions = new
|
|
133
|
+
return ((_a = this._classifierVersions) !== null && _a !== void 0 ? _a : (this._classifierVersions = new Client_4.ClassifierVersionsClient(this._options)));
|
|
133
134
|
}
|
|
134
135
|
get splitRuns() {
|
|
135
136
|
var _a;
|
|
136
|
-
return ((_a = this._splitRuns) !== null && _a !== void 0 ? _a : (this._splitRuns = new
|
|
137
|
+
return ((_a = this._splitRuns) !== null && _a !== void 0 ? _a : (this._splitRuns = new Client_19.SplitRunsClient(this._options)));
|
|
137
138
|
}
|
|
138
139
|
get splitters() {
|
|
139
140
|
var _a;
|
|
140
|
-
return ((_a = this._splitters) !== null && _a !== void 0 ? _a : (this._splitters = new
|
|
141
|
+
return ((_a = this._splitters) !== null && _a !== void 0 ? _a : (this._splitters = new Client_20.SplittersClient(this._options)));
|
|
141
142
|
}
|
|
142
143
|
get splitterVersions() {
|
|
143
144
|
var _a;
|
|
144
|
-
return ((_a = this._splitterVersions) !== null && _a !== void 0 ? _a : (this._splitterVersions = new
|
|
145
|
+
return ((_a = this._splitterVersions) !== null && _a !== void 0 ? _a : (this._splitterVersions = new Client_21.SplitterVersionsClient(this._options)));
|
|
145
146
|
}
|
|
146
147
|
get workflows() {
|
|
147
148
|
var _a;
|
|
148
|
-
return ((_a = this._workflows) !== null && _a !== void 0 ? _a : (this._workflows = new
|
|
149
|
+
return ((_a = this._workflows) !== null && _a !== void 0 ? _a : (this._workflows = new Client_25.WorkflowsClient(this._options)));
|
|
149
150
|
}
|
|
150
151
|
get workflowVersions() {
|
|
151
152
|
var _a;
|
|
152
|
-
return ((_a = this._workflowVersions) !== null && _a !== void 0 ? _a : (this._workflowVersions = new
|
|
153
|
+
return ((_a = this._workflowVersions) !== null && _a !== void 0 ? _a : (this._workflowVersions = new Client_26.WorkflowVersionsClient(this._options)));
|
|
153
154
|
}
|
|
154
155
|
get workflowRuns() {
|
|
155
156
|
var _a;
|
|
156
|
-
return ((_a = this._workflowRuns) !== null && _a !== void 0 ? _a : (this._workflowRuns = new
|
|
157
|
+
return ((_a = this._workflowRuns) !== null && _a !== void 0 ? _a : (this._workflowRuns = new Client_24.WorkflowRunsClient(this._options)));
|
|
157
158
|
}
|
|
158
159
|
get processorRun() {
|
|
159
160
|
var _a;
|
|
160
|
-
return ((_a = this._processorRun) !== null && _a !== void 0 ? _a : (this._processorRun = new
|
|
161
|
+
return ((_a = this._processorRun) !== null && _a !== void 0 ? _a : (this._processorRun = new Client_17.ProcessorRunClient(this._options)));
|
|
161
162
|
}
|
|
162
163
|
get processor() {
|
|
163
164
|
var _a;
|
|
164
|
-
return ((_a = this._processor) !== null && _a !== void 0 ? _a : (this._processor = new
|
|
165
|
+
return ((_a = this._processor) !== null && _a !== void 0 ? _a : (this._processor = new Client_16.ProcessorClient(this._options)));
|
|
165
166
|
}
|
|
166
167
|
get processorVersion() {
|
|
167
168
|
var _a;
|
|
168
|
-
return ((_a = this._processorVersion) !== null && _a !== void 0 ? _a : (this._processorVersion = new
|
|
169
|
+
return ((_a = this._processorVersion) !== null && _a !== void 0 ? _a : (this._processorVersion = new Client_18.ProcessorVersionClient(this._options)));
|
|
169
170
|
}
|
|
170
171
|
get batchProcessorRun() {
|
|
171
172
|
var _a;
|
|
172
173
|
return ((_a = this._batchProcessorRun) !== null && _a !== void 0 ? _a : (this._batchProcessorRun = new Client_1.BatchProcessorRunClient(this._options)));
|
|
173
174
|
}
|
|
175
|
+
get batchRuns() {
|
|
176
|
+
var _a;
|
|
177
|
+
return ((_a = this._batchRuns) !== null && _a !== void 0 ? _a : (this._batchRuns = new Client_2.BatchRunsClient(this._options)));
|
|
178
|
+
}
|
|
174
179
|
get evaluationSets() {
|
|
175
180
|
var _a;
|
|
176
|
-
return ((_a = this._evaluationSets) !== null && _a !== void 0 ? _a : (this._evaluationSets = new
|
|
181
|
+
return ((_a = this._evaluationSets) !== null && _a !== void 0 ? _a : (this._evaluationSets = new Client_10.EvaluationSetsClient(this._options)));
|
|
177
182
|
}
|
|
178
183
|
get evaluationSetItems() {
|
|
179
184
|
var _a;
|
|
180
|
-
return ((_a = this._evaluationSetItems) !== null && _a !== void 0 ? _a : (this._evaluationSetItems = new
|
|
185
|
+
return ((_a = this._evaluationSetItems) !== null && _a !== void 0 ? _a : (this._evaluationSetItems = new Client_8.EvaluationSetItemsClient(this._options)));
|
|
181
186
|
}
|
|
182
187
|
get evaluationSetRuns() {
|
|
183
188
|
var _a;
|
|
184
|
-
return ((_a = this._evaluationSetRuns) !== null && _a !== void 0 ? _a : (this._evaluationSetRuns = new
|
|
189
|
+
return ((_a = this._evaluationSetRuns) !== null && _a !== void 0 ? _a : (this._evaluationSetRuns = new Client_9.EvaluationSetRunsClient(this._options)));
|
|
185
190
|
}
|
|
186
191
|
get webhookEndpoints() {
|
|
187
192
|
var _a;
|
|
188
|
-
return ((_a = this._webhookEndpoints) !== null && _a !== void 0 ? _a : (this._webhookEndpoints = new
|
|
193
|
+
return ((_a = this._webhookEndpoints) !== null && _a !== void 0 ? _a : (this._webhookEndpoints = new Client_22.WebhookEndpointsClient(this._options)));
|
|
189
194
|
}
|
|
190
195
|
get webhookSubscriptions() {
|
|
191
196
|
var _a;
|
|
192
|
-
return ((_a = this._webhookSubscriptions) !== null && _a !== void 0 ? _a : (this._webhookSubscriptions = new
|
|
197
|
+
return ((_a = this._webhookSubscriptions) !== null && _a !== void 0 ? _a : (this._webhookSubscriptions = new Client_23.WebhookSubscriptionsClient(this._options)));
|
|
193
198
|
}
|
|
194
199
|
/**
|
|
195
200
|
* 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.
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient";
|
|
2
|
+
import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient";
|
|
3
|
+
import * as core from "../../../../core";
|
|
4
|
+
import * as Extend from "../../../index";
|
|
5
|
+
export declare namespace BatchRunsClient {
|
|
6
|
+
type Options = BaseClientOptions;
|
|
7
|
+
interface RequestOptions extends BaseRequestOptions {
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
export declare class BatchRunsClient {
|
|
11
|
+
protected readonly _options: NormalizedClientOptionsWithAuth<BatchRunsClient.Options>;
|
|
12
|
+
constructor(options: BatchRunsClient.Options);
|
|
13
|
+
/**
|
|
14
|
+
* Retrieve the status of a batch run by its ID. The `status` field reflects the aggregate state of the batch.
|
|
15
|
+
*
|
|
16
|
+
* This is a unified endpoint that works for batches created via any of the batch submission endpoints (`POST /parse_runs/batch`, `POST /extract_runs/batch`, `POST /classify_runs/batch`, `POST /split_runs/batch`).
|
|
17
|
+
*
|
|
18
|
+
* | Status | Meaning |
|
|
19
|
+
* |---|---|
|
|
20
|
+
* | `PENDING` | Queued, not yet started |
|
|
21
|
+
* | `PROCESSING` | Runs are actively being processed |
|
|
22
|
+
* | `PROCESSED` | All runs have completed |
|
|
23
|
+
* | `FAILED` | The batch encountered a fatal error |
|
|
24
|
+
* | `CANCELLED` | The batch was cancelled |
|
|
25
|
+
*
|
|
26
|
+
* To retrieve individual run results, use the List endpoint for the relevant type filtered by `batchId`:
|
|
27
|
+
* - `GET /parse_runs?batchId={id}`
|
|
28
|
+
* - `GET /extract_runs?batchId={id}`
|
|
29
|
+
* - `GET /classify_runs?batchId={id}`
|
|
30
|
+
* - `GET /split_runs?batchId={id}`
|
|
31
|
+
*
|
|
32
|
+
* @param {string} id - The unique identifier of the batch processor run to retrieve.
|
|
33
|
+
*
|
|
34
|
+
* Example: `"bpr_Xj8mK2pL9nR4vT7qY5wZ"`
|
|
35
|
+
* @param {BatchRunsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
36
|
+
*
|
|
37
|
+
* @throws {@link Extend.BadRequestError}
|
|
38
|
+
* @throws {@link Extend.UnauthorizedError}
|
|
39
|
+
* @throws {@link Extend.PaymentRequiredError}
|
|
40
|
+
* @throws {@link Extend.ForbiddenError}
|
|
41
|
+
* @throws {@link Extend.NotFoundError}
|
|
42
|
+
* @throws {@link Extend.TooManyRequestsError}
|
|
43
|
+
* @throws {@link Extend.InternalServerError}
|
|
44
|
+
*
|
|
45
|
+
* @example
|
|
46
|
+
* await client.batchRuns.get("bpr_Xj8mK2pL9nR4vT7qY5wZ")
|
|
47
|
+
*/
|
|
48
|
+
get(id: string, requestOptions?: BatchRunsClient.RequestOptions): core.HttpResponsePromise<Extend.BatchRun>;
|
|
49
|
+
private __get;
|
|
50
|
+
}
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
+
if (k2 === undefined) k2 = k;
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
+
}
|
|
9
|
+
Object.defineProperty(o, k2, desc);
|
|
10
|
+
}) : (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
o[k2] = m[k];
|
|
13
|
+
}));
|
|
14
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
15
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
16
|
+
}) : function(o, v) {
|
|
17
|
+
o["default"] = v;
|
|
18
|
+
});
|
|
19
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
20
|
+
var ownKeys = function(o) {
|
|
21
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
22
|
+
var ar = [];
|
|
23
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
24
|
+
return ar;
|
|
25
|
+
};
|
|
26
|
+
return ownKeys(o);
|
|
27
|
+
};
|
|
28
|
+
return function (mod) {
|
|
29
|
+
if (mod && mod.__esModule) return mod;
|
|
30
|
+
var result = {};
|
|
31
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
32
|
+
__setModuleDefault(result, mod);
|
|
33
|
+
return result;
|
|
34
|
+
};
|
|
35
|
+
})();
|
|
36
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
37
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
38
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
39
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
40
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
41
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
42
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
43
|
+
});
|
|
44
|
+
};
|
|
45
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
46
|
+
exports.BatchRunsClient = void 0;
|
|
47
|
+
const BaseClient_1 = require("../../../../BaseClient");
|
|
48
|
+
const core = __importStar(require("../../../../core"));
|
|
49
|
+
const headers_1 = require("../../../../core/headers");
|
|
50
|
+
const environments = __importStar(require("../../../../environments"));
|
|
51
|
+
const handleNonStatusCodeError_1 = require("../../../../errors/handleNonStatusCodeError");
|
|
52
|
+
const errors = __importStar(require("../../../../errors/index"));
|
|
53
|
+
const Extend = __importStar(require("../../../index"));
|
|
54
|
+
class BatchRunsClient {
|
|
55
|
+
constructor(options) {
|
|
56
|
+
this._options = (0, BaseClient_1.normalizeClientOptionsWithAuth)(options);
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Retrieve the status of a batch run by its ID. The `status` field reflects the aggregate state of the batch.
|
|
60
|
+
*
|
|
61
|
+
* This is a unified endpoint that works for batches created via any of the batch submission endpoints (`POST /parse_runs/batch`, `POST /extract_runs/batch`, `POST /classify_runs/batch`, `POST /split_runs/batch`).
|
|
62
|
+
*
|
|
63
|
+
* | Status | Meaning |
|
|
64
|
+
* |---|---|
|
|
65
|
+
* | `PENDING` | Queued, not yet started |
|
|
66
|
+
* | `PROCESSING` | Runs are actively being processed |
|
|
67
|
+
* | `PROCESSED` | All runs have completed |
|
|
68
|
+
* | `FAILED` | The batch encountered a fatal error |
|
|
69
|
+
* | `CANCELLED` | The batch was cancelled |
|
|
70
|
+
*
|
|
71
|
+
* To retrieve individual run results, use the List endpoint for the relevant type filtered by `batchId`:
|
|
72
|
+
* - `GET /parse_runs?batchId={id}`
|
|
73
|
+
* - `GET /extract_runs?batchId={id}`
|
|
74
|
+
* - `GET /classify_runs?batchId={id}`
|
|
75
|
+
* - `GET /split_runs?batchId={id}`
|
|
76
|
+
*
|
|
77
|
+
* @param {string} id - The unique identifier of the batch processor run to retrieve.
|
|
78
|
+
*
|
|
79
|
+
* Example: `"bpr_Xj8mK2pL9nR4vT7qY5wZ"`
|
|
80
|
+
* @param {BatchRunsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
81
|
+
*
|
|
82
|
+
* @throws {@link Extend.BadRequestError}
|
|
83
|
+
* @throws {@link Extend.UnauthorizedError}
|
|
84
|
+
* @throws {@link Extend.PaymentRequiredError}
|
|
85
|
+
* @throws {@link Extend.ForbiddenError}
|
|
86
|
+
* @throws {@link Extend.NotFoundError}
|
|
87
|
+
* @throws {@link Extend.TooManyRequestsError}
|
|
88
|
+
* @throws {@link Extend.InternalServerError}
|
|
89
|
+
*
|
|
90
|
+
* @example
|
|
91
|
+
* await client.batchRuns.get("bpr_Xj8mK2pL9nR4vT7qY5wZ")
|
|
92
|
+
*/
|
|
93
|
+
get(id, requestOptions) {
|
|
94
|
+
return core.HttpResponsePromise.fromPromise(this.__get(id, requestOptions));
|
|
95
|
+
}
|
|
96
|
+
__get(id, requestOptions) {
|
|
97
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
98
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
99
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
100
|
+
const _headers = (0, headers_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_1.mergeOnlyDefinedHeaders)({ "x-extend-api-version": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.extendApiVersion) !== null && _b !== void 0 ? _b : "2026-02-09" }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
101
|
+
const _response = yield ((_c = this._options.fetcher) !== null && _c !== void 0 ? _c : core.fetcher)({
|
|
102
|
+
url: core.url.join((_e = (_d = (yield core.Supplier.get(this._options.baseUrl))) !== null && _d !== void 0 ? _d : (yield core.Supplier.get(this._options.environment))) !== null && _e !== void 0 ? _e : environments.ExtendEnvironment.Production, `batch_runs/${core.url.encodePathParam(id)}`),
|
|
103
|
+
method: "GET",
|
|
104
|
+
headers: _headers,
|
|
105
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
106
|
+
timeoutMs: ((_h = (_f = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _f !== void 0 ? _f : (_g = this._options) === null || _g === void 0 ? void 0 : _g.timeoutInSeconds) !== null && _h !== void 0 ? _h : 300) * 1000,
|
|
107
|
+
maxRetries: (_j = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _j !== void 0 ? _j : (_k = this._options) === null || _k === void 0 ? void 0 : _k.maxRetries,
|
|
108
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
109
|
+
fetchFn: (_l = this._options) === null || _l === void 0 ? void 0 : _l.fetch,
|
|
110
|
+
logging: this._options.logging,
|
|
111
|
+
});
|
|
112
|
+
if (_response.ok) {
|
|
113
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
114
|
+
}
|
|
115
|
+
if (_response.error.reason === "status-code") {
|
|
116
|
+
switch (_response.error.statusCode) {
|
|
117
|
+
case 400:
|
|
118
|
+
throw new Extend.BadRequestError(_response.error.body, _response.rawResponse);
|
|
119
|
+
case 401:
|
|
120
|
+
throw new Extend.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
121
|
+
case 402:
|
|
122
|
+
throw new Extend.PaymentRequiredError(_response.error.body, _response.rawResponse);
|
|
123
|
+
case 403:
|
|
124
|
+
throw new Extend.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
125
|
+
case 404:
|
|
126
|
+
throw new Extend.NotFoundError(_response.error.body, _response.rawResponse);
|
|
127
|
+
case 429:
|
|
128
|
+
throw new Extend.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
129
|
+
case 500:
|
|
130
|
+
throw new Extend.InternalServerError(_response.error.body, _response.rawResponse);
|
|
131
|
+
default:
|
|
132
|
+
throw new errors.ExtendError({
|
|
133
|
+
statusCode: _response.error.statusCode,
|
|
134
|
+
body: _response.error.body,
|
|
135
|
+
rawResponse: _response.rawResponse,
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
return (0, handleNonStatusCodeError_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/batch_runs/{id}");
|
|
140
|
+
});
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
exports.BatchRunsClient = BatchRunsClient;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./client";
|
|
@@ -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("./client"), exports);
|
|
@@ -71,9 +71,12 @@ export declare class ClassifierVersionsClient {
|
|
|
71
71
|
* @param {string} classifierId - The ID of the classifier.
|
|
72
72
|
*
|
|
73
73
|
* Example: `"cl_Xj8mK2pL9nR4vT7qY5wZ"`
|
|
74
|
-
* @param {string} versionId - The
|
|
74
|
+
* @param {string} versionId - The version to retrieve. Accepts any of the following:
|
|
75
75
|
*
|
|
76
|
-
*
|
|
76
|
+
* - `"draft"` — returns the current draft version
|
|
77
|
+
* - `"latest"` — returns the latest published version (falls back to draft if none published)
|
|
78
|
+
* - A version number (e.g. `"0.1"`, `"1.0"`) — returns that specific published version
|
|
79
|
+
* - A version ID (e.g. `"clsv_QYk6jgHA_8CsO8rVWhyNC"`) — returns that specific version by ID
|
|
77
80
|
* @param {Extend.ClassifierVersionsRetrieveRequest} request
|
|
78
81
|
* @param {ClassifierVersionsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
79
82
|
*
|
|
@@ -87,7 +90,7 @@ export declare class ClassifierVersionsClient {
|
|
|
87
90
|
* @throws {@link Extend.InternalServerError}
|
|
88
91
|
*
|
|
89
92
|
* @example
|
|
90
|
-
* await client.classifierVersions.retrieve("classifier_id_here", "
|
|
93
|
+
* await client.classifierVersions.retrieve("classifier_id_here", "draft")
|
|
91
94
|
*/
|
|
92
95
|
retrieve(classifierId: string, versionId: string, request?: Extend.ClassifierVersionsRetrieveRequest, requestOptions?: ClassifierVersionsClient.RequestOptions): core.HttpResponsePromise<Extend.ClassifierVersion>;
|
|
93
96
|
private __retrieve;
|
|
@@ -244,9 +244,12 @@ class ClassifierVersionsClient {
|
|
|
244
244
|
* @param {string} classifierId - The ID of the classifier.
|
|
245
245
|
*
|
|
246
246
|
* Example: `"cl_Xj8mK2pL9nR4vT7qY5wZ"`
|
|
247
|
-
* @param {string} versionId - The
|
|
247
|
+
* @param {string} versionId - The version to retrieve. Accepts any of the following:
|
|
248
248
|
*
|
|
249
|
-
*
|
|
249
|
+
* - `"draft"` — returns the current draft version
|
|
250
|
+
* - `"latest"` — returns the latest published version (falls back to draft if none published)
|
|
251
|
+
* - A version number (e.g. `"0.1"`, `"1.0"`) — returns that specific published version
|
|
252
|
+
* - A version ID (e.g. `"clsv_QYk6jgHA_8CsO8rVWhyNC"`) — returns that specific version by ID
|
|
250
253
|
* @param {Extend.ClassifierVersionsRetrieveRequest} request
|
|
251
254
|
* @param {ClassifierVersionsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
252
255
|
*
|
|
@@ -260,7 +263,7 @@ class ClassifierVersionsClient {
|
|
|
260
263
|
* @throws {@link Extend.InternalServerError}
|
|
261
264
|
*
|
|
262
265
|
* @example
|
|
263
|
-
* await client.classifierVersions.retrieve("classifier_id_here", "
|
|
266
|
+
* await client.classifierVersions.retrieve("classifier_id_here", "draft")
|
|
264
267
|
*/
|
|
265
268
|
retrieve(classifierId, versionId, request = {}, requestOptions) {
|
|
266
269
|
return core.HttpResponsePromise.fromPromise(this.__retrieve(classifierId, versionId, request, requestOptions));
|
|
@@ -136,4 +136,61 @@ export declare class ClassifyRunsClient {
|
|
|
136
136
|
*/
|
|
137
137
|
cancel(id: string, request?: Extend.ClassifyRunsCancelRequest, requestOptions?: ClassifyRunsClient.RequestOptions): core.HttpResponsePromise<Extend.ClassifyRun>;
|
|
138
138
|
private __cancel;
|
|
139
|
+
/**
|
|
140
|
+
* Submit up to **1,000 files** for classification in a single request. Each file is processed as an independent classify run using the same classifier and configuration.
|
|
141
|
+
*
|
|
142
|
+
* Unlike the single [Classify File (Async)](https://docs.extend.ai/2026-02-09/developers/api-reference/endpoints/classify/create-classify-run) endpoint, this batch endpoint accepts an `inputs` array and immediately returns a `BatchRun` object containing a batch `id` and a `PENDING` status. The individual runs are then queued and processed asynchronously.
|
|
143
|
+
*
|
|
144
|
+
* **Monitoring results:**
|
|
145
|
+
* - **Webhooks (recommended):** Subscribe to `batch_processor_run.processed` and `batch_processor_run.failed` events. The webhook payload indicates the batch has finished — fetch individual run results using `GET /classify_runs?batchId={id}`.
|
|
146
|
+
* - **Polling:** Call `GET /batch_runs/{id}` to check the overall batch status, and use `GET /classify_runs` filtered by `batchId` to retrieve individual run results.
|
|
147
|
+
*
|
|
148
|
+
* **Notes:**
|
|
149
|
+
* - A processor reference (`classifier.id`) is required — inline `config` is not supported for batch requests.
|
|
150
|
+
* - `inputs` must contain between 1 and 1,000 items.
|
|
151
|
+
* - All inputs in a batch use the same classifier version and override config.
|
|
152
|
+
*
|
|
153
|
+
* @param {Extend.ClassifyRunsCreateBatchRequest} request
|
|
154
|
+
* @param {ClassifyRunsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
155
|
+
*
|
|
156
|
+
* @throws {@link Extend.BadRequestError}
|
|
157
|
+
* @throws {@link Extend.UnauthorizedError}
|
|
158
|
+
* @throws {@link Extend.PaymentRequiredError}
|
|
159
|
+
* @throws {@link Extend.ForbiddenError}
|
|
160
|
+
* @throws {@link Extend.NotFoundError}
|
|
161
|
+
* @throws {@link Extend.UnprocessableEntityError}
|
|
162
|
+
* @throws {@link Extend.TooManyRequestsError}
|
|
163
|
+
* @throws {@link Extend.InternalServerError}
|
|
164
|
+
*
|
|
165
|
+
* @example
|
|
166
|
+
* await client.classifyRuns.createBatch({
|
|
167
|
+
* classifier: {
|
|
168
|
+
* id: "cl_xK9mLPqRtN3vS8wF5hB2cQ"
|
|
169
|
+
* },
|
|
170
|
+
* inputs: [{
|
|
171
|
+
* file: {
|
|
172
|
+
* url: "https://example.com/document1.pdf"
|
|
173
|
+
* },
|
|
174
|
+
* metadata: {
|
|
175
|
+
* "customerId": "cust_abc123"
|
|
176
|
+
* }
|
|
177
|
+
* }, {
|
|
178
|
+
* file: {
|
|
179
|
+
* url: "https://example.com/document2.pdf"
|
|
180
|
+
* },
|
|
181
|
+
* metadata: {
|
|
182
|
+
* "customerId": "cust_def456"
|
|
183
|
+
* }
|
|
184
|
+
* }, {
|
|
185
|
+
* file: {
|
|
186
|
+
* url: "https://example.com/document3.pdf"
|
|
187
|
+
* },
|
|
188
|
+
* metadata: {
|
|
189
|
+
* "customerId": "cust_ghi789"
|
|
190
|
+
* }
|
|
191
|
+
* }]
|
|
192
|
+
* })
|
|
193
|
+
*/
|
|
194
|
+
createBatch(request: Extend.ClassifyRunsCreateBatchRequest, requestOptions?: ClassifyRunsClient.RequestOptions): core.HttpResponsePromise<Extend.BatchRun>;
|
|
195
|
+
private __createBatch;
|
|
139
196
|
}
|