export interface BarcodeScannerConfiguration {
  /** A version of the configuration object */
  version?: string;

  /** The configuration object should be applied for this screen */
  screen?: string;

  /** An optional array of barcode document formats that act as a detection filter. By default all supported document formats will be detected. */
  acceptedDocumentFormats?: BarcodeDocumentFormat[];

  /** 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. 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;

  /** String being displayed on the cancel button. */
  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?: FinderAspectRatio;

  /** Controls whether the flash toggle button is hidden or not. */
  flashButtonHidden?: boolean;

  /** String being displayed on the flash button. */
  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 value will be clamped to [0.0f, 1.0f]. The default value is 0.0. iOS only. For Android, minFocusDistanceLock can be used. */
  focusLockPosition?: number;

  /** 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;

  /** 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; 3.0). iOS only. For Android, minFocusDistanceLock can be used. */
  cameraZoomRange?: ZoomRange;

  /** Sets auto close timer in seconds. 0 = disabled and it is the default value. Android only */
  autoCancelTimeout?: number;

  /** When set to `true`, the scanner assumes that the barcode can be a GS1 barcode. Turn it off, if you don't want to see decoded FNC1 characters ("]C1" and ASCII char 29). The default value is `true`. NOTE - Currently works for CODE128 barcodes only! */
  gs1DecodingEnabled?: boolean;

  /** The checksum algorithm for MSI Plessey barcodes. The default value is Mod10. */
  msiPlesseyChecksumAlgorithm?: MSIPlesseyChecksumAlgorithm;

  /** 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 expected density of QR codes in an image. */
  codeDensity?: CodeDensity;

  /** The type of barcode image generation. */
  barcodeImageGenerationType?: BarcodeImageGenerationType;

  /** 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;

  /** The confirmation dialog configuration. */
  confirmationDialogConfiguration?: ConfirmationDialogConfiguration;

  /** The selection overlay configuration. */
  overlayConfiguration?: SelectionOverlayConfiguration;
}

export interface BatchBarcodeScannerConfiguration {
  /** A version of the configuration object */
  version?: string;

  /** The configuration object should be applied for this screen */
  screen?: string;

  /** An optional array of barcode document formats that act as a detection filter. By default all supported document formats will be detected. */
  acceptedDocumentFormats?: BarcodeDocumentFormat[];

  /** 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; 3.0). iOS only. */
  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;

  /** String being displayed on the cancel button. */
  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?: FinderAspectRatio;

  /** Controls whether the flash toggle button is hidden or not. */
  flashButtonHidden?: boolean;

  /** String being displayed on the flash button. */
  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. */
  focusLockEnabled?: boolean;

  /** The position of the lens. Values can be between 0.0f (minimum focusing distance) and 1.0f (maximum focusing distance). The value will be clamped to [0.0f, 1.0f]. The default value is 0.0. */
  focusLockPosition?: number;

  /** 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;

  /** 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;

  /** When set to `true`, the scanner assumes that the barcode can be a GS1 barcode. Turn it off, if you don't want to see decoded FNC1 characters ("]C1" and ASCII char 29). The default value is `true`. NOTE - Currently works for CODE128 barcodes only! */
  gs1DecodingEnabled?: boolean;

  /** The checksum algorithm for MSI Plessey barcodes. The default value is Mod10. */
  msiPlesseyChecksumAlgorithm?: MSIPlesseyChecksumAlgorithm;

  /** 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. */
  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;

  /** The expected density of QR codes in an image. */
  codeDensity?: CodeDensity;

  /** 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;

  /** The selection overay configuration. */
  overlayConfiguration?: SelectionOverlayConfiguration;
}

export interface DocumentScannerConfiguration {
  /** A version of the configuration object */
  version?: string;

  /** The configuration object should be applied for this screen */
  screen?: string;

  /** 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;

  /** 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 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;

  /** 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 priorization of still image quality and capturing speed. Defaults to CapturePhotoQualityPrioritizationBalanced. If you experience lots of blurry still images try to set this property to CapturePhotoQualityPrioritizationQuality. Note: Has no effect on devices prior to iOS 13.0!. iOS only. */
  photoQualityPriorization?: 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;

  /** 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. */
  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;
}

/** Document scanner accessibility configuration */
export interface DocumentScannerAccessibilityConfiguration {
  /** Text, that is used as an accessibility label for the flash button. */
  flashButtonAccessibilityLabel: string;

  /** Text, that is used as an accessibility hint for the flash button. */
  flashButtonAccessibilityHint: string;

  /** Text, that is used as an accessibility label for the multi-page button. */
  multiPageButtonAccessibilityLabel: string;

