react-native-scanbot-barcode-scanner-sdk 5.1.2-alpha.1 → 6.1.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Libraries.txt +439 -16
- package/RNScanbotBarcodeSDK.podspec +1 -1
- package/android/build.gradle +1 -1
- package/android/gradle.properties +4 -4
- package/android/src/main/java/io/scanbot/barcodesdk/plugin/reactnative/ScanbotBarcodeSdkModule.kt +27 -25
- package/android/src/main/java/io/scanbot/barcodesdk/plugin/reactnative/ScanbotBarcodeSdkPluginResultDelegate.kt +2 -2
- package/android/src/main/java/io/scanbot/barcodesdk/plugin/reactnative/components/barcode_scanner_view/ScanbotBarcodeScannerViewEvents.kt +4 -4
- package/android/src/main/java/io/scanbot/barcodesdk/plugin/reactnative/components/barcode_scanner_view/ScanbotBarcodeScannerViewManager.kt +0 -1
- package/android/src/main/java/io/scanbot/barcodesdk/plugin/reactnative/models/ScanbotBarcodeScannerModels.kt +4 -10
- package/ios/Components/BarcodeScannerView/RNScanbotBarcodeScannerLegacyView.m +4 -4
- package/ios/Components/BarcodeScannerView/RNScanbotBarcodeScannerView.mm +0 -4
- package/ios/Components/BarcodeScannerView/RNScanbotBarcodeScannerViewControllerWrapper.h +0 -3
- package/ios/Components/BarcodeScannerView/RNScanbotBarcodeScannerViewControllerWrapper.m +1 -5
- package/ios/ScanbotBarcodeSdk.m +57 -48
- package/ios/ScanbotBarcodeSdkPluginResultDelegate.h +1 -1
- package/ios/ScanbotBarcodeSdkPluginResultDelegate.m +13 -13
- package/lib/commonjs/component/spec/ScanbotBarcodeScannerViewNativeComponent.js.map +1 -1
- package/lib/commonjs/documents/BarcodeDocumentModel.js +612 -613
- package/lib/commonjs/documents/BarcodeDocumentModel.js.map +1 -1
- package/lib/commonjs/documents/GenericDocument.js +82 -49
- package/lib/commonjs/documents/GenericDocument.js.map +1 -1
- package/lib/commonjs/index.js +15 -13
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/ui_v2/barcode/ArTrackingOverlayConfiguration.js +10 -47
- package/lib/commonjs/ui_v2/barcode/ArTrackingOverlayConfiguration.js.map +1 -1
- package/lib/commonjs/ui_v2/barcode/BarcodeRecognizerConfiguration.js +47 -19
- package/lib/commonjs/ui_v2/barcode/BarcodeRecognizerConfiguration.js.map +1 -1
- package/lib/commonjs/ui_v2/barcode/BarcodeScannerConfiguration.js.map +1 -1
- package/lib/commonjs/ui_v2/barcode/FindAndPickScanningModeUseCase.js +8 -4
- package/lib/commonjs/ui_v2/barcode/FindAndPickScanningModeUseCase.js.map +1 -1
- package/lib/commonjs/ui_v2/barcode/MultipleScanningModeUseCase.js +9 -1
- package/lib/commonjs/ui_v2/barcode/MultipleScanningModeUseCase.js.map +1 -1
- package/lib/commonjs/ui_v2/barcode/SingleScanningModeUseCase.js +1 -1
- package/lib/commonjs/ui_v2/barcode/SingleScanningModeUseCase.js.map +1 -1
- package/lib/commonjs/ui_v2/common/CameraPermission.js +22 -6
- package/lib/commonjs/ui_v2/common/CameraPermission.js.map +1 -1
- package/lib/commonjs/ui_v2/common/Common.js +175 -5
- package/lib/commonjs/ui_v2/common/Common.js.map +1 -1
- package/lib/commonjs/ui_v2/common/NavigationBarConfiguration.js +6 -0
- package/lib/commonjs/ui_v2/common/NavigationBarConfiguration.js.map +1 -0
- package/lib/commonjs/ui_v2/common/ScanbotAlertDialog.js +27 -5
- package/lib/commonjs/ui_v2/common/ScanbotAlertDialog.js.map +1 -1
- package/lib/commonjs/ui_v2/common/UserGuidanceConfiguration.js +48 -1
- package/lib/commonjs/ui_v2/common/UserGuidanceConfiguration.js.map +1 -1
- package/lib/commonjs/ui_v2/index.js +14 -1
- package/lib/commonjs/ui_v2/index.js.map +1 -1
- package/lib/commonjs/utils.js +8 -1
- package/lib/commonjs/utils.js.map +1 -1
- package/lib/module/component/spec/ScanbotBarcodeScannerViewNativeComponent.js.map +1 -1
- package/lib/module/documents/BarcodeDocumentModel.js +611 -612
- package/lib/module/documents/BarcodeDocumentModel.js.map +1 -1
- package/lib/module/documents/GenericDocument.js +84 -51
- package/lib/module/documents/GenericDocument.js.map +1 -1
- package/lib/module/index.js +7 -1
- package/lib/module/index.js.map +1 -1
- package/lib/module/ui_v2/barcode/ArTrackingOverlayConfiguration.js +1 -36
- package/lib/module/ui_v2/barcode/ArTrackingOverlayConfiguration.js.map +1 -1
- package/lib/module/ui_v2/barcode/BarcodeRecognizerConfiguration.js +47 -19
- package/lib/module/ui_v2/barcode/BarcodeRecognizerConfiguration.js.map +1 -1
- package/lib/module/ui_v2/barcode/BarcodeScannerConfiguration.js.map +1 -1
- package/lib/module/ui_v2/barcode/FindAndPickScanningModeUseCase.js +6 -2
- package/lib/module/ui_v2/barcode/FindAndPickScanningModeUseCase.js.map +1 -1
- package/lib/module/ui_v2/barcode/MultipleScanningModeUseCase.js +9 -1
- package/lib/module/ui_v2/barcode/MultipleScanningModeUseCase.js.map +1 -1
- package/lib/module/ui_v2/barcode/SingleScanningModeUseCase.js +1 -1
- package/lib/module/ui_v2/barcode/SingleScanningModeUseCase.js.map +1 -1
- package/lib/module/ui_v2/common/CameraPermission.js +22 -6
- package/lib/module/ui_v2/common/CameraPermission.js.map +1 -1
- package/lib/module/ui_v2/common/Common.js +168 -2
- package/lib/module/ui_v2/common/Common.js.map +1 -1
- package/lib/module/ui_v2/common/NavigationBarConfiguration.js +2 -0
- package/lib/module/ui_v2/common/NavigationBarConfiguration.js.map +1 -0
- package/lib/module/ui_v2/common/ScanbotAlertDialog.js +28 -5
- package/lib/module/ui_v2/common/ScanbotAlertDialog.js.map +1 -1
- package/lib/module/ui_v2/common/UserGuidanceConfiguration.js +47 -0
- package/lib/module/ui_v2/common/UserGuidanceConfiguration.js.map +1 -1
- package/lib/module/ui_v2/index.js +3 -1
- package/lib/module/ui_v2/index.js.map +1 -1
- package/lib/module/utils.js +6 -0
- package/lib/module/utils.js.map +1 -1
- package/lib/typescript/src/component/barcode-camera-view/ScanbotBarcodeCameraViewProperties.d.ts +3 -5
- package/lib/typescript/src/component/barcode-camera-view/ScanbotBarcodeCameraViewProperties.d.ts.map +1 -1
- package/lib/typescript/src/component/spec/ScanbotBarcodeScannerViewNativeComponent.d.ts +0 -1
- package/lib/typescript/src/component/spec/ScanbotBarcodeScannerViewNativeComponent.d.ts.map +1 -1
- package/lib/typescript/src/configurations.d.ts +13 -5
- package/lib/typescript/src/configurations.d.ts.map +1 -1
- package/lib/typescript/src/customConfigurations.d.ts +19 -3
- package/lib/typescript/src/customConfigurations.d.ts.map +1 -1
- package/lib/typescript/src/documents/BarcodeDocumentModel.d.ts +70 -71
- package/lib/typescript/src/documents/BarcodeDocumentModel.d.ts.map +1 -1
- package/lib/typescript/src/documents/CommonFieldType.d.ts +58 -109
- package/lib/typescript/src/documents/CommonFieldType.d.ts.map +1 -1
- package/lib/typescript/src/documents/GenericDocument.d.ts +95 -86
- package/lib/typescript/src/documents/GenericDocument.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +5 -1
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/results.d.ts +1 -13
- package/lib/typescript/src/results.d.ts.map +1 -1
- package/lib/typescript/src/types.d.ts +25 -20
- package/lib/typescript/src/types.d.ts.map +1 -1
- package/lib/typescript/src/ui_v2/barcode/ArTrackingOverlayConfiguration.d.ts +1 -22
- package/lib/typescript/src/ui_v2/barcode/ArTrackingOverlayConfiguration.d.ts.map +1 -1
- package/lib/typescript/src/ui_v2/barcode/BarcodeRecognizerConfiguration.d.ts +41 -19
- package/lib/typescript/src/ui_v2/barcode/BarcodeRecognizerConfiguration.d.ts.map +1 -1
- package/lib/typescript/src/ui_v2/barcode/BarcodeScannerConfiguration.d.ts.map +1 -1
- package/lib/typescript/src/ui_v2/barcode/FindAndPickScanningModeUseCase.d.ts +4 -0
- package/lib/typescript/src/ui_v2/barcode/FindAndPickScanningModeUseCase.d.ts.map +1 -1
- package/lib/typescript/src/ui_v2/barcode/MultipleScanningModeUseCase.d.ts +5 -0
- package/lib/typescript/src/ui_v2/barcode/MultipleScanningModeUseCase.d.ts.map +1 -1
- package/lib/typescript/src/ui_v2/common/CameraPermission.d.ts.map +1 -1
- package/lib/typescript/src/ui_v2/common/Common.d.ts +103 -1
- package/lib/typescript/src/ui_v2/common/Common.d.ts.map +1 -1
- package/lib/typescript/src/ui_v2/common/NavigationBarConfiguration.d.ts +12 -0
- package/lib/typescript/src/ui_v2/common/NavigationBarConfiguration.d.ts.map +1 -0
- package/lib/typescript/src/ui_v2/common/ScanbotAlertDialog.d.ts +4 -0
- package/lib/typescript/src/ui_v2/common/ScanbotAlertDialog.d.ts.map +1 -1
- package/lib/typescript/src/ui_v2/common/UserGuidanceConfiguration.d.ts +25 -0
- package/lib/typescript/src/ui_v2/common/UserGuidanceConfiguration.d.ts.map +1 -1
- package/lib/typescript/src/ui_v2/index.d.ts +1 -0
- package/lib/typescript/src/ui_v2/index.d.ts.map +1 -1
- package/lib/typescript/src/utils.d.ts +5 -0
- package/lib/typescript/src/utils.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/component/barcode-camera-view/ScanbotBarcodeCameraViewProperties.ts +2 -5
- package/src/component/spec/ScanbotBarcodeScannerViewNativeComponent.ts +0 -1
- package/src/configurations.ts +19 -7
- package/src/customConfigurations.ts +19 -3
- package/src/documents/BarcodeDocumentModel.ts +644 -623
- package/src/documents/CommonFieldType.ts +59 -82
- package/src/documents/GenericDocument.ts +104 -86
- package/src/index.ts +7 -1
- package/src/results.ts +1 -16
- package/src/types.ts +26 -23
- package/src/ui_v2/barcode/ArTrackingOverlayConfiguration.ts +1 -36
- package/src/ui_v2/barcode/BarcodeRecognizerConfiguration.ts +60 -22
- package/src/ui_v2/barcode/BarcodeScannerConfiguration.ts +2 -2
- package/src/ui_v2/barcode/BarcodeUseCase.ts +1 -1
- package/src/ui_v2/barcode/FindAndPickScanningModeUseCase.ts +6 -2
- package/src/ui_v2/barcode/MultipleScanningModeUseCase.ts +9 -1
- package/src/ui_v2/barcode/SingleScanningModeUseCase.ts +1 -1
- package/src/ui_v2/common/CameraPermission.ts +22 -6
- package/src/ui_v2/common/Common.ts +168 -2
- package/src/ui_v2/common/NavigationBarConfiguration.ts +13 -0
- package/src/ui_v2/common/ScanbotAlertDialog.ts +25 -6
- package/src/ui_v2/common/UserGuidanceConfiguration.ts +41 -0
- package/src/ui_v2/index.ts +5 -9
- package/src/utils.ts +10 -0
- package/lib/commonjs/documents/Point.js +0 -14
- package/lib/commonjs/documents/Point.js.map +0 -1
- package/lib/module/documents/Point.js +0 -7
- package/lib/module/documents/Point.js.map +0 -1
- package/lib/typescript/src/documents/Point.d.ts +0 -6
- package/lib/typescript/src/documents/Point.d.ts.map +0 -1
- package/src/documents/Point.ts +0 -10
|
@@ -1,73 +1,73 @@
|
|
|
1
1
|
/// All possible root document types.
|
|
2
2
|
|
|
3
|
-
export const
|
|
4
|
-
export const
|
|
5
|
-
export const
|
|
6
|
-
export const
|
|
7
|
-
export const
|
|
8
|
-
export const
|
|
9
|
-
export const
|
|
10
|
-
export const
|
|
11
|
-
export const
|
|
12
|
-
export const
|
|
13
|
-
export const
|
|
14
|
-
export const
|
|
15
|
-
export const
|
|
16
|
-
export const
|
|
17
|
-
export const
|
|
18
|
-
export const
|
|
19
|
-
export const
|
|
20
|
-
export const
|
|
21
|
-
export const
|
|
22
|
-
export const
|
|
23
|
-
export const
|
|
24
|
-
export const
|
|
25
|
-
export const
|
|
26
|
-
export const
|
|
27
|
-
export const
|
|
28
|
-
export const
|
|
29
|
-
export const
|
|
30
|
-
export const
|
|
31
|
-
export const
|
|
32
|
-
export const
|
|
33
|
-
export const
|
|
34
|
-
export const
|
|
35
|
-
export const
|
|
36
|
-
export const
|
|
37
|
-
export const
|
|
38
|
-
export const
|
|
39
|
-
export const
|
|
40
|
-
export const
|
|
41
|
-
export const
|
|
42
|
-
export const
|
|
43
|
-
export const
|
|
44
|
-
export const
|
|
45
|
-
export const
|
|
46
|
-
export const
|
|
47
|
-
export const
|
|
48
|
-
export const
|
|
49
|
-
export const
|
|
50
|
-
export const
|
|
51
|
-
export const
|
|
52
|
-
export const
|
|
53
|
-
export const
|
|
54
|
-
export const
|
|
55
|
-
export const
|
|
56
|
-
export const
|
|
57
|
-
export const
|
|
58
|
-
export const
|
|
59
|
-
export const
|
|
60
|
-
export const
|
|
61
|
-
export const
|
|
62
|
-
export const
|
|
63
|
-
export const
|
|
64
|
-
export const
|
|
65
|
-
export const
|
|
66
|
-
export const
|
|
67
|
-
export const
|
|
68
|
-
export const
|
|
69
|
-
export const
|
|
70
|
-
export const
|
|
3
|
+
export const BoardingPassDocumentType = 'BoardingPass';
|
|
4
|
+
export const BoardingPassLegDocumentType = 'Leg';
|
|
5
|
+
export const SwissQRDocumentType = 'SwissQR';
|
|
6
|
+
export const DEMedicalPlanDocumentType = 'DEMedicalPlan';
|
|
7
|
+
export const DEMedicalPlanPatientDocumentType = 'Patient';
|
|
8
|
+
export const DEMedicalPlanDoctorDocumentType = 'Doctor';
|
|
9
|
+
export const DEMedicalPlanSubheadingDocumentType = 'Subheading';
|
|
10
|
+
export const DEMedicalPlanSubheadingMedicineDocumentType = 'Medicine';
|
|
11
|
+
export const DEMedicalPlanSubheadingMedicineSubstanceDocumentType = 'Substance';
|
|
12
|
+
export const DEMedicalPlanSubheadingPrescriptionDocumentType = 'Prescription';
|
|
13
|
+
export const IDCardPDF417DocumentType = 'IDCardPDF417';
|
|
14
|
+
export const GS1DocumentType = 'GS1';
|
|
15
|
+
export const GS1ElementDocumentType = 'Element';
|
|
16
|
+
export const GS1ElementValidationErrorDocumentType = 'ValidationError';
|
|
17
|
+
export const SEPADocumentType = 'SEPA';
|
|
18
|
+
export const MedicalCertificateDocumentType = 'MedicalCertificate';
|
|
19
|
+
export const VCardDocumentType = 'VCard';
|
|
20
|
+
export const VCardEntryDocumentType = 'Entry';
|
|
21
|
+
export const VCardVersionDocumentType = 'Version';
|
|
22
|
+
export const VCardSourceDocumentType = 'Source';
|
|
23
|
+
export const VCardKindDocumentType = 'Kind';
|
|
24
|
+
export const VCardXMLDocumentType = 'XML';
|
|
25
|
+
export const VCardNameDocumentType = 'Name';
|
|
26
|
+
export const VCardFirstNameDocumentType = 'FirstName';
|
|
27
|
+
export const VCardNicknameDocumentType = 'Nickname';
|
|
28
|
+
export const VCardBirthdayDocumentType = 'Birthday';
|
|
29
|
+
export const VCardAnniversaryDocumentType = 'Anniversary';
|
|
30
|
+
export const VCardGenderDocumentType = 'Gender';
|
|
31
|
+
export const VCardDeliveryAddressDocumentType = 'DeliveryAddress';
|
|
32
|
+
export const VCardPhotoDocumentType = 'Photo';
|
|
33
|
+
export const VCardTelephoneNumberDocumentType = 'TelephoneNumber';
|
|
34
|
+
export const VCardEmailDocumentType = 'Email';
|
|
35
|
+
export const VCardIMPPDocumentType = 'IMPP';
|
|
36
|
+
export const VCardLanguagesDocumentType = 'Languages';
|
|
37
|
+
export const VCardTimeZoneDocumentType = 'TimeZone';
|
|
38
|
+
export const VCardGeoLocationDocumentType = 'GeoLocation';
|
|
39
|
+
export const VCardTitleDocumentType = 'Title';
|
|
40
|
+
export const VCardRoleDocumentType = 'Role';
|
|
41
|
+
export const VCardLogoDocumentType = 'Logo';
|
|
42
|
+
export const VCardOrganisationDocumentType = 'Organisation';
|
|
43
|
+
export const VCardMemberDocumentType = 'Member';
|
|
44
|
+
export const VCardRelatedDocumentType = 'Related';
|
|
45
|
+
export const VCardCategoriesDocumentType = 'Categories';
|
|
46
|
+
export const VCardNoteDocumentType = 'Note';
|
|
47
|
+
export const VCardProductIdDocumentType = 'ProductId';
|
|
48
|
+
export const VCardRevisionDocumentType = 'Revision';
|
|
49
|
+
export const VCardSoundDocumentType = 'Sound';
|
|
50
|
+
export const VCardUIDDocumentType = 'UID';
|
|
51
|
+
export const VCardClientPIDMapDocumentType = 'ClientPIDMap';
|
|
52
|
+
export const VCardURLDocumentType = 'URL';
|
|
53
|
+
export const VCardPublicKeyDocumentType = 'PublicKey';
|
|
54
|
+
export const VCardBusyTimeURLDocumentType = 'BusyTimeURL';
|
|
55
|
+
export const VCardCalendarURIForRequestsDocumentType = 'CalendarURIForRequests';
|
|
56
|
+
export const VCardCalendarURIDocumentType = 'CalendarURI';
|
|
57
|
+
export const VCardCustomDocumentType = 'Custom';
|
|
58
|
+
export const AAMVADocumentType = 'AAMVA';
|
|
59
|
+
export const AAMVATitleDataDocumentType = 'TitleData';
|
|
60
|
+
export const AAMVARegistrationDataDocumentType = 'RegistrationData';
|
|
61
|
+
export const AAMVAMotorCarrierDataDocumentType = 'MotorCarrierData';
|
|
62
|
+
export const AAMVARegistrantAndVehicleDataDocumentType = 'RegistrantAndVehicleData';
|
|
63
|
+
export const AAMVAVehicleOwnerDataDocumentType = 'VehicleOwnerData';
|
|
64
|
+
export const AAMVAVehicleDataDocumentType = 'VehicleData';
|
|
65
|
+
export const AAMVAVehicleSafetyInspectionDataDocumentType = 'VehicleSafetyInspectionData';
|
|
66
|
+
export const AAMVADLIDDocumentType = 'DLID';
|
|
67
|
+
export const AAMVADriverLicenseDocumentType = 'DriverLicense';
|
|
68
|
+
export const AAMVAIDCardDocumentType = 'IDCard';
|
|
69
|
+
export const AAMVAEnhancedDriverLicenseDocumentType = 'EnhancedDriverLicense';
|
|
70
|
+
export const AAMVARawDocumentDocumentType = 'RawDocument';
|
|
71
71
|
|
|
72
72
|
/** Boarding Pass */
|
|
73
73
|
export class BoardingPass {
|
|
@@ -75,38 +75,38 @@ export class BoardingPass {
|
|
|
75
75
|
return this._document;
|
|
76
76
|
}
|
|
77
77
|
constructor(document) {
|
|
78
|
-
if (document.type.name
|
|
78
|
+
if (document.type.name !== this.requiredDocumentType()) {
|
|
79
79
|
throw new Error(`Expected document type ${this.requiredDocumentType()}, got ${document.type.name}`);
|
|
80
80
|
}
|
|
81
81
|
this._document = document;
|
|
82
82
|
}
|
|
83
83
|
requiredDocumentType() {
|
|
84
|
-
return
|
|
84
|
+
return BoardingPassDocumentType;
|
|
85
85
|
}
|
|
86
86
|
|
|
87
87
|
/** Electronic Ticket */
|
|
88
88
|
get electronicTicket() {
|
|
89
|
-
return this.document.fields.find(f => f.type.name
|
|
89
|
+
return this.document.fields.find(f => f.type.name === 'ElectronicTicket');
|
|
90
90
|
}
|
|
91
91
|
|
|
92
92
|
/** Name */
|
|
93
93
|
get name() {
|
|
94
|
-
return this.document.fields.find(f => f.type.name
|
|
94
|
+
return this.document.fields.find(f => f.type.name === 'Name');
|
|
95
95
|
}
|
|
96
96
|
|
|
97
97
|
/** Number Of Legs */
|
|
98
98
|
get numberOfLegs() {
|
|
99
|
-
return this.document.fields.find(f => f.type.name
|
|
99
|
+
return this.document.fields.find(f => f.type.name === 'NumberOfLegs');
|
|
100
100
|
}
|
|
101
101
|
|
|
102
102
|
/** Security Data */
|
|
103
103
|
get securityData() {
|
|
104
|
-
return this.document.fields.find(f => f.type.name
|
|
104
|
+
return this.document.fields.find(f => f.type.name === 'SecurityData');
|
|
105
105
|
}
|
|
106
106
|
|
|
107
107
|
/** An array of all children of type "Leg". */
|
|
108
108
|
get legs() {
|
|
109
|
-
return this.document.children.filter(c => c.type.name
|
|
109
|
+
return this.document.children.filter(c => c.type.name === 'Leg').map(c => new BoardingPass.Leg(c));
|
|
110
110
|
}
|
|
111
111
|
}
|
|
112
112
|
(function (_BoardingPass) {
|
|
@@ -115,168 +115,168 @@ export class BoardingPass {
|
|
|
115
115
|
return this._document;
|
|
116
116
|
}
|
|
117
117
|
constructor(document) {
|
|
118
|
-
if (document.type.name
|
|
118
|
+
if (document.type.name !== this.requiredDocumentType()) {
|
|
119
119
|
throw new Error(`Expected document type ${this.requiredDocumentType()}, got ${document.type.name}`);
|
|
120
120
|
}
|
|
121
121
|
this._document = document;
|
|
122
122
|
}
|
|
123
123
|
requiredDocumentType() {
|
|
124
|
-
return
|
|
124
|
+
return BoardingPassLegDocumentType;
|
|
125
125
|
}
|
|
126
126
|
|
|
127
127
|
/** Airline Designator Of Boarding Pass Issuer */
|
|
128
128
|
get airlineDesignatorOfBoardingPassIssuer() {
|
|
129
|
-
return this.document.fields.find(f => f.type.name
|
|
129
|
+
return this.document.fields.find(f => f.type.name === 'AirlineDesignatorOfBoardingPassIssuer');
|
|
130
130
|
}
|
|
131
131
|
|
|
132
132
|
/** Airline Numeric Code */
|
|
133
133
|
get airlineNumericCode() {
|
|
134
|
-
return this.document.fields.find(f => f.type.name
|
|
134
|
+
return this.document.fields.find(f => f.type.name === 'AirlineNumericCode');
|
|
135
135
|
}
|
|
136
136
|
|
|
137
137
|
/** Baggage Tag License Plate Numbers */
|
|
138
138
|
get baggageTagLicensePlateNumbers() {
|
|
139
|
-
return this.document.fields.find(f => f.type.name
|
|
139
|
+
return this.document.fields.find(f => f.type.name === 'BaggageTagLicensePlateNumbers');
|
|
140
140
|
}
|
|
141
141
|
|
|
142
142
|
/** Check In Sequence Number */
|
|
143
143
|
get checkInSequenceNumber() {
|
|
144
|
-
return this.document.fields.find(f => f.type.name
|
|
144
|
+
return this.document.fields.find(f => f.type.name === 'CheckInSequenceNumber');
|
|
145
145
|
}
|
|
146
146
|
|
|
147
147
|
/** Compartment Code */
|
|
148
148
|
get compartmentCode() {
|
|
149
|
-
return this.document.fields.find(f => f.type.name
|
|
149
|
+
return this.document.fields.find(f => f.type.name === 'CompartmentCode');
|
|
150
150
|
}
|
|
151
151
|
|
|
152
152
|
/** Date Of Boarding Pass Issuance Julian */
|
|
153
153
|
get dateOfBoardingPassIssuanceJulian() {
|
|
154
|
-
return this.document.fields.find(f => f.type.name
|
|
154
|
+
return this.document.fields.find(f => f.type.name === 'DateOfBoardingPassIssuanceJulian');
|
|
155
155
|
}
|
|
156
156
|
|
|
157
157
|
/** Date Of Flight Julian */
|
|
158
158
|
get dateOfFlightJulian() {
|
|
159
|
-
return this.document.fields.find(f => f.type.name
|
|
159
|
+
return this.document.fields.find(f => f.type.name === 'DateOfFlightJulian');
|
|
160
160
|
}
|
|
161
161
|
|
|
162
162
|
/** Departure Airport Code */
|
|
163
163
|
get departureAirportCode() {
|
|
164
|
-
return this.document.fields.find(f => f.type.name
|
|
164
|
+
return this.document.fields.find(f => f.type.name === 'DepartureAirportCode');
|
|
165
165
|
}
|
|
166
166
|
|
|
167
167
|
/** Destination Airport Code */
|
|
168
168
|
get destinationAirportCode() {
|
|
169
|
-
return this.document.fields.find(f => f.type.name
|
|
169
|
+
return this.document.fields.find(f => f.type.name === 'DestinationAirportCode');
|
|
170
170
|
}
|
|
171
171
|
|
|
172
172
|
/** Document Form Serial Number */
|
|
173
173
|
get documentFormSerialNumber() {
|
|
174
|
-
return this.document.fields.find(f => f.type.name
|
|
174
|
+
return this.document.fields.find(f => f.type.name === 'DocumentFormSerialNumber');
|
|
175
175
|
}
|
|
176
176
|
|
|
177
177
|
/** Document Type */
|
|
178
178
|
get documentType() {
|
|
179
|
-
return this.document.fields.find(f => f.type.name
|
|
179
|
+
return this.document.fields.find(f => f.type.name === 'DocumentType');
|
|
180
180
|
}
|
|
181
181
|
|
|
182
182
|
/** Fast Track */
|
|
183
183
|
get fastTrack() {
|
|
184
|
-
return this.document.fields.find(f => f.type.name
|
|
184
|
+
return this.document.fields.find(f => f.type.name === 'FastTrack');
|
|
185
185
|
}
|
|
186
186
|
|
|
187
187
|
/** First Non Consecutive Baggage Tag License Plate Number */
|
|
188
188
|
get firstNonConsecutiveBaggageTagLicensePlateNumber() {
|
|
189
|
-
return this.document.fields.find(f => f.type.name
|
|
189
|
+
return this.document.fields.find(f => f.type.name === 'FirstNonConsecutiveBaggageTagLicensePlateNumber');
|
|
190
190
|
}
|
|
191
191
|
|
|
192
192
|
/** Flight Number */
|
|
193
193
|
get flightNumber() {
|
|
194
|
-
return this.document.fields.find(f => f.type.name
|
|
194
|
+
return this.document.fields.find(f => f.type.name === 'FlightNumber');
|
|
195
195
|
}
|
|
196
196
|
|
|
197
197
|
/** For Individual Airline Use */
|
|
198
198
|
get forIndividualAirlineUse() {
|
|
199
|
-
return this.document.fields.find(f => f.type.name
|
|
199
|
+
return this.document.fields.find(f => f.type.name === 'ForIndividualAirlineUse');
|
|
200
200
|
}
|
|
201
201
|
|
|
202
202
|
/** Free Baggage Allowance */
|
|
203
203
|
get freeBaggageAllowance() {
|
|
204
|
-
return this.document.fields.find(f => f.type.name
|
|
204
|
+
return this.document.fields.find(f => f.type.name === 'FreeBaggageAllowance');
|
|
205
205
|
}
|
|
206
206
|
|
|
207
207
|
/** Frequent Flyer Airline Designator */
|
|
208
208
|
get frequentFlyerAirlineDesignator() {
|
|
209
|
-
return this.document.fields.find(f => f.type.name
|
|
209
|
+
return this.document.fields.find(f => f.type.name === 'FrequentFlyerAirlineDesignator');
|
|
210
210
|
}
|
|
211
211
|
|
|
212
212
|
/** Frequent Flyer Number */
|
|
213
213
|
get frequentFlyerNumber() {
|
|
214
|
-
return this.document.fields.find(f => f.type.name
|
|
214
|
+
return this.document.fields.find(f => f.type.name === 'FrequentFlyerNumber');
|
|
215
215
|
}
|
|
216
216
|
|
|
217
217
|
/** IDAD Indicator */
|
|
218
218
|
get idadIndicator() {
|
|
219
|
-
return this.document.fields.find(f => f.type.name
|
|
219
|
+
return this.document.fields.find(f => f.type.name === 'IDADIndicator');
|
|
220
220
|
}
|
|
221
221
|
|
|
222
222
|
/** International Documentation Verification */
|
|
223
223
|
get internationalDocumentationVerification() {
|
|
224
|
-
return this.document.fields.find(f => f.type.name
|
|
224
|
+
return this.document.fields.find(f => f.type.name === 'InternationalDocumentationVerification');
|
|
225
225
|
}
|
|
226
226
|
|
|
227
227
|
/** Marketing Carrier Designator */
|
|
228
228
|
get marketingCarrierDesignator() {
|
|
229
|
-
return this.document.fields.find(f => f.type.name
|
|
229
|
+
return this.document.fields.find(f => f.type.name === 'MarketingCarrierDesignator');
|
|
230
230
|
}
|
|
231
231
|
|
|
232
232
|
/** Operating Carrier Designator */
|
|
233
233
|
get operatingCarrierDesignator() {
|
|
234
|
-
return this.document.fields.find(f => f.type.name
|
|
234
|
+
return this.document.fields.find(f => f.type.name === 'OperatingCarrierDesignator');
|
|
235
235
|
}
|
|
236
236
|
|
|
237
237
|
/** Operating Carrier PNR Code */
|
|
238
238
|
get operatingCarrierPNRCode() {
|
|
239
|
-
return this.document.fields.find(f => f.type.name
|
|
239
|
+
return this.document.fields.find(f => f.type.name === 'OperatingCarrierPNRCode');
|
|
240
240
|
}
|
|
241
241
|
|
|
242
242
|
/** Passenger Description */
|
|
243
243
|
get passengerDescription() {
|
|
244
|
-
return this.document.fields.find(f => f.type.name
|
|
244
|
+
return this.document.fields.find(f => f.type.name === 'PassengerDescription');
|
|
245
245
|
}
|
|
246
246
|
|
|
247
247
|
/** Passenger Status */
|
|
248
248
|
get passengerStatus() {
|
|
249
|
-
return this.document.fields.find(f => f.type.name
|
|
249
|
+
return this.document.fields.find(f => f.type.name === 'PassengerStatus');
|
|
250
250
|
}
|
|
251
251
|
|
|
252
252
|
/** Seat Number */
|
|
253
253
|
get seatNumber() {
|
|
254
|
-
return this.document.fields.find(f => f.type.name
|
|
254
|
+
return this.document.fields.find(f => f.type.name === 'SeatNumber');
|
|
255
255
|
}
|
|
256
256
|
|
|
257
257
|
/** Second Non Consecutive Baggage Tag License Plate Number */
|
|
258
258
|
get secondNonConsecutiveBaggageTagLicensePlateNumber() {
|
|
259
|
-
return this.document.fields.find(f => f.type.name
|
|
259
|
+
return this.document.fields.find(f => f.type.name === 'SecondNonConsecutiveBaggageTagLicensePlateNumber');
|
|
260
260
|
}
|
|
261
261
|
|
|
262
262
|
/** Selectee Indicator */
|
|
263
263
|
get selecteeIndicator() {
|
|
264
|
-
return this.document.fields.find(f => f.type.name
|
|
264
|
+
return this.document.fields.find(f => f.type.name === 'SelecteeIndicator');
|
|
265
265
|
}
|
|
266
266
|
|
|
267
267
|
/** Source Of Boarding Pass Issuance */
|
|
268
268
|
get sourceOfBoardingPassIssuance() {
|
|
269
|
-
return this.document.fields.find(f => f.type.name
|
|
269
|
+
return this.document.fields.find(f => f.type.name === 'SourceOfBoardingPassIssuance');
|
|
270
270
|
}
|
|
271
271
|
|
|
272
272
|
/** Source Of Check In */
|
|
273
273
|
get sourceOfCheckIn() {
|
|
274
|
-
return this.document.fields.find(f => f.type.name
|
|
274
|
+
return this.document.fields.find(f => f.type.name === 'SourceOfCheckIn');
|
|
275
275
|
}
|
|
276
276
|
|
|
277
277
|
/** VersionNumber */
|
|
278
278
|
get versionNumber() {
|
|
279
|
-
return this.document.fields.find(f => f.type.name
|
|
279
|
+
return this.document.fields.find(f => f.type.name === 'VersionNumber');
|
|
280
280
|
}
|
|
281
281
|
}
|
|
282
282
|
_BoardingPass.Leg = Leg;
|
|
@@ -287,178 +287,178 @@ export class SwissQR {
|
|
|
287
287
|
return this._document;
|
|
288
288
|
}
|
|
289
289
|
constructor(document) {
|
|
290
|
-
if (document.type.name
|
|
290
|
+
if (document.type.name !== this.requiredDocumentType()) {
|
|
291
291
|
throw new Error(`Expected document type ${this.requiredDocumentType()}, got ${document.type.name}`);
|
|
292
292
|
}
|
|
293
293
|
this._document = document;
|
|
294
294
|
}
|
|
295
295
|
requiredDocumentType() {
|
|
296
|
-
return
|
|
296
|
+
return SwissQRDocumentType;
|
|
297
297
|
}
|
|
298
298
|
|
|
299
299
|
/** Additional Billing Information */
|
|
300
300
|
get additionalBillingInformation() {
|
|
301
|
-
return this.document.fields.find(f => f.type.name
|
|
301
|
+
return this.document.fields.find(f => f.type.name === 'AdditionalBillingInformation');
|
|
302
302
|
}
|
|
303
303
|
|
|
304
304
|
/** Additional Info Trailer */
|
|
305
305
|
get additionalInfoTrailer() {
|
|
306
|
-
return this.document.fields.find(f => f.type.name
|
|
306
|
+
return this.document.fields.find(f => f.type.name === 'AdditionalInfoTrailer');
|
|
307
307
|
}
|
|
308
308
|
|
|
309
309
|
/** Additional Info Unstructured */
|
|
310
310
|
get additionalInfoUnstructured() {
|
|
311
|
-
return this.document.fields.find(f => f.type.name
|
|
311
|
+
return this.document.fields.find(f => f.type.name === 'AdditionalInfoUnstructured');
|
|
312
312
|
}
|
|
313
313
|
|
|
314
314
|
/** Alternative Procedure Parameter */
|
|
315
315
|
get alternativeProcedureParameter() {
|
|
316
|
-
return this.document.fields.find(f => f.type.name
|
|
316
|
+
return this.document.fields.find(f => f.type.name === 'AlternativeProcedureParameter');
|
|
317
317
|
}
|
|
318
318
|
|
|
319
319
|
/** Amount */
|
|
320
320
|
get amount() {
|
|
321
|
-
return this.document.fields.find(f => f.type.name
|
|
321
|
+
return this.document.fields.find(f => f.type.name === 'Amount');
|
|
322
322
|
}
|
|
323
323
|
|
|
324
324
|
/** Currency */
|
|
325
325
|
get currency() {
|
|
326
|
-
return this.document.fields.find(f => f.type.name
|
|
326
|
+
return this.document.fields.find(f => f.type.name === 'Currency');
|
|
327
327
|
}
|
|
328
328
|
|
|
329
329
|
/** Debtor Address Type */
|
|
330
330
|
get debtorAddressType() {
|
|
331
|
-
return this.document.fields.find(f => f.type.name
|
|
331
|
+
return this.document.fields.find(f => f.type.name === 'DebtorAddressType');
|
|
332
332
|
}
|
|
333
333
|
|
|
334
334
|
/** Debtor Building Or Address Line 2 */
|
|
335
335
|
get debtorBuildingOrAddressLine2() {
|
|
336
|
-
return this.document.fields.find(f => f.type.name
|
|
336
|
+
return this.document.fields.find(f => f.type.name === 'DebtorBuildingOrAddressLine2');
|
|
337
337
|
}
|
|
338
338
|
|
|
339
339
|
/** Debtor Country */
|
|
340
340
|
get debtorCountry() {
|
|
341
|
-
return this.document.fields.find(f => f.type.name
|
|
341
|
+
return this.document.fields.find(f => f.type.name === 'DebtorCountry');
|
|
342
342
|
}
|
|
343
343
|
|
|
344
344
|
/** Debtor Name */
|
|
345
345
|
get debtorName() {
|
|
346
|
-
return this.document.fields.find(f => f.type.name
|
|
346
|
+
return this.document.fields.find(f => f.type.name === 'DebtorName');
|
|
347
347
|
}
|
|
348
348
|
|
|
349
349
|
/** Debtor Place */
|
|
350
350
|
get debtorPlace() {
|
|
351
|
-
return this.document.fields.find(f => f.type.name
|
|
351
|
+
return this.document.fields.find(f => f.type.name === 'DebtorPlace');
|
|
352
352
|
}
|
|
353
353
|
|
|
354
354
|
/** Debtor Postal Code */
|
|
355
355
|
get debtorPostalCode() {
|
|
356
|
-
return this.document.fields.find(f => f.type.name
|
|
356
|
+
return this.document.fields.find(f => f.type.name === 'DebtorPostalCode');
|
|
357
357
|
}
|
|
358
358
|
|
|
359
359
|
/** Debtor Street Or Address Line 1 */
|
|
360
360
|
get debtorStreetOrAddressLine1() {
|
|
361
|
-
return this.document.fields.find(f => f.type.name
|
|
361
|
+
return this.document.fields.find(f => f.type.name === 'DebtorStreetOrAddressLine1');
|
|
362
362
|
}
|
|
363
363
|
|
|
364
364
|
/** Due Date */
|
|
365
365
|
get dueDate() {
|
|
366
|
-
return this.document.fields.find(f => f.type.name
|
|
366
|
+
return this.document.fields.find(f => f.type.name === 'DueDate');
|
|
367
367
|
}
|
|
368
368
|
|
|
369
369
|
/** Encoding */
|
|
370
370
|
get encoding() {
|
|
371
|
-
return this.document.fields.find(f => f.type.name
|
|
371
|
+
return this.document.fields.find(f => f.type.name === 'Encoding');
|
|
372
372
|
}
|
|
373
373
|
|
|
374
374
|
/** Final Payee Address Type */
|
|
375
375
|
get finalPayeeAddressType() {
|
|
376
|
-
return this.document.fields.find(f => f.type.name
|
|
376
|
+
return this.document.fields.find(f => f.type.name === 'FinalPayeeAddressType');
|
|
377
377
|
}
|
|
378
378
|
|
|
379
379
|
/** Final Payee Building Or Address Line 2 */
|
|
380
380
|
get finalPayeeBuildingOrAddressLine2() {
|
|
381
|
-
return this.document.fields.find(f => f.type.name
|
|
381
|
+
return this.document.fields.find(f => f.type.name === 'FinalPayeeBuildingOrAddressLine2');
|
|
382
382
|
}
|
|
383
383
|
|
|
384
384
|
/** Final Payee Country */
|
|
385
385
|
get finalPayeeCountry() {
|
|
386
|
-
return this.document.fields.find(f => f.type.name
|
|
386
|
+
return this.document.fields.find(f => f.type.name === 'FinalPayeeCountry');
|
|
387
387
|
}
|
|
388
388
|
|
|
389
389
|
/** Final Payee Name */
|
|
390
390
|
get finalPayeeName() {
|
|
391
|
-
return this.document.fields.find(f => f.type.name
|
|
391
|
+
return this.document.fields.find(f => f.type.name === 'FinalPayeeName');
|
|
392
392
|
}
|
|
393
393
|
|
|
394
394
|
/** Final Payee Place */
|
|
395
395
|
get finalPayeePlace() {
|
|
396
|
-
return this.document.fields.find(f => f.type.name
|
|
396
|
+
return this.document.fields.find(f => f.type.name === 'FinalPayeePlace');
|
|
397
397
|
}
|
|
398
398
|
|
|
399
399
|
/** Final Payee Postal Code */
|
|
400
400
|
get finalPayeePostalCode() {
|
|
401
|
-
return this.document.fields.find(f => f.type.name
|
|
401
|
+
return this.document.fields.find(f => f.type.name === 'FinalPayeePostalCode');
|
|
402
402
|
}
|
|
403
403
|
|
|
404
404
|
/** Final Payee Street Or Address Line 1 */
|
|
405
405
|
get finalPayeeStreetOrAddressLine1() {
|
|
406
|
-
return this.document.fields.find(f => f.type.name
|
|
406
|
+
return this.document.fields.find(f => f.type.name === 'FinalPayeeStreetOrAddressLine1');
|
|
407
407
|
}
|
|
408
408
|
|
|
409
409
|
/** IBAN */
|
|
410
410
|
get iban() {
|
|
411
|
-
return this.document.fields.find(f => f.type.name
|
|
411
|
+
return this.document.fields.find(f => f.type.name === 'IBAN');
|
|
412
412
|
}
|
|
413
413
|
|
|
414
414
|
/** Payee Address Type */
|
|
415
415
|
get payeeAddressType() {
|
|
416
|
-
return this.document.fields.find(f => f.type.name
|
|
416
|
+
return this.document.fields.find(f => f.type.name === 'PayeeAddressType');
|
|
417
417
|
}
|
|
418
418
|
|
|
419
419
|
/** Payee Building Or Address Line 2 */
|
|
420
420
|
get payeeBuildingOrAddressLine2() {
|
|
421
|
-
return this.document.fields.find(f => f.type.name
|
|
421
|
+
return this.document.fields.find(f => f.type.name === 'PayeeBuildingOrAddressLine2');
|
|
422
422
|
}
|
|
423
423
|
|
|
424
424
|
/** Payee Country */
|
|
425
425
|
get payeeCountry() {
|
|
426
|
-
return this.document.fields.find(f => f.type.name
|
|
426
|
+
return this.document.fields.find(f => f.type.name === 'PayeeCountry');
|
|
427
427
|
}
|
|
428
428
|
|
|
429
429
|
/** Payee Name */
|
|
430
430
|
get payeeName() {
|
|
431
|
-
return this.document.fields.find(f => f.type.name
|
|
431
|
+
return this.document.fields.find(f => f.type.name === 'PayeeName');
|
|
432
432
|
}
|
|
433
433
|
|
|
434
434
|
/** Payee Place */
|
|
435
435
|
get payeePlace() {
|
|
436
|
-
return this.document.fields.find(f => f.type.name
|
|
436
|
+
return this.document.fields.find(f => f.type.name === 'PayeePlace');
|
|
437
437
|
}
|
|
438
438
|
|
|
439
439
|
/** Payee Postal Code */
|
|
440
440
|
get payeePostalCode() {
|
|
441
|
-
return this.document.fields.find(f => f.type.name
|
|
441
|
+
return this.document.fields.find(f => f.type.name === 'PayeePostalCode');
|
|
442
442
|
}
|
|
443
443
|
|
|
444
444
|
/** Payee Street Or Address Line 1 */
|
|
445
445
|
get payeeStreetOrAddressLine1() {
|
|
446
|
-
return this.document.fields.find(f => f.type.name
|
|
446
|
+
return this.document.fields.find(f => f.type.name === 'PayeeStreetOrAddressLine1');
|
|
447
447
|
}
|
|
448
448
|
|
|
449
449
|
/** Payment Reference */
|
|
450
450
|
get paymentReference() {
|
|
451
|
-
return this.document.fields.find(f => f.type.name
|
|
451
|
+
return this.document.fields.find(f => f.type.name === 'PaymentReference');
|
|
452
452
|
}
|
|
453
453
|
|
|
454
454
|
/** Payment Reference Type */
|
|
455
455
|
get paymentReferenceType() {
|
|
456
|
-
return this.document.fields.find(f => f.type.name
|
|
456
|
+
return this.document.fields.find(f => f.type.name === 'PaymentReferenceType');
|
|
457
457
|
}
|
|
458
458
|
|
|
459
459
|
/** Version */
|
|
460
460
|
get version() {
|
|
461
|
-
return this.document.fields.find(f => f.type.name
|
|
461
|
+
return this.document.fields.find(f => f.type.name === 'Version');
|
|
462
462
|
}
|
|
463
463
|
}
|
|
464
464
|
|
|
@@ -468,60 +468,60 @@ export class DEMedicalPlan {
|
|
|
468
468
|
return this._document;
|
|
469
469
|
}
|
|
470
470
|
constructor(document) {
|
|
471
|
-
if (document.type.name
|
|
471
|
+
if (document.type.name !== this.requiredDocumentType()) {
|
|
472
472
|
throw new Error(`Expected document type ${this.requiredDocumentType()}, got ${document.type.name}`);
|
|
473
473
|
}
|
|
474
474
|
this._document = document;
|
|
475
475
|
}
|
|
476
476
|
requiredDocumentType() {
|
|
477
|
-
return
|
|
477
|
+
return DEMedicalPlanDocumentType;
|
|
478
478
|
}
|
|
479
479
|
|
|
480
480
|
/** Current Page */
|
|
481
481
|
get currentPage() {
|
|
482
|
-
return this.document.fields.find(f => f.type.name
|
|
482
|
+
return this.document.fields.find(f => f.type.name === 'CurrentPage');
|
|
483
483
|
}
|
|
484
484
|
|
|
485
485
|
/** Document Version Number */
|
|
486
486
|
get documentVersionNumber() {
|
|
487
|
-
return this.document.fields.find(f => f.type.name
|
|
487
|
+
return this.document.fields.find(f => f.type.name === 'DocumentVersionNumber');
|
|
488
488
|
}
|
|
489
489
|
|
|
490
490
|
/** GUID */
|
|
491
491
|
get guid() {
|
|
492
|
-
return this.document.fields.find(f => f.type.name
|
|
492
|
+
return this.document.fields.find(f => f.type.name === 'GUID');
|
|
493
493
|
}
|
|
494
494
|
|
|
495
495
|
/** Language Country Code */
|
|
496
496
|
get languageCountryCode() {
|
|
497
|
-
return this.document.fields.find(f => f.type.name
|
|
497
|
+
return this.document.fields.find(f => f.type.name === 'LanguageCountryCode');
|
|
498
498
|
}
|
|
499
499
|
|
|
500
500
|
/** Patch Version Number */
|
|
501
501
|
get patchVersionNumber() {
|
|
502
|
-
return this.document.fields.find(f => f.type.name
|
|
502
|
+
return this.document.fields.find(f => f.type.name === 'PatchVersionNumber');
|
|
503
503
|
}
|
|
504
504
|
|
|
505
505
|
/** Total Number Of Pages */
|
|
506
506
|
get totalNumberOfPages() {
|
|
507
|
-
return this.document.fields.find(f => f.type.name
|
|
507
|
+
return this.document.fields.find(f => f.type.name === 'TotalNumberOfPages');
|
|
508
508
|
}
|
|
509
509
|
|
|
510
510
|
/** The child document of type "Patient". */
|
|
511
511
|
get patient() {
|
|
512
|
-
const child = this.document.children.find(c => c.type.name
|
|
512
|
+
const child = this.document.children.find(c => c.type.name === 'Patient');
|
|
513
513
|
return new DEMedicalPlan.Patient(child);
|
|
514
514
|
}
|
|
515
515
|
|
|
516
516
|
/** The child document of type "Doctor". */
|
|
517
517
|
get doctor() {
|
|
518
|
-
const child = this.document.children.find(c => c.type.name
|
|
518
|
+
const child = this.document.children.find(c => c.type.name === 'Doctor');
|
|
519
519
|
return new DEMedicalPlan.Doctor(child);
|
|
520
520
|
}
|
|
521
521
|
|
|
522
522
|
/** An array of all children of type "Subheading". */
|
|
523
523
|
get subheadings() {
|
|
524
|
-
return this.document.children.filter(c => c.type.name
|
|
524
|
+
return this.document.children.filter(c => c.type.name === 'Subheading').map(c => new DEMedicalPlan.Subheading(c));
|
|
525
525
|
}
|
|
526
526
|
}
|
|
527
527
|
(function (_DEMedicalPlan) {
|
|
@@ -530,88 +530,88 @@ export class DEMedicalPlan {
|
|
|
530
530
|
return this._document;
|
|
531
531
|
}
|
|
532
532
|
constructor(document) {
|
|
533
|
-
if (document.type.name
|
|
533
|
+
if (document.type.name !== this.requiredDocumentType()) {
|
|
534
534
|
throw new Error(`Expected document type ${this.requiredDocumentType()}, got ${document.type.name}`);
|
|
535
535
|
}
|
|
536
536
|
this._document = document;
|
|
537
537
|
}
|
|
538
538
|
requiredDocumentType() {
|
|
539
|
-
return
|
|
539
|
+
return DEMedicalPlanPatientDocumentType;
|
|
540
540
|
}
|
|
541
541
|
|
|
542
542
|
/** Allergies And Intolerances */
|
|
543
543
|
get allergiesAndIntolerances() {
|
|
544
|
-
return this.document.fields.find(f => f.type.name
|
|
544
|
+
return this.document.fields.find(f => f.type.name === 'AllergiesAndIntolerances');
|
|
545
545
|
}
|
|
546
546
|
|
|
547
547
|
/** Birth Date */
|
|
548
548
|
get birthDate() {
|
|
549
|
-
return this.document.fields.find(f => f.type.name
|
|
549
|
+
return this.document.fields.find(f => f.type.name === 'BirthDate');
|
|
550
550
|
}
|
|
551
551
|
|
|
552
552
|
/** Breast Feeding */
|
|
553
553
|
get breastFeeding() {
|
|
554
|
-
return this.document.fields.find(f => f.type.name
|
|
554
|
+
return this.document.fields.find(f => f.type.name === 'BreastFeeding');
|
|
555
555
|
}
|
|
556
556
|
|
|
557
557
|
/** Creatinine Value */
|
|
558
558
|
get creatinineValue() {
|
|
559
|
-
return this.document.fields.find(f => f.type.name
|
|
559
|
+
return this.document.fields.find(f => f.type.name === 'CreatinineValue');
|
|
560
560
|
}
|
|
561
561
|
|
|
562
562
|
/** First Name */
|
|
563
563
|
get firstName() {
|
|
564
|
-
return this.document.fields.find(f => f.type.name
|
|
564
|
+
return this.document.fields.find(f => f.type.name === 'FirstName');
|
|
565
565
|
}
|
|
566
566
|
|
|
567
567
|
/** Gender */
|
|
568
568
|
get gender() {
|
|
569
|
-
return this.document.fields.find(f => f.type.name
|
|
569
|
+
return this.document.fields.find(f => f.type.name === 'Gender');
|
|
570
570
|
}
|
|
571
571
|
|
|
572
572
|
/** Height */
|
|
573
573
|
get height() {
|
|
574
|
-
return this.document.fields.find(f => f.type.name
|
|
574
|
+
return this.document.fields.find(f => f.type.name === 'Height');
|
|
575
575
|
}
|
|
576
576
|
|
|
577
577
|
/** Last Name */
|
|
578
578
|
get lastName() {
|
|
579
|
-
return this.document.fields.find(f => f.type.name
|
|
579
|
+
return this.document.fields.find(f => f.type.name === 'LastName');
|
|
580
580
|
}
|
|
581
581
|
|
|
582
582
|
/** Patient Free Text */
|
|
583
583
|
get patientFreeText() {
|
|
584
|
-
return this.document.fields.find(f => f.type.name
|
|
584
|
+
return this.document.fields.find(f => f.type.name === 'PatientFreeText');
|
|
585
585
|
}
|
|
586
586
|
|
|
587
587
|
/** Patient ID */
|
|
588
588
|
get patientID() {
|
|
589
|
-
return this.document.fields.find(f => f.type.name
|
|
589
|
+
return this.document.fields.find(f => f.type.name === 'PatientID');
|
|
590
590
|
}
|
|
591
591
|
|
|
592
592
|
/** Pre Name */
|
|
593
593
|
get preName() {
|
|
594
|
-
return this.document.fields.find(f => f.type.name
|
|
594
|
+
return this.document.fields.find(f => f.type.name === 'PreName');
|
|
595
595
|
}
|
|
596
596
|
|
|
597
597
|
/** Pregnant */
|
|
598
598
|
get pregnant() {
|
|
599
|
-
return this.document.fields.find(f => f.type.name
|
|
599
|
+
return this.document.fields.find(f => f.type.name === 'Pregnant');
|
|
600
600
|
}
|
|
601
601
|
|
|
602
602
|
/** Name Suffix */
|
|
603
603
|
get suffix() {
|
|
604
|
-
return this.document.fields.find(f => f.type.name
|
|
604
|
+
return this.document.fields.find(f => f.type.name === 'Suffix');
|
|
605
605
|
}
|
|
606
606
|
|
|
607
607
|
/** Title */
|
|
608
608
|
get title() {
|
|
609
|
-
return this.document.fields.find(f => f.type.name
|
|
609
|
+
return this.document.fields.find(f => f.type.name === 'Title');
|
|
610
610
|
}
|
|
611
611
|
|
|
612
612
|
/** Weight */
|
|
613
613
|
get weight() {
|
|
614
|
-
return this.document.fields.find(f => f.type.name
|
|
614
|
+
return this.document.fields.find(f => f.type.name === 'Weight');
|
|
615
615
|
}
|
|
616
616
|
}
|
|
617
617
|
_DEMedicalPlan.Patient = Patient;
|
|
@@ -620,63 +620,63 @@ export class DEMedicalPlan {
|
|
|
620
620
|
return this._document;
|
|
621
621
|
}
|
|
622
622
|
constructor(document) {
|
|
623
|
-
if (document.type.name
|
|
623
|
+
if (document.type.name !== this.requiredDocumentType()) {
|
|
624
624
|
throw new Error(`Expected document type ${this.requiredDocumentType()}, got ${document.type.name}`);
|
|
625
625
|
}
|
|
626
626
|
this._document = document;
|
|
627
627
|
}
|
|
628
628
|
requiredDocumentType() {
|
|
629
|
-
return
|
|
629
|
+
return DEMedicalPlanDoctorDocumentType;
|
|
630
630
|
}
|
|
631
631
|
|
|
632
632
|
/** Doctor Number */
|
|
633
633
|
get doctorNumber() {
|
|
634
|
-
return this.document.fields.find(f => f.type.name
|
|
634
|
+
return this.document.fields.find(f => f.type.name === 'DoctorNumber');
|
|
635
635
|
}
|
|
636
636
|
|
|
637
637
|
/** Email */
|
|
638
638
|
get email() {
|
|
639
|
-
return this.document.fields.find(f => f.type.name
|
|
639
|
+
return this.document.fields.find(f => f.type.name === 'Email');
|
|
640
640
|
}
|
|
641
641
|
|
|
642
642
|
/** Hospital ID */
|
|
643
643
|
get hospitalID() {
|
|
644
|
-
return this.document.fields.find(f => f.type.name
|
|
644
|
+
return this.document.fields.find(f => f.type.name === 'HospitalID');
|
|
645
645
|
}
|
|
646
646
|
|
|
647
647
|
/** Issuer Name */
|
|
648
648
|
get issuerName() {
|
|
649
|
-
return this.document.fields.find(f => f.type.name
|
|
649
|
+
return this.document.fields.find(f => f.type.name === 'IssuerName');
|
|
650
650
|
}
|
|
651
651
|
|
|
652
652
|
/** Issuing Date And Time */
|
|
653
653
|
get issuingDateAndTime() {
|
|
654
|
-
return this.document.fields.find(f => f.type.name
|
|
654
|
+
return this.document.fields.find(f => f.type.name === 'IssuingDateAndTime');
|
|
655
655
|
}
|
|
656
656
|
|
|
657
657
|
/** Pharmacy ID */
|
|
658
658
|
get pharmacyID() {
|
|
659
|
-
return this.document.fields.find(f => f.type.name
|
|
659
|
+
return this.document.fields.find(f => f.type.name === 'PharmacyID');
|
|
660
660
|
}
|
|
661
661
|
|
|
662
662
|
/** Place */
|
|
663
663
|
get place() {
|
|
664
|
-
return this.document.fields.find(f => f.type.name
|
|
664
|
+
return this.document.fields.find(f => f.type.name === 'Place');
|
|
665
665
|
}
|
|
666
666
|
|
|
667
667
|
/** Postal Code */
|
|
668
668
|
get postalCode() {
|
|
669
|
-
return this.document.fields.find(f => f.type.name
|
|
669
|
+
return this.document.fields.find(f => f.type.name === 'PostalCode');
|
|
670
670
|
}
|
|
671
671
|
|
|
672
672
|
/** Street */
|
|
673
673
|
get street() {
|
|
674
|
-
return this.document.fields.find(f => f.type.name
|
|
674
|
+
return this.document.fields.find(f => f.type.name === 'Street');
|
|
675
675
|
}
|
|
676
676
|
|
|
677
677
|
/** Telephone Number */
|
|
678
678
|
get telephoneNumber() {
|
|
679
|
-
return this.document.fields.find(f => f.type.name
|
|
679
|
+
return this.document.fields.find(f => f.type.name === 'TelephoneNumber');
|
|
680
680
|
}
|
|
681
681
|
}
|
|
682
682
|
_DEMedicalPlan.Doctor = Doctor;
|
|
@@ -685,38 +685,38 @@ export class DEMedicalPlan {
|
|
|
685
685
|
return this._document;
|
|
686
686
|
}
|
|
687
687
|
constructor(document) {
|
|
688
|
-
if (document.type.name
|
|
688
|
+
if (document.type.name !== this.requiredDocumentType()) {
|
|
689
689
|
throw new Error(`Expected document type ${this.requiredDocumentType()}, got ${document.type.name}`);
|
|
690
690
|
}
|
|
691
691
|
this._document = document;
|
|
692
692
|
}
|
|
693
693
|
requiredDocumentType() {
|
|
694
|
-
return
|
|
694
|
+
return DEMedicalPlanSubheadingDocumentType;
|
|
695
695
|
}
|
|
696
696
|
|
|
697
697
|
/** General Note */
|
|
698
698
|
get generalNotes() {
|
|
699
|
-
return this.document.fields.filter(f => f.type.name
|
|
699
|
+
return this.document.fields.filter(f => f.type.name === 'GeneralNote');
|
|
700
700
|
}
|
|
701
701
|
|
|
702
702
|
/** Key Words */
|
|
703
703
|
get keyWords() {
|
|
704
|
-
return this.document.fields.find(f => f.type.name
|
|
704
|
+
return this.document.fields.find(f => f.type.name === 'KeyWords');
|
|
705
705
|
}
|
|
706
706
|
|
|
707
707
|
/** Subheading Free Text */
|
|
708
708
|
get subheadingFreeText() {
|
|
709
|
-
return this.document.fields.find(f => f.type.name
|
|
709
|
+
return this.document.fields.find(f => f.type.name === 'SubheadingFreeText');
|
|
710
710
|
}
|
|
711
711
|
|
|
712
712
|
/** An array of all children of type "Medicine". */
|
|
713
713
|
get medicines() {
|
|
714
|
-
return this.document.children.filter(c => c.type.name
|
|
714
|
+
return this.document.children.filter(c => c.type.name === 'Medicine').map(c => new DEMedicalPlan.Subheading.Medicine(c));
|
|
715
715
|
}
|
|
716
716
|
|
|
717
717
|
/** An array of all children of type "Prescription". */
|
|
718
718
|
get prescriptions() {
|
|
719
|
-
return this.document.children.filter(c => c.type.name
|
|
719
|
+
return this.document.children.filter(c => c.type.name === 'Prescription').map(c => new DEMedicalPlan.Subheading.Prescription(c));
|
|
720
720
|
}
|
|
721
721
|
}
|
|
722
722
|
_DEMedicalPlan.Subheading = Subheading;
|
|
@@ -726,88 +726,88 @@ export class DEMedicalPlan {
|
|
|
726
726
|
return this._document;
|
|
727
727
|
}
|
|
728
728
|
constructor(document) {
|
|
729
|
-
if (document.type.name
|
|
729
|
+
if (document.type.name !== this.requiredDocumentType()) {
|
|
730
730
|
throw new Error(`Expected document type ${this.requiredDocumentType()}, got ${document.type.name}`);
|
|
731
731
|
}
|
|
732
732
|
this._document = document;
|
|
733
733
|
}
|
|
734
734
|
requiredDocumentType() {
|
|
735
|
-
return
|
|
735
|
+
return DEMedicalPlanSubheadingMedicineDocumentType;
|
|
736
736
|
}
|
|
737
737
|
|
|
738
738
|
/** Dosage Form */
|
|
739
739
|
get dosageForm() {
|
|
740
|
-
return this.document.fields.find(f => f.type.name
|
|
740
|
+
return this.document.fields.find(f => f.type.name === 'DosageForm');
|
|
741
741
|
}
|
|
742
742
|
|
|
743
743
|
/** Dosage Form Free Text */
|
|
744
744
|
get dosageFormFreeText() {
|
|
745
|
-
return this.document.fields.find(f => f.type.name
|
|
745
|
+
return this.document.fields.find(f => f.type.name === 'DosageFormFreeText');
|
|
746
746
|
}
|
|
747
747
|
|
|
748
748
|
/** Dosage Free Text */
|
|
749
749
|
get dosageFreeText() {
|
|
750
|
-
return this.document.fields.find(f => f.type.name
|
|
750
|
+
return this.document.fields.find(f => f.type.name === 'DosageFreeText');
|
|
751
751
|
}
|
|
752
752
|
|
|
753
753
|
/** Dosing Unit */
|
|
754
754
|
get dosingUnit() {
|
|
755
|
-
return this.document.fields.find(f => f.type.name
|
|
755
|
+
return this.document.fields.find(f => f.type.name === 'DosingUnit');
|
|
756
756
|
}
|
|
757
757
|
|
|
758
758
|
/** Dosing Unit Free Text */
|
|
759
759
|
get dosingUnitFreeText() {
|
|
760
|
-
return this.document.fields.find(f => f.type.name
|
|
760
|
+
return this.document.fields.find(f => f.type.name === 'DosingUnitFreeText');
|
|
761
761
|
}
|
|
762
762
|
|
|
763
763
|
/** Drug Name */
|
|
764
764
|
get drugName() {
|
|
765
|
-
return this.document.fields.find(f => f.type.name
|
|
765
|
+
return this.document.fields.find(f => f.type.name === 'DrugName');
|
|
766
766
|
}
|
|
767
767
|
|
|
768
768
|
/** Evening Intake Dose */
|
|
769
769
|
get evening() {
|
|
770
|
-
return this.document.fields.find(f => f.type.name
|
|
770
|
+
return this.document.fields.find(f => f.type.name === 'Evening');
|
|
771
771
|
}
|
|
772
772
|
|
|
773
773
|
/** General Notes */
|
|
774
774
|
get generalNotes() {
|
|
775
|
-
return this.document.fields.find(f => f.type.name
|
|
775
|
+
return this.document.fields.find(f => f.type.name === 'GeneralNotes');
|
|
776
776
|
}
|
|
777
777
|
|
|
778
778
|
/** Midday Intake Dose */
|
|
779
779
|
get midday() {
|
|
780
|
-
return this.document.fields.find(f => f.type.name
|
|
780
|
+
return this.document.fields.find(f => f.type.name === 'Midday');
|
|
781
781
|
}
|
|
782
782
|
|
|
783
783
|
/** Morning Intake Dose */
|
|
784
784
|
get morning() {
|
|
785
|
-
return this.document.fields.find(f => f.type.name
|
|
785
|
+
return this.document.fields.find(f => f.type.name === 'Morning');
|
|
786
786
|
}
|
|
787
787
|
|
|
788
788
|
/** Night Intake Dose */
|
|
789
789
|
get night() {
|
|
790
|
-
return this.document.fields.find(f => f.type.name
|
|
790
|
+
return this.document.fields.find(f => f.type.name === 'Night');
|
|
791
791
|
}
|
|
792
792
|
|
|
793
793
|
/** Pharmaceutical Number */
|
|
794
794
|
get pharmaceuticalNumber() {
|
|
795
|
-
return this.document.fields.find(f => f.type.name
|
|
795
|
+
return this.document.fields.find(f => f.type.name === 'PharmaceuticalNumber');
|
|
796
796
|
}
|
|
797
797
|
|
|
798
798
|
/** Reason For Treatment */
|
|
799
799
|
get reasonForTreatment() {
|
|
800
|
-
return this.document.fields.find(f => f.type.name
|
|
800
|
+
return this.document.fields.find(f => f.type.name === 'ReasonForTreatment');
|
|
801
801
|
}
|
|
802
802
|
|
|
803
803
|
/** Relevant Info */
|
|
804
804
|
get relevantInfo() {
|
|
805
|
-
return this.document.fields.find(f => f.type.name
|
|
805
|
+
return this.document.fields.find(f => f.type.name === 'RelevantInfo');
|
|
806
806
|
}
|
|
807
807
|
|
|
808
808
|
/** An array of all children of type "Substance". */
|
|
809
809
|
get substances() {
|
|
810
|
-
return this.document.children.filter(c => c.type.name
|
|
810
|
+
return this.document.children.filter(c => c.type.name === 'Substance').map(c => new DEMedicalPlan.Subheading.Medicine.Substance(c));
|
|
811
811
|
}
|
|
812
812
|
}
|
|
813
813
|
_Subheading.Medicine = Medicine;
|
|
@@ -817,23 +817,23 @@ export class DEMedicalPlan {
|
|
|
817
817
|
return this._document;
|
|
818
818
|
}
|
|
819
819
|
constructor(document) {
|
|
820
|
-
if (document.type.name
|
|
820
|
+
if (document.type.name !== this.requiredDocumentType()) {
|
|
821
821
|
throw new Error(`Expected document type ${this.requiredDocumentType()}, got ${document.type.name}`);
|
|
822
822
|
}
|
|
823
823
|
this._document = document;
|
|
824
824
|
}
|
|
825
825
|
requiredDocumentType() {
|
|
826
|
-
return
|
|
826
|
+
return DEMedicalPlanSubheadingMedicineSubstanceDocumentType;
|
|
827
827
|
}
|
|
828
828
|
|
|
829
829
|
/** Active Substance */
|
|
830
830
|
get activeSubstance() {
|
|
831
|
-
return this.document.fields.find(f => f.type.name
|
|
831
|
+
return this.document.fields.find(f => f.type.name === 'ActiveSubstance');
|
|
832
832
|
}
|
|
833
833
|
|
|
834
834
|
/** Potency */
|
|
835
835
|
get potency() {
|
|
836
|
-
return this.document.fields.find(f => f.type.name
|
|
836
|
+
return this.document.fields.find(f => f.type.name === 'Potency');
|
|
837
837
|
}
|
|
838
838
|
}
|
|
839
839
|
_Medicine.Substance = Substance;
|
|
@@ -843,23 +843,23 @@ export class DEMedicalPlan {
|
|
|
843
843
|
return this._document;
|
|
844
844
|
}
|
|
845
845
|
constructor(document) {
|
|
846
|
-
if (document.type.name
|
|
846
|
+
if (document.type.name !== this.requiredDocumentType()) {
|
|
847
847
|
throw new Error(`Expected document type ${this.requiredDocumentType()}, got ${document.type.name}`);
|
|
848
848
|
}
|
|
849
849
|
this._document = document;
|
|
850
850
|
}
|
|
851
851
|
requiredDocumentType() {
|
|
852
|
-
return
|
|
852
|
+
return DEMedicalPlanSubheadingPrescriptionDocumentType;
|
|
853
853
|
}
|
|
854
854
|
|
|
855
855
|
/** General Information */
|
|
856
856
|
get generalInformation() {
|
|
857
|
-
return this.document.fields.find(f => f.type.name
|
|
857
|
+
return this.document.fields.find(f => f.type.name === 'GeneralInformation');
|
|
858
858
|
}
|
|
859
859
|
|
|
860
860
|
/** Prescription Free Text */
|
|
861
861
|
get prescriptionFreeText() {
|
|
862
|
-
return this.document.fields.find(f => f.type.name
|
|
862
|
+
return this.document.fields.find(f => f.type.name === 'PrescriptionFreeText');
|
|
863
863
|
}
|
|
864
864
|
}
|
|
865
865
|
_Subheading.Prescription = Prescription;
|
|
@@ -871,48 +871,48 @@ export class IDCardPDF417 {
|
|
|
871
871
|
return this._document;
|
|
872
872
|
}
|
|
873
873
|
constructor(document) {
|
|
874
|
-
if (document.type.name
|
|
874
|
+
if (document.type.name !== this.requiredDocumentType()) {
|
|
875
875
|
throw new Error(`Expected document type ${this.requiredDocumentType()}, got ${document.type.name}`);
|
|
876
876
|
}
|
|
877
877
|
this._document = document;
|
|
878
878
|
}
|
|
879
879
|
requiredDocumentType() {
|
|
880
|
-
return
|
|
880
|
+
return IDCardPDF417DocumentType;
|
|
881
881
|
}
|
|
882
882
|
|
|
883
883
|
/** Birth Date. The format is ISO8601 with delimiters */
|
|
884
884
|
get birthDate() {
|
|
885
|
-
return this.document.fields.find(f => f.type.name
|
|
885
|
+
return this.document.fields.find(f => f.type.name === 'BirthDate');
|
|
886
886
|
}
|
|
887
887
|
|
|
888
888
|
/** Date Expired. The format is ISO8601 with delimiters */
|
|
889
889
|
get dateExpired() {
|
|
890
|
-
return this.document.fields.find(f => f.type.name
|
|
890
|
+
return this.document.fields.find(f => f.type.name === 'DateExpired');
|
|
891
891
|
}
|
|
892
892
|
|
|
893
893
|
/** Date Issued. The format is ISO8601 with delimiters */
|
|
894
894
|
get dateIssued() {
|
|
895
|
-
return this.document.fields.find(f => f.type.name
|
|
895
|
+
return this.document.fields.find(f => f.type.name === 'DateIssued');
|
|
896
896
|
}
|
|
897
897
|
|
|
898
898
|
/** Document Code */
|
|
899
899
|
get documentCode() {
|
|
900
|
-
return this.document.fields.find(f => f.type.name
|
|
900
|
+
return this.document.fields.find(f => f.type.name === 'DocumentCode');
|
|
901
901
|
}
|
|
902
902
|
|
|
903
903
|
/** First Name */
|
|
904
904
|
get firstName() {
|
|
905
|
-
return this.document.fields.find(f => f.type.name
|
|
905
|
+
return this.document.fields.find(f => f.type.name === 'FirstName');
|
|
906
906
|
}
|
|
907
907
|
|
|
908
908
|
/** Last Name */
|
|
909
909
|
get lastName() {
|
|
910
|
-
return this.document.fields.find(f => f.type.name
|
|
910
|
+
return this.document.fields.find(f => f.type.name === 'LastName');
|
|
911
911
|
}
|
|
912
912
|
|
|
913
913
|
/** Optional */
|
|
914
914
|
get optional() {
|
|
915
|
-
return this.document.fields.find(f => f.type.name
|
|
915
|
+
return this.document.fields.find(f => f.type.name === 'Optional');
|
|
916
916
|
}
|
|
917
917
|
}
|
|
918
918
|
|
|
@@ -922,18 +922,18 @@ export class GS1 {
|
|
|
922
922
|
return this._document;
|
|
923
923
|
}
|
|
924
924
|
constructor(document) {
|
|
925
|
-
if (document.type.name
|
|
925
|
+
if (document.type.name !== this.requiredDocumentType()) {
|
|
926
926
|
throw new Error(`Expected document type ${this.requiredDocumentType()}, got ${document.type.name}`);
|
|
927
927
|
}
|
|
928
928
|
this._document = document;
|
|
929
929
|
}
|
|
930
930
|
requiredDocumentType() {
|
|
931
|
-
return
|
|
931
|
+
return GS1DocumentType;
|
|
932
932
|
}
|
|
933
933
|
|
|
934
934
|
/** An array of all children of type "Element". */
|
|
935
935
|
get elements() {
|
|
936
|
-
return this.document.children.filter(c => c.type.name
|
|
936
|
+
return this.document.children.filter(c => c.type.name === 'Element').map(c => new GS1.Element(c));
|
|
937
937
|
}
|
|
938
938
|
}
|
|
939
939
|
(function (_GS) {
|
|
@@ -942,38 +942,38 @@ export class GS1 {
|
|
|
942
942
|
return this._document;
|
|
943
943
|
}
|
|
944
944
|
constructor(document) {
|
|
945
|
-
if (document.type.name
|
|
945
|
+
if (document.type.name !== this.requiredDocumentType()) {
|
|
946
946
|
throw new Error(`Expected document type ${this.requiredDocumentType()}, got ${document.type.name}`);
|
|
947
947
|
}
|
|
948
948
|
this._document = document;
|
|
949
949
|
}
|
|
950
950
|
requiredDocumentType() {
|
|
951
|
-
return
|
|
951
|
+
return GS1ElementDocumentType;
|
|
952
952
|
}
|
|
953
953
|
|
|
954
954
|
/** Application Identifier */
|
|
955
955
|
get applicationIdentifier() {
|
|
956
|
-
return this.document.fields.find(f => f.type.name
|
|
956
|
+
return this.document.fields.find(f => f.type.name === 'ApplicationIdentifier');
|
|
957
957
|
}
|
|
958
958
|
|
|
959
959
|
/** Data Title */
|
|
960
960
|
get dataTitle() {
|
|
961
|
-
return this.document.fields.find(f => f.type.name
|
|
961
|
+
return this.document.fields.find(f => f.type.name === 'DataTitle');
|
|
962
962
|
}
|
|
963
963
|
|
|
964
964
|
/** Description */
|
|
965
965
|
get elementDescription() {
|
|
966
|
-
return this.document.fields.find(f => f.type.name
|
|
966
|
+
return this.document.fields.find(f => f.type.name === 'ElementDescription');
|
|
967
967
|
}
|
|
968
968
|
|
|
969
969
|
/** Raw Value */
|
|
970
970
|
get rawValue() {
|
|
971
|
-
return this.document.fields.find(f => f.type.name
|
|
971
|
+
return this.document.fields.find(f => f.type.name === 'RawValue');
|
|
972
972
|
}
|
|
973
973
|
|
|
974
974
|
/** An array of all children of type "ValidationError". */
|
|
975
975
|
get validationErrors() {
|
|
976
|
-
return this.document.children.filter(c => c.type.name
|
|
976
|
+
return this.document.children.filter(c => c.type.name === 'ValidationError').map(c => new GS1.Element.ValidationError(c));
|
|
977
977
|
}
|
|
978
978
|
}
|
|
979
979
|
_GS.Element = Element;
|
|
@@ -983,23 +983,23 @@ export class GS1 {
|
|
|
983
983
|
return this._document;
|
|
984
984
|
}
|
|
985
985
|
constructor(document) {
|
|
986
|
-
if (document.type.name
|
|
986
|
+
if (document.type.name !== this.requiredDocumentType()) {
|
|
987
987
|
throw new Error(`Expected document type ${this.requiredDocumentType()}, got ${document.type.name}`);
|
|
988
988
|
}
|
|
989
989
|
this._document = document;
|
|
990
990
|
}
|
|
991
991
|
requiredDocumentType() {
|
|
992
|
-
return
|
|
992
|
+
return GS1ElementValidationErrorDocumentType;
|
|
993
993
|
}
|
|
994
994
|
|
|
995
995
|
/** Error Code */
|
|
996
996
|
get code() {
|
|
997
|
-
return this.document.fields.find(f => f.type.name
|
|
997
|
+
return this.document.fields.find(f => f.type.name === 'Code');
|
|
998
998
|
}
|
|
999
999
|
|
|
1000
1000
|
/** Reason */
|
|
1001
1001
|
get reason() {
|
|
1002
|
-
return this.document.fields.find(f => f.type.name
|
|
1002
|
+
return this.document.fields.find(f => f.type.name === 'Reason');
|
|
1003
1003
|
}
|
|
1004
1004
|
}
|
|
1005
1005
|
_Element.ValidationError = ValidationError;
|
|
@@ -1011,68 +1011,68 @@ export class SEPA {
|
|
|
1011
1011
|
return this._document;
|
|
1012
1012
|
}
|
|
1013
1013
|
constructor(document) {
|
|
1014
|
-
if (document.type.name
|
|
1014
|
+
if (document.type.name !== this.requiredDocumentType()) {
|
|
1015
1015
|
throw new Error(`Expected document type ${this.requiredDocumentType()}, got ${document.type.name}`);
|
|
1016
1016
|
}
|
|
1017
1017
|
this._document = document;
|
|
1018
1018
|
}
|
|
1019
1019
|
requiredDocumentType() {
|
|
1020
|
-
return
|
|
1020
|
+
return SEPADocumentType;
|
|
1021
1021
|
}
|
|
1022
1022
|
|
|
1023
1023
|
/** Amount */
|
|
1024
1024
|
get amount() {
|
|
1025
|
-
return this.document.fields.find(f => f.type.name
|
|
1025
|
+
return this.document.fields.find(f => f.type.name === 'Amount');
|
|
1026
1026
|
}
|
|
1027
1027
|
|
|
1028
1028
|
/** Character Set */
|
|
1029
1029
|
get characterSet() {
|
|
1030
|
-
return this.document.fields.find(f => f.type.name
|
|
1030
|
+
return this.document.fields.find(f => f.type.name === 'CharacterSet');
|
|
1031
1031
|
}
|
|
1032
1032
|
|
|
1033
1033
|
/** Identification */
|
|
1034
1034
|
get identification() {
|
|
1035
|
-
return this.document.fields.find(f => f.type.name
|
|
1035
|
+
return this.document.fields.find(f => f.type.name === 'Identification');
|
|
1036
1036
|
}
|
|
1037
1037
|
|
|
1038
1038
|
/** Information */
|
|
1039
1039
|
get information() {
|
|
1040
|
-
return this.document.fields.find(f => f.type.name
|
|
1040
|
+
return this.document.fields.find(f => f.type.name === 'Information');
|
|
1041
1041
|
}
|
|
1042
1042
|
|
|
1043
1043
|
/** Amount */
|
|
1044
1044
|
get purpose() {
|
|
1045
|
-
return this.document.fields.find(f => f.type.name
|
|
1045
|
+
return this.document.fields.find(f => f.type.name === 'Purpose');
|
|
1046
1046
|
}
|
|
1047
1047
|
|
|
1048
1048
|
/** Receiver BIC */
|
|
1049
1049
|
get receiverBIC() {
|
|
1050
|
-
return this.document.fields.find(f => f.type.name
|
|
1050
|
+
return this.document.fields.find(f => f.type.name === 'ReceiverBIC');
|
|
1051
1051
|
}
|
|
1052
1052
|
|
|
1053
1053
|
/** Receiver IBAN */
|
|
1054
1054
|
get receiverIBAN() {
|
|
1055
|
-
return this.document.fields.find(f => f.type.name
|
|
1055
|
+
return this.document.fields.find(f => f.type.name === 'ReceiverIBAN');
|
|
1056
1056
|
}
|
|
1057
1057
|
|
|
1058
1058
|
/** Receiver Name */
|
|
1059
1059
|
get receiverName() {
|
|
1060
|
-
return this.document.fields.find(f => f.type.name
|
|
1060
|
+
return this.document.fields.find(f => f.type.name === 'ReceiverName');
|
|
1061
1061
|
}
|
|
1062
1062
|
|
|
1063
1063
|
/** Remittance */
|
|
1064
1064
|
get remittance() {
|
|
1065
|
-
return this.document.fields.find(f => f.type.name
|
|
1065
|
+
return this.document.fields.find(f => f.type.name === 'Remittance');
|
|
1066
1066
|
}
|
|
1067
1067
|
|
|
1068
1068
|
/** Service Tag */
|
|
1069
1069
|
get serviceTag() {
|
|
1070
|
-
return this.document.fields.find(f => f.type.name
|
|
1070
|
+
return this.document.fields.find(f => f.type.name === 'ServiceTag');
|
|
1071
1071
|
}
|
|
1072
1072
|
|
|
1073
1073
|
/** Version */
|
|
1074
1074
|
get version() {
|
|
1075
|
-
return this.document.fields.find(f => f.type.name
|
|
1075
|
+
return this.document.fields.find(f => f.type.name === 'Version');
|
|
1076
1076
|
}
|
|
1077
1077
|
}
|
|
1078
1078
|
|
|
@@ -1082,118 +1082,118 @@ export class MedicalCertificate {
|
|
|
1082
1082
|
return this._document;
|
|
1083
1083
|
}
|
|
1084
1084
|
constructor(document) {
|
|
1085
|
-
if (document.type.name
|
|
1085
|
+
if (document.type.name !== this.requiredDocumentType()) {
|
|
1086
1086
|
throw new Error(`Expected document type ${this.requiredDocumentType()}, got ${document.type.name}`);
|
|
1087
1087
|
}
|
|
1088
1088
|
this._document = document;
|
|
1089
1089
|
}
|
|
1090
1090
|
requiredDocumentType() {
|
|
1091
|
-
return
|
|
1091
|
+
return MedicalCertificateDocumentType;
|
|
1092
1092
|
}
|
|
1093
1093
|
|
|
1094
1094
|
/** Accident */
|
|
1095
1095
|
get accident() {
|
|
1096
|
-
return this.document.fields.find(f => f.type.name
|
|
1096
|
+
return this.document.fields.find(f => f.type.name === 'Accident');
|
|
1097
1097
|
}
|
|
1098
1098
|
|
|
1099
1099
|
/** Assigned To Accident Insurance Doctor */
|
|
1100
1100
|
get assignedToAccidentInsuranceDoctor() {
|
|
1101
|
-
return this.document.fields.find(f => f.type.name
|
|
1101
|
+
return this.document.fields.find(f => f.type.name === 'AssignedToAccidentInsuranceDoctor');
|
|
1102
1102
|
}
|
|
1103
1103
|
|
|
1104
1104
|
/** Birth Date. The format is ISO8601 with delimiters */
|
|
1105
1105
|
get birthDate() {
|
|
1106
|
-
return this.document.fields.find(f => f.type.name
|
|
1106
|
+
return this.document.fields.find(f => f.type.name === 'BirthDate');
|
|
1107
1107
|
}
|
|
1108
1108
|
|
|
1109
1109
|
/** Child Needs Care From */
|
|
1110
1110
|
get childNeedsCareFrom() {
|
|
1111
|
-
return this.document.fields.find(f => f.type.name
|
|
1111
|
+
return this.document.fields.find(f => f.type.name === 'ChildNeedsCareFrom');
|
|
1112
1112
|
}
|
|
1113
1113
|
|
|
1114
1114
|
/** Child Needs Care Until */
|
|
1115
1115
|
get childNeedsCareUntil() {
|
|
1116
|
-
return this.document.fields.find(f => f.type.name
|
|
1116
|
+
return this.document.fields.find(f => f.type.name === 'ChildNeedsCareUntil');
|
|
1117
1117
|
}
|
|
1118
1118
|
|
|
1119
1119
|
/** Diagnose */
|
|
1120
1120
|
get diagnose() {
|
|
1121
|
-
return this.document.fields.find(f => f.type.name
|
|
1121
|
+
return this.document.fields.find(f => f.type.name === 'Diagnose');
|
|
1122
1122
|
}
|
|
1123
1123
|
|
|
1124
1124
|
/** Diagnosed On. The format is ISO8601 with delimiters */
|
|
1125
1125
|
get diagnosedOn() {
|
|
1126
|
-
return this.document.fields.find(f => f.type.name
|
|
1126
|
+
return this.document.fields.find(f => f.type.name === 'DiagnosedOn');
|
|
1127
1127
|
}
|
|
1128
1128
|
|
|
1129
1129
|
/** Doctor Number */
|
|
1130
1130
|
get doctorNumber() {
|
|
1131
|
-
return this.document.fields.find(f => f.type.name
|
|
1131
|
+
return this.document.fields.find(f => f.type.name === 'DoctorNumber');
|
|
1132
1132
|
}
|
|
1133
1133
|
|
|
1134
1134
|
/** Document Date. The format is ISO8601 with delimiters */
|
|
1135
1135
|
get documentDate() {
|
|
1136
|
-
return this.document.fields.find(f => f.type.name
|
|
1136
|
+
return this.document.fields.find(f => f.type.name === 'DocumentDate');
|
|
1137
1137
|
}
|
|
1138
1138
|
|
|
1139
1139
|
/** First Name */
|
|
1140
1140
|
get firstName() {
|
|
1141
|
-
return this.document.fields.find(f => f.type.name
|
|
1141
|
+
return this.document.fields.find(f => f.type.name === 'FirstName');
|
|
1142
1142
|
}
|
|
1143
1143
|
|
|
1144
1144
|
/** Health Insurance Number */
|
|
1145
1145
|
get healthInsuranceNumber() {
|
|
1146
|
-
return this.document.fields.find(f => f.type.name
|
|
1146
|
+
return this.document.fields.find(f => f.type.name === 'HealthInsuranceNumber');
|
|
1147
1147
|
}
|
|
1148
1148
|
|
|
1149
1149
|
/** Incapable Of Work Since. The format is ISO8601 with delimiters */
|
|
1150
1150
|
get incapableOfWorkSince() {
|
|
1151
|
-
return this.document.fields.find(f => f.type.name
|
|
1151
|
+
return this.document.fields.find(f => f.type.name === 'IncapableOfWorkSince');
|
|
1152
1152
|
}
|
|
1153
1153
|
|
|
1154
1154
|
/** Incapable Of Work Until. The format is ISO8601 with delimiters */
|
|
1155
1155
|
get incapableOfWorkUntil() {
|
|
1156
|
-
return this.document.fields.find(f => f.type.name
|
|
1156
|
+
return this.document.fields.find(f => f.type.name === 'IncapableOfWorkUntil');
|
|
1157
1157
|
}
|
|
1158
1158
|
|
|
1159
1159
|
/** Initial Certificate */
|
|
1160
1160
|
get initialCertificate() {
|
|
1161
|
-
return this.document.fields.find(f => f.type.name
|
|
1161
|
+
return this.document.fields.find(f => f.type.name === 'InitialCertificate');
|
|
1162
1162
|
}
|
|
1163
1163
|
|
|
1164
1164
|
/** Insured Person Number */
|
|
1165
1165
|
get insuredPersonNumber() {
|
|
1166
|
-
return this.document.fields.find(f => f.type.name
|
|
1166
|
+
return this.document.fields.find(f => f.type.name === 'InsuredPersonNumber');
|
|
1167
1167
|
}
|
|
1168
1168
|
|
|
1169
1169
|
/** Last Name */
|
|
1170
1170
|
get lastName() {
|
|
1171
|
-
return this.document.fields.find(f => f.type.name
|
|
1171
|
+
return this.document.fields.find(f => f.type.name === 'LastName');
|
|
1172
1172
|
}
|
|
1173
1173
|
|
|
1174
1174
|
/** Place Of Operation Number */
|
|
1175
1175
|
get placeOfOperationNumber() {
|
|
1176
|
-
return this.document.fields.find(f => f.type.name
|
|
1176
|
+
return this.document.fields.find(f => f.type.name === 'PlaceOfOperationNumber');
|
|
1177
1177
|
}
|
|
1178
1178
|
|
|
1179
1179
|
/** Renewed Certificate */
|
|
1180
1180
|
get renewedCertificate() {
|
|
1181
|
-
return this.document.fields.find(f => f.type.name
|
|
1181
|
+
return this.document.fields.find(f => f.type.name === 'RenewedCertificate');
|
|
1182
1182
|
}
|
|
1183
1183
|
|
|
1184
1184
|
/** Requires Care */
|
|
1185
1185
|
get requiresCare() {
|
|
1186
|
-
return this.document.fields.find(f => f.type.name
|
|
1186
|
+
return this.document.fields.find(f => f.type.name === 'RequiresCare');
|
|
1187
1187
|
}
|
|
1188
1188
|
|
|
1189
1189
|
/** Status */
|
|
1190
1190
|
get status() {
|
|
1191
|
-
return this.document.fields.find(f => f.type.name
|
|
1191
|
+
return this.document.fields.find(f => f.type.name === 'Status');
|
|
1192
1192
|
}
|
|
1193
1193
|
|
|
1194
1194
|
/** Work Accident */
|
|
1195
1195
|
get workAccident() {
|
|
1196
|
-
return this.document.fields.find(f => f.type.name
|
|
1196
|
+
return this.document.fields.find(f => f.type.name === 'WorkAccident');
|
|
1197
1197
|
}
|
|
1198
1198
|
}
|
|
1199
1199
|
|
|
@@ -1203,234 +1203,234 @@ export class VCard {
|
|
|
1203
1203
|
return this._document;
|
|
1204
1204
|
}
|
|
1205
1205
|
constructor(document) {
|
|
1206
|
-
if (document.type.name
|
|
1206
|
+
if (document.type.name !== this.requiredDocumentType()) {
|
|
1207
1207
|
throw new Error(`Expected document type ${this.requiredDocumentType()}, got ${document.type.name}`);
|
|
1208
1208
|
}
|
|
1209
1209
|
this._document = document;
|
|
1210
1210
|
}
|
|
1211
1211
|
requiredDocumentType() {
|
|
1212
|
-
return
|
|
1212
|
+
return VCardDocumentType;
|
|
1213
1213
|
}
|
|
1214
1214
|
|
|
1215
1215
|
/** The child document of type "Version". */
|
|
1216
1216
|
get version() {
|
|
1217
|
-
const child = this.document.children.find(c => c.type.name
|
|
1217
|
+
const child = this.document.children.find(c => c.type.name === 'Version');
|
|
1218
1218
|
return new VCard.Version(child);
|
|
1219
1219
|
}
|
|
1220
1220
|
|
|
1221
1221
|
/** The child document of type "Source". */
|
|
1222
1222
|
get source() {
|
|
1223
|
-
const child = this.document.children.find(c => c.type.name
|
|
1223
|
+
const child = this.document.children.find(c => c.type.name === 'Source');
|
|
1224
1224
|
return child ? new VCard.Source(child) : undefined;
|
|
1225
1225
|
}
|
|
1226
1226
|
|
|
1227
1227
|
/** The child document of type "Kind". */
|
|
1228
1228
|
get kind() {
|
|
1229
|
-
const child = this.document.children.find(c => c.type.name
|
|
1229
|
+
const child = this.document.children.find(c => c.type.name === 'Kind');
|
|
1230
1230
|
return child ? new VCard.Kind(child) : undefined;
|
|
1231
1231
|
}
|
|
1232
1232
|
|
|
1233
1233
|
/** The child document of type "XML". */
|
|
1234
1234
|
get xml() {
|
|
1235
|
-
const child = this.document.children.find(c => c.type.name
|
|
1235
|
+
const child = this.document.children.find(c => c.type.name === 'XML');
|
|
1236
1236
|
return child ? new VCard.XML(child) : undefined;
|
|
1237
1237
|
}
|
|
1238
1238
|
|
|
1239
1239
|
/** The child document of type "Name". */
|
|
1240
1240
|
get name() {
|
|
1241
|
-
const child = this.document.children.find(c => c.type.name
|
|
1241
|
+
const child = this.document.children.find(c => c.type.name === 'Name');
|
|
1242
1242
|
return child ? new VCard.Name(child) : undefined;
|
|
1243
1243
|
}
|
|
1244
1244
|
|
|
1245
1245
|
/** The child document of type "FirstName". */
|
|
1246
1246
|
get firstName() {
|
|
1247
|
-
const child = this.document.children.find(c => c.type.name
|
|
1247
|
+
const child = this.document.children.find(c => c.type.name === 'FirstName');
|
|
1248
1248
|
return child ? new VCard.FirstName(child) : undefined;
|
|
1249
1249
|
}
|
|
1250
1250
|
|
|
1251
1251
|
/** The child document of type "Nickname". */
|
|
1252
1252
|
get nickname() {
|
|
1253
|
-
const child = this.document.children.find(c => c.type.name
|
|
1253
|
+
const child = this.document.children.find(c => c.type.name === 'Nickname');
|
|
1254
1254
|
return child ? new VCard.Nickname(child) : undefined;
|
|
1255
1255
|
}
|
|
1256
1256
|
|
|
1257
1257
|
/** The child document of type "Birthday". */
|
|
1258
1258
|
get birthday() {
|
|
1259
|
-
const child = this.document.children.find(c => c.type.name
|
|
1259
|
+
const child = this.document.children.find(c => c.type.name === 'Birthday');
|
|
1260
1260
|
return child ? new VCard.Birthday(child) : undefined;
|
|
1261
1261
|
}
|
|
1262
1262
|
|
|
1263
1263
|
/** The child document of type "Anniversary". */
|
|
1264
1264
|
get anniversary() {
|
|
1265
|
-
const child = this.document.children.find(c => c.type.name
|
|
1265
|
+
const child = this.document.children.find(c => c.type.name === 'Anniversary');
|
|
1266
1266
|
return child ? new VCard.Anniversary(child) : undefined;
|
|
1267
1267
|
}
|
|
1268
1268
|
|
|
1269
1269
|
/** The child document of type "Gender". */
|
|
1270
1270
|
get gender() {
|
|
1271
|
-
const child = this.document.children.find(c => c.type.name
|
|
1271
|
+
const child = this.document.children.find(c => c.type.name === 'Gender');
|
|
1272
1272
|
return child ? new VCard.Gender(child) : undefined;
|
|
1273
1273
|
}
|
|
1274
1274
|
|
|
1275
1275
|
/** The child document of type "DeliveryAddress". */
|
|
1276
1276
|
get deliveryAddress() {
|
|
1277
|
-
const child = this.document.children.find(c => c.type.name
|
|
1277
|
+
const child = this.document.children.find(c => c.type.name === 'DeliveryAddress');
|
|
1278
1278
|
return child ? new VCard.DeliveryAddress(child) : undefined;
|
|
1279
1279
|
}
|
|
1280
1280
|
|
|
1281
1281
|
/** The child document of type "Photo". */
|
|
1282
1282
|
get photo() {
|
|
1283
|
-
const child = this.document.children.find(c => c.type.name
|
|
1283
|
+
const child = this.document.children.find(c => c.type.name === 'Photo');
|
|
1284
1284
|
return child ? new VCard.Photo(child) : undefined;
|
|
1285
1285
|
}
|
|
1286
1286
|
|
|
1287
1287
|
/** The child document of type "TelephoneNumber". */
|
|
1288
1288
|
get telephoneNumber() {
|
|
1289
|
-
const child = this.document.children.find(c => c.type.name
|
|
1289
|
+
const child = this.document.children.find(c => c.type.name === 'TelephoneNumber');
|
|
1290
1290
|
return child ? new VCard.TelephoneNumber(child) : undefined;
|
|
1291
1291
|
}
|
|
1292
1292
|
|
|
1293
1293
|
/** The child document of type "Email". */
|
|
1294
1294
|
get email() {
|
|
1295
|
-
const child = this.document.children.find(c => c.type.name
|
|
1295
|
+
const child = this.document.children.find(c => c.type.name === 'Email');
|
|
1296
1296
|
return child ? new VCard.Email(child) : undefined;
|
|
1297
1297
|
}
|
|
1298
1298
|
|
|
1299
1299
|
/** The child document of type "IMPP". */
|
|
1300
1300
|
get impp() {
|
|
1301
|
-
const child = this.document.children.find(c => c.type.name
|
|
1301
|
+
const child = this.document.children.find(c => c.type.name === 'IMPP');
|
|
1302
1302
|
return child ? new VCard.IMPP(child) : undefined;
|
|
1303
1303
|
}
|
|
1304
1304
|
|
|
1305
1305
|
/** The child document of type "Languages". */
|
|
1306
1306
|
get languages() {
|
|
1307
|
-
const child = this.document.children.find(c => c.type.name
|
|
1307
|
+
const child = this.document.children.find(c => c.type.name === 'Languages');
|
|
1308
1308
|
return child ? new VCard.Languages(child) : undefined;
|
|
1309
1309
|
}
|
|
1310
1310
|
|
|
1311
1311
|
/** The child document of type "TimeZone". */
|
|
1312
1312
|
get timeZone() {
|
|
1313
|
-
const child = this.document.children.find(c => c.type.name
|
|
1313
|
+
const child = this.document.children.find(c => c.type.name === 'TimeZone');
|
|
1314
1314
|
return child ? new VCard.TimeZone(child) : undefined;
|
|
1315
1315
|
}
|
|
1316
1316
|
|
|
1317
1317
|
/** The child document of type "GeoLocation". */
|
|
1318
1318
|
get geoLocation() {
|
|
1319
|
-
const child = this.document.children.find(c => c.type.name
|
|
1319
|
+
const child = this.document.children.find(c => c.type.name === 'GeoLocation');
|
|
1320
1320
|
return child ? new VCard.GeoLocation(child) : undefined;
|
|
1321
1321
|
}
|
|
1322
1322
|
|
|
1323
1323
|
/** The child document of type "Title". */
|
|
1324
1324
|
get title() {
|
|
1325
|
-
const child = this.document.children.find(c => c.type.name
|
|
1325
|
+
const child = this.document.children.find(c => c.type.name === 'Title');
|
|
1326
1326
|
return child ? new VCard.Title(child) : undefined;
|
|
1327
1327
|
}
|
|
1328
1328
|
|
|
1329
1329
|
/** The child document of type "Role". */
|
|
1330
1330
|
get role() {
|
|
1331
|
-
const child = this.document.children.find(c => c.type.name
|
|
1331
|
+
const child = this.document.children.find(c => c.type.name === 'Role');
|
|
1332
1332
|
return child ? new VCard.Role(child) : undefined;
|
|
1333
1333
|
}
|
|
1334
1334
|
|
|
1335
1335
|
/** The child document of type "Logo". */
|
|
1336
1336
|
get logo() {
|
|
1337
|
-
const child = this.document.children.find(c => c.type.name
|
|
1337
|
+
const child = this.document.children.find(c => c.type.name === 'Logo');
|
|
1338
1338
|
return child ? new VCard.Logo(child) : undefined;
|
|
1339
1339
|
}
|
|
1340
1340
|
|
|
1341
1341
|
/** The child document of type "Organisation". */
|
|
1342
1342
|
get organisation() {
|
|
1343
|
-
const child = this.document.children.find(c => c.type.name
|
|
1343
|
+
const child = this.document.children.find(c => c.type.name === 'Organisation');
|
|
1344
1344
|
return child ? new VCard.Organisation(child) : undefined;
|
|
1345
1345
|
}
|
|
1346
1346
|
|
|
1347
1347
|
/** The child document of type "Member". */
|
|
1348
1348
|
get member() {
|
|
1349
|
-
const child = this.document.children.find(c => c.type.name
|
|
1349
|
+
const child = this.document.children.find(c => c.type.name === 'Member');
|
|
1350
1350
|
return child ? new VCard.Member(child) : undefined;
|
|
1351
1351
|
}
|
|
1352
1352
|
|
|
1353
1353
|
/** The child document of type "Related". */
|
|
1354
1354
|
get related() {
|
|
1355
|
-
const child = this.document.children.find(c => c.type.name
|
|
1355
|
+
const child = this.document.children.find(c => c.type.name === 'Related');
|
|
1356
1356
|
return child ? new VCard.Related(child) : undefined;
|
|
1357
1357
|
}
|
|
1358
1358
|
|
|
1359
1359
|
/** The child document of type "Categories". */
|
|
1360
1360
|
get categories() {
|
|
1361
|
-
const child = this.document.children.find(c => c.type.name
|
|
1361
|
+
const child = this.document.children.find(c => c.type.name === 'Categories');
|
|
1362
1362
|
return child ? new VCard.Categories(child) : undefined;
|
|
1363
1363
|
}
|
|
1364
1364
|
|
|
1365
1365
|
/** The child document of type "Note". */
|
|
1366
1366
|
get note() {
|
|
1367
|
-
const child = this.document.children.find(c => c.type.name
|
|
1367
|
+
const child = this.document.children.find(c => c.type.name === 'Note');
|
|
1368
1368
|
return child ? new VCard.Note(child) : undefined;
|
|
1369
1369
|
}
|
|
1370
1370
|
|
|
1371
1371
|
/** The child document of type "ProductId". */
|
|
1372
1372
|
get productId() {
|
|
1373
|
-
const child = this.document.children.find(c => c.type.name
|
|
1373
|
+
const child = this.document.children.find(c => c.type.name === 'ProductId');
|
|
1374
1374
|
return child ? new VCard.ProductId(child) : undefined;
|
|
1375
1375
|
}
|
|
1376
1376
|
|
|
1377
1377
|
/** The child document of type "Revision". */
|
|
1378
1378
|
get revision() {
|
|
1379
|
-
const child = this.document.children.find(c => c.type.name
|
|
1379
|
+
const child = this.document.children.find(c => c.type.name === 'Revision');
|
|
1380
1380
|
return child ? new VCard.Revision(child) : undefined;
|
|
1381
1381
|
}
|
|
1382
1382
|
|
|
1383
1383
|
/** The child document of type "Sound". */
|
|
1384
1384
|
get sound() {
|
|
1385
|
-
const child = this.document.children.find(c => c.type.name
|
|
1385
|
+
const child = this.document.children.find(c => c.type.name === 'Sound');
|
|
1386
1386
|
return child ? new VCard.Sound(child) : undefined;
|
|
1387
1387
|
}
|
|
1388
1388
|
|
|
1389
1389
|
/** The child document of type "UID". */
|
|
1390
1390
|
get uid() {
|
|
1391
|
-
const child = this.document.children.find(c => c.type.name
|
|
1391
|
+
const child = this.document.children.find(c => c.type.name === 'UID');
|
|
1392
1392
|
return child ? new VCard.UID(child) : undefined;
|
|
1393
1393
|
}
|
|
1394
1394
|
|
|
1395
1395
|
/** The child document of type "ClientPIDMap". */
|
|
1396
1396
|
get clientPIDMap() {
|
|
1397
|
-
const child = this.document.children.find(c => c.type.name
|
|
1397
|
+
const child = this.document.children.find(c => c.type.name === 'ClientPIDMap');
|
|
1398
1398
|
return child ? new VCard.ClientPIDMap(child) : undefined;
|
|
1399
1399
|
}
|
|
1400
1400
|
|
|
1401
1401
|
/** The child document of type "URL". */
|
|
1402
1402
|
get url() {
|
|
1403
|
-
const child = this.document.children.find(c => c.type.name
|
|
1403
|
+
const child = this.document.children.find(c => c.type.name === 'URL');
|
|
1404
1404
|
return child ? new VCard.URL(child) : undefined;
|
|
1405
1405
|
}
|
|
1406
1406
|
|
|
1407
1407
|
/** The child document of type "PublicKey". */
|
|
1408
1408
|
get publicKey() {
|
|
1409
|
-
const child = this.document.children.find(c => c.type.name
|
|
1409
|
+
const child = this.document.children.find(c => c.type.name === 'PublicKey');
|
|
1410
1410
|
return child ? new VCard.PublicKey(child) : undefined;
|
|
1411
1411
|
}
|
|
1412
1412
|
|
|
1413
1413
|
/** The child document of type "BusyTimeURL". */
|
|
1414
1414
|
get busyTimeURL() {
|
|
1415
|
-
const child = this.document.children.find(c => c.type.name
|
|
1415
|
+
const child = this.document.children.find(c => c.type.name === 'BusyTimeURL');
|
|
1416
1416
|
return child ? new VCard.BusyTimeURL(child) : undefined;
|
|
1417
1417
|
}
|
|
1418
1418
|
|
|
1419
1419
|
/** The child document of type "CalendarURIForRequests". */
|
|
1420
1420
|
get calendarURIForRequests() {
|
|
1421
|
-
const child = this.document.children.find(c => c.type.name
|
|
1421
|
+
const child = this.document.children.find(c => c.type.name === 'CalendarURIForRequests');
|
|
1422
1422
|
return child ? new VCard.CalendarURIForRequests(child) : undefined;
|
|
1423
1423
|
}
|
|
1424
1424
|
|
|
1425
1425
|
/** The child document of type "CalendarURI". */
|
|
1426
1426
|
get calendarURI() {
|
|
1427
|
-
const child = this.document.children.find(c => c.type.name
|
|
1427
|
+
const child = this.document.children.find(c => c.type.name === 'CalendarURI');
|
|
1428
1428
|
return child ? new VCard.CalendarURI(child) : undefined;
|
|
1429
1429
|
}
|
|
1430
1430
|
|
|
1431
1431
|
/** An array of all children of type "Custom". */
|
|
1432
1432
|
get customs() {
|
|
1433
|
-
return this.document.children.filter(c => c.type.name
|
|
1433
|
+
return this.document.children.filter(c => c.type.name === 'Custom').map(c => new VCard.Custom(c));
|
|
1434
1434
|
}
|
|
1435
1435
|
}
|
|
1436
1436
|
(function (_VCard) {
|
|
@@ -1439,24 +1439,24 @@ export class VCard {
|
|
|
1439
1439
|
return this._document;
|
|
1440
1440
|
}
|
|
1441
1441
|
constructor(document) {
|
|
1442
|
-
if (document.type.name
|
|
1442
|
+
if (document.type.name !== this.requiredDocumentType()) {
|
|
1443
1443
|
throw new Error(`Expected document type ${this.requiredDocumentType()}, got ${document.type.name}`);
|
|
1444
1444
|
}
|
|
1445
1445
|
this._document = document;
|
|
1446
1446
|
}
|
|
1447
1447
|
/** Raw Value */
|
|
1448
1448
|
get rawValue() {
|
|
1449
|
-
return this.document.fields.find(f => f.type.name
|
|
1449
|
+
return this.document.fields.find(f => f.type.name === 'RawValue');
|
|
1450
1450
|
}
|
|
1451
1451
|
|
|
1452
1452
|
/** Type Modifier */
|
|
1453
1453
|
get typeModifiers() {
|
|
1454
|
-
return this.document.fields.filter(f => f.type.name
|
|
1454
|
+
return this.document.fields.filter(f => f.type.name === 'TypeModifier');
|
|
1455
1455
|
}
|
|
1456
1456
|
|
|
1457
1457
|
/** Value */
|
|
1458
1458
|
get values() {
|
|
1459
|
-
return this.document.fields.filter(f => f.type.name
|
|
1459
|
+
return this.document.fields.filter(f => f.type.name === 'Value');
|
|
1460
1460
|
}
|
|
1461
1461
|
}
|
|
1462
1462
|
_VCard.Entry = Entry;
|
|
@@ -1465,7 +1465,7 @@ export class VCard {
|
|
|
1465
1465
|
super(document);
|
|
1466
1466
|
}
|
|
1467
1467
|
requiredDocumentType() {
|
|
1468
|
-
return
|
|
1468
|
+
return VCardVersionDocumentType;
|
|
1469
1469
|
}
|
|
1470
1470
|
}
|
|
1471
1471
|
_VCard.Version = Version;
|
|
@@ -1474,7 +1474,7 @@ export class VCard {
|
|
|
1474
1474
|
super(document);
|
|
1475
1475
|
}
|
|
1476
1476
|
requiredDocumentType() {
|
|
1477
|
-
return
|
|
1477
|
+
return VCardSourceDocumentType;
|
|
1478
1478
|
}
|
|
1479
1479
|
}
|
|
1480
1480
|
_VCard.Source = Source;
|
|
@@ -1483,7 +1483,7 @@ export class VCard {
|
|
|
1483
1483
|
super(document);
|
|
1484
1484
|
}
|
|
1485
1485
|
requiredDocumentType() {
|
|
1486
|
-
return
|
|
1486
|
+
return VCardKindDocumentType;
|
|
1487
1487
|
}
|
|
1488
1488
|
}
|
|
1489
1489
|
_VCard.Kind = Kind;
|
|
@@ -1492,7 +1492,7 @@ export class VCard {
|
|
|
1492
1492
|
super(document);
|
|
1493
1493
|
}
|
|
1494
1494
|
requiredDocumentType() {
|
|
1495
|
-
return
|
|
1495
|
+
return VCardXMLDocumentType;
|
|
1496
1496
|
}
|
|
1497
1497
|
}
|
|
1498
1498
|
_VCard.XML = XML;
|
|
@@ -1501,7 +1501,7 @@ export class VCard {
|
|
|
1501
1501
|
super(document);
|
|
1502
1502
|
}
|
|
1503
1503
|
requiredDocumentType() {
|
|
1504
|
-
return
|
|
1504
|
+
return VCardNameDocumentType;
|
|
1505
1505
|
}
|
|
1506
1506
|
}
|
|
1507
1507
|
_VCard.Name = Name;
|
|
@@ -1510,7 +1510,7 @@ export class VCard {
|
|
|
1510
1510
|
super(document);
|
|
1511
1511
|
}
|
|
1512
1512
|
requiredDocumentType() {
|
|
1513
|
-
return
|
|
1513
|
+
return VCardFirstNameDocumentType;
|
|
1514
1514
|
}
|
|
1515
1515
|
}
|
|
1516
1516
|
_VCard.FirstName = FirstName;
|
|
@@ -1519,7 +1519,7 @@ export class VCard {
|
|
|
1519
1519
|
super(document);
|
|
1520
1520
|
}
|
|
1521
1521
|
requiredDocumentType() {
|
|
1522
|
-
return
|
|
1522
|
+
return VCardNicknameDocumentType;
|
|
1523
1523
|
}
|
|
1524
1524
|
}
|
|
1525
1525
|
_VCard.Nickname = Nickname;
|
|
@@ -1528,7 +1528,7 @@ export class VCard {
|
|
|
1528
1528
|
super(document);
|
|
1529
1529
|
}
|
|
1530
1530
|
requiredDocumentType() {
|
|
1531
|
-
return
|
|
1531
|
+
return VCardBirthdayDocumentType;
|
|
1532
1532
|
}
|
|
1533
1533
|
}
|
|
1534
1534
|
_VCard.Birthday = Birthday;
|
|
@@ -1537,7 +1537,7 @@ export class VCard {
|
|
|
1537
1537
|
super(document);
|
|
1538
1538
|
}
|
|
1539
1539
|
requiredDocumentType() {
|
|
1540
|
-
return
|
|
1540
|
+
return VCardAnniversaryDocumentType;
|
|
1541
1541
|
}
|
|
1542
1542
|
}
|
|
1543
1543
|
_VCard.Anniversary = Anniversary;
|
|
@@ -1546,7 +1546,7 @@ export class VCard {
|
|
|
1546
1546
|
super(document);
|
|
1547
1547
|
}
|
|
1548
1548
|
requiredDocumentType() {
|
|
1549
|
-
return
|
|
1549
|
+
return VCardGenderDocumentType;
|
|
1550
1550
|
}
|
|
1551
1551
|
}
|
|
1552
1552
|
_VCard.Gender = Gender;
|
|
@@ -1555,7 +1555,7 @@ export class VCard {
|
|
|
1555
1555
|
super(document);
|
|
1556
1556
|
}
|
|
1557
1557
|
requiredDocumentType() {
|
|
1558
|
-
return
|
|
1558
|
+
return VCardDeliveryAddressDocumentType;
|
|
1559
1559
|
}
|
|
1560
1560
|
}
|
|
1561
1561
|
_VCard.DeliveryAddress = DeliveryAddress;
|
|
@@ -1564,7 +1564,7 @@ export class VCard {
|
|
|
1564
1564
|
super(document);
|
|
1565
1565
|
}
|
|
1566
1566
|
requiredDocumentType() {
|
|
1567
|
-
return
|
|
1567
|
+
return VCardPhotoDocumentType;
|
|
1568
1568
|
}
|
|
1569
1569
|
}
|
|
1570
1570
|
_VCard.Photo = Photo;
|
|
@@ -1573,7 +1573,7 @@ export class VCard {
|
|
|
1573
1573
|
super(document);
|
|
1574
1574
|
}
|
|
1575
1575
|
requiredDocumentType() {
|
|
1576
|
-
return
|
|
1576
|
+
return VCardTelephoneNumberDocumentType;
|
|
1577
1577
|
}
|
|
1578
1578
|
}
|
|
1579
1579
|
_VCard.TelephoneNumber = TelephoneNumber;
|
|
@@ -1582,7 +1582,7 @@ export class VCard {
|
|
|
1582
1582
|
super(document);
|
|
1583
1583
|
}
|
|
1584
1584
|
requiredDocumentType() {
|
|
1585
|
-
return
|
|
1585
|
+
return VCardEmailDocumentType;
|
|
1586
1586
|
}
|
|
1587
1587
|
}
|
|
1588
1588
|
_VCard.Email = Email;
|
|
@@ -1591,7 +1591,7 @@ export class VCard {
|
|
|
1591
1591
|
super(document);
|
|
1592
1592
|
}
|
|
1593
1593
|
requiredDocumentType() {
|
|
1594
|
-
return
|
|
1594
|
+
return VCardIMPPDocumentType;
|
|
1595
1595
|
}
|
|
1596
1596
|
}
|
|
1597
1597
|
_VCard.IMPP = IMPP;
|
|
@@ -1600,7 +1600,7 @@ export class VCard {
|
|
|
1600
1600
|
super(document);
|
|
1601
1601
|
}
|
|
1602
1602
|
requiredDocumentType() {
|
|
1603
|
-
return
|
|
1603
|
+
return VCardLanguagesDocumentType;
|
|
1604
1604
|
}
|
|
1605
1605
|
}
|
|
1606
1606
|
_VCard.Languages = Languages;
|
|
@@ -1609,7 +1609,7 @@ export class VCard {
|
|
|
1609
1609
|
super(document);
|
|
1610
1610
|
}
|
|
1611
1611
|
requiredDocumentType() {
|
|
1612
|
-
return
|
|
1612
|
+
return VCardTimeZoneDocumentType;
|
|
1613
1613
|
}
|
|
1614
1614
|
}
|
|
1615
1615
|
_VCard.TimeZone = TimeZone;
|
|
@@ -1618,7 +1618,7 @@ export class VCard {
|
|
|
1618
1618
|
super(document);
|
|
1619
1619
|
}
|
|
1620
1620
|
requiredDocumentType() {
|
|
1621
|
-
return
|
|
1621
|
+
return VCardGeoLocationDocumentType;
|
|
1622
1622
|
}
|
|
1623
1623
|
}
|
|
1624
1624
|
_VCard.GeoLocation = GeoLocation;
|
|
@@ -1627,7 +1627,7 @@ export class VCard {
|
|
|
1627
1627
|
super(document);
|
|
1628
1628
|
}
|
|
1629
1629
|
requiredDocumentType() {
|
|
1630
|
-
return
|
|
1630
|
+
return VCardTitleDocumentType;
|
|
1631
1631
|
}
|
|
1632
1632
|
}
|
|
1633
1633
|
_VCard.Title = Title;
|
|
@@ -1636,7 +1636,7 @@ export class VCard {
|
|
|
1636
1636
|
super(document);
|
|
1637
1637
|
}
|
|
1638
1638
|
requiredDocumentType() {
|
|
1639
|
-
return
|
|
1639
|
+
return VCardRoleDocumentType;
|
|
1640
1640
|
}
|
|
1641
1641
|
}
|
|
1642
1642
|
_VCard.Role = Role;
|
|
@@ -1645,7 +1645,7 @@ export class VCard {
|
|
|
1645
1645
|
super(document);
|
|
1646
1646
|
}
|
|
1647
1647
|
requiredDocumentType() {
|
|
1648
|
-
return
|
|
1648
|
+
return VCardLogoDocumentType;
|
|
1649
1649
|
}
|
|
1650
1650
|
}
|
|
1651
1651
|
_VCard.Logo = Logo;
|
|
@@ -1654,7 +1654,7 @@ export class VCard {
|
|
|
1654
1654
|
super(document);
|
|
1655
1655
|
}
|
|
1656
1656
|
requiredDocumentType() {
|
|
1657
|
-
return
|
|
1657
|
+
return VCardOrganisationDocumentType;
|
|
1658
1658
|
}
|
|
1659
1659
|
}
|
|
1660
1660
|
_VCard.Organisation = Organisation;
|
|
@@ -1663,7 +1663,7 @@ export class VCard {
|
|
|
1663
1663
|
super(document);
|
|
1664
1664
|
}
|
|
1665
1665
|
requiredDocumentType() {
|
|
1666
|
-
return
|
|
1666
|
+
return VCardMemberDocumentType;
|
|
1667
1667
|
}
|
|
1668
1668
|
}
|
|
1669
1669
|
_VCard.Member = Member;
|
|
@@ -1672,7 +1672,7 @@ export class VCard {
|
|
|
1672
1672
|
super(document);
|
|
1673
1673
|
}
|
|
1674
1674
|
requiredDocumentType() {
|
|
1675
|
-
return
|
|
1675
|
+
return VCardRelatedDocumentType;
|
|
1676
1676
|
}
|
|
1677
1677
|
}
|
|
1678
1678
|
_VCard.Related = Related;
|
|
@@ -1681,7 +1681,7 @@ export class VCard {
|
|
|
1681
1681
|
super(document);
|
|
1682
1682
|
}
|
|
1683
1683
|
requiredDocumentType() {
|
|
1684
|
-
return
|
|
1684
|
+
return VCardCategoriesDocumentType;
|
|
1685
1685
|
}
|
|
1686
1686
|
}
|
|
1687
1687
|
_VCard.Categories = Categories;
|
|
@@ -1690,7 +1690,7 @@ export class VCard {
|
|
|
1690
1690
|
super(document);
|
|
1691
1691
|
}
|
|
1692
1692
|
requiredDocumentType() {
|
|
1693
|
-
return
|
|
1693
|
+
return VCardNoteDocumentType;
|
|
1694
1694
|
}
|
|
1695
1695
|
}
|
|
1696
1696
|
_VCard.Note = Note;
|
|
@@ -1699,7 +1699,7 @@ export class VCard {
|
|
|
1699
1699
|
super(document);
|
|
1700
1700
|
}
|
|
1701
1701
|
requiredDocumentType() {
|
|
1702
|
-
return
|
|
1702
|
+
return VCardProductIdDocumentType;
|
|
1703
1703
|
}
|
|
1704
1704
|
}
|
|
1705
1705
|
_VCard.ProductId = ProductId;
|
|
@@ -1708,7 +1708,7 @@ export class VCard {
|
|
|
1708
1708
|
super(document);
|
|
1709
1709
|
}
|
|
1710
1710
|
requiredDocumentType() {
|
|
1711
|
-
return
|
|
1711
|
+
return VCardRevisionDocumentType;
|
|
1712
1712
|
}
|
|
1713
1713
|
}
|
|
1714
1714
|
_VCard.Revision = Revision;
|
|
@@ -1717,7 +1717,7 @@ export class VCard {
|
|
|
1717
1717
|
super(document);
|
|
1718
1718
|
}
|
|
1719
1719
|
requiredDocumentType() {
|
|
1720
|
-
return
|
|
1720
|
+
return VCardSoundDocumentType;
|
|
1721
1721
|
}
|
|
1722
1722
|
}
|
|
1723
1723
|
_VCard.Sound = Sound;
|
|
@@ -1726,7 +1726,7 @@ export class VCard {
|
|
|
1726
1726
|
super(document);
|
|
1727
1727
|
}
|
|
1728
1728
|
requiredDocumentType() {
|
|
1729
|
-
return
|
|
1729
|
+
return VCardUIDDocumentType;
|
|
1730
1730
|
}
|
|
1731
1731
|
}
|
|
1732
1732
|
_VCard.UID = UID;
|
|
@@ -1735,7 +1735,7 @@ export class VCard {
|
|
|
1735
1735
|
super(document);
|
|
1736
1736
|
}
|
|
1737
1737
|
requiredDocumentType() {
|
|
1738
|
-
return
|
|
1738
|
+
return VCardClientPIDMapDocumentType;
|
|
1739
1739
|
}
|
|
1740
1740
|
}
|
|
1741
1741
|
_VCard.ClientPIDMap = ClientPIDMap;
|
|
@@ -1744,7 +1744,7 @@ export class VCard {
|
|
|
1744
1744
|
super(document);
|
|
1745
1745
|
}
|
|
1746
1746
|
requiredDocumentType() {
|
|
1747
|
-
return
|
|
1747
|
+
return VCardURLDocumentType;
|
|
1748
1748
|
}
|
|
1749
1749
|
}
|
|
1750
1750
|
_VCard.URL = URL;
|
|
@@ -1753,7 +1753,7 @@ export class VCard {
|
|
|
1753
1753
|
super(document);
|
|
1754
1754
|
}
|
|
1755
1755
|
requiredDocumentType() {
|
|
1756
|
-
return
|
|
1756
|
+
return VCardPublicKeyDocumentType;
|
|
1757
1757
|
}
|
|
1758
1758
|
}
|
|
1759
1759
|
_VCard.PublicKey = PublicKey;
|
|
@@ -1762,7 +1762,7 @@ export class VCard {
|
|
|
1762
1762
|
super(document);
|
|
1763
1763
|
}
|
|
1764
1764
|
requiredDocumentType() {
|
|
1765
|
-
return
|
|
1765
|
+
return VCardBusyTimeURLDocumentType;
|
|
1766
1766
|
}
|
|
1767
1767
|
}
|
|
1768
1768
|
_VCard.BusyTimeURL = BusyTimeURL;
|
|
@@ -1771,7 +1771,7 @@ export class VCard {
|
|
|
1771
1771
|
super(document);
|
|
1772
1772
|
}
|
|
1773
1773
|
requiredDocumentType() {
|
|
1774
|
-
return
|
|
1774
|
+
return VCardCalendarURIForRequestsDocumentType;
|
|
1775
1775
|
}
|
|
1776
1776
|
}
|
|
1777
1777
|
_VCard.CalendarURIForRequests = CalendarURIForRequests;
|
|
@@ -1780,7 +1780,7 @@ export class VCard {
|
|
|
1780
1780
|
super(document);
|
|
1781
1781
|
}
|
|
1782
1782
|
requiredDocumentType() {
|
|
1783
|
-
return
|
|
1783
|
+
return VCardCalendarURIDocumentType;
|
|
1784
1784
|
}
|
|
1785
1785
|
}
|
|
1786
1786
|
_VCard.CalendarURI = CalendarURI;
|
|
@@ -1789,7 +1789,7 @@ export class VCard {
|
|
|
1789
1789
|
super(document);
|
|
1790
1790
|
}
|
|
1791
1791
|
requiredDocumentType() {
|
|
1792
|
-
return
|
|
1792
|
+
return VCardCustomDocumentType;
|
|
1793
1793
|
}
|
|
1794
1794
|
}
|
|
1795
1795
|
_VCard.Custom = Custom;
|
|
@@ -1800,93 +1800,93 @@ export class AAMVA {
|
|
|
1800
1800
|
return this._document;
|
|
1801
1801
|
}
|
|
1802
1802
|
constructor(document) {
|
|
1803
|
-
if (document.type.name
|
|
1803
|
+
if (document.type.name !== this.requiredDocumentType()) {
|
|
1804
1804
|
throw new Error(`Expected document type ${this.requiredDocumentType()}, got ${document.type.name}`);
|
|
1805
1805
|
}
|
|
1806
1806
|
this._document = document;
|
|
1807
1807
|
}
|
|
1808
1808
|
requiredDocumentType() {
|
|
1809
|
-
return
|
|
1809
|
+
return AAMVADocumentType;
|
|
1810
1810
|
}
|
|
1811
1811
|
|
|
1812
1812
|
/** Issuer Identification Number */
|
|
1813
1813
|
get issuerIdentificationNumber() {
|
|
1814
|
-
return this.document.fields.find(f => f.type.name
|
|
1814
|
+
return this.document.fields.find(f => f.type.name === 'IssuerIdentificationNumber');
|
|
1815
1815
|
}
|
|
1816
1816
|
|
|
1817
1817
|
/** Jurisdiction Version Number */
|
|
1818
1818
|
get jurisdictionVersionNumber() {
|
|
1819
|
-
return this.document.fields.find(f => f.type.name
|
|
1819
|
+
return this.document.fields.find(f => f.type.name === 'JurisdictionVersionNumber');
|
|
1820
1820
|
}
|
|
1821
1821
|
|
|
1822
1822
|
/** Version */
|
|
1823
1823
|
get version() {
|
|
1824
|
-
return this.document.fields.find(f => f.type.name
|
|
1824
|
+
return this.document.fields.find(f => f.type.name === 'Version');
|
|
1825
1825
|
}
|
|
1826
1826
|
|
|
1827
1827
|
/** The child document of type "TitleData". */
|
|
1828
1828
|
get titleData() {
|
|
1829
|
-
const child = this.document.children.find(c => c.type.name
|
|
1829
|
+
const child = this.document.children.find(c => c.type.name === 'TitleData');
|
|
1830
1830
|
return child ? new AAMVA.TitleData(child) : undefined;
|
|
1831
1831
|
}
|
|
1832
1832
|
|
|
1833
1833
|
/** The child document of type "RegistrationData". */
|
|
1834
1834
|
get registrationData() {
|
|
1835
|
-
const child = this.document.children.find(c => c.type.name
|
|
1835
|
+
const child = this.document.children.find(c => c.type.name === 'RegistrationData');
|
|
1836
1836
|
return child ? new AAMVA.RegistrationData(child) : undefined;
|
|
1837
1837
|
}
|
|
1838
1838
|
|
|
1839
1839
|
/** The child document of type "MotorCarrierData". */
|
|
1840
1840
|
get motorCarrierData() {
|
|
1841
|
-
const child = this.document.children.find(c => c.type.name
|
|
1841
|
+
const child = this.document.children.find(c => c.type.name === 'MotorCarrierData');
|
|
1842
1842
|
return child ? new AAMVA.MotorCarrierData(child) : undefined;
|
|
1843
1843
|
}
|
|
1844
1844
|
|
|
1845
1845
|
/** The child document of type "RegistrantAndVehicleData". */
|
|
1846
1846
|
get registrantAndVehicleData() {
|
|
1847
|
-
const child = this.document.children.find(c => c.type.name
|
|
1847
|
+
const child = this.document.children.find(c => c.type.name === 'RegistrantAndVehicleData');
|
|
1848
1848
|
return child ? new AAMVA.RegistrantAndVehicleData(child) : undefined;
|
|
1849
1849
|
}
|
|
1850
1850
|
|
|
1851
1851
|
/** The child document of type "VehicleOwnerData". */
|
|
1852
1852
|
get vehicleOwnerData() {
|
|
1853
|
-
const child = this.document.children.find(c => c.type.name
|
|
1853
|
+
const child = this.document.children.find(c => c.type.name === 'VehicleOwnerData');
|
|
1854
1854
|
return child ? new AAMVA.VehicleOwnerData(child) : undefined;
|
|
1855
1855
|
}
|
|
1856
1856
|
|
|
1857
1857
|
/** The child document of type "VehicleData". */
|
|
1858
1858
|
get vehicleData() {
|
|
1859
|
-
const child = this.document.children.find(c => c.type.name
|
|
1859
|
+
const child = this.document.children.find(c => c.type.name === 'VehicleData');
|
|
1860
1860
|
return child ? new AAMVA.VehicleData(child) : undefined;
|
|
1861
1861
|
}
|
|
1862
1862
|
|
|
1863
1863
|
/** The child document of type "VehicleSafetyInspectionData". */
|
|
1864
1864
|
get vehicleSafetyInspectionData() {
|
|
1865
|
-
const child = this.document.children.find(c => c.type.name
|
|
1865
|
+
const child = this.document.children.find(c => c.type.name === 'VehicleSafetyInspectionData');
|
|
1866
1866
|
return child ? new AAMVA.VehicleSafetyInspectionData(child) : undefined;
|
|
1867
1867
|
}
|
|
1868
1868
|
|
|
1869
1869
|
/** The child document of type "DriverLicense". */
|
|
1870
1870
|
get driverLicense() {
|
|
1871
|
-
const child = this.document.children.find(c => c.type.name
|
|
1871
|
+
const child = this.document.children.find(c => c.type.name === 'DriverLicense');
|
|
1872
1872
|
return child ? new AAMVA.DriverLicense(child) : undefined;
|
|
1873
1873
|
}
|
|
1874
1874
|
|
|
1875
1875
|
/** The child document of type "IDCard". */
|
|
1876
1876
|
get idCard() {
|
|
1877
|
-
const child = this.document.children.find(c => c.type.name
|
|
1877
|
+
const child = this.document.children.find(c => c.type.name === 'IDCard');
|
|
1878
1878
|
return child ? new AAMVA.IDCard(child) : undefined;
|
|
1879
1879
|
}
|
|
1880
1880
|
|
|
1881
1881
|
/** The child document of type "EnhancedDriverLicense". */
|
|
1882
1882
|
get enhancedDriverLicense() {
|
|
1883
|
-
const child = this.document.children.find(c => c.type.name
|
|
1883
|
+
const child = this.document.children.find(c => c.type.name === 'EnhancedDriverLicense');
|
|
1884
1884
|
return child ? new AAMVA.EnhancedDriverLicense(child) : undefined;
|
|
1885
1885
|
}
|
|
1886
1886
|
|
|
1887
1887
|
/** The child document of type "RawDocument". */
|
|
1888
1888
|
get rawDocument() {
|
|
1889
|
-
const child = this.document.children.find(c => c.type.name
|
|
1889
|
+
const child = this.document.children.find(c => c.type.name === 'RawDocument');
|
|
1890
1890
|
return new AAMVA.RawDocument(child);
|
|
1891
1891
|
}
|
|
1892
1892
|
}
|
|
@@ -1896,149 +1896,148 @@ export class AAMVA {
|
|
|
1896
1896
|
return this._document;
|
|
1897
1897
|
}
|
|
1898
1898
|
constructor(document) {
|
|
1899
|
-
if (document.type.name
|
|
1899
|
+
if (document.type.name !== this.requiredDocumentType()) {
|
|
1900
1900
|
throw new Error(`Expected document type ${this.requiredDocumentType()}, got ${document.type.name}`);
|
|
1901
1901
|
}
|
|
1902
1902
|
this._document = document;
|
|
1903
1903
|
}
|
|
1904
1904
|
requiredDocumentType() {
|
|
1905
|
-
return
|
|
1905
|
+
return AAMVATitleDataDocumentType;
|
|
1906
1906
|
}
|
|
1907
1907
|
|
|
1908
1908
|
/** Data element ID "NAT". City portion of the owner's address. */
|
|
1909
1909
|
get addressCity() {
|
|
1910
|
-
return this.document.fields.find(f => f.type.name
|
|
1910
|
+
return this.document.fields.find(f => f.type.name === 'AddressCity');
|
|
1911
1911
|
}
|
|
1912
1912
|
|
|
1913
1913
|
/** Data element ID "NAU". Jurisdiction portion of the owner's address. */
|
|
1914
1914
|
get addressJurisdictionCode() {
|
|
1915
|
-
return this.document.fields.find(f => f.type.name
|
|
1915
|
+
return this.document.fields.find(f => f.type.name === 'AddressJurisdictionCode');
|
|
1916
1916
|
}
|
|
1917
1917
|
|
|
1918
1918
|
/** Data element ID "NAR". Street portion of the owner's address. */
|
|
1919
1919
|
get addressStreet() {
|
|
1920
|
-
return this.document.fields.find(f => f.type.name
|
|
1920
|
+
return this.document.fields.find(f => f.type.name === 'AddressStreet');
|
|
1921
1921
|
}
|
|
1922
1922
|
|
|
1923
1923
|
/** Data element ID "NAV". The ZIP code or Postal code portion of the owner's address. */
|
|
1924
1924
|
get addressZipCode() {
|
|
1925
|
-
return this.document.fields.find(f => f.type.name
|
|
1925
|
+
return this.document.fields.find(f => f.type.name === 'AddressZipCode');
|
|
1926
1926
|
}
|
|
1927
1927
|
|
|
1928
1928
|
/** Data element ID "BBC". The name of business that owns the vehicle. */
|
|
1929
1929
|
get businessName() {
|
|
1930
|
-
return this.document.fields.find(f => f.type.name
|
|
1930
|
+
return this.document.fields.find(f => f.type.name === 'BusinessName');
|
|
1931
1931
|
}
|
|
1932
1932
|
|
|
1933
1933
|
/** Data element ID "NAA". Family name (commonly called surname or last name) of the owner of the vehicle. */
|
|
1934
1934
|
get familyName() {
|
|
1935
|
-
return this.document.fields.find(f => f.type.name
|
|
1935
|
+
return this.document.fields.find(f => f.type.name === 'FamilyName');
|
|
1936
1936
|
}
|
|
1937
1937
|
|
|
1938
1938
|
/** Data element ID "LAF". A code that uniquely identifies the first holder of a lien. */
|
|
1939
1939
|
get firstLienHolderId() {
|
|
1940
|
-
return this.document.fields.find(f => f.type.name
|
|
1940
|
+
return this.document.fields.find(f => f.type.name === 'FirstLienHolderId');
|
|
1941
1941
|
}
|
|
1942
1942
|
|
|
1943
1943
|
/** Data element ID "LAA". Name of the first lien holder of the vehicle. */
|
|
1944
1944
|
get firstLienHolderName() {
|
|
1945
|
-
return this.document.fields.find(f => f.type.name
|
|
1945
|
+
return this.document.fields.find(f => f.type.name === 'FirstLienHolderName');
|
|
1946
1946
|
}
|
|
1947
1947
|
|
|
1948
1948
|
/** Data element ID "NAE". Given name or names (includes all of what are commonly referred to as first and middle names) of the owner of the vehicle. */
|
|
1949
1949
|
get givenName() {
|
|
1950
|
-
return this.document.fields.find(f => f.type.name
|
|
1950
|
+
return this.document.fields.find(f => f.type.name === 'GivenName');
|
|
1951
1951
|
}
|
|
1952
1952
|
|
|
1953
|
-
/** Data element ID "TAW". This code represents whether the vehicle/vessel is new or used. Note: jurisdictions' definitions of these classifications may vary a little due to state regulations on demo vehicles, slates between dealers, application of state taxes, etc. N = New, U = Used.
|
|
1954
|
-
*/
|
|
1953
|
+
/** Data element ID "TAW". This code represents whether the vehicle/vessel is new or used. Note: jurisdictions' definitions of these classifications may vary a little due to state regulations on demo vehicles, slates between dealers, application of state taxes, etc. N = New, U = Used. */
|
|
1955
1954
|
get newUsedIndicator() {
|
|
1956
|
-
return this.document.fields.find(f => f.type.name
|
|
1955
|
+
return this.document.fields.find(f => f.type.name === 'NewUsedIndicator');
|
|
1957
1956
|
}
|
|
1958
1957
|
|
|
1959
1958
|
/** Data element ID "TAH". The date the odometer reading was recorded by the jurisdiction. */
|
|
1960
1959
|
get odometerDate() {
|
|
1961
|
-
return this.document.fields.find(f => f.type.name
|
|
1960
|
+
return this.document.fields.find(f => f.type.name === 'OdometerDate');
|
|
1962
1961
|
}
|
|
1963
1962
|
|
|
1964
1963
|
/** Data element ID "TAG". This is the federal odometer mileage disclosure. The mandatory information is: (1) Actual vehicle mileage; (2) Mileage exceeds mechanical limitations; (3) Not actual mileage; (4) Mileage disclosure not required. */
|
|
1965
1964
|
get odometerDisclosure() {
|
|
1966
|
-
return this.document.fields.find(f => f.type.name
|
|
1965
|
+
return this.document.fields.find(f => f.type.name === 'OdometerDisclosure');
|
|
1967
1966
|
}
|
|
1968
1967
|
|
|
1969
1968
|
/** Data element ID "TAI". This is the odometer reading registered with the DMV either at the time of titling or registration renewal in kilometers. */
|
|
1970
1969
|
get odometerReadingKilometers() {
|
|
1971
|
-
return this.document.fields.find(f => f.type.name
|
|
1970
|
+
return this.document.fields.find(f => f.type.name === 'OdometerReadingKilometers');
|
|
1972
1971
|
}
|
|
1973
1972
|
|
|
1974
1973
|
/** Data element ID "TAF". This is the odometer reading registered with the DMV either at the time of titling or registration renewal. */
|
|
1975
1974
|
get odometerReadingMileage() {
|
|
1976
|
-
return this.document.fields.find(f => f.type.name
|
|
1975
|
+
return this.document.fields.find(f => f.type.name === 'OdometerReadingMileage');
|
|
1977
1976
|
}
|
|
1978
1977
|
|
|
1979
1978
|
/** Data element ID "TAZ". The title number assigned to the vehicle by the previous titling jurisdiction. */
|
|
1980
1979
|
get previousTitleNumber() {
|
|
1981
|
-
return this.document.fields.find(f => f.type.name
|
|
1980
|
+
return this.document.fields.find(f => f.type.name === 'PreviousTitleNumber');
|
|
1982
1981
|
}
|
|
1983
1982
|
|
|
1984
1983
|
/** Data element ID "TPJ". The code for the jurisdiction (U.S., Canadian, or Mexican) that titled the vehicle immediately prior to the current titling jurisdiction. */
|
|
1985
1984
|
get previousTitlingJurisdiction() {
|
|
1986
|
-
return this.document.fields.find(f => f.type.name
|
|
1985
|
+
return this.document.fields.find(f => f.type.name === 'PreviousTitlingJurisdiction');
|
|
1987
1986
|
}
|
|
1988
1987
|
|
|
1989
1988
|
/** Data element ID "TAY". Code providing information about the brand applied to the title. */
|
|
1990
1989
|
get titleBrand() {
|
|
1991
|
-
return this.document.fields.find(f => f.type.name
|
|
1990
|
+
return this.document.fields.find(f => f.type.name === 'TitleBrand');
|
|
1992
1991
|
}
|
|
1993
1992
|
|
|
1994
1993
|
/** Data element ID "TAV". The date the jurisdiction's titling authority issued a title to the owner of the vehicle. The format is CCYYMMDD. */
|
|
1995
1994
|
get titleIssueDate() {
|
|
1996
|
-
return this.document.fields.find(f => f.type.name
|
|
1995
|
+
return this.document.fields.find(f => f.type.name === 'TitleIssueDate');
|
|
1997
1996
|
}
|
|
1998
1997
|
|
|
1999
1998
|
/** Data element ID "TAA". The date the jurisdiction's titling authority issued a title to the owner of the vehicle. The format is CCYYMMDD. */
|
|
2000
1999
|
get titleNumber() {
|
|
2001
|
-
return this.document.fields.find(f => f.type.name
|
|
2000
|
+
return this.document.fields.find(f => f.type.name === 'TitleNumber');
|
|
2002
2001
|
}
|
|
2003
2002
|
|
|
2004
2003
|
/** Data element ID "TAC". A unique set of alphanumeric characters assigned by the titling jurisdiction to the certificate of title of a vehicle. */
|
|
2005
2004
|
get titlingJurisdiction() {
|
|
2006
|
-
return this.document.fields.find(f => f.type.name
|
|
2005
|
+
return this.document.fields.find(f => f.type.name === 'TitlingJurisdiction');
|
|
2007
2006
|
}
|
|
2008
2007
|
|
|
2009
2008
|
/** Data element ID "VAO". The general configuration or shape of a vehicle distinguished by characteristics such as number of doors, seats, windows, roofline, and type of top. The vehicle body type is 2-character alphanumeric. */
|
|
2010
2009
|
get vehicleBodyStyle() {
|
|
2011
|
-
return this.document.fields.find(f => f.type.name
|
|
2010
|
+
return this.document.fields.find(f => f.type.name === 'VehicleBodyStyle');
|
|
2012
2011
|
}
|
|
2013
2012
|
|
|
2014
2013
|
/** Data element ID "VBD". Where the vehicle/vessel is one color, this is the appropriate code describing that color. When the vehicle is two colors, this is the code for the top-most or front-most color. */
|
|
2015
2014
|
get vehicleColor() {
|
|
2016
|
-
return this.document.fields.find(f => f.type.name
|
|
2015
|
+
return this.document.fields.find(f => f.type.name === 'VehicleColor');
|
|
2017
2016
|
}
|
|
2018
2017
|
|
|
2019
2018
|
/** Data element ID "VAD". A unique combination of alphanumeric characters that identifies a specific vehicle or component. The VIN is affixed to the vehicle in specific locations and formulated by the manufacturer. State agencies under some controlled instances may assign a VIN to a vehicle. */
|
|
2020
2019
|
get vehicleIdentificationNumber() {
|
|
2021
|
-
return this.document.fields.find(f => f.type.name
|
|
2020
|
+
return this.document.fields.find(f => f.type.name === 'VehicleIdentificationNumber');
|
|
2022
2021
|
}
|
|
2023
2022
|
|
|
2024
2023
|
/** Data element ID "VAK". The distinctive (coded) name applied to a group of vehicles by a manufacturer. */
|
|
2025
2024
|
get vehicleMake() {
|
|
2026
|
-
return this.document.fields.find(f => f.type.name
|
|
2025
|
+
return this.document.fields.find(f => f.type.name === 'VehicleMake');
|
|
2027
2026
|
}
|
|
2028
2027
|
|
|
2029
2028
|
/** Data element ID "VAM". A code denoting a family of vehicles (within a make), which has a degree of similarity in construction, such as body, chassis, etc. The field does not necessarily contain a standard code; it may contain a value provided by the originator of the field. */
|
|
2030
2029
|
get vehicleModel() {
|
|
2031
|
-
return this.document.fields.find(f => f.type.name
|
|
2030
|
+
return this.document.fields.find(f => f.type.name === 'VehicleModel');
|
|
2032
2031
|
}
|
|
2033
2032
|
|
|
2034
2033
|
/** Data element ID "VAL". The year that is assigned to a vehicle by the manufacturer. The format is CCYY. */
|
|
2035
2034
|
get vehicleModelYear() {
|
|
2036
|
-
return this.document.fields.find(f => f.type.name
|
|
2035
|
+
return this.document.fields.find(f => f.type.name === 'VehicleModelYear');
|
|
2037
2036
|
}
|
|
2038
2037
|
|
|
2039
2038
|
/** Data element ID "TAU". The date a vehicle was purchased by the current owner. The format is ISO8601 with delimiters. */
|
|
2040
2039
|
get vehiclePurchaseDate() {
|
|
2041
|
-
return this.document.fields.find(f => f.type.name
|
|
2040
|
+
return this.document.fields.find(f => f.type.name === 'VehiclePurchaseDate');
|
|
2042
2041
|
}
|
|
2043
2042
|
}
|
|
2044
2043
|
_AAMVA.TitleData = TitleData;
|
|
@@ -2047,123 +2046,123 @@ export class AAMVA {
|
|
|
2047
2046
|
return this._document;
|
|
2048
2047
|
}
|
|
2049
2048
|
constructor(document) {
|
|
2050
|
-
if (document.type.name
|
|
2049
|
+
if (document.type.name !== this.requiredDocumentType()) {
|
|
2051
2050
|
throw new Error(`Expected document type ${this.requiredDocumentType()}, got ${document.type.name}`);
|
|
2052
2051
|
}
|
|
2053
2052
|
this._document = document;
|
|
2054
2053
|
}
|
|
2055
2054
|
requiredDocumentType() {
|
|
2056
|
-
return
|
|
2055
|
+
return AAMVARegistrationDataDocumentType;
|
|
2057
2056
|
}
|
|
2058
2057
|
|
|
2059
2058
|
/** Data element ID "RBK". City portion of the owner's address. */
|
|
2060
2059
|
get addressCity() {
|
|
2061
|
-
return this.document.fields.find(f => f.type.name
|
|
2060
|
+
return this.document.fields.find(f => f.type.name === 'AddressCity');
|
|
2062
2061
|
}
|
|
2063
2062
|
|
|
2064
2063
|
/** Data element ID "RBL". Jurisdiction portion of the owner's address. */
|
|
2065
2064
|
get addressJurisdictionCode() {
|
|
2066
|
-
return this.document.fields.find(f => f.type.name
|
|
2065
|
+
return this.document.fields.find(f => f.type.name === 'AddressJurisdictionCode');
|
|
2067
2066
|
}
|
|
2068
2067
|
|
|
2069
2068
|
/** Data element ID "RBI". Street portion of the owner's address. */
|
|
2070
2069
|
get addressStreet() {
|
|
2071
|
-
return this.document.fields.find(f => f.type.name
|
|
2070
|
+
return this.document.fields.find(f => f.type.name === 'AddressStreet');
|
|
2072
2071
|
}
|
|
2073
2072
|
|
|
2074
2073
|
/** Data element ID "RBM". The Zip code or Postal code of the vehicle owner's residence address. */
|
|
2075
2074
|
get addressZipCode() {
|
|
2076
|
-
return this.document.fields.find(f => f.type.name
|
|
2075
|
+
return this.document.fields.find(f => f.type.name === 'AddressZipCode');
|
|
2077
2076
|
}
|
|
2078
2077
|
|
|
2079
2078
|
/** Data element ID "VBC". The number of common axles of rotation of one or more wheels of a vehicle, whether power driven or freely rotating. */
|
|
2080
2079
|
get axles() {
|
|
2081
|
-
return this.document.fields.find(f => f.type.name
|
|
2080
|
+
return this.document.fields.find(f => f.type.name === 'Axles');
|
|
2082
2081
|
}
|
|
2083
2082
|
|
|
2084
2083
|
/** Data element ID "BBC". The business name of the first registrant of a vehicle. */
|
|
2085
2084
|
get businessName() {
|
|
2086
|
-
return this.document.fields.find(f => f.type.name
|
|
2085
|
+
return this.document.fields.find(f => f.type.name === 'BusinessName');
|
|
2087
2086
|
}
|
|
2088
2087
|
|
|
2089
2088
|
/** Data element ID "FUL". The type of fuel used by the vehicle. In most cases, the fuel type would be diesel. */
|
|
2090
2089
|
get fuel() {
|
|
2091
|
-
return this.document.fields.find(f => f.type.name
|
|
2090
|
+
return this.document.fields.find(f => f.type.name === 'Fuel');
|
|
2092
2091
|
}
|
|
2093
2092
|
|
|
2094
2093
|
/** Data element ID "VAT". The unladen weight of the vehicle (e.g., the single-unit truck, truck combination) plus the weight of the load being carried at a specific point in time. */
|
|
2095
2094
|
get grossVehicleWeight() {
|
|
2096
|
-
return this.document.fields.find(f => f.type.name
|
|
2095
|
+
return this.document.fields.find(f => f.type.name === 'GrossVehicleWeight');
|
|
2097
2096
|
}
|
|
2098
2097
|
|
|
2099
2098
|
/** Data element ID "RBD". Family name (commonly called surname or last name) of the registered owner of a vehicle. */
|
|
2100
2099
|
get registrantFamilyName() {
|
|
2101
|
-
return this.document.fields.find(f => f.type.name
|
|
2100
|
+
return this.document.fields.find(f => f.type.name === 'RegistrantFamilyName');
|
|
2102
2101
|
}
|
|
2103
2102
|
|
|
2104
2103
|
/** Data element ID "RBE". Given name or names (includes all of what are commonly referred to as first and middle names) of the registered owner of a vehicle. */
|
|
2105
2104
|
get registrantGivenName() {
|
|
2106
|
-
return this.document.fields.find(f => f.type.name
|
|
2105
|
+
return this.document.fields.find(f => f.type.name === 'RegistrantGivenName');
|
|
2107
2106
|
}
|
|
2108
2107
|
|
|
2109
2108
|
/** Data element ID "RAG". The date in which the registration expired. The format is ISO8601 with delimiters. */
|
|
2110
2109
|
get registrationExpiryDate() {
|
|
2111
|
-
return this.document.fields.find(f => f.type.name
|
|
2110
|
+
return this.document.fields.find(f => f.type.name === 'RegistrationExpiryDate');
|
|
2112
2111
|
}
|
|
2113
2112
|
|
|
2114
2113
|
/** Data element ID "RBB". The date in which the registration was issued. The format is ISO8601 with delimiters. */
|
|
2115
2114
|
get registrationIssueDate() {
|
|
2116
|
-
return this.document.fields.find(f => f.type.name
|
|
2115
|
+
return this.document.fields.find(f => f.type.name === 'RegistrationIssueDate');
|
|
2117
2116
|
}
|
|
2118
2117
|
|
|
2119
2118
|
/** Data element ID "RAM". The characters assigned to a registration plate or tag affixed to the vehicle, assigned by the jurisdiction. */
|
|
2120
2119
|
get registrationPlateNumber() {
|
|
2121
|
-
return this.document.fields.find(f => f.type.name
|
|
2120
|
+
return this.document.fields.find(f => f.type.name === 'RegistrationPlateNumber');
|
|
2122
2121
|
}
|
|
2123
2122
|
|
|
2124
2123
|
/** Data element ID "RBU". A unique number printed on the tab/decal and stored as part of the registration record. */
|
|
2125
2124
|
get registrationWindowStickerDecal() {
|
|
2126
|
-
return this.document.fields.find(f => f.type.name
|
|
2125
|
+
return this.document.fields.find(f => f.type.name === 'RegistrationWindowStickerDecal');
|
|
2127
2126
|
}
|
|
2128
2127
|
|
|
2129
2128
|
/** Data element ID "RBT". The year of registration. */
|
|
2130
2129
|
get registrationYear() {
|
|
2131
|
-
return this.document.fields.find(f => f.type.name
|
|
2130
|
+
return this.document.fields.find(f => f.type.name === 'RegistrationYear');
|
|
2132
2131
|
}
|
|
2133
2132
|
|
|
2134
2133
|
/** Data element ID "VAO". The general configuration or shape of a vehicle distinguished by characteristics such as number of doors, seats, windows, roofline, and type of top. The vehicle body type is 2-character alphanumeric. */
|
|
2135
2134
|
get vehicleBodyStyle() {
|
|
2136
|
-
return this.document.fields.find(f => f.type.name
|
|
2135
|
+
return this.document.fields.find(f => f.type.name === 'VehicleBodyStyle');
|
|
2137
2136
|
}
|
|
2138
2137
|
|
|
2139
2138
|
/** Data element ID "VBD". Where the vehicle is one color, this is the appropriate code describing that color. When the vehicle is two colors, this is the code for the top-most or front-most color. */
|
|
2140
2139
|
get vehicleColor() {
|
|
2141
|
-
return this.document.fields.find(f => f.type.name
|
|
2140
|
+
return this.document.fields.find(f => f.type.name === 'VehicleColor');
|
|
2142
2141
|
}
|
|
2143
2142
|
|
|
2144
2143
|
/** Data element ID "VAD". A unique combination of alphanumeric characters that identifies a specific vehicle or component. The VIN is affixed to the vehicle in specific locations and formulated by the manufacturer. State agencies under some controlled instances my assign a VIN to a vehicle. */
|
|
2145
2144
|
get vehicleIdentificationNumber() {
|
|
2146
|
-
return this.document.fields.find(f => f.type.name
|
|
2145
|
+
return this.document.fields.find(f => f.type.name === 'VehicleIdentificationNumber');
|
|
2147
2146
|
}
|
|
2148
2147
|
|
|
2149
2148
|
/** Data element ID "VAK". The distinctive (coded) name applied to a group of vehicles by a manufacturer. */
|
|
2150
2149
|
get vehicleMake() {
|
|
2151
|
-
return this.document.fields.find(f => f.type.name
|
|
2150
|
+
return this.document.fields.find(f => f.type.name === 'VehicleMake');
|
|
2152
2151
|
}
|
|
2153
2152
|
|
|
2154
2153
|
/** Data element ID "VAM". A code denoting a family of vehicles (within a make), which has a degree of similarity in construction, such as body, chassis, etc. The field does not necessarily contain a standard code; it may contain a value provided by the originator of the field. */
|
|
2155
2154
|
get vehicleModel() {
|
|
2156
|
-
return this.document.fields.find(f => f.type.name
|
|
2155
|
+
return this.document.fields.find(f => f.type.name === 'VehicleModel');
|
|
2157
2156
|
}
|
|
2158
2157
|
|
|
2159
2158
|
/** Data element ID "VAL". The year which is assigned to a vehicle by the manufacturer. The format is CCYY. */
|
|
2160
2159
|
get vehicleModelYear() {
|
|
2161
|
-
return this.document.fields.find(f => f.type.name
|
|
2160
|
+
return this.document.fields.find(f => f.type.name === 'VehicleModelYear');
|
|
2162
2161
|
}
|
|
2163
2162
|
|
|
2164
2163
|
/** Data element ID "VPC". Indicates the use of the vehicle. */
|
|
2165
2164
|
get vehicleUse() {
|
|
2166
|
-
return this.document.fields.find(f => f.type.name
|
|
2165
|
+
return this.document.fields.find(f => f.type.name === 'VehicleUse');
|
|
2167
2166
|
}
|
|
2168
2167
|
}
|
|
2169
2168
|
_AAMVA.RegistrationData = RegistrationData;
|
|
@@ -2172,43 +2171,43 @@ export class AAMVA {
|
|
|
2172
2171
|
return this._document;
|
|
2173
2172
|
}
|
|
2174
2173
|
constructor(document) {
|
|
2175
|
-
if (document.type.name
|
|
2174
|
+
if (document.type.name !== this.requiredDocumentType()) {
|
|
2176
2175
|
throw new Error(`Expected document type ${this.requiredDocumentType()}, got ${document.type.name}`);
|
|
2177
2176
|
}
|
|
2178
2177
|
this._document = document;
|
|
2179
2178
|
}
|
|
2180
2179
|
requiredDocumentType() {
|
|
2181
|
-
return
|
|
2180
|
+
return AAMVAMotorCarrierDataDocumentType;
|
|
2182
2181
|
}
|
|
2183
2182
|
|
|
2184
2183
|
/** Data element ID "MAA". The name of the carrier responsible for safety. This can be an individual, partnership or corporation responsible for the transportation of persons or property. This is the name that is recognized by law. */
|
|
2185
2184
|
get carrierName() {
|
|
2186
|
-
return this.document.fields.find(f => f.type.name
|
|
2185
|
+
return this.document.fields.find(f => f.type.name === 'CarrierName');
|
|
2187
2186
|
}
|
|
2188
2187
|
|
|
2189
2188
|
/** Data element ID "MAL". This is the city for the mailing address of the individual carrier. This information is utilized by the base jurisdiction to send information to the carrier that purchased the IRP credentials. */
|
|
2190
2189
|
get city() {
|
|
2191
|
-
return this.document.fields.find(f => f.type.name
|
|
2190
|
+
return this.document.fields.find(f => f.type.name === 'City');
|
|
2192
2191
|
}
|
|
2193
2192
|
|
|
2194
2193
|
/** Data element ID "MAI". This is the jurisdiction of the residential address of the individual carrier. This information is utilized by the base jurisdiction to send information to the carrier that purchased the IRP credentials. */
|
|
2195
2194
|
get jurisdiction() {
|
|
2196
|
-
return this.document.fields.find(f => f.type.name
|
|
2195
|
+
return this.document.fields.find(f => f.type.name === 'Jurisdiction');
|
|
2197
2196
|
}
|
|
2198
2197
|
|
|
2199
2198
|
/** Data element ID "MAK". This is the mailing address of the individual carrier. This information is utilized by the base jurisdiction to send information to the carrier that purchased the IRP credentials. */
|
|
2200
2199
|
get streetAddress() {
|
|
2201
|
-
return this.document.fields.find(f => f.type.name
|
|
2200
|
+
return this.document.fields.find(f => f.type.name === 'StreetAddress');
|
|
2202
2201
|
}
|
|
2203
2202
|
|
|
2204
2203
|
/** Data element ID "MAN". A unique identifier assigned to the carrier responsible for safety issued by the U.S. Department of Transportation – Federal Motor Carrier Safety Administration. */
|
|
2205
2204
|
get usdotNumber() {
|
|
2206
|
-
return this.document.fields.find(f => f.type.name
|
|
2205
|
+
return this.document.fields.find(f => f.type.name === 'USDOTNumber');
|
|
2207
2206
|
}
|
|
2208
2207
|
|
|
2209
2208
|
/** Data element ID "MAO". The ZIP or Postal code of the resident address of the vehicle owner. */
|
|
2210
2209
|
get zip() {
|
|
2211
|
-
return this.document.fields.find(f => f.type.name
|
|
2210
|
+
return this.document.fields.find(f => f.type.name === 'Zip');
|
|
2212
2211
|
}
|
|
2213
2212
|
}
|
|
2214
2213
|
_AAMVA.MotorCarrierData = MotorCarrierData;
|
|
@@ -2217,108 +2216,108 @@ export class AAMVA {
|
|
|
2217
2216
|
return this._document;
|
|
2218
2217
|
}
|
|
2219
2218
|
constructor(document) {
|
|
2220
|
-
if (document.type.name
|
|
2219
|
+
if (document.type.name !== this.requiredDocumentType()) {
|
|
2221
2220
|
throw new Error(`Expected document type ${this.requiredDocumentType()}, got ${document.type.name}`);
|
|
2222
2221
|
}
|
|
2223
2222
|
this._document = document;
|
|
2224
2223
|
}
|
|
2225
2224
|
requiredDocumentType() {
|
|
2226
|
-
return
|
|
2225
|
+
return AAMVARegistrantAndVehicleDataDocumentType;
|
|
2227
2226
|
}
|
|
2228
2227
|
|
|
2229
2228
|
/** Data element ID "RBI". The first line of the registrant's residence address. */
|
|
2230
2229
|
get address() {
|
|
2231
|
-
return this.document.fields.find(f => f.type.name
|
|
2230
|
+
return this.document.fields.find(f => f.type.name === 'Address');
|
|
2232
2231
|
}
|
|
2233
2232
|
|
|
2234
2233
|
/** Data element ID "RAU". The declared base jurisdiction registration weight. */
|
|
2235
2234
|
get baseJurisdictionRegisteredWeight() {
|
|
2236
|
-
return this.document.fields.find(f => f.type.name
|
|
2235
|
+
return this.document.fields.find(f => f.type.name === 'BaseJurisdictionRegisteredWeight');
|
|
2237
2236
|
}
|
|
2238
2237
|
|
|
2239
2238
|
/** Data element ID "RBC". The name of the first registrant of a vehicle. Registrant's name may be a combined individual name or the name of a business */
|
|
2240
2239
|
get carrierNameRegistrant() {
|
|
2241
|
-
return this.document.fields.find(f => f.type.name
|
|
2240
|
+
return this.document.fields.find(f => f.type.name === 'CarrierNameRegistrant');
|
|
2242
2241
|
}
|
|
2243
2242
|
|
|
2244
2243
|
/** Data element ID "RBK". The registrant's residence city name. */
|
|
2245
2244
|
get city() {
|
|
2246
|
-
return this.document.fields.find(f => f.type.name
|
|
2245
|
+
return this.document.fields.find(f => f.type.name === 'City');
|
|
2247
2246
|
}
|
|
2248
2247
|
|
|
2249
2248
|
/** Data element ID "VAT". The unladen weight of the vehicle (e.g., single-unit truck, truck combination) plus the weight of the maximum load for which vehicle registration fees have been paid within a particular jurisdiction. */
|
|
2250
2249
|
get grossVehicleWeight() {
|
|
2251
|
-
return this.document.fields.find(f => f.type.name
|
|
2250
|
+
return this.document.fields.find(f => f.type.name === 'GrossVehicleWeight');
|
|
2252
2251
|
}
|
|
2253
2252
|
|
|
2254
2253
|
/** Data element ID "RBL". The state or province of the registrant's residence address. */
|
|
2255
2254
|
get jurisdiction() {
|
|
2256
|
-
return this.document.fields.find(f => f.type.name
|
|
2255
|
+
return this.document.fields.find(f => f.type.name === 'Jurisdiction');
|
|
2257
2256
|
}
|
|
2258
2257
|
|
|
2259
2258
|
/** Data element ID "VAL". The year which is assigned to a vehicle by the manufacturer. The format is YY. */
|
|
2260
2259
|
get modelYear() {
|
|
2261
|
-
return this.document.fields.find(f => f.type.name
|
|
2260
|
+
return this.document.fields.find(f => f.type.name === 'ModelYear');
|
|
2262
2261
|
}
|
|
2263
2262
|
|
|
2264
2263
|
/** Data element IDs "RAP", "VBC". The seat capacity of a commercial vehicle designed for transportation of more than then passengers. The number of common axles of rotation of one or more wheels of a vehicle, whether power design or freely rotating. */
|
|
2265
2264
|
get numberOfSeats() {
|
|
2266
|
-
return this.document.fields.find(f => f.type.name
|
|
2265
|
+
return this.document.fields.find(f => f.type.name === 'NumberOfSeats');
|
|
2267
2266
|
}
|
|
2268
2267
|
|
|
2269
2268
|
/** Data element ID "RAD". The number assigned to the registration decal in those jurisdictions that issue decals. */
|
|
2270
2269
|
get registrationDecalNumber() {
|
|
2271
|
-
return this.document.fields.find(f => f.type.name
|
|
2270
|
+
return this.document.fields.find(f => f.type.name === 'RegistrationDecalNumber');
|
|
2272
2271
|
}
|
|
2273
2272
|
|
|
2274
2273
|
/** Data element ID "RAF". The registration enforcement date is the date that the current registration was enforced. This may or may not be the original registration date. The format is ISO8601 with delimiters */
|
|
2275
2274
|
get registrationEnforcementDate() {
|
|
2276
|
-
return this.document.fields.find(f => f.type.name
|
|
2275
|
+
return this.document.fields.find(f => f.type.name === 'RegistrationEnforcementDate');
|
|
2277
2276
|
}
|
|
2278
2277
|
|
|
2279
2278
|
/** Data element ID "RAG". The date in which the registration expired. The format is ISO8601 with delimiters. */
|
|
2280
2279
|
get registrationExpirationDate() {
|
|
2281
|
-
return this.document.fields.find(f => f.type.name
|
|
2280
|
+
return this.document.fields.find(f => f.type.name === 'RegistrationExpirationDate');
|
|
2282
2281
|
}
|
|
2283
2282
|
|
|
2284
2283
|
/** Data element ID "IFJ". The date in which the registration was issued. The format is ISO8601 with delimiters. */
|
|
2285
2284
|
get registrationIssueDate() {
|
|
2286
|
-
return this.document.fields.find(f => f.type.name
|
|
2285
|
+
return this.document.fields.find(f => f.type.name === 'RegistrationIssueDate');
|
|
2287
2286
|
}
|
|
2288
2287
|
|
|
2289
2288
|
/** Data element ID "RAM". The characters assigned to a registration plate or tag affixed to the vehicle, assigned by the jurisdiction. */
|
|
2290
2289
|
get registrationPlateNumber() {
|
|
2291
|
-
return this.document.fields.find(f => f.type.name
|
|
2290
|
+
return this.document.fields.find(f => f.type.name === 'RegistrationPlateNumber');
|
|
2292
2291
|
}
|
|
2293
2292
|
|
|
2294
2293
|
/** Data element ID "RBT". This field is the registration year assigned by the jurisdiction. The format is CCYY. */
|
|
2295
2294
|
get registrationYear() {
|
|
2296
|
-
return this.document.fields.find(f => f.type.name
|
|
2295
|
+
return this.document.fields.find(f => f.type.name === 'RegistrationYear');
|
|
2297
2296
|
}
|
|
2298
2297
|
|
|
2299
2298
|
/** Data element ID "VBB". The type of vehicle operated for the transportation of persons or property in the furtherance of any commercial or industrial enterprise, for hire or not for hire. Not all states will use all values. */
|
|
2300
2299
|
get typeOfVehicle() {
|
|
2301
|
-
return this.document.fields.find(f => f.type.name
|
|
2300
|
+
return this.document.fields.find(f => f.type.name === 'TypeOfVehicle');
|
|
2302
2301
|
}
|
|
2303
2302
|
|
|
2304
2303
|
/** Data element ID "IEG". A number, assigned by the registrant of the commercial vehicle or trailer, to identify the vehicle or trailer in the fleet. No two units in a fleet can have the same number. A.K.A vehicle unit number or owner's equipment number. */
|
|
2305
2304
|
get unitNumber() {
|
|
2306
|
-
return this.document.fields.find(f => f.type.name
|
|
2305
|
+
return this.document.fields.find(f => f.type.name === 'UnitNumber');
|
|
2307
2306
|
}
|
|
2308
2307
|
|
|
2309
2308
|
/** Data element ID "VAD". A unique combination of alphanumeric characters that identifies a specific vehicle or component. The VIN is affixed to the vehicle in specific locations and formulated by the manufacturer. State agencies under some controlled instances may assign a VIN to a vehicle. */
|
|
2310
2309
|
get vehicleIdentificationNumber() {
|
|
2311
|
-
return this.document.fields.find(f => f.type.name
|
|
2310
|
+
return this.document.fields.find(f => f.type.name === 'VehicleIdentificationNumber');
|
|
2312
2311
|
}
|
|
2313
2312
|
|
|
2314
2313
|
/** Data element ID "VAK". The distinctive (coded) name applied to a group of vehicles by a manufacturer. */
|
|
2315
2314
|
get vehicleMake() {
|
|
2316
|
-
return this.document.fields.find(f => f.type.name
|
|
2315
|
+
return this.document.fields.find(f => f.type.name === 'VehicleMake');
|
|
2317
2316
|
}
|
|
2318
2317
|
|
|
2319
2318
|
/** Data element ID "RBM". The ZIP or Postal code of the resident address of the registrant. */
|
|
2320
2319
|
get zipCode() {
|
|
2321
|
-
return this.document.fields.find(f => f.type.name
|
|
2320
|
+
return this.document.fields.find(f => f.type.name === 'ZipCode');
|
|
2322
2321
|
}
|
|
2323
2322
|
}
|
|
2324
2323
|
_AAMVA.RegistrantAndVehicleData = RegistrantAndVehicleData;
|
|
@@ -2327,123 +2326,123 @@ export class AAMVA {
|
|
|
2327
2326
|
return this._document;
|
|
2328
2327
|
}
|
|
2329
2328
|
constructor(document) {
|
|
2330
|
-
if (document.type.name
|
|
2329
|
+
if (document.type.name !== this.requiredDocumentType()) {
|
|
2331
2330
|
throw new Error(`Expected document type ${this.requiredDocumentType()}, got ${document.type.name}`);
|
|
2332
2331
|
}
|
|
2333
2332
|
this._document = document;
|
|
2334
2333
|
}
|
|
2335
2334
|
requiredDocumentType() {
|
|
2336
|
-
return
|
|
2335
|
+
return AAMVAVehicleOwnerDataDocumentType;
|
|
2337
2336
|
}
|
|
2338
2337
|
|
|
2339
2338
|
/** Data element ID "NAX". The unique customer number/ID of the first vehicle owner. */
|
|
2340
2339
|
get firstOwnerIdNumber() {
|
|
2341
|
-
return this.document.fields.find(f => f.type.name
|
|
2340
|
+
return this.document.fields.find(f => f.type.name === 'FirstOwnerIdNumber');
|
|
2342
2341
|
}
|
|
2343
2342
|
|
|
2344
2343
|
/** Data element ID "NAB". Last Name or Surname of the Owner. Hyphenated names acceptable, spaces between names acceptable, but no other use of special symbols. */
|
|
2345
2344
|
get firstOwnerLastName() {
|
|
2346
|
-
return this.document.fields.find(f => f.type.name
|
|
2345
|
+
return this.document.fields.find(f => f.type.name === 'FirstOwnerLastName');
|
|
2347
2346
|
}
|
|
2348
2347
|
|
|
2349
2348
|
/** Data element ID "NBA". The legal status of the first vehicle owner. This is only used when a vehicle has multiple owners. A legal status may be ("AND", "OR"). */
|
|
2350
2349
|
get firstOwnerLegalStatus() {
|
|
2351
|
-
return this.document.fields.find(f => f.type.name
|
|
2350
|
+
return this.document.fields.find(f => f.type.name === 'FirstOwnerLegalStatus');
|
|
2352
2351
|
}
|
|
2353
2352
|
|
|
2354
2353
|
/** Data element ID "NAD". Middle Name(s) or Initial(s) of the Owner. Hyphenated names acceptable, spaces, between names acceptable, but no other use of special symbols. */
|
|
2355
2354
|
get firstOwnerMiddleName() {
|
|
2356
|
-
return this.document.fields.find(f => f.type.name
|
|
2355
|
+
return this.document.fields.find(f => f.type.name === 'FirstOwnerMiddleName');
|
|
2357
2356
|
}
|
|
2358
2357
|
|
|
2359
2358
|
/** Data element ID "NAC". First Name or Given Name of the Owner. Hyphenated names acceptable, but no other use of special symbols. */
|
|
2360
2359
|
get firstOwnerName() {
|
|
2361
|
-
return this.document.fields.find(f => f.type.name
|
|
2360
|
+
return this.document.fields.find(f => f.type.name === 'FirstOwnerName');
|
|
2362
2361
|
}
|
|
2363
2362
|
|
|
2364
2363
|
/** Data element ID "NAA". Name of the (or one of the) individual(s) who owns the Vehicle as defined in the ANSI D- 20 Data Element Dictionary. (Lastname@Firstname@MI@Suffix if any.) */
|
|
2365
2364
|
get firstOwnerTotalName() {
|
|
2366
|
-
return this.document.fields.find(f => f.type.name
|
|
2365
|
+
return this.document.fields.find(f => f.type.name === 'FirstOwnerTotalName');
|
|
2367
2366
|
}
|
|
2368
2367
|
|
|
2369
2368
|
/** Data element ID "NAR". Street address line 1. (Mailing) */
|
|
2370
2369
|
get mailingAddress1() {
|
|
2371
|
-
return this.document.fields.find(f => f.type.name
|
|
2370
|
+
return this.document.fields.find(f => f.type.name === 'MailingAddress1');
|
|
2372
2371
|
}
|
|
2373
2372
|
|
|
2374
2373
|
/** Data element ID "NAS". Street address line 2. (Mailing) */
|
|
2375
2374
|
get mailingAddress2() {
|
|
2376
|
-
return this.document.fields.find(f => f.type.name
|
|
2375
|
+
return this.document.fields.find(f => f.type.name === 'MailingAddress2');
|
|
2377
2376
|
}
|
|
2378
2377
|
|
|
2379
2378
|
/** Data element ID "NAT". Name of city for mailing address. */
|
|
2380
2379
|
get mailingCity() {
|
|
2381
|
-
return this.document.fields.find(f => f.type.name
|
|
2380
|
+
return this.document.fields.find(f => f.type.name === 'MailingCity');
|
|
2382
2381
|
}
|
|
2383
2382
|
|
|
2384
2383
|
/** Data element ID "NAU". Jurisdiction code for mailing address. Conforms to Canadian, Mexican and US jurisdictions as appropriate. Codes for provinces (Canada) and states (US and Mexico). */
|
|
2385
2384
|
get mailingJurisdictionCode() {
|
|
2386
|
-
return this.document.fields.find(f => f.type.name
|
|
2385
|
+
return this.document.fields.find(f => f.type.name === 'MailingJurisdictionCode');
|
|
2387
2386
|
}
|
|
2388
2387
|
|
|
2389
2388
|
/** Data element ID "NAV". The ZIP code or Postal code used for mailing. (As used by Canadian, Mexican and US jurisdictions.) */
|
|
2390
2389
|
get mailingZipCode() {
|
|
2391
|
-
return this.document.fields.find(f => f.type.name
|
|
2390
|
+
return this.document.fields.find(f => f.type.name === 'MailingZipCode');
|
|
2392
2391
|
}
|
|
2393
2392
|
|
|
2394
2393
|
/** Data element ID "NAM". Street address line 1. (Mailing) */
|
|
2395
2394
|
get residenceAddress1() {
|
|
2396
|
-
return this.document.fields.find(f => f.type.name
|
|
2395
|
+
return this.document.fields.find(f => f.type.name === 'ResidenceAddress1');
|
|
2397
2396
|
}
|
|
2398
2397
|
|
|
2399
2398
|
/** Data element ID "NAN". Street address line 2. (Mailing) */
|
|
2400
2399
|
get residenceAddress2() {
|
|
2401
|
-
return this.document.fields.find(f => f.type.name
|
|
2400
|
+
return this.document.fields.find(f => f.type.name === 'ResidenceAddress2');
|
|
2402
2401
|
}
|
|
2403
2402
|
|
|
2404
2403
|
/** Data element ID "NAO". Name of city for mailing address. */
|
|
2405
2404
|
get residenceCity() {
|
|
2406
|
-
return this.document.fields.find(f => f.type.name
|
|
2405
|
+
return this.document.fields.find(f => f.type.name === 'ResidenceCity');
|
|
2407
2406
|
}
|
|
2408
2407
|
|
|
2409
2408
|
/** Data element ID "NAP". Jurisdiction code for mailing address. Conforms to Canadian, Mexican and US jurisdictions as appropriate. Codes for provinces (Canada) and states (US and Mexico). */
|
|
2410
2409
|
get residenceJurisdictionCode() {
|
|
2411
|
-
return this.document.fields.find(f => f.type.name
|
|
2410
|
+
return this.document.fields.find(f => f.type.name === 'ResidenceJurisdictionCode');
|
|
2412
2411
|
}
|
|
2413
2412
|
|
|
2414
2413
|
/** Data element ID "NAQ". The ZIP code or Postal code used for mailing. (As used by Canadian, Mexican and US jurisdictions). */
|
|
2415
2414
|
get residenceZipCode() {
|
|
2416
|
-
return this.document.fields.find(f => f.type.name
|
|
2415
|
+
return this.document.fields.find(f => f.type.name === 'ResidenceZipCode');
|
|
2417
2416
|
}
|
|
2418
2417
|
|
|
2419
2418
|
/** Data element ID "NAY". The unique customer number/ID of the second vehicle owner. */
|
|
2420
2419
|
get secondOwnerIdNumber() {
|
|
2421
|
-
return this.document.fields.find(f => f.type.name
|
|
2420
|
+
return this.document.fields.find(f => f.type.name === 'SecondOwnerIdNumber');
|
|
2422
2421
|
}
|
|
2423
2422
|
|
|
2424
2423
|
/** Data element ID "NAF". Last Name or Surname of the Owner. Hyphenated names acceptable, spaces between names acceptable, but no other use of special symbols. */
|
|
2425
2424
|
get secondOwnerLastName() {
|
|
2426
|
-
return this.document.fields.find(f => f.type.name
|
|
2425
|
+
return this.document.fields.find(f => f.type.name === 'SecondOwnerLastName');
|
|
2427
2426
|
}
|
|
2428
2427
|
|
|
2429
2428
|
/** Data element ID "NBB". The legal status of the second vehicle owner. This is only used when a vehicle has multiple owners. A legal status may be ("AND", "OR"). */
|
|
2430
2429
|
get secondOwnerLegalStatus() {
|
|
2431
|
-
return this.document.fields.find(f => f.type.name
|
|
2430
|
+
return this.document.fields.find(f => f.type.name === 'SecondOwnerLegalStatus');
|
|
2432
2431
|
}
|
|
2433
2432
|
|
|
2434
2433
|
/** Data element ID "NAH". Middle Name(s) or Initial(s) of the Owner. Hyphenated names acceptable, spaces between names acceptable, but no other use of special symbols. */
|
|
2435
2434
|
get secondOwnerMiddleName() {
|
|
2436
|
-
return this.document.fields.find(f => f.type.name
|
|
2435
|
+
return this.document.fields.find(f => f.type.name === 'SecondOwnerMiddleName');
|
|
2437
2436
|
}
|
|
2438
2437
|
|
|
2439
2438
|
/** Data element ID "NAG". First Name or Given Name of the Owner. Hyphenated names acceptable, but no other use of special symbols. */
|
|
2440
2439
|
get secondOwnerName() {
|
|
2441
|
-
return this.document.fields.find(f => f.type.name
|
|
2440
|
+
return this.document.fields.find(f => f.type.name === 'SecondOwnerName');
|
|
2442
2441
|
}
|
|
2443
2442
|
|
|
2444
2443
|
/** Data element ID "NAE". Name of the (or one of the) individual(s) who owns the Vehicle as defined in the ANSI D- 20 Data Element Dictionary. (Lastname@Firstname@MI@Suffix if any.) */
|
|
2445
2444
|
get secondOwnerTotalName() {
|
|
2446
|
-
return this.document.fields.find(f => f.type.name
|
|
2445
|
+
return this.document.fields.find(f => f.type.name === 'SecondOwnerTotalName');
|
|
2447
2446
|
}
|
|
2448
2447
|
}
|
|
2449
2448
|
_AAMVA.VehicleOwnerData = VehicleOwnerData;
|
|
@@ -2452,158 +2451,158 @@ export class AAMVA {
|
|
|
2452
2451
|
return this._document;
|
|
2453
2452
|
}
|
|
2454
2453
|
constructor(document) {
|
|
2455
|
-
if (document.type.name
|
|
2454
|
+
if (document.type.name !== this.requiredDocumentType()) {
|
|
2456
2455
|
throw new Error(`Expected document type ${this.requiredDocumentType()}, got ${document.type.name}`);
|
|
2457
2456
|
}
|
|
2458
2457
|
this._document = document;
|
|
2459
2458
|
}
|
|
2460
2459
|
requiredDocumentType() {
|
|
2461
|
-
return
|
|
2460
|
+
return AAMVAVehicleDataDocumentType;
|
|
2462
2461
|
}
|
|
2463
2462
|
|
|
2464
2463
|
/** Data element ID "VAO". Vehicle manufacture body style. */
|
|
2465
2464
|
get bodyStyle() {
|
|
2466
|
-
return this.document.fields.find(f => f.type.name
|
|
2465
|
+
return this.document.fields.find(f => f.type.name === 'BodyStyle');
|
|
2467
2466
|
}
|
|
2468
2467
|
|
|
2469
2468
|
/** Data element ID "VAG". Date vehicle reported junked. The format is ISO8601 with delimiters. */
|
|
2470
2469
|
get dateJunked() {
|
|
2471
|
-
return this.document.fields.find(f => f.type.name
|
|
2470
|
+
return this.document.fields.find(f => f.type.name === 'DateJunked');
|
|
2472
2471
|
}
|
|
2473
2472
|
|
|
2474
2473
|
/** Data element ID "VAJ". Date vehicle reported recovered. The format is ISO8601 with delimiters. */
|
|
2475
2474
|
get dateRecovered() {
|
|
2476
|
-
return this.document.fields.find(f => f.type.name
|
|
2475
|
+
return this.document.fields.find(f => f.type.name === 'DateRecovered');
|
|
2477
2476
|
}
|
|
2478
2477
|
|
|
2479
2478
|
/** Data element ID "VAI". Date vehicle reported stolen. The format is ISO8601 with delimiters. */
|
|
2480
2479
|
get dateStolen() {
|
|
2481
|
-
return this.document.fields.find(f => f.type.name
|
|
2480
|
+
return this.document.fields.find(f => f.type.name === 'DateStolen');
|
|
2482
2481
|
}
|
|
2483
2482
|
|
|
2484
2483
|
/** Data element ID "VAW". Manufacturer's rated engine displacement. */
|
|
2485
2484
|
get engineDisplacement() {
|
|
2486
|
-
return this.document.fields.find(f => f.type.name
|
|
2485
|
+
return this.document.fields.find(f => f.type.name === 'EngineDisplacement');
|
|
2487
2486
|
}
|
|
2488
2487
|
|
|
2489
2488
|
/** Data element ID "VAR". The size of a vehicle's engine. */
|
|
2490
2489
|
get engineSize() {
|
|
2491
|
-
return this.document.fields.find(f => f.type.name
|
|
2490
|
+
return this.document.fields.find(f => f.type.name === 'EngineSize');
|
|
2492
2491
|
}
|
|
2493
2492
|
|
|
2494
2493
|
/** Data element ID "VAN". Type of fuel the vehicle utilizes. */
|
|
2495
2494
|
get fuelType() {
|
|
2496
|
-
return this.document.fields.find(f => f.type.name
|
|
2495
|
+
return this.document.fields.find(f => f.type.name === 'FuelType');
|
|
2497
2496
|
}
|
|
2498
2497
|
|
|
2499
2498
|
/** Data element ID "VAU". Manufacturer's rated horsepower. */
|
|
2500
2499
|
get horsepower() {
|
|
2501
|
-
return this.document.fields.find(f => f.type.name
|
|
2500
|
+
return this.document.fields.find(f => f.type.name === 'Horsepower');
|
|
2502
2501
|
}
|
|
2503
2502
|
|
|
2504
2503
|
/** Data element ID "VAY". International fuel tax indicator */
|
|
2505
2504
|
get iftaIndicator() {
|
|
2506
|
-
return this.document.fields.find(f => f.type.name
|
|
2505
|
+
return this.document.fields.find(f => f.type.name === 'IFTAIndicator');
|
|
2507
2506
|
}
|
|
2508
2507
|
|
|
2509
2508
|
/** Data element ID "VAX". International registration plan indicator. */
|
|
2510
2509
|
get irpIndicator() {
|
|
2511
|
-
return this.document.fields.find(f => f.type.name
|
|
2510
|
+
return this.document.fields.find(f => f.type.name === 'IRPIndicator');
|
|
2512
2511
|
}
|
|
2513
2512
|
|
|
2514
2513
|
/** Data element ID "VAF". Vehicle has been junked. */
|
|
2515
2514
|
get junkedIndicator() {
|
|
2516
|
-
return this.document.fields.find(f => f.type.name
|
|
2515
|
+
return this.document.fields.find(f => f.type.name === 'JunkedIndicator');
|
|
2517
2516
|
}
|
|
2518
2517
|
|
|
2519
2518
|
/** Data element ID "VAE". Manufacturer's Suggested Retail Price. No decimal places. Right Justified Zero or space fill. */
|
|
2520
2519
|
get msrp() {
|
|
2521
|
-
return this.document.fields.find(f => f.type.name
|
|
2520
|
+
return this.document.fields.find(f => f.type.name === 'MSRP');
|
|
2522
2521
|
}
|
|
2523
2522
|
|
|
2524
2523
|
/** Data element ID "VAA". State to provide definition. */
|
|
2525
2524
|
get majorCode() {
|
|
2526
|
-
return this.document.fields.find(f => f.type.name
|
|
2525
|
+
return this.document.fields.find(f => f.type.name === 'MajorCode');
|
|
2527
2526
|
}
|
|
2528
2527
|
|
|
2529
2528
|
/** Data element ID "VAL". Vehicle manufacture year. */
|
|
2530
2529
|
get makeYear() {
|
|
2531
|
-
return this.document.fields.find(f => f.type.name
|
|
2530
|
+
return this.document.fields.find(f => f.type.name === 'MakeYear');
|
|
2532
2531
|
}
|
|
2533
2532
|
|
|
2534
2533
|
/** Data element ID "VAT". Manufacturer's gross vehicle weight rating. */
|
|
2535
2534
|
get manufactureGrossWeight() {
|
|
2536
|
-
return this.document.fields.find(f => f.type.name
|
|
2535
|
+
return this.document.fields.find(f => f.type.name === 'ManufactureGrossWeight');
|
|
2537
2536
|
}
|
|
2538
2537
|
|
|
2539
2538
|
/** Data element ID "VAB". State to provide definition. */
|
|
2540
2539
|
get minorCode() {
|
|
2541
|
-
return this.document.fields.find(f => f.type.name
|
|
2540
|
+
return this.document.fields.find(f => f.type.name === 'MinorCode');
|
|
2542
2541
|
}
|
|
2543
2542
|
|
|
2544
2543
|
/** Data element ID "VBC". Number of axles the vehicle has. */
|
|
2545
2544
|
get numberOfAxles() {
|
|
2546
|
-
return this.document.fields.find(f => f.type.name
|
|
2545
|
+
return this.document.fields.find(f => f.type.name === 'NumberOfAxles');
|
|
2547
2546
|
}
|
|
2548
2547
|
|
|
2549
2548
|
/** Data element ID "VAQ". Number of cylinders the vehicle has. */
|
|
2550
2549
|
get numberOfCylinders() {
|
|
2551
|
-
return this.document.fields.find(f => f.type.name
|
|
2550
|
+
return this.document.fields.find(f => f.type.name === 'NumberOfCylinders');
|
|
2552
2551
|
}
|
|
2553
2552
|
|
|
2554
2553
|
/** Data element ID "VAP". Number of doors on the vehicle. */
|
|
2555
2554
|
get numberOfDoors() {
|
|
2556
|
-
return this.document.fields.find(f => f.type.name
|
|
2555
|
+
return this.document.fields.find(f => f.type.name === 'NumberOfDoors');
|
|
2557
2556
|
}
|
|
2558
2557
|
|
|
2559
2558
|
/** Data element ID "VAH". Indicates stolen vehicle. */
|
|
2560
2559
|
get stolenIndicator() {
|
|
2561
|
-
return this.document.fields.find(f => f.type.name
|
|
2560
|
+
return this.document.fields.find(f => f.type.name === 'StolenIndicator');
|
|
2562
2561
|
}
|
|
2563
2562
|
|
|
2564
2563
|
/** Data element ID "VAC". Type of transmission the vehicle carries. */
|
|
2565
2564
|
get transmissionCode() {
|
|
2566
|
-
return this.document.fields.find(f => f.type.name
|
|
2565
|
+
return this.document.fields.find(f => f.type.name === 'TransmissionCode');
|
|
2567
2566
|
}
|
|
2568
2567
|
|
|
2569
2568
|
/** Data element ID "VAV". Gross weight of the vehicle unloaded. */
|
|
2570
2569
|
get unladenWeight() {
|
|
2571
|
-
return this.document.fields.find(f => f.type.name
|
|
2570
|
+
return this.document.fields.find(f => f.type.name === 'UnladenWeight');
|
|
2572
2571
|
}
|
|
2573
2572
|
|
|
2574
2573
|
/** Data element ID "VAZ". Vehicle license tax calculation from date of purchase. */
|
|
2575
2574
|
get vltClacFromDate() {
|
|
2576
|
-
return this.document.fields.find(f => f.type.name
|
|
2575
|
+
return this.document.fields.find(f => f.type.name === 'VLTClacFromDate');
|
|
2577
2576
|
}
|
|
2578
2577
|
|
|
2579
2578
|
/** Data element ID "VBA". Unique number to identify the vehicle record. */
|
|
2580
2579
|
get vehicleIdNumber() {
|
|
2581
|
-
return this.document.fields.find(f => f.type.name
|
|
2580
|
+
return this.document.fields.find(f => f.type.name === 'VehicleIdNumber');
|
|
2582
2581
|
}
|
|
2583
2582
|
|
|
2584
2583
|
/** Data element ID "VAD". A unique combination of alphanumeric characters that identifies a specific vehicle or component. The VIN is affixed to the vehicle in specific locations and formulated by the manufacturer. State agencies under some controlled instances may assign a VIN to a vehicle. */
|
|
2585
2584
|
get vehicleIdentificationNumber() {
|
|
2586
|
-
return this.document.fields.find(f => f.type.name
|
|
2585
|
+
return this.document.fields.find(f => f.type.name === 'VehicleIdentificationNumber');
|
|
2587
2586
|
}
|
|
2588
2587
|
|
|
2589
2588
|
/** Data element ID "VAK". The distinctive (coded) name applied to a group of vehicles by a manufacturer. */
|
|
2590
2589
|
get vehicleMake() {
|
|
2591
|
-
return this.document.fields.find(f => f.type.name
|
|
2590
|
+
return this.document.fields.find(f => f.type.name === 'VehicleMake');
|
|
2592
2591
|
}
|
|
2593
2592
|
|
|
2594
2593
|
/** Data element ID "VAM". Vehicle manufacture model. */
|
|
2595
2594
|
get vehicleModel() {
|
|
2596
|
-
return this.document.fields.find(f => f.type.name
|
|
2595
|
+
return this.document.fields.find(f => f.type.name === 'VehicleModel');
|
|
2597
2596
|
}
|
|
2598
2597
|
|
|
2599
2598
|
/** Data element ID "VAS". This is the status of the vehicle (e.g., active, suspend, etc.) */
|
|
2600
2599
|
get vehicleStatusCode() {
|
|
2601
|
-
return this.document.fields.find(f => f.type.name
|
|
2600
|
+
return this.document.fields.find(f => f.type.name === 'VehicleStatusCode');
|
|
2602
2601
|
}
|
|
2603
2602
|
|
|
2604
2603
|
/** Data element ID "VBB". EPA vehicle classification. */
|
|
2605
2604
|
get vehicleTypeCode() {
|
|
2606
|
-
return this.document.fields.find(f => f.type.name
|
|
2605
|
+
return this.document.fields.find(f => f.type.name === 'VehicleTypeCode');
|
|
2607
2606
|
}
|
|
2608
2607
|
}
|
|
2609
2608
|
_AAMVA.VehicleData = VehicleData;
|
|
@@ -2612,73 +2611,73 @@ export class AAMVA {
|
|
|
2612
2611
|
return this._document;
|
|
2613
2612
|
}
|
|
2614
2613
|
constructor(document) {
|
|
2615
|
-
if (document.type.name
|
|
2614
|
+
if (document.type.name !== this.requiredDocumentType()) {
|
|
2616
2615
|
throw new Error(`Expected document type ${this.requiredDocumentType()}, got ${document.type.name}`);
|
|
2617
2616
|
}
|
|
2618
2617
|
this._document = document;
|
|
2619
2618
|
}
|
|
2620
2619
|
requiredDocumentType() {
|
|
2621
|
-
return
|
|
2620
|
+
return AAMVAVehicleSafetyInspectionDataDocumentType;
|
|
2622
2621
|
}
|
|
2623
2622
|
|
|
2624
2623
|
/** Data element ID "IAN". The street name and number, city, state and zip code of the inspection facility. */
|
|
2625
2624
|
get inspectionAddress() {
|
|
2626
|
-
return this.document.fields.find(f => f.type.name
|
|
2625
|
+
return this.document.fields.find(f => f.type.name === 'InspectionAddress');
|
|
2627
2626
|
}
|
|
2628
2627
|
|
|
2629
2628
|
/** Data element ID "IPD". Identifies whether the pollution control devices meet the minimum inspection criteria. */
|
|
2630
2629
|
get inspectionAirPollutionDeviceConditions() {
|
|
2631
|
-
return this.document.fields.find(f => f.type.name
|
|
2630
|
+
return this.document.fields.find(f => f.type.name === 'InspectionAirPollutionDeviceConditions');
|
|
2632
2631
|
}
|
|
2633
2632
|
|
|
2634
2633
|
/** Data element ID "IFI". The unique number assigned to an inspection facility. */
|
|
2635
2634
|
get inspectionFacilityIdentifier() {
|
|
2636
|
-
return this.document.fields.find(f => f.type.name
|
|
2635
|
+
return this.document.fields.find(f => f.type.name === 'InspectionFacilityIdentifier');
|
|
2637
2636
|
}
|
|
2638
2637
|
|
|
2639
2638
|
/** Data element ID "INC". A unique number assigned to a current vehicle inspection form for identification purposes or a preprinted unique number on the motor vehicle inspection sticker currently issued to a motor vehicle which has passed inspection. */
|
|
2640
2639
|
get inspectionFormOrStickerNumberCurrent() {
|
|
2641
|
-
return this.document.fields.find(f => f.type.name
|
|
2640
|
+
return this.document.fields.find(f => f.type.name === 'InspectionFormOrStickerNumberCurrent');
|
|
2642
2641
|
}
|
|
2643
2642
|
|
|
2644
2643
|
/** Data element ID "INP". The number of the last inspection form excluding the current inspection or the certification number of the last inspection sticker, excluding the current inspection. */
|
|
2645
2644
|
get inspectionFormOrStickerNumberPrevious() {
|
|
2646
|
-
return this.document.fields.find(f => f.type.name
|
|
2645
|
+
return this.document.fields.find(f => f.type.name === 'InspectionFormOrStickerNumberPrevious');
|
|
2647
2646
|
}
|
|
2648
2647
|
|
|
2649
2648
|
/** Data element ID "ISC". An indicator that specifies whether or not the vehicle has a current smog certificate. */
|
|
2650
2649
|
get inspectionSmogCertificateIndicator() {
|
|
2651
|
-
return this.document.fields.find(f => f.type.name
|
|
2650
|
+
return this.document.fields.find(f => f.type.name === 'InspectionSmogCertificateIndicator');
|
|
2652
2651
|
}
|
|
2653
2652
|
|
|
2654
2653
|
/** Data element ID "ISN". Station number performing the inspection. */
|
|
2655
2654
|
get inspectionStationNumber() {
|
|
2656
|
-
return this.document.fields.find(f => f.type.name
|
|
2655
|
+
return this.document.fields.find(f => f.type.name === 'InspectionStationNumber');
|
|
2657
2656
|
}
|
|
2658
2657
|
|
|
2659
2658
|
/** Data element ID "IIN". A unique number assigned to each licensed vehicle inspector. */
|
|
2660
2659
|
get inspectorIdentificationNumber() {
|
|
2661
|
-
return this.document.fields.find(f => f.type.name
|
|
2660
|
+
return this.document.fields.find(f => f.type.name === 'InspectorIdentificationNumber');
|
|
2662
2661
|
}
|
|
2663
2662
|
|
|
2664
2663
|
/** Data element ID "ORI". The vehicle's odometer reading (to the nearest mile or kilometer) at the time of inspection. */
|
|
2665
2664
|
get odometerReadingAtInspection() {
|
|
2666
|
-
return this.document.fields.find(f => f.type.name
|
|
2665
|
+
return this.document.fields.find(f => f.type.name === 'OdometerReadingAtInspection');
|
|
2667
2666
|
}
|
|
2668
2667
|
|
|
2669
2668
|
/** Data element ID "VAO". The general configuration or shape of a vehicle distinguished by characteristics such as number of doors, seats, windows, roofline, and type of top. The vehicle body type is 2- character alphanumeric. */
|
|
2670
2669
|
get vehicleBodyType() {
|
|
2671
|
-
return this.document.fields.find(f => f.type.name
|
|
2670
|
+
return this.document.fields.find(f => f.type.name === 'VehicleBodyType');
|
|
2672
2671
|
}
|
|
2673
2672
|
|
|
2674
2673
|
/** Data element ID "VAK". The distinctive (coded) name applied to a group of vehicles by a manufacturer. */
|
|
2675
2674
|
get vehicleMake() {
|
|
2676
|
-
return this.document.fields.find(f => f.type.name
|
|
2675
|
+
return this.document.fields.find(f => f.type.name === 'VehicleMake');
|
|
2677
2676
|
}
|
|
2678
2677
|
|
|
2679
2678
|
/** Data element ID "VAL". The year which is assigned to a vehicle by the manufacturer. The format is CCYY. */
|
|
2680
2679
|
get vehicleModelYear() {
|
|
2681
|
-
return this.document.fields.find(f => f.type.name
|
|
2680
|
+
return this.document.fields.find(f => f.type.name === 'VehicleModelYear');
|
|
2682
2681
|
}
|
|
2683
2682
|
}
|
|
2684
2683
|
_AAMVA.VehicleSafetyInspectionData = VehicleSafetyInspectionData;
|
|
@@ -2687,424 +2686,424 @@ export class AAMVA {
|
|
|
2687
2686
|
return this._document;
|
|
2688
2687
|
}
|
|
2689
2688
|
constructor(document) {
|
|
2690
|
-
if (document.type.name
|
|
2689
|
+
if (document.type.name !== this.requiredDocumentType()) {
|
|
2691
2690
|
throw new Error(`Expected document type ${this.requiredDocumentType()}, got ${document.type.name}`);
|
|
2692
2691
|
}
|
|
2693
2692
|
this._document = document;
|
|
2694
2693
|
}
|
|
2695
2694
|
/** Data element ID "DAI". City portion of the cardholder address. */
|
|
2696
2695
|
get addressCity() {
|
|
2697
|
-
return this.document.fields.find(f => f.type.name
|
|
2696
|
+
return this.document.fields.find(f => f.type.name === 'AddressCity');
|
|
2698
2697
|
}
|
|
2699
2698
|
|
|
2700
2699
|
/** Data element ID "DAJ". State portion of the cardholder address. */
|
|
2701
2700
|
get addressJurisdictionCode() {
|
|
2702
|
-
return this.document.fields.find(f => f.type.name
|
|
2701
|
+
return this.document.fields.find(f => f.type.name === 'AddressJurisdictionCode');
|
|
2703
2702
|
}
|
|
2704
2703
|
|
|
2705
2704
|
/** Data element ID "DAK". Postal code portion of the cardholder address in the U.S. and Canada. If the trailing portion of the postal code in the U.S. is not known, zeros will be used to fill the trailing set of numbers up to nine (9) digits. */
|
|
2706
2705
|
get addressPostalCode() {
|
|
2707
|
-
return this.document.fields.find(f => f.type.name
|
|
2706
|
+
return this.document.fields.find(f => f.type.name === 'AddressPostalCode');
|
|
2708
2707
|
}
|
|
2709
2708
|
|
|
2710
2709
|
/** Data element ID "DAG". Street portion of the cardholder address. */
|
|
2711
2710
|
get addressStreet1() {
|
|
2712
|
-
return this.document.fields.find(f => f.type.name
|
|
2711
|
+
return this.document.fields.find(f => f.type.name === 'AddressStreet1');
|
|
2713
2712
|
}
|
|
2714
2713
|
|
|
2715
2714
|
/** Data element ID "DAH". Second line of street portion of the cardholder address. */
|
|
2716
2715
|
get addressStreet2() {
|
|
2717
|
-
return this.document.fields.find(f => f.type.name
|
|
2716
|
+
return this.document.fields.find(f => f.type.name === 'AddressStreet2');
|
|
2718
2717
|
}
|
|
2719
2718
|
|
|
2720
2719
|
/** Data element ID "DCJ". A string of letters and/or numbers that identifies when, where, and by whom a driver license/ID card was made. If audit information is not used on the card or the MRT, it must be included in the driver record. */
|
|
2721
2720
|
get adultInformation() {
|
|
2722
|
-
return this.document.fields.find(f => f.type.name
|
|
2721
|
+
return this.document.fields.find(f => f.type.name === 'AdultInformation');
|
|
2723
2722
|
}
|
|
2724
2723
|
|
|
2725
2724
|
/** Data element ID "DBN". Other family name by which cardholder is known. */
|
|
2726
2725
|
get aliasFamilyName() {
|
|
2727
|
-
return this.document.fields.find(f => f.type.name
|
|
2726
|
+
return this.document.fields.find(f => f.type.name === 'AliasFamilyName');
|
|
2728
2727
|
}
|
|
2729
2728
|
|
|
2730
2729
|
/** Data element ID "DBG". Other given name by which cardholder is known. */
|
|
2731
2730
|
get aliasGivenName() {
|
|
2732
|
-
return this.document.fields.find(f => f.type.name
|
|
2731
|
+
return this.document.fields.find(f => f.type.name === 'AliasGivenName');
|
|
2733
2732
|
}
|
|
2734
2733
|
|
|
2735
2734
|
/** Data element ID "DBQ". Other middle name by which cardholder is known. */
|
|
2736
2735
|
get aliasMiddleName() {
|
|
2737
|
-
return this.document.fields.find(f => f.type.name
|
|
2736
|
+
return this.document.fields.find(f => f.type.name === 'AliasMiddleName');
|
|
2738
2737
|
}
|
|
2739
2738
|
|
|
2740
2739
|
/** Data element ID "DBR". Other prefix by which cardholder is known. */
|
|
2741
2740
|
get aliasPrefixName() {
|
|
2742
|
-
return this.document.fields.find(f => f.type.name
|
|
2741
|
+
return this.document.fields.find(f => f.type.name === 'AliasPrefixName');
|
|
2743
2742
|
}
|
|
2744
2743
|
|
|
2745
2744
|
/** Data element ID "DBS". Other suffix by which cardholder is known. */
|
|
2746
2745
|
get aliasSuffixName() {
|
|
2747
|
-
return this.document.fields.find(f => f.type.name
|
|
2746
|
+
return this.document.fields.find(f => f.type.name === 'AliasSuffixName');
|
|
2748
2747
|
}
|
|
2749
2748
|
|
|
2750
2749
|
/** Data element ID "DDB". DHS required field that indicates date of the most recent version change or modification to the visible format of the DL/ID. The format is ISO8601 with delimiters. */
|
|
2751
2750
|
get cardRevisionDate() {
|
|
2752
|
-
return this.document.fields.find(f => f.type.name
|
|
2751
|
+
return this.document.fields.find(f => f.type.name === 'CardRevisionDate');
|
|
2753
2752
|
}
|
|
2754
2753
|
|
|
2755
2754
|
/** Data element ID "DDA". DHS required field that indicates compliance: "F" = compliant; and, "N" = non-compliant. */
|
|
2756
2755
|
get complianceType() {
|
|
2757
|
-
return this.document.fields.find(f => f.type.name
|
|
2756
|
+
return this.document.fields.find(f => f.type.name === 'ComplianceType');
|
|
2758
2757
|
}
|
|
2759
2758
|
|
|
2760
2759
|
/** Data element ID "DCG". Country in which DL/ID is issued. U.S. = USA, Canada = CAN. */
|
|
2761
2760
|
get countryIdentification() {
|
|
2762
|
-
return this.document.fields.find(f => f.type.name
|
|
2761
|
+
return this.document.fields.find(f => f.type.name === 'CountryIdentification');
|
|
2763
2762
|
}
|
|
2764
2763
|
|
|
2765
2764
|
/** Data element ID "DCS". Family name of the cardholder. (Family name is sometimes also called “last name” or “surname.”) Collect full name for record, print as many characters as possible on portrait side of DL/ID. */
|
|
2766
2765
|
get customerFamilyName() {
|
|
2767
|
-
return this.document.fields.find(f => f.type.name
|
|
2766
|
+
return this.document.fields.find(f => f.type.name === 'CustomerFamilyName');
|
|
2768
2767
|
}
|
|
2769
2768
|
|
|
2770
2769
|
/** Data element ID "DAC". First name of the cardholder. */
|
|
2771
2770
|
get customerFirstName() {
|
|
2772
|
-
return this.document.fields.find(f => f.type.name
|
|
2771
|
+
return this.document.fields.find(f => f.type.name === 'CustomerFirstName');
|
|
2773
2772
|
}
|
|
2774
2773
|
|
|
2775
2774
|
/** Data element ID "DCT". Given names of the cardholder. (Given names include all names other than the Family Name. This includes all those names sometimes also called “first” and “middle” names.) */
|
|
2776
2775
|
get customerGivenNames() {
|
|
2777
|
-
return this.document.fields.find(f => f.type.name
|
|
2776
|
+
return this.document.fields.find(f => f.type.name === 'CustomerGivenNames');
|
|
2778
2777
|
}
|
|
2779
2778
|
|
|
2780
2779
|
/** Data element ID "DAQ". The number assigned or calculated by the issuing authority. */
|
|
2781
2780
|
get customerIdNumber() {
|
|
2782
|
-
return this.document.fields.find(f => f.type.name
|
|
2781
|
+
return this.document.fields.find(f => f.type.name === 'CustomerIdNumber');
|
|
2783
2782
|
}
|
|
2784
2783
|
|
|
2785
2784
|
/** Data element ID "DAD". Middle name(s) of the cardholder. In the case of multiple middle names they shall be separated by a comma “,”. */
|
|
2786
2785
|
get customerMiddleName() {
|
|
2787
|
-
return this.document.fields.find(f => f.type.name
|
|
2786
|
+
return this.document.fields.find(f => f.type.name === 'CustomerMiddleName');
|
|
2788
2787
|
}
|
|
2789
2788
|
|
|
2790
2789
|
/** Data element ID "DBB". Date on which the cardholder was born. The format is ISO8601 with delimiters. */
|
|
2791
2790
|
get dateOfBirth() {
|
|
2792
|
-
return this.document.fields.find(f => f.type.name
|
|
2791
|
+
return this.document.fields.find(f => f.type.name === 'DateOfBirth');
|
|
2793
2792
|
}
|
|
2794
2793
|
|
|
2795
2794
|
/** Data element ID "DCF". Number must uniquely identify a particular document issued to that customer from others that may have been issued in the past. This number may serve multiple purposes of document discrimination, audit information number, and/or inventory control. */
|
|
2796
2795
|
get documentDiscriminator() {
|
|
2797
|
-
return this.document.fields.find(f => f.type.name
|
|
2796
|
+
return this.document.fields.find(f => f.type.name === 'DocumentDiscriminator');
|
|
2798
2797
|
}
|
|
2799
2798
|
|
|
2800
2799
|
/** Data element ID "DBA". Date on which the driving and identification privileges granted by the document are no longer valid. The format is ISO8601 with delimtiers. */
|
|
2801
2800
|
get documentExpirationDate() {
|
|
2802
|
-
return this.document.fields.find(f => f.type.name
|
|
2801
|
+
return this.document.fields.find(f => f.type.name === 'DocumentExpirationDate');
|
|
2803
2802
|
}
|
|
2804
2803
|
|
|
2805
2804
|
/** Data element ID "DBD". Date on which the document was issued. The format is ISO8601 with delimiters. */
|
|
2806
2805
|
get documentIssueDate() {
|
|
2807
|
-
return this.document.fields.find(f => f.type.name
|
|
2806
|
+
return this.document.fields.find(f => f.type.name === 'DocumentIssueDate');
|
|
2808
2807
|
}
|
|
2809
2808
|
|
|
2810
2809
|
/** Data element ID "DBL". Alternative dates given as date of birth. */
|
|
2811
2810
|
get driverAliasDateOfBirthField() {
|
|
2812
|
-
return this.document.fields.find(f => f.type.name
|
|
2811
|
+
return this.document.fields.find(f => f.type.name === 'DriverAliasDateOfBirthField');
|
|
2813
2812
|
}
|
|
2814
2813
|
|
|
2815
2814
|
/** Data element ID "DBP". Alternative fist name or given name of the individual holding the Driver License or ID. Hyphenated names acceptable, but no other use of special symbols. */
|
|
2816
2815
|
get driverAliasFirstName() {
|
|
2817
|
-
return this.document.fields.find(f => f.type.name
|
|
2816
|
+
return this.document.fields.find(f => f.type.name === 'DriverAliasFirstName');
|
|
2818
2817
|
}
|
|
2819
2818
|
|
|
2820
2819
|
/** Data element ID "DBO". Alternative last name or surname of the individual holding the Driver License or ID. Hyphenated names acceptable, but no other use of special symbols. */
|
|
2821
2820
|
get driverAliasLastName() {
|
|
2822
|
-
return this.document.fields.find(f => f.type.name
|
|
2821
|
+
return this.document.fields.find(f => f.type.name === 'DriverAliasLastName');
|
|
2823
2822
|
}
|
|
2824
2823
|
|
|
2825
2824
|
/** Data element ID "DBM". DriverAliasSocialSecurityNumber */
|
|
2826
2825
|
get driverAliasSocialSecurityNumber() {
|
|
2827
|
-
return this.document.fields.find(f => f.type.name
|
|
2826
|
+
return this.document.fields.find(f => f.type.name === 'DriverAliasSocialSecurityNumber');
|
|
2828
2827
|
}
|
|
2829
2828
|
|
|
2830
2829
|
/** Data element ID "DAB". Last name or surname of the individual holding the Driver License or ID. Hyphenated names acceptable, but no other use of special symbols. */
|
|
2831
2830
|
get driverLastName() {
|
|
2832
|
-
return this.document.fields.find(f => f.type.name
|
|
2831
|
+
return this.document.fields.find(f => f.type.name === 'DriverLastName');
|
|
2833
2832
|
}
|
|
2834
2833
|
|
|
2835
2834
|
/** Data element ID "DAR". A=Class A; B=Class B; C=Class C (Class A, B and C are defined by Federal Highway regulations); M=Class M motorcycle as defined by AAMVA; others are defined by DL Classification Code Standards. */
|
|
2836
2835
|
get driverLicenseClassificationCode() {
|
|
2837
|
-
return this.document.fields.find(f => f.type.name
|
|
2836
|
+
return this.document.fields.find(f => f.type.name === 'DriverLicenseClassificationCode');
|
|
2838
2837
|
}
|
|
2839
2838
|
|
|
2840
2839
|
/** Data element ID "DAT". Any endorsements on a driver license which authorize the operation of specified types of vehicles or the operation of vehicles carrying specified loads. Endorsements shall be specific to classification of a driver license. */
|
|
2841
2840
|
get driverLicenseEndorsementsCode() {
|
|
2842
|
-
return this.document.fields.find(f => f.type.name
|
|
2841
|
+
return this.document.fields.find(f => f.type.name === 'DriverLicenseEndorsementsCode');
|
|
2843
2842
|
}
|
|
2844
2843
|
|
|
2845
2844
|
/** Data element ID "DAA". Name of the individual holding the Driver License or ID as defined in ANSI D20 Data Dictionary. (Lastname@Firstname@MI@ suffix if any) (Machine, Mag Stripe uses ‘$' and Bar Code uses ‘,' in place of ‘@') Firstname, Middle Initial, Lastname (Human) */
|
|
2846
2845
|
get driverLicenseName() {
|
|
2847
|
-
return this.document.fields.find(f => f.type.name
|
|
2846
|
+
return this.document.fields.find(f => f.type.name === 'DriverLicenseName');
|
|
2848
2847
|
}
|
|
2849
2848
|
|
|
2850
2849
|
/** Data element ID "DAS". A restriction applicable to a driver license. */
|
|
2851
2850
|
get driverLicenseRestrictionCode() {
|
|
2852
|
-
return this.document.fields.find(f => f.type.name
|
|
2851
|
+
return this.document.fields.find(f => f.type.name === 'DriverLicenseRestrictionCode');
|
|
2853
2852
|
}
|
|
2854
2853
|
|
|
2855
2854
|
/** Data element ID "DAF". Prefix to Driver Name. Not defined in ANSI D20. Freeform as defined by issuing jurisdiction. */
|
|
2856
2855
|
get driverNamePrefix() {
|
|
2857
|
-
return this.document.fields.find(f => f.type.name
|
|
2856
|
+
return this.document.fields.find(f => f.type.name === 'DriverNamePrefix');
|
|
2858
2857
|
}
|
|
2859
2858
|
|
|
2860
2859
|
/** Data element ID "DAE". An affix occurring at the end of a word, e.g.; Sr., Jr., II, III, IV, etc. */
|
|
2861
2860
|
get driverNameSuffix() {
|
|
2862
|
-
return this.document.fields.find(f => f.type.name
|
|
2861
|
+
return this.document.fields.find(f => f.type.name === 'DriverNameSuffix');
|
|
2863
2862
|
}
|
|
2864
2863
|
|
|
2865
2864
|
/** Data element ID "PAA". Identifies the type of permit as defined by ANSI D20. */
|
|
2866
2865
|
get driverPermitClassificationCode() {
|
|
2867
|
-
return this.document.fields.find(f => f.type.name
|
|
2866
|
+
return this.document.fields.find(f => f.type.name === 'DriverPermitClassificationCode');
|
|
2868
2867
|
}
|
|
2869
2868
|
|
|
2870
2869
|
/** Data element ID "PAF". Permit endorsements as defined by ANSI D20. */
|
|
2871
2870
|
get driverPermitEndorsementCode() {
|
|
2872
|
-
return this.document.fields.find(f => f.type.name
|
|
2871
|
+
return this.document.fields.find(f => f.type.name === 'DriverPermitEndorsementCode');
|
|
2873
2872
|
}
|
|
2874
2873
|
|
|
2875
2874
|
/** Data element ID "PAD". Date permit was issued. The format is ISO8601 with delimiters. */
|
|
2876
2875
|
get driverPermitIssueDate() {
|
|
2877
|
-
return this.document.fields.find(f => f.type.name
|
|
2876
|
+
return this.document.fields.find(f => f.type.name === 'DriverPermitIssueDate');
|
|
2878
2877
|
}
|
|
2879
2878
|
|
|
2880
2879
|
/** Data element ID "PAE". Permit restrictions as defined by ANSI D20. */
|
|
2881
2880
|
get driverPermitRestrictionCode() {
|
|
2882
|
-
return this.document.fields.find(f => f.type.name
|
|
2881
|
+
return this.document.fields.find(f => f.type.name === 'DriverPermitRestrictionCode');
|
|
2883
2882
|
}
|
|
2884
2883
|
|
|
2885
2884
|
/** Data element ID "DAN". Name of city for mailing address. */
|
|
2886
2885
|
get driverResidenceCity() {
|
|
2887
|
-
return this.document.fields.find(f => f.type.name
|
|
2886
|
+
return this.document.fields.find(f => f.type.name === 'DriverResidenceCity');
|
|
2888
2887
|
}
|
|
2889
2888
|
|
|
2890
2889
|
/** Data element ID "DAO". Jurisdiction code for mailing address. Conforms to Canadian, Mexican and US Jurisdictions as appropriate. Codes for provinces (Canada) and states (US and Mexico). */
|
|
2891
2890
|
get driverResidenceJurisdictionCode() {
|
|
2892
|
-
return this.document.fields.find(f => f.type.name
|
|
2891
|
+
return this.document.fields.find(f => f.type.name === 'DriverResidenceJurisdictionCode');
|
|
2893
2892
|
}
|
|
2894
2893
|
|
|
2895
2894
|
/** Data element ID "DAP". Postal code of residence */
|
|
2896
2895
|
get driverResidencePostalCode() {
|
|
2897
|
-
return this.document.fields.find(f => f.type.name
|
|
2896
|
+
return this.document.fields.find(f => f.type.name === 'DriverResidencePostalCode');
|
|
2898
2897
|
}
|
|
2899
2898
|
|
|
2900
2899
|
/** Data element ID "DAL". Street address line 1 (mailing). */
|
|
2901
2900
|
get driverResidenceStreetAddress1() {
|
|
2902
|
-
return this.document.fields.find(f => f.type.name
|
|
2901
|
+
return this.document.fields.find(f => f.type.name === 'DriverResidenceStreetAddress1');
|
|
2903
2902
|
}
|
|
2904
2903
|
|
|
2905
2904
|
/** Data element ID "DAM". Street address line 2 (mailing). */
|
|
2906
2905
|
get driverResidenceStreetAddress2() {
|
|
2907
|
-
return this.document.fields.find(f => f.type.name
|
|
2906
|
+
return this.document.fields.find(f => f.type.name === 'DriverResidenceStreetAddress2');
|
|
2908
2907
|
}
|
|
2909
2908
|
|
|
2910
2909
|
/** Data element ID "DDE". A code that indicates whether a field has been truncated (T), has not been truncated (N), or – unknown whether truncated (U). */
|
|
2911
2910
|
get familyNameTruncation() {
|
|
2912
|
-
return this.document.fields.find(f => f.type.name
|
|
2911
|
+
return this.document.fields.find(f => f.type.name === 'FamilyNameTruncation');
|
|
2913
2912
|
}
|
|
2914
2913
|
|
|
2915
2914
|
/** Data element ID "DCH". Federal Commercial Vehicle Codes */
|
|
2916
2915
|
get federalCommercialVehicleCodes() {
|
|
2917
|
-
return this.document.fields.find(f => f.type.name
|
|
2916
|
+
return this.document.fields.find(f => f.type.name === 'FederalCommercialVehicleCodes');
|
|
2918
2917
|
}
|
|
2919
2918
|
|
|
2920
2919
|
/** Data element ID "DDF". A code that indicates whether a field has been truncated (T), has not been truncated (N), or – unknown whether truncated (U). */
|
|
2921
2920
|
get firstNameTruncation() {
|
|
2922
|
-
return this.document.fields.find(f => f.type.name
|
|
2921
|
+
return this.document.fields.find(f => f.type.name === 'FirstNameTruncation');
|
|
2923
2922
|
}
|
|
2924
2923
|
|
|
2925
2924
|
/** Data element ID "DDC". Date on which the hazardous material endorsement granted by the document is no longer valid. The format is ISO8601 with delimiters. */
|
|
2926
2925
|
get hazmatEndorsementExpirationDate() {
|
|
2927
|
-
return this.document.fields.find(f => f.type.name
|
|
2926
|
+
return this.document.fields.find(f => f.type.name === 'HAZMATEndorsementExpirationDate');
|
|
2928
2927
|
}
|
|
2929
2928
|
|
|
2930
2929
|
/** Data element ID "DAZ". Color of cardholder's hair. ANSI D-20 codes converted to human readable format according to the ANSI D20 Data Dictionary. */
|
|
2931
2930
|
get hairColor() {
|
|
2932
|
-
return this.document.fields.find(f => f.type.name
|
|
2931
|
+
return this.document.fields.find(f => f.type.name === 'HairColor');
|
|
2933
2932
|
}
|
|
2934
2933
|
|
|
2935
2934
|
/** Data element ID "DAV". Height in centimeters */
|
|
2936
2935
|
get height() {
|
|
2937
|
-
return this.document.fields.find(f => f.type.name
|
|
2936
|
+
return this.document.fields.find(f => f.type.name === 'Height');
|
|
2938
2937
|
}
|
|
2939
2938
|
|
|
2940
2939
|
/** Data element ID "DCK". A string of letters and/or numbers that is affixed to the raw materials (card stock, laminate, etc.) used in producing driver licenses and ID cards. (DHS recommended field). */
|
|
2941
2940
|
get inventoryControlNumber() {
|
|
2942
|
-
return this.document.fields.find(f => f.type.name
|
|
2941
|
+
return this.document.fields.find(f => f.type.name === 'InventoryControlNumber');
|
|
2943
2942
|
}
|
|
2944
2943
|
|
|
2945
2944
|
/** Data element ID "DBE". A string used by some jurisdictions to validate the document against their data base. */
|
|
2946
2945
|
get issueTimeStamp() {
|
|
2947
|
-
return this.document.fields.find(f => f.type.name
|
|
2946
|
+
return this.document.fields.find(f => f.type.name === 'IssueTimeStamp');
|
|
2948
2947
|
}
|
|
2949
2948
|
|
|
2950
2949
|
/** Data element ID "DCQ". Text that explains the jurisdiction-specific code(s) that indicates additional driving privileges granted to the cardholder beyond the vehicle class. */
|
|
2951
2950
|
get jurisdictionSpecificEndorsementCodeDescription() {
|
|
2952
|
-
return this.document.fields.find(f => f.type.name
|
|
2951
|
+
return this.document.fields.find(f => f.type.name === 'JurisdictionSpecificEndorsementCodeDescription');
|
|
2953
2952
|
}
|
|
2954
2953
|
|
|
2955
2954
|
/** Data element ID "DCD". Jurisdiction-specific codes that represent additional privileges granted to the cardholder beyond the vehicle class (such as transportation of passengers, hazardous materials, operation of motorcycles, etc.). */
|
|
2956
2955
|
get jurisdictionSpecificEndorsementCodes() {
|
|
2957
|
-
return this.document.fields.find(f => f.type.name
|
|
2956
|
+
return this.document.fields.find(f => f.type.name === 'JurisdictionSpecificEndorsementCodes');
|
|
2958
2957
|
}
|
|
2959
2958
|
|
|
2960
2959
|
/** Data element ID "DCR". Text describing the jurisdiction-specific restriction code(s) that curtail driving privileges. */
|
|
2961
2960
|
get jurisdictionSpecificRestrictionCodeDescription() {
|
|
2962
|
-
return this.document.fields.find(f => f.type.name
|
|
2961
|
+
return this.document.fields.find(f => f.type.name === 'JurisdictionSpecificRestrictionCodeDescription');
|
|
2963
2962
|
}
|
|
2964
2963
|
|
|
2965
2964
|
/** Data element ID "DCB". Jurisdiction-specific codes that represent restrictions to driving privileges (such as airbrakes, automatic transmission, daylight only, etc.). */
|
|
2966
2965
|
get jurisdictionSpecificRestrictionCodes() {
|
|
2967
|
-
return this.document.fields.find(f => f.type.name
|
|
2966
|
+
return this.document.fields.find(f => f.type.name === 'JurisdictionSpecificRestrictionCodes');
|
|
2968
2967
|
}
|
|
2969
2968
|
|
|
2970
2969
|
/** Data element ID "DCA". Jurisdiction-specific vehicle class / group code, designating the type of vehicle the cardholder has privilege to drive. */
|
|
2971
2970
|
get jurisdictionSpecificVehicleClass() {
|
|
2972
|
-
return this.document.fields.find(f => f.type.name
|
|
2971
|
+
return this.document.fields.find(f => f.type.name === 'JurisdictionSpecificVehicleClass');
|
|
2973
2972
|
}
|
|
2974
2973
|
|
|
2975
2974
|
/** Data element ID "DCP". Text that explains the jurisdiction-specific code(s) for classifications of vehicles cardholder is authorized to drive. */
|
|
2976
2975
|
get jurisdictionSpecificVehicleClassificationDescription() {
|
|
2977
|
-
return this.document.fields.find(f => f.type.name
|
|
2976
|
+
return this.document.fields.find(f => f.type.name === 'JurisdictionSpecificVehicleClassificationDescription');
|
|
2978
2977
|
}
|
|
2979
2978
|
|
|
2980
2979
|
/** Data element ID "DDD". DHS required field that indicates that the cardholder has temporary lawful status = "1". */
|
|
2981
2980
|
get limitedDurationDocumentIndicator() {
|
|
2982
|
-
return this.document.fields.find(f => f.type.name
|
|
2981
|
+
return this.document.fields.find(f => f.type.name === 'LimitedDurationDocumentIndicator');
|
|
2983
2982
|
}
|
|
2984
2983
|
|
|
2985
2984
|
/** Data element ID "DDG". A code that indicates whether a field has been truncated (T), has not been truncated (N), or – unknown whether truncated (U). */
|
|
2986
2985
|
get middleNameTruncation() {
|
|
2987
|
-
return this.document.fields.find(f => f.type.name
|
|
2986
|
+
return this.document.fields.find(f => f.type.name === 'MiddleNameTruncation');
|
|
2988
2987
|
}
|
|
2989
2988
|
|
|
2990
2989
|
/** Data element ID "DCU". Name Suffix (If jurisdiction participates in systems requiring name suffix (PDPS, CDLIS, etc.), the suffix must be collected and displayed on the DL/ID and in the MRT). Collect full name for record, print as many characters as possible on portrait side of DL/ID. JR (Junior), SR (Senior), 1ST or I (First), 2ND or II (Second), 3RD or III (Third), 4TH or IV (Fourth), 5TH or V (Fifth), 6TH or VI (Sixth), 7TH or VII (Seventh), 8TH or VIII (Eighth), 9TH or IX (Ninth). */
|
|
2991
2990
|
get nameSuffix() {
|
|
2992
|
-
return this.document.fields.find(f => f.type.name
|
|
2991
|
+
return this.document.fields.find(f => f.type.name === 'NameSuffix');
|
|
2993
2992
|
}
|
|
2994
2993
|
|
|
2995
2994
|
/** Data element ID "DBI". "Y"; Used by some jurisdictions to indicate holder of the document is a non-resident. */
|
|
2996
2995
|
get nonResidentIndicator() {
|
|
2997
|
-
return this.document.fields.find(f => f.type.name
|
|
2996
|
+
return this.document.fields.find(f => f.type.name === 'NonResidentIndicator');
|
|
2998
2997
|
}
|
|
2999
2998
|
|
|
3000
2999
|
/** Data element ID "DBF". Number of duplicate cards issued for a license or ID if any. */
|
|
3001
3000
|
get numberOfDuplicates() {
|
|
3002
|
-
return this.document.fields.find(f => f.type.name
|
|
3001
|
+
return this.document.fields.find(f => f.type.name === 'NumberOfDuplicates');
|
|
3003
3002
|
}
|
|
3004
3003
|
|
|
3005
3004
|
/** Data element ID "DBH". Organ Donor */
|
|
3006
3005
|
get organDonor() {
|
|
3007
|
-
return this.document.fields.find(f => f.type.name
|
|
3006
|
+
return this.document.fields.find(f => f.type.name === 'OrganDonor');
|
|
3008
3007
|
}
|
|
3009
3008
|
|
|
3010
3009
|
/** Data element ID "DDK". Field that indicates that the cardholder is an organ donor = "1". */
|
|
3011
3010
|
get organDonorIndicator() {
|
|
3012
|
-
return this.document.fields.find(f => f.type.name
|
|
3011
|
+
return this.document.fields.find(f => f.type.name === 'OrganDonorIndicator');
|
|
3013
3012
|
}
|
|
3014
3013
|
|
|
3015
3014
|
/** Data element ID "PAB". Date permit expires, The format is ISO8601 with delimiters. */
|
|
3016
3015
|
get permitExpirationDate() {
|
|
3017
|
-
return this.document.fields.find(f => f.type.name
|
|
3016
|
+
return this.document.fields.find(f => f.type.name === 'PermitExpirationDate');
|
|
3018
3017
|
}
|
|
3019
3018
|
|
|
3020
3019
|
/** Data element ID "PAC". Type of permit. */
|
|
3021
3020
|
get permitIdentifier() {
|
|
3022
|
-
return this.document.fields.find(f => f.type.name
|
|
3021
|
+
return this.document.fields.find(f => f.type.name === 'PermitIdentifier');
|
|
3023
3022
|
}
|
|
3024
3023
|
|
|
3025
3024
|
/** Data element ID "DAY". Color of cardholder's eyes. ANSI D-20 codes converted to human readable format according to the ANSI D20 Data Dictionary. */
|
|
3026
3025
|
get physicalDescriptionEyeColor() {
|
|
3027
|
-
return this.document.fields.find(f => f.type.name
|
|
3026
|
+
return this.document.fields.find(f => f.type.name === 'PhysicalDescriptionEyeColor');
|
|
3028
3027
|
}
|
|
3029
3028
|
|
|
3030
3029
|
/** Data element ID "DAU". Height of cardholder. Inches (in): number of inches followed by " in" or Centimeters (cm): number of centimeters followed by " cm." */
|
|
3031
3030
|
get physicalDescriptionHeight() {
|
|
3032
|
-
return this.document.fields.find(f => f.type.name
|
|
3031
|
+
return this.document.fields.find(f => f.type.name === 'PhysicalDescriptionHeight');
|
|
3033
3032
|
}
|
|
3034
3033
|
|
|
3035
3034
|
/** Data element ID "DBC". Gender of the cardholder. "Male" or "Female". */
|
|
3036
3035
|
get physicalDescriptionSex() {
|
|
3037
|
-
return this.document.fields.find(f => f.type.name
|
|
3036
|
+
return this.document.fields.find(f => f.type.name === 'PhysicalDescriptionSex');
|
|
3038
3037
|
}
|
|
3039
3038
|
|
|
3040
3039
|
/** Data element ID "DCE". Indicates the approximate weight range of the cardholder: 0 = up to 31 kg (up to 70 lbs), 1 = 32 – 45 kg (71 – 100 lbs), 2 = 46 - 59 kg (101 – 130 lbs), 3 = 60 - 70 kg (131 – 160 lbs), 4 = 71 - 86 kg (161 – 190 lbs), 5 = 87 - 100 kg (191 – 220 lbs), 6 = 101 - 113 kg (221 – 250 lbs), 7 = 114 - 127 kg (251 – 280 lbs), 8 = 128 – 145 kg (281 – 320 lbs), 9 = 146+ kg (321+ lbs). */
|
|
3041
3040
|
get physicalDescriptionWeightRange() {
|
|
3042
|
-
return this.document.fields.find(f => f.type.name
|
|
3041
|
+
return this.document.fields.find(f => f.type.name === 'PhysicalDescriptionWeightRange');
|
|
3043
3042
|
}
|
|
3044
3043
|
|
|
3045
3044
|
/** Data element ID "DCI". Country and municipality and/or state/province. */
|
|
3046
3045
|
get placeOfBirth() {
|
|
3047
|
-
return this.document.fields.find(f => f.type.name
|
|
3046
|
+
return this.document.fields.find(f => f.type.name === 'PlaceOfBirth');
|
|
3048
3047
|
}
|
|
3049
3048
|
|
|
3050
3049
|
/** Data element ID "DCL". Codes for race or ethnicity of the cardholder. ANSI D-20 codes converted to human readable format according to the ANSI D20 Data Dictionary. */
|
|
3051
3050
|
get raceEthnicity() {
|
|
3052
|
-
return this.document.fields.find(f => f.type.name
|
|
3051
|
+
return this.document.fields.find(f => f.type.name === 'RaceEthnicity');
|
|
3053
3052
|
}
|
|
3054
3053
|
|
|
3055
3054
|
/** Data element ID "DBK". The number assigned to an individual by the Social Security Administration. */
|
|
3056
3055
|
get socialSecurityNumber() {
|
|
3057
|
-
return this.document.fields.find(f => f.type.name
|
|
3056
|
+
return this.document.fields.find(f => f.type.name === 'SocialSecurityNumber');
|
|
3058
3057
|
}
|
|
3059
3058
|
|
|
3060
3059
|
/** Data element ID "DCN". Standard endorsement code(s) for cardholder. See codes in D20. This data element is a placeholder for future efforts to standardize endorsement codes. */
|
|
3061
3060
|
get standardEndorsementCode() {
|
|
3062
|
-
return this.document.fields.find(f => f.type.name
|
|
3061
|
+
return this.document.fields.find(f => f.type.name === 'StandardEndorsementCode');
|
|
3063
3062
|
}
|
|
3064
3063
|
|
|
3065
3064
|
/** Data element ID "DCO". Standard restriction code(s) for cardholder. See codes in D20. This data element is a placeholder for future efforts to standardize restriction codes. */
|
|
3066
3065
|
get standardRestrictionCode() {
|
|
3067
|
-
return this.document.fields.find(f => f.type.name
|
|
3066
|
+
return this.document.fields.find(f => f.type.name === 'StandardRestrictionCode');
|
|
3068
3067
|
}
|
|
3069
3068
|
|
|
3070
3069
|
/** Data element ID "DCM". Standard vehicle classification code(s) for cardholder. This data element is a placeholder for future efforts to standardize vehicle classifications. */
|
|
3071
3070
|
get standardVehicleClassification() {
|
|
3072
|
-
return this.document.fields.find(f => f.type.name
|
|
3071
|
+
return this.document.fields.find(f => f.type.name === 'StandardVehicleClassification');
|
|
3073
3072
|
}
|
|
3074
3073
|
|
|
3075
3074
|
/** Data element ID "DDH". Date on which the cardholder turns 18 years old. The format is ISO8601 with delimiters. */
|
|
3076
3075
|
get under18Until() {
|
|
3077
|
-
return this.document.fields.find(f => f.type.name
|
|
3076
|
+
return this.document.fields.find(f => f.type.name === 'Under18Until');
|
|
3078
3077
|
}
|
|
3079
3078
|
|
|
3080
3079
|
/** Data element ID "DDI". Date on which the cardholder turns 19 years old. The format is ISO8601 with delimiters. */
|
|
3081
3080
|
get under19Until() {
|
|
3082
|
-
return this.document.fields.find(f => f.type.name
|
|
3081
|
+
return this.document.fields.find(f => f.type.name === 'Under19Until');
|
|
3083
3082
|
}
|
|
3084
3083
|
|
|
3085
3084
|
/** Data element ID "DDJ". Date on which the cardholder turns 21 years old. The format is ISO8601 with delimiters. */
|
|
3086
3085
|
get under21Until() {
|
|
3087
|
-
return this.document.fields.find(f => f.type.name
|
|
3086
|
+
return this.document.fields.find(f => f.type.name === 'Under21Until');
|
|
3088
3087
|
}
|
|
3089
3088
|
|
|
3090
3089
|
/** Data element ID "DBJ". A number or alphanumeric string used by some jurisdictions to identify a "customer" across multiple data bases. */
|
|
3091
3090
|
get uniqueCustomerIdentifier() {
|
|
3092
|
-
return this.document.fields.find(f => f.type.name
|
|
3091
|
+
return this.document.fields.find(f => f.type.name === 'UniqueCustomerIdentifier');
|
|
3093
3092
|
}
|
|
3094
3093
|
|
|
3095
3094
|
/** Data element ID "DDL". Field that indicates that the cardholder is a veteran = "1". */
|
|
3096
3095
|
get veteranIndicator() {
|
|
3097
|
-
return this.document.fields.find(f => f.type.name
|
|
3096
|
+
return this.document.fields.find(f => f.type.name === 'VeteranIndicator');
|
|
3098
3097
|
}
|
|
3099
3098
|
|
|
3100
3099
|
/** Data element ID "DAX". Cardholder weight in kilograms Ex. 84 kg = "084" */
|
|
3101
3100
|
get weightKilograms() {
|
|
3102
|
-
return this.document.fields.find(f => f.type.name
|
|
3101
|
+
return this.document.fields.find(f => f.type.name === 'WeightKilograms');
|
|
3103
3102
|
}
|
|
3104
3103
|
|
|
3105
3104
|
/** Data element ID "DAW". Cardholder weight in pounds Ex. 185 lb = "185" */
|
|
3106
3105
|
get weightPounds() {
|
|
3107
|
-
return this.document.fields.find(f => f.type.name
|
|
3106
|
+
return this.document.fields.find(f => f.type.name === 'WeightPounds');
|
|
3108
3107
|
}
|
|
3109
3108
|
}
|
|
3110
3109
|
_AAMVA.DLID = DLID;
|
|
@@ -3113,7 +3112,7 @@ export class AAMVA {
|
|
|
3113
3112
|
super(document);
|
|
3114
3113
|
}
|
|
3115
3114
|
requiredDocumentType() {
|
|
3116
|
-
return
|
|
3115
|
+
return AAMVADriverLicenseDocumentType;
|
|
3117
3116
|
}
|
|
3118
3117
|
}
|
|
3119
3118
|
_AAMVA.DriverLicense = DriverLicense;
|
|
@@ -3122,7 +3121,7 @@ export class AAMVA {
|
|
|
3122
3121
|
super(document);
|
|
3123
3122
|
}
|
|
3124
3123
|
requiredDocumentType() {
|
|
3125
|
-
return
|
|
3124
|
+
return AAMVAIDCardDocumentType;
|
|
3126
3125
|
}
|
|
3127
3126
|
}
|
|
3128
3127
|
_AAMVA.IDCard = IDCard;
|
|
@@ -3131,7 +3130,7 @@ export class AAMVA {
|
|
|
3131
3130
|
super(document);
|
|
3132
3131
|
}
|
|
3133
3132
|
requiredDocumentType() {
|
|
3134
|
-
return
|
|
3133
|
+
return AAMVAEnhancedDriverLicenseDocumentType;
|
|
3135
3134
|
}
|
|
3136
3135
|
}
|
|
3137
3136
|
_AAMVA.EnhancedDriverLicense = EnhancedDriverLicense;
|
|
@@ -3140,13 +3139,13 @@ export class AAMVA {
|
|
|
3140
3139
|
return this._document;
|
|
3141
3140
|
}
|
|
3142
3141
|
constructor(document) {
|
|
3143
|
-
if (document.type.name
|
|
3142
|
+
if (document.type.name !== this.requiredDocumentType()) {
|
|
3144
3143
|
throw new Error(`Expected document type ${this.requiredDocumentType()}, got ${document.type.name}`);
|
|
3145
3144
|
}
|
|
3146
3145
|
this._document = document;
|
|
3147
3146
|
}
|
|
3148
3147
|
requiredDocumentType() {
|
|
3149
|
-
return
|
|
3148
|
+
return AAMVARawDocumentDocumentType;
|
|
3150
3149
|
}
|
|
3151
3150
|
}
|
|
3152
3151
|
_AAMVA.RawDocument = RawDocument;
|