extend-ai 0.0.18 → 0.1.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.
Files changed (100) hide show
  1. package/Client.d.ts +27 -27
  2. package/Client.js +37 -41
  3. package/api/errors/index.d.ts +1 -1
  4. package/api/errors/index.js +1 -1
  5. package/api/resources/batchProcessorRun/client/Client.d.ts +3 -3
  6. package/api/resources/batchProcessorRun/client/Client.js +2 -6
  7. package/api/resources/batchWorkflowRun/client/Client.d.ts +3 -3
  8. package/api/resources/batchWorkflowRun/client/Client.js +2 -6
  9. package/api/resources/batchWorkflowRun/types/BatchWorkflowRunCreateRequestInputsItem.d.ts +1 -1
  10. package/api/resources/edit/client/Client.d.ts +3 -3
  11. package/api/resources/edit/client/Client.js +2 -6
  12. package/api/resources/evaluationSet/client/Client.d.ts +3 -3
  13. package/api/resources/evaluationSet/client/Client.js +2 -6
  14. package/api/resources/evaluationSetItem/client/Client.d.ts +3 -3
  15. package/api/resources/evaluationSetItem/client/Client.js +2 -6
  16. package/api/resources/file/client/Client.d.ts +3 -3
  17. package/api/resources/file/client/Client.js +2 -6
  18. package/api/resources/index.d.ts +23 -23
  19. package/api/resources/index.js +24 -24
  20. package/api/resources/parserRun/client/Client.d.ts +3 -3
  21. package/api/resources/parserRun/client/Client.js +2 -6
  22. package/api/resources/processor/client/Client.d.ts +3 -3
  23. package/api/resources/processor/client/Client.js +2 -6
  24. package/api/resources/processorRun/client/Client.d.ts +4 -4
  25. package/api/resources/processorRun/client/Client.js +3 -7
  26. package/api/resources/processorVersion/client/Client.d.ts +23 -23
  27. package/api/resources/processorVersion/client/Client.js +49 -53
  28. package/api/resources/processorVersion/types/index.d.ts +1 -1
  29. package/api/resources/processorVersion/types/index.js +1 -1
  30. package/api/resources/workflow/client/Client.d.ts +3 -3
  31. package/api/resources/workflow/client/Client.js +2 -6
  32. package/api/resources/workflowRun/client/Client.d.ts +3 -3
  33. package/api/resources/workflowRun/client/Client.js +2 -6
  34. package/api/resources/workflowRunOutput/client/Client.d.ts +3 -3
  35. package/api/resources/workflowRunOutput/client/Client.js +2 -6
  36. package/api/types/EditBoundingBox.d.ts +4 -4
  37. package/api/types/ParseConfig.d.ts +1 -1
  38. package/api/types/ParseConfigAdvancedOptions.d.ts +11 -0
  39. package/api/types/ParseConfigAdvancedOptionsExcelParsingMode.d.ts +16 -0
  40. package/api/types/ParseConfigAdvancedOptionsExcelParsingMode.js +10 -0
  41. package/api/types/ParseConfigTarget.d.ts +1 -1
  42. package/api/types/index.d.ts +132 -133
  43. package/api/types/index.js +132 -133
  44. package/dist/Client.d.ts +27 -27
  45. package/dist/Client.js +37 -41
  46. package/dist/api/errors/index.d.ts +1 -1
  47. package/dist/api/errors/index.js +1 -1
  48. package/dist/api/resources/batchProcessorRun/client/Client.d.ts +3 -3
  49. package/dist/api/resources/batchProcessorRun/client/Client.js +2 -6
  50. package/dist/api/resources/batchWorkflowRun/client/Client.d.ts +3 -3
  51. package/dist/api/resources/batchWorkflowRun/client/Client.js +2 -6
  52. package/dist/api/resources/batchWorkflowRun/types/BatchWorkflowRunCreateRequestInputsItem.d.ts +1 -1
  53. package/dist/api/resources/edit/client/Client.d.ts +3 -3
  54. package/dist/api/resources/edit/client/Client.js +2 -6
  55. package/dist/api/resources/evaluationSet/client/Client.d.ts +3 -3
  56. package/dist/api/resources/evaluationSet/client/Client.js +2 -6
  57. package/dist/api/resources/evaluationSetItem/client/Client.d.ts +3 -3
  58. package/dist/api/resources/evaluationSetItem/client/Client.js +2 -6
  59. package/dist/api/resources/file/client/Client.d.ts +3 -3
  60. package/dist/api/resources/file/client/Client.js +2 -6
  61. package/dist/api/resources/index.d.ts +23 -23
  62. package/dist/api/resources/index.js +24 -24
  63. package/dist/api/resources/parserRun/client/Client.d.ts +3 -3
  64. package/dist/api/resources/parserRun/client/Client.js +2 -6
  65. package/dist/api/resources/processor/client/Client.d.ts +3 -3
  66. package/dist/api/resources/processor/client/Client.js +2 -6
  67. package/dist/api/resources/processorRun/client/Client.d.ts +4 -4
  68. package/dist/api/resources/processorRun/client/Client.js +3 -7
  69. package/dist/api/resources/processorVersion/client/Client.d.ts +23 -23
  70. package/dist/api/resources/processorVersion/client/Client.js +49 -53
  71. package/dist/api/resources/processorVersion/types/index.d.ts +1 -1
  72. package/dist/api/resources/processorVersion/types/index.js +1 -1
  73. package/dist/api/resources/workflow/client/Client.d.ts +3 -3
  74. package/dist/api/resources/workflow/client/Client.js +2 -6
  75. package/dist/api/resources/workflowRun/client/Client.d.ts +3 -3
  76. package/dist/api/resources/workflowRun/client/Client.js +2 -6
  77. package/dist/api/resources/workflowRunOutput/client/Client.d.ts +3 -3
  78. package/dist/api/resources/workflowRunOutput/client/Client.js +2 -6
  79. package/dist/api/types/EditBoundingBox.d.ts +4 -4
  80. package/dist/api/types/ParseConfig.d.ts +1 -1
  81. package/dist/api/types/ParseConfigAdvancedOptions.d.ts +11 -0
  82. package/dist/api/types/ParseConfigAdvancedOptionsExcelParsingMode.d.ts +16 -0
  83. package/dist/api/types/ParseConfigAdvancedOptionsExcelParsingMode.js +10 -0
  84. package/dist/api/types/ParseConfigTarget.d.ts +1 -1
  85. package/dist/api/types/index.d.ts +132 -133
  86. package/dist/api/types/index.js +132 -133
  87. package/dist/version.d.ts +1 -1
  88. package/dist/version.js +1 -1
  89. package/package.json +1 -1
  90. package/reference.md +511 -511
  91. package/version.d.ts +1 -1
  92. package/version.js +1 -1
  93. package/api/types/OutputMetadata.d.ts +0 -5
  94. package/api/types/OutputMetadata.js +0 -5
  95. package/api/types/OutputMetadataValue.d.ts +0 -22
  96. package/api/types/OutputMetadataValue.js +0 -5
  97. package/dist/api/types/OutputMetadata.d.ts +0 -5
  98. package/dist/api/types/OutputMetadata.js +0 -5
  99. package/dist/api/types/OutputMetadataValue.d.ts +0 -22
  100. package/dist/api/types/OutputMetadataValue.js +0 -5
