@regulaforensics/cordova-plugin-document-reader-api 9.2.376-nightly → 9.2.378-nightly
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/example/package.json +2 -2
- package/package.json +1 -1
- package/plugin.xml +2 -2
- package/src/android/Config.kt +2 -0
- package/src/android/JSONConstructor.kt +20 -1
- package/src/android/Main.kt +9 -2
- package/src/android/build.gradle +1 -1
- package/src/ios/RGLWConfig.m +4 -0
- package/src/ios/RGLWJSONConstructor.h +2 -0
- package/src/ios/RGLWJSONConstructor.m +31 -3
- package/src/ios/RGLWMain.m +23 -22
- package/www/DocumentReader.js +23 -0
package/example/package.json
CHANGED
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
"author": "Regula Forensics Inc.",
|
|
14
14
|
"license": "commercial",
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@regulaforensics/cordova-plugin-document-reader-api": "9.2.
|
|
17
|
-
"@regulaforensics/cordova-plugin-document-reader-core-fullauthrfid": "9.2.
|
|
16
|
+
"@regulaforensics/cordova-plugin-document-reader-api": "9.2.378-nightly",
|
|
17
|
+
"@regulaforensics/cordova-plugin-document-reader-core-fullauthrfid": "9.2.1796-nightly",
|
|
18
18
|
"cordova-android": "13.0.0",
|
|
19
19
|
"cordova-ios": "7.1.1",
|
|
20
20
|
"cordova-plugin-add-swift-support": "2.0.2",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@regulaforensics/cordova-plugin-document-reader-api",
|
|
3
|
-
"version": "9.2.
|
|
3
|
+
"version": "9.2.378-nightly",
|
|
4
4
|
"description": "Cordova plugin for reading and validation of identification documents (API framework)",
|
|
5
5
|
"cordova": {
|
|
6
6
|
"id": "@regulaforensics/cordova-plugin-document-reader-api",
|
package/plugin.xml
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<?xml version='1.0' encoding='utf-8'?>
|
|
2
|
-
<plugin id="@regulaforensics/cordova-plugin-document-reader-api" version="9.2.
|
|
2
|
+
<plugin id="@regulaforensics/cordova-plugin-document-reader-api" version="9.2.378-nightly" xmlns="http://apache.org/cordova/ns/plugins/1.0">
|
|
3
3
|
<name>DocumentReaderApi</name>
|
|
4
4
|
<description>Cordova plugin Document reader api</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="DocumentReaderNightly" spec="9.2.
|
|
32
|
+
<pod name="DocumentReaderNightly" spec="9.2.5826" />
|
|
33
33
|
</pods>
|
|
34
34
|
</podspec>
|
|
35
35
|
</platform>
|
package/src/android/Config.kt
CHANGED
|
@@ -147,6 +147,7 @@ fun setProcessParams(processParams: ProcessParam, opts: JSONObject) = opts.forEa
|
|
|
147
147
|
"strictSecurityChecks" -> processParams.strictSecurityChecks = v as Boolean
|
|
148
148
|
"returnTransliteratedFields" -> processParams.returnTransliteratedFields = v as Boolean
|
|
149
149
|
"checkCaptureProcessIntegrity" -> processParams.checkCaptureProcessIntegrity = v as Boolean
|
|
150
|
+
"bsiTr03135Results" -> processParams.bsiTr03135Results = v as Boolean
|
|
150
151
|
"measureSystem" -> processParams.measureSystem = v.toInt()
|
|
151
152
|
"barcodeParserType" -> processParams.barcodeParserType = v.toInt()
|
|
152
153
|
"perspectiveAngle" -> processParams.perspectiveAngle = v.toInt()
|
|
@@ -236,6 +237,7 @@ fun getProcessParams(processParams: ProcessParam) = mapOf(
|
|
|
236
237
|
"strictSecurityChecks" to processParams.strictSecurityChecks,
|
|
237
238
|
"returnTransliteratedFields" to processParams.returnTransliteratedFields,
|
|
238
239
|
"checkCaptureProcessIntegrity" to processParams.checkCaptureProcessIntegrity,
|
|
240
|
+
"bsiTr03135Results" to processParams.bsiTr03135Results,
|
|
239
241
|
"measureSystem" to processParams.measureSystem,
|
|
240
242
|
"barcodeParserType" to processParams.barcodeParserType,
|
|
241
243
|
"perspectiveAngle" to processParams.perspectiveAngle,
|
|
@@ -13,6 +13,7 @@ import android.util.Pair
|
|
|
13
13
|
import com.regula.common.exception.RegulaException
|
|
14
14
|
import com.regula.documentreader.api.License
|
|
15
15
|
import com.regula.documentreader.api.completions.model.PrepareProgress
|
|
16
|
+
import com.regula.documentreader.api.config.FinalizeConfig
|
|
16
17
|
import com.regula.documentreader.api.config.RecognizeConfig
|
|
17
18
|
import com.regula.documentreader.api.config.ScannerConfig
|
|
18
19
|
import com.regula.documentreader.api.enums.BarcodeType
|
|
@@ -1861,6 +1862,7 @@ fun documentReaderResultsFromJSON(input: JSONObject?) = input?.let {
|
|
|
1861
1862
|
result.mrzPosition = it.optJSONArray("mrzPosition").toList(::elementPositionFromJSON)!!
|
|
1862
1863
|
result.imageQuality = it.optJSONArray("imageQuality").toList(::imageQualityGroupFromJSON)!!
|
|
1863
1864
|
result.rawResult = it.optString("rawResult")
|
|
1865
|
+
result.bsiTr03135Results = it.optString("bsiTr03135Results")
|
|
1864
1866
|
result.rfidSessionData = rfidSessionDataFromJSON(it.optJSONObject("rfidSessionData"))
|
|
1865
1867
|
result.authenticityResult = documentReaderAuthenticityResultFromJSON(it.optJSONObject("authenticityResult"))
|
|
1866
1868
|
result.barcodeResult = documentReaderBarcodeResultFromJSON(it.optJSONObject("barcodeResult"))
|
|
@@ -1888,6 +1890,7 @@ fun generateDocumentReaderResults(input: DocumentReaderResults?) = input?.let {
|
|
|
1888
1890
|
"mrzPosition" to it.mrzPosition.toJson(::generateElementPosition),
|
|
1889
1891
|
"imageQuality" to it.imageQuality.toJson(::generateImageQualityGroup),
|
|
1890
1892
|
"rawResult" to it.rawResult,
|
|
1893
|
+
"bsiTr03135Results" to it.bsiTr03135Results,
|
|
1891
1894
|
"rfidSessionData" to generateRFIDSessionData(it.rfidSessionData),
|
|
1892
1895
|
"authenticityResult" to generateDocumentReaderAuthenticityResult(it.authenticityResult),
|
|
1893
1896
|
"barcodeResult" to generateDocumentReaderBarcodeResult(it.barcodeResult),
|
|
@@ -1959,7 +1962,7 @@ fun generateDeviceEngagement(input: DeviceEngagement?) = input?.let {
|
|
|
1959
1962
|
fun nameSpaceMDLFromJSON(input: JSONObject?) = input?.let {
|
|
1960
1963
|
val result = NameSpaceMDL(it.getString("name"))
|
|
1961
1964
|
it.getJSONObject("map").forEach { key, value ->
|
|
1962
|
-
result.addField(key, eMDLIntentToRetain.values()[value
|
|
1965
|
+
result.addField(key, eMDLIntentToRetain.values()[value.toInt()])
|
|
1963
1966
|
}
|
|
1964
1967
|
result
|
|
1965
1968
|
}
|
|
@@ -2102,3 +2105,19 @@ fun generateDeviceEngagementCompletion(deviceEngagement: DeviceEngagement?, erro
|
|
|
2102
2105
|
"deviceEngagement" to generateDeviceEngagement(deviceEngagement),
|
|
2103
2106
|
"error" to generateRegulaException(error)
|
|
2104
2107
|
)
|
|
2108
|
+
|
|
2109
|
+
fun finalizeConfigFromJSON(input: JSONObject?) = input?.let {
|
|
2110
|
+
val result = FinalizeConfig.Builder()
|
|
2111
|
+
if (it.has("rawImages")) result.setRawImages(it.getBoolean("rawImages"))
|
|
2112
|
+
if (it.has("video")) result.setVideo(it.getBoolean("video"))
|
|
2113
|
+
if (it.has("rfidSession")) result.setRfidSession(it.getBoolean("rfidSession"))
|
|
2114
|
+
result.build()
|
|
2115
|
+
}
|
|
2116
|
+
|
|
2117
|
+
fun generateFinalizeConfig(input: FinalizeConfig?) = input?.let {
|
|
2118
|
+
mapOf(
|
|
2119
|
+
"rawImages" to it.getPrivateProperty("rawImages"),
|
|
2120
|
+
"video" to it.getPrivateProperty("video"),
|
|
2121
|
+
"rfidSession" to it.getPrivateProperty("rfidSession")
|
|
2122
|
+
).toJson()
|
|
2123
|
+
}
|
package/src/android/Main.kt
CHANGED
|
@@ -131,6 +131,7 @@ fun methodCall(method: String, callback: (Any?) -> Unit): Any = when (method) {
|
|
|
131
131
|
"containers" -> containers(callback, args(0), args(1))
|
|
132
132
|
"encryptedContainers" -> encryptedContainers(callback, args(0))
|
|
133
133
|
"finalizePackage" -> finalizePackage(callback)
|
|
134
|
+
"finalizePackageWithFinalizeConfig" -> finalizePackageWithFinalizeConfig(callback, args(0))
|
|
134
135
|
"endBackendTransaction" -> endBackendTransaction()
|
|
135
136
|
"getTranslation" -> getTranslation(callback, args(0), args(1))
|
|
136
137
|
else -> Unit
|
|
@@ -321,7 +322,7 @@ fun engageDeviceData(data: String, callback: Callback) {
|
|
|
321
322
|
|
|
322
323
|
fun startRetrieveData(dataRetrieval: JSONObject, deviceEngagement: JSONObject, callback: Callback) {
|
|
323
324
|
stopBackgroundRFID()
|
|
324
|
-
Instance().startRetrieveData(activity, deviceEngagementFromJSON(deviceEngagement)!!, dataRetrievalFromJSON(dataRetrieval)!!){ v1, v2, v3 -> callback(generateCompletion(v1, v2, v3)) }
|
|
325
|
+
Instance().startRetrieveData(activity, deviceEngagementFromJSON(deviceEngagement)!!, dataRetrievalFromJSON(dataRetrieval)!!) { v1, v2, v3 -> callback(generateCompletion(v1, v2, v3)) }
|
|
325
326
|
}
|
|
326
327
|
|
|
327
328
|
lateinit var retrieveDataNFCCallback: Callback
|
|
@@ -335,7 +336,7 @@ fun retrieveDataNFC(dataRetrieval: JSONObject, callback: Callback) {
|
|
|
335
336
|
|
|
336
337
|
fun retrieveDataBLE(dataRetrieval: JSONObject, deviceEngagement: JSONObject, callback: Callback) {
|
|
337
338
|
stopBackgroundRFID()
|
|
338
|
-
Instance().retrieveDataBLE(context, deviceEngagementFromJSON(deviceEngagement)!!, dataRetrievalFromJSON(dataRetrieval)!!){ v1, v2, v3 -> callback(generateCompletion(v1, v2, v3)) }
|
|
339
|
+
Instance().retrieveDataBLE(context, deviceEngagementFromJSON(deviceEngagement)!!, dataRetrievalFromJSON(dataRetrieval)!!) { v1, v2, v3 -> callback(generateCompletion(v1, v2, v3)) }
|
|
339
340
|
}
|
|
340
341
|
|
|
341
342
|
fun setLocalizationDictionary(dictionary: JSONObject) {
|
|
@@ -368,6 +369,12 @@ fun finalizePackage(callback: Callback) = Instance().finalizePackage { action, i
|
|
|
368
369
|
callback(generateFinalizePackageCompletion(action, info, error))
|
|
369
370
|
}
|
|
370
371
|
|
|
372
|
+
fun finalizePackageWithFinalizeConfig(callback: Callback, config: JSONObject) = Instance().finalizePackage(
|
|
373
|
+
finalizeConfigFromJSON(config)
|
|
374
|
+
) { action, info, error ->
|
|
375
|
+
callback(generateFinalizePackageCompletion(action, info, error))
|
|
376
|
+
}
|
|
377
|
+
|
|
371
378
|
fun endBackendTransaction() = Instance().endBackendTransaction()
|
|
372
379
|
|
|
373
380
|
fun textFieldValueByType(
|
package/src/android/build.gradle
CHANGED
package/src/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"]){
|
|
@@ -2600,6 +2604,28 @@ static NSMutableArray* weakReferencesHolder;
|
|
|
2600
2604
|
return [RGLWJSONConstructor dictToString: result];
|
|
2601
2605
|
}
|
|
2602
2606
|
|
|
2607
|
+
+(RGLFinalizeConfig*)finalizeConfigFromJson:(NSDictionary*)input {
|
|
2608
|
+
if(input == nil) return nil;
|
|
2609
|
+
RGLFinalizeConfig *result = [RGLFinalizeConfig defaultParams];
|
|
2610
|
+
|
|
2611
|
+
if (input[@"rawImages"]) result.rawImages = [input[@"rawImages"] boolValue];
|
|
2612
|
+
if (input[@"video"]) result.video = [input[@"video"] boolValue];
|
|
2613
|
+
if (input[@"rfidSession"]) result.rfidSession = [input[@"rfidSession"] boolValue];
|
|
2614
|
+
|
|
2615
|
+
return result;
|
|
2616
|
+
}
|
|
2617
|
+
|
|
2618
|
+
+(NSDictionary*)generateFinalizeConfig:(RGLFinalizeConfig*)input {
|
|
2619
|
+
if(input == nil) return nil;
|
|
2620
|
+
NSMutableDictionary* result = [NSMutableDictionary new];
|
|
2621
|
+
|
|
2622
|
+
result[@"rawImages"] = @(input.rawImages);
|
|
2623
|
+
result[@"video"] = @(input.video);
|
|
2624
|
+
result[@"rfidSession"] = @(input.rfidSession);
|
|
2625
|
+
|
|
2626
|
+
return result;
|
|
2627
|
+
}
|
|
2628
|
+
|
|
2603
2629
|
+(RGLDocumentReaderResults*)documentReaderResultsFromJson:(NSDictionary*)input {
|
|
2604
2630
|
NSMutableArray<RGLDocumentReaderDocumentType*>* documentType = [NSMutableArray new];
|
|
2605
2631
|
for(NSDictionary* item in [input valueForKey:@"documentType"]){
|
|
@@ -2645,6 +2671,7 @@ static NSMutableArray* weakReferencesHolder;
|
|
|
2645
2671
|
transactionInfo:[self transactionInfoFromJson:[input valueForKey:@"transactionInfo"]]];
|
|
2646
2672
|
|
|
2647
2673
|
[result setValue:[RGLWJSONConstructor base64Decode:input[@"dtcData"]] forKey:@"dtcData"];
|
|
2674
|
+
[result setValue:input[@"bsiTr03135Results"] forKey:@"bsiTr03135Results"];
|
|
2648
2675
|
|
|
2649
2676
|
return result;
|
|
2650
2677
|
}
|
|
@@ -2694,6 +2721,7 @@ static NSMutableArray* weakReferencesHolder;
|
|
|
2694
2721
|
result[@"elapsedTime"] = @(input.elapsedTime);
|
|
2695
2722
|
result[@"elapsedTimeRFID"] = @(input.elapsedTimeRFID);
|
|
2696
2723
|
result[@"rawResult"] = input.rawResult;
|
|
2724
|
+
result[@"bsiTr03135Results"] = input.bsiTr03135Results;
|
|
2697
2725
|
result[@"status"] = [self generateDocumentReaderResultsStatus:input.status];
|
|
2698
2726
|
result[@"vdsncData"] = [self generateVDSNCData:input.vdsncData];
|
|
2699
2727
|
result[@"vdsData"] = [self generateVDSData:input.vdsData];
|
package/src/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/www/DocumentReader.js
CHANGED
|
@@ -1197,6 +1197,7 @@ class DocumentReaderResults {
|
|
|
1197
1197
|
for (const i in jsonObject["imageQuality"])
|
|
1198
1198
|
result.imageQuality.push(ImageQualityGroup.fromJson(jsonObject["imageQuality"][i]))
|
|
1199
1199
|
result.rawResult = jsonObject["rawResult"]
|
|
1200
|
+
result.bsiTr03135Results = jsonObject["bsiTr03135Results"]
|
|
1200
1201
|
result.rfidSessionData = RFIDSessionData.fromJson(jsonObject["rfidSessionData"])
|
|
1201
1202
|
result.authenticityResult = DocumentReaderAuthenticityResult.fromJson(jsonObject["authenticityResult"])
|
|
1202
1203
|
result.barcodeResult = DocumentReaderBarcodeResult.fromJson(jsonObject["barcodeResult"])
|
|
@@ -1462,6 +1463,7 @@ class ProcessParams {
|
|
|
1462
1463
|
result.strictSecurityChecks = jsonObject["strictSecurityChecks"]
|
|
1463
1464
|
result.returnTransliteratedFields = jsonObject["returnTransliteratedFields"]
|
|
1464
1465
|
result.checkCaptureProcessIntegrity = jsonObject["checkCaptureProcessIntegrity"]
|
|
1466
|
+
result.bsiTr03135Results = jsonObject["bsiTr03135Results"]
|
|
1465
1467
|
result.barcodeParserType = jsonObject["barcodeParserType"]
|
|
1466
1468
|
result.perspectiveAngle = jsonObject["perspectiveAngle"]
|
|
1467
1469
|
result.minDPI = jsonObject["minDPI"]
|
|
@@ -2013,6 +2015,19 @@ class DocumentRequest18013MDL {
|
|
|
2013
2015
|
}
|
|
2014
2016
|
}
|
|
2015
2017
|
|
|
2018
|
+
class FinalizeConfig {
|
|
2019
|
+
static fromJson(jsonObject) {
|
|
2020
|
+
if (jsonObject == null) return null
|
|
2021
|
+
const result = new FinalizeConfig()
|
|
2022
|
+
|
|
2023
|
+
result.rawImages = jsonObject["rawImages"]
|
|
2024
|
+
result.video = jsonObject["video"]
|
|
2025
|
+
result.rfidSession = jsonObject["rfidSession"]
|
|
2026
|
+
|
|
2027
|
+
return result
|
|
2028
|
+
}
|
|
2029
|
+
}
|
|
2030
|
+
|
|
2016
2031
|
// Enum
|
|
2017
2032
|
|
|
2018
2033
|
const FontStyle = {
|
|
@@ -2375,6 +2390,7 @@ const eRPRM_ResultType = {
|
|
|
2375
2390
|
RPRM_RESULT_TYPE_STATUS: 33,
|
|
2376
2391
|
RPRM_RESULT_TYPE_PORTRAIT_COMPARISON: 34,
|
|
2377
2392
|
RPRM_RESULT_TYPE_EXT_PORTRAIT: 35,
|
|
2393
|
+
RPRM_RESULT_TYPE_BSI_XML_V2: 73,
|
|
2378
2394
|
}
|
|
2379
2395
|
|
|
2380
2396
|
const FrameShapeType = {
|
|
@@ -2824,6 +2840,7 @@ const eCheckDiagnose = {
|
|
|
2824
2840
|
CHD_DOC_LIVENESS_BLACK_AND_WHITE_COPY_DETECTED: 239,
|
|
2825
2841
|
DOC_LIVENESS_ELECTRONIC_DEVICE_DETECTED: 240,
|
|
2826
2842
|
DOC_LIVENESS_INVALID_BARCODE_BACKGROUND: 241,
|
|
2843
|
+
DOC_LIVENESS_VIRTUAL_CAMERA_DETECTED: 242,
|
|
2827
2844
|
ICAO_IDB_BASE_32_ERROR: 243,
|
|
2828
2845
|
ICAO_IDB_ZIPPED_ERROR: 244,
|
|
2829
2846
|
ICAO_IDB_MESSAGE_ZONE_EMPTY: 245,
|
|
@@ -3230,6 +3247,10 @@ const eRPRM_SecurityFeatureType = {
|
|
|
3230
3247
|
SECURITY_FEATURE_TYPE_LIVENESS_GEOMETRY_CHECK: 55,
|
|
3231
3248
|
SECURITY_FEATURE_TYPE_AGE_CHECK: 56,
|
|
3232
3249
|
SECURITY_FEATURE_TYPE_SEX_CHECK: 57,
|
|
3250
|
+
SECURITY_FEATURE_TYPE_PORTRAIT_COMPARISON_RFIDVSGHOST: 58,
|
|
3251
|
+
SECURITY_FEATURE_TYPE_PORTRAIT_COMPARISON_BARCODEVSGHOST: 59,
|
|
3252
|
+
SECURITY_FEATURE_TYPE_PORTRAIT_COMPARISON_GHOSTVSLIVE: 60,
|
|
3253
|
+
SECURITY_FEATURE_TYPE_PORTRAIT_COMPARISON_EXTVSGHOST: 61,
|
|
3233
3254
|
}
|
|
3234
3255
|
|
|
3235
3256
|
const OnlineMode = {
|
|
@@ -4691,6 +4712,7 @@ DocumentReader.engageDeviceData = (data, successCallback, errorCallback) => cord
|
|
|
4691
4712
|
DocumentReader.startRetrieveData = (deviceEngagement, dataRetrieval, successCallback, errorCallback) => cordova.exec(successCallback, errorCallback, "DocumentReader", "exec", ["startRetrieveData", deviceEngagement, dataRetrieval])
|
|
4692
4713
|
DocumentReader.retrieveDataNFC = (dataRetrieval, successCallback, errorCallback) => cordova.exec(successCallback, errorCallback, "DocumentReader", "exec", ["retrieveDataNFC", dataRetrieval])
|
|
4693
4714
|
DocumentReader.retrieveDataBLE = (deviceEngagement, dataRetrieval, successCallback, errorCallback) => cordova.exec(successCallback, errorCallback, "DocumentReader", "exec", ["retrieveDataBLE", deviceEngagement, dataRetrieval])
|
|
4715
|
+
DocumentReader.finalizePackageWithFinalizeConfig = (config, successCallback, errorCallback) => cordova.exec(successCallback, errorCallback, "DocumentReader", "exec", ["finalizePackageWithFinalizeConfig", config])
|
|
4694
4716
|
|
|
4695
4717
|
DocumentReader.textFieldValueByType = (results, fieldType, successCallback, errorCallback) => cordova.exec(successCallback, errorCallback, "DocumentReader", "exec", ["textFieldValueByType", results.rawResult, fieldType])
|
|
4696
4718
|
DocumentReader.textFieldValueByTypeLcid = (results, fieldType, lcid, successCallback, errorCallback) => cordova.exec(successCallback, errorCallback, "DocumentReader", "exec", ["textFieldValueByTypeLcid", results.rawResult, fieldType, lcid])
|
|
@@ -4812,5 +4834,6 @@ DocumentReaderPlugin.DataRetrieval = DataRetrieval
|
|
|
4812
4834
|
DocumentReaderPlugin.DocumentRequestMDL = DocumentRequestMDL
|
|
4813
4835
|
DocumentReaderPlugin.NameSpaceMDL = NameSpaceMDL
|
|
4814
4836
|
DocumentReaderPlugin.DocumentRequest18013MDL = DocumentRequest18013MDL
|
|
4837
|
+
DocumentReaderPlugin.FinalizeConfig = FinalizeConfig
|
|
4815
4838
|
|
|
4816
4839
|
module.exports = DocumentReaderPlugin
|