@regulaforensics/document-reader 8.4.401-beta → 8.4.507-rc

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.
Files changed (88) hide show
  1. package/README.md +1 -1
  2. package/RNDocumentReader.podspec +2 -2
  3. package/android/build.gradle +2 -2
  4. package/android/cordova.gradle +2 -2
  5. package/android/src/main/java/com/regula/plugin/documentreader/Config.kt +11 -31
  6. package/android/src/main/java/com/regula/plugin/documentreader/JSONConstructor.kt +338 -59
  7. package/android/src/main/java/com/regula/plugin/documentreader/Main.kt +69 -35
  8. package/android/src/main/java/com/regula/plugin/documentreader/Utils.kt +62 -0
  9. package/examples/capacitor/ios/App/App/Info.plist +2 -0
  10. package/examples/capacitor/package-lock.json +9 -9
  11. package/examples/capacitor/package.json +3 -3
  12. package/examples/ionic/config.xml +2 -0
  13. package/examples/ionic/package-lock.json +5262 -2655
  14. package/examples/ionic/package.json +12 -12
  15. package/examples/react_native/app.config.ts +3 -1
  16. package/examples/react_native/package-lock.json +37 -37
  17. package/examples/react_native/package.json +3 -3
  18. package/ios/RGLWConfig.m +11 -32
  19. package/ios/RGLWJSONConstructor.h +19 -1
  20. package/ios/RGLWJSONConstructor.m +349 -18
  21. package/ios/RGLWMain.m +49 -46
  22. package/package.json +1 -1
  23. package/plugin.xml +2 -2
  24. package/test/json.tsx +201 -124
  25. package/test/package-lock.json +1 -1
  26. package/test/test.tsx +12 -3
  27. package/www/capacitor/engagement/DataRetrieval.js +55 -0
  28. package/www/capacitor/engagement/DeviceEngagement.js +30 -0
  29. package/www/capacitor/engagement/DeviceRetrievalMethod.js +41 -0
  30. package/www/capacitor/engagement/DocumentRequestMDL.js +212 -0
  31. package/www/capacitor/engagement/NameSpaceMDL.js +33 -0
  32. package/www/capacitor/index.js +58 -7
  33. package/www/capacitor/info/DocReaderException.js +2 -0
  34. package/www/capacitor/params/Functionality.js +16 -0
  35. package/www/capacitor/params/customization/Customization.js +8 -0
  36. package/www/capacitor/params/process_params/AuthenticityParams.js +1 -44
  37. package/www/capacitor/params/process_params/LivenessParams.js +0 -36
  38. package/www/capacitor/params/process_params/ProcessParams.js +26 -30
  39. package/www/capacitor/results/Results.js +8 -1
  40. package/www/capacitor/results/status/AgeStatus.js +35 -0
  41. package/www/capacitor/results/status/ResultsStatus.js +13 -0
  42. package/www/capacitor/results/visible_digital_seals/DocFeature.js +23 -0
  43. package/www/capacitor/results/visible_digital_seals/VDSData.js +75 -0
  44. package/www/capacitor/results/visual_results/FieldType.js +3 -0
  45. package/www/capacitor/rfid/PKDCertificate.js +3 -0
  46. package/www/cordova.js +1276 -683
  47. package/www/react-native/engagement/DataRetrieval.js +55 -0
  48. package/www/react-native/engagement/DeviceEngagement.js +30 -0
  49. package/www/react-native/engagement/DeviceRetrievalMethod.js +41 -0
  50. package/www/react-native/engagement/DocumentRequestMDL.js +212 -0
  51. package/www/react-native/engagement/NameSpaceMDL.js +33 -0
  52. package/www/react-native/index.js +58 -7
  53. package/www/react-native/info/DocReaderException.js +2 -0
  54. package/www/react-native/params/Functionality.js +16 -0
  55. package/www/react-native/params/customization/Customization.js +8 -0
  56. package/www/react-native/params/process_params/AuthenticityParams.js +1 -44
  57. package/www/react-native/params/process_params/LivenessParams.js +0 -36
  58. package/www/react-native/params/process_params/ProcessParams.js +26 -30
  59. package/www/react-native/results/Results.js +8 -1
  60. package/www/react-native/results/status/AgeStatus.js +35 -0
  61. package/www/react-native/results/status/ResultsStatus.js +13 -0
  62. package/www/react-native/results/visible_digital_seals/DocFeature.js +23 -0
  63. package/www/react-native/results/visible_digital_seals/VDSData.js +75 -0
  64. package/www/react-native/results/visual_results/FieldType.js +3 -0
  65. package/www/react-native/rfid/PKDCertificate.js +3 -0
  66. package/www/types/engagement/DataRetrieval.d.ts +28 -0
  67. package/www/types/engagement/DeviceEngagement.d.ts +16 -0
  68. package/www/types/engagement/DeviceRetrievalMethod.d.ts +18 -0
  69. package/www/types/engagement/DocumentRequestMDL.d.ts +61 -0
  70. package/www/types/engagement/NameSpaceMDL.d.ts +16 -0
  71. package/www/types/index.d.ts +40 -8
  72. package/www/types/info/DocReaderException.d.ts +2 -0
  73. package/www/types/params/Functionality.d.ts +7 -0
  74. package/www/types/params/customization/Customization.d.ts +5 -0
  75. package/www/types/params/process_params/AuthenticityParams.d.ts +0 -25
  76. package/www/types/params/process_params/LivenessParams.d.ts +0 -18
  77. package/www/types/params/process_params/ProcessParams.d.ts +18 -11
  78. package/www/types/results/Results.d.ts +9 -1
  79. package/www/types/results/status/AgeStatus.d.ts +14 -0
  80. package/www/types/results/status/ResultsStatus.d.ts +9 -0
  81. package/www/types/results/visible_digital_seals/DocFeature.d.ts +9 -0
  82. package/www/types/results/visible_digital_seals/VDSData.d.ts +32 -0
  83. package/www/types/results/visible_digital_seals/VDSNCData.d.ts +1 -1
  84. package/www/types/results/visual_results/FieldType.d.ts +6 -0
  85. package/www/types/rfid/PKDCertificate.d.ts +7 -1
  86. package/www/capacitor/params/process_params/FilterObject.js +0 -60
  87. package/www/react-native/params/process_params/FilterObject.js +0 -60
  88. package/www/types/params/process_params/FilterObject.d.ts +0 -32
