@regulaforensics/document-reader 9.4.715-nightly → 9.4.717-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 (36) hide show
  1. package/RNDocumentReader.podspec +2 -2
  2. package/android/build.gradle +2 -2
  3. package/android/cordova.gradle +2 -2
  4. package/android/src/main/java/com/regula/plugin/documentreader/JSONConstructor.kt +0 -36
  5. package/android/src/main/java/com/regula/plugin/documentreader/Main.kt +43 -46
  6. package/examples/capacitor/package-lock.json +15 -15
  7. package/examples/capacitor/package.json +1 -1
  8. package/examples/ionic/package-lock.json +235 -208
  9. package/examples/ionic/package.json +2 -3
  10. package/examples/react_native/package-lock.json +30 -33
  11. package/examples/react_native/package.json +1 -1
  12. package/ios/RGLWJSONConstructor.h +0 -4
  13. package/ios/RGLWJSONConstructor.m +47 -93
  14. package/ios/RGLWMain.h +4 -2
  15. package/ios/RGLWMain.m +13 -49
  16. package/ios/RNDocumentReader.m +0 -2
  17. package/package.json +1 -1
  18. package/plugin.xml +2 -2
  19. package/test/json.tsx +0 -11
  20. package/test/package-lock.json +1 -1
  21. package/test/test.tsx +2 -4
  22. package/www/capacitor/config/RFIDConfig.js +0 -14
  23. package/www/capacitor/index.js +7 -9
  24. package/www/capacitor/internal/bridge.js +1 -19
  25. package/www/cordova.js +29 -152
  26. package/www/react-native/config/RFIDConfig.js +0 -14
  27. package/www/react-native/index.js +7 -9
  28. package/www/react-native/internal/bridge.js +1 -19
  29. package/www/types/config/RFIDConfig.d.ts +3 -35
  30. package/www/types/index.d.ts +1 -3
  31. package/www/capacitor/rfid/CAProtocol.js +0 -27
  32. package/www/capacitor/rfid/PACEProtocol.js +0 -24
  33. package/www/react-native/rfid/CAProtocol.js +0 -27
  34. package/www/react-native/rfid/PACEProtocol.js +0 -24
  35. package/www/types/rfid/CAProtocol.d.ts +0 -6
  36. package/www/types/rfid/PACEProtocol.d.ts +0 -5
@@ -18,7 +18,7 @@
18
18
  "@ionic/cordova-builders": "^12.3.0",
19
19
  "@awesome-cordova-plugins/camera": "^8.1.0",
20
20
  "@awesome-cordova-plugins/file": "^8.1.0",
21
- "@regulaforensics/document-reader": "9.4.715-nightly",
21
+ "@regulaforensics/document-reader": "9.4.717-rc",
22
22
  "@regulaforensics/document-reader-core-fullauthrfid": "9.3.1817",
23
23
  "@regulaforensics/document-reader-btdevice": "9.1.35",
24
24
  "cordova-android": "^14.0.1",
@@ -31,8 +31,7 @@
31
31
  "ajv": "^8.18.0",
32
32
  "serialize-javascript": "^7.0.4",
33
33
  "@angular/compiler": "^21.2.4",
34
- "undici": "^7.24.0",
35
- "picomatch": "^4.0.4"
34
+ "undici": "^7.24.0"
36
35
  },
37
36
  "cordova": {
38
37
  "plugins": {
@@ -3036,9 +3036,9 @@
3036
3036
  }
3037
3037
  },
3038
3038
  "node_modules/@xmldom/xmldom": {
3039
- "version": "0.8.12",
3040
- "resolved": "https://registry.npmjs.org/@xmldom/xmldom/-/xmldom-0.8.12.tgz",
3041
- "integrity": "sha512-9k/gHF6n/pAi/9tqr3m3aqkuiNosYTurLLUtc7xQ9sxB/wm7WPygCv8GYa6mS0fLJEHhqMC1ATYhz++U/lRHqg==",
3039
+ "version": "0.8.11",
3040
+ "resolved": "https://registry.npmjs.org/@xmldom/xmldom/-/xmldom-0.8.11.tgz",
3041
+ "integrity": "sha512-cQzWCtO6C8TQiYl1ruKNn2U6Ao4o4WBBcbL61yJl84x+j5sOWWFU9X7DpND8XZG3daDppSsigMdfAIl2upQBRw==",
3042
3042
  "license": "MIT",
3043
3043
  "engines": {
3044
3044
  "node": ">=10.0.0"
@@ -3183,9 +3183,9 @@
3183
3183
  }
3184
3184
  },
3185
3185
  "node_modules/anymatch/node_modules/picomatch": {
3186
- "version": "2.3.2",
3187
- "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.2.tgz",
3188
- "integrity": "sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA==",
3186
+ "version": "2.3.1",
3187
+ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz",
3188
+ "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==",
3189
3189
  "license": "MIT",
3190
3190
  "engines": {
3191
3191
  "node": ">=8.6"
@@ -3527,9 +3527,9 @@
3527
3527
  }
3528
3528
  },
