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.
Files changed (128) hide show
  1. package/BaseClient.js +2 -2
  2. package/Client.d.ts +3 -0
  3. package/Client.js +53 -48
  4. package/api/resources/batchRuns/client/Client.d.ts +50 -0
  5. package/api/resources/batchRuns/client/Client.js +143 -0
  6. package/api/resources/batchRuns/client/index.d.ts +1 -0
  7. package/api/resources/batchRuns/client/index.js +2 -0
  8. package/api/resources/batchRuns/index.d.ts +1 -0
  9. package/api/resources/batchRuns/index.js +17 -0
  10. package/api/resources/classifierVersions/client/Client.d.ts +6 -3
  11. package/api/resources/classifierVersions/client/Client.js +6 -3
  12. package/api/resources/classifyRuns/client/Client.d.ts +57 -0
  13. package/api/resources/classifyRuns/client/Client.js +111 -1
  14. package/api/resources/classifyRuns/client/requests/ClassifyRunsCreateBatchRequest.d.ts +38 -0
  15. package/api/resources/classifyRuns/client/requests/ClassifyRunsListRequest.d.ts +6 -0
  16. package/api/resources/classifyRuns/client/requests/index.d.ts +1 -0
  17. package/api/resources/classifyRuns/types/ClassifyRunsCreateBatchRequestClassifier.d.ts +11 -0
  18. package/api/resources/classifyRuns/types/ClassifyRunsCreateBatchRequestInputsItem.d.ts +6 -0
  19. package/api/resources/classifyRuns/types/ClassifyRunsCreateBatchRequestInputsItemFile.d.ts +5 -0
  20. package/api/resources/classifyRuns/types/index.d.ts +3 -0
  21. package/api/resources/classifyRuns/types/index.js +3 -0
  22. package/api/resources/extractRuns/client/Client.d.ts +57 -0
  23. package/api/resources/extractRuns/client/Client.js +111 -1
  24. package/api/resources/extractRuns/client/requests/ExtractRunsCreateBatchRequest.d.ts +38 -0
  25. package/api/resources/extractRuns/client/requests/ExtractRunsListRequest.d.ts +6 -0
  26. package/api/resources/extractRuns/client/requests/index.d.ts +1 -0
  27. package/api/resources/extractRuns/types/ExtractRunsCreateBatchRequestExtractor.d.ts +11 -0
  28. package/api/resources/extractRuns/types/ExtractRunsCreateBatchRequestInputsItem.d.ts +6 -0
  29. package/api/resources/extractRuns/types/ExtractRunsCreateBatchRequestInputsItem.js +3 -0
  30. package/api/resources/extractRuns/types/ExtractRunsCreateBatchRequestInputsItemFile.d.ts +5 -0
  31. package/api/resources/extractRuns/types/ExtractRunsCreateBatchRequestInputsItemFile.js +3 -0
  32. package/api/resources/extractRuns/types/index.d.ts +3 -0
  33. package/api/resources/extractRuns/types/index.js +3 -0
  34. package/api/resources/extractorVersions/client/Client.d.ts +6 -3
  35. package/api/resources/extractorVersions/client/Client.js +6 -3
  36. package/api/resources/index.d.ts +1 -0
  37. package/api/resources/index.js +2 -1
  38. package/api/resources/parseRuns/client/Client.d.ts +77 -0
  39. package/api/resources/parseRuns/client/Client.js +189 -0
  40. package/api/resources/parseRuns/client/requests/ParseRunsCreateBatchRequest.d.ts +35 -0
  41. package/api/resources/parseRuns/client/requests/ParseRunsCreateBatchRequest.js +3 -0
  42. package/api/resources/parseRuns/client/requests/ParseRunsListRequest.d.ts +27 -0
  43. package/api/resources/parseRuns/client/requests/ParseRunsListRequest.js +3 -0
  44. package/api/resources/parseRuns/client/requests/index.d.ts +2 -0
  45. package/api/resources/parseRuns/types/ParseRunsCreateBatchRequestInputsItem.d.ts +6 -0
  46. package/api/resources/parseRuns/types/ParseRunsCreateBatchRequestInputsItem.js +3 -0
  47. package/api/resources/parseRuns/types/ParseRunsCreateBatchRequestInputsItemFile.d.ts +5 -0
  48. package/api/resources/parseRuns/types/ParseRunsCreateBatchRequestInputsItemFile.js +3 -0
  49. package/api/resources/parseRuns/types/ParseRunsListRequestStatus.d.ts +7 -0
  50. package/api/resources/parseRuns/types/ParseRunsListRequestStatus.js +10 -0
  51. package/api/resources/parseRuns/types/ParseRunsListResponse.d.ts +6 -0
  52. package/api/resources/parseRuns/types/ParseRunsListResponse.js +3 -0
  53. package/api/resources/parseRuns/types/index.d.ts +4 -0
  54. package/api/resources/parseRuns/types/index.js +4 -0
  55. package/api/resources/splitRuns/client/Client.d.ts +58 -0
  56. package/api/resources/splitRuns/client/Client.js +112 -1
  57. package/api/resources/splitRuns/client/requests/SplitRunsCreateBatchRequest.d.ts +38 -0
  58. package/api/resources/splitRuns/client/requests/SplitRunsCreateBatchRequest.js +3 -0
  59. package/api/resources/splitRuns/client/requests/SplitRunsListRequest.d.ts +6 -0
  60. package/api/resources/splitRuns/client/requests/index.d.ts +1 -0
  61. package/api/resources/splitRuns/types/SplitRunsCreateBatchRequestInputsItem.d.ts +6 -0
  62. package/api/resources/splitRuns/types/SplitRunsCreateBatchRequestInputsItem.js +3 -0
  63. package/api/resources/splitRuns/types/SplitRunsCreateBatchRequestInputsItemFile.d.ts +5 -0
  64. package/api/resources/splitRuns/types/SplitRunsCreateBatchRequestInputsItemFile.js +3 -0
  65. package/api/resources/splitRuns/types/SplitRunsCreateBatchRequestSplitter.d.ts +11 -0
  66. package/api/resources/splitRuns/types/SplitRunsCreateBatchRequestSplitter.js +3 -0
  67. package/api/resources/splitRuns/types/index.d.ts +3 -0
  68. package/api/resources/splitRuns/types/index.js +3 -0
  69. package/api/resources/splitterVersions/client/Client.d.ts +6 -3
  70. package/api/resources/splitterVersions/client/Client.js +6 -3
  71. package/api/resources/workflowVersions/client/Client.d.ts +6 -6
  72. package/api/resources/workflowVersions/client/Client.js +6 -6
  73. package/api/types/BatchParseRunCompletedWebhookEvent.d.ts +6 -0
  74. package/api/types/BatchParseRunCompletedWebhookEvent.js +3 -0
  75. package/api/types/BatchParseRunFailedWebhookEvent.d.ts +6 -0
  76. package/api/types/BatchParseRunFailedWebhookEvent.js +3 -0
  77. package/api/types/BatchProcessorRunCompletedWebhookEvent.d.ts +6 -0
  78. package/api/types/BatchProcessorRunCompletedWebhookEvent.js +3 -0
  79. package/api/types/BatchProcessorRunFailedWebhookEvent.d.ts +6 -0
  80. package/api/types/BatchProcessorRunFailedWebhookEvent.js +3 -0
  81. package/api/types/BatchRun.d.ts +9 -16
  82. package/api/types/BatchRunStatus.d.ts +7 -5
  83. package/api/types/BatchRunStatus.js +7 -5
  84. package/api/types/Block.d.ts +1 -0
  85. package/api/types/BlockDetails.d.ts +1 -1
  86. package/api/types/BlockType.d.ts +2 -0
  87. package/api/types/BlockType.js +2 -0
  88. package/api/types/FormulaDetails.d.ts +9 -0
  89. package/api/types/FormulaDetails.js +3 -0
  90. package/api/types/LegacyListProcessorsResponse.d.ts +1 -1
  91. package/api/types/ParseConfigAdvancedOptions.d.ts +10 -0
  92. package/api/types/ParseConfigAdvancedOptionsFormattingDetectionItem.d.ts +8 -0
  93. package/api/types/ParseConfigAdvancedOptionsFormattingDetectionItem.js +3 -0
  94. package/api/types/ParseConfigBlockOptions.d.ts +2 -0
  95. package/api/types/ParseConfigBlockOptionsFormulas.d.ts +7 -0
  96. package/api/types/ParseConfigBlockOptionsFormulas.js +3 -0
  97. package/api/types/ParseRun.d.ts +10 -1
  98. package/api/types/ParseRunStatusEnum.d.ts +2 -0
  99. package/api/types/ParseRunStatusEnum.js +2 -0
  100. package/api/types/ProcessorRunStatus.d.ts +2 -0
  101. package/api/types/ProcessorRunStatus.js +2 -0
  102. package/api/types/WebhookEndpointEventType.d.ts +4 -0
  103. package/api/types/WebhookEndpointEventType.js +4 -0
  104. package/api/types/WebhookEvent.d.ts +13 -1
  105. package/api/types/WebhookSubscriptionEventType.d.ts +5 -3
  106. package/api/types/WebhookSubscriptionEventType.js +5 -3
  107. package/api/types/index.d.ts +7 -8
  108. package/api/types/index.js +7 -8
  109. package/package.json +1 -1
  110. package/reference.md +574 -15
  111. package/version.d.ts +1 -1
  112. package/version.js +1 -1
  113. package/api/types/BatchProcessorRun.d.ts +0 -66
  114. package/api/types/BatchProcessorRunMetrics.d.ts +0 -6
  115. package/api/types/BatchProcessorRunOptions.d.ts +0 -9
  116. package/api/types/BatchProcessorRunSource.d.ts +0 -12
  117. package/api/types/BatchProcessorRunSource.js +0 -15
  118. package/api/types/BatchProcessorRunStatus.d.ts +0 -14
  119. package/api/types/BatchProcessorRunStatus.js +0 -17
  120. package/api/types/BatchRunEntity.d.ts +0 -18
  121. package/api/types/BatchRunEntityVersion.d.ts +0 -18
  122. package/api/types/BatchRunMetrics.d.ts +0 -6
  123. /package/api/{types/BatchProcessorRun.js → resources/classifyRuns/client/requests/ClassifyRunsCreateBatchRequest.js} +0 -0
  124. /package/api/{types/BatchProcessorRunMetrics.js → resources/classifyRuns/types/ClassifyRunsCreateBatchRequestClassifier.js} +0 -0
  125. /package/api/{types/BatchProcessorRunOptions.js → resources/classifyRuns/types/ClassifyRunsCreateBatchRequestInputsItem.js} +0 -0
  126. /package/api/{types/BatchRunEntity.js → resources/classifyRuns/types/ClassifyRunsCreateBatchRequestInputsItemFile.js} +0 -0
  127. /package/api/{types/BatchRunEntityVersion.js → resources/extractRuns/client/requests/ExtractRunsCreateBatchRequest.js} +0 -0
  128. /package/api/{types/BatchRunMetrics.js → resources/extractRuns/types/ExtractRunsCreateBatchRequestExtractor.js} +0 -0
