UNPKG

react-native-scanbot-sdk

Version:

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

76 lines (71 loc) 3.97 kB
import { DocumentDetectionResult } from '../document_scanner/DocumentScannerTypes'; import { GenericDocument } from '../documents/GenericDocument'; import { ImageRef } from '../imageRef/image'; import { ToJsonConfiguration } from '../utils/json/JsonSerializationTypes'; import { DeepPartial, PartiallyConstructible } from '../utils/utils'; /** Check document detection and extraction mode. - `DISABLED`: Document detection is not performed. Successful check scans will only contain the machine-readable check data without a full crop of the check. - `DETECT_DOCUMENT`: Document scanner will be used to locate the complete check in the input image. The documentDetectionResult result field will contain the result of document detection. - `DETECT_AND_CROP_DOCUMENT`: Document scanner will be used to locate the complete check in the input image. The documentDetectionResult result field will contain the result of document detection. The croppedImage result field will contain a crop of the entire check. */ export type CheckDocumentDetectionMode = 'DISABLED' | 'DETECT_DOCUMENT' | 'DETECT_AND_CROP_DOCUMENT'; export declare const CheckDocumentDetectionModeValues: CheckDocumentDetectionMode[]; /** Check magnetic ink (MICR) strip scanning status. - `SUCCESS`: Scanning successful. - `INCOMPLETE_VALIDATION`: Magnetic ink strip was found, but validation failed, because of a format violation, an unsupported format, or an OCR error. - `ERROR_NOTHING_FOUND`: Magnetic ink strip was not found. */ export type CheckMagneticInkStripScanningStatus = 'SUCCESS' | 'INCOMPLETE_VALIDATION' | 'ERROR_NOTHING_FOUND'; export declare const CheckMagneticInkStripScanningStatusValues: CheckMagneticInkStripScanningStatus[]; /** The result of check scanning. */ export declare class CheckScanningResult extends PartiallyConstructible { /** Magnetic ink strip scanning status. Default is ERROR_NOTHING_FOUND */ readonly status: CheckMagneticInkStripScanningStatus; /** Generic document containing check data. Not present, if status is FAIL. */ readonly check: GenericDocument | null; /** The result of document detection. Will be set only if detectDocument in the configuration is set to true. Check scanning may still succeed even if the whole document is not visible in the input image and the complete document could not be located. */ readonly documentDetectionResult: DocumentDetectionResult | null; /** Crop of the check if documentDetectionMode is set to DETECT_AND_CROP_DOCUMENT. Will be non-empty, only if check recognition succeeded. */ readonly croppedImage: ImageRef | null; /** @param source {@displayType `DeepPartial<CheckScanningResult>`} */ constructor(source?: DeepPartial<CheckScanningResult>); serialize(config?: ToJsonConfiguration): Promise<DeepPartial<CheckScanningResult>>; private _released; release(): void; encodeImages(): Promise<void>; } /** Configuration of the check scanner. */ export declare class CheckScannerConfiguration extends PartiallyConstructible { /** Document detection to be performed in addition to scanning the machine-readable data in the check. By default only the machine-readable data is extracted during check scanning. Optionally, the coordinates and a crop of the entire check document can be returned, in addition to the check data. A check scan result may still be successful even if the whole document is not visible in the input image and the complete document could not be located. Default is DISABLED */ documentDetectionMode: CheckDocumentDetectionMode; /** @param source {@displayType `DeepPartial<CheckScannerConfiguration>`} */ constructor(source?: DeepPartial<CheckScannerConfiguration>); serialize(config?: ToJsonConfiguration): DeepPartial<CheckScannerConfiguration>; } //# sourceMappingURL=CheckScannerTypes.d.ts.map