mindee 5.8.0 → 5.10.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 (407) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/package.json +103 -95
  3. package/src/geometry/bbox.d.ts +18 -6
  4. package/src/geometry/bbox.js +7 -3
  5. package/src/geometry/boundingBox.d.ts +3 -1
  6. package/src/geometry/boundingBox.js +3 -1
  7. package/src/geometry/boundingBoxUtils.d.ts +4 -4
  8. package/src/geometry/boundingBoxUtils.js +7 -7
  9. package/src/geometry/minMax.d.ts +9 -3
  10. package/src/geometry/point.d.ts +3 -1
  11. package/src/geometry/polygon.d.ts +3 -1
  12. package/src/geometry/polygon.js +3 -1
  13. package/src/http/apiCore.js +1 -1
  14. package/src/http/baseSettings.d.ts +15 -5
  15. package/src/http/baseSettings.js +4 -2
  16. package/src/http/dispatcher.js +4 -2
  17. package/src/image/extractedImage.d.ts +13 -5
  18. package/src/image/extractedImage.js +3 -3
  19. package/src/image/extractedImages.d.ts +4 -2
  20. package/src/image/extractedImages.js +3 -1
  21. package/src/image/imageCompressor.d.ts +1 -0
  22. package/src/image/imageCompressor.js +2 -2
  23. package/src/image/imageExtractor.d.ts +2 -2
  24. package/src/image/imageExtractor.js +14 -14
  25. package/src/input/base64Input.d.ts +9 -3
  26. package/src/input/base64Input.js +9 -3
  27. package/src/input/bufferInput.d.ts +7 -2
  28. package/src/input/bufferInput.js +6 -2
  29. package/src/input/bytesInput.d.ts +10 -3
  30. package/src/input/bytesInput.js +10 -3
  31. package/src/input/inputSource.d.ts +4 -2
  32. package/src/input/inputSource.js +3 -2
  33. package/src/input/localInputSource.d.ts +20 -7
  34. package/src/input/localInputSource.js +12 -5
  35. package/src/input/pageOptions.d.ts +9 -3
  36. package/src/input/pageOptions.js +6 -2
  37. package/src/input/pathInput.d.ts +12 -4
  38. package/src/input/pathInput.js +11 -5
  39. package/src/input/streamInput.d.ts +14 -5
  40. package/src/input/streamInput.js +13 -4
  41. package/src/input/urlInput.d.ts +19 -7
  42. package/src/input/urlInput.js +20 -12
  43. package/src/parsing/baseLocalResponse.d.ts +8 -4
  44. package/src/parsing/baseLocalResponse.js +15 -11
  45. package/src/parsing/stringDict.d.ts +3 -1
  46. package/src/pdf/extractedPdf.d.ts +16 -6
  47. package/src/pdf/extractedPdf.js +5 -3
  48. package/src/pdf/extractedPdfs.d.ts +4 -2
  49. package/src/pdf/extractedPdfs.js +3 -1
  50. package/src/pdf/pdfCompressor.js +14 -14
  51. package/src/pdf/pdfExtractor.d.ts +1 -1
  52. package/src/pdf/pdfExtractor.js +3 -3
  53. package/src/pdf/pdfOperation.d.ts +9 -3
  54. package/src/pdf/pdfOperation.js +14 -14
  55. package/src/pdf/pdfUtils.js +1 -1
  56. package/src/v1/cli.js +1 -1
  57. package/src/v1/client.d.ts +42 -14
  58. package/src/v1/client.js +8 -8
  59. package/src/v1/extraction/invoiceSplitterExtractor/extractedInvoiceSplitterImage.d.ts +6 -2
  60. package/src/v1/extraction/invoiceSplitterExtractor/invoiceSplitterExtractor.d.ts +2 -2
  61. package/src/v1/extraction/invoiceSplitterExtractor/invoiceSplitterExtractor.js +6 -6
  62. package/src/v1/extraction/multiReceiptsExtractor/extractedMultiReceiptImage.d.ts +6 -2
  63. package/src/v1/extraction/multiReceiptsExtractor/multiReceiptsExtractor.d.ts +2 -2
  64. package/src/v1/extraction/multiReceiptsExtractor/multiReceiptsExtractor.js +3 -3
  65. package/src/v1/http/apiSettingsV1.d.ts +15 -5
  66. package/src/v1/http/apiSettingsV1.js +12 -4
  67. package/src/v1/http/baseEndpoint.d.ts +7 -3
  68. package/src/v1/http/endpoint.d.ts +10 -4
  69. package/src/v1/http/endpoint.js +2 -2
  70. package/src/v1/http/errors.d.ts +9 -3
  71. package/src/v1/http/errors.js +6 -2
  72. package/src/v1/http/httpParams.d.ts +37 -13
  73. package/src/v1/http/workflowEndpoint.d.ts +2 -2
  74. package/src/v1/http/workflowEndpoint.js +2 -2
  75. package/src/v1/parsing/common/apiRequest.d.ts +15 -5
  76. package/src/v1/parsing/common/apiResponse.d.ts +6 -2
  77. package/src/v1/parsing/common/asyncPredictResponse.d.ts +21 -7
  78. package/src/v1/parsing/common/document.d.ts +18 -6
  79. package/src/v1/parsing/common/document.js +2 -2
  80. package/src/v1/parsing/common/execution.d.ts +40 -14
  81. package/src/v1/parsing/common/execution.js +1 -1
  82. package/src/v1/parsing/common/executionFile.d.ts +6 -2
  83. package/src/v1/parsing/common/executionPriority.d.ts +12 -4
  84. package/src/v1/parsing/common/executionPriority.js +12 -4
  85. package/src/v1/parsing/common/extras/cropperExtra.d.ts +7 -3
  86. package/src/v1/parsing/common/extras/cropperExtra.js +7 -4
  87. package/src/v1/parsing/common/extras/extras.d.ts +9 -3
  88. package/src/v1/parsing/common/extras/extras.js +6 -2
  89. package/src/v1/parsing/common/extras/fullTextOcrExtra.d.ts +9 -3
  90. package/src/v1/parsing/common/extras/fullTextOcrExtra.js +3 -1
  91. package/src/v1/parsing/common/extras/ragExtra.d.ts +3 -1
  92. package/src/v1/parsing/common/extras/ragExtra.js +3 -1
  93. package/src/v1/parsing/common/feedback/feedbackResponse.d.ts +3 -1
  94. package/src/v1/parsing/common/feedback/feedbackResponse.js +0 -1
  95. package/src/v1/parsing/common/inference.d.ts +24 -8
  96. package/src/v1/parsing/common/inference.js +6 -2
  97. package/src/v1/parsing/common/mvisionV1.d.ts +3 -1
  98. package/src/v1/parsing/common/mvisionV1.js +3 -1
  99. package/src/v1/parsing/common/ocr.d.ts +3 -1
  100. package/src/v1/parsing/common/ocrPage.d.ts +7 -3
  101. package/src/v1/parsing/common/ocrPage.js +7 -3
  102. package/src/v1/parsing/common/orientation.d.ts +7 -3
  103. package/src/v1/parsing/common/orientation.js +1 -1
  104. package/src/v1/parsing/common/page.d.ts +12 -4
  105. package/src/v1/parsing/common/predictResponse.d.ts +3 -1
  106. package/src/v1/parsing/common/prediction.d.ts +3 -1
  107. package/src/v1/parsing/common/prediction.js +3 -1
  108. package/src/v1/parsing/generated/generatedList.d.ts +7 -3
  109. package/src/v1/parsing/generated/generatedList.js +1 -1
  110. package/src/v1/parsing/generated/generatedObject.d.ts +26 -10
  111. package/src/v1/parsing/generated/generatedObject.js +14 -8
  112. package/src/v1/parsing/localResponse.d.ts +4 -2
  113. package/src/v1/parsing/localResponse.js +4 -2
  114. package/src/v1/parsing/standard/addressField.d.ts +24 -8
  115. package/src/v1/parsing/standard/amount.d.ts +3 -1
  116. package/src/v1/parsing/standard/amount.js +4 -2
  117. package/src/v1/parsing/standard/base.d.ts +27 -9
  118. package/src/v1/parsing/standard/base.js +6 -2
  119. package/src/v1/parsing/standard/boolean.d.ts +3 -1
  120. package/src/v1/parsing/standard/classification.d.ts +6 -2
  121. package/src/v1/parsing/standard/companyRegistration.d.ts +9 -3
  122. package/src/v1/parsing/standard/companyRegistration.js +4 -2
  123. package/src/v1/parsing/standard/date.d.ts +12 -4
  124. package/src/v1/parsing/standard/date.js +3 -1
  125. package/src/v1/parsing/standard/field.d.ts +7 -5
  126. package/src/v1/parsing/standard/field.js +4 -4
  127. package/src/v1/parsing/standard/locale.d.ts +15 -5
  128. package/src/v1/parsing/standard/paymentDetails.d.ts +15 -5
  129. package/src/v1/parsing/standard/position.d.ts +15 -5
  130. package/src/v1/parsing/standard/tax.d.ts +19 -7
  131. package/src/v1/parsing/standard/tax.js +16 -6
  132. package/src/v1/parsing/standard/text.d.ts +6 -2
  133. package/src/v1/parsing/standard/word.d.ts +9 -3
  134. package/src/v1/parsing/standard/word.js +3 -1
  135. package/src/v1/product/barcodeReader/barcodeReaderV1.d.ts +13 -5
  136. package/src/v1/product/barcodeReader/barcodeReaderV1.js +10 -4
  137. package/src/v1/product/barcodeReader/barcodeReaderV1Document.d.ts +8 -4
  138. package/src/v1/product/barcodeReader/barcodeReaderV1Document.js +8 -4
  139. package/src/v1/product/cliProducts.d.ts +2 -2
  140. package/src/v1/product/cliProducts.js +1 -1
  141. package/src/v1/product/cropper/cropperV1.d.ts +13 -5
  142. package/src/v1/product/cropper/cropperV1.js +10 -4
  143. package/src/v1/product/cropper/cropperV1Document.d.ts +1 -1
  144. package/src/v1/product/cropper/cropperV1Page.d.ts +5 -3
  145. package/src/v1/product/cropper/cropperV1Page.js +5 -3
  146. package/src/v1/product/driverLicense/driverLicenseV1.d.ts +13 -5
  147. package/src/v1/product/driverLicense/driverLicenseV1.js +10 -4
  148. package/src/v1/product/driverLicense/driverLicenseV1Document.d.ts +41 -15
  149. package/src/v1/product/driverLicense/driverLicenseV1Document.js +2 -2
  150. package/src/v1/product/financialDocument/financialDocumentV1.d.ts +13 -5
  151. package/src/v1/product/financialDocument/financialDocumentV1.js +10 -4
  152. package/src/v1/product/financialDocument/financialDocumentV1Document.d.ts +98 -34
  153. package/src/v1/product/financialDocument/financialDocumentV1Document.js +17 -7
  154. package/src/v1/product/financialDocument/financialDocumentV1LineItem.d.ts +30 -10
  155. package/src/v1/product/financialDocument/financialDocumentV1LineItem.js +4 -2
  156. package/src/v1/product/fr/bankAccountDetails/bankAccountDetailsV1.d.ts +13 -5
  157. package/src/v1/product/fr/bankAccountDetails/bankAccountDetailsV1.js +10 -4
  158. package/src/v1/product/fr/bankAccountDetails/bankAccountDetailsV1Document.d.ts +11 -5
  159. package/src/v1/product/fr/bankAccountDetails/bankAccountDetailsV1Document.js +2 -2
  160. package/src/v1/product/fr/bankAccountDetails/bankAccountDetailsV2.d.ts +13 -5
  161. package/src/v1/product/fr/bankAccountDetails/bankAccountDetailsV2.js +10 -4
  162. package/src/v1/product/fr/bankAccountDetails/bankAccountDetailsV2Bban.d.ts +18 -6
  163. package/src/v1/product/fr/bankAccountDetails/bankAccountDetailsV2Bban.js +3 -1
  164. package/src/v1/product/fr/bankAccountDetails/bankAccountDetailsV2Document.d.ts +14 -6
  165. package/src/v1/product/fr/bankAccountDetails/bankAccountDetailsV2Document.js +2 -2
  166. package/src/v1/product/fr/carteGrise/carteGriseV1.d.ts +13 -5
  167. package/src/v1/product/fr/carteGrise/carteGriseV1.js +10 -4
  168. package/src/v1/product/fr/carteGrise/carteGriseV1Document.d.ts +125 -43
  169. package/src/v1/product/fr/carteGrise/carteGriseV1Document.js +2 -2
  170. package/src/v1/product/fr/idCard/idCardV2.d.ts +13 -5
  171. package/src/v1/product/fr/idCard/idCardV2.js +10 -4
  172. package/src/v1/product/fr/idCard/idCardV2Document.d.ts +47 -17
  173. package/src/v1/product/fr/idCard/idCardV2Document.js +5 -3
  174. package/src/v1/product/fr/idCard/idCardV2Page.d.ts +8 -4
  175. package/src/v1/product/fr/idCard/idCardV2Page.js +2 -2
  176. package/src/v1/product/generated/generatedV1.d.ts +13 -5
  177. package/src/v1/product/generated/generatedV1.js +10 -4
  178. package/src/v1/product/generated/generatedV1Document.js +2 -2
  179. package/src/v1/product/generated/generatedV1Page.js +2 -2
  180. package/src/v1/product/generated/generatedV1Prediction.d.ts +9 -5
  181. package/src/v1/product/generated/generatedV1Prediction.js +6 -4
  182. package/src/v1/product/internationalId/internationalIdV2.d.ts +13 -5
  183. package/src/v1/product/internationalId/internationalIdV2.js +10 -4
  184. package/src/v1/product/internationalId/internationalIdV2Document.d.ts +53 -19
  185. package/src/v1/product/internationalId/internationalIdV2Document.js +8 -4
  186. package/src/v1/product/invoice/invoiceV4.d.ts +13 -5
  187. package/src/v1/product/invoice/invoiceV4.js +10 -4
  188. package/src/v1/product/invoice/invoiceV4Document.d.ts +89 -31
  189. package/src/v1/product/invoice/invoiceV4Document.js +17 -7
  190. package/src/v1/product/invoice/invoiceV4LineItem.d.ts +30 -10
  191. package/src/v1/product/invoice/invoiceV4LineItem.js +4 -2
  192. package/src/v1/product/invoiceSplitter/invoiceSplitterV1.d.ts +13 -5
  193. package/src/v1/product/invoiceSplitter/invoiceSplitterV1.js +10 -4
  194. package/src/v1/product/invoiceSplitter/invoiceSplitterV1Document.d.ts +4 -2
  195. package/src/v1/product/invoiceSplitter/invoiceSplitterV1Document.js +4 -2
  196. package/src/v1/product/invoiceSplitter/invoiceSplitterV1InvoicePageGroup.d.ts +9 -3
  197. package/src/v1/product/invoiceSplitter/invoiceSplitterV1InvoicePageGroup.js +3 -1
  198. package/src/v1/product/multiReceiptsDetector/multiReceiptsDetectorV1.d.ts +13 -5
  199. package/src/v1/product/multiReceiptsDetector/multiReceiptsDetectorV1.js +10 -4
  200. package/src/v1/product/multiReceiptsDetector/multiReceiptsDetectorV1Document.d.ts +5 -3
  201. package/src/v1/product/multiReceiptsDetector/multiReceiptsDetectorV1Document.js +5 -3
  202. package/src/v1/product/passport/passportV1.d.ts +13 -5
  203. package/src/v1/product/passport/passportV1.js +10 -4
  204. package/src/v1/product/passport/passportV1Document.d.ts +35 -13
  205. package/src/v1/product/passport/passportV1Document.js +5 -3
  206. package/src/v1/product/receipt/receiptV5.d.ts +13 -5
  207. package/src/v1/product/receipt/receiptV5.js +10 -4
  208. package/src/v1/product/receipt/receiptV5Document.d.ts +53 -19
  209. package/src/v1/product/receipt/receiptV5Document.js +8 -4
  210. package/src/v1/product/receipt/receiptV5LineItem.d.ts +18 -6
  211. package/src/v1/product/receipt/receiptV5LineItem.js +4 -2
  212. package/src/v1/product/resume/resumeV1.d.ts +13 -5
  213. package/src/v1/product/resume/resumeV1.js +10 -4
  214. package/src/v1/product/resume/resumeV1Certificate.d.ts +18 -6
  215. package/src/v1/product/resume/resumeV1Certificate.js +4 -2
  216. package/src/v1/product/resume/resumeV1Document.d.ts +53 -19
  217. package/src/v1/product/resume/resumeV1Document.js +29 -11
  218. package/src/v1/product/resume/resumeV1Education.d.ts +27 -9
  219. package/src/v1/product/resume/resumeV1Education.js +4 -2
  220. package/src/v1/product/resume/resumeV1Language.d.ts +12 -4
  221. package/src/v1/product/resume/resumeV1Language.js +4 -2
  222. package/src/v1/product/resume/resumeV1ProfessionalExperience.d.ts +33 -11
  223. package/src/v1/product/resume/resumeV1ProfessionalExperience.js +4 -2
  224. package/src/v1/product/resume/resumeV1SocialNetworksUrl.d.ts +12 -4
  225. package/src/v1/product/resume/resumeV1SocialNetworksUrl.js +4 -2
  226. package/src/v1/product/us/bankCheck/bankCheckV1.d.ts +13 -5
  227. package/src/v1/product/us/bankCheck/bankCheckV1.js +10 -4
  228. package/src/v1/product/us/bankCheck/bankCheckV1Document.d.ts +20 -8
  229. package/src/v1/product/us/bankCheck/bankCheckV1Document.js +5 -3
  230. package/src/v1/product/us/bankCheck/bankCheckV1Page.d.ts +8 -4
  231. package/src/v1/product/us/bankCheck/bankCheckV1Page.js +5 -3
  232. package/src/v2/cli.js +2 -2
  233. package/src/v2/client.d.ts +103 -21
  234. package/src/v2/client.js +171 -27
  235. package/src/v2/clientOptions/baseAnnotationParameters.d.ts +23 -0
  236. package/src/v2/clientOptions/baseAnnotationParameters.js +17 -0
  237. package/src/v2/clientOptions/baseProductParameters.js +3 -2
  238. package/src/v2/clientOptions/baseRagDocumentUploadParameters.d.ts +23 -0
  239. package/src/v2/clientOptions/baseRagDocumentUploadParameters.js +24 -0
  240. package/src/v2/clientOptions/index.d.ts +2 -0
  241. package/src/v2/clientOptions/index.js +2 -0
  242. package/src/v2/clientOptions/pollingOptions.d.ts +30 -10
  243. package/src/v2/clientOptions/pollingOptions.js +6 -2
  244. package/src/v2/fileOperations/crop.d.ts +1 -1
  245. package/src/v2/http/errors.d.ts +1 -1
  246. package/src/v2/http/mindeeApiV2.d.ts +36 -7
  247. package/src/v2/http/mindeeApiV2.js +80 -4
  248. package/src/v2/parsing/baseRagAnnotationResponse.d.ts +28 -0
  249. package/src/v2/parsing/baseRagAnnotationResponse.js +14 -0
  250. package/src/v2/parsing/baseResponse.d.ts +6 -2
  251. package/src/v2/parsing/baseResponse.js +3 -1
  252. package/src/v2/parsing/error/errorDetails.d.ts +3 -1
  253. package/src/v2/parsing/error/errorResponse.d.ts +1 -1
  254. package/src/v2/parsing/error/errorResponse.js +1 -1
  255. package/src/v2/parsing/index.d.ts +2 -0
  256. package/src/v2/parsing/index.js +1 -0
  257. package/src/v2/parsing/inference/baseInference.d.ts +6 -2
  258. package/src/v2/parsing/inference/baseInference.js +6 -2
  259. package/src/v2/parsing/inference/failedInferenceResponse.d.ts +2 -2
  260. package/src/v2/parsing/inference/failedInferenceResponse.js +2 -2
  261. package/src/v2/parsing/inference/field/baseField.d.ts +9 -3
  262. package/src/v2/parsing/inference/field/fieldConfidence.d.ts +12 -4
  263. package/src/v2/parsing/inference/field/fieldConfidence.js +12 -4
  264. package/src/v2/parsing/inference/field/fieldLocation.d.ts +9 -3
  265. package/src/v2/parsing/inference/field/fieldLocation.js +3 -1
  266. package/src/v2/parsing/inference/field/inferenceFields.d.ts +15 -5
  267. package/src/v2/parsing/inference/field/inferenceFields.js +12 -4
  268. package/src/v2/parsing/inference/field/listField.d.ts +6 -2
  269. package/src/v2/parsing/inference/field/listField.js +6 -2
  270. package/src/v2/parsing/inference/field/objectField.d.ts +19 -11
  271. package/src/v2/parsing/inference/field/objectField.js +22 -34
  272. package/src/v2/parsing/inference/field/ragMetadata.d.ts +3 -1
  273. package/src/v2/parsing/inference/field/ragMetadata.js +3 -1
  274. package/src/v2/parsing/inference/field/rawText.d.ts +6 -2
  275. package/src/v2/parsing/inference/field/rawText.js +6 -2
  276. package/src/v2/parsing/inference/field/simpleField.d.ts +6 -2
  277. package/src/v2/parsing/inference/field/simpleField.js +8 -4
  278. package/src/v2/parsing/inference/inferenceFile.d.ts +6 -2
  279. package/src/v2/parsing/inference/inferenceFile.js +6 -2
  280. package/src/v2/parsing/inference/inferenceModel.d.ts +6 -2
  281. package/src/v2/parsing/inference/inferenceModel.js +6 -2
  282. package/src/v2/parsing/job/job.d.ts +8 -8
  283. package/src/v2/parsing/job/job.js +1 -1
  284. package/src/v2/parsing/job/jobResponse.d.ts +1 -1
  285. package/src/v2/parsing/job/jobResponse.js +1 -1
  286. package/src/v2/parsing/job/jobWebhook.d.ts +1 -1
  287. package/src/v2/parsing/job/jobWebhook.js +1 -1
  288. package/src/v2/parsing/search/baseSearchResponse.d.ts +1 -1
  289. package/src/v2/parsing/search/baseSearchResponse.js +1 -1
  290. package/src/v2/parsing/search/searchModels.d.ts +1 -1
  291. package/src/v2/parsing/search/searchModels.js +1 -1
  292. package/src/v2/parsing/search/searchRagDocuments.d.ts +1 -1
  293. package/src/v2/parsing/search/searchRagDocuments.js +1 -1
  294. package/src/v2/parsing/search/searchResponse.d.ts +1 -1
  295. package/src/v2/parsing/search/searchResponse.js +1 -1
  296. package/src/v2/product/baseProduct.d.ts +26 -6
  297. package/src/v2/product/baseProduct.js +31 -7
  298. package/src/v2/product/classification/classification.d.ts +10 -4
  299. package/src/v2/product/classification/classification.js +10 -4
  300. package/src/v2/product/classification/classificationClassifier.d.ts +7 -3
  301. package/src/v2/product/classification/classificationClassifier.js +7 -3
  302. package/src/v2/product/classification/classificationInference.d.ts +7 -3
  303. package/src/v2/product/classification/classificationInference.js +7 -3
  304. package/src/v2/product/classification/classificationResponse.d.ts +4 -2
  305. package/src/v2/product/classification/classificationResponse.js +4 -2
  306. package/src/v2/product/classification/classificationResult.d.ts +6 -2
  307. package/src/v2/product/classification/classificationResult.js +6 -2
  308. package/src/v2/product/classification/params/classificationParameters.d.ts +1 -1
  309. package/src/v2/product/classification/params/classificationParameters.js +1 -1
  310. package/src/v2/product/crop/crop.d.ts +10 -4
  311. package/src/v2/product/crop/crop.js +10 -4
  312. package/src/v2/product/crop/cropInference.d.ts +8 -4
  313. package/src/v2/product/crop/cropInference.js +8 -4
  314. package/src/v2/product/crop/cropItem.d.ts +8 -4
  315. package/src/v2/product/crop/cropItem.js +9 -5
  316. package/src/v2/product/crop/cropResponse.d.ts +4 -2
  317. package/src/v2/product/crop/cropResponse.js +4 -2
  318. package/src/v2/product/crop/cropResult.d.ts +7 -3
  319. package/src/v2/product/crop/cropResult.js +8 -4
  320. package/src/v2/product/crop/params/cropParameters.d.ts +1 -1
  321. package/src/v2/product/crop/params/cropParameters.js +1 -1
  322. package/src/v2/product/extraction/dataSchemaActiveOption.d.ts +3 -1
  323. package/src/v2/product/extraction/dataSchemaActiveOption.js +3 -1
  324. package/src/v2/product/extraction/extraction.d.ts +25 -5
  325. package/src/v2/product/extraction/extraction.js +32 -6
  326. package/src/v2/product/extraction/extractionActiveOptions.d.ts +6 -2
  327. package/src/v2/product/extraction/extractionActiveOptions.js +6 -2
  328. package/src/v2/product/extraction/extractionInference.d.ts +7 -3
  329. package/src/v2/product/extraction/extractionInference.js +7 -3
  330. package/src/v2/product/extraction/extractionResponse.d.ts +4 -2
  331. package/src/v2/product/extraction/extractionResponse.js +4 -2
  332. package/src/v2/product/extraction/extractionResult.d.ts +9 -5
  333. package/src/v2/product/extraction/extractionResult.js +9 -5
  334. package/src/v2/product/extraction/index.d.ts +1 -0
  335. package/src/v2/product/extraction/index.js +1 -0
  336. package/src/v2/product/extraction/params/dataSchema.d.ts +12 -4
  337. package/src/v2/product/extraction/params/dataSchema.js +6 -2
  338. package/src/v2/product/extraction/params/dataSchemaField.d.ts +39 -13
  339. package/src/v2/product/extraction/params/dataSchemaField.js +9 -3
  340. package/src/v2/product/extraction/params/dataSchemaReplace.d.ts +12 -4
  341. package/src/v2/product/extraction/params/dataSchemaReplace.js +6 -2
  342. package/src/v2/product/extraction/params/extractionParameters.d.ts +1 -1
  343. package/src/v2/product/extraction/params/extractionParameters.js +4 -4
  344. package/src/v2/product/extraction/ragDocuments/annotatedBaseField.d.ts +20 -0
  345. package/src/v2/product/extraction/ragDocuments/annotatedBaseField.js +15 -0
  346. package/src/v2/product/extraction/ragDocuments/annotatedFields.d.ts +27 -0
  347. package/src/v2/product/extraction/ragDocuments/annotatedFields.js +57 -0
  348. package/src/v2/product/extraction/ragDocuments/annotatedListField.d.ts +26 -0
  349. package/src/v2/product/extraction/ragDocuments/annotatedListField.js +69 -0
  350. package/src/v2/product/extraction/ragDocuments/annotatedObjectField.d.ts +43 -0
  351. package/src/v2/product/extraction/ragDocuments/annotatedObjectField.js +47 -0
  352. package/src/v2/product/extraction/ragDocuments/annotatedSimpleField.d.ts +15 -0
  353. package/src/v2/product/extraction/ragDocuments/annotatedSimpleField.js +13 -0
  354. package/src/v2/product/extraction/ragDocuments/extractionRagAnnotationResponse.d.ts +25 -0
  355. package/src/v2/product/extraction/ragDocuments/extractionRagAnnotationResponse.js +17 -0
  356. package/src/v2/product/extraction/ragDocuments/fieldFactory.d.ts +12 -0
  357. package/src/v2/product/extraction/ragDocuments/fieldFactory.js +23 -0
  358. package/src/v2/product/extraction/ragDocuments/index.d.ts +7 -0
  359. package/src/v2/product/extraction/ragDocuments/index.js +7 -0
  360. package/src/v2/product/extraction/ragDocuments/params/index.d.ts +2 -0
  361. package/src/v2/product/extraction/ragDocuments/params/index.js +2 -0
  362. package/src/v2/product/extraction/ragDocuments/params/ragDocumentAnnotationParameters.d.ts +27 -0
  363. package/src/v2/product/extraction/ragDocuments/params/ragDocumentAnnotationParameters.js +43 -0
  364. package/src/v2/product/extraction/ragDocuments/params/ragDocumentUploadParameters.d.ts +7 -0
  365. package/src/v2/product/extraction/ragDocuments/params/ragDocumentUploadParameters.js +9 -0
  366. package/src/v2/product/extraction/ragDocuments/ragAnnotation.d.ts +12 -0
  367. package/src/v2/product/extraction/ragDocuments/ragAnnotation.js +9 -0
  368. package/src/v2/product/ocr/ocr.d.ts +10 -4
  369. package/src/v2/product/ocr/ocr.js +10 -4
  370. package/src/v2/product/ocr/ocrInference.d.ts +8 -4
  371. package/src/v2/product/ocr/ocrInference.js +8 -4
  372. package/src/v2/product/ocr/ocrPage.d.ts +6 -2
  373. package/src/v2/product/ocr/ocrPage.js +6 -2
  374. package/src/v2/product/ocr/ocrResponse.d.ts +4 -2
  375. package/src/v2/product/ocr/ocrResponse.js +4 -2
  376. package/src/v2/product/ocr/ocrResult.d.ts +3 -1
  377. package/src/v2/product/ocr/ocrResult.js +3 -1
  378. package/src/v2/product/ocr/ocrWord.d.ts +6 -2
  379. package/src/v2/product/ocr/ocrWord.js +6 -2
  380. package/src/v2/product/ocr/params/ocrParameters.d.ts +1 -1
  381. package/src/v2/product/ocr/params/ocrParameters.js +1 -1
  382. package/src/v2/product/split/params/splitParameters.d.ts +1 -1
  383. package/src/v2/product/split/params/splitParameters.js +1 -1
  384. package/src/v2/product/split/split.d.ts +10 -4
  385. package/src/v2/product/split/split.js +10 -4
  386. package/src/v2/product/split/splitInference.d.ts +7 -3
  387. package/src/v2/product/split/splitInference.js +7 -3
  388. package/src/v2/product/split/splitRange.d.ts +4 -2
  389. package/src/v2/product/split/splitRange.js +5 -3
  390. package/src/v2/product/split/splitResponse.d.ts +4 -2
  391. package/src/v2/product/split/splitResponse.js +4 -2
  392. package/src/v2/product/split/splitResult.d.ts +3 -1
  393. package/src/v2/product/split/splitResult.js +4 -2
  394. package/src/v2/search/baseSearch.d.ts +11 -5
  395. package/src/v2/search/baseSearch.js +9 -3
  396. package/src/v2/search/models/modelSearch.d.ts +12 -6
  397. package/src/v2/search/models/modelSearch.js +12 -6
  398. package/src/v2/search/models/modelSearchParameters.d.ts +4 -2
  399. package/src/v2/search/models/modelSearchParameters.js +4 -2
  400. package/src/v2/search/models/modelSearchResponse.d.ts +2 -2
  401. package/src/v2/search/models/modelSearchResponse.js +2 -2
  402. package/src/v2/search/ragDocuments/ragDocumentSearch.d.ts +12 -6
  403. package/src/v2/search/ragDocuments/ragDocumentSearch.js +12 -6
  404. package/src/v2/search/ragDocuments/ragDocumentSearchParameters.d.ts +4 -2
  405. package/src/v2/search/ragDocuments/ragDocumentSearchParameters.js +4 -2
  406. package/src/v2/search/ragDocuments/ragDocumentSearchResponse.d.ts +2 -2
  407. package/src/v2/search/ragDocuments/ragDocumentSearchResponse.js +2 -2
