@regulaforensics/react-native-document-reader-api 9.1.394-rc → 9.1.415-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/RNDocumentReaderApi.podspec +1 -1
- package/android/build.gradle +1 -1
- package/android/src/main/java/com/regula/plugin/documentreader/Config.kt +2 -0
- package/android/src/main/java/com/regula/plugin/documentreader/JSONConstructor.kt +22 -3
- package/android/src/main/java/com/regula/plugin/documentreader/Main.kt +9 -2
- package/example/package-lock.json +87 -25
- package/example/package.json +2 -2
- package/index.d.ts +44 -1
- package/index.js +34 -0
- package/ios/RGLWConfig.m +4 -0
- package/ios/RGLWJSONConstructor.h +2 -0
- package/ios/RGLWJSONConstructor.m +45 -13
- package/ios/RGLWMain.m +23 -22
- package/package.json +1 -1
|
@@ -14,6 +14,6 @@ Pod::Spec.new do |s|
|
|
|
14
14
|
s.source = { :http => 'file:' + __dir__ }
|
|
15
15
|
s.ios.deployment_target = '13.0'
|
|
16
16
|
s.source_files = "ios/*.{h,m}"
|
|
17
|
-
s.dependency 'DocumentReaderStage', '9.2.
|
|
17
|
+
s.dependency 'DocumentReaderStage', '9.2.5883'
|
|
18
18
|
s.dependency 'React'
|
|
19
19
|
end
|
package/android/build.gradle
CHANGED
|
@@ -29,7 +29,7 @@ dependencies {
|
|
|
29
29
|
//noinspection GradleDynamicVersion
|
|
30
30
|
implementation 'com.facebook.react:react-native:+'
|
|
31
31
|
//noinspection GradleDependency
|
|
32
|
-
implementation('com.regula.documentreader:api:9.1.
|
|
32
|
+
implementation('com.regula.documentreader:api:9.1.12376') {
|
|
33
33
|
transitive = true
|
|
34
34
|
}
|
|
35
35
|
}
|
|
@@ -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
|
+
}
|
|
@@ -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(
|
|
@@ -4402,24 +4402,24 @@
|
|
|
4402
4402
|
}
|
|
4403
4403
|
},
|
|
4404
4404
|
"node_modules/body-parser": {
|
|
4405
|
-
"version": "1.20.
|
|
4406
|
-
"resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.
|
|
4407
|
-
"integrity": "sha512-
|
|
4405
|
+
"version": "1.20.4",
|
|
4406
|
+
"resolved": "https://registry.npmjs.org/body-parser/-/body-parser-1.20.4.tgz",
|
|
4407
|
+
"integrity": "sha512-ZTgYYLMOXY9qKU/57FAo8F+HA2dGX7bqGc71txDRC1rS4frdFI5R7NhluHxH6M0YItAP0sHB4uqAOcYKxO6uGA==",
|
|
4408
4408
|
"devOptional": true,
|
|
4409
4409
|
"license": "MIT",
|
|
4410
4410
|
"dependencies": {
|
|
4411
|
-
"bytes": "3.1.2",
|
|
4411
|
+
"bytes": "~3.1.2",
|
|
4412
4412
|
"content-type": "~1.0.5",
|
|
4413
4413
|
"debug": "2.6.9",
|
|
4414
4414
|
"depd": "2.0.0",
|
|
4415
|
-
"destroy": "1.2.0",
|
|
4416
|
-
"http-errors": "2.0.
|
|
4417
|
-
"iconv-lite": "0.4.24",
|
|
4418
|
-
"on-finished": "2.4.1",
|
|
4419
|
-
"qs": "6.
|
|
4420
|
-
"raw-body": "2.5.
|
|
4415
|
+
"destroy": "~1.2.0",
|
|
4416
|
+
"http-errors": "~2.0.1",
|
|
4417
|
+
"iconv-lite": "~0.4.24",
|
|
4418
|
+
"on-finished": "~2.4.1",
|
|
4419
|
+
"qs": "~6.14.0",
|
|
4420
|
+
"raw-body": "~2.5.3",
|
|
4421
4421
|
"type-is": "~1.6.18",
|
|
4422
|
-
"unpipe": "1.0.0"
|
|
4422
|
+
"unpipe": "~1.0.0"
|
|
4423
4423
|
},
|
|
4424
4424
|
"engines": {
|
|
4425
4425
|
"node": ">= 0.8",
|
|
@@ -4436,6 +4436,27 @@
|
|
|
4436
4436
|
"ms": "2.0.0"
|
|
4437
4437
|
}
|
|
4438
4438
|
},
|
|
4439
|
+
"node_modules/body-parser/node_modules/http-errors": {
|
|
4440
|
+
"version": "2.0.1",
|
|
4441
|
+
"resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.1.tgz",
|
|
4442
|
+
"integrity": "sha512-4FbRdAX+bSdmo4AUFuS0WNiPz8NgFt+r8ThgNWmlrjQjt1Q7ZR9+zTlce2859x4KSXrwIsaeTqDoKQmtP8pLmQ==",
|
|
4443
|
+
"devOptional": true,
|
|
4444
|
+
"license": "MIT",
|
|
4445
|
+
"dependencies": {
|
|
4446
|
+
"depd": "~2.0.0",
|
|
4447
|
+
"inherits": "~2.0.4",
|
|
4448
|
+
"setprototypeof": "~1.2.0",
|
|
4449
|
+
"statuses": "~2.0.2",
|
|
4450
|
+
"toidentifier": "~1.0.1"
|
|
4451
|
+
},
|
|
4452
|
+
"engines": {
|
|
4453
|
+
"node": ">= 0.8"
|
|
4454
|
+
},
|
|
4455
|
+
"funding": {
|
|
4456
|
+
"type": "opencollective",
|
|
4457
|
+
"url": "https://opencollective.com/express"
|
|
4458
|
+
}
|
|
4459
|
+
},
|
|
4439
4460
|
"node_modules/body-parser/node_modules/ms": {
|
|
4440
4461
|
"version": "2.0.0",
|
|
4441
4462
|
"resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz",
|
|
@@ -4443,6 +4464,16 @@
|
|
|
4443
4464
|
"devOptional": true,
|
|
4444
4465
|
"license": "MIT"
|
|
4445
4466
|
},
|
|
4467
|
+
"node_modules/body-parser/node_modules/statuses": {
|
|
4468
|
+
"version": "2.0.2",
|
|
4469
|
+
"resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.2.tgz",
|
|
4470
|
+
"integrity": "sha512-DvEy55V3DB7uknRo+4iOGT5fP1slR8wQohVdknigZPMpMstaKJQWhwiYBACJE3Ul2pTnATihhBYnRhZQHGBiRw==",
|
|
4471
|
+
"devOptional": true,
|
|
4472
|
+
"license": "MIT",
|
|
4473
|
+
"engines": {
|
|
4474
|
+
"node": ">= 0.8"
|
|
4475
|
+
}
|
|
4476
|
+
},
|
|
4446
4477
|
"node_modules/boolbase": {
|
|
4447
4478
|
"version": "1.0.0",
|
|
4448
4479
|
"resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz",
|
|
@@ -9055,9 +9086,9 @@
|
|
|
9055
9086
|
}
|
|
9056
9087
|
},
|
|
9057
9088
|
"node_modules/lodash": {
|
|
9058
|
-
"version": "4.17.
|
|
9059
|
-
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.
|
|
9060
|
-
"integrity": "sha512-
|
|
9089
|
+
"version": "4.17.23",
|
|
9090
|
+
"resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.23.tgz",
|
|
9091
|
+
"integrity": "sha512-LgVTMpQtIopCi79SJeDiP0TfWi5CNEc/L/aRdTh3yIvmZXTnheWpKjSZhnvMl8iXbC1tFg9gdHHDMLoV7CnG+w==",
|
|
9061
9092
|
"license": "MIT"
|
|
9062
9093
|
},
|
|
9063
9094
|
"node_modules/lodash.debounce": {
|
|
@@ -10561,13 +10592,13 @@
|
|
|
10561
10592
|
"license": "MIT"
|
|
10562
10593
|
},
|
|
10563
10594
|
"node_modules/qs": {
|
|
10564
|
-
"version": "6.
|
|
10565
|
-
"resolved": "https://registry.npmjs.org/qs/-/qs-6.
|
|
10566
|
-
"integrity": "sha512
|
|
10595
|
+
"version": "6.14.1",
|
|
10596
|
+
"resolved": "https://registry.npmjs.org/qs/-/qs-6.14.1.tgz",
|
|
10597
|
+
"integrity": "sha512-4EK3+xJl8Ts67nLYNwqw/dsFVnCf+qR7RgXSK9jEEm9unao3njwMDdmsdvoKBKHzxd7tCYz5e5M+SnMjdtXGQQ==",
|
|
10567
10598
|
"devOptional": true,
|
|
10568
10599
|
"license": "BSD-3-Clause",
|
|
10569
10600
|
"dependencies": {
|
|
10570
|
-
"side-channel": "^1.0
|
|
10601
|
+
"side-channel": "^1.1.0"
|
|
10571
10602
|
},
|
|
10572
10603
|
"engines": {
|
|
10573
10604
|
"node": ">=0.6"
|
|
@@ -10616,21 +10647,52 @@
|
|
|
10616
10647
|
}
|
|
10617
10648
|
},
|
|
10618
10649
|
"node_modules/raw-body": {
|
|
10619
|
-
"version": "2.5.
|
|
10620
|
-
"resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.
|
|
10621
|
-
"integrity": "sha512-
|
|
10650
|
+
"version": "2.5.3",
|
|
10651
|
+
"resolved": "https://registry.npmjs.org/raw-body/-/raw-body-2.5.3.tgz",
|
|
10652
|
+
"integrity": "sha512-s4VSOf6yN0rvbRZGxs8Om5CWj6seneMwK3oDb4lWDH0UPhWcxwOWw5+qk24bxq87szX1ydrwylIOp2uG1ojUpA==",
|
|
10622
10653
|
"devOptional": true,
|
|
10623
10654
|
"license": "MIT",
|
|
10624
10655
|
"dependencies": {
|
|
10625
|
-
"bytes": "3.1.2",
|
|
10626
|
-
"http-errors": "2.0.
|
|
10627
|
-
"iconv-lite": "0.4.24",
|
|
10628
|
-
"unpipe": "1.0.0"
|
|
10656
|
+
"bytes": "~3.1.2",
|
|
10657
|
+
"http-errors": "~2.0.1",
|
|
10658
|
+
"iconv-lite": "~0.4.24",
|
|
10659
|
+
"unpipe": "~1.0.0"
|
|
10629
10660
|
},
|
|
10630
10661
|
"engines": {
|
|
10631
10662
|
"node": ">= 0.8"
|
|
10632
10663
|
}
|
|
10633
10664
|
},
|
|
10665
|
+
"node_modules/raw-body/node_modules/http-errors": {
|
|
10666
|
+
"version": "2.0.1",
|
|
10667
|
+
"resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.1.tgz",
|
|
10668
|
+
"integrity": "sha512-4FbRdAX+bSdmo4AUFuS0WNiPz8NgFt+r8ThgNWmlrjQjt1Q7ZR9+zTlce2859x4KSXrwIsaeTqDoKQmtP8pLmQ==",
|
|
10669
|
+
"devOptional": true,
|
|
10670
|
+
"license": "MIT",
|
|
10671
|
+
"dependencies": {
|
|
10672
|
+
"depd": "~2.0.0",
|
|
10673
|
+
"inherits": "~2.0.4",
|
|
10674
|
+
"setprototypeof": "~1.2.0",
|
|
10675
|
+
"statuses": "~2.0.2",
|
|
10676
|
+
"toidentifier": "~1.0.1"
|
|
10677
|
+
},
|
|
10678
|
+
"engines": {
|
|
10679
|
+
"node": ">= 0.8"
|
|
10680
|
+
},
|
|
10681
|
+
"funding": {
|
|
10682
|
+
"type": "opencollective",
|
|
10683
|
+
"url": "https://opencollective.com/express"
|
|
10684
|
+
}
|
|
10685
|
+
},
|
|
10686
|
+
"node_modules/raw-body/node_modules/statuses": {
|
|
10687
|
+
"version": "2.0.2",
|
|
10688
|
+
"resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.2.tgz",
|
|
10689
|
+
"integrity": "sha512-DvEy55V3DB7uknRo+4iOGT5fP1slR8wQohVdknigZPMpMstaKJQWhwiYBACJE3Ul2pTnATihhBYnRhZQHGBiRw==",
|
|
10690
|
+
"devOptional": true,
|
|
10691
|
+
"license": "MIT",
|
|
10692
|
+
"engines": {
|
|
10693
|
+
"node": ">= 0.8"
|
|
10694
|
+
}
|
|
10695
|
+
},
|
|
10634
10696
|
"node_modules/react": {
|
|
10635
10697
|
"version": "19.0.0",
|
|
10636
10698
|
"resolved": "https://registry.npmjs.org/react/-/react-19.0.0.tgz",
|
package/example/package.json
CHANGED
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
"test": "jest"
|
|
11
11
|
},
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@regulaforensics/react-native-document-reader-api": "9.1.
|
|
14
|
-
"@regulaforensics/react-native-document-reader-core-fullauthrfid": "9.2.
|
|
13
|
+
"@regulaforensics/react-native-document-reader-api": "9.1.415-rc",
|
|
14
|
+
"@regulaforensics/react-native-document-reader-core-fullauthrfid": "9.2.1824-rc",
|
|
15
15
|
"@rneui/base": "4.0.0-rc.7",
|
|
16
16
|
"@rneui/themed": "4.0.0-rc.7",
|
|
17
17
|
"react": "19.0.0",
|
package/index.d.ts
CHANGED
|
@@ -1756,6 +1756,7 @@ export class DocumentReaderResults {
|
|
|
1756
1756
|
mrzPosition?: ElementPosition[]
|
|
1757
1757
|
imageQuality?: ImageQualityGroup[]
|
|
1758
1758
|
rawResult?: string
|
|
1759
|
+
bsiTr03135Results?: string
|
|
1759
1760
|
rfidSessionData?: RFIDSessionData
|
|
1760
1761
|
authenticityResult?: DocumentReaderAuthenticityResult
|
|
1761
1762
|
barcodeResult?: DocumentReaderBarcodeResult
|
|
@@ -1878,6 +1879,7 @@ export class DocumentReaderResults {
|
|
|
1878
1879
|
}
|
|
1879
1880
|
}
|
|
1880
1881
|
result.rawResult = jsonObject["rawResult"]
|
|
1882
|
+
result.bsiTr03135Results = jsonObject["bsiTr03135Results"]
|
|
1881
1883
|
result.rfidSessionData = RFIDSessionData.fromJson(jsonObject["rfidSessionData"])
|
|
1882
1884
|
result.authenticityResult = DocumentReaderAuthenticityResult.fromJson(jsonObject["authenticityResult"])
|
|
1883
1885
|
result.barcodeResult = DocumentReaderBarcodeResult.fromJson(jsonObject["barcodeResult"])
|
|
@@ -2251,6 +2253,7 @@ export class ProcessParams {
|
|
|
2251
2253
|
strictSecurityChecks?: boolean
|
|
2252
2254
|
returnTransliteratedFields?: boolean
|
|
2253
2255
|
checkCaptureProcessIntegrity?: boolean
|
|
2256
|
+
bsiTr03135Results?: boolean
|
|
2254
2257
|
barcodeParserType?: number
|
|
2255
2258
|
perspectiveAngle?: number
|
|
2256
2259
|
minDPI?: number
|
|
@@ -2336,6 +2339,7 @@ export class ProcessParams {
|
|
|
2336
2339
|
result.strictSecurityChecks = jsonObject["strictSecurityChecks"]
|
|
2337
2340
|
result.returnTransliteratedFields = jsonObject["returnTransliteratedFields"]
|
|
2338
2341
|
result.checkCaptureProcessIntegrity = jsonObject["checkCaptureProcessIntegrity"]
|
|
2342
|
+
result.bsiTr03135Results = jsonObject["bsiTr03135Results"]
|
|
2339
2343
|
result.barcodeParserType = jsonObject["barcodeParserType"]
|
|
2340
2344
|
result.perspectiveAngle = jsonObject["perspectiveAngle"]
|
|
2341
2345
|
result.minDPI = jsonObject["minDPI"]
|
|
@@ -3023,6 +3027,21 @@ export class DeviceEngagement {
|
|
|
3023
3027
|
}
|
|
3024
3028
|
}
|
|
3025
3029
|
|
|
3030
|
+
export class DeviceEngagementCompletion {
|
|
3031
|
+
deviceEngagement?: DeviceEngagement
|
|
3032
|
+
error?: RegulaException
|
|
3033
|
+
|
|
3034
|
+
static fromJson(jsonObject?: any): DeviceEngagementCompletion | undefined {
|
|
3035
|
+
if (jsonObject == null || jsonObject == undefined) return undefined
|
|
3036
|
+
const result = new DeviceEngagementCompletion
|
|
3037
|
+
|
|
3038
|
+
result.deviceEngagement = DeviceEngagement.fromJson(jsonObject["deviceEngagement"])
|
|
3039
|
+
result.error = RegulaException.fromJson(jsonObject["error"])
|
|
3040
|
+
|
|
3041
|
+
return result
|
|
3042
|
+
}
|
|
3043
|
+
}
|
|
3044
|
+
|
|
3026
3045
|
export class DeviceRetrievalMethod {
|
|
3027
3046
|
type?: number
|
|
3028
3047
|
version?: number
|
|
@@ -3053,7 +3072,7 @@ export class DeviceRetrievalMethod {
|
|
|
3053
3072
|
export class DataRetrieval {
|
|
3054
3073
|
deviceRetrieval?: number
|
|
3055
3074
|
docRequestPreset?: number
|
|
3056
|
-
intentToRetain?:
|
|
3075
|
+
intentToRetain?: number
|
|
3057
3076
|
requests?: any[]
|
|
3058
3077
|
|
|
3059
3078
|
static fromJson(jsonObject?: any): DataRetrieval | undefined {
|
|
@@ -3205,6 +3224,23 @@ export class DocumentRequest18013MDL {
|
|
|
3205
3224
|
}
|
|
3206
3225
|
}
|
|
3207
3226
|
|
|
3227
|
+
export class FinalizeConfig {
|
|
3228
|
+
rawImages?: boolean
|
|
3229
|
+
video?: boolean
|
|
3230
|
+
rfidSession?: boolean
|
|
3231
|
+
|
|
3232
|
+
static fromJson(jsonObject?: any): FinalizeConfig | undefined {
|
|
3233
|
+
if (jsonObject == null || jsonObject == undefined) return undefined
|
|
3234
|
+
const result = new FinalizeConfig
|
|
3235
|
+
|
|
3236
|
+
result.rawImages = jsonObject["rawImages"]
|
|
3237
|
+
result.video = jsonObject["video"]
|
|
3238
|
+
result.rfidSession = jsonObject["rfidSession"]
|
|
3239
|
+
|
|
3240
|
+
return result
|
|
3241
|
+
}
|
|
3242
|
+
}
|
|
3243
|
+
|
|
3208
3244
|
export const FontStyle = {
|
|
3209
3245
|
NORMAL: 0,
|
|
3210
3246
|
BOLD: 1,
|
|
@@ -3565,6 +3601,7 @@ export const eRPRM_ResultType = {
|
|
|
3565
3601
|
RPRM_RESULT_TYPE_STATUS: 33,
|
|
3566
3602
|
RPRM_RESULT_TYPE_PORTRAIT_COMPARISON: 34,
|
|
3567
3603
|
RPRM_RESULT_TYPE_EXT_PORTRAIT: 35,
|
|
3604
|
+
RPRM_RESULT_TYPE_BSI_XML_V2: 73,
|
|
3568
3605
|
}
|
|
3569
3606
|
|
|
3570
3607
|
export const FrameShapeType = {
|
|
@@ -4014,6 +4051,7 @@ export const eCheckDiagnose = {
|
|
|
4014
4051
|
CHD_DOC_LIVENESS_BLACK_AND_WHITE_COPY_DETECTED: 239,
|
|
4015
4052
|
DOC_LIVENESS_ELECTRONIC_DEVICE_DETECTED: 240,
|
|
4016
4053
|
DOC_LIVENESS_INVALID_BARCODE_BACKGROUND: 241,
|
|
4054
|
+
DOC_LIVENESS_VIRTUAL_CAMERA_DETECTED: 242,
|
|
4017
4055
|
ICAO_IDB_BASE_32_ERROR: 243,
|
|
4018
4056
|
ICAO_IDB_ZIPPED_ERROR: 244,
|
|
4019
4057
|
ICAO_IDB_MESSAGE_ZONE_EMPTY: 245,
|
|
@@ -4420,6 +4458,10 @@ export const eRPRM_SecurityFeatureType = {
|
|
|
4420
4458
|
SECURITY_FEATURE_TYPE_LIVENESS_GEOMETRY_CHECK: 55,
|
|
4421
4459
|
SECURITY_FEATURE_TYPE_AGE_CHECK: 56,
|
|
4422
4460
|
SECURITY_FEATURE_TYPE_SEX_CHECK: 57,
|
|
4461
|
+
SECURITY_FEATURE_TYPE_PORTRAIT_COMPARISON_RFIDVSGHOST: 58,
|
|
4462
|
+
SECURITY_FEATURE_TYPE_PORTRAIT_COMPARISON_BARCODEVSGHOST: 59,
|
|
4463
|
+
SECURITY_FEATURE_TYPE_PORTRAIT_COMPARISON_GHOSTVSLIVE: 60,
|
|
4464
|
+
SECURITY_FEATURE_TYPE_PORTRAIT_COMPARISON_EXTVSGHOST: 61,
|
|
4423
4465
|
}
|
|
4424
4466
|
|
|
4425
4467
|
export const OnlineMode = {
|
|
@@ -5880,4 +5922,5 @@ export default class DocumentReader {
|
|
|
5880
5922
|
static startRetrieveData(deviceEngagement: DeviceEngagement, dataRetrieval: DataRetrieval, successCallback: (response: string) => void, errorCallback?: (error: string) => void): void
|
|
5881
5923
|
static retrieveDataNFC(dataRetrieval: DataRetrieval, successCallback: (response: string) => void, errorCallback?: (error: string) => void): void
|
|
5882
5924
|
static retrieveDataBLE(deviceEngagement: DeviceEngagement, dataRetrieval: DataRetrieval, successCallback: (response: string) => void, errorCallback?: (error: string) => void): void
|
|
5925
|
+
static finalizePackageWithFinalizeConfig(config: FinalizeConfig, successCallback: (response: string) => void, errorCallback?: (error: string) => void): void
|
|
5883
5926
|
}
|
package/index.js
CHANGED
|
@@ -1272,6 +1272,7 @@ export class DocumentReaderResults {
|
|
|
1272
1272
|
for (const i in jsonObject["imageQuality"])
|
|
1273
1273
|
result.imageQuality.push(ImageQualityGroup.fromJson(jsonObject["imageQuality"][i]))
|
|
1274
1274
|
result.rawResult = jsonObject["rawResult"]
|
|
1275
|
+
result.bsiTr03135Results = jsonObject["bsiTr03135Results"]
|
|
1275
1276
|
result.rfidSessionData = RFIDSessionData.fromJson(jsonObject["rfidSessionData"])
|
|
1276
1277
|
result.authenticityResult = DocumentReaderAuthenticityResult.fromJson(jsonObject["authenticityResult"])
|
|
1277
1278
|
result.barcodeResult = DocumentReaderBarcodeResult.fromJson(jsonObject["barcodeResult"])
|
|
@@ -1537,6 +1538,7 @@ export class ProcessParams {
|
|
|
1537
1538
|
result.strictSecurityChecks = jsonObject["strictSecurityChecks"]
|
|
1538
1539
|
result.returnTransliteratedFields = jsonObject["returnTransliteratedFields"]
|
|
1539
1540
|
result.checkCaptureProcessIntegrity = jsonObject["checkCaptureProcessIntegrity"]
|
|
1541
|
+
result.bsiTr03135Results = jsonObject["bsiTr03135Results"]
|
|
1540
1542
|
result.barcodeParserType = jsonObject["barcodeParserType"]
|
|
1541
1543
|
result.perspectiveAngle = jsonObject["perspectiveAngle"]
|
|
1542
1544
|
result.minDPI = jsonObject["minDPI"]
|
|
@@ -1963,6 +1965,18 @@ export class DeviceEngagement {
|
|
|
1963
1965
|
}
|
|
1964
1966
|
}
|
|
1965
1967
|
|
|
1968
|
+
export class DeviceEngagementCompletion {
|
|
1969
|
+
static fromJson(jsonObject) {
|
|
1970
|
+
if (jsonObject == null) return null
|
|
1971
|
+
const result = new DeviceEngagementCompletion()
|
|
1972
|
+
|
|
1973
|
+
result.deviceEngagement = DeviceEngagement.fromJson(jsonObject["deviceEngagement"])
|
|
1974
|
+
result.error = RegulaException.fromJson(jsonObject["error"])
|
|
1975
|
+
|
|
1976
|
+
return result
|
|
1977
|
+
}
|
|
1978
|
+
}
|
|
1979
|
+
|
|
1966
1980
|
export class DeviceRetrievalMethod {
|
|
1967
1981
|
static fromJson(jsonObject) {
|
|
1968
1982
|
if (jsonObject == null) return null
|
|
@@ -2076,6 +2090,19 @@ export class DocumentRequest18013MDL {
|
|
|
2076
2090
|
}
|
|
2077
2091
|
}
|
|
2078
2092
|
|
|
2093
|
+
export class FinalizeConfig {
|
|
2094
|
+
static fromJson(jsonObject) {
|
|
2095
|
+
if (jsonObject == null) return null
|
|
2096
|
+
const result = new FinalizeConfig()
|
|
2097
|
+
|
|
2098
|
+
result.rawImages = jsonObject["rawImages"]
|
|
2099
|
+
result.video = jsonObject["video"]
|
|
2100
|
+
result.rfidSession = jsonObject["rfidSession"]
|
|
2101
|
+
|
|
2102
|
+
return result
|
|
2103
|
+
}
|
|
2104
|
+
}
|
|
2105
|
+
|
|
2079
2106
|
// Enum
|
|
2080
2107
|
|
|
2081
2108
|
export const FontStyle = {
|
|
@@ -2438,6 +2465,7 @@ export const eRPRM_ResultType = {
|
|
|
2438
2465
|
RPRM_RESULT_TYPE_STATUS: 33,
|
|
2439
2466
|
RPRM_RESULT_TYPE_PORTRAIT_COMPARISON: 34,
|
|
2440
2467
|
RPRM_RESULT_TYPE_EXT_PORTRAIT: 35,
|
|
2468
|
+
RPRM_RESULT_TYPE_BSI_XML_V2: 73,
|
|
2441
2469
|
}
|
|
2442
2470
|
|
|
2443
2471
|
export const FrameShapeType = {
|
|
@@ -2887,6 +2915,7 @@ export const eCheckDiagnose = {
|
|
|
2887
2915
|
CHD_DOC_LIVENESS_BLACK_AND_WHITE_COPY_DETECTED: 239,
|
|
2888
2916
|
DOC_LIVENESS_ELECTRONIC_DEVICE_DETECTED: 240,
|
|
2889
2917
|
DOC_LIVENESS_INVALID_BARCODE_BACKGROUND: 241,
|
|
2918
|
+
DOC_LIVENESS_VIRTUAL_CAMERA_DETECTED: 242,
|
|
2890
2919
|
ICAO_IDB_BASE_32_ERROR: 243,
|
|
2891
2920
|
ICAO_IDB_ZIPPED_ERROR: 244,
|
|
2892
2921
|
ICAO_IDB_MESSAGE_ZONE_EMPTY: 245,
|
|
@@ -3293,6 +3322,10 @@ export const eRPRM_SecurityFeatureType = {
|
|
|
3293
3322
|
SECURITY_FEATURE_TYPE_LIVENESS_GEOMETRY_CHECK: 55,
|
|
3294
3323
|
SECURITY_FEATURE_TYPE_AGE_CHECK: 56,
|
|
3295
3324
|
SECURITY_FEATURE_TYPE_SEX_CHECK: 57,
|
|
3325
|
+
SECURITY_FEATURE_TYPE_PORTRAIT_COMPARISON_RFIDVSGHOST: 58,
|
|
3326
|
+
SECURITY_FEATURE_TYPE_PORTRAIT_COMPARISON_BARCODEVSGHOST: 59,
|
|
3327
|
+
SECURITY_FEATURE_TYPE_PORTRAIT_COMPARISON_GHOSTVSLIVE: 60,
|
|
3328
|
+
SECURITY_FEATURE_TYPE_PORTRAIT_COMPARISON_EXTVSGHOST: 61,
|
|
3296
3329
|
}
|
|
3297
3330
|
|
|
3298
3331
|
export const OnlineMode = {
|
|
@@ -4754,5 +4787,6 @@ DocumentReader.engageDeviceData = (data, successCallback, errorCallback) => RNRe
|
|
|
4754
4787
|
DocumentReader.startRetrieveData = (deviceEngagement, dataRetrieval, successCallback, errorCallback) => RNRegulaDocumentReader.exec("DocumentReader", "startRetrieveData", [deviceEngagement, dataRetrieval], successCallback, errorCallback)
|
|
4755
4788
|
DocumentReader.retrieveDataNFC = (dataRetrieval, successCallback, errorCallback) => RNRegulaDocumentReader.exec("DocumentReader", "retrieveDataNFC", [dataRetrieval], successCallback, errorCallback)
|
|
4756
4789
|
DocumentReader.retrieveDataBLE = (deviceEngagement, dataRetrieval, successCallback, errorCallback) => RNRegulaDocumentReader.exec("DocumentReader", "retrieveDataBLE", [deviceEngagement, dataRetrieval], successCallback, errorCallback)
|
|
4790
|
+
DocumentReader.finalizePackageWithFinalizeConfig = (config, successCallback, errorCallback) => RNRegulaDocumentReader.exec("DocumentReader", "finalizePackageWithFinalizeConfig", [config], successCallback, errorCallback)
|
|
4757
4791
|
|
|
4758
4792
|
export default DocumentReader
|
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
|
|
|
@@ -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/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