  /** Text, that is used as an accessibility hint for the multi-page button. */
  multiPageButtonAccessibilityHint: string;

  /** Text, that is used as an accessibility label for the auto-snapping button. */
  autoSnappingButtonAccessibilityLabel: string;

  /** Text, that is used as an accessibility hint for the auto-snapping button. */
  autoSnappingButtonAccessibilityHint: string;

  /** Text, that is used as an accessibility label for the cancel button. */
  cancelButtonAccessibilityLabel: string;

  /** Text, that is used as an accessibility hint for the cancel button. */
  cancelButtonAccessibilityHint: string;

  /** Text, that is used as an accessibility label for the page-amount button. */
  pageCounterButtonAccessibilityLabel: string;

  /** Text, that is used as an accessibility hint for the page-amount button. */
  pageCounterAccessibilityHint: string;

  /** Text, that is used as an accessibility label for the shutter button. */
  shutterButtonAccessibilityLabel: string;

  /** Text, that is used as an accessibility hint for the shutter button. */
  shutterButtonAccessibilityHint: string;
}

/** The image filter types. */
export type ImageFilterType =
  /** Passthrough filter. Does not alter the image. */
  | 'ImageFilterTypeNone'
  /** Optimizes colors, contrast and brightness. Usecase: photos. */
  | 'ImageFilterTypeColor'
  /** Standard grayscale filter. Creates a grayscaled 8-bit image and optimizes contrast and dynamic range. */
  | 'ImageFilterTypeGray'
  /** Standard binarization filter with contrast optimization. Creates a grayscaled 8-bit image with mostly black or white pixels. Usecase: Preparation for optical character recognition. */
  | 'ImageFilterTypeBinarized'
  /** Fixes white-balance and cleans up the background. Usecase: images of paper documents. */
  | 'ImageFilterTypeColorDocument'
  /** A filter for binarizing an image. Creates an 8-bit image with pixel values set to eiter 0 or 255. Usecase: Preparation for optical character recognition. */
  | 'ImageFilterTypePureBinarized'
  /** Cleans up the background and tries to preserve photos within the image. Usecase: magazine pages, flyers. */
  | 'ImageFilterTypeBackgroundClean'
  /** Black and white filter with background cleaning. Creates a grayscaled 8-bit image with mostly black or white pixels. Usecase: Textual documents or documents with black and white illustrations. */
  | 'ImageFilterTypeBlackAndWhite'
  /** A filter for black and white conversion using OTSU binarization. */
  | 'ImageFilterTypeOtsuBinarization'
  /** A filter for black and white conversion primary used for low-contrast documents. */
  | 'ImageFilterTypeDeepBinarization'
  /** A filter that enhances edges in low-contrast documents. */
  | 'ImageFilterTypeEdgeHighlight'
  /** Binarization filter primary inteded to use on low-contrast documents with heavy shadows. */
  | 'ImageFilterTypeLowLightBinarization'
  /** Binarization filter primary intended to use on low-contrast documents with heavy shadows. */
  | 'ImageFilterTypeLowLightBinarization2'
  /** Binarization filter for poor quality printed papers. */
  | 'ImageFilterTypeSensitiveBinarization'
  /** Standard grayscale filter. Creates a grayscaled 8-bit image. */
  | 'ImageFilterTypePureGray';

/** The priorization of still image quality and capturing speed. Has no effect on devices prior to iOS 13.0. iOS only. */
export type CapturePhotoQualityPrioritization =
  /** Captures a still image at the highest possible speed. The quality of the image may be degraded. */
  | 'CapturePhotoQualityPrioritizationSpeed'
  /** Balances capturing speed and image quality equally. This is the default value. */
  | 'CapturePhotoQualityPrioritizationBalanced'
  /** Captures a still image with the best possible quality in terms of noise, frozen motion and detail in low light. The speed of the capturing might be significantly reduced. */
  | 'CapturePhotoQualityPrioritizationQuality';
export interface CroppingConfiguration {
  /** A version of the configuration object */
  version?: string;

  /** The configuration object should be applied for this screen */
  screen?: string;

  /** 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;

  /** Allows you to customize the accessibility configuration for the Cropping UI */
  accessibilityConfiguration?: CroppingAccessibilityConfiguration;
}

/** Cropping screen accessibility configuration */
export interface CroppingAccessibilityConfiguration {
  /** Text, that is used as an accessibility label for the cancel button */
  cancelButtonAccessibilityLabel: string;

  /** Text, that is used as an accessibility hint for the cancel button */
  cancelButtonAccessibilityHint: string;

  /** Text, that is used as an accessibility label for the done button */
  doneButtonAccessibilityLabel: string;