@@ -1,6 +1,5 @@
1
1
  import { DocumentReader } from '../../index';
2
2
  import { LivenessParams } from './LivenessParams';
3
- import { FilterObject } from './FilterObject';
4
3
 
5
4
  export class AuthenticityParams {
6
5
  get useLivenessCheck() { return this._useLivenessCheck; }
@@ -9,6 +8,7 @@ export class AuthenticityParams {
9
8
  this._set({ "useLivenessCheck": val });
10
9
  }
11
10
 
11
+ _livenessParams = new LivenessParams();
12
12
  get livenessParams() { return this._livenessParams; }
13
13
  set livenessParams(val) { (this._livenessParams = val)._apply(); }
14
14
 
@@ -96,28 +96,6 @@ export class AuthenticityParams {
96
96
  this._set({ "checkSecurityText": val });
97
97
  }
98
98
 
99
- _checkFilters = {};
100
-
101
- setCheckFilter(checkType, filter) {
102
- this._checkFilters[checkType] = filter;
103
- this._set({
104
- "setCheckFilter": {
105
- "checkType": checkType,
106
- "filterObject": filter.toJson(),
107
- },
108
- });
109
- }
110
-
111
- removeCheckFilter(checkType) {
112
- delete this._checkFilters[checkType];
113
- this._set({ "removeCheckFilter": checkType });
114
- }
115
-
116
- clearCheckFilter() {
117
- this._checkFilters = {};
118
- this._set({ "clearCheckFilter": null });
119
- }
120
-
121
99
  static fromJson(jsonObject) {
122
100
  if (jsonObject == null) return new AuthenticityParams();
123
101
 
@@ -139,8 +117,6 @@ export class AuthenticityParams {
139
117
  result._checkPhotoComparison = jsonObject["checkPhotoComparison"];
140
118
  result._checkLetterScreen = jsonObject["checkLetterScreen"];
141
119
  result._checkSecurityText = jsonObject["checkSecurityText"];
142
- result._checkFilters = Object.fromEntries(Object.entries(jsonObject["checkFilters"] ?? {})
143
- .map(([k, v]) => [k, FilterObject.fromJson(v)]));
144
120
 
145
121
  return result;
146
122
  }
@@ -170,25 +146,6 @@ export class AuthenticityParams {
170
146
  "checkPhotoComparison": this.checkPhotoComparison,
171
147
  "checkLetterScreen": this.checkLetterScreen,
172
148
  "checkSecurityText": this.checkSecurityText,
173
- "checkFilters": Object.fromEntries(Object.entries(this._checkFilters).map(([k, v]) => [k, v.toJson()])),
174
149
  }
175
150
  }
176
151
  }
