UNPKG

react-native-scanbot-sdk

Version:

Scanbot Document and Barcode Scanner SDK React Native Plugin for Android and iOS

764 lines (763 loc) 27.9 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); var _exportNames = { ScanbotBarcodeCameraView: true, ScanbotCroppingView: true, ScanbotDocumentScannerView: true }; Object.defineProperty(exports, "ScanbotBarcodeCameraView", { enumerable: true, get: function () { return _ScanbotBarcodeCameraView.ScanbotBarcodeCameraView; } }); Object.defineProperty(exports, "ScanbotCroppingView", { enumerable: true, get: function () { return _ScanbotCroppingView.ScanbotCroppingView; } }); Object.defineProperty(exports, "ScanbotDocumentScannerView", { enumerable: true, get: function () { return _ScanbotDocumentScannerView.ScanbotDocumentScannerView; } }); exports.default = void 0; var _reactNative = require("react-native"); var _Analytics = require("./analytics/Analytics"); var _barcode = require("./barcode"); Object.keys(_barcode).forEach(function (key) { if (key === "default" || key === "__esModule") return; if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; if (key in exports && exports[key] === _barcode[key]) return; Object.defineProperty(exports, key, { enumerable: true, get: function () { return _barcode[key]; } }); }); var _CheckScannerTypes = require("./check/CheckScannerTypes"); Object.keys(_CheckScannerTypes).forEach(function (key) { if (key === "default" || key === "__esModule") return; if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; if (key in exports && exports[key] === _CheckScannerTypes[key]) return; Object.defineProperty(exports, key, { enumerable: true, get: function () { return _CheckScannerTypes[key]; } }); }); var _ScanbotBarcodeCameraView = require("./components/barcode-camera-view/ScanbotBarcodeCameraView"); var _ScanbotCroppingView = require("./components/cropping-view/ScanbotCroppingView"); var _ScanbotDocumentScannerView = require("./components/document-scanner-view/ScanbotDocumentScannerView"); var _CreditCardTypes = require("./credit_card/CreditCardTypes"); Object.keys(_CreditCardTypes).forEach(function (key) { if (key === "default" || key === "__esModule") return; if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; if (key in exports && exports[key] === _CreditCardTypes[key]) return; Object.defineProperty(exports, key, { enumerable: true, get: function () { return _CreditCardTypes[key]; } }); }); var _document_data_extractor = require("./document_data_extractor"); Object.keys(_document_data_extractor).forEach(function (key) { if (key === "default" || key === "__esModule") return; if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; if (key in exports && exports[key] === _document_data_extractor[key]) return; Object.defineProperty(exports, key, { enumerable: true, get: function () { return _document_data_extractor[key]; } }); }); var _document_scanner = require("./document_scanner"); Object.keys(_document_scanner).forEach(function (key) { if (key === "default" || key === "__esModule") return; if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; if (key in exports && exports[key] === _document_scanner[key]) return; Object.defineProperty(exports, key, { enumerable: true, get: function () { return _document_scanner[key]; } }); }); var _DocumentQualityAnalyzerTypes = require("./dqa/DocumentQualityAnalyzerTypes"); Object.keys(_DocumentQualityAnalyzerTypes).forEach(function (key) { if (key === "default" || key === "__esModule") return; if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; if (key in exports && exports[key] === _DocumentQualityAnalyzerTypes[key]) return; Object.defineProperty(exports, key, { enumerable: true, get: function () { return _DocumentQualityAnalyzerTypes[key]; } }); }); var _EuropeanHealthInsuranceCardTypes = require("./ehic/EuropeanHealthInsuranceCardTypes"); Object.keys(_EuropeanHealthInsuranceCardTypes).forEach(function (key) { if (key === "default" || key === "__esModule") return; if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; if (key in exports && exports[key] === _EuropeanHealthInsuranceCardTypes[key]) return; Object.defineProperty(exports, key, { enumerable: true, get: function () { return _EuropeanHealthInsuranceCardTypes[key]; } }); }); var _MedicalCertificateTypes = require("./medical_certificate/MedicalCertificateTypes"); Object.keys(_MedicalCertificateTypes).forEach(function (key) { if (key === "default" || key === "__esModule") return; if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; if (key in exports && exports[key] === _MedicalCertificateTypes[key]) return; Object.defineProperty(exports, key, { enumerable: true, get: function () { return _MedicalCertificateTypes[key]; } }); }); var _MrzTypes = require("./mrz/MrzTypes"); Object.keys(_MrzTypes).forEach(function (key) { if (key === "default" || key === "__esModule") return; if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; if (key in exports && exports[key] === _MrzTypes[key]) return; Object.defineProperty(exports, key, { enumerable: true, get: function () { return _MrzTypes[key]; } }); }); var _utils = require("./utils"); Object.keys(_utils).forEach(function (key) { if (key === "default" || key === "__esModule") return; if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; if (key in exports && exports[key] === _utils[key]) return; Object.defineProperty(exports, key, { enumerable: true, get: function () { return _utils[key]; } }); }); var _VinScannerTypes = require("./vin/VinScannerTypes"); Object.keys(_VinScannerTypes).forEach(function (key) { if (key === "default" || key === "__esModule") return; if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; if (key in exports && exports[key] === _VinScannerTypes[key]) return; Object.defineProperty(exports, key, { enumerable: true, get: function () { return _VinScannerTypes[key]; } }); }); var _base = require("./base"); Object.keys(_base).forEach(function (key) { if (key === "default" || key === "__esModule") return; if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; if (key in exports && exports[key] === _base[key]) return; Object.defineProperty(exports, key, { enumerable: true, get: function () { return _base[key]; } }); }); var _documents = require("./documents"); Object.keys(_documents).forEach(function (key) { if (key === "default" || key === "__esModule") return; if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; if (key in exports && exports[key] === _documents[key]) return; Object.defineProperty(exports, key, { enumerable: true, get: function () { return _documents[key]; } }); }); var _FrameAccumulationTypes = require("./frame_accumulation/FrameAccumulationTypes"); Object.keys(_FrameAccumulationTypes).forEach(function (key) { if (key === "default" || key === "__esModule") return; if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; if (key in exports && exports[key] === _FrameAccumulationTypes[key]) return; Object.defineProperty(exports, key, { enumerable: true, get: function () { return _FrameAccumulationTypes[key]; } }); }); var _imageRef = require("./imageRef"); Object.keys(_imageRef).forEach(function (key) { if (key === "default" || key === "__esModule") return; if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; if (key in exports && exports[key] === _imageRef[key]) return; Object.defineProperty(exports, key, { enumerable: true, get: function () { return _imageRef[key]; } }); }); var _ParametricFilters = require("./image_filters/ParametricFilters"); Object.keys(_ParametricFilters).forEach(function (key) { if (key === "default" || key === "__esModule") return; if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; if (key in exports && exports[key] === _ParametricFilters[key]) return; Object.defineProperty(exports, key, { enumerable: true, get: function () { return _ParametricFilters[key]; } }); }); var _PdfConfigurationTypes = require("./ocr_renderer/PdfConfigurationTypes"); Object.keys(_PdfConfigurationTypes).forEach(function (key) { if (key === "default" || key === "__esModule") return; if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; if (key in exports && exports[key] === _PdfConfigurationTypes[key]) return; Object.defineProperty(exports, key, { enumerable: true, get: function () { return _PdfConfigurationTypes[key]; } }); }); var _TextPatternScannerTypes = require("./text_pattern_scanner/TextPatternScannerTypes"); Object.keys(_TextPatternScannerTypes).forEach(function (key) { if (key === "default" || key === "__esModule") return; if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; if (key in exports && exports[key] === _TextPatternScannerTypes[key]) return; Object.defineProperty(exports, key, { enumerable: true, get: function () { return _TextPatternScannerTypes[key]; } }); }); var _TiffTypes = require("./tiff_wrapper/TiffTypes"); Object.keys(_TiffTypes).forEach(function (key) { if (key === "default" || key === "__esModule") return; if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; if (key in exports && exports[key] === _TiffTypes[key]) return; Object.defineProperty(exports, key, { enumerable: true, get: function () { return _TiffTypes[key]; } }); }); var _CameraViewTypes = require("./components/CameraViewTypes"); Object.keys(_CameraViewTypes).forEach(function (key) { if (key === "default" || key === "__esModule") return; if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; if (key in exports && exports[key] === _CameraViewTypes[key]) return; Object.defineProperty(exports, key, { enumerable: true, get: function () { return _CameraViewTypes[key]; } }); }); var _ScanbotBarcodeCameraViewProperties = require("./components/barcode-camera-view/ScanbotBarcodeCameraViewProperties"); Object.keys(_ScanbotBarcodeCameraViewProperties).forEach(function (key) { if (key === "default" || key === "__esModule") return; if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; if (key in exports && exports[key] === _ScanbotBarcodeCameraViewProperties[key]) return; Object.defineProperty(exports, key, { enumerable: true, get: function () { return _ScanbotBarcodeCameraViewProperties[key]; } }); }); var _ScanbotCroppingViewProperties = require("./components/cropping-view/ScanbotCroppingViewProperties"); Object.keys(_ScanbotCroppingViewProperties).forEach(function (key) { if (key === "default" || key === "__esModule") return; if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; if (key in exports && exports[key] === _ScanbotCroppingViewProperties[key]) return; Object.defineProperty(exports, key, { enumerable: true, get: function () { return _ScanbotCroppingViewProperties[key]; } }); }); var _ScanbotDocumentScannerViewProperties = require("./components/document-scanner-view/ScanbotDocumentScannerViewProperties"); Object.keys(_ScanbotDocumentScannerViewProperties).forEach(function (key) { if (key === "default" || key === "__esModule") return; if (Object.prototype.hasOwnProperty.call(_exportNames, key)) return; if (key in exports && exports[key] === _ScanbotDocumentScannerViewProperties[key]) return; Object.defineProperty(exports, key, { enumerable: true, get: function () { return _ScanbotDocumentScannerViewProperties[key]; } }); }); const LINKING_ERROR = `The package 'react-native-scanbot-sdk' doesn't seem to be linked. Make sure: \n\n` + _reactNative.Platform.select({ ios: "- You have run 'pod install'\n", default: '' }) + '- You rebuilt the app after installing the package\n' + '- You are not using Expo Go\n'; const ScanbotSDKImpl = _reactNative.NativeModules.RNScanbotSDK ? _reactNative.NativeModules.RNScanbotSDK : new Proxy({}, { get() { throw new Error(LINKING_ERROR); } }); const ScanbotSDKUIImpl = _reactNative.NativeModules.RNScanbotRTUUI ? _reactNative.NativeModules.RNScanbotRTUUI : new Proxy({}, { get() { throw new Error(LINKING_ERROR); } }); const ScanbotDocument = { /** * Create a new document. */ createDocument(params) { return ScanbotSDKImpl.createDocument(params).then(result => new _document_scanner.DocumentData(result)); }, /** * Create a new document from legacy pages. */ createDocumentFromLegacyPages(params) { return ScanbotSDKImpl.createDocumentFromLegacyPages(params).then(result => new _document_scanner.DocumentData(result)); }, /** * Create a new document from a PDF file. */ createDocumentFromPDF(pdfUri) { return ScanbotSDKImpl.createDocumentFromPDF(pdfUri).then(result => new _document_scanner.DocumentData(result)); }, /** * Check if a document with the given ID exists. */ documentExists(documentID) { return ScanbotSDKImpl.documentExists(documentID); }, /** * Load a document by its ID. */ loadDocument(documentID) { return ScanbotSDKImpl.loadDocument(documentID).then(result => new _document_scanner.DocumentData(result)); }, /** * Gets all stored document IDs. */ storedDocumentIDs() { return ScanbotSDKImpl.storedDocumentIDs(); }, /** * Clone a document by its ID. */ cloneDocument(documentID) { return ScanbotSDKImpl.cloneDocument(documentID).then(result => new _document_scanner.DocumentData(result)); }, /** * Delete a document by its ID. */ deleteDocument(documentID) { return ScanbotSDKImpl.deleteDocument(documentID); }, /** * Delete all documents. */ deleteAllDocuments() { return ScanbotSDKImpl.deleteAllDocuments(); }, /** * 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) { return ScanbotSDKImpl.createPDFForDocument(params); }, /** * 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) { return ScanbotSDKImpl.createTIFFForDocument(params); }, /** * Add a new page to a document and return the updated document. */ addPage(params) { return ScanbotSDKImpl.addPage(params).then(result => new _document_scanner.DocumentData(result)); }, /** * Move a page in a document and return the updated document. */ movePage(params) { return ScanbotSDKImpl.movePage(params).then(result => new _document_scanner.DocumentData(result)); }, /** * Modify a page in a document and return the updated document. */ modifyPage(params) { return ScanbotSDKImpl.modifyPage(params).then(result => new _document_scanner.DocumentData(result)); }, /** * Remove a page from a document. */ removePage(params) { return ScanbotSDKImpl.removePageFromDocument(params).then(result => new _document_scanner.DocumentData(result)); }, /** * Remove all pages from a document in one batch operation. */ removeAllPages(documentID) { return ScanbotSDKImpl.removeAllPages(documentID).then(result => new _document_scanner.DocumentData(result)); } }; 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) { return ScanbotSDKUIImpl.startDocumentScanner(configuration); }, /** * Forces the Ready-To-Use UI Document Scanner screen to close while it is running. * * @deprecated */ closeDocumentScanner() { return ScanbotSDKUIImpl.closeDocumentScanner(); }, /** * 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) { return ScanbotSDKUIImpl.startFinderDocumentScanner(configuration); }, /** * Forces the Ready-To-Use UI Finder Document Scanner screen to close while it is running. * * @deprecated */ closeFinderDocumentScanner() { return ScanbotSDKUIImpl.closeFinderDocumentScanner(); }, /** * 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, configuration) { return ScanbotSDKUIImpl.startCroppingScreen(page, configuration); }, /** * Forces the Ready-To-Use UI Cropping screen to close while it is running. * * @deprecated */ closeCroppingScreen() { return ScanbotSDKUIImpl.closeCroppingScreen(); }, /** * 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. */ async startEHICScanner(configuration) { return ScanbotSDKUIImpl.startEHICScanner(configuration).then(result => (0, _utils.mapRTUUIResult)(result, _EuropeanHealthInsuranceCardTypes.EuropeanHealthInsuranceCardRecognitionResult)); }, /** * Forces the Ready-To-Use UI European Health Insurance Card Scanner screen to close while it is running. * * @deprecated */ closeEHICScanner() { return ScanbotSDKUIImpl.closeEHICScanner(); }, /** * Opens the Ready-To-Use UI Medical Certificate Scanner screen with the desired configuration. */ async startMedicalCertificateScanner(configuration) { return ScanbotSDKUIImpl.startMedicalCertificateRecognizer(configuration).then(result => (0, _utils.mapRTUUIResult)(result, _MedicalCertificateTypes.MedicalCertificateScanningResult)); }, /** * Forces the Ready-To-Use UI Medical Certificate Scanner screen to close while it is running. */ closeMedicalCertificateScanner() { return ScanbotSDKUIImpl.closeMedicalCertificateRecognizer(); }, /** * Opens the Ready-To-Use UI Check Scanner screen with the desired configuration. * * @deprecated Use ***startCheckScanner*** from ***'react-native-scanbot-sdk/ui_v2'*** instead. */ async startCheckScanner(configuration) { return ScanbotSDKUIImpl.startCheckRecognizer(configuration).then(result => (0, _utils.mapRTUUIResult)(result, _CheckScannerTypes.CheckScanningResult)); }, /** * Forces the Ready-To-Use UI Check Scanner screen to close while it is running. * * @deprecated */ closeCheckScanner() { return ScanbotSDKUIImpl.closeCheckRecognizer(); }, /** * Opens the Ready-To-Use UI VIN Scanner screen with the desired configuration. * * @deprecated Use ***startVINScanner*** from ***'react-native-scanbot-sdk/ui_v2'*** instead. */ async startVinScanner(configuration) { return ScanbotSDKUIImpl.startVinScanner(configuration).then(result => (0, _utils.mapRTUUIResult)(result, _VinScannerTypes.VinScannerResult)); }, /** * Forces the Ready-To-Use UI VIN Scanner screen to close while it is running. * * @deprecated */ closeVinScanner() { return ScanbotSDKUIImpl.closeVinScanner(); } }; const ScanbotSDK = { UI: ScanbotSDKUI, Document: ScanbotDocument, /** * Initializes the Scanbot SDK with the preferred configuration. */ initializeSDK(config) { return ScanbotSDKImpl.initializeSDK(config); }, /** * Provides complete information about the current license status. */ getLicenseInfo() { return ScanbotSDKImpl.getLicenseInfo(); }, /** * Returns the available OCR configs. */ getOCRConfigs() { return ScanbotSDKImpl.getOCRConfigs(); }, /** * Removes all files generated by this plugin. */ cleanup() { return ScanbotSDKImpl.cleanup(); }, /** * Recreates the given pages to refresh the Image URIs. * * @deprecated Use {@link ScanbotSDK.Document} instead. */ refreshImageUris(params) { return ScanbotSDKImpl.refreshImageUris(params); }, /** * Detects barcodes on the image represented by the file URI. The image file URI is part of the input arguments. */ async detectBarcodesOnImage(params) { return ScanbotSDKImpl.detectBarcodesOnImage(params).then(result => new _barcode.BarcodeScannerResult(result)); }, /** * Applies the given filters to the given image, and returns its URI. */ applyImageFilters(imageFileUri, filters) { return ScanbotSDKImpl.applyImageFilters(imageFileUri, filters); }, /** * Applies the given filters to the given page. * * @deprecated Use {@link ScanbotSDK.Document.modifyPage} instead. */ applyImageFiltersOnPage(page, filters) { return ScanbotSDKImpl.applyImageFiltersOnPage(page, filters); }, /** * Creates a page with the image located at the given URI. * * @deprecated Use {@link ScanbotSDK.Document.createDocument} instead. */ createPage(imageUri) { return ScanbotSDKImpl.createPage(imageUri); }, /** * Removes the given page from the storage. * * @deprecated Use {@link ScanbotSDK.Document.removePage} instead. */ removePage(page) { return ScanbotSDKImpl.removePage(page); }, /** * 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, times) { return ScanbotSDKImpl.rotatePage(page, times); }, /** * Applies the given image to the desired page. * * @deprecated Use {@link ScanbotSDK.Document} instead. */ setDocumentImage(page, imageUri) { return ScanbotSDKImpl.setDocumentImage(page, imageUri); }, /** * Detects a document on the given image and returns the result. */ detectDocument(imageFileUri) { return ScanbotSDKImpl.detectDocument(imageFileUri); }, /** * Detects a document on the given page and returns the result. * * @deprecated Use {@link ScanbotSDK.Document} instead. */ detectDocumentOnPage(page) { return ScanbotSDKImpl.detectDocumentOnPage(page); }, /** * Extracts images from a PDF represented by the file URL. The PDF file URL is part of the input arguments. */ extractImagesFromPdf(params) { return ScanbotSDKImpl.extractImagesFromPdf(params); }, /** * 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) { return ScanbotSDKImpl.extractPagesFromPdf(params); }, /** * Returns the BASE64 Image Data for the given image. */ getImageData(imageFileUri) { return ScanbotSDKImpl.getImageData(imageFileUri); }, /** * Rotates the given image by the specified degrees counterclockwise. Negative values will rotate clockwise. */ rotateImage(imageFileUri, degrees) { return ScanbotSDKImpl.rotateImage(imageFileUri, degrees); }, /** * Detects the quality of the document on a still image. */ async documentQualityAnalyzer(params) { return ScanbotSDKImpl.documentQualityAnalyzer(params).then(result => new _DocumentQualityAnalyzerTypes.DocumentQualityAnalyzerResult(result)); }, /** * Recognizes a Check on the given image. */ async recognizeCheck(params) { return ScanbotSDKImpl.recognizeCheck(params).then(result => new _CheckScannerTypes.CheckScanningResult(result)); }, /** * Recognizes an MRZ on the given image. */ async recognizeMrz(params) { return ScanbotSDKImpl.recognizeMrz(params).then(result => new _MrzTypes.MrzScannerResult(result)); }, /** * Recognizes a Medical Certificate on the given image. * Modify the result with extra options that are part of the input arguments. */ async recognizeMedicalCertificate(params) { return ScanbotSDKImpl.recognizeMedicalCertificate(params).then(result => new _MedicalCertificateTypes.MedicalCertificateScanningResult(result)); }, /** * Recognizes a European Health Insurance Card (EHIC) on the given image. * * @deprecated Use {@link documentDataExtractor} instead and enable ***EuropeanHealthInsuranceCardConfiguration*** configuration element. */ async recognizeEHIC(params) { return ScanbotSDKImpl.recognizeEHIC(params).then(result => new _EuropeanHealthInsuranceCardTypes.EuropeanHealthInsuranceCardRecognitionResult(result)); }, /** * Recognizes a Credit Card on the given image. * Modify the result with extra options that are part of the configuration. */ async recognizeCreditCard(params) { return ScanbotSDKImpl.recognizeCreditCard(params).then(result => new _CreditCardTypes.CreditCardScanningResult(result)); }, /** * Extract data on the given image. * Set the expected document formats or leave it empty/undefined to recognize all supported document formats. */ async documentDataExtractor(params) { return ScanbotSDKImpl.documentDataExtractor(params).then(result => new _document_data_extractor.DocumentDataExtractionResult(result)); }, /** * 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) { return ScanbotSDKImpl.performOCR(params); }, /** * 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) { return ScanbotSDKImpl.createPDF(params); }, /** * 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) { return ScanbotSDKImpl.writeTIFF(params); }, /** * Verifies the given document parts using the DocumentDataExtractorConfiguration. */ async verifyDocument(params) { return ScanbotSDKImpl.verifyDocument(params).then(result => new _document_data_extractor.DocumentVerificationReport(result)); }, /** * Mock camera preview by using static images as a frame source. * This is useful for testing purposes. */ mockCamera(params) { return ScanbotSDKImpl.mockCamera(params); }, /** * Register analytics service callback to receive analytics events. */ setAnalyticsSubscriber(subscriber) { const eventEmitter = new _reactNative.NativeEventEmitter(ScanbotSDKImpl); if (subscriber === null) { eventEmitter.removeAllListeners('analyticsEvent'); return ScanbotSDKImpl.removeAnalyticsServiceCallback(); } else { eventEmitter.removeAllListeners('analyticsEvent'); eventEmitter.addListener('analyticsEvent', event => { if (event) { subscriber(new _Analytics.AnalyticsEvent(event)); } }); return ScanbotSDKImpl.setAnalyticsServiceCallback(); } } }; var _default = exports.default = ScanbotSDK; //# sourceMappingURL=index.js.map