3529
3529
  "node_modules/brace-expansion": {
3530
- "version": "2.0.3",
3531
- "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.3.tgz",
3532
- "integrity": "sha512-MCV/fYJEbqx68aE58kv2cA/kiky1G8vux3OR6/jbS+jIMe/6fJWa0DTzJU7dqijOWYwHi1t29FlfYI9uytqlpA==",
3530
+ "version": "2.0.2",
3531
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.2.tgz",
3532
+ "integrity": "sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==",
3533
3533
  "license": "MIT",
3534
3534
  "dependencies": {
3535
3535
  "balanced-match": "^1.0.0"
@@ -4734,9 +4734,9 @@
4734
4734
  }
4735
4735
  },
4736
4736
  "node_modules/glob/node_modules/brace-expansion": {
4737
- "version": "1.1.13",
4738
- "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.13.tgz",
4739
- "integrity": "sha512-9ZLprWS6EENmhEOpjCYW2c8VkmOvckIJZfkr7rBW6dObmfgJ/L1GpSYW5Hpo9lDz4D1+n0Ckz8rU7FwHDQiG/w==",
4737
+ "version": "1.1.12",
4738
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz",
4739
+ "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==",
4740
4740
  "license": "MIT",
4741
4741
  "dependencies": {
4742
4742
  "balanced-match": "^1.0.0",
@@ -5168,9 +5168,9 @@
5168
5168
  }
5169
5169
  },
5170
5170
  "node_modules/jest-util/node_modules/picomatch": {
5171
- "version": "2.3.2",
5172
- "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.2.tgz",
5173
- "integrity": "sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA==",
5171
+ "version": "2.3.1",
5172
+ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz",
5173
+ "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==",
5174
5174
  "license": "MIT",
5175
5175
  "engines": {
5176
5176
  "node": ">=8.6"
@@ -6426,9 +6426,9 @@
6426
6426
  }
6427
6427
  },