177
-
178
- export const AuthenticityCheckType = {
179
- USE_LIVENESS: "checkLiveness",
180
- UV_LUMINISCENCE: "checkUVLuminiscence",
181
- IR_B900: "checkIRB900",
182
- IMAGE_PATTERNS: "checkImagePatterns",
183
- FIBERS: "checkFibers",
184
- EXT_MRZ: "checkExtMRZ",
185
- EXT_OCR: "checkExtOCR",
186
- AXIAL: "checkAxial",
187
- BARCODE_FORMAT: "checkBarcodeFormat",
188
- IR_VISIBILITY: "checkIRVisibility",
189
- IPI: "checkIPI",
190
- PHOTO_EMBEDDING: "checkPhotoEmbedding",
191
- PHOTO_COMPARISON: "checkPhotoComparison",
192
- LETTER_SCREEN: "checkLetterScreen",
193
- SECURITY_TEXT: "checkSecurityText",
194
- };
@@ -1,5 +1,4 @@
1
1
  import { DocumentReader } from '../../index';
2
- import { FilterObject } from './FilterObject';
3
2
 
4
3
  export class LivenessParams {
5
4
  get checkOVI() { return this._checkOVI; }
@@ -44,28 +43,6 @@ export class LivenessParams {
44
43
  this._set({ "checkGeometry": val });
45
44
  }
46
45
 
47
- _checkFilters = {};
48
-
49
- setCheckFilter(checkType, filter) {
50
- this._checkFilters[checkType] = filter;
51
- this._set({
52
- "setCheckFilter": {
53
- "checkType": checkType,
54
- "filterObject": filter.toJson(),
55
- },
56
- });
57
- }
58
-
59
- removeCheckFilter(checkType) {
60
- delete this._checkFilters[checkType];
61
- this._set({ "removeCheckFilter": checkType });
62
- }
63
-
64
- clearCheckFilter() {
65
- this._checkFilters = {};
66
- this._set({ "clearCheckFilter": null });
67
- }
68
-
69
46
  static fromJson(jsonObject) {
70
47
  if (jsonObject == null) return new LivenessParams();
71
48
 
@@ -77,8 +54,6 @@ export class LivenessParams {
77
54
  result._checkBlackAndWhiteCopy = jsonObject["checkBlackAndWhiteCopy"];
78
55
  result._checkDynaprint = jsonObject["checkDynaprint"];
79
56
  result._checkGeometry = jsonObject["checkGeometry"];
80
- result._checkFilters = Object.fromEntries(Object.entries(jsonObject["checkFilters"] ?? {})
81
- .map(([k, v]) => [k, FilterObject.fromJson(v)]));
82
57
 
83
58
  return result;
84
59
  }
@@ -99,17 +74,6 @@ export class LivenessParams {
99
74
  "checkBlackAndWhiteCopy": this.checkBlackAndWhiteCopy,
100
75
  "checkDynaprint": this.checkDynaprint,
101
76
  "checkGeometry": this.checkGeometry,
102
- "checkFilters": Object.fromEntries(Object.entries(this._checkFilters).map(([k, v]) => [k, v.toJson()])),
103
77
  }
104
78
  }
105
79
  }
106
-
107
- export const LivenessCheckType = {
108
- OVI: "checkOVI",
109
- MLI: "checkMLI",
110
- HOLO: "checkHolo",
111
- ED: "checkED",
112
- BLACK_AND_WHITE_COPY: "checkBlackAndWhiteCopy",
113
- DYNAPRINT: "checkDynaprint",
114
- GEOMETRY: "checkGeometry",
115
- };
@@ -5,7 +5,6 @@ import { RFIDParams } from './RFIDParams';
5
5
  import { FaceApiParams } from './FaceApiParams';
