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
@@ -36,42 +36,42 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
36
36
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
37
37
  };
38
38
  Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.workflow = exports.batchProcessorRun = exports.workflowRunOutput = exports.evaluationSetItem = exports.evaluationSet = exports.file = exports.edit = exports.parserRun = exports.processorVersion = exports.processor = exports.processorRun = exports.batchWorkflowRun = exports.workflowRun = void 0;
39
+ exports.processorVersion = exports.processor = exports.processorRun = exports.evaluationSetItem = exports.evaluationSet = exports.batchProcessorRun = exports.batchWorkflowRun = exports.workflowRunOutput = exports.workflowRun = exports.workflow = exports.edit = exports.parserRun = exports.file = void 0;
40
+ exports.file = __importStar(require("./file"));
41
+ __exportStar(require("./file/types"), exports);
42
+ exports.parserRun = __importStar(require("./parserRun"));
43
+ __exportStar(require("./parserRun/types"), exports);
44
+ exports.edit = __importStar(require("./edit"));
45
+ __exportStar(require("./edit/types"), exports);
46
+ exports.workflow = __importStar(require("./workflow"));
47
+ __exportStar(require("./workflow/types"), exports);
40
48
  exports.workflowRun = __importStar(require("./workflowRun"));
41
49
  __exportStar(require("./workflowRun/types"), exports);
50
+ exports.workflowRunOutput = __importStar(require("./workflowRunOutput"));
51
+ __exportStar(require("./workflowRunOutput/types"), exports);
42
52
  exports.batchWorkflowRun = __importStar(require("./batchWorkflowRun"));
43
53
  __exportStar(require("./batchWorkflowRun/types"), exports);
54
+ exports.batchProcessorRun = __importStar(require("./batchProcessorRun"));
55
+ __exportStar(require("./batchProcessorRun/types"), exports);
56
+ exports.evaluationSet = __importStar(require("./evaluationSet"));
57
+ __exportStar(require("./evaluationSet/types"), exports);
58
+ exports.evaluationSetItem = __importStar(require("./evaluationSetItem"));
59
+ __exportStar(require("./evaluationSetItem/types"), exports);
44
60
  exports.processorRun = __importStar(require("./processorRun"));
45
61
  __exportStar(require("./processorRun/types"), exports);
46
62
  exports.processor = __importStar(require("./processor"));
47
63
  __exportStar(require("./processor/types"), exports);
48
64
  exports.processorVersion = __importStar(require("./processorVersion"));
49
65
  __exportStar(require("./processorVersion/types"), exports);
50
- exports.parserRun = __importStar(require("./parserRun"));
51
- __exportStar(require("./parserRun/types"), exports);
52
- exports.edit = __importStar(require("./edit"));
53
- __exportStar(require("./edit/types"), exports);
54
- exports.file = __importStar(require("./file"));
55
- __exportStar(require("./file/types"), exports);
56
- exports.evaluationSet = __importStar(require("./evaluationSet"));
57
- __exportStar(require("./evaluationSet/types"), exports);
58
- exports.evaluationSetItem = __importStar(require("./evaluationSetItem"));
59
- __exportStar(require("./evaluationSetItem/types"), exports);
60
- exports.workflowRunOutput = __importStar(require("./workflowRunOutput"));
61
- __exportStar(require("./workflowRunOutput/types"), exports);
62
- exports.batchProcessorRun = __importStar(require("./batchProcessorRun"));
63
- __exportStar(require("./batchProcessorRun/types"), exports);
64
- exports.workflow = __importStar(require("./workflow"));
65
- __exportStar(require("./workflow/types"), exports);
66
+ __exportStar(require("./file/client/requests"), exports);
67
+ __exportStar(require("./parserRun/client/requests"), exports);
68
+ __exportStar(require("./edit/client/requests"), exports);
69
+ __exportStar(require("./workflow/client/requests"), exports);
66
70
  __exportStar(require("./workflowRun/client/requests"), exports);
71
+ __exportStar(require("./workflowRunOutput/client/requests"), exports);
67
72
  __exportStar(require("./batchWorkflowRun/client/requests"), exports);
73
+ __exportStar(require("./evaluationSet/client/requests"), exports);
74
+ __exportStar(require("./evaluationSetItem/client/requests"), exports);
68
75
  __exportStar(require("./processorRun/client/requests"), exports);
69
76
  __exportStar(require("./processor/client/requests"), exports);
70
77
  __exportStar(require("./processorVersion/client/requests"), exports);