  /** Text, that is used as an accessibility hint for the done button. */
  doneButtonAccessibilityHint: string;

  /** Text, that is used as an accessibility label for the detect button */
  detectButtonAccessibilityLabel: string;

  /** Text, that is used as an accessibility hint for the detect button */
  detectButtonAccessibilityHint: string;

  /** Text, that is used as an accessibility label for the reset button */
  resetButtonAccessibilityLabel: string;

  /** Text, that is used as an accessibility hint for the reset button */
  resetButtonAccessibilityHint: string;

  /** Text, that is used as an accessibility hint for the rotate button */
  rotateButtonAccessibilityLabel: string;

  /** Text, that is used as an accessibility hint for the rotate button */
  rotateButtonAccessibilityHint: string;
}

export interface MrzScannerConfiguration {
  /** A version of the configuration object */
  version?: string;

  /** The configuration object should be applied for this screen */
  screen?: string;

  /** 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;

  /** 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 7 - which is good for standard machine readable zones. */
  finderAspectRatio?: FinderAspectRatio;

  /** 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;

  /** UI Interface orientation lock mode */
  orientationLockMode?: OrientationLockMode;

  /** Controls whether to play a beep sound after a successful detection. Default value is TRUE. */
  successBeepEnabled?: boolean;

  /** 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;

  /** Time in seconds until the screen is automatically cancelled. Set to 0 to disable automatic cancellation. Defaults to 0 (disabled). iOS only. */
  autoCancelTimeout?: number;
}

export interface HealthInsuranceCardScannerConfiguration {
  /** A version of the configuration object */
  version?: string;

  /** The configuration object should be applied for this screen */
  screen?: string;

  /** 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. */
  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;

  /** 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;
}

export interface CheckRecognizerConfiguration {
  /** A version of the configuration object */
  version?: string;

  /** The configuration object should be applied for this screen */
  screen?: string;

  /** 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?: FinderAspectRatio;

  /** 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. */
  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;

  /** 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;
}

/** Configuration that helps to override default hint values. */
export interface CheckUserGuidanceStrings {
  /** Text that is shown on camera open. */
  startScanning: string;

  /** Text text that is shown when the camera is seeking for the document on the visible area, shown after the first result from the detector. */
  scanning: string;

  /** Text text that is shown when energy saving is active. */
  energySaving: string;

  /** Text that is shown when the camera snaps the image. */
  capturing: string;

  /** Text that is shown when the detector tries to detect the document from the snapped image. */
  processing: string;
}

/** Supported check standards. */
export type CheckStandard =
  /** A check compatible with the ASC X9 standard used in the USA */
  | 'USA'
  /** A check format commonly used in France */
  | 'FRA'
  /** A check format commonly used in Kuwait */
  | 'KWT'
  /** A check compatible with the Australian Paper Clearing System cheque standard */
  | 'AUS'
  /** A check compatible with the CTS-2010 standard issued by the Reserve Bank of India in 2012 */
  | 'IND';

export interface GenericDocumentRecognizerConfiguration {
  /** A version of the configuration object */
  version?: string;

  /** The configuration object should be applied for this screen */
  screen?: string;

  /** 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[];

  /** Accepted minimal sharpness score. Images with a score less than that will be rejected with RecognitionStatus::ErrorTooBlurry. Default is 80. 0 - any image will be accepted. 80 - a good compromise; the recommended setting. 100 - only very sharp images will be accepted. */
  sharpnessAcceptanceFactor?: number;

  /** 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;
}

/** Field display configuration object */
export interface FieldsDisplayConfiguration {
  /** Complete list of available normalized field names is available in the documentation */
  normalizedFieldName: string;

  /** The display text of the field in the list */
  defaultDisplayText: string;

  /** The default display state of a field in the RTU UI, could be hidden by default or visible by default. */
  defaultDisplayState: FieldDisplayState;
}

/** Field display configuration object */
export interface DocumentsDisplayConfiguration {
  /** Complete list of available normalized document names is available in the documentation */
  normalizedDocumentName: string;

  /** The display text of the document in the list */
  defaultDisplayText: string;
}

/** Field display state in the RTU UI */
export type FieldDisplayState =
  /** Field will not be shown in the RTU UI */
  | 'Hidden'
  /** Field will be shown in the RTU UI if its text value isn't an empty string */
  | 'VisibleIfNotEmpty'
  /** Field will be shown in the RTU UI */
  | 'AlwaysVisible';

/** Supported document types */
export type GenericDocumentType =
  /** German ID card, front side */
  | 'DeIdCardFront'
  /** German ID card, back side */
  | 'DeIdCardBack'
  /** German travel passport (Reisepass) */
  | 'DePassport'
  /** German driver license (Führerschein), front side */
  | 'DeDriverLicenseFront'
  /** German driver license (Führerschein), back side */
  | 'DeDriverLicenseBack';

export interface TextDataScannerConfiguration {
  /** A version of the configuration object */
  version?: string;

