mindee 4.12.0 → 5.0.0.beta1

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 (970) hide show
  1. checksums.yaml +4 -4
  2. data/.editorconfig +24 -0
  3. data/.gitignore +2 -0
  4. data/.pre-commit-config.yaml +36 -0
  5. data/.rubocop.yml +4 -3
  6. data/CHANGELOG.md +55 -1
  7. data/CONTRIBUTING.md +17 -0
  8. data/Gemfile +9 -1
  9. data/README.md +7 -7
  10. data/Rakefile +21 -15
  11. data/Steepfile +0 -1
  12. data/bin/mindee.rb +19 -118
  13. data/bin/v1/parser.rb +153 -0
  14. data/bin/v1/products.rb +88 -0
  15. data/bin/v2/parser.rb +235 -0
  16. data/bin/v2/products.rb +34 -0
  17. data/docs/code_samples/bank_account_details_v1.txt +2 -2
  18. data/docs/code_samples/bank_account_details_v2.txt +2 -2
  19. data/docs/code_samples/bank_statement_fr_v2_async.txt +2 -2
  20. data/docs/code_samples/barcode_reader_v1.txt +2 -2
  21. data/docs/code_samples/cropper_v1.txt +2 -2
  22. data/docs/code_samples/default.txt +2 -2
  23. data/docs/code_samples/default_async.txt +2 -3
  24. data/docs/code_samples/expense_receipts_v5.txt +2 -2
  25. data/docs/code_samples/expense_receipts_v5_async.txt +2 -2
  26. data/docs/code_samples/financial_document_v1.txt +2 -2
  27. data/docs/code_samples/financial_document_v1_async.txt +2 -2
  28. data/docs/code_samples/idcard_fr_v1.txt +2 -2
  29. data/docs/code_samples/idcard_fr_v2.txt +2 -2
  30. data/docs/code_samples/international_id_v2_async.txt +2 -2
  31. data/docs/code_samples/invoice_splitter_v1_async.txt +2 -2
  32. data/docs/code_samples/invoices_v4.txt +2 -2
  33. data/docs/code_samples/invoices_v4_async.txt +2 -2
  34. data/docs/code_samples/multi_receipts_detector_v1.txt +2 -2
  35. data/docs/code_samples/passport_v1.txt +2 -2
  36. data/docs/code_samples/resume_v1_async.txt +2 -2
  37. data/docs/code_samples/v2_classification.txt +30 -0
  38. data/docs/code_samples/v2_crop.txt +30 -0
  39. data/docs/code_samples/v2_extraction.txt +42 -0
  40. data/docs/code_samples/v2_extraction_webhook.txt +45 -0
  41. data/docs/code_samples/v2_ocr.txt +30 -0
  42. data/docs/code_samples/v2_split.txt +30 -0
  43. data/docs/code_samples/workflow_execution.txt +2 -2
  44. data/docs/code_samples/workflow_polling.txt +2 -3
  45. data/examples/auto_invoice_splitter_extraction.rb +6 -6
  46. data/examples/auto_multi_receipts_detector_extraction.rb +4 -4
  47. data/lib/mindee/dependency.rb +29 -0
  48. data/lib/mindee/error/mindee_error.rb +17 -0
  49. data/lib/mindee/error/mindee_http_error.rb +36 -0
  50. data/lib/mindee/error/mindee_http_error_v2.rb +45 -0
  51. data/lib/mindee/error/mindee_http_unknown_error_v2.rb +18 -0
  52. data/lib/mindee/error/mindee_input_error.rb +30 -0
  53. data/lib/mindee/error.rb +6 -0
  54. data/lib/mindee/geometry/point.rb +5 -0
  55. data/lib/mindee/geometry/polygon.rb +6 -1
  56. data/lib/mindee/http/.rubocop.yml +0 -1
  57. data/lib/mindee/http/http_error_handler.rb +7 -7
  58. data/lib/mindee/http/response_validation.rb +3 -2
  59. data/lib/mindee/http.rb +0 -4
  60. data/lib/mindee/image/extracted_image.rb +25 -12
  61. data/lib/mindee/image/image_extractor.rb +4 -2
  62. data/lib/mindee/image/image_utils.rb +3 -3
  63. data/lib/mindee/input/base_parameters.rb +149 -0
  64. data/lib/mindee/input/local_response.rb +9 -10
  65. data/lib/mindee/input/sources/local_input_source.rb +18 -14
  66. data/lib/mindee/input/sources/path_input_source.rb +1 -1
  67. data/lib/mindee/input/sources/url_input_source.rb +4 -4
  68. data/lib/mindee/input.rb +0 -2
  69. data/lib/mindee/logging/logger.rb +9 -1
  70. data/lib/mindee/page_options.rb +1 -1
  71. data/lib/mindee/pdf/extracted_pdf.rb +55 -45
  72. data/lib/mindee/pdf/pdf_compressor.rb +2 -0
  73. data/lib/mindee/pdf/pdf_extractor.rb +95 -94
  74. data/lib/mindee/pdf/pdf_processor.rb +6 -1
  75. data/lib/mindee/pdf/pdf_tools.rb +19 -0
  76. data/lib/mindee/v1/client.rb +490 -0
  77. data/lib/mindee/v1/extraction/multi_receipts_extractor.rb +32 -0
  78. data/lib/mindee/v1/http/.rubocop.yml +7 -0
  79. data/lib/mindee/v1/http/endpoint.rb +221 -0
  80. data/lib/mindee/v1/http/workflow_endpoint.rb +93 -0
  81. data/lib/mindee/v1/http.rb +4 -0
  82. data/lib/mindee/v1/parsing/common/api_request.rb +38 -0
  83. data/lib/mindee/v1/parsing/common/api_response.rb +63 -0
  84. data/lib/mindee/v1/parsing/common/document.rb +86 -0
  85. data/lib/mindee/v1/parsing/common/execution.rb +78 -0
  86. data/lib/mindee/v1/parsing/common/execution_file.rb +26 -0
  87. data/lib/mindee/v1/parsing/common/execution_priority.rb +38 -0
  88. data/lib/mindee/v1/parsing/common/extras/cropper_extra.rb +32 -0
  89. data/lib/mindee/v1/parsing/common/extras/extras.rb +62 -0
  90. data/lib/mindee/v1/parsing/common/extras/full_text_ocr_extra.rb +35 -0
  91. data/lib/mindee/v1/parsing/common/extras/rag_extra.rb +28 -0
  92. data/lib/mindee/v1/parsing/common/inference.rb +69 -0
  93. data/lib/mindee/v1/parsing/common/job.rb +48 -0
  94. data/lib/mindee/v1/parsing/common/ocr/mvision_v1.rb +52 -0
  95. data/lib/mindee/v1/parsing/common/ocr/ocr.rb +180 -0
  96. data/lib/mindee/v1/parsing/common/orientation.rb +28 -0
  97. data/lib/mindee/v1/parsing/common/page.rb +49 -0
  98. data/lib/mindee/v1/parsing/common/prediction.rb +19 -0
  99. data/lib/mindee/v1/parsing/common/product.rb +26 -0
  100. data/lib/mindee/v1/parsing/common/workflow_response.rb +30 -0
  101. data/lib/mindee/v1/parsing/standard/abstract_field.rb +74 -0
  102. data/lib/mindee/v1/parsing/standard/address_field.rb +51 -0
  103. data/lib/mindee/v1/parsing/standard/amount_field.rb +28 -0
  104. data/lib/mindee/v1/parsing/standard/base_field.rb +30 -0
  105. data/lib/mindee/v1/parsing/standard/boolean_field.rb +29 -0
  106. data/lib/mindee/v1/parsing/standard/classification_field.rb +18 -0
  107. data/lib/mindee/v1/parsing/standard/company_registration_field.rb +45 -0
  108. data/lib/mindee/v1/parsing/standard/date_field.rb +40 -0
  109. data/lib/mindee/v1/parsing/standard/feature_field.rb +26 -0
  110. data/lib/mindee/v1/parsing/standard/locale_field.rb +52 -0
  111. data/lib/mindee/v1/parsing/standard/payment_details_field.rb +44 -0
  112. data/lib/mindee/v1/parsing/standard/position_field.rb +61 -0
  113. data/lib/mindee/v1/parsing/standard/string_field.rb +26 -0
  114. data/lib/mindee/v1/parsing/standard/tax_field.rb +110 -0
  115. data/lib/mindee/v1/parsing/universal/universal_list_field.rb +60 -0
  116. data/lib/mindee/v1/parsing/universal/universal_object_field.rb +123 -0
  117. data/lib/mindee/v1/product/.rubocop.yml +12 -0
  118. data/lib/mindee/v1/product/barcode_reader/barcode_reader_v1.rb +47 -0
  119. data/lib/mindee/v1/product/barcode_reader/barcode_reader_v1_document.rb +47 -0
  120. data/lib/mindee/v1/product/barcode_reader/barcode_reader_v1_page.rb +38 -0
  121. data/lib/mindee/v1/product/cropper/cropper_v1.rb +47 -0
  122. data/lib/mindee/v1/product/cropper/cropper_v1_document.rb +15 -0
  123. data/lib/mindee/v1/product/cropper/cropper_v1_page.rb +55 -0
  124. data/lib/mindee/v1/product/financial_document/financial_document_v1.rb +47 -0
  125. data/lib/mindee/v1/product/financial_document/financial_document_v1_document.rb +329 -0
  126. data/lib/mindee/v1/product/financial_document/financial_document_v1_line_item.rb +124 -0
  127. data/lib/mindee/v1/product/financial_document/financial_document_v1_line_items.rb +64 -0
  128. data/lib/mindee/v1/product/financial_document/financial_document_v1_page.rb +38 -0
  129. data/lib/mindee/v1/product/fr/bank_account_details/bank_account_details_v1.rb +49 -0
  130. data/lib/mindee/v1/product/fr/bank_account_details/bank_account_details_v1_document.rb +49 -0
  131. data/lib/mindee/v1/product/fr/bank_account_details/bank_account_details_v1_page.rb +40 -0
  132. data/lib/mindee/v1/product/fr/bank_account_details/bank_account_details_v2.rb +49 -0
  133. data/lib/mindee/v1/product/fr/bank_account_details/bank_account_details_v2_bban.rb +63 -0
  134. data/lib/mindee/v1/product/fr/bank_account_details/bank_account_details_v2_document.rb +60 -0
  135. data/lib/mindee/v1/product/fr/bank_account_details/bank_account_details_v2_page.rb +40 -0
  136. data/lib/mindee/v1/product/fr/bank_statement/bank_statement_v2.rb +49 -0
  137. data/lib/mindee/v1/product/fr/bank_statement/bank_statement_v2_document.rb +169 -0
  138. data/lib/mindee/v1/product/fr/bank_statement/bank_statement_v2_page.rb +40 -0
  139. data/lib/mindee/v1/product/fr/bank_statement/bank_statement_v2_transaction.rb +78 -0
  140. data/lib/mindee/v1/product/fr/bank_statement/bank_statement_v2_transactions.rb +56 -0
  141. data/lib/mindee/v1/product/fr/id_card/id_card_v1.rb +49 -0
  142. data/lib/mindee/v1/product/fr/id_card/id_card_v1_document.rb +106 -0
  143. data/lib/mindee/v1/product/fr/id_card/id_card_v1_page.rb +57 -0
  144. data/lib/mindee/v1/product/fr/id_card/id_card_v2.rb +49 -0
  145. data/lib/mindee/v1/product/fr/id_card/id_card_v2_document.rb +143 -0
  146. data/lib/mindee/v1/product/fr/id_card/id_card_v2_page.rb +65 -0
  147. data/lib/mindee/v1/product/international_id/international_id_v2.rb +47 -0
  148. data/lib/mindee/v1/product/international_id/international_id_v2_document.rb +164 -0
  149. data/lib/mindee/v1/product/international_id/international_id_v2_page.rb +38 -0
  150. data/lib/mindee/v1/product/invoice/invoice_v4.rb +47 -0
  151. data/lib/mindee/v1/product/invoice/invoice_v4_document.rb +300 -0
  152. data/lib/mindee/v1/product/invoice/invoice_v4_line_item.rb +124 -0
  153. data/lib/mindee/v1/product/invoice/invoice_v4_line_items.rb +64 -0
  154. data/lib/mindee/v1/product/invoice/invoice_v4_page.rb +38 -0
  155. data/lib/mindee/v1/product/invoice_splitter/invoice_splitter_v1.rb +47 -0
  156. data/lib/mindee/v1/product/invoice_splitter/invoice_splitter_v1_document.rb +66 -0
  157. data/lib/mindee/v1/product/invoice_splitter/invoice_splitter_v1_invoice_page_group.rb +58 -0
  158. data/lib/mindee/v1/product/invoice_splitter/invoice_splitter_v1_invoice_page_groups.rb +50 -0
  159. data/lib/mindee/v1/product/invoice_splitter/invoice_splitter_v1_page.rb +38 -0
  160. data/lib/mindee/v1/product/multi_receipts_detector/multi_receipts_detector_v1.rb +47 -0
  161. data/lib/mindee/v1/product/multi_receipts_detector/multi_receipts_detector_v1_document.rb +38 -0
  162. data/lib/mindee/v1/product/multi_receipts_detector/multi_receipts_detector_v1_page.rb +38 -0
  163. data/lib/mindee/v1/product/passport/passport_v1.rb +47 -0
  164. data/lib/mindee/v1/product/passport/passport_v1_document.rb +112 -0
  165. data/lib/mindee/v1/product/passport/passport_v1_page.rb +38 -0
  166. data/lib/mindee/v1/product/receipt/receipt_v5.rb +47 -0
  167. data/lib/mindee/v1/product/receipt/receipt_v5_document.rb +187 -0
  168. data/lib/mindee/v1/product/receipt/receipt_v5_line_item.rb +88 -0
  169. data/lib/mindee/v1/product/receipt/receipt_v5_line_items.rb +56 -0
  170. data/lib/mindee/v1/product/receipt/receipt_v5_page.rb +38 -0
  171. data/lib/mindee/v1/product/resume/resume_v1.rb +47 -0
  172. data/lib/mindee/v1/product/resume/resume_v1_certificate.rb +82 -0
  173. data/lib/mindee/v1/product/resume/resume_v1_certificates.rb +60 -0
  174. data/lib/mindee/v1/product/resume/resume_v1_document.rb +340 -0
  175. data/lib/mindee/v1/product/resume/resume_v1_education.rb +106 -0
  176. data/lib/mindee/v1/product/resume/resume_v1_educations.rb +66 -0
  177. data/lib/mindee/v1/product/resume/resume_v1_language.rb +66 -0
  178. data/lib/mindee/v1/product/resume/resume_v1_languages.rb +56 -0
  179. data/lib/mindee/v1/product/resume/resume_v1_page.rb +38 -0
  180. data/lib/mindee/v1/product/resume/resume_v1_professional_experience.rb +122 -0
  181. data/lib/mindee/v1/product/resume/resume_v1_professional_experiences.rb +70 -0
  182. data/lib/mindee/v1/product/resume/resume_v1_social_networks_url.rb +66 -0
  183. data/lib/mindee/v1/product/resume/resume_v1_social_networks_urls.rb +56 -0
  184. data/lib/mindee/v1/product/universal/universal.rb +48 -0
  185. data/lib/mindee/v1/product/universal/universal_document.rb +35 -0
  186. data/lib/mindee/v1/product/universal/universal_page.rb +54 -0
  187. data/lib/mindee/v1/product/universal/universal_prediction.rb +128 -0
  188. data/lib/mindee/v1/product.rb +18 -0
  189. data/lib/mindee/v1.rb +7 -0
  190. data/lib/mindee/v2/client.rb +132 -0
  191. data/lib/mindee/v2/file_operation/crop.rb +51 -0
  192. data/lib/mindee/v2/file_operation/crop_files.rb +25 -0
  193. data/lib/mindee/v2/file_operation/split.rb +37 -0
  194. data/lib/mindee/v2/file_operation/split_files.rb +25 -0
  195. data/lib/mindee/v2/file_operation.rb +6 -0
  196. data/lib/mindee/v2/http/.rubocop.yml +7 -0
  197. data/lib/mindee/v2/http/api_v2_settings.rb +65 -0
  198. data/lib/mindee/v2/http/mindee_api_v2.rb +230 -0
  199. data/lib/mindee/v2/http.rb +4 -0
  200. data/lib/mindee/v2/parsing/base_inference.rb +44 -0
  201. data/lib/mindee/v2/parsing/base_response.rb +15 -0
  202. data/lib/mindee/v2/parsing/common_response.rb +20 -0
  203. data/lib/mindee/v2/parsing/error_item.rb +21 -0
  204. data/lib/mindee/v2/parsing/error_response.rb +51 -0
  205. data/lib/mindee/v2/parsing/field/base_field.rb +63 -0
  206. data/lib/mindee/v2/parsing/field/field_confidence.rb +128 -0
  207. data/lib/mindee/v2/parsing/field/field_location.rb +33 -0
  208. data/lib/mindee/v2/parsing/field/inference_fields.rb +105 -0
  209. data/lib/mindee/v2/parsing/field/list_field.rb +79 -0
  210. data/lib/mindee/v2/parsing/field/object_field.rb +138 -0
  211. data/lib/mindee/v2/parsing/field/simple_field.rb +60 -0
  212. data/lib/mindee/v2/parsing/inference_active_options.rb +67 -0
  213. data/lib/mindee/v2/parsing/inference_file.rb +38 -0
  214. data/lib/mindee/v2/parsing/inference_job.rb +25 -0
  215. data/lib/mindee/v2/parsing/inference_model.rb +30 -0
  216. data/lib/mindee/v2/parsing/job.rb +93 -0
  217. data/lib/mindee/v2/parsing/job_response.rb +30 -0
  218. data/lib/mindee/v2/parsing/job_webhook.rb +59 -0
  219. data/lib/mindee/v2/parsing/rag_metadata.rb +17 -0
  220. data/lib/mindee/v2/parsing/raw_text.rb +27 -0
  221. data/lib/mindee/v2/parsing/raw_text_page.rb +24 -0
  222. data/lib/mindee/v2/parsing/search/pagination_metadata.rb +44 -0
  223. data/lib/mindee/v2/parsing/search/search_model.rb +38 -0
  224. data/lib/mindee/v2/parsing/search/search_models.rb +34 -0
  225. data/lib/mindee/v2/parsing/search/search_response.rb +38 -0
  226. data/lib/mindee/v2/parsing/search.rb +6 -0
  227. data/lib/mindee/v2/parsing.rb +16 -0
  228. data/lib/mindee/v2/product/base_product.rb +28 -0
  229. data/lib/mindee/v2/product/classification/classification.rb +20 -0
  230. data/lib/mindee/v2/product/classification/classification_classifier.rb +25 -0
  231. data/lib/mindee/v2/product/classification/classification_inference.rb +35 -0
  232. data/lib/mindee/v2/product/classification/classification_response.rb +32 -0
  233. data/lib/mindee/v2/product/classification/classification_result.rb +27 -0
  234. data/lib/mindee/v2/product/classification/params/classification_parameters.rb +47 -0
  235. data/lib/mindee/v2/product/crop/crop.rb +20 -0
  236. data/lib/mindee/v2/product/crop/crop_inference.rb +34 -0
  237. data/lib/mindee/v2/product/crop/crop_item.rb +39 -0
  238. data/lib/mindee/v2/product/crop/crop_response.rb +40 -0
  239. data/lib/mindee/v2/product/crop/crop_result.rb +34 -0
  240. data/lib/mindee/v2/product/crop/params/crop_parameters.rb +47 -0
  241. data/lib/mindee/v2/product/extraction/extraction.rb +21 -0
  242. data/lib/mindee/v2/product/extraction/extraction_inference.rb +40 -0
  243. data/lib/mindee/v2/product/extraction/extraction_response.rb +32 -0
  244. data/lib/mindee/v2/product/extraction/extraction_result.rb +44 -0
  245. data/lib/mindee/v2/product/extraction/params/data_schema.rb +51 -0
  246. data/lib/mindee/v2/product/extraction/params/data_schema_field.rb +69 -0
  247. data/lib/mindee/v2/product/extraction/params/data_schema_replace.rb +39 -0
  248. data/lib/mindee/v2/product/extraction/params/extraction_parameters.rb +125 -0
  249. data/lib/mindee/v2/product/ocr/ocr.rb +20 -0
  250. data/lib/mindee/v2/product/ocr/ocr_inference.rb +34 -0
  251. data/lib/mindee/v2/product/ocr/ocr_page.rb +33 -0
  252. data/lib/mindee/v2/product/ocr/ocr_response.rb +32 -0
  253. data/lib/mindee/v2/product/ocr/ocr_result.rb +34 -0
  254. data/lib/mindee/v2/product/ocr/ocr_word.rb +29 -0
  255. data/lib/mindee/v2/product/ocr/params/ocr_parameters.rb +47 -0
  256. data/lib/mindee/v2/product/split/params/split_parameters.rb +48 -0
  257. data/lib/mindee/v2/product/split/split.rb +19 -0
  258. data/lib/mindee/v2/product/split/split_inference.rb +34 -0
  259. data/lib/mindee/v2/product/split/split_range.rb +38 -0
  260. data/lib/mindee/v2/product/split/split_response.rb +40 -0
  261. data/lib/mindee/v2/product/split/split_result.rb +34 -0
  262. data/lib/mindee/v2/product.rb +7 -0
  263. data/lib/mindee/v2.rb +7 -0
  264. data/lib/mindee/version.rb +1 -1
  265. data/lib/mindee.rb +66 -23
  266. data/mindee-lite.gemspec +36 -0
  267. data/mindee.gemspec +13 -13
  268. data/sig/custom/marcel.rbs +1 -1
  269. data/sig/custom/net_http.rbs +1 -1
  270. data/sig/custom/origami.rbs +1 -1
  271. data/sig/mindee/dependency.rbs +13 -0
  272. data/sig/mindee/error/mindee_error.rbs +13 -0
  273. data/sig/mindee/error/mindee_http_error.rbs +17 -0
  274. data/sig/mindee/error/mindee_http_error_v2.rbs +15 -0
  275. data/sig/mindee/error/mindee_http_unknown_error_v2.rbs +9 -0
  276. data/sig/mindee/error/mindee_input_error.rbs +18 -0
  277. data/sig/mindee/geometry/point.rbs +2 -0
  278. data/sig/mindee/geometry/polygon.rbs +2 -0
  279. data/sig/mindee/http/http_error_handler.rbs +4 -4
  280. data/sig/mindee/image/extracted_image.rbs +8 -2
  281. data/sig/mindee/image/image_extractor.rbs +1 -1
  282. data/sig/mindee/input/base_parameters.rbs +35 -0
  283. data/sig/mindee/input/local_response.rbs +2 -2
  284. data/sig/mindee/input/sources/local_input_source.rbs +0 -1
  285. data/sig/mindee/pdf/extracted_pdf.rbs +11 -9
  286. data/sig/mindee/pdf/pdf_extractor.rbs +12 -10
  287. data/sig/mindee/pdf/pdf_tools.rbs +2 -0
  288. data/sig/mindee/v1/client.rbs +84 -0
  289. data/sig/mindee/v1/extraction/multi_receipts_extractor.rbs +8 -0
  290. data/sig/mindee/v1/http/endpoint.rbs +41 -0
  291. data/sig/mindee/v1/http/workflow_endpoint.rbs +22 -0
  292. data/sig/mindee/v1/parsing/common/api_request.rbs +22 -0
  293. data/sig/mindee/v1/parsing/common/api_response.rbs +31 -0
  294. data/sig/mindee/v1/parsing/common/document.rbs +32 -0
  295. data/sig/mindee/v1/parsing/common/execution.rbs +26 -0
  296. data/sig/mindee/v1/parsing/common/execution_file.rbs +16 -0
  297. data/sig/mindee/v1/parsing/common/execution_priority.rbs +16 -0
  298. data/sig/mindee/v1/parsing/common/extras/cropper_extra.rbs +18 -0
  299. data/sig/mindee/v1/parsing/common/extras/extras.rbs +24 -0
  300. data/sig/mindee/v1/parsing/common/extras/full_text_ocr_extra.rbs +22 -0
  301. data/sig/mindee/v1/parsing/common/extras/rag_extra.rbs +19 -0
  302. data/sig/mindee/v1/parsing/common/inference.rbs +31 -0
  303. data/sig/mindee/v1/parsing/common/job.rbs +24 -0
  304. data/sig/mindee/v1/parsing/common/ocr/mvision_v1.rbs +20 -0
  305. data/sig/mindee/v1/parsing/common/ocr/ocr.rbs +56 -0
  306. data/sig/mindee/v1/parsing/common/orientation.rbs +15 -0
  307. data/sig/mindee/v1/parsing/common/page.rbs +19 -0
  308. data/sig/mindee/v1/parsing/common/prediction.rbs +14 -0
  309. data/sig/mindee/v1/parsing/common/product.rbs +16 -0
  310. data/sig/mindee/v1/parsing/common/workflow_response.rbs +22 -0
  311. data/sig/mindee/v1/parsing/standard/abstract_field.rbs +30 -0
  312. data/sig/mindee/v1/parsing/standard/address_field.rbs +28 -0
  313. data/sig/mindee/v1/parsing/standard/amount_field.rbs +16 -0
  314. data/sig/mindee/v1/parsing/standard/base_field.rbs +16 -0
  315. data/sig/mindee/v1/parsing/standard/boolean_field.rbs +16 -0
  316. data/sig/mindee/v1/parsing/standard/classification_field.rbs +12 -0
  317. data/sig/mindee/v1/parsing/standard/company_registration_field.rbs +20 -0
  318. data/sig/mindee/v1/parsing/standard/date_field.rbs +20 -0
  319. data/sig/mindee/v1/parsing/standard/feature_field.rbs +12 -0
  320. data/sig/mindee/v1/parsing/standard/locale_field.rbs +24 -0
  321. data/sig/mindee/v1/parsing/standard/payment_details_field.rbs +19 -0
  322. data/sig/mindee/v1/parsing/standard/position_field.rbs +26 -0
  323. data/sig/mindee/v1/parsing/standard/string_field.rbs +16 -0
  324. data/sig/mindee/v1/parsing/standard/tax_field.rbs +33 -0
  325. data/sig/mindee/v1/parsing/universal/universal_list_field.rbs +21 -0
  326. data/sig/mindee/v1/parsing/universal/universal_object_field.rbs +38 -0
  327. data/sig/mindee/v1/product/barcode_reader/barcode_reader_v1.rbs +13 -0
  328. data/sig/mindee/v1/product/barcode_reader/barcode_reader_v1_document.rbs +16 -0
  329. data/sig/mindee/v1/product/barcode_reader/barcode_reader_v1_page.rbs +17 -0
  330. data/sig/mindee/v1/product/cropper/cropper_v1.rbs +13 -0
  331. data/sig/mindee/v1/product/cropper/cropper_v1_document.rbs +14 -0
  332. data/sig/mindee/v1/product/cropper/cropper_v1_page.rbs +19 -0
  333. data/sig/mindee/v1/product/financial_document/financial_document_v1.rbs +13 -0
  334. data/sig/mindee/v1/product/financial_document/financial_document_v1_document.rbs +49 -0
  335. data/sig/mindee/v1/product/financial_document/financial_document_v1_line_item.rbs +35 -0
  336. data/sig/mindee/v1/product/financial_document/financial_document_v1_line_items.rbs +15 -0
  337. data/sig/mindee/v1/product/financial_document/financial_document_v1_page.rbs +17 -0
  338. data/sig/mindee/v1/product/fr/bank_account_details/bank_account_details_v1.rbs +15 -0
  339. data/sig/mindee/v1/product/fr/bank_account_details/bank_account_details_v1_document.rbs +19 -0
  340. data/sig/mindee/v1/product/fr/bank_account_details/bank_account_details_v1_page.rbs +19 -0
  341. data/sig/mindee/v1/product/fr/bank_account_details/bank_account_details_v2.rbs +15 -0
  342. data/sig/mindee/v1/product/fr/bank_account_details/bank_account_details_v2_bban.rbs +25 -0
  343. data/sig/mindee/v1/product/fr/bank_account_details/bank_account_details_v2_document.rbs +20 -0
  344. data/sig/mindee/v1/product/fr/bank_account_details/bank_account_details_v2_page.rbs +19 -0
  345. data/sig/mindee/v1/product/fr/bank_statement/bank_statement_v2.rbs +15 -0
  346. data/sig/mindee/v1/product/fr/bank_statement/bank_statement_v2_document.rbs +31 -0
  347. data/sig/mindee/v1/product/fr/bank_statement/bank_statement_v2_page.rbs +19 -0
  348. data/sig/mindee/v1/product/fr/bank_statement/bank_statement_v2_transaction.rbs +27 -0
  349. data/sig/mindee/v1/product/fr/bank_statement/bank_statement_v2_transactions.rbs +17 -0
  350. data/sig/mindee/v1/product/fr/id_card/id_card_v1.rbs +15 -0
  351. data/sig/mindee/v1/product/fr/id_card/id_card_v1_document.rbs +26 -0
  352. data/sig/mindee/v1/product/fr/id_card/id_card_v1_page.rbs +20 -0
  353. data/sig/mindee/v1/product/fr/id_card/id_card_v2.rbs +15 -0
  354. data/sig/mindee/v1/product/fr/id_card/id_card_v2_document.rbs +31 -0
  355. data/sig/mindee/v1/product/fr/id_card/id_card_v2_page.rbs +21 -0
  356. data/sig/mindee/v1/product/international_id/international_id_v2.rbs +13 -0
  357. data/sig/mindee/v1/product/international_id/international_id_v2_document.rbs +31 -0
  358. data/sig/mindee/v1/product/international_id/international_id_v2_page.rbs +17 -0
  359. data/sig/mindee/v1/product/invoice/invoice_v4.rbs +13 -0
  360. data/sig/mindee/v1/product/invoice/invoice_v4_document.rbs +45 -0
  361. data/sig/mindee/v1/product/invoice/invoice_v4_line_item.rbs +35 -0
  362. data/sig/mindee/v1/product/invoice/invoice_v4_line_items.rbs +15 -0
  363. data/sig/mindee/v1/product/invoice/invoice_v4_page.rbs +17 -0
  364. data/sig/mindee/v1/product/invoice_splitter/invoice_splitter_v1.rbs +13 -0
  365. data/sig/mindee/v1/product/invoice_splitter/invoice_splitter_v1_document.rbs +17 -0
  366. data/sig/mindee/v1/product/invoice_splitter/invoice_splitter_v1_invoice_page_group.rbs +21 -0
  367. data/sig/mindee/v1/product/invoice_splitter/invoice_splitter_v1_invoice_page_groups.rbs +15 -0
  368. data/sig/mindee/v1/product/invoice_splitter/invoice_splitter_v1_page.rbs +17 -0
  369. data/sig/mindee/v1/product/multi_receipts_detector/multi_receipts_detector_v1.rbs +14 -0
  370. data/sig/mindee/v1/product/multi_receipts_detector/multi_receipts_detector_v1_document.rbs +15 -0
  371. data/sig/mindee/v1/product/multi_receipts_detector/multi_receipts_detector_v1_page.rbs +17 -0
  372. data/sig/mindee/v1/product/passport/passport_v1.rbs +13 -0
  373. data/sig/mindee/v1/product/passport/passport_v1_document.rbs +25 -0
  374. data/sig/mindee/v1/product/passport/passport_v1_page.rbs +17 -0
  375. data/sig/mindee/v1/product/receipt/receipt_v5.rbs +13 -0
  376. data/sig/mindee/v1/product/receipt/receipt_v5_document.rbs +33 -0
  377. data/sig/mindee/v1/product/receipt/receipt_v5_line_item.rbs +27 -0
  378. data/sig/mindee/v1/product/receipt/receipt_v5_line_items.rbs +15 -0
  379. data/sig/mindee/v1/product/receipt/receipt_v5_page.rbs +17 -0
  380. data/sig/mindee/v1/product/resume/resume_v1.rbs +13 -0
  381. data/sig/mindee/v1/product/resume/resume_v1_certificate.rbs +27 -0
  382. data/sig/mindee/v1/product/resume/resume_v1_certificates.rbs +17 -0
  383. data/sig/mindee/v1/product/resume/resume_v1_document.rbs +69 -0
  384. data/sig/mindee/v1/product/resume/resume_v1_education.rbs +33 -0
  385. data/sig/mindee/v1/product/resume/resume_v1_educations.rbs +17 -0
  386. data/sig/mindee/v1/product/resume/resume_v1_language.rbs +23 -0
  387. data/sig/mindee/v1/product/resume/resume_v1_languages.rbs +17 -0
  388. data/sig/mindee/v1/product/resume/resume_v1_page.rbs +19 -0
  389. data/sig/mindee/v1/product/resume/resume_v1_professional_experience.rbs +37 -0
  390. data/sig/mindee/v1/product/resume/resume_v1_professional_experiences.rbs +17 -0
  391. data/sig/mindee/v1/product/resume/resume_v1_social_networks_url.rbs +23 -0
  392. data/sig/mindee/v1/product/resume/resume_v1_social_networks_urls.rbs +17 -0
  393. data/sig/mindee/v1/product/universal/universal.rbs +16 -0
  394. data/sig/mindee/v1/product/universal/universal_document.rbs +12 -0
  395. data/sig/mindee/v1/product/universal/universal_page.rbs +18 -0
  396. data/sig/mindee/v1/product/universal/universal_prediction.rbs +30 -0
  397. data/sig/mindee/v2/client.rbs +29 -0
  398. data/sig/mindee/v2/file_operation/crop.rbs +10 -0
  399. data/sig/mindee/v2/file_operation/crop_files.rbs +9 -0
  400. data/sig/mindee/v2/file_operation/split.rbs +11 -0
  401. data/sig/mindee/v2/file_operation/split_files.rbs +9 -0
  402. data/sig/mindee/v2/http/api_v2_settings.rbs +27 -0
  403. data/sig/mindee/v2/http/mindee_api_v2.rbs +52 -0
  404. data/sig/mindee/v2/parsing/base_inference.rbs +18 -0
  405. data/sig/mindee/v2/parsing/base_response.rbs +11 -0
  406. data/sig/mindee/v2/parsing/common_response.rbs +12 -0
  407. data/sig/mindee/v2/parsing/error_item.rbs +13 -0
  408. data/sig/mindee/v2/parsing/error_response.rbs +20 -0
  409. data/sig/mindee/v2/parsing/field/base_field.rbs +17 -0
  410. data/sig/mindee/v2/parsing/field/field_confidence.rbs +30 -0
  411. data/sig/mindee/v2/parsing/field/field_location.rbs +16 -0
  412. data/sig/mindee/v2/parsing/field/inference_fields.rbs +20 -0
  413. data/sig/mindee/v2/parsing/field/list_field.rbs +23 -0
  414. data/sig/mindee/v2/parsing/field/object_field.rbs +27 -0
  415. data/sig/mindee/v2/parsing/field/simple_field.rbs +16 -0
  416. data/sig/mindee/v2/parsing/inference_active_options.rbs +26 -0
  417. data/sig/mindee/v2/parsing/inference_file.rbs +17 -0
  418. data/sig/mindee/v2/parsing/inference_job.rbs +13 -0
  419. data/sig/mindee/v2/parsing/inference_model.rbs +12 -0
  420. data/sig/mindee/v2/parsing/job.rbs +24 -0
  421. data/sig/mindee/v2/parsing/job_response.rbs +14 -0
  422. data/sig/mindee/v2/parsing/job_webhook.rbs +19 -0
  423. data/sig/mindee/v2/parsing/rag_metadata.rbs +13 -0
  424. data/sig/mindee/v2/parsing/raw_text.rbs +12 -0
  425. data/sig/mindee/v2/parsing/raw_text_page.rbs +11 -0
  426. data/sig/mindee/v2/parsing/search/pagination_metadata.rbs +20 -0
  427. data/sig/mindee/v2/parsing/search/search_model.rbs +19 -0
  428. data/sig/mindee/v2/parsing/search/search_response.rbs +17 -0
  429. data/sig/mindee/v2/parsing/search_models.rbs +14 -0
  430. data/sig/mindee/v2/product/base_product.rbs +19 -0
  431. data/sig/mindee/v2/product/classification/classification.rbs +10 -0
  432. data/sig/mindee/v2/product/classification/classification_classifier.rbs +15 -0
  433. data/sig/mindee/v2/product/classification/classification_inference.rbs +15 -0
  434. data/sig/mindee/v2/product/classification/classification_response.rbs +23 -0
  435. data/sig/mindee/v2/product/classification/classification_result.rbs +15 -0
  436. data/sig/mindee/v2/product/classification/params/classification_parameters/classification_parameters.rbs +23 -0
  437. data/sig/mindee/v2/product/crop/crop.rbs +10 -0
  438. data/sig/mindee/v2/product/crop/crop_inference.rbs +14 -0
  439. data/sig/mindee/v2/product/crop/crop_item.rbs +18 -0
  440. data/sig/mindee/v2/product/crop/crop_response.rbs +25 -0
  441. data/sig/mindee/v2/product/crop/crop_result.rbs +14 -0
  442. data/sig/mindee/v2/product/crop/params/crop_parameters/crop_parameters.rbs +23 -0
  443. data/sig/mindee/v2/product/extraction/extraction.rbs +15 -0
  444. data/sig/mindee/v2/product/extraction/extraction_inference.rbs +19 -0
  445. data/sig/mindee/v2/product/extraction/extraction_response.rbs +24 -0
  446. data/sig/mindee/v2/product/extraction/extraction_result.rbs +18 -0
  447. data/sig/mindee/v2/product/extraction/params/data_schema.rbs +21 -0
  448. data/sig/mindee/v2/product/extraction/params/data_schema_field.rbs +29 -0
  449. data/sig/mindee/v2/product/extraction/params/data_schema_replace.rbs +21 -0
  450. data/sig/mindee/v2/product/extraction/params/extraction_parameters.rbs +38 -0
  451. data/sig/mindee/v2/product/ocr/ocr.rbs +10 -0
  452. data/sig/mindee/v2/product/ocr/ocr_inference.rbs +14 -0
  453. data/sig/mindee/v2/product/ocr/ocr_page.rbs +15 -0
  454. data/sig/mindee/v2/product/ocr/ocr_response.rbs +23 -0
  455. data/sig/mindee/v2/product/ocr/ocr_result.rbs +14 -0
  456. data/sig/mindee/v2/product/ocr/ocr_word.rbs +15 -0
  457. data/sig/mindee/v2/product/ocr/params/ocr_parameters/ocr_parameters.rbs +24 -0
  458. data/sig/mindee/v2/product/split/params/split_parameters/split_parameters.rbs +23 -0
  459. data/sig/mindee/v2/product/split/split.rbs +10 -0
  460. data/sig/mindee/v2/product/split/split_inference.rbs +14 -0
  461. data/sig/mindee/v2/product/split/split_range.rbs +18 -0
  462. data/sig/mindee/v2/product/split/split_response.rbs +25 -0
  463. data/sig/mindee/v2/product/split/split_result.rbs +14 -0
  464. data/sig/mindee.rbs +12 -9
  465. metadata +436 -569
  466. data/bin/cli_products.rb +0 -166
  467. data/docs/code_samples/bank_check_v1.txt +0 -24
  468. data/docs/code_samples/bill_of_lading_v1_async.txt +0 -24
  469. data/docs/code_samples/business_card_v1_async.txt +0 -24
  470. data/docs/code_samples/carte_grise_v1.txt +0 -24
  471. data/docs/code_samples/default_v2.txt +0 -40
  472. data/docs/code_samples/delivery_notes_v1_async.txt +0 -24
  473. data/docs/code_samples/driver_license_v1_async.txt +0 -24
  474. data/docs/code_samples/energy_bill_fra_v1_async.txt +0 -24
  475. data/docs/code_samples/french_healthcard_v1_async.txt +0 -24
  476. data/docs/code_samples/ind_passport_v1_async.txt +0 -24
  477. data/docs/code_samples/nutrition_facts_v1_async.txt +0 -24
  478. data/docs/code_samples/payslip_fra_v2_async.txt +0 -24
  479. data/docs/code_samples/payslip_fra_v3_async.txt +0 -24
  480. data/docs/code_samples/us_healthcare_cards_v1_async.txt +0 -24
  481. data/docs/code_samples/us_mail_v3_async.txt +0 -24
  482. data/lib/mindee/client.rb +0 -488
  483. data/lib/mindee/client_v2.rb +0 -109
  484. data/lib/mindee/errors/mindee_error.rb +0 -17
  485. data/lib/mindee/errors/mindee_http_error.rb +0 -36
  486. data/lib/mindee/errors/mindee_http_error_v2.rb +0 -45
  487. data/lib/mindee/errors/mindee_http_unknown_error_v2.rb +0 -18
  488. data/lib/mindee/errors/mindee_input_error.rb +0 -30
  489. data/lib/mindee/errors.rb +0 -6
  490. data/lib/mindee/extraction/multi_receipts_extractor.rb +0 -30
  491. data/lib/mindee/http/api_settings_v2.rb +0 -63
  492. data/lib/mindee/http/endpoint.rb +0 -219
  493. data/lib/mindee/http/mindee_api_v2.rb +0 -165
  494. data/lib/mindee/http/workflow_endpoint.rb +0 -91
  495. data/lib/mindee/input/data_schema.rb +0 -126
  496. data/lib/mindee/input/inference_parameters.rb +0 -162
  497. data/lib/mindee/parsing/common/api_request.rb +0 -36
  498. data/lib/mindee/parsing/common/api_response.rb +0 -61
  499. data/lib/mindee/parsing/common/document.rb +0 -84
  500. data/lib/mindee/parsing/common/execution.rb +0 -75
  501. data/lib/mindee/parsing/common/execution_file.rb +0 -24
  502. data/lib/mindee/parsing/common/execution_priority.rb +0 -36
  503. data/lib/mindee/parsing/common/extras/cropper_extra.rb +0 -30
  504. data/lib/mindee/parsing/common/extras/extras.rb +0 -58
  505. data/lib/mindee/parsing/common/extras/full_text_ocr_extra.rb +0 -33
  506. data/lib/mindee/parsing/common/extras/rag_extra.rb +0 -26
  507. data/lib/mindee/parsing/common/inference.rb +0 -67
  508. data/lib/mindee/parsing/common/job.rb +0 -46
  509. data/lib/mindee/parsing/common/ocr/mvision_v1.rb +0 -50
  510. data/lib/mindee/parsing/common/ocr/ocr.rb +0 -178
  511. data/lib/mindee/parsing/common/orientation.rb +0 -26
  512. data/lib/mindee/parsing/common/page.rb +0 -47
  513. data/lib/mindee/parsing/common/prediction.rb +0 -17
  514. data/lib/mindee/parsing/common/product.rb +0 -24
  515. data/lib/mindee/parsing/common/workflow_response.rb +0 -28
  516. data/lib/mindee/parsing/standard/abstract_field.rb +0 -72
  517. data/lib/mindee/parsing/standard/address_field.rb +0 -49
  518. data/lib/mindee/parsing/standard/amount_field.rb +0 -26
  519. data/lib/mindee/parsing/standard/base_field.rb +0 -28
  520. data/lib/mindee/parsing/standard/boolean_field.rb +0 -27
  521. data/lib/mindee/parsing/standard/classification_field.rb +0 -16
  522. data/lib/mindee/parsing/standard/company_registration_field.rb +0 -43
  523. data/lib/mindee/parsing/standard/date_field.rb +0 -38
  524. data/lib/mindee/parsing/standard/feature_field.rb +0 -24
  525. data/lib/mindee/parsing/standard/locale_field.rb +0 -50
  526. data/lib/mindee/parsing/standard/payment_details_field.rb +0 -42
  527. data/lib/mindee/parsing/standard/position_field.rb +0 -59
  528. data/lib/mindee/parsing/standard/string_field.rb +0 -24
  529. data/lib/mindee/parsing/standard/tax_field.rb +0 -108
  530. data/lib/mindee/parsing/universal/universal_list_field.rb +0 -58
  531. data/lib/mindee/parsing/universal/universal_object_field.rb +0 -121
  532. data/lib/mindee/parsing/v2/common_response.rb +0 -18
  533. data/lib/mindee/parsing/v2/error_item.rb +0 -21
  534. data/lib/mindee/parsing/v2/error_response.rb +0 -51
  535. data/lib/mindee/parsing/v2/field/base_field.rb +0 -63
  536. data/lib/mindee/parsing/v2/field/field_confidence.rb +0 -128
  537. data/lib/mindee/parsing/v2/field/field_location.rb +0 -33
  538. data/lib/mindee/parsing/v2/field/inference_fields.rb +0 -105
  539. data/lib/mindee/parsing/v2/field/list_field.rb +0 -79
  540. data/lib/mindee/parsing/v2/field/object_field.rb +0 -135
  541. data/lib/mindee/parsing/v2/field/simple_field.rb +0 -60
  542. data/lib/mindee/parsing/v2/inference.rb +0 -57
  543. data/lib/mindee/parsing/v2/inference_active_options.rb +0 -67
  544. data/lib/mindee/parsing/v2/inference_file.rb +0 -38
  545. data/lib/mindee/parsing/v2/inference_job.rb +0 -25
  546. data/lib/mindee/parsing/v2/inference_model.rb +0 -30
  547. data/lib/mindee/parsing/v2/inference_response.rb +0 -30
  548. data/lib/mindee/parsing/v2/inference_result.rb +0 -42
  549. data/lib/mindee/parsing/v2/job.rb +0 -93
  550. data/lib/mindee/parsing/v2/job_response.rb +0 -30
  551. data/lib/mindee/parsing/v2/job_webhook.rb +0 -60
  552. data/lib/mindee/parsing/v2/rag_metadata.rb +0 -17
  553. data/lib/mindee/parsing/v2/raw_text.rb +0 -25
  554. data/lib/mindee/parsing/v2/raw_text_page.rb +0 -22
  555. data/lib/mindee/parsing/v2.rb +0 -16
  556. data/lib/mindee/product/.rubocop.yml +0 -13
  557. data/lib/mindee/product/barcode_reader/barcode_reader_v1.rb +0 -45
  558. data/lib/mindee/product/barcode_reader/barcode_reader_v1_document.rb +0 -44
  559. data/lib/mindee/product/barcode_reader/barcode_reader_v1_page.rb +0 -36
  560. data/lib/mindee/product/bill_of_lading/bill_of_lading_v1.rb +0 -45
  561. data/lib/mindee/product/bill_of_lading/bill_of_lading_v1_carrier.rb +0 -52
  562. data/lib/mindee/product/bill_of_lading/bill_of_lading_v1_carrier_item.rb +0 -101
  563. data/lib/mindee/product/bill_of_lading/bill_of_lading_v1_carrier_items.rb +0 -62
  564. data/lib/mindee/product/bill_of_lading/bill_of_lading_v1_consignee.rb +0 -58
  565. data/lib/mindee/product/bill_of_lading/bill_of_lading_v1_document.rb +0 -163
  566. data/lib/mindee/product/bill_of_lading/bill_of_lading_v1_notify_party.rb +0 -58
  567. data/lib/mindee/product/bill_of_lading/bill_of_lading_v1_page.rb +0 -36
  568. data/lib/mindee/product/bill_of_lading/bill_of_lading_v1_shipper.rb +0 -58
  569. data/lib/mindee/product/business_card/business_card_v1.rb +0 -45
  570. data/lib/mindee/product/business_card/business_card_v1_document.rb +0 -112
  571. data/lib/mindee/product/business_card/business_card_v1_page.rb +0 -36
  572. data/lib/mindee/product/cropper/cropper_v1.rb +0 -45
  573. data/lib/mindee/product/cropper/cropper_v1_document.rb +0 -13
  574. data/lib/mindee/product/cropper/cropper_v1_page.rb +0 -53
  575. data/lib/mindee/product/delivery_note/delivery_note_v1.rb +0 -45
  576. data/lib/mindee/product/delivery_note/delivery_note_v1_document.rb +0 -82
  577. data/lib/mindee/product/delivery_note/delivery_note_v1_page.rb +0 -36
  578. data/lib/mindee/product/driver_license/driver_license_v1.rb +0 -45
  579. data/lib/mindee/product/driver_license/driver_license_v1_document.rb +0 -121
  580. data/lib/mindee/product/driver_license/driver_license_v1_page.rb +0 -36
  581. data/lib/mindee/product/financial_document/financial_document_v1.rb +0 -45
  582. data/lib/mindee/product/financial_document/financial_document_v1_document.rb +0 -326
  583. data/lib/mindee/product/financial_document/financial_document_v1_line_item.rb +0 -121
  584. data/lib/mindee/product/financial_document/financial_document_v1_line_items.rb +0 -62
  585. data/lib/mindee/product/financial_document/financial_document_v1_page.rb +0 -36
  586. data/lib/mindee/product/fr/bank_account_details/bank_account_details_v1.rb +0 -47
  587. data/lib/mindee/product/fr/bank_account_details/bank_account_details_v1_document.rb +0 -46
  588. data/lib/mindee/product/fr/bank_account_details/bank_account_details_v1_page.rb +0 -38
  589. data/lib/mindee/product/fr/bank_account_details/bank_account_details_v2.rb +0 -47
  590. data/lib/mindee/product/fr/bank_account_details/bank_account_details_v2_bban.rb +0 -60
  591. data/lib/mindee/product/fr/bank_account_details/bank_account_details_v2_document.rb +0 -57
  592. data/lib/mindee/product/fr/bank_account_details/bank_account_details_v2_page.rb +0 -38
  593. data/lib/mindee/product/fr/bank_statement/bank_statement_v2.rb +0 -47
  594. data/lib/mindee/product/fr/bank_statement/bank_statement_v2_document.rb +0 -166
  595. data/lib/mindee/product/fr/bank_statement/bank_statement_v2_page.rb +0 -38
  596. data/lib/mindee/product/fr/bank_statement/bank_statement_v2_transaction.rb +0 -75
  597. data/lib/mindee/product/fr/bank_statement/bank_statement_v2_transactions.rb +0 -54
  598. data/lib/mindee/product/fr/carte_grise/carte_grise_v1.rb +0 -47
  599. data/lib/mindee/product/fr/carte_grise/carte_grise_v1_document.rb +0 -242
  600. data/lib/mindee/product/fr/carte_grise/carte_grise_v1_page.rb +0 -38
  601. data/lib/mindee/product/fr/energy_bill/energy_bill_v1.rb +0 -47
  602. data/lib/mindee/product/fr/energy_bill/energy_bill_v1_document.rb +0 -265
  603. data/lib/mindee/product/fr/energy_bill/energy_bill_v1_energy_consumer.rb +0 -48
  604. data/lib/mindee/product/fr/energy_bill/energy_bill_v1_energy_supplier.rb +0 -48
  605. data/lib/mindee/product/fr/energy_bill/energy_bill_v1_energy_usage.rb +0 -121
  606. data/lib/mindee/product/fr/energy_bill/energy_bill_v1_energy_usages.rb +0 -69
  607. data/lib/mindee/product/fr/energy_bill/energy_bill_v1_meter_detail.rb +0 -54
  608. data/lib/mindee/product/fr/energy_bill/energy_bill_v1_page.rb +0 -38
  609. data/lib/mindee/product/fr/energy_bill/energy_bill_v1_subscription.rb +0 -103
  610. data/lib/mindee/product/fr/energy_bill/energy_bill_v1_subscriptions.rb +0 -65
  611. data/lib/mindee/product/fr/energy_bill/energy_bill_v1_taxes_and_contribution.rb +0 -103
  612. data/lib/mindee/product/fr/energy_bill/energy_bill_v1_taxes_and_contributions.rb +0 -65
  613. data/lib/mindee/product/fr/health_card/health_card_v1.rb +0 -47
  614. data/lib/mindee/product/fr/health_card/health_card_v1_document.rb +0 -61
  615. data/lib/mindee/product/fr/health_card/health_card_v1_page.rb +0 -38
  616. data/lib/mindee/product/fr/id_card/id_card_v1.rb +0 -47
  617. data/lib/mindee/product/fr/id_card/id_card_v1_document.rb +0 -103
  618. data/lib/mindee/product/fr/id_card/id_card_v1_page.rb +0 -55
  619. data/lib/mindee/product/fr/id_card/id_card_v2.rb +0 -47
  620. data/lib/mindee/product/fr/id_card/id_card_v2_document.rb +0 -140
  621. data/lib/mindee/product/fr/id_card/id_card_v2_page.rb +0 -63
  622. data/lib/mindee/product/fr/payslip/payslip_v2.rb +0 -47
  623. data/lib/mindee/product/fr/payslip/payslip_v2_bank_account_detail.rb +0 -54
  624. data/lib/mindee/product/fr/payslip/payslip_v2_document.rb +0 -143
  625. data/lib/mindee/product/fr/payslip/payslip_v2_employee.rb +0 -78
  626. data/lib/mindee/product/fr/payslip/payslip_v2_employer.rb +0 -78
  627. data/lib/mindee/product/fr/payslip/payslip_v2_employment.rb +0 -73
  628. data/lib/mindee/product/fr/payslip/payslip_v2_page.rb +0 -38
  629. data/lib/mindee/product/fr/payslip/payslip_v2_pay_detail.rb +0 -122
  630. data/lib/mindee/product/fr/payslip/payslip_v2_pay_period.rb +0 -66
  631. data/lib/mindee/product/fr/payslip/payslip_v2_pto.rb +0 -65
  632. data/lib/mindee/product/fr/payslip/payslip_v2_salary_detail.rb +0 -87
  633. data/lib/mindee/product/fr/payslip/payslip_v2_salary_details.rb +0 -63
  634. data/lib/mindee/product/fr/payslip/payslip_v3.rb +0 -47
  635. data/lib/mindee/product/fr/payslip/payslip_v3_bank_account_detail.rb +0 -54
  636. data/lib/mindee/product/fr/payslip/payslip_v3_document.rb +0 -178
  637. data/lib/mindee/product/fr/payslip/payslip_v3_employee.rb +0 -78
  638. data/lib/mindee/product/fr/payslip/payslip_v3_employer.rb +0 -78
  639. data/lib/mindee/product/fr/payslip/payslip_v3_employment.rb +0 -78
  640. data/lib/mindee/product/fr/payslip/payslip_v3_page.rb +0 -38
  641. data/lib/mindee/product/fr/payslip/payslip_v3_paid_time_off.rb +0 -95
  642. data/lib/mindee/product/fr/payslip/payslip_v3_paid_time_offs.rb +0 -65
  643. data/lib/mindee/product/fr/payslip/payslip_v3_pay_detail.rb +0 -122
  644. data/lib/mindee/product/fr/payslip/payslip_v3_pay_period.rb +0 -66
  645. data/lib/mindee/product/fr/payslip/payslip_v3_salary_detail.rb +0 -97
  646. data/lib/mindee/product/fr/payslip/payslip_v3_salary_details.rb +0 -65
  647. data/lib/mindee/product/ind/indian_passport/indian_passport_v1.rb +0 -47
  648. data/lib/mindee/product/ind/indian_passport/indian_passport_v1_document.rb +0 -206
  649. data/lib/mindee/product/ind/indian_passport/indian_passport_v1_page.rb +0 -38
  650. data/lib/mindee/product/international_id/international_id_v2.rb +0 -45
  651. data/lib/mindee/product/international_id/international_id_v2_document.rb +0 -161
  652. data/lib/mindee/product/international_id/international_id_v2_page.rb +0 -36
  653. data/lib/mindee/product/invoice/invoice_v4.rb +0 -45
  654. data/lib/mindee/product/invoice/invoice_v4_document.rb +0 -297
  655. data/lib/mindee/product/invoice/invoice_v4_line_item.rb +0 -121
  656. data/lib/mindee/product/invoice/invoice_v4_line_items.rb +0 -62
  657. data/lib/mindee/product/invoice/invoice_v4_page.rb +0 -36
  658. data/lib/mindee/product/invoice_splitter/invoice_splitter_v1.rb +0 -45
  659. data/lib/mindee/product/invoice_splitter/invoice_splitter_v1_document.rb +0 -63
  660. data/lib/mindee/product/invoice_splitter/invoice_splitter_v1_invoice_page_group.rb +0 -55
  661. data/lib/mindee/product/invoice_splitter/invoice_splitter_v1_invoice_page_groups.rb +0 -48
  662. data/lib/mindee/product/invoice_splitter/invoice_splitter_v1_page.rb +0 -36
  663. data/lib/mindee/product/multi_receipts_detector/multi_receipts_detector_v1.rb +0 -45
  664. data/lib/mindee/product/multi_receipts_detector/multi_receipts_detector_v1_document.rb +0 -35
  665. data/lib/mindee/product/multi_receipts_detector/multi_receipts_detector_v1_page.rb +0 -36
  666. data/lib/mindee/product/nutrition_facts_label/nutrition_facts_label_v1.rb +0 -45
  667. data/lib/mindee/product/nutrition_facts_label/nutrition_facts_label_v1_added_sugar.rb +0 -55
  668. data/lib/mindee/product/nutrition_facts_label/nutrition_facts_label_v1_calorie.rb +0 -55
  669. data/lib/mindee/product/nutrition_facts_label/nutrition_facts_label_v1_cholesterol.rb +0 -55
  670. data/lib/mindee/product/nutrition_facts_label/nutrition_facts_label_v1_dietary_fiber.rb +0 -55
  671. data/lib/mindee/product/nutrition_facts_label/nutrition_facts_label_v1_document.rb +0 -211
  672. data/lib/mindee/product/nutrition_facts_label/nutrition_facts_label_v1_nutrient.rb +0 -93
  673. data/lib/mindee/product/nutrition_facts_label/nutrition_facts_label_v1_nutrients.rb +0 -68
  674. data/lib/mindee/product/nutrition_facts_label/nutrition_facts_label_v1_page.rb +0 -36
  675. data/lib/mindee/product/nutrition_facts_label/nutrition_facts_label_v1_protein.rb +0 -55
  676. data/lib/mindee/product/nutrition_facts_label/nutrition_facts_label_v1_saturated_fat.rb +0 -55
  677. data/lib/mindee/product/nutrition_facts_label/nutrition_facts_label_v1_serving_size.rb +0 -47
  678. data/lib/mindee/product/nutrition_facts_label/nutrition_facts_label_v1_sodium.rb +0 -61
  679. data/lib/mindee/product/nutrition_facts_label/nutrition_facts_label_v1_total_carbohydrate.rb +0 -55
  680. data/lib/mindee/product/nutrition_facts_label/nutrition_facts_label_v1_total_fat.rb +0 -55
  681. data/lib/mindee/product/nutrition_facts_label/nutrition_facts_label_v1_total_sugar.rb +0 -55
  682. data/lib/mindee/product/nutrition_facts_label/nutrition_facts_label_v1_trans_fat.rb +0 -55
  683. data/lib/mindee/product/passport/passport_v1.rb +0 -45
  684. data/lib/mindee/product/passport/passport_v1_document.rb +0 -109
  685. data/lib/mindee/product/passport/passport_v1_page.rb +0 -36
  686. data/lib/mindee/product/receipt/receipt_v5.rb +0 -45
  687. data/lib/mindee/product/receipt/receipt_v5_document.rb +0 -184
  688. data/lib/mindee/product/receipt/receipt_v5_line_item.rb +0 -85
  689. data/lib/mindee/product/receipt/receipt_v5_line_items.rb +0 -54
  690. data/lib/mindee/product/receipt/receipt_v5_page.rb +0 -36
  691. data/lib/mindee/product/resume/resume_v1.rb +0 -45
  692. data/lib/mindee/product/resume/resume_v1_certificate.rb +0 -79
  693. data/lib/mindee/product/resume/resume_v1_certificates.rb +0 -58
  694. data/lib/mindee/product/resume/resume_v1_document.rb +0 -337
  695. data/lib/mindee/product/resume/resume_v1_education.rb +0 -103
  696. data/lib/mindee/product/resume/resume_v1_educations.rb +0 -64
  697. data/lib/mindee/product/resume/resume_v1_language.rb +0 -63
  698. data/lib/mindee/product/resume/resume_v1_languages.rb +0 -54
  699. data/lib/mindee/product/resume/resume_v1_page.rb +0 -36
  700. data/lib/mindee/product/resume/resume_v1_professional_experience.rb +0 -119
  701. data/lib/mindee/product/resume/resume_v1_professional_experiences.rb +0 -68
  702. data/lib/mindee/product/resume/resume_v1_social_networks_url.rb +0 -63
  703. data/lib/mindee/product/resume/resume_v1_social_networks_urls.rb +0 -54
  704. data/lib/mindee/product/universal/universal.rb +0 -46
  705. data/lib/mindee/product/universal/universal_document.rb +0 -32
  706. data/lib/mindee/product/universal/universal_page.rb +0 -51
  707. data/lib/mindee/product/universal/universal_prediction.rb +0 -122
  708. data/lib/mindee/product/us/bank_check/bank_check_v1.rb +0 -47
  709. data/lib/mindee/product/us/bank_check/bank_check_v1_document.rb +0 -74
  710. data/lib/mindee/product/us/bank_check/bank_check_v1_page.rb +0 -64
  711. data/lib/mindee/product/us/healthcare_card/healthcare_card_v1.rb +0 -47
  712. data/lib/mindee/product/us/healthcare_card/healthcare_card_v1_copay.rb +0 -67
  713. data/lib/mindee/product/us/healthcare_card/healthcare_card_v1_copays.rb +0 -52
  714. data/lib/mindee/product/us/healthcare_card/healthcare_card_v1_document.rb +0 -167
  715. data/lib/mindee/product/us/healthcare_card/healthcare_card_v1_page.rb +0 -38
  716. data/lib/mindee/product/us/us_mail/us_mail_v3.rb +0 -47
  717. data/lib/mindee/product/us/us_mail/us_mail_v3_document.rb +0 -115
  718. data/lib/mindee/product/us/us_mail/us_mail_v3_page.rb +0 -38
  719. data/lib/mindee/product/us/us_mail/us_mail_v3_recipient_address.rb +0 -113
  720. data/lib/mindee/product/us/us_mail/us_mail_v3_recipient_addresses.rb +0 -65
  721. data/lib/mindee/product/us/us_mail/us_mail_v3_sender_address.rb +0 -66
  722. data/lib/mindee/product.rb +0 -32
  723. data/sig/mindee/client.rbs +0 -61
  724. data/sig/mindee/client_v2.rbs +0 -17
  725. data/sig/mindee/errors/mindee_error.rbs +0 -13
  726. data/sig/mindee/errors/mindee_http_error.rbs +0 -17
  727. data/sig/mindee/errors/mindee_http_error_v2.rbs +0 -15
  728. data/sig/mindee/errors/mindee_http_unknown_error_v2.rbs +0 -9
  729. data/sig/mindee/errors/mindee_input_error.rbs +0 -18
  730. data/sig/mindee/extraction/multi_receipts_extractor.rbs +0 -6
  731. data/sig/mindee/http/api_settings_v2.rbs +0 -23
  732. data/sig/mindee/http/endpoint.rbs +0 -29
  733. data/sig/mindee/http/mindee_api_v2.rbs +0 -22
  734. data/sig/mindee/http/workflow_endpoint.rbs +0 -20
  735. data/sig/mindee/input/data_schema.rbs +0 -34
  736. data/sig/mindee/input/inference_parameters.rbs +0 -40
  737. data/sig/mindee/parsing/common/api_request.rbs +0 -15
  738. data/sig/mindee/parsing/common/api_response.rbs +0 -27
  739. data/sig/mindee/parsing/common/document.rbs +0 -20
  740. data/sig/mindee/parsing/common/execution.rbs +0 -24
  741. data/sig/mindee/parsing/common/execution_file.rbs +0 -12
  742. data/sig/mindee/parsing/common/execution_priority.rbs +0 -13
  743. data/sig/mindee/parsing/common/extras/cropper_extra.rbs +0 -15
  744. data/sig/mindee/parsing/common/extras/extras.rbs +0 -19
  745. data/sig/mindee/parsing/common/extras/full_text_ocr_extra.rbs +0 -16
  746. data/sig/mindee/parsing/common/extras/rag_extra.rbs +0 -15
  747. data/sig/mindee/parsing/common/inference.rbs +0 -26
  748. data/sig/mindee/parsing/common/job.rbs +0 -16
  749. data/sig/mindee/parsing/common/ocr/mvision_v1.rbs +0 -15
  750. data/sig/mindee/parsing/common/ocr/ocr.rbs +0 -41
  751. data/sig/mindee/parsing/common/orientation.rbs +0 -13
  752. data/sig/mindee/parsing/common/page.rbs +0 -16
  753. data/sig/mindee/parsing/common/prediction.rbs +0 -11
  754. data/sig/mindee/parsing/common/product.rbs +0 -13
  755. data/sig/mindee/parsing/common/workflow_response.rbs +0 -17
  756. data/sig/mindee/parsing/standard/abstract_field.rbs +0 -19
  757. data/sig/mindee/parsing/standard/address_field.rbs +0 -18
  758. data/sig/mindee/parsing/standard/amount_field.rbs +0 -14
  759. data/sig/mindee/parsing/standard/base_field.rbs +0 -12
  760. data/sig/mindee/parsing/standard/boolean_field.rbs +0 -12
  761. data/sig/mindee/parsing/standard/classification_field.rbs +0 -10
  762. data/sig/mindee/parsing/standard/company_registration_field.rbs +0 -15
  763. data/sig/mindee/parsing/standard/date_field.rbs +0 -14
  764. data/sig/mindee/parsing/standard/feature_field.rbs +0 -10
  765. data/sig/mindee/parsing/standard/locale_field.rbs +0 -16
  766. data/sig/mindee/parsing/standard/payment_details_field.rbs +0 -16
  767. data/sig/mindee/parsing/standard/position_field.rbs +0 -17
  768. data/sig/mindee/parsing/standard/string_field.rbs +0 -12
  769. data/sig/mindee/parsing/standard/tax_field.rbs +0 -24
  770. data/sig/mindee/parsing/universal/universal_list_field.rbs +0 -16
  771. data/sig/mindee/parsing/universal/universal_object_field.rbs +0 -29
  772. data/sig/mindee/parsing/v2/common_response.rbs +0 -11
  773. data/sig/mindee/parsing/v2/error_item.rbs +0 -13
  774. data/sig/mindee/parsing/v2/error_response.rbs +0 -19
  775. data/sig/mindee/parsing/v2/field/base_field.rbs +0 -17
  776. data/sig/mindee/parsing/v2/field/field_confidence.rbs +0 -30
  777. data/sig/mindee/parsing/v2/field/field_location.rbs +0 -16
  778. data/sig/mindee/parsing/v2/field/inference_fields.rbs +0 -20
  779. data/sig/mindee/parsing/v2/field/list_field.rbs +0 -23
  780. data/sig/mindee/parsing/v2/field/object_field.rbs +0 -27
  781. data/sig/mindee/parsing/v2/field/simple_field.rbs +0 -16
  782. data/sig/mindee/parsing/v2/inference.rbs +0 -19
  783. data/sig/mindee/parsing/v2/inference_active_options.rbs +0 -23
  784. data/sig/mindee/parsing/v2/inference_file.rbs +0 -15
  785. data/sig/mindee/parsing/v2/inference_job.rbs +0 -12
  786. data/sig/mindee/parsing/v2/inference_model.rbs +0 -11
  787. data/sig/mindee/parsing/v2/inference_response.rbs +0 -12
  788. data/sig/mindee/parsing/v2/inference_result.rbs +0 -15
  789. data/sig/mindee/parsing/v2/job.rbs +0 -23
  790. data/sig/mindee/parsing/v2/job_response.rbs +0 -12
  791. data/sig/mindee/parsing/v2/job_webhook.rbs +0 -17
  792. data/sig/mindee/parsing/v2/rag_metadata.rbs +0 -13
  793. data/sig/mindee/parsing/v2/raw_text.rbs +0 -12
  794. data/sig/mindee/parsing/v2/raw_text_page.rbs +0 -11
  795. data/sig/mindee/product/barcode_reader/barcode_reader_v1.rbs +0 -11
  796. data/sig/mindee/product/barcode_reader/barcode_reader_v1_document.rbs +0 -14
  797. data/sig/mindee/product/barcode_reader/barcode_reader_v1_page.rbs +0 -15
  798. data/sig/mindee/product/bill_of_lading/bill_of_lading_v1.rbs +0 -11
  799. data/sig/mindee/product/bill_of_lading/bill_of_lading_v1_carrier.rbs +0 -14
  800. data/sig/mindee/product/bill_of_lading/bill_of_lading_v1_carrier_item.rbs +0 -19
  801. data/sig/mindee/product/bill_of_lading/bill_of_lading_v1_carrier_items.rbs +0 -13
  802. data/sig/mindee/product/bill_of_lading/bill_of_lading_v1_consignee.rbs +0 -15
  803. data/sig/mindee/product/bill_of_lading/bill_of_lading_v1_document.rbs +0 -25
  804. data/sig/mindee/product/bill_of_lading/bill_of_lading_v1_notify_party.rbs +0 -15
  805. data/sig/mindee/product/bill_of_lading/bill_of_lading_v1_page.rbs +0 -15
  806. data/sig/mindee/product/bill_of_lading/bill_of_lading_v1_shipper.rbs +0 -15
  807. data/sig/mindee/product/business_card/business_card_v1.rbs +0 -11
  808. data/sig/mindee/product/business_card/business_card_v1_document.rbs +0 -23
  809. data/sig/mindee/product/business_card/business_card_v1_page.rbs +0 -15
  810. data/sig/mindee/product/cropper/cropper_v1.rbs +0 -11
  811. data/sig/mindee/product/cropper/cropper_v1_document.rbs +0 -12
  812. data/sig/mindee/product/cropper/cropper_v1_page.rbs +0 -16
  813. data/sig/mindee/product/delivery_note/delivery_note_v1.rbs +0 -11
  814. data/sig/mindee/product/delivery_note/delivery_note_v1_document.rbs +0 -19
  815. data/sig/mindee/product/delivery_note/delivery_note_v1_page.rbs +0 -15
  816. data/sig/mindee/product/driver_license/driver_license_v1.rbs +0 -11
  817. data/sig/mindee/product/driver_license/driver_license_v1_document.rbs +0 -25
  818. data/sig/mindee/product/driver_license/driver_license_v1_page.rbs +0 -15
  819. data/sig/mindee/product/financial_document/financial_document_v1.rbs +0 -11
  820. data/sig/mindee/product/financial_document/financial_document_v1_document.rbs +0 -47
  821. data/sig/mindee/product/financial_document/financial_document_v1_line_item.rbs +0 -21
  822. data/sig/mindee/product/financial_document/financial_document_v1_line_items.rbs +0 -13
  823. data/sig/mindee/product/financial_document/financial_document_v1_page.rbs +0 -15
  824. data/sig/mindee/product/fr/bank_account_details/bank_account_details_v1.rbs +0 -13
  825. data/sig/mindee/product/fr/bank_account_details/bank_account_details_v1_document.rbs +0 -17
  826. data/sig/mindee/product/fr/bank_account_details/bank_account_details_v1_page.rbs +0 -17
  827. data/sig/mindee/product/fr/bank_account_details/bank_account_details_v2.rbs +0 -13
  828. data/sig/mindee/product/fr/bank_account_details/bank_account_details_v2_bban.rbs +0 -17
  829. data/sig/mindee/product/fr/bank_account_details/bank_account_details_v2_document.rbs +0 -18
  830. data/sig/mindee/product/fr/bank_account_details/bank_account_details_v2_page.rbs +0 -17
  831. data/sig/mindee/product/fr/bank_statement/bank_statement_v2.rbs +0 -13
  832. data/sig/mindee/product/fr/bank_statement/bank_statement_v2_document.rbs +0 -29
  833. data/sig/mindee/product/fr/bank_statement/bank_statement_v2_page.rbs +0 -17
  834. data/sig/mindee/product/fr/bank_statement/bank_statement_v2_transaction.rbs +0 -18
  835. data/sig/mindee/product/fr/bank_statement/bank_statement_v2_transactions.rbs +0 -15
  836. data/sig/mindee/product/fr/carte_grise/carte_grise_v1.rbs +0 -13
  837. data/sig/mindee/product/fr/carte_grise/carte_grise_v1_document.rbs +0 -55
  838. data/sig/mindee/product/fr/carte_grise/carte_grise_v1_page.rbs +0 -17
  839. data/sig/mindee/product/fr/energy_bill/energy_bill_v1.rbs +0 -13
  840. data/sig/mindee/product/fr/energy_bill/energy_bill_v1_document.rbs +0 -34
  841. data/sig/mindee/product/fr/energy_bill/energy_bill_v1_energy_consumer.rbs +0 -15
  842. data/sig/mindee/product/fr/energy_bill/energy_bill_v1_energy_supplier.rbs +0 -15
  843. data/sig/mindee/product/fr/energy_bill/energy_bill_v1_energy_usage.rbs +0 -23
  844. data/sig/mindee/product/fr/energy_bill/energy_bill_v1_energy_usages.rbs +0 -15
  845. data/sig/mindee/product/fr/energy_bill/energy_bill_v1_meter_detail.rbs +0 -16
  846. data/sig/mindee/product/fr/energy_bill/energy_bill_v1_page.rbs +0 -17
  847. data/sig/mindee/product/fr/energy_bill/energy_bill_v1_subscription.rbs +0 -21
  848. data/sig/mindee/product/fr/energy_bill/energy_bill_v1_subscriptions.rbs +0 -15
  849. data/sig/mindee/product/fr/energy_bill/energy_bill_v1_taxes_and_contribution.rbs +0 -21
  850. data/sig/mindee/product/fr/energy_bill/energy_bill_v1_taxes_and_contributions.rbs +0 -15
  851. data/sig/mindee/product/fr/health_card/health_card_v1.rbs +0 -13
  852. data/sig/mindee/product/fr/health_card/health_card_v1_document.rbs +0 -18
  853. data/sig/mindee/product/fr/health_card/health_card_v1_page.rbs +0 -17
  854. data/sig/mindee/product/fr/id_card/id_card_v1.rbs +0 -13
  855. data/sig/mindee/product/fr/id_card/id_card_v1_document.rbs +0 -24
  856. data/sig/mindee/product/fr/id_card/id_card_v1_page.rbs +0 -18
  857. data/sig/mindee/product/fr/id_card/id_card_v2.rbs +0 -13
  858. data/sig/mindee/product/fr/id_card/id_card_v2_document.rbs +0 -29
  859. data/sig/mindee/product/fr/id_card/id_card_v2_page.rbs +0 -19
  860. data/sig/mindee/product/fr/payslip/payslip_v2.rbs +0 -13
  861. data/sig/mindee/product/fr/payslip/payslip_v2_bank_account_detail.rbs +0 -16
  862. data/sig/mindee/product/fr/payslip/payslip_v2_document.rbs +0 -24
  863. data/sig/mindee/product/fr/payslip/payslip_v2_employee.rbs +0 -20
  864. data/sig/mindee/product/fr/payslip/payslip_v2_employer.rbs +0 -20
  865. data/sig/mindee/product/fr/payslip/payslip_v2_employment.rbs +0 -19
  866. data/sig/mindee/product/fr/payslip/payslip_v2_page.rbs +0 -17
  867. data/sig/mindee/product/fr/payslip/payslip_v2_pay_detail.rbs +0 -23
  868. data/sig/mindee/product/fr/payslip/payslip_v2_pay_period.rbs +0 -18
  869. data/sig/mindee/product/fr/payslip/payslip_v2_pto.rbs +0 -16
  870. data/sig/mindee/product/fr/payslip/payslip_v2_salary_detail.rbs +0 -19
  871. data/sig/mindee/product/fr/payslip/payslip_v2_salary_details.rbs +0 -15
  872. data/sig/mindee/product/fr/payslip/payslip_v3.rbs +0 -13
  873. data/sig/mindee/product/fr/payslip/payslip_v3_bank_account_detail.rbs +0 -16
  874. data/sig/mindee/product/fr/payslip/payslip_v3_document.rbs +0 -26
  875. data/sig/mindee/product/fr/payslip/payslip_v3_employee.rbs +0 -20
  876. data/sig/mindee/product/fr/payslip/payslip_v3_employer.rbs +0 -20
  877. data/sig/mindee/product/fr/payslip/payslip_v3_employment.rbs +0 -20
  878. data/sig/mindee/product/fr/payslip/payslip_v3_page.rbs +0 -17
  879. data/sig/mindee/product/fr/payslip/payslip_v3_paid_time_off.rbs +0 -20
  880. data/sig/mindee/product/fr/payslip/payslip_v3_paid_time_offs.rbs +0 -15
  881. data/sig/mindee/product/fr/payslip/payslip_v3_pay_detail.rbs +0 -23
  882. data/sig/mindee/product/fr/payslip/payslip_v3_pay_period.rbs +0 -18
  883. data/sig/mindee/product/fr/payslip/payslip_v3_salary_detail.rbs +0 -20
  884. data/sig/mindee/product/fr/payslip/payslip_v3_salary_details.rbs +0 -15
  885. data/sig/mindee/product/ind/indian_passport/indian_passport_v1.rbs +0 -13
  886. data/sig/mindee/product/ind/indian_passport/indian_passport_v1_document.rbs +0 -37
  887. data/sig/mindee/product/ind/indian_passport/indian_passport_v1_page.rbs +0 -17
  888. data/sig/mindee/product/international_id/international_id_v2.rbs +0 -11
  889. data/sig/mindee/product/international_id/international_id_v2_document.rbs +0 -29
  890. data/sig/mindee/product/international_id/international_id_v2_page.rbs +0 -15
  891. data/sig/mindee/product/invoice/invoice_v4.rbs +0 -11
  892. data/sig/mindee/product/invoice/invoice_v4_document.rbs +0 -43
  893. data/sig/mindee/product/invoice/invoice_v4_line_item.rbs +0 -21
  894. data/sig/mindee/product/invoice/invoice_v4_line_items.rbs +0 -13
  895. data/sig/mindee/product/invoice/invoice_v4_page.rbs +0 -15
  896. data/sig/mindee/product/invoice_splitter/invoice_splitter_v1.rbs +0 -11
  897. data/sig/mindee/product/invoice_splitter/invoice_splitter_v1_document.rbs +0 -15
  898. data/sig/mindee/product/invoice_splitter/invoice_splitter_v1_invoice_page_group.rbs +0 -14
  899. data/sig/mindee/product/invoice_splitter/invoice_splitter_v1_invoice_page_groups.rbs +0 -13
  900. data/sig/mindee/product/invoice_splitter/invoice_splitter_v1_page.rbs +0 -15
  901. data/sig/mindee/product/multi_receipts_detector/multi_receipts_detector_v1.rbs +0 -11
  902. data/sig/mindee/product/multi_receipts_detector/multi_receipts_detector_v1_document.rbs +0 -13
  903. data/sig/mindee/product/multi_receipts_detector/multi_receipts_detector_v1_page.rbs +0 -15
  904. data/sig/mindee/product/nutrition_facts_label/nutrition_facts_label_v1.rbs +0 -11
  905. data/sig/mindee/product/nutrition_facts_label/nutrition_facts_label_v1_added_sugar.rbs +0 -14
  906. data/sig/mindee/product/nutrition_facts_label/nutrition_facts_label_v1_calorie.rbs +0 -14
  907. data/sig/mindee/product/nutrition_facts_label/nutrition_facts_label_v1_cholesterol.rbs +0 -14
  908. data/sig/mindee/product/nutrition_facts_label/nutrition_facts_label_v1_dietary_fiber.rbs +0 -14
  909. data/sig/mindee/product/nutrition_facts_label/nutrition_facts_label_v1_document.rbs +0 -28
  910. data/sig/mindee/product/nutrition_facts_label/nutrition_facts_label_v1_nutrient.rbs +0 -18
  911. data/sig/mindee/product/nutrition_facts_label/nutrition_facts_label_v1_nutrients.rbs +0 -13
  912. data/sig/mindee/product/nutrition_facts_label/nutrition_facts_label_v1_page.rbs +0 -15
  913. data/sig/mindee/product/nutrition_facts_label/nutrition_facts_label_v1_protein.rbs +0 -14
  914. data/sig/mindee/product/nutrition_facts_label/nutrition_facts_label_v1_saturated_fat.rbs +0 -14
  915. data/sig/mindee/product/nutrition_facts_label/nutrition_facts_label_v1_serving_size.rbs +0 -13
  916. data/sig/mindee/product/nutrition_facts_label/nutrition_facts_label_v1_sodium.rbs +0 -15
  917. data/sig/mindee/product/nutrition_facts_label/nutrition_facts_label_v1_total_carbohydrate.rbs +0 -14
  918. data/sig/mindee/product/nutrition_facts_label/nutrition_facts_label_v1_total_fat.rbs +0 -14
  919. data/sig/mindee/product/nutrition_facts_label/nutrition_facts_label_v1_total_sugar.rbs +0 -14
  920. data/sig/mindee/product/nutrition_facts_label/nutrition_facts_label_v1_trans_fat.rbs +0 -14
  921. data/sig/mindee/product/passport/passport_v1.rbs +0 -11
  922. data/sig/mindee/product/passport/passport_v1_document.rbs +0 -23
  923. data/sig/mindee/product/passport/passport_v1_page.rbs +0 -15
  924. data/sig/mindee/product/receipt/receipt_v5.rbs +0 -11
  925. data/sig/mindee/product/receipt/receipt_v5_document.rbs +0 -31
  926. data/sig/mindee/product/receipt/receipt_v5_line_item.rbs +0 -17
  927. data/sig/mindee/product/receipt/receipt_v5_line_items.rbs +0 -13
  928. data/sig/mindee/product/receipt/receipt_v5_page.rbs +0 -15
  929. data/sig/mindee/product/resume/resume_v1.rbs +0 -11
  930. data/sig/mindee/product/resume/resume_v1_certificate.rbs +0 -17
  931. data/sig/mindee/product/resume/resume_v1_certificates.rbs +0 -13
  932. data/sig/mindee/product/resume/resume_v1_document.rbs +0 -39
  933. data/sig/mindee/product/resume/resume_v1_education.rbs +0 -20
  934. data/sig/mindee/product/resume/resume_v1_educations.rbs +0 -13
  935. data/sig/mindee/product/resume/resume_v1_language.rbs +0 -15
  936. data/sig/mindee/product/resume/resume_v1_languages.rbs +0 -13
  937. data/sig/mindee/product/resume/resume_v1_page.rbs +0 -15
  938. data/sig/mindee/product/resume/resume_v1_professional_experience.rbs +0 -22
  939. data/sig/mindee/product/resume/resume_v1_professional_experiences.rbs +0 -13
  940. data/sig/mindee/product/resume/resume_v1_social_networks_url.rbs +0 -15
  941. data/sig/mindee/product/resume/resume_v1_social_networks_urls.rbs +0 -13
  942. data/sig/mindee/product/universal/universal.rbs +0 -14
  943. data/sig/mindee/product/universal/universal_document.rbs +0 -10
  944. data/sig/mindee/product/universal/universal_page.rbs +0 -14
  945. data/sig/mindee/product/universal/universal_prediction.rbs +0 -19
  946. data/sig/mindee/product/us/bank_check/bank_check_v1.rbs +0 -13
  947. data/sig/mindee/product/us/bank_check/bank_check_v1_document.rbs +0 -20
  948. data/sig/mindee/product/us/bank_check/bank_check_v1_page.rbs +0 -19
  949. data/sig/mindee/product/us/healthcare_card/healthcare_card_v1.rbs +0 -13
  950. data/sig/mindee/product/us/healthcare_card/healthcare_card_v1_copay.rbs +0 -17
  951. data/sig/mindee/product/us/healthcare_card/healthcare_card_v1_copays.rbs +0 -15
  952. data/sig/mindee/product/us/healthcare_card/healthcare_card_v1_document.rbs +0 -30
  953. data/sig/mindee/product/us/healthcare_card/healthcare_card_v1_page.rbs +0 -17
  954. data/sig/mindee/product/us/us_mail/us_mail_v3.rbs +0 -13
  955. data/sig/mindee/product/us/us_mail/us_mail_v3_document.rbs +0 -21
  956. data/sig/mindee/product/us/us_mail/us_mail_v3_page.rbs +0 -17
  957. data/sig/mindee/product/us/us_mail/us_mail_v3_recipient_address.rbs +0 -23
  958. data/sig/mindee/product/us/us_mail/us_mail_v3_recipient_addresses.rbs +0 -15
  959. data/sig/mindee/product/us/us_mail/us_mail_v3_sender_address.rbs +0 -18
  960. data/sig/mindee/product/us/w9/w9_v1.rbs +0 -13
  961. data/sig/mindee/product/us/w9/w9_v1_document.rbs +0 -14
  962. data/sig/mindee/product/us/w9/w9_v1_page.rbs +0 -29
  963. /data/lib/mindee/{extraction.rb → v1/extraction.rb} +0 -0
  964. /data/lib/mindee/{parsing → v1/parsing}/common/extras.rb +0 -0
  965. /data/lib/mindee/{parsing → v1/parsing}/common/ocr.rb +0 -0
  966. /data/lib/mindee/{parsing → v1/parsing}/common.rb +0 -0
  967. /data/lib/mindee/{parsing → v1/parsing}/standard.rb +0 -0
  968. /data/lib/mindee/{parsing → v1/parsing}/universal.rb +0 -0
  969. /data/lib/mindee/{parsing.rb → v1/parsing.rb} +0 -0
  970. /data/lib/mindee/{parsing/v2 → v2/parsing}/field.rb +0 -0
