UNPKG

capacitor-plugin-scanbot-sdk

Version:

Scanbot Document and Barcode Scanner SDK for Capacitor

21 lines 1.04 kB
import { DocumentDataExtractionResult, DocumentDataExtractorUiResult, DocumentVerificationReport, handleImageInput, mapRTUUIResult, withSBErrorHandling, } from '../types'; import { ScanbotSDKPlugin } from './Definitions'; /** * @internal * @hidden */ export const ScanbotDocumentDataExtractorImpl = { async extractFromImage(params) { return withSBErrorHandling(async () => new DocumentDataExtractionResult(await ScanbotSDKPlugin.extractDocumentDataFromImage({ configuration: params.configuration, image: handleImageInput(params.image), }))); }, async startExtractorScreen(configuration) { return withSBErrorHandling(async () => mapRTUUIResult(await ScanbotSDKPlugin.startDDEScreen(configuration), DocumentDataExtractorUiResult)); }, async verifyDocument(documentParts) { return withSBErrorHandling(async () => new DocumentVerificationReport(await ScanbotSDKPlugin.verifyDocument({ documentParts }))); }, }; //# sourceMappingURL=DocumentDataExtractorImpl.js.map