react-native-scanbot-sdk
Version:
Scanbot Document and Barcode Scanner SDK React Native Plugin for Android and iOS
1,719 lines (1,465 loc) • 58.7 kB
JavaScript
/// Auto-generated. Modifications will be overwritten.
/// Generated from core/document-schemas/DocumentsModel.yaml
/// All possible root document types.
export const MRZDocumentType = 'MRZ';
export const ParsedDeAddressDocumentType = 'ParsedDeAddress';
export const DeIdCardFrontDocumentType = 'DeIdCardFront';
export const DeIdCardBackDocumentType = 'DeIdCardBack';
export const DePassportDocumentType = 'DePassport';
export const EuropeanDriverLicenseFrontDocumentType = 'EuropeanDriverLicenseFront';
export const EuropeanDriverLicenseBackDocumentType = 'EuropeanDriverLicenseBack';
export const EuropeanDriverLicenseBackCategoryDocumentType = 'Category';
export const EuropeanDriverLicenseBackCategoriesDocumentType = 'Categories';
export const EuropeanDriverLicenseBackCategoriesADocumentType = 'A';
export const EuropeanDriverLicenseBackCategoriesA1DocumentType = 'A1';
export const EuropeanDriverLicenseBackCategoriesA2DocumentType = 'A2';
export const EuropeanDriverLicenseBackCategoriesAMDocumentType = 'AM';
export const EuropeanDriverLicenseBackCategoriesBDocumentType = 'B';
export const EuropeanDriverLicenseBackCategoriesB1DocumentType = 'B1';
export const EuropeanDriverLicenseBackCategoriesBEDocumentType = 'BE';
export const EuropeanDriverLicenseBackCategoriesCDocumentType = 'C';
export const EuropeanDriverLicenseBackCategoriesC1DocumentType = 'C1';
export const EuropeanDriverLicenseBackCategoriesC1EDocumentType = 'C1E';
export const EuropeanDriverLicenseBackCategoriesCEDocumentType = 'CE';
export const EuropeanDriverLicenseBackCategoriesDDocumentType = 'D';
export const EuropeanDriverLicenseBackCategoriesD1DocumentType = 'D1';
export const EuropeanDriverLicenseBackCategoriesD1EDocumentType = 'D1E';
export const EuropeanDriverLicenseBackCategoriesDEDocumentType = 'DE';
export const EuropeanDriverLicenseBackCategoriesLDocumentType = 'L';
export const EuropeanDriverLicenseBackCategoriesTDocumentType = 'T';
export const DeResidencePermitFrontDocumentType = 'DeResidencePermitFront';
export const DeResidencePermitBackDocumentType = 'DeResidencePermitBack';
export const EuropeanHealthInsuranceCardDocumentType = 'EuropeanHealthInsuranceCard';
export const DeHealthInsuranceCardFrontDocumentType = 'DeHealthInsuranceCardFront';
export const BrIdCardFrontDocumentType = 'BrIdCardFront';
export const BrIdCardBackDocumentType = 'BrIdCardBack';
export const BrIdCardFrontPhotoOnlyDocumentType = 'BrIdCardFrontPhotoOnly';
export const CnEntryAndExitPermitBackDocumentType = 'CnEntryAndExitPermitBack';
export const CnEntryAndExitPermitFrontDocumentType = 'CnEntryAndExitPermitFront';
export const CnPermanentResidentCardFrontDocumentType = 'CnPermanentResidentCardFront';
export const HkIdentityCardFrontDocumentType = 'HkIdentityCardFront';
export const TwEntryAndExitPermitDocumentType = 'TwEntryAndExitPermit';
export const MoIdentityCardBackDocumentType = 'MoIdentityCardBack';
export const MoIdentityCardFrontDocumentType = 'MoIdentityCardFront';
/** MRZ part of the document */
export class MRZ {
get document() {
return this._document;
}
constructor(document) {
if (document.type.name !== this.requiredDocumentType()) {
throw new Error(`Expected document type ${this.requiredDocumentType()}, got ${document.type.name}`);
}
this._document = document;
}
requiredDocumentType() {
return MRZDocumentType;
}
/** Birth date */
get birthDate() {
return this.document.fields.find(f => f.type.name === 'BirthDate');
}
/** Check digit birth date */
get checkDigitBirthDate() {
return this.document.fields.find(f => f.type.name === 'CheckDigitBirthDate');
}
/** Check digit document number */
get checkDigitDocumentNumber() {
return this.document.fields.find(f => f.type.name === 'CheckDigitDocumentNumber');
}
/** Check digit expiry date */
get checkDigitExpiryDate() {
return this.document.fields.find(f => f.type.name === 'CheckDigitExpiryDate');
}
/** Check digit general */
get checkDigitGeneral() {
return this.document.fields.find(f => f.type.name === 'CheckDigitGeneral');
}
/** Check digit personal number */
get checkDigitPersonalNumber() {
return this.document.fields.find(f => f.type.name === 'CheckDigitPersonalNumber');
}
/** Date of issuance */
get dateOfIssuance() {
return this.document.fields.find(f => f.type.name === 'DateOfIssuance');
}
/** Document number */
get documentNumber() {
return this.document.fields.find(f => f.type.name === 'DocumentNumber');
}
/** Document type from the DocumentType enum */
get documentType() {
return this.document.fields.find(f => f.type.name === 'DocumentType');
}
/** Document type code */
get documentTypeCode() {
return this.document.fields.find(f => f.type.name === 'DocumentTypeCode');
}
/** Expiry date */
get expiryDate() {
return this.document.fields.find(f => f.type.name === 'ExpiryDate');
}
/** Gender */
get gender() {
return this.document.fields.find(f => f.type.name === 'Gender');
}
/** Given names */
get givenNames() {
return this.document.fields.find(f => f.type.name === 'GivenNames');
}
/** Issuing authority */
get issuingAuthority() {
return this.document.fields.find(f => f.type.name === 'IssuingAuthority');
}
/** Language code */
get languageCode() {
return this.document.fields.find(f => f.type.name === 'LanguageCode');
}
/** Nationality */
get nationality() {
return this.document.fields.find(f => f.type.name === 'Nationality');
}
/** Office of issuance */
get officeOfIssuance() {
return this.document.fields.find(f => f.type.name === 'OfficeOfIssuance');
}
/** TD1 Optional field (line 2) */
get optional1() {
return this.document.fields.find(f => f.type.name === 'Optional1');
}
/** TD1 Optional field (line 3) */
get optional2() {
return this.document.fields.find(f => f.type.name === 'Optional2');
}
/** PIN code */
get pinCode() {
return this.document.fields.find(f => f.type.name === 'PINCode');
}
/** Personal number */
get personalNumber() {
return this.document.fields.find(f => f.type.name === 'PersonalNumber');
}
/** Surname */
get surname() {
return this.document.fields.find(f => f.type.name === 'Surname');
}
/** Travel document type */
get travelDocType() {
return this.document.fields.find(f => f.type.name === 'TravelDocType');
}
/** Travel document type variant */
get travelDocTypeVariant() {
return this.document.fields.find(f => f.type.name === 'TravelDocTypeVariant');
}
/** Unknown */
get unknown() {
return this.document.fields.find(f => f.type.name === 'Unknown');
}
/** Version number */
get versionNumber() {
return this.document.fields.find(f => f.type.name === 'VersionNumber');
}
/** MRV-A/MRV-B (Travel Visa) Optional field */
get visaOptional() {
return this.document.fields.find(f => f.type.name === 'VisaOptional');
}
}
/** Parsed German Address part of the document */
export class ParsedDeAddress {
get document() {
return this._document;
}
constructor(document) {
if (document.type.name !== this.requiredDocumentType()) {
throw new Error(`Expected document type ${this.requiredDocumentType()}, got ${document.type.name}`);
}
this._document = document;
}
requiredDocumentType() {
return ParsedDeAddressDocumentType;
}
/** District or city area corresponding to postal code */
get district() {
return this.document.fields.find(f => f.type.name === 'District');
}
/** Additional information to district or city area (e.g. Ortsteil, Stadtteil) */
get districtAddition() {
return this.document.fields.find(f => f.type.name === 'DistrictAddition');
}
/** House number */
get houseNumber() {
return this.document.fields.find(f => f.type.name === 'HouseNumber');
}
/** postal code */
get postalCode() {
return this.document.fields.find(f => f.type.name === 'PostalCode');
}
/** Street name */
get streetName() {
return this.document.fields.find(f => f.type.name === 'StreetName');
}
}
/** German ID card, front side */
export class DeIdCardFront {
get document() {
return this._document;
}
constructor(document) {
if (document.type.name !== this.requiredDocumentType()) {
throw new Error(`Expected document type ${this.requiredDocumentType()}, got ${document.type.name}`);
}
this._document = document;
}
requiredDocumentType() {
return DeIdCardFrontDocumentType;
}
/** Birth date */
get birthDate() {
return this.document.fields.find(f => f.type.name === 'BirthDate');
}
/** Birthplace */
get birthplace() {
return this.document.fields.find(f => f.type.name === 'Birthplace');
}
/** Six digit card access number */
get cardAccessNumber() {
return this.document.fields.find(f => f.type.name === 'CardAccessNumber');
}
/** Expiry date */
get expiryDate() {
return this.document.fields.find(f => f.type.name === 'ExpiryDate');
}
/** Given names */
get givenNames() {
return this.document.fields.find(f => f.type.name === 'GivenNames');
}
/** Document ID number (in the top-right corner) */
get id() {
return this.document.fields.find(f => f.type.name === 'ID');
}
/** Maiden name */
get maidenName() {
return this.document.fields.find(f => f.type.name === 'MaidenName');
}
/** Nationality */
get nationality() {
return this.document.fields.find(f => f.type.name === 'Nationality');
}
/** Photo image */
get photo() {
return this.document.fields.find(f => f.type.name === 'Photo');
}
/** Series of the document. The format is YYMM. */
get series() {
return this.document.fields.find(f => f.type.name === 'Series');
}
/** Signature image */
get signature() {
return this.document.fields.find(f => f.type.name === 'Signature');
}
/** Surname */
get surname() {
return this.document.fields.find(f => f.type.name === 'Surname');
}
}
/** German ID card, back side */
export class DeIdCardBack {
get document() {
return this._document;
}
constructor(document) {
if (document.type.name !== this.requiredDocumentType()) {
throw new Error(`Expected document type ${this.requiredDocumentType()}, got ${document.type.name}`);
}
this._document = document;
}
requiredDocumentType() {
return DeIdCardBackDocumentType;
}
/** Raw Address text value */
get address() {
return this.document.fields.find(f => f.type.name === 'Address');
}
/** Eye color */
get eyeColor() {
return this.document.fields.find(f => f.type.name === 'EyeColor');
}
/** Height */
get height() {
return this.document.fields.find(f => f.type.name === 'Height');
}
/** Issue date */
get issueDate() {
return this.document.fields.find(f => f.type.name === 'IssueDate');
}
/** Issuing authority */
get issuingAuthority() {
return this.document.fields.find(f => f.type.name === 'IssuingAuthority');
}
/** Pseudonym */
get pseudonym() {
return this.document.fields.find(f => f.type.name === 'Pseudonym');
}
/** Raw MRZ text value */
get rawMRZ() {
return this.document.fields.find(f => f.type.name === 'RawMRZ');
}
/** Series of the document. The format is YYMM. */
get series() {
return this.document.fields.find(f => f.type.name === 'Series');
}
/** The child document of type "MRZ". */
get mrz() {
const child = this.document.children.find(c => c.type.name === 'MRZ');
return new MRZ(child);
}
/** The child document of type "ParsedDeAddress". */
get parsedDeAddress() {
const child = this.document.children.find(c => c.type.name === 'ParsedDeAddress');
return new ParsedDeAddress(child);
}
}
/** German travel passport (Reisepass) */
export class DePassport {
get document() {
return this._document;
}
constructor(document) {
if (document.type.name !== this.requiredDocumentType()) {
throw new Error(`Expected document type ${this.requiredDocumentType()}, got ${document.type.name}`);
}
this._document = document;
}
requiredDocumentType() {
return DePassportDocumentType;
}
/** Birth date */
get birthDate() {
return this.document.fields.find(f => f.type.name === 'BirthDate');
}
/** Birthplace */
get birthplace() {
return this.document.fields.find(f => f.type.name === 'Birthplace');
}
/** Country code */
get countryCode() {
return this.document.fields.find(f => f.type.name === 'CountryCode');
}
/** Expiry date */
get expiryDate() {
return this.document.fields.find(f => f.type.name === 'ExpiryDate');
}
/** Gender */
get gender() {
return this.document.fields.find(f => f.type.name === 'Gender');
}
/** Given names */
get givenNames() {
return this.document.fields.find(f => f.type.name === 'GivenNames');
}
/** Document ID number (in the top-right corner) */
get id() {
return this.document.fields.find(f => f.type.name === 'ID');
}
/** Issue date */
get issueDate() {
return this.document.fields.find(f => f.type.name === 'IssueDate');
}
/** Issuing authority */
get issuingAuthority() {
return this.document.fields.find(f => f.type.name === 'IssuingAuthority');
}
/** Maiden name */
get maidenName() {
return this.document.fields.find(f => f.type.name === 'MaidenName');
}
/** Nationality */
get nationality() {
return this.document.fields.find(f => f.type.name === 'Nationality');
}
/** Passport type */
get passportType() {
return this.document.fields.find(f => f.type.name === 'PassportType');
}
/** Photo image */
get photo() {
return this.document.fields.find(f => f.type.name === 'Photo');
}
/** Raw MRZ text value */
get rawMRZ() {
return this.document.fields.find(f => f.type.name === 'RawMRZ');
}
/** Signature image */
get signature() {
return this.document.fields.find(f => f.type.name === 'Signature');
}
/** Surname */
get surname() {
return this.document.fields.find(f => f.type.name === 'Surname');
}
/** The child document of type "MRZ". */
get mrz() {
const child = this.document.children.find(c => c.type.name === 'MRZ');
return new MRZ(child);
}
}
/** European driver license, front side */
export class EuropeanDriverLicenseFront {
get document() {
return this._document;
}
constructor(document) {
if (document.type.name !== this.requiredDocumentType()) {
throw new Error(`Expected document type ${this.requiredDocumentType()}, got ${document.type.name}`);
}
this._document = document;
}
requiredDocumentType() {
return EuropeanDriverLicenseFrontDocumentType;
}
/** Address (Field 8.) */
get address() {
return this.document.fields.find(f => f.type.name === 'Address');
}
/** Administrative number (Field 10.) */
get administrativeNumber() {
return this.document.fields.find(f => f.type.name === 'AdministrativeNumber');
}
/** Barcode */
get barcode() {
return this.document.fields.find(f => f.type.name === 'Barcode');
}
/** Birth date (Field 3.) */
get birthDate() {
return this.document.fields.find(f => f.type.name === 'BirthDate');
}
/** Birthplace (Field 3.) */
get birthplace() {
return this.document.fields.find(f => f.type.name === 'Birthplace');
}
/** Citizenship (Field 4f.) */
get citizenship() {
return this.document.fields.find(f => f.type.name === 'Citizenship');
}
/** Country of the driver license */
get country() {
return this.document.fields.find(f => f.type.name === 'Country');
}
/** Expiry date (Field 4b.) */
get expiryDate() {
return this.document.fields.find(f => f.type.name === 'ExpiryDate');
}
/** Gender (Field 4e.) */
get gender() {
return this.document.fields.find(f => f.type.name === 'Gender');
}
/** Given names (Field 2.) */
get givenNames() {
return this.document.fields.find(f => f.type.name === 'GivenNames');
}
/** Document ID number (in the top-right corner, Field 5.) */
get id() {
return this.document.fields.find(f => f.type.name === 'ID');
}
/** Issue date (Field 4a.) */
get issueDate() {
return this.document.fields.find(f => f.type.name === 'IssueDate');
}
/** Issuing authority (Field 4c.) */
get issuingAuthority() {
return this.document.fields.find(f => f.type.name === 'IssuingAuthority');
}
/** Driver's license categories (Field 9.) */
get licenseCategories() {
return this.document.fields.find(f => f.type.name === 'LicenseCategories');
}
/** MRZ part of the document */
get mrz() {
return this.document.fields.find(f => f.type.name === 'MRZ');
}
/** Photo image */
get photo() {
return this.document.fields.find(f => f.type.name === 'Photo');
}
/** Restrictions applied for the driver's license (Field 12.) */
get restrictions() {
return this.document.fields.find(f => f.type.name === 'Restrictions');
}
/** Serial number (Field 5b. on Driver Qualification Card) */
get serialNumber() {
return this.document.fields.find(f => f.type.name === 'SerialNumber');
}
/** Signature image (Field 7.) */
get signature() {
return this.document.fields.find(f => f.type.name === 'Signature');
}
/** Surname (Field 1.) */
get surname() {
return this.document.fields.find(f => f.type.name === 'Surname');
}
}
/** European driver license, back side */
export class EuropeanDriverLicenseBack {
get document() {
return this._document;
}
constructor(document) {
if (document.type.name !== this.requiredDocumentType()) {
throw new Error(`Expected document type ${this.requiredDocumentType()}, got ${document.type.name}`);
}
this._document = document;
}
requiredDocumentType() {
return EuropeanDriverLicenseBackDocumentType;
}
/** Country of the driver license */
get country() {
return this.document.fields.find(f => f.type.name === 'Country');
}
/** Restrictions applied for the driver's license (Field 12.) */
get restrictions() {
return this.document.fields.find(f => f.type.name === 'Restrictions');
}
/** The child document of type "Categories". */
get categories() {
const child = this.document.children.find(c => c.type.name === 'Categories');
return new EuropeanDriverLicenseBack.Categories(child);
}
}
(function (_EuropeanDriverLicenseBack) {
class Category {
get document() {
return this._document;
}
constructor(document) {
if (document.type.name !== this.requiredDocumentType()) {
throw new Error(`Expected document type ${this.requiredDocumentType()}, got ${document.type.name}`);
}
this._document = document;
}
/** Restrictions (Column 12.) */
get restrictions() {
return this.document.fields.find(f => f.type.name === 'Restrictions');
}
/** Valid from (Column 10.) */
get validFrom() {
return this.document.fields.find(f => f.type.name === 'ValidFrom');
}
/** Valid until (Column 11.) */
get validUntil() {
return this.document.fields.find(f => f.type.name === 'ValidUntil');
}
}
_EuropeanDriverLicenseBack.Category = Category;
class Categories {
get document() {
return this._document;
}
constructor(document) {
if (document.type.name !== this.requiredDocumentType()) {
throw new Error(`Expected document type ${this.requiredDocumentType()}, got ${document.type.name}`);
}
this._document = document;
}
requiredDocumentType() {
return EuropeanDriverLicenseBackCategoriesDocumentType;
}
/** The child document of type "A". */
get a() {
const child = this.document.children.find(c => c.type.name === 'A');
return new EuropeanDriverLicenseBack.Categories.A(child);
}
/** The child document of type "A1". */
get a1() {
const child = this.document.children.find(c => c.type.name === 'A1');
return new EuropeanDriverLicenseBack.Categories.A1(child);
}
/** The child document of type "A2". */
get a2() {
const child = this.document.children.find(c => c.type.name === 'A2');
return new EuropeanDriverLicenseBack.Categories.A2(child);
}
/** The child document of type "AM". */
get am() {
const child = this.document.children.find(c => c.type.name === 'AM');
return new EuropeanDriverLicenseBack.Categories.AM(child);
}
/** The child document of type "B". */
get b() {
const child = this.document.children.find(c => c.type.name === 'B');
return new EuropeanDriverLicenseBack.Categories.B(child);
}
/** The child document of type "B1". */
get b1() {
const child = this.document.children.find(c => c.type.name === 'B1');
return child ? new EuropeanDriverLicenseBack.Categories.B1(child) : undefined;
}
/** The child document of type "BE". */
get be() {
const child = this.document.children.find(c => c.type.name === 'BE');
return new EuropeanDriverLicenseBack.Categories.BE(child);
}
/** The child document of type "C". */
get c() {
const child = this.document.children.find(c => c.type.name === 'C');
return new EuropeanDriverLicenseBack.Categories.C(child);
}
/** The child document of type "C1". */
get c1() {
const child = this.document.children.find(c => c.type.name === 'C1');
return new EuropeanDriverLicenseBack.Categories.C1(child);
}
/** The child document of type "C1E". */
get c1E() {
const child = this.document.children.find(c => c.type.name === 'C1E');
return new EuropeanDriverLicenseBack.Categories.C1E(child);
}
/** The child document of type "CE". */
get ce() {
const child = this.document.children.find(c => c.type.name === 'CE');
return new EuropeanDriverLicenseBack.Categories.CE(child);
}
/** The child document of type "D". */
get d() {
const child = this.document.children.find(c => c.type.name === 'D');
return new EuropeanDriverLicenseBack.Categories.D(child);
}
/** The child document of type "D1". */
get d1() {
const child = this.document.children.find(c => c.type.name === 'D1');
return new EuropeanDriverLicenseBack.Categories.D1(child);
}
/** The child document of type "D1E". */
get d1E() {
const child = this.document.children.find(c => c.type.name === 'D1E');
return new EuropeanDriverLicenseBack.Categories.D1E(child);
}
/** The child document of type "DE". */
get de() {
const child = this.document.children.find(c => c.type.name === 'DE');
return new EuropeanDriverLicenseBack.Categories.DE(child);
}
/** The child document of type "L". */
get l() {
const child = this.document.children.find(c => c.type.name === 'L');
return new EuropeanDriverLicenseBack.Categories.L(child);
}
/** The child document of type "T". */
get t() {
const child = this.document.children.find(c => c.type.name === 'T');
return new EuropeanDriverLicenseBack.Categories.T(child);
}
}
_EuropeanDriverLicenseBack.Categories = Categories;
(function (_Categories) {
class A extends Category {
constructor(document) {
super(document);
}
requiredDocumentType() {
return EuropeanDriverLicenseBackCategoriesADocumentType;
}
}
_Categories.A = A;
class A1 extends Category {
constructor(document) {
super(document);
}
requiredDocumentType() {
return EuropeanDriverLicenseBackCategoriesA1DocumentType;
}
}
_Categories.A1 = A1;
class A2 extends Category {
constructor(document) {
super(document);
}
requiredDocumentType() {
return EuropeanDriverLicenseBackCategoriesA2DocumentType;
}
}
_Categories.A2 = A2;
class AM extends Category {
constructor(document) {
super(document);
}
requiredDocumentType() {
return EuropeanDriverLicenseBackCategoriesAMDocumentType;
}
}
_Categories.AM = AM;
class B extends Category {
constructor(document) {
super(document);
}
requiredDocumentType() {
return EuropeanDriverLicenseBackCategoriesBDocumentType;
}
}
_Categories.B = B;
class B1 extends Category {
constructor(document) {
super(document);
}
requiredDocumentType() {
return EuropeanDriverLicenseBackCategoriesB1DocumentType;
}
}
_Categories.B1 = B1;
class BE extends Category {
constructor(document) {
super(document);
}
requiredDocumentType() {
return EuropeanDriverLicenseBackCategoriesBEDocumentType;
}
}
_Categories.BE = BE;
class C extends Category {
constructor(document) {
super(document);
}
requiredDocumentType() {
return EuropeanDriverLicenseBackCategoriesCDocumentType;
}
}
_Categories.C = C;
class C1 extends Category {
constructor(document) {
super(document);
}
requiredDocumentType() {
return EuropeanDriverLicenseBackCategoriesC1DocumentType;
}
}
_Categories.C1 = C1;
class C1E extends Category {
constructor(document) {
super(document);
}
requiredDocumentType() {
return EuropeanDriverLicenseBackCategoriesC1EDocumentType;
}
}
_Categories.C1E = C1E;
class CE extends Category {
constructor(document) {
super(document);
}
requiredDocumentType() {
return EuropeanDriverLicenseBackCategoriesCEDocumentType;
}
}
_Categories.CE = CE;
class D extends Category {
constructor(document) {
super(document);
}
requiredDocumentType() {
return EuropeanDriverLicenseBackCategoriesDDocumentType;
}
}
_Categories.D = D;
class D1 extends Category {
constructor(document) {
super(document);
}
requiredDocumentType() {
return EuropeanDriverLicenseBackCategoriesD1DocumentType;
}
}
_Categories.D1 = D1;
class D1E extends Category {
constructor(document) {
super(document);
}
requiredDocumentType() {
return EuropeanDriverLicenseBackCategoriesD1EDocumentType;
}
}
_Categories.D1E = D1E;
class DE extends Category {
constructor(document) {
super(document);
}
requiredDocumentType() {
return EuropeanDriverLicenseBackCategoriesDEDocumentType;
}
}
_Categories.DE = DE;
class L extends Category {
constructor(document) {
super(document);
}
requiredDocumentType() {
return EuropeanDriverLicenseBackCategoriesLDocumentType;
}
}
_Categories.L = L;
class T extends Category {
constructor(document) {
super(document);
}
requiredDocumentType() {
return EuropeanDriverLicenseBackCategoriesTDocumentType;
}
}
_Categories.T = T;
})(Categories || (Categories = _EuropeanDriverLicenseBack.Categories || (_EuropeanDriverLicenseBack.Categories = {})));
})(EuropeanDriverLicenseBack || (EuropeanDriverLicenseBack = {}));
/** German Residence Permit (Aufenthaltstitel), Front side */
export class DeResidencePermitFront {
get document() {
return this._document;
}
constructor(document) {
if (document.type.name !== this.requiredDocumentType()) {
throw new Error(`Expected document type ${this.requiredDocumentType()}, got ${document.type.name}`);
}
this._document = document;
}
requiredDocumentType() {
return DeResidencePermitFrontDocumentType;
}
/** Birth date (Geburtsdatum) */
get birthDate() {
return this.document.fields.find(f => f.type.name === 'BirthDate');
}
/** Six digit card access number */
get cardAccessNumber() {
return this.document.fields.find(f => f.type.name === 'CardAccessNumber');
}
/** Expiry date (Gültig bis) */
get expiryDate() {
return this.document.fields.find(f => f.type.name === 'ExpiryDate');
}
/** Gender (Geschlecht) */
get gender() {
return this.document.fields.find(f => f.type.name === 'Gender');
}
/** Given names */
get givenNames() {
return this.document.fields.find(f => f.type.name === 'GivenNames');
}
/** Document ID number (in the top-right corner) */
get id() {
return this.document.fields.find(f => f.type.name === 'ID');
}
/** Nationality (Staatsangehörigkeit) */
get nationality() {
return this.document.fields.find(f => f.type.name === 'Nationality');
}
/** Photo image */
get photo() {
return this.document.fields.find(f => f.type.name === 'Photo');
}
/** Place of issue (Ausstellungsort) */
get placeOfIssue() {
return this.document.fields.find(f => f.type.name === 'PlaceOfIssue');
}
/** Remarks (Anmerkungen) */
get remarks() {
return this.document.fields.find(f => f.type.name === 'Remarks');
}
/** Signature image */
get signature() {
return this.document.fields.find(f => f.type.name === 'Signature');
}
/** Surname */
get surname() {
return this.document.fields.find(f => f.type.name === 'Surname');
}
/** Title type (Art des Titels) */
get titleType() {
return this.document.fields.find(f => f.type.name === 'TitleType');
}
/** Valid from date (Gültig ab) */
get validFrom() {
return this.document.fields.find(f => f.type.name === 'ValidFrom');
}
}
/** German Residence Permit (Aufenthaltstitel), Back side */
export class DeResidencePermitBack {
get document() {
return this._document;
}
constructor(document) {
if (document.type.name !== this.requiredDocumentType()) {
throw new Error(`Expected document type ${this.requiredDocumentType()}, got ${document.type.name}`);
}
this._document = document;
}
requiredDocumentType() {
return DeResidencePermitBackDocumentType;
}
/** Address (Anschrift) */
get address() {
return this.document.fields.find(f => f.type.name === 'Address');
}
/** Birth date (Geburtsdatum) */
get birthDate() {
return this.document.fields.find(f => f.type.name === 'BirthDate');
}
/** Birthplace (Geburtsort) */
get birthplace() {
return this.document.fields.find(f => f.type.name === 'Birthplace');
}
/** Eye color (Augenfarbe) */
get eyeColor() {
return this.document.fields.find(f => f.type.name === 'EyeColor');
}
/** Gender (Geschlecht) */
get gender() {
return this.document.fields.find(f => f.type.name === 'Gender');
}
/** Height (Größe) */
get height() {
return this.document.fields.find(f => f.type.name === 'Height');
}
/** Issuing authority (Ausländerbehörde) */
get issuingAuthority() {
return this.document.fields.find(f => f.type.name === 'IssuingAuthority');
}
/** Nationality (Staatsangehörigkeit) */
get nationality() {
return this.document.fields.find(f => f.type.name === 'Nationality');
}
/** Raw MRZ text value */
get rawMRZ() {
return this.document.fields.find(f => f.type.name === 'RawMRZ');
}
/** Remarks (Anmerkungen) */
get remarks() {
return this.document.fields.find(f => f.type.name === 'Remarks');
}
/** The child document of type "MRZ". */
get mrz() {
const child = this.document.children.find(c => c.type.name === 'MRZ');
return new MRZ(child);
}
/** The child document of type "ParsedDeAddress". */
get parsedDeAddress() {
const child = this.document.children.find(c => c.type.name === 'ParsedDeAddress');
return new ParsedDeAddress(child);
}
}
/** European Health Insurance Card (EHIC). Supports formats with both four and five lines of data.
*/
export class EuropeanHealthInsuranceCard {
get document() {
return this._document;
}
constructor(document) {
if (document.type.name !== this.requiredDocumentType()) {
throw new Error(`Expected document type ${this.requiredDocumentType()}, got ${document.type.name}`);
}
this._document = document;
}
requiredDocumentType() {
return EuropeanHealthInsuranceCardDocumentType;
}
/** Barcode image (only present in some formats) */
get barcode() {
return this.document.fields.find(f => f.type.name === 'Barcode');
}
/** Birth date */
get birthDate() {
return this.document.fields.find(f => f.type.name === 'BirthDate');
}
/** Card number */
get cardNumber() {
return this.document.fields.find(f => f.type.name === 'CardNumber');
}
/** Country code (ISO 3166-1 alpha-2) */
get countryCode() {
return this.document.fields.find(f => f.type.name === 'CountryCode');
}
/** Expiry date */
get expiryDate() {
return this.document.fields.find(f => f.type.name === 'ExpiryDate');
}
/** Given names */
get givenNames() {
return this.document.fields.find(f => f.type.name === 'GivenNames');
}
/** Issuer name */
get issuerName() {
return this.document.fields.find(f => f.type.name === 'IssuerName');
}
/** Issuer number */
get issuerNumber() {
return this.document.fields.find(f => f.type.name === 'IssuerNumber');
}
/** Personal number */
get personalNumber() {
return this.document.fields.find(f => f.type.name === 'PersonalNumber');
}
/** Signature image */
get signature() {
return this.document.fields.find(f => f.type.name === 'Signature');
}
/** Surname */
get surname() {
return this.document.fields.find(f => f.type.name === 'Surname');
}
}
/** Front side of the German health insurance card (elektronische Gesundheitskarte).
For the backside, see EuropeanHealthInsuranceCard.
*/
export class DeHealthInsuranceCardFront {
get document() {
return this._document;
}
constructor(document) {
if (document.type.name !== this.requiredDocumentType()) {
throw new Error(`Expected document type ${this.requiredDocumentType()}, got ${document.type.name}`);
}
this._document = document;
}
requiredDocumentType() {
return DeHealthInsuranceCardFrontDocumentType;
}
/** Six digit card access number */
get cardAccessNumber() {
return this.document.fields.find(f => f.type.name === 'CardAccessNumber');
}
/** Issuer name */
get issuerName() {
return this.document.fields.find(f => f.type.name === 'IssuerName');
}
/** Issuer number (Versicherung bzw. Kennnummer des Trägers) */
get issuerNumber() {
return this.document.fields.find(f => f.type.name === 'IssuerNumber');
}
/** Full name with title */
get name() {
return this.document.fields.find(f => f.type.name === 'Name');
}
/** Personal number (Versichertennummer) */
get personalNumber() {
return this.document.fields.find(f => f.type.name === 'PersonalNumber');
}
}
/** Brazilian National Identity Card (Registro Geral) */
export class BrIdCardFront {
get document() {
return this._document;
}
constructor(document) {
if (document.type.name !== this.requiredDocumentType()) {
throw new Error(`Expected document type ${this.requiredDocumentType()}, got ${document.type.name}`);
}
this._document = document;
}
requiredDocumentType() {
return BrIdCardFrontDocumentType;
}
/** Código de Barras - Barcode */
get barcode() {
return this.document.fields.find(f => f.type.name === 'Barcode');
}
/** Birth date */
get birthDate() {
return this.document.fields.find(f => f.type.name === 'BirthDate');
}
/** Birthplace */
get birthplace() {
return this.document.fields.find(f => f.type.name === 'Birthplace');
}
/** Tipo Sanguíneo/Fator RH - Blood type and RH factor */
get bloodType() {
return this.document.fields.find(f => f.type.name === 'BloodType');
}
/** Dados do Registro Civil - Civil Registry Details */
get civilRegistryDetails() {
return this.document.fields.find(f => f.type.name === 'CivilRegistryDetails');
}
/** CNH (Carteira Nacional de Habilitação) - Driver’s license number */
get driverLicenseNumber() {
return this.document.fields.find(f => f.type.name === 'DriverLicenseNumber');
}
/** Expiry date */
get expiryDate() {
return this.document.fields.find(f => f.type.name === 'ExpiryDate');
}
/** Polegar Direito - Right thumbprint */
get fingerprint() {
return this.document.fields.find(f => f.type.name === 'Fingerprint');
}
/** Gender */
get gender() {
return this.document.fields.find(f => f.type.name === 'Gender');
}
/** Given names */
get givenNames() {
return this.document.fields.find(f => f.type.name === 'GivenNames');
}
/** CNS (Cartão Nacional de Saúde) - National Health Card number */
get healthCardNumber() {
return this.document.fields.find(f => f.type.name === 'HealthCardNumber');
}
/** DNI (Documento Nacional de Identidade) - National Identity Document number */
get id() {
return this.document.fields.find(f => f.type.name === 'ID');
}
/** Data de Expedição - Date the document was issued */
get issueDate() {
return this.document.fields.find(f => f.type.name === 'IssueDate');
}
/** Órgão Expedidor - Issuing Authority */
get issuingAuthority() {
return this.document.fields.find(f => f.type.name === 'IssuingAuthority');
}
/** Assinatura do Diretor - Signature of the issuing authority */
get issuingAuthoritySignature() {
return this.document.fields.find(f => f.type.name === 'IssuingAuthoritySignature');
}
/** Certificado Militar - Military certificate number */
get militaryCertificateNumber() {
return this.document.fields.find(f => f.type.name === 'MilitaryCertificateNumber');
}
/** Nacionalidade - Nationality */
get nationality() {
return this.document.fields.find(f => f.type.name === 'Nationality');
}
/** Observações - Observations */
get observations() {
return this.document.fields.find(f => f.type.name === 'Observations');
}
/** Pais - Parents */
get parents() {
return this.document.fields.find(f => f.type.name === 'Parents');
}
/** Registro Geral (RG) - General Registration number, main ID number */
get personalNumber() {
return this.document.fields.find(f => f.type.name === 'PersonalNumber');
}
/** Photo image */
get photo() {
return this.document.fields.find(f => f.type.name === 'Photo');
}
/** Local de Emissão - Place of Issue */
get placeOfIssue() {
return this.document.fields.find(f => f.type.name === 'PlaceOfIssue');
}
/** Identidade Profissional - Professional identity number */
get professionalIdentityNumber() {
return this.document.fields.find(f => f.type.name === 'ProfessionalIdentityNumber');
}
/** Assinatura - Signature */
get signature() {
return this.document.fields.find(f => f.type.name === 'Signature');
}
/** NIS/PIS/PASEP - Social Security and Employment benefits number */
get socialSecurityNumber() {
return this.document.fields.find(f => f.type.name === 'SocialSecurityNumber');
}
/** UF - Brazilian state code for the Work Card */
get stateCode() {
return this.document.fields.find(f => f.type.name === 'StateCode');
}
/** Surname */
get surname() {
return this.document.fields.find(f => f.type.name === 'Surname');
}
/** CPF (Cadastro de Pessoas Físicas) - Brazilian taxpayer number */
get taxpayerNumber() {
return this.document.fields.find(f => f.type.name === 'TaxpayerNumber');
}
/** Título de Eleitor - Voter registration number */
get voterRegistrationNumber() {
return this.document.fields.find(f => f.type.name === 'VoterRegistrationNumber');
}
/** CTPS (Carteira de Trabalho e Previdência Social) - Work Card number */
get workCardNumber() {
return this.document.fields.find(f => f.type.name === 'WorkCardNumber');
}
/** Série - Series number associated with the Work Card */
get workCardSeries() {
return this.document.fields.find(f => f.type.name === 'WorkCardSeries');
}
}
/** Brazilian National Identity Card (Registro Geral), back side */
export class BrIdCardBack {
get document() {
return this._document;
}
constructor(document) {
if (document.type.name !== this.requiredDocumentType()) {
throw new Error(`Expected document type ${this.requiredDocumentType()}, got ${document.type.name}`);
}
this._document = document;
}
requiredDocumentType() {
return BrIdCardBackDocumentType;
}
/** Barcode */
get barcode() {
return this.document.fields.find(f => f.type.name === 'Barcode');
}
/** Date of Birth */
get birthDate() {
return this.document.fields.find(f => f.type.name === 'BirthDate');
}
/** Birthplace */
get birthplace() {
return this.document.fields.find(f => f.type.name === 'Birthplace');
}
/** Dados do Registro Civil - Civil Registry Details */
get civilRegistryDetails() {
return this.document.fields.find(f => f.type.name === 'CivilRegistryDetails');
}
/** CNH (Carteira Nacional de Habilitação) - Driver’s license number */
get driverLicenseNumber() {
return this.document.fields.find(f => f.type.name === 'DriverLicenseNumber');
}
/** Expiry Date */
get expiryDate() {
return this.document.fields.find(f => f.type.name === 'ExpiryDate');
}
/** Fingerprint */
get fingerprint() {
return this.document.fields.find(f => f.type.name === 'Fingerprint');
}
/** Given Names */
get givenNames() {
return this.document.fields.find(f => f.type.name === 'GivenNames');
}
/** CNS (Cartão Nacional de Saúde) - National Health Card number */
get healthCardNumber() {
return this.document.fields.find(f => f.type.name === 'HealthCardNumber');
}
/** DNI (Documento Nacional de Identidade) - National Identity Document number */
get id() {
return this.document.fields.find(f => f.type.name === 'ID');
}
/** Issue Date */
get issueDate() {
return this.document.fields.find(f => f.type.name === 'IssueDate');
}
/** Órgão Expedidor - Issuing Authority */
get issuingAuthority() {
return this.document.fields.find(f => f.type.name === 'IssuingAuthority');
}
/** Certificado Militar - Military certificate number */
get militaryCertificateNumber() {
return this.document.fields.find(f => f.type.name === 'MilitaryCertificateNumber');
}
/** Page Number of the document */
get pageNumber() {
return this.document.fields.find(f => f.type.name === 'PageNumber');
}
/** Filiação - Parents */
get parents() {
return this.document.fields.find(f => f.type.name === 'Parents');
}
/** Registro Geral (RG) - General Registration number, main ID number */
get personalNumber() {
return this.document.fields.find(f => f.type.name === 'PersonalNumber');
}
/** Photo */
get photo() {
return this.document.fields.find(f => f.type.name === 'Photo');
}
/** Local de Emissão - Place where the identity card was issued */
get placeOfIssue() {
return this.document.fields.find(f => f.type.name === 'PlaceOfIssue');
}
/** Naturalidade - Place of Origin */
get placeOfOrigin() {
return this.document.fields.find(f => f.type.name === 'PlaceOfOrigin');
}
/** Identidade Profissional - Professional identity number */
get professionalIdentityNumber() {
return this.document.fields.find(f => f.type.name === 'ProfessionalIdentityNumber');
}
/** Raw MRZ text value */
get rawMRZ() {
return this.document.fields.find(f => f.type.name === 'RawMRZ');
}
/** Assinatura - Signature */
get signature() {
return this.document.fields.find(f => f.type.name === 'Signature');
}
/** NIS/PIS/PASEP - Social Security and Employment benefits number */
get socialSecurityNumber() {
return this.document.fields.find(f => f.type.name === 'SocialSecurityNumber');
}
/** UF - Brazilian state code related to the Work Card */
get stateCode() {
return this.document.fields.find(f => f.type.name === 'StateCode');
}
/** CPF (Cadastro de Pessoas Físicas) - Brazilian taxpayer number */
get taxpayerNumber() {
return this.document.fields.find(f => f.type.name === 'TaxpayerNumber');
}
/** Título de Eleitor - Voter registration number */
get voterRegistrationNumber() {
return this.document.fields.find(f => f.type.name === 'VoterRegistrationNumber');
}
/** CTPS (Carteira de Trabalho e Previdência Social) - Work Card number */
get workCardNumber() {
return this.document.fields.find(f => f.type.name === 'WorkCardNumber');
}
/** Série - Series number associated with the Work Card */
get workCardSeries() {
return this.document.fields.find(f => f.type.name === 'WorkCardSeries');
}
/** The child document of type "MRZ". */
get mrz() {
const child = this.document.children.find(c => c.type.name === 'MRZ');
return new MRZ(child);
}
}
/** BrIdCardFrontPhotoOnly */
export class BrIdCardFrontPhotoOnly {
get document() {
return this._document;
}
constructor(document) {
if (document.type.name !== this.requiredDocumentType()) {
throw new Error(`Expected document type ${this.requiredDocumentType()}, got ${document.type.name}`);
}
this._document = document;
}
requiredDocumentType() {
return BrIdCardFrontPhotoOnlyDocumentType;
}
/** Fingerprint */
get fingerprint() {
return this.document.fields.find(f => f.type.name === 'Fingerprint');
}
/** Photo */
get photo() {
return this.document.fields.find(f => f.type.name === 'Photo');
}
}
/** CnEntryAndExitPermitBack */
export class CnEntryAndExitPermitBack {
get document() {
return this._document;
}
constructor(document) {
if (document.type.name !== this.requiredDocumentType()) {
throw new Error(`Expected document type ${this.requiredDocumentType()}, got ${document.type.name}`);
}
this._document = document;
}
requiredDocumentType() {
return CnEntryAndExitPermitBackDocumentType;
}
/** Barcode on the bottom of the document */
get barcodeBottom() {
return this.document.fields.find(f => f.type.name === 'BarcodeBottom');
}
/** Barcode on the top of the document */
get barcodeTop() {
return this.document.fields.find(f => f.type.name === 'BarcodeTop');
}
/** Hong Kong Valid From Date */
get hongKongValidFrom() {
return this.document.fields.find(f => f.type.name === 'HongKongValidFrom');
}
/** Hong Kong Valid Until Date */
get hongKongValidUntil() {
return this.document.fields.find(f => f.type.name === 'HongKongValidUntil');
}
/** Macao Valid From Date */
get macaoValidFrom() {
return this.document.fields.find(f => f.type.name === 'MacaoValidFrom');
}
/** Macao Valid Until Date */
get macaoValidUntil() {
return this.document.fields.find(f => f.type.name === 'MacaoValidUntil');
}
/** Raw MRZ text value */
get rawMRZ() {
return this.document.fields.find(f => f.type.name === 'RawMRZ');
}
/** Taiwan Identification Number */
get taiwanIDNumber() {
return this.document.fields.find(f => f.type.name === 'TaiwanIDNumber');
}
/** The child document of type "MRZ". */
get mrz() {
const child = this.document.children.find(c => c.type.name === 'MRZ');
return new MRZ(child);
}
}
/** CnEntryAndExitPermitFront */
export class CnEntryAndExitPermitFront {
get document() {
return this._document;
}
constructor(document) {
if (document.type.name !== this.requiredDocumentType()) {
throw new Error(`Expected document type ${this.requiredDocumentType()}, got ${document.type.name}`);
}
this._document = document;
}
requiredDocumentType() {
return CnEntryAndExitPermitFrontDocumentType;
}
/** Date of Birth */
get birthDate() {
return this.document.fields.find(f => f.type.name === 'BirthDate');
}
/** Business Type */
get business() {
return this.document.fields.find(f => f.type.name === 'Business');
}
/** Destinations */
get destinations() {
return this.document.fields.find(f => f.type.name === 'Destinations');
}
/** Gender */
get gender() {
return this.document.fields.find(f => f.type.name === 'Gender');
}
/** Given Names */
get givenNames() {
return this.document.fields.find(f => f.type.name === 'GivenNames');
}
/** Identity Document Number */
get id() {
return this.document.fields.find(f => f.type.name === 'ID');
}
/** Date when the permit was issued */
get issueDate() {
return this.document.fields.find(f => f.type.name === 'IssueDate');
}
/** MRZ text value */
get mrzLine() {
return this.document.fields.find(f => f.type.name === 'MRZLine');
}
/** Photo */
get photo() {
return this.document.fields.find(f => f.type.name === 'Photo');
}
/** Place where the permit was issued */
get placeOfIssue() {
return this.document.fields.find(f => f.type.name === 'PlaceOfIssue');
}
/** Ports where the cardholder can enter or exit */
get portsOfExitAndEntry() {
return this.document.fields.find(f => f.type.name === 'PortsOfExitAndEntry');
}
/** Raw MRZ text value */
get rawMRZ() {
return this.document.fields.find(f => f.type.name === 'RawMRZ');
}
/** Number of times the cardholder has exited or entered */
get timesOfExitAndEntry() {
return this.document.fields.find(f => f.type.name === 'TimesOfExitAndEntry');
}
/** Start date of the permit validity */
get validFrom() {
return this.document.fields.find(f => f.type.name === 'ValidFrom');
}
/** End date of the permit validity */
get validUntil() {
return this.document.fields.find(f => f.type.name === 'ValidUntil');
}
/** The child document of type "MRZ". */
get mrz() {
const child = this.document.children.find(c => c.type.