UNPKG

react-native-scanbot-sdk

Version:

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

64 lines (60 loc) 1.85 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.MrzScannerUiResult = void 0; var _GenericDocument = require("../../documents/GenericDocument"); var _JsonSerializationTypes = require("../../utils/json/JsonSerializationTypes"); var _utils = require("../../utils/utils"); /// Auto-generated with ScanbotSDKCodegenV3. Modifications will be overwritten. /// Generated from rtu-ui-v2/schemas/mrz/MRZScannerUIResult.yaml /** Configuration of the MRZ RTU UI result. */ class MrzScannerUiResult extends _utils.PartiallyConstructible { /** Raw string value of MRZ. */ /** Generic document containing MRZ data. */ /** @param source {@displayType `DeepPartial<MrzScannerUiResult>`} */ constructor(source = {}) { super(); if (source.rawMRZ !== undefined) { this.rawMRZ = source.rawMRZ; } else { throw new Error('rawMRZ must be present in constructor argument'); } if (source.mrzDocument !== undefined) { this.mrzDocument = source.mrzDocument != null ? new _GenericDocument.GenericDocument(source.mrzDocument) : null; } else { throw new Error('mrzDocument must be present in constructor argument'); } } async serialize(config = new _JsonSerializationTypes.ToJsonConfiguration()) { return { rawMRZ: this.rawMRZ, mrzDocument: this.mrzDocument != null ? await this.mrzDocument.serialize(config) : null }; } _released = false; release() { if (this._released) { return; } { if (this.mrzDocument != null) { this.mrzDocument.release(); } } this._released = true; } async encodeImages() { if (this.mrzDocument != null) { await this.mrzDocument.encodeImages(); } } } exports.MrzScannerUiResult = MrzScannerUiResult; //# sourceMappingURL=MRZScannerUIResult.js.map