6428
6428
  "node_modules/micromatch/node_modules/picomatch": {
6429
- "version": "2.3.2",
6430
- "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.2.tgz",
6431
- "integrity": "sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA==",
6429
+ "version": "2.3.1",
6430
+ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz",
6431
+ "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==",
6432
6432
  "license": "MIT",
6433
6433
  "engines": {
6434
6434
  "node": ">=8.6"
@@ -6596,9 +6596,9 @@
6596
6596
  "license": "MIT"
6597
6597
  },
6598
6598
  "node_modules/node-forge": {
6599
- "version": "1.4.0",
6600
- "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-1.4.0.tgz",
6601
- "integrity": "sha512-LarFH0+6VfriEhqMMcLX2F7SwSXeWwnEAJEsYm5QKWchiVYVvJyV9v7UDvUv+w5HO23ZpQTXDv/GxdDdMyOuoQ==",
6599
+ "version": "1.3.2",
6600
+ "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-1.3.2.tgz",
6601
+ "integrity": "sha512-6xKiQ+cph9KImrRh0VsjH2d8/GXA4FIMlgU4B757iI1ApvcyA9VlouP0yZJha01V+huImO+kKMU7ih+2+E14fw==",
6602
6602
  "license": "(BSD-3-Clause OR GPL-2.0)",
6603
6603
  "engines": {
6604
6604
  "node": ">= 6.13.0"
@@ -6953,9 +6953,9 @@
6953
6953
  "license": "ISC"
6954
6954
  },
6955
6955
  "node_modules/picomatch": {
6956
- "version": "3.0.2",
6957
- "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-3.0.2.tgz",
6958
- "integrity": "sha512-cfDHL6LStTEKlNilboNtobT/kEa30PtAf2Q1OgszfrG/rpVl1xaFWT9ktfkS306GmHgmnad1Sw4wabhlvFtsTw==",
6956
+ "version": "3.0.1",
6957
+ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-3.0.1.tgz",
6958
+ "integrity": "sha512-I3EurrIQMlRc9IaAZnqRR044Phh2DXY+55o7uJ0V+hYZAcQYSuFWsc9q5PvyDHUSCe1Qxn/iBz+78s86zWnGag==",
6959
6959
  "license": "MIT",
6960
6960
  "engines": {
6961
6961
  "node": ">=10"
@@ -8204,9 +8204,9 @@
8204
8204
  }
8205
8205
  },
8206
8206
  "node_modules/test-exclude/node_modules/brace-expansion": {
8207
- "version": "1.1.13",
8208
- "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.13.tgz",
8209
- "integrity": "sha512-9ZLprWS6EENmhEOpjCYW2c8VkmOvckIJZfkr7rBW6dObmfgJ/L1GpSYW5Hpo9lDz4D1+n0Ckz8rU7FwHDQiG/w==",
8207
+ "version": "1.1.12",
8208
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.12.tgz",
8209
+ "integrity": "sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==",
8210
8210
  "license": "MIT",
8211
8211
  "dependencies": {
8212
8212
  "balanced-match": "^1.0.0",
@@ -8706,18 +8706,15 @@
8706
8706
  "license": "ISC"
8707
8707
  },
8708
8708
  "node_modules/yaml": {
8709
- "version": "2.8.3",
8710
- "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.8.3.tgz",
8711
- "integrity": "sha512-AvbaCLOO2Otw/lW5bmh9d/WEdcDFdQp2Z2ZUH3pX9U2ihyUY0nvLv7J6TrWowklRGPYbB/IuIMfYgxaCPg5Bpg==",
8709
+ "version": "2.8.1",
8710
+ "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.8.1.tgz",
8711
+ "integrity": "sha512-lcYcMxX2PO9XMGvAJkJ3OsNMw+/7FKes7/hgerGUYWIoWu5j/+YQqcZr5JnPZWzOsEBgMbSbiSTn/dv/69Mkpw==",
8712
8712
  "license": "ISC",
8713
8713
  "bin": {
8714
8714
  "yaml": "bin.mjs"
8715
8715
  },
8716
8716
  "engines": {
8717
8717
  "node": ">= 14.6"
8718
- },
8719
- "funding": {
8720
- "url": "https://github.com/sponsors/eemeli"
8721
8718
  }
8722
8719
  },
8723
8720
  "node_modules/yargs": {
@@ -8,7 +8,7 @@
8
8
  "start": "expo start"
9
9
  },
10
10
  "dependencies": {
11
- "@regulaforensics/document-reader": "9.4.715-nightly",
11
+ "@regulaforensics/document-reader": "9.4.717-rc",
12
12
  "@regulaforensics/document-reader-core-fullauthrfid": "9.3.1817",
13
13
  "@regulaforensics/document-reader-btdevice": "9.1.35",
14
14
  "react-native": "^0.81.4",
@@ -198,10 +198,6 @@
198
198
  +(NSDictionary* _Nullable)generateDocumentRequestMDL:(RGLDocumentRequestMDL* _Nullable)input;
199
199
  +(RGLFinalizeConfig* _Nullable)finalizeConfigFromJson:(NSDictionary* _Nullable)input;
200
200
  +(NSDictionary* _Nullable)generateFinalizeConfig:(RGLFinalizeConfig* _Nullable)input;
201
- +(RGLRFIDAccessControlPACE* _Nullable)paceProtocolFromJson:(NSDictionary* _Nullable)input;
202
- +(NSDictionary* _Nullable)generatePaceProtocol:(RGLRFIDAccessControlPACE* _Nullable)input;
203
- +(RGLRFIDAccessControlCA* _Nullable)caProtocolFromJson:(NSDictionary* _Nullable)input;
204
- +(NSDictionary* _Nullable)generateCaProtocol:(RGLRFIDAccessControlCA* _Nullable)input;
205
201
 
206
202
  @end
207
203
 
@@ -61,22 +61,22 @@ static NSMutableArray* weakReferencesHolder;
61
61
  +(NSDictionary*)generateError:(NSError*)input {
62
62
  if(input == nil) return nil;
63
63
  NSMutableDictionary *result = [NSMutableDictionary new];
64
-
64
+
65
65
  result[@"code"] = [NSNumber numberWithInteger:input.code];
66
66
  result[@"message"] = input.localizedDescription;
67
-
67
+
68
68
  return result;
69
69
  }
70
70
 
71
71
  +(NSString*)generateCompletion:(NSNumber*)action :(RGLDocumentReaderResults*)results :(NSError*)error {
72
72
  NSMutableDictionary *result = [NSMutableDictionary new];
73
73
  int actionInt = [action intValue];
74
-
74
+
75
75
  if(actionInt == 0 || actionInt == 2 || actionInt == 3 || actionInt == 4 || actionInt == 6)
76
76
  result[@"results"] = [self generateDocumentReaderResults:results];
77
77
  result[@"action"] = action;
78
78
  result[@"error"] = [self generateError:error];
79
-
79
+
80
80
  return [RGLWJSONConstructor dictToString: result];
81
81
  }
82
82
 
@@ -100,11 +100,11 @@ static NSMutableArray* weakReferencesHolder;
100
100
 
101
101
  +(NSString*)generateFinalizePackageCompletion:(NSNumber*)action :(RGLTransactionInfo*)info :(NSError*)error {
102
102
  NSMutableDictionary *result = [NSMutableDictionary new];
103
-
103
+
104
104
  result[@"action"] = action;
105
105
  result[@"info"] = [self generateTransactionInfo:info];
106
106
  result[@"error"] = [self generateError:error];
107
-
107
+
108
108
  return [RGLWJSONConstructor dictToString: result];
109
109
  }
110
110
 
@@ -158,12 +158,12 @@ static NSMutableArray* weakReferencesHolder;
158
158
  if (!input) return nil;
159
159
  if (!input[@"license"]) return nil;
160
160
  RGLConfig *config = [[RGLConfig alloc] initWithLicenseData:[self base64Decode: input[@"license"]]];
161
-
161
+
162
162
  if (input[@"databasePath"]) config.databasePath = input[@"databasePath"];
163
163
  if (input[@"licenseUpdateTimeout"]) config.licenseUpdateTimeout = input[@"licenseUpdateTimeout"];
164
164
  if (input[@"licenseUpdate"]) config.licenseUpdateCheck = [input[@"licenseUpdate"] boolValue];
165
165
  if (input[@"delayedNNLoad"]) config.delayedNNLoadEnabled = [input[@"delayedNNLoad"] boolValue];
166
-
166
+
167
167
  return config;
168
168
  }
169
169
 
@@ -176,19 +176,19 @@ static NSMutableArray* weakReferencesHolder;
176
176
  result[@"licenseUpdateTimeout"] = input.licenseUpdateTimeout;
177
177
  result[@"licenseUpdate"] = @(input.licenseUpdateCheck);
178
178
  result[@"delayedNNLoad"] = @(input.delayedNNLoadEnabled);
179
-
179
+
180
180
  return result;
181
181
  }
182
182
 
183
183
  +(RGLBleConfig*)bleDeviceConfigFromJson:(NSDictionary*)input :(RGLBluetooth*)bluetooth {
184
184
  if (!input) return nil;
185
185
  RGLBleConfig *config = [[RGLBleConfig alloc] initWithBluetooth:bluetooth];
186
-
186
+
187
187
  if (input[@"databasePath"]) config.databasePath = input[@"databasePath"];
188
188
  if (input[@"licenseUpdateTimeout"]) config.licenseUpdateTimeout = input[@"licenseUpdateTimeout"];
189
189
  if (input[@"licenseUpdate"]) config.licenseUpdateCheck = [input[@"licenseUpdate"] boolValue];
190
190
  if (input[@"delayedNNLoad"]) config.delayedNNLoadEnabled = [input[@"delayedNNLoad"] boolValue];
191
-
191
+
192
192
  return config;
193
193
  }
194
194
 
@@ -223,7 +223,7 @@ static NSMutableArray* weakReferencesHolder;
223
223
  RGLRecognizeConfig *config = [RGLRecognizeConfig alloc];
224
224
  if (input[@"scenario"]) config = [config initWithScenario:input[@"scenario"]];
225
225
  else config = [config initWithOnlineProcessingConfig:[self onlineProcessingConfigFromJson:input[@"onlineProcessingConfig"]]];
226
-
226
+
227
227
  if (input[@"image"]) config.image = [RGLWJSONConstructor imageWithBase64:input[@"image"]];
228
228
  if (input[@"data"]) config.imageData = [RGLWJSONConstructor base64Decode:input[@"data"]];
229
229
  if (input[@"images"]) {
@@ -238,13 +238,13 @@ static NSMutableArray* weakReferencesHolder;
238
238
  [imageInputs addObject:[RGLWJSONConstructor imageInputFromJson: imageInput]];
239
239
  config.imageInputs = imageInputs;
240
240
  }
241
-
241
+
242
242
  if (input[@"scenario"]) config.scenario = input[@"scenario"];
243
243
  if (input[@"livePortrait"]) config.livePortrait = [self imageWithBase64:input[@"livePortrait"]];
244
244
  if (input[@"extPortrait"]) config.extPortrait = [self imageWithBase64:input[@"extPortrait"]];
245
245
  if (input[@"oneShotIdentification"]) config.oneShotIdentification = input[@"oneShotIdentification"];
246
246
  if (input[@"dtc"]) config.dtc = [RGLWJSONConstructor base64Decode:input[@"dtc"]];
247
-
247
+
248
248
  return config;
249
249
  }
250
250
 
@@ -533,10 +533,10 @@ static NSMutableArray* weakReferencesHolder;
533
533
 
534
534
  +(RGLRFIDParams*)rfidParamsFromJson:(NSDictionary*)input {
535
535
  RGLRFIDParams* result = [RGLRFIDParams new];
536
-
536
+
537
537
  if([input valueForKey:@"paIgnoreNotificationCodes"] != nil)
538
538
  result.paIgnoreNotificationCodes = [input valueForKey:@"paIgnoreNotificationCodes"];
539
-
539
+
540
540
  return result;
541
541
  }
542
542
 
@@ -561,7 +561,7 @@ static NSMutableArray* weakReferencesHolder;
561
561
 
562
562
  +(RGLFaceAPIParams*)faceAPIParamsFromJson:(NSDictionary*)input {
563
563
  RGLFaceAPIParams* result = [RGLFaceAPIParams defaultParams];
564
-
564
+
565
565
  if([input valueForKey:@"url"] != nil)
566
566
  result.url = [input valueForKey:@"url"];
567
567
  if([input valueForKey:@"mode"] != nil)
@@ -578,7 +578,7 @@ static NSMutableArray* weakReferencesHolder;
578
578
  result.proxyPassword = [input valueForKey:@"proxyPassword"];
579
579
  if([input valueForKey:@"proxyType"] != nil)
580
580
  result.proxyType = [input valueForKey:@"proxyType"];
581
-
581
+
582
582
  return result;
583
583
  }
584
584
 
@@ -600,14 +600,14 @@ static NSMutableArray* weakReferencesHolder;
600
600
 
601
601
  +(RGLFaceAPISearchParams*)faceAPISearchParamsFromJson:(NSDictionary*)input {
602
602
  RGLFaceAPISearchParams* result = [RGLFaceAPISearchParams new];
603
-
603
+
604
604
  if([input valueForKey:@"limit"] != nil)
605
605
  result.limit = [input valueForKey:@"limit"];
606
606
  if([input valueForKey:@"threshold"] != nil)
607
607
  result.threshold = [input valueForKey:@"threshold"];
608
608
  if([input valueForKey:@"groupIds"] != nil)
609
609
  result.groupIDs = [input valueForKey:@"groupIds"];
610
-
610
+
611
611
  return result;
612
612
  }
613
613
 
@@ -1055,7 +1055,7 @@ static NSMutableArray* weakReferencesHolder;
1055
1055
  result[@"notificationCode"] = @(input.code & -0x10000);
1056
1056
  result[@"dataFileType"] = @((int)input.attachment);
1057
1057
  result[@"progress"] = @((int)input.value);
1058
-
1058
+
1059
1059
  return [RGLWJSONConstructor dictToString: result];
1060
1060
  }