@@ -52,18 +52,18 @@ const Extend = __importStar(require("../../../index"));
52
52
  const headers_1 = require("../../../../core/headers");
53
53
  const errors = __importStar(require("../../../../errors/index"));
54
54
  class ProcessorVersion {
55
- constructor(_options = {}) {
55
+ constructor(_options) {
56
56
  this._options = _options;
57
57
  }
58
58
  /**
59
- * Retrieve a specific version of a processor in Extend
59
+ * This endpoint allows you to fetch all versions of a given processor, including the current `draft` version.
60
60
  *
61
- * @param {string} processorId - The ID of the processor.
61
+ * Versions are typically returned in descending order of creation (newest first), but this should be confirmed in the actual implementation.
62
+ * The `draft` version is the latest unpublished version of the processor, which can be published to create a new version. It might not have any changes from the last published version.
62
63
  *
63
- * Example: `"dp_Xj8mK2pL9nR4vT7qY5wZ"`
64
- * @param {string} processorVersionId - The ID of the specific processor version to retrieve.
64
+ * @param {string} id - The ID of the processor to retrieve versions for.
65
65
  *
66
- * Example: `"dpv_QYk6jgHA_8CsO8rVWhyNC"`
66
+ * Example: `"dp_Xj8mK2pL9nR4vT7qY5wZ"`
67
67
  * @param {ProcessorVersion.RequestOptions} requestOptions - Request-specific configuration.
68
68
  *
69
69
  * @throws {@link Extend.BadRequestError}
@@ -71,12 +71,12 @@ class ProcessorVersion {
71
71
  * @throws {@link Extend.NotFoundError}
72
72
  *
73
73
  * @example
74
- * await client.processorVersion.get("processor_id_here", "processor_version_id_here")
74
+ * await client.processorVersion.list("processor_id_here")
75
75
  */
76
- get(processorId, processorVersionId, requestOptions) {
77
- return core.HttpResponsePromise.fromPromise(this.__get(processorId, processorVersionId, requestOptions));
76
+ list(id, requestOptions) {
77
+ return core.HttpResponsePromise.fromPromise(this.__list(id, requestOptions));
78
78
  }
79
- __get(processorId, processorVersionId, requestOptions) {
79
+ __list(id, requestOptions) {
80
80
  return __awaiter(this, void 0, void 0, function* () {
81
81
  var _a, _b, _c, _d, _e;
82
82
  let _headers = (0, headers_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_1.mergeOnlyDefinedHeaders)({
@@ -84,7 +84,7 @@ class ProcessorVersion {
84
84
  "x-extend-api-version": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.extendApiVersion) !== null && _b !== void 0 ? _b : "2025-04-21",
85
85
  }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
86
86
  const _response = yield ((_c = this._options.fetcher) !== null && _c !== void 0 ? _c : core.fetcher)({
87
- 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, `processors/${encodeURIComponent(processorId)}/versions/${encodeURIComponent(processorVersionId)}`),
87
+ 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, `processors/${encodeURIComponent(id)}/versions`),
88
88
  method: "GET",
89
89
  headers: _headers,
90
90
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
@@ -119,7 +119,7 @@ class ProcessorVersion {
119
119
  rawResponse: _response.rawResponse,
120
120
  });
121
121
  case "timeout":
122
- throw new errors.ExtendTimeoutError("Timeout exceeded when calling GET /processors/{processorId}/versions/{processorVersionId}.");
122
+ throw new errors.ExtendTimeoutError("Timeout exceeded when calling GET /processors/{id}/versions.");
123
123
  case "unknown":
124
124
  throw new errors.ExtendError({
125
125
  message: _response.error.errorMessage,
@@ -129,27 +129,28 @@ class ProcessorVersion {
129
129
  });
130
130
  }
131
131
  /**
132
- * This endpoint allows you to fetch all versions of a given processor, including the current `draft` version.
132
+ * This endpoint allows you to publish a new version of an existing processor. Publishing a new version creates a snapshot of the processor's current configuration and makes it available for use in workflows.
133
133
  *
134
- * Versions are typically returned in descending order of creation (newest first), but this should be confirmed in the actual implementation.
135
- * The `draft` version is the latest unpublished version of the processor, which can be published to create a new version. It might not have any changes from the last published version.
134
+ * Publishing a new version does not automatically update existing workflows using this processor. You may need to manually update workflows to use the new version if desired.
136
135
  *
137
- * @param {string} id - The ID of the processor to retrieve versions for.
136
+ * @param {string} id - The ID of the processor to publish a new version for.
138
137
  *
139
138
  * Example: `"dp_Xj8mK2pL9nR4vT7qY5wZ"`
139
+ * @param {Extend.ProcessorVersionCreateRequest} request
140
140
  * @param {ProcessorVersion.RequestOptions} requestOptions - Request-specific configuration.
141
141
  *
142
142
  * @throws {@link Extend.BadRequestError}
143
143
  * @throws {@link Extend.UnauthorizedError}
144
- * @throws {@link Extend.NotFoundError}
145
144
  *
146
145
  * @example
147
- * await client.processorVersion.list("processor_id_here")
146
+ * await client.processorVersion.create("processor_id_here", {
147
+ * releaseType: "major"
148
+ * })
148
149
  */
149
- list(id, requestOptions) {
150
- return core.HttpResponsePromise.fromPromise(this.__list(id, requestOptions));
150
+ create(id, request, requestOptions) {
151
+ return core.HttpResponsePromise.fromPromise(this.__create(id, request, requestOptions));
151
152
  }
152
- __list(id, requestOptions) {
153
+ __create(id, request, requestOptions) {
153
154
  return __awaiter(this, void 0, void 0, function* () {
154
155
  var _a, _b, _c, _d, _e;
155
156
  let _headers = (0, headers_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_1.mergeOnlyDefinedHeaders)({
@@ -157,16 +158,22 @@ class ProcessorVersion {
157
158
  "x-extend-api-version": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.extendApiVersion) !== null && _b !== void 0 ? _b : "2025-04-21",
158
159
  }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
159
160
  const _response = yield ((_c = this._options.fetcher) !== null && _c !== void 0 ? _c : core.fetcher)({
160
- 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, `processors/${encodeURIComponent(id)}/versions`),
161
- method: "GET",
161
+ 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, `processors/${encodeURIComponent(id)}/publish`),
162
+ method: "POST",
162
163
  headers: _headers,
164
+ contentType: "application/json",
163
165
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
166
+ requestType: "json",
167
+ body: request,
164
168
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 300000,
165
169
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
166
170
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
167
171
  });
168
172
  if (_response.ok) {
169
- return { data: _response.body, rawResponse: _response.rawResponse };
173
+ return {
174
+ data: _response.body,
175
+ rawResponse: _response.rawResponse,
176
+ };
170
177
  }
171
178
  if (_response.error.reason === "status-code") {
172
179
  switch (_response.error.statusCode) {
@@ -174,8 +181,6 @@ class ProcessorVersion {
174
181
  throw new Extend.BadRequestError(_response.error.body, _response.rawResponse);
175
182
  case 401:
176
183
  throw new Extend.UnauthorizedError(_response.error.body, _response.rawResponse);
177
- case 404:
178
- throw new Extend.NotFoundError(_response.error.body, _response.rawResponse);
179
184
  default:
180
185
  throw new errors.ExtendError({
181
186
  statusCode: _response.error.statusCode,
@@ -192,7 +197,7 @@ class ProcessorVersion {
192
197
  rawResponse: _response.rawResponse,
193
198
  });
194
199
  case "timeout":
195
- throw new errors.ExtendTimeoutError("Timeout exceeded when calling GET /processors/{id}/versions.");
200
+ throw new errors.ExtendTimeoutError("Timeout exceeded when calling POST /processors/{id}/publish.");
196
201
  case "unknown":
197
202
  throw new errors.ExtendError({
198
203
  message: _response.error.errorMessage,
@@ -202,28 +207,27 @@ class ProcessorVersion {
202
207
  });
203
208
  }
204
209
  /**
205
- * This endpoint allows you to publish a new version of an existing processor. Publishing a new version creates a snapshot of the processor's current configuration and makes it available for use in workflows.
210
+ * Retrieve a specific version of a processor in Extend
206
211
  *
207
- * Publishing a new version does not automatically update existing workflows using this processor. You may need to manually update workflows to use the new version if desired.
212
+ * @param {string} processorId - The ID of the processor.
208
213
  *
209
- * @param {string} id - The ID of the processor to publish a new version for.
214
+ * Example: `"dp_Xj8mK2pL9nR4vT7qY5wZ"`
215
+ * @param {string} processorVersionId - The ID of the specific processor version to retrieve.
210
216
  *
211
- * Example: `"dp_Xj8mK2pL9nR4vT7qY5wZ"`
212
- * @param {Extend.ProcessorVersionCreateRequest} request
217
+ * Example: `"dpv_QYk6jgHA_8CsO8rVWhyNC"`
213
218
  * @param {ProcessorVersion.RequestOptions} requestOptions - Request-specific configuration.
214
219
  *
215
220
  * @throws {@link Extend.BadRequestError}
216
221
  * @throws {@link Extend.UnauthorizedError}
222
+ * @throws {@link Extend.NotFoundError}
217
223
  *
218
224
  * @example
219
- * await client.processorVersion.create("processor_id_here", {
220
- * releaseType: "major"
221
- * })
225
+ * await client.processorVersion.get("processor_id_here", "processor_version_id_here")
222
226
  */
223
- create(id, request, requestOptions) {
224
- return core.HttpResponsePromise.fromPromise(this.__create(id, request, requestOptions));
227
+ get(processorId, processorVersionId, requestOptions) {
228
+ return core.HttpResponsePromise.fromPromise(this.__get(processorId, processorVersionId, requestOptions));
225
229
  }
226
- __create(id, request, requestOptions) {
230
+ __get(processorId, processorVersionId, requestOptions) {
227
231
  return __awaiter(this, void 0, void 0, function* () {
228
232
  var _a, _b, _c, _d, _e;
229
233
  let _headers = (0, headers_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_1.mergeOnlyDefinedHeaders)({
@@ -231,22 +235,16 @@ class ProcessorVersion {
231
235
  "x-extend-api-version": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.extendApiVersion) !== null && _b !== void 0 ? _b : "2025-04-21",
232
236
  }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
233
237
  const _response = yield ((_c = this._options.fetcher) !== null && _c !== void 0 ? _c : core.fetcher)({
234
- 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, `processors/${encodeURIComponent(id)}/publish`),
235
- method: "POST",
238
+ 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, `processors/${encodeURIComponent(processorId)}/versions/${encodeURIComponent(processorVersionId)}`),
239
+ method: "GET",
236
240
  headers: _headers,
237
- contentType: "application/json",
238
241
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
239
- requestType: "json",
240
- body: request,
241
242
  timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 300000,
242
243
  maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
243
244
  abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
244
245
  });
245
246
  if (_response.ok) {
246
- return {
247
- data: _response.body,
248
- rawResponse: _response.rawResponse,
249
- };
247
+ return { data: _response.body, rawResponse: _response.rawResponse };
250
248
  }
251
249
  if (_response.error.reason === "status-code") {
252
250
  switch (_response.error.statusCode) {
@@ -254,6 +252,8 @@ class ProcessorVersion {
254
252
  throw new Extend.BadRequestError(_response.error.body, _response.rawResponse);
255
253
  case 401:
256
254
  throw new Extend.UnauthorizedError(_response.error.body, _response.rawResponse);
255
+ case 404:
256
+ throw new Extend.NotFoundError(_response.error.body, _response.rawResponse);
257
257
  default:
258
258
  throw new errors.ExtendError({
259
259
  statusCode: _response.error.statusCode,
@@ -270,7 +270,7 @@ class ProcessorVersion {
270
270
  rawResponse: _response.rawResponse,
271
271
  });
272
272
  case "timeout":
273
- throw new errors.ExtendTimeoutError("Timeout exceeded when calling POST /processors/{id}/publish.");
273
+ throw new errors.ExtendTimeoutError("Timeout exceeded when calling GET /processors/{processorId}/versions/{processorVersionId}.");
274
274
  case "unknown":
275
275
  throw new errors.ExtendError({
276
276
  message: _response.error.errorMessage,
@@ -281,11 +281,7 @@ class ProcessorVersion {
281
281
  }
282
282
  _getAuthorizationHeader() {
283
283
  return __awaiter(this, void 0, void 0, function* () {
284
- const bearer = yield core.Supplier.get(this._options.token);
285
- if (bearer != null) {
286
- return `Bearer ${bearer}`;
287
- }
288
- return undefined;
284
+ return `Bearer ${yield core.Supplier.get(this._options.token)}`;
289
285
  });
290
286
  }
291
287
  }
@@ -1,5 +1,5 @@
1
- export * from "./ProcessorVersionGetResponse";
2
1
  export * from "./ProcessorVersionListResponse";
3
2
  export * from "./ProcessorVersionCreateRequestReleaseType";
4
3
  export * from "./ProcessorVersionCreateRequestConfig";
5
4
  export * from "./ProcessorVersionCreateResponse";
5
+ export * from "./ProcessorVersionGetResponse";
@@ -14,8 +14,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./ProcessorVersionGetResponse"), exports);
18
17
  __exportStar(require("./ProcessorVersionListResponse"), exports);
19
18
  __exportStar(require("./ProcessorVersionCreateRequestReleaseType"), exports);
20
19
  __exportStar(require("./ProcessorVersionCreateRequestConfig"), exports);
21
20
  __exportStar(require("./ProcessorVersionCreateResponse"), exports);
21
+ __exportStar(require("./ProcessorVersionGetResponse"), exports);
@@ -9,7 +9,7 @@ export declare namespace Workflow {
9
9
  environment?: core.Supplier<environments.ExtendEnvironment | string>;
10
10
  /** Specify a custom URL to connect the client to. */
11
11
  baseUrl?: core.Supplier<string>;
12
- token?: core.Supplier<core.BearerToken | undefined>;
12
+ token: core.Supplier<core.BearerToken>;
13
13
  /** Override the x-extend-api-version header */
14
14
  extendApiVersion?: "2025-04-21";
15
15
  /** Additional headers to include in requests. */
@@ -33,7 +33,7 @@ export declare namespace Workflow {
33
33
  }
34
34
  export declare class Workflow {
35
35
  protected readonly _options: Workflow.Options;
36
- constructor(_options?: Workflow.Options);
36
+ constructor(_options: Workflow.Options);
37
37
  /**
38
38
  * Create a new workflow in Extend. Workflows are sequences of steps that process files and data in a specific order to achieve a desired outcome.
39
39
  *
@@ -52,5 +52,5 @@ export declare class Workflow {
52
52
  */
53
53
  create(request: Extend.WorkflowCreateRequest, requestOptions?: Workflow.RequestOptions): core.HttpResponsePromise<Extend.WorkflowCreateResponse>;
54
54
  private __create;
55
- protected _getAuthorizationHeader(): Promise<string | undefined>;
55
+ protected _getAuthorizationHeader(): Promise<string>;
56
56
  }
@@ -52,7 +52,7 @@ const Extend = __importStar(require("../../../index"));
52
52
  const headers_1 = require("../../../../core/headers");
53
53
  const errors = __importStar(require("../../../../errors/index"));
54
54
  class Workflow {
55
- constructor(_options = {}) {
55
+ constructor(_options) {
56
56
  this._options = _options;
57
57
  }
58
58
  /**
@@ -129,11 +129,7 @@ class Workflow {
129
129
  }
130
130
  _getAuthorizationHeader() {
131
131
  return __awaiter(this, void 0, void 0, function* () {
132
- const bearer = yield core.Supplier.get(this._options.token);
133
- if (bearer != null) {
134
- return `Bearer ${bearer}`;
135
- }
136
- return undefined;
132
+ return `Bearer ${yield core.Supplier.get(this._options.token)}`;
137
133
  });
138
134
  }
139
135
  }
@@ -9,7 +9,7 @@ export declare namespace WorkflowRun {
9
9
  environment?: core.Supplier<environments.ExtendEnvironment | string>;
10
10
  /** Specify a custom URL to connect the client to. */
11
11
  baseUrl?: core.Supplier<string>;
12
- token?: core.Supplier<core.BearerToken | undefined>;
12
+ token: core.Supplier<core.BearerToken>;
13
13
  /** Override the x-extend-api-version header */
14
14
  extendApiVersion?: "2025-04-21";
15
15
  /** Additional headers to include in requests. */
@@ -33,7 +33,7 @@ export declare namespace WorkflowRun {
33
33
  }
34
34
  export declare class WorkflowRun {
35
35
  protected readonly _options: WorkflowRun.Options;
36
- constructor(_options?: WorkflowRun.Options);
36
+ constructor(_options: WorkflowRun.Options);
37
37
  /**
38
38
  * List runs of a Workflow. Workflows are sequences of steps that process files and data in a specific order to achieve a desired outcome. A WorkflowRun represents a single execution of a workflow against a file.
39
39
  *
@@ -146,5 +146,5 @@ export declare class WorkflowRun {
146
146
  */
147
147
  cancel(workflowRunId: string, requestOptions?: WorkflowRun.RequestOptions): core.HttpResponsePromise<Extend.WorkflowRunCancelResponse>;
148
148
  private __cancel;
149
- protected _getAuthorizationHeader(): Promise<string | undefined>;
149
+ protected _getAuthorizationHeader(): Promise<string>;
150
150
  }
@@ -52,7 +52,7 @@ const Extend = __importStar(require("../../../index"));
52
52
  const headers_1 = require("../../../../core/headers");
53
53
  const errors = __importStar(require("../../../../errors/index"));
54
54
  class WorkflowRun {
55
- constructor(_options = {}) {
55
+ constructor(_options) {
56
56
  this._options = _options;
57
57
  }
58
58
  /**
@@ -515,11 +515,7 @@ class WorkflowRun {
515
515
  }
516
516
  _getAuthorizationHeader() {
517
517
  return __awaiter(this, void 0, void 0, function* () {
518
- const bearer = yield core.Supplier.get(this._options.token);
519
- if (bearer != null) {
520
- return `Bearer ${bearer}`;
521
- }
522
- return undefined;
518
+ return `Bearer ${yield core.Supplier.get(this._options.token)}`;
523
519
  });
524
520
  }
525
521
  }
@@ -9,7 +9,7 @@ export declare namespace WorkflowRunOutput {
9
9
  environment?: core.Supplier<environments.ExtendEnvironment | string>;
10
10
  /** Specify a custom URL to connect the client to. */
11
11
  baseUrl?: core.Supplier<string>;
12
- token?: core.Supplier<core.BearerToken | undefined>;
12
+ token: core.Supplier<core.BearerToken>;
13
13
  /** Override the x-extend-api-version header */
14
14
  extendApiVersion?: "2025-04-21";
15
15
  /** Additional headers to include in requests. */
@@ -33,7 +33,7 @@ export declare namespace WorkflowRunOutput {
33
33
  }
34
34
  export declare class WorkflowRunOutput {
35
35
  protected readonly _options: WorkflowRunOutput.Options;
36
- constructor(_options?: WorkflowRunOutput.Options);
36
+ constructor(_options: WorkflowRunOutput.Options);
37
37
  /**
38
38
  * Use this endpoint to submit corrected outputs for a WorkflowRun for future processor evaluation and tuning in Extend.
39
39
  *
@@ -61,5 +61,5 @@ export declare class WorkflowRunOutput {
61
61
  */
62
62
  update(workflowRunId: string, outputId: string, request: Extend.WorkflowRunOutputUpdateRequest, requestOptions?: WorkflowRunOutput.RequestOptions): core.HttpResponsePromise<Extend.WorkflowRunOutputUpdateResponse>;
63
63
  private __update;
64
- protected _getAuthorizationHeader(): Promise<string | undefined>;
64
+ protected _getAuthorizationHeader(): Promise<string>;
65
65
  }
@@ -52,7 +52,7 @@ const Extend = __importStar(require("../../../index"));
52
52
  const headers_1 = require("../../../../core/headers");
53
53
  const errors = __importStar(require("../../../../errors/index"));
54
54
  class WorkflowRunOutput {
55
- constructor(_options = {}) {
55
+ constructor(_options) {
56
56
  this._options = _options;
57
57
  }
58
58
  /**
@@ -143,11 +143,7 @@ class WorkflowRunOutput {
143
143
  }
144
144
  _getAuthorizationHeader() {
145
145
  return __awaiter(this, void 0, void 0, function* () {
146
- const bearer = yield core.Supplier.get(this._options.token);
147
- if (bearer != null) {
148
- return `Bearer ${bearer}`;
149
- }
150
- return undefined;
146
+ return `Bearer ${yield core.Supplier.get(this._options.token)}`;
151
147
  });
152
148
  }
153
149
  }
@@ -6,11 +6,11 @@
6
6
  */
7
7
  export interface EditBoundingBox {
8
8
  /** The left coordinate of the bounding box (pixels) */
9
- left?: number;
9
+ left: number;
10
10
  /** The top coordinate of the bounding box (pixels) */
11
- top?: number;
11
+ top: number;
12
12
  /** The right coordinate of the bounding box (pixels) */
13
- right?: number;
13
+ right: number;
14
14
  /** The bottom coordinate of the bounding box (pixels) */
15
- bottom?: number;
15
+ bottom: number;
16
16
  }
@@ -19,7 +19,7 @@ export interface ParseConfig {
19
19
  * * Prefer `markdown` for most documents, multi-column reading order, and retrieval use cases
20
20
  * * Prefer `spatial` for messy/scanned/handwritten or skewed documents, when you need near 1:1 layout fidelity, or for BOL-like logistics docs
21
21
  *
22
- * See "Markdown vs Spatial" in the Parse guide for details: /2025-04-21/developers/guides/parse#markdown-vs-spatial
22
+ * See Markdown vs Spatial in the Parse guide for details: /2025-04-21/developers/guides/parse#markdown-vs-spatial
23
23
  */
24
24
  target?: Extend.ParseConfigTarget;
25
25
  /** Strategy for dividing the document into chunks. */
@@ -8,6 +8,17 @@ export interface ParseConfigAdvancedOptions {
8
8
  /** Whether to enable agentic OCR corrections using VLM-based review and correction of OCR errors for messy handwriting and poorly scanned text. Deprecated - use `blockOptions.text.agentic` or `blockOptions.tables.agentic` instead for more granular control. */
9
9
  agenticOcrEnabled?: boolean;
10
10
  pageRanges?: Extend.PageRanges;
11
+ /**
12
+ * Controls how Excel files are parsed.
13
+ *
14
+ * * `basic`: Fast, deterministic parsing.
15
+ * * `advanced`: Enable layout block detection for complex spreadsheets.
16
+ *
17
+ * For `.xls` files, `basic` mode is always used.
18
+ */
19
+ excelParsingMode?: Extend.ParseConfigAdvancedOptionsExcelParsingMode;
20
+ /** Whether to exclude hidden rows, columns, and sheets when parsing Excel files. */
21
+ excelSkipHiddenContent?: boolean;
11
22
  /** Multiplier for the Y-axis threshold used to determine if text blocks should be placed on the same line or not (0.1-5.0, default 1.0). Higher values group elements that are further apart vertically. Only applies when the spatial target is set. */
12
23
  verticalGroupingThreshold?: number;
13
24
  /** Options for returning raw OCR data in the response. */
@@ -0,0 +1,16 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ /**
5
+ * Controls how Excel files are parsed.
6
+ *
7
+ * * `basic`: Fast, deterministic parsing.
8
+ * * `advanced`: Enable layout block detection for complex spreadsheets.
9
+ *
10
+ * For `.xls` files, `basic` mode is always used.
11
+ */
12
+ export type ParseConfigAdvancedOptionsExcelParsingMode = "basic" | "advanced";
13
+ export declare const ParseConfigAdvancedOptionsExcelParsingMode: {
14
+ readonly Basic: "basic";
15
+ readonly Advanced: "advanced";
16
+ };
@@ -0,0 +1,10 @@
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.ParseConfigAdvancedOptionsExcelParsingMode = void 0;
7
+ exports.ParseConfigAdvancedOptionsExcelParsingMode = {
8
+ Basic: "basic",
9
+ Advanced: "advanced",
10
+ };
@@ -14,7 +14,7 @@
14
14
  * * Prefer `markdown` for most documents, multi-column reading order, and retrieval use cases
15
15
  * * Prefer `spatial` for messy/scanned/handwritten or skewed documents, when you need near 1:1 layout fidelity, or for BOL-like logistics docs
16
16
  *
17
- * See "Markdown vs Spatial" in the Parse guide for details: /2025-04-21/developers/guides/parse#markdown-vs-spatial
17
+ * See Markdown vs Spatial in the Parse guide for details: /2025-04-21/developers/guides/parse#markdown-vs-spatial
18
18
  */
19
19
  export type ParseConfigTarget = "markdown" | "spatial";
20
20
  export declare const ParseConfigTarget: {