  /** The configuration object should be applied for this screen */
  screen?: string;

  /** 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;

  /** 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;

  /** Foreground color of the description label. */
  finderTextHintColor?: 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;

  /** 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 color of the highlight of the wordboxes founded on the frame */
  wordBoxHighlightColor?: string;

  /** If the wordboxes should be highlighted when were found on the frame */
  wordBoxHighlightEnabled?: boolean;

  /** Minimum number of accumulated frames that have equal result */
  minimumNumberOfRequiredFramesWithEqualRecognitionResult?: number;

  /** Maximum number of accumulated frames to inspect before actual result is returned */
  maximumNumberOfAccumulatedFrames?: number;

  /** Languages on which the recognition will be run. ISO 639-1 or RFC4646 for special languages that are not available for ISO 639-1 */
  supportedLanguages?: string[];

  /** The image will be downscaled to the given value during the processing. If the quality of the scanning is not enough, try to increase the limit. This variable affects the performance of the scanning process. Higher the size limit - better the quality, but the recognition is slower. 0 - do not rescale. */
  ocrResolutionLimit?: number;

  /** 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;

  /** Configuration for the scanned item */
  textDataScannerStep?: TextDataScannerStep;
}

/** Configuration for the scanned item */
export interface TextDataScannerStep {
  /** User guidance hint text. */
  guidanceText: string;

  /** Validation pattern to automatically validate recognized text. '?' = any character, '#' - any digit, all other characters represent themselves. An empty string or nil value will disable the validation pattern. */
  pattern: string;

  /** If set to TRUE pattern validation also validates successfully if only a part of the whole recognized text matches the the validation pattern. If set to FALSE, the whole text must match the validation pattern. Applies to pattern validation only. Defaults to FALSE. */
  shouldMatchSubstring: boolean;

  /** The cameras zoom level preferred for this step. The actual zoom might be different from the preferred one to avoid clipping of finder area and maintain its aspect ratio and height */
  preferredZoom: number;

  /** The cameras zoom level preferred for this step. The actual zoom might be different from the preferred one to avoid clipping of finder area and maintain its aspect ratio and height */
  aspectRatio: FinderAspectRatio;

  /** The preferred height of the finder for zoom scale 1.0 (unzoomed). The actual finder height might change to maintain aspect ratio and to not clip the screen. Defaults to 40 points. */
  unzoomedFinderHeight: number;

  /** A string (list) of accepted characters during text recognition. If empty or nil, all characters are accepted. Defaults to nil. */
  allowedSymbols: string;

  /** Recognition strategy for the text. */
  textFilterStrategy: TextFilterStrategy;

  /** Threshold used to pause the detection after significant movement occurred. -1 is default value. Default = 0 for textFilterStrategy='DOCUMENT' and 1000 for textFilterStrategy='LCD_DOT_MATRIX_DISPLAY' */
  significantShakeDelay: number;
}

/** Additional parameter for GenericTextRecognizer to set the type of the scanned object */
export type TextFilterStrategy =
  /** Generic document printed on a paper or a card */
  | 'Document'
  /** LCD display */
  | 'LcdDotMatrixDisplay';
export interface LicensePlateScannerConfiguration {
  /** A version of the configuration object */
  version?: string;

  /** The configuration object should be applied for this screen */
  screen?: string;

  /** 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;

  /** The style of the confirmation dialog. iOS Only. */
  confirmationDialogStyle?: DialogStyle;

  /** The style of the confirmation dialogs confirm button. iOS Only. */
  confirmationDialogConfirmButtonStyle?: DialogButtonStyle;

  /** The style of the confirmation dialogs retry button. iOS Only. */
  confirmationDialogRetryButtonStyle?: DialogButtonStyle;

  /** 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;

  /** User guidance text below the finder view */
  finderTextHint?: string;

  /** Foreground color of the description label. */
  finderTextHintColor?: string;

  /** The preferred heigth of the view finder. Defaults to 150.0. iOS Only. */
  finderPreferredHeight?: number;

  /** 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;

  /** 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;

  /** Minimum number of accumulated frames that have equal result */
  minNumberOfRequiredFramesWithEqualRecognitionResult?: number;

  /** Maximum number of accumulated frames to inspect before actual result is returned */
  maximumNumberOfAccumulatedFrames?: number;

  /** Controls whether buttons should use all capitals style, as defined by the Android Material Design. Defaults to TRUE. Android only. */
  useButtonsAllCaps?: boolean;

