mindee 5.9.0 → 5.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/package.json +12 -13
- package/src/geometry/bbox.d.ts +18 -6
- package/src/geometry/bbox.js +6 -2
- package/src/geometry/boundingBox.d.ts +3 -1
- package/src/geometry/boundingBox.js +3 -1
- package/src/geometry/boundingBoxUtils.d.ts +4 -4
- package/src/geometry/boundingBoxUtils.js +7 -7
- package/src/geometry/minMax.d.ts +9 -3
- package/src/geometry/point.d.ts +3 -1
- package/src/geometry/polygon.d.ts +3 -1
- package/src/geometry/polygon.js +3 -1
- package/src/http/apiCore.js +1 -1
- package/src/http/baseSettings.d.ts +15 -5
- package/src/http/baseSettings.js +4 -2
- package/src/http/dispatcher.js +4 -2
- package/src/image/extractedImage.d.ts +13 -5
- package/src/image/extractedImage.js +3 -3
- package/src/image/extractedImages.d.ts +3 -1
- package/src/image/extractedImages.js +3 -1
- package/src/image/imageCompressor.d.ts +1 -0
- package/src/image/imageCompressor.js +2 -2
- package/src/image/imageExtractor.d.ts +1 -1
- package/src/image/imageExtractor.js +12 -12
- package/src/input/base64Input.d.ts +9 -3
- package/src/input/base64Input.js +9 -3
- package/src/input/bufferInput.d.ts +7 -2
- package/src/input/bufferInput.js +6 -2
- package/src/input/bytesInput.d.ts +10 -3
- package/src/input/bytesInput.js +10 -3
- package/src/input/inputSource.d.ts +4 -2
- package/src/input/inputSource.js +3 -2
- package/src/input/localInputSource.d.ts +19 -6
- package/src/input/localInputSource.js +12 -5
- package/src/input/pageOptions.d.ts +9 -3
- package/src/input/pageOptions.js +6 -2
- package/src/input/pathInput.d.ts +12 -4
- package/src/input/pathInput.js +11 -5
- package/src/input/streamInput.d.ts +14 -5
- package/src/input/streamInput.js +13 -4
- package/src/input/urlInput.d.ts +19 -7
- package/src/input/urlInput.js +20 -12
- package/src/parsing/baseLocalResponse.d.ts +7 -3
- package/src/parsing/baseLocalResponse.js +15 -11
- package/src/parsing/stringDict.d.ts +3 -1
- package/src/pdf/extractedPdf.d.ts +16 -6
- package/src/pdf/extractedPdf.js +5 -3
- package/src/pdf/extractedPdfs.d.ts +3 -1
- package/src/pdf/extractedPdfs.js +3 -1
- package/src/pdf/pdfCompressor.js +14 -14
- package/src/pdf/pdfExtractor.js +1 -1
- package/src/pdf/pdfOperation.d.ts +9 -3
- package/src/pdf/pdfOperation.js +14 -14
- package/src/pdf/pdfUtils.js +1 -1
- package/src/v1/cli.js +1 -1
- package/src/v1/client.d.ts +42 -14
- package/src/v1/client.js +8 -8
- package/src/v1/extraction/invoiceSplitterExtractor/extractedInvoiceSplitterImage.d.ts +6 -2
- package/src/v1/extraction/invoiceSplitterExtractor/invoiceSplitterExtractor.js +4 -4
- package/src/v1/extraction/multiReceiptsExtractor/extractedMultiReceiptImage.d.ts +6 -2
- package/src/v1/extraction/multiReceiptsExtractor/multiReceiptsExtractor.js +2 -2
- package/src/v1/http/apiSettingsV1.d.ts +15 -5
- package/src/v1/http/apiSettingsV1.js +12 -4
- package/src/v1/http/baseEndpoint.d.ts +6 -2
- package/src/v1/http/endpoint.d.ts +9 -3
- package/src/v1/http/endpoint.js +1 -1
- package/src/v1/http/errors.d.ts +9 -3
- package/src/v1/http/errors.js +6 -2
- package/src/v1/http/httpParams.d.ts +36 -12
- package/src/v1/http/workflowEndpoint.js +1 -1
- package/src/v1/parsing/common/apiRequest.d.ts +15 -5
- package/src/v1/parsing/common/apiResponse.d.ts +6 -2
- package/src/v1/parsing/common/asyncPredictResponse.d.ts +21 -7
- package/src/v1/parsing/common/document.d.ts +18 -6
- package/src/v1/parsing/common/document.js +2 -2
- package/src/v1/parsing/common/execution.d.ts +39 -13
- package/src/v1/parsing/common/executionFile.d.ts +6 -2
- package/src/v1/parsing/common/executionPriority.d.ts +12 -4
- package/src/v1/parsing/common/executionPriority.js +12 -4
- package/src/v1/parsing/common/extras/cropperExtra.d.ts +7 -3
- package/src/v1/parsing/common/extras/cropperExtra.js +6 -3
- package/src/v1/parsing/common/extras/extras.d.ts +9 -3
- package/src/v1/parsing/common/extras/extras.js +6 -2
- package/src/v1/parsing/common/extras/fullTextOcrExtra.d.ts +9 -3
- package/src/v1/parsing/common/extras/fullTextOcrExtra.js +3 -1
- package/src/v1/parsing/common/extras/ragExtra.d.ts +3 -1
- package/src/v1/parsing/common/extras/ragExtra.js +3 -1
- package/src/v1/parsing/common/feedback/feedbackResponse.d.ts +3 -1
- package/src/v1/parsing/common/feedback/feedbackResponse.js +0 -1
- package/src/v1/parsing/common/inference.d.ts +24 -8
- package/src/v1/parsing/common/inference.js +6 -2
- package/src/v1/parsing/common/mvisionV1.d.ts +3 -1
- package/src/v1/parsing/common/mvisionV1.js +3 -1
- package/src/v1/parsing/common/ocr.d.ts +3 -1
- package/src/v1/parsing/common/ocrPage.d.ts +6 -2
- package/src/v1/parsing/common/ocrPage.js +6 -2
- package/src/v1/parsing/common/orientation.d.ts +6 -2
- package/src/v1/parsing/common/page.d.ts +12 -4
- package/src/v1/parsing/common/predictResponse.d.ts +3 -1
- package/src/v1/parsing/common/prediction.d.ts +3 -1
- package/src/v1/parsing/common/prediction.js +3 -1
- package/src/v1/parsing/generated/generatedList.d.ts +6 -2
- package/src/v1/parsing/generated/generatedObject.d.ts +25 -9
- package/src/v1/parsing/generated/generatedObject.js +13 -7
- package/src/v1/parsing/localResponse.d.ts +3 -1
- package/src/v1/parsing/localResponse.js +3 -1
- package/src/v1/parsing/standard/addressField.d.ts +24 -8
- package/src/v1/parsing/standard/amount.d.ts +3 -1
- package/src/v1/parsing/standard/amount.js +3 -1
- package/src/v1/parsing/standard/base.d.ts +27 -9
- package/src/v1/parsing/standard/base.js +6 -2
- package/src/v1/parsing/standard/boolean.d.ts +3 -1
- package/src/v1/parsing/standard/classification.d.ts +6 -2
- package/src/v1/parsing/standard/companyRegistration.d.ts +9 -3
- package/src/v1/parsing/standard/companyRegistration.js +3 -1
- package/src/v1/parsing/standard/date.d.ts +12 -4
- package/src/v1/parsing/standard/date.js +3 -1
- package/src/v1/parsing/standard/field.d.ts +7 -5
- package/src/v1/parsing/standard/field.js +4 -4
- package/src/v1/parsing/standard/locale.d.ts +15 -5
- package/src/v1/parsing/standard/paymentDetails.d.ts +15 -5
- package/src/v1/parsing/standard/position.d.ts +15 -5
- package/src/v1/parsing/standard/tax.d.ts +18 -6
- package/src/v1/parsing/standard/tax.js +15 -5
- package/src/v1/parsing/standard/text.d.ts +6 -2
- package/src/v1/parsing/standard/word.d.ts +9 -3
- package/src/v1/parsing/standard/word.js +3 -1
- package/src/v1/product/barcodeReader/barcodeReaderV1.d.ts +12 -4
- package/src/v1/product/barcodeReader/barcodeReaderV1.js +9 -3
- package/src/v1/product/barcodeReader/barcodeReaderV1Document.d.ts +6 -2
- package/src/v1/product/barcodeReader/barcodeReaderV1Document.js +6 -2
- package/src/v1/product/cropper/cropperV1.d.ts +12 -4
- package/src/v1/product/cropper/cropperV1.js +9 -3
- package/src/v1/product/cropper/cropperV1Page.d.ts +3 -1
- package/src/v1/product/cropper/cropperV1Page.js +3 -1
- package/src/v1/product/driverLicense/driverLicenseV1.d.ts +12 -4
- package/src/v1/product/driverLicense/driverLicenseV1.js +9 -3
- package/src/v1/product/driverLicense/driverLicenseV1Document.d.ts +39 -13
- package/src/v1/product/financialDocument/financialDocumentV1.d.ts +12 -4
- package/src/v1/product/financialDocument/financialDocumentV1.js +9 -3
- package/src/v1/product/financialDocument/financialDocumentV1Document.d.ts +96 -32
- package/src/v1/product/financialDocument/financialDocumentV1Document.js +15 -5
- package/src/v1/product/financialDocument/financialDocumentV1LineItem.d.ts +30 -10
- package/src/v1/product/financialDocument/financialDocumentV1LineItem.js +3 -1
- package/src/v1/product/fr/bankAccountDetails/bankAccountDetailsV1.d.ts +12 -4
- package/src/v1/product/fr/bankAccountDetails/bankAccountDetailsV1.js +9 -3
- package/src/v1/product/fr/bankAccountDetails/bankAccountDetailsV1Document.d.ts +9 -3
- package/src/v1/product/fr/bankAccountDetails/bankAccountDetailsV2.d.ts +12 -4
- package/src/v1/product/fr/bankAccountDetails/bankAccountDetailsV2.js +9 -3
- package/src/v1/product/fr/bankAccountDetails/bankAccountDetailsV2Bban.d.ts +18 -6
- package/src/v1/product/fr/bankAccountDetails/bankAccountDetailsV2Bban.js +3 -1
- package/src/v1/product/fr/bankAccountDetails/bankAccountDetailsV2Document.d.ts +12 -4
- package/src/v1/product/fr/carteGrise/carteGriseV1.d.ts +12 -4
- package/src/v1/product/fr/carteGrise/carteGriseV1.js +9 -3
- package/src/v1/product/fr/carteGrise/carteGriseV1Document.d.ts +123 -41
- package/src/v1/product/fr/idCard/idCardV2.d.ts +12 -4
- package/src/v1/product/fr/idCard/idCardV2.js +9 -3
- package/src/v1/product/fr/idCard/idCardV2Document.d.ts +45 -15
- package/src/v1/product/fr/idCard/idCardV2Document.js +3 -1
- package/src/v1/product/fr/idCard/idCardV2Page.d.ts +6 -2
- package/src/v1/product/generated/generatedV1.d.ts +12 -4
- package/src/v1/product/generated/generatedV1.js +9 -3
- package/src/v1/product/generated/generatedV1Prediction.d.ts +6 -2
- package/src/v1/product/generated/generatedV1Prediction.js +3 -1
- package/src/v1/product/internationalId/internationalIdV2.d.ts +12 -4
- package/src/v1/product/internationalId/internationalIdV2.js +9 -3
- package/src/v1/product/internationalId/internationalIdV2Document.d.ts +51 -17
- package/src/v1/product/internationalId/internationalIdV2Document.js +6 -2
- package/src/v1/product/invoice/invoiceV4.d.ts +12 -4
- package/src/v1/product/invoice/invoiceV4.js +9 -3
- package/src/v1/product/invoice/invoiceV4Document.d.ts +87 -29
- package/src/v1/product/invoice/invoiceV4Document.js +15 -5
- package/src/v1/product/invoice/invoiceV4LineItem.d.ts +30 -10
- package/src/v1/product/invoice/invoiceV4LineItem.js +3 -1
- package/src/v1/product/invoiceSplitter/invoiceSplitterV1.d.ts +12 -4
- package/src/v1/product/invoiceSplitter/invoiceSplitterV1.js +9 -3
- package/src/v1/product/invoiceSplitter/invoiceSplitterV1Document.d.ts +3 -1
- package/src/v1/product/invoiceSplitter/invoiceSplitterV1Document.js +3 -1
- package/src/v1/product/invoiceSplitter/invoiceSplitterV1InvoicePageGroup.d.ts +9 -3
- package/src/v1/product/invoiceSplitter/invoiceSplitterV1InvoicePageGroup.js +3 -1
- package/src/v1/product/multiReceiptsDetector/multiReceiptsDetectorV1.d.ts +12 -4
- package/src/v1/product/multiReceiptsDetector/multiReceiptsDetectorV1.js +9 -3
- package/src/v1/product/multiReceiptsDetector/multiReceiptsDetectorV1Document.d.ts +3 -1
- package/src/v1/product/multiReceiptsDetector/multiReceiptsDetectorV1Document.js +3 -1
- package/src/v1/product/passport/passportV1.d.ts +12 -4
- package/src/v1/product/passport/passportV1.js +9 -3
- package/src/v1/product/passport/passportV1Document.d.ts +33 -11
- package/src/v1/product/passport/passportV1Document.js +3 -1
- package/src/v1/product/receipt/receiptV5.d.ts +12 -4
- package/src/v1/product/receipt/receiptV5.js +9 -3
- package/src/v1/product/receipt/receiptV5Document.d.ts +51 -17
- package/src/v1/product/receipt/receiptV5Document.js +6 -2
- package/src/v1/product/receipt/receiptV5LineItem.d.ts +18 -6
- package/src/v1/product/receipt/receiptV5LineItem.js +3 -1
- package/src/v1/product/resume/resumeV1.d.ts +12 -4
- package/src/v1/product/resume/resumeV1.js +9 -3
- package/src/v1/product/resume/resumeV1Certificate.d.ts +18 -6
- package/src/v1/product/resume/resumeV1Certificate.js +3 -1
- package/src/v1/product/resume/resumeV1Document.d.ts +51 -17
- package/src/v1/product/resume/resumeV1Document.js +27 -9
- package/src/v1/product/resume/resumeV1Education.d.ts +27 -9
- package/src/v1/product/resume/resumeV1Education.js +3 -1
- package/src/v1/product/resume/resumeV1Language.d.ts +12 -4
- package/src/v1/product/resume/resumeV1Language.js +3 -1
- package/src/v1/product/resume/resumeV1ProfessionalExperience.d.ts +33 -11
- package/src/v1/product/resume/resumeV1ProfessionalExperience.js +3 -1
- package/src/v1/product/resume/resumeV1SocialNetworksUrl.d.ts +12 -4
- package/src/v1/product/resume/resumeV1SocialNetworksUrl.js +3 -1
- package/src/v1/product/us/bankCheck/bankCheckV1.d.ts +12 -4
- package/src/v1/product/us/bankCheck/bankCheckV1.js +9 -3
- package/src/v1/product/us/bankCheck/bankCheckV1Document.d.ts +18 -6
- package/src/v1/product/us/bankCheck/bankCheckV1Document.js +3 -1
- package/src/v1/product/us/bankCheck/bankCheckV1Page.d.ts +6 -2
- package/src/v1/product/us/bankCheck/bankCheckV1Page.js +3 -1
- package/src/v2/cli.js +1 -1
- package/src/v2/client.d.ts +9 -3
- package/src/v2/clientOptions/pollingOptions.d.ts +30 -10
- package/src/v2/clientOptions/pollingOptions.js +6 -2
- package/src/v2/http/mindeeApiV2.d.ts +1 -1
- package/src/v2/http/mindeeApiV2.js +1 -1
- package/src/v2/parsing/error/errorDetails.d.ts +3 -1
- package/src/v2/parsing/inference/baseInference.d.ts +6 -2
- package/src/v2/parsing/inference/baseInference.js +6 -2
- package/src/v2/parsing/inference/field/baseField.d.ts +9 -3
- package/src/v2/parsing/inference/field/fieldConfidence.d.ts +12 -4
- package/src/v2/parsing/inference/field/fieldConfidence.js +12 -4
- package/src/v2/parsing/inference/field/fieldLocation.d.ts +9 -3
- package/src/v2/parsing/inference/field/fieldLocation.js +3 -1
- package/src/v2/parsing/inference/field/inferenceFields.d.ts +6 -2
- package/src/v2/parsing/inference/field/inferenceFields.js +3 -1
- package/src/v2/parsing/inference/field/listField.d.ts +6 -2
- package/src/v2/parsing/inference/field/listField.js +6 -2
- package/src/v2/parsing/inference/field/objectField.d.ts +6 -2
- package/src/v2/parsing/inference/field/objectField.js +3 -1
- package/src/v2/parsing/inference/field/ragMetadata.d.ts +3 -1
- package/src/v2/parsing/inference/field/ragMetadata.js +3 -1
- package/src/v2/parsing/inference/field/rawText.d.ts +6 -2
- package/src/v2/parsing/inference/field/rawText.js +6 -2
- package/src/v2/parsing/inference/field/simpleField.d.ts +6 -2
- package/src/v2/parsing/inference/field/simpleField.js +8 -4
- package/src/v2/parsing/inference/inferenceFile.d.ts +6 -2
- package/src/v2/parsing/inference/inferenceFile.js +6 -2
- package/src/v2/parsing/inference/inferenceModel.d.ts +6 -2
- package/src/v2/parsing/inference/inferenceModel.js +6 -2
- package/src/v2/product/classification/classification.d.ts +9 -3
- package/src/v2/product/classification/classification.js +9 -3
- package/src/v2/product/classification/classificationClassifier.d.ts +6 -2
- package/src/v2/product/classification/classificationClassifier.js +6 -2
- package/src/v2/product/classification/classificationInference.d.ts +6 -2
- package/src/v2/product/classification/classificationInference.js +6 -2
- package/src/v2/product/classification/classificationResponse.d.ts +3 -1
- package/src/v2/product/classification/classificationResponse.js +3 -1
- package/src/v2/product/classification/classificationResult.d.ts +6 -2
- package/src/v2/product/classification/classificationResult.js +6 -2
- package/src/v2/product/crop/crop.d.ts +9 -3
- package/src/v2/product/crop/crop.js +9 -3
- package/src/v2/product/crop/cropInference.d.ts +6 -2
- package/src/v2/product/crop/cropInference.js +6 -2
- package/src/v2/product/crop/cropItem.d.ts +6 -2
- package/src/v2/product/crop/cropItem.js +6 -2
- package/src/v2/product/crop/cropResponse.d.ts +3 -1
- package/src/v2/product/crop/cropResponse.js +3 -1
- package/src/v2/product/crop/cropResult.d.ts +6 -2
- package/src/v2/product/crop/cropResult.js +6 -2
- package/src/v2/product/extraction/dataSchemaActiveOption.d.ts +3 -1
- package/src/v2/product/extraction/dataSchemaActiveOption.js +3 -1
- package/src/v2/product/extraction/extraction.d.ts +18 -6
- package/src/v2/product/extraction/extraction.js +18 -6
- package/src/v2/product/extraction/extractionActiveOptions.d.ts +6 -2
- package/src/v2/product/extraction/extractionActiveOptions.js +6 -2
- package/src/v2/product/extraction/extractionInference.d.ts +6 -2
- package/src/v2/product/extraction/extractionInference.js +6 -2
- package/src/v2/product/extraction/extractionResponse.d.ts +3 -1
- package/src/v2/product/extraction/extractionResponse.js +3 -1
- package/src/v2/product/extraction/extractionResult.d.ts +6 -2
- package/src/v2/product/extraction/extractionResult.js +6 -2
- package/src/v2/product/extraction/params/dataSchema.d.ts +12 -4
- package/src/v2/product/extraction/params/dataSchema.js +6 -2
- package/src/v2/product/extraction/params/dataSchemaField.d.ts +39 -13
- package/src/v2/product/extraction/params/dataSchemaField.js +9 -3
- package/src/v2/product/extraction/params/dataSchemaReplace.d.ts +12 -4
- package/src/v2/product/extraction/params/dataSchemaReplace.js +6 -2
- package/src/v2/product/extraction/params/extractionParameters.js +3 -3
- package/src/v2/product/extraction/ragDocuments/annotatedListField.d.ts +3 -1
- package/src/v2/product/extraction/ragDocuments/annotatedListField.js +3 -1
- package/src/v2/product/extraction/ragDocuments/params/ragDocumentAnnotationParameters.js +1 -1
- package/src/v2/product/ocr/ocr.d.ts +9 -3
- package/src/v2/product/ocr/ocr.js +9 -3
- package/src/v2/product/ocr/ocrInference.d.ts +6 -2
- package/src/v2/product/ocr/ocrInference.js +6 -2
- package/src/v2/product/ocr/ocrPage.d.ts +6 -2
- package/src/v2/product/ocr/ocrPage.js +6 -2
- package/src/v2/product/ocr/ocrResponse.d.ts +3 -1
- package/src/v2/product/ocr/ocrResponse.js +3 -1
- package/src/v2/product/ocr/ocrResult.d.ts +3 -1
- package/src/v2/product/ocr/ocrResult.js +3 -1
- package/src/v2/product/ocr/ocrWord.d.ts +6 -2
- package/src/v2/product/ocr/ocrWord.js +6 -2
- package/src/v2/product/split/split.d.ts +9 -3
- package/src/v2/product/split/split.js +9 -3
- package/src/v2/product/split/splitInference.d.ts +6 -2
- package/src/v2/product/split/splitInference.js +6 -2
- package/src/v2/product/split/splitRange.d.ts +3 -1
- package/src/v2/product/split/splitRange.js +3 -1
- package/src/v2/product/split/splitResponse.d.ts +3 -1
- package/src/v2/product/split/splitResponse.js +3 -1
- package/src/v2/product/split/splitResult.d.ts +3 -1
- package/src/v2/product/split/splitResult.js +3 -1
- package/src/v2/search/baseSearch.d.ts +9 -3
- package/src/v2/search/baseSearch.js +9 -3
- package/src/v2/search/models/modelSearch.d.ts +9 -3
- package/src/v2/search/models/modelSearch.js +9 -3
- package/src/v2/search/models/modelSearchParameters.d.ts +3 -1
- package/src/v2/search/models/modelSearchParameters.js +3 -1
- package/src/v2/search/ragDocuments/ragDocumentSearch.d.ts +9 -3
- package/src/v2/search/ragDocuments/ragDocumentSearch.js +9 -3
- package/src/v2/search/ragDocuments/ragDocumentSearchParameters.d.ts +3 -1
- package/src/v2/search/ragDocuments/ragDocumentSearchParameters.js +3 -1
|
@@ -4,39 +4,73 @@ import { ClassificationField, DateField, StringField } from "../../parsing/stand
|
|
|
4
4
|
* International ID API version 2.2 document data.
|
|
5
5
|
*/
|
|
6
6
|
export declare class InternationalIdV2Document implements Prediction {
|
|
7
|
-
/**
|
|
7
|
+
/**
|
|
8
|
+
* The physical address of the document holder.
|
|
9
|
+
*/
|
|
8
10
|
address: StringField;
|
|
9
|
-
/**
|
|
11
|
+
/**
|
|
12
|
+
* The date of birth of the document holder.
|
|
13
|
+
*/
|
|
10
14
|
birthDate: DateField;
|
|
11
|
-
/**
|
|
15
|
+
/**
|
|
16
|
+
* The place of birth of the document holder.
|
|
17
|
+
*/
|
|
12
18
|
birthPlace: StringField;
|
|
13
|
-
/**
|
|
19
|
+
/**
|
|
20
|
+
* The country where the document was issued.
|
|
21
|
+
*/
|
|
14
22
|
countryOfIssue: StringField;
|
|
15
|
-
/**
|
|
23
|
+
/**
|
|
24
|
+
* The unique identifier assigned to the document.
|
|
25
|
+
*/
|
|
16
26
|
documentNumber: StringField;
|
|
17
|
-
/**
|
|
27
|
+
/**
|
|
28
|
+
* The type of personal identification document.
|
|
29
|
+
*/
|
|
18
30
|
documentType: ClassificationField;
|
|
19
|
-
/**
|
|
31
|
+
/**
|
|
32
|
+
* The date when the document becomes invalid.
|
|
33
|
+
*/
|
|
20
34
|
expiryDate: DateField;
|
|
21
|
-
/**
|
|
35
|
+
/**
|
|
36
|
+
* The list of the document holder's given names.
|
|
37
|
+
*/
|
|
22
38
|
givenNames: StringField[];
|
|
23
|
-
/**
|
|
39
|
+
/**
|
|
40
|
+
* The date when the document was issued.
|
|
41
|
+
*/
|
|
24
42
|
issueDate: DateField;
|
|
25
|
-
/**
|
|
43
|
+
/**
|
|
44
|
+
* The Machine Readable Zone, first line.
|
|
45
|
+
*/
|
|
26
46
|
mrzLine1: StringField;
|
|
27
|
-
/**
|
|
47
|
+
/**
|
|
48
|
+
* The Machine Readable Zone, second line.
|
|
49
|
+
*/
|
|
28
50
|
mrzLine2: StringField;
|
|
29
|
-
/**
|
|
51
|
+
/**
|
|
52
|
+
* The Machine Readable Zone, third line.
|
|
53
|
+
*/
|
|
30
54
|
mrzLine3: StringField;
|
|
31
|
-
/**
|
|
55
|
+
/**
|
|
56
|
+
* The country of citizenship of the document holder.
|
|
57
|
+
*/
|
|
32
58
|
nationality: StringField;
|
|
33
|
-
/**
|
|
59
|
+
/**
|
|
60
|
+
* The unique identifier assigned to the document holder.
|
|
61
|
+
*/
|
|
34
62
|
personalNumber: StringField;
|
|
35
|
-
/**
|
|
63
|
+
/**
|
|
64
|
+
* The biological sex of the document holder.
|
|
65
|
+
*/
|
|
36
66
|
sex: StringField;
|
|
37
|
-
/**
|
|
67
|
+
/**
|
|
68
|
+
* The state or territory where the document was issued.
|
|
69
|
+
*/
|
|
38
70
|
stateOfIssue: StringField;
|
|
39
|
-
/**
|
|
71
|
+
/**
|
|
72
|
+
* The list of the document holder's family names.
|
|
73
|
+
*/
|
|
40
74
|
surnames: StringField[];
|
|
41
75
|
constructor(rawPrediction: StringDict, pageId?: number);
|
|
42
76
|
/**
|
|
@@ -5,9 +5,13 @@ import { ClassificationField, DateField, StringField, } from "../../parsing/stan
|
|
|
5
5
|
*/
|
|
6
6
|
export class InternationalIdV2Document {
|
|
7
7
|
constructor(rawPrediction, pageId) {
|
|
8
|
-
/**
|
|
8
|
+
/**
|
|
9
|
+
* The list of the document holder's given names.
|
|
10
|
+
*/
|
|
9
11
|
this.givenNames = [];
|
|
10
|
-
/**
|
|
12
|
+
/**
|
|
13
|
+
* The list of the document holder's family names.
|
|
14
|
+
*/
|
|
11
15
|
this.surnames = [];
|
|
12
16
|
this.address = new StringField({
|
|
13
17
|
prediction: rawPrediction["address"],
|
|
@@ -4,13 +4,21 @@ import { InvoiceV4Document } from "./invoiceV4Document.js";
|
|
|
4
4
|
* Invoice API version 4 inference prediction.
|
|
5
5
|
*/
|
|
6
6
|
export declare class InvoiceV4 extends Inference {
|
|
7
|
-
/**
|
|
7
|
+
/**
|
|
8
|
+
* The endpoint's name.
|
|
9
|
+
*/
|
|
8
10
|
endpointName: string;
|
|
9
|
-
/**
|
|
11
|
+
/**
|
|
12
|
+
* The endpoint's version.
|
|
13
|
+
*/
|
|
10
14
|
endpointVersion: string;
|
|
11
|
-
/**
|
|
15
|
+
/**
|
|
16
|
+
* The document-level prediction.
|
|
17
|
+
*/
|
|
12
18
|
prediction: InvoiceV4Document;
|
|
13
|
-
/**
|
|
19
|
+
/**
|
|
20
|
+
* The document's pages.
|
|
21
|
+
*/
|
|
14
22
|
pages: Page<InvoiceV4Document>[];
|
|
15
23
|
constructor(rawPrediction: StringDict);
|
|
16
24
|
}
|
|
@@ -6,11 +6,17 @@ import { InvoiceV4Document } from "./invoiceV4Document.js";
|
|
|
6
6
|
export class InvoiceV4 extends Inference {
|
|
7
7
|
constructor(rawPrediction) {
|
|
8
8
|
super(rawPrediction);
|
|
9
|
-
/**
|
|
9
|
+
/**
|
|
10
|
+
* The endpoint's name.
|
|
11
|
+
*/
|
|
10
12
|
this.endpointName = "invoices";
|
|
11
|
-
/**
|
|
13
|
+
/**
|
|
14
|
+
* The endpoint's version.
|
|
15
|
+
*/
|
|
12
16
|
this.endpointVersion = "4";
|
|
13
|
-
/**
|
|
17
|
+
/**
|
|
18
|
+
* The document's pages.
|
|
19
|
+
*/
|
|
14
20
|
this.pages = [];
|
|
15
21
|
this.prediction = new InvoiceV4Document(rawPrediction["prediction"]);
|
|
16
22
|
rawPrediction["pages"].forEach((page) => {
|
|
@@ -5,63 +5,121 @@ import { AddressField, AmountField, ClassificationField, CompanyRegistrationFiel
|
|
|
5
5
|
* Invoice API version 4.11 document data.
|
|
6
6
|
*/
|
|
7
7
|
export declare class InvoiceV4Document implements Prediction {
|
|
8
|
-
/**
|
|
8
|
+
/**
|
|
9
|
+
* The customer billing address.
|
|
10
|
+
*/
|
|
9
11
|
billingAddress: AddressField;
|
|
10
|
-
/**
|
|
12
|
+
/**
|
|
13
|
+
* The purchase category.
|
|
14
|
+
*/
|
|
11
15
|
category: ClassificationField;
|
|
12
|
-
/**
|
|
16
|
+
/**
|
|
17
|
+
* The address of the customer.
|
|
18
|
+
*/
|
|
13
19
|
customerAddress: AddressField;
|
|
14
|
-
/**
|
|
20
|
+
/**
|
|
21
|
+
* List of company registration numbers associated to the customer.
|
|
22
|
+
*/
|
|
15
23
|
customerCompanyRegistrations: CompanyRegistrationField[];
|
|
16
|
-
/**
|
|
24
|
+
/**
|
|
25
|
+
* The customer account number or identifier from the supplier.
|
|
26
|
+
*/
|
|
17
27
|
customerId: StringField;
|
|
18
|
-
/**
|
|
28
|
+
/**
|
|
29
|
+
* The name of the customer or client.
|
|
30
|
+
*/
|
|
19
31
|
customerName: StringField;
|
|
20
|
-
/**
|
|
32
|
+
/**
|
|
33
|
+
* The date the purchase was made.
|
|
34
|
+
*/
|
|
21
35
|
date: DateField;
|
|
22
|
-
/**
|
|
36
|
+
/**
|
|
37
|
+
* Document type: INVOICE or CREDIT NOTE.
|
|
38
|
+
*/
|
|
23
39
|
documentType: ClassificationField;
|
|
24
|
-
/**
|
|
40
|
+
/**
|
|
41
|
+
* Document type extended.
|
|
42
|
+
*/
|
|
25
43
|
documentTypeExtended: ClassificationField;
|
|
26
|
-
/**
|
|
44
|
+
/**
|
|
45
|
+
* The date on which the payment is due.
|
|
46
|
+
*/
|
|
27
47
|
dueDate: DateField;
|
|
28
|
-
/**
|
|
48
|
+
/**
|
|
49
|
+
* The invoice number or identifier.
|
|
50
|
+
*/
|
|
29
51
|
invoiceNumber: StringField;
|
|
30
|
-
/**
|
|
52
|
+
/**
|
|
53
|
+
* List of all the line items present on the invoice.
|
|
54
|
+
*/
|
|
31
55
|
lineItems: InvoiceV4LineItem[];
|
|
32
|
-
/**
|
|
56
|
+
/**
|
|
57
|
+
* The locale of the document.
|
|
58
|
+
*/
|
|
33
59
|
locale: LocaleField;
|
|
34
|
-
/**
|
|
60
|
+
/**
|
|
61
|
+
* The date on which the payment is due / was fulfilled.
|
|
62
|
+
*/
|
|
35
63
|
paymentDate: DateField;
|
|
36
|
-
/**
|
|
64
|
+
/**
|
|
65
|
+
* The purchase order number.
|
|
66
|
+
*/
|
|
37
67
|
poNumber: StringField;
|
|
38
|
-
/**
|
|
68
|
+
/**
|
|
69
|
+
* List of all reference numbers on the invoice, including the purchase order number.
|
|
70
|
+
*/
|
|
39
71
|
referenceNumbers: StringField[];
|
|
40
|
-
/**
|
|
72
|
+
/**
|
|
73
|
+
* Customer's delivery address.
|
|
74
|
+
*/
|
|
41
75
|
shippingAddress: AddressField;
|
|
42
|
-
/**
|
|
76
|
+
/**
|
|
77
|
+
* The purchase subcategory for transport, food and shopping.
|
|
78
|
+
*/
|
|
43
79
|
subcategory: ClassificationField;
|
|
44
|
-
/**
|
|
80
|
+
/**
|
|
81
|
+
* The address of the supplier or merchant.
|
|
82
|
+
*/
|
|
45
83
|
supplierAddress: AddressField;
|
|
46
|
-
/**
|
|
84
|
+
/**
|
|
85
|
+
* List of company registration numbers associated to the supplier.
|
|
86
|
+
*/
|
|
47
87
|
supplierCompanyRegistrations: CompanyRegistrationField[];
|
|
48
|
-
/**
|
|
88
|
+
/**
|
|
89
|
+
* The email address of the supplier or merchant.
|
|
90
|
+
*/
|
|
49
91
|
supplierEmail: StringField;
|
|
50
|
-
/**
|
|
92
|
+
/**
|
|
93
|
+
* The name of the supplier or merchant.
|
|
94
|
+
*/
|
|
51
95
|
supplierName: StringField;
|
|
52
|
-
/**
|
|
96
|
+
/**
|
|
97
|
+
* List of payment details associated to the supplier of the invoice.
|
|
98
|
+
*/
|
|
53
99
|
supplierPaymentDetails: PaymentDetailsField[];
|
|
54
|
-
/**
|
|
100
|
+
/**
|
|
101
|
+
* The phone number of the supplier or merchant.
|
|
102
|
+
*/
|
|
55
103
|
supplierPhoneNumber: StringField;
|
|
56
|
-
/**
|
|
104
|
+
/**
|
|
105
|
+
* The website URL of the supplier or merchant.
|
|
106
|
+
*/
|
|
57
107
|
supplierWebsite: StringField;
|
|
58
|
-
/**
|
|
108
|
+
/**
|
|
109
|
+
* List of taxes. Each item contains the detail of the tax.
|
|
110
|
+
*/
|
|
59
111
|
taxes: Taxes;
|
|
60
|
-
/**
|
|
112
|
+
/**
|
|
113
|
+
* The total amount of the invoice: includes taxes, tips, fees, and other charges.
|
|
114
|
+
*/
|
|
61
115
|
totalAmount: AmountField;
|
|
62
|
-
/**
|
|
116
|
+
/**
|
|
117
|
+
* The net amount of the invoice: does not include taxes, fees, and discounts.
|
|
118
|
+
*/
|
|
63
119
|
totalNet: AmountField;
|
|
64
|
-
/**
|
|
120
|
+
/**
|
|
121
|
+
* The total tax: the sum of all the taxes for this invoice.
|
|
122
|
+
*/
|
|
65
123
|
totalTax: AmountField;
|
|
66
124
|
constructor(rawPrediction: StringDict, pageId?: number);
|
|
67
125
|
/**
|
|
@@ -6,15 +6,25 @@ import { AddressField, AmountField, ClassificationField, CompanyRegistrationFiel
|
|
|
6
6
|
*/
|
|
7
7
|
export class InvoiceV4Document {
|
|
8
8
|
constructor(rawPrediction, pageId) {
|
|
9
|
-
/**
|
|
9
|
+
/**
|
|
10
|
+
* List of company registration numbers associated to the customer.
|
|
11
|
+
*/
|
|
10
12
|
this.customerCompanyRegistrations = [];
|
|
11
|
-
/**
|
|
13
|
+
/**
|
|
14
|
+
* List of all the line items present on the invoice.
|
|
15
|
+
*/
|
|
12
16
|
this.lineItems = [];
|
|
13
|
-
/**
|
|
17
|
+
/**
|
|
18
|
+
* List of all reference numbers on the invoice, including the purchase order number.
|
|
19
|
+
*/
|
|
14
20
|
this.referenceNumbers = [];
|
|
15
|
-
/**
|
|
21
|
+
/**
|
|
22
|
+
* List of company registration numbers associated to the supplier.
|
|
23
|
+
*/
|
|
16
24
|
this.supplierCompanyRegistrations = [];
|
|
17
|
-
/**
|
|
25
|
+
/**
|
|
26
|
+
* List of payment details associated to the supplier of the invoice.
|
|
27
|
+
*/
|
|
18
28
|
this.supplierPaymentDetails = [];
|
|
19
29
|
this.billingAddress = new AddressField({
|
|
20
30
|
prediction: rawPrediction["billing_address"],
|
|
@@ -5,25 +5,45 @@ import { Polygon } from "../../../geometry/index.js";
|
|
|
5
5
|
*/
|
|
6
6
|
export declare class InvoiceV4LineItem {
|
|
7
7
|
#private;
|
|
8
|
-
/**
|
|
8
|
+
/**
|
|
9
|
+
* The item description.
|
|
10
|
+
*/
|
|
9
11
|
description: string | null;
|
|
10
|
-
/**
|
|
12
|
+
/**
|
|
13
|
+
* The product code of the item.
|
|
14
|
+
*/
|
|
11
15
|
productCode: string | null;
|
|
12
|
-
/**
|
|
16
|
+
/**
|
|
17
|
+
* The item quantity
|
|
18
|
+
*/
|
|
13
19
|
quantity: number | null;
|
|
14
|
-
/**
|
|
20
|
+
/**
|
|
21
|
+
* The item tax amount.
|
|
22
|
+
*/
|
|
15
23
|
taxAmount: number | null;
|
|
16
|
-
/**
|
|
24
|
+
/**
|
|
25
|
+
* The item tax rate in percentage.
|
|
26
|
+
*/
|
|
17
27
|
taxRate: number | null;
|
|
18
|
-
/**
|
|
28
|
+
/**
|
|
29
|
+
* The item total amount.
|
|
30
|
+
*/
|
|
19
31
|
totalAmount: number | null;
|
|
20
|
-
/**
|
|
32
|
+
/**
|
|
33
|
+
* The item unit of measure.
|
|
34
|
+
*/
|
|
21
35
|
unitMeasure: string | null;
|
|
22
|
-
/**
|
|
36
|
+
/**
|
|
37
|
+
* The item unit price.
|
|
38
|
+
*/
|
|
23
39
|
unitPrice: number | null;
|
|
24
|
-
/**
|
|
40
|
+
/**
|
|
41
|
+
* Confidence score
|
|
42
|
+
*/
|
|
25
43
|
confidence: number;
|
|
26
|
-
/**
|
|
44
|
+
/**
|
|
45
|
+
* The document page on which the information was found.
|
|
46
|
+
*/
|
|
27
47
|
pageId: number;
|
|
28
48
|
/**
|
|
29
49
|
* Contains the relative vertices coordinates (points) of a polygon containing
|
|
@@ -13,7 +13,9 @@ export class InvoiceV4LineItem {
|
|
|
13
13
|
// eslint-disable-next-line sonarjs/cognitive-complexity
|
|
14
14
|
constructor({ prediction = {} }) {
|
|
15
15
|
_InvoiceV4LineItem_instances.add(this);
|
|
16
|
-
/**
|
|
16
|
+
/**
|
|
17
|
+
* Confidence score
|
|
18
|
+
*/
|
|
17
19
|
this.confidence = 0.0;
|
|
18
20
|
/**
|
|
19
21
|
* Contains the relative vertices coordinates (points) of a polygon containing
|
|
@@ -4,13 +4,21 @@ import { InvoiceSplitterV1Document } from "./invoiceSplitterV1Document.js";
|
|
|
4
4
|
* Invoice Splitter API version 1 inference prediction.
|
|
5
5
|
*/
|
|
6
6
|
export declare class InvoiceSplitterV1 extends Inference {
|
|
7
|
-
/**
|
|
7
|
+
/**
|
|
8
|
+
* The endpoint's name.
|
|
9
|
+
*/
|
|
8
10
|
endpointName: string;
|
|
9
|
-
/**
|
|
11
|
+
/**
|
|
12
|
+
* The endpoint's version.
|
|
13
|
+
*/
|
|
10
14
|
endpointVersion: string;
|
|
11
|
-
/**
|
|
15
|
+
/**
|
|
16
|
+
* The document-level prediction.
|
|
17
|
+
*/
|
|
12
18
|
prediction: InvoiceSplitterV1Document;
|
|
13
|
-
/**
|
|
19
|
+
/**
|
|
20
|
+
* The document's pages.
|
|
21
|
+
*/
|
|
14
22
|
pages: Page<InvoiceSplitterV1Document>[];
|
|
15
23
|
constructor(rawPrediction: StringDict);
|
|
16
24
|
}
|
|
@@ -6,11 +6,17 @@ import { InvoiceSplitterV1Document } from "./invoiceSplitterV1Document.js";
|
|
|
6
6
|
export class InvoiceSplitterV1 extends Inference {
|
|
7
7
|
constructor(rawPrediction) {
|
|
8
8
|
super(rawPrediction);
|
|
9
|
-
/**
|
|
9
|
+
/**
|
|
10
|
+
* The endpoint's name.
|
|
11
|
+
*/
|
|
10
12
|
this.endpointName = "invoice_splitter";
|
|
11
|
-
/**
|
|
13
|
+
/**
|
|
14
|
+
* The endpoint's version.
|
|
15
|
+
*/
|
|
12
16
|
this.endpointVersion = "1";
|
|
13
|
-
/**
|
|
17
|
+
/**
|
|
18
|
+
* The document's pages.
|
|
19
|
+
*/
|
|
14
20
|
this.pages = [];
|
|
15
21
|
this.prediction = new InvoiceSplitterV1Document(rawPrediction["prediction"]);
|
|
16
22
|
rawPrediction["pages"].forEach((page) => {
|
|
@@ -4,7 +4,9 @@ import { InvoiceSplitterV1InvoicePageGroup } from "./invoiceSplitterV1InvoicePag
|
|
|
4
4
|
* Invoice Splitter API version 1.4 document data.
|
|
5
5
|
*/
|
|
6
6
|
export declare class InvoiceSplitterV1Document implements Prediction {
|
|
7
|
-
/**
|
|
7
|
+
/**
|
|
8
|
+
* List of page groups. Each group represents a single invoice within a multi-invoice document.
|
|
9
|
+
*/
|
|
8
10
|
invoicePageGroups: InvoiceSplitterV1InvoicePageGroup[];
|
|
9
11
|
constructor(rawPrediction: StringDict, pageId?: number);
|
|
10
12
|
/**
|
|
@@ -5,7 +5,9 @@ import { InvoiceSplitterV1InvoicePageGroup } from "./invoiceSplitterV1InvoicePag
|
|
|
5
5
|
*/
|
|
6
6
|
export class InvoiceSplitterV1Document {
|
|
7
7
|
constructor(rawPrediction, pageId) {
|
|
8
|
-
/**
|
|
8
|
+
/**
|
|
9
|
+
* List of page groups. Each group represents a single invoice within a multi-invoice document.
|
|
10
|
+
*/
|
|
9
11
|
this.invoicePageGroups = [];
|
|
10
12
|
if (rawPrediction["invoice_page_groups"]) {
|
|
11
13
|
rawPrediction["invoice_page_groups"].map((itemPrediction) => this.invoicePageGroups.push(new InvoiceSplitterV1InvoicePageGroup({
|
|
@@ -5,11 +5,17 @@ import { Polygon } from "../../../geometry/index.js";
|
|
|
5
5
|
*/
|
|
6
6
|
export declare class InvoiceSplitterV1InvoicePageGroup {
|
|
7
7
|
#private;
|
|
8
|
-
/**
|
|
8
|
+
/**
|
|
9
|
+
* List of page indexes that belong to the same invoice (group).
|
|
10
|
+
*/
|
|
9
11
|
pageIndexes: Array<number> | null;
|
|
10
|
-
/**
|
|
12
|
+
/**
|
|
13
|
+
* Confidence score
|
|
14
|
+
*/
|
|
11
15
|
confidence: number;
|
|
12
|
-
/**
|
|
16
|
+
/**
|
|
17
|
+
* The document page on which the information was found.
|
|
18
|
+
*/
|
|
13
19
|
pageId: number;
|
|
14
20
|
/**
|
|
15
21
|
* Contains the relative vertices coordinates (points) of a polygon containing
|
|
@@ -11,7 +11,9 @@ import { Polygon } from "../../../geometry/index.js";
|
|
|
11
11
|
export class InvoiceSplitterV1InvoicePageGroup {
|
|
12
12
|
constructor({ prediction = {} }) {
|
|
13
13
|
_InvoiceSplitterV1InvoicePageGroup_instances.add(this);
|
|
14
|
-
/**
|
|
14
|
+
/**
|
|
15
|
+
* Confidence score
|
|
16
|
+
*/
|
|
15
17
|
this.confidence = 0.0;
|
|
16
18
|
/**
|
|
17
19
|
* Contains the relative vertices coordinates (points) of a polygon containing
|
|
@@ -4,13 +4,21 @@ import { MultiReceiptsDetectorV1Document } from "./multiReceiptsDetectorV1Docume
|
|
|
4
4
|
* Multi Receipts Detector API version 1 inference prediction.
|
|
5
5
|
*/
|
|
6
6
|
export declare class MultiReceiptsDetectorV1 extends Inference {
|
|
7
|
-
/**
|
|
7
|
+
/**
|
|
8
|
+
* The endpoint's name.
|
|
9
|
+
*/
|
|
8
10
|
endpointName: string;
|
|
9
|
-
/**
|
|
11
|
+
/**
|
|
12
|
+
* The endpoint's version.
|
|
13
|
+
*/
|
|
10
14
|
endpointVersion: string;
|
|
11
|
-
/**
|
|
15
|
+
/**
|
|
16
|
+
* The document-level prediction.
|
|
17
|
+
*/
|
|
12
18
|
prediction: MultiReceiptsDetectorV1Document;
|
|
13
|
-
/**
|
|
19
|
+
/**
|
|
20
|
+
* The document's pages.
|
|
21
|
+
*/
|
|
14
22
|
pages: Page<MultiReceiptsDetectorV1Document>[];
|
|
15
23
|
constructor(rawPrediction: StringDict);
|
|
16
24
|
}
|
|
@@ -6,11 +6,17 @@ import { MultiReceiptsDetectorV1Document } from "./multiReceiptsDetectorV1Docume
|
|
|
6
6
|
export class MultiReceiptsDetectorV1 extends Inference {
|
|
7
7
|
constructor(rawPrediction) {
|
|
8
8
|
super(rawPrediction);
|
|
9
|
-
/**
|
|
9
|
+
/**
|
|
10
|
+
* The endpoint's name.
|
|
11
|
+
*/
|
|
10
12
|
this.endpointName = "multi_receipts_detector";
|
|
11
|
-
/**
|
|
13
|
+
/**
|
|
14
|
+
* The endpoint's version.
|
|
15
|
+
*/
|
|
12
16
|
this.endpointVersion = "1";
|
|
13
|
-
/**
|
|
17
|
+
/**
|
|
18
|
+
* The document's pages.
|
|
19
|
+
*/
|
|
14
20
|
this.pages = [];
|
|
15
21
|
this.prediction = new MultiReceiptsDetectorV1Document(rawPrediction["prediction"]);
|
|
16
22
|
rawPrediction["pages"].forEach((page) => {
|
|
@@ -4,7 +4,9 @@ import { PositionField } from "../../parsing/standard/index.js";
|
|
|
4
4
|
* Multi Receipts Detector API version 1.1 document data.
|
|
5
5
|
*/
|
|
6
6
|
export declare class MultiReceiptsDetectorV1Document implements Prediction {
|
|
7
|
-
/**
|
|
7
|
+
/**
|
|
8
|
+
* Positions of the receipts on the document.
|
|
9
|
+
*/
|
|
8
10
|
receipts: PositionField[];
|
|
9
11
|
constructor(rawPrediction: StringDict, pageId?: number);
|
|
10
12
|
/**
|
|
@@ -5,7 +5,9 @@ import { PositionField } from "../../parsing/standard/index.js";
|
|
|
5
5
|
*/
|
|
6
6
|
export class MultiReceiptsDetectorV1Document {
|
|
7
7
|
constructor(rawPrediction, pageId) {
|
|
8
|
-
/**
|
|
8
|
+
/**
|
|
9
|
+
* Positions of the receipts on the document.
|
|
10
|
+
*/
|
|
9
11
|
this.receipts = [];
|
|
10
12
|
if (rawPrediction["receipts"]) {
|
|
11
13
|
rawPrediction["receipts"].map((itemPrediction) => this.receipts.push(new PositionField({
|
|
@@ -4,13 +4,21 @@ import { PassportV1Document } from "./passportV1Document.js";
|
|
|
4
4
|
* Passport API version 1 inference prediction.
|
|
5
5
|
*/
|
|
6
6
|
export declare class PassportV1 extends Inference {
|
|
7
|
-
/**
|
|
7
|
+
/**
|
|
8
|
+
* The endpoint's name.
|
|
9
|
+
*/
|
|
8
10
|
endpointName: string;
|
|
9
|
-
/**
|
|
11
|
+
/**
|
|
12
|
+
* The endpoint's version.
|
|
13
|
+
*/
|
|
10
14
|
endpointVersion: string;
|
|
11
|
-
/**
|
|
15
|
+
/**
|
|
16
|
+
* The document-level prediction.
|
|
17
|
+
*/
|
|
12
18
|
prediction: PassportV1Document;
|
|
13
|
-
/**
|
|
19
|
+
/**
|
|
20
|
+
* The document's pages.
|
|
21
|
+
*/
|
|
14
22
|
pages: Page<PassportV1Document>[];
|
|
15
23
|
constructor(rawPrediction: StringDict);
|
|
16
24
|
}
|
|
@@ -6,11 +6,17 @@ import { PassportV1Document } from "./passportV1Document.js";
|
|
|
6
6
|
export class PassportV1 extends Inference {
|
|
7
7
|
constructor(rawPrediction) {
|
|
8
8
|
super(rawPrediction);
|
|
9
|
-
/**
|
|
9
|
+
/**
|
|
10
|
+
* The endpoint's name.
|
|
11
|
+
*/
|
|
10
12
|
this.endpointName = "passport";
|
|
11
|
-
/**
|
|
13
|
+
/**
|
|
14
|
+
* The endpoint's version.
|
|
15
|
+
*/
|
|
12
16
|
this.endpointVersion = "1";
|
|
13
|
-
/**
|
|
17
|
+
/**
|
|
18
|
+
* The document's pages.
|
|
19
|
+
*/
|
|
14
20
|
this.pages = [];
|
|
15
21
|
this.prediction = new PassportV1Document(rawPrediction["prediction"]);
|
|
16
22
|
rawPrediction["pages"].forEach((page) => {
|