react-native-scanbot-sdk
Version:
Scanbot Document and Barcode Scanner SDK React Native Plugin for Android and iOS
99 lines (92 loc) • 3.55 kB
TypeScript
import { GenericDocument } from '../documents/GenericDocument';
import { AccumulatedResultsVerifierConfiguration } from '../frame_accumulation/FrameAccumulationTypes';
import { ToJsonConfiguration } from '../utils/json/JsonSerializationTypes';
import { DeepPartial, PartiallyConstructible } from '../utils/utils';
/**
Type of document containing the MRZ.
- `UNKNOWN`:
Undefined.
- `CREW_MEMBER_CERTIFICATE`:
Crew member certificate.
- `ID_CARD`:
ID card.
- `PASSPORT`:
Passport.
- `VISA`:
Visa card.
- `CH_DRIVING_LICENSE`:
Swiss driver license.
*/
export type MrzDocumentType = 'UNKNOWN' | 'CREW_MEMBER_CERTIFICATE' | 'ID_CARD' | 'PASSPORT' | 'VISA' | 'CH_DRIVING_LICENSE';
export declare const MrzDocumentTypeValues: MrzDocumentType[];
/**
Container for result of MRZ scanning attempt.
*/
export declare class MrzScannerResult extends PartiallyConstructible {
/**
Scanning successful.
Default is false
*/
readonly success: boolean;
/**
Raw string value of MRZ.
*/
readonly rawMRZ: string;
/**
Generic document containing MRZ data.
*/
readonly document: GenericDocument | null;
/** @param source {@displayType `DeepPartial<MrzScannerResult>`} */
constructor(source?: DeepPartial<MrzScannerResult>);
serialize(config?: ToJsonConfiguration): Promise<DeepPartial<MrzScannerResult>>;
private _released;
release(): void;
encodeImages(): Promise<void>;
}
/**
Defines how to handle incomplete MRZ results (e.g. caused by failed validation).
- `ACCEPT`:
Accept incomplete results. Fields failing validation will have a validation status of INVALID. Typically used for single-shot scanning.
- `REJECT`:
Reject incomplete results. If any fields are missing or fail validation, the result document will be empty. Typically used for live scanning.
*/
export type MrzIncompleteResultHandling = 'ACCEPT' | 'REJECT';
export declare const MrzIncompleteResultHandlingValues: MrzIncompleteResultHandling[];
/**
The scanning mode.
- `LIVE`:
The scanner will merge all information from multiple frames to provide the best possible result.
Use this mode when the input is a video or camera stream.
- `SINGLE_SHOT`:
The scanner will only use the current frame and will spend additional time to ensure the
best possible result. Use this mode when scanning single images, e.g. imported from the gallery.
*/
export type MrzScanningMode = 'LIVE' | 'SINGLE_SHOT';
export declare const MrzScanningModeValues: MrzScanningMode[];
/**
Configuration for MRZ scanner.
*/
export declare class MrzScannerConfiguration extends PartiallyConstructible {
/**
Configure the frame accumulation process.
*/
frameAccumulationConfiguration: AccumulatedResultsVerifierConfiguration;
/**
Enable MRZ detection. If disabled, the scanner skips the detection step and assumes that the input image is a crop of the MRZ area.
Default is true
*/
enableDetection: boolean;
/**
Defines how to handle incomplete MRZ results (e.g. caused by failed validation).
Default is REJECT
*/
incompleteResultHandling: MrzIncompleteResultHandling;
/**
If true, crops of the detected MRZ and its fields will be returned in the result.
Default is false
*/
returnCrops: boolean;
/** @param source {@displayType `DeepPartial<MrzScannerConfiguration>`} */
constructor(source?: DeepPartial<MrzScannerConfiguration>);
}
//# sourceMappingURL=MrzTypes.d.ts.map