UNPKG

@regulaforensics/document-reader

Version:

This is an npm module for Regula Document Reader SDK. It allows you to read various kinds of identification documents using your phone's camera.

286 lines (280 loc) 8.77 kB
export class DocumentType { name; id; iCAOCode; fDSID; type; format; mrz; isDeprecated; description; year; countryName; pageIndex; static fromJson(jsonObject) { if (jsonObject == null) return null; const result = new DocumentType(); result.name = jsonObject["name"]; result.id = jsonObject["documentID"]; result.iCAOCode = jsonObject["ICAOCode"]; result.fDSID = jsonObject["FDSID"]; result.type = jsonObject["dType"]; result.format = jsonObject["dFormat"]; result.mrz = jsonObject["dMRZ"]; result.isDeprecated = jsonObject["isDeprecated"]; result.description = jsonObject["dDescription"]; result.year = jsonObject["dYear"]; result.countryName = jsonObject["dCountryName"]; result.pageIndex = jsonObject["pageIndex"]; return result; } } export const DocFormat = { ID1: 0, ID2: 1, ID3: 2, NON: 3, A4: 4, ID3_x2: 5, ID2_TURKEY: 6, ID1_90: 10, ID1_180: 11, ID1_270: 12, ID2_180: 13, ID3_180: 14, CUSTOM: 1000, PHOTO: 1001, FLEXIBLE: 1002 }; export const DocType = { NotDefined: 0, Passport: 11, IdentityCard: 12, DiplomaticPassport: 13, ServicePassport: 14, SeamanIdentityDocument: 15, IdentityCardForResidence: 16, TravelDocument: 17, Other: 99, VisaID2: 29, VisaID3: 30, NationalIdentityCard: 20, SocialIdentityCard: 21, AliensIdentityCard: 22, PrivilegedIdentityCard: 23, ResidencePermitIdentityCard: 24, OriginCard: 25, EmergencyPassport: 26, AliensPassport: 27, AlternativeIdentityCard: 28, AuthorizationCard: 32, BeginnerPermit: 33, BorderCrossingCard: 34, ChauffeurLicense: 35, ChauffeurLicenseUnder18: 36, ChauffeurLicenseUnder21: 37, CommercialDrivingLicense: 38, CommercialDrivingLicenseInstructionalPermit: 39, CommercialDrivingLicenseUnder18: 40, CommercialDrivingLicenseUnder21: 41, CommercialInstructionPermit: 42, CommercialNewPermit: 43, ConcealedCarryLicense: 44, ConcealedFirearmPermit: 45, ConditionalDrivingLicense: 46, DepartmentOfVeteransAffairsIdentityCard: 47, DiplomaticDrivingLicense: 48, DrivingLicense: 49, DrivingLicenseInstructionalPermit: 50, DrivingLicenseInstructionalPermitUnder18: 51, DrivingLicenseInstructionalPermitUnder21: 52, DrivingLicenseLearnersPermit: 53, DrivingLicenseLearnersPermitUnder18: 54, DrivingLicenseLearnersPermitUnder21: 55, DrivingLicenseNovice: 56, DrivingLicenseNoviceUnder18: 57, DrivingLicenseNoviceUnder21: 58, DrivingLicenseRegisteredOffender: 59, DrivingLicenseRestrictedUnder18: 60, DrivingLicenseRestrictedUnder21: 61, DrivingLicenseTemporaryVisitor: 62, DrivingLicenseTemporaryVisitorUnder18: 63, DrivingLicenseTemporaryVisitorUnder21: 64, DrivingLicenseUnder18: 65, DrivingLicenseUnder21: 66, EmploymentDrivingPermit: 67, EnhancedChauffeurLicense: 68, EnhancedChauffeurLicenseUnder18: 69, EnhancedChauffeurLicenseUnder21: 70, EnhancedCommercialDrivingLicense: 71, EnhancedDrivingLicense: 72, EnhancedDrivingLicenseUnder18: 73, EnhancedDrivingLicenseUnder21: 74, EnhancedIdentityCard: 75, EnhancedIdentityCardUnder18: 76, EnhancedIdentityCardUnder21: 77, EnhancedOperatorsLicense: 78, FirearmsPermit: 79, FullProvisionalLicense: 80, FullProvisionalLicenseUnder18: 81, FullProvisionalLicenseUnder21: 82, GenevaConventionsIdentityCard: 83, GraduatedDrivingLicenseUnder18: 84, GraduatedDrivingLicenseUnder21: 85, GraduatedInstructionPermitUnder18: 86, GraduatedInstructionPermitUnder21: 87, GraduatedLicenseUnder18: 88, GraduatedLicenseUnder21: 89, HandgunCarryPermit: 90, IdentityAndPrivilegeCard: 91, IdentityCardMobilityImpaired: 92, IdentityCardRegisteredOffender: 93, IdentityCaremporaryVisitor: 94, IdentityCaremporaryVisitorUnder18: 95, IdentityCaremporaryVisitorUnder21: 96, IdentityCardUnder18: 97, IdentityCardUnder21: 98, IgnitionInterlockPermit: 100, ImmigrantVisa: 101, InstructionPermit: 102, InstructionPermitUnder18: 103, InstructionPermitUnder21: 104, InterimDrivingLicense: 105, InterimIdentityCard: 106, IntermediateDrivingLicense: 107, IntermediateDrivingLicenseUnder18: 108, IntermediateDrivingLicenseUnder21: 109, JuniorDrivingLicense: 110, LearnerInstructionalPermit: 111, LearnerLicense: 112, LearnerLicenseUnder18: 113, LearnerLicenseUnder21: 114, LearnerPermit: 115, LearnerPermitUnder18: 116, LearnerPermitUnder21: 117, LimitedLicense: 118, LimitedPermit: 119, LimiteermDrivingLicense: 120, LimiteermIdentityCard: 121, LiquorIdentityCard: 122, NewPermit: 123, NewPermitUnder18: 124, NewPermitUnder21: 125, NonUsCitizenDrivingLicense: 126, OccupationalDrivingLicense: 127, OneidaTribeOfIndiansIdentityCard: 128, OperatorLicense: 129, OperatorLicenseUnder18: 130, OperatorLicenseUnder21: 131, PermanentDrivingLicense: 132, PermitToReEnter: 133, ProbationaryAutoLicense: 134, ProbationaryDrivingLicenseUnder18: 135, ProbationaryDrivingLicenseUnder21: 136, ProbationaryVehicleSalespersonLicense: 137, ProvisionalDrivingLicense: 138, ProvisionalDrivingLicenseUnder18: 139, ProvisionalDrivingLicenseUnder21: 140, ProvisionalLicense: 141, ProvisionalLicenseUnder18: 142, ProvisionalLicenseUnder21: 143, PublicPassengerChauffeurLicense: 144, RacingAndGamingComissionCard: 145, RefugeeTravelDocument: 146, RenewalPermit: 147, RestrictedCommercialDrivingLicense: 148, RestrictedDrivingLicense: 149, RestrictedPermit: 150, SeasonalPermit: 151, SeasonalResidentIdentityCard: 152, SeniorCitizenIdentityCard: 153, SexOffender: 154, SocialSecurityCard: 155, TemporaryDrivingLicense: 156, TemporaryDrivingLicenseUnder18: 157, TemporaryDrivingLicenseUnder21: 158, TemporaryIdentityCard: 159, TemporaryInstructionPermitIdentityCard: 160, TemporaryInstructionPermitIdentityCardUnder18: 161, TemporaryInstructionPermitIdentityCardUnder21: 162, TemporaryVisitorDrivingLicense: 163, TemporaryVisitorDrivingLicenseUnder18: 164, TemporaryVisitorDrivingLicenseUnder21: 165, UniformedServicesIdentityCard: 166, VehicleSalespersonLicense: 167, WorkerIdentificationCredential: 168, CommercialDrivingLicenseNovice: 169, CommercialDrivingLicenseNoviceUnder18: 170, CommercialDrivingLicenseNoviceUnder21: 171, PassportCard: 172, PermanentResidentCard: 173, PersonalIdentificationVerification: 174, TemporaryOperatorLicense: 175, DrivingLicenseUnder19: 176, IdentityCardUnder19: 177, Visa: 178, TemporaryPassport: 179, VotingCard: 180, HealthCard: 181, CertificateOfCitizenship: 182, AddressCard: 183, AirportImmigrationCard: 184, AlienRegistrationCard: 185, APEHCard: 186, CouponToDrivingLicense: 187, CrewMemberCertificate: 188, DocumentForReturn: 189, ECard: 190, EmploymentCard: 191, HKSARImmigrationForm: 192, ImmigrantCard: 193, LabourCard: 194, LaissezPasser: 195, LawyerIdentityCertificate: 196, LicenseCard: 197, PassportStateless: 198, PassportChild: 199, PassportConsular: 200, PassportDiplomaticService: 201, PassportOfficial: 202, PassportProvisional: 203, PassportSpecial: 204, PermissionToTheLocalBorderTraffic: 205, RegistrationCertificate: 206, SEDESOLCard: 207, SocialCard: 208, TBCard: 209, VehiclePassport: 210, WDocument: 211, DiplomaticIdentityCard: 212, ConsularIdentityCard: 213, IncomeTaxCard: 214, ResidencePermit: 215, DocumentOfIdentity: 216, BorderCrossingPermit: 217, PassportLimitedValidity: 218, SIMCard: 219, TaxCard: 220, CompanyCard: 221, DomesticPassport: 222, IdentityCertificate: 223, ResidentIdCard: 224, ArmedForcesIdentityCard: 225, ProfessionalCard: 226, RegistrationStamp: 227, DriverCard: 228, DriverTrainingCertificate: 229, QualificationDrivingLicense: 230, MembershipCard: 231, PublicVehicleDriverAuthorityCard: 232, MarineLicense: 233, TemporaryLearnerDrivingLicense: 234, TemporaryCommercialDrivingLicense: 235, InterimInstructionalPermit: 236, CertificateOfCompetency: 237, CertificateOfProficiency: 238, TradeLicense: 239, PassportPage: 240, Invoice: 241, PassengerLocatorForm: 242 };