capacitor-plugin-scanbot-sdk
Version:
Scanbot Document and Barcode Scanner SDK for Capacitor
18 lines • 730 B
JavaScript
import { MrzScannerResult, MrzScannerUiResult, handleImageInput, mapRTUUIResult, withSBErrorHandling } from '../types';
import { ScanbotSDKPlugin } from './Definitions';
/**
* @internal
* @hidden
*/
export const ScanbotMrzImpl = {
async scanFromImage(params) {
return withSBErrorHandling(async () => new MrzScannerResult(await ScanbotSDKPlugin.scanMrzFromImage({
configuration: params.configuration,
image: handleImageInput(params.image),
})));
},
async startScanner(configuration) {
return withSBErrorHandling(async () => mapRTUUIResult(await ScanbotSDKPlugin.startMrzScanner(configuration), MrzScannerUiResult));
},
};
//# sourceMappingURL=MrzScannerImpl.js.map