71
- __exportStar(require("./parserRun/client/requests"), exports);
72
- __exportStar(require("./edit/client/requests"), exports);
73
- __exportStar(require("./file/client/requests"), exports);
74
- __exportStar(require("./evaluationSet/client/requests"), exports);
75
- __exportStar(require("./evaluationSetItem/client/requests"), exports);
76
- __exportStar(require("./workflowRunOutput/client/requests"), exports);
77
- __exportStar(require("./workflow/client/requests"), exports);
@@ -9,7 +9,7 @@ export declare namespace ParserRun {
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 ParserRun {
33
33
  }
34
34
  export declare class ParserRun {
35
35
  protected readonly _options: ParserRun.Options;
36
- constructor(_options?: ParserRun.Options);
36
+ constructor(_options: ParserRun.Options);
37
37
  /**
38
38
  * Retrieve the status and results of a parser run.
39
39
  *
@@ -76,5 +76,5 @@ export declare class ParserRun {
76
76
  */
77
77
  delete(id: string, requestOptions?: ParserRun.RequestOptions): core.HttpResponsePromise<Extend.ParserRunDeleteResponse>;
78
78
  private __delete;
79
- protected _getAuthorizationHeader(): Promise<string | undefined>;
79
+ protected _getAuthorizationHeader(): Promise<string>;
80
80
  }
@@ -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 ParserRun {
55
- constructor(_options = {}) {
55
+ constructor(_options) {
56
56
  this._options = _options;
57
57
  }
58
58
  /**
@@ -208,11 +208,7 @@ class ParserRun {
208
208
  }
209
209
  _getAuthorizationHeader() {
210
210
  return __awaiter(this, void 0, void 0, function* () {
211
- const bearer = yield core.Supplier.get(this._options.token);
212
- if (bearer != null) {
213
- return `Bearer ${bearer}`;
214
- }
215
- return undefined;
211
+ return `Bearer ${yield core.Supplier.get(this._options.token)}`;
216
212
  });
217
213
  }
218
214
  }
@@ -9,7 +9,7 @@ export declare namespace Processor {
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 Processor {
33
33
  }
34
34
  export declare class Processor {
35
35
  protected readonly _options: Processor.Options;
36
- constructor(_options?: Processor.Options);
36
+ constructor(_options: Processor.Options);
37
37
  /**
38
38
  * List all processors in your organization
39
39
  *
@@ -92,5 +92,5 @@ export declare class Processor {
92
92
  */
93
93
  update(id: string, request?: Extend.ProcessorUpdateRequest, requestOptions?: Processor.RequestOptions): core.HttpResponsePromise<Extend.ProcessorUpdateResponse>;
94
94
  private __update;
95
- protected _getAuthorizationHeader(): Promise<string | undefined>;
95
+ protected _getAuthorizationHeader(): Promise<string>;
96
96
  }
@@ -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 Processor {
55
- constructor(_options = {}) {
55
+ constructor(_options) {
56
56
  this._options = _options;
57
57
  }
58
58
  /**
@@ -299,11 +299,7 @@ class Processor {
299
299
  }
300
300
  _getAuthorizationHeader() {
301
301
  return __awaiter(this, void 0, void 0, function* () {
302
- const bearer = yield core.Supplier.get(this._options.token);
303
- if (bearer != null) {
304
- return `Bearer ${bearer}`;
305
- }
306
- return undefined;
302
+ return `Bearer ${yield core.Supplier.get(this._options.token)}`;
307
303
  });
308
304
  }
309
305
  }
@@ -9,7 +9,7 @@ export declare namespace ProcessorRun {
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 ProcessorRun {
33
33
  }
34
34
  export declare class ProcessorRun {
35
35
  protected readonly _options: ProcessorRun.Options;
36
- constructor(_options?: ProcessorRun.Options);
36
+ constructor(_options: ProcessorRun.Options);
37
37
  /**
38
38
  * List runs of a Processor. A ProcessorRun represents a single execution of a processor against a file.
39
39
  *
@@ -67,7 +67,7 @@ export declare class ProcessorRun {
67
67
  * - **Synchronous**: Set `sync: true` to wait for completion and get final results in the response (5-minute timeout).
68
68
  *
69
69
  * **For asynchronous processing:**
70
- * - You can [configure webhooks](https://docs.extend.ai/2025-04-21/developers/webhooks/configuration) to receive notifications when a processor run is complete or failed.
70
+ * - You can [configure webhooks](https://docs.extend.ai/product/webhooks/configuration) to receive notifications when a processor run is complete or failed.
71
71
  * - Or you can [poll the get endpoint](https://docs.extend.ai/2025-04-21/developers/api-reference/processor-endpoints/get-processor-run) for updates on the status of the processor run.
72
72
  *
73
73
  * @param {Extend.ProcessorRunCreateRequest} request
@@ -141,5 +141,5 @@ export declare class ProcessorRun {
141
141
  */
142
142
  cancel(id: string, requestOptions?: ProcessorRun.RequestOptions): core.HttpResponsePromise<Extend.ProcessorRunCancelResponse>;
143
143
  private __cancel;
144
- protected _getAuthorizationHeader(): Promise<string | undefined>;
144
+ protected _getAuthorizationHeader(): Promise<string>;
145
145
  }
@@ -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 ProcessorRun {
55
- constructor(_options = {}) {
55
+ constructor(_options) {
56
56
  this._options = _options;
57
57
  }
58
58
  /**
@@ -171,7 +171,7 @@ class ProcessorRun {
171
171
  * - **Synchronous**: Set `sync: true` to wait for completion and get final results in the response (5-minute timeout).
172
172
  *
173
173
  * **For asynchronous processing:**
174
- * - You can [configure webhooks](https://docs.extend.ai/2025-04-21/developers/webhooks/configuration) to receive notifications when a processor run is complete or failed.
174
+ * - You can [configure webhooks](https://docs.extend.ai/product/webhooks/configuration) to receive notifications when a processor run is complete or failed.
175
175
  * - Or you can [poll the get endpoint](https://docs.extend.ai/2025-04-21/developers/api-reference/processor-endpoints/get-processor-run) for updates on the status of the processor run.
176
176
  *
177
177
  * @param {Extend.ProcessorRunCreateRequest} request
@@ -462,11 +462,7 @@ class ProcessorRun {
462
462
  }
463
463
  _getAuthorizationHeader() {
464
464
  return __awaiter(this, void 0, void 0, function* () {
465
- const bearer = yield core.Supplier.get(this._options.token);
466
- if (bearer != null) {
467
- return `Bearer ${bearer}`;
468
- }
469
- return undefined;
465
+ return `Bearer ${yield core.Supplier.get(this._options.token)}`;
470
466
  });
471
467
  }
472
468
  }
@@ -9,7 +9,7 @@ export declare namespace ProcessorVersion {
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,27 +33,7 @@ export declare namespace ProcessorVersion {
33
33
  }
34
34
  export declare class ProcessorVersion {
35
35
  protected readonly _options: ProcessorVersion.Options;
36
- constructor(_options?: ProcessorVersion.Options);
37
- /**
38
- * Retrieve a specific version of a processor in Extend
39
- *
40
- * @param {string} processorId - The ID of the processor.
41
- *
42
- * Example: `"dp_Xj8mK2pL9nR4vT7qY5wZ"`
43
- * @param {string} processorVersionId - The ID of the specific processor version to retrieve.
44
- *
45
- * Example: `"dpv_QYk6jgHA_8CsO8rVWhyNC"`
46
- * @param {ProcessorVersion.RequestOptions} requestOptions - Request-specific configuration.
47
- *
48
- * @throws {@link Extend.BadRequestError}
49
- * @throws {@link Extend.UnauthorizedError}
50
- * @throws {@link Extend.NotFoundError}
51
- *
52
- * @example
53
- * await client.processorVersion.get("processor_id_here", "processor_version_id_here")
54
- */
55
- get(processorId: string, processorVersionId: string, requestOptions?: ProcessorVersion.RequestOptions): core.HttpResponsePromise<Extend.ProcessorVersionGetResponse>;
56
- private __get;
36
+ constructor(_options: ProcessorVersion.Options);
57
37
  /**
58
38
  * This endpoint allows you to fetch all versions of a given processor, including the current `draft` version.
59
39
  *
@@ -95,5 +75,25 @@ export declare class ProcessorVersion {
95
75
  */
96
76
  create(id: string, request: Extend.ProcessorVersionCreateRequest, requestOptions?: ProcessorVersion.RequestOptions): core.HttpResponsePromise<Extend.ProcessorVersionCreateResponse>;
97
77
  private __create;
98
- protected _getAuthorizationHeader(): Promise<string | undefined>;
78
+ /**
79
+ * Retrieve a specific version of a processor in Extend
80
+ *
81
+ * @param {string} processorId - The ID of the processor.
82
+ *
83
+ * Example: `"dp_Xj8mK2pL9nR4vT7qY5wZ"`
84
+ * @param {string} processorVersionId - The ID of the specific processor version to retrieve.
85
+ *
86
+ * Example: `"dpv_QYk6jgHA_8CsO8rVWhyNC"`
87
+ * @param {ProcessorVersion.RequestOptions} requestOptions - Request-specific configuration.
88
+ *
89
+ * @throws {@link Extend.BadRequestError}
90
+ * @throws {@link Extend.UnauthorizedError}
91
+ * @throws {@link Extend.NotFoundError}
92
+ *
93
+ * @example
94
+ * await client.processorVersion.get("processor_id_here", "processor_version_id_here")
95
+ */
96
+ get(processorId: string, processorVersionId: string, requestOptions?: ProcessorVersion.RequestOptions): core.HttpResponsePromise<Extend.ProcessorVersionGetResponse>;
97
+ private __get;
98
+ protected _getAuthorizationHeader(): Promise<string>;
99
99
  }
@@ -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
  }