UNPKG

react-native-scanbot-sdk

Version:

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

1,172 lines (800 loc) 69.2 kB
import { AspectRatio, AustraliaPostCustomerFormat, BarcodeDocumentFormat, BarcodeFormat, BarcodesExtensionFilter, CameraModule, CameraPreviewMode, CapturePhotoQualityPrioritization, CheckStandard, CheckUserGuidanceStrings, ConfirmationDialogConfiguration, CroppingAccessibilityConfiguration, DialogButtonStyle, DialogStyle, DocumentDetectorMode, DocumentScannerAccessibilityConfiguration, DocumentsDisplayConfiguration, EngineMode, FieldsDisplayConfiguration, FileEncryptionMode, FinderDocumentScannerAccessibilityConfiguration, GenericDocumentType, Gs1HandlingMode, HealthInsuranceCardRecognizerParameters, ImageFilterType, LicensePlateScanStrategy, MSIPlesseyChecksumAlgorithm, MedicalCertificateUserGuidanceStrings, OrientationLockMode, SelectionOverlayConfiguration, Size, StorageImageFormat, TextDataScannerStep, ZoomRange, } from './types'; export interface BarcodeScannerConfiguration { /** An optional array of barcode document formats that act as a detection filter. By default all supported document formats will be detected. */ acceptedDocumentFormats?: BarcodeDocumentFormat[]; /** The extension filter for EAN and UPC barcodes. */ barcodesExtensionFilter?: BarcodesExtensionFilter; /** Filter barcodes results by regular expression. To accept scanned barcode, regular expression should match the entire barcode value. By default, no filter is applied */ barcodeValueFilter?: string; /** Background color of the detection overlay. */ cameraOverlayColor?: string; /** The camera module to be used for barcode scanning. The default value is BACK. */ cameraModule?: CameraModule; /** The relative initial zoom level of the camera in the range (0,1), where 0 is zoomed out and 1 is zoomed in. Default value is 0.0. */ cameraZoomFactor?: number; /** Whether the cancel button is hidden or not. iOS only. */ cancelButtonHidden?: boolean; /** String being displayed on the cancel button. */ cancelButtonTitle?: string; /** The engine mode to be used for barcode scanning. The default value is NEXT_GEN. */ engineMode?: EngineMode; /** Title of the button that opens the screen where the user can allow the usage of the camera by the app. */ enableCameraButtonTitle?: string; /** Text that will be displayed when the app is not allowed to use the camera, prompting the user to enable the usage of the camera. */ enableCameraExplanationText?: string; /** Foreground color of the detection overlay. */ finderLineColor?: string; /** Width of finder frame border. Default is 2. */ finderLineWidth?: number; /** String being displayed as description. */ finderTextHint?: string; /** Foreground color of the description label. */ finderTextHintColor?: string; /** Aspect ratio of finder frame (width \ height), which is used to build actual finder frame. Default is 1 - it is a square frame, which is good for QR capturing. */ finderAspectRatio?: AspectRatio; /** Controls whether the flash toggle button is hidden or not. iOS only. */ flashButtonHidden?: boolean; /** String being displayed on the flash button. iOS only. */ flashButtonTitle?: string; /** Foreground color of the flash button when flash is off. */ flashButtonInactiveColor?: string; /** Whether flash is toggled on or off. */ flashEnabled?: boolean; /** Disables auto-focus and locks the lens at the specified focus lock lens position. Default value is false. iOS only. For Android, minFocusDistanceLock can be used. */ focusLockEnabled?: boolean; /** The position of the lens. Values can be between 0.0f (minimum focusing distance) and 1.0f (maximum focusing distance). The default value is 0.0 iOS only. For Android, minFocusDistanceLock can be used. */ focusLockPosition?: number; /** Whether touch-to-focus is enabled on camera preview. Enabled by default. Android only. */ touchToFocusEnabled?: boolean; /** UI Interface orientation lock mode */ orientationLockMode?: OrientationLockMode; /** Optional minimum required text length of the detected barcode. The default is 0 (setting is turned off). NOTE - This feature works on ITF barcodes only. */ minimumTextLength?: number; /** Optional maximum text length of the detected barcode. The default is 0 (setting is turned off). NOTE - This feature works on ITF barcodes only. */ maximumTextLength?: number; /** Lock focus distance withing minimum possible range */ minFocusDistanceLock?: boolean; /** Optional minimum required quiet zone on the barcode. Measured in modules (the size of minimal bar on the barcode). The default is 10. NOTE - This feature works on ITF barcodes only. */ minimum1DBarcodesQuietZone?: number; /** With this option enabled, the scanner removes checks digits for UPC, EAN and MSI Plessey codes. Has no effect if both single and double digit MSI Plessey checksums are enabled. The default is `false` */ stripCheckDigits?: boolean; /** If `true`, the optional check digit for IATA_2_OF_5 codes is used in validation. The default is `true`. */ useIATA2OF5Checksum?: boolean; /** If `true`, the optional check digit for CODE_11 codes is used in validation. The default is `true`. */ useCode11Checksum?: boolean; /** Whether scanner screen should make a sound on successful barcode or MRZ detection. */ successBeepEnabled?: boolean; /** Background color of the top bar. */ topBarBackgroundColor?: string; /** Foreground color of the cancel button. */ topBarButtonsColor?: string; /** Accepted barcode formats */ barcodeFormats?: BarcodeFormat[]; /** Controls whether buttons should use all capitals style, as defined by the Android Material Design. Defaults to TRUE. Android only. */ useButtonsAllCaps?: boolean; /** If `true`, replaces the cancel button in the top bar with a back arrow icon. The default value is FALSE. Android only. */ replaceCancelButtonWithIcon?: boolean; /** Preview mode of the camera. FILL_IN or FIT_IN. Default is FILL_IN. Android only */ cameraPreviewMode?: CameraPreviewMode; /** The range of valid camera zoom factors. Default value is (1.0; 12.0). */ cameraZoomRange?: ZoomRange; /** Sets auto close timer in seconds. 0 = disabled and it is the default value. */ autoCancelTimeout?: number; /** The GS1 handling mode. The default value is PARSE. */ gs1HandlingMode?: Gs1HandlingMode; /** The checksum algorithm for MSI Plessey barcodes. The default value is MOD_10. */ msiPlesseyChecksumAlgorithm?: MSIPlesseyChecksumAlgorithm; /** The customer format used in AUSTRALIA_POST codes. Only relevant for format codes 59 and 62. The default value is `ALPHA_NUMERIC`. */ australiaPostCustomerFormat?: AustraliaPostCustomerFormat; /** If `true`, enabled the mode which slightly decreases the scanning quality and the energy consumption, and increases the scanning speed. If `false` - mode is disabled. The default is `false`. Android only. */ lowPowerMode?: boolean; /** Scanning delay after scanner appearance in seconds. Defaults to 0 secs. */ initialScanDelay?: number; /** Freezes a preview after a scan for a given amount of seconds. Defaults to 0 secs. Android only. */ delayAfterScan?: number; /** When this property is set to true, the zoom can be activated by double tapping somewhere in the receivers view. iOS only. */ doubleTapToZoomEnabled?: boolean; /** When this property is set to true, the zoom can be activated by a pinch gesture somewhere in the receivers view. iOS only. */ pinchToZoomEnabled?: boolean; /** Defines, if zooming in or out should be animated. iOS only. */ shouldAnimateZooming?: boolean; /** Display the region of interest. The default value is TRUE. */ viewFinderEnabled?: boolean; /** The confirmation dialog configuration. */ confirmationDialogConfiguration?: ConfirmationDialogConfiguration; /** The selection overlay configuration. */ overlayConfiguration?: SelectionOverlayConfiguration; } export interface BatchBarcodeScannerConfiguration { /** An optional array of barcode document formats that act as a detection filter. By default all supported document formats will be detected. */ acceptedDocumentFormats?: BarcodeDocumentFormat[]; /** The extension filter for EAN and UPC barcodes. */ barcodesExtensionFilter?: BarcodesExtensionFilter; /** Filter barcodes results by regular expression. To accept scanned barcode, regular expression should match the entire barcode value. By default, no filter is applied */ barcodeValueFilter?: string; /** Background color of the detection overlay. */ cameraOverlayColor?: string; /** Background color of the detection overlay. */ cameraModule?: CameraModule; /** The relative initial zoom level of the camera in the range (0,1), where 0 is zoomed out and 1 is zoomed in. The default value is 0. */ cameraZoomFactor?: number; /** The range of valid camera zoom factors. Default value is (1.0; 12.0). */ cameraZoomRange?: ZoomRange; /** Whether the cancel button is hidden or not. iOS only. */ cancelButtonHidden?: boolean; /** String being displayed on the cancel button. */ cancelButtonTitle?: string; /** When this property is set to true, the zoom can be activated by double tapping somewhere in the receivers view. iOS only. */ doubleTapToZoomEnabled?: boolean; /** When this property is set to true, the zoom can be activated by a pinch gesture somewhere in the receivers view. iOS only. */ pinchToZoomEnabled?: boolean; /** Defines, if zooming in or out should be animated. iOS only. */ shouldAnimateZooming?: boolean; /** The engine mode to be used for barcode scanning. The default value is NEXT_GEN. */ engineMode?: EngineMode; /** Foreground color of the detection overlay. */ finderLineColor?: string; /** Width of finder frame border. Default is 2. */ finderLineWidth?: number; /** String being displayed as description. */ finderTextHint?: string; /** Foreground color of the description label. */ finderTextHintColor?: string; /** Aspect ratio of finder frame (width \ height), which is used to build actual finder frame. Default is 1 - it is a square frame, which is good for QR capturing. */ finderAspectRatio?: AspectRatio; /** Controls whether the flash toggle button is hidden or not. iOS only. */ flashButtonHidden?: boolean; /** String being displayed on the flash button. iOS only. */ flashButtonTitle?: string; /** Whether flash is toggled on or off. */ flashEnabled?: boolean; /** Disables auto-focus and locks the lens at the specified focus lock lens position. The default value is false. iOS only. */ focusLockEnabled?: boolean; /** The position of the lens. Values can be between 0.0f (minimum focusing distance) and 1.0f (maximum focusing distance). The default value is 0.0 iOS only. For Android, minFocusDistanceLock can be used. */ focusLockPosition?: number; /** Whether touch-to-focus is enabled on camera preview. Enabled by default. Android only. */ touchToFocusEnabled?: boolean; /** UI Interface orientation lock mode */ orientationLockMode?: OrientationLockMode; /** Optional minimum required text length of the detected barcode. The default is 0 (setting is turned off). NOTE - This feature works on ITF barcodes only. */ minimumTextLength?: number; /** Optional maximum text length of the detected barcode. The default is 0 (setting is turned off). NOTE - This feature works on ITF barcodes only. */ maximumTextLength?: number; /** Optional minimum required quiet zone on the barcode. Measured in modules (the size of minimal bar on the barcode). The default is 10. NOTE - This feature works on ITF barcodes only. */ minimum1DBarcodesQuietZone?: number; /** Lock focus distance withing minimum possible range */ minFocusDistanceLock?: boolean; /** With this option enabled, the scanner removes checks digits for UPC, EAN and MSI Plessey codes. Has no effect if both single and double digit MSI Plessey checksums are enabled. The default is `false` */ stripCheckDigits?: boolean; /** If `true`, the optional check digit for IATA_2_OF_5 codes is used in validation. The default is `true`. */ useIATA2OF5Checksum?: boolean; /** If `true`, the optional check digit for CODE_11 codes is used in validation. The default is `true`. */ useCode11Checksum?: boolean; /** Whether scanner screen should make a sound on successful barcode or MRZ detection. */ successBeepEnabled?: boolean; /** Background color of the top bar. */ topBarBackgroundColor?: string; /** Foreground color of the cancel button. */ topBarButtonsColor?: string; /** Foreground color of the top bar buttons when disabled. */ topBarButtonsInactiveColor?: string; /** Accepted barcode formats */ barcodeFormats?: BarcodeFormat[]; /** Controls whether buttons should use all capitals style, as defined by the Android Material Design. Defaults to TRUE. Android only. */ useButtonsAllCaps?: boolean; /** The GS1 handling mode. The default value is PARSE. */ gs1HandlingMode?: Gs1HandlingMode; /** The checksum algorithm for MSI Plessey barcodes. The default value is MOD_10. */ msiPlesseyChecksumAlgorithm?: MSIPlesseyChecksumAlgorithm; /** The customer format used in AUSTRALIA_POST codes. Only relevant for format codes 59 and 62. The default value is `ALPHA_NUMERIC`. */ australiaPostCustomerFormat?: AustraliaPostCustomerFormat; /** If `true`, enabled the mode which slightly decreases the scanning quality and the energy consumption, and increases the scanning speed. If `false` - mode is disabled. The default is `false`. Android only. */ lowPowerMode?: boolean; /** The color for barcodes count text */ barcodesCountText?: string; /** The color for barcodes count text */ barcodesCountTextColor?: string; /** Text of the button which clears the list of scanned barcodes. */ clearButtonTitle?: string; /** The color of Submit button */ detailsActionColor?: string; /** The color of bottom sheet */ detailsBackgroundColor?: string; /** The color of text elements in bottom sheet */ detailsPrimaryColor?: string; /** String being displayed on the delete button. iOS only. */ deleteButtonTitle?: string; /** Title of the button that opens the screen where the user can allow the usage of the camera by the app. */ enableCameraButtonTitle?: string; /** Text that will be displayed when the app is not allowed to use the camera, prompting the user to enable the usage of the camera. */ enableCameraExplanationText?: string; /** The text for the data fetching state of the barcode item in a list. Smth "Fetching info…" */ fetchingStateText?: string; /** Text of the message that there are no barcodes scanned */ noBarcodesTitle?: string; /** Text of the button which finishes the flow */ submitButtonTitle?: string; /** If `true`, replaces the cancel button in the top bar with a back arrow icon. The default value is FALSE. Android only. */ replaceCancelButtonWithIcon?: boolean; /** Preview mode of the camera. FILL_IN or FIT_IN. Default is FILL_IN. Android only */ cameraPreviewMode?: CameraPreviewMode; /** Sets auto close timer in seconds. 0 = disabled and it is the default value. Android only */ autoCancelTimeout?: number; /** Scanning delay after scanner appearance in seconds. Defaults to 0 secs. */ initialScanDelay?: number; /** Display the region of interest. The default value is TRUE. */ viewFinderEnabled?: boolean; /** The selection overay configuration. */ overlayConfiguration?: SelectionOverlayConfiguration; } export interface CheckRecognizerConfiguration { /** Accepted check standards. Optional, by default - all checks are accepted. With an empty list no filter is applied and all checks are accepted. */ acceptedCheckStandards?: CheckStandard[]; /** The preferred camera module (default - BACK) */ cameraModule?: CameraModule; /** Background color outside of the finder window. */ cameraOverlayColor?: string; /** Title of the cancel button. */ cancelButtonTitle?: string; /** Whether the cancel button is hidden or not. iOS only. */ cancelButtonHidden?: boolean; /** Set high-resolution Check image capturing. If set to TRUE a high-resolution photo of the check is captured to run the recognition on. Upon successful recognition the recognition result also contains a high-resolution image of the check. If set to FALSE, the video frames will be used for recognition and result image delivery. The default value is TRUE. */ captureHighResolutionImage?: boolean; /** Title of the button that opens the screen where the user can allow the usage of the camera by the app. */ enableCameraButtonTitle?: string; /** Text that will be displayed when the app is not allowed to use the camera, prompting the user to enable the usage of the camera. */ enableCameraExplanationText?: string; /** The style of the dialog/alert in case of error. iOS Only. */ errorDialogStyle?: DialogStyle; /** The style of the dialogs/alerts OK button in case of error. iOS Only. */ errorDialogButtonStyle?: DialogButtonStyle; /** String being displayed as the title in the error alert that may occur when the recognition fails on captured high-resolution images. iOS only. */ errorAlertTitle?: string; /** String being displayed as the message in the error alert that may occur when the recognition fails on captured high-resolution images. iOS only. */ errorAlertMessage?: string; /** String being displayed as the button text in the error alert that may occur when the recognition fails on captured high-resolution images. iOS only. */ errorAlertButtonText?: string; /** Aspect ratio of finder frame (width \ height), which is used to build actual finder frame. Default is 1 - it is a square frame, which is good for QR capturing. */ finderAspectRatio?: AspectRatio; /** Foreground color of the detection overlay. */ finderLineColor?: string; /** Width of finder frame border. Default is 2. */ finderLineWidth?: number; /** Controls whether the flash toggle button is hidden or not. iOS only. */ flashButtonHidden?: boolean; /** Title of the flash toggle button. iOS only. */ flashButtonTitle?: string; /** Controls whether the flash should be initially enabled. The default value is FALSE. */ flashEnabled?: boolean; /** UI Interface orientation lock mode */ orientationLockMode?: OrientationLockMode; /** The background color of the top toolbar. */ topBarBackgroundColor?: string; /** The color of all active toggle buttons in the toolbar. */ topBarButtonsActiveColor?: string; /** The color of all inactive toggle buttons in the toolbar. */ topBarButtonsInactiveColor?: string; /** The background color of the user guidance hints. */ userGuidanceBackgroundColor?: string; /** The text color of the user guidance hints. */ userGuidanceTextColor?: string; /** Configuration that helps to override default hint values. */ userGuidanceStringValues?: CheckUserGuidanceStrings; /** Controls whether buttons should use all capitals style, as defined by the Android Material Design. Defaults to TRUE. Android only. */ useButtonsAllCaps?: boolean; /** Preview mode of the camera. FILL_IN or FIT_IN. Default is FILL_IN. Android only */ cameraPreviewMode?: CameraPreviewMode; /** Whether touch-to-focus is enabled on camera preview. Enabled by default. Android only. */ touchToFocusEnabled?: boolean; } export interface CroppingConfiguration { /** Title of the cancel button. */ cancelButtonTitle?: string; /** Text of the edit screen hint. */ hintTitle?: string; /** Color of the edit screen hint text. */ hintTitleColor?: string; /** Background color of the screen. */ backgroundColor?: string; /** Title of the Rotate button. */ rotateButtonTitle?: string; /** Title of the Reset button. */ resetButtonTitle?: string; /** Title of the Detect button. */ detectButtonTitle?: string; /** Title of the Done button. */ doneButtonTitle?: string; /** Changes the visibility of the Rotate button. */ rotateButtonHidden?: boolean; /** Changes the visibility of Detect and Reset buttons. */ detectResetButtonHidden?: boolean; /** UI Interface orientation lock mode */ orientationLockMode?: OrientationLockMode; /** Default color of the cropping outline. */ polygonColor?: string; /** Default color of the cropping draggable elements. */ anchorPointsColor?: string; /** Outline color of magnetically snapped edges. */ polygonColorMagnetic?: string; /** Width of the detected document outline. */ polygonLineWidth?: number; /** The background color of the top toolbar. */ topBarBackgroundColor?: string; /** The color of all active toggle buttons in the toolbar. */ topBarButtonsActiveColor?: string; /** The background color of the bottom shutter-bar. */ bottomBarBackgroundColor?: string; /** The color of the title of all buttons in the bottom shutter-bar (Cancel button, etc.), as well as the camera permission prompt button. */ bottomBarButtonsColor?: string; /** Controls whether buttons should use all capitals style, as defined by the Android Material Design. Defaults to TRUE. Android only. */ useButtonsAllCaps?: boolean; /** Swap top and bottom buttons on the screen */ swapTopBottomButtons?: boolean; /** The title of the Cropping UI Screen. iOS only */ topBarTitle?: string; /** The color of the title. iOS only */ topBarTitleColor?: string; /** Allows you to customize the accessibility configuration for the Cropping UI */ accessibilityConfiguration?: CroppingAccessibilityConfiguration; } export interface DocumentScannerConfiguration { /** The minimum score in percent (0 - 100) of the perspective distortion to accept a detected document. Default is 75.0. */ acceptedAngleScore?: number; /** The minimum document width or height in percent (0 - 100) of the screen size to accept a detected document. Default is 80.0. */ acceptedSizeScore?: number; /** The brightness threshold to accept a detected document in the range of 0 (very dark) to 255 (very bright). If the average brightness value of the detectors input image is below this value, the status of the detection will be set to ERROR_TOO_DARK. */ acceptedBrightnessThreshold?: number; /** Controls whether the auto-snapping toggle button is hidden or not. */ autoSnappingButtonHidden?: boolean; /** Title of the auto-snapping toggle button. */ autoSnappingButtonTitle?: string; /** When auto-snapping is enabled the document scanner will take a photo automatically when a document is detected, conditions are good and the auto-snapping time-out elapses. In this mode the user can still tap the shutter button to snap a document. */ autoSnappingEnabled?: boolean; /** Controls the auto-snapping speed. Sensitivity must be within the 0..1 range. A value of 1.0 triggers automatic capturing immediately, a value of 0.0 delays the automatic by 3 seconds. The default value is 0.66 (2 seconds) */ autoSnappingSensitivity?: number; /** The minimum delay in seconds between two consecutive automatic image captures. iOS only. */ autoSnappingDelay?: number; /** The background color of the bottom shutter-bar. */ bottomBarBackgroundColor?: string; /** The color of the title of all buttons in the bottom shutter-bar (Cancel button, etc.), as well as the camera permission prompt button. */ bottomBarButtonsColor?: string; /** The preferred camera module (default - BACK) */ cameraModule?: CameraModule; /** The color of the camera background (relevant only when the camera preview mode is CameraPreviewMode.FIT_IN). */ cameraBackgroundColor?: string; /** Preview mode of the camera. Fit-In or Fill-In. */ cameraPreviewMode?: CameraPreviewMode; /** Whether touch-to-focus is enabled on camera preview. Enabled by default. Android only. */ touchToFocusEnabled?: boolean; /** String being displayed on the label describing that the app is in split mode and needs to go fullscreen to work with camera. iOS only. */ cameraUnavailableExplanationText?: string; /** Whether the cancel button is hidden or not. iOS only. */ cancelButtonHidden?: boolean; /** Title of the cancel button. */ cancelButtonTitle?: string; /** The default image filter type for new documents pages. Defaults to ImageFilterTypeNone. */ defaultPageFilter?: ImageFilterType; /** The mode of the document detector to be used for document outline detection. Defaults to ML_BASED. iOS only. For Android, use the Scanbot SDK initializer. */ detectorMode?: DocumentDetectorMode; /** Title of the button that opens the screen where the user can allow the usage of the camera by the app. */ enableCameraButtonTitle?: string; /** Text that will be displayed when the app is not allowed to use the camera, prompting the user to enable the usage of the camera. */ enableCameraExplanationText?: string; /** Controls whether the flash toggle button is hidden or not. */ flashButtonHidden?: boolean; /** Title of the flash toggle button. */ flashButtonTitle?: string; /** Controls whether the flash should be initially enabled. The default value is FALSE. */ flashEnabled?: boolean; /** Shows the user guidance elements if autosnapping is disabled. */ forceUserGuidance?: boolean; /** Sets whether to ignore the OK_BUT_BAD_ASPECT_RATIO detection status. By default BadAspectRatio is not ignored. */ ignoreBadAspectRatio?: boolean; /** The image scaling factor. The factor must be within the 0..1 range. A factor of 1 means that the resulting images retain their original size. When the factor is less than 1, resulting images will be made smaller by that factor. By default the scale is 1. */ imageScale?: number; /** Controls whether the multi-page toggle button is hidden or not. */ multiPageButtonHidden?: boolean; /** Title of the multi-page mode toggle button. */ multiPageButtonTitle?: string; /** Controls multi-page mode. When enabled, the user can take multiple document photos before closing the screen by tapping the page counter button. When disabled, the screen will be closed immediately after the first document photo is made. The default value is FALSE. */ multiPageEnabled?: boolean; /** UI Interface orientation lock mode */ orientationLockMode?: OrientationLockMode; /** Title suffix of the button that finishes the document scanning when multi-page scanning is enabled. The button's title has the format "# Pages", where '#' shows the number of images captured up to now and the suffix "Pages" is set using this method. */ pageCounterButtonTitle?: string; /** The prioritization of still image quality and capturing speed. Defaults to CapturePhotoQualityPrioritization.BALANCED. If you experience lots of blurry still images try to set this property to CapturePhotoQualityPrioritization.QUALITY. Note: Has no effect on devices prior to iOS 13.0!. iOS only. */ photoQualityPrioritization?: CapturePhotoQualityPrioritization; /** The background color of the detected document outline when the document's angle, size or aspect ratio is not yet sufficiently good. (All net.doo.snap.lib.detector.DetectionResult with OK_BUT_XXX). */ polygonBackgroundColor?: string; /** The background color of the detected document outline when we are ready to snap OK. */ polygonBackgroundColorOK?: string; /** The color of the detected document outline when the document's angle, size or aspect ratio is not yet sufficiently good. (All detection statuses in net.doo.snap.lib.detector.DetectionResult that have the OK_BUT_XXX prefix). */ polygonColor?: string; /** The color of the detected document outline when we are ready to snap OK. */ polygonColorOK?: string; /** Width of the detected document outline. */ polygonLineWidth?: number; /** The radius to use when drawing rounded corners of the polygon. Default is 8.0. */ polygonCornerRadius?: number; /** Stroke color of polygon auto snap progress animation. Default is green. Can't be nil. */ polygonAutoSnapProgressColor?: string; /** Line width of polygon auto snap progress animation. Default is 5.0. */ polygonAutoSnapProgressLineWidth?: number; /** Whether polygon auto snap progress animation is enabled or not. Default is true. */ polygonAutoSnapProgressEnabled?: boolean; /** An optional array of aspect ratios the documents have to conform to. */ requiredAspectRatios?: AspectRatio[]; /** An optional array of aspect ratios the documents may conform to. */ preferredAspectRatios?: AspectRatio[]; /** Whether polygon auto snap progress animation is enabled or not. Default is true. */ shutterButtonAutoInnerColor?: string; /** The background color of the shutter button in auto-snapping mode. */ shutterButtonAutoOuterColor?: string; /** The indicator color of the shutter button in auto-snapping mode. iOS only. */ shutterButtonIndicatorColor?: string; /** The foreground color of the shutter button in manual mode. */ shutterButtonManualInnerColor?: string; /** The background color of the shutter button in manual mode. */ shutterButtonManualOuterColor?: string; /** The camera session will be stopped entirely, when the receiver disappears and restarts when the receiver reappears if set to True else will pause the delivery of video frames and QR Codes. Defaults to True. iOS only. */ stopsCameraSessionWhenDisappeared?: boolean; /** Text hint that will be shown when the current detection status is OK_BUT_BAD_ANGLES */ textHintBadAngles?: string; /** Text hint that will be shown when the current detection status is OK_BUT_BAD_ASPECT_RATIO */ textHintBadAspectRatio?: string; /** Text hint that will be shown when the current detection status is ERROR_NOTHING_DETECTED */ textHintNothingDetected?: string; /** The text being displayed on the user-guidance label, when a document was detected, but its center is too far away from the image center. */ textHintOffCenter?: string; /** Text hint that will be shown when the current detection status is OK */ textHintOK?: string; /** Text hint that will be shown when the current detection status is ERROR_TOO_DARK */ textHintTooDark?: string; /** Text hint that will be shown when the current detection status is ERROR_TOO_NOISY */ textHintTooNoisy?: string; /** Text hint that will be shown when the current detection status is OK_BUT_TOO_SMALL */ textHintTooSmall?: string; /** The background color of the top toolbar. */ topBarBackgroundColor?: string; /** The color of all active toggle buttons in the toolbar. */ topBarButtonsActiveColor?: string; /** The color of all inactive toggle buttons in the toolbar. */ topBarButtonsInactiveColor?: string; /** The background color of the user guidance hints. */ userGuidanceBackgroundColor?: string; /** The text color of the user guidance hints. */ userGuidanceTextColor?: string; /** Font size of the user guidance. Default is 17.0. */ userGuidanceFontSize?: number; /** Limits the maximum size of the document image. If width or height are zero, this property is effectively ignored. */ documentImageSizeLimit?: Size; /** Hides the shutter button if set to TRUE. Shows it otherwise. Defaults to FALSE. If set to TRUE, auto-snapping is enabled and the property autoSnappingEnabled of the behaviour configuration will have no effect. Also the auto-snapping button will be hidden. */ shutterButtonHidden?: boolean; /** The text being displayed on the user-guidance label, when the scanners energy saver is activated. iOS only. */ textHintEnergySavingActive?: string; /** Maximum number of pages to scan. Ignored when set to null, or when `multiPageEnabled` is FALSE. Default value is null. */ maxNumberOfPages?: number; /** Controls whether buttons should use all capitals style, as defined by the Android Material Design. Defaults to TRUE. Android only. */ useButtonsAllCaps?: boolean; /** Allows you to customize the accessibility configuration for the Document Scanner UI */ accessibilityConfiguration?: DocumentScannerAccessibilityConfiguration; } /** * @deprecated */ export interface HealthInsuranceCardScannerConfiguration { /** The preferred camera module (default - BACK) */ cameraModule?: CameraModule; /** Background color outside of the finder window. */ cameraOverlayColor?: string; /** Title of the cancel button. */ cancelButtonTitle?: string; /** Whether the cancel button is hidden or not. iOS only. */ cancelButtonHidden?: boolean; /** String being displayed when health insurance card was not found. */ detectionStatusFailedDetectionText?: string; /** String being displayed when health insurance card was found but not recognized. */ detectionStatusFailedValidationText?: string; /** String being displayed when health insurance card was found and recognized. */ detectionStatusSuccessText?: string; /** Title of the button that opens the screen where the user can allow the usage of the camera by the app. */ enableCameraButtonTitle?: string; /** Text that will be displayed when the app is not allowed to use the camera, prompting the user to enable the usage of the camera. */ enableCameraExplanationText?: string; /** Foreground color of the detection overlay. */ finderLineColor?: string; /** Width of finder frame border. Default is 2. */ finderLineWidth?: number; /** String being displayed as description. */ finderTextHint?: string; /** Foreground color of the description label. */ finderTextHintColor?: string; /** Controls whether the flash toggle button is hidden or not. iOS only. */ flashButtonHidden?: boolean; /** Title of the flash toggle button. iOS only. */ flashButtonTitle?: string; /** Controls whether the flash should be initially enabled. The default value is FALSE. */ flashEnabled?: boolean; /** UI Interface orientation lock mode */ orientationLockMode?: OrientationLockMode; /** The background color of the top toolbar. */ topBarBackgroundColor?: string; /** The color of all active toggle buttons in the toolbar. */ topBarButtonsActiveColor?: string; /** The color of all inactive toggle buttons in the toolbar. */ topBarButtonsInactiveColor?: string; /** Controls whether buttons should use all capitals style, as defined by the Android Material Design. Defaults to TRUE. Android only. */ useButtonsAllCaps?: boolean; /** If `true`, replaces the cancel button in the top bar with a back arrow icon. The default value is FALSE. Android only. */ replaceCancelButtonWithIcon?: boolean; /** Preview mode of the camera. FILL_IN or FIT_IN. Default is FILL_IN. Android only */ cameraPreviewMode?: CameraPreviewMode; /** Whether touch-to-focus is enabled on camera preview. Enabled by default. Android only. */ touchToFocusEnabled?: boolean; /** The live detection configuration parameters. */ recognizerParameters?: HealthInsuranceCardRecognizerParameters; } export interface FinderDocumentScannerConfiguration { /** Minimum score in percent (0 - 100) of the accepted perspective distortion of the detected document. Default is 75.0. */ acceptedAngleScore?: number; /** Minimum score in percent (0 - 100) of accepted document width or height to screen size ratio of the detected document. Default is 80.0. */ acceptedSizeScore?: number; /** The brightness threshold to accept a detected document in the range of 0 (very dark) to 255 (very bright). If the average brightness value of the detectors input image is below this value, the status of the detection will be set to ERROR_TOO_DARK. */ acceptedBrightnessThreshold?: number; /** Whether to enable auto-snapping. If enabled, the document scanner will take a photo automatically when a document is detected, conditions are good and the auto-snapping time-out elapses. In this mode, the user can still tap the shutter button to snap a document. */ autoSnappingEnabled?: boolean; /** Controls the auto-snapping speed. Sensitivity must be within the 0..1 range. A value of 1.0 triggers automatic capturing immediately, a value of 0.0 delays the automatic capturing by 3 seconds. Default value is 0.66 (2 seconds). */ autoSnappingSensitivity?: number; /** Minimum delay in seconds between two consecutive automatic image captures. iOS only. */ autoSnappingDelay?: number; /** Preferred camera module (Default: BACK). */ cameraModule?: CameraModule; /** Color of the camera background (relevant only when the camera preview mode is CameraPreviewMode.FIT_IN). */ cameraBackgroundColor?: string; /** Preview mode of the camera. Fit-In or Fill-In. */ cameraPreviewMode?: CameraPreviewMode; /** Whether touch-to-focus is enabled on camera preview. Enabled by default. Android only. */ touchToFocusEnabled?: boolean; /** String being displayed on the label describing that the app is in split mode and needs to go fullscreen to work with the camera. iOS only. */ cameraUnavailableExplanationText?: string; /** Title of the cancel button. */ cancelButtonTitle?: string; /** Default image filter type for new document pages. Defaults to ImageFilterTypeNone. */ defaultPageFilter?: ImageFilterType; /** Document detector mode to be used for detecting the document outline. Defaults to ML_BASED. iOS only. For Android, use the Scanbot SDK initializer. */ detectorMode?: DocumentDetectorMode; /** Title of the button that opens the screen where the user can allow the usage of the camera by the app. */ enableCameraButtonTitle?: string; /** Text that will be displayed when the app is not allowed to use the camera, prompting the user to enable the usage of the camera. */ enableCameraExplanationText?: string; /** Whether the flash toggle button is hidden. */ flashButtonHidden?: boolean; /** Whether the flash should be initially enabled. The default value is FALSE. */ flashEnabled?: boolean; /** Whether to show the user guidance elements if auto-snapping is disabled. */ forceUserGuidance?: boolean; /** Whether to enable the view finder. */ finderEnabled?: boolean; /** Foreground color of the detection overlay. */ finderLineColor?: string; /** Width of finder frame border. Default is 2. */ finderLineWidth?: number; /** Background color outside of the finder window. */ cameraOverlayColor?: string; /** Aspect ratio of the finder frame (width to height), which is used to build the actual finder frame. Default is the DIN A4 aspect ratio. */ finderAspectRatio?: AspectRatio; /** Sets whether to ignore the OK_BUT_BAD_ASPECT_RATIO detection status. By default, BadAspectRatio is ignored. */ ignoreBadAspectRatio?: boolean; /** Image scaling factor. The factor must be within the 0..1 range. A factor of 1 means that the resulting images retain their original size. When the factor is less than 1, resulting images will be made smaller by that factor. By default the scale is 1. */ imageScale?: number; /** Mode for locking the UI's orientation. */ orientationLockMode?: OrientationLockMode; /** Prioritization of still image quality and capturing speed. Defaults to CapturePhotoQualityPrioritization.BALANCED. If you experience lots of blurry still images, try to set this property to CapturePhotoQualityPrioritization.QUALITY. iOS only. */ photoQualityPrioritization?: CapturePhotoQualityPrioritization; /** Whether to display the document's polygon. */ polygonEnabled?: boolean; /** Background color of the detected document's outline when the document's angle, size or aspect ratio is not yet sufficiently good. (All net.doo.snap.lib.detector.DetectionResult with OK_BUT_XXX.) */ polygonBackgroundColor?: string; /** Background color of the detected document's outline when ready to snap. */ polygonBackgroundColorOK?: string; /** Color of the detected document's outline when the document's angle, size or aspect ratio is not yet sufficiently good. (All detection statuses in net.doo.snap.lib.detector.DetectionResult that have the OK_BUT_XXX prefix.) */ polygonColor?: string; /** Color of the detected document's outline when ready to snap. */ polygonColorOK?: string; /** Width of the detected document's outline. */ polygonLineWidth?: number; /** Radius to use when drawing rounded corners of the polygon. Default is 8.0. */ polygonCornerRadius?: number; /** Stroke color of the polygon or the finder's auto-snap progress animation. Default is green. Can't be nil. */ autoSnapProgressColor?: string; /** Line width of the polygon or the finder's auto-snap progress animation. Default is 5.0. */ autoSnapProgressLineWidth?: number; /** Whether to enable the polygon or finder's auto-snap progress animation. Default is true. */ autoSnapProgressEnabled?: boolean; /** Whether to allow scanning only for documents with the same aspect ratio as the finder. */ lockDocumentAspectRatioToFinder?: boolean; /** Foreground color of the shutter button in auto-snapping mode. */ shutterButtonAutoInnerColor?: string; /** Background color of the shutter button in auto-snapping mode. */ shutterButtonAutoOuterColor?: string; /** Indicator color of the shutter button in auto-snapping mode. iOS only. */ shutterButtonIndicatorColor?: string; /** Foreground color of the shutter button in manual mode. */ shutterButtonManualInnerColor?: string; /** Background color of the shutter button in manual mode. */ shutterButtonManualOuterColor?: string; /** If true, the camera session is stopped entirely when the receiver disappears and restarted when the receiver reappears. Else, will pause the delivery of video frames. Defaults to True. iOS only. */ stopsCameraSessionWhenDisappeared?: boolean; /** Text hint that will be shown when the current detection status is OK_BUT_BAD_ANGLES. */ textHintBadAngles?: string; /** Text hint that will be shown when the current detection status is OK_BUT_BAD_ASPECT_RATIO. */ textHintBadAspectRatio?: string; /** Text hint that will be shown when the current detection status is ERROR_NOTHING_DETECTED. */ textHintNothingDetected?: string; /** Text hint that will be show when a document was detected, but its center is too far away from the image center. */ textHintOffCenter?: string; /** Text hint that will be shown when the current detection status is OK. */ textHintOK?: string; /** Text hint that will be shown when the current detection status is ERROR_TOO_DARK. */ textHintTooDark?: string; /** Text hint that will be shown when the current detection status is ERROR_TOO_NOISY. */ textHintTooNoisy?: string; /** Text hint that will be shown when the current detection status is OK_BUT_TOO_SMALL. */ textHintTooSmall?: string; /** Background color of the top toolbar. */ topBarBackgroundColor?: string; /** Color of all active toggle buttons in the toolbar. */ topBarButtonsActiveColor?: string; /** Color of all inactive toggle buttons in the toolbar. */ topBarButtonsInactiveColor?: string; /** Background color of the user guidance hints. */ userGuidanceBackgroundColor?: string; /** Text color of the user guidance hints. */ userGuidanceTextColor?: string; /** Font size of the user guidance. Default is 17.0. */ userGuidanceFontSize?: number; /** Limits the maximum size of the document image. If the width or height are zero, this property is effectively ignored. */ documentImageSizeLimit?: Size; /** Whether to hide the shutter button. Defaults to TRUE. If set to TRUE, auto-snapping is enabled and the property autoSnappingEnabled of the behavior configuration will have no effect. Also the auto-snapping button will be hidden. */ shutterButtonHidden?: boolean; /** Text hint that will be shown when the scanner's energy saver is activated. iOS only. */ textHintEnergySavingActive?: string; /** Whether buttons should use all-capitals style, as defined by the Android Material Design. Defaults to TRUE. Android only. */ useButtonsAllCaps?: boolean; /** Allows you to customize the accessibility configuration for the Document Scanner UI. */ accessibilityConfiguration?: FinderDocumentScannerAccessibilityConfiguration; } export interface GenericDocumentRecognizerConfiguration { /** Controls whether the flash should be initially enabled. The default value is FALSE. */ flashEnabled?: boolean; /** UI Interface orientation lock mode */ orientationLockMode?: OrientationLockMode; /** The preferred camera module (default - BACK) */ cameraModule?: CameraModule; /** The background color of the top toolbar. */ topBarBackgroundColor?: string; /** The color of all active toggle buttons in the toolbar. */ topBarButtonsActiveColor?: string; /** The color of all inactive toggle buttons in the toolbar. */ topBarButtonsInactiveColor?: string; /** Background color outside of the finder window. */ cameraOverlayColor?: string; /** Foreground color of the detection overlay. */ finderLineColor?: string; /** Width of finder frame border. Default is 2. */ finderLineWidth?: number; /** Text color of the fields count label. */ fieldsCountTextColor?: string; /** Color of confidence value label background in details screen, when the field confidence level is high. */ fieldConfidenceHighColor?: string; /** Color of confidence value label background in details screen, when the field confidence level is moderate. */ fieldConfidenceModerateColor?: string; /** Color of confidence value label background in details screen, when the field confidence level is low. */ fieldConfidenceLowColor?: string; /** Color of confidence value label text in details. */ fieldConfidenceTextColor?: string; /** Color of tip text on scanning screen. */ tipTextColor?: string; /** Color of tip background on scanning screen. */ tipBackgroundColor?: string; /** The color of bottom sheet */ detailsBackgroundColor?: string; /** The color of text elements in bottom sheet */ detailsPrimaryColor?: string; /** The color of Submit button */ detailsActionColor?: string; /** Text color for section headers on the details screen. iOS only. */ detailsSectionHeaderTextColor?: string; /** Background color for section headers on the details screen. iOS only. */ detailsSectionHeaderBackgroundColor?: string; /** Title of the cancel button. */ cancelButtonTitle?: string; /** Whether the cancel button is hidden or not. iOS only. */ cancelButtonHidden?: boolean; /** String used for displaying amount of detected fields. Use %d for number formatting symbol. */ clearButtonTitle?: string; /** Text of the button which finishes the flow */ submitButtonTitle?: string; /** String used for displaying amount of detected fields. Use %d for number formatting symbol. */ fieldsCountText?: string; /** String that shows average confidence value of scanned document. Use %d as number formatting symbol. */ confidenceValue?: string; /** String that asks user to scan back side of a document. */ scanBackSideTitle?: string; /** String that asks user to scan front side of a document. */ scanFrontSideTitle?: string; /** String that asks user to start scanning a document. */ startScanningTitle?: string; /** String that notifies that both sides of document are scanned. */ scannedEverythingTitle?: string; /** String being displayed for empty values. iOS only. */ emptyValueTitle?: string; /** Title of the button that opens the screen where the user can allow the usage of the camera by the app. */ enableCameraButtonTitle?: string; /** Text that will be displayed when the app is not allowed to use the camera, prompting the user to enable the usage of the camera. */ enableCameraExplanationText?: string; /** A title to show image content. Android only. */ imageTitle?: string; /** String that notifies that nothing was scanned yet. */ noDataTitle?: string; /** Accepted document types. All other document types will be ignored. By default - All types */ acceptedDocumentTypes?: GenericDocumentType[]; /** Allows to configure the display configuration for fields. */ fieldsDisplayConfiguration?: FieldsDisplayConfiguration[]; /** Allows to configure the display configuration for documents. */ documentsDisplayConfiguration?: DocumentsDisplayConfiguration[]; /** List of secure fields which should be excluded from scanning process. All other fields will be scanned as usual. Field should be set ONLY as normalized field name. Example - [DePassport.BirthDate] or [DePassport.Birthplace] */ excludedFieldTypes?: string[]; /** Controls whether the flash toggle button is hidden or not. */ flashButtonHidden?: boolean; /** Title of the flash toggle button. */ flashButtonTitle?: string; /** Controls whether buttons should use all capitals style, as defined by the Android Material Design. Defaults to TRUE. Android only. */ useButtonsAllCaps?: boolean; /** If `true`, replaces the cancel button in the top bar with a back arrow icon. The default value is FALSE. Android only. */ replaceCancelButtonWithIcon?: boolean; /** Preview mode of the camera. FILL_IN or FIT_IN. Default is FILL_IN. Android only */ cameraPreviewMode?: CameraPreviewMode; /** Whether touch-to-focus is enabled on camera preview. Enabled by default. Android only. */ touchToFocusEnabled?: boolean; } export interface LicensePlateScannerConfiguration { /** The preferred camera module (default - BACK) */ cameraModule?: CameraModule; /** Background color outside of the finder window. */ camer