1061
1061
 
@@ -1714,10 +1714,10 @@ static NSMutableArray* weakReferencesHolder;
1714
1714
  +(NSDictionary*)generateDataField:(RGLDataField*)input {
1715
1715
  NSMutableDictionary *result = [NSMutableDictionary new];
1716
1716
  if(input == nil) return nil;
1717
-
1717
+
1718
1718
  result[@"data"] = input.data;
1719
1719
  result[@"fieldType"] = @(input.fieldType);
1720
-
1720
+
1721
1721
  return result;
1722
1722
  }
1723
1723
 
@@ -1835,7 +1835,7 @@ static NSMutableArray* weakReferencesHolder;
1835
1835
  for(NSDictionary* item in [input valueForKey:@"checks"])
1836
1836
  [array addObject:[self authenticityCheckFromJson:item]];
1837
1837
  RGLDocumentReaderAuthenticityResult* result = [[RGLDocumentReaderAuthenticityResult alloc]
1838
- initWithAuthenticityChecks:array];
1838
+ initWithAuthenticityChecks:array];
1839
1839
  if (input[@"status"]) [result setValue:input[@"status"] forKey:@"_security"];
1840
1840
  return result;
1841
1841
  }
@@ -2434,7 +2434,7 @@ static NSMutableArray* weakReferencesHolder;
2434
2434
  for (NSString* key in map) {
2435
2435
  [result addField:key intentToRetain:[map[key] integerValue]];
2436
2436
  }
