@regulaforensics/document-reader 9.2.556-beta → 9.2.558-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.
Files changed (41) hide show
  1. package/RNDocumentReader.podspec +2 -2
  2. package/android/build.gradle +2 -2
  3. package/android/cordova.gradle +2 -2
  4. package/android/src/main/java/com/regula/plugin/documentreader/Config.kt +2 -0
  5. package/android/src/main/java/com/regula/plugin/documentreader/JSONConstructor.kt +19 -0
  6. package/android/src/main/java/com/regula/plugin/documentreader/Main.kt +9 -2
  7. package/examples/capacitor/package-lock.json +662 -743
  8. package/examples/capacitor/package.json +15 -15
  9. package/examples/ionic/package-lock.json +3 -3
  10. package/examples/ionic/package.json +1 -1
  11. package/examples/react_native/package.json +1 -1
  12. package/ios/RGLWConfig.m +4 -0
  13. package/ios/RGLWJSONConstructor.h +2 -0
  14. package/ios/RGLWJSONConstructor.m +25 -0
  15. package/ios/RGLWMain.m +7 -0
  16. package/package.json +1 -1
  17. package/plugin.xml +2 -2
  18. package/test/json.tsx +7 -0
  19. package/test/package-lock.json +1 -1
  20. package/test/test.tsx +3 -2
  21. package/www/capacitor/config/FinalizeConfig.js +31 -0
  22. package/www/capacitor/index.js +10 -7
  23. package/www/capacitor/params/process_params/ProcessParams.js +8 -0
  24. package/www/capacitor/results/Results.js +4 -0
  25. package/www/capacitor/results/authenticity/CheckDiagnose.js +1 -0
  26. package/www/capacitor/results/authenticity/SecurityFeatureType.js +4 -0
  27. package/www/cordova.js +344 -277
  28. package/www/react-native/config/FinalizeConfig.js +31 -0
  29. package/www/react-native/index.js +10 -7
  30. package/www/react-native/params/process_params/ProcessParams.js +8 -0
  31. package/www/react-native/results/Results.js +4 -0
  32. package/www/react-native/results/authenticity/CheckDiagnose.js +1 -0
  33. package/www/react-native/results/authenticity/SecurityFeatureType.js +4 -0
  34. package/www/types/config/FinalizeConfig.d.ts +5 -0
  35. package/www/types/index.d.ts +3 -2
  36. package/www/types/params/customization/Customization.d.ts +1 -1
  37. package/www/types/params/process_params/ProcessParams.d.ts +1 -4
  38. package/www/types/results/Results.d.ts +4 -0
  39. package/www/types/results/authenticity/CheckDiagnose.d.ts +2 -0
  40. package/www/types/results/authenticity/SecurityFeatureType.d.ts +4 -0
  41. package/www/types/results/status/ResultsStatus.d.ts +0 -1
@@ -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.556-beta'
8
+ s.version = '9.2.558-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 'DocumentReader', '9.1.5702'
19
+ s.dependency 'DocumentReaderStage', '9.2.5783'
20
20
  s.dependency 'React'
21
21
  end
@@ -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/Stage"
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.1.12250'){
32
+ implementation('com.regula.documentreader:api:9.1.12329'){
33
33
  transitive = true
34
34
  }
35
35
  }
@@ -1,12 +1,12 @@
1
1
  repositories {
2
2
  maven {
3
- url "https://maven.regulaforensics.com/RegulaDocumentReader"
3
+ url "https://maven.regulaforensics.com/RegulaDocumentReader/Stage"
4
4
  }
5
5
  }
6
6
 
7
7
  dependencies {
8
8
  //noinspection GradleDependency
9
- implementation('com.regula.documentreader:api:9.1.12250'){
9
+ implementation('com.regula.documentreader:api:9.1.12329'){
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),
@@ -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(