UNPKG

react-native-scanbot-sdk

Version:

Scanbot Document and Barcode Scanner SDK React Native Plugin for Android and iOS

1,445 lines (1,226 loc) 126 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.VCardXMLDocumentType = exports.VCardVersionDocumentType = exports.VCardURLDocumentType = exports.VCardUIDDocumentType = exports.VCardTitleDocumentType = exports.VCardTimeZoneDocumentType = exports.VCardTelephoneNumberDocumentType = exports.VCardSourceDocumentType = exports.VCardSoundDocumentType = exports.VCardRoleDocumentType = exports.VCardRevisionDocumentType = exports.VCardRelatedDocumentType = exports.VCardPublicKeyDocumentType = exports.VCardProductIdDocumentType = exports.VCardPhotoDocumentType = exports.VCardOrganisationDocumentType = exports.VCardNoteDocumentType = exports.VCardNicknameDocumentType = exports.VCardNameDocumentType = exports.VCardMemberDocumentType = exports.VCardLogoDocumentType = exports.VCardLanguagesDocumentType = exports.VCardKindDocumentType = exports.VCardIMPPDocumentType = exports.VCardGeoLocationDocumentType = exports.VCardGenderDocumentType = exports.VCardFirstNameDocumentType = exports.VCardEntryDocumentType = exports.VCardEmailDocumentType = exports.VCardDocumentType = exports.VCardDeliveryAddressDocumentType = exports.VCardCustomDocumentType = exports.VCardClientPIDMapDocumentType = exports.VCardCategoriesDocumentType = exports.VCardCalendarURIForRequestsDocumentType = exports.VCardCalendarURIDocumentType = exports.VCardBusyTimeURLDocumentType = exports.VCardBirthdayDocumentType = exports.VCardAnniversaryDocumentType = exports.VCard = exports.SwissQRDocumentType = exports.SwissQR = exports.SEPADocumentType = exports.SEPA = exports.MedicalCertificateDocumentType = exports.MedicalCertificate = exports.IDCardPDF417DocumentType = exports.IDCardPDF417 = exports.HIBCDocumentType = exports.HIBC = exports.GS1ElementValidationErrorDocumentType = exports.GS1ElementDocumentType = exports.GS1DocumentType = exports.GS1 = exports.DEMedicalPlanSubheadingPrescriptionDocumentType = exports.DEMedicalPlanSubheadingMedicineSubstanceDocumentType = exports.DEMedicalPlanSubheadingMedicineDocumentType = exports.DEMedicalPlanSubheadingDocumentType = exports.DEMedicalPlanPatientDocumentType = exports.DEMedicalPlanDocumentType = exports.DEMedicalPlanDoctorDocumentType = exports.DEMedicalPlan = exports.BoardingPassLegDocumentType = exports.BoardingPassDocumentType = exports.BoardingPass = exports.AAMVAVehicleSafetyInspectionDataDocumentType = exports.AAMVAVehicleOwnerDataDocumentType = exports.AAMVAVehicleDataDocumentType = exports.AAMVATitleDataDocumentType = exports.AAMVARegistrationDataDocumentType = exports.AAMVARegistrantAndVehicleDataDocumentType = exports.AAMVARawDocumentDocumentType = exports.AAMVAMotorCarrierDataDocumentType = exports.AAMVAIDCardDocumentType = exports.AAMVAEnhancedDriverLicenseDocumentType = exports.AAMVADriverLicenseDocumentType = exports.AAMVADocumentType = exports.AAMVADLIDDocumentType = exports.AAMVA = void 0; /// Auto-generated. Modifications will be overwritten. /// Generated from core/document-schemas/BarcodeDocumentModel.yaml /// All possible root document types. const BoardingPassDocumentType = exports.BoardingPassDocumentType = 'BoardingPass'; const BoardingPassLegDocumentType = exports.BoardingPassLegDocumentType = 'Leg'; const SwissQRDocumentType = exports.SwissQRDocumentType = 'SwissQR'; const DEMedicalPlanDocumentType = exports.DEMedicalPlanDocumentType = 'DEMedicalPlan'; const DEMedicalPlanPatientDocumentType = exports.DEMedicalPlanPatientDocumentType = 'Patient'; const DEMedicalPlanDoctorDocumentType = exports.DEMedicalPlanDoctorDocumentType = 'Doctor'; const DEMedicalPlanSubheadingDocumentType = exports.DEMedicalPlanSubheadingDocumentType = 'Subheading'; const DEMedicalPlanSubheadingMedicineDocumentType = exports.DEMedicalPlanSubheadingMedicineDocumentType = 'Medicine'; const DEMedicalPlanSubheadingMedicineSubstanceDocumentType = exports.DEMedicalPlanSubheadingMedicineSubstanceDocumentType = 'Substance'; const DEMedicalPlanSubheadingPrescriptionDocumentType = exports.DEMedicalPlanSubheadingPrescriptionDocumentType = 'Prescription'; const IDCardPDF417DocumentType = exports.IDCardPDF417DocumentType = 'IDCardPDF417'; const GS1DocumentType = exports.GS1DocumentType = 'GS1'; const GS1ElementDocumentType = exports.GS1ElementDocumentType = 'Element'; const GS1ElementValidationErrorDocumentType = exports.GS1ElementValidationErrorDocumentType = 'ValidationError'; const SEPADocumentType = exports.SEPADocumentType = 'SEPA'; const MedicalCertificateDocumentType = exports.MedicalCertificateDocumentType = 'MedicalCertificate'; const VCardDocumentType = exports.VCardDocumentType = 'VCard'; const VCardEntryDocumentType = exports.VCardEntryDocumentType = 'Entry'; const VCardVersionDocumentType = exports.VCardVersionDocumentType = 'Version'; const VCardSourceDocumentType = exports.VCardSourceDocumentType = 'Source'; const VCardKindDocumentType = exports.VCardKindDocumentType = 'Kind'; const VCardXMLDocumentType = exports.VCardXMLDocumentType = 'XML'; const VCardNameDocumentType = exports.VCardNameDocumentType = 'Name'; const VCardFirstNameDocumentType = exports.VCardFirstNameDocumentType = 'FirstName'; const VCardNicknameDocumentType = exports.VCardNicknameDocumentType = 'Nickname'; const VCardBirthdayDocumentType = exports.VCardBirthdayDocumentType = 'Birthday'; const VCardAnniversaryDocumentType = exports.VCardAnniversaryDocumentType = 'Anniversary'; const VCardGenderDocumentType = exports.VCardGenderDocumentType = 'Gender'; const VCardDeliveryAddressDocumentType = exports.VCardDeliveryAddressDocumentType = 'DeliveryAddress'; const VCardPhotoDocumentType = exports.VCardPhotoDocumentType = 'Photo'; const VCardTelephoneNumberDocumentType = exports.VCardTelephoneNumberDocumentType = 'TelephoneNumber'; const VCardEmailDocumentType = exports.VCardEmailDocumentType = 'Email'; const VCardIMPPDocumentType = exports.VCardIMPPDocumentType = 'IMPP'; const VCardLanguagesDocumentType = exports.VCardLanguagesDocumentType = 'Languages'; const VCardTimeZoneDocumentType = exports.VCardTimeZoneDocumentType = 'TimeZone'; const VCardGeoLocationDocumentType = exports.VCardGeoLocationDocumentType = 'GeoLocation'; const VCardTitleDocumentType = exports.VCardTitleDocumentType = 'Title'; const VCardRoleDocumentType = exports.VCardRoleDocumentType = 'Role'; const VCardLogoDocumentType = exports.VCardLogoDocumentType = 'Logo'; const VCardOrganisationDocumentType = exports.VCardOrganisationDocumentType = 'Organisation'; const VCardMemberDocumentType = exports.VCardMemberDocumentType = 'Member'; const VCardRelatedDocumentType = exports.VCardRelatedDocumentType = 'Related'; const VCardCategoriesDocumentType = exports.VCardCategoriesDocumentType = 'Categories'; const VCardNoteDocumentType = exports.VCardNoteDocumentType = 'Note'; const VCardProductIdDocumentType = exports.VCardProductIdDocumentType = 'ProductId'; const VCardRevisionDocumentType = exports.VCardRevisionDocumentType = 'Revision'; const VCardSoundDocumentType = exports.VCardSoundDocumentType = 'Sound'; const VCardUIDDocumentType = exports.VCardUIDDocumentType = 'UID'; const VCardClientPIDMapDocumentType = exports.VCardClientPIDMapDocumentType = 'ClientPIDMap'; const VCardURLDocumentType = exports.VCardURLDocumentType = 'URL'; const VCardPublicKeyDocumentType = exports.VCardPublicKeyDocumentType = 'PublicKey'; const VCardBusyTimeURLDocumentType = exports.VCardBusyTimeURLDocumentType = 'BusyTimeURL'; const VCardCalendarURIForRequestsDocumentType = exports.VCardCalendarURIForRequestsDocumentType = 'CalendarURIForRequests'; const VCardCalendarURIDocumentType = exports.VCardCalendarURIDocumentType = 'CalendarURI'; const VCardCustomDocumentType = exports.VCardCustomDocumentType = 'Custom'; const AAMVADocumentType = exports.AAMVADocumentType = 'AAMVA'; const AAMVATitleDataDocumentType = exports.AAMVATitleDataDocumentType = 'TitleData'; const AAMVARegistrationDataDocumentType = exports.AAMVARegistrationDataDocumentType = 'RegistrationData'; const AAMVAMotorCarrierDataDocumentType = exports.AAMVAMotorCarrierDataDocumentType = 'MotorCarrierData'; const AAMVARegistrantAndVehicleDataDocumentType = exports.AAMVARegistrantAndVehicleDataDocumentType = 'RegistrantAndVehicleData'; const AAMVAVehicleOwnerDataDocumentType = exports.AAMVAVehicleOwnerDataDocumentType = 'VehicleOwnerData'; const AAMVAVehicleDataDocumentType = exports.AAMVAVehicleDataDocumentType = 'VehicleData'; const AAMVAVehicleSafetyInspectionDataDocumentType = exports.AAMVAVehicleSafetyInspectionDataDocumentType = 'VehicleSafetyInspectionData'; const AAMVADLIDDocumentType = exports.AAMVADLIDDocumentType = 'DLID'; const AAMVADriverLicenseDocumentType = exports.AAMVADriverLicenseDocumentType = 'DriverLicense'; const AAMVAIDCardDocumentType = exports.AAMVAIDCardDocumentType = 'IDCard'; const AAMVAEnhancedDriverLicenseDocumentType = exports.AAMVAEnhancedDriverLicenseDocumentType = 'EnhancedDriverLicense'; const AAMVARawDocumentDocumentType = exports.AAMVARawDocumentDocumentType = 'RawDocument'; const HIBCDocumentType = exports.HIBCDocumentType = 'HIBC'; /** Boarding Pass */ class BoardingPass { 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 BoardingPassDocumentType; } /** Electronic Ticket */ get electronicTicket() { return this.document.fields.find(f => f.type.name === 'ElectronicTicket'); } /** Name */ get name() { return this.document.fields.find(f => f.type.name === 'Name'); } /** Number Of Legs */ get numberOfLegs() { return this.document.fields.find(f => f.type.name === 'NumberOfLegs'); } /** Security Data */ get securityData() { return this.document.fields.find(f => f.type.name === 'SecurityData'); } /** An array of all children of type "Leg". */ get legs() { return this.document.children.filter(c => c.type.name === 'Leg').map(c => new BoardingPass.Leg(c)); } } exports.BoardingPass = BoardingPass; (function (_BoardingPass) { class Leg { 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 BoardingPassLegDocumentType; } /** Airline Designator Of Boarding Pass Issuer */ get airlineDesignatorOfBoardingPassIssuer() { return this.document.fields.find(f => f.type.name === 'AirlineDesignatorOfBoardingPassIssuer'); } /** Airline Numeric Code */ get airlineNumericCode() { return this.document.fields.find(f => f.type.name === 'AirlineNumericCode'); } /** Baggage Tag License Plate Numbers */ get baggageTagLicensePlateNumbers() { return this.document.fields.find(f => f.type.name === 'BaggageTagLicensePlateNumbers'); } /** Check In Sequence Number */ get checkInSequenceNumber() { return this.document.fields.find(f => f.type.name === 'CheckInSequenceNumber'); } /** Compartment Code */ get compartmentCode() { return this.document.fields.find(f => f.type.name === 'CompartmentCode'); } /** Date Of Boarding Pass Issuance Julian */ get dateOfBoardingPassIssuanceJulian() { return this.document.fields.find(f => f.type.name === 'DateOfBoardingPassIssuanceJulian'); } /** Date Of Flight Julian */ get dateOfFlightJulian() { return this.document.fields.find(f => f.type.name === 'DateOfFlightJulian'); } /** Departure Airport Code */ get departureAirportCode() { return this.document.fields.find(f => f.type.name === 'DepartureAirportCode'); } /** Destination Airport Code */ get destinationAirportCode() { return this.document.fields.find(f => f.type.name === 'DestinationAirportCode'); } /** Document Form Serial Number */ get documentFormSerialNumber() { return this.document.fields.find(f => f.type.name === 'DocumentFormSerialNumber'); } /** Document Type */ get documentType() { return this.document.fields.find(f => f.type.name === 'DocumentType'); } /** Fast Track */ get fastTrack() { return this.document.fields.find(f => f.type.name === 'FastTrack'); } /** First Non Consecutive Baggage Tag License Plate Number */ get firstNonConsecutiveBaggageTagLicensePlateNumber() { return this.document.fields.find(f => f.type.name === 'FirstNonConsecutiveBaggageTagLicensePlateNumber'); } /** Flight Number */ get flightNumber() { return this.document.fields.find(f => f.type.name === 'FlightNumber'); } /** For Individual Airline Use */ get forIndividualAirlineUse() { return this.document.fields.find(f => f.type.name === 'ForIndividualAirlineUse'); } /** Free Baggage Allowance */ get freeBaggageAllowance() { return this.document.fields.find(f => f.type.name === 'FreeBaggageAllowance'); } /** Frequent Flyer Airline Designator */ get frequentFlyerAirlineDesignator() { return this.document.fields.find(f => f.type.name === 'FrequentFlyerAirlineDesignator'); } /** Frequent Flyer Number */ get frequentFlyerNumber() { return this.document.fields.find(f => f.type.name === 'FrequentFlyerNumber'); } /** IDAD Indicator */ get idadIndicator() { return this.document.fields.find(f => f.type.name === 'IDADIndicator'); } /** International Documentation Verification */ get internationalDocumentationVerification() { return this.document.fields.find(f => f.type.name === 'InternationalDocumentationVerification'); } /** Marketing Carrier Designator */ get marketingCarrierDesignator() { return this.document.fields.find(f => f.type.name === 'MarketingCarrierDesignator'); } /** Operating Carrier Designator */ get operatingCarrierDesignator() { return this.document.fields.find(f => f.type.name === 'OperatingCarrierDesignator'); } /** Operating Carrier PNR Code */ get operatingCarrierPNRCode() { return this.document.fields.find(f => f.type.name === 'OperatingCarrierPNRCode'); } /** Passenger Description */ get passengerDescription() { return this.document.fields.find(f => f.type.name === 'PassengerDescription'); } /** Passenger Status */ get passengerStatus() { return this.document.fields.find(f => f.type.name === 'PassengerStatus'); } /** Seat Number */ get seatNumber() { return this.document.fields.find(f => f.type.name === 'SeatNumber'); } /** Second Non Consecutive Baggage Tag License Plate Number */ get secondNonConsecutiveBaggageTagLicensePlateNumber() { return this.document.fields.find(f => f.type.name === 'SecondNonConsecutiveBaggageTagLicensePlateNumber'); } /** Selectee Indicator */ get selecteeIndicator() { return this.document.fields.find(f => f.type.name === 'SelecteeIndicator'); } /** Source Of Boarding Pass Issuance */ get sourceOfBoardingPassIssuance() { return this.document.fields.find(f => f.type.name === 'SourceOfBoardingPassIssuance'); } /** Source Of Check In */ get sourceOfCheckIn() { return this.document.fields.find(f => f.type.name === 'SourceOfCheckIn'); } /** VersionNumber */ get versionNumber() { return this.document.fields.find(f => f.type.name === 'VersionNumber'); } } _BoardingPass.Leg = Leg; })(BoardingPass || (exports.BoardingPass = BoardingPass = {})); /** SwissQR */ class SwissQR { 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 SwissQRDocumentType; } /** Additional Billing Information */ get additionalBillingInformation() { return this.document.fields.find(f => f.type.name === 'AdditionalBillingInformation'); } /** Additional Info Trailer */ get additionalInfoTrailer() { return this.document.fields.find(f => f.type.name === 'AdditionalInfoTrailer'); } /** Additional Info Unstructured */ get additionalInfoUnstructured() { return this.document.fields.find(f => f.type.name === 'AdditionalInfoUnstructured'); } /** Alternative Procedure Parameter */ get alternativeProcedureParameter() { return this.document.fields.find(f => f.type.name === 'AlternativeProcedureParameter'); } /** Amount */ get amount() { return this.document.fields.find(f => f.type.name === 'Amount'); } /** Currency */ get currency() { return this.document.fields.find(f => f.type.name === 'Currency'); } /** Debtor Address Type */ get debtorAddressType() { return this.document.fields.find(f => f.type.name === 'DebtorAddressType'); } /** Debtor Building Or Address Line 2 */ get debtorBuildingOrAddressLine2() { return this.document.fields.find(f => f.type.name === 'DebtorBuildingOrAddressLine2'); } /** Debtor Country */ get debtorCountry() { return this.document.fields.find(f => f.type.name === 'DebtorCountry'); } /** Debtor Name */ get debtorName() { return this.document.fields.find(f => f.type.name === 'DebtorName'); } /** Debtor Place */ get debtorPlace() { return this.document.fields.find(f => f.type.name === 'DebtorPlace'); } /** Debtor Postal Code */ get debtorPostalCode() { return this.document.fields.find(f => f.type.name === 'DebtorPostalCode'); } /** Debtor Street Or Address Line 1 */ get debtorStreetOrAddressLine1() { return this.document.fields.find(f => f.type.name === 'DebtorStreetOrAddressLine1'); } /** Due Date */ get dueDate() { return this.document.fields.find(f => f.type.name === 'DueDate'); } /** Encoding */ get encoding() { return this.document.fields.find(f => f.type.name === 'Encoding'); } /** Final Payee Address Type */ get finalPayeeAddressType() { return this.document.fields.find(f => f.type.name === 'FinalPayeeAddressType'); } /** Final Payee Building Or Address Line 2 */ get finalPayeeBuildingOrAddressLine2() { return this.document.fields.find(f => f.type.name === 'FinalPayeeBuildingOrAddressLine2'); } /** Final Payee Country */ get finalPayeeCountry() { return this.document.fields.find(f => f.type.name === 'FinalPayeeCountry'); } /** Final Payee Name */ get finalPayeeName() { return this.document.fields.find(f => f.type.name === 'FinalPayeeName'); } /** Final Payee Place */ get finalPayeePlace() { return this.document.fields.find(f => f.type.name === 'FinalPayeePlace'); } /** Final Payee Postal Code */ get finalPayeePostalCode() { return this.document.fields.find(f => f.type.name === 'FinalPayeePostalCode'); } /** Final Payee Street Or Address Line 1 */ get finalPayeeStreetOrAddressLine1() { return this.document.fields.find(f => f.type.name === 'FinalPayeeStreetOrAddressLine1'); } /** IBAN */ get iban() { return this.document.fields.find(f => f.type.name === 'IBAN'); } /** Major Version */ get majorVersion() { return this.document.fields.find(f => f.type.name === 'MajorVersion'); } /** Payee Address Type */ get payeeAddressType() { return this.document.fields.find(f => f.type.name === 'PayeeAddressType'); } /** Payee Building Or Address Line 2 */ get payeeBuildingOrAddressLine2() { return this.document.fields.find(f => f.type.name === 'PayeeBuildingOrAddressLine2'); } /** Payee Country */ get payeeCountry() { return this.document.fields.find(f => f.type.name === 'PayeeCountry'); } /** Payee Name */ get payeeName() { return this.document.fields.find(f => f.type.name === 'PayeeName'); } /** Payee Place */ get payeePlace() { return this.document.fields.find(f => f.type.name === 'PayeePlace'); } /** Payee Postal Code */ get payeePostalCode() { return this.document.fields.find(f => f.type.name === 'PayeePostalCode'); } /** Payee Street Or Address Line 1 */ get payeeStreetOrAddressLine1() { return this.document.fields.find(f => f.type.name === 'PayeeStreetOrAddressLine1'); } /** Payment Reference */ get paymentReference() { return this.document.fields.find(f => f.type.name === 'PaymentReference'); } /** Payment Reference Type */ get paymentReferenceType() { return this.document.fields.find(f => f.type.name === 'PaymentReferenceType'); } } /** Medical Plan */ exports.SwissQR = SwissQR; class DEMedicalPlan { 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 DEMedicalPlanDocumentType; } /** Current Page */ get currentPage() { return this.document.fields.find(f => f.type.name === 'CurrentPage'); } /** Document Version Number */ get documentVersionNumber() { return this.document.fields.find(f => f.type.name === 'DocumentVersionNumber'); } /** GUID */ get guid() { return this.document.fields.find(f => f.type.name === 'GUID'); } /** Language Country Code */ get languageCountryCode() { return this.document.fields.find(f => f.type.name === 'LanguageCountryCode'); } /** Patch Version Number */ get patchVersionNumber() { return this.document.fields.find(f => f.type.name === 'PatchVersionNumber'); } /** Total Number Of Pages */ get totalNumberOfPages() { return this.document.fields.find(f => f.type.name === 'TotalNumberOfPages'); } /** The child document of type "Patient". */ get patient() { const child = this.document.children.find(c => c.type.name === 'Patient'); return new DEMedicalPlan.Patient(child); } /** The child document of type "Doctor". */ get doctor() { const child = this.document.children.find(c => c.type.name === 'Doctor'); return new DEMedicalPlan.Doctor(child); } /** An array of all children of type "Subheading". */ get subheadings() { return this.document.children.filter(c => c.type.name === 'Subheading').map(c => new DEMedicalPlan.Subheading(c)); } } exports.DEMedicalPlan = DEMedicalPlan; (function (_DEMedicalPlan) { class Patient { 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 DEMedicalPlanPatientDocumentType; } /** Allergies And Intolerances */ get allergiesAndIntolerances() { return this.document.fields.find(f => f.type.name === 'AllergiesAndIntolerances'); } /** Birth Date */ get birthDate() { return this.document.fields.find(f => f.type.name === 'BirthDate'); } /** Breast Feeding */ get breastFeeding() { return this.document.fields.find(f => f.type.name === 'BreastFeeding'); } /** Creatinine Value */ get creatinineValue() { return this.document.fields.find(f => f.type.name === 'CreatinineValue'); } /** First Name */ get firstName() { return this.document.fields.find(f => f.type.name === 'FirstName'); } /** Gender */ get gender() { return this.document.fields.find(f => f.type.name === 'Gender'); } /** Height */ get height() { return this.document.fields.find(f => f.type.name === 'Height'); } /** Last Name */ get lastName() { return this.document.fields.find(f => f.type.name === 'LastName'); } /** Patient Free Text */ get patientFreeText() { return this.document.fields.find(f => f.type.name === 'PatientFreeText'); } /** Patient ID */ get patientID() { return this.document.fields.find(f => f.type.name === 'PatientID'); } /** Pre Name */ get preName() { return this.document.fields.find(f => f.type.name === 'PreName'); } /** Pregnant */ get pregnant() { return this.document.fields.find(f => f.type.name === 'Pregnant'); } /** Name Suffix */ get suffix() { return this.document.fields.find(f => f.type.name === 'Suffix'); } /** Title */ get title() { return this.document.fields.find(f => f.type.name === 'Title'); } /** Weight */ get weight() { return this.document.fields.find(f => f.type.name === 'Weight'); } } _DEMedicalPlan.Patient = Patient; class Doctor { 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 DEMedicalPlanDoctorDocumentType; } /** Doctor Number */ get doctorNumber() { return this.document.fields.find(f => f.type.name === 'DoctorNumber'); } /** Email */ get email() { return this.document.fields.find(f => f.type.name === 'Email'); } /** Hospital ID */ get hospitalID() { return this.document.fields.find(f => f.type.name === 'HospitalID'); } /** Issuer Name */ get issuerName() { return this.document.fields.find(f => f.type.name === 'IssuerName'); } /** Issuing Date And Time */ get issuingDateAndTime() { return this.document.fields.find(f => f.type.name === 'IssuingDateAndTime'); } /** Pharmacy ID */ get pharmacyID() { return this.document.fields.find(f => f.type.name === 'PharmacyID'); } /** Place */ get place() { return this.document.fields.find(f => f.type.name === 'Place'); } /** Postal Code */ get postalCode() { return this.document.fields.find(f => f.type.name === 'PostalCode'); } /** Street */ get street() { return this.document.fields.find(f => f.type.name === 'Street'); } /** Telephone Number */ get telephoneNumber() { return this.document.fields.find(f => f.type.name === 'TelephoneNumber'); } } _DEMedicalPlan.Doctor = Doctor; class Subheading { 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 DEMedicalPlanSubheadingDocumentType; } /** General Note */ get generalNotes() { return this.document.fields.filter(f => f.type.name === 'GeneralNote'); } /** Key Words */ get keyWords() { return this.document.fields.find(f => f.type.name === 'KeyWords'); } /** Subheading Free Text */ get subheadingFreeText() { return this.document.fields.find(f => f.type.name === 'SubheadingFreeText'); } /** An array of all children of type "Medicine". */ get medicines() { return this.document.children.filter(c => c.type.name === 'Medicine').map(c => new DEMedicalPlan.Subheading.Medicine(c)); } /** An array of all children of type "Prescription". */ get prescriptions() { return this.document.children.filter(c => c.type.name === 'Prescription').map(c => new DEMedicalPlan.Subheading.Prescription(c)); } } _DEMedicalPlan.Subheading = Subheading; (function (_Subheading) { class Medicine { 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 DEMedicalPlanSubheadingMedicineDocumentType; } /** Dosage Form */ get dosageForm() { return this.document.fields.find(f => f.type.name === 'DosageForm'); } /** Dosage Form Free Text */ get dosageFormFreeText() { return this.document.fields.find(f => f.type.name === 'DosageFormFreeText'); } /** Dosage Free Text */ get dosageFreeText() { return this.document.fields.find(f => f.type.name === 'DosageFreeText'); } /** Dosing Unit */ get dosingUnit() { return this.document.fields.find(f => f.type.name === 'DosingUnit'); } /** Dosing Unit Free Text */ get dosingUnitFreeText() { return this.document.fields.find(f => f.type.name === 'DosingUnitFreeText'); } /** Drug Name */ get drugName() { return this.document.fields.find(f => f.type.name === 'DrugName'); } /** Evening Intake Dose */ get evening() { return this.document.fields.find(f => f.type.name === 'Evening'); } /** General Notes */ get generalNotes() { return this.document.fields.find(f => f.type.name === 'GeneralNotes'); } /** Midday Intake Dose */ get midday() { return this.document.fields.find(f => f.type.name === 'Midday'); } /** Morning Intake Dose */ get morning() { return this.document.fields.find(f => f.type.name === 'Morning'); } /** Night Intake Dose */ get night() { return this.document.fields.find(f => f.type.name === 'Night'); } /** Pharmaceutical Number */ get pharmaceuticalNumber() { return this.document.fields.find(f => f.type.name === 'PharmaceuticalNumber'); } /** Reason For Treatment */ get reasonForTreatment() { return this.document.fields.find(f => f.type.name === 'ReasonForTreatment'); } /** Relevant Info */ get relevantInfo() { return this.document.fields.find(f => f.type.name === 'RelevantInfo'); } /** An array of all children of type "Substance". */ get substances() { return this.document.children.filter(c => c.type.name === 'Substance').map(c => new DEMedicalPlan.Subheading.Medicine.Substance(c)); } } _Subheading.Medicine = Medicine; (function (_Medicine) { class Substance { 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 DEMedicalPlanSubheadingMedicineSubstanceDocumentType; } /** Active Substance */ get activeSubstance() { return this.document.fields.find(f => f.type.name === 'ActiveSubstance'); } /** Potency */ get potency() { return this.document.fields.find(f => f.type.name === 'Potency'); } } _Medicine.Substance = Substance; })(Medicine || (Medicine = _Subheading.Medicine || (_Subheading.Medicine = {}))); class Prescription { 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 DEMedicalPlanSubheadingPrescriptionDocumentType; } /** General Information */ get generalInformation() { return this.document.fields.find(f => f.type.name === 'GeneralInformation'); } /** Prescription Free Text */ get prescriptionFreeText() { return this.document.fields.find(f => f.type.name === 'PrescriptionFreeText'); } } _Subheading.Prescription = Prescription; })(Subheading || (Subheading = _DEMedicalPlan.Subheading || (_DEMedicalPlan.Subheading = {}))); })(DEMedicalPlan || (exports.DEMedicalPlan = DEMedicalPlan = {})); /** ID Card */ class IDCardPDF417 { 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 IDCardPDF417DocumentType; } /** Birth Date. The format is ISO8601 with delimiters */ get birthDate() { return this.document.fields.find(f => f.type.name === 'BirthDate'); } /** Date Expired. The format is ISO8601 with delimiters */ get dateExpired() { return this.document.fields.find(f => f.type.name === 'DateExpired'); } /** Date Issued. The format is ISO8601 with delimiters */ get dateIssued() { return this.document.fields.find(f => f.type.name === 'DateIssued'); } /** Document Code */ get documentCode() { return this.document.fields.find(f => f.type.name === 'DocumentCode'); } /** First Name */ get firstName() { return this.document.fields.find(f => f.type.name === 'FirstName'); } /** Last Name */ get lastName() { return this.document.fields.find(f => f.type.name === 'LastName'); } /** Optional */ get optional() { return this.document.fields.find(f => f.type.name === 'Optional'); } } /** GS1 */ exports.IDCardPDF417 = IDCardPDF417; class GS1 { 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 GS1DocumentType; } /** An array of all children of type "Element". */ get elements() { return this.document.children.filter(c => c.type.name === 'Element').map(c => new GS1.Element(c)); } } exports.GS1 = GS1; (function (_GS) { class Element { 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 GS1ElementDocumentType; } /** Application Identifier */ get applicationIdentifier() { return this.document.fields.find(f => f.type.name === 'ApplicationIdentifier'); } /** Data Title */ get dataTitle() { return this.document.fields.find(f => f.type.name === 'DataTitle'); } /** Description */ get elementDescription() { return this.document.fields.find(f => f.type.name === 'ElementDescription'); } /** Raw Value */ get rawValue() { return this.document.fields.find(f => f.type.name === 'RawValue'); } /** An array of all children of type "ValidationError". */ get validationErrors() { return this.document.children.filter(c => c.type.name === 'ValidationError').map(c => new GS1.Element.ValidationError(c)); } } _GS.Element = Element; (function (_Element) { class ValidationError { 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 GS1ElementValidationErrorDocumentType; } /** Error Code */ get code() { return this.document.fields.find(f => f.type.name === 'Code'); } /** Reason */ get reason() { return this.document.fields.find(f => f.type.name === 'Reason'); } } _Element.ValidationError = ValidationError; })(Element || (Element = _GS.Element || (_GS.Element = {}))); })(GS1 || (exports.GS1 = GS1 = {})); /** SEPA */ class SEPA { 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 SEPADocumentType; } /** Amount */ get amount() { return this.document.fields.find(f => f.type.name === 'Amount'); } /** Character Set */ get characterSet() { return this.document.fields.find(f => f.type.name === 'CharacterSet'); } /** Identification */ get identification() { return this.document.fields.find(f => f.type.name === 'Identification'); } /** Information */ get information() { return this.document.fields.find(f => f.type.name === 'Information'); } /** Amount */ get purpose() { return this.document.fields.find(f => f.type.name === 'Purpose'); } /** Receiver BIC */ get receiverBIC() { return this.document.fields.find(f => f.type.name === 'ReceiverBIC'); } /** Receiver IBAN */ get receiverIBAN() { return this.document.fields.find(f => f.type.name === 'ReceiverIBAN'); } /** Receiver Name */ get receiverName() { return this.document.fields.find(f => f.type.name === 'ReceiverName'); } /** Remittance */ get remittance() { return this.document.fields.find(f => f.type.name === 'Remittance'); } /** Service Tag */ get serviceTag() { return this.document.fields.find(f => f.type.name === 'ServiceTag'); } /** Version */ get version() { return this.document.fields.find(f => f.type.name === 'Version'); } } /** Medical Certificate */ exports.SEPA = SEPA; class MedicalCertificate { 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 MedicalCertificateDocumentType; } /** Accident */ get accident() { return this.document.fields.find(f => f.type.name === 'Accident'); } /** Assigned To Accident Insurance Doctor */ get assignedToAccidentInsuranceDoctor() { return this.document.fields.find(f => f.type.name === 'AssignedToAccidentInsuranceDoctor'); } /** Birth Date. The format is ISO8601 with delimiters */ get birthDate() { return this.document.fields.find(f => f.type.name === 'BirthDate'); } /** Child Needs Care From */ get childNeedsCareFrom() { return this.document.fields.find(f => f.type.name === 'ChildNeedsCareFrom'); } /** Child Needs Care Until */ get childNeedsCareUntil() { return this.document.fields.find(f => f.type.name === 'ChildNeedsCareUntil'); } /** Diagnose */ get diagnose() { return this.document.fields.find(f => f.type.name === 'Diagnose'); } /** Diagnosed On. The format is ISO8601 with delimiters */ get diagnosedOn() { return this.document.fields.find(f => f.type.name === 'DiagnosedOn'); } /** Doctor Number */ get doctorNumber() { return this.document.fields.find(f => f.type.name === 'DoctorNumber'); } /** Document Date. The format is ISO8601 with delimiters */ get documentDate() { return this.document.fields.find(f => f.type.name === 'DocumentDate'); } /** First Name */ get firstName() { return this.document.fields.find(f => f.type.name === 'FirstName'); } /** Health Insurance Number */ get healthInsuranceNumber() { return this.document.fields.find(f => f.type.name === 'HealthInsuranceNumber'); } /** Incapable Of Work Since. The format is ISO8601 with delimiters */ get incapableOfWorkSince() { return this.document.fields.find(f => f.type.name === 'IncapableOfWorkSince'); } /** Incapable Of Work Until. The format is ISO8601 with delimiters */ get incapableOfWorkUntil() { return this.document.fields.find(f => f.type.name === 'IncapableOfWorkUntil'); } /** Initial Certificate */ get initialCertificate() { return this.document.fields.find(f => f.type.name === 'InitialCertificate'); } /** Insured Person Number */ get insuredPersonNumber() { return this.document.fields.find(f => f.type.name === 'InsuredPersonNumber'); } /** Last Name */ get lastName() { return this.document.fields.find(f => f.type.name === 'LastName'); } /** Place Of Operation Number */ get placeOfOperationNumber() { return this.document.fields.find(f => f.type.name === 'PlaceOfOperationNumber'); } /** Renewed Certificate */ get renewedCertificate() { return this.document.fields.find(f => f.type.name === 'RenewedCertificate'); } /** Requires Care */ get requiresCare() { return this.document.fields.find(f => f.type.name === 'RequiresCare'); } /** Status */ get status() { return this.document.fields.find(f => f.type.name === 'Status'); } /** Work Accident */ get workAccident() { return this.document.fields.find(f => f.type.name === 'WorkAccident'); } } /** VCard */ exports.MedicalCertificate = MedicalCertificate; class VCard { 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 VCardDocumentType; } /** The child document of type "Version". */ get version() { const child = this.document.children.find(c => c.type.name === 'Version'); return new VCard.Version(child); } /** The child document of type "Source". */ get source() { const child = this.document.children.find(c => c.type.name === 'Source'); return child ? new VCard.Source(child) : undefined; } /** The child document of type "Kind". */ get kind() { const child = this.document.children.find(c => c.type.name === 'Kind'); return child ? new VCard.Kind(child) : undefined; } /** The child document of type "XML". */ get xml() { const child = this.document.children.find(c => c.type.name === 'XML'); return child ? new VCard.XML(child) : undefined; } /** The child document of type "Name". */ get name() { const child = this.document.children.find(c => c.type.name === 'Name'); return child ? new VCard.Name(child) : undefined; } /** The child document of type "FirstName". */ get firstName() { const child = this.document.children.find(c => c.type.name === 'FirstName'); return child ? new VCard.FirstName(child) : undefined; } /** The child document of type "Nickname". */ get nickname() { const child = this.document.children.find(c => c.type.name === 'Nickname'); return child ? new VCard.Nickname(child) : undefined; } /** The child document of type "Birthday". */ get birthday() { const child = this.document.children.find(c => c.type.name === 'Birthday'); return child ? new VCard.Birthday(child) : undefined; } /** The child document of type "Anniversary". */ get anniversary() { const child = this.document.children.find(c => c.type.name === 'Anniversary'); return child ? new VCard.Anniversary(child) : undefined; } /** The child document of type "Gender". */ get gender() { const child = this.document.children.find(c => c.type.name === 'Gender'); return child ? new VCard.Gender(child) : undefined; } /** The child document of type "DeliveryAddress". */ get deliveryAddress() { const child = this.document.children.find(c => c.type.name === 'DeliveryAddress'); return child ? new VCard.DeliveryAddress(child) : undefined; } /** The child document of type "Photo". */ get photo() { const child = this.document.children.find(c => c.type.name === 'Photo'); return child ? new VCard.Photo(child) : undefined; } /** The child document of type "TelephoneNumber". */ get telephoneNumber() { const child = this.document.children.find(c => c.type.name === 'TelephoneNumber'); return child ? new VCard.TelephoneNumber(child) : undefined; } /** The child document of type "Email". */ get email() { const child = this.document.children.find(c => c.type.name === 'Email'); return child ? new VCard.Email(child) : undefined; } /** The child document of type "IMPP". */ get impp() { const child = this.document.children.find(c => c.type.name === 'IMPP'); return child ? new VCard.IMPP(child) : undefined; } /** The child document of type "Languages". */ get languages() { const child = this.document.children.find(c => c.type.name === 'Languages'); return child ? new VCard.Languages(child) : undefined; } /** The child document of type "TimeZone". */ get timeZone() { const child = this.document.children.find(c => c.type.name === 'TimeZone'); return child ? new VCard.TimeZone(child) : undefined; } /** The child document of type "GeoLocation". */ get geoLocation() { const child = this.document.children.find(c => c.type.name === 'GeoLocation'); return child ? new VCard.GeoLocation(child) : undefined; } /** The child document of type "Title". */ get title() { const child = this.document.children.find(c => c.type.name === 'Title'); return child ? new VCard.Title(child) : undefined; } /** The child document of type "Role". */ get role() { const child = this.document.children.find(c => c.type.name === 'Role'); return child ? new VCard.Role(child) : undefined; } /** The child document of type "Logo". */ get logo() { const child = this.document.children.find(c => c.type.name === 'Logo'); return child ? new VCard.Logo(child) : undefined; } /** The child document of type "Organisation". */ get organisation() { const child = this.document.children.find(c => c.type.name === 'Organisation'); return child ? new VCard.Organisation(child) : undefined; } /** The child document of type "Member". */ get member() { const child = this.document.children.find(c => c.type.name === 'Member'); return child ? new VCard.Member(child) : undefined; } /** The child document of type "Related". */ get related() { const child = this.document.children.find(c => c.type.name === 'Related'); return child ? new VCard.Related(child) : undefined; } /** The child document of type "Categories". */ get categories() { const child = this.document.children.find(c => c.type.name === 'Categories'); return child ? new VCard.Categories(child) : undefined; } /** The child document of type "Note". */ get note() { const child = this.document.children.find(c => c.type.name === 'Note'); return child ? new VCard.Note(child) : undefined; } /** The child document of type "ProductId". */ get productId() { const child = this.document.children.find(c => c.type.name === 'ProductId'); return child ? new VCard.ProductId(child) : undefined; } /** The child document of type "Revision". */ get revision() { const child = this.document.children.find(c => c.type.name === 'Revision'); return child ? new VCard.Revision(child) : undefined; } /** The child document of type "Sound". */ get sound() { const child = this.document.children.find(c => c.type.name === 'Sound'); return child ? new VCard.Sound(child) : undefined; } /** The child document of type "UID". */ get uid() { const child = this.document.children.find(c => c.type.name === 'UID'); return child ? new VCard.UID(child) : undefined; } /** The child document of type "ClientPIDMap". */ get clientPIDMap() { const child = this.document.children.find(c => c.type.name === 'ClientPIDMap'); return child ? new VCard.ClientPIDMap(child) : undefined; } /** The child document of type "URL". */ get url() { const child = this.document.children.find(c => c.type.name === 'URL'); return child ? new VCard.URL(child) : undefined; } /** The child document of type "PublicKey". */ get publicKey() { const child = this.document.children.find(c => c.type.name === 'PublicKey'); return child ? new VCard.PublicKey(child) : undefined; } /** The child document of type "BusyTimeURL". */ get busyTimeURL() { const child = this.document.children.find(c => c.type.name === 'BusyTimeURL'); return child ? new VCard.BusyTimeURL(child) : undefined; } /** The child document of type "CalendarURIForRequests". */ get calendarURIForRequests() { const child = this.document.children.find(c => c.type.name === 'CalendarURIForRequests'); return child ? new VCard.CalendarURIForRequests(child) : undefined; } /** The child document of type "CalendarURI". */ get calendarURI() { const child = this.document.children.find(c => c.type.name === 'CalendarURI');