2437
-
2437
+
2438
2438
  return result;
2439
2439
 
2440
2440
  }
@@ -2459,7 +2459,7 @@ static NSMutableArray* weakReferencesHolder;
2459
2459
  [nameSpaces addObject:[self nameSpaceMDLFromJson: item]];
2460
2460
  }
2461
2461
  [result setValue:nameSpaces forKey:@"nameSpaces"];
2462
-
2462
+
2463
2463
  return result;
2464
2464
 
2465
2465
  }
@@ -2632,7 +2632,7 @@ static NSMutableArray* weakReferencesHolder;
2632
2632
  if (input[@"video"]) result.video = [input[@"video"] boolValue];
2633
2633
  if (input[@"rfidSession"]) result.rfidSession = [input[@"rfidSession"] boolValue];
2634
2634
  if (input[@"mdlSession"]) result.mdlSession = [input[@"mdlSession"] boolValue];
2635
-
2635
+
2636
2636
  return result;
2637
2637
  }
2638
2638
 
@@ -2648,52 +2648,6 @@ static NSMutableArray* weakReferencesHolder;
2648
2648
  return result;
2649
2649
  }
2650
2650
 
2651
- +(RGLRFIDAccessControlPACE*)paceProtocolFromJson:(NSDictionary*)input {
2652
- NSMutableDictionary* json = input.mutableCopy;
2653
-
2654
- json[@"Version"] = input[@"version"];
2655
- json[@"StdDomainParams"] = input[@"stdDomainParams"];
2656
- json[@"KeyAlgorithm"] = input[@"keyAlgorithm"];
2657
- #pragma clang diagnostic ignored "-Warc-performSelector-leaks"
2658
- return [[RGLRFIDAccessControlPACE alloc] performSelector:NSSelectorFromString(@"initWithJSON:") withObject:json];
2659
- #pragma clang diagnostic pop
2660
- }
2661
-
2662
- +(NSDictionary*)generatePaceProtocol:(RGLRFIDAccessControlPACE*)input {
2663
- if(input == nil) return nil;
2664
- NSMutableDictionary* result = [NSMutableDictionary new];
2665
-
2666
- result[@"version"] = [NSString stringWithFormat:@"%ld", (long)input.version];
2667
- result[@"stdDomainParams"] = input.stdDomainParams;
2668
- result[@"keyAlgorithm"] = input.keyAlgorithm;
2669
-
2670
- return result;
2671
- }
2672
-
2673
- +(RGLRFIDAccessControlCA*)caProtocolFromJson:(NSDictionary*)input {
2674
- NSMutableDictionary* json = input.mutableCopy;
2675
-
2676
- json[@"Version"] = input[@"version"];
2677
- json[@"Scheme"] = input[@"scheme"];
2678
- json[@"KeyAlgorithm"] = input[@"keyAlgorithm"];
2679
- json[@"ChipIndividual"] = input[@"chipIndividual"];
2680
- #pragma clang diagnostic ignored "-Warc-performSelector-leaks"
2681
- return [[RGLRFIDAccessControlCA alloc] performSelector:NSSelectorFromString(@"initWithJSON:") withObject:json];
2682
- #pragma clang diagnostic pop
2683
- }
2684
-
2685
- +(NSDictionary*)generateCaProtocol:(RGLRFIDAccessControlCA*)input {
2686
- if(input == nil) return nil;
2687
- NSMutableDictionary* result = [NSMutableDictionary new];
2688
-
2689
- result[@"version"] = [NSString stringWithFormat:@"%ld", (long)input.version];
2690
- result[@"scheme"] = input.scheme;
2691
- result[@"keyAlgorithm"] = input.keyAlgorithm;
2692
- result[@"chipIndividual"] = [NSNumber numberWithBool: input.chipIndividual];
2693
-
2694
- return result;
2695
- }
2696
-
2697
2651
  +(RGLDocumentReaderResults*)documentReaderResultsFromJson:(NSDictionary*)input {
2698
2652
  NSMutableArray<RGLDocumentReaderDocumentType*>* documentType = [NSMutableArray new];
2699
2653
  for(NSDictionary* item in [input valueForKey:@"documentType"]){
@@ -2717,26 +2671,26 @@ static NSMutableArray* weakReferencesHolder;
2717
2671
  }
2718
2672
 
2719
2673
  RGLDocumentReaderResults* result = [[RGLDocumentReaderResults alloc]
2720
- initWithDocumentTypes:documentType
2721
- textResult:[self documentReaderTextResultFromJson: [input valueForKey:@"textResult"]]
2722
- graphicResult:[self documentReaderGraphicResultFromJson: [input valueForKey:@"graphicResult"]]
2723
- rawResult:[input valueForKey:@"rawResult"]
2724
- documentPosition:documentPosition
2725
- barcodePosition:barcodePosition
2726
- mrzPosition:mrzPosition
2727
- imageQualityGroup:imageQuality
2728
- authenticityResults:[self documentReaderAuthenticityResultFromJson: [input valueForKey:@"authenticityResult"]]
2729
- rfidSessionData:[self rfidSessionDataFromJson: [input valueForKey:@"rfidSessionData"]]
2730
- chipPage:[[input valueForKey:@"chipPage"] integerValue]
2731
- barcodeResult:[self documentReaderBarcodeResultFromJson: [input valueForKey:@"barcodeResult"]]
2732
- vdsncData:[self vdsncDataFromJson: [input valueForKey:@"vdsncData"]]
2733
- vdsData:[self vdsDataFromJson: [input valueForKey:@"vdsData"]]
2734
- status:[self documentReaderResultsStatusFromJson: [input valueForKey:@"status"]]
2735
- processingFinished:[[input valueForKey:@"processingFinishedStatus"] integerValue]
2736
- morePagesAvailable:[[input valueForKey:@"morePagesAvailable"] integerValue]
2737
- elapsedTime:[[input valueForKey:@"elapsedTime"] integerValue]
2738
- elapsedTimeRFID:[[input valueForKey:@"elapsedTimeRFID"] integerValue]
2739
- transactionInfo:[self transactionInfoFromJson:[input valueForKey:@"transactionInfo"]]];
2674
+ initWithDocumentTypes:documentType
2675
+ textResult:[self documentReaderTextResultFromJson: [input valueForKey:@"textResult"]]
2676
+ graphicResult:[self documentReaderGraphicResultFromJson: [input valueForKey:@"graphicResult"]]
2677
+ rawResult:[input valueForKey:@"rawResult"]
2678
+ documentPosition:documentPosition
2679
+ barcodePosition:barcodePosition
2680
+ mrzPosition:mrzPosition
2681
+ imageQualityGroup:imageQuality
2682
+ authenticityResults:[self documentReaderAuthenticityResultFromJson: [input valueForKey:@"authenticityResult"]]
2683
+ rfidSessionData:[self rfidSessionDataFromJson: [input valueForKey:@"rfidSessionData"]]
2684
+ chipPage:[[input valueForKey:@"chipPage"] integerValue]
2685
+ barcodeResult:[self documentReaderBarcodeResultFromJson: [input valueForKey:@"barcodeResult"]]
2686
+ vdsncData:[self vdsncDataFromJson: [input valueForKey:@"vdsncData"]]
2687
+ vdsData:[self vdsDataFromJson: [input valueForKey:@"vdsData"]]
2688
+ status:[self documentReaderResultsStatusFromJson: [input valueForKey:@"status"]]
2689
+ processingFinished:[[input valueForKey:@"processingFinishedStatus"] integerValue]
2690
+ morePagesAvailable:[[input valueForKey:@"morePagesAvailable"] integerValue]
2691
+ elapsedTime:[[input valueForKey:@"elapsedTime"] integerValue]
2692
+ elapsedTimeRFID:[[input valueForKey:@"elapsedTimeRFID"] integerValue]
2693
+ transactionInfo:[self transactionInfoFromJson:[input valueForKey:@"transactionInfo"]]];
2740
2694
 
