mindee 5.9.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 (318) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/package.json +12 -13
  3. package/src/geometry/bbox.d.ts +18 -6
  4. package/src/geometry/bbox.js +6 -2
  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 +3 -1
  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 +1 -1
  24. package/src/image/imageExtractor.js +12 -12
  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 +19 -6
  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 +7 -3
  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 +3 -1
  49. package/src/pdf/extractedPdfs.js +3 -1
  50. package/src/pdf/pdfCompressor.js +14 -14
  51. package/src/pdf/pdfExtractor.js +1 -1
  52. package/src/pdf/pdfOperation.d.ts +9 -3
  53. package/src/pdf/pdfOperation.js +14 -14
  54. package/src/pdf/pdfUtils.js +1 -1
  55. package/src/v1/cli.js +1 -1
  56. package/src/v1/client.d.ts +42 -14
  57. package/src/v1/client.js +8 -8
  58. package/src/v1/extraction/invoiceSplitterExtractor/extractedInvoiceSplitterImage.d.ts +6 -2
  59. package/src/v1/extraction/invoiceSplitterExtractor/invoiceSplitterExtractor.js +4 -4
  60. package/src/v1/extraction/multiReceiptsExtractor/extractedMultiReceiptImage.d.ts +6 -2
  61. package/src/v1/extraction/multiReceiptsExtractor/multiReceiptsExtractor.js +2 -2
  62. package/src/v1/http/apiSettingsV1.d.ts +15 -5
  63. package/src/v1/http/apiSettingsV1.js +12 -4
  64. package/src/v1/http/baseEndpoint.d.ts +6 -2
  65. package/src/v1/http/endpoint.d.ts +9 -3
  66. package/src/v1/http/endpoint.js +1 -1
  67. package/src/v1/http/errors.d.ts +9 -3
  68. package/src/v1/http/errors.js +6 -2
  69. package/src/v1/http/httpParams.d.ts +36 -12
  70. package/src/v1/http/workflowEndpoint.js +1 -1
  71. package/src/v1/parsing/common/apiRequest.d.ts +15 -5
  72. package/src/v1/parsing/common/apiResponse.d.ts +6 -2
  73. package/src/v1/parsing/common/asyncPredictResponse.d.ts +21 -7
  74. package/src/v1/parsing/common/document.d.ts +18 -6
  75. package/src/v1/parsing/common/document.js +2 -2
  76. package/src/v1/parsing/common/execution.d.ts +39 -13
  77. package/src/v1/parsing/common/executionFile.d.ts +6 -2
  78. package/src/v1/parsing/common/executionPriority.d.ts +12 -4
  79. package/src/v1/parsing/common/executionPriority.js +12 -4
  80. package/src/v1/parsing/common/extras/cropperExtra.d.ts +7 -3
  81. package/src/v1/parsing/common/extras/cropperExtra.js +6 -3
  82. package/src/v1/parsing/common/extras/extras.d.ts +9 -3
  83. package/src/v1/parsing/common/extras/extras.js +6 -2
  84. package/src/v1/parsing/common/extras/fullTextOcrExtra.d.ts +9 -3
  85. package/src/v1/parsing/common/extras/fullTextOcrExtra.js +3 -1
  86. package/src/v1/parsing/common/extras/ragExtra.d.ts +3 -1
  87. package/src/v1/parsing/common/extras/ragExtra.js +3 -1
  88. package/src/v1/parsing/common/feedback/feedbackResponse.d.ts +3 -1
  89. package/src/v1/parsing/common/feedback/feedbackResponse.js +0 -1
  90. package/src/v1/parsing/common/inference.d.ts +24 -8
  91. package/src/v1/parsing/common/inference.js +6 -2
  92. package/src/v1/parsing/common/mvisionV1.d.ts +3 -1
  93. package/src/v1/parsing/common/mvisionV1.js +3 -1
  94. package/src/v1/parsing/common/ocr.d.ts +3 -1
  95. package/src/v1/parsing/common/ocrPage.d.ts +6 -2
  96. package/src/v1/parsing/common/ocrPage.js +6 -2
  97. package/src/v1/parsing/common/orientation.d.ts +6 -2
  98. package/src/v1/parsing/common/page.d.ts +12 -4
  99. package/src/v1/parsing/common/predictResponse.d.ts +3 -1
  100. package/src/v1/parsing/common/prediction.d.ts +3 -1
  101. package/src/v1/parsing/common/prediction.js +3 -1
  102. package/src/v1/parsing/generated/generatedList.d.ts +6 -2
  103. package/src/v1/parsing/generated/generatedObject.d.ts +25 -9
  104. package/src/v1/parsing/generated/generatedObject.js +13 -7
  105. package/src/v1/parsing/localResponse.d.ts +3 -1
  106. package/src/v1/parsing/localResponse.js +3 -1
  107. package/src/v1/parsing/standard/addressField.d.ts +24 -8
  108. package/src/v1/parsing/standard/amount.d.ts +3 -1
  109. package/src/v1/parsing/standard/amount.js +3 -1
  110. package/src/v1/parsing/standard/base.d.ts +27 -9
  111. package/src/v1/parsing/standard/base.js +6 -2
  112. package/src/v1/parsing/standard/boolean.d.ts +3 -1
  113. package/src/v1/parsing/standard/classification.d.ts +6 -2
  114. package/src/v1/parsing/standard/companyRegistration.d.ts +9 -3
  115. package/src/v1/parsing/standard/companyRegistration.js +3 -1
  116. package/src/v1/parsing/standard/date.d.ts +12 -4
  117. package/src/v1/parsing/standard/date.js +3 -1
  118. package/src/v1/parsing/standard/field.d.ts +7 -5
  119. package/src/v1/parsing/standard/field.js +4 -4
  120. package/src/v1/parsing/standard/locale.d.ts +15 -5
  121. package/src/v1/parsing/standard/paymentDetails.d.ts +15 -5
  122. package/src/v1/parsing/standard/position.d.ts +15 -5
  123. package/src/v1/parsing/standard/tax.d.ts +18 -6
  124. package/src/v1/parsing/standard/tax.js +15 -5
  125. package/src/v1/parsing/standard/text.d.ts +6 -2
  126. package/src/v1/parsing/standard/word.d.ts +9 -3
  127. package/src/v1/parsing/standard/word.js +3 -1
  128. package/src/v1/product/barcodeReader/barcodeReaderV1.d.ts +12 -4
  129. package/src/v1/product/barcodeReader/barcodeReaderV1.js +9 -3
  130. package/src/v1/product/barcodeReader/barcodeReaderV1Document.d.ts +6 -2
  131. package/src/v1/product/barcodeReader/barcodeReaderV1Document.js +6 -2
  132. package/src/v1/product/cropper/cropperV1.d.ts +12 -4
  133. package/src/v1/product/cropper/cropperV1.js +9 -3
  134. package/src/v1/product/cropper/cropperV1Page.d.ts +3 -1
  135. package/src/v1/product/cropper/cropperV1Page.js +3 -1
  136. package/src/v1/product/driverLicense/driverLicenseV1.d.ts +12 -4
  137. package/src/v1/product/driverLicense/driverLicenseV1.js +9 -3
  138. package/src/v1/product/driverLicense/driverLicenseV1Document.d.ts +39 -13
  139. package/src/v1/product/financialDocument/financialDocumentV1.d.ts +12 -4
  140. package/src/v1/product/financialDocument/financialDocumentV1.js +9 -3
  141. package/src/v1/product/financialDocument/financialDocumentV1Document.d.ts +96 -32
  142. package/src/v1/product/financialDocument/financialDocumentV1Document.js +15 -5
  143. package/src/v1/product/financialDocument/financialDocumentV1LineItem.d.ts +30 -10
  144. package/src/v1/product/financialDocument/financialDocumentV1LineItem.js +3 -1
  145. package/src/v1/product/fr/bankAccountDetails/bankAccountDetailsV1.d.ts +12 -4
  146. package/src/v1/product/fr/bankAccountDetails/bankAccountDetailsV1.js +9 -3
  147. package/src/v1/product/fr/bankAccountDetails/bankAccountDetailsV1Document.d.ts +9 -3
  148. package/src/v1/product/fr/bankAccountDetails/bankAccountDetailsV2.d.ts +12 -4
  149. package/src/v1/product/fr/bankAccountDetails/bankAccountDetailsV2.js +9 -3
  150. package/src/v1/product/fr/bankAccountDetails/bankAccountDetailsV2Bban.d.ts +18 -6
  151. package/src/v1/product/fr/bankAccountDetails/bankAccountDetailsV2Bban.js +3 -1
  152. package/src/v1/product/fr/bankAccountDetails/bankAccountDetailsV2Document.d.ts +12 -4
  153. package/src/v1/product/fr/carteGrise/carteGriseV1.d.ts +12 -4
  154. package/src/v1/product/fr/carteGrise/carteGriseV1.js +9 -3
  155. package/src/v1/product/fr/carteGrise/carteGriseV1Document.d.ts +123 -41
  156. package/src/v1/product/fr/idCard/idCardV2.d.ts +12 -4
  157. package/src/v1/product/fr/idCard/idCardV2.js +9 -3
  158. package/src/v1/product/fr/idCard/idCardV2Document.d.ts +45 -15
  159. package/src/v1/product/fr/idCard/idCardV2Document.js +3 -1
  160. package/src/v1/product/fr/idCard/idCardV2Page.d.ts +6 -2
  161. package/src/v1/product/generated/generatedV1.d.ts +12 -4
  162. package/src/v1/product/generated/generatedV1.js +9 -3
  163. package/src/v1/product/generated/generatedV1Prediction.d.ts +6 -2
  164. package/src/v1/product/generated/generatedV1Prediction.js +3 -1
  165. package/src/v1/product/internationalId/internationalIdV2.d.ts +12 -4
  166. package/src/v1/product/internationalId/internationalIdV2.js +9 -3
  167. package/src/v1/product/internationalId/internationalIdV2Document.d.ts +51 -17
  168. package/src/v1/product/internationalId/internationalIdV2Document.js +6 -2
  169. package/src/v1/product/invoice/invoiceV4.d.ts +12 -4
  170. package/src/v1/product/invoice/invoiceV4.js +9 -3
  171. package/src/v1/product/invoice/invoiceV4Document.d.ts +87 -29
  172. package/src/v1/product/invoice/invoiceV4Document.js +15 -5
  173. package/src/v1/product/invoice/invoiceV4LineItem.d.ts +30 -10
  174. package/src/v1/product/invoice/invoiceV4LineItem.js +3 -1
  175. package/src/v1/product/invoiceSplitter/invoiceSplitterV1.d.ts +12 -4
  176. package/src/v1/product/invoiceSplitter/invoiceSplitterV1.js +9 -3
  177. package/src/v1/product/invoiceSplitter/invoiceSplitterV1Document.d.ts +3 -1
  178. package/src/v1/product/invoiceSplitter/invoiceSplitterV1Document.js +3 -1
  179. package/src/v1/product/invoiceSplitter/invoiceSplitterV1InvoicePageGroup.d.ts +9 -3
  180. package/src/v1/product/invoiceSplitter/invoiceSplitterV1InvoicePageGroup.js +3 -1
  181. package/src/v1/product/multiReceiptsDetector/multiReceiptsDetectorV1.d.ts +12 -4
  182. package/src/v1/product/multiReceiptsDetector/multiReceiptsDetectorV1.js +9 -3
  183. package/src/v1/product/multiReceiptsDetector/multiReceiptsDetectorV1Document.d.ts +3 -1
  184. package/src/v1/product/multiReceiptsDetector/multiReceiptsDetectorV1Document.js +3 -1
  185. package/src/v1/product/passport/passportV1.d.ts +12 -4
  186. package/src/v1/product/passport/passportV1.js +9 -3
  187. package/src/v1/product/passport/passportV1Document.d.ts +33 -11
  188. package/src/v1/product/passport/passportV1Document.js +3 -1
  189. package/src/v1/product/receipt/receiptV5.d.ts +12 -4
  190. package/src/v1/product/receipt/receiptV5.js +9 -3
  191. package/src/v1/product/receipt/receiptV5Document.d.ts +51 -17
  192. package/src/v1/product/receipt/receiptV5Document.js +6 -2
  193. package/src/v1/product/receipt/receiptV5LineItem.d.ts +18 -6
  194. package/src/v1/product/receipt/receiptV5LineItem.js +3 -1
  195. package/src/v1/product/resume/resumeV1.d.ts +12 -4
  196. package/src/v1/product/resume/resumeV1.js +9 -3
  197. package/src/v1/product/resume/resumeV1Certificate.d.ts +18 -6
  198. package/src/v1/product/resume/resumeV1Certificate.js +3 -1
  199. package/src/v1/product/resume/resumeV1Document.d.ts +51 -17
  200. package/src/v1/product/resume/resumeV1Document.js +27 -9
  201. package/src/v1/product/resume/resumeV1Education.d.ts +27 -9
  202. package/src/v1/product/resume/resumeV1Education.js +3 -1
  203. package/src/v1/product/resume/resumeV1Language.d.ts +12 -4
  204. package/src/v1/product/resume/resumeV1Language.js +3 -1
  205. package/src/v1/product/resume/resumeV1ProfessionalExperience.d.ts +33 -11
  206. package/src/v1/product/resume/resumeV1ProfessionalExperience.js +3 -1
  207. package/src/v1/product/resume/resumeV1SocialNetworksUrl.d.ts +12 -4
  208. package/src/v1/product/resume/resumeV1SocialNetworksUrl.js +3 -1
  209. package/src/v1/product/us/bankCheck/bankCheckV1.d.ts +12 -4
  210. package/src/v1/product/us/bankCheck/bankCheckV1.js +9 -3
  211. package/src/v1/product/us/bankCheck/bankCheckV1Document.d.ts +18 -6
  212. package/src/v1/product/us/bankCheck/bankCheckV1Document.js +3 -1
  213. package/src/v1/product/us/bankCheck/bankCheckV1Page.d.ts +6 -2
  214. package/src/v1/product/us/bankCheck/bankCheckV1Page.js +3 -1
  215. package/src/v2/cli.js +1 -1
  216. package/src/v2/client.d.ts +9 -3
  217. package/src/v2/clientOptions/pollingOptions.d.ts +30 -10
  218. package/src/v2/clientOptions/pollingOptions.js +6 -2
  219. package/src/v2/http/mindeeApiV2.d.ts +1 -1
  220. package/src/v2/http/mindeeApiV2.js +1 -1
  221. package/src/v2/parsing/error/errorDetails.d.ts +3 -1
  222. package/src/v2/parsing/inference/baseInference.d.ts +6 -2
  223. package/src/v2/parsing/inference/baseInference.js +6 -2
  224. package/src/v2/parsing/inference/field/baseField.d.ts +9 -3
  225. package/src/v2/parsing/inference/field/fieldConfidence.d.ts +12 -4
  226. package/src/v2/parsing/inference/field/fieldConfidence.js +12 -4
  227. package/src/v2/parsing/inference/field/fieldLocation.d.ts +9 -3
  228. package/src/v2/parsing/inference/field/fieldLocation.js +3 -1
  229. package/src/v2/parsing/inference/field/inferenceFields.d.ts +6 -2
  230. package/src/v2/parsing/inference/field/inferenceFields.js +3 -1
  231. package/src/v2/parsing/inference/field/listField.d.ts +6 -2
  232. package/src/v2/parsing/inference/field/listField.js +6 -2
  233. package/src/v2/parsing/inference/field/objectField.d.ts +6 -2
  234. package/src/v2/parsing/inference/field/objectField.js +3 -1
  235. package/src/v2/parsing/inference/field/ragMetadata.d.ts +3 -1
  236. package/src/v2/parsing/inference/field/ragMetadata.js +3 -1
  237. package/src/v2/parsing/inference/field/rawText.d.ts +6 -2
  238. package/src/v2/parsing/inference/field/rawText.js +6 -2
  239. package/src/v2/parsing/inference/field/simpleField.d.ts +6 -2
  240. package/src/v2/parsing/inference/field/simpleField.js +8 -4
  241. package/src/v2/parsing/inference/inferenceFile.d.ts +6 -2
  242. package/src/v2/parsing/inference/inferenceFile.js +6 -2
  243. package/src/v2/parsing/inference/inferenceModel.d.ts +6 -2
  244. package/src/v2/parsing/inference/inferenceModel.js +6 -2
  245. package/src/v2/product/classification/classification.d.ts +9 -3
  246. package/src/v2/product/classification/classification.js +9 -3
  247. package/src/v2/product/classification/classificationClassifier.d.ts +6 -2
  248. package/src/v2/product/classification/classificationClassifier.js +6 -2
  249. package/src/v2/product/classification/classificationInference.d.ts +6 -2
  250. package/src/v2/product/classification/classificationInference.js +6 -2
  251. package/src/v2/product/classification/classificationResponse.d.ts +3 -1
  252. package/src/v2/product/classification/classificationResponse.js +3 -1
  253. package/src/v2/product/classification/classificationResult.d.ts +6 -2
  254. package/src/v2/product/classification/classificationResult.js +6 -2
  255. package/src/v2/product/crop/crop.d.ts +9 -3
  256. package/src/v2/product/crop/crop.js +9 -3
  257. package/src/v2/product/crop/cropInference.d.ts +6 -2
  258. package/src/v2/product/crop/cropInference.js +6 -2
  259. package/src/v2/product/crop/cropItem.d.ts +6 -2
  260. package/src/v2/product/crop/cropItem.js +6 -2
  261. package/src/v2/product/crop/cropResponse.d.ts +3 -1
  262. package/src/v2/product/crop/cropResponse.js +3 -1
  263. package/src/v2/product/crop/cropResult.d.ts +6 -2
  264. package/src/v2/product/crop/cropResult.js +6 -2
  265. package/src/v2/product/extraction/dataSchemaActiveOption.d.ts +3 -1
  266. package/src/v2/product/extraction/dataSchemaActiveOption.js +3 -1
  267. package/src/v2/product/extraction/extraction.d.ts +18 -6
  268. package/src/v2/product/extraction/extraction.js +18 -6
  269. package/src/v2/product/extraction/extractionActiveOptions.d.ts +6 -2
  270. package/src/v2/product/extraction/extractionActiveOptions.js +6 -2
  271. package/src/v2/product/extraction/extractionInference.d.ts +6 -2
  272. package/src/v2/product/extraction/extractionInference.js +6 -2
  273. package/src/v2/product/extraction/extractionResponse.d.ts +3 -1
  274. package/src/v2/product/extraction/extractionResponse.js +3 -1
  275. package/src/v2/product/extraction/extractionResult.d.ts +6 -2
  276. package/src/v2/product/extraction/extractionResult.js +6 -2
  277. package/src/v2/product/extraction/params/dataSchema.d.ts +12 -4
  278. package/src/v2/product/extraction/params/dataSchema.js +6 -2
  279. package/src/v2/product/extraction/params/dataSchemaField.d.ts +39 -13
  280. package/src/v2/product/extraction/params/dataSchemaField.js +9 -3
  281. package/src/v2/product/extraction/params/dataSchemaReplace.d.ts +12 -4
  282. package/src/v2/product/extraction/params/dataSchemaReplace.js +6 -2
  283. package/src/v2/product/extraction/params/extractionParameters.js +3 -3
  284. package/src/v2/product/extraction/ragDocuments/annotatedListField.d.ts +3 -1
  285. package/src/v2/product/extraction/ragDocuments/annotatedListField.js +3 -1
  286. package/src/v2/product/extraction/ragDocuments/params/ragDocumentAnnotationParameters.js +1 -1
  287. package/src/v2/product/ocr/ocr.d.ts +9 -3
  288. package/src/v2/product/ocr/ocr.js +9 -3
  289. package/src/v2/product/ocr/ocrInference.d.ts +6 -2
  290. package/src/v2/product/ocr/ocrInference.js +6 -2
  291. package/src/v2/product/ocr/ocrPage.d.ts +6 -2
  292. package/src/v2/product/ocr/ocrPage.js +6 -2
  293. package/src/v2/product/ocr/ocrResponse.d.ts +3 -1
  294. package/src/v2/product/ocr/ocrResponse.js +3 -1
  295. package/src/v2/product/ocr/ocrResult.d.ts +3 -1
  296. package/src/v2/product/ocr/ocrResult.js +3 -1
  297. package/src/v2/product/ocr/ocrWord.d.ts +6 -2
  298. package/src/v2/product/ocr/ocrWord.js +6 -2
  299. package/src/v2/product/split/split.d.ts +9 -3
  300. package/src/v2/product/split/split.js +9 -3
  301. package/src/v2/product/split/splitInference.d.ts +6 -2
  302. package/src/v2/product/split/splitInference.js +6 -2
  303. package/src/v2/product/split/splitRange.d.ts +3 -1
  304. package/src/v2/product/split/splitRange.js +3 -1
  305. package/src/v2/product/split/splitResponse.d.ts +3 -1
  306. package/src/v2/product/split/splitResponse.js +3 -1
  307. package/src/v2/product/split/splitResult.d.ts +3 -1
  308. package/src/v2/product/split/splitResult.js +3 -1
  309. package/src/v2/search/baseSearch.d.ts +9 -3
  310. package/src/v2/search/baseSearch.js +9 -3
  311. package/src/v2/search/models/modelSearch.d.ts +9 -3
  312. package/src/v2/search/models/modelSearch.js +9 -3
  313. package/src/v2/search/models/modelSearchParameters.d.ts +3 -1
  314. package/src/v2/search/models/modelSearchParameters.js +3 -1
  315. package/src/v2/search/ragDocuments/ragDocumentSearch.d.ts +9 -3
  316. package/src/v2/search/ragDocuments/ragDocumentSearch.js +9 -3
  317. package/src/v2/search/ragDocuments/ragDocumentSearchParameters.d.ts +3 -1
  318. package/src/v2/search/ragDocuments/ragDocumentSearchParameters.js +3 -1