package/reference.md CHANGED
@@ -720,6 +720,73 @@ await client.files.upload(createReadStream("path/to/file"), {});
720
720
  </details>
721
721
 
722
722
  ## ParseRuns
723
+ <details><summary><code>client.parseRuns.<a href="/src/api/resources/parseRuns/client/Client.ts">list</a>({ ...params }) -> Extend.ParseRunsListResponse</code></summary>
724
+ <dl>
725
+ <dd>
726
+
727
+ #### 📝 Description
728
+
729
+ <dl>
730
+ <dd>
731
+
732
+ <dl>
733
+ <dd>
734
+
735
+ List parse runs, with optional filters for status, batch ID, and file name.
736
+
737
+ Returns a paginated list of parse runs. Use `GET /parse_runs/{id}` to retrieve the full result including output for a specific run.
738
+ </dd>
739
+ </dl>
740
+ </dd>
741
+ </dl>
742
+
743
+ #### 🔌 Usage
744
+
745
+ <dl>
746
+ <dd>
747
+
748
+ <dl>
749
+ <dd>
750
+
751
+ ```typescript
752
+ await client.parseRuns.list({
753
+ nextPageToken: "xK9mLPqRtN3vS8wF5hB2cQ==:zWvUxYjM4nKpL7aDgE9HbTcR2mAyX3/Q+CNkfBSw1dZ="
754
+ });
755
+
756
+ ```
757
+ </dd>
758
+ </dl>
759
+ </dd>
760
+ </dl>
761
+
762
+ #### ⚙️ Parameters
763
+
764
+ <dl>
765
+ <dd>
766
+
767
+ <dl>
768
+ <dd>
769
+
770
+ **request:** `Extend.ParseRunsListRequest`
771
+
772
+ </dd>
773
+ </dl>
774
+
775
+ <dl>
776
+ <dd>
777
+
778
+ **requestOptions:** `ParseRunsClient.RequestOptions`
779
+
780
+ </dd>
781
+ </dl>
782
+ </dd>
783
+ </dl>
784
+
785
+
786
+ </dd>
787
+ </dl>
788
+ </details>
789
+
723
790
  <details><summary><code>client.parseRuns.<a href="/src/api/resources/parseRuns/client/Client.ts">create</a>({ ...params }) -> Extend.ParseRun</code></summary>