2741
2695
  [result setValue:[RGLWJSONConstructor base64Decode:input[@"dtcData"]] forKey:@"dtcData"];
2742
2696
  [result setValue:input[@"bsiTr03135Results"] forKey:@"bsiTr03135Results"];
package/ios/RGLWMain.h CHANGED
@@ -18,6 +18,10 @@ extern UIViewController*_Nonnull(^ _Nonnull RGLWRootViewController)(void);
18
18
  :(RGLWCallback _Nonnull)callback
19
19
  :(RGLWEventSender _Nonnull)eventSender;
20
20
 
21
+ @property NSNumber* _Nonnull doRequestPACertificates;
22
+ @property NSNumber* _Nonnull doRequestTACertificates;
23
+ @property NSNumber* _Nonnull doRequestTASignature;
24
+
21
25
  @end
22
26
 
23
27
  static NSString* _Nonnull completionEvent = @"completion";
@@ -28,7 +32,5 @@ static NSString* _Nonnull rfidOnRetryReadChipEvent = @"rfidOnRetryReadChipEvent"
28
32
  static NSString* _Nonnull paCertificateCompletionEvent = @"pa_certificate_completion";
29
33
  static NSString* _Nonnull taCertificateCompletionEvent = @"ta_certificate_completion";
30
34
  static NSString* _Nonnull taSignatureCompletionEvent = @"ta_signature_completion";