6
6
  import { BackendProcessingConfig } from './BackendProcessingConfig';
7
7
  import { AuthenticityParams } from './AuthenticityParams';
8
- import { FilterObject } from './FilterObject';
9
8
 
10
9
  export class ProcessParams {
11
10
  get multipageProcessing() { return this._multipageProcessing; }
@@ -242,6 +241,18 @@ export class ProcessParams {
242
241
  this._set({ "strictSecurityChecks": val });
243
242
  }
244
243
 
244
+ get returnTransliteratedFields() { return this._returnTransliteratedFields; }
245
+ set returnTransliteratedFields(val) {
246
+ this._returnTransliteratedFields = val;
247
+ this._set({ "returnTransliteratedFields": val });
248
+ }
249
+
250
+ get checkCaptureProcessIntegrity() { return this._checkCaptureProcessIntegrity; }
251
+ set checkCaptureProcessIntegrity(val) {
252
+ this._checkCaptureProcessIntegrity = val;
253
+ this._set({ "checkCaptureProcessIntegrity": val });
254
+ }
255
+
245
256
  get barcodeParserType() { return this._barcodeParserType; }
246
257
  set barcodeParserType(val) {
247
258
  this._barcodeParserType = val;
@@ -434,6 +445,13 @@ export class ProcessParams {
434
445
  this._set({ "lcidFilter": val });
435
446
  }
436
447
 
448
+ get fieldTypesIgnoreFilter() { return this._fieldTypesIgnoreFilter; }
449
+ set fieldTypesIgnoreFilter(val) {
450
+ this._fieldTypesIgnoreFilter = val;
451
+ this._set({ "fieldTypesIgnoreFilter": val });
452
+ }
453
+
454
+ _imageQA = new ImageQA();
437
455
  get imageQA() { return this._imageQA; }
438
456
  set imageQA(val) { (this._imageQA = val)._apply(); }
439
457
 
@@ -455,6 +473,7 @@ export class ProcessParams {
455
473
  this._set({ "backendProcessingConfig": val });
456
474
  }
457
475
 
476
+ _authenticityParams = new AuthenticityParams();
458
477
  get authenticityParams() { return this._authenticityParams; }
459
478
  set authenticityParams(val) { (this._authenticityParams = val)._apply(); }
460
479
 
@@ -464,28 +483,6 @@ export class ProcessParams {
464
483
  this._set({ "customParams": val });
465
484
  }
466
485
 
467
- _checkFilters = {};
468
-
469
- setCheckFilter(checkType, filter) {
470
- this._checkFilters[checkType] = filter;
471
- this._set({
472
- "setCheckFilter": {
473
- "checkType": checkType,
474
- "filterObject": filter.toJson(),
475
- },
476
- });
477
- }
478
-
479
- removeCheckFilter(checkType) {
480
- delete this._checkFilters[checkType];
481
- this._set({ "removeCheckFilter": checkType });
482
- }
483
-
484
- clearCheckFilter() {
485
- this._checkFilters = {};
486
- this._set({ "clearCheckFilter": null });
487
- }
488
-
489
486
  static fromJson(jsonObject) {
490
487
  if (jsonObject == null) return new ProcessParams();
491
488
  const result = new ProcessParams();
@@ -529,6 +526,8 @@ export class ProcessParams {
529
526
  result._generateAlpha2Codes = jsonObject["generateAlpha2Codes"];
530
527
  result._disableAuthResolutionFilter = jsonObject["disableAuthResolutionFilter"];
531
528
  result._strictSecurityChecks = jsonObject["strictSecurityChecks"];
529
+ result._returnTransliteratedFields = jsonObject["returnTransliteratedFields"];
530
+ result._checkCaptureProcessIntegrity = jsonObject["checkCaptureProcessIntegrity"];
532
531
  result._barcodeParserType = jsonObject["barcodeParserType"];
533
532
  result._perspectiveAngle = jsonObject["perspectiveAngle"];
534
533
  result._minDPI = jsonObject["minDPI"];
@@ -561,14 +560,13 @@ export class ProcessParams {
561
560
  result._documentGroupFilter = jsonObject["documentGroupFilter"];
562
561
  result._lcidIgnoreFilter = jsonObject["lcidIgnoreFilter"];
563
562
  result._lcidFilter = jsonObject["lcidFilter"];
563
+ result._fieldTypesIgnoreFilter = jsonObject["fieldTypesIgnoreFilter"];
564
564
  result._imageQA = ImageQA.fromJson(jsonObject["imageQA"]);
565
565
  result._rfidParams = RFIDParams.fromJson(jsonObject["rfidParams"]);
566
566
  result._faceApiParams = FaceApiParams.fromJson(jsonObject["faceApiParams"]);
567
567
  result._backendProcessingConfig = BackendProcessingConfig.fromJson(jsonObject["backendProcessingConfig"]);
568
568
  result._authenticityParams = AuthenticityParams.fromJson(jsonObject["authenticityParams"]);
569
569
  result._customParams = jsonObject["customParams"];
570
- result._checkFilters = Object.fromEntries(Object.entries(jsonObject["checkFilters"] ?? {})
571
- .map(([k, v]) => [k, FilterObject.fromJson(v)]));
572
570
 
573
571
  return result;
574
572
  }
@@ -613,6 +611,8 @@ export class ProcessParams {
613
611
  "generateAlpha2Codes": this.generateAlpha2Codes,
614
612
  "disableAuthResolutionFilter": this.disableAuthResolutionFilter,
615
613
  "strictSecurityChecks": this.strictSecurityChecks,
614
+ "returnTransliteratedFields": this.returnTransliteratedFields,
615
+ "checkCaptureProcessIntegrity": this.checkCaptureProcessIntegrity,
616
616
  "measureSystem": this.measureSystem,
617
617
  "barcodeParserType": this.barcodeParserType,
618
618
  "perspectiveAngle": this.perspectiveAngle,
@@ -645,13 +645,13 @@ export class ProcessParams {
645
645
  "documentGroupFilter": this.documentGroupFilter,
646
646
  "lcidIgnoreFilter": this.lcidIgnoreFilter,
647
647
  "lcidFilter": this.lcidFilter,
648
+ "fieldTypesIgnoreFilter": this.fieldTypesIgnoreFilter,
648
649
  "imageQA": this.imageQA?.toJson(),
649
650
  "rfidParams": this.rfidParams?.toJson(),
650
651
  "faceApiParams": this.faceApiParams?.toJson(),
651
652
  "backendProcessingConfig": this.backendProcessingConfig?.toJson(),
652
653
  "authenticityParams": this.authenticityParams?.toJson(),
653
654
  "customParams": this.customParams,
654
- "checkFilters": Object.fromEntries(Object.entries(this._checkFilters).map(([k, v]) => [k, v.toJson()])),
655
655
  }
656
656
  }
657
657
 
@@ -689,7 +689,3 @@ export const MrzDetectionModes = {
689
689
  RESIZE_BINARIZE_WINDOW: 1,
690
690
  BLUR_BEFORE_BINARIZATION: 2
691
691
  };
692
-
693
- export const FilterCheckType = {
694
- AUTH: "checkAuth",
695
- };
@@ -13,6 +13,7 @@ import { GraphicResult } from "./visual_results/GraphicResult";
13
13
  import { TextResult } from "./visual_results/TextResult";
14
14
  import { TextField } from "./visual_results/TextField";
15
15
  import { VDSNCData } from "./visible_digital_seals/VDSNCData";
16
+ import { VDSData } from "./visible_digital_seals/VDSData";
16
17
  import { Position } from "./Position";
17
18
  import { DocumentType } from "./DocumentType";
18
19
  import { TransactionInfo } from "./TransactionInfo";
@@ -31,6 +32,7 @@ export class Results {
31
32
  chipPage
32
33
  barcodeResult
33
34
  vdsncData
35
+ vdsData
34
36
  dtcData
35
37
  processingFinishedStatus
36
38
  morePagesAvailable
@@ -205,6 +207,7 @@ export class Results {
205
207
  result.barcodeResult = BarcodeResult.fromJson(jsonObject["barcodeResult"]);
206
208
  result.status = ResultsStatus.fromJson(jsonObject["status"]);
207
209
  result.vdsncData = VDSNCData.fromJson(jsonObject["vdsncData"]);
210
+ result.vdsData = VDSData.fromJson(jsonObject["vdsData"]);
208
211
  result.dtcData = jsonObject["dtcData"];
209
212
  result.transactionInfo = TransactionInfo.fromJson(jsonObject["transactionInfo"]);
210
213
 
@@ -275,6 +278,7 @@ export class Results {
275
278
  "rfidSessionData": this.rfidSessionData?.toJson(),
276
279
  "barcodeResult": this.barcodeResult?.toJson(),
277
280
  "vdsncData": this.vdsncData?.toJson(),
281
+ "vdsData": this.vdsData?.toJson(),
278
282
  "dtcData": this.dtcData,
279
283
  "chipPage": this.chipPage,
280
284
  "processingFinishedStatus": this.processingFinishedStatus,
@@ -339,5 +343,8 @@ export const ResultType = {
339
343
  RFID_IMAGE_DATA: 103,
340
344
  RFID_BINARY_DATA: 104,
341
345
  RFID_ORIGINAL_GRAPHICS: 105,
342
- RFID_DTC_VC: 109
346
+ RFID_DTC_VC: 109,
347
+ MDL_PARSED_RESPONSE: 121,
348
+ VDS_NC: 124,
349
+ VDS: 125,
343
350
  };
@@ -0,0 +1,35 @@
1
+ import { CheckResult } from './CheckResult';
2
+
3
+ export class AgeStatus {
4
+ threshold
5
+ overThreshold
6
+ over18
7
+ over21
8
+ over25
9
+ over65
10
+
11
+ static fromJson(jsonObject) {
12
+ if (jsonObject == null) return null;
13
+ const result = new AgeStatus();
14
+
15
+ result.threshold = jsonObject["threshold"];
16
+ result.overThreshold = jsonObject["overThreshold"];
17
+ result.over18 = jsonObject["over18"];
18
+ result.over21 = jsonObject["over21"];
19
+ result.over25 = jsonObject["over25"];
20
+ result.over65 = jsonObject["over65"];
21
+
22
+ return result;
23
+ }
24
+
25
+ toJson() {
26
+ return {
27
+ "threshold": this.threshold,
28
+ "overThreshold": this.overThreshold,
29
+ "over18": this.over18,
30
+ "over21": this.over21,
31
+ "over25": this.over25,
32
+ "over65": this.over65,
33
+ }
34
+ }
35
+ }
@@ -1,5 +1,6 @@
1
1
  import { CheckResult } from './CheckResult';
2
2
  import { OpticalStatus } from './OpticalStatus';
3
+ import { AgeStatus } from './AgeStatus';
3
4
  import { RFIDStatus } from './RFIDStatus';
4
5
 
5
6
  export class ResultsStatus {
@@ -10,6 +11,10 @@ export class ResultsStatus {
10
11
  detailsRFID
11
12
  portrait
12
13
  stopList
14
+ mDL
15
+ age
16
+ captureProcessIntegrity
17
+ ageStatus
13
18
 
14
19
  static fromJson(jsonObject) {
15
20
  if (jsonObject == null) return null;
@@ -22,6 +27,10 @@ export class ResultsStatus {
22
27
  result.detailsRFID = RFIDStatus.fromJson(jsonObject["detailsRFID"]);
23
28
  result.portrait = jsonObject["portrait"];
24
29
  result.stopList = jsonObject["stopList"];
30
+ result.mDL = jsonObject["mDL"];
31
+ result.age = jsonObject["age"];
32
+ result.captureProcessIntegrity = jsonObject["captureProcessIntegrity"];
33
+ result.ageStatus = AgeStatus.fromJson(jsonObject["detailsAge"]);
25
34
 
26
35
  return result;
27
36
  }
@@ -33,8 +42,12 @@ export class ResultsStatus {
33
42
  "rfid": this.rfid,
34
43
  "portrait": this.portrait,
35
44
  "stopList": this.stopList,
45
+ "mDL": this.mDL,
46
+ "age": this.age,
47
+ "captureProcessIntegrity": this.captureProcessIntegrity,
36
48
  "detailsOptical": this.detailsOptical?.toJson(),
37
49
  "detailsRFID": this.detailsRFID?.toJson(),
50
+ "detailsAge": this.ageStatus?.toJson(),
38
51
  }
39
52
  }
40
53
  }
@@ -0,0 +1,23 @@
1
+ import { BytesData } from './BytesData';
2
+
3
+ export class DocFeature {
4
+ type
5
+ data
6
+
7
+ static fromJson(jsonObject) {
8
+ if (jsonObject == null) return null;
9
+
10
+ const result = new DocFeature();
11
+ result.type = jsonObject["type"];
12
+ result.data = BytesData.fromJson(jsonObject["data"]);
13
+
14
+ return result;
15
+ }
16
+
17
+ toJson() {
18
+ return {
19
+ "type": this.type,
20
+ "data": this.data?.toJson(),
21
+ }
22
+ }
23
+ }
@@ -0,0 +1,75 @@
1
+ import { CertificateChain } from '../rfid/CertificateChain';
2
+ import { BytesData } from './BytesData';
3
+ import { DocFeature } from './DocFeature';
4
+
5
+ export class VDSData {
6
+ type
7
+ docType
8
+ featureRef
9
+ version
10
+ issuingCountry
11
+ docIssueDate
12
+ signature
13
+ signatureDate
14
+ signer
15
+ certificate
16
+ certificateChain
17
+ docFeatures
18
+ notifications
19
+
20
+ static fromJson(jsonObject) {
21
+ if (jsonObject == null) return null;
22
+ const result = new VDSData();
23
+
24
+ result.type = jsonObject["type"];
25
+ result.docType = jsonObject["docType"];
26
+ result.featureRef = jsonObject["featureRef"];
27
+ result.version = jsonObject["version"];
28
+ result.issuingCountry = jsonObject["issuingCountry"];
29
+ result.docIssueDate = jsonObject["docIssueDate"];
30
+ result.signature = BytesData.fromJson(jsonObject["signature"]);
31
+ result.signatureDate = jsonObject["signatureDate"];
32
+ result.signer = jsonObject["signer"];
33
+ result.certificate = jsonObject["certificate"];
34
+ result.notifications = jsonObject["notifications"];
35
+
36
+ if (jsonObject["certificateChain"] != null) {
37
+ result.certificateChain = [];
38
+ for (const item of jsonObject["certificateChain"]) {
39
+ const certificateChain = CertificateChain.fromJson(item);
40
+ if (certificateChain != null) {
41
+ result.certificateChain.push(certificateChain);
42
+ }
43
+ }
44
+ }
45
+ if (jsonObject["docFeatures"] != null) {
46
+ result.docFeatures = [];
47
+ for (const item of jsonObject["docFeatures"]) {
48
+ const docFeature = DocFeature.fromJson(item);
49
+ if (docFeature != null) {
50
+ result.docFeatures.push(docFeature);
51
+ }
52
+ }
53
+ }
54
+
55
+ return result;
56
+ }
57
+
58
+ toJson() {
59
+ return {
60
+ "type": this.type,
61
+ "docType": this.docType,
62
+ "featureRef": this.featureRef,
63
+ "version": this.version,
64
+ "issuingCountry": this.issuingCountry,
65
+ "docIssueDate": this.docIssueDate,
66
+ "signature": this.signature?.toJson(),
67
+ "signatureDate": this.signatureDate,
68
+ "signer": this.signer,
69
+ "certificate": this.certificate,
70
+ "certificateChain": this.certificateChain?.map(e => e.toJson()),
71
+ "docFeatures": this.docFeatures?.map(e => e.toJson()),
72
+ "notifications": this.notifications,
73
+ }
74
+ }
75
+ }
@@ -653,6 +653,9 @@ export const FieldType = {
653
653
  NATIONALITY_CODE_ALPHA_2: 697,
654
654
  FIRST_ISSUE_DATE_CHECKDIGIT: 698,
655
655
  FIRST_ISSUE_DATE_CHECKSUM: 699,
656
+ COMMERCIAL_INDICATOR: 701,
657
+ NON_DOMICILED_INDICATOR: 702,
658
+ JURISDICTION_SPECIFIC_DATA: 703,
656
659
  }
657
660
 
658
661
  FieldType.getTranslation = async function (value) {
@@ -36,6 +36,9 @@ export const PKDResourceType = {
36
36
  DEFL: 5,
37
37
  DEVL: 6,
38
38
  BL: 7,
39
+ LDIF_TA: 8,
40
+ ML_TA: 9,
41
+ CBOR: 10,
39
42
 
40
43
  getType(value) {
41
44
  switch (value) {