UNPKG

@microblink/blinkid-react-native

Version:

A small and powerful ID card scanning library. Powered by Microblink (www.microblink.com).

867 lines (823 loc) 23.5 kB
"use strict"; /** * Settings for the barcode extraction module. * * This module manages the detection and data extraction from various 1D and 2D * barcode formats (such as PDF417, QR codes, and various retail codes). * * It can operate as a standalone module or in combination with document capture. */ /* * Settings for the document capture module. * * This module is responsible for the initial document detection, image extraction * (such as face and document images), and image quality validation (blur, glare, * and lighting checks). */ /* * Settings for the MRZ (Machine Readable Zone) extraction module. * * This module is dedicated to the detection and parsing of machine-readable * zone typically found on passports, visas, and identity cards. */ /* * Settings for the VIZ (Visual Inspection Zone) extraction module. * * This module is responsible for extracting data from the document's * visual fields. * * It supports features such as character validation for increased accuracy, * signature image extraction, and data aggregation across multiple video frames. */ /** * 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. */ /* * A resolver that provides custom [RedactionSettings] for a scanned document * based on its detected class information. * * Add the resolver when you need per-document redaction behavior — for example, * anonymizing different fields depending on the document's country or type. The resolver * is invoked by the SDK immediately before the scanning result is finalized. * * If not added, the SDK will use the default [RedactionSettings] for a given document class. */ /** * Represents the document filter. * * Used with other classes like the {@link ClassFilter}, {@link DocumentRules} and the {@link RedactionSettings}. */ /** * Represents the detailed field type. * */ export class DetailedFieldType { /** * The field type. * * See {@link FieldType} for more information. */ /** * The alphabet type. * * See {@link AlphabetType} for more information. */ /** * * @param fieldType - specifies the {@link FieldType}. * @param alphabetType - specifies the {@link AlphabetType}. * * Both parameters are mandatory. */ constructor(fieldType, alphabetType) { this.fieldType = fieldType; this.alphabetType = alphabetType; } } /** * Represents the document redaction settings. * */ /** * 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`. */ /** * Represents the document class information. * */ /** * Represents the result of the data match. * */ /** * Represents the state of the field in the data match. * */ /** * 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. * */ /** * Represents the rectangle location of each document field * */ /** * Represents the information about the location of an element within a document or image. * */ /** * Scanning side on which the specific result is located. * */ /** * Represents the result of the date extraction. * * Contains the extracted date, along with additional date information. */ /** * Represents the extracted date. * */ /** * Represents detailed extracted information about the driver license. * */ /** * Represents the information about the vehicle class extraction. * */ /** * Information about the dependent. * */ /** * Represents the result of the image crop transformation with additional details. * */ /** * 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. */ /** * Represents the result of the Visual Inspection Zone of a document. * */ /** * Represents the result of the MRZ recognition. * */ /** * Represents the data extracted from the barcode. * */ /** * Represents the raw, unparsed data extracted from a scanned barcode. * */ /** * Detailed information about the address. * */ /** * Represents the fields present in the barcode. * Currently this is only used for AAMVACompliant documents. */ /** * The results of parents info. */ /** * Represents the mode of document scanning. * * This enum class defines whether the scanning process is limited to a single * side of the document or includes multiple sides, automatically identifying how many sides need to be scanned. */ /** * Represents the type of the alphabet used in the document. * */ /** * Represents the different levels of detection sensitivity. * * This enum class is used to configure detection thresholds and enable or * disable detection functionality. * * The levels range from turning detection * off completely to setting various levels of sensitivity (`Low`, `Mid`, `High`). */ /** * Represents level of anonymization performed on the scanning result. * */ /** * Represents the type of scanned barcode * */ /** * Represents the document type found on the Machine Readable Zone * */ /** * Represents the side of the document being scanned. * */ /** * Represents the type of the field used in data match. * */ /** * Represents the state of the data match. * */ /** * Document country. * */ export const Country = { None: "none", Albania: "albania", Algeria: "algeria", Argentina: "argentina", Australia: "australia", Austria: "austria", Azerbaijan: "azerbaijan", Bahrain: "bahrain", Bangladesh: "bangladesh", Belgium: "belgium", BosniaAndHerzegovina: "bosniaAndHerzegovina", Brunei: "brunei", Bulgaria: "bulgaria", Bambodia: "bambodia", Canada: "canada", Chile: "chile", Colombia: "colombia", CostaRica: "costaRica", Croatia: "croatia", Cyprus: "cyprus", Czechia: "czechia", Denmark: "denmark", DominicanRepublic: "dominicanRepublic", Egypt: "egypt", Estonia: "estonia", Finland: "finland", France: "france", Georgia: "georgia", Germany: "germany", Ghana: "ghana", Greece: "greece", Guatemala: "guatemala", HongKong: "hongKong", Hungary: "hungary", India: "india", Indonesia: "indonesia", Ireland: "ireland", Israel: "israel", Italy: "italy", Jordan: "jordan", Kazakhstan: "kazakhstan", Kenya: "kenya", Kosovo: "kosovo", Kuwait: "kuwait", Latvia: "latvia", Lithuania: "lithuania", Malaysia: "malaysia", Maldives: "maldives", Malta: "malta", Mauritius: "mauritius", Mexico: "mexico", Morocco: "morocco", Netherlands: "netherlands", NewZealand: "newZealand", Nigeria: "nigeria", Pakistan: "pakistan", Panama: "panama", Paraguay: "paraguay", Philippines: "philippines", Poland: "poland", Portugal: "portugal", PuertoRico: "puertoRico", Qatar: "qatar", Romania: "romania", Russia: "russia", SaudiArabia: "saudiArabia", Serbia: "serbia", Singapore: "singapore", Slovakia: "slovakia", Slovenia: "slovenia", SouthAfrica: "southAfrica", Spain: "spain", Sweden: "sweden", Switzerland: "switzerland", Taiwan: "taiwan", Thailand: "thailand", Tunisia: "tunisia", Turkey: "turkey", UAE: "uae", Ganda: "gganda", UK: "uk", Ukraine: "ukraine", USA: "usa", Vietnam: "vietnam", Brazil: "brazil", Norway: "norway", Oman: "oman", Ecuador: "ecuador", ElSalvador: "elSalvador", SriLanka: "sriLanka", Peru: "peru", Uruguay: "uruguay", Bahamas: "bahamas", Bermuda: "bermuda", Bolivia: "bolivia", China: "china", EuropeanUnion: "europeanUnion", Haiti: "haiti", Honduras: "honduras", Iceland: "iceland", Japan: "japan", Luxembourg: "luxembourg", Montenegro: "montenegro", Nicaragua: "nicaragua", SouthKorea: "southKorea", Venezuela: "venezuela", Afghanistan: "afghanistan", AlandIslands: "alandIslands", AmericanSamoa: "americanSamoa", Andorra: "andorra", Angola: "angola", Anguilla: "anguilla", Antartica: "antarctica", AntiguaAndBarbuda: "antiguaAndBarbuda", Armenia: "armenia", Aruba: "aruba", BailiwickOfGuernsey: "bailiwickOfGuernsey", BailiwickOfJersey: "bailiwickOfJersey", Barbados: "barbados", Belarus: "belarus", Belize: "belize", Benin: "benin", Bhutan: "bhutan", BonaireSaintEustatiusAndSaba: "bonaireSaintEustatiusAndSaba", Botswana: "botswana", BouvetIsland: "bouvetIsland", BritishIndianOceanTerritory: "britishIndianOceanTerritory", BurkinaFaso: "burkinaFaso", Burundi: "burundi", Cameroon: "cameroon", CapeVerde: "capeVerde", CaribbeanNetherlands: "caribbeanNetherlands", CaymanIslands: "caymanIslands", CentralAfricanRepublic: "centralAfricanRepublic", Chad: "chad", ChristmasIsland: "christmasIsland", CocosIslands: "cocosIslands", Comoros: "comoros", Congo: "congo", CookIslands: "cookIslands", Cuba: "cuba", Curacao: "curacao", DemocraticRepublicOfTheCongo: "democraticRepublicOfTheCongo", Djibouti: "djibouti", Dominica: "dominica", EastTimor: "eastTimor", EquatorialGuinea: "equatorialGuinea", Eritrea: "eritrea", Ethiopia: "ethiopia", FalklandIslands: "falklandIslands", FaroeIslands: "faroeIslands", FederatedStatesOfMicronesia: "federatedStatesOfMicronesia", Fiji: "fiji", FrenchGuiana: "frenchGuiana", FrenchPolynesia: "frenchPolynesia", FrenchSouthernTerritories: "frenchSouthernTerritories", Gabon: "gabon", Gambia: "gambia", Gibraltar: "gibraltar", Greenland: "greenland", Grenada: "grenada", Guadeloupe: "guadeloupe", Guam: "guam", Guinea: "guinea", GuineaBissau: "guineaBissau", Guyana: "guyana", HeardIslandAndMcdonaldIslands: "heardIslandAndMcdonaldIslands", Iran: "iran", Iraq: "iraq", IsleOfMan: "isleOfMan", IvoryCoast: "ivoryCoast", Jamaica: "jamaica", Kiribati: "kiribati", Kyrgyzstan: "kyrgyzstan", Laos: "laos", Lebanon: "lebanon", Lesotho: "lesotho", Liberia: "liberia", Libya: "libya", Liechtenstein: "liechtenstein", Macau: "macau", Madagascar: "madagascar", Malawi: "malawi", Mali: "mali", MarshallIslands: "marshallIslands", Martinique: "martinique", Mauritania: "mauritania", Mayotte: "mayotte", Moldova: "moldova", Monaco: "monaco", Mongolia: "mongolia", Montserrat: "montserrat", Mozambique: "mozambique", Myanmar: "myanmar", Namibia: "namibia", Nauru: "nauru", Nepal: "nepal", NewCaledonia: "newCaledonia", Niger: "niger", Niue: "niue", NorfolkIsland: "norfolkIsland", NorthernCyprus: "northernCyprus", NorthernMarianaIslands: "northernMarianaIslands", NorthKorea: "northKorea", NorthMacedonia: "northMacedonia", Palau: "palau", Palestine: "palestine", PapuaNewGuinea: "papuaNewGuinea", Pitcairn: "pitcairn", Reunion: "reunion", Rwanda: "rwanda", SaintBarthelemy: "saintBarthelemy", SaintHelenaAscensionAndTristianDaCunha: "saintHelenaAscensionAndTristianDaCunha", SaintKittsAndNevis: "saintKittsAndNevis", SaintLucia: "saintLucia", SaintMartin: "saintMartin", SaintPierreAndMiquelon: "saintPierreAndMiquelon", SaintVincentAndTheGrenadines: "saintVincentAndTheGrenadines", Samoa: "samoa", SanMarino: "sanMarino", SaoTomeAndPrincipe: "saoTomeAndPrincipe", Senegal: "senegal", Seychelles: "seychelles", SierraLeone: "sierraLeone", SintMaarten: "sintMaarten", SolomonIslands: "solomonIslands", Somalia: "somalia", SouthGeorgiaAndTheSouthSandwichIslands: "southGeorgiaAndTheSouthSandwichIslands", SouthSudan: "southSudan", Sudan: "sudan", Suriname: "suriname", SvalbardAndJanMayen: "svalbardAndJanMayen", Eswatini: "eswatini", Syria: "syria", Tajikistan: "tajikistan", Tanzania: "tanzania", Togo: "togo", Tokelau: "tokelau", Tonga: "tonga", TrinidadAndTobago: "trinidadAndTobago", Turkmenistan: "turkmenistan", TurksAndCaicosIslands: "turksAndCaicosIslands", Tuvalu: "tuvalu", UnitedStatesMinorOutlyingIslands: "unitedStatesMinorOutlyingIslands", Uzbekistan: "uzbekistan", Vanuatu: "vanuatu", VaticanCity: "vaticanCity", VirginIslandsBritish: "virginIslandsBritish", VirginIslandsOfTheUnitedStates: "virginIslandsOfTheUnitedStates", WallisAndFutuna: "wallisAndFutuna", WesternSahara: "westernSahara", Yemen: "yemen", Yugoslavia: "yugoslavia", Zambia: "zambia", Zimbabwe: "zimbabwe", SchengenArea: "schengenArea", SaintThomasAndPrince: "saintThomasAndPrince" }; /** * Document region. */ export const Region = { None: "none", Alabama: "alabama", Alaska: "alaska", Alberta: "alberta", Arizona: "arizona", Arkansas: "arkansas", AustralianCapitalTerritory: "australianCapitalTerritory", BritishColumbia: "britishColumbia", California: "california", Colorado: "colorado", Connecticut: "connecticut", Delaware: "delaware", DistrictOfColumbia: "districtOfColumbia", Florida: "florida", Georgia: "georgia", Hawaii: "hawaii", Idaho: "idaho", Illinois: "illinois", Indiana: "indiana", Iowa: "iowa", Kansas: "kansas", Kentucky: "kentucky", Louisiana: "louisiana", Maine: "maine", Manitoba: "manitoba", Maryland: "maryland", Massachusetts: "massachusetts", Michigan: "michigan", Minnesota: "minnesota", Mississippi: "mississippi", Missouri: "missouri", Montana: "montana", Nebraska: "nebraska", Nevada: "nevada", NewBrunswick: "newBrunswick", NewHampshire: "newHampshire", NewJersey: "newJersey", NewMexico: "newMexico", NewSouthWales: "newSouthWales", NewYork: "newYork", NorthernTerritory: "northernTerritory", NorthCarolina: "northCarolina", NorthDakota: "northDakota", NovaScotia: "novaScotia", Ohio: "ohio", Oklahoma: "oklahoma", Ontario: "ontario", Oregon: "oregon", Pennsylvania: "pennsylvania", Quebec: "quebec", Queensland: "queensland", RhodeIsland: "rhodeIsland", Saskatchewan: "saskatchewan", SouthAustralia: "southAustralia", SouthCarolina: "southCarolina", SouthDakota: "southDakota", Tasmania: "tasmania", Tennessee: "tennessee", Texas: "texas", Utah: "utah", Vermont: "vermont", Victoria: "victoria", Virginia: "virginia", Washington: "washington", WesternAustralia: "westernAustralia", WestVirginia: "westVirginia", Wisconsin: "wisconsin", Wyoming: "wyoming", Yukon: "yukon", CiudadDeMexico: "ciudadDeMexico", Jalisco: "jalisco", NewfoundlandAndLabrador: "newfoundlandAndLabrador", NuevoLeon: "nuevoLeon", BajaCalifornia: "bajaCalifornia", Chihuahua: "chihuahua", Guanajuato: "guanajuato", Guerrero: "guerrero", Mexico: "mexico", Michoacan: "michoacan", NewYorkCity: "newYorkCity", Tamaulipas: "tamaulipas", Veracruz: "veracruz", Chiapas: "chiapas", Coahuila: "coahuila", Durago: "durango", GuerreroCocula: "guerreroCocula", GuerreroJuchitan: "guerreroJuchitan", GuerreroTepecoacuilco: "guerreroTepecoacuilco", GuerreroTlacoapa: "guerreroTlacoapa", Gujarat: "gujarat", Hidalgo: "hidalgo", Karnataka: "karnataka", Kerala: "kerala", KhyberPakhtunkhwa: "khyberPakhtunkhwa", MadhyaPradesh: "madhyaPradesh", Maharashtra: "maharashtra", Morelos: "morelos", Nayarit: "nayarit", Oaxaca: "oaxaca", Puebla: "puebla", Punjab: "punjab", Queretaro: "queretaro", SanLuisPotosi: "sanLuisPotosi", Sinaloa: "sinaloa", Sonora: "sonora", Tabasco: "tabasco", TamilNadu: "tamilNadu", Yucatan: "yucatan", Zacatecas: "zacatecas", Aguascalientes: "aguascalientes", BajaCaliforniaSur: "bajaCaliforniaSur", Campeche: "campeche", Colima: "colima", QuintanaRooBenitoJuarez: "quintanaRooBenitoJuarez", QuintanaRoo: "quintanaRoo", QuintanaRooSolidaridad: "quintanaRooSolidaridad", Tlaxcala: "tlaxcala", QuintanaRooCozumel: "quintanaRooCozumel", SanPaolo: "saoPaolo", RioDeJaniero: "rioDeJaneiro", RioGrandeDoSul: "rioGrandeDoSul", NorthWestTerritories: "northWestTerritories", Nunavut: "nunavut", PrinceEdwardIsland: "princeEdwardIsland", DistritoFederal: "distritoFederal", Maranhao: "maranhao", MatoGrosso: "matoGrosso", MinasGerais: "minasGerais", Para: "para", Parana: "parana", Pernambuco: "pernambuco", SantaCatarina: "santaCatarina", AndhraPradesh: "andhraPradesh", Ceara: "ceara", Goias: "goias", GuerreroAcapulcoDeJuarez: "guerreroAcapulcoDeJuarez", Haryana: "haryana", Sergipe: "sergipe", Alagos: "alagos", Bangsamoro: "bangsamoro", Telangana: "telangana", Acre: "acre", EspiritoSanto: "espiritoSanto", MatoGrossoDoSul: "matoGrossoDoSul", Paraiba: "paraiba", Piaui: "piaui", RioGrandeDoNorte: "rioGrandeDoNorte", Tocantins: "tocantins", Odisha: "odisha", Uttarakhand: "uttarakhand" }; /** * Document type. * */ export const DocumentType = { None: "none", ConsularId: "consularId", Dl: "dl", DlPublicServicesCard: "dlPublicServicesCard", EmploymentPass: "employmentPass", FinCard: "finCard", Id: "id", MultipurposeId: "multipurposeId", MyKad: "myKad", MyKid: "myKid", MyPr: "myPR", MyTentera: "myTentera", PanCard: "panCard", ProfessionalId: "professionalId", PublicServicesCard: "publicServicesCard", ResidencePermit: "residencePermit", ResidentId: "residentId", TemporaryResidencePermit: "temporaryResidencePermit", VoterId: "voterId", WorkPermit: "workPermit", IKad: "iKad", MilitaryId: "militaryId", MyKas: "myKas", DocialSecurityCard: "docialSecurityCard", HealthInsuranceCard: "healthInsuranceCard", Passport: "passport", SPass: "sPass", AddressCard: "addressCard", AlienId: "alienId", AlienPassport: "alienPassport", GreenCard: "greenCard", MinorsId: "minorsId", PostalId: "postalId", ProfessionalDl: "professionalDl", TaxId: "taxId", WeaponPermit: "weaponPermit", Visa: "visa", BorderCrossingCard: "borderCrossingCard", DriverCard: "driverCard", GlobalEntryCard: "globalEntryCard", MyPolis: "mypolis", NexusCard: "nexusCard", PassportCard: "passportCard", ProofOfAgeCard: "proofOfAgeCard", RefugeeId: "refugeeId", TribalId: "tribalId", VeteranId: "veteranId", CitizenshipCertificate: "citizenshipCertificate", MyNumberCard: "myNumberCard", ConsularPassport: "consularPassport", MinorsPassport: "minorsPassport", MinorsPublicServicesCard: "minorsPublicServicesCard", DrivingPriviligeCard: "drivingPriviligeCard", AsylumRequest: "asylumRequest", DriverQualificationCard: "driverQualificationCard", ProvisionalDl: "provisionalDl", RefugeePassport: "refugeePassport", SpecialId: "specialId", UniformedServicesId: "uniformedServicesId", ImmigrantVisa: "immigrantVisa", ConsularVoterId: "consularVoterId", TwicCard: "twicCard", ExitEntryPermit: "exitEntryPermit", MainlandTravelPermitTaiwan: "mainlandTravelPermitTaiwan", NbiClearance: "nbiClearance", ProofOfRegistration: "proofOfRegistration", TemporaryProtectionPermit: "temporaryProtectionPermit", AfghanCitizenCard: "afghanCitizenCard", EId: "eId", Pass: "pass", SisId: "sisId", AsicCard: "asicCard", BidoonCard: "bidoonCard", InterimHealthInsuranceCard: "interimHealthInsuranceCard", NonVoterId: "nonVoterId", ReciprocalHealthInsuranceCard: "reciprocalHealthInsuranceCard", VehicleRegistration: "vehicleRegistration", EsaadCard: "esaadCard", RegistrationCertificate: "registrationCertificate", MedicalMarijuanaId: "medicalMarijuanaId", NonCardTribalId: "nonCardTribalId", DiplomaticId: "diplomaticId", EmergencyPassport: "emergencyPassport", TemporaryPassport: "temporaryPassport", MetisFederationCard: "metisFederationCard", SocialSecurityCard: "socialSecurityCard", AdrCertificate: "adrCertificate", NinCard: "ninCard", MysssCard: "mysssCard", GendarmerieId: "gendarmerieId", PoliceId: "policeId", OriginCard: "originCard" }; /** * Represents all possible field types that can be extracted from the document. * */ export const FieldType = { AdditionalAddressInformation: "additionalAddressInformation", AdditionalNameInformation: "additionalNameInformation", AdditionalOptionalAddressInformation: "additionalOptionalAddressInformation", AdditionalPersonalIdNumber: "additionalPersonalIdNumber", Address: "address", ClassEffectiveDate: "classEffectiveDate", ClassExpiryDate: "classExpiryDate", Conditions: "conditions", DateOfBirth: "dateOfBirth", DateOfExpiry: "dateOfExpiry", DateOfIssue: "dateOfIssue", DocumentAdditionalNumber: "documentAdditionalNumber", DocumentOptionalAdditionalNumber: "documentOptionalAdditionalNumber", DocumentNumber: "documentNumber", Employer: "employer", Endorsements: "endorsements", FathersName: "fathersName", FirstName: "firstName", FullName: "fullName", IssuingAuthority: "issuingAuthority", LastName: "lastName", LicenseType: "licenceType", LocalizedName: "localizedName", MaritalStatus: "maritalStatus", MothersName: "mothersName", Mrz: "mrz", Nationality: "nationality", PersonalIdNumber: "personalIdNumber", PlaceOfBirth: "placeOfBirth", Profession: "profession", Race: "race", Religion: "religion", ResidentialStatus: "residentialStatus", Restriction: "restrictions", Sex: "sex", VehicleClass: "vehicleClass", BloodType: "bloodType", Sponsor: "sponsor", VisaType: "visaType", DocumentSubtype: "documentSubtype", Remarks: "remarks", ResidencePermitType: "residencePermitType", ManufacturingYear: "manufacturingYear", VehicleType: "vehicleType", DependentDateOfBirth: "dependentDateOfBirth", DependentSex: "dependentSex", DependentDocumentNumber: "dependentDocumentNumber", DependentFullName: "dependentFullName", EligibilityCategory: "eligibilityCategory", SpecificDocumentValidity: "specificDocumentValidity", VehicleOwner: "vehicleOwner", nationalInsuranceNumber: "nationalInsuranceNumber", CountryCode: "countryCode", CertificateNumber: "certificateNumber", MunicipalityOfRegistration: "municipalityOfRegistration", LocalityCode: "localityCode", MaidenName: "maidenName", StateCode: "stateCode", DateOfEntry: "dateOfEntry", MunicipalityCode: "municipalityCode", PollingStationCode: "pollingStationCode", SectionCode: "sectionCode", RegistrationCenterCode: "registrationCenterCode", StateName: "stateName", EffectiveDate: "effectiveDate", ParentsLastName: "parentsLastName", ParentsFirstName: "parentsFirstName", WorkRestriction: "workRestriction", SocialSecurityStatus: "socialSecurityStatus", LegalStatus: "legalStatus", HusbandName: "husbandName", CardAccessNumber: "cardAccessNumber" }; /** An enum indicating preffered camera position for document capturing. */ //# sourceMappingURL=types.js.map