mindee 4.2.0 → 4.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (60) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +1 -1
  3. data/CHANGELOG.md +16 -0
  4. data/docs/code_samples/workflow_execution.txt +1 -1
  5. data/docs/code_samples/workflow_polling.txt +36 -0
  6. data/docs/global_products/financial_document_v1.md +22 -4
  7. data/docs/global_products/invoices_v4.md +22 -4
  8. data/docs/localized_products/us_healthcare_cards_v1.md +17 -1
  9. data/lib/mindee/client.rb +13 -13
  10. data/lib/mindee/http/endpoint.rb +37 -47
  11. data/lib/mindee/http/response_validation.rb +1 -1
  12. data/lib/mindee/parsing/common/api_response.rb +1 -1
  13. data/lib/mindee/parsing/common/document.rb +1 -1
  14. data/lib/mindee/parsing/common/extras/extras.rb +4 -1
  15. data/lib/mindee/parsing/common/extras/rag_extra.rb +24 -0
  16. data/lib/mindee/parsing/common/extras.rb +1 -0
  17. data/lib/mindee/parsing/common/inference.rb +3 -0
  18. data/lib/mindee/parsing/standard/tax_field.rb +9 -9
  19. data/lib/mindee/pdf/pdf_extractor.rb +1 -1
  20. data/lib/mindee/product/bill_of_lading/bill_of_lading_v1_carrier_items.rb +2 -2
  21. data/lib/mindee/product/financial_document/financial_document_v1_document.rb +9 -1
  22. data/lib/mindee/product/financial_document/financial_document_v1_line_items.rb +2 -2
  23. data/lib/mindee/product/financial_document/financial_document_v1_page.rb +1 -1
  24. data/lib/mindee/product/fr/bank_statement/bank_statement_v2_transactions.rb +2 -2
  25. data/lib/mindee/product/fr/energy_bill/energy_bill_v1_energy_usages.rb +2 -2
  26. data/lib/mindee/product/fr/energy_bill/energy_bill_v1_subscriptions.rb +2 -2
  27. data/lib/mindee/product/fr/energy_bill/energy_bill_v1_taxes_and_contributions.rb +2 -2
  28. data/lib/mindee/product/fr/payslip/payslip_v2_salary_details.rb +2 -2
  29. data/lib/mindee/product/fr/payslip/payslip_v3_paid_time_offs.rb +2 -2
  30. data/lib/mindee/product/fr/payslip/payslip_v3_salary_details.rb +2 -2
  31. data/lib/mindee/product/invoice/invoice_v4_document.rb +9 -1
  32. data/lib/mindee/product/invoice/invoice_v4_line_items.rb +2 -2
  33. data/lib/mindee/product/invoice/invoice_v4_page.rb +1 -1
  34. data/lib/mindee/product/invoice_splitter/invoice_splitter_v1_invoice_page_groups.rb +2 -2
  35. data/lib/mindee/product/nutrition_facts_label/nutrition_facts_label_v1_nutrients.rb +2 -2
  36. data/lib/mindee/product/receipt/receipt_v5_line_items.rb +2 -2
  37. data/lib/mindee/product/resume/resume_v1_certificates.rb +2 -2
  38. data/lib/mindee/product/resume/resume_v1_educations.rb +2 -2
  39. data/lib/mindee/product/resume/resume_v1_languages.rb +2 -2
  40. data/lib/mindee/product/resume/resume_v1_professional_experiences.rb +2 -2
  41. data/lib/mindee/product/resume/resume_v1_social_networks_urls.rb +2 -2
  42. data/lib/mindee/product/us/healthcare_card/healthcare_card_v1_copay.rb +2 -2
  43. data/lib/mindee/product/us/healthcare_card/healthcare_card_v1_copays.rb +4 -4
  44. data/lib/mindee/product/us/healthcare_card/healthcare_card_v1_document.rb +8 -3
  45. data/lib/mindee/product/us/healthcare_card/healthcare_card_v1_page.rb +1 -1
  46. data/lib/mindee/product/us/us_mail/us_mail_v2_recipient_addresses.rb +2 -2
  47. data/lib/mindee/product/us/us_mail/us_mail_v3_recipient_addresses.rb +2 -2
  48. data/lib/mindee/version.rb +1 -1
  49. data/mindee.gemspec +1 -1
  50. data/sig/custom/net_http.rbs +3 -0
  51. data/sig/mindee/client.rbs +4 -2
  52. data/sig/mindee/http/endpoint.rbs +9 -8
  53. data/sig/mindee/http/response_validation.rbs +3 -3
  54. data/sig/mindee/parsing/common/api_response.rbs +1 -1
  55. data/sig/mindee/parsing/common/extras/full_text_ocr_extra.rbs +2 -2
  56. data/sig/mindee/parsing/common/extras/rag_extra.rbs +15 -0
  57. data/sig/mindee/product/financial_document/financial_document_v1_document.rbs +1 -0
  58. data/sig/mindee/product/invoice/invoice_v4_document.rbs +1 -0
  59. data/sig/mindee/product/us/healthcare_card/healthcare_card_v1_document.rbs +1 -0
  60. metadata +7 -4
@@ -2,9 +2,9 @@
2
2
  module Mindee
3
3
  module HTTP
4
4
  module ResponseValidation
5
- def self.valid_sync_response?: (untyped) -> bool
6
- def self.valid_async_response?: (untyped) -> bool
7
- def self.clean_request!: (untyped) -> nil
5
+ def self.valid_sync_response?: (Net::HTTPResponse) -> bool
6
+ def self.valid_async_response?: (Net::HTTPResponse) -> bool
7
+ def self.clean_request!: (Net::HTTPResponse) -> void
8
8
  end