724
791
  <dl>
725
792
  <dd>
@@ -942,6 +1009,102 @@ Example: `"pr_xK9mLPqRtN3vS8wF5hB2cQ"`
942
1009
  </dl>
943
1010
 
944
1011
 
1012
+ </dd>
1013
+ </dl>
1014
+ </details>
1015
+
1016
+ <details><summary><code>client.parseRuns.<a href="/src/api/resources/parseRuns/client/Client.ts">createBatch</a>({ ...params }) -> Extend.BatchRun</code></summary>
1017
+ <dl>
1018
+ <dd>
1019
+
1020
+ #### 📝 Description
1021
+
1022
+ <dl>
1023
+ <dd>
1024
+
1025
+ <dl>
1026
+ <dd>
1027
+
1028
+ Submit up to **1,000 files** for parsing in a single request. Each file is processed as an independent parse run using the same configuration.
1029
+
1030
+ Unlike the single [Parse File (Async)](https://docs.extend.ai/2026-02-09/developers/api-reference/endpoints/parse/create-parse-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.
1031
+
1032
+ **Monitoring results:**
1033
+ - **Webhooks (recommended):** Subscribe to `batch_parse_run.processed` and `batch_parse_run.failed` events. The webhook payload indicates the batch has finished — fetch individual run results using `GET /parse_runs?batchId={id}`.
1034
+ - **Polling:** Call `GET /batch_runs/{id}` to check the overall batch status, and use `GET /parse_runs?batchId={id}` to retrieve individual run results.
1035
+
1036
+ **Notes:**
1037
+ - `inputs` must contain between 1 and 1,000 items.
1038
+ - File input supports URLs, Extend file IDs, and raw text strings.
1039
+ </dd>
1040
+ </dl>
1041
+ </dd>
1042
+ </dl>
1043
+
1044
+ #### 🔌 Usage
1045
+
1046
+ <dl>
1047
+ <dd>
1048
+
1049
+ <dl>
1050
+ <dd>
1051
+
1052
+ ```typescript
1053
+ await client.parseRuns.createBatch({
1054
+ inputs: [{
1055
+ file: {
1056
+ url: "https://example.com/document1.pdf"
1057
+ },
1058
+ metadata: {
1059
+ "customerId": "cust_abc123"
1060
+ }
1061
+ }, {
1062
+ file: {
1063
+ url: "https://example.com/document2.pdf"
1064
+ },
1065
+ metadata: {
1066
+ "customerId": "cust_def456"
1067
+ }
1068
+ }, {
1069
+ file: {
1070
+ text: "This is some raw text to parse."
1071
+ },
1072
+ metadata: {
1073
+ "source": "manual-entry"
1074
+ }
1075
+ }]
1076
+ });
1077
+
1078
+ ```
1079
+ </dd>
1080
+ </dl>
1081
+ </dd>
1082
+ </dl>
1083
+
1084
+ #### ⚙️ Parameters
1085
+
1086
+ <dl>
1087
+ <dd>
1088
+
1089
+ <dl>
1090
+ <dd>
1091
+
1092
+ **request:** `Extend.ParseRunsCreateBatchRequest`
1093
+
1094
+ </dd>
1095
+ </dl>
1096
+
1097
+ <dl>
1098
+ <dd>
1099
+
1100
+ **requestOptions:** `ParseRunsClient.RequestOptions`
1101
+
1102
+ </dd>
1103
+ </dl>
1104
+ </dd>
1105
+ </dl>
1106
+
1107
+
945
1108
  </dd>
946
1109
  </dl>
947
1110
  </details>
@@ -1621,6 +1784,106 @@ Example: `"ex_Xj8mK2pL9nR4vT7qY5wZ"`
1621
1784
  </dl>
1622
1785
 
1623
1786
 
1787
+ </dd>
1788
+ </dl>
1789
+ </details>
1790
+
1791
+ <details><summary><code>client.extractRuns.<a href="/src/api/resources/extractRuns/client/Client.ts">createBatch</a>({ ...params }) -> Extend.BatchRun</code></summary>
1792
+ <dl>
1793
+ <dd>
1794
+
1795
+ #### 📝 Description
1796
+
1797
+ <dl>
1798
+ <dd>
1799
+
1800
+ <dl>
1801
+ <dd>
1802
+
1803
+ Submit up to **1,000 files** for extraction in a single request. Each file is processed as an independent extract run using the same extractor and configuration.
1804
+
1805
+ Unlike the single [Extract File (Async)](https://docs.extend.ai/2026-02-09/developers/api-reference/endpoints/extract/create-extract-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.
1806
+
1807
+ **Monitoring results:**
1808
+ - **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 /extract_runs?batchId={id}`.
1809
+ - **Polling:** Call `GET /batch_runs/{id}` to check the overall batch status, and use `GET /extract_runs` filtered by `batchId` to retrieve individual run results.
1810
+
1811
+ **Notes:**
1812
+ - A processor reference (`extractor.id`) is required — inline `config` is not supported for batch requests.
1813
+ - `inputs` must contain between 1 and 1,000 items.
1814
+ - All inputs in a batch use the same extractor version and override config.
1815
+ </dd>
1816
+ </dl>
1817
+ </dd>
1818
+ </dl>
1819
+
1820
+ #### 🔌 Usage
1821
+
1822
+ <dl>
1823
+ <dd>
1824
+
1825
+ <dl>
1826
+ <dd>
1827
+
1828
+ ```typescript
1829
+ await client.extractRuns.createBatch({
1830
+ extractor: {
1831
+ id: "ex_xK9mLPqRtN3vS8wF5hB2cQ"
1832
+ },
1833
+ inputs: [{
1834
+ file: {
1835
+ url: "https://example.com/invoice1.pdf"
1836
+ },
1837
+ metadata: {
1838
+ "customerId": "cust_abc123"
1839
+ }
1840
+ }, {
1841
+ file: {
1842
+ url: "https://example.com/invoice2.pdf"
1843
+ },
1844
+ metadata: {
1845
+ "customerId": "cust_def456"
1846
+ }
1847
+ }, {
1848
+ file: {
1849
+ url: "https://example.com/invoice3.pdf"
1850
+ },
1851
+ metadata: {
1852
+ "customerId": "cust_ghi789"
1853
+ }
1854
+ }]
1855
+ });
1856
+
1857
+ ```
1858
+ </dd>
1859
+ </dl>
1860
+ </dd>
1861
+ </dl>
1862
+
1863
+ #### ⚙️ Parameters
1864
+
1865
+ <dl>
1866
+ <dd>
1867
+
1868
+ <dl>
1869
+ <dd>
1870
+
1871
+ **request:** `Extend.ExtractRunsCreateBatchRequest`
1872
+
1873
+ </dd>
1874
+ </dl>
1875
+
1876
+ <dl>
1877
+ <dd>
1878
+
1879
+ **requestOptions:** `ExtractRunsClient.RequestOptions`
1880
+
1881
+ </dd>
1882
+ </dl>
1883
+ </dd>
1884
+ </dl>
1885
+
1886
+
1624
1887
  </dd>
1625
1888
  </dl>
1626
1889
  </details>
@@ -2116,7 +2379,7 @@ Retrieve a specific version of an extractor in Extend
2116
2379
  <dd>
2117
2380
 
2118
2381
  ```typescript
2119
- await client.extractorVersions.retrieve("extractor_id_here", "extractor_version_id_here");
2382
+ await client.extractorVersions.retrieve("extractor_id_here", "draft");
2120
2383
 
2121
2384
  ```
2122
2385
  </dd>
@@ -2146,9 +2409,12 @@ Example: `"ex_Xj8mK2pL9nR4vT7qY5wZ"`
2146
2409
 
2147
2410
  **versionId:** `string`
2148
2411
 
2149
- The ID of the specific extractor version.
2412
+ The version to retrieve. Accepts any of the following:
2150
2413
 
2151
- Example: `"extv_QYk6jgHA_8CsO8rVWhyNC"`
2414
+ - `"draft"` — returns the current draft version
2415
+ - `"latest"` — returns the latest published version (falls back to draft if none published)
2416
+ - A version number (e.g. `"0.1"`, `"1.0"`) — returns that specific published version
2417
+ - A version ID (e.g. `"extv_QYk6jgHA_8CsO8rVWhyNC"`) — returns that specific version by ID
2152
2418
 
2153
2419
  </dd>
2154
2420
  </dl>
@@ -2539,6 +2805,106 @@ Example: `"cl_Xj8mK2pL9nR4vT7qY5wZ"`
2539
2805
  </dl>
2540
2806
 
2541
2807
 
2808
+ </dd>
2809
+ </dl>
2810
+ </details>
2811
+
2812
+ <details><summary><code>client.classifyRuns.<a href="/src/api/resources/classifyRuns/client/Client.ts">createBatch</a>({ ...params }) -> Extend.BatchRun</code></summary>
2813
+ <dl>
2814
+ <dd>
2815
+
2816
+ #### 📝 Description
2817
+
2818
+ <dl>
2819
+ <dd>
2820
+
2821
+ <dl>
2822
+ <dd>
2823
+
2824
+ 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.
2825
+
2826
+ 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.
2827
+
2828
+ **Monitoring results:**
2829
+ - **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}`.
2830
+ - **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.
2831
+
2832
+ **Notes:**
2833
+ - A processor reference (`classifier.id`) is required — inline `config` is not supported for batch requests.
2834
+ - `inputs` must contain between 1 and 1,000 items.
2835
+ - All inputs in a batch use the same classifier version and override config.
2836
+ </dd>
2837
+ </dl>
2838
+ </dd>
2839
+ </dl>
2840
+
2841
+ #### 🔌 Usage
2842
+
2843
+ <dl>
2844
+ <dd>
2845
+
2846
+ <dl>
2847
+ <dd>
2848
+
2849
+ ```typescript
2850
+ await client.classifyRuns.createBatch({
2851
+ classifier: {
2852
+ id: "cl_xK9mLPqRtN3vS8wF5hB2cQ"
2853
+ },
2854
+ inputs: [{
2855
+ file: {
2856
+ url: "https://example.com/document1.pdf"
2857
+ },
2858
+ metadata: {
2859
+ "customerId": "cust_abc123"
2860
+ }
2861
+ }, {
2862
+ file: {
2863
+ url: "https://example.com/document2.pdf"
2864
+ },
2865
+ metadata: {
2866
+ "customerId": "cust_def456"
2867
+ }
2868
+ }, {
2869
+ file: {
2870
+ url: "https://example.com/document3.pdf"
2871
+ },
2872
+ metadata: {
2873
+ "customerId": "cust_ghi789"
2874
+ }
2875
+ }]
2876
+ });
2877
+
2878
+ ```
2879
+ </dd>
2880
+ </dl>
2881
+ </dd>
2882
+ </dl>
2883
+
2884
+ #### ⚙️ Parameters
2885
+
2886
+ <dl>
2887
+ <dd>
2888
+
2889
+ <dl>
2890
+ <dd>
2891
+
2892
+ **request:** `Extend.ClassifyRunsCreateBatchRequest`
2893
+
2894
+ </dd>
2895
+ </dl>
2896
+
2897
+ <dl>
2898
+ <dd>
2899
+
2900
+ **requestOptions:** `ClassifyRunsClient.RequestOptions`
2901
+
2902
+ </dd>
2903
+ </dl>
2904
+ </dd>
2905
+ </dl>
2906
+
2907
+
2542
2908
  </dd>
2543
2909
  </dl>
2544
2910
  </details>
@@ -3030,7 +3396,7 @@ Retrieve a specific version of a classifier in Extend
3030
3396
  <dd>
3031
3397
 
3032
3398
  ```typescript
3033
- await client.classifierVersions.retrieve("classifier_id_here", "classifier_version_id_here");
3399
+ await client.classifierVersions.retrieve("classifier_id_here", "draft");
3034
3400
 
3035
3401
  ```
3036
3402
  </dd>
@@ -3060,9 +3426,12 @@ Example: `"cl_Xj8mK2pL9nR4vT7qY5wZ"`
3060
3426
 
3061
3427
  **versionId:** `string`
3062
3428
 
3063
- The ID of the specific classifier version.
3429
+ The version to retrieve. Accepts any of the following:
3064
3430
 
3065
- Example: `"clsv_QYk6jgHA_8CsO8rVWhyNC"`
3431
+ - `"draft"` — returns the current draft version
3432
+ - `"latest"` — returns the latest published version (falls back to draft if none published)
3433
+ - A version number (e.g. `"0.1"`, `"1.0"`) — returns that specific published version
3434
+ - A version ID (e.g. `"clsv_QYk6jgHA_8CsO8rVWhyNC"`) — returns that specific version by ID
3066
3435
 
3067
3436
  </dd>
3068
3437
  </dl>
@@ -3453,6 +3822,107 @@ Example: `"spl_Xj8mK2pL9nR4vT7qY5wZ"`
3453
3822
  </dl>
3454
3823
 
3455
3824
 
3825
+ </dd>
3826
+ </dl>
3827
+ </details>
3828
+
3829
+ <details><summary><code>client.splitRuns.<a href="/src/api/resources/splitRuns/client/Client.ts">createBatch</a>({ ...params }) -> Extend.BatchRun</code></summary>
3830
+ <dl>
3831
+ <dd>
3832
+
3833
+ #### 📝 Description
3834
+
3835
+ <dl>
3836
+ <dd>
3837
+
3838
+ <dl>
3839
+ <dd>
3840
+
3841
+ Submit up to **1,000 files** for splitting in a single request. Each file is processed as an independent split run using the same splitter and configuration.
3842
+
3843
+ Unlike the single [Split File (Async)](https://docs.extend.ai/2026-02-09/developers/api-reference/endpoints/split/create-split-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.
3844
+
3845
+ **Monitoring results:**
3846
+ - **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 /split_runs?batchId={id}`.
3847
+ - **Polling:** Call `GET /batch_runs/{id}` to check the overall batch status, and use `GET /split_runs` filtered by `batchId` to retrieve individual run results.
3848
+
3849
+ **Notes:**
3850
+ - A processor reference (`splitter.id`) is required — inline `config` is not supported for batch requests.
3851
+ - `inputs` must contain between 1 and 1,000 items.
3852
+ - All inputs in a batch use the same splitter version and override config.
3853
+ - Raw text input (`FileFromText`) is not supported for split runs. Use a URL or file ID.
3854
+ </dd>
3855
+ </dl>
3856
+ </dd>
3857
+ </dl>
3858
+
3859
+ #### 🔌 Usage
3860
+
3861
+ <dl>
3862
+ <dd>
3863
+
3864
+ <dl>
3865
+ <dd>
3866
+
3867
+ ```typescript
3868
+ await client.splitRuns.createBatch({
3869
+ splitter: {
3870
+ id: "spl_xK9mLPqRtN3vS8wF5hB2cQ"
3871
+ },
3872
+ inputs: [{
3873
+ file: {
3874
+ url: "https://example.com/multi-doc1.pdf"
3875
+ },
3876
+ metadata: {
3877
+ "customerId": "cust_abc123"
3878
+ }
3879
+ }, {
3880
+ file: {
3881
+ url: "https://example.com/multi-doc2.pdf"
3882
+ },
3883
+ metadata: {
3884
+ "customerId": "cust_def456"
3885
+ }
3886
+ }, {
3887
+ file: {
3888
+ url: "https://example.com/multi-doc3.pdf"
3889
+ },
3890
+ metadata: {
3891
+ "customerId": "cust_ghi789"
3892
+ }
3893
+ }]
3894
+ });
3895
+
3896
+ ```
3897
+ </dd>
3898
+ </dl>
3899
+ </dd>
3900
+ </dl>
3901
+
3902
+ #### ⚙️ Parameters
3903
+
3904
+ <dl>
3905
+ <dd>
3906
+
3907
+ <dl>
3908
+ <dd>
3909
+
3910
+ **request:** `Extend.SplitRunsCreateBatchRequest`
3911
+
3912
+ </dd>
3913
+ </dl>
3914
+
3915
+ <dl>
3916
+ <dd>
3917
+
3918
+ **requestOptions:** `SplitRunsClient.RequestOptions`
3919
+
3920
+ </dd>
3921
+ </dl>
3922
+ </dd>
3923
+ </dl>
3924
+
3925
+
3456
3926
  </dd>
3457
3927
  </dl>
3458
3928
  </details>
@@ -3946,7 +4416,7 @@ Retrieve a specific version of a splitter in Extend
3946
4416
  <dd>
3947
4417
 
3948
4418
  ```typescript
3949
- await client.splitterVersions.retrieve("splitter_id_here", "splitter_version_id_here");
4419
+ await client.splitterVersions.retrieve("splitter_id_here", "draft");
3950
4420
 
3951
4421
  ```
3952
4422
  </dd>
@@ -3976,9 +4446,12 @@ Example: `"spl_Xj8mK2pL9nR4vT7qY5wZ"`
3976
4446
 
3977
4447
  **versionId:** `string`
3978
4448
 
3979
- The ID of the specific splitter version.
4449
+ The version to retrieve. Accepts any of the following:
3980
4450
 
3981
- Example: `"splv_QYk6jgHA_8CsO8rVWhyNC"`
4451
+ - `"draft"` — returns the current draft version
4452
+ - `"latest"` — returns the latest published version (falls back to draft if none published)
4453
+ - A version number (e.g. `"0.1"`, `"1.0"`) — returns that specific published version
4454
+ - A version ID (e.g. `"splv_QYk6jgHA_8CsO8rVWhyNC"`) — returns that specific version by ID
3982
4455
 
3983
4456
  </dd>
3984
4457
  </dl>
@@ -4439,11 +4912,6 @@ await client.workflowVersions.create("workflow_abc123");
4439
4912
  <dd>
4440
4913
 
4441
4914
  Get a specific version of a workflow, including its step definitions.
4442
-
4443
- The `versionId` parameter accepts:
4444
- - `"draft"` — returns the current draft version
4445
- - A version number (e.g. `"1"`, `"2"`) — returns that deployed version
4446
- - An internal version ID (e.g. `"workflow_version_abc123"`) — returns that specific version
4447
4915
  </dd>
4448
4916
  </dl>
4449
4917
  </dd>
@@ -4482,7 +4950,14 @@ await client.workflowVersions.retrieve("workflow_abc123", "draft");
4482
4950
  <dl>
4483
4951
  <dd>
4484
4952
 
4485
- **versionId:** `string` — The version to retrieve. Use `"draft"` for the draft, a number like `"1"` for a deployed version, or the internal version ID.
4953
+ **versionId:** `string`
4954
+
4955
+ The version to retrieve. Accepts any of the following:
4956
+
4957
+ - `"draft"` — returns the current draft version
4958
+ - `"latest"` — returns the latest published version (falls back to draft if none published)
4959
+ - A version number (e.g. `"1"`, `"2"`) — returns that specific published version
4960
+ - A version ID (e.g. `"workflow_version_abc123"`) — returns that specific version by ID
4486
4961
 
4487
4962
  </dd>
4488
4963
  </dl>
@@ -5938,6 +6413,90 @@ Example: `"bpr_Xj8mK2pL9nR4vT7qY5wZ"`
5938
6413
  </dl>
5939
6414
 
5940
6415
 
6416
+ </dd>
6417
+ </dl>
6418
+ </details>
6419
+
6420
+ ## BatchRuns
6421
+ <details><summary><code>client.batchRuns.<a href="/src/api/resources/batchRuns/client/Client.ts">get</a>(id) -> Extend.BatchRun</code></summary>
6422
+ <dl>
6423
+ <dd>
6424
+
6425
+ #### 📝 Description
6426
+
6427
+ <dl>
6428
+ <dd>
6429
+
6430
+ <dl>
6431
+ <dd>
6432
+
6433
+ Retrieve the status of a batch run by its ID. The `status` field reflects the aggregate state of the batch.
6434
+
6435
+ 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`).
6436
+
6437
+ | Status | Meaning |
6438
+ |---|---|
6439
+ | `PENDING` | Queued, not yet started |
6440
+ | `PROCESSING` | Runs are actively being processed |
6441
+ | `PROCESSED` | All runs have completed |
6442
+ | `FAILED` | The batch encountered a fatal error |
6443
+ | `CANCELLED` | The batch was cancelled |
6444
+
6445
+ To retrieve individual run results, use the List endpoint for the relevant type filtered by `batchId`:
6446
+ - `GET /parse_runs?batchId={id}`
6447
+ - `GET /extract_runs?batchId={id}`
6448
+ - `GET /classify_runs?batchId={id}`
6449
+ - `GET /split_runs?batchId={id}`
6450
+ </dd>
6451
+ </dl>
6452
+ </dd>
6453
+ </dl>
6454
+
6455
+ #### 🔌 Usage
6456
+
6457
+ <dl>
6458
+ <dd>
6459
+
6460
+ <dl>
6461
+ <dd>
6462
+
6463
+ ```typescript
6464
+ await client.batchRuns.get("bpr_Xj8mK2pL9nR4vT7qY5wZ");
6465
+
6466
+ ```
6467
+ </dd>
6468
+ </dl>
6469
+ </dd>
6470
+ </dl>
6471
+
6472
+ #### ⚙️ Parameters
6473
+
6474
+ <dl>
6475
+ <dd>
6476
+
6477
+ <dl>
6478
+ <dd>
6479
+
6480
+ **id:** `string`
6481
+
6482
+ The unique identifier of the batch processor run to retrieve.
6483
+
6484
+ Example: `"bpr_Xj8mK2pL9nR4vT7qY5wZ"`
6485
+
6486
+ </dd>
6487
+ </dl>
6488
+
6489
+ <dl>
6490
+ <dd>
6491
+
6492
+ **requestOptions:** `BatchRunsClient.RequestOptions`
6493
+
6494
+ </dd>
6495
+ </dl>
6496
+ </dd>
6497
+ </dl>
6498
+
6499
+
5941
6500
  </dd>
5942
6501
  </dl>
5943
6502
  </details>
package/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "1.7.0";
1
+ export declare const SDK_VERSION = "1.9.0";
package/version.js CHANGED
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SDK_VERSION = void 0;
4
- exports.SDK_VERSION = "1.7.0";
4
+ exports.SDK_VERSION = "1.9.0";