@regulaforensics/document-reader 9.2.555-nightly → 9.2.557-beta
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/RNDocumentReader.podspec +2 -2
- package/android/build.gradle +2 -2
- package/android/cordova.gradle +2 -2
- package/android/src/main/java/com/regula/plugin/documentreader/Config.kt +2 -0
- package/android/src/main/java/com/regula/plugin/documentreader/JSONConstructor.kt +20 -1
- package/android/src/main/java/com/regula/plugin/documentreader/Main.kt +9 -2
- package/examples/capacitor/package-lock.json +662 -743
- package/examples/capacitor/package.json +15 -15
- package/examples/ionic/package-lock.json +436 -489
- package/examples/ionic/package.json +1 -1
- package/examples/react_native/package.json +1 -1
- package/ios/RGLWConfig.m +4 -0
- package/ios/RGLWJSONConstructor.h +2 -0
- package/ios/RGLWJSONConstructor.m +31 -4
- package/ios/RGLWMain.m +23 -22
- package/package.json +1 -1
- package/plugin.xml +2 -2
- package/test/json.tsx +9 -2
- package/test/package-lock.json +1 -1
- package/test/test.tsx +3 -2
- package/www/capacitor/config/FinalizeConfig.js +31 -0
- package/www/capacitor/index.js +15 -12
- package/www/capacitor/params/process_params/ProcessParams.js +8 -0
- package/www/capacitor/results/Results.js +4 -0
- package/www/capacitor/results/authenticity/CheckDiagnose.js +1 -0
- package/www/capacitor/results/authenticity/SecurityFeatureType.js +4 -0
- package/www/cordova.js +1001 -934
- package/www/react-native/config/FinalizeConfig.js +31 -0
- package/www/react-native/index.js +15 -12
- package/www/react-native/params/process_params/ProcessParams.js +8 -0
- package/www/react-native/results/Results.js +4 -0
- package/www/react-native/results/authenticity/CheckDiagnose.js +1 -0
- package/www/react-native/results/authenticity/SecurityFeatureType.js +4 -0
- package/www/types/config/FinalizeConfig.d.ts +5 -0
- package/www/types/index.d.ts +8 -7
- package/www/types/params/customization/Customization.d.ts +1 -1
- package/www/types/params/process_params/ProcessParams.d.ts +1 -4
- package/www/types/results/Results.d.ts +4 -0
- package/www/types/results/authenticity/CheckDiagnose.d.ts +2 -0
- package/www/types/results/authenticity/SecurityFeatureType.d.ts +4 -0
- package/www/types/results/status/ResultsStatus.d.ts +0 -1
- /package/www/capacitor/{engagement → mdl}/DataRetrieval.js +0 -0
- /package/www/capacitor/{engagement → mdl}/DeviceEngagement.js +0 -0
- /package/www/capacitor/{engagement → mdl}/DeviceRetrievalMethod.js +0 -0
- /package/www/capacitor/{engagement → mdl}/DocumentRequestMDL.js +0 -0
- /package/www/capacitor/{engagement → mdl}/NameSpaceMDL.js +0 -0
- /package/www/react-native/{engagement → mdl}/DataRetrieval.js +0 -0
- /package/www/react-native/{engagement → mdl}/DeviceEngagement.js +0 -0
- /package/www/react-native/{engagement → mdl}/DeviceRetrievalMethod.js +0 -0
- /package/www/react-native/{engagement → mdl}/DocumentRequestMDL.js +0 -0
- /package/www/react-native/{engagement → mdl}/NameSpaceMDL.js +0 -0
- /package/www/types/{engagement → mdl}/DataRetrieval.d.ts +0 -0
- /package/www/types/{engagement → mdl}/DeviceEngagement.d.ts +0 -0
- /package/www/types/{engagement → mdl}/DeviceRetrievalMethod.d.ts +0 -0
- /package/www/types/{engagement → mdl}/DocumentRequestMDL.d.ts +0 -0
- /package/www/types/{engagement → mdl}/NameSpaceMDL.d.ts +0 -0
package/RNDocumentReader.podspec
CHANGED
|
@@ -5,7 +5,7 @@ source = File.join(__dir__, 'ios')
|
|
|
5
5
|
|
|
6
6
|
Pod::Spec.new do |s|
|
|
7
7
|
s.name = 'RNDocumentReader'
|
|
8
|
-
s.version = '9.2.
|
|
8
|
+
s.version = '9.2.557-beta'
|
|
9
9
|
s.summary = package['description']
|
|
10
10
|
s.license = package['license']
|
|
11
11
|
|
|
@@ -16,6 +16,6 @@ Pod::Spec.new do |s|
|
|
|
16
16
|
s.ios.deployment_target = '13.0'
|
|
17
17
|
s.source_files = 'ios/**/*.{h,m}'
|
|
18
18
|
s.exclude_files = [ 'ios/CVDDocumentReader.h', 'ios/CVDDocumentReader.m' ]
|
|
19
|
-
s.dependency '
|
|
19
|
+
s.dependency 'DocumentReader', '9.1.5702'
|
|
20
20
|
s.dependency 'React'
|
|
21
21
|
end
|
package/android/build.gradle
CHANGED
|
@@ -20,7 +20,7 @@ android {
|
|
|
20
20
|
rootProject.allprojects {
|
|
21
21
|
repositories {
|
|
22
22
|
maven {
|
|
23
|
-
url "https://maven.regulaforensics.com/RegulaDocumentReader
|
|
23
|
+
url "https://maven.regulaforensics.com/RegulaDocumentReader"
|
|
24
24
|
}
|
|
25
25
|
}
|
|
26
26
|
}
|
|
@@ -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.
|
|
32
|
+
implementation('com.regula.documentreader:api:9.1.12250'){
|
|
33
33
|
transitive = true
|
|
34
34
|
}
|
|
35
35
|
}
|
package/android/cordova.gradle
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
repositories {
|
|
2
2
|
maven {
|
|
3
|
-
url "https://maven.regulaforensics.com/RegulaDocumentReader
|
|
3
|
+
url "https://maven.regulaforensics.com/RegulaDocumentReader"
|
|
4
4
|
}
|
|
5
5
|
}
|
|
6
6
|
|
|
7
7
|
dependencies {
|
|
8
8
|
//noinspection GradleDependency
|
|
9
|
-
implementation('com.regula.documentreader:api:9.
|
|
9
|
+
implementation('com.regula.documentreader:api:9.1.12250'){
|
|
10
10
|
transitive = true
|
|
11
11
|
}
|
|
12
12
|
}
|
|
@@ -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
|
+
}
|
|
@@ -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(
|