capacitor-plugin-scanbot-sdk
Version:
Scanbot Document and Barcode Scanner SDK for Capacitor
478 lines • 16.1 kB
JavaScript
import { registerPlugin } from '@capacitor/core';
const _registeredPlugin = registerPlugin('ScanbotSDKCapacitor', {});
/** @internal */
export const _ScanbotSDKInternalUiV2 = _registeredPlugin;
const ScanbotSDKInternal = _registeredPlugin;
const ScanbotDocument = {
/**
* Create a new document.
*/
createDocument(params) {
return ScanbotSDKInternal.createDocument(params);
},
/**
* Create a new document from legacy pages.
*/
createDocumentFromLegacyPages(params) {
return ScanbotSDKInternal.createDocumentFromLegacyPages(params);
},
/**
* Create a new document from PDF file.
*/
createDocumentFromPDF(params) {
return ScanbotSDKInternal.createDocumentFromPDF(params);
},
/**
* Check if a document with the given ID exists.
*/
documentExists(params) {
return ScanbotSDKInternal.documentExists(params);
},
/**
* Load a document by its ID.
*/
loadDocument(params) {
return ScanbotSDKInternal.loadDocument(params);
},
/**
* Gets all stored document IDs.
*/
storedDocumentIDs() {
return ScanbotSDKInternal.storedDocumentIDs();
},
/**
* Clone a document by its ID.
*/
cloneDocument(params) {
return ScanbotSDKInternal.cloneDocument(params);
},
/**
* Delete a document by its ID.
*/
deleteDocument(params) {
return ScanbotSDKInternal.deleteDocument(params);
},
/**
* Delete all documents.
*/
deleteAllDocuments() {
return ScanbotSDKInternal.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 ScanbotSDKInternal.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 ScanbotSDKInternal.createTIFF(params);
},
/**
* Add a new page to a document and return the updated document.
*/
addPage(params) {
return ScanbotSDKInternal.addPage(params);
},
/**
* Move a page in a document and return the updated document.
*/
movePage(params) {
return ScanbotSDKInternal.movePage(params);
},
/**
* Modify a page in a document and return the updated document.
*/
modifyPage(params) {
return ScanbotSDKInternal.modifyPage(params);
},
/**
* Remove a page from a document.
*/
removePage(params) {
return ScanbotSDKInternal.removePageFromDocument(params);
},
/**
* Remove all pages from a document in one batch operation.
*/
removeAllPages(params) {
return ScanbotSDKInternal.removeAllPages(params);
},
};
export const ScanbotSDK = {
Document: ScanbotDocument,
/**
* Opens the Ready-To-Use UI Document Scanner screen with the desired configuration.
*
* @deprecated Use ***startDocumentScanner*** from ***'capacitor-plugin-scanbot-sdk/ui_v2'*** instead.
*/
startDocumentScanner(configuration) {
return ScanbotSDKInternal.startDocumentScanner(configuration);
},
/**
* Forces the Ready-To-Use UI Document Scanner screen to close while it is running.
*
* @deprecated
*/
closeDocumentScanner() {
return ScanbotSDKInternal.closeDocumentScanner();
},
/**
* Opens the Ready-To-Use UI Finder Document Scanner screen with the desired configuration.
*
* @deprecated Use ***startDocumentScanner*** from ***'capacitor-plugin-scanbot-sdk/ui_v2'*** instead.
*/
startFinderDocumentScanner(configuration) {
return ScanbotSDKInternal.startFinderDocumentScanner(configuration);
},
/**
* Forces the Ready-To-Use UI Finder Document Scanner screen to close while it is running.
*
* @deprecated
*/
closeFinderDocumentScanner() {
return ScanbotSDKInternal.closeFinderDocumentScanner();
},
/**
* Opens the Ready-To-Use UI Cropping screen with the desired configuration.
*
* @deprecated Use ***startCroppingScreen*** from ***'capacitor-plugin-scanbot-sdk/ui_v2'*** instead.
*/
startCroppingScreen(args) {
return ScanbotSDKInternal.startCroppingScreen(args);
},
/**
* Forces the Ready-To-Use UI Cropping screen to close while it is running.
*
* @deprecated
*/
closeCroppingScreen() {
return ScanbotSDKInternal.closeCroppingScreen();
},
/**
* Opens the Ready-To-Use UI MRZ Scanner screen with the desired configuration.
*/
startMrzScanner(configuration) {
return ScanbotSDKInternal.startMrzScanner(configuration);
},
/**
* Forces the Ready-To-Use UI MRZ Scanner screen to close while it is running.
*/
closeMrzScanner() {
return ScanbotSDKInternal.closeMrzScanner();
},
/**
* Opens the Ready-To-Use UI Barcode Scanner screen with the desired configuration.
*
* @deprecated Use ***startBarcodeScanner*** from ***'capacitor-plugin-scanbot-sdk/ui_v2'*** instead.
*/
startBarcodeScanner(configuration) {
return ScanbotSDKInternal.startBarcodeScanner(configuration);
},
/**
* Forces the Ready-To-Use UI Barcode Scanner screen to close while it is running.
*
* @deprecated
*/
closeBarcodeScanner() {
return ScanbotSDKInternal.closeBarcodeScanner();
},
/**
* Opens the Ready-To-Use UI Batch Barcode Scanner screen with the desired configuration.
*
* @deprecated Use ***startBarcodeScanner*** from ***'capacitor-plugin-scanbot-sdk/ui_v2'*** instead.
*/
startBatchBarcodeScanner(configuration) {
return ScanbotSDKInternal.startBatchBarcodeScanner(configuration);
},
/**
* Forces the Ready-To-Use UI Batch Barcode Scanner screen to close while it is running.
*
* @deprecated
*/
closeBatchBarcodeScanner() {
return ScanbotSDKInternal.closeBatchBarcodeScanner();
},
/**
* Opens the Ready-To-Use UI European Health Insurance Card Scanner screen with the desired configuration.
*
* @deprecated Use ***startGenericDocumentRecognizer*** instead and enable ***DE_HEALTH_INSURANCE_CARD_FRONT*** and ***EU_HEALTH_INSURANCE_CARD*** document formats.
*/
startEHICScanner(configuration) {
return ScanbotSDKInternal.startEHICScanner(configuration);
},
/**
* Forces the Ready-To-Use UI European Health Insurance Card Scanner screen to close while it is running.
*
* @deprecated
*/
closeEHICScanner() {
return ScanbotSDKInternal.closeEHICScanner();
},
/**
* Opens the Ready-To-Use UI Text Data Scanner screen with the desired configuration.
*/
startTextDataScanner(configuration) {
return ScanbotSDKInternal.startTextDataScanner(configuration);
},
/**
* Forces the Ready-To-Use UI Text Data Scanner screen to close while it is running.
*/
closeTextDataScanner() {
return ScanbotSDKInternal.closeTextDataScanner();
},
/**
* Opens the Ready-To-Use UI License Plate Scanner screen with the desired configuration.
*/
startLicensePlateScanner(configuration) {
return ScanbotSDKInternal.startLicensePlateScanner(configuration);
},
/**
* Forces the Ready-To-Use UI License Plate Scanner screen to close while it is running.
*/
closeLicensePlateScanner() {
return ScanbotSDKInternal.closeLicensePlateScanner();
},
/**
* Opens the Ready-To-Use UI Medical Certificate Recognizer screen with the desired configuration.
*/
startMedicalCertificateRecognizer(configuration) {
return ScanbotSDKInternal.startMedicalCertificateRecognizer(configuration);
},
/**
* Forces the Ready-To-Use UI Medical Certificate Recognizer screen to close while it is running.
*/
closeMedicalCertificateRecognizer() {
return ScanbotSDKInternal.closeMedicalCertificateRecognizer();
},
/**
* Opens the Ready-To-Use UI Generic Document Recognizer screen with the desired configuration.
*/
startGenericDocumentRecognizer(configuration) {
return ScanbotSDKInternal.startGenericDocumentRecognizer(configuration);
},
/**
* Forces the Ready-To-Use UI Generic Document Recognizer screen to close while it is running.
*/
closeGenericDocumentRecognizer() {
return ScanbotSDKInternal.closeGenericDocumentRecognizer();
},
/**
* Opens the Ready-To-Use UI Check Recognizer screen with the desired configuration.
*/
startCheckRecognizer(configuration) {
return ScanbotSDKInternal.startCheckRecognizer(configuration);
},
/**
* Forces the Ready-To-Use UI Check Recognizer screen to close while it is running.
*/
closeCheckRecognizer() {
return ScanbotSDKInternal.closeCheckRecognizer();
},
/**
* Opens the Ready-To-Use UI VIN Scanner screen with the desired configuration.
*/
startVinScanner(configuration) {
return ScanbotSDKInternal.startVinScanner(configuration);
},
/**
* Forces the Ready-To-Use UI VIN Scanner screen to close while it is running.
*/
closeVinScanner() {
return ScanbotSDKInternal.closeVinScanner();
},
/**
* Initializes the Scanbot SDK with the preferred configuration.
*/
initializeSDK(config) {
return ScanbotSDKInternal.initializeSDK(config);
},
/**
* Provides complete information about the current license status.
*/
getLicenseInfo() {
return ScanbotSDKInternal.getLicenseInfo();
},
/**
* Detects barcodes on the image represented by the file URI. The image file URI is part of the input arguments.
*/
detectBarcodesOnImage(args) {
return ScanbotSDKInternal.detectBarcodesOnImage(args);
},
/**
* Applies the given filters to the given image, and returns its URI.
*/
applyImageFilters(args) {
return ScanbotSDKInternal.applyImageFilters(args);
},
/**
* Applies the given filters to the given page.
*/
applyImageFiltersOnPage(args) {
return ScanbotSDKInternal.applyImageFiltersOnPage(args);
},
/**
* Returns the BASE64 Image Data for the given image.
*/
getImageData(args) {
return ScanbotSDKInternal.getImageData(args);
},
/**
* Rotates the given image by the specified degrees.
*/
rotateImage(args) {
return ScanbotSDKInternal.rotateImage(args);
},
/**
* Creates a page with the image located at the given URI.
*/
createPage(args) {
return ScanbotSDKInternal.createPage(args);
},
/**
* Removes the given page from the storage.
*/
removePage(args) {
return ScanbotSDKInternal.removePage(args);
},
/**
* Rotates the given page for the number of 90 degree counterclockwise rotations. Negative values will rotate clockwise.
*/
rotatePage(args) {
return ScanbotSDKInternal.rotatePage(args);
},
/**
* Applies the given image to the desired page.
*/
setDocumentImage(args) {
return ScanbotSDKInternal.setDocumentImage(args);
},
/**
* Detects document on the given image and returns the result.
*/
detectDocument(args) {
return ScanbotSDKInternal.detectDocument(args);
},
/**
* Detects document on the given page and returns the result.
*/
detectDocumentOnPage(args) {
return ScanbotSDKInternal.detectDocumentOnPage(args);
},
/**
* Detects the quality of the document on a still image.
*/
documentQualityAnalyzer(args) {
return ScanbotSDKInternal.documentQualityAnalyzer(args);
},
/**
* Extracts images from a PDF represented by the file URL. The PDF file URL is part of the input arguments.
*/
extractImagesFromPdf(args) {
return ScanbotSDKInternal.extractImagesFromPdf(args);
},
/**
* 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.
*/
extractPagesFromPdf(args) {
return ScanbotSDKInternal.extractPagesFromPdf(args);
},
/**
* Recognizes a Check on the given image.
* Set desired check standards or leave it empty/undefined to recognize all supported checks.
*/
recognizeCheck(args) {
return ScanbotSDKInternal.recognizeCheck(args);
},
/**
* Recognizes an MRZ on the given image.
*/
recognizeMrz(args) {
return ScanbotSDKInternal.recognizeMrz(args);
},
/**
* Recognizes a Medical Certificate on the given image.
* Modify the result with extra options that are part of the input arguments.
*/
recognizeMedicalCertificate(args) {
return ScanbotSDKInternal.recognizeMedicalCertificate(args);
},
/**
* Recognizes a European Health Insurance Card (EHIC) on the given image.
*
* @deprecated Use ***recognizeGenericDocument*** instead and enable ***DE_HEALTH_INSURANCE_CARD_FRONT*** and ***EU_HEALTH_INSURANCE_CARD*** document formats.
*/
recognizeEHIC(args) {
return ScanbotSDKInternal.recognizeEHIC(args);
},
/**
* Recognizes a generic document on the given image.
* Set the expected generic document formats or leave it empty/undefined to recognize all supported generic document formats.
*/
recognizeGenericDocument(args) {
return ScanbotSDKInternal.recognizeGenericDocument(args);
},
/**
* Recreates the given pages to refresh the Image URIs.
*/
refreshImageUris(args) {
return ScanbotSDKInternal.refreshImageUris(args);
},
/**
* Returns the available OCR configs.
*/
getOCRConfigs() {
return ScanbotSDKInternal.getOCRConfigs();
},
/**
* Removes all files generated by this plugin.
*/
cleanup() {
return ScanbotSDKInternal.cleanup();
},
/**
* 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(args) {
return ScanbotSDKInternal.performOCR(args);
},
/**
* 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(args) {
return ScanbotSDKInternal.createPDF(args);
},
/**
* 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(args) {
return ScanbotSDKInternal.writeTIFF(args);
},
};
export * from './arguments';
export * from './parameters';
export * from './configurations';
export * from './customTypes';
export * from './results';
export * from './types';
export { Point } from './utils';
export * from './documents/BarcodeDocumentModel';
export * from './documents/CheckDocumentModel';
export * from './documents/CommonFieldType';
export * from './documents/DocumentsModel';
export * from './documents/GenericDocument';
export * from './document/DocumentData';
export * from './document/DocumentDetectionStatus';
export * from './document/DocumentQuality';
export * from './document/PageData';
export * from './document/PageImageSource';
export * from './document/ParametricFilters';
//# sourceMappingURL=index.js.map