@regulaforensics/cordova-plugin-document-reader-api 9.1.367-rc → 9.1.388-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.
- 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 +22 -3
- 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 +45 -13
- package/src/ios/RGLWMain.m +23 -22
- package/www/DocumentReader.js +36 -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.1.
|
|
17
|
-
"@regulaforensics/cordova-plugin-document-reader-core-fullauthrfid": "9.2.
|
|
16
|
+
"@regulaforensics/cordova-plugin-document-reader-api": "9.1.388-rc",
|
|
17
|
+
"@regulaforensics/cordova-plugin-document-reader-core-fullauthrfid": "9.2.1830-rc",
|
|
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.1.
|
|
3
|
+
"version": "9.1.388-rc",
|
|
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.1.
|
|
2
|
+
<plugin id="@regulaforensics/cordova-plugin-document-reader-api" version="9.1.388-rc" 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="DocumentReaderStage" spec="9.2.
|
|
32
|
+
<pod name="DocumentReaderStage" spec="9.2.5883" />
|
|
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
|
}
|
|
@@ -1997,8 +2000,8 @@ fun generateDocumentRequestMDL(input: DocumentRequestMDL?): JSONObject? = input?
|
|
|
1997
2000
|
fun documentRequest18013MDLFromJSON(input: JSONObject?) = input?.let {
|
|
1998
2001
|
val result = DocumentRequest18013MDL()
|
|
1999
2002
|
|
|
2000
|
-
result.setPrivateProperty("docType", it.getString("docType"))
|
|
2001
|
-
result.setPrivateProperty("nameSpaceMDLs", it.getJSONArray("namespaces").toList(::nameSpaceMDLFromJSON))
|
|
2003
|
+
if (it.has("docType")) result.setPrivateProperty("docType", it.getString("docType"))
|
|
2004
|
+
if (it.has("namespaces")) result.setPrivateProperty("nameSpaceMDLs", it.getJSONArray("namespaces").toList(::nameSpaceMDLFromJSON))
|
|
2002
2005
|
result.familyName = it.getIntOrNull("familyName")?.let { enm -> eMDLIntentToRetain.values()[enm] }
|
|
2003
2006
|
result.givenName = it.getIntOrNull("givenName")?.let { enm -> eMDLIntentToRetain.values()[enm] }
|
|
2004
2007
|
result.birthDate = it.getIntOrNull("birthDate")?.let { enm -> eMDLIntentToRetain.values()[enm] }
|
|
@@ -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
|
|
|
@@ -159,9 +159,9 @@ static NSMutableArray* weakReferencesHolder;
|
|
|
159
159
|
if (!input[@"license"]) return nil;
|
|
160
160
|
RGLConfig *config = [[RGLConfig alloc] initWithLicenseData:[self base64Decode: input[@"license"]]];
|
|
161
161
|
|
|
162
|
-
if (input[@"databasePath"]) config.databasePath =
|
|
163
|
-
if (input[@"licenseUpdate"]) config.licenseUpdateCheck = [input[@"licenseUpdate"] boolValue];
|
|
162
|
+
if (input[@"databasePath"]) config.databasePath = input[@"databasePath"];
|
|
164
163
|
if (input[@"licenseUpdateTimeout"]) config.licenseUpdateTimeout = input[@"licenseUpdateTimeout"];
|
|
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;
|
|
@@ -173,8 +173,8 @@ static NSMutableArray* weakReferencesHolder;
|
|
|
173
173
|
|
|
174
174
|
result[@"license"] = [self base64Encode: input.licenseData];
|
|
175
175
|
result[@"databasePath"] = input.databasePath;
|
|
176
|
-
result[@"licenseUpdate"] = @(input.licenseUpdateCheck);
|
|
177
176
|
result[@"licenseUpdateTimeout"] = input.licenseUpdateTimeout;
|
|
177
|
+
result[@"licenseUpdate"] = @(input.licenseUpdateCheck);
|
|
178
178
|
result[@"delayedNNLoad"] = @(input.delayedNNLoadEnabled);
|
|
179
179
|
|
|
180
180
|
return result;
|
|
@@ -184,9 +184,9 @@ static NSMutableArray* weakReferencesHolder;
|
|
|
184
184
|
if (!input) return nil;
|
|
185
185
|
RGLBleConfig *config = [[RGLBleConfig alloc] initWithBluetooth:bluetooth];
|
|
186
186
|
|
|
187
|
-
if (input[@"databasePath"]) config.databasePath =
|
|
188
|
-
if (input[@"licenseUpdate"]) config.licenseUpdateCheck = [input[@"licenseUpdate"] boolValue];
|
|
187
|
+
if (input[@"databasePath"]) config.databasePath = input[@"databasePath"];
|
|
189
188
|
if (input[@"licenseUpdateTimeout"]) config.licenseUpdateTimeout = input[@"licenseUpdateTimeout"];
|
|
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;
|
|
@@ -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
|
|
|
@@ -2459,12 +2463,16 @@ static NSMutableArray* weakReferencesHolder;
|
|
|
2459
2463
|
if(input == nil) return nil;
|
|
2460
2464
|
RGLDocumentRequest18013MDL* result = [RGLDocumentRequest18013MDL new];
|
|
2461
2465
|
|
|
2462
|
-
|
|
2463
|
-
|
|
2464
|
-
|
|
2465
|
-
|
|
2466
|
+
if ([input valueForKey:@"docType"] != nil) {
|
|
2467
|
+
[result setValue:[input valueForKey:@"docType"] forKey:@"docType"];
|
|
2468
|
+
}
|
|
2469
|
+
if ([input valueForKey:@"namespaces"] != nil) {
|
|
2470
|
+
NSMutableArray<RGLNameSpaceMDL*>* nameSpaces = [NSMutableArray new];
|
|
2471
|
+
for(NSDictionary* item in [input valueForKey:@"namespaces"]){
|
|
2472
|
+
[nameSpaces addObject:[self nameSpaceMDLFromJson: item]];
|
|
2473
|
+
}
|
|
2474
|
+
[result setValue:nameSpaces forKey:@"nameSpaces"];
|
|
2466
2475
|
}
|
|
2467
|
-
[result setValue:nameSpaces forKey:@"nameSpaces"];
|
|
2468
2476
|
if (input[@"familyName"]) result.familyName = [input[@"familyName"] integerValue];
|
|
2469
2477
|
if (input[@"givenName"]) result.givenName = [input[@"givenName"] integerValue];
|
|
2470
2478
|
if (input[@"birthDate"]) result.birthDate = [input[@"birthDate"] integerValue];
|
|
@@ -2558,8 +2566,8 @@ static NSMutableArray* weakReferencesHolder;
|
|
|
2558
2566
|
+(RGLDataRetrieval*)dataRetrievalFromJson:(NSDictionary*)input {
|
|
2559
2567
|
RGLDataRetrieval* result = [[RGLDataRetrieval alloc] initWithDeviceRetrieval:[input[@"deviceRetrieval"] integerValue]];
|
|
2560
2568
|
|
|
2561
|
-
|
|
2562
|
-
|
|
2569
|
+
if (input[@"docRequestPreset"])
|
|
2570
|
+
[result setDocRequestPreset:[input[@"docRequestPreset"] integerValue] intentToRetain:[input[@"intentToRetain"] integerValue]];
|
|
2563
2571
|
|
|
2564
2572
|
NSMutableArray<RGLDocumentRequestMDL*>* requests = [NSMutableArray new];
|
|
2565
2573
|
for(NSDictionary* item in [input valueForKey:@"requests"]){
|
|
@@ -2596,6 +2604,28 @@ static NSMutableArray* weakReferencesHolder;
|
|
|
2596
2604
|
return [RGLWJSONConstructor dictToString: result];
|
|
2597
2605
|
}
|
|
2598
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
|
+
|
|
2599
2629
|
+(RGLDocumentReaderResults*)documentReaderResultsFromJson:(NSDictionary*)input {
|
|
2600
2630
|
NSMutableArray<RGLDocumentReaderDocumentType*>* documentType = [NSMutableArray new];
|
|
2601
2631
|
for(NSDictionary* item in [input valueForKey:@"documentType"]){
|
|
@@ -2641,6 +2671,7 @@ static NSMutableArray* weakReferencesHolder;
|
|
|
2641
2671
|
transactionInfo:[self transactionInfoFromJson:[input valueForKey:@"transactionInfo"]]];
|
|
2642
2672
|
|
|
2643
2673
|
[result setValue:[RGLWJSONConstructor base64Decode:input[@"dtcData"]] forKey:@"dtcData"];
|
|
2674
|
+
[result setValue:input[@"bsiTr03135Results"] forKey:@"bsiTr03135Results"];
|
|
2644
2675
|
|
|
2645
2676
|
return result;
|
|
2646
2677
|
}
|
|
@@ -2690,6 +2721,7 @@ static NSMutableArray* weakReferencesHolder;
|
|
|
2690
2721
|
result[@"elapsedTime"] = @(input.elapsedTime);
|
|
2691
2722
|
result[@"elapsedTimeRFID"] = @(input.elapsedTimeRFID);
|
|
2692
2723
|
result[@"rawResult"] = input.rawResult;
|
|
2724
|
+
result[@"bsiTr03135Results"] = input.bsiTr03135Results;
|
|
2693
2725
|
result[@"status"] = [self generateDocumentReaderResultsStatus:input.status];
|
|
2694
2726
|
result[@"vdsncData"] = [self generateVDSNCData:input.vdsncData];
|
|
2695
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"]
|
|
@@ -1888,6 +1890,18 @@ class DeviceEngagement {
|
|
|
1888
1890
|
}
|
|
1889
1891
|
}
|
|
1890
1892
|
|
|
1893
|
+
class DeviceEngagementCompletion {
|
|
1894
|
+
static fromJson(jsonObject) {
|
|
1895
|
+
if (jsonObject == null) return null
|
|
1896
|
+
const result = new DeviceEngagementCompletion()
|
|
1897
|
+
|
|
1898
|
+
result.deviceEngagement = DeviceEngagement.fromJson(jsonObject["deviceEngagement"])
|
|
1899
|
+
result.error = RegulaException.fromJson(jsonObject["error"])
|
|
1900
|
+
|
|
1901
|
+
return result
|
|
1902
|
+
}
|
|
1903
|
+
}
|
|
1904
|
+
|
|
1891
1905
|
class DeviceRetrievalMethod {
|
|
1892
1906
|
static fromJson(jsonObject) {
|
|
1893
1907
|
if (jsonObject == null) return null
|
|
@@ -2001,6 +2015,19 @@ class DocumentRequest18013MDL {
|
|
|
2001
2015
|
}
|
|
2002
2016
|
}
|
|
2003
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
|
+
|
|
2004
2031
|
// Enum
|
|
2005
2032
|
|
|
2006
2033
|
const FontStyle = {
|
|
@@ -2363,6 +2390,7 @@ const eRPRM_ResultType = {
|
|
|
2363
2390
|
RPRM_RESULT_TYPE_STATUS: 33,
|
|
2364
2391
|
RPRM_RESULT_TYPE_PORTRAIT_COMPARISON: 34,
|
|
2365
2392
|
RPRM_RESULT_TYPE_EXT_PORTRAIT: 35,
|
|
2393
|
+
RPRM_RESULT_TYPE_BSI_XML_V2: 73,
|
|
2366
2394
|
}
|
|
2367
2395
|
|
|
2368
2396
|
const FrameShapeType = {
|
|
@@ -2812,6 +2840,7 @@ const eCheckDiagnose = {
|
|
|
2812
2840
|
CHD_DOC_LIVENESS_BLACK_AND_WHITE_COPY_DETECTED: 239,
|
|
2813
2841
|
DOC_LIVENESS_ELECTRONIC_DEVICE_DETECTED: 240,
|
|
2814
2842
|
DOC_LIVENESS_INVALID_BARCODE_BACKGROUND: 241,
|
|
2843
|
+
DOC_LIVENESS_VIRTUAL_CAMERA_DETECTED: 242,
|
|
2815
2844
|
ICAO_IDB_BASE_32_ERROR: 243,
|
|
2816
2845
|
ICAO_IDB_ZIPPED_ERROR: 244,
|
|
2817
2846
|
ICAO_IDB_MESSAGE_ZONE_EMPTY: 245,
|
|
@@ -3218,6 +3247,10 @@ const eRPRM_SecurityFeatureType = {
|
|
|
3218
3247
|
SECURITY_FEATURE_TYPE_LIVENESS_GEOMETRY_CHECK: 55,
|
|
3219
3248
|
SECURITY_FEATURE_TYPE_AGE_CHECK: 56,
|
|
3220
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,
|
|
3221
3254
|
}
|
|
3222
3255
|
|
|
3223
3256
|
const OnlineMode = {
|
|
@@ -4679,6 +4712,7 @@ DocumentReader.engageDeviceData = (data, successCallback, errorCallback) => cord
|
|
|
4679
4712
|
DocumentReader.startRetrieveData = (deviceEngagement, dataRetrieval, successCallback, errorCallback) => cordova.exec(successCallback, errorCallback, "DocumentReader", "exec", ["startRetrieveData", deviceEngagement, dataRetrieval])
|
|
4680
4713
|
DocumentReader.retrieveDataNFC = (dataRetrieval, successCallback, errorCallback) => cordova.exec(successCallback, errorCallback, "DocumentReader", "exec", ["retrieveDataNFC", dataRetrieval])
|
|
4681
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])
|
|
4682
4716
|
|
|
4683
4717
|
DocumentReader.textFieldValueByType = (results, fieldType, successCallback, errorCallback) => cordova.exec(successCallback, errorCallback, "DocumentReader", "exec", ["textFieldValueByType", results.rawResult, fieldType])
|
|
4684
4718
|
DocumentReader.textFieldValueByTypeLcid = (results, fieldType, lcid, successCallback, errorCallback) => cordova.exec(successCallback, errorCallback, "DocumentReader", "exec", ["textFieldValueByTypeLcid", results.rawResult, fieldType, lcid])
|
|
@@ -4794,10 +4828,12 @@ DocumentReaderPlugin.DTCDataGroup = DTCDataGroup
|
|
|
4794
4828
|
DocumentReaderPlugin.RFIDScenario = RFIDScenario
|
|
4795
4829
|
DocumentReaderPlugin.PrepareProgress = PrepareProgress
|
|
4796
4830
|
DocumentReaderPlugin.DeviceEngagement = DeviceEngagement
|
|
4831
|
+
DocumentReaderPlugin.DeviceEngagementCompletion = DeviceEngagementCompletion
|
|
4797
4832
|
DocumentReaderPlugin.DeviceRetrievalMethod = DeviceRetrievalMethod
|
|
4798
4833
|
DocumentReaderPlugin.DataRetrieval = DataRetrieval
|
|
4799
4834
|
DocumentReaderPlugin.DocumentRequestMDL = DocumentRequestMDL
|
|
4800
4835
|
DocumentReaderPlugin.NameSpaceMDL = NameSpaceMDL
|
|
4801
4836
|
DocumentReaderPlugin.DocumentRequest18013MDL = DocumentRequest18013MDL
|
|
4837
|
+
DocumentReaderPlugin.FinalizeConfig = FinalizeConfig
|
|
4802
4838
|
|
|
4803
4839
|
module.exports = DocumentReaderPlugin
|