31
- static NSString* _Nonnull paceProtocolCompletionEvent = @"paceProtocolCompletionEvent";
32
- static NSString* _Nonnull caProtocolCompletionEvent = @"caProtocolCompletionEvent";
33
35
  static NSString* _Nonnull drVideoEncoderCompletionEvent = @"video_encoder_completion";
34
36
  static NSString* _Nonnull drOnCustomButtonTappedEvent = @"onCustomButtonTappedEvent";
package/ios/RGLWMain.m CHANGED
@@ -41,14 +41,12 @@
41
41
  @"recognize": ^{ [self recognize :args[0]]; },
42
42
  @"startNewPage": ^{ [self startNewPage]; },
43
43
  @"stopScanner": ^{ [self stopScanner]; },
44
- @"startRFIDReader": ^{ [self startRFIDReader :args[0]]; },
45
- @"readRFID": ^{ [self readRFID :args[0]]; },
44
+ @"startRFIDReader": ^{ [self startRFIDReader :args[0] :args[1] :args[2]]; },
45
+ @"readRFID": ^{ [self readRFID :args[0] :args[1] :args[2]]; },
46
46
  @"stopRFIDReader": ^{ [self stopRFIDReader]; },
47
47
  @"providePACertificates": ^{ [self providePACertificates :args[0]]; },
48
48
  @"provideTACertificates": ^{ [self provideTACertificates :args[0]]; },
49
49
  @"provideTASignature": ^{ [self provideTASignature :args[0]]; },
50
- @"selectPACEProtocol": ^{ [self selectPACEProtocol :args[0]]; },
51
- @"selectCAProtocol": ^{ [self selectCAProtocol :args[0]]; },
52
50
  @"setTCCParams": ^{ [self setTCCParams :args[0] :callback]; },
53
51
  @"addPKDCertificates": ^{ [self addPKDCertificates :args[0]]; },
54
52
  @"clearPKDCertificates": ^{ [self clearPKDCertificates]; },
@@ -251,15 +249,19 @@ static NSDictionary* headers;
251
249
  });
252
250
  }
253
251
 