  /** Threshold used to pause the detection after significant movement occurred. -1 is default value. Default = 0 for textFilterStrategy='DOCUMENT' and 1000 for textFilterStrategy='LCD_DOT_MATRIX_DISPLAY'. Android only. */
  significantShakeDelay?: number;

  /** Detector mode, classic (OCR based) or ML (machine learning based) approach. */
  scanStrategy?: LicensePlateScanStrategy;

  /** The title of the confirmation dialog. */
  confirmationDialogTitle?: string;

  /** The message text of the confirmation dialog. */
  confirmationDialogMessage?: string;

  /** The title of the confirmation dialog retry button. */
  confirmationDialogConfirmButtonTitle?: string;

  /** The title of the confirmation dialog confirm button. */
  confirmationDialogRetryButtonTitle?: string;

  /** The accent color of buttons on a confirmation dialog. */
  confirmationDialogAccentColor?: string;

  /** Allows to set if the confirm button should be filled. Defaults to TRUE. */
  confirmationDialogConfirmButtonFilled?: boolean;

  /** Allows to set a text color of the filled button. See `confirmationDialogConfirmButtonFilled`. */
  confirmationDialogConfirmButtonFilledTextColor?: 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;
}

/** Detector mode, classic (OCR based) or ML (machine learning based) approach. */
export type LicensePlateScanStrategy =
  /** OCR based */
  | 'Classic'
  /** Machine learning based */
  | 'MlBased';
export interface MedicalCertificateRecognizerConfiguration {
  /** A version of the configuration object */
  version?: string;

  /** The configuration object should be applied for this screen */
  screen?: string;

  /** 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;

  /** 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;

  /** 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;

  /** 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;

  /** The background color of the user guidance hints. */
  userGuidanceBackgroundColor?: string;

  /** The text color of the user guidance hints. */
  userGuidanceTextColor?: string;

  /** Whether the user guidance label is hidden or not. iOS only. */
  userGuidanceHidden?: boolean;

  /** Whether sdk should run recognition of Patient Information block. */
  recognizePatientInfo?: boolean;

  /** Whether sdk should return cropped document image or not */
  returnCroppedDocumentImage?: boolean;

  /** The style of the dialog/alert in case of error. iOS only. */
  errorDialogStyle?: DialogStyle;

  /** Error dialog title */
  errorDialogTitle?: string;

  /** The accent color of buttons on a error dialog. iOS only. */
  errorDialogAccentColor?: string;

  /** Error dialog message */
  errorDialogMessage?: string;

  /** Error dialog ok button text. */
  errorDialogOkButton?: string;

  /** Allows to set if the confirm button should be filled. Android only. */
  errorDialogOkButtonFilled?: boolean;

  /** Allows to set a text color of the filled button. Android only. */
  errorDialogOkButtonFilledTextColor?: string;

  /** The style of the dialogs/alerts OK button in case of error. iOS only. */
  errorDialogButtonStyle?: DialogButtonStyle;

  /** Option to show or hide finder overlay */
  showFinderOverlay?: boolean;

  /** Configuration that helps to override default hint values */
  userGuidanceStrings?: MedicalCertificateUserGuidanceStrings;

  /** Preview mode of the camera. FILL_IN or FIT_IN. Default is FILL_IN. Android only */
  cameraPreviewMode?: CameraPreviewMode;

  /** Aspect ratio of the view finder (width \ height). Set to nil of no view finder should be displayed. iOS only. */
  finderAspectRatio?: FinderAspectRatio;

  /** Secondary aspect ratio of finder frame (width \ height). Set to nil if no secondary view finder should be displayed. iOS only. */
  finderSecondaryAspectRatio?: FinderAspectRatio;
}

/** Configuration for the hint values */
export interface MedicalCertificateUserGuidanceStrings {
  /** Text that is shown on camera open. */
  startScanning: string;

  /** Text text that is shown when the camera is seeking for the document on the visible area, shown after the first result from the detector. */
  scanning: string;

  /** Text text that is shown when energy saving is active. */
  energySaving: string;

  /** Text that is shown when the camera snaps the image. */
  capturing: string;

  /** Text that is shown when the detector tries to detect the document from the snapped image. */
  processing: string;

