mindee 5.8.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 +12 -0
- package/package.json +103 -95
- package/src/geometry/bbox.d.ts +18 -6
- package/src/geometry/bbox.js +7 -3
- 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 +4 -2
- 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 +2 -2
- package/src/image/imageExtractor.js +14 -14
- 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 +20 -7
- 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 +8 -4
- 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 +4 -2
- package/src/pdf/extractedPdfs.js +3 -1
- package/src/pdf/pdfCompressor.js +14 -14
- package/src/pdf/pdfExtractor.d.ts +1 -1
- package/src/pdf/pdfExtractor.js +3 -3
- 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.d.ts +2 -2
- package/src/v1/extraction/invoiceSplitterExtractor/invoiceSplitterExtractor.js +6 -6
- package/src/v1/extraction/multiReceiptsExtractor/extractedMultiReceiptImage.d.ts +6 -2
- package/src/v1/extraction/multiReceiptsExtractor/multiReceiptsExtractor.d.ts +2 -2
- package/src/v1/extraction/multiReceiptsExtractor/multiReceiptsExtractor.js +3 -3
- package/src/v1/http/apiSettingsV1.d.ts +15 -5
- package/src/v1/http/apiSettingsV1.js +12 -4
- package/src/v1/http/baseEndpoint.d.ts +7 -3
- package/src/v1/http/endpoint.d.ts +10 -4
- package/src/v1/http/endpoint.js +2 -2
- package/src/v1/http/errors.d.ts +9 -3
- package/src/v1/http/errors.js +6 -2
- package/src/v1/http/httpParams.d.ts +37 -13
- package/src/v1/http/workflowEndpoint.d.ts +2 -2
- package/src/v1/http/workflowEndpoint.js +2 -2
- 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 +40 -14
- package/src/v1/parsing/common/execution.js +1 -1
- 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 +7 -4
- 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 +7 -3
- package/src/v1/parsing/common/ocrPage.js +7 -3
- package/src/v1/parsing/common/orientation.d.ts +7 -3
- package/src/v1/parsing/common/orientation.js +1 -1
- 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 +7 -3
- package/src/v1/parsing/generated/generatedList.js +1 -1
- package/src/v1/parsing/generated/generatedObject.d.ts +26 -10
- package/src/v1/parsing/generated/generatedObject.js +14 -8
- package/src/v1/parsing/localResponse.d.ts +4 -2
- package/src/v1/parsing/localResponse.js +4 -2
- 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 +4 -2
- 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 +4 -2
- 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 +19 -7
- package/src/v1/parsing/standard/tax.js +16 -6
- 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 +13 -5
- package/src/v1/product/barcodeReader/barcodeReaderV1.js +10 -4
- package/src/v1/product/barcodeReader/barcodeReaderV1Document.d.ts +8 -4
- package/src/v1/product/barcodeReader/barcodeReaderV1Document.js +8 -4
- package/src/v1/product/cliProducts.d.ts +2 -2
- package/src/v1/product/cliProducts.js +1 -1
- package/src/v1/product/cropper/cropperV1.d.ts +13 -5
- package/src/v1/product/cropper/cropperV1.js +10 -4
- package/src/v1/product/cropper/cropperV1Document.d.ts +1 -1
- package/src/v1/product/cropper/cropperV1Page.d.ts +5 -3
- package/src/v1/product/cropper/cropperV1Page.js +5 -3
- package/src/v1/product/driverLicense/driverLicenseV1.d.ts +13 -5
- package/src/v1/product/driverLicense/driverLicenseV1.js +10 -4
- package/src/v1/product/driverLicense/driverLicenseV1Document.d.ts +41 -15
- package/src/v1/product/driverLicense/driverLicenseV1Document.js +2 -2
- package/src/v1/product/financialDocument/financialDocumentV1.d.ts +13 -5
- package/src/v1/product/financialDocument/financialDocumentV1.js +10 -4
- package/src/v1/product/financialDocument/financialDocumentV1Document.d.ts +98 -34
- package/src/v1/product/financialDocument/financialDocumentV1Document.js +17 -7
- package/src/v1/product/financialDocument/financialDocumentV1LineItem.d.ts +30 -10
- package/src/v1/product/financialDocument/financialDocumentV1LineItem.js +4 -2
- package/src/v1/product/fr/bankAccountDetails/bankAccountDetailsV1.d.ts +13 -5
- package/src/v1/product/fr/bankAccountDetails/bankAccountDetailsV1.js +10 -4
- package/src/v1/product/fr/bankAccountDetails/bankAccountDetailsV1Document.d.ts +11 -5
- package/src/v1/product/fr/bankAccountDetails/bankAccountDetailsV1Document.js +2 -2
- package/src/v1/product/fr/bankAccountDetails/bankAccountDetailsV2.d.ts +13 -5
- package/src/v1/product/fr/bankAccountDetails/bankAccountDetailsV2.js +10 -4
- 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 +14 -6
- package/src/v1/product/fr/bankAccountDetails/bankAccountDetailsV2Document.js +2 -2
- package/src/v1/product/fr/carteGrise/carteGriseV1.d.ts +13 -5
- package/src/v1/product/fr/carteGrise/carteGriseV1.js +10 -4
- package/src/v1/product/fr/carteGrise/carteGriseV1Document.d.ts +125 -43
- package/src/v1/product/fr/carteGrise/carteGriseV1Document.js +2 -2
- package/src/v1/product/fr/idCard/idCardV2.d.ts +13 -5
- package/src/v1/product/fr/idCard/idCardV2.js +10 -4
- package/src/v1/product/fr/idCard/idCardV2Document.d.ts +47 -17
- package/src/v1/product/fr/idCard/idCardV2Document.js +5 -3
- package/src/v1/product/fr/idCard/idCardV2Page.d.ts +8 -4
- package/src/v1/product/fr/idCard/idCardV2Page.js +2 -2
- package/src/v1/product/generated/generatedV1.d.ts +13 -5
- package/src/v1/product/generated/generatedV1.js +10 -4
- package/src/v1/product/generated/generatedV1Document.js +2 -2
- package/src/v1/product/generated/generatedV1Page.js +2 -2
- package/src/v1/product/generated/generatedV1Prediction.d.ts +9 -5
- package/src/v1/product/generated/generatedV1Prediction.js +6 -4
- package/src/v1/product/internationalId/internationalIdV2.d.ts +13 -5
- package/src/v1/product/internationalId/internationalIdV2.js +10 -4
- package/src/v1/product/internationalId/internationalIdV2Document.d.ts +53 -19
- package/src/v1/product/internationalId/internationalIdV2Document.js +8 -4
- package/src/v1/product/invoice/invoiceV4.d.ts +13 -5
- package/src/v1/product/invoice/invoiceV4.js +10 -4
- package/src/v1/product/invoice/invoiceV4Document.d.ts +89 -31
- package/src/v1/product/invoice/invoiceV4Document.js +17 -7
- package/src/v1/product/invoice/invoiceV4LineItem.d.ts +30 -10
- package/src/v1/product/invoice/invoiceV4LineItem.js +4 -2
- package/src/v1/product/invoiceSplitter/invoiceSplitterV1.d.ts +13 -5
- package/src/v1/product/invoiceSplitter/invoiceSplitterV1.js +10 -4
- package/src/v1/product/invoiceSplitter/invoiceSplitterV1Document.d.ts +4 -2
- package/src/v1/product/invoiceSplitter/invoiceSplitterV1Document.js +4 -2
- 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 +13 -5
- package/src/v1/product/multiReceiptsDetector/multiReceiptsDetectorV1.js +10 -4
- package/src/v1/product/multiReceiptsDetector/multiReceiptsDetectorV1Document.d.ts +5 -3
- package/src/v1/product/multiReceiptsDetector/multiReceiptsDetectorV1Document.js +5 -3
- package/src/v1/product/passport/passportV1.d.ts +13 -5
- package/src/v1/product/passport/passportV1.js +10 -4
- package/src/v1/product/passport/passportV1Document.d.ts +35 -13
- package/src/v1/product/passport/passportV1Document.js +5 -3
- package/src/v1/product/receipt/receiptV5.d.ts +13 -5
- package/src/v1/product/receipt/receiptV5.js +10 -4
- package/src/v1/product/receipt/receiptV5Document.d.ts +53 -19
- package/src/v1/product/receipt/receiptV5Document.js +8 -4
- package/src/v1/product/receipt/receiptV5LineItem.d.ts +18 -6
- package/src/v1/product/receipt/receiptV5LineItem.js +4 -2
- package/src/v1/product/resume/resumeV1.d.ts +13 -5
- package/src/v1/product/resume/resumeV1.js +10 -4
- package/src/v1/product/resume/resumeV1Certificate.d.ts +18 -6
- package/src/v1/product/resume/resumeV1Certificate.js +4 -2
- package/src/v1/product/resume/resumeV1Document.d.ts +53 -19
- package/src/v1/product/resume/resumeV1Document.js +29 -11
- package/src/v1/product/resume/resumeV1Education.d.ts +27 -9
- package/src/v1/product/resume/resumeV1Education.js +4 -2
- package/src/v1/product/resume/resumeV1Language.d.ts +12 -4
- package/src/v1/product/resume/resumeV1Language.js +4 -2
- package/src/v1/product/resume/resumeV1ProfessionalExperience.d.ts +33 -11
- package/src/v1/product/resume/resumeV1ProfessionalExperience.js +4 -2
- package/src/v1/product/resume/resumeV1SocialNetworksUrl.d.ts +12 -4
- package/src/v1/product/resume/resumeV1SocialNetworksUrl.js +4 -2
- package/src/v1/product/us/bankCheck/bankCheckV1.d.ts +13 -5
- package/src/v1/product/us/bankCheck/bankCheckV1.js +10 -4
- package/src/v1/product/us/bankCheck/bankCheckV1Document.d.ts +20 -8
- package/src/v1/product/us/bankCheck/bankCheckV1Document.js +5 -3
- package/src/v1/product/us/bankCheck/bankCheckV1Page.d.ts +8 -4
- package/src/v1/product/us/bankCheck/bankCheckV1Page.js +5 -3
- package/src/v2/cli.js +2 -2
- package/src/v2/client.d.ts +103 -21
- package/src/v2/client.js +171 -27
- package/src/v2/clientOptions/baseAnnotationParameters.d.ts +23 -0
- package/src/v2/clientOptions/baseAnnotationParameters.js +17 -0
- package/src/v2/clientOptions/baseProductParameters.js +3 -2
- package/src/v2/clientOptions/baseRagDocumentUploadParameters.d.ts +23 -0
- package/src/v2/clientOptions/baseRagDocumentUploadParameters.js +24 -0
- package/src/v2/clientOptions/index.d.ts +2 -0
- package/src/v2/clientOptions/index.js +2 -0
- package/src/v2/clientOptions/pollingOptions.d.ts +30 -10
- package/src/v2/clientOptions/pollingOptions.js +6 -2
- package/src/v2/fileOperations/crop.d.ts +1 -1
- package/src/v2/http/errors.d.ts +1 -1
- package/src/v2/http/mindeeApiV2.d.ts +36 -7
- package/src/v2/http/mindeeApiV2.js +80 -4
- package/src/v2/parsing/baseRagAnnotationResponse.d.ts +28 -0
- package/src/v2/parsing/baseRagAnnotationResponse.js +14 -0
- package/src/v2/parsing/baseResponse.d.ts +6 -2
- package/src/v2/parsing/baseResponse.js +3 -1
- package/src/v2/parsing/error/errorDetails.d.ts +3 -1
- package/src/v2/parsing/error/errorResponse.d.ts +1 -1
- package/src/v2/parsing/error/errorResponse.js +1 -1
- package/src/v2/parsing/index.d.ts +2 -0
- package/src/v2/parsing/index.js +1 -0
- package/src/v2/parsing/inference/baseInference.d.ts +6 -2
- package/src/v2/parsing/inference/baseInference.js +6 -2
- package/src/v2/parsing/inference/failedInferenceResponse.d.ts +2 -2
- package/src/v2/parsing/inference/failedInferenceResponse.js +2 -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 +15 -5
- package/src/v2/parsing/inference/field/inferenceFields.js +12 -4
- 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 +19 -11
- package/src/v2/parsing/inference/field/objectField.js +22 -34
- 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/parsing/job/job.d.ts +8 -8
- package/src/v2/parsing/job/job.js +1 -1
- package/src/v2/parsing/job/jobResponse.d.ts +1 -1
- package/src/v2/parsing/job/jobResponse.js +1 -1
- package/src/v2/parsing/job/jobWebhook.d.ts +1 -1
- package/src/v2/parsing/job/jobWebhook.js +1 -1
- package/src/v2/parsing/search/baseSearchResponse.d.ts +1 -1
- package/src/v2/parsing/search/baseSearchResponse.js +1 -1
- package/src/v2/parsing/search/searchModels.d.ts +1 -1
- package/src/v2/parsing/search/searchModels.js +1 -1
- package/src/v2/parsing/search/searchRagDocuments.d.ts +1 -1
- package/src/v2/parsing/search/searchRagDocuments.js +1 -1
- package/src/v2/parsing/search/searchResponse.d.ts +1 -1
- package/src/v2/parsing/search/searchResponse.js +1 -1
- package/src/v2/product/baseProduct.d.ts +26 -6
- package/src/v2/product/baseProduct.js +31 -7
- package/src/v2/product/classification/classification.d.ts +10 -4
- package/src/v2/product/classification/classification.js +10 -4
- package/src/v2/product/classification/classificationClassifier.d.ts +7 -3
- package/src/v2/product/classification/classificationClassifier.js +7 -3
- package/src/v2/product/classification/classificationInference.d.ts +7 -3
- package/src/v2/product/classification/classificationInference.js +7 -3
- package/src/v2/product/classification/classificationResponse.d.ts +4 -2
- package/src/v2/product/classification/classificationResponse.js +4 -2
- package/src/v2/product/classification/classificationResult.d.ts +6 -2
- package/src/v2/product/classification/classificationResult.js +6 -2
- package/src/v2/product/classification/params/classificationParameters.d.ts +1 -1
- package/src/v2/product/classification/params/classificationParameters.js +1 -1
- package/src/v2/product/crop/crop.d.ts +10 -4
- package/src/v2/product/crop/crop.js +10 -4
- package/src/v2/product/crop/cropInference.d.ts +8 -4
- package/src/v2/product/crop/cropInference.js +8 -4
- package/src/v2/product/crop/cropItem.d.ts +8 -4
- package/src/v2/product/crop/cropItem.js +9 -5
- package/src/v2/product/crop/cropResponse.d.ts +4 -2
- package/src/v2/product/crop/cropResponse.js +4 -2
- package/src/v2/product/crop/cropResult.d.ts +7 -3
- package/src/v2/product/crop/cropResult.js +8 -4
- package/src/v2/product/crop/params/cropParameters.d.ts +1 -1
- package/src/v2/product/crop/params/cropParameters.js +1 -1
- 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 +25 -5
- package/src/v2/product/extraction/extraction.js +32 -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 +7 -3
- package/src/v2/product/extraction/extractionInference.js +7 -3
- package/src/v2/product/extraction/extractionResponse.d.ts +4 -2
- package/src/v2/product/extraction/extractionResponse.js +4 -2
- package/src/v2/product/extraction/extractionResult.d.ts +9 -5
- package/src/v2/product/extraction/extractionResult.js +9 -5
- package/src/v2/product/extraction/index.d.ts +1 -0
- package/src/v2/product/extraction/index.js +1 -0
- 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.d.ts +1 -1
- package/src/v2/product/extraction/params/extractionParameters.js +4 -4
- package/src/v2/product/extraction/ragDocuments/annotatedBaseField.d.ts +20 -0
- package/src/v2/product/extraction/ragDocuments/annotatedBaseField.js +15 -0
- package/src/v2/product/extraction/ragDocuments/annotatedFields.d.ts +27 -0
- package/src/v2/product/extraction/ragDocuments/annotatedFields.js +57 -0
- package/src/v2/product/extraction/ragDocuments/annotatedListField.d.ts +26 -0
- package/src/v2/product/extraction/ragDocuments/annotatedListField.js +69 -0
- package/src/v2/product/extraction/ragDocuments/annotatedObjectField.d.ts +43 -0
- package/src/v2/product/extraction/ragDocuments/annotatedObjectField.js +47 -0
- package/src/v2/product/extraction/ragDocuments/annotatedSimpleField.d.ts +15 -0
- package/src/v2/product/extraction/ragDocuments/annotatedSimpleField.js +13 -0
- package/src/v2/product/extraction/ragDocuments/extractionRagAnnotationResponse.d.ts +25 -0
- package/src/v2/product/extraction/ragDocuments/extractionRagAnnotationResponse.js +17 -0
- package/src/v2/product/extraction/ragDocuments/fieldFactory.d.ts +12 -0
- package/src/v2/product/extraction/ragDocuments/fieldFactory.js +23 -0
- package/src/v2/product/extraction/ragDocuments/index.d.ts +7 -0
- package/src/v2/product/extraction/ragDocuments/index.js +7 -0
- package/src/v2/product/extraction/ragDocuments/params/index.d.ts +2 -0
- package/src/v2/product/extraction/ragDocuments/params/index.js +2 -0
- package/src/v2/product/extraction/ragDocuments/params/ragDocumentAnnotationParameters.d.ts +27 -0
- package/src/v2/product/extraction/ragDocuments/params/ragDocumentAnnotationParameters.js +43 -0
- package/src/v2/product/extraction/ragDocuments/params/ragDocumentUploadParameters.d.ts +7 -0
- package/src/v2/product/extraction/ragDocuments/params/ragDocumentUploadParameters.js +9 -0
- package/src/v2/product/extraction/ragDocuments/ragAnnotation.d.ts +12 -0
- package/src/v2/product/extraction/ragDocuments/ragAnnotation.js +9 -0
- package/src/v2/product/ocr/ocr.d.ts +10 -4
- package/src/v2/product/ocr/ocr.js +10 -4
- package/src/v2/product/ocr/ocrInference.d.ts +8 -4
- package/src/v2/product/ocr/ocrInference.js +8 -4
- 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 +4 -2
- package/src/v2/product/ocr/ocrResponse.js +4 -2
- 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/ocr/params/ocrParameters.d.ts +1 -1
- package/src/v2/product/ocr/params/ocrParameters.js +1 -1
- package/src/v2/product/split/params/splitParameters.d.ts +1 -1
- package/src/v2/product/split/params/splitParameters.js +1 -1
- package/src/v2/product/split/split.d.ts +10 -4
- package/src/v2/product/split/split.js +10 -4
- package/src/v2/product/split/splitInference.d.ts +7 -3
- package/src/v2/product/split/splitInference.js +7 -3
- package/src/v2/product/split/splitRange.d.ts +4 -2
- package/src/v2/product/split/splitRange.js +5 -3
- package/src/v2/product/split/splitResponse.d.ts +4 -2
- package/src/v2/product/split/splitResponse.js +4 -2
- package/src/v2/product/split/splitResult.d.ts +3 -1
- package/src/v2/product/split/splitResult.js +4 -2
- package/src/v2/search/baseSearch.d.ts +11 -5
- package/src/v2/search/baseSearch.js +9 -3
- package/src/v2/search/models/modelSearch.d.ts +12 -6
- package/src/v2/search/models/modelSearch.js +12 -6
- package/src/v2/search/models/modelSearchParameters.d.ts +4 -2
- package/src/v2/search/models/modelSearchParameters.js +4 -2
- package/src/v2/search/models/modelSearchResponse.d.ts +2 -2
- package/src/v2/search/models/modelSearchResponse.js +2 -2
- package/src/v2/search/ragDocuments/ragDocumentSearch.d.ts +12 -6
- package/src/v2/search/ragDocuments/ragDocumentSearch.js +12 -6
- package/src/v2/search/ragDocuments/ragDocumentSearchParameters.d.ts +4 -2
- package/src/v2/search/ragDocuments/ragDocumentSearchParameters.js +4 -2
- package/src/v2/search/ragDocuments/ragDocumentSearchResponse.d.ts +2 -2
- package/src/v2/search/ragDocuments/ragDocumentSearchResponse.js +2 -2
|
@@ -1,7 +1,13 @@
|
|
|
1
1
|
import { InferenceFields } from "./inferenceFields.js";
|
|
2
2
|
import { BaseField } from "./baseField.js";
|
|
3
|
-
/**
|
|
3
|
+
/**
|
|
4
|
+
* Object-valued inference field.
|
|
5
|
+
*/
|
|
4
6
|
export class ObjectField extends BaseField {
|
|
7
|
+
constructor(serverResponse, indentLevel = 0) {
|
|
8
|
+
super(serverResponse, indentLevel);
|
|
9
|
+
this.fields = new InferenceFields(serverResponse["fields"], this._indentLevel + 1);
|
|
10
|
+
}
|
|
5
11
|
/**
|
|
6
12
|
* Retrieves the simple sub-fields in the object.
|
|
7
13
|
*
|
|
@@ -48,59 +54,41 @@ export class ObjectField extends BaseField {
|
|
|
48
54
|
* Retrieves a SimpleField by its name if it exists and is of the correct type.
|
|
49
55
|
*
|
|
50
56
|
* @param {string} fieldName - The name of the field to retrieve.
|
|
51
|
-
* @return {SimpleField} The
|
|
52
|
-
* @throws {Error} If the field does not exist or is
|
|
57
|
+
* @return {SimpleField} The field instance if it exists and is valid, or undefined if not.
|
|
58
|
+
* @throws {Error} If the field does not exist or is of wrong type.
|
|
53
59
|
*/
|
|
54
60
|
getSimpleField(fieldName) {
|
|
55
|
-
|
|
56
|
-
throw new Error(`The field '${fieldName}' was not found.`);
|
|
57
|
-
}
|
|
58
|
-
if (this.fields.get(fieldName)?.constructor.name !== "SimpleField") {
|
|
59
|
-
throw new Error(`The field '${fieldName}' is not a SimpleField.`);
|
|
60
|
-
}
|
|
61
|
-
return this.simpleFields.get(fieldName);
|
|
61
|
+
return this.fields.getSimpleField(fieldName);
|
|
62
62
|
}
|
|
63
63
|
/**
|
|
64
64
|
* Retrieves a ListField by its name if it exists and is of the correct type.
|
|
65
65
|
*
|
|
66
66
|
* @param {string} fieldName - The name of the field to retrieve.
|
|
67
|
-
* @return {ListField} The
|
|
68
|
-
* @throws {Error} If the field does not exist or is
|
|
67
|
+
* @return {ListField} The field instance if it exists and is valid, or undefined if not.
|
|
68
|
+
* @throws {Error} If the field does not exist or is of wrong type.
|
|
69
69
|
*/
|
|
70
70
|
getListField(fieldName) {
|
|
71
|
-
|
|
72
|
-
throw new Error(`The field '${fieldName}' was not found.`);
|
|
73
|
-
}
|
|
74
|
-
if (this.fields.get(fieldName)?.constructor.name !== "ListField") {
|
|
75
|
-
throw new Error(`The field '${fieldName}' is not a ListField.`);
|
|
76
|
-
}
|
|
77
|
-
return this.listFields.get(fieldName);
|
|
71
|
+
return this.fields.getListField(fieldName);
|
|
78
72
|
}
|
|
79
73
|
/**
|
|
80
74
|
* Retrieves an ObjectField by its name if it exists and is of the correct type.
|
|
81
75
|
*
|
|
82
76
|
* @param {string} fieldName - The name of the field to retrieve.
|
|
83
|
-
* @return {ObjectField} The
|
|
84
|
-
* @throws {Error} If the field does not exist or is
|
|
77
|
+
* @return {ObjectField} The field instance if it exists and is valid, or undefined if not.
|
|
78
|
+
* @throws {Error} If the field does not exist or is of wrong type.
|
|
85
79
|
*/
|
|
86
80
|
getObjectField(fieldName) {
|
|
87
|
-
|
|
88
|
-
throw new Error(`The field '${fieldName}' was not found.`);
|
|
89
|
-
}
|
|
90
|
-
if (this.fields.get(fieldName)?.constructor.name !== "ObjectField") {
|
|
91
|
-
throw new Error(`The field '${fieldName}' is not an ObjectField.`);
|
|
92
|
-
}
|
|
93
|
-
return this.objectFields.get(fieldName);
|
|
94
|
-
}
|
|
95
|
-
constructor(serverResponse, indentLevel = 0) {
|
|
96
|
-
super(serverResponse, indentLevel);
|
|
97
|
-
this.fields = new InferenceFields(serverResponse["fields"], this._indentLevel + 1);
|
|
81
|
+
return this.fields.getObjectField(fieldName);
|
|
98
82
|
}
|
|
99
|
-
/**
|
|
83
|
+
/**
|
|
84
|
+
* Returns a readable representation of nested fields.
|
|
85
|
+
*/
|
|
100
86
|
toString() {
|
|
101
87
|
return "\n" + (this.fields ? this.fields.toString(1) : "");
|
|
102
88
|
}
|
|
103
|
-
/**
|
|
89
|
+
/**
|
|
90
|
+
* Returns a compact representation suitable for list items.
|
|
91
|
+
*/
|
|
104
92
|
toStringFromList() {
|
|
105
93
|
return this.fields ? this.fields.toString(2).substring(4) : "";
|
|
106
94
|
}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { StringDict } from "../../../../parsing/stringDict.js";
|
|
2
|
-
/**
|
|
2
|
+
/**
|
|
3
|
+
* Metadata about the RAG operation.
|
|
4
|
+
*/
|
|
3
5
|
export declare class RagMetadata {
|
|
4
6
|
/**
|
|
5
7
|
* The UUID of the matched document used during the RAG operation.
|
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
import { StringDict } from "../../../../parsing/stringDict.js";
|
|
2
2
|
import { RawTextPage } from "./rawTextPage.js";
|
|
3
|
-
/**
|
|
3
|
+
/**
|
|
4
|
+
* Full raw OCR text grouped by page.
|
|
5
|
+
*/
|
|
4
6
|
export declare class RawText {
|
|
5
7
|
/**
|
|
6
8
|
* List of pages with their extracted text content.
|
|
7
9
|
*/
|
|
8
10
|
pages: Array<RawTextPage>;
|
|
9
11
|
constructor(serverResponse: StringDict);
|
|
10
|
-
/**
|
|
12
|
+
/**
|
|
13
|
+
* Returns concatenated raw text for all pages.
|
|
14
|
+
*/
|
|
11
15
|
toString(): string;
|
|
12
16
|
}
|
|
@@ -1,10 +1,14 @@
|
|
|
1
1
|
import { RawTextPage } from "./rawTextPage.js";
|
|
2
|
-
/**
|
|
2
|
+
/**
|
|
3
|
+
* Full raw OCR text grouped by page.
|
|
4
|
+
*/
|
|
3
5
|
export class RawText {
|
|
4
6
|
constructor(serverResponse) {
|
|
5
7
|
this.pages = serverResponse["pages"] ? serverResponse["pages"].map((rawTextPage) => new RawTextPage(rawTextPage)) : [];
|
|
6
8
|
}
|
|
7
|
-
/**
|
|
9
|
+
/**
|
|
10
|
+
* Returns concatenated raw text for all pages.
|
|
11
|
+
*/
|
|
8
12
|
toString() {
|
|
9
13
|
return this.pages.map(page => page.toString()).join("\n\n");
|
|
10
14
|
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { StringDict } from "../../../../parsing/stringDict.js";
|
|
2
2
|
import { BaseField } from "./baseField.js";
|
|
3
|
-
/**
|
|
3
|
+
/**
|
|
4
|
+
* Scalar inference field.
|
|
5
|
+
*/
|
|
4
6
|
export declare class SimpleField extends BaseField {
|
|
5
7
|
/**
|
|
6
8
|
* The untyped value of the field.
|
|
@@ -24,6 +26,8 @@ export declare class SimpleField extends BaseField {
|
|
|
24
26
|
* Retrieves a boolean field value as a boolean.
|
|
25
27
|
*/
|
|
26
28
|
get booleanValue(): boolean | null;
|
|
27
|
-
/**
|
|
29
|
+
/**
|
|
30
|
+
* Returns a readable scalar representation.
|
|
31
|
+
*/
|
|
28
32
|
toString(): string;
|
|
29
33
|
}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { BaseField } from "./baseField.js";
|
|
2
|
-
/**
|
|
2
|
+
/**
|
|
3
|
+
* Scalar inference field.
|
|
4
|
+
*/
|
|
3
5
|
export class SimpleField extends BaseField {
|
|
4
6
|
constructor(serverResponse, indentLevel = 0) {
|
|
5
7
|
super(serverResponse, indentLevel);
|
|
6
|
-
this.value =
|
|
7
|
-
|
|
8
|
+
this.value = serverResponse["value"] === undefined
|
|
9
|
+
? null : serverResponse["value"];
|
|
8
10
|
}
|
|
9
11
|
/**
|
|
10
12
|
* Retrieves a string field value as a string.
|
|
@@ -33,7 +35,9 @@ export class SimpleField extends BaseField {
|
|
|
33
35
|
}
|
|
34
36
|
return this.value;
|
|
35
37
|
}
|
|
36
|
-
/**
|
|
38
|
+
/**
|
|
39
|
+
* Returns a readable scalar representation.
|
|
40
|
+
*/
|
|
37
41
|
toString() {
|
|
38
42
|
if (this.value === null) {
|
|
39
43
|
return "";
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import { StringDict } from "../../../parsing/stringDict.js";
|
|
2
|
-
/**
|
|
2
|
+
/**
|
|
3
|
+
* File metadata attached to a v2 inference.
|
|
4
|
+
*/
|
|
3
5
|
export declare class InferenceFile {
|
|
4
6
|
/**
|
|
5
7
|
* Name of the file.
|
|
@@ -18,6 +20,8 @@ export declare class InferenceFile {
|
|
|
18
20
|
*/
|
|
19
21
|
mimeType: string;
|
|
20
22
|
constructor(serverResponse: StringDict);
|
|
21
|
-
/**
|
|
23
|
+
/**
|
|
24
|
+
* Returns a printable representation of file metadata.
|
|
25
|
+
*/
|
|
22
26
|
toString(): string;
|
|
23
27
|
}
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
/**
|
|
1
|
+
/**
|
|
2
|
+
* File metadata attached to a v2 inference.
|
|
3
|
+
*/
|
|
2
4
|
export class InferenceFile {
|
|
3
5
|
constructor(serverResponse) {
|
|
4
6
|
this.name = serverResponse["name"];
|
|
@@ -6,7 +8,9 @@ export class InferenceFile {
|
|
|
6
8
|
this.pageCount = serverResponse["page_count"];
|
|
7
9
|
this.mimeType = serverResponse["mime_type"];
|
|
8
10
|
}
|
|
9
|
-
/**
|
|
11
|
+
/**
|
|
12
|
+
* Returns a printable representation of file metadata.
|
|
13
|
+
*/
|
|
10
14
|
toString() {
|
|
11
15
|
return ("File\n" +
|
|
12
16
|
"====\n" +
|
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
import { StringDict } from "../../../parsing/stringDict.js";
|
|
2
|
-
/**
|
|
2
|
+
/**
|
|
3
|
+
* Model metadata attached to a v2 inference.
|
|
4
|
+
*/
|
|
3
5
|
export declare class InferenceModel {
|
|
4
6
|
/**
|
|
5
7
|
* ID of the model.
|
|
6
8
|
*/
|
|
7
9
|
id: string;
|
|
8
10
|
constructor(serverResponse: StringDict);
|
|
9
|
-
/**
|
|
11
|
+
/**
|
|
12
|
+
* Returns a printable representation of model metadata.
|
|
13
|
+
*/
|
|
10
14
|
toString(): string;
|
|
11
15
|
}
|
|
@@ -1,9 +1,13 @@
|
|
|
1
|
-
/**
|
|
1
|
+
/**
|
|
2
|
+
* Model metadata attached to a v2 inference.
|
|
3
|
+
*/
|
|
2
4
|
export class InferenceModel {
|
|
3
5
|
constructor(serverResponse) {
|
|
4
6
|
this.id = serverResponse["id"];
|
|
5
7
|
}
|
|
6
|
-
/**
|
|
8
|
+
/**
|
|
9
|
+
* Returns a printable representation of model metadata.
|
|
10
|
+
*/
|
|
7
11
|
toString() {
|
|
8
12
|
return "Model\n" +
|
|
9
13
|
"=====\n" +
|
|
@@ -1,32 +1,32 @@
|
|
|
1
1
|
import { StringDict } from "../../../parsing/index.js";
|
|
2
|
-
import { ErrorResponse } from "
|
|
2
|
+
import { ErrorResponse } from "../../index.js";
|
|
3
3
|
import { JobWebhook } from "./jobWebhook.js";
|
|
4
4
|
/**
|
|
5
5
|
* Job information for a V2 polling attempt.
|
|
6
6
|
*/
|
|
7
7
|
export declare class Job {
|
|
8
8
|
/**
|
|
9
|
-
* Job
|
|
9
|
+
* UUID of the Job.
|
|
10
10
|
*/
|
|
11
11
|
id: string;
|
|
12
12
|
/**
|
|
13
|
-
*
|
|
13
|
+
* If an error occurred during processing, contains the problem details.
|
|
14
14
|
*/
|
|
15
15
|
error?: ErrorResponse;
|
|
16
16
|
/**
|
|
17
17
|
* Date and time of the Job creation.
|
|
18
18
|
*/
|
|
19
|
-
createdAt: Date
|
|
19
|
+
createdAt: Date;
|
|
20
20
|
/**
|
|
21
21
|
* Date and time of the Job completion. Filled once processing is finished.
|
|
22
22
|
*/
|
|
23
23
|
completedAt: Date | null | undefined;
|
|
24
24
|
/**
|
|
25
|
-
*
|
|
25
|
+
* UUID of the model to be used for the inference.
|
|
26
26
|
*/
|
|
27
27
|
modelId: string;
|
|
28
28
|
/**
|
|
29
|
-
* Name
|
|
29
|
+
* Name of the file sent.
|
|
30
30
|
*/
|
|
31
31
|
filename: string;
|
|
32
32
|
/**
|
|
@@ -42,11 +42,11 @@ export declare class Job {
|
|
|
42
42
|
*/
|
|
43
43
|
pollingUrl: string;
|
|
44
44
|
/**
|
|
45
|
-
* URL to
|
|
45
|
+
* URL to retrieve the inference results. Will be filled once the inference is ready.
|
|
46
46
|
*/
|
|
47
47
|
resultUrl?: string;
|
|
48
48
|
/**
|
|
49
|
-
*
|
|
49
|
+
* List of responses from webhooks called. Empty until processing is finished.
|
|
50
50
|
*/
|
|
51
51
|
webhooks: Array<JobWebhook>;
|
|
52
52
|
constructor(serverResponse: StringDict);
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { StringDict } from "../../../parsing/index.js";
|
|
2
|
-
import { BaseResponse } from "
|
|
2
|
+
import { BaseResponse } from "../baseResponse.js";
|
|
3
3
|
import { PaginationMetadata } from "./paginationMetadata.js";
|
|
4
4
|
/**
|
|
5
5
|
* Base class for search responses.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { StringDict } from "../../../parsing/index.js";
|
|
2
|
-
import { ModelSearchResponse } from "
|
|
2
|
+
import { ModelSearchResponse } from "../../search/models/modelSearchResponse.js";
|
|
3
3
|
/**
|
|
4
4
|
* Models search response.
|
|
5
5
|
* @deprecated Use `ModelSearchResponse` instead.
|
|
@@ -1,15 +1,35 @@
|
|
|
1
|
-
import { BaseProductParameters } from "
|
|
2
|
-
import { ResponseConstructor } from "
|
|
1
|
+
import { BaseProductParameters } from "../index.js";
|
|
2
|
+
import { ResponseConstructor, AnnotationResponseConstructor } from "../parsing/index.js";
|
|
3
|
+
import { BaseAnnotationParameters } from "../clientOptions/index.js";
|
|
4
|
+
import { BaseRagDocumentUploadParameters } from "../clientOptions/index.js";
|
|
3
5
|
/**
|
|
4
6
|
* Base class for all V2 product definitions.
|
|
5
7
|
*
|
|
6
8
|
* Child classes are passed to the Client when making requests.
|
|
7
9
|
*/
|
|
8
10
|
export declare abstract class BaseProduct {
|
|
9
|
-
/**
|
|
11
|
+
/**
|
|
12
|
+
* API slug for this product.
|
|
13
|
+
*/
|
|
14
|
+
static get slug(): string;
|
|
15
|
+
/**
|
|
16
|
+
* Parameter class accepted by this product.
|
|
17
|
+
*/
|
|
10
18
|
static get parametersClass(): new (...args: any[]) => BaseProductParameters;
|
|
11
|
-
/**
|
|
19
|
+
/**
|
|
20
|
+
* Response class returned by this product.
|
|
21
|
+
*/
|
|
12
22
|
static get responseClass(): ResponseConstructor<any>;
|
|
13
|
-
/**
|
|
14
|
-
|
|
23
|
+
/**
|
|
24
|
+
* Annotation Response class returned by this product.
|
|
25
|
+
*/
|
|
26
|
+
static get annotationResponseClass(): AnnotationResponseConstructor<any>;
|
|
27
|
+
/**
|
|
28
|
+
* Annotation Parameters class for this product.
|
|
29
|
+
*/
|
|
30
|
+
static get annotationParametersClass(): new (...args: any[]) => BaseAnnotationParameters;
|
|
31
|
+
/**
|
|
32
|
+
* Document Upload class for this product.
|
|
33
|
+
*/
|
|
34
|
+
static get ragDocumentUploadClass(): new (...args: any[]) => BaseRagDocumentUploadParameters;
|
|
15
35
|
}
|
|
@@ -4,16 +4,40 @@
|
|
|
4
4
|
* Child classes are passed to the Client when making requests.
|
|
5
5
|
*/
|
|
6
6
|
export class BaseProduct {
|
|
7
|
-
/**
|
|
7
|
+
/**
|
|
8
|
+
* API slug for this product.
|
|
9
|
+
*/
|
|
10
|
+
static get slug() {
|
|
11
|
+
throw new Error("Must define static slug property");
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Parameter class accepted by this product.
|
|
15
|
+
*/
|
|
8
16
|
static get parametersClass() {
|
|
9
|
-
throw new Error("Must define static
|
|
17
|
+
throw new Error("Must define static parametersClass property");
|
|
10
18
|
}
|
|
11
|
-
/**
|
|
19
|
+
/**
|
|
20
|
+
* Response class returned by this product.
|
|
21
|
+
*/
|
|
12
22
|
static get responseClass() {
|
|
13
|
-
throw new Error("Must define static
|
|
23
|
+
throw new Error("Must define static responseClass property");
|
|
14
24
|
}
|
|
15
|
-
/**
|
|
16
|
-
|
|
17
|
-
|
|
25
|
+
/**
|
|
26
|
+
* Annotation Response class returned by this product.
|
|
27
|
+
*/
|
|
28
|
+
static get annotationResponseClass() {
|
|
29
|
+
throw new Error("Must define static annotationResponseClass property");
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Annotation Parameters class for this product.
|
|
33
|
+
*/
|
|
34
|
+
static get annotationParametersClass() {
|
|
35
|
+
throw new Error("Must define static annotationParametersClass property");
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Document Upload class for this product.
|
|
39
|
+
*/
|
|
40
|
+
static get ragDocumentUploadClass() {
|
|
41
|
+
throw new Error("Must define static ragDocumentUploadClass property");
|
|
18
42
|
}
|
|
19
43
|
}
|
|
@@ -1,14 +1,20 @@
|
|
|
1
1
|
import { ClassificationResponse } from "./classificationResponse.js";
|
|
2
2
|
import { ClassificationParameters } from "./params/index.js";
|
|
3
|
-
import { BaseProduct } from "
|
|
3
|
+
import { BaseProduct } from "../baseProduct.js";
|
|
4
4
|
/**
|
|
5
5
|
* Automatically sort any image or scanned document into categories.
|
|
6
6
|
*/
|
|
7
7
|
export declare class Classification extends BaseProduct {
|
|
8
|
-
/**
|
|
8
|
+
/**
|
|
9
|
+
* @inheritDoc
|
|
10
|
+
*/
|
|
9
11
|
static get parametersClass(): typeof ClassificationParameters;
|
|
10
|
-
/**
|
|
12
|
+
/**
|
|
13
|
+
* @inheritDoc
|
|
14
|
+
*/
|
|
11
15
|
static get responseClass(): typeof ClassificationResponse;
|
|
12
|
-
/**
|
|
16
|
+
/**
|
|
17
|
+
* @inheritDoc
|
|
18
|
+
*/
|
|
13
19
|
static get slug(): string;
|
|
14
20
|
}
|
|
@@ -1,19 +1,25 @@
|
|
|
1
1
|
import { ClassificationResponse } from "./classificationResponse.js";
|
|
2
2
|
import { ClassificationParameters } from "./params/index.js";
|
|
3
|
-
import { BaseProduct } from "
|
|
3
|
+
import { BaseProduct } from "../baseProduct.js";
|
|
4
4
|
/**
|
|
5
5
|
* Automatically sort any image or scanned document into categories.
|
|
6
6
|
*/
|
|
7
7
|
export class Classification extends BaseProduct {
|
|
8
|
-
/**
|
|
8
|
+
/**
|
|
9
|
+
* @inheritDoc
|
|
10
|
+
*/
|
|
9
11
|
static get parametersClass() {
|
|
10
12
|
return ClassificationParameters;
|
|
11
13
|
}
|
|
12
|
-
/**
|
|
14
|
+
/**
|
|
15
|
+
* @inheritDoc
|
|
16
|
+
*/
|
|
13
17
|
static get responseClass() {
|
|
14
18
|
return ClassificationResponse;
|
|
15
19
|
}
|
|
16
|
-
/**
|
|
20
|
+
/**
|
|
21
|
+
* @inheritDoc
|
|
22
|
+
*/
|
|
17
23
|
static get slug() {
|
|
18
24
|
return "classification";
|
|
19
25
|
}
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { StringDict } from "../../../parsing/index.js";
|
|
2
|
-
import { ExtractionResponse } from "
|
|
2
|
+
import { ExtractionResponse } from "../index.js";
|
|
3
3
|
/**
|
|
4
4
|
* Document level classification.
|
|
5
5
|
*/
|
|
6
|
-
/**
|
|
6
|
+
/**
|
|
7
|
+
* Classifier output for document-level classification.
|
|
8
|
+
*/
|
|
7
9
|
export declare class ClassificationClassifier {
|
|
8
10
|
/**
|
|
9
11
|
* The document type, as identified on given classification values.
|
|
@@ -14,6 +16,8 @@ export declare class ClassificationClassifier {
|
|
|
14
16
|
*/
|
|
15
17
|
extractionResponse?: ExtractionResponse;
|
|
16
18
|
constructor(serverResponse: StringDict);
|
|
17
|
-
/**
|
|
19
|
+
/**
|
|
20
|
+
* Returns a readable classifier summary.
|
|
21
|
+
*/
|
|
18
22
|
toString(): string;
|
|
19
23
|
}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
|
-
import { ExtractionResponse } from "
|
|
1
|
+
import { ExtractionResponse } from "../index.js";
|
|
2
2
|
/**
|
|
3
3
|
* Document level classification.
|
|
4
4
|
*/
|
|
5
|
-
/**
|
|
5
|
+
/**
|
|
6
|
+
* Classifier output for document-level classification.
|
|
7
|
+
*/
|
|
6
8
|
export class ClassificationClassifier {
|
|
7
9
|
constructor(serverResponse) {
|
|
8
10
|
this.documentType = serverResponse["document_type"];
|
|
@@ -10,7 +12,9 @@ export class ClassificationClassifier {
|
|
|
10
12
|
? new ExtractionResponse(serverResponse["extraction_response"])
|
|
11
13
|
: undefined;
|
|
12
14
|
}
|
|
13
|
-
/**
|
|
15
|
+
/**
|
|
16
|
+
* Returns a readable classifier summary.
|
|
17
|
+
*/
|
|
14
18
|
toString() {
|
|
15
19
|
return `Document Type: ${this.documentType}`;
|
|
16
20
|
}
|
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
import { StringDict } from "../../../parsing/index.js";
|
|
2
|
-
import { BaseInference } from "
|
|
2
|
+
import { BaseInference } from "../../parsing/inference/baseInference.js";
|
|
3
3
|
import { ClassificationResult } from "./classificationResult.js";
|
|
4
|
-
/**
|
|
4
|
+
/**
|
|
5
|
+
* Inference payload for classification responses.
|
|
6
|
+
*/
|
|
5
7
|
export declare class ClassificationInference extends BaseInference {
|
|
6
8
|
/**
|
|
7
9
|
* Result of a classification inference.
|
|
8
10
|
*/
|
|
9
11
|
result: ClassificationResult;
|
|
10
12
|
constructor(serverResponse: StringDict);
|
|
11
|
-
/**
|
|
13
|
+
/**
|
|
14
|
+
* Returns a readable representation of the inference.
|
|
15
|
+
*/
|
|
12
16
|
toString(): string;
|
|
13
17
|
}
|