9
9
  end
10
10
  end
@@ -20,7 +20,7 @@ module Mindee
20
20
  def job: -> Parsing::Common::Job?
21
21
  def api_request: -> Parsing::Common::ApiRequest?
22
22
  def raw_http: -> String
23
- def initialize: (singleton(Parsing::Common::Inference), Hash[Symbol | String, untyped], String) -> void
23
+ def initialize: (singleton(Parsing::Common::Inference), Hash[Symbol | String, untyped] | Net::HTTPResponse, String) -> void
24
24
  end
25
25
  end
26
26
  end
@@ -4,8 +4,8 @@ module Mindee
4
4
  module Common
5
5
  module Extras
6
6
  class FullTextOCRExtra
7
- def contents: -> untyped
8
- def language: -> untyped
7
+ def contents: -> String?
8
+ def language: -> String?
9
9
  def initialize: (untyped) -> nil
10
10
  def to_s: -> String
11
11
  end
@@ -0,0 +1,15 @@
1
+ # lib/mindee/parsing/common/extras/rag_extra.rb
2
+
3
+ module Mindee
4
+ module Parsing
5
+ module Common
6
+ module Extras
7
+ class RAGExtra
8
+ def matching_document_id: -> String?
9
+ def initialize: (untyped) -> nil
10
+ def to_s: -> String
11
+ end
12
+ end
13
+ end
14
+ end
15
+ end
@@ -14,6 +14,7 @@ module Mindee
14
14
  def date: -> (Parsing::Standard::DateField)
15
15
  def document_number: -> (Parsing::Standard::StringField)
16
16
  def document_type: -> (Parsing::Standard::ClassificationField)
17
+ def document_type_extended: -> (Parsing::Standard::ClassificationField)
17
18
  def due_date: -> (Parsing::Standard::DateField)
18
19
  def invoice_number: -> (Parsing::Standard::StringField)
19
20
  def line_items: -> (Product::FinancialDocument::FinancialDocumentV1LineItems)
@@ -12,6 +12,7 @@ module Mindee
12
12
  def customer_name: -> (Parsing::Standard::StringField)
13
13
  def date: -> (Parsing::Standard::DateField)
14
14
  def document_type: -> (Parsing::Standard::ClassificationField)
15
+ def document_type_extended: -> (Parsing::Standard::ClassificationField)
15
16
  def due_date: -> (Parsing::Standard::DateField)
16
17
  def invoice_number: -> (Parsing::Standard::StringField)
17
18
  def line_items: -> (Product::Invoice::InvoiceV4LineItems)
@@ -17,6 +17,7 @@ module Mindee
17
17
  def payer_id: -> (Parsing::Standard::StringField)
18
18
  def rx_bin: -> (Parsing::Standard::StringField)
19
19
  def rx_grp: -> (Parsing::Standard::StringField)
20
+ def rx_id: -> (Parsing::Standard::StringField)
20
21
  def rx_pcn: -> (Parsing::Standard::StringField)
21
22
  def copays_separator: (String) -> String
22
23
  def copays_to_s: -> String
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mindee
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.2.0
4
+ version: 4.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mindee, SA
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2025-03-28 00:00:00.000000000 Z
11
+ date: 2025-04-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: base64
@@ -148,14 +148,14 @@ dependencies:
148
148
  requirements:
149
149
  - - "~>"
150
150
  - !ruby/object:Gem::Version
151
- version: '1.70'
151
+ version: '1.75'
152
152
  type: :development
153
153
  prerelease: false
154
154
  version_requirements: !ruby/object:Gem::Requirement
155
155
  requirements:
156
156
  - - "~>"
157
157
  - !ruby/object:Gem::Version
158
- version: '1.70'
158
+ version: '1.75'
159
159
  - !ruby/object:Gem::Dependency
160
160
  name: steep
161
161
  requirement: !ruby/object:Gem::Requirement
@@ -246,6 +246,7 @@ files:
246
246
  - docs/code_samples/us_mail_v2_async.txt
247
247
  - docs/code_samples/us_mail_v3_async.txt
248
248
  - docs/code_samples/workflow_execution.txt
249
+ - docs/code_samples/workflow_polling.txt
249
250
  - docs/getting_started.md
250
251
  - docs/global_products.md
251
252
  - docs/global_products/barcode_reader_v1.md
@@ -327,6 +328,7 @@ files:
327
328
  - lib/mindee/parsing/common/extras/cropper_extra.rb
328
329
  - lib/mindee/parsing/common/extras/extras.rb
329
330
  - lib/mindee/parsing/common/extras/full_text_ocr_extra.rb
331
+ - lib/mindee/parsing/common/extras/rag_extra.rb
330
332
  - lib/mindee/parsing/common/inference.rb
331
333
  - lib/mindee/parsing/common/job.rb
332
334
  - lib/mindee/parsing/common/ocr.rb
@@ -575,6 +577,7 @@ files:
575
577
  - sig/mindee/parsing/common/extras/cropper_extra.rbs
576
578
  - sig/mindee/parsing/common/extras/extras.rbs
577
579
  - sig/mindee/parsing/common/extras/full_text_ocr_extra.rbs
580
+ - sig/mindee/parsing/common/extras/rag_extra.rbs
578
581
  - sig/mindee/parsing/common/inference.rbs
579
582
  - sig/mindee/parsing/common/job.rbs
580
583
  - sig/mindee/parsing/common/ocr/mvision_v1.rbs