  /** Text that is shown when the detector is paused. iOS only. */
  paused: string;
}

/** Barcode document format */
export type BarcodeDocumentFormat =
  /** American Association of Motor Vehicle Administrators barcode document */
  | 'AAMVA'
  /** Boarding pass barcode document */
  | 'BOARDING_PASS'
  /** German medical plan barcode document */
  | 'DE_MEDICAL_PLAN'
  /** German medical certificate barcode document */
  | 'MEDICAL_CERTIFICATE'
  /** ID Card barcode document */
  | 'ID_CARD_PDF_417'
  /** SEPA barcode document */
  | 'SEPA'
  /** Swiss QR barcode document */
  | 'SWISS_QR'
  /** VCard barcode document */
  | 'VCARD'
  /** GS1 barcode document */
  | 'GS1';

/** Barcode document format */
export type BarcodeFormat =
  /** Aztec barcode type */
  | 'AZTEC'
  /** CODABAR barcode type */
  | 'CODABAR'
  /** CODE_25 barcode type */
  | 'CODE_25'
  /** CODE_39 barcode type */
  | 'CODE_39'
  /** CODE_93 barcode type */
  | 'CODE_93'
  /** CODE_128 barcode type */
  | 'CODE_128'
  /** DATA_MATRIX barcode type */
  | 'DATA_MATRIX'
  /** EAN_8 barcode type */
  | 'EAN_8'
  /** EAN_13 barcode type */
  | 'EAN_13'
  /** ITF barcode type */
  | 'ITF'
  /** PDF_417 barcode type */
  | 'PDF_417'
  /** QR_CODE barcode type */
  | 'QR_CODE'
  /** RSS_14 barcode type */
  | 'RSS_14'
  /** RSS_EXPANDED barcode type */
  | 'RSS_EXPANDED'
  /** UPC_A barcode type */
  | 'UPC_A'
  /** UPC_E barcode type */
  | 'UPC_E'
  /** Unknown barcode type */
  | 'UNKNOWN'
  /** MSI Plessey barcode type */
  | 'MSI_PLESSEY'
  /** IATA (2 of 5) barcode type */
  | 'IATA_2_OF_5'
  /** INDUSTRIAL (2 of 5) barcode type */
  | 'INDUSTRIAL_2_OF_5';

/** Camera module to use */
export type CameraModule =
  /** Front camera */
  | 'FRONT'
  /** Back camera */
  | 'BACK';

/** MSI plessey checksum algorithm */
export type MSIPlesseyChecksumAlgorithm =
  /** Not use checksum */
  | 'None'
  /** Mod10 checksum algorithm */
  | 'Mod10'
  /** Mod11IBM checksum algorithm */
  | 'Mod11IBM'
  /** Mod11NCR checksum algorithm */
  | 'Mod11NCR'
  /** Mod1010 checksum algorithm */
  | 'Mod1010'
  /** Mod1110IBM checksum algorithm */
  | 'Mod1110IBM'
  /** Mod1110NCR checksum algorithm */
  | 'Mod1110NCR';

/** Barcode scanner engine mode */
export type EngineMode =
  /** Recommended barcode scanning mode. Used by default */
  | 'NEXT_GEN'
  /** Legacy barcode scanning mode. */
  | 'LEGACY';

/** Applied interface orientation */
export type OrientationLockMode =
  /** Do not restrict interface orientation */
  | 'NONE'
  /** Portrait screen orientations only */
  | 'PORTRAIT'
  /** Landscape screen orientations only */
  | 'LANDSCAPE';

/** Finder aspect ratio */
export interface FinderAspectRatio {
  /** The width component of the aspect ratio. */
  width: number;

  /** The height component of the aspect ratio. */
  height: number;
}

/** Standard size object */
export interface Size {
  /** Width parameter */
  width: number;

  /** Height parameter */
  height: number;
}

/** The expected density of QR codes in an image. */
export type CodeDensity =
  /** Up to 6 QR codes per image. */
  | 'LOW'
  /** Up to 24 QR codes per image. */
  | 'HIGH';

/** Represents camera preview modes */
export type CameraPreviewMode =
  /** In this mode camera preview frames will be downscaled to the layout view size - full preview frame content will be visible, but unused edges could be appeared in the preview layout. */
  | 'FIT_IN'
  /** In this mode camera preview frames fill the layout view - the preview frames may contain additional content on the edges that was not visible in the preview layout. */
  | 'FILL_IN';

/** Defines the possible barcode image sources. */
export type BarcodeImageGenerationType =
  /** No barcode image generation. */
  | 'NONE'
  /** Generating barcode image from the last video frame. Faster, but has lower resolution. */
  | 'VIDEO_FRAME'
  /** Generating barcode image from separately captured frame. Higher resolution, but might have a slight delay. */
  | 'CAPTURED_IMAGE';

/** Barcode scanner engine mode */
export type BarcodeOverlayTextFormat =
  /** Show only barcode overlay frame. */
  | 'NONE'
  /** Show barcode value with extention. */
  | 'CODE'
  /** Show barcode value with barcode format. */
  | 'CODE_AND_TYPE';

/** Barcode Selection Overlay configuration */
export interface SelectionOverlayConfiguration {
  /** Whether the barcode selection overlay is enabled or not. */
  overlayEnabled: boolean;