data/lib/mindee/client.rb DELETED
@@ -1,488 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require_relative 'input'
4
- require_relative 'http'
5
- require_relative 'logging'
6
- require_relative 'page_options'
7
- require_relative 'parsing/common/api_response'
8
- require_relative 'parsing/common/job'
9
- require_relative 'parsing/common/workflow_response'
10
- require_relative 'product'
11
-
12
- # Default owner for products.
13
- OTS_OWNER = 'mindee'
14
-
15
- module Mindee
16
- # Class for configuration options in parse calls.
17
- #
18
- # @!attribute all_words [bool] Whether to include the full text for each page.
19
- # This performs a full OCR operation on the server and will increase response time.
20
- # @!attribute full_text [bool] Whether to include the full OCR text response in compatible APIs.
21
- # This performs a full OCR operation on the server and may increase response time.
22
- # @!attribute close_file [bool] Whether to `close()` the file after parsing it.
23
- # Set to false if you need to access the file after this operation.
24
- # @!attribute page_options [PageOptions, Hash, nil] Page cutting/merge options:
25
- # * `:page_indexes` Zero-based list of page indexes.
26
- # * `:operation` Operation to apply on the document, given the specified page indexes:
27
- # * `:KEEP_ONLY` - keep only the specified pages, and remove all others.
28
- # * `:REMOVE` - remove the specified pages, and keep all others.
29
- # * `:on_min_pages` Apply the operation only if the document has at least this many pages.
30
- # @!attribute cropper [bool] Whether to include cropper results for each page.
31
- # This performs a cropping operation on the server and will increase response time.
32
- # @!attribute initial_delay_sec [Numeric] Initial delay before polling. Defaults to 2.
33
- # @!attribute delay_sec [Numeric] Delay between polling attempts. Defaults to 1.5.
34
- # @!attribute max_retries [Integer] Maximum number of retries. Defaults to 80.
35
- class ParseOptions
36
- attr_accessor :all_words, :full_text, :close_file, :page_options, :cropper, :rag,
37
- :workflow_id, :initial_delay_sec, :delay_sec, :max_retries
38
-
39
- def initialize(params: {})
40
- params = params.transform_keys(&:to_sym)
41
- @all_words = params.fetch(:all_words, false)
42
- @full_text = params.fetch(:full_text, false)
43
- @close_file = params.fetch(:close_file, true)
44
- raw_page_options = params.fetch(:page_options, nil)
45
- raw_page_options = PageOptions.new(params: raw_page_options) unless raw_page_options.is_a?(PageOptions)
46
- @page_options = raw_page_options
47
- @cropper = params.fetch(:cropper, false)
48
- @rag = params.fetch(:rag, false)
49
- @workflow_id = params.fetch(:workflow_id, nil)
50
- @initial_delay_sec = params.fetch(:initial_delay_sec, 2)
51
- @delay_sec = params.fetch(:delay_sec, 1.5)
52
- @max_retries = params.fetch(:max_retries, 80)
53
- end
54
- end
55
-
56
- # Class for configuration options in workflow executions.
57
- #
58
- # @!attribute document_alias [String, nil] Alias to give to the document.
59
- # @!attribute priority [Symbol, nil] Priority to give to the document.
60
- # @!attribute full_text [bool] Whether to include the full OCR text response in compatible APIs.
61
- # This performs a full OCR operation on the server and may increase response time.
62
- # @!attribute public_url [String, nil] A unique, encrypted URL for accessing the document validation interface without
63
- # requiring authentication.
64
- # @!attribute rag [bool, nil] Whether to enable Retrieval-Augmented Generation.
65
- # @!attribute page_options [PageOptions, Hash, nil] Page cutting/merge options:
66
- # * `:page_indexes` Zero-based list of page indexes.
67
- # * `:operation` Operation to apply on the document, given the specified page indexes:
68
- # * `:KEEP_ONLY` - keep only the specified pages, and remove all others.
69
- # * `:REMOVE` - remove the specified pages, and keep all others.
70
- # * `:on_min_pages` Apply the operation only if the document has at least this many pages.
71
- # @!attribute close_file [bool, nil] Whether to close the file after sending it. Defaults to true.
72
- class WorkflowOptions
73
- attr_accessor :document_alias, :priority, :full_text, :public_url, :page_options, :rag, :close_file
74
-
75
- def initialize(params: {})
76
- params = params.transform_keys(&:to_sym)
77
- @document_alias = params.fetch(:document_alias, nil)
78
- @priority = params.fetch(:priority, nil)
79
- @full_text = params.fetch(:full_text, false)
80
- @public_url = params.fetch(:public_url, nil)
81
- @rag = params.fetch(:rag, nil)
82
- raw_page_options = params.fetch(:page_options, nil)
83
- raw_page_options = PageOptions.new(params: raw_page_options) unless raw_page_options.is_a?(PageOptions)
84
- @page_options = raw_page_options
85
- @close_file = params.fetch(:close_file, true)
86
- end
87
- end
88
-
89
- # Mindee API Client.
90
- # See: https://developers.mindee.com/docs
91
- class Client
92
- # @param api_key [String]
93
- def initialize(api_key: '')
94
- @api_key = api_key
95
- end
96
-
97
- # Enqueue a document for parsing and automatically try to retrieve it if needed.
98
- #
99
- # Accepts options either as a Hash or as a ParseOptions struct.
100
- #
101
- # @param input_source [Mindee::Input::Source::LocalInputSource, Mindee::Input::Source::URLInputSource]
102
- # @param product_class [Mindee::Inference] The class of the product.
103
- # @param endpoint [Mindee::HTTP::Endpoint, nil] Endpoint of the API.
104
- # @param options [Hash] A hash of options to configure the parsing behavior. Possible keys:
105
- # * `:all_words` [bool] Whether to extract all the words on each page.
106
- # This performs a full OCR operation on the server and will increase response time.
107
- # * `:full_text` [bool] Whether to include the full OCR text response in compatible APIs.
108
- # This performs a full OCR operation on the server and may increase response time.
109
- # * `:close_file` [bool] Whether to `close()` the file after parsing it.
110
- # Set to false if you need to access the file after this operation.
111
- # * `:page_options` [Hash, nil] Page cutting/merge options:
112
- # - `:page_indexes` [Array<Integer>] Zero-based list of page indexes.
113
- # - `:operation` [Symbol] Operation to apply on the document, given the `page_indexes` specified:
114
- # - `:KEEP_ONLY` - keep only the specified pages, and remove all others.
115
- # - `:REMOVE` - remove the specified pages, and keep all others.
116
- # - `:on_min_pages` [Integer] Apply the operation only if the document has at least this many pages.
117
- # * `:cropper` [bool, nil] Whether to include cropper results for each page.
118
- # This performs a cropping operation on the server and will increase response time.
119
- # * `:initial_delay_sec` [Numeric] Initial delay before polling. Defaults to 2.
120
- # * `:delay_sec` [Numeric] Delay between polling attempts. Defaults to 1.5.
121
- # * `:max_retries` [Integer] Maximum number of retries. Defaults to 80.
122
- # @param enqueue [bool] Whether to enqueue the file.
123
- # @return [Mindee::Parsing::Common::ApiResponse]
124
- def parse(input_source, product_class, endpoint: nil, options: {}, enqueue: true)
125
- opts = normalize_parse_options(options)
126
- process_pdf_if_required(input_source, opts) if input_source.is_a?(Input::Source::LocalInputSource)
127
- endpoint ||= initialize_endpoint(product_class)
128
-
129
- if enqueue && product_class.has_async
130
- enqueue_and_parse(input_source, product_class, endpoint, opts)
131
- else
132
- parse_sync(input_source, product_class, endpoint, opts)
133
- end
134
- end
135
-
136
- # Call prediction API on a document and parse the results.
137
- #
138
- # @param input_source [Mindee::Input::Source::LocalInputSource, Mindee::Input::Source::URLInputSource]
139
- # @param product_class [Mindee::Inference] class of the product
140
- # @param endpoint [Mindee::HTTP::Endpoint, nil] Endpoint of the API.
141
- # @param options [Hash] A hash of options to configure the parsing behavior. Possible keys:
142
- # * `:all_words` [bool] Whether to extract all the words on each page.
143
- # This performs a full OCR operation on the server and will increase response time.
144
- # * `:full_text` [bool] Whether to include the full OCR text response in compatible APIs.
145
- # This performs a full OCR operation on the server and may increase response time.
146
- # * `:close_file` [bool] Whether to `close()` the file after parsing it.
147
- # Set to false if you need to access the file after this operation.
148
- # * `:page_options` [Hash, nil] Page cutting/merge options:
149
- # - `:page_indexes` [Array<Integer>] Zero-based list of page indexes.
150
- # - `:operation` [Symbol] Operation to apply on the document, given the `page_indexes` specified:
151
- # - `:KEEP_ONLY` - keep only the specified pages, and remove all others.
152
- # - `:REMOVE` - remove the specified pages, and keep all others.
153
- # - `:on_min_pages` [Integer] Apply the operation only if the document has at least this many pages.
154
- # * `:cropper` [bool, nil] Whether to include cropper results for each page.
155
- # This performs a cropping operation on the server and will increase response time.
156
- # @return [Mindee::Parsing::Common::ApiResponse]
157
- def parse_sync(input_source, product_class, endpoint, options)
158
- logger.debug("Parsing document as '#{endpoint.url_root}'")
159
-
160
- prediction, raw_http = endpoint.predict(
161
- input_source,
162
- options
163
- )
164
-
165
- Mindee::Parsing::Common::ApiResponse.new(product_class, prediction, raw_http.to_s)
166
- end
167
-
168
- # Enqueue a document for async parsing
169
- #
170
- # @param input_source [Mindee::Input::Source::LocalInputSource, Mindee::Input::Source::URLInputSource]
171
- # The source of the input document (local file or URL).
172
- # @param product_class [Mindee::Inference] The class of the product.
173
- # @param options [Hash] A hash of options to configure the enqueue behavior. Possible keys:
174
- # * `:endpoint` [HTTP::Endpoint, nil] Endpoint of the API.
175
- # Doesn't need to be set in the case of OTS APIs.
176
- # * `:all_words` [bool] Whether to extract all the words on each page.
177
- # This performs a full OCR operation on the server and will increase response time.
178
- # * `:full_text` [bool] Whether to include the full OCR text response in compatible APIs.
179
- # This performs a full OCR operation on the server and may increase response time.
180
- # * `:close_file` [bool] Whether to `close()` the file after parsing it.
181
- # Set to false if you need to access the file after this operation.
182
- # * `:page_options` [Hash, nil] Page cutting/merge options:
183
- # - `:page_indexes` [Array<Integer>] Zero-based list of page indexes.
184
- # - `:operation` [Symbol] Operation to apply on the document, given the `page_indexes` specified:
185
- # - `:KEEP_ONLY` - keep only the specified pages, and remove all others.
186
- # - `:REMOVE` - remove the specified pages, and keep all others.
187
- # - `:on_min_pages` [Integer] Apply the operation only if the document has at least this many pages.
188
- # * `:cropper` [bool] Whether to include cropper results for each page.
189
- # This performs a cropping operation on the server and will increase response time.
190
- # * `:rag` [bool] Whether to enable Retrieval-Augmented Generation. Only works if a Workflow ID is provided.
191
- # * `:workflow_id` [String, nil] ID of the workflow to use.
192
- # @param endpoint [Mindee::HTTP::Endpoint] Endpoint of the API.
193
- # @return [Mindee::Parsing::Common::ApiResponse]
194
- def enqueue(input_source, product_class, endpoint: nil, options: {})
195
- opts = normalize_parse_options(options)
196
- endpoint ||= initialize_endpoint(product_class)
197
- logger.debug("Enqueueing document as '#{endpoint.url_root}'")
198
-
199
- prediction, raw_http = endpoint.predict_async(
200
- input_source,
201
- opts
202
- )
203
- Mindee::Parsing::Common::ApiResponse.new(product_class, prediction, raw_http.to_json)
204
- end
205
-
206
- # Parses a queued document
207
- #
208
- # @param job_id [String] ID of the job (queue) to poll from
209
- # @param product_class [Mindee::Inference] class of the product
210
- # @param endpoint [HTTP::Endpoint, nil] Endpoint of the API
211
- # Doesn't need to be set in the case of OTS APIs.
212
- #
213
- # @return [Mindee::Parsing::Common::ApiResponse]
214
- def parse_queued(job_id, product_class, endpoint: nil)
215
- endpoint = initialize_endpoint(product_class) if endpoint.nil?
216
- logger.debug("Fetching queued document as '#{endpoint.url_root}'")
217
- prediction, raw_http = endpoint.parse_async(job_id)
218
- Mindee::Parsing::Common::ApiResponse.new(product_class, prediction, raw_http.to_json)
219
- end
220
-
221
- # Enqueue a document for async parsing and automatically try to retrieve it
222
- #
223
- # @param input_source [Mindee::Input::Source::LocalInputSource, Mindee::Input::Source::URLInputSource]
224
- # The source of the input document (local file or URL).
225
- # @param product_class [Mindee::Inference] The class of the product.
226
- # @param options [Hash] A hash of options to configure the parsing behavior. Possible keys:
227
- # * `:endpoint` [HTTP::Endpoint, nil] Endpoint of the API.
228
- # Doesn't need to be set in the case of OTS APIs.
229
- # * `:all_words` [bool] Whether to extract all the words on each page.
230
- # This performs a full OCR operation on the server and will increase response time.
231
- # * `:full_text` [bool] Whether to include the full OCR text response in compatible APIs.
232
- # This performs a full OCR operation on the server and may increase response time.
233
- # * `:close_file` [bool] Whether to `close()` the file after parsing it.
234
- # Set to false if you need to access the file after this operation.
235
- # * `:page_options` [Hash, nil] Page cutting/merge options:
236
- # - `:page_indexes` [Array<Integer>] Zero-based list of page indexes.
237
- # - `:operation` [Symbol] Operation to apply on the document, given the `page_indexes` specified:
238
- # - `:KEEP_ONLY` - keep only the specified pages, and remove all others.
239
- # - `:REMOVE` - remove the specified pages, and keep all others.
240
- # - `:on_min_pages` [Integer] Apply the operation only if the document has at least this many pages.
241
- # * `:cropper` [bool, nil] Whether to include cropper results for each page.
242
- # This performs a cropping operation on the server and will increase response time.
243
- # * `:rag` [bool] Whether to enable Retrieval-Augmented Generation. Only works if a Workflow ID is provided.
244
- # * `:workflow_id` [String, nil] ID of the workflow to use.
245
- # * `:initial_delay_sec` [Numeric] Initial delay before polling. Defaults to 2.
246
- # * `:delay_sec` [Numeric] Delay between polling attempts. Defaults to 1.5.
247
- # * `:max_retries` [Integer] Maximum number of retries. Defaults to 80.
248
- # @param endpoint [Mindee::HTTP::Endpoint] Endpoint of the API.
249
- # @return [Mindee::Parsing::Common::ApiResponse]
250
- def enqueue_and_parse(input_source, product_class, endpoint, options)
251
- validate_async_params(options.initial_delay_sec, options.delay_sec, options.max_retries)
252
- enqueue_res = enqueue(input_source, product_class, endpoint: endpoint, options: options)
253
- job = enqueue_res.job or raise Errors::MindeeAPIError, 'Expected job to be present'
254
- job_id = job.id
255
-
256
- sleep(options.initial_delay_sec)
257
- polling_attempts = 1
258
- logger.debug("Successfully enqueued document with job id: '#{job_id}'")
259
- queue_res = parse_queued(job_id, product_class, endpoint: endpoint)
260
- queue_res_job = queue_res.job or raise Errors::MindeeAPIError, 'Expected job to be present'
261
- valid_statuses = [
262
- Mindee::Parsing::Common::JobStatus::WAITING,
263
- Mindee::Parsing::Common::JobStatus::PROCESSING,
264
- ]
265
- # @type var valid_statuses: Array[(:waiting | :processing | :completed | :failed)]
266
- while valid_statuses.include?(queue_res_job.status) && polling_attempts < options.max_retries
267
- logger.debug("Polling server for parsing result with job id: '#{job_id}'. Attempt #{polling_attempts}")
268
- sleep(options.delay_sec)
269
- queue_res = parse_queued(job_id, product_class, endpoint: endpoint)
270
- queue_res_job = queue_res.job or raise Errors::MindeeAPIError, 'Expected job to be present'
271
- polling_attempts += 1
272
- end
273
-
274
- if queue_res_job.status != Mindee::Parsing::Common::JobStatus::COMPLETED
275
- elapsed = options.initial_delay_sec + (polling_attempts * options.delay_sec.to_f)
276
- raise Errors::MindeeAPIError,
277
- "Asynchronous parsing request timed out after #{elapsed} seconds (#{polling_attempts} tries)"
278
- end
279
-
280
- queue_res
281
- end
282
-
283
- # Sends a document to a workflow.
284
- #
285
- # Accepts options either as a Hash or as a WorkflowOptions struct.
286
- #
287
- # @param input_source [Mindee::Input::Source::LocalInputSource, Mindee::Input::Source::URLInputSource]
288
- # @param workflow_id [String]
289
- # @param options [Hash, WorkflowOptions] Options to configure workflow behavior. Possible keys:
290
- # * `document_alias` [String, nil] Alias to give to the document.
291
- # * `priority` [Symbol, nil] Priority to give to the document.
292
- # * `full_text` [bool] Whether to include the full OCR text response in compatible APIs.
293
- # * `rag` [bool, nil] Whether to enable Retrieval-Augmented Generation.
294
- #
295
- # * `public_url` [String, nil] A unique, encrypted URL for accessing the document validation interface without
296
- # requiring authentication.
297
- # * `page_options` [Hash, nil] Page cutting/merge options:
298
- # * `:page_indexes` Zero-based list of page indexes.
299
- # * `:operation` Operation to apply on the document, given the `page_indexes specified:
300
- # * `:KEEP_ONLY` - keep only the specified pages, and remove all others.
301
- # * `:REMOVE` - remove the specified pages, and keep all others.
302
- # * `:on_min_pages` Apply the operation only if document has at least this many pages.
303
- # @return [Mindee::Parsing::Common::WorkflowResponse]
304
- def execute_workflow(input_source, workflow_id, options: {})
305
- opts = options.is_a?(WorkflowOptions) ? options : WorkflowOptions.new(params: options)
306
- if opts.respond_to?(:page_options) && input_source.is_a?(Input::Source::LocalInputSource)
307
- process_pdf_if_required(input_source, opts)
308
- end
309
-
310
- workflow_endpoint = Mindee::HTTP::WorkflowEndpoint.new(workflow_id, api_key: @api_key.to_s)
311
- logger.debug("Sending document to workflow '#{workflow_id}'")
312
-
313
- prediction, raw_http = workflow_endpoint.execute_workflow(
314
- input_source,
315
- opts
316
- )
317
-
318
- Mindee::Parsing::Common::WorkflowResponse.new(Product::Universal::Universal, prediction, raw_http)
319
- end
320
-
321
- # Load a prediction.
322
- #
323
- # @param product_class [Mindee::Inference] class of the product
324
- # @param local_response [Mindee::Input::LocalResponse]
325
- # @return [Mindee::Parsing::Common::ApiResponse]
326
- def load_prediction(product_class, local_response)
327
- raise Errors::MindeeAPIError, 'Expected LocalResponse to not be nil.' if local_response.nil?
328
-
329
- response_hash = local_response.as_hash || {}
330
- raise Errors::MindeeAPIError, 'Expected LocalResponse#as_hash to return a hash.' if response_hash.nil?
331
-
332
- Mindee::Parsing::Common::ApiResponse.new(product_class, response_hash, response_hash.to_json)
333
- rescue KeyError, Errors::MindeeAPIError
334
- raise Errors::MindeeInputError, 'No prediction found in local response.'
335
- end
336
-
337
- # Load a document from an absolute path, as a string.
338
- # @param input_path [String] Path of file to open
339
- # @param repair_pdf [bool] Attempts to fix broken pdf if true
340
- # @return [Mindee::Input::Source::PathInputSource]
341
- def source_from_path(input_path, repair_pdf: false)
342
- Input::Source::PathInputSource.new(input_path, repair_pdf: repair_pdf)
343
- end
344
-
345
- # Load a document from raw bytes.
346
- # @param input_bytes [String] Encoding::BINARY byte input
347
- # @param filename [String] The name of the file (without the path)
348
- # @param repair_pdf [bool] Attempts to fix broken pdf if true
349
- # @return [Mindee::Input::Source::BytesInputSource]
350
- def source_from_bytes(input_bytes, filename, repair_pdf: false)
351
- Input::Source::BytesInputSource.new(input_bytes, filename, repair_pdf: repair_pdf)
352
- end
353
-
354
- # Load a document from a base64 encoded string.
355
- # @param base64_string [String] Input to parse as base64 string
356
- # @param filename [String] The name of the file (without the path)
357
- # @param repair_pdf [bool] Attempts to fix broken pdf if true
358
- # @return [Mindee::Input::Source::Base64InputSource]
359
- def source_from_b64string(base64_string, filename, repair_pdf: false)
360
- Input::Source::Base64InputSource.new(base64_string, filename, repair_pdf: repair_pdf)
361
- end
362
-
363
- # Load a document from a normal Ruby `File`.
364
- # @param input_file [File] Input file handle
365
- # @param filename [String] The name of the file (without the path)
366
- # @param repair_pdf [bool] Attempts to fix broken pdf if true
367
- # @return [Mindee::Input::Source::FileInputSource]
368
- def source_from_file(input_file, filename, repair_pdf: false)
369
- Input::Source::FileInputSource.new(input_file, filename, repair_pdf: repair_pdf)
370
- end
371
-
372
- # Load a document from a secure remote source (HTTPS).
373
- # @param url [String] URL of the file
374
- # @return [Mindee::Input::Source::URLInputSource]
375
- def source_from_url(url)
376
- Input::Source::URLInputSource.new(url)
377
- end
378
-
379
- # Creates a custom endpoint with the given values.
380
- # Do not set for standard (off the shelf) endpoints.
381
- #
382
- # @param endpoint_name [String] For custom endpoints, the "API name" field in the "Settings" page of the
383
- # API Builder. Do not set for standard (off the shelf) endpoints.
384
- #
385
- # @param account_name [String] For custom endpoints, your account or organization username on the API Builder.
386
- # This is normally not required unless you have a custom endpoint which has the same name as a
387
- # standard (off the shelf) endpoint.
388
- # @param version [String] For custom endpoints, version of the product
389
- # @return [Mindee::HTTP::Endpoint]
390
- def create_endpoint(endpoint_name: '', account_name: '', version: '')
391
- initialize_endpoint(
392
- Mindee::Product::Universal::Universal,
393
- endpoint_name: endpoint_name,
394
- account_name: account_name,
395
- version: version
396
- )
397
- end
398
-
399
- # Validates the parameters for async auto-polling
400
- # @param initial_delay_sec [Numeric] initial delay before polling
401
- # @param delay_sec [Numeric] delay between polling attempts
402
- # @param max_retries [Integer, nil] maximum amount of retries.
403
- def validate_async_params(initial_delay_sec, delay_sec, max_retries)
404
- min_delay_sec = 1
405
- min_initial_delay_sec = 1
406
- min_retries = 2
407
-
408
- if delay_sec < min_delay_sec
409
- raise ArgumentError,
410
- "Cannot set auto-poll delay to less than #{min_delay_sec} second(s)"
411
- end
412
- if initial_delay_sec < min_initial_delay_sec
413
- raise ArgumentError,
414
- "Cannot set initial parsing delay to less than #{min_initial_delay_sec} second(s)"
415
- end
416
- raise ArgumentError, "Cannot set auto-poll retries to less than #{min_retries}" if max_retries < min_retries
417
- end
418
-
419
- # Creates an endpoint with the given values. Raises an error if the endpoint is invalid.
420
- # @param product_class [Mindee::Parsing::Common::Inference] class of the product
421
- #
422
- # @param endpoint_name [String] For custom endpoints, the "API name" field in the "Settings" page of the
423
- # API Builder. Do not set for standard (off the shelf) endpoints.
424
- #
425
- # @param account_name [String] For custom endpoints, your account or organization username on the API Builder.
426
- # This is normally not required unless you have a custom endpoint which has the same name as a
427
- # standard (off the shelf) endpoint.
428
- # @param version [String] For custom endpoints, version of the product.
429
- # @return [Mindee::HTTP::Endpoint]
430
- def initialize_endpoint(product_class, endpoint_name: '', account_name: '', version: '')
431
- if (endpoint_name.nil? || endpoint_name.empty?) && product_class == Mindee::Product::Universal::Universal
432
- raise Mindee::Errors::MindeeConfigurationError, 'Missing argument endpoint_name when using custom class'
433
- end
434
-
435
- endpoint_name = fix_endpoint_name(product_class, endpoint_name)
436
- account_name = fix_account_name(account_name)
437
- version = fix_version(product_class, version)
438
-
439
- HTTP::Endpoint.new(account_name, endpoint_name, version, api_key: @api_key.to_s)
440
- end
441
-
442
- def fix_endpoint_name(product_class, endpoint_name)
443
- endpoint_name.nil? || endpoint_name.empty? ? product_class.endpoint_name.to_s : endpoint_name.to_s
444
- end
445
-
446
- def fix_account_name(account_name)
447
- if account_name.nil? || account_name.empty?
448
- logger.info("No account name provided, #{OTS_OWNER} will be used by default.")
449
- return OTS_OWNER
450
- end
451
-
452
- account_name
453
- end
454
-
455
- def fix_version(product_class, version)
456
- return version unless version.nil? || version.empty?
457
-
458
- if product_class.endpoint_version.nil? || product_class.endpoint_version.to_s.empty?
459
- logger.debug('No version provided for a custom build, will attempt to poll version 1 by default.')
460
- return '1'
461
- end
462
- product_class.endpoint_version || ''
463
- end
464
-
465
- # If needed, converts the parsing options provided as a hash into a proper ParseOptions object.
466
- # @param options [Hash, ParseOptions] Options.
467
- # @return [ParseOptions]
468
- def normalize_parse_options(options)
469
- return options if options.is_a?(ParseOptions)
470
-
471
- ParseOptions.new(params: options)
472
- end
473
-
474
- # Processes a PDF if parameters were provided.
475
- # @param input_source [Mindee::Input::Source::LocalInputSource, Mindee::Input::Source::URLInputSource]
476
- # @param opts [ParseOptions]
477
- def process_pdf_if_required(input_source, opts)
478
- return unless input_source.is_a?(Mindee::Input::Source::LocalInputSource) &&
479
- opts.page_options.on_min_pages &&
480
- input_source.pdf?
481
-
482
- input_source.process_pdf(opts.page_options)
483
- end
484
-
485
- private :parse_sync, :validate_async_params, :initialize_endpoint, :fix_endpoint_name, :fix_version,
486
- :fix_account_name, :process_pdf_if_required, :normalize_parse_options
487
- end
488
- end
@@ -1,109 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require_relative 'input'
4
- require_relative 'http'
5
- require_relative 'product'
6
- require_relative 'parsing/common/api_response'
7
- require_relative 'parsing/common/job'
8
- require_relative 'parsing/common/workflow_response'
9
- require_relative 'logging'
10
-
11
- module Mindee
12
- # Mindee V2 API Client.
13
- class ClientV2
14
- # @return [HTTP::MindeeApiV2]
15
- private attr_reader :mindee_api
16
-
17
- # @param api_key [String]
18
- def initialize(api_key: '')
19
- @mindee_api = Mindee::HTTP::MindeeApiV2.new(api_key: api_key)
20
- end
21
-
22
- # Retrieves an inference.
23
- # @param inference_id [String]
24
- # @return [Mindee::Parsing::V2::InferenceResponse]
25
- def get_inference(inference_id)
26
- @mindee_api.req_get_inference(inference_id)
27
- end
28
-
29
- # Retrieves an inference.
30
- # @param job_id [String]
31
- # @return [Mindee::Parsing::V2::JobResponse]
32
- def get_job(job_id)
33
- @mindee_api.req_get_job(job_id)
34
- end
35
-
36
- # Enqueue a document for async parsing.
37
- # @param input_source [Mindee::Input::Source::LocalInputSource, Mindee::Input::Source::URLInputSource]
38
- # The source of the input document (local file or URL).
39
- # @param params [Hash, InferenceParameters]
40
- # @return [Mindee::Parsing::V2::JobResponse]
41
- def enqueue_inference(input_source, params)
42
- normalized_params = normalize_inference_parameters(params)
43
- logger.debug("Enqueueing document to model '#{normalized_params.model_id}'.")
44
-
45
- @mindee_api.req_post_inference_enqueue(input_source, normalized_params)
46
- end
47
-
48
- # Enqueue a document for async parsing and automatically try to retrieve it.
49
- # @param input_source [Mindee::Input::Source::LocalInputSource, Mindee::Input::Source::URLInputSource]
50
- # The source of the input document (local file or URL).
51
- # @param params [Hash, InferenceParameters] Parameters for the inference.
52
- # @return [Mindee::Parsing::V2::InferenceResponse]
53
- def enqueue_and_get_inference(input_source, params)
54
- normalized_params = normalize_inference_parameters(params)
55
- normalized_params.validate_async_params
56
- enqueue_response = enqueue_inference(input_source, normalized_params)
57
-
58
- if enqueue_response.job.id.nil? || enqueue_response.job.id.empty?
59
- logger.error("Failed enqueueing:\n#{enqueue_response.raw_http}")
60
- raise Mindee::Errors::MindeeError, 'Enqueueing of the document failed.'
61
- end
62
-
63
- job_id = enqueue_response.job.id
64
- logger.debug("Successfully enqueued document with job id: #{job_id}.")
65
-
66
- sleep(normalized_params.polling_options.initial_delay_sec)
67
- retry_counter = 1
68
- poll_results = get_job(job_id)
69
-
70
- while retry_counter < normalized_params.polling_options.max_retries
71
- if poll_results.job.status == 'Failed'
72
- break
73
- elsif poll_results.job.status == 'Processed'
74
- return get_inference(poll_results.job.id)
75
- end
76
-
77
- logger.debug(
78
- "Successfully enqueued inference with job id: #{job_id}.\n" \
79
- "Attempt n°#{retry_counter}/#{normalized_params.polling_options.max_retries}.\n" \
80
- "Job status: #{poll_results.job.status}."
81
- )
82
-
83
- sleep(normalized_params.polling_options.delay_sec)
84
- poll_results = get_job(job_id)
85
- retry_counter += 1
86
- end
87
-
88
- error = poll_results.job.error
89
- unless error.nil?
90
- err_to_raise = Mindee::Errors::MindeeHTTPErrorV2.new(error)
91
- # NOTE: purposefully decoupled from the line above, otherwise rubocop thinks `error` is a `message` param.
92
- raise err_to_raise
93
- end
94
-
95
- sec_count = normalized_params.polling_options.delay_sec * retry_counter
96
- raise Mindee::Errors::MindeeError,
97
- "Asynchronous parsing request timed out after #{sec_count} seconds"
98
- end
99
-
100
- # If needed, converts the parsing options provided as a hash into a proper InferenceParameters object.
101
- # @param params [Hash, InferenceParameters] Params.
102
- # @return [InferenceParameters]
103
- def normalize_inference_parameters(params)
104
- return params if params.is_a?(Input::InferenceParameters)
105
-
106
- Input::InferenceParameters.from_hash(params: params)
107
- end
108
- end
109
- end
@@ -1,17 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Mindee
4
- module Errors
5
- # Base class for all custom mindee errors.
6
- class MindeeError < StandardError; end
7
-
8
- # Errors relating to library issues.
9
- class MindeeAPIError < MindeeError; end
10
-
11
- # Errors relating to misuse of the library.
12
- class MindeeConfigurationError < MindeeError; end
13
-
14
- # Errors relating to geometric manipulation issues.
15
- class MindeeGeometryError < MindeeError; end
16
- end
17
- end
@@ -1,36 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require_relative 'mindee_error'
4
-
5
- module Mindee
6
- module Errors
7
- # API HttpError
8
- class MindeeHTTPError < MindeeError
9
- # @return [String]
10
- attr_reader :status_code
11
- # @return [Integer]
12
- attr_reader :api_code
13
- # @return [String]
14
- attr_reader :api_details
15
- # @return [String]
16
- attr_reader :api_message
17
-
18
- # @param http_error [Hash]
19
- # @param url [String]
20
- # @param code [Integer]
21
- def initialize(http_error, url, code)
22
- @status_code = code
23
- @api_code = http_error['code']
24
- @api_details = http_error['details']
25
- @api_message = http_error['message']
26
- super("#{url} #{@status_code} HTTP error: #{@api_details} - #{@api_message}")
27
- end
28
- end
29
-
30
- # Base class for all client-side errors.
31
- class MindeeHTTPClientError < MindeeHTTPError; end
32
-
33
- # Base class for all server-side errors.
34
- class MindeeHTTPServerError < MindeeHTTPError; end
35
- end
36
- end