UNPKG

react-native-scanbot-sdk

Version:

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

129 lines (113 loc) 4.29 kB
/// Auto-generated with ScanbotSDKCodegenV3. Modifications will be overwritten. /// Generated from rtu-ui-v2/schemas/mrz/MRZFinderLayoutPreset.yaml import { DeepPartial, PartiallyConstructible } from '../../utils/utils'; /** Source of the text for the MRZ finder example overlay. */ export type MrzFinderLayoutPreset = | TwoLineMrzFinderLayoutPreset | ThreeLineMrzFinderLayoutPreset | NoLayoutPreset; /** @internal */ export namespace MrzFinderLayoutPreset { /** @internal */ export function From(source: { [key: string]: any }): MrzFinderLayoutPreset { const _type = source._type; switch (_type) { case 'TwoLineMRZFinderLayoutPreset': return new TwoLineMrzFinderLayoutPreset(source); case 'ThreeLineMRZFinderLayoutPreset': return new ThreeLineMrzFinderLayoutPreset(source); case 'NoLayoutPreset': return new NoLayoutPreset(source); default: throw `Unknown child class name: ${_type}`; } } } /** A ready-to-use preset 2-line text to be displayed. */ export class TwoLineMrzFinderLayoutPreset extends PartiallyConstructible { public readonly _type: 'TwoLineMRZFinderLayoutPreset' = 'TwoLineMRZFinderLayoutPreset'; /** The first line of the MRZ text. Default is "I<USASMITH<<JACK<<<<<<<<<<<<<<<<<<<<" */ public mrzTextLine1: string = 'I<USASMITH<<JACK<<<<<<<<<<<<<<<<<<<<'; /** The second line of the MRZ text. Default is "2342353464USA9602300M2904076<<<<<<<2" */ public mrzTextLine2: string = '2342353464USA9602300M2904076<<<<<<<2'; /** Aspect ratio of the finder adjusted to the 2-line MRZ text. Not editable. To override, please use 'aspectRatio' parameter in 'viewFinder' field in MRZ screen configuration. Default is 5.390625 */ public readonly adjustedFinderAspectRatio: number = 5.390625; /** @param source {@displayType `DeepPartial<TwoLineMrzFinderLayoutPreset>`} */ public constructor(source: DeepPartial<TwoLineMrzFinderLayoutPreset> = {}) { super(); if (source.mrzTextLine1 !== undefined) { this.mrzTextLine1 = source.mrzTextLine1; } if (source.mrzTextLine2 !== undefined) { this.mrzTextLine2 = source.mrzTextLine2; } if (source.adjustedFinderAspectRatio !== undefined) { this.adjustedFinderAspectRatio = source.adjustedFinderAspectRatio; } } } /** A ready-to-use preset 3-line text to be displayed. */ export class ThreeLineMrzFinderLayoutPreset extends PartiallyConstructible { public readonly _type: 'ThreeLineMRZFinderLayoutPreset' = 'ThreeLineMRZFinderLayoutPreset'; /** The first line of the MRZ text. Default is "I<USA2342353464<<<<<<<<<<<<<<<" */ public mrzTextLine1: string = 'I<USA2342353464<<<<<<<<<<<<<<<'; /** The second line of the MRZ text. Default is "9602300M2904076USA<<<<<<<<<<<2" */ public mrzTextLine2: string = '9602300M2904076USA<<<<<<<<<<<2'; /** The third line of the MRZ text. Default is "SMITH<<JACK<<<<<<<<<<<<<<<<<<<" */ public mrzTextLine3: string = 'SMITH<<JACK<<<<<<<<<<<<<<<<<<<'; /** Aspect ratio of the finder adjusted to the 3-line MRZ text. Not editable. To override, please use 'aspectRatio' parameter in 'viewFinder' field in MRZ screen configuration. Default is 4.3125 */ public readonly adjustedFinderAspectRatio: number = 4.3125; /** @param source {@displayType `DeepPartial<ThreeLineMrzFinderLayoutPreset>`} */ public constructor(source: DeepPartial<ThreeLineMrzFinderLayoutPreset> = {}) { super(); if (source.mrzTextLine1 !== undefined) { this.mrzTextLine1 = source.mrzTextLine1; } if (source.mrzTextLine2 !== undefined) { this.mrzTextLine2 = source.mrzTextLine2; } if (source.mrzTextLine3 !== undefined) { this.mrzTextLine3 = source.mrzTextLine3; } if (source.adjustedFinderAspectRatio !== undefined) { this.adjustedFinderAspectRatio = source.adjustedFinderAspectRatio; } } } /** No layout preset. */ export class NoLayoutPreset extends PartiallyConstructible { public readonly _type: 'NoLayoutPreset' = 'NoLayoutPreset'; /** @param source {@displayType `DeepPartial<NoLayoutPreset>`} */ public constructor(source: DeepPartial<NoLayoutPreset> = {}) { super(); } }