  /** Define the way of how to show barcode data with selection overlay. */
  textFormat: BarcodeOverlayTextFormat;

  /** The color of the polygon in the selection overlay. */
  polygonColor: string;

  /** The color of the text in the selection overlay. */
  textColor: string;

  /** The color of the texts background in the selection overlay. */
  textContainerColor: string;

  /** The color of the polygon in the selection overlay, when highlighted. */
  highlightedPolygonColor: string;

  /** The color of the text in the selection overlay, when highlighted. */
  highlightedTextColor: string;

  /** The color of the texts background in the selection overlay, when highlighted. */
  highlightedTextContainerColor: string;
}

/** Confirmation Dialog configuration */
export interface ConfirmationDialogConfiguration {
  /** Defines, if the confirmation dialog should be displayed or not before returing the results to the delegate. Defaults to False. */
  resultWithConfirmationEnabled: boolean;

  /** The text format of the result dialog. Defaults to TYPE_AND_CODE. */
  dialogTextFormat: BarcodeDialogFormat;

  /** The style of the confirmation dialog. iOS only. */
  confirmationDialogStyle: DialogStyle;

  /** The title of the confirmation dialog confirm button. */
  confirmButtonTitle: string;

  /** The style of the confirmation dialogs confirm button. iOS only. */
  confirmationDialogConfirmButtonStyle: DialogButtonStyle;

  /** The title of the confirmation dialog retry button. */
  retryButtonTitle: string;

  /** The style of the confirmation dialogs retry button. iOS only. */
  confirmationDialogRetryButtonStyle: DialogButtonStyle;
}

/** The font name and size. iOS only. */
export interface Font {
  /** The font name. defaults to SYSTEM. */
  fontName: string;

  /** The font size. defaults 17.0 . */
  fontSize: number;
}

/** The blur effect style. iOS only. */
export type BlurEffect =
  /** The area of the view is lighter than the underlying view. */
  | 'EXTRA_LIGHT'
  /** The area of the view is the same approximate lightness of the underlying view. */
  | 'LIGHT'
  /** The area of the view is darker than the underlying view. */
  | 'DARK'
  /** A regular blur style that adapts to the user interface style. */
  | 'REGULAR'
  /** A blur style for making content more prominent that adapts to the user interface style. */
  | 'PROMINENT'
  /** An adaptable blur effect that creates the appearance of an ultra-thin material. iOS13+. */
  | 'SYSTEM_ULTRA_THIN_MATERIAL'
  /** An adaptable blur effect that creates the appearance of a thin material. iOS13+. */
  | 'SYSTEM_THIN_MATERIAL'
  /** An adaptable blur effect that create the appearance of a material with normal thickness. Defaults on iOS13 and more. iOS13+. */
  | 'SYSTEM_MATERIAL'
  /** An adaptable blur effect that creates the appearance of a material that's thicker than normal. iOS13+. */
  | 'SYSTEM_THICK_MATERIAL'
  /** An adaptable blur effect that creates the appearance of the system chrome. iOS13+. */
  | 'SYSTEM_CHROME_MATERIAL'
  /** A blur effect that creates the appearance of an ultra-thin material and is always light. iOS13+. */
  | 'SYSTEM_ULTRA_THIN_MATERIAL_LIGHT'
  /** A blur effect that creates the appearance of a thin material and is always light. iOS13+. */
  | 'SYSTEM_THIN_MATERIAL_LIGHT'
  /** A blur effect that creates the appearance of a material with normal thickness and is always light. iOS13+. */
  | 'SYSTEM_MATERIAL_LIGHT'
  /** A blur effect that creates the appearance of a material that’s thicker than normal and is always light. iOS13+. */
  | 'SYSTEM_THICK_MATERIAL_LIGHT'
  /** A blur effect that creates the appearance of the system chrome and is always light. iOS13+ */
  | 'SYSTEM_CHROME_MATERIAL_LIGHT'
  /** A blur effect that creates the appearance of an ultra-thin material and is always dark. iOS13+ */
  | 'SYSTEM_ULTRA_THIN_MATERIAL_DARK'
  /** A blur effect that creates the appearance of a thin material and is always dark. iOS13+ */
  | 'SYSTEM_THIN_MATERIAL_DARK'
  /** A blur effect that creates the appearance of a material with normal thickness and is always dark. iOS13+. */
  | 'SYSTEM_MATERIAL_DARK'
  /** A blur effect that creates the appearance of a material that’s thicker than normal and is always dark. iOS13+. */
  | 'SYSTEM_THICK_MATERIAL_DARK'
  /** A blur effect that creates the appearance of the system chrome and is always dark. iOS13+ */
  | 'SYSTEM_CHROME_MATERIAL_DARK';

/** Defines a range for zooming */
export interface ZoomRange {
  /** The minimum zoom scale. Defaults to 1.0. */
  minZoom: number;

