@regulaforensics/document-reader 9.2.555-nightly → 9.2.557-beta
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/RNDocumentReader.podspec +2 -2
- package/android/build.gradle +2 -2
- package/android/cordova.gradle +2 -2
- package/android/src/main/java/com/regula/plugin/documentreader/Config.kt +2 -0
- package/android/src/main/java/com/regula/plugin/documentreader/JSONConstructor.kt +20 -1
- package/android/src/main/java/com/regula/plugin/documentreader/Main.kt +9 -2
- package/examples/capacitor/package-lock.json +662 -743
- package/examples/capacitor/package.json +15 -15
- package/examples/ionic/package-lock.json +436 -489
- package/examples/ionic/package.json +1 -1
- package/examples/react_native/package.json +1 -1
- package/ios/RGLWConfig.m +4 -0
- package/ios/RGLWJSONConstructor.h +2 -0
- package/ios/RGLWJSONConstructor.m +31 -4
- package/ios/RGLWMain.m +23 -22
- package/package.json +1 -1
- package/plugin.xml +2 -2
- package/test/json.tsx +9 -2
- package/test/package-lock.json +1 -1
- package/test/test.tsx +3 -2
- package/www/capacitor/config/FinalizeConfig.js +31 -0
- package/www/capacitor/index.js +15 -12
- package/www/capacitor/params/process_params/ProcessParams.js +8 -0
- package/www/capacitor/results/Results.js +4 -0
- package/www/capacitor/results/authenticity/CheckDiagnose.js +1 -0
- package/www/capacitor/results/authenticity/SecurityFeatureType.js +4 -0
- package/www/cordova.js +1001 -934
- package/www/react-native/config/FinalizeConfig.js +31 -0
- package/www/react-native/index.js +15 -12
- package/www/react-native/params/process_params/ProcessParams.js +8 -0
- package/www/react-native/results/Results.js +4 -0
- package/www/react-native/results/authenticity/CheckDiagnose.js +1 -0
- package/www/react-native/results/authenticity/SecurityFeatureType.js +4 -0
- package/www/types/config/FinalizeConfig.d.ts +5 -0
- package/www/types/index.d.ts +8 -7
- package/www/types/params/customization/Customization.d.ts +1 -1
- package/www/types/params/process_params/ProcessParams.d.ts +1 -4
- package/www/types/results/Results.d.ts +4 -0
- package/www/types/results/authenticity/CheckDiagnose.d.ts +2 -0
- package/www/types/results/authenticity/SecurityFeatureType.d.ts +4 -0
- package/www/types/results/status/ResultsStatus.d.ts +0 -1
- /package/www/capacitor/{engagement → mdl}/DataRetrieval.js +0 -0
- /package/www/capacitor/{engagement → mdl}/DeviceEngagement.js +0 -0
- /package/www/capacitor/{engagement → mdl}/DeviceRetrievalMethod.js +0 -0
- /package/www/capacitor/{engagement → mdl}/DocumentRequestMDL.js +0 -0
- /package/www/capacitor/{engagement → mdl}/NameSpaceMDL.js +0 -0
- /package/www/react-native/{engagement → mdl}/DataRetrieval.js +0 -0
- /package/www/react-native/{engagement → mdl}/DeviceEngagement.js +0 -0
- /package/www/react-native/{engagement → mdl}/DeviceRetrievalMethod.js +0 -0
- /package/www/react-native/{engagement → mdl}/DocumentRequestMDL.js +0 -0
- /package/www/react-native/{engagement → mdl}/NameSpaceMDL.js +0 -0
- /package/www/types/{engagement → mdl}/DataRetrieval.d.ts +0 -0
- /package/www/types/{engagement → mdl}/DeviceEngagement.d.ts +0 -0
- /package/www/types/{engagement → mdl}/DeviceRetrievalMethod.d.ts +0 -0
- /package/www/types/{engagement → mdl}/DocumentRequestMDL.d.ts +0 -0
- /package/www/types/{engagement → mdl}/NameSpaceMDL.d.ts +0 -0
|
@@ -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.2.
|
|
21
|
+
"@regulaforensics/document-reader": "9.2.557-beta",
|
|
22
22
|
"@regulaforensics/document-reader-core-fullauthrfid": "9.1.1281",
|
|
23
23
|
"@regulaforensics/document-reader-btdevice": "9.1.35",
|
|
24
24
|
"cordova-android": "^14.0.1",
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"start": "expo start"
|
|
9
9
|
},
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@regulaforensics/document-reader": "9.2.
|
|
11
|
+
"@regulaforensics/document-reader": "9.2.557-beta",
|
|
12
12
|
"@regulaforensics/document-reader-core-fullauthrfid": "9.1.1281",
|
|
13
13
|
"@regulaforensics/document-reader-btdevice": "9.1.35",
|
|
14
14
|
"react-native": "^0.81.4",
|
package/ios/RGLWConfig.m
CHANGED
|
@@ -193,6 +193,8 @@
|
|
|
193
193
|
if (options[@"disableAuthResolutionFilter"]) processParams.disableAuthResolutionFilter = options[@"disableAuthResolutionFilter"];
|
|
194
194
|
if (options[@"strictSecurityChecks"]) processParams.strictSecurityChecks = options[@"strictSecurityChecks"];
|
|
195
195
|
if (options[@"returnTransliteratedFields"]) processParams.returnTransliteratedFields = options[@"returnTransliteratedFields"];
|
|
196
|
+
if (options[@"checkCaptureProcessIntegrity"]) processParams.checkCaptureProcessIntegrity = options[@"checkCaptureProcessIntegrity"];
|
|
197
|
+
if (options[@"bsiTr03135Results"]) processParams.bsiTr03135Results = options[@"bsiTr03135Results"];
|
|
196
198
|
|
|
197
199
|
// Int
|
|
198
200
|
if([options valueForKey:@"measureSystem"] != nil)
|
|
@@ -323,6 +325,8 @@
|
|
|
323
325
|
result[@"disableAuthResolutionFilter"] = processParams.disableAuthResolutionFilter;
|
|
324
326
|
result[@"strictSecurityChecks"] = processParams.strictSecurityChecks;
|
|
325
327
|
result[@"returnTransliteratedFields"] = processParams.returnTransliteratedFields;
|
|
328
|
+
result[@"checkCaptureProcessIntegrity"] = processParams.checkCaptureProcessIntegrity;
|
|
329
|
+
result[@"bsiTr03135Results"] = processParams.bsiTr03135Results;
|
|
326
330
|
|
|
327
331
|
// Int
|
|
328
332
|
result[@"measureSystem"] = [NSNumber numberWithInteger:processParams.measureSystem];
|
|
@@ -194,6 +194,8 @@
|
|
|
194
194
|
+(NSDictionary* _Nullable)generateNameSpaceMDL:(RGLNameSpaceMDL* _Nullable)input;
|
|
195
195
|
+(RGLDocumentRequestMDL* _Nullable)documentRequestMDLFromJson:(NSDictionary* _Nullable)input;
|
|
196
196
|
+(NSDictionary* _Nullable)generateDocumentRequestMDL:(RGLDocumentRequestMDL* _Nullable)input;
|
|
197
|
+
+(RGLFinalizeConfig* _Nullable)finalizeConfigFromJson:(NSDictionary* _Nullable)input;
|
|
198
|
+
+(NSDictionary* _Nullable)generateFinalizeConfig:(RGLFinalizeConfig* _Nullable)input;
|
|
197
199
|
|
|
198
200
|
@end
|
|
199
201
|
|
|
@@ -1961,6 +1961,7 @@ static NSMutableArray* weakReferencesHolder;
|
|
|
1961
1961
|
result[@"stopList"] = @(input.stopList);
|
|
1962
1962
|
result[@"mDL"] = @(input.mDL);
|
|
1963
1963
|
result[@"age"] = @(input.age);
|
|
1964
|
+
result[@"captureProcessIntegrity"] = @(input.captureProcessIntegrity);
|
|
1964
1965
|
result[@"detailsAge"] = [self generateDetailsAge:input.detailsAge];
|
|
1965
1966
|
|
|
1966
1967
|
return result;
|
|
@@ -2408,7 +2409,10 @@ static NSMutableArray* weakReferencesHolder;
|
|
|
2408
2409
|
+(RGLNameSpaceMDL*)nameSpaceMDLFromJson:(NSDictionary*)input {
|
|
2409
2410
|
RGLNameSpaceMDL* result = [[RGLNameSpaceMDL alloc] initWithName:input[@"name"]];
|
|
2410
2411
|
|
|
2411
|
-
|
|
2412
|
+
NSDictionary* map = input[@"map"];
|
|
2413
|
+
for (NSString* key in map) {
|
|
2414
|
+
[result addField:key intentToRetain:[map[key] integerValue]];
|
|
2415
|
+
}
|
|
2412
2416
|
|
|
2413
2417
|
return result;
|
|
2414
2418
|
|
|
@@ -2562,8 +2566,8 @@ static NSMutableArray* weakReferencesHolder;
|
|
|
2562
2566
|
+(RGLDataRetrieval*)dataRetrievalFromJson:(NSDictionary*)input {
|
|
2563
2567
|
RGLDataRetrieval* result = [[RGLDataRetrieval alloc] initWithDeviceRetrieval:[input[@"deviceRetrieval"] integerValue]];
|
|
2564
2568
|
|
|
2565
|
-
|
|
2566
|
-
|
|
2569
|
+
if (input[@"docRequestPreset"])
|
|
2570
|
+
[result setDocRequestPreset:[input[@"docRequestPreset"] integerValue] intentToRetain:[input[@"intentToRetain"] integerValue]];
|
|
2567
2571
|
|
|
2568
2572
|
NSMutableArray<RGLDocumentRequestMDL*>* requests = [NSMutableArray new];
|
|
2569
2573
|
for(NSDictionary* item in [input valueForKey:@"requests"]){
|
|
@@ -2572,7 +2576,6 @@ static NSMutableArray* weakReferencesHolder;
|
|
|
2572
2576
|
result.requests = requests;
|
|
2573
2577
|
|
|
2574
2578
|
return result;
|
|
2575
|
-
|
|
2576
2579
|
}
|
|
2577
2580
|
|
|
2578
2581
|
+(NSDictionary*)generateDataRetrieval:(RGLDataRetrieval*)input {
|
|
@@ -2600,6 +2603,28 @@ static NSMutableArray* weakReferencesHolder;
|
|
|
2600
2603
|
return [RGLWJSONConstructor dictToString: result];
|
|
2601
2604
|
}
|
|
2602
2605
|
|
|
2606
|
+
+(RGLFinalizeConfig*)finalizeConfigFromJson:(NSDictionary*)input {
|
|
2607
|
+
if(input == nil) return nil;
|
|
2608
|
+
RGLFinalizeConfig *result = [RGLFinalizeConfig defaultParams];
|
|
2609
|
+
|
|
2610
|
+
if (input[@"rawImages"]) result.rawImages = [input[@"rawImages"] boolValue];
|
|
2611
|
+
if (input[@"video"]) result.video = [input[@"video"] boolValue];
|
|
2612
|
+
if (input[@"rfidSession"]) result.rfidSession = [input[@"rfidSession"] boolValue];
|
|
2613
|
+
|
|
2614
|
+
return result;
|
|
2615
|
+
}
|
|
2616
|
+
|
|
2617
|
+
+(NSDictionary*)generateFinalizeConfig:(RGLFinalizeConfig*)input {
|
|
2618
|
+
if(input == nil) return nil;
|
|
2619
|
+
NSMutableDictionary* result = [NSMutableDictionary new];
|
|
2620
|
+
|
|
2621
|
+
result[@"rawImages"] = @(input.rawImages);
|
|
2622
|
+
result[@"video"] = @(input.video);
|
|
2623
|
+
result[@"rfidSession"] = @(input.rfidSession);
|
|
2624
|
+
|
|
2625
|
+
return result;
|
|
2626
|
+
}
|
|
2627
|
+
|
|
2603
2628
|
+(RGLDocumentReaderResults*)documentReaderResultsFromJson:(NSDictionary*)input {
|
|
2604
2629
|
NSMutableArray<RGLDocumentReaderDocumentType*>* documentType = [NSMutableArray new];
|
|
2605
2630
|
for(NSDictionary* item in [input valueForKey:@"documentType"]){
|
|
@@ -2645,6 +2670,7 @@ static NSMutableArray* weakReferencesHolder;
|
|
|
2645
2670
|
transactionInfo:[self transactionInfoFromJson:[input valueForKey:@"transactionInfo"]]];
|
|
2646
2671
|
|
|
2647
2672
|
[result setValue:[RGLWJSONConstructor base64Decode:input[@"dtcData"]] forKey:@"dtcData"];
|
|
2673
|
+
[result setValue:input[@"bsiTr03135Results"] forKey:@"bsiTr03135Results"];
|
|
2648
2674
|
|
|
2649
2675
|
return result;
|
|
2650
2676
|
}
|
|
@@ -2694,6 +2720,7 @@ static NSMutableArray* weakReferencesHolder;
|
|
|
2694
2720
|
result[@"elapsedTime"] = @(input.elapsedTime);
|
|
2695
2721
|
result[@"elapsedTimeRFID"] = @(input.elapsedTimeRFID);
|
|
2696
2722
|
result[@"rawResult"] = input.rawResult;
|
|
2723
|
+
result[@"bsiTr03135Results"] = input.bsiTr03135Results;
|
|
2697
2724
|
result[@"status"] = [self generateDocumentReaderResultsStatus:input.status];
|
|
2698
2725
|
result[@"vdsncData"] = [self generateVDSNCData:input.vdsncData];
|
|
2699
2726
|
result[@"vdsData"] = [self generateVDSData:input.vdsData];
|
package/ios/RGLWMain.m
CHANGED
|
@@ -36,7 +36,7 @@
|
|
|
36
36
|
@"runAutoUpdate": ^{ [self runAutoUpdate :args[0] :callback]; },
|
|
37
37
|
@"cancelDBUpdate": ^{ [self cancelDBUpdate :callback]; },
|
|
38
38
|
@"checkDatabaseUpdate": ^{ [self checkDatabaseUpdate :args[0] :callback]; },
|
|
39
|
-
@"scan": ^{ [self
|
|
39
|
+
@"scan": ^{ [self startScanner :args[0]]; },
|
|
40
40
|
@"startScanner": ^{ [self startScanner :args[0]]; },
|
|
41
41
|
@"recognize": ^{ [self recognize :args[0]]; },
|
|
42
42
|
@"startNewPage": ^{ [self startNewPage]; },
|
|
@@ -71,6 +71,7 @@
|
|
|
71
71
|
@"getDocReaderVersion": ^{ [self getDocReaderVersion :callback]; },
|
|
72
72
|
@"getDocReaderDocumentsDatabase": ^{ [self getDocReaderDocumentsDatabase :callback]; },
|
|
73
73
|
@"finalizePackage": ^{ [self finalizePackage :callback]; },
|
|
74
|
+
@"finalizePackageWithFinalizeConfig": ^{ [self finalizePackageWithFinalizeConfig :args[0] :callback]; },
|
|
74
75
|
@"endBackendTransaction": ^{ [self endBackendTransaction]; },
|
|
75
76
|
@"textFieldValueByType": ^{ [self textFieldValueByType :args[0] :args[1] :callback]; },
|
|
76
77
|
@"textFieldValueByTypeLcid": ^{ [self textFieldValueByTypeLcid :args[0] :args[1] :args[2] :callback]; },
|
|
@@ -226,20 +227,8 @@ static NSDictionary* headers;
|
|
|
226
227
|
}];
|
|
227
228
|
}
|
|
228
229
|
|
|
229
|
-
+(void)scan:(NSDictionary*)config {
|
|
230
|
-
dispatch_async(dispatch_get_main_queue(), ^{
|
|
231
|
-
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
|
|
232
|
-
[[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent animated:YES];
|
|
233
|
-
#pragma clang diagnostic pop
|
|
234
|
-
[RGLDocReader.shared showScannerFromPresenter:RGLWRootViewController() config:[RGLWJSONConstructor scannerConfigFromJson:config] completion:[self completion]];
|
|
235
|
-
});
|
|
236
|
-
}
|
|
237
|
-
|
|
238
230
|
+(void)startScanner:(NSDictionary*)config {
|
|
239
231
|
dispatch_async(dispatch_get_main_queue(), ^{
|
|
240
|
-
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
|
|
241
|
-
[[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent animated:YES];
|
|
242
|
-
#pragma clang diagnostic pop
|
|
243
232
|
[RGLDocReader.shared startScannerFromPresenter:RGLWRootViewController() config:[RGLWJSONConstructor scannerConfigFromJson:config] completion:[self completion]];
|
|
244
233
|
});
|
|
245
234
|
}
|
|
@@ -365,21 +354,27 @@ RGLWCallback savedCallbackForBluetoothResult;
|
|
|
365
354
|
}
|
|
366
355
|
|
|
367
356
|
+(void)startReadMDl:(NSNumber*)type :(NSDictionary*)dataRetrieval :(RGLWCallback)callback {
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
357
|
+
dispatch_async(dispatch_get_main_queue(), ^{
|
|
358
|
+
[RGLDocReader.shared startReadMDLFromPresenter:RGLWRootViewController() engagementType:[type integerValue] dataRetrieval:[RGLWJSONConstructor dataRetrievalFromJson:dataRetrieval] completion:^(RGLDocReaderAction action, RGLDocumentReaderResults * _Nullable results, NSError * _Nullable error) {
|
|
359
|
+
callback([RGLWJSONConstructor generateCompletion:[RGLWConfig generateDocReaderAction: action] :results :error]);
|
|
360
|
+
}];
|
|
361
|
+
});
|
|
371
362
|
}
|
|
372
363
|
|
|
373
364
|
+(void)startEngageDevice:(NSNumber*)type :(RGLWCallback)callback {
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
365
|
+
dispatch_async(dispatch_get_main_queue(), ^{
|
|
366
|
+
[RGLDocReader.shared startEngageDeviceFromPresenter:RGLWRootViewController() type:[type integerValue] completion:^(RGLDeviceEngagement* deviceEngagement, NSError* error) {
|
|
367
|
+
callback([RGLWJSONConstructor generateDeviceEngagementCompletion:deviceEngagement :error]);
|
|
368
|
+
}];
|
|
369
|
+
});
|
|
377
370
|
}
|
|
378
371
|
|
|
379
372
|
+(void)engageDeviceNFC:(RGLWCallback)callback {
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
373
|
+
dispatch_async(dispatch_get_main_queue(), ^{
|
|
374
|
+
[RGLDocReader.shared engageDeviceNFC:RGLWRootViewController() completion:^(RGLDeviceEngagement * _Nullable deviceEngagement, NSError * _Nullable error) {
|
|
375
|
+
callback([RGLWJSONConstructor generateDeviceEngagementCompletion:deviceEngagement :error]);
|
|
376
|
+
}];
|
|
377
|
+
});
|
|
383
378
|
}
|
|
384
379
|
|
|
385
380
|
+(void)engageDeviceData:(NSString*)data :(RGLWCallback)callback {
|
|
@@ -453,6 +448,12 @@ RGLWCallback savedCallbackForBluetoothResult;
|
|
|
453
448
|
}];
|
|
454
449
|
}
|
|
455
450
|
|
|
451
|
+
+(void)finalizePackageWithFinalizeConfig:(NSDictionary*)config :(RGLWCallback)callback {
|
|
452
|
+
[RGLDocReader.shared finalizePackageWithFinalizeConfig:[RGLWJSONConstructor finalizeConfigFromJson:config] completion:^(RGLDocReaderAction action, RGLTransactionInfo* info, NSError* error) {
|
|
453
|
+
callback([RGLWJSONConstructor generateFinalizePackageCompletion:[RGLWConfig generateDocReaderAction: action] :info :error]);
|
|
454
|
+
}];
|
|
455
|
+
}
|
|
456
|
+
|
|
456
457
|
+(void)endBackendTransaction {
|
|
457
458
|
[RGLDocReader.shared endBackendTransaction];
|
|
458
459
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@regulaforensics/document-reader",
|
|
3
|
-
"version": "9.2.
|
|
3
|
+
"version": "9.2.557-beta",
|
|
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",
|
package/plugin.xml
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<?xml version='1.0' encoding='utf-8'?>
|
|
2
|
-
<plugin id="@regulaforensics/document-reader" version="9.2.
|
|
2
|
+
<plugin id="@regulaforensics/document-reader" version="9.2.557-beta" xmlns="http://apache.org/cordova/ns/plugins/1.0">
|
|
3
3
|
<name>DocumentReader</name>
|
|
4
4
|
<description>Cordova plugin for Regula Document Reader SDK</description>
|
|
5
5
|
<license>commercial</license>
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
<source url="https://github.com/CocoaPods/Specs.git" />
|
|
30
30
|
</config>
|
|
31
31
|
<pods>
|
|
32
|
-
<pod name="
|
|
32
|
+
<pod name="DocumentReader" spec="9.1.5702" />
|
|
33
33
|
</pods>
|
|
34
34
|
</podspec>
|
|
35
35
|
</platform>
|
package/test/json.tsx
CHANGED
|
@@ -108,6 +108,7 @@ export var processParams = {
|
|
|
108
108
|
"strictSecurityChecks": false,
|
|
109
109
|
"returnTransliteratedFields": true,
|
|
110
110
|
"checkCaptureProcessIntegrity": false,
|
|
111
|
+
"bsiTr03135Results": true,
|
|
111
112
|
"measureSystem": 1,
|
|
112
113
|
"barcodeParserType": 3,
|
|
113
114
|
"perspectiveAngle": 4,
|
|
@@ -485,6 +486,11 @@ export var scannerConfig = {
|
|
|
485
486
|
"extPortrait": img2,
|
|
486
487
|
"cameraId": 1,
|
|
487
488
|
};
|
|
489
|
+
export var finalizeConfig = {
|
|
490
|
+
"rawImages": true,
|
|
491
|
+
"video": false,
|
|
492
|
+
"rfidSession": true,
|
|
493
|
+
};
|
|
488
494
|
|
|
489
495
|
export var documentsDatabase = {
|
|
490
496
|
"databaseID": "test1",
|
|
@@ -873,6 +879,7 @@ export var results = {
|
|
|
873
879
|
"imageQuality": [imageQualityGroup, imageQualityGroup, imageQualityGroup],
|
|
874
880
|
"documentType": [documentType, documentType, documentType],
|
|
875
881
|
"rawResult": "test2",
|
|
882
|
+
"bsiTr03135Results": "test3",
|
|
876
883
|
"rfidSessionData": rfidSessionData,
|
|
877
884
|
"authenticityResult": authenticityResult,
|
|
878
885
|
"barcodeResult": barcodeResult,
|
|
@@ -979,8 +986,8 @@ export var documentRequest18013MDL = {
|
|
|
979
986
|
"signatureUsualMark": 0,
|
|
980
987
|
};
|
|
981
988
|
export var dataRetrieval = {
|
|
989
|
+
"docRequestPreset": 0,
|
|
990
|
+
"intentToRetain": 1,
|
|
982
991
|
"deviceRetrieval": 2,
|
|
983
|
-
"docRequestPreset": 1,
|
|
984
|
-
"intentToRetain": 0,
|
|
985
992
|
"requests": [documentRequestMDL, documentRequest18013MDL],
|
|
986
993
|
};
|
package/test/package-lock.json
CHANGED
package/test/test.tsx
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { compare } from './utils'
|
|
2
|
-
import { AccessControlProcedureType, Application, Attribute, AuthenticityCheck, AuthenticityElement, AuthenticityParams, AuthenticityResult, Authority, BackendProcessingConfig, BarcodeField, BarcodeResult, BytesData, CardProperties, CertificateChain, CertificateData, Comparison, Coordinate, Customization, CustomizationColors, CustomizationFonts, CustomizationImages, DataField, DocReaderException, DocReaderScenario, DocReaderVersion, DocumentsDatabase, DocumentType, EDLDataGroups, EIDDataGroups, DTCDataGroup, EPassportDataGroups, Extension, FaceApiParams, FaceApiSearchParams, File, FileData, Functionality, GlaresCheckParams, RFIDParams, GraphicField, GraphicResult, ImageInputData, ImageQA, ImageQuality, ImageQualityGroup, InitConfig, License, LivenessParams, OnlineProcessingConfig, OpticalStatus, PAAttribute, PAResourcesIssuer, PDF417Info, PKDCertificate, Position, PrepareProgress, ProcessParams, RecognizeConfig, Rect, Results, ResultsStatus, RFIDException, RFIDNotification, RFIDOrigin, RFIDScenario, RFIDSessionData, AgeStatus, RFIDStatus, RFIDValidity, RFIDValue, ScannerConfig, SecurityObject, SecurityObjectCertificates, SignerInfo, Symbol, TAChallenge, TccParams, TextField, TextResult, TextSource, TransactionInfo, Validity, Value, VDSNCData, VDSData, DocFeature, DeviceRetrievalMethod, DocumentRequest18013MDL, DataRetrieval, DeviceEngagement, NameSpaceMDL, DocumentRequestMDL } from '@regulaforensics/document-reader/www/capacitor'
|
|
3
|
-
import { accessControlProcedureType, application, attribute, authenticityCheck, authenticityElement, authenticityParams, authenticityResult, authority, backendProcessingConfig, barcodeField, barcodeResult, bytesData, cardProperties, certificateChain, certificateData, comparison, coordinate, customization, customizationColors, customizationFonts, customizationImages, dataField, docReaderException, docReaderScenario, docReaderVersion, documentsDatabase, documentType, eDLDataGroups, eIDDataGroups, dtcDataGroup, ePassportDataGroups, extension, faceApiParams, faceApiSearchParams, file, fileData, functionality, glaresCheckParams, rfidParams, graphicField, graphicResult, imageInputData, imageQA, imageQuality, imageQualityGroup, initConfig, license, livenessParams, onlineProcessingConfig, opticalStatus, paAttribute, paResourcesIssuer, pdf417Info, pkdCertificate, position, prepareProgress, processParams, recognizeConfig, recognizeConfig2, rect, results, resultsStatus, rfidException, rfidNotification, rfidOrigin, rfidScenario, rfidSessionData, ageStatus, rfidStatus, rfidValidity, rfidValue, scannerConfig, securityObject, securityObjectCertificates, signerInfo, symbol, taChallenge, tccParams, textField, textResult, textSource, transactionInfo, validity, value, vdsncData, vdsData, docFeature, deviceRetrievalMethod, documentRequest18013MDL, dataRetrieval, deviceEngagement, nameSpaceMDL, documentRequestMDL } from './json'
|
|
2
|
+
import { AccessControlProcedureType, Application, Attribute, AuthenticityCheck, AuthenticityElement, AuthenticityParams, AuthenticityResult, Authority, BackendProcessingConfig, BarcodeField, BarcodeResult, BytesData, CardProperties, CertificateChain, CertificateData, Comparison, Coordinate, Customization, CustomizationColors, CustomizationFonts, CustomizationImages, DataField, DocReaderException, DocReaderScenario, DocReaderVersion, DocumentsDatabase, DocumentType, EDLDataGroups, EIDDataGroups, DTCDataGroup, EPassportDataGroups, Extension, FaceApiParams, FaceApiSearchParams, File, FileData, Functionality, GlaresCheckParams, RFIDParams, GraphicField, GraphicResult, ImageInputData, ImageQA, ImageQuality, ImageQualityGroup, InitConfig, License, LivenessParams, OnlineProcessingConfig, OpticalStatus, PAAttribute, PAResourcesIssuer, PDF417Info, PKDCertificate, Position, PrepareProgress, ProcessParams, RecognizeConfig, Rect, Results, ResultsStatus, RFIDException, RFIDNotification, RFIDOrigin, RFIDScenario, RFIDSessionData, AgeStatus, RFIDStatus, RFIDValidity, RFIDValue, ScannerConfig, SecurityObject, SecurityObjectCertificates, SignerInfo, Symbol, TAChallenge, TccParams, TextField, TextResult, TextSource, TransactionInfo, Validity, Value, VDSNCData, VDSData, DocFeature, DeviceRetrievalMethod, DocumentRequest18013MDL, DataRetrieval, DeviceEngagement, NameSpaceMDL, DocumentRequestMDL, FinalizeConfig } from '@regulaforensics/document-reader/www/capacitor'
|
|
3
|
+
import { accessControlProcedureType, application, attribute, authenticityCheck, authenticityElement, authenticityParams, authenticityResult, authority, backendProcessingConfig, barcodeField, barcodeResult, bytesData, cardProperties, certificateChain, certificateData, comparison, coordinate, customization, customizationColors, customizationFonts, customizationImages, dataField, docReaderException, docReaderScenario, docReaderVersion, documentsDatabase, documentType, eDLDataGroups, eIDDataGroups, dtcDataGroup, ePassportDataGroups, extension, faceApiParams, faceApiSearchParams, file, fileData, functionality, glaresCheckParams, rfidParams, graphicField, graphicResult, imageInputData, imageQA, imageQuality, imageQualityGroup, initConfig, license, livenessParams, onlineProcessingConfig, opticalStatus, paAttribute, paResourcesIssuer, pdf417Info, pkdCertificate, position, prepareProgress, processParams, recognizeConfig, recognizeConfig2, rect, results, resultsStatus, rfidException, rfidNotification, rfidOrigin, rfidScenario, rfidSessionData, ageStatus, rfidStatus, rfidValidity, rfidValue, scannerConfig, securityObject, securityObjectCertificates, signerInfo, symbol, taChallenge, tccParams, textField, textResult, textSource, transactionInfo, validity, value, vdsncData, vdsData, docFeature, deviceRetrievalMethod, documentRequest18013MDL, dataRetrieval, deviceEngagement, nameSpaceMDL, documentRequestMDL, finalizeConfig } from './json'
|
|
4
4
|
|
|
5
5
|
compare('initConfig', initConfig, InitConfig.fromJson)
|
|
6
6
|
compare('onlineProcessingConfig', onlineProcessingConfig, OnlineProcessingConfig.fromJson)
|
|
@@ -8,6 +8,7 @@ compare('imageInputData', imageInputData, ImageInputData.fromJson)
|
|
|
8
8
|
compare('recognizeConfig', recognizeConfig, RecognizeConfig.fromJson)
|
|
9
9
|
compare('recognizeConfig2', recognizeConfig2, RecognizeConfig.fromJson)
|
|
10
10
|
compare('scannerConfig', scannerConfig, ScannerConfig.fromJson)
|
|
11
|
+
compare('finalizeConfig', finalizeConfig, FinalizeConfig.fromJson)
|
|
11
12
|
|
|
12
13
|
compare('faceApiSearchParams', faceApiSearchParams, FaceApiSearchParams.fromJson)
|
|
13
14
|
compare('faceApiParams', faceApiParams, FaceApiParams.fromJson)
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export class FinalizeConfig {
|
|
2
|
+
rawImages
|
|
3
|
+
video
|
|
4
|
+
rfidSession
|
|
5
|
+
|
|
6
|
+
constructor(options) {
|
|
7
|
+
this.rawImages = options?.rawImages
|
|
8
|
+
this.video = options?.video
|
|
9
|
+
this.rfidSession = options?.rfidSession
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
static fromJson(jsonObject) {
|
|
13
|
+
if (jsonObject == null) return null;
|
|
14
|
+
var result = new FinalizeConfig();
|
|
15
|
+
|
|
16
|
+
result.rawImages = jsonObject["rawImages"];
|
|
17
|
+
result.video = jsonObject["video"];
|
|
18
|
+
result.rfidSession = jsonObject["rfidSession"];
|
|
19
|
+
|
|
20
|
+
return result;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
toJson() {
|
|
25
|
+
return {
|
|
26
|
+
"rawImages": this.rawImages,
|
|
27
|
+
"video": this.video,
|
|
28
|
+
"rfidSession": this.rfidSession,
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
package/www/capacitor/index.js
CHANGED
|
@@ -5,7 +5,8 @@ import { InitConfig } from './config/InitConfig';
|
|
|
5
5
|
import { RFIDConfig } from './config/RFIDConfig';
|
|
6
6
|
import { ScannerConfig } from './config/ScannerConfig';
|
|
7
7
|
import { RecognizeConfig, ImageInputData } from './config/RecognizeConfig';
|
|
8
|
-
|
|
8
|
+
import { FinalizeConfig } from './config/FinalizeConfig';
|
|
9
|
+
export { OnlineProcessingConfig, ImageFormat, OnlineMode, InitConfig, RFIDConfig, ScannerConfig, RecognizeConfig, ImageInputData, FinalizeConfig };
|
|
9
10
|
|
|
10
11
|
import { DocReaderVersion } from './info/DocReaderVersion';
|
|
11
12
|
import { PrepareProgress } from './info/PrepareProgress';
|
|
@@ -134,11 +135,11 @@ import { TAChallenge } from './rfid/TAChallenge';
|
|
|
134
135
|
import { PKDCertificate, PKDResourceType } from './rfid/PKDCertificate';
|
|
135
136
|
export { PAResourcesIssuer, RFIDErrorCodes, TccParams, RFIDNotification, RFIDNotificationCodes, PAAttribute, TAChallenge, PKDCertificate, PKDResourceType };
|
|
136
137
|
|
|
137
|
-
import { DataRetrieval, MDLDocRequestPreset, MDLDeviceRetrieval } from './
|
|
138
|
-
import { DeviceEngagement, MDLDeviceEngagement } from './
|
|
139
|
-
import { NameSpaceMDL, MDLIntentToRetain } from './
|
|
140
|
-
import { DocumentRequestMDL, DocumentRequest18013MDL } from './
|
|
141
|
-
import { DeviceRetrievalMethod } from './
|
|
138
|
+
import { DataRetrieval, MDLDocRequestPreset, MDLDeviceRetrieval } from './mdl/DataRetrieval';
|
|
139
|
+
import { DeviceEngagement, MDLDeviceEngagement } from './mdl/DeviceEngagement';
|
|
140
|
+
import { NameSpaceMDL, MDLIntentToRetain } from './mdl/NameSpaceMDL';
|
|
141
|
+
import { DocumentRequestMDL, DocumentRequest18013MDL } from './mdl/DocumentRequestMDL';
|
|
142
|
+
import { DeviceRetrievalMethod } from './mdl/DeviceRetrievalMethod';
|
|
142
143
|
export { DataRetrieval, MDLDocRequestPreset, MDLDeviceRetrieval, DeviceEngagement, MDLDeviceEngagement, DeviceRetrievalMethod, DocumentRequest18013MDL, MDLIntentToRetain, NameSpaceMDL, DocumentRequestMDL };
|
|
143
144
|
|
|
144
145
|
export class DocumentReader {
|
|
@@ -367,8 +368,10 @@ export class DocumentReader {
|
|
|
367
368
|
return this._successOrErrorFromJson(response);
|
|
368
369
|
}
|
|
369
370
|
|
|
370
|
-
async finalizePackage() {
|
|
371
|
-
var
|
|
371
|
+
async finalizePackage(options) {
|
|
372
|
+
var funcName = "finalizePackage";
|
|
373
|
+
if (options?.config != null) funcName = "finalizePackageWithFinalizeConfig";
|
|
374
|
+
var response = await exec(funcName, [options?.config?.toJson()]);
|
|
372
375
|
var jsonObject = JSON.parse(response);
|
|
373
376
|
var action = jsonObject["action"];
|
|
374
377
|
var info = TransactionInfo.fromJson(jsonObject["info"]);
|
|
@@ -395,11 +398,11 @@ export class DocumentReader {
|
|
|
395
398
|
var response = "";
|
|
396
399
|
if (options?.withoutUI != true) {
|
|
397
400
|
response = await exec("startEngageDevice", [type.value]);
|
|
398
|
-
|
|
401
|
+
} else if (type == MDLDeviceEngagement.NFC) {
|
|
399
402
|
response = await exec("engageDeviceNFC", []);
|
|
400
|
-
|
|
403
|
+
} else if (type == MDLDeviceEngagement.QR && options?.data != null) {
|
|
401
404
|
response = await exec("engageDeviceData", [options.data]);
|
|
402
|
-
|
|
405
|
+
}
|
|
403
406
|
|
|
404
407
|
var jsonObject = JSON.parse(response);
|
|
405
408
|
return [
|
|
@@ -412,7 +415,7 @@ export class DocumentReader {
|
|
|
412
415
|
var func = "startRetrieveData";
|
|
413
416
|
if (options?.withoutUI == MDLDeviceRetrieval.NFC) func = "engageDeviceNFC";
|
|
414
417
|
if (options?.withoutUI == MDLDeviceRetrieval.BLE) func = "engageDeviceBLE";
|
|
415
|
-
|
|
418
|
+
|
|
416
419
|
var response = await exec(func, [retrieval.toJson(), options?.engagement?.toJson()]);
|
|
417
420
|
var jsonObject = JSON.parse(response);
|
|
418
421
|
|
|
@@ -253,6 +253,12 @@ export class ProcessParams {
|
|
|
253
253
|
this._set({ "checkCaptureProcessIntegrity": val });
|
|
254
254
|
}
|
|
255
255
|
|
|
256
|
+
get bsiTr03135Results() { return this._bsiTr03135Results; }
|
|
257
|
+
set bsiTr03135Results(val) {
|
|
258
|
+
this._bsiTr03135Results = val;
|
|
259
|
+
this._set({ "bsiTr03135Results": val });
|
|
260
|
+
}
|
|
261
|
+
|
|
256
262
|
get barcodeParserType() { return this._barcodeParserType; }
|
|
257
263
|
set barcodeParserType(val) {
|
|
258
264
|
this._barcodeParserType = val;
|
|
@@ -528,6 +534,7 @@ export class ProcessParams {
|
|
|
528
534
|
result._strictSecurityChecks = jsonObject["strictSecurityChecks"];
|
|
529
535
|
result._returnTransliteratedFields = jsonObject["returnTransliteratedFields"];
|
|
530
536
|
result._checkCaptureProcessIntegrity = jsonObject["checkCaptureProcessIntegrity"];
|
|
537
|
+
result._bsiTr03135Results = jsonObject["bsiTr03135Results"];
|
|
531
538
|
result._barcodeParserType = jsonObject["barcodeParserType"];
|
|
532
539
|
result._perspectiveAngle = jsonObject["perspectiveAngle"];
|
|
533
540
|
result._minDPI = jsonObject["minDPI"];
|
|
@@ -613,6 +620,7 @@ export class ProcessParams {
|
|
|
613
620
|
"strictSecurityChecks": this.strictSecurityChecks,
|
|
614
621
|
"returnTransliteratedFields": this.returnTransliteratedFields,
|
|
615
622
|
"checkCaptureProcessIntegrity": this.checkCaptureProcessIntegrity,
|
|
623
|
+
"bsiTr03135Results": this.bsiTr03135Results,
|
|
616
624
|
"measureSystem": this.measureSystem,
|
|
617
625
|
"barcodeParserType": this.barcodeParserType,
|
|
618
626
|
"perspectiveAngle": this.perspectiveAngle,
|
|
@@ -39,6 +39,7 @@ export class Results {
|
|
|
39
39
|
elapsedTime
|
|
40
40
|
elapsedTimeRFID
|
|
41
41
|
rawResult
|
|
42
|
+
bsiTr03135Results
|
|
42
43
|
transactionInfo
|
|
43
44
|
|
|
44
45
|
async textFieldValueByType(fieldType) {
|
|
@@ -202,6 +203,7 @@ export class Results {
|
|
|
202
203
|
result.graphicResult = GraphicResult.fromJson(jsonObject["graphicResult"]);
|
|
203
204
|
result.textResult = TextResult.fromJson(jsonObject["textResult"]);
|
|
204
205
|
result.rawResult = jsonObject["rawResult"];
|
|
206
|
+
result.bsiTr03135Results = jsonObject["bsiTr03135Results"];
|
|
205
207
|
result.rfidSessionData = RFIDSessionData.fromJson(jsonObject["rfidSessionData"]);
|
|
206
208
|
result.authenticityResult = AuthenticityResult.fromJson(jsonObject["authenticityResult"]);
|
|
207
209
|
result.barcodeResult = BarcodeResult.fromJson(jsonObject["barcodeResult"]);
|
|
@@ -286,6 +288,7 @@ export class Results {
|
|
|
286
288
|
"elapsedTime": this.elapsedTime,
|
|
287
289
|
"elapsedTimeRFID": this.elapsedTimeRFID,
|
|
288
290
|
"rawResult": this.rawResult,
|
|
291
|
+
"bsiTr03135Results": this.bsiTr03135Results,
|
|
289
292
|
"transactionInfo": this.transactionInfo?.toJson(),
|
|
290
293
|
}
|
|
291
294
|
}
|
|
@@ -336,6 +339,7 @@ export const ResultType = {
|
|
|
336
339
|
INTERNAL_LICENSE: 50,
|
|
337
340
|
MRZ_POSITION: 61,
|
|
338
341
|
BARCODE_POSITION: 62,
|
|
342
|
+
RESULT_TYPE_BSI_XML_V2: 73,
|
|
339
343
|
DOCUMENT_POSITION: 85,
|
|
340
344
|
CUSTOM: 100,
|
|
341
345
|
RFID_RAW_DATA: 101,
|
|
@@ -117,6 +117,7 @@ export const CheckDiagnose = {
|
|
|
117
117
|
CHD_DOC_LIVENESS_BLACK_AND_WHITE_COPY_DETECTED: 239,
|
|
118
118
|
DOC_LIVENESS_ELECTRONIC_DEVICE_DETECTED: 240,
|
|
119
119
|
DOC_LIVENESS_INVALID_BARCODE_BACKGROUND: 241,
|
|
120
|
+
DOC_LIVENESS_VIRTUAL_CAMERA_DETECTED: 242,
|
|
120
121
|
ICAO_IDB_BASE_32_ERROR: 243,
|
|
121
122
|
ICAO_IDB_ZIPPED_ERROR: 244,
|
|
122
123
|
ICAO_IDB_MESSAGE_ZONE_EMPTY: 245,
|
|
@@ -58,4 +58,8 @@ export const SecurityFeatureType = {
|
|
|
58
58
|
LIVENESS_GEOMETRY_CHECK: 55,
|
|
59
59
|
AGE_CHECK: 56,
|
|
60
60
|
SEX_CHECK: 57,
|
|
61
|
+
PORTRAIT_COMPARISON_RFIDVSGHOST: 58,
|
|
62
|
+
PORTRAIT_COMPARISON_BARCODEVSGHOST: 59,
|
|
63
|
+
PORTRAIT_COMPARISON_GHOSTVSLIVE: 60,
|
|
64
|
+
PORTRAIT_COMPARISON_EXTVSGHOST: 61,
|
|
61
65
|
}
|