react-native-scanbot-sdk
Version:
Scanbot Document and Barcode Scanner SDK React Native Plugin for Android and iOS
526 lines • 23.9 kB
TypeScript
import { AnalyticsSubscriber } from './analytics/AnalyticsSubscriber';
import { BarcodeScannerConfiguration, BarcodeScannerResult } from './barcode';
import { AddPageParams, ApplyImageFiltersOnPageResult, ApplyImageFiltersResult, CheckScannerScreenConfiguration, CreateDocumentParams, CreatePDFArguments, CreatePDFResult, CreatePageResult, CreateTIFFResult, CroppingConfiguration, CroppingResult, DetectDocumentOnPageResult, DetectDocumentResult, DocumentExistsResult, DocumentFromLegacyPagesParams, DocumentScannerMetadata, DocumentScannerResult, DocumentScannerScreenConfiguration, ExtractImagesFromPdfArguments, ExtractImagesFromPdfResult, ExtractPagesFromPdfArguments, ExtractPagesFromPdfResult, FinderDocumentScannerConfiguration, FinderDocumentScannerResult, HealthInsuranceCardScannerConfiguration, ImageDataResult, LicenseInfoResult, MedicalCertificateScannerConfiguration, MockCameraParams, ModifyPageParams, MovePageParams, OCRConfigsResult, PDFFromDocumentParams, Page, PerformOCRArguments, PerformOCRResult, RefreshImageUrisResult, RemovePageParams, ResultWrapper, ResultWrapperWithMetadata, RotateImageResult, RotatePageResult, ScanbotSdkConfiguration, SetDocumentImageResult, StoredDocumentIDsResult, TIFFFromDocumentParams, VinScannerScreenConfiguration, WriteTIFFArguments, WriteTIFFResult } from './base';
import { CheckScannerConfiguration, CheckScanningResult } from './check/CheckScannerTypes';
import { ScanbotBarcodeCameraView } from './components/barcode-camera-view/ScanbotBarcodeCameraView';
import { ScanbotCroppingView } from './components/cropping-view/ScanbotCroppingView';
import { ScanbotDocumentScannerView } from './components/document-scanner-view/ScanbotDocumentScannerView';
import { CreditCardScannerConfiguration, CreditCardScanningResult } from './credit_card/CreditCardTypes';
import { DocumentDataExtractionResult, DocumentDataExtractorConfiguration, DocumentVerificationReport } from './document_data_extractor';
import { DocumentData } from './document_scanner';
import { GenericDocument } from './documents';
import { DocumentQualityAnalyzerConfiguration, DocumentQualityAnalyzerResult } from './dqa/DocumentQualityAnalyzerTypes';
import { EuropeanHealthInsuranceCardRecognitionResult, EuropeanHealthInsuranceCardRecognizerConfiguration } from './ehic/EuropeanHealthInsuranceCardTypes';
import { ParametricFilter } from './image_filters/ParametricFilters';
import { MedicalCertificateScanningParameters, MedicalCertificateScanningResult } from './medical_certificate/MedicalCertificateTypes';
import { MrzScannerConfiguration, MrzScannerResult } from './mrz/MrzTypes';
import { VinScannerResult } from './vin/VinScannerTypes';
declare const ScanbotDocument: {
/**
* Create a new document.
*/
createDocument(params: CreateDocumentParams): Promise<DocumentData>;
/**
* Create a new document from legacy pages.
*/
createDocumentFromLegacyPages(params: DocumentFromLegacyPagesParams): Promise<DocumentData>;
/**
* Create a new document from a PDF file.
*/
createDocumentFromPDF(pdfUri: string): Promise<DocumentData>;
/**
* Check if a document with the given ID exists.
*/
documentExists(documentID: string): Promise<DocumentExistsResult>;
/**
* Load a document by its ID.
*/
loadDocument(documentID: string): Promise<DocumentData>;
/**
* Gets all stored document IDs.
*/
storedDocumentIDs(): Promise<StoredDocumentIDsResult>;
/**
* Clone a document by its ID.
*/
cloneDocument(documentID: string): Promise<DocumentData>;
/**
* Delete a document by its ID.
*/
deleteDocument(documentID: string): Promise<void>;
/**
* Delete all documents.
*/
deleteAllDocuments(): Promise<void>;
/**
* Creates a PDF for the given document.
* Please check the extra options that are part of the input params to modify the created PDF file per your needs.
*/
createPDF(params: PDFFromDocumentParams): Promise<CreatePDFResult>;
/**
* Creates a TIFF for the given document.
* Please check the extra options that are part of the input params to modify the created TIFF file per your needs.
*/
createTIFF(params: TIFFFromDocumentParams): Promise<CreateTIFFResult>;
/**
* Add a new page to a document and return the updated document.
*/
addPage(params: AddPageParams): Promise<DocumentData>;
/**
* Move a page in a document and return the updated document.
*/
movePage(params: MovePageParams): Promise<DocumentData>;
/**
* Modify a page in a document and return the updated document.
*/
modifyPage(params: ModifyPageParams): Promise<DocumentData>;
/**
* Remove a page from a document.
*/
removePage(params: RemovePageParams): Promise<DocumentData>;
/**
* Remove all pages from a document in one batch operation.
*/
removeAllPages(documentID: string): Promise<DocumentData>;
};
declare const ScanbotSDKUI: {
/**
* Opens the Ready-To-Use UI Document Scanner screen with the desired configuration.
*
* @deprecated Use ***startDocumentScanner*** from ***'react-native-scanbot-sdk/ui_v2'*** instead.
*/
startDocumentScanner(configuration: DocumentScannerScreenConfiguration): Promise<ResultWrapperWithMetadata<DocumentScannerResult, DocumentScannerMetadata>>;
/**
* Forces the Ready-To-Use UI Document Scanner screen to close while it is running.
*
* @deprecated
*/
closeDocumentScanner(): Promise<void>;
/**
* Opens the Ready-To-Use UI Finder Document Scanner screen with the desired configuration.
*
* @deprecated Use ***startDocumentScanner*** from ***'react-native-scanbot-sdk/ui_v2'*** instead.
*/
startFinderDocumentScanner(configuration: FinderDocumentScannerConfiguration): Promise<ResultWrapper<FinderDocumentScannerResult>>;
/**
* Forces the Ready-To-Use UI Finder Document Scanner screen to close while it is running.
*
* @deprecated
*/
closeFinderDocumentScanner(): Promise<void>;
/**
* Opens the Ready-To-Use UI Cropping screen with the desired configuration.
*
* @deprecated Use ***startCroppingScreen*** from ***'react-native-scanbot-sdk/ui_v2'*** instead.
*/
startCroppingScreen(page: Page, configuration: CroppingConfiguration): Promise<ResultWrapper<CroppingResult>>;
/**
* Forces the Ready-To-Use UI Cropping screen to close while it is running.
*
* @deprecated
*/
closeCroppingScreen(): Promise<void>;
/**
* Opens the Ready-To-Use UI European Health Insurance Card Scanner screen with the desired configuration.
*
* @deprecated Use ***startDocumentDataExtractor*** instead and enable ***DE_HEALTH_INSURANCE_CARD_FRONT*** and ***EU_HEALTH_INSURANCE_CARD*** document formats.
*/
startEHICScanner(configuration: HealthInsuranceCardScannerConfiguration): Promise<ResultWrapper<EuropeanHealthInsuranceCardRecognitionResult>>;
/**
* Forces the Ready-To-Use UI European Health Insurance Card Scanner screen to close while it is running.
*
* @deprecated
*/
closeEHICScanner(): Promise<void>;
/**
* Opens the Ready-To-Use UI Medical Certificate Scanner screen with the desired configuration.
*/
startMedicalCertificateScanner(configuration: MedicalCertificateScannerConfiguration): Promise<ResultWrapper<MedicalCertificateScanningResult>>;
/**
* Forces the Ready-To-Use UI Medical Certificate Scanner screen to close while it is running.
*/
closeMedicalCertificateScanner(): Promise<void>;
/**
* Opens the Ready-To-Use UI Check Scanner screen with the desired configuration.
*
* @deprecated Use ***startCheckScanner*** from ***'react-native-scanbot-sdk/ui_v2'*** instead.
*/
startCheckScanner(configuration: CheckScannerScreenConfiguration): Promise<ResultWrapper<CheckScanningResult>>;
/**
* Forces the Ready-To-Use UI Check Scanner screen to close while it is running.
*
* @deprecated
*/
closeCheckScanner(): Promise<void>;
/**
* Opens the Ready-To-Use UI VIN Scanner screen with the desired configuration.
*
* @deprecated Use ***startVINScanner*** from ***'react-native-scanbot-sdk/ui_v2'*** instead.
*/
startVinScanner(configuration: VinScannerScreenConfiguration): Promise<ResultWrapper<VinScannerResult>>;
/**
* Forces the Ready-To-Use UI VIN Scanner screen to close while it is running.
*
* @deprecated
*/
closeVinScanner(): Promise<void>;
};
declare const ScanbotSDK: {
UI: {
/**
* Opens the Ready-To-Use UI Document Scanner screen with the desired configuration.
*
* @deprecated Use ***startDocumentScanner*** from ***'react-native-scanbot-sdk/ui_v2'*** instead.
*/
startDocumentScanner(configuration: DocumentScannerScreenConfiguration): Promise<ResultWrapperWithMetadata<DocumentScannerResult, DocumentScannerMetadata>>;
/**
* Forces the Ready-To-Use UI Document Scanner screen to close while it is running.
*
* @deprecated
*/
closeDocumentScanner(): Promise<void>;
/**
* Opens the Ready-To-Use UI Finder Document Scanner screen with the desired configuration.
*
* @deprecated Use ***startDocumentScanner*** from ***'react-native-scanbot-sdk/ui_v2'*** instead.
*/
startFinderDocumentScanner(configuration: FinderDocumentScannerConfiguration): Promise<ResultWrapper<FinderDocumentScannerResult>>;
/**
* Forces the Ready-To-Use UI Finder Document Scanner screen to close while it is running.
*
* @deprecated
*/
closeFinderDocumentScanner(): Promise<void>;
/**
* Opens the Ready-To-Use UI Cropping screen with the desired configuration.
*
* @deprecated Use ***startCroppingScreen*** from ***'react-native-scanbot-sdk/ui_v2'*** instead.
*/
startCroppingScreen(page: Page, configuration: CroppingConfiguration): Promise<ResultWrapper<CroppingResult>>;
/**
* Forces the Ready-To-Use UI Cropping screen to close while it is running.
*
* @deprecated
*/
closeCroppingScreen(): Promise<void>;
/**
* Opens the Ready-To-Use UI European Health Insurance Card Scanner screen with the desired configuration.
*
* @deprecated Use ***startDocumentDataExtractor*** instead and enable ***DE_HEALTH_INSURANCE_CARD_FRONT*** and ***EU_HEALTH_INSURANCE_CARD*** document formats.
*/
startEHICScanner(configuration: HealthInsuranceCardScannerConfiguration): Promise<ResultWrapper<EuropeanHealthInsuranceCardRecognitionResult>>;
/**
* Forces the Ready-To-Use UI European Health Insurance Card Scanner screen to close while it is running.
*
* @deprecated
*/
closeEHICScanner(): Promise<void>;
/**
* Opens the Ready-To-Use UI Medical Certificate Scanner screen with the desired configuration.
*/
startMedicalCertificateScanner(configuration: MedicalCertificateScannerConfiguration): Promise<ResultWrapper<MedicalCertificateScanningResult>>;
/**
* Forces the Ready-To-Use UI Medical Certificate Scanner screen to close while it is running.
*/
closeMedicalCertificateScanner(): Promise<void>;
/**
* Opens the Ready-To-Use UI Check Scanner screen with the desired configuration.
*
* @deprecated Use ***startCheckScanner*** from ***'react-native-scanbot-sdk/ui_v2'*** instead.
*/
startCheckScanner(configuration: CheckScannerScreenConfiguration): Promise<ResultWrapper<CheckScanningResult>>;
/**
* Forces the Ready-To-Use UI Check Scanner screen to close while it is running.
*
* @deprecated
*/
closeCheckScanner(): Promise<void>;
/**
* Opens the Ready-To-Use UI VIN Scanner screen with the desired configuration.
*
* @deprecated Use ***startVINScanner*** from ***'react-native-scanbot-sdk/ui_v2'*** instead.
*/
startVinScanner(configuration: VinScannerScreenConfiguration): Promise<ResultWrapper<VinScannerResult>>;
/**
* Forces the Ready-To-Use UI VIN Scanner screen to close while it is running.
*
* @deprecated
*/
closeVinScanner(): Promise<void>;
};
Document: {
/**
* Create a new document.
*/
createDocument(params: CreateDocumentParams): Promise<DocumentData>;
/**
* Create a new document from legacy pages.
*/
createDocumentFromLegacyPages(params: DocumentFromLegacyPagesParams): Promise<DocumentData>;
/**
* Create a new document from a PDF file.
*/
createDocumentFromPDF(pdfUri: string): Promise<DocumentData>;
/**
* Check if a document with the given ID exists.
*/
documentExists(documentID: string): Promise<DocumentExistsResult>;
/**
* Load a document by its ID.
*/
loadDocument(documentID: string): Promise<DocumentData>;
/**
* Gets all stored document IDs.
*/
storedDocumentIDs(): Promise<StoredDocumentIDsResult>;
/**
* Clone a document by its ID.
*/
cloneDocument(documentID: string): Promise<DocumentData>;
/**
* Delete a document by its ID.
*/
deleteDocument(documentID: string): Promise<void>;
/**
* Delete all documents.
*/
deleteAllDocuments(): Promise<void>;
/**
* Creates a PDF for the given document.
* Please check the extra options that are part of the input params to modify the created PDF file per your needs.
*/
createPDF(params: PDFFromDocumentParams): Promise<CreatePDFResult>;
/**
* Creates a TIFF for the given document.
* Please check the extra options that are part of the input params to modify the created TIFF file per your needs.
*/
createTIFF(params: TIFFFromDocumentParams): Promise<CreateTIFFResult>;
/**
* Add a new page to a document and return the updated document.
*/
addPage(params: AddPageParams): Promise<DocumentData>;
/**
* Move a page in a document and return the updated document.
*/
movePage(params: MovePageParams): Promise<DocumentData>;
/**
* Modify a page in a document and return the updated document.
*/
modifyPage(params: ModifyPageParams): Promise<DocumentData>;
/**
* Remove a page from a document.
*/
removePage(params: RemovePageParams): Promise<DocumentData>;
/**
* Remove all pages from a document in one batch operation.
*/
removeAllPages(documentID: string): Promise<DocumentData>;
};
/**
* Initializes the Scanbot SDK with the preferred configuration.
*/
initializeSDK(config: ScanbotSdkConfiguration): Promise<LicenseInfoResult>;
/**
* Provides complete information about the current license status.
*/
getLicenseInfo(): Promise<LicenseInfoResult>;
/**
* Returns the available OCR configs.
*/
getOCRConfigs(): Promise<OCRConfigsResult>;
/**
* Removes all files generated by this plugin.
*/
cleanup(): Promise<void>;
/**
* Recreates the given pages to refresh the Image URIs.
*
* @deprecated Use {@link ScanbotSDK.Document} instead.
*/
refreshImageUris(params: {
pages: Page[];
}): Promise<RefreshImageUrisResult>;
/**
* Detects barcodes on the image represented by the file URI. The image file URI is part of the input arguments.
*/
detectBarcodesOnImage(params: {
imageFileUri: string;
configuration: BarcodeScannerConfiguration;
}): Promise<BarcodeScannerResult>;
/**
* Applies the given filters to the given image, and returns its URI.
*/
applyImageFilters(imageFileUri: string, filters: ParametricFilter[]): Promise<ApplyImageFiltersResult>;
/**
* Applies the given filters to the given page.
*
* @deprecated Use {@link ScanbotSDK.Document.modifyPage} instead.
*/
applyImageFiltersOnPage(page: Page, filters: ParametricFilter[]): Promise<ApplyImageFiltersOnPageResult>;
/**
* Creates a page with the image located at the given URI.
*
* @deprecated Use {@link ScanbotSDK.Document.createDocument} instead.
*/
createPage(imageUri: string): Promise<CreatePageResult>;
/**
* Removes the given page from the storage.
*
* @deprecated Use {@link ScanbotSDK.Document.removePage} instead.
*/
removePage(page: Page): Promise<void>;
/**
* Rotates the given page for the number of 90 degree counterclockwise rotations. Negative values will rotate clockwise.
*
* @deprecated Use {@link ScanbotSDK.Document.modifyPage} instead.
*/
rotatePage(page: Page, times: number): Promise<RotatePageResult>;
/**
* Applies the given image to the desired page.
*
* @deprecated Use {@link ScanbotSDK.Document} instead.
*/
setDocumentImage(page: Page, imageUri: string): Promise<SetDocumentImageResult>;
/**
* Detects a document on the given image and returns the result.
*/
detectDocument(imageFileUri: string): Promise<DetectDocumentResult>;
/**
* Detects a document on the given page and returns the result.
*
* @deprecated Use {@link ScanbotSDK.Document} instead.
*/
detectDocumentOnPage(page: Page): Promise<DetectDocumentOnPageResult>;
/**
* Extracts images from a PDF represented by the file URL. The PDF file URL is part of the input arguments.
*/
extractImagesFromPdf(params: ExtractImagesFromPdfArguments): Promise<ExtractImagesFromPdfResult>;
/**
* Extracts images from a PDF represented by the file URL, creates pages from them and returns the created pages.
* The PDF file URL is part of the input arguments.
*
* @deprecated Use {@link ScanbotSDK.Document.createDocumentFromPDF} instead.
*/
extractPagesFromPdf(params: ExtractPagesFromPdfArguments): Promise<ExtractPagesFromPdfResult>;
/**
* Returns the BASE64 Image Data for the given image.
*/
getImageData(imageFileUri: string): Promise<ImageDataResult>;
/**
* Rotates the given image by the specified degrees counterclockwise. Negative values will rotate clockwise.
*/
rotateImage(imageFileUri: string, degrees: number): Promise<RotateImageResult>;
/**
* Detects the quality of the document on a still image.
*/
documentQualityAnalyzer(params: {
imageFileUri: string;
configuration: DocumentQualityAnalyzerConfiguration;
}): Promise<DocumentQualityAnalyzerResult>;
/**
* Recognizes a Check on the given image.
*/
recognizeCheck(params: {
imageFileUri: string;
configuration: CheckScannerConfiguration;
}): Promise<CheckScanningResult>;
/**
* Recognizes an MRZ on the given image.
*/
recognizeMrz(params: {
imageFileUri: string;
configuration: MrzScannerConfiguration;
}): Promise<MrzScannerResult>;
/**
* Recognizes a Medical Certificate on the given image.
* Modify the result with extra options that are part of the input arguments.
*/
recognizeMedicalCertificate(params: {
imageFileUri: string;
configuration: MedicalCertificateScanningParameters;
}): Promise<MedicalCertificateScanningResult>;
/**
* Recognizes a European Health Insurance Card (EHIC) on the given image.
*
* @deprecated Use {@link documentDataExtractor} instead and enable ***EuropeanHealthInsuranceCardConfiguration*** configuration element.
*/
recognizeEHIC(params: {
imageFileUri: string;
configuration: EuropeanHealthInsuranceCardRecognizerConfiguration;
}): Promise<EuropeanHealthInsuranceCardRecognitionResult>;
/**
* Recognizes a Credit Card on the given image.
* Modify the result with extra options that are part of the configuration.
*/
recognizeCreditCard(params: {
imageFileUri: string;
configuration: CreditCardScannerConfiguration;
}): Promise<CreditCardScanningResult>;
/**
* Extract data on the given image.
* Set the expected document formats or leave it empty/undefined to recognize all supported document formats.
*/
documentDataExtractor(params: {
imageFileUri: string;
configuration: DocumentDataExtractorConfiguration;
}): Promise<DocumentDataExtractionResult>;
/**
* Performs OCR on given images. Set preferred ***ocrConfiguration*** engine, or leave it undefined to use the default one which is ***OCRScanbotEngineConfiguration***.
* If ***OCRTesseractConfiguration*** is used, the expected ***languages*** need to be set.
*/
performOCR(params: PerformOCRArguments): Promise<PerformOCRResult>;
/**
* Creates a PDF using the given list of image file URIs.
* Please check the extra options that are part of the input arguments to modify the created PDF file per your needs.
*/
createPDF(params: CreatePDFArguments): Promise<CreatePDFResult>;
/**
* Creates a TIFF using the given list of image file URIs.
* Please check the extra options that are part of the input arguments to modify the created TIFF file per your needs.
*/
writeTIFF(params: WriteTIFFArguments): Promise<WriteTIFFResult>;
/**
* Verifies the given document parts using the DocumentDataExtractorConfiguration.
*/
verifyDocument(params: {
documentParts: GenericDocument[];
configuration: DocumentDataExtractorConfiguration;
}): Promise<DocumentVerificationReport>;
/**
* Mock camera preview by using static images as a frame source.
* This is useful for testing purposes.
*/
mockCamera(params: MockCameraParams): Promise<void>;
/**
* Register analytics service callback to receive analytics events.
*/
setAnalyticsSubscriber(subscriber: AnalyticsSubscriber | null): Promise<void>;
};
export default ScanbotSDK;
export type ScanbotSDKUI = typeof ScanbotSDKUI;
export type ScanbotDocument = typeof ScanbotDocument;
export * from './barcode';
export * from './base';
export * from './check/CheckScannerTypes';
export * from './credit_card/CreditCardTypes';
export * from './document_data_extractor';
export * from './document_scanner';
export * from './documents';
export * from './dqa/DocumentQualityAnalyzerTypes';
export * from './ehic/EuropeanHealthInsuranceCardTypes';
export * from './frame_accumulation/FrameAccumulationTypes';
export * from './imageRef';
export * from './image_filters/ParametricFilters';
export * from './medical_certificate/MedicalCertificateTypes';
export * from './mrz/MrzTypes';
export * from './ocr_renderer/PdfConfigurationTypes';
export * from './text_pattern_scanner/TextPatternScannerTypes';
export * from './tiff_wrapper/TiffTypes';
export * from './utils';
export * from './vin/VinScannerTypes';
export * from './components/CameraViewTypes';
export * from './components/barcode-camera-view/ScanbotBarcodeCameraViewProperties';
export * from './components/cropping-view/ScanbotCroppingViewProperties';
export * from './components/document-scanner-view/ScanbotDocumentScannerViewProperties';
export { ScanbotBarcodeCameraView, ScanbotCroppingView, ScanbotDocumentScannerView };
//# sourceMappingURL=index.d.ts.map