@@ -5,15 +5,25 @@ import { StringDict } from "../../../parsing/stringDict.js";
5
5
  * @category API Response
6
6
  */
7
7
  export declare class ApiRequest {
8
- /** An object detailing the error. */
8
+ /**
9
+ * An object detailing the error.
10
+ */
9
11
  error: StringDict;
10
- /** Target of the request. */
12
+ /**
13
+ * Target of the request.
14
+ */
11
15
  resources: string[];
12
- /** Status of the request. Either "failure" or "success". */
16
+ /**
17
+ * Status of the request. Either "failure" or "success".
18
+ */
13
19
  status: "failure" | "success";
14
- /** HTTP status code */
20
+ /**
21
+ * HTTP status code
22
+ */
15
23
  statusCode: number;
16
- /** URL of the request. */
24
+ /**
25
+ * URL of the request.
26
+ */
17
27
  url: string;
18
28
  constructor(serverResponse: StringDict);
19
29
  }
@@ -5,9 +5,13 @@ import { StringDict } from "../../../parsing/stringDict.js";
5
5
  * @category API Response
6
6
  */
7
7
  export declare abstract class ApiResponse {
8
- /** Initial request sent to the API. */
8
+ /**
9
+ * Initial request sent to the API.
10
+ */
9
11
  apiRequest: ApiRequest;
10
- /** Raw text representation of the API's response. */
12
+ /**
13
+ * Raw text representation of the API's response.
14
+ */
11
15
  private readonly rawHttp;
12
16
  /**
13
17
  * @param serverResponse JSON response from the server.
@@ -8,17 +8,29 @@ import { Document } from "./document.js";
8
8
  * @category Asynchronous
9
9
  */
10
10
  export declare class Job {
11
- /** Timestamp noting the enqueueing of a document. */
11
+ /**
12
+ * Timestamp noting the enqueueing of a document.
13
+ */
12
14
  issuedAt: Date;
13
- /** Timestamp noting the availability of a prediction for an enqueued document. */
15
+ /**
16
+ * Timestamp noting the availability of a prediction for an enqueued document.
17
+ */
14
18
  availableAt?: Date;
15
- /** Information about an error that occurred during the job processing. */
19
+ /**
20
+ * Information about an error that occurred during the job processing.
21
+ */
16
22
  error?: StringDict;
17
- /** ID of the job. */
23
+ /**
24
+ * ID of the job.
25
+ */
18
26
  id: string;
19
- /** Status of the job. */
27
+ /**
28
+ * Status of the job.
29
+ */
20
30
  status?: "waiting" | "processing" | "completed" | "failed";
21
- /** The time taken to process the job, in milliseconds. */
31
+ /**
32
+ * The time taken to process the job, in milliseconds.
33
+ */
22
34
  milliSecsTaken?: number;
23
35
  constructor(jsonResponse: StringDict);
24
36
  }
@@ -33,7 +45,9 @@ export declare function datetimeWithTimezone(date: string): Date;
33
45
  * @category Asynchronous
34
46
  */
35
47
  export declare class AsyncPredictResponse<T extends Inference> extends ApiResponse {
36
- /** Job for a queue. */
48
+ /**
49
+ * Job for a queue.
50
+ */
37
51
  job: Job;
38
52
  /** Prediction for an asynchronous request. Will not be available so long as the job is not
39
53
  * `completed`.
@@ -7,17 +7,29 @@ import { StringDict } from "../../../parsing/stringDict.js";
7
7
  * @typeParam T an extension of an `Inference`. Mandatory in order to properly create an inference.
8
8
  */
9
9
  export declare class Document<T extends Inference> {
10
- /** File name as sent back by the server. */
10
+ /**
11
+ * File name as sent back by the server.
12
+ */
11
13
  filename: string;
12
- /** Result of the base inference. */
14
+ /**
15
+ * Result of the base inference.
16
+ */
13
17
  inference: T;
14
- /** ID of the document as sent back by the server. */
18
+ /**
19
+ * ID of the document as sent back by the server.
20
+ */
15
21
  id: string;
16
- /** Potential `Extras` fields sent back along the prediction. */
22
+ /**
23
+ * Potential `Extras` fields sent back along the prediction.
24
+ */
17
25
  extras?: Extras;
18
- /** Raw-text response for `allWords` parsing. */
26
+ /**
27
+ * Raw-text response for `allWords` parsing.
28
+ */
19
29
  ocr?: Ocr;
20
- /** Page number as sent back by the API. */
30
+ /**
31
+ * Page number as sent back by the API.
32
+ */
21
33
  nPages: number;
22
34
  /**
23
35
  *
@@ -50,9 +50,9 @@ export class Document {
50
50
  ${this.inference?.toString()}`;
51
51
  }
52
52
  injectFullTextOcr(rawPrediction) {
53
- if (rawPrediction["inference"]["pages"].length < 1 ||
53
+ if (rawPrediction["inference"]["pages"].length === 0 ||
54
54
  !("extras" in rawPrediction["inference"]["pages"][0]) ||
55
- rawPrediction["inference"]["pages"][0]["extras"].length < 1 ||
55
+ rawPrediction["inference"]["pages"][0]["extras"].length === 0 ||
56
56
  !("full_text_ocr" in rawPrediction["inference"]["pages"][0]["extras"]) ||
57
57
  !rawPrediction["inference"]["pages"][0]["extras"]["full_text_ocr"] ||
58
58
  !("content" in rawPrediction["inference"]["pages"][0]["extras"]["full_text_ocr"]) ||
@@ -8,31 +8,57 @@ import { ExecutionPriority } from "./executionPriority.js";
8
8
  * @category Workflow
9
9
  */
10
10
  export declare class Execution<T extends Inference> {
11
- /** Identifier for the batch to which the execution belongs. */
11
+ /**
12
+ * Identifier for the batch to which the execution belongs.
13
+ */
12
14
  batchName: string;
13
- /** The time at which the execution started. */
15
+ /**
16
+ * The time at which the execution started.
17
+ */
14
18
  createdAt: Date | null;
15
- /** File representation within a workflow execution. */
19
+ /**
20
+ * File representation within a workflow execution.
21
+ */
16
22
  file: ExecutionFile;
17
- /** Identifier for the execution. */
23
+ /**
24
+ * Identifier for the execution.
25
+ */
18
26
  id: string;
19
- /** Deserialized inference object. */
27
+ /**
28
+ * Deserialized inference object.
29
+ */
20
30
  inference: T | null;
21
- /** Priority of the execution. */
31
+ /**
32
+ * Priority of the execution.
33
+ */
22
34
  priority: ExecutionPriority | null;
23
- /** The time at which the file was tagged as reviewed. */
35
+ /**
36
+ * The time at which the file was tagged as reviewed.
37
+ */
24
38
  reviewedAt: Date | null;
25
- /** The time at which the file was uploaded to a workflow. */
39
+ /**
40
+ * The time at which the file was uploaded to a workflow.
41
+ */
26
42
  availableAt: Date | null;
27
- /** Reviewed fields and values. */
43
+ /**
44
+ * Reviewed fields and values.
45
+ */
28
46
  reviewedPrediction: GeneratedV1Document | null;
29
- /** Execution Status. */
47
+ /**
48
+ * Execution Status.
49
+ */
30
50
  status: string;
31
- /** Execution type. */
51
+ /**
52
+ * Execution type.
53
+ */
32
54
  type: string | null;
33
- /** The time at which the file was uploaded to a workflow. */
55
+ /**
56
+ * The time at which the file was uploaded to a workflow.
57
+ */
34
58
  uploadedAt: Date | null;
35
- /** Identifier for the workflow. */
59
+ /**
60
+ * Identifier for the workflow.
61
+ */
36
62
  workflowId: string;
37
63
  constructor(inferenceClass: new (serverResponse: StringDict) => T, jsonResponse: StringDict);
38
64
  }
@@ -4,9 +4,13 @@ import { StringDict } from "../../../parsing/stringDict.js";
4
4
  * @category Workflow
5
5
  */
6
6
  export declare class ExecutionFile {
7
- /** File name. */
7
+ /**
8
+ * File name.
9
+ */
8
10
  name: string | null;
9
- /** Optional alias for the fil. */
11
+ /**
12
+ * Optional alias for the file.
13
+ */
10
14
  alias: string | null;
11
15
  constructor(jsonResponse: StringDict);
12
16
  }
@@ -1,9 +1,17 @@
1
- /** Execution priority levels available for workflow requests. */
1
+ /**
2
+ * Execution priority levels available for workflow requests.
3
+ */
2
4
  export declare enum ExecutionPriority {
3
- /** Low-priority background processing. */
5
+ /**
6
+ * Low-priority background processing.
7
+ */
4
8
  low = "low",
5
- /** Standard processing priority. */
9
+ /**
10
+ * Standard processing priority.
11
+ */
6
12
  medium = "medium",
7
- /** High-priority processing. */
13
+ /**
14
+ * High-priority processing.
15
+ */
8
16
  high = "high"
9
17
  }
@@ -1,10 +1,18 @@
1
- /** Execution priority levels available for workflow requests. */
1
+ /**
2
+ * Execution priority levels available for workflow requests.
3
+ */
2
4
  export var ExecutionPriority;
3
5
  (function (ExecutionPriority) {
4
- /** Low-priority background processing. */
6
+ /**
7
+ * Low-priority background processing.
8
+ */
5
9
  ExecutionPriority["low"] = "low";
6
- /** Standard processing priority. */
10
+ /**
11
+ * Standard processing priority.
12
+ */
7
13
  ExecutionPriority["medium"] = "medium";
8
- /** High-priority processing. */
14
+ /**
15
+ * High-priority processing.
16
+ */
9
17
  ExecutionPriority["high"] = "high";
10
18
  })(ExecutionPriority || (ExecutionPriority = {}));
@@ -1,9 +1,13 @@
1
- import { PositionField } from "../../standard/position.js";
2
1
  import { StringDict } from "../../../../parsing/stringDict.js";
2
+ import { PositionField } from "../../standard/position.js";
3
3
  import { ExtraField } from "./extras.js";
4
- /** Cropper extra payload returned by compatible APIs. */
4
+ /**
5
+ * Cropper extra payload returned by compatible APIs.
6
+ */
5
7
  export declare class CropperExtra extends ExtraField {
6
- /** Cropped regions detected on the page. */
8
+ /**
9
+ * Cropped regions detected on the page.
10
+ */
7
11
  cropping: PositionField[];
8
12
  constructor(rawPrediction: StringDict, pageId?: number);
9
13
  /**
@@ -1,12 +1,15 @@
1
1
  import { PositionField } from "../../standard/position.js";
2
- // eslint-disable-next-line no-restricted-imports
3
2
  import { cleanOutString } from "../summaryHelper.js";
4
3
  import { ExtraField } from "./extras.js";
5
- /** Cropper extra payload returned by compatible APIs. */
4
+ /**
5
+ * Cropper extra payload returned by compatible APIs.
6
+ */
6
7
  export class CropperExtra extends ExtraField {
7
8
  constructor(rawPrediction, pageId) {
8
9
  super();
9
- /** Cropped regions detected on the page. */
10
+ /**
11
+ * Cropped regions detected on the page.
12
+ */
10
13
  this.cropping = [];
11
14
  if (rawPrediction["cropping"] !== undefined) {
12
15
  rawPrediction["cropping"].forEach((crop) => {
@@ -1,12 +1,18 @@
1
- /** Base class for optional extras attached to predictions. */
1
+ /**
2
+ * Base class for optional extras attached to predictions.
3
+ */
2
4
  export declare abstract class ExtraField {
3
5
  }
4
6
  interface ExtraDict<T extends ExtraField> {
5
7
  [key: string]: T | (() => string);
6
8
  }
7
- /** Dictionary-like container for extra fields. */
9
+ /**
10
+ * Dictionary-like container for extra fields.
11
+ */
8
12
  export declare class Extras<ExtraT extends ExtraField = ExtraField> implements ExtraDict<ExtraT> {
9
- /** Dynamic map of extra values keyed by extra name. */
13
+ /**
14
+ * Dynamic map of extra values keyed by extra name.
15
+ */
10
16
  [key: string]: ExtraT | (() => string);
11
17
  constructor(fields: Record<string, ExtraT>);
12
18
  /**
@@ -1,7 +1,11 @@
1
- /** Base class for optional extras attached to predictions. */
1
+ /**
2
+ * Base class for optional extras attached to predictions.
3
+ */
2
4
  export class ExtraField {
3
5
  }
4
- /** Dictionary-like container for extra fields. */
6
+ /**
7
+ * Dictionary-like container for extra fields.
8
+ */
5
9
  export class Extras {
6
10
  constructor(fields) {
7
11
  if (Object.keys(fields).length > 0) {
@@ -1,10 +1,16 @@
1
1
  import { StringDict } from "../../../../parsing/stringDict.js";
2
2
  import { ExtraField } from "./extras.js";
3
- /** Full-text OCR extra payload returned by compatible APIs. */
3
+ /**
4
+ * Full-text OCR extra payload returned by compatible APIs.
5
+ */
4
6
  export declare class FullTextOcrExtra extends ExtraField {
5
- /** Concatenated OCR content. */
7
+ /**
8
+ * Concatenated OCR content.
9
+ */
6
10
  content?: string;
7
- /** OCR language hints associated with the content. */
11
+ /**
12
+ * OCR language hints associated with the content.
13
+ */
8
14
  languages?: string;
9
15
  constructor(rawPrediction: StringDict);
10
16
  /**
@@ -1,5 +1,7 @@
1
1
  import { ExtraField } from "./extras.js";
2
- /** Full-text OCR extra payload returned by compatible APIs. */
2
+ /**
3
+ * Full-text OCR extra payload returned by compatible APIs.
4
+ */
3
5
  export class FullTextOcrExtra extends ExtraField {
4
6
  constructor(rawPrediction) {
5
7
  super();
@@ -1,6 +1,8 @@
1
1
  import { ExtraField } from "./extras.js";
2
2
  import { StringDict } from "../../../../parsing/stringDict.js";
3
- /** RAG extra payload returned by compatible APIs. */
3
+ /**
4
+ * RAG extra payload returned by compatible APIs.
5
+ */
4
6
  export declare class RAGExtra extends ExtraField {
5
7
  /**
6
8
  * ID reference of the document matched by the Retrieval-Augmented Generation.
@@ -1,5 +1,7 @@
1
1
  import { ExtraField } from "./extras.js";
2
- /** RAG extra payload returned by compatible APIs. */
2
+ /**
3
+ * RAG extra payload returned by compatible APIs.
4
+ */
3
5
  export class RAGExtra extends ExtraField {
4
6
  constructor(rawPrediction) {
5
7
  super();
@@ -6,7 +6,9 @@ import { StringDict } from "../../../../parsing/stringDict.js";
6
6
  * @category Synchronous
7
7
  */
8
8
  export declare class FeedbackResponse extends ApiResponse {
9
- /** A document feedback response. */
9
+ /**
10
+ * A document feedback response.
11
+ */
10
12
  feedback: StringDict;
11
13
  /**
12
14
  * @param serverResponse JSON response from the server.
@@ -1,4 +1,3 @@
1
- // eslint-disable-next-line no-restricted-imports
2
1
  import { ApiResponse } from "../apiResponse.js";
3
2
  /**
4
3
  * Wrapper for feedback response.
@@ -12,25 +12,41 @@ import { Extras } from "./extras/index.js";
12
12
  * if a document's pages have specific implementation.
13
13
  */
14
14
  export declare abstract class Inference<DocT extends Prediction = Prediction, PageT extends DocT = DocT> {
15
- /** A boolean denoting whether a given inference result was rotated. */
15
+ /**
16
+ * A boolean denoting whether a given inference result was rotated.
17
+ */
16
18
  isRotationApplied?: boolean;
17
- /** Name and version of a given product. */
19
+ /**
20
+ * Name and version of a given product.
21
+ */
18
22
  product: Product;
19
- /** Wrapper for a document's pages prediction. */
23
+ /**
24
+ * Wrapper for a document's pages prediction.
25
+ */
20
26
  pages: Page<PageT>[];
21
- /** A document's top-level `Prediction`. */
27
+ /**
28
+ * A document's top-level `Prediction`.
29
+ */
22
30
  prediction: DocT;
23
- /** Extraneous fields relating to specific tools for some APIs. */
31
+ /**
32
+ * Extraneous fields relating to specific tools for some APIs.
33
+ */
24
34
  extras?: Extras;
25
- /** Name of a document's endpoint. Has a default value for OTS APIs. */
35
+ /**
36
+ * Name of a document's endpoint. Has a default value for OTS APIs.
37
+ */
26
38
  endpointName?: string;
27
- /** A document's version. Has a default value for OTS APIs. */
39
+ /**
40
+ * A document's version. Has a default value for OTS APIs.
41
+ */
28
42
  endpointVersion?: string;
29
43
  constructor(rawPrediction: StringDict);
30
44
  /**
31
45
  * Default string representation.
32
46
  */
33
- /** Returns a human-readable representation of the inference payload. */
47
+ /**
48
+ * Returns a human-readable representation of the inference payload.
49
+ */
34
50
  toString(): string;
35
51
  /**
36
52
  * Takes in an input string and replaces line breaks with `\n`.
@@ -10,7 +10,9 @@ import { MindeeConfigurationError } from "../../../errors/index.js";
10
10
  */
11
11
  export class Inference {
12
12
  constructor(rawPrediction) {
13
- /** Wrapper for a document's pages prediction. */
13
+ /**
14
+ * Wrapper for a document's pages prediction.
15
+ */
14
16
  this.pages = [];
15
17
  this.isRotationApplied = rawPrediction?.is_rotation_applied ?? undefined;
16
18
  this.product = rawPrediction?.product;
@@ -36,7 +38,9 @@ export class Inference {
36
38
  /**
37
39
  * Default string representation.
38
40
  */
39
- /** Returns a human-readable representation of the inference payload. */
41
+ /**
42
+ * Returns a human-readable representation of the inference payload.
43
+ */
40
44
  toString() {
41
45
  let pages = "";
42
46
  if (this.pages.toString().length > 0) {
@@ -1,7 +1,9 @@
1
1
  import { StringDict } from "../../../parsing/stringDict.js";
2
2
  import { OcrPage } from "./ocrPage.js";
3
3
  export declare class MvisionV1 {
4
- /** List of words found on the page. */
4
+ /**
5
+ * List of words found on the page.
6
+ */
5
7
  pages: OcrPage[];
6
8
  constructor(rawPrediction: StringDict);
7
9
  /**
@@ -1,7 +1,9 @@
1
1
  import { OcrPage } from "./ocrPage.js";
2
2
  export class MvisionV1 {
3
3
  constructor(rawPrediction) {
4
- /** List of words found on the page. */
4
+ /**
5
+ * List of words found on the page.
6
+ */
5
7
  this.pages = [];
6
8
  rawPrediction["pages"].map((page) => {
7
9
  this.pages.push(new OcrPage(page));
@@ -1,7 +1,9 @@
1
1
  import { StringDict } from "../../../parsing/stringDict.js";
2
2
  import { MvisionV1 } from "./mvisionV1.js";
3
3
  export declare class Ocr {
4
- /** Default Mindee OCR */
4
+ /**
5
+ * Default Mindee OCR
6
+ */
5
7
  mVisionV1: MvisionV1;
6
8
  constructor(rawPrediction: StringDict);
7
9
  /**
@@ -2,9 +2,13 @@ import { Word } from "../standard/index.js";
2
2
  import { StringDict } from "../../../parsing/stringDict.js";
3
3
  export declare class OcrPage {
4
4
  #private;
5
- /** Flat list of all words read */
5
+ /**
6
+ * Flat list of all words read
7
+ */
6
8
  allWords: Word[];
7
- /** List of words by which line they are on */
9
+ /**
10
+ * List of words by which line they are on
11
+ */
8
12
  allLines: Word[][];
9
13
  constructor(rawPrediction: StringDict);
10
14
  /**
@@ -9,9 +9,13 @@ import { Word } from "../standard/index.js";
9
9
  export class OcrPage {
10
10
  constructor(rawPrediction) {
11
11
  _OcrPage_instances.add(this);
12
- /** Flat list of all words read */
12
+ /**
13
+ * Flat list of all words read
14
+ */
13
15
  this.allWords = [];
14
- /** List of words by which line they are on */
16
+ /**
17
+ * List of words by which line they are on
18
+ */
15
19
  this.allLines = [];
16
20
  const allWords = [];
17
21
  if (rawPrediction["all_words"]) {
@@ -6,9 +6,13 @@ interface OrientationFieldConstructor extends BaseFieldConstructor {
6
6
  * The clockwise rotation to apply (in degrees) to make the image upright.
7
7
  */
8
8
  export declare class OrientationField extends BaseField {
9
- /** Degrees of the rotation. */
9
+ /**
10
+ * Degrees of the rotation.
11
+ */
10
12
  value: number;
11
- /** Page id. */
13
+ /**
14
+ * Page id.
15
+ */
12
16
  pageId: number;
13
17
  /**
14
18
  * @param {OrientationFieldConstructor} constructor Constructor parameters.
@@ -8,13 +8,21 @@ import { StringDict } from "../../../parsing/stringDict.js";
8
8
  * @typeParam T an extension of an `Prediction`. Mandatory in order to properly create a page-level prediction.
9
9
  */
10
10
  export declare class Page<T extends Prediction> {
11
- /** The page's index (identifier). */
11
+ /**
12
+ * The page's index (identifier).
13
+ */
12
14
  id: number;
13
- /** The page's orientation */
15
+ /**
16
+ * The page's orientation
17
+ */
14
18
  orientation?: OrientationField;
15
- /** A page-level prediction. Can either be specific to pages or identical to the document prediction. */
19
+ /**
20
+ * A page-level prediction. Can either be specific to pages or identical to the document prediction.
21
+ */
16
22
  prediction: T;
17
- /** Potential `Extras` fields sent back along with the prediction. */
23
+ /**
24
+ * Potential `Extras` fields sent back along with the prediction.
25
+ */
18
26
  extras?: Extras;
19
27
  /**
20
28
  * @param predictionType constructor signature for an inference.
@@ -8,7 +8,9 @@ import { StringDict } from "../../../parsing/stringDict.js";
8
8
  * @category Synchronous
9
9
  */
10
10
  export declare class PredictResponse<T extends Inference> extends ApiResponse {
11
- /** A document prediction response. */
11
+ /**
12
+ * A document prediction response.
13
+ */
12
14
  document: Document<T>;
13
15
  /**
14
16
  *
@@ -1,3 +1,5 @@
1
- /** Marker base type for v1 prediction payload models. */
1
+ /**
2
+ * Marker base type for v1 prediction payload models.
3
+ */
2
4
  export declare class Prediction {
3
5
  }
@@ -1,3 +1,5 @@
1
- /** Marker base type for v1 prediction payload models. */
1
+ /**
2
+ * Marker base type for v1 prediction payload models.
3
+ */
2
4
  export class Prediction {
3
5
  }
@@ -9,9 +9,13 @@ export interface GeneratedListFieldConstructor {
9
9
  * A list of values or objects, used in generated APIs.
10
10
  */
11
11
  export declare class GeneratedListField {
12
- /** Id of the page the object was found on. */
12
+ /**
13
+ * Id of the page the object was found on.
14
+ */
13
15
  pageId?: number;
14
- /** List of word values. */
16
+ /**
17
+ * List of word values.
18
+ */
15
19
  values: Array<GeneratedObjectField | StringField>;
16
20
  constructor({ prediction, pageId, }: GeneratedListFieldConstructor);
17
21
  /**