@microblink/blinkid-react-native
Version:
A small and powerful ID card scanning library. Powered by Microblink (www.microblink.com).
1,751 lines (1,750 loc) • 88.4 kB
TypeScript
/**
* ClassFilter represents the document filter used to determine which documents will be processed.
* Document information (Country, Region, Type) is evaluated with the content set in the filter, and their inclusion or exclusion depends on the defined rules.
* To set the document information, use {@link DocumentFilter}.
* The recognition results of the excluded documents will not be returned.
* If using the standard BlinkID UX, an alert will be displayed that the document will not be scanned.
*
* By default, the ClassFilter is turned off, and all documents will be included.
*/
export declare class ClassFilter {
/**
* Document classes that will be explicitly accepted by this filter.
* Only documents belonging to the specified classes will be processed. All other documents will be rejected.
*
* If this list is empty, no restrictions are applied, and documents will be accepted unless explicitly excluded by `excludeDocuments`.
*
* Example usage:
*
* ```
* final classFilter = ClassFilter();
* classFilter.includeDocuments = [
* DocumentFilter.country(Country.Usa),
* DocumentFilter.countryType(Country.Croatia, DocumentType.Id),
* ];
*
*
* ```
*
*
* NOTE: from the example above, the class filter is set to only accept all documents from USA, and Croatian IDs.
* All other documents will be rejected.
*
* Rules can be combined, for example, to set all three properties (Country Region, Type), two (e.g., Country and Type) or just one (e.g, Region).
*
* See {@link DocumentFilter} for setting the combinations.
*/
includeDocuments?: DocumentFilter[];
/**
* Document classes that will be explicitly rejected by this filter.
* Documents belonging to the specified classes will not be processed. Other documents, not included with `excludeDocuments` will be accepted.
*
* If this array is empty, no restrictions are applied, and documents will be excluded only if not present in `includeDocuments`.
*
* Example usage:
*
* ```
* final classFilter = ClassFilter();
* classFilter.excludeDocuments = [
* DocumentFilter.country(Country.Usa),
* DocumentFilter.countryType(Country.Croatia, DocumentType.Id),
* ];
*
*
* ```
*
* NOTE: from the example above, the class filter is set to only exclude all documents from USA, and Croatian IDs.
* All other classes will be accepted.
*
* Rules can be combined, for example, to set all three properties (Country Region, Type), two (e.g., Country and Type) or just one (e.g, Region).
*
* See {@link DocumentFilter} for setting the combinations.
*/
excludeDocuments?: DocumentFilter[];
/**
*
* @param includeDocuments - specifies which document classes that will be explicitly accepted by this filter.
* @param excludeDocuments - specifies which document classes that will be explicitly rejected by this filter.
*/
constructor(includeDocuments?: DocumentFilter[], excludeDocuments?: DocumentFilter[]);
}
/**
* Represents the document filter.
*
* Used with other classes like the {@link ClassFilter}, {@link DocumentRules} and the {@link DocumentAnonymizationSettings}.
*/
export declare class DocumentFilter {
/**
* If set, only specified country will pass the filter criteria.
* Otherwise, issuing country will not betaken into account.
*/
country?: Country;
/**
* If set, only specified country will pass the filter criteria.
* Otherwise, issuing region will not be taken into account.
*/
region?: Region;
/**
* If set, only specified type will pass the filter criteria.
* Otherwise, issuing type will not be taken into account.
*/
documentType?: DocumentType;
/**
*
* @param country - specifies the {@link Country} that will pass the filter criteria.
*
* @param region - specifies the {@link Region} that will pass the filter criteria.
*
* @param documentType - specifies the {@link DocumentType} that will pass the filter criteria.
*
*
* All parameters are optional, and do not need to be added.
* The filter can be set to be more generic (for example, to only accept document from USA):
* ```
* DocumentFilter(Country.Usa);
* ```
* or, it can be set to be more specific (for example, to specifically accept USA drivers licenses from California):
* ```
* DocumentFilter(Country.Usa, Region.California, DocumentType.Dl);
* ```
*/
constructor(country?: Country, region?: Region, documentType?: DocumentType);
}
/**
* Represents the custom document rules.
*
* This setting allows users to narrow down our internal rules on mandatory fields. All undefined fields will become optional.
* It is not possible to mark fields as mandatory if they cannot theoretically appear on the document.
* The more detailed document filter will have priority over the other.
*
* Document fields are validated using internal rules that define mandatory fields for the scanned document class.
*/
export declare class DocumentRules {
/**
* Specified fields will overrule our document class field rules if filter conditions are met.
*
* See {@link DocumentFilter} for more information.
*/
documentFilter?: DocumentFilter;
/**
* Fields to overrule our class field rules.
*
* See {@link DetailedFieldType} for more information.
*/
fields: DetailedFieldType[];
/**
* Represents the custom document rules.
*
* This setting allows users to narrow down our internal rules on mandatory fields. All undefined fields will become optional.
* It is not possible to mark fields as mandatory if they cannot theoretically appear on the document.
* The more detailed document filter will have priority over the other.
*
* Document fields are validated using internal rules that define mandatory fields for the scanned document class.
* Defines custom rules for specific document class.
*
* When defining {@link DocumentRules}, the {@link DocumentFilter} paramter is optionally set to specify the document to which the rule applies, and a `fields` with
* the appropriate `alphabetType` should be specified as mandatory for that document.
* If a `fields` is set to a field that is optional for that document or does not exist on it, all fields on the document become optional.
* If a `fields` is set to a field with an incorrect alphabetType, all fields on the document become optional.
* If a `fields` is set to a field that doesn’t exist in the internal rules, that rule is ignored.
* When adding multiple `fields`, any field that does not match our rules is ignored. Only fields that comply with our rules are set as mandatory.
* If the documentFilter fields `country`, `region`, or `type` are set to `null`, all supported values for those fields will be considered.
* For example, if `country = null`, the rule will apply to all supported countries in BlinkID.
*
* @param fields - specifies the list of {@link DetailedFieldType} for overruling our class field rules.
* This parameter is mandatory.
* @param documentFilter - specifies the {@link DocumentFilter} to specify the document to which the rule applies.
* This parameter is optional.
*/
constructor(fields: DetailedFieldType[], documentFilter?: DocumentFilter);
}
/**
* Represents the detailed field type.
*
*/
export declare class DetailedFieldType {
/**
* The field type.
*
* See {@link FieldType} for more information.
*/
fieldType: FieldType;
/**
* The alphabet type.
*
* See {@link AlphabetType} for more information.
*/
alphabetType: AlphabetType;
/**
*
* @param fieldType - specifies the {@link FieldType}.
* @param alphabetType - specifies the {@link AlphabetType}.
*
* Both parameters are mandatory.
*/
constructor(fieldType: FieldType, alphabetType: AlphabetType);
}
/**
* Represents the document anonymization settings.
*
*/
export declare class DocumentAnonymizationSettings {
/**
* Document fields that will be anonymized.
*
*/
fields: FieldType[];
/**
* Specified fields will be anonymized if filter conditions are met.
*
*/
documentFilter?: DocumentFilter;
/**
* Document number anonymization settings.
*
*/
documentNumberAnonymizationSettings?: DocumentNumberAnonymizationSettings;
/**
*
* @param fields - specifies the document fields that will be anonymized. This parameter is mandatory.
*
* @param documentFilter - specifies the document filter.
*
* If the conditions of the filter are met, fields of those documents will be anonymized.
* This parameter is mandatory.
* @param documentNumberAnonymizationSettings - specifies the document number anonymization settings.
*
* If this parameter is set, it will anonymize the document number, even if the document number is not set in the `fields` parameter.
* If the default constructor for {@link DocumentNumberAnonymizationSettings} is used, all of the digits within the document number will be anonymized.
*
* This parameter is optional.
*/
constructor(fields: FieldType[], documentFilter?: DocumentFilter, documentNumberAnonymizationSettings?: DocumentNumberAnonymizationSettings);
}
/**
* Represents the document number anonymization settings.
*
* Both settings, `prefixDigitsVisible` and `suffixDigitsVisible`, can be modified and set.
*
* By default, `prefixDigitsVisible` and `suffixDigitsVisible` are set to 0.
* This results that no digits within the document number will be visible.
*
* If any parameter is `undefined`, the value of the parameter will be set to `0`.
*/
export declare class DocumentNumberAnonymizationSettings {
/**
* Defines how many digits at the beginning of the document number remain visible after anonymization.
*
*/
prefixDigitsVisible?: number;
/**
* Defines how many digits at the end of the document number remain visible after anonymization.
*
*/
suffixDigitsVisible?: number;
constructor(prefixDigitsVisible?: number, suffixDigitsVisible?: number);
}
/**
* Represents the configuration used to enable/disable recognition of specific
* document groups.
*
* By default all modes are enabled.
*/
export declare class RecognitionModeFilter {
/**
* Enable scanning of MRZ IDs.
*
*/
enableMrzId: boolean;
/**
* Enable scanning of visa MRZ.
*
*/
enableMrzVisa: boolean;
/**
* Enable scanning of Passport MRZ.
*
*/
enableMrzPassport: boolean;
/**
* Enable scanning of Photo ID.
*
*/
enablePhotoId: boolean;
/**
* Enable scanning of barcode IDs.
*
*/
enableBarcodeId: boolean;
/**
* Enable full document recognition.
*
*/
enableFullDocumentRecognition: boolean;
constructor();
}
/**
* Represents the document class information.
*
*/
export declare class DocumentClassInfo {
/**
* The document country.
*
* See {@link Country} for more information.
*/
country?: Country;
/**
* The document region.
*
* See {@link Region} for more information.
*/
region?: Region;
/**
* The type of the scanned document.
*
* See {@link DocumentType} for more information.
*/
documentType?: DocumentType;
/**
* Flag that indicates if the document class information is empty
*
*/
empty?: boolean;
/**
* The name of the country that issued the scanned document.
*
*/
countryName?: string;
/**
* The ISO numeric code of the country that issued the scanned document.
*
*/
isoNumericCountryCode?: string;
/**
* The 2 letter ISO code of the country that issued the scanned document.
*
*/
isoAlpha2CountryCode?: string;
/**
* The 3 letter ISO code of the country that issued the scanned document.
*
*/
isoAlpha3CountryCode?: string;
/**
*
* @param nativeDocumentClassInfo
*
*/
constructor(nativeDocumentClassInfo: any);
}
/**
* Represents the result of the data match.
*
*/
export declare class DataMatchResult {
/**
* The state of the data match on the whole document.
*
* See {@link DataMatchState} for more information.
*/
overallState?: DataMatchState;
/**
* The data match state of each field.
*
* See {@link DataMatchResultField} for more information.
*/
states?: DataMatchResultField[];
/**
*
* @param nativeDataMatchResult
*/
constructor(nativeDataMatchResult: any);
}
/**
* Represents the state of the field in the data match.
*
*/
export declare class DataMatchResultField {
/**
* The type of the field.
*
* See {@link DataMatchField} for more information.
*/
field?: DataMatchField;
/**
* The state of the field.
*
* See {@link DataMatchState} for more information.
*/
state?: DataMatchState;
/**
*
* @param nativeDataMatchResultField
*
*/
constructor(nativeDataMatchResultField: any);
}
/**
* Represents the multi-alphabet string result extracted from the OCR.
*
* The result contains the extracted strings, their locations, and the sides of the extracted strings.
*
*/
export declare class StringResult {
/**
* All strings separated by new line
*
*/
value?: string;
/**
* String for field in latin alphabet
*
*/
latin?: string;
/**
* String for field in arabic alphabet
*
*/
arabic?: string;
/**
* String for field in cyrillic alphabet
*
*/
cyrillic?: string;
/**
* String for field in greek alphabet
*
*/
greek?: string;
/**
* Document field location.
*
* See {@link Location} for more information.
*/
location?: Location;
/**
* The document side where the field is located.
*
* See {@link Side} for more information.
*/
side?: Side;
/**
*
* @param nativeStringResult
*
*/
constructor(nativeStringResult: any);
}
/**
* Represents the rectangle location of each document field
*
*/
export declare class Rectangle {
/**
* X location
*
*/
x?: number;
/**
* Y location
*
*/
y?: number;
/**
* Rectangle width
*
*/
width?: number;
/**
* Rectangle height.
*
*/
height?: number;
/**
*
* @param nativeRectangle
*
*/
constructor(nativeRectangle: any);
}
/**
* Represents the information about the location of an element within a document or image.
*
*/
export declare class Location {
/**
* Rectangle location of the result extracted from the OCR in the latin alphabet.
*
*/
latin?: Rectangle;
/**
* Rectangle location of the result extracted from the OCR in the arabic alphabet.
*
*/
arabic?: Rectangle;
/**
* Rectangle location of the result extracted from the OCR in the cyrillic alphabet.
*
*/
cyrillic?: Rectangle;
/**
* Rectangle location of the result extracted from the OCR in the greek alphabet.
*
*/
greek?: Rectangle;
/**
*
* @param nativeLocation
*
*/
constructor(nativeLocation: any);
}
/**
* Side of the document on which the specific result is located.
*
*/
export declare class Side {
/**
* Document side of the result extracted from the OCR in the latin alphabet.
*
*/
latin?: DocumentSide;
/**
* Document side of the result extracted from the OCR in the arabic alphabet.
*
*/
arabic?: DocumentSide;
/**
* Document side of the result extracted from the OCR in the cyrillic alphabet.
*
*/
cyrillic?: DocumentSide;
/**
* Document side of the result extracted from the OCR in the cyrillic alphabet.
*
*/
greek?: DocumentSide;
/**
*
* @param nativeSide
*
*/
constructor(nativeSide: any);
}
/**
* Represents the result of the date extraction.
*
* Contains the extracted date, along with additional date information.
*/
export declare class DateResult<T> {
/**
* The extracted date information.
*
* See {@link Date} for more information.
*/
date?: Date;
/**
* Original string representation of the date which has been extracted.
*
* Depending of the information source, it can either be of type {@link StringResult} or `string`.
*/
originalString?: T;
/**
* Indicates that date does not appear on the document
* but is filled by our internal domain knowledge.
*/
isFilledByDomainKnowledge?: boolean;
/**
* Indicates whether date was successfully parsed.
*
*/
successfullyParsed?: boolean;
constructor(nativeDateResult: any);
}
/**
* Represents the extracted date.
*
*/
export declare class Date {
/**
* Day of the month.
*
* The first day of the month has value 1.
*/
day?: number;
/**
* Month of the year.
*
* The first month of the year has value 1.
*/
month?: number;
/**
* Full year.
*
*/
year?: number;
/**
*
* @param nativeDate
*/
constructor(nativeDate: any);
}
/**
* Represents detailed extracted information about the driver license.
*
*/
export declare class DriverLicenseDetailedInfo<T> {
/**
* The restrictions to driving privileges for the United States driver license owner.
*
* Depending of the information source, it can either be of type {@link StringResult} or `String`.
*/
restrictions?: T;
/**
* The additional privileges granted to the US driver license owner.
*
* Depending of the information source, it can either be of type {@link StringResult} or `String`.
*/
endorsements?: T;
/**
* The type of vehicle the driver license owner has privilege to drive.
*
* Depending of the information source, it can either be of type {@link StringResult} or `String`.
*/
vehicleClass?: T;
/**
* The driver license conditions.
*
* Depending of the information source, it can either be of type {@link StringResult} or `String`.
*/
conditions?: T;
/**
* The additional information on vehicle class.
*
* See {@link VehicleClassInfo} for more information.
*/
vehicleClassesInfo?: VehicleClassInfo<T>[];
constructor(nativeDriverLicenseDetailedInfo: any);
}
/**
* Represents the information about the vehicle class extraction.
*
*/
export declare class VehicleClassInfo<T> {
/**
* The type of driver licence.
*
* Depending of the information source, it can either be of type {@link StringResult} or `string`.
*/
licenceType?: T;
/**
* The type of vehicle the driver license owner has privilege to drive.
*
* Depending of the information source, it can either be of type {@link StringResult} or `String`.
*/
vehicleClass?: T;
/**
* The date since licence is effective.
*
* See {@link DateResult} for more information.
*/
effectiveDate?: DateResult<T>;
/**
* The date of expiry of licence.
*
* See {@link DateResult} for more information.
*/
expiryDate?: DateResult<T>;
constructor(nativeVehicleClassInfo: any);
}
/**
* Information about the dependent.
*
*/
export declare class DependentInfo {
/**
* The date of birth of the dependent.
*
*/
dateOfBirth?: DateResult<StringResult>;
/**
* The sex or gender of the dependent.
*
*/
sex?: StringResult;
/**
* The document number of the dependent.
*
*/
documentNumber?: StringResult;
/**
* The full name of the dependent.
*
*/
fullName?: StringResult;
/**
* Checks if the dependent's information is empty.
*
*/
empty?: boolean;
constructor(nativeDependentInfo: any);
}
/**
* Represents the result of the image crop transformation with additional details.
*
*/
export declare class DetailedCroppedImageResult {
/**
* The cropped image in the Base64 format
*
*/
image?: string;
/**
* The document side that was cropped.
*
*/
side?: ScanningSide;
/**
* The location of the cropped image in the transformed image of the document.
*
*/
location?: Rectangle;
/**
*
* @param nativeDetailedCroppedImageResult
*
*/
constructor(nativeDetailedCroppedImageResult: any);
}
/**
* Represents the result of scanning a single side of the document.
*
* Contains the data extracted from the Visual Inspection Zone, Machine Readable Zone,
* barcode, the input image, and the cropped document, face, and signature images.
*/
export declare class SingleSideScanningResult {
/**
* The data extracted from the Visual Inspection Zone.
*
*/
viz?: VizResult;
/**
* The data extracted from the Machine Readable Zone.
*
*/
mrz?: MrzResult;
/**
* The data extracted from the barcode.
*
*/
barcode?: BarcodeResult;
/**
* The input image in the Base64 format.
*
*/
inputImage?: string;
/**
* The input image containing parsable barcode in the Base64 format.
*
*/
barcodeInputImage?: string;
/**
* The cropped document image in the Base64 format.
*
*/
documentImage?: string;
/**
* The cropped face image with additional info.
*
*/
faceImage?: DetailedCroppedImageResult;
/**
* The cropped signature image with additional info.
*
*/
signatureImage?: DetailedCroppedImageResult;
/**
*
* @param nativeSingleSideScanningResult - specifies the single side scanning result obtained from the native SDK.
*
*/
constructor(nativeSingleSideScanningResult: any);
}
/**
* Represents the result of the Visual Inspection Zone of a document.
*
*/
export declare class VizResult {
/**
* The first name of the document owner.
*
*/
firstName?: StringResult;
/**
* The last name of the document owner.
*
*/
lastName?: StringResult;
/**
* The full name of the document owner.
*
*/
fullName?: StringResult;
/**
* The additional name information of the document owner.
*
*/
additionalNameInformation?: StringResult;
/**
* The localized name of the document owner.
*
*/
localizedName?: StringResult;
/**
* The fathers name of the document owner.
*
*/
fathersName?: StringResult;
/**
* The mothers name of the document owner.
*
*/
mothersName?: StringResult;
/**
* The address of the document owner.
*
*/
address?: StringResult;
/**
* The additional address information of the document owner.
*
*/
additionalAddressInformation?: StringResult;
/**
* The one more additional address information of the document owner.
*
*/
additionalOptionalAddressInformation?: StringResult;
/**
* The place of birth of the document owner.
*
*/
placeOfBirth?: StringResult;
/**
* The nationality of the document owner.
*
*/
nationality?: StringResult;
/**
* The race of the document owner.
*
*/
race?: StringResult;
/**
* The religion of the document owner.
*
*/
religion?: StringResult;
/**
* The profession of the document owner.
*
*/
profession?: StringResult;
/**
* The marital status of the document owner.
*
*/
maritalStatus?: StringResult;
/**
* The residential status of the document owner.
*
*/
residentialStatus?: StringResult;
/**
* The employer of the document owner.
*
*/
employer?: StringResult;
/**
* The sex of the document owner.
*
*/
sex?: StringResult;
/**
* The sponsor of the document owner.
*
*/
sponsor?: StringResult;
/**
* The blood type of the document owner.
*
*/
bloodType?: StringResult;
/**
* The date of birth of the document owner.
*
*/
dateOfBirth?: DateResult<StringResult>;
/**
* The date of issue of the document.
*
*/
dateOfIssue?: DateResult<StringResult>;
/**
* The date of expiry of the document.
*
*/
dateOfExpiry?: DateResult<StringResult>;
/**
* Determines if date of expiry is permanent.
*
*/
dateOfExpiryPermanent?: boolean;
/**
* The document number.
*
*/
documentNumber?: StringResult;
/**
* The personal identification number.
*
*/
personalIdNumber?: StringResult;
/**
* The additional number of the document.
*
*/
documentAdditionalNumber?: StringResult;
/**
* The one more additional number of the document.
*
*/
documentOptionalAdditionalNumber?: StringResult;
/**
* The additional personal identification number.
*
*/
additionalPersonalIdNumber?: StringResult;
/**
* The issuing authority of the document.
*
*/
issuingAuthority?: StringResult;
/**
* The visa type of the document.
*
*/
visaType?: StringResult;
/**
* The driver license detailed info.
*
*/
driverLicenseDetailedInfo?: DriverLicenseDetailedInfo<StringResult>;
/**
* The transcription of the document subtype.
*
*/
documentSubtype?: StringResult;
/**
* The remarks on the residence permit.
*
*/
remarks?: StringResult;
/**
* The residence permit type.
*/
residencePermitType?: StringResult;
/**
* The manufacturing year.
*
*/
manufacturingYear?: StringResult;
/**
* The vehicle type.
*
*/
vehicleType?: StringResult;
/**
* The eligibility category.
*
*/
eligibilityCategory?: StringResult;
/**
* The specific document validity.
*
*/
specificDocumentValidity?: StringResult;
/**
* The dependents info.
*
*/
dependentsInfo?: DependentInfo[];
/**
* The vehicle owner.
*
*/
vehicleOwner?: StringResult;
/**
* The country code of the document owner.
*
*/
countryCode?: StringResult;
/**
* The certificate number of the document owner.
*
*/
certificateNumber?: StringResult;
/**
* The national insurance number of the document owner.
*
*/
nationalInsuranceNumber?: StringResult;
/**
*
* @param nativeVizResult
*
*/
constructor(nativeVizResult: any);
}
/**
* Represents the result of the MRZ recognition.
*
*/
export declare class MrzResult {
/**
* The entire Machine Readable Zone text from ID.
*
*/
rawMRZString?: string;
/**
* The document code. Document code contains two characters.
* For MRTD the first character shall be A, C or I.
*
* The second character shall be discretion of the issuing State or organization except
* that V shall not be used, and `C` shall not be used after `A` except in the crew member certificate.
*
* On machine-readable passports (MRP) first character shall be `P` to designate an MRP. One additional
* letter may be used, at the discretion of the issuing State or organization, to designate a particular
* MRP.
*
* If the second character position is not used for this purpose, it shall be filled by the filter character.
*/
documentCode?: string;
/**
* Three-letter or two-letter code which indicate the issuing State. Three-letter codes are based
* on Aplha-3 codes for entities specified in ISO 3166-1, with extensions for certain States.
*
* Two-letter codes are based on Aplha-2 codes for entities specified in ISO 3166-1, with extensions for certain States.
*/
issuer?: string;
/**
* The document number.
*
*/
documentNumber?: string;
/**
* The first optional data. Empty string if not available.
*
*/
opt1?: string;
/**
* The second optional data. Empty string if not available.
*
*/
opt2?: string;
/**
* The gender of the document holder.
*
* Gender is specified by use of the single initial.
*/
gender?: string;
/**
* The nationality of the document holder represented by a three-letter or two-letter code.
*
* Three-letter codes are based on Alpha-3 codes for entities specified in ISO 3166-1, with extensions for certain States.
*
* Two-letter codes are based on Aplha-2 codes for entities specified in ISO 3166-1, with extensions for certain States.
*/
nationality?: string;
/**
* The primary indentifier.
*
* If there is more than one component, they are separated with space.
*/
primaryID?: string;
/**
* The secondary identifier.
*
* If there is more than one component, they are separated with space.
*/
secondaryID?: string;
/**
* The full issuer name that is expanded from the three-letter or two-letter code which indicate
* the issuing State.
*
*/
issuerName?: string;
/**
* The full nationality of the document holder, which is expanded from the three-letter or two-letter
* nationality code.
*/
nationalityName?: string;
/**
* Whether the MRZ is verified.
*
* If the MRZ is verified, it means that all check digits are correct.
*/
verified?: boolean;
/**
* The date of birth of the document holder.
*
*/
dateOfBirth?: DateResult<string>;
/**
* The date of expiry of the document.
*
*/
dateOfExpiry?: DateResult<string>;
/**
* The type of the document.
*
*/
documentType?: MRZDocumentType;
/**
* The sanitized first optional data.
*
* Result without additional '<' characters if they exist.
*/
sanitizedOpt1?: string;
/**
* The sanitized second optional data.
*
* Result without additional '<' characters if they exist.
*/
sanitizedOpt2?: string;
/**
* The sanitized nationality.
*
* Result without additional '<' characters if they exist.
*/
sanitizedNationality?: string;
/**
* The sanitized issuer.
*
* Result without additional '<' characters if they exist.
*/
sanitizedIssuer?: string;
/**
* The sanitized document code.
*
* Result without additional '<' characters if they exist.
*/
sanitizedDocumentCode?: string;
/**
* The sanitized document number.
*
* Result without additional '<' characters if they exist.
*/
sanitizedDocumentNumber?: string;
/**
*
* @param nativeMrzResult
*
*/
constructor(nativeMrzResult: any);
}
/**
* Represents the data extracted from the barcode.
*
*/
export declare class BarcodeResult {
/**
* The raw, unparsed barcode data.
*
*/
barcodeData?: BarcodeData;
/**
* The first name of the document owner.
*
*/
firstName?: string;
/**
* The middle name of the document owner.
*
*/
middleName?: string;
/**
* The last name of the document owner.
*
*/
lastName?: string;
/**
* The full name of the document owner.
*
*/
fullName?: string;
/**
* The additional name information of the document owner.
*
*/
additionalNameInformation?: string;
/**
* The address of the document owner.
*
*/
address?: string;
/**
* The place of birth of the document owner.
*
*/
placeOfBirth?: string;
/**
* The nationality of the document owner.
*
*/
nationality?: string;
/**
* The race of the document owner.
*
*/
race?: string;
/**
* The religion of the document owner.
*
*/
religion?: string;
/**
* The profession of the document owner.
*
*/
profession?: string;
/**
* The marital status of the document owner.
*
*/
maritalStatus?: string;
/**
* The residential status of the document owner.
*
*/
residentialStatus?: string;
/**
* The employer of the document owner.
*
*/
employer?: string;
/**
* The sex of the document owner.
*
*/
sex?: string;
/**
* The date of birth of the document owner.
*
*/
dateOfBirth?: DateResult<string>;
/**
* The date of issue of the document.
*
*/
dateOfIssue?: DateResult<string>;
/**
* The date of expiry of the document.
*
*/
dateOfExpiry?: DateResult<string>;
/**
* The document number.
*
*/
documentNumber?: string;
/**
* The personal identification number.
*
*/
personalIdNumber?: string;
/**
* The additional number of the document.
*
*/
documentAdditionalNumber?: string;
/**
* The issuing authority of the document.
*
*/
issuingAuthority?: string;
/**
* The details about the address of the document owner.
*
*/
addressDetailedInfo?: AddressDetailedInfo;
/**
* The driver license detailed info.
*
*/
driverLicenseDetailedInfo?: DriverLicenseDetailedInfo<string>;
/**
* Document specific extended elements that contain all barcode fields in their original form.
*
* Currently this is only filled for AAMVACompliant documents.
*/
extendedElements?: BarcodeExtendedElements;
/**
*
* @param nativeBarcodeResult
*/
constructor(nativeBarcodeResult: any);
}
/**
* Represents the raw, unparsed data extracted from a scanned barcode.
*
*/
export declare class BarcodeData {
/**
* Type of the scanned barcode.
*
*/
barcodeType?: BarcodeType;
/**
* Raw bytes of the barcode content.
*
*/
rawData?: string;
/**
* String representation of the barcode content.
*
*/
stringData?: string;
/**
* Whether the barcode data is uncertain, i.e. if scanned barcode was incomplete or has parts of it missing.
*
*/
uncertain?: boolean;
/**
*
* @param nativeBarcodeData - specifies the barcode data obtained from the native SDK.
*/
constructor(nativeBarcodeData: any);
}
/**
* Detailed information about the address.
*
*/
export declare class AddressDetailedInfo {
/**
* he address street portion of the document owner.
*
*/
street?: string;
/**
* The address postal code portion of the document owner.
*
*/
postalCode?: string;
/**
* The address city portion of the document owner.
*
*/
city?: string;
/**
* The address jurisdiction code portion of the document owner.
*
*/
jurisdiction?: string;
/**
*
* @param nativeAddressDetailedInfo - specificies the address detailed info obtained from the native SDK.
*
*/
constructor(nativeAddressDetailedInfo: any);
}
/**
* Represents the fields present in the barcode.
* Currently this is only used for AAMVACompliant documents.
*/
export declare class BarcodeExtendedElements {
/**
* Mandatory on all AAMVA and Magnetic barcodes.
* On compact barcodes, use kFullAddress.
*
* City portion of the cardholder address.
*/
addressCity?: string;
/**
* Mandatory on all AAMVA and Magnetic barcodes.
* On compact barcodes, use kFullAddress.
*
* State portion of the cardholder address.
*/
addressJurisdictionCode?: string;
/**
* Mandatory on all AAMVA and Magnetic barcodes.
* On compact barcodes, use kFullAddress.
*
* Postal code portion of the cardholder address in the U.S. and Canada.
* If the trailing portion of the postal code in the U.S. is not known, zeros can be used
* to fill the trailing set of numbers up to nine (9) digits.
*/
addressPostalCode?: string;
/**
* Mandatory on all AAMVA and Magnetic barcodes.
* On compact barcodes, use kFullAddress.
*
* Street portion of the cardholder address.
* The place where the registered driver of a vehicle (individual or corporation)
* may be contacted such as a house number, street address, etc.
*/
addressStreet?: string;
/**
* Optional on all AAMVA barcodes.
* On Compact barcodes, use kFullAddress.
*
* Second line of street portion of the cardholder address.
*/
addressStreet2?: string;
/**
* Optional on AAMVA 01. (MMDDCCYY format)
*
* ALTERNATIVE DATES(S) given as date of birth.
*/
akaDateOfBirth?: string;
/**
* Optional on all AAMVA and Compact barcodes.
* Other family name by which the cardholder is known.
*/
akaFamilyName?: string;
/**
* Optional on all AAMVA and Compact barcodes.
*
* Other name by which the cardholder is known. ALTERNATIVE NAME(S) of the individual
* holding the Driver License or ID.
*
* The Name field contains up to four portions, separated with the "," delimiter:
* AKA Last Name (required)
* , (required)
* AKA First Name (required)
* , (required if other name portions follow, otherwise optional)
* AKA Middle Name(s) (optional)
* , (required if other name portions follow, otherwise optional)
* AKA Suffix (optional)
* , (optional)
*
* If the individual has more than one AKA middle name they are separated with space.
*/
akaFullName?: string;
/**
* Optional on all AAMVA and Compact barcodes.
*
* Other given name by which the cardholder is known
*/
akaGivenName?: string;
/**
* Optional on AAMVA 01 barcodes.
*
* ALTERNATIVE MIDDLE NAME(s) or INITIALS of the individual holding the Driver License or ID.
* Hyphenated names acceptable, spaces between names acceptable, but no other
* use of special symbols.
*/
akaMiddleName?: string;
/**
* Optional on AAMVA 01 barcodes.
*
* ALTERNATIVE PREFIX to Driver Name. Freeform as defined by issuing jurisdiction.
*/
akaPrefixName?: string;
/**
* Optional on AAMVA version 01.
*
* Driver "AKA" Social Security Number. FORMAT SAME AS DRIVER SOC SEC NUM. ALTERNATIVE NUMBERS(S) used as SS NUM.
*/
akaSocialSecurityNumber?: string;
/**
* Optional on all AAMVA and Compact barcodes.
*
* Other suffix by which the cardholder is known.
* The Suffix Code Portion, if submitted, can contain only the Suffix Codes
* shown in the following table (e.g., Andrew Johnson, III = JOHNSON@ANDREW@@3RD):
*
* Suffix Meaning or Synonym
* JR Junior
* SR Senior or Esquire 1ST First
* 2ND Second
* 3RD Third
* 4TH Fourth
* 5TH Fifth
* 6TH Sixth
* 7TH Seventh
* 8TH Eighth
* 9TH Ninth
*/
akaSuffixName?: string;
/**
* Optional on AAMVA 02, 03, 04, 05, 06, 07, 08 and Compact barcodes.
*
* A string of letters and/or numbers that identifies when, where, and by whom a driver's
* license/ID card was made. If audit information is not used on the card or the MRT, it
* must be included in the driver record.
*/
auditInformation?: string;
/**
* Optional on AAMVA 04, 05, 06, 07, 08 and Compact barcodes.
*
* DHS required field that indicates date of the most recent version change or
* modification to the visible format of the DL/ID. (MMDDCCYY format)
*/
cardRevisionDate?: string;
/**
* Optional on AAMVA 04, 05, 06, 07, 08 and Compact barcodes.
*
* DHS required field that indicates compliance: "M" = materially compliant,
* "F" = fully compliant, and, "N" = non-compliant.
*/
complianceType?: string;
/**
* Mandatory on AAMVA 02, 03, 04, 05, 06, 07, 08 and Compact barcodes.
*
* Country in which DL/ID is issued. U.S. = USA, Canada = CAN.
*/
countryIdentification?: string;
/**
* Mandatory on all AAMVA, Magnetic and Compact barcodes.
*
* Family name of the cardholder. (Family name is sometimes also called "last name" or "surname.")
* Collect full name for record, print as many characters as possible on portrait side of DL/ID.
*/
customerFamilyName?: string;
/**
* Mandatory on all AAMVA and Compact barcodes.
*
* The number assigned or calculated by the issuing authority.
*/
customerIdNumber?: string;
/**
* Mandatory on all AAMVA, Magnetic and Compact barcodes.
*
* First name of the cardholder.
*/
customerFirstName?: string;
/**
* Mandatory on all AAMVA, Magnetic and Compact barcodes.
*
* Full name of the individual holding the Driver's License or ID.
*
* The Name field contains up to four portions, separated with the "," delimiter:
* Last Name (required)
* , (required)
* First Name (required)
* , (required if other name portions follow, otherwise optional)
* Middle Name(s) (optional)
* , (required if other name portions follow, otherwise optional)
* Suffix (optional)
* , (optional)
*
* If the individual has more than one middle name they are separated with space.
*/
customerFullName?: string;
/**
* Mandatory on AAMVA 04, 05, 06, 07, 08 barcodes.
* Optional on AAMVA 01, 02, 03, Magnetic and Compcat barcodes.
*
* Middle name(s) of the cardholder. In the case of multiple middle names they
* shall be separated by space " ".
*/
customerMiddleName?: string;
/**
* Optional on compact barcodes.
*
* Document discriminator.
*/
dataDiscriminator?: string;
/**
* Mandatory on all AAMVA, Magnetic and Compact barcodes.
*
* Date on which the cardholder was born. (MMDDCCYY format)
*/
dateOfBirth?: string;
/**
* Mandatory on AAMVA 02, 03, 04, 05, 06, 07, 08 and Magnetic barcodes.
* Optional on Compact barcodes.
*
* Number must uniquely identify a particular document issued to that customer
* from others that may have been issued in the past. This number may serve
* multiple purposes of document discrimination, audit info, and/or inventory control.
*/
documentDiscriminator?: string;
/**
* Mandatory on all AAMVA, Magnetic and Compact barcodes.
*
* Date on which the document expires. (MMDDCCYY format)
* If the document is non expiring then "Non expiring" is written in this field.
*/
documentExpirationDate?: string;
/**
* Optional on Magnetic barcodes.
*
* Month on which the driving and identification privileges granted by the document are no longer valid.
*/
documentExpirationMonth?: string;
/**
* Mandatory on all AAMVA and Compact barcodes.
*
* Date on which the document was issued. (MMDDCCYY format)
*/
documentIssueDate?: string;
/**
* Optional on Magnetic barcodes.
*
* Field that indicates that the driving and identification privileges granted by the
* document are nonexpiring = "1".
*/
documentNonexpiring?: string;
/**
* Mandatory on all driver's licenses.
* All barcodes which are using 3-track magnetic stripe encoding used in the interest of smoothing a transition from legacy documents
* shall be designated as "Magnetic". All barcodes which are using compact encoding
* compliant with ISO/IEC 18013-2 shall be designated as "Compact". All barcodes (majority)
* compliant with Mandatory PDF417 Bar Code of the American Association of Motor Vehicle
* Administrators (AAMVA) Card Design Standard from AAMVA DL/ID-2000 standard to DL/ID-2013
* shall be designated as "AAMVA".
*/
documentType?: string;
/**
* Mandatory on AAMVA 02, 03, 04, 05, 06, 07, 08 barcodes.
* Optional on AAMVA 01, Magnetic and Compact barcodes.
*
* Color of cardholder's eyes. (ANSI D-20 codes)
* Code Description
* BLK Black
* BLU Blue
* BRO Brown
* GRY Gray
* GRN Green
* HAZ Hazel
* MAR Maroon
* PNK Pink
* DIC Dichromatic
* UNK Unknown
*/
eyeColor?: string;
/**
* Mandatory on AAMVA 04, 05, 06, 07, 08 barcodes.
* Optional on Compact barcodes.
* A code that indicates whether a field has been truncated (T), has not been
* truncated (N), or – unknown whether truncated (U).
*/
familyNameTruncation?: string;
/**
* Mandatory on AAMVA versions 02 and 03.
*
* Federally established codes for vehicle categories, endorsements, and restrictions
* that are generally applicable to commercial motor vehicles. If the vehicle is not a
* commercial vehicle, "NONE" is to be entered.
*/
federalCommercialVehicleCodes?: string;
/**
* Mandatory on AAMVA 04, 05, 06, 07, 08 barcodes.
* Optional on Compact barcodes.
*
* A code that indicates whether a field has been truncated (T), has not been
* truncated (N), or – unknown whether truncated (U).
*/
firstNameTruncation?: string;
/**
* Mandatory on all AAMVA and Magnetic barcodes.
* Optional on Compact barcodes.
*
* Full address of the individual holding the Driver's License or ID.
*
* The full address field contains up to four portions, separated with the "," delimiter:
* Street Address (required)
* , (required if other address portions follow, otherwise optional)
* City (optional)
* , (required if other address portions follow, otherwise optional)
* Jurisdiction Code (optional)
* , (required if other address portions follow, otherwise optional)
* ZIP - Postal Code (optional)
*/
fullAddress?: string;
/**
* Optional on all AAMVA, Magnetic and Compact barcodes.
*
* Bald, black, blonde, brown, gray, red/auburn, sandy, white, unknown. If the issuing
* jurisdiction wishes to abbreviate colors, the three-character codes provided in ANSI D20 must be
* used.
*
* Code Description
* BAL Bald
* BLK Black
* BLN Blond
* BRO Brown
* GRY Grey
* RED Red/Auburn
* SDY Sandy
* WHI White
* UNK Unknown
*/
hairColor?: string;
/**
* Mandatory on AAMVA 02, 03, 04, 05, 06, 07, 08 and Compact barcodes.
* Optional on AAMVA 01 and Magnetic barcodes.
*
* Height of cardholder, either in Inches or in Centimeters.
*
* Inches (in): number of inches followed by " in"
* example: 6'1'' = "73 in"
*
* Centimeters (cm): number of centimeters followed by " cm"
* example: 181 centimeters = "181 cm"
*/
height?: string;
/**
* Mandatory on AAMVA 02, 03, 04, 05, 06, 07, 08 and Compact barcodes.
* Optional on AAMVA 01 and Magnetic barcodes.
*
* Height of cardholder in Inches.
* Example: 5'9'' = "69".
*
*/
heightIn?: string;
/**
* Mandatory on AAMVA 02, 03, 04, 05, 06, 07, 08 Compact barcodes.
* Optional on AAMVA 01 and Magnetic barcodes.
*
* Height of cardholder in Centimeters.
* Example: 180 Centimeters = "180".
*/
heightCm?: string;
/**
* Mandatory on all AAMVA, Magnetic and Compact barcodes.
*
* This number uniquely identifies the issuing jurisdiction and can
* be obtained by contacting the ISO Issuing Authority (AAMVA)
*/
issuerIdentificationNumber?: string;
/**
* Optional on all AAMVA barcodes.
* Mandatory on Compact barcodes.
*
* Jurisdictions may define a subfile to contain jurisdiction-specific information.
* These subfiles are designated with the first character of “Z” and the second
* character is the first letter of the jurisdiction's name. For example, "ZC" would
* be the designator for a California or Colorado jurisdiction-defined subfile, "ZQ"
* would be the designator for a Quebec jurisdiction-defined subfile. In the case of
* a jurisdiction-defined subfile that has a first letter that could be more than
* one jurisdiction (e.g. California, Colorado, Connecticut) then other data, like
* the IIN or address, must be examined to determine the jurisdiction.
*
*/
issuingJurisdiction?: string;
/**
* Optional on all AAMVA and Magnetic barcodes.
*
* Name of issuing jurisdiction, for example: Alabama, Alaska ...
*/
issuingJurisdictionName?: string;
/**
* Mandatory on all AAMVA barcodes.
* Optional on Magnetic barcodes.
*
* Jurisdiction-specific codes t