  /** The maximum zoom scale. Defaults to 3.0. */
  maxZoom: number;
}

/** Configuration for the dialog/alert style */
export interface DialogStyle {
  /** The Color of the screen-covering backdrop view. */
  screenBackgroundColor: string;

  /** The general background color of the actual dialog view. */
  dialogBackgroundColor: string;

  /** The visual effect of the dialogs background. */
  dialogBackgroundEffect: BlurEffect;

  /** The corner radius of the dialog. */
  cornerRadius: number;

  /** The color of the dialogs title. */
  titleColor: string;

  /** The font of the dialogs title */
  titleFont: Font;

  /** The color of the dialogs message. */
  messageColor: string;

  /** The font of the dialogs message. */
  messageFont: Font;

  /** The color of the separators around the dialogs button area. */
  separatorColor: string;

  /** The width of the separators in points. */
  separatorWidth: number;
}

/** Configuration for the dialogs/alerts OK button style. */
export interface DialogButtonStyle {
  /** The font of the button title. */
  font: Font;

  /** The color of the buttons title while not pressed. */
  textColor: string;

  /** The color of the buttons title while pressed. */
  highlightedTextColor: string;

  /** The background color of the button while not pressed. */
  backgroundColor: string;

  /** The background color of the button while pressed. */
  highlightedBackgroundColor: string;
}

/** Mode for document detection. */
export type DocumentDetectorMode =
  /** Is the recommended mode, based on Machine Learning. Requires iOS 11.2+. */
  | 'ML_BASED'
  /** Legacy mode, based on classic Computer Vision algorithms. */
  | 'EDGE_BASED';

/** The barcode text format dialog. */
export type BarcodeDialogFormat =
  /** Show the barcode value only. */
  | 'CODE'
  /** Show the barcode format with value. */
  | 'TYPE_AND_CODE';
export interface ScanbotSdkConfiguration {
  /** A version of the configuration object */
  version?: string;

  /** The configuration object should be applied for this screen */
  screen?: string;

  /** Optional boolean flag to enable logging. See the "Logging" section below. */
  loggingEnabled?: boolean;

  /** Optional boolean flag that enables Scanbot SDK Core native logging (default is false, Android only). */
  enableNativeLogging?: boolean;

  /** Your license key for the Scanbot SDK. See the "License Key" section below. */
  licenseKey?: string;

  /** Optional image quality value. It defines the quality factor of JPEG images. The value must be between 1 and 100, where 100 means maximum quality and largest file size. The recommended default value is 80 which is a good compromise between image file size and document legibility. */
  storageImageQuality?: number;

  /** Optional image format, either 'JPG' or 'PNG'. The recommended default value is 'JPG'. Please note that 'PNG' will result in larger image files! Also, the storageImageQuality value does not apply for 'PNG'. */
  storageImageFormat?: StorageImageFormat;

  /** Optional directory as file URI to override the default storage base directory of the Scanbot SDK. Refer to the section "Storage" for more details. */
  storageBaseDirectory?: string;

  /** Optional mode for document detection. */
  documentDetectorMode?: DocumentDetectorMode;

  /** Optional file encryption mode, 'AES128' or 'AES256'. */
  fileEncryptionMode?: FileEncryptionMode;

  /** Optional file encryption password. Refer to the section "Storage Encryption" for more details. */
  fileEncryptionPassword?: string;

  /** If set to `true`, Camera X will be used for the RTU-UI components (Android only). Default is `false`. */
  useCameraX?: boolean;

  /** If set to `true`, GPU Acceleration will be enabled for Barcode Scanner, Document Scanner and Generic Document Recognizer (Android only). Default is `true`. */
  allowGpuAcceleration?: boolean;

  /** Enables/disables XNNPACK acceleration for TensorFlow ML models, which provides highly optimized implementations of floating-point neural network operators (Android only) */
  allowXnnpackAcceleration?: boolean;
}

/** Image format */
export type StorageImageFormat =
  /** JPG image format */
  | 'JPG'
  /** PNG image format */
  | 'PNG';

/** File encryption mode, 'AES128' or 'AES256'. */
export type FileEncryptionMode =
  /** AES128 encryption mode */
  | 'AES128'
  /** AES256 encryption mode */
  | 'AES256';