254
- +(void)startRFIDReader:(NSDictionary*)config {
255
- rfidReaderRequest = config;
252
+ +(void)startRFIDReader:(NSNumber*)paCert :(NSNumber*)taCert :(NSNumber*)taSig {
253
+ this.doRequestPACertificates = paCert;
254
+ this.doRequestTACertificates = taCert;
255
+ this.doRequestTASignature = taSig;
256
256
  dispatch_async(dispatch_get_main_queue(), ^{
257
257
  [RGLDocReader.shared startRFIDReaderFromPresenter:RGLWRootViewController() completion:[self completion]];
258
258
  });
259
259
  }
260
260
 
261
- +(void)readRFID:(NSDictionary*)config {
262
- rfidReaderRequest = config;
261
+ +(void)readRFID:(NSNumber*)paCert :(NSNumber*)taCert :(NSNumber*)taSig {
262
+ this.doRequestPACertificates = paCert;
263
+ this.doRequestTACertificates = taCert;
264
+ this.doRequestTASignature = taSig;
263
265
  [RGLDocReader.shared readRFID:^(RGLRFIDNotificationAction notificationAction, RGLRFIDNotify* _Nullable notification) {
264
266
  if (notification != nil) sendEvent(rfidOnProgressEvent, [RGLWJSONConstructor generateDocumentReaderNotification:notification]);
265
267
  } completion :^(RGLRFIDCompleteAction action, RGLDocumentReaderResults * _Nullable results, NSError * _Nullable error, RGLRFIDErrorCodes errorCode) {
@@ -289,14 +291,6 @@ static NSDictionary* headers;
289
291
  taSignatureCompletion([RGLWJSONConstructor base64Decode:signature]);
290
292
  }
291
293
 
292
- +(void)selectPACEProtocol:(NSDictionary*)protocol {
293
- paceProtocolCompletion([RGLWJSONConstructor paceProtocolFromJson:protocol]);
294
- }
295
-
296
- +(void)selectCAProtocol:(NSDictionary*)protocol {
297
- caProtocolCompletion([RGLWJSONConstructor caProtocolFromJson:protocol]);
298
- }
299
-
300
294
  +(void)setTCCParams:(NSDictionary*)params :(RGLWCallback)callback {
301
295
  [RGLDocReader.shared setTCCParams:[RGLWJSONConstructor tccParamsFromJson:params] completion:^(BOOL success, NSError * _Nullable error) {
302
296
  callback([RGLWJSONConstructor generateSuccessCompletion:success :error]);
@@ -632,13 +626,9 @@ RGLWCallback savedCallbackForBluetoothResult;
632
626
  RGLRFIDCertificatesCallback paCertificateCompletion;
633
627
  RGLRFIDCertificatesCallback taCertificateCompletion;
634
628
  RGLWRFIDSignatureCallback taSignatureCompletion;
635
- RGLRFIDAccessControlPACECallback paceProtocolCompletion;
636
- RGLRFIDAccessControlCACallback caProtocolCompletion;
637
-
638
- NSDictionary* rfidReaderRequest;
639
629
 
640
630
  - (void)onRequestPACertificatesWithSerial:(NSData *)serialNumber issuer:(RGLPAResourcesIssuer *)issuer callback:(RGLRFIDCertificatesCallback)callback {
641
- if (rfidReaderRequest && [rfidReaderRequest[@"paCertificates"] boolValue]) {
631
+ if([self.doRequestPACertificates boolValue]) {
642
632
  paCertificateCompletion = callback;
643
633
  sendEvent(paCertificateCompletionEvent, [RGLWJSONConstructor generatePACertificateCompletion:serialNumber :issuer]);
644
634
  } else {
@@ -648,7 +638,7 @@ NSDictionary* rfidReaderRequest;
648
638
  }
649
639
 
650
640
  - (void)onRequestTACertificatesWithKey:(NSString *)keyCAR callback:(RGLRFIDCertificatesCallback)callback {
651
- if (rfidReaderRequest && [rfidReaderRequest[@"taCertificates"] boolValue]) {
641
+ if([self.doRequestTACertificates boolValue]) {
652
642
  taCertificateCompletion = callback;
653
643
  sendEvent(taCertificateCompletionEvent, keyCAR);
654
644
  } else {
@@ -658,7 +648,7 @@ NSDictionary* rfidReaderRequest;
658
648
  }
659
649
 
660
650
  - (void)onRequestTASignatureWithChallenge:(RGLTAChallenge *)challenge callback:(void(^)(NSData *signature))callback {
661
- if (rfidReaderRequest && [rfidReaderRequest[@"taSignature"] boolValue]) {
651
+ if([self.doRequestTASignature boolValue]) {
662
652
  taSignatureCompletion = callback;
663
653
  sendEvent(taSignatureCompletionEvent, [RGLWJSONConstructor dictToString: [RGLWJSONConstructor generateTAChallenge:challenge]]);
664
654
  } else {
@@ -667,32 +657,6 @@ NSDictionary* rfidReaderRequest;
667
657
  }
668
658
  }
669
659
 
670
- - (void)onRequestPACEProtocolWithOptions:(NSArray<RGLRFIDAccessControlPACE*>*)protocols callback:(RGLRFIDAccessControlPACECallback)callback {
671
- if (rfidReaderRequest && [rfidReaderRequest[@"paceProtocol"] boolValue]) {
672
- paceProtocolCompletion = callback;
673
- NSMutableArray *array = [NSMutableArray new];
674
- for(RGLRFIDAccessControlPACE* item in protocols)
675
- [array addObject:[RGLWJSONConstructor generatePaceProtocol:item]];
676
- sendEvent(paceProtocolCompletionEvent, [RGLWJSONConstructor arrayToString: array]);
677
- } else {
678
- paceProtocolCompletion = nil;
679
- callback(nil);
680
- }
681
- }
682
-
683
- - (void)onRequestCAProtocolWithOptions:(NSArray<RGLRFIDAccessControlCA*>*)protocols callback:(RGLRFIDAccessControlCACallback)callback {
684
- if (rfidReaderRequest && [rfidReaderRequest[@"caProtocol"] boolValue]) {
685
- caProtocolCompletion = callback;
686
- NSMutableArray *array = [NSMutableArray new];
687
- for(RGLRFIDAccessControlCA* item in protocols)
688
- [array addObject:[RGLWJSONConstructor generateCaProtocol:item]];
689
- sendEvent(caProtocolCompletionEvent, [RGLWJSONConstructor arrayToString: array]);
690
- } else {
691
- caProtocolCompletionEvent = nil;
692
- callback(nil);
693
- }
694
- }
695
-
696
660
  - (void)didChipConnected {
697
661
  sendEvent(rfidOnChipDetectedEvent, @"");
698
662
  }
@@ -18,8 +18,6 @@ static NSMutableArray<RCTResponseSenderBlock>* _firedCallbacks = nil;
18
18
  paCertificateCompletionEvent,
19
19
  taCertificateCompletionEvent,
20
20
  taSignatureCompletionEvent,
21
- paceProtocolCompletionEvent,
22
- caProtocolCompletionEvent,
23
21
  drVideoEncoderCompletionEvent,
24
22
  drOnCustomButtonTappedEvent];
25
23
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@regulaforensics/document-reader",
3
- "version": "9.4.715-nightly",
3
+ "version": "9.4.717-rc",
4
4
  "description": "This is an npm module for Regula Document Reader SDK. It allows you to read various kinds of identification documents using your phone's camera.",
5
5
  "main": "www/react-native/index.js",
6
6
  "module": "www/capacitor/index.js",