react-native-scanbot-sdk
Version:
Scanbot Document and Barcode Scanner SDK React Native Plugin for Android and iOS
1,215 lines (993 loc) • 42.4 kB
text/typescript
import { DocumentDetectionStatus } from './document/DocumentDetectionStatus';
import { PageImageSource } from './document/PageImageSource';
import { ParametricFilter } from './document/ParametricFilters';
import { GenericDocument } from './documents/GenericDocument';
/** The Barcode Scanner Result Field */
export interface BarcodeResultField {
/** The recognized barcode type */
type: BarcodeFormat;
/** The recognized barcode text */
text: string;
/** The recognized barcode text with extension (if available) */
textWithExtension: string;
/** The array of raw bytes that compose the recognized barcode */
rawBytes: number[];
/** True if the Barcode Document has been parsed successfully */
parsedSuccessful: boolean;
/** The parsed known document format (if parsed successfully). */
formattedResult?: GenericDocument;
}
/** 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'
/** A check format commonly used in Israel */
| 'ISR'
/** A check format commonly used in the United Arab Emirates. */
| 'UAE'
/** A check format commonly used in Canada. */
| 'CAN';
/** Check Status */
export type CheckStatus =
/** The check recognition was successful */
| 'SUCCESS'
/** Check was recognized, but validation failed, indication a standard violation, non supported standard, or recognition error */
| 'VALIDATION_FAILED';
/** 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'
/** MICRO_QR_CODE barcode type */
| 'MICRO_QR_CODE'
/** DATABAR barcode type */
| 'DATABAR'
/** DATABAR_EXPANDED barcode type */
| 'DATABAR_EXPANDED'
/** UPC_A barcode type */
| 'UPC_A'
/** UPC_E barcode type */
| 'UPC_E'
/** 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'
/** USPS Intelligent Mail, a.k.a. USPS OneCode, USPS-STD-11 */
| 'USPS_INTELLIGENT_MAIL'
/** Royal Mail Four-State Customer Code, a.k.a. RM4SCC, CBC, BPO 4 State Code */
| 'ROYAL_MAIL'
/** Japan Post Four-State Barcode */
| 'JAPAN_POST'
/** Royal TNT Post Four-State Barcode, a.k.a. KIX, Klant IndeX */
| 'ROYAL_TNT_POST'
/** Australia Post Four-State Customer Code */
| 'AUSTRALIA_POST'
/** GS1 DataBar Limited */
| 'DATABAR_LIMITED'
/** GS1 DataBar Composite */
| 'GS1_COMPOSITE'
/** Micro pdf 417 */
| 'MICRO_PDF_417'
/** Maxicode */
| 'MAXI_CODE'
/** rMQR Code */
| 'RMQR_CODE'
/** Code 11 */
| 'CODE_11'
/** Code 32 */
| 'CODE_32';
/** A filter for extended EAN and UPC barcodes. */
export type BarcodesExtensionFilter =
/** EAN and UPC codes are not filtered. Both are returned regardless if they have an extension or not. */
| 'NO_FILTER'
/** Only EAN and UPC codes with extensions are returned. */
| 'ONLY_WITH_EXTENSIONS'
/** Only EAN and UPC codes without extensions are returned. */
| 'ONLY_WITHOUT_EXTENSIONS';
/** Camera module to use */
export type CameraModule =
/** Front camera */
| 'FRONT'
/** Back camera */
| 'BACK'
/** The back camera with the widest available lens. iOS only. */
| 'BACK_WIDEST';
/** MSI plessey checksum algorithm */
export type MSIPlesseyChecksumAlgorithm =
/** Not use checksum */
| 'NONE'
/** Mod10 checksum algorithm */
| 'MOD_10'
/** Mod11IBM checksum algorithm */
| 'MOD_11_IBM'
/** Mod11NCR checksum algorithm */
| 'MOD_11_NCR'
/** Mod1010 checksum algorithm */
| 'MOD_1010'
/** Mod1110IBM checksum algorithm */
| 'MOD_1110_IBM'
/** Mod1110NCR checksum algorithm */
| 'MOD_1110_NCR';
/** The customer format used in AUSTRALIA_POST codes. Only relevant for format codes 59 and 62. */
export type AustraliaPostCustomerFormat =
/** The numeric format. */
| 'NUMERIC'
/** The alphanumeric format. */
| 'ALPHA_NUMERIC';
/** 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 AspectRatio {
/** 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;
}
/** 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';
/** 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';
/** GS1 handling mode */
export type Gs1HandlingMode =
/** The (FNC1) character is simply stripped from the result in barcodes that implement this mode. Do not use. Will be removed in a future release. */
| 'NONE'
/** GS1 messages are converted to the machine-readable format per the GS1 spec (the special FNC1 character is converted to ASCII \x1D). The implied 01 AI key is prepended to DataBar results. No validation is performed. */
| 'PARSE'
/** Same as PARSE. Additionally, messages containing unknown AI keys, or containing values of incorrect format for known keys, are not returned. */
| 'VALIDATE_STRUCTURE'
/** Same as VALIDATE_STRUCTURE, except that GS1 strings are converted to the human-readable format, instead (with parentheses used to wrap AI keys, e.g. (01)123456789). The \x1D character is never used in this representation. */
| 'DECODE_STRUCTURE'
/** Full validation including linting and checksums. This is the most strict mode. */
| 'VALIDATE_FULL'
/** Same as DECODE_STRUCTURE, but with full validation. */
| 'DECODE_FULL';
/** Barcode Selection Overlay configuration */
export interface SelectionOverlayConfiguration {
/** Whether the barcode selection overlay is enabled or not. */
overlayEnabled: boolean;
/** Whether the barcode is selected automatically when being detected or not. */
automaticSelectionEnabled: 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 title of the confirmation dialog. */
dialogTitle: string;
/** The message text of the confirmation dialog. */
dialogMessage: string;
/** The accent color of buttons on a confirmation dialog. Android only. */
dialogButtonsAccentColor: string;
/** Allows to set if the confirm button should be filled. Defaults to TRUE. Android only. */
confirmButtonFilled: boolean;
/** Allows to set a text color of the filled button. See `confirmationDialogConfirmButtonFilled`. Android only. */
confirmButtonFilledTextColor: string;
}
/** 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 12.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';
/** The image filter types. */
export type ImageFilterType =
/** Passthrough filter. Does not alter the image. */
| 'NONE'
/** Optimizes colors, contrast and brightness. Usecase: photos. */
| 'COLOR'
/** Standard grayscale filter. Creates a grayscaled 8-bit image and optimizes contrast and dynamic range. */
| 'GRAYSCALE'
/** Standard binarization filter with contrast optimization. Creates a grayscaled 8-bit image with mostly black or white pixels. Usecase: Preparation for optical character recognition. */
| 'BINARIZED'
/** Fixes white-balance and cleans up the background. Usecase: images of paper documents. */
| 'COLOR_DOCUMENT'
/** 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. */
| 'PURE_BINARIZED'
/** Cleans up the background and tries to preserve photos within the image. Usecase: magazine pages, flyers. */
| 'BACKGROUND_CLEAN'
/** 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. */
| 'BLACK_AND_WHITE'
/** A filter for black and white conversion using OTSU binarization. */
| 'OTSU_BINARIZATION'
/** A filter for black and white conversion primary used for low-contrast documents. */
| 'DEEP_BINARIZATION'
/** A filter that enhances edges in low-contrast documents. */
| 'EDGE_HIGHLIGHT'
/** Binarization filter primary inteded to use on low-contrast documents with heavy shadows. */
| 'LOW_LIGHT_BINARIZATION'
/** Binarization filter primary intended to use on low-contrast documents with heavy shadows. */
| 'LOW_LIGHT_BINARIZATION_2'
/** Standard grayscale filter. Creates a grayscaled 8-bit image. */
| 'PURE_GRAY';
/** The prioritization 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. iOS only. */
| 'SPEED'
/** Balances capturing speed and image quality equally. This is the default value. */
| 'BALANCED'
/** 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. */
| 'QUALITY';
/** The page size of the pdf document. */
export type PageSize =
/** Letter page size. */
| 'LETTER'
/** Legal page size. */
| 'LEGAL'
/** A3 page size. */
| 'A3'
/** A4 page size. */
| 'A4'
/** A5 page size. */
| 'A5'
/** B4 page size. */
| 'B4'
/** B5 page size. */
| 'B5'
/** Executive page size. */
| 'EXECUTIVE'
/** US4x6 page size. */
| 'US4x6'
/** US4x8 page size. */
| 'US4x8'
/** US5x7 page size. */
| 'US5x7'
/** COMM10 page size. */
| 'COMM10'
/** Custom page size. From the Image. */
| 'CUSTOM';
/** The page orientation of the pdf document. */
export type PageDirection =
/** Portrait page orientation. */
| 'PORTRAIT'
/** Landscape page orientation. */
| 'LANDSCAPE'
/** Taken from the original image */
| 'AUTO';
/** The page orientation of the pdf document. */
export type OcrEngine =
/** Slow but powerful OCR engine. Supports non-Latin languages. */
| 'TESSERACT'
/** Fast and accurate OCR engine. Supports only Latin languages. */
| 'SCANBOT_OCR';
/**
* SDK Page
*
* @deprecated
*/
export interface Page {
/** A string identifying the page in the internal page file storage */
pageId: string;
/** The page's cropping polygon as calculated by a document detection operation or as set by the cropping UI. Modifying the polygon will change the polygon as shown in the cropping UI but will not automatically re-crop the original image */
polygon: PolygonPoint[];
/** The document detection result status for the operation that produced the page */
detectionResult: DocumentDetectionStatus;
/** The image source */
pageImageSource: PageImageSource;
/** The Image Filter that was applied on the page image. @deprecated Use **parametricFilters** instead. */
filter: ImageFilterType;
/** The Image Filters that are applied on the page image */
parametricFilters?: ParametricFilter[];
/** The value that was set for `documentImageSizeLimit`, which limits the maximum size of the document image. */
documentImageSizeLimit?: Size;
/** File URI of the original image */
originalImageFileUri: string;
/** File URI of the cropped document image (if document detection was successful) */
documentImageFileUri?: string;
/** File URI of a screen-sized preview of the original image */
originalPreviewImageFileUri: string;
/** File URI of a screen-sized preview of the document image (if document detection was successful) */
documentPreviewImageFileUri?: string;
}
/** The SDK license status */
export type LicenseStatus =
/** License is valid and accepted. */
| 'Okay'
/** No license set yet. The SDK is in trial mode. */
| 'Trial'
/** No license set yet. The SDKs trial mode is over. */
| 'Expired'
/** No license active. The set license does not cover the current operating system. */
| 'WrongOS'
/** No license active. The set license was unreadable or has an invalid format. */
| 'Corrupted'
/** No license active. The set licenses does not cover the current apps bundle identifier. */
| 'AppIDMismatch'
/** No license set yet. The SDKs trial mode is over. */
| 'NotSet';
/** Polygon Point */
export interface PolygonPoint {
/** Polygon point X */
x: number;
/** Polygon point Y */
y: number;
}
/** Result of applyImageFiltersOnPage */
export interface ApplyImageFiltersOnPageResult extends Page {}
/** Result of createPage */
export interface CreatePageResult extends Page {}
/** Result of detectDocumentOnPage */
export interface DetectDocumentOnPageResult extends Page {}
/** Result of rotatePage */
export interface RotatePageResult extends Page {}
/** Result of setDocumentImage */
export interface SetDocumentImageResult extends Page {}
/** Cropping screen accessibility configuration */
export interface CroppingAccessibilityConfiguration {
/** Text, that is used as an accessibility label for the cancel button */
cancelButtonAccessibilityLabel: string;
/** Text 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 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;
}
/** 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 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;
}
/** Health Insurance Card Field Type */
export type HealthInsuranceCardFieldType =
/** SURNAME */
| 'SURNAME'
/** GIVEN_NAME */
| 'GIVEN_NAME'
/** DATE_OF_BIRTH */
| 'DATE_OF_BIRTH'
/** PERSONAL_IDENTIFICATION_NUMBER */
| 'PERSONAL_IDENTIFICATION_NUMBER'
/** INSTITUTION_NUMBER */
| 'INSTITUTION_NUMBER'
/** INSTITUTION_NAME */
| 'INSTITUTION_NAME'
/** CARD_NUMBER */
| 'CARD_NUMBER'
/** CARD_EXPIRATION_DATE */
| 'CARD_EXPIRATION_DATE'
/** COUNTRY */
| 'COUNTRY';
/** The Health Insurance Card field */
export interface HealthInsuranceCardField {
/** Health Insurance Card Field Type */
type: HealthInsuranceCardFieldType;
/** Health Insurance Card Field Recognized Text */
value: string;
/** Confidence in result accuracy. The value ranges from 0 to 100, higher is better. */
confidence: number;
}
/** The Health Insurance Card detection status. */
export type HealthInsuranceCardDetectionStatus =
/** Detection successful. The fields array is filled with all of the extracted data. All validatable fields have passed validation. */
| 'SUCCESS'
/** No document found or the document doesn't look like the back of an Health Insurance Card. */
| 'FAILED_DETECTION'
/** A potential Health Insurance Card was found but one or more fields failed validation. */
| 'INCOMPLETE_VALIDATION';
/** The live detection configuration parameters. */
export interface HealthInsuranceCardRecognizerParameters {
/** List of allowed countries for the health insurance card recognizer. */
acceptedCountries: HealthInsuranceCardCountryType[];
/** Minimum of birth-year. */
minBirthYear: number;
/** Maximum of birth-year. */
maxBirthYear: number;
/** Minimum of card-expiration-year. */
minExpirationYear: number;
/** Maximum ranges of card-expiration-year. */
maxExpirationYear: number;
/** Maximum number of attempts before giving up on country detection. */
maxCountryDetectionAttempts: number;
/** Maximum number of partial frame results to keep in cache while waiting to gather `minEqualFrameCount` equal results. */
maxAccumulatedFrameCount: number;
/** Minimum number of accumulated frames that should have equal result for a field. */
minEqualFrameCount: number;
}
/** The country types to be used in the acceptedCountries. */
export type HealthInsuranceCardCountryType =
/** The country named Austria. */
| 'AUSTRIA'
/** The country named Belgium. */
| 'BELGIUM'
/** The country named Bulgaria. */
| 'BULGARIA'
/** The country named Croatia. */
| 'CROATIA'
/** The country named Cyprus. */
| 'CYPRUS'
/** The country named Czech Republic. */
| 'CZECH_REPUBLIC'
/** The country named Denmark. */
| 'DENMARK'
/** The country named Estonia. */
| 'ESTONIA'
/** The country named Finland. */
| 'FINLAND'
/** The country named France. */
| 'FRANCE'
/** The country named Germany. */
| 'GERMANY'
/** The country named Greece. */
| 'GREECE'
/** The country named Hungary. */
| 'HUNGARY'
/** The country named Ireland. */
| 'IRELAND'
/** The country named Italy. */
| 'ITALY'
/** The country named Latvia. */
| 'LATVIA'
/** The country named Lithuania. */
| 'LITHUANIA'
/** The country named Luxembourg. */
| 'LUXEMBOURG'
/** The country named Malta. */
| 'MALTA'
/** The country named Netherlands. */
| 'NETHERLANDS'
/** The country named Poland. */
| 'POLAND'
/** The country named Portugal. */
| 'PORTUGAL'
/** The country named Romania. */
| 'ROMANIA'
/** The country named Slovakia. */
| 'SLOVAKIA'
/** The country named Slovenia. */
| 'SLOVENIA'
/** The country named Spain. */
| 'SPAIN'
/** The country named Sweden. */
| 'SWEDEN'
/** The country named Switzerland. */
| 'SWITZERLAND';
/** Finder Document scanner accessibility configuration */
export interface FinderDocumentScannerAccessibilityConfiguration {
/** Text used as an accessibility label for the flash button. */
flashButtonAccessibilityLabel: string;
/** Text used as an accessibility hint for the flash button. */
flashButtonAccessibilityHint: string;
/** Text used as an accessibility label for the cancel button. */
cancelButtonAccessibilityLabel: string;
/** Text used as an accessibility hint for the cancel button. */
cancelButtonAccessibilityHint: string;
/** Text used as an accessibility label for the shutter button. */
shutterButtonAccessibilityLabel: string;
/** Text used as an accessibility hint for the shutter button. */
shutterButtonAccessibilityHint: string;
}
/** 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 */
| 'VISIBLE_IF_NOT_EMPTY'
/** Field will be shown in the RTU UI */
| 'ALWAYS_VISIBLE';
/** Supported document types */
export type GenericDocumentType =
/** German ID card, front side */
| 'DE_ID_CARD_FRONT'
/** German ID card, back side */
| 'DE_ID_CARD_BACK'
/** German travel passport (Reisepass) */
| 'DE_PASSPORT'
/** German driver license (Führerschein), front side */
| 'DE_DRIVER_LICENSE_FRONT'
/** German driver license (Führerschein), back side */
| 'DE_DRIVER_LICENSE_BACK'
/** German Residence Permit (Aufenthaltstitel), front side */
| 'DE_RESIDENCE_PERMIT_FRONT'
/** German Residence Permit (Aufenthaltstitel), back side */
| 'DE_RESIDENCE_PERMIT_BACK'
/** German health insurance card, front side */
| 'DE_HEALTH_INSURANCE_CARD_FRONT'
/** European health insurance card */
| 'EU_HEALTH_INSURANCE_CARD';
/** Detector mode, classic (OCR based) or ML (machine learning based) approach. */
export type LicensePlateScanStrategy =
/** OCR based */
| 'CLASSIC'
/** Machine learning based */
| 'ML_BASED';
/** 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;
}
/** The Medical Certificate Form Type */
export type MedicalCertificateFormType =
/** Medical Certificate Form Type 1A */
| '1A'
/** Medical Certificate Form Type 1B */
| '1B'
/** Medical Certificate Form Type 1C */
| '1C'
/** Medical Certificate Form Type 1D */
| '1D'
/** Medical Certificate Form Type 21A */
| '21A'
/** Medical Certificate Form Type 1B_CUSTOM */
| '1B_CUSTOM'
/** Unknown Medical Certificate Form Type */
| 'UNKNOWN';
/** The Medical Certificate Patient Data Info Field */
export interface MedicalCertificatePatientDataInfoField {
/** Value of the recognized text */
value: string;
/** Confidence in the accuracy of the recognition (from 0 to 100) */
recognitionConfidence: number;
}
/** The Medical Certificate Patient Data Info */
export interface MedicalCertificatePatientDataInfo {
/** The health insurance provider. */
insuranceProvider?: MedicalCertificatePatientDataInfoField;
/** The patients first name. */
firstName?: MedicalCertificatePatientDataInfoField;
/** The patients last name. */
lastName?: MedicalCertificatePatientDataInfoField;
/** The patients address 1. */
address1?: MedicalCertificatePatientDataInfoField;
/** The patients address 2. */
address2?: MedicalCertificatePatientDataInfoField;
/** The patients diagnose. */
diagnose?: MedicalCertificatePatientDataInfoField;
/** The patients health insurance number. */
healthInsuranceNumber?: MedicalCertificatePatientDataInfoField;
/** The patients person number. */
insuredPersonNumber?: MedicalCertificatePatientDataInfoField;
/** The patients status. */
status?: MedicalCertificatePatientDataInfoField;
/** The place of operation number. */
placeOfOperationNumber?: MedicalCertificatePatientDataInfoField;
/** The doctors number. */
doctorNumber?: MedicalCertificatePatientDataInfoField;
/** An undefined field, that was recognized still. */
unknown?: MedicalCertificatePatientDataInfoField;
}
/** The Medical Certificate Dates Info */
export interface MedicalCertificateDatesInfo {
/** The date since when the employee is incapable of work. */
incapableOfWorkSince?: MedicalCertificateDateField;
/** The date until when the employee is incapable of work. */
incapableOfWorkUntil?: MedicalCertificateDateField;
/** The date of the day of diagnosis. */
diagnosedOn?: MedicalCertificateDateField;
/** The date since when the child needs care. */
childNeedsCareFrom?: MedicalCertificateDateField;
/** The date until the childs needs care. */
childNeedsCareUntil?: MedicalCertificateDateField;
/** Patient birth date. */
birthDate?: MedicalCertificateDateField;
/** Document date. */
documentDate?: MedicalCertificateDateField;
/** An unclassified date, which was recognized still */
unknown?: MedicalCertificateDateField;
}
/** Medical Certificate Date Field */
export interface MedicalCertificateDateField {
/** The confidence in the recognition of the date (from 0 to 100) */
recognitionConfidence: number;
/** The recognized date text */
dateString: string;
}
/** The Medical Certificate Checkboxes Info */
export interface MedicalCertificateCheckboxesInfo {
/** The checkbox states if the certificate is an initial certificate. */
initialCertificate?: MedicalCertificateCheckboxField;
/** The checkbox states if the certificate is a renewed certificate. */
renewedCertificate?: MedicalCertificateCheckboxField;
/** The checkbox states if the certificate is about a work accident. */
workAccident?: MedicalCertificateCheckboxField;
/** The checkbox states if the certificate is assigned to an accident insurance doctor. */
assignedToAccidentInsuranceDoctor?: MedicalCertificateCheckboxField;
/** The checkbox states if the certificate is about an accident checked yes. */
accidentYes?: MedicalCertificateCheckboxField;
/** The checkbox states if the certificate is about an accident checked no. */
accidentNo?: MedicalCertificateCheckboxField;
/** The checkbox states if ill child requires care checked yes. */
requiresCareYes?: MedicalCertificateCheckboxField;
/** The checkbox states if ill child requires care checked no. */
requiresCareNo?: MedicalCertificateCheckboxField;
/** The checkbox states if the insurance company has to pay for treatment. */
insuredPayCase?: MedicalCertificateCheckboxField;
/** The checkbox states if the certificate is final. */
finalCertificate?: MedicalCertificateCheckboxField;
/** The checkbox states if the certificate is assigned to an other accident */
otherAccident?: MedicalCertificateCheckboxField;
/** The checkbox that indicates if entitlementToContinuedPaymentYes is checked */
entitlementToContinuedPaymentYes?: MedicalCertificateCheckboxField;
/** The checkbox that indicates if entitlementToContinuedPaymentNo is checked */
entitlementToContinuedPaymentNo?: MedicalCertificateCheckboxField;
/** The checkbox that indicates if sickPayWasClaimedNo is checked */
sickPayWasClaimedNo?: MedicalCertificateCheckboxField;
/** The checkbox that indicates if sickPayWasClaimedYes is checked */
sickPayWasClaimedYes?: MedicalCertificateCheckboxField;
/** The checkbox that indicates if singleParentNo is checked */
singleParentNo?: MedicalCertificateCheckboxField;
/** The checkbox that indicates if singleParentYes is checked */
singleParentYes?: MedicalCertificateCheckboxField;
/** The checkbox could not be classified, but it was recognized still */
unknown?: MedicalCertificateCheckboxField;
}
/** The Medical Certificate Checkbox Field */
export interface MedicalCertificateCheckboxField {
/** true if the checkbox is checked, false otherwise */
isChecked: boolean;
/** Confidence in the accuracy of the recognition (from 0 to 100) */
confidence: number;
}
/** The bounding box of the receiver in absolute image coordinate system */
export interface OCRBoundingBox {
/** x */
x: number;
/** y */
y: number;
/** width */
width: number;
/** height */
height: number;
}
/** Represents the results of an optical character recognition (OCR) operation */
export interface OCRResultBlock {
/** The recognized text within the receivers bounding box */
text: string;
/** Ranges from 0.0 (not confident) to 100.0 (very confident). */
confidence: number;
/** The bounding box of the receiver in absolute image coordinate system */
boundingBox: OCRBoundingBox;
}
/** Represents the results of an optical character recognition (OCR) operation */
export interface OCRPage {
/** The recognized text of the page */
text: string;
/** The paragraph blocks of the page */
paragraphs: OCRResultBlock[];
/** The line blocks of the page */
lines: OCRResultBlock[];
/** The word blocks of the page */
words: OCRResultBlock[];
}
/** Enumerated result status of the recognition */
export type RecognitionStatus =
/** Document was found, cropped, all the fields found and their data was recognized */
| 'SUCCESS'
/** Nothing was found */
| 'ERROR_NOTHING_FOUND'
/** Document cannot be cropped in a good way (e.g. not fully visible to viewport, partially covered etc) */
| 'ERROR_BAD_CROP'
/** A document was detected, but it was not recognized as a supported document */
| 'ERROR_UNKNOWN_DOCUMENT'
/** A document was detected as a supported document, but it was not part of the accepted documents */
| 'ERROR_UNACCEPTABLE_DOCUMENT'
/** All fields were recognized, but some of them failed validation */
| 'INCOMPLETE_VALIDATION';
/** MRZ Document Type */
export type MRZDocumentTypes =
/** The document is a passport. */
| 'PASSPORT'
/** The document is a crew member certificate. */
| 'CREW_MEMBER_CERTIFICATE'
/** The document is a visa. */
| 'VISA'
/** The document is an ID card. */
| 'ID_CARD'
/** The document is a Swiss driver license. */
| 'SWISS_DRIVER_LICENSE'
/** The document type is unknown */
| 'UNDEFINED';
/** 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';
/** 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: AspectRatio;
/** 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;
/** Threshold used to pause the detection after significant movement occurred. Default = 0 */
significantShakeDelay: number;
}
/** The Text Data Recognition Result */
export interface TextDataRecognitionResult {
/** The recognized text */
text: string;
/** Confidence in the accuracy of the recognition (from 0 to 100) */
confidence: number;
}