capacitor-plugin-scanbot-sdk
Version:
Scanbot Document and Barcode Scanner SDK for Capacitor
21 lines • 910 B
JavaScript
import { CreditCardScannerUiResult, CreditCardScanningResult, handleImageInput, mapRTUUIResult, withSBErrorHandling, } from '../types';
import { ScanbotSDKPlugin } from './Definitions';
/**
* @internal
* @hidden
*/
export const ScanbotCreditCardImpl = {
async scanFromImage(params) {
return withSBErrorHandling(async () => new CreditCardScanningResult(await ScanbotSDKPlugin.scanCreditCardFromImage({
configuration: params.configuration,
image: handleImageInput(params.image),
})));
},
async startScanner(configuration) {
return withSBErrorHandling(async () => mapRTUUIResult(await ScanbotSDKPlugin.startCreditCardScanner(configuration), CreditCardScannerUiResult));
},
async forceCloseScanner() {
return withSBErrorHandling(ScanbotSDKPlugin.forceCloseCreditCardScanner);
},
};
//# sourceMappingURL=CreditCardScannerImpl.js.map