@@ -1,7 +1,13 @@
1
1
  import { InferenceFields } from "./inferenceFields.js";
2
2
  import { BaseField } from "./baseField.js";
3
- /** Object-valued inference field. */
3
+ /**
4
+ * Object-valued inference field.
5
+ */
4
6
  export class ObjectField extends BaseField {
7
+ constructor(serverResponse, indentLevel = 0) {
8
+ super(serverResponse, indentLevel);
9
+ this.fields = new InferenceFields(serverResponse["fields"], this._indentLevel + 1);
10
+ }
5
11
  /**
6
12
  * Retrieves the simple sub-fields in the object.
7
13
  *
@@ -48,59 +54,41 @@ export class ObjectField extends BaseField {
48
54
  * Retrieves a SimpleField by its name if it exists and is of the correct type.
49
55
  *
50
56
  * @param {string} fieldName - The name of the field to retrieve.
51
- * @return {SimpleField} The SimpleField instance if it exists and is valid, or undefined if not.
52
- * @throws {Error} If the field does not exist or is not of type SimpleField.
57
+ * @return {SimpleField} The field instance if it exists and is valid, or undefined if not.
58
+ * @throws {Error} If the field does not exist or is of wrong type.
53
59
  */
54
60
  getSimpleField(fieldName) {
55
- if (!this.fields.has(fieldName) && !this.simpleFields.has(fieldName)) {
56
- throw new Error(`The field '${fieldName}' was not found.`);
57
- }
58
- if (this.fields.get(fieldName)?.constructor.name !== "SimpleField") {
59
- throw new Error(`The field '${fieldName}' is not a SimpleField.`);
60
- }
61
- return this.simpleFields.get(fieldName);
61
+ return this.fields.getSimpleField(fieldName);
62
62
  }
63
63
  /**
64
64
  * Retrieves a ListField by its name if it exists and is of the correct type.
65
65
  *
66
66
  * @param {string} fieldName - The name of the field to retrieve.
67
- * @return {ListField} The ListField instance if it exists and is valid, or undefined if not.
68
- * @throws {Error} If the field does not exist or is not of type ListField.
67
+ * @return {ListField} The field instance if it exists and is valid, or undefined if not.
68
+ * @throws {Error} If the field does not exist or is of wrong type.
69
69
  */
70
70
  getListField(fieldName) {
71
- if (!this.fields.has(fieldName) || !this.listFields.has(fieldName)) {
72
- throw new Error(`The field '${fieldName}' was not found.`);
73
- }
74
- if (this.fields.get(fieldName)?.constructor.name !== "ListField") {
75
- throw new Error(`The field '${fieldName}' is not a ListField.`);
76
- }
77
- return this.listFields.get(fieldName);
71
+ return this.fields.getListField(fieldName);
78
72
  }
79
73
  /**
80
74
  * Retrieves an ObjectField by its name if it exists and is of the correct type.
81
75
  *
82
76
  * @param {string} fieldName - The name of the field to retrieve.
83
- * @return {ObjectField} The ObjectField instance if it exists and is valid, or undefined if not.
84
- * @throws {Error} If the field does not exist or is not of type ObjectField.
77
+ * @return {ObjectField} The field instance if it exists and is valid, or undefined if not.
78
+ * @throws {Error} If the field does not exist or is of wrong type.
85
79
  */
86
80
  getObjectField(fieldName) {
87
- if (!this.fields.has(fieldName) && !this.objectFields.has(fieldName)) {
88
- throw new Error(`The field '${fieldName}' was not found.`);
89
- }
90
- if (this.fields.get(fieldName)?.constructor.name !== "ObjectField") {
91
- throw new Error(`The field '${fieldName}' is not an ObjectField.`);
92
- }
93
- return this.objectFields.get(fieldName);
94
- }
95
- constructor(serverResponse, indentLevel = 0) {
96
- super(serverResponse, indentLevel);
97
- this.fields = new InferenceFields(serverResponse["fields"], this._indentLevel + 1);
81
+ return this.fields.getObjectField(fieldName);
98
82
  }
99
- /** Returns a readable representation of nested fields. */
83
+ /**
84
+ * Returns a readable representation of nested fields.
85
+ */
100
86
  toString() {
101
87
  return "\n" + (this.fields ? this.fields.toString(1) : "");
102
88
  }
103
- /** Returns a compact representation suitable for list items. */
89
+ /**
90
+ * Returns a compact representation suitable for list items.
91
+ */
104
92
  toStringFromList() {
105
93
  return this.fields ? this.fields.toString(2).substring(4) : "";
106
94
  }
@@ -1,5 +1,7 @@
1
1
  import { StringDict } from "../../../../parsing/stringDict.js";
2
- /** Metadata about the RAG operation. */
2
+ /**
3
+ * Metadata about the RAG operation.
4
+ */
3
5
  export declare class RagMetadata {
4
6
  /**
5
7
  * The UUID of the matched document used during the RAG operation.
@@ -1,4 +1,6 @@
1
- /** Metadata about the RAG operation. */
1
+ /**
2
+ * Metadata about the RAG operation.
3
+ */
2
4
  export class RagMetadata {
3
5
  constructor(serverResponse) {
4
6
  this.retrievedDocumentId = serverResponse["retrieved_document_id"] ?? undefined;
@@ -1,12 +1,16 @@
1
1
  import { StringDict } from "../../../../parsing/stringDict.js";
2
2
  import { RawTextPage } from "./rawTextPage.js";
3
- /** Full raw OCR text grouped by page. */
3
+ /**
4
+ * Full raw OCR text grouped by page.
5
+ */
4
6
  export declare class RawText {
5
7
  /**
6
8
  * List of pages with their extracted text content.
7
9
  */
8
10
  pages: Array<RawTextPage>;
9
11
  constructor(serverResponse: StringDict);
10
- /** Returns concatenated raw text for all pages. */
12
+ /**
13
+ * Returns concatenated raw text for all pages.
14
+ */
11
15
  toString(): string;
12
16
  }
@@ -1,10 +1,14 @@
1
1
  import { RawTextPage } from "./rawTextPage.js";
2
- /** Full raw OCR text grouped by page. */
2
+ /**
3
+ * Full raw OCR text grouped by page.
4
+ */
3
5
  export class RawText {
4
6
  constructor(serverResponse) {
5
7
  this.pages = serverResponse["pages"] ? serverResponse["pages"].map((rawTextPage) => new RawTextPage(rawTextPage)) : [];
6
8
  }
7
- /** Returns concatenated raw text for all pages. */
9
+ /**
10
+ * Returns concatenated raw text for all pages.
11
+ */
8
12
  toString() {
9
13
  return this.pages.map(page => page.toString()).join("\n\n");
10
14
  }
@@ -1,6 +1,8 @@
1
1
  import { StringDict } from "../../../../parsing/stringDict.js";
2
2
  import { BaseField } from "./baseField.js";
3
- /** Scalar inference field. */
3
+ /**
4
+ * Scalar inference field.
5
+ */
4
6
  export declare class SimpleField extends BaseField {
5
7
  /**
6
8
  * The untyped value of the field.
@@ -24,6 +26,8 @@ export declare class SimpleField extends BaseField {
24
26
  * Retrieves a boolean field value as a boolean.
25
27
  */
26
28
  get booleanValue(): boolean | null;
27
- /** Returns a readable scalar representation. */
29
+ /**
30
+ * Returns a readable scalar representation.
31
+ */
28
32
  toString(): string;
29
33
  }
@@ -1,10 +1,12 @@
1
1
  import { BaseField } from "./baseField.js";
2
- /** Scalar inference field. */
2
+ /**
3
+ * Scalar inference field.
4
+ */
3
5
  export class SimpleField extends BaseField {
4
6
  constructor(serverResponse, indentLevel = 0) {
5
7
  super(serverResponse, indentLevel);
6
- this.value =
7
- serverResponse["value"] !== undefined ? serverResponse["value"] : null;
8
+ this.value = serverResponse["value"] === undefined
9
+ ? null : serverResponse["value"];
8
10
  }
9
11
  /**
10
12
  * Retrieves a string field value as a string.
@@ -33,7 +35,9 @@ export class SimpleField extends BaseField {
33
35
  }
34
36
  return this.value;
35
37
  }
36
- /** Returns a readable scalar representation. */
38
+ /**
39
+ * Returns a readable scalar representation.
40
+ */
37
41
  toString() {
38
42
  if (this.value === null) {
39
43
  return "";
@@ -1,5 +1,7 @@
1
1
  import { StringDict } from "../../../parsing/stringDict.js";
2
- /** File metadata attached to a v2 inference. */
2
+ /**
3
+ * File metadata attached to a v2 inference.
4
+ */
3
5
  export declare class InferenceFile {
4
6
  /**
5
7
  * Name of the file.
@@ -18,6 +20,8 @@ export declare class InferenceFile {
18
20
  */
19
21
  mimeType: string;
20
22
  constructor(serverResponse: StringDict);
21
- /** Returns a printable representation of file metadata. */
23
+ /**
24
+ * Returns a printable representation of file metadata.
25
+ */
22
26
  toString(): string;
23
27
  }
@@ -1,4 +1,6 @@
1
- /** File metadata attached to a v2 inference. */
1
+ /**
2
+ * File metadata attached to a v2 inference.
3
+ */
2
4
  export class InferenceFile {
3
5
  constructor(serverResponse) {
4
6
  this.name = serverResponse["name"];
@@ -6,7 +8,9 @@ export class InferenceFile {
6
8
  this.pageCount = serverResponse["page_count"];
7
9
  this.mimeType = serverResponse["mime_type"];
8
10
  }
9
- /** Returns a printable representation of file metadata. */
11
+ /**
12
+ * Returns a printable representation of file metadata.
13
+ */
10
14
  toString() {
11
15
  return ("File\n" +
12
16
  "====\n" +
@@ -1,11 +1,15 @@
1
1
  import { StringDict } from "../../../parsing/stringDict.js";
2
- /** Model metadata attached to a v2 inference. */
2
+ /**
3
+ * Model metadata attached to a v2 inference.
4
+ */
3
5
  export declare class InferenceModel {
4
6
  /**
5
7
  * ID of the model.
6
8
  */
7
9
  id: string;
8
10
  constructor(serverResponse: StringDict);
9
- /** Returns a printable representation of model metadata. */
11
+ /**
12
+ * Returns a printable representation of model metadata.
13
+ */
10
14
  toString(): string;
11
15
  }
@@ -1,9 +1,13 @@
1
- /** Model metadata attached to a v2 inference. */
1
+ /**
2
+ * Model metadata attached to a v2 inference.
3
+ */
2
4
  export class InferenceModel {
3
5
  constructor(serverResponse) {
4
6
  this.id = serverResponse["id"];
5
7
  }
6
- /** Returns a printable representation of model metadata. */
8
+ /**
9
+ * Returns a printable representation of model metadata.
10
+ */
7
11
  toString() {
8
12
  return "Model\n" +
9
13
  "=====\n" +
@@ -1,32 +1,32 @@
1
1
  import { StringDict } from "../../../parsing/index.js";
2
- import { ErrorResponse } from "../../../v2/index.js";
2
+ import { ErrorResponse } from "../../index.js";
3
3
  import { JobWebhook } from "./jobWebhook.js";
4
4
  /**
5
5
  * Job information for a V2 polling attempt.
6
6
  */
7
7
  export declare class Job {
8
8
  /**
9
- * Job ID.
9
+ * UUID of the Job.
10
10
  */
11
11
  id: string;
12
12
  /**
13
- * Error response if any.
13
+ * If an error occurred during processing, contains the problem details.
14
14
  */
15
15
  error?: ErrorResponse;
16
16
  /**
17
17
  * Date and time of the Job creation.
18
18
  */
19
- createdAt: Date | null;
19
+ createdAt: Date;
20
20
  /**
21
21
  * Date and time of the Job completion. Filled once processing is finished.
22
22
  */
23
23
  completedAt: Date | null | undefined;
24
24
  /**
25
- * ID of the model.
25
+ * UUID of the model to be used for the inference.
26
26
  */
27
27
  modelId: string;
28
28
  /**
29
- * Name for the file.
29
+ * Name of the file sent.
30
30
  */
31
31
  filename: string;
32
32
  /**
@@ -42,11 +42,11 @@ export declare class Job {
42
42
  */
43
43
  pollingUrl: string;
44
44
  /**
45
- * URL to poll for the job result, redirects to the result if available.
45
+ * URL to retrieve the inference results. Will be filled once the inference is ready.
46
46
  */
47
47
  resultUrl?: string;
48
48
  /**
49
- * ID of webhooks associated with the job.
49
+ * List of responses from webhooks called. Empty until processing is finished.
50
50
  */
51
51
  webhooks: Array<JobWebhook>;
52
52
  constructor(serverResponse: StringDict);
@@ -1,5 +1,5 @@
1
1
  import { parseDate } from "../../../parsing/index.js";
2
- import { ErrorResponse } from "../../../v2/index.js";
2
+ import { ErrorResponse } from "../../index.js";
3
3
  import { JobWebhook } from "./jobWebhook.js";
4
4
  /**
5
5
  * Job information for a V2 polling attempt.
@@ -1,4 +1,4 @@
1
- import { BaseResponse } from "../../../v2/parsing/baseResponse.js";
1
+ import { BaseResponse } from "../baseResponse.js";
2
2
  import { StringDict } from "../../../parsing/stringDict.js";
3
3
  import { Job } from "./job.js";
4
4
  /**
@@ -1,4 +1,4 @@
1
- import { BaseResponse } from "../../../v2/parsing/baseResponse.js";
1
+ import { BaseResponse } from "../baseResponse.js";
2
2
  import { Job } from "./job.js";
3
3
  /**
4
4
  * Job response class.
@@ -1,4 +1,4 @@
1
- import { ErrorResponse } from "../../../v2/parsing/index.js";
1
+ import { ErrorResponse } from "../index.js";
2
2
  import { StringDict } from "../../../parsing/index.js";
3
3
  /**
4
4
  * JobWebhook information.
@@ -1,4 +1,4 @@
1
- import { ErrorResponse } from "../../../v2/parsing/index.js";
1
+ import { ErrorResponse } from "../index.js";
2
2
  import { parseDate } from "../../../parsing/index.js";
3
3
  /**
4
4
  * JobWebhook information.
@@ -1,5 +1,5 @@
1
1
  import { StringDict } from "../../../parsing/index.js";
2
- import { BaseResponse } from "../../../v2/parsing/baseResponse.js";
2
+ import { BaseResponse } from "../baseResponse.js";
3
3
  import { PaginationMetadata } from "./paginationMetadata.js";
4
4
  /**
5
5
  * Base class for search responses.
@@ -1,4 +1,4 @@
1
- import { BaseResponse } from "../../../v2/parsing/baseResponse.js";
1
+ import { BaseResponse } from "../baseResponse.js";
2
2
  import { PaginationMetadata } from "./paginationMetadata.js";
3
3
  /**
4
4
  * Base class for search responses.
@@ -1,4 +1,4 @@
1
- import { SearchModel } from "../../../v2/parsing/search/searchModel.js";
1
+ import { SearchModel } from "./searchModel.js";
2
2
  import { StringDict } from "../../../parsing/index.js";
3
3
  /**
4
4
  * List of search models.
@@ -1,4 +1,4 @@
1
- import { SearchModel } from "../../../v2/parsing/search/searchModel.js";
1
+ import { SearchModel } from "./searchModel.js";
2
2
  /**
3
3
  * List of search models.
4
4
  */
@@ -1,4 +1,4 @@
1
- import { SearchRagDocument } from "../../../v2/parsing/search/searchRagDocument.js";
1
+ import { SearchRagDocument } from "./searchRagDocument.js";
2
2
  import { StringDict } from "../../../parsing/index.js";
3
3
  /**
4
4
  * List of RAG documents.
@@ -1,4 +1,4 @@
1
- import { SearchRagDocument } from "../../../v2/parsing/search/searchRagDocument.js";
1
+ import { SearchRagDocument } from "./searchRagDocument.js";
2
2
  /**
3
3
  * List of RAG documents.
4
4
  */
@@ -1,5 +1,5 @@
1
1
  import { StringDict } from "../../../parsing/index.js";
2
- import { ModelSearchResponse } from "../../../v2/search/models/modelSearchResponse.js";
2
+ import { ModelSearchResponse } from "../../search/models/modelSearchResponse.js";
3
3
  /**
4
4
  * Models search response.
5
5
  * @deprecated Use `ModelSearchResponse` instead.
@@ -1,4 +1,4 @@
1
- import { ModelSearchResponse } from "../../../v2/search/models/modelSearchResponse.js";
1
+ import { ModelSearchResponse } from "../../search/models/modelSearchResponse.js";
2
2
  /**
3
3
  * Models search response.
4
4
  * @deprecated Use `ModelSearchResponse` instead.
@@ -1,15 +1,35 @@
1
- import { BaseProductParameters } from "../../v2/index.js";
2
- import { ResponseConstructor } from "../../v2/parsing/index.js";
1
+ import { BaseProductParameters } from "../index.js";
2
+ import { ResponseConstructor, AnnotationResponseConstructor } from "../parsing/index.js";
3
+ import { BaseAnnotationParameters } from "../clientOptions/index.js";
4
+ import { BaseRagDocumentUploadParameters } from "../clientOptions/index.js";
3
5
  /**
4
6
  * Base class for all V2 product definitions.
5
7
  *
6
8
  * Child classes are passed to the Client when making requests.
7
9
  */
8
10
  export declare abstract class BaseProduct {
9
- /** Parameter class accepted by this product. */
11
+ /**
12
+ * API slug for this product.
13
+ */
14
+ static get slug(): string;
15
+ /**
16
+ * Parameter class accepted by this product.
17
+ */
10
18
  static get parametersClass(): new (...args: any[]) => BaseProductParameters;
11
- /** Response class returned by this product. */
19
+ /**
20
+ * Response class returned by this product.
21
+ */
12
22
  static get responseClass(): ResponseConstructor<any>;
13
- /** API slug for this product. */
14
- static get slug(): string;
23
+ /**
24
+ * Annotation Response class returned by this product.
25
+ */
26
+ static get annotationResponseClass(): AnnotationResponseConstructor<any>;
27
+ /**
28
+ * Annotation Parameters class for this product.
29
+ */
30
+ static get annotationParametersClass(): new (...args: any[]) => BaseAnnotationParameters;
31
+ /**
32
+ * Document Upload class for this product.
33
+ */
34
+ static get ragDocumentUploadClass(): new (...args: any[]) => BaseRagDocumentUploadParameters;
15
35
  }
@@ -4,16 +4,40 @@
4
4
  * Child classes are passed to the Client when making requests.
5
5
  */
6
6
  export class BaseProduct {
7
- /** Parameter class accepted by this product. */
7
+ /**
8
+ * API slug for this product.
9
+ */
10
+ static get slug() {
11
+ throw new Error("Must define static slug property");
12
+ }
13
+ /**
14
+ * Parameter class accepted by this product.
15
+ */
8
16
  static get parametersClass() {
9
- throw new Error("Must define static parameters property");
17
+ throw new Error("Must define static parametersClass property");
10
18
  }
11
- /** Response class returned by this product. */
19
+ /**
20
+ * Response class returned by this product.
21
+ */
12
22
  static get responseClass() {
13
- throw new Error("Must define static response property");
23
+ throw new Error("Must define static responseClass property");
14
24
  }
15
- /** API slug for this product. */
16
- static get slug() {
17
- throw new Error("Must define static slug property");
25
+ /**
26
+ * Annotation Response class returned by this product.
27
+ */
28
+ static get annotationResponseClass() {
29
+ throw new Error("Must define static annotationResponseClass property");
30
+ }
31
+ /**
32
+ * Annotation Parameters class for this product.
33
+ */
34
+ static get annotationParametersClass() {
35
+ throw new Error("Must define static annotationParametersClass property");
36
+ }
37
+ /**
38
+ * Document Upload class for this product.
39
+ */
40
+ static get ragDocumentUploadClass() {
41
+ throw new Error("Must define static ragDocumentUploadClass property");
18
42
  }
19
43
  }
@@ -1,14 +1,20 @@
1
1
  import { ClassificationResponse } from "./classificationResponse.js";
2
2
  import { ClassificationParameters } from "./params/index.js";
3
- import { BaseProduct } from "../../../v2/product/baseProduct.js";
3
+ import { BaseProduct } from "../baseProduct.js";
4
4
  /**
5
5
  * Automatically sort any image or scanned document into categories.
6
6
  */
7
7
  export declare class Classification extends BaseProduct {
8
- /** @inheritDoc */
8
+ /**
9
+ * @inheritDoc
10
+ */
9
11
  static get parametersClass(): typeof ClassificationParameters;
10
- /** @inheritDoc */
12
+ /**
13
+ * @inheritDoc
14
+ */
11
15
  static get responseClass(): typeof ClassificationResponse;
12
- /** @inheritDoc */
16
+ /**
17
+ * @inheritDoc
18
+ */
13
19
  static get slug(): string;
14
20
  }
@@ -1,19 +1,25 @@
1
1
  import { ClassificationResponse } from "./classificationResponse.js";
2
2
  import { ClassificationParameters } from "./params/index.js";
3
- import { BaseProduct } from "../../../v2/product/baseProduct.js";
3
+ import { BaseProduct } from "../baseProduct.js";
4
4
  /**
5
5
  * Automatically sort any image or scanned document into categories.
6
6
  */
7
7
  export class Classification extends BaseProduct {
8
- /** @inheritDoc */
8
+ /**
9
+ * @inheritDoc
10
+ */
9
11
  static get parametersClass() {
10
12
  return ClassificationParameters;
11
13
  }
12
- /** @inheritDoc */
14
+ /**
15
+ * @inheritDoc
16
+ */
13
17
  static get responseClass() {
14
18
  return ClassificationResponse;
15
19
  }
16
- /** @inheritDoc */
20
+ /**
21
+ * @inheritDoc
22
+ */
17
23
  static get slug() {
18
24
  return "classification";
19
25
  }
@@ -1,9 +1,11 @@
1
1
  import { StringDict } from "../../../parsing/index.js";
2
- import { ExtractionResponse } from "../../../v2/product/index.js";
2
+ import { ExtractionResponse } from "../index.js";
3
3
  /**
4
4
  * Document level classification.
5
5
  */
6
- /** Classifier output for document-level classification. */
6
+ /**
7
+ * Classifier output for document-level classification.
8
+ */
7
9
  export declare class ClassificationClassifier {
8
10
  /**
9
11
  * The document type, as identified on given classification values.
@@ -14,6 +16,8 @@ export declare class ClassificationClassifier {
14
16
  */
15
17
  extractionResponse?: ExtractionResponse;
16
18
  constructor(serverResponse: StringDict);
17
- /** Returns a readable classifier summary. */
19
+ /**
20
+ * Returns a readable classifier summary.
21
+ */
18
22
  toString(): string;
19
23
  }
@@ -1,8 +1,10 @@
1
- import { ExtractionResponse } from "../../../v2/product/index.js";
1
+ import { ExtractionResponse } from "../index.js";
2
2
  /**
3
3
  * Document level classification.
4
4
  */
5
- /** Classifier output for document-level classification. */
5
+ /**
6
+ * Classifier output for document-level classification.
7
+ */
6
8
  export class ClassificationClassifier {
7
9
  constructor(serverResponse) {
8
10
  this.documentType = serverResponse["document_type"];
@@ -10,7 +12,9 @@ export class ClassificationClassifier {
10
12
  ? new ExtractionResponse(serverResponse["extraction_response"])
11
13
  : undefined;
12
14
  }
13
- /** Returns a readable classifier summary. */
15
+ /**
16
+ * Returns a readable classifier summary.
17
+ */
14
18
  toString() {
15
19
  return `Document Type: ${this.documentType}`;
16
20
  }
@@ -1,13 +1,17 @@
1
1
  import { StringDict } from "../../../parsing/index.js";
2
- import { BaseInference } from "../../../v2/parsing/inference/baseInference.js";
2
+ import { BaseInference } from "../../parsing/inference/baseInference.js";
3
3
  import { ClassificationResult } from "./classificationResult.js";
4
- /** Inference payload for classification responses. */
4
+ /**
5
+ * Inference payload for classification responses.
6
+ */
5
7
  export declare class ClassificationInference extends BaseInference {
6
8
  /**
7
9
  * Result of a classification inference.
8
10
  */
9
11
  result: ClassificationResult;
10
12
  constructor(serverResponse: StringDict);
11
- /** Returns a readable representation of the inference. */
13
+ /**
14
+ * Returns a readable representation of the inference.
15
+ */
12
16
  toString(): string;
13
17
  }