mindee 4.6.0 → 4.7.0.pre.rc1
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +12 -0
- data/README.md +21 -222
- data/docs/code_samples/default_v2.txt +28 -0
- data/lib/mindee/client.rb +11 -30
- data/lib/mindee/client_v2.rb +109 -0
- data/lib/mindee/errors/mindee_http_error_v2.rb +26 -0
- data/lib/mindee/errors.rb +1 -0
- data/lib/mindee/geometry/point.rb +2 -2
- data/lib/mindee/geometry/quadrilateral.rb +4 -4
- data/lib/mindee/geometry/utils.rb +1 -0
- data/lib/mindee/http/api_settings_v2.rb +61 -0
- data/lib/mindee/http/endpoint.rb +12 -6
- data/lib/mindee/http/http_error_handler.rb +17 -4
- data/lib/mindee/http/mindee_api_v2.rb +148 -0
- data/lib/mindee/http/response_validation.rb +20 -1
- data/lib/mindee/http/workflow_endpoint.rb +2 -2
- data/lib/mindee/http.rb +2 -0
- data/lib/mindee/image/extracted_image.rb +1 -1
- data/lib/mindee/image/image_extractor.rb +10 -10
- data/lib/mindee/input/inference_parameters.rb +116 -0
- data/lib/mindee/input/local_response.rb +10 -1
- data/lib/mindee/input/polling_options.rb +26 -0
- data/lib/mindee/input/sources/base64_input_source.rb +2 -2
- data/lib/mindee/input/sources/local_input_source.rb +19 -12
- data/lib/mindee/input.rb +2 -0
- data/lib/mindee/page_options.rb +24 -0
- data/lib/mindee/parsing/common/api_request.rb +2 -2
- data/lib/mindee/parsing/common/api_response.rb +4 -0
- data/lib/mindee/parsing/common/execution.rb +1 -1
- data/lib/mindee/parsing/common/extras/extras.rb +2 -2
- data/lib/mindee/parsing/common/extras/rag_extra.rb +2 -0
- data/lib/mindee/parsing/common/ocr/ocr.rb +4 -6
- data/lib/mindee/parsing/common/orientation.rb +2 -2
- data/lib/mindee/parsing/common/product.rb +6 -1
- data/lib/mindee/parsing/standard/amount_field.rb +2 -2
- data/lib/mindee/parsing/standard/feature_field.rb +1 -1
- data/lib/mindee/parsing/standard/tax_field.rb +1 -1
- data/lib/mindee/parsing/universal/universal_list_field.rb +2 -2
- data/lib/mindee/parsing/universal/universal_object_field.rb +6 -3
- data/lib/mindee/parsing/v2/common_response.rb +18 -0
- data/lib/mindee/parsing/v2/error_response.rb +36 -0
- data/lib/mindee/parsing/v2/field/base_field.rb +60 -0
- data/lib/mindee/parsing/v2/field/field_confidence.rb +91 -0
- data/lib/mindee/parsing/v2/field/field_location.rb +36 -0
- data/lib/mindee/parsing/v2/field/inference_fields.rb +96 -0
- data/lib/mindee/parsing/v2/field/list_field.rb +88 -0
- data/lib/mindee/parsing/v2/field/object_field.rb +102 -0
- data/lib/mindee/parsing/v2/field/simple_field.rb +56 -0
- data/lib/mindee/parsing/v2/field.rb +9 -0
- data/lib/mindee/parsing/v2/inference.rb +50 -0
- data/lib/mindee/parsing/v2/inference_file.rb +38 -0
- data/lib/mindee/parsing/v2/inference_model.rb +18 -0
- data/lib/mindee/parsing/v2/inference_response.rb +30 -0
- data/lib/mindee/parsing/v2/inference_result.rb +49 -0
- data/lib/mindee/parsing/v2/inference_result_options.rb +21 -0
- data/lib/mindee/parsing/v2/job.rb +86 -0
- data/lib/mindee/parsing/v2/job_response.rb +30 -0
- data/lib/mindee/parsing/v2/job_webhook.rb +60 -0
- data/lib/mindee/parsing/v2/raw_text.rb +21 -0
- data/lib/mindee/parsing/v2.rb +15 -0
- data/lib/mindee/pdf/extracted_pdf.rb +5 -3
- data/lib/mindee/pdf/pdf_extractor.rb +11 -7
- data/lib/mindee/pdf/pdf_processor.rb +6 -6
- data/lib/mindee/pdf/pdf_tools.rb +4 -2
- data/lib/mindee/product/universal/universal_prediction.rb +4 -4
- data/lib/mindee/version.rb +2 -2
- data/lib/mindee.rb +6 -0
- data/mindee.gemspec +1 -1
- data/sig/custom/mini_magick.rbs +14 -7
- data/sig/custom/net_http.rbs +4 -4
- data/sig/custom/origami.rbs +9 -4
- data/sig/mindee/client.rbs +14 -19
- data/sig/mindee/client_v2.rbs +17 -0
- data/sig/mindee/errors/mindee_http_error.rbs +6 -5
- data/sig/mindee/errors/mindee_http_error_v2.rbs +12 -0
- data/sig/mindee/errors/mindee_input_error.rbs +3 -2
- data/sig/mindee/geometry/min_max.rbs +4 -3
- data/sig/mindee/geometry/point.rbs +5 -6
- data/sig/mindee/geometry/polygon.rbs +3 -3
- data/sig/mindee/geometry/quadrilateral.rbs +5 -8
- data/sig/mindee/geometry/utils.rbs +8 -8
- data/sig/mindee/http/api_settings_v2.rbs +23 -0
- data/sig/mindee/http/endpoint.rbs +12 -11
- data/sig/mindee/http/http_error_handler.rbs +8 -3
- data/sig/mindee/http/mindee_api_v2.rbs +18 -0
- data/sig/mindee/http/response_validation.rbs +1 -0
- data/sig/mindee/http/workflow_endpoint.rbs +1 -1
- data/sig/mindee/image/extracted_image.rbs +2 -2
- data/sig/mindee/image/image_compressor.rbs +1 -1
- data/sig/mindee/image/image_extractor.rbs +5 -5
- data/sig/mindee/image/image_utils.rbs +10 -10
- data/sig/mindee/input/inference_parameters.rbs +30 -0
- data/sig/mindee/input/local_response.rbs +6 -5
- data/sig/mindee/input/polling_options.rbs +12 -0
- data/sig/mindee/input/sources/base64_input_source.rbs +1 -1
- data/sig/mindee/input/sources/local_input_source.rbs +10 -7
- data/sig/mindee/input/sources/url_input_source.rbs +1 -1
- data/sig/mindee/logging/logger.rbs +2 -0
- data/sig/mindee/page_options.rbs +11 -0
- data/sig/mindee/parsing/common/api_request.rbs +6 -6
- data/sig/mindee/parsing/common/api_response.rbs +2 -2
- data/sig/mindee/parsing/common/document.rbs +10 -10
- data/sig/mindee/parsing/common/execution.rbs +15 -14
- data/sig/mindee/parsing/common/execution_file.rbs +3 -3
- data/sig/mindee/parsing/common/extras/cropper_extra.rbs +3 -2
- data/sig/mindee/parsing/common/extras/extras.rbs +6 -5
- data/sig/mindee/parsing/common/extras/full_text_ocr_extra.rbs +2 -1
- data/sig/mindee/parsing/common/inference.rbs +16 -9
- data/sig/mindee/parsing/common/job.rbs +2 -2
- data/sig/mindee/parsing/common/ocr/mvision_v1.rbs +2 -2
- data/sig/mindee/parsing/common/ocr/ocr.rbs +22 -20
- data/sig/mindee/parsing/common/orientation.rbs +4 -3
- data/sig/mindee/parsing/common/page.rbs +6 -5
- data/sig/mindee/parsing/common/product.rbs +4 -4
- data/sig/mindee/parsing/common/workflow_response.rbs +8 -4
- data/sig/mindee/parsing/standard/abstract_field.rbs +1 -1
- data/sig/mindee/parsing/standard/address_field.rbs +1 -1
- data/sig/mindee/parsing/standard/amount_field.rbs +6 -4
- data/sig/mindee/parsing/standard/base_field.rbs +1 -1
- data/sig/mindee/parsing/standard/boolean_field.rbs +1 -1
- data/sig/mindee/parsing/standard/company_registration_field.rbs +3 -2
- data/sig/mindee/parsing/standard/date_field.rbs +6 -6
- data/sig/mindee/parsing/standard/locale_field.rbs +1 -1
- data/sig/mindee/parsing/standard/payment_details_field.rbs +7 -6
- data/sig/mindee/parsing/standard/position_field.rbs +2 -2
- data/sig/mindee/parsing/standard/string_field.rbs +1 -1
- data/sig/mindee/parsing/standard/tax_field.rbs +8 -7
- data/sig/mindee/parsing/universal/universal_list_field.rbs +4 -5
- data/sig/mindee/parsing/universal/universal_object_field.rbs +17 -11
- data/sig/mindee/parsing/v2/common_response.rbs +11 -0
- data/sig/mindee/parsing/v2/error_response.rbs +16 -0
- data/sig/mindee/parsing/v2/field/base_field.rbs +17 -0
- data/sig/mindee/parsing/v2/field/field_confidence.rbs +27 -0
- data/sig/mindee/parsing/v2/field/field_location.rbs +16 -0
- data/sig/mindee/parsing/v2/field/inference_fields.rbs +19 -0
- data/sig/mindee/parsing/v2/field/list_field.rbs +22 -0
- data/sig/mindee/parsing/v2/field/object_field.rbs +21 -0
- data/sig/mindee/parsing/v2/field/simple_field.rbs +16 -0
- data/sig/mindee/parsing/v2/inference.rbs +16 -0
- data/sig/mindee/parsing/v2/inference_file.rbs +15 -0
- data/sig/mindee/parsing/v2/inference_model.rbs +11 -0
- data/sig/mindee/parsing/v2/inference_response.rbs +12 -0
- data/sig/mindee/parsing/v2/inference_result.rbs +13 -0
- data/sig/mindee/parsing/v2/inference_result_options.rbs +11 -0
- data/sig/mindee/parsing/v2/job.rbs +22 -0
- data/sig/mindee/parsing/v2/job_response.rbs +12 -0
- data/sig/mindee/parsing/v2/job_webhook.rbs +17 -0
- data/sig/mindee/parsing/v2/raw_text.rbs +12 -0
- data/sig/mindee/pdf/extracted_pdf.rbs +6 -6
- data/sig/mindee/pdf/pdf_compressor.rbs +4 -4
- data/sig/mindee/pdf/pdf_extractor.rbs +8 -7
- data/sig/mindee/pdf/pdf_processor.rbs +4 -4
- data/sig/mindee/pdf/pdf_tools.rbs +22 -16
- data/sig/mindee/product/barcode_reader/barcode_reader_v1.rbs +1 -1
- data/sig/mindee/product/barcode_reader/barcode_reader_v1_document.rbs +1 -1
- data/sig/mindee/product/barcode_reader/barcode_reader_v1_page.rbs +2 -2
- data/sig/mindee/product/bill_of_lading/bill_of_lading_v1.rbs +1 -1
- data/sig/mindee/product/bill_of_lading/bill_of_lading_v1_carrier.rbs +2 -2
- data/sig/mindee/product/bill_of_lading/bill_of_lading_v1_carrier_item.rbs +3 -3
- data/sig/mindee/product/bill_of_lading/bill_of_lading_v1_consignee.rbs +2 -2
- data/sig/mindee/product/bill_of_lading/bill_of_lading_v1_document.rbs +1 -1
- data/sig/mindee/product/bill_of_lading/bill_of_lading_v1_notify_party.rbs +2 -2
- data/sig/mindee/product/bill_of_lading/bill_of_lading_v1_page.rbs +2 -2
- data/sig/mindee/product/bill_of_lading/bill_of_lading_v1_shipper.rbs +2 -2
- data/sig/mindee/product/business_card/business_card_v1.rbs +1 -1
- data/sig/mindee/product/business_card/business_card_v1_document.rbs +1 -1
- data/sig/mindee/product/business_card/business_card_v1_page.rbs +2 -2
- data/sig/mindee/product/cropper/cropper_v1.rbs +1 -1
- data/sig/mindee/product/cropper/cropper_v1_document.rbs +1 -1
- data/sig/mindee/product/cropper/cropper_v1_page.rbs +2 -2
- data/sig/mindee/product/delivery_note/delivery_note_v1.rbs +1 -1
- data/sig/mindee/product/delivery_note/delivery_note_v1_document.rbs +1 -1
- data/sig/mindee/product/delivery_note/delivery_note_v1_page.rbs +2 -2
- data/sig/mindee/product/driver_license/driver_license_v1.rbs +1 -1
- data/sig/mindee/product/driver_license/driver_license_v1_document.rbs +1 -1
- data/sig/mindee/product/driver_license/driver_license_v1_page.rbs +2 -2
- data/sig/mindee/product/financial_document/financial_document_v1.rbs +1 -1
- data/sig/mindee/product/financial_document/financial_document_v1_document.rbs +1 -1
- data/sig/mindee/product/financial_document/financial_document_v1_line_item.rbs +3 -3
- data/sig/mindee/product/financial_document/financial_document_v1_page.rbs +2 -2
- data/sig/mindee/product/fr/bank_account_details/bank_account_details_v1.rbs +1 -1
- data/sig/mindee/product/fr/bank_account_details/bank_account_details_v1_document.rbs +1 -1
- data/sig/mindee/product/fr/bank_account_details/bank_account_details_v1_page.rbs +2 -2
- data/sig/mindee/product/fr/bank_account_details/bank_account_details_v2.rbs +1 -1
- data/sig/mindee/product/fr/bank_account_details/bank_account_details_v2_bban.rbs +2 -2
- data/sig/mindee/product/fr/bank_account_details/bank_account_details_v2_document.rbs +1 -1
- data/sig/mindee/product/fr/bank_account_details/bank_account_details_v2_page.rbs +2 -2
- data/sig/mindee/product/fr/bank_statement/bank_statement_v2.rbs +1 -1
- data/sig/mindee/product/fr/bank_statement/bank_statement_v2_document.rbs +1 -1
- data/sig/mindee/product/fr/bank_statement/bank_statement_v2_page.rbs +2 -2
- data/sig/mindee/product/fr/bank_statement/bank_statement_v2_transaction.rbs +3 -3
- data/sig/mindee/product/fr/carte_grise/carte_grise_v1.rbs +1 -1
- data/sig/mindee/product/fr/carte_grise/carte_grise_v1_document.rbs +1 -1
- data/sig/mindee/product/fr/carte_grise/carte_grise_v1_page.rbs +2 -2
- data/sig/mindee/product/fr/energy_bill/energy_bill_v1.rbs +1 -1
- data/sig/mindee/product/fr/energy_bill/energy_bill_v1_document.rbs +1 -1
- data/sig/mindee/product/fr/energy_bill/energy_bill_v1_energy_consumer.rbs +2 -2
- data/sig/mindee/product/fr/energy_bill/energy_bill_v1_energy_supplier.rbs +2 -2
- data/sig/mindee/product/fr/energy_bill/energy_bill_v1_energy_usage.rbs +3 -3
- data/sig/mindee/product/fr/energy_bill/energy_bill_v1_meter_detail.rbs +2 -2
- data/sig/mindee/product/fr/energy_bill/energy_bill_v1_page.rbs +2 -2
- data/sig/mindee/product/fr/energy_bill/energy_bill_v1_subscription.rbs +3 -3
- data/sig/mindee/product/fr/energy_bill/energy_bill_v1_taxes_and_contribution.rbs +3 -3
- data/sig/mindee/product/fr/health_card/health_card_v1.rbs +1 -1
- data/sig/mindee/product/fr/health_card/health_card_v1_document.rbs +1 -1
- data/sig/mindee/product/fr/health_card/health_card_v1_page.rbs +2 -2
- data/sig/mindee/product/fr/id_card/id_card_v1.rbs +1 -1
- data/sig/mindee/product/fr/id_card/id_card_v1_document.rbs +1 -1
- data/sig/mindee/product/fr/id_card/id_card_v1_page.rbs +2 -2
- data/sig/mindee/product/fr/id_card/id_card_v2.rbs +1 -1
- data/sig/mindee/product/fr/id_card/id_card_v2_document.rbs +1 -1
- data/sig/mindee/product/fr/id_card/id_card_v2_page.rbs +2 -2
- data/sig/mindee/product/fr/payslip/payslip_v2.rbs +1 -1
- data/sig/mindee/product/fr/payslip/payslip_v2_bank_account_detail.rbs +2 -2
- data/sig/mindee/product/fr/payslip/payslip_v2_document.rbs +1 -1
- data/sig/mindee/product/fr/payslip/payslip_v2_employee.rbs +2 -2
- data/sig/mindee/product/fr/payslip/payslip_v2_employer.rbs +2 -2
- data/sig/mindee/product/fr/payslip/payslip_v2_employment.rbs +2 -2
- data/sig/mindee/product/fr/payslip/payslip_v2_page.rbs +2 -2
- data/sig/mindee/product/fr/payslip/payslip_v2_pay_detail.rbs +2 -2
- data/sig/mindee/product/fr/payslip/payslip_v2_pay_period.rbs +2 -2
- data/sig/mindee/product/fr/payslip/payslip_v2_pto.rbs +2 -2
- data/sig/mindee/product/fr/payslip/payslip_v2_salary_detail.rbs +3 -3
- data/sig/mindee/product/fr/payslip/payslip_v3.rbs +1 -1
- data/sig/mindee/product/fr/payslip/payslip_v3_bank_account_detail.rbs +2 -2
- data/sig/mindee/product/fr/payslip/payslip_v3_document.rbs +1 -1
- data/sig/mindee/product/fr/payslip/payslip_v3_employee.rbs +2 -2
- data/sig/mindee/product/fr/payslip/payslip_v3_employer.rbs +2 -2
- data/sig/mindee/product/fr/payslip/payslip_v3_employment.rbs +2 -2
- data/sig/mindee/product/fr/payslip/payslip_v3_page.rbs +2 -2
- data/sig/mindee/product/fr/payslip/payslip_v3_paid_time_off.rbs +3 -3
- data/sig/mindee/product/fr/payslip/payslip_v3_pay_detail.rbs +2 -2
- data/sig/mindee/product/fr/payslip/payslip_v3_pay_period.rbs +2 -2
- data/sig/mindee/product/fr/payslip/payslip_v3_salary_detail.rbs +3 -3
- data/sig/mindee/product/ind/indian_passport/indian_passport_v1.rbs +1 -1
- data/sig/mindee/product/ind/indian_passport/indian_passport_v1_document.rbs +1 -1
- data/sig/mindee/product/ind/indian_passport/indian_passport_v1_page.rbs +2 -2
- data/sig/mindee/product/international_id/international_id_v2.rbs +1 -1
- data/sig/mindee/product/international_id/international_id_v2_document.rbs +1 -1
- data/sig/mindee/product/international_id/international_id_v2_page.rbs +2 -2
- data/sig/mindee/product/invoice/invoice_v4.rbs +1 -1
- data/sig/mindee/product/invoice/invoice_v4_document.rbs +1 -1
- data/sig/mindee/product/invoice/invoice_v4_line_item.rbs +3 -3
- data/sig/mindee/product/invoice/invoice_v4_page.rbs +2 -2
- data/sig/mindee/product/invoice_splitter/invoice_splitter_v1.rbs +1 -1
- data/sig/mindee/product/invoice_splitter/invoice_splitter_v1_document.rbs +1 -1
- data/sig/mindee/product/invoice_splitter/invoice_splitter_v1_invoice_page_group.rbs +3 -3
- data/sig/mindee/product/invoice_splitter/invoice_splitter_v1_page.rbs +2 -2
- data/sig/mindee/product/multi_receipts_detector/multi_receipts_detector_v1.rbs +1 -1
- data/sig/mindee/product/multi_receipts_detector/multi_receipts_detector_v1_document.rbs +1 -1
- data/sig/mindee/product/multi_receipts_detector/multi_receipts_detector_v1_page.rbs +2 -2
- data/sig/mindee/product/nutrition_facts_label/nutrition_facts_label_v1.rbs +1 -1
- data/sig/mindee/product/nutrition_facts_label/nutrition_facts_label_v1_added_sugar.rbs +2 -2
- data/sig/mindee/product/nutrition_facts_label/nutrition_facts_label_v1_calorie.rbs +2 -2
- data/sig/mindee/product/nutrition_facts_label/nutrition_facts_label_v1_cholesterol.rbs +2 -2
- data/sig/mindee/product/nutrition_facts_label/nutrition_facts_label_v1_dietary_fiber.rbs +2 -2
- data/sig/mindee/product/nutrition_facts_label/nutrition_facts_label_v1_document.rbs +1 -1
- data/sig/mindee/product/nutrition_facts_label/nutrition_facts_label_v1_nutrient.rbs +3 -3
- data/sig/mindee/product/nutrition_facts_label/nutrition_facts_label_v1_page.rbs +2 -2
- data/sig/mindee/product/nutrition_facts_label/nutrition_facts_label_v1_protein.rbs +2 -2
- data/sig/mindee/product/nutrition_facts_label/nutrition_facts_label_v1_saturated_fat.rbs +2 -2
- data/sig/mindee/product/nutrition_facts_label/nutrition_facts_label_v1_serving_size.rbs +2 -2
- data/sig/mindee/product/nutrition_facts_label/nutrition_facts_label_v1_sodium.rbs +2 -2
- data/sig/mindee/product/nutrition_facts_label/nutrition_facts_label_v1_total_carbohydrate.rbs +2 -2
- data/sig/mindee/product/nutrition_facts_label/nutrition_facts_label_v1_total_fat.rbs +2 -2
- data/sig/mindee/product/nutrition_facts_label/nutrition_facts_label_v1_total_sugar.rbs +2 -2
- data/sig/mindee/product/nutrition_facts_label/nutrition_facts_label_v1_trans_fat.rbs +2 -2
- data/sig/mindee/product/passport/passport_v1.rbs +1 -1
- data/sig/mindee/product/passport/passport_v1_document.rbs +1 -1
- data/sig/mindee/product/passport/passport_v1_page.rbs +2 -2
- data/sig/mindee/product/receipt/receipt_v5.rbs +1 -1
- data/sig/mindee/product/receipt/receipt_v5_document.rbs +1 -1
- data/sig/mindee/product/receipt/receipt_v5_line_item.rbs +3 -3
- data/sig/mindee/product/receipt/receipt_v5_page.rbs +2 -2
- data/sig/mindee/product/resume/resume_v1.rbs +1 -1
- data/sig/mindee/product/resume/resume_v1_certificate.rbs +3 -3
- data/sig/mindee/product/resume/resume_v1_document.rbs +1 -1
- data/sig/mindee/product/resume/resume_v1_education.rbs +3 -3
- data/sig/mindee/product/resume/resume_v1_language.rbs +3 -3
- data/sig/mindee/product/resume/resume_v1_page.rbs +2 -2
- data/sig/mindee/product/resume/resume_v1_professional_experience.rbs +3 -3
- data/sig/mindee/product/resume/resume_v1_social_networks_url.rbs +3 -3
- data/sig/mindee/product/universal/universal.rbs +5 -5
- data/sig/mindee/product/universal/universal_document.rbs +1 -1
- data/sig/mindee/product/universal/universal_page.rbs +2 -2
- data/sig/mindee/product/universal/universal_prediction.rbs +5 -5
- data/sig/mindee/product/us/bank_check/bank_check_v1.rbs +1 -1
- data/sig/mindee/product/us/bank_check/bank_check_v1_document.rbs +1 -1
- data/sig/mindee/product/us/bank_check/bank_check_v1_page.rbs +2 -2
- data/sig/mindee/product/us/healthcare_card/healthcare_card_v1.rbs +1 -1
- data/sig/mindee/product/us/healthcare_card/healthcare_card_v1_copay.rbs +3 -3
- data/sig/mindee/product/us/healthcare_card/healthcare_card_v1_document.rbs +1 -1
- data/sig/mindee/product/us/healthcare_card/healthcare_card_v1_page.rbs +2 -2
- data/sig/mindee/product/us/us_mail/us_mail_v2.rbs +1 -1
- data/sig/mindee/product/us/us_mail/us_mail_v2_document.rbs +1 -1
- data/sig/mindee/product/us/us_mail/us_mail_v2_page.rbs +2 -2
- data/sig/mindee/product/us/us_mail/us_mail_v2_recipient_address.rbs +3 -3
- data/sig/mindee/product/us/us_mail/us_mail_v2_sender_address.rbs +2 -2
- data/sig/mindee/product/us/us_mail/us_mail_v3.rbs +1 -1
- data/sig/mindee/product/us/us_mail/us_mail_v3_document.rbs +1 -1
- data/sig/mindee/product/us/us_mail/us_mail_v3_page.rbs +2 -2
- data/sig/mindee/product/us/us_mail/us_mail_v3_recipient_address.rbs +3 -3
- data/sig/mindee/product/us/us_mail/us_mail_v3_sender_address.rbs +2 -2
- data/sig/mindee/product/us/w9/w9_v1.rbs +1 -1
- data/sig/mindee/product/us/w9/w9_v1_document.rbs +1 -1
- data/sig/mindee/product/us/w9/w9_v1_page.rbs +2 -2
- data/sig/mindee/version.rbs +2 -2
- metadata +61 -6
@@ -2,12 +2,12 @@
|
|
2
2
|
module Mindee
|
3
3
|
module Image
|
4
4
|
module ImageExtractor
|
5
|
-
def self.attach_image_as_new_file: (
|
5
|
+
def self.attach_image_as_new_file: (StringIO | File, ?format: String) -> Origami::PDF
|
6
6
|
def self.to_blob: () -> String
|
7
|
-
def self.extract_multiple_images_from_source: (
|
8
|
-
def self.extract_images_from_polygons: (
|
9
|
-
def self.create_extracted_image: (StringIO, String,
|
10
|
-
def self.load_input_source_pdf_page_as_stringio: (
|
7
|
+
def self.extract_multiple_images_from_source: (Input::Source::LocalInputSource, Integer, Array[Array[Geometry::Point] |Geometry::Polygon | Geometry::Quadrilateral]) -> Array[ExtractedImage]
|
8
|
+
def self.extract_images_from_polygons: (Input::Source::LocalInputSource, StringIO | File, Integer, Array[Array[Geometry::Point] | Geometry::Polygon | Geometry::Quadrilateral]) -> Array[ExtractedImage]
|
9
|
+
def self.create_extracted_image: (StringIO | File, String, Integer, Integer) -> void
|
10
|
+
def self.load_input_source_pdf_page_as_stringio: (Input::Source::LocalInputSource, Integer) -> (StringIO | File)
|
11
11
|
end
|
12
12
|
end
|
13
13
|
end
|
@@ -2,17 +2,17 @@
|
|
2
2
|
module Mindee
|
3
3
|
module Image
|
4
4
|
module ImageUtils
|
5
|
-
def self.resize_image: (
|
6
|
-
def self.compress_image_quality: (
|
7
|
-
def self.to_image: (
|
8
|
-
def self.image_to_stringio: (
|
9
|
-
def self.calculate_new_dimensions: (
|
10
|
-
def self.calculate_dimensions_from_media_box: (
|
11
|
-
def self.pdf_to_magick_image: (StringIO, Integer) ->
|
5
|
+
def self.resize_image: (MiniMagick::Image, Integer, Integer) -> void
|
6
|
+
def self.compress_image_quality: (MiniMagick::Image, untyped) -> void
|
7
|
+
def self.to_image: (MiniMagick::Image | StringIO | IO | File | Tempfile?) -> (MiniMagick::Image)
|
8
|
+
def self.image_to_stringio: (MiniMagick::Image, ?String) -> StringIO
|
9
|
+
def self.calculate_new_dimensions: (MiniMagick::Image, ?max_width: Integer | Float?, ?max_height: Integer | Float?) -> [Integer, Integer]
|
10
|
+
def self.calculate_dimensions_from_media_box: (MiniMagick::Image, Array[Integer]?) -> [Integer, Integer]
|
11
|
+
def self.pdf_to_magick_image: (StringIO | File, Integer) -> MiniMagick::Image
|
12
12
|
def self.normalize_polygon: (Geometry::Quadrilateral | Geometry::Polygon | Array[Geometry::Point]) -> Geometry::Quadrilateral
|
13
|
-
def self.read_page_content: (StringIO) ->
|
14
|
-
def self.crop_image: (
|
15
|
-
def self.write_image_to_buffer: (
|
13
|
+
def self.read_page_content: (StringIO | File) -> (MiniMagick::Image)
|
14
|
+
def self.crop_image: (MiniMagick::Image, Geometry::MinMax, Geometry::MinMax) -> (MiniMagick::Image)
|
15
|
+
def self.write_image_to_buffer: (MiniMagick::Image, StringIO) -> void
|
16
16
|
def self.determine_file_extension: (Input::Source::LocalInputSource) -> String?
|
17
17
|
end
|
18
18
|
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
# lib/mindee/input/inference_parameters.rb
|
2
|
+
module Mindee
|
3
|
+
module Input
|
4
|
+
class InferenceParameters
|
5
|
+
attr_reader close_file: bool
|
6
|
+
attr_reader file_alias: String?
|
7
|
+
attr_reader model_id: String
|
8
|
+
attr_reader polling_options: PollingOptions
|
9
|
+
attr_reader rag: bool?
|
10
|
+
attr_reader webhook_ids: Array[String]?
|
11
|
+
|
12
|
+
def initialize: (
|
13
|
+
String,
|
14
|
+
?rag: bool?,
|
15
|
+
?file_alias: String?,
|
16
|
+
?webhook_ids: Array[String]?,
|
17
|
+
?polling_options: Hash[Symbol | String, untyped] | PollingOptions?,
|
18
|
+
?close_file: bool?
|
19
|
+
) -> void
|
20
|
+
|
21
|
+
def self.from_hash: (params: Hash[String | Symbol, untyped]) -> InferenceParameters
|
22
|
+
|
23
|
+
def validate_async_params: -> void
|
24
|
+
|
25
|
+
private
|
26
|
+
|
27
|
+
def get_clean_polling_options: (Hash[String | Symbol, untyped] | PollingOptions?) -> PollingOptions
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
@@ -3,11 +3,12 @@ module Mindee
|
|
3
3
|
module Input
|
4
4
|
class LocalResponse
|
5
5
|
def file: -> StringIO
|
6
|
-
def initialize: (
|
7
|
-
def as_hash: ->
|
8
|
-
def self.process_secret_key: (
|
9
|
-
def get_hmac_signature: (
|
10
|
-
def valid_hmac_signature?: (
|
6
|
+
def initialize: (File | IO | StringIO | String | Pathname) -> void
|
7
|
+
def as_hash: -> Hash[String | Symbol, untyped]
|
8
|
+
def self.process_secret_key: (String) -> String
|
9
|
+
def get_hmac_signature: (String) -> String
|
10
|
+
def valid_hmac_signature?: (String, String) -> bool
|
11
|
+
def deserialize_response: (singleton(Parsing::V2::JobResponse) | singleton(Parsing::V2::InferenceResponse))-> (Parsing::V2::JobResponse | Parsing::V2::InferenceResponse)
|
11
12
|
end
|
12
13
|
end
|
13
14
|
end
|
@@ -0,0 +1,12 @@
|
|
1
|
+
# lib/mindee/input/polling_options.rb
|
2
|
+
module Mindee
|
3
|
+
module Input
|
4
|
+
class PollingOptions
|
5
|
+
attr_reader delay_sec: Integer | Float
|
6
|
+
attr_reader initial_delay_sec: Integer | Float
|
7
|
+
attr_reader max_retries: Integer
|
8
|
+
|
9
|
+
def initialize: (?initial_delay_sec: Float, ?delay_sec: Float, ?max_retries: Integer) -> Integer
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
@@ -4,7 +4,7 @@ module Mindee
|
|
4
4
|
module Source
|
5
5
|
class Base64InputSource < LocalInputSource
|
6
6
|
def initialize: (String, String, ?repair_pdf: bool) -> void
|
7
|
-
def read_contents: (?close: bool) -> [String
|
7
|
+
def read_contents: (?close: bool) -> [String?, Hash[:filename, String]]
|
8
8
|
end
|
9
9
|
end
|
10
10
|
end
|
@@ -4,17 +4,20 @@ module Mindee
|
|
4
4
|
module Source
|
5
5
|
ALLOWED_MIME_TYPES: Array[String]
|
6
6
|
class LocalInputSource
|
7
|
-
|
8
|
-
|
9
|
-
|
7
|
+
attr_reader file_mimetype: String
|
8
|
+
attr_reader filename: String
|
9
|
+
attr_reader io_stream: StringIO | File
|
10
10
|
def initialize: (StringIO | File, String, ?repair_pdf: bool) -> void
|
11
|
-
def logger: () ->
|
12
|
-
|
11
|
+
def logger: () -> Logger
|
12
|
+
|
13
|
+
|
14
|
+
def rescue_broken_pdf: (StringIO | File) -> (StringIO | File)
|
13
15
|
def pdf?: -> bool
|
16
|
+
def apply_page_options: (PageOptions) -> StringIO?
|
14
17
|
def process_pdf: (PageOptions) -> StringIO?
|
15
|
-
def read_contents: (?close: bool) -> [String
|
18
|
+
def read_contents: (?close: bool) -> [String?, Hash[:filename, String]]
|
16
19
|
def count_pages: -> Integer
|
17
|
-
def write_to_file: (String) -> void
|
20
|
+
def write_to_file: (String?) -> void
|
18
21
|
def compress!: (?quality: Integer, ?max_width: Integer?, ?max_height: Integer?, ?force_source_text: bool, ?disable_source_text: bool) -> Integer
|
19
22
|
def source_text?: -> bool?
|
20
23
|
end
|
@@ -4,7 +4,7 @@ module Mindee
|
|
4
4
|
module Source
|
5
5
|
class URLInputSource
|
6
6
|
def url: -> String
|
7
|
-
def logger: () ->
|
7
|
+
def logger: () -> Logger
|
8
8
|
def initialize: (String) -> void
|
9
9
|
def write_to_file: (String, ?filename: String?, ?username: String?, ?password: String?, ?token: String?, ?max_redirects: Integer) -> String
|
10
10
|
def as_local_input_source: (?filename: String?, ?username: String?, ?password: String?, ?token: String?, ?max_redirects: Integer) -> BytesInputSource?
|
@@ -0,0 +1,11 @@
|
|
1
|
+
# lib/mindee/page_options.rb
|
2
|
+
|
3
|
+
module Mindee
|
4
|
+
class PageOptions
|
5
|
+
attr_accessor page_indexes: Array[Integer]
|
6
|
+
attr_accessor operation: :KEEP_ONLY | :REMOVE
|
7
|
+
attr_accessor on_min_pages: Integer?
|
8
|
+
|
9
|
+
def initialize: (params: Hash[String | Symbol, untyped]) -> void
|
10
|
+
end
|
11
|
+
end
|
@@ -3,12 +3,12 @@ module Mindee
|
|
3
3
|
module Parsing
|
4
4
|
module Common
|
5
5
|
class ApiRequest
|
6
|
-
def error: -> untyped
|
7
|
-
def ressources: ->
|
8
|
-
def status: ->
|
9
|
-
def status_code: ->
|
10
|
-
def url: ->
|
11
|
-
def initialize: (untyped) ->
|
6
|
+
def error: -> Hash[String, untyped]
|
7
|
+
def ressources: -> Array[String]
|
8
|
+
def status: -> [RequestStatus, Symbol]
|
9
|
+
def status_code: -> Integer
|
10
|
+
def url: -> String
|
11
|
+
def initialize: (Hash[String, untyped]) -> void
|
12
12
|
end
|
13
13
|
end
|
14
14
|
end
|
@@ -15,12 +15,12 @@ module Mindee
|
|
15
15
|
|
16
16
|
|
17
17
|
class ApiResponse
|
18
|
-
def logger: () ->
|
18
|
+
def logger: () -> Logger
|
19
19
|
def document: -> Parsing::Common::Document?
|
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[
|
23
|
+
def initialize: (singleton(Parsing::Common::Inference), Hash[String | Symbol, untyped] | Net::HTTPResponse, String) -> void
|
24
24
|
end
|
25
25
|
end
|
26
26
|
end
|
@@ -3,17 +3,17 @@ module Mindee
|
|
3
3
|
module Parsing
|
4
4
|
module Common
|
5
5
|
class Document
|
6
|
-
def inference: ->
|
7
|
-
def name: ->
|
8
|
-
def id: ->
|
9
|
-
def extras: ->
|
10
|
-
def ocr: ->
|
11
|
-
def n_pages: ->
|
12
|
-
def self.load_ocr: (untyped) -> Parsing::Common::OCR::OCR?
|
13
|
-
def self.extract_extras: (untyped) -> Parsing::Common::Extras::Extras?
|
14
|
-
def initialize: (
|
6
|
+
def inference: -> Inference
|
7
|
+
def name: -> String
|
8
|
+
def id: -> String
|
9
|
+
def extras: -> Extras::Extras?
|
10
|
+
def ocr: -> OCR::OCR?
|
11
|
+
def n_pages: -> Integer
|
12
|
+
def self.load_ocr: (Hash[String | Symbol, untyped]) -> Parsing::Common::OCR::OCR?
|
13
|
+
def self.extract_extras: (Hash[String | Symbol, untyped]) -> Parsing::Common::Extras::Extras?
|
14
|
+
def initialize: (singleton(Parsing::Common::Inference), Hash[String | Symbol, untyped]) -> void
|
15
15
|
def to_s: -> String
|
16
|
-
def inject_full_text_ocr: (untyped) ->
|
16
|
+
def inject_full_text_ocr: (Hash[String | Symbol, untyped]) -> void
|
17
17
|
end
|
18
18
|
end
|
19
19
|
end
|
@@ -3,20 +3,21 @@ module Mindee
|
|
3
3
|
module Parsing
|
4
4
|
module Common
|
5
5
|
class Execution
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
6
|
+
attr_reader available_at: Time?
|
7
|
+
attr_reader batch_name: String
|
8
|
+
attr_reader created_at: Time
|
9
|
+
attr_reader file: ExecutionFile
|
10
|
+
attr_reader id: String
|
11
|
+
attr_reader inference: Inference
|
12
|
+
attr_reader priority: Symbol?
|
13
|
+
attr_reader reviewed_at: Time?
|
14
|
+
attr_reader reviewed_prediction: Prediction?
|
15
|
+
attr_reader status: Symbol
|
16
|
+
attr_reader type: String?
|
17
|
+
attr_reader uploaded_at: Time?
|
18
|
+
attr_reader workflow_id: String
|
19
|
+
|
20
|
+
def initialize: (singleton(Parsing::Common::Inference), Hash[String | Symbol, untyped]) -> void
|
20
21
|
end
|
21
22
|
end
|
22
23
|
end
|
@@ -3,9 +3,9 @@ module Mindee
|
|
3
3
|
module Parsing
|
4
4
|
module Common
|
5
5
|
class ExecutionFile
|
6
|
-
def name: ->
|
7
|
-
def alias: ->
|
8
|
-
def initialize: (untyped) ->
|
6
|
+
def name: -> String
|
7
|
+
def alias: -> String?
|
8
|
+
def initialize: (Hash[String | Symbol, untyped]) -> void
|
9
9
|
end
|
10
10
|
end
|
11
11
|
end
|
@@ -4,8 +4,9 @@ module Mindee
|
|
4
4
|
module Common
|
5
5
|
module Extras
|
6
6
|
class CropperExtra
|
7
|
-
|
8
|
-
|
7
|
+
attr_reader croppings: Array[Standard::PositionField]
|
8
|
+
|
9
|
+
def initialize: (Hash[String | Symbol, untyped], ?Integer?) -> void
|
9
10
|
def to_s: -> String
|
10
11
|
end
|
11
12
|
end
|
@@ -4,12 +4,13 @@ module Mindee
|
|
4
4
|
module Common
|
5
5
|
module Extras
|
6
6
|
class Extras
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
7
|
+
attr_reader cropper: CropperExtra?
|
8
|
+
attr_reader full_text_ocr: FullTextOCRExtra
|
9
|
+
attr_reader rag: RAGExtra?
|
10
|
+
|
11
|
+
def initialize: (Hash[String | Symbol, untyped]) -> void
|
11
12
|
def to_s: -> String
|
12
|
-
def add_artificial_extra: (untyped) ->
|
13
|
+
def add_artificial_extra: (Hash[String | Symbol, untyped]) -> void
|
13
14
|
end
|
14
15
|
def empty?: -> bool
|
15
16
|
end
|
@@ -6,8 +6,9 @@ module Mindee
|
|
6
6
|
class FullTextOCRExtra
|
7
7
|
def contents: -> String?
|
8
8
|
def language: -> String?
|
9
|
-
def initialize: (untyped) -> nil
|
9
|
+
def initialize: (Hash[String | Symbol, untyped]) -> nil
|
10
10
|
def to_s: -> String
|
11
|
+
def <<: (?untyped?) -> untyped
|
11
12
|
end
|
12
13
|
end
|
13
14
|
end
|
@@ -3,16 +3,23 @@ module Mindee
|
|
3
3
|
module Parsing
|
4
4
|
module Common
|
5
5
|
class Inference
|
6
|
-
def
|
7
|
-
def
|
8
|
-
def
|
9
|
-
def
|
10
|
-
|
6
|
+
def self.endpoint_name: () -> String?
|
7
|
+
def self.endpoint_version: () -> String?
|
8
|
+
def self.has_async: () -> bool
|
9
|
+
def self.has_sync: () -> bool
|
10
|
+
|
11
|
+
attr_reader endpoint_name: String
|
12
|
+
attr_reader endpoint_version: String
|
13
|
+
attr_reader extras: Extras::Extras
|
14
|
+
attr_reader has_async: bool
|
15
|
+
attr_reader has_sync: bool
|
16
|
+
attr_reader is_rotation_applied: bool
|
17
|
+
attr_reader pages: Array[Page]
|
18
|
+
attr_reader prediction: Prediction
|
19
|
+
attr_reader product: Product
|
20
|
+
|
21
|
+
def initialize: (Hash[String | Symbol, untyped]) -> void
|
11
22
|
def to_s: -> String
|
12
|
-
def self.endpoint_name: -> String
|
13
|
-
def self.endpoint_version: -> String
|
14
|
-
def self.has_async: -> bool
|
15
|
-
def self.has_sync: -> bool
|
16
23
|
end
|
17
24
|
end
|
18
25
|
end
|
@@ -8,8 +8,8 @@ module Mindee
|
|
8
8
|
def available_at: -> Time
|
9
9
|
def status: () -> (:waiting | :processing | :completed | :failed)
|
10
10
|
def millisecs_taken: -> Integer
|
11
|
-
def error: -> Hash[
|
12
|
-
def initialize: (Hash[
|
11
|
+
def error: -> Hash[String | Symbol, untyped]
|
12
|
+
def initialize: (Hash[String | Symbol, untyped]) -> void
|
13
13
|
end
|
14
14
|
end
|
15
15
|
end
|
@@ -5,9 +5,9 @@ module Mindee
|
|
5
5
|
module OCR
|
6
6
|
class MVisionV1
|
7
7
|
def pages: -> []
|
8
|
-
def initialize: (untyped) ->
|
8
|
+
def initialize: (Hash[String | Symbol, untyped]) -> void
|
9
9
|
def to_s: -> String
|
10
|
-
def reconstruct_vertically: (
|
10
|
+
def reconstruct_vertically: (Array[Geometry::Point], Integer, Float) -> OCRLine
|
11
11
|
end
|
12
12
|
end
|
13
13
|
end
|
@@ -4,34 +4,36 @@ module Mindee
|
|
4
4
|
module Common
|
5
5
|
module OCR
|
6
6
|
class OCRWord
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
def initialize: (untyped) -> void
|
13
|
-
def to_s: ->
|
7
|
+
attr_reader bounding_box: Geometry::Quadrilateral
|
8
|
+
attr_accessor confidence: Float
|
9
|
+
attr_reader polygon: Geometry::Polygon
|
10
|
+
attr_reader text: String
|
11
|
+
|
12
|
+
def initialize: (Hash[String | Symbol, untyped]) -> void
|
13
|
+
def to_s: -> String
|
14
14
|
end
|
15
|
-
class OCRLine < Array[
|
16
|
-
def initialize: (?Array[untyped]?, ?Array[
|
15
|
+
class OCRLine < Array[OCRWord]
|
16
|
+
def initialize: (?Array[untyped]?, ?Array[OCRWord]?) -> void
|
17
17
|
def sort_on_x: -> OCRLine
|
18
18
|
def to_s: -> String
|
19
19
|
end
|
20
20
|
class OCRPage
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
def
|
21
|
+
attr_reader all_words: Array[OCRWord]
|
22
|
+
attr_reader lines: Array[OCRLine]
|
23
|
+
|
24
|
+
def initialize: (Hash[String | Symbol, untyped]) -> void
|
25
|
+
def all_lines: -> Array[OCRLine]
|
25
26
|
def to_s: -> String
|
26
|
-
def parse_one: (Array[OCRWord],
|
27
|
-
def to_lines: -> Array[
|
28
|
-
def words_on_same_line?: (OCRWord, OCRWord) ->
|
27
|
+
def parse_one: (Array[OCRWord], OCRWord?, Array[Integer], Array[OCRLine]) -> Array[OCRLine]?
|
28
|
+
def to_lines: -> Array[OCRLine]
|
29
|
+
def words_on_same_line?: (OCRWord, OCRWord) -> bool
|
29
30
|
end
|
30
31
|
class OCR
|
31
|
-
|
32
|
-
|
33
|
-
def
|
34
|
-
def
|
32
|
+
attr_reader mvision_v1: MVisionV1
|
33
|
+
|
34
|
+
def initialize: (Hash[String | Symbol, untyped]) -> void
|
35
|
+
def to_s: -> String
|
36
|
+
def reconstruct_vertically: (Array[Geometry::Point], Integer, ?Float) -> OCRLine
|
35
37
|
end
|
36
38
|
end
|
37
39
|
end
|
@@ -3,9 +3,10 @@ module Mindee
|
|
3
3
|
module Parsing
|
4
4
|
module Common
|
5
5
|
class Orientation
|
6
|
-
|
7
|
-
|
8
|
-
|
6
|
+
attr_reader page_id: Integer?
|
7
|
+
attr_reader value: Integer?
|
8
|
+
|
9
|
+
def initialize: (Hash[String | Symbol, untyped], Integer?) -> void
|
9
10
|
end
|
10
11
|
end
|
11
12
|
end
|
@@ -3,11 +3,12 @@ module Mindee
|
|
3
3
|
module Parsing
|
4
4
|
module Common
|
5
5
|
class Page
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
6
|
+
attr_reader extras: Extras::Extras
|
7
|
+
attr_reader orientation: Common::Orientation
|
8
|
+
attr_reader page_id: Integer
|
9
|
+
attr_reader prediction: Common::Prediction
|
10
|
+
|
11
|
+
def initialize: (Hash[String | Symbol, untyped]) -> void
|
11
12
|
def to_s: -> String
|
12
13
|
end
|
13
14
|
end
|
@@ -3,10 +3,10 @@ module Mindee
|
|
3
3
|
module Parsing
|
4
4
|
module Common
|
5
5
|
class Product
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
def initialize: (Hash[String, untyped]) ->
|
6
|
+
attr_reader name: String
|
7
|
+
attr_reader type: String?
|
8
|
+
attr_reader version: String
|
9
|
+
def initialize: (Hash[String | Symbol, untyped]) -> void
|
10
10
|
end
|
11
11
|
end
|
12
12
|
end
|
@@ -3,10 +3,14 @@ module Mindee
|
|
3
3
|
module Parsing
|
4
4
|
module Common
|
5
5
|
class WorkflowResponse
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
6
|
+
@api_request: ApiRequest
|
7
|
+
@execution: Execution
|
8
|
+
@raw_http: String
|
9
|
+
|
10
|
+
def execution: -> Execution
|
11
|
+
def api_request: -> ApiRequest
|
12
|
+
def raw_http: -> String
|
13
|
+
def initialize: (singleton(Parsing::Common::Inference), Hash[String | Symbol, untyped] | Net::HTTPResponse, String) -> void
|
10
14
|
end
|
11
15
|
end
|
12
16
|
end
|
@@ -8,7 +8,7 @@ module Mindee
|
|
8
8
|
def page_id: -> Integer?
|
9
9
|
def confidence: -> Float?
|
10
10
|
def confidence=: (Float?) -> Float?
|
11
|
-
def initialize: (Hash[
|
11
|
+
def initialize: (Hash[String | Symbol, untyped], Integer?) -> void
|
12
12
|
def to_s: -> String
|
13
13
|
def self.array_confidence: (Array[untyped]) -> Float
|
14
14
|
def self.array_sum: (Array[untyped]) -> Float
|
@@ -11,7 +11,7 @@ module Mindee
|
|
11
11
|
def postal_code: -> String
|
12
12
|
def state: -> String
|
13
13
|
def country: -> String
|
14
|
-
def initialize: (Hash[
|
14
|
+
def initialize: (Hash[String | Symbol, untyped], ?Integer?, ?reconstructed: bool) -> void
|
15
15
|
end
|
16
16
|
end
|
17
17
|
end
|
@@ -2,10 +2,12 @@
|
|
2
2
|
module Mindee
|
3
3
|
module Parsing
|
4
4
|
module Standard
|
5
|
-
class AmountField
|
6
|
-
|
7
|
-
|
8
|
-
|
5
|
+
class AmountField < BaseField
|
6
|
+
attr_reader value: Float?
|
7
|
+
|
8
|
+
|
9
|
+
def initialize: (Hash[String | Symbol, untyped], Integer?, ?reconstructed: bool) -> void
|
10
|
+
def to_s: -> String
|
9
11
|
end
|
10
12
|
end
|
11
13
|
end
|
@@ -3,7 +3,7 @@ module Mindee
|
|
3
3
|
module Parsing
|
4
4
|
module Standard
|
5
5
|
class BaseField < Parsing::Standard::AbstractField
|
6
|
-
def initialize: (Hash[
|
6
|
+
def initialize: (Hash[String | Symbol, untyped], Integer?, ?reconstructed: bool) -> void
|
7
7
|
def value: -> (String | Float | Integer | bool)
|
8
8
|
def reconstructed: -> bool
|
9
9
|
end
|
@@ -4,7 +4,7 @@ module Mindee
|
|
4
4
|
module Standard
|
5
5
|
class BooleanField < BaseField
|
6
6
|
def value: -> bool?
|
7
|
-
def initialize: (Hash[
|
7
|
+
def initialize: (Hash[String | Symbol, untyped], ?Integer?, ?reconstructed: false) -> void
|
8
8
|
def to_s: -> String
|
9
9
|
end
|
10
10
|
end
|
@@ -3,8 +3,9 @@ module Mindee
|
|
3
3
|
module Parsing
|
4
4
|
module Standard
|
5
5
|
class CompanyRegistrationField < BaseField
|
6
|
-
|
7
|
-
|
6
|
+
attr_reader type: String
|
7
|
+
|
8
|
+
def initialize: (Hash[String | Symbol, untyped], Integer?, ?reconstructed: false) -> void
|
8
9
|
def to_table_line: -> String
|
9
10
|
def to_s: -> String
|
10
11
|
def printable_values: -> Hash[String, untyped]
|
@@ -2,12 +2,12 @@
|
|
2
2
|
module Mindee
|
3
3
|
module Parsing
|
4
4
|
module Standard
|
5
|
-
class DateField
|
6
|
-
def date_object: ->
|
7
|
-
def value: ->
|
8
|
-
def raw: ->
|
9
|
-
def is_computed: ->
|
10
|
-
def initialize: (untyped,
|
5
|
+
class DateField < BaseField
|
6
|
+
def date_object: -> DateTime
|
7
|
+
def value: -> String?
|
8
|
+
def raw: -> String?
|
9
|
+
def is_computed: -> bool
|
10
|
+
def initialize: (Hash[String | Symbol, untyped], Integer?) -> void
|
11
11
|
end
|
12
12
|
end
|
13
13
|
end
|
@@ -8,7 +8,7 @@ module Mindee
|
|
8
8
|
def country: -> String?
|
9
9
|
def currency: -> String?
|
10
10
|
def value: -> String?
|
11
|
-
def initialize: (Hash[
|
11
|
+
def initialize: (Hash[String | Symbol, untyped], ?Integer?) -> void
|
12
12
|
def to_s: -> String
|
13
13
|
end
|
14
14
|
end
|