@regulaforensics/react-native-document-reader-api 8.4.287-nightly → 8.4.289-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/README.md +5 -0
- package/RNDocumentReaderApi.podspec +1 -1
- package/android/build.gradle +2 -2
- package/android/src/main/java/com/regula/plugin/documentreader/Config.kt +49 -1
- package/android/src/main/java/com/regula/plugin/documentreader/JSONConstructor.kt +30 -0
- package/android/src/main/java/com/regula/plugin/documentreader/Main.kt +24 -1
- package/example/package.json +2 -2
- package/index.d.ts +118 -0
- package/index.js +98 -0
- package/ios/RGLWConfig.m +38 -9
- package/ios/RGLWJSONConstructor.h +1 -0
- package/ios/RGLWJSONConstructor.m +21 -0
- package/ios/RGLWMain.h +2 -2
- package/ios/RGLWMain.m +48 -2
- package/ios/RNRegulaDocumentReader.m +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
# Deprecated
|
|
2
|
+
This plugin is deprecated and `8.6` will be the last release. We kindly recommend migrating to our new plugin `@regulaforensics/document-reader`:
|
|
3
|
+
* [github](https://github.com/regulaforensics/npm-document-reader)
|
|
4
|
+
* [npmjs](https://www.npmjs.com/package/@regulaforensics/document-reader)
|
|
5
|
+
|
|
1
6
|
# Regula Document Reader SDK for React Native
|
|
2
7
|
|
|
3
8
|
Regula Document Reader SDK allows you to read various kinds of identification documents, passports, driving licenses, ID cards, etc. All processing is performed completely _**offline**_ on your device. No any data leaving your device.
|
|
@@ -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 '
|
|
17
|
+
s.dependency 'DocumentReaderStage', '8.4.5303'
|
|
18
18
|
s.dependency 'React'
|
|
19
19
|
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/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:8.4.
|
|
32
|
+
implementation('com.regula.documentreader:api:8.4.11981') {
|
|
33
33
|
transitive = true
|
|
34
34
|
}
|
|
35
35
|
}
|
|
@@ -11,7 +11,7 @@ import androidx.core.content.ContextCompat
|
|
|
11
11
|
import com.regula.documentreader.api.enums.CustomizationColor
|
|
12
12
|
import com.regula.documentreader.api.enums.CustomizationFont
|
|
13
13
|
import com.regula.documentreader.api.enums.CustomizationImage
|
|
14
|
-
import com.regula.documentreader.api.enums.LogLevel
|
|
14
|
+
import com.regula.documentreader.api.internal.enums.LogLevel
|
|
15
15
|
import com.regula.documentreader.api.params.AuthenticityParams
|
|
16
16
|
import com.regula.documentreader.api.params.Functionality
|
|
17
17
|
import com.regula.documentreader.api.params.ImageQA
|
|
@@ -47,6 +47,7 @@ fun setFunctionality(config: Functionality, input: JSONObject) = input.forEach {
|
|
|
47
47
|
"recordScanningProcess" -> editor.setDoRecordProcessingVideo(v as Boolean)
|
|
48
48
|
"manualMultipageMode" -> editor.setManualMultipageMode(v as Boolean)
|
|
49
49
|
"torchTurnedOn" -> editor.setTorchTurnedOn(v as Boolean)
|
|
50
|
+
"preventScreenRecording" -> editor.setPreventScreenRecording(v as Boolean)
|
|
50
51
|
"showCaptureButtonDelayFromDetect" -> editor.setShowCaptureButtonDelayFromDetect(v.toLong())
|
|
51
52
|
"showCaptureButtonDelayFromStart" -> editor.setShowCaptureButtonDelayFromStart(v.toLong())
|
|
52
53
|
"orientation" -> editor.setOrientation(v.toInt())
|
|
@@ -82,6 +83,7 @@ fun getFunctionality(input: Functionality) = mapOf(
|
|
|
82
83
|
"recordScanningProcess" to input.doRecordProcessingVideo(),
|
|
83
84
|
"manualMultipageMode" to input.isManualMultipageMode,
|
|
84
85
|
"torchTurnedOn" to input.isTorchTurnedOn,
|
|
86
|
+
"preventScreenRecording" to input.doPreventScreenRecording(),
|
|
85
87
|
"showCaptureButtonDelayFromDetect" to input.showCaptureButtonDelayFromDetect,
|
|
86
88
|
"showCaptureButtonDelayFromStart" to input.showCaptureButtonDelayFromStart,
|
|
87
89
|
"orientation" to input.orientation,
|
|
@@ -182,6 +184,16 @@ fun setProcessParams(processParams: ProcessParam, opts: JSONObject) = opts.forEa
|
|
|
182
184
|
if (processParams.authenticityParams == null) processParams.authenticityParams = AuthenticityParams.defaultParams()
|
|
183
185
|
setAuthenticityParams(processParams.authenticityParams!!, v as JSONObject)
|
|
184
186
|
}
|
|
187
|
+
|
|
188
|
+
"setCheckFilter" -> processParams.setCheckFilter((v as JSONObject).getString("checkType"), filterObjectFromJSON(v.getJSONObject("filterObject")))
|
|
189
|
+
"removeCheckFilter" -> processParams.removeCheckFilter(v as String)
|
|
190
|
+
"clearCheckFilter" -> processParams.clearCheckFilter()
|
|
191
|
+
"checkFilters" -> {
|
|
192
|
+
processParams.clearCheckFilter()
|
|
193
|
+
(v as JSONObject).forEach { key, value ->
|
|
194
|
+
processParams.setCheckFilter(key, filterObjectFromJSON(value as JSONObject))
|
|
195
|
+
}
|
|
196
|
+
}
|
|
185
197
|
}
|
|
186
198
|
}
|
|
187
199
|
|
|
@@ -693,6 +705,16 @@ fun setAuthenticityParams(input: AuthenticityParams, opts: JSONObject) = opts.fo
|
|
|
693
705
|
if (input.livenessParams == null) input.livenessParams = LivenessParams.defaultParams()
|
|
694
706
|
setLivenessParams(input.livenessParams!!, v as JSONObject)
|
|
695
707
|
}
|
|
708
|
+
|
|
709
|
+
"setCheckFilter" -> input.setCheckFilter((v as JSONObject).getString("checkType"), filterObjectFromJSON(v.getJSONObject("filterObject")))
|
|
710
|
+
"removeCheckFilter" -> input.removeCheckFilter(v as String)
|
|
711
|
+
"clearCheckFilter" -> input.clearCheckFilter()
|
|
712
|
+
"checkFilters" -> {
|
|
713
|
+
input.clearCheckFilter()
|
|
714
|
+
(v as JSONObject).forEach { key, value ->
|
|
715
|
+
input.setCheckFilter(key, filterObjectFromJSON(value as JSONObject))
|
|
716
|
+
}
|
|
717
|
+
}
|
|
696
718
|
}
|
|
697
719
|
}
|
|
698
720
|
|
|
@@ -726,6 +748,16 @@ fun setLivenessParams(input: LivenessParams, opts: JSONObject) = opts.forEach {
|
|
|
726
748
|
"checkBlackAndWhiteCopy" -> input.checkBlackAndWhiteCopy = v as Boolean
|
|
727
749
|
"checkDynaprint" -> input.checkDynaprint = v as Boolean
|
|
728
750
|
"checkGeometry" -> input.checkGeometry = v as Boolean
|
|
751
|
+
|
|
752
|
+
"setCheckFilter" -> input.setCheckFilter((v as JSONObject).getString("checkType"), filterObjectFromJSON(v.getJSONObject("filterObject")))
|
|
753
|
+
"removeCheckFilter" -> input.removeCheckFilter(v as String)
|
|
754
|
+
"clearCheckFilter" -> input.clearCheckFilter()
|
|
755
|
+
"checkFilters" -> {
|
|
756
|
+
input.clearCheckFilter()
|
|
757
|
+
(v as JSONObject).forEach { key, value ->
|
|
758
|
+
input.setCheckFilter(key, filterObjectFromJSON(value as JSONObject))
|
|
759
|
+
}
|
|
760
|
+
}
|
|
729
761
|
}
|
|
730
762
|
}
|
|
731
763
|
|
|
@@ -752,6 +784,10 @@ fun setColors(input: ParamsCustomization.CustomizationEditor, opts: JSONObject)
|
|
|
752
784
|
"rfidProcessingScreenProgressBarBackground" -> input.setColor(CustomizationColor.RFID_PROCESSING_SCREEN_PROGRESS_BAR_BACKGROUND, value)
|
|
753
785
|
"rfidProcessingScreenResultLabelText" -> input.setColor(CustomizationColor.RFID_PROCESSING_SCREEN_RESULT_LABEL_TEXT, value)
|
|
754
786
|
"rfidProcessingScreenLoadingBar" -> input.setColor(CustomizationColor.RFID_PROCESSING_SCREEN_LOADING_BAR, value)
|
|
787
|
+
"rfidEnableNfcTitleText" -> input.setColor(CustomizationColor.RFID_ENABLE_NFC_TITLE_TEXT, value)
|
|
788
|
+
"rfidEnableNfcDescriptionText" -> input.setColor(CustomizationColor.RFID_ENABLE_NFC_DESCRIPTION_TEXT, value)
|
|
789
|
+
"rfidEnableNfcButtonText" -> input.setColor(CustomizationColor.RFID_ENABLE_NFC_BUTTON_TEXT, value)
|
|
790
|
+
"rfidEnableNfcButtonBackground" -> input.setColor(CustomizationColor.RFID_ENABLE_NFC_BUTTON_BACKGROUND, value)
|
|
755
791
|
}
|
|
756
792
|
}
|
|
757
793
|
|
|
@@ -764,6 +800,10 @@ fun getColors(input: Map<CustomizationColor, Long>) = mapOf(
|
|
|
764
800
|
"rfidProcessingScreenProgressBarBackground" to input[CustomizationColor.RFID_PROCESSING_SCREEN_PROGRESS_BAR_BACKGROUND],
|
|
765
801
|
"rfidProcessingScreenResultLabelText" to input[CustomizationColor.RFID_PROCESSING_SCREEN_RESULT_LABEL_TEXT],
|
|
766
802
|
"rfidProcessingScreenLoadingBar" to input[CustomizationColor.RFID_PROCESSING_SCREEN_LOADING_BAR],
|
|
803
|
+
"rfidEnableNfcTitleText" to input[CustomizationColor.RFID_ENABLE_NFC_TITLE_TEXT],
|
|
804
|
+
"rfidEnableNfcDescriptionText" to input[CustomizationColor.RFID_ENABLE_NFC_DESCRIPTION_TEXT],
|
|
805
|
+
"rfidEnableNfcButtonText" to input[CustomizationColor.RFID_ENABLE_NFC_BUTTON_TEXT],
|
|
806
|
+
"rfidEnableNfcButtonBackground" to input[CustomizationColor.RFID_ENABLE_NFC_BUTTON_BACKGROUND],
|
|
767
807
|
).toJson()
|
|
768
808
|
|
|
769
809
|
fun setFonts(input: ParamsCustomization.CustomizationEditor, opts: JSONObject) = opts.forEach { key, value ->
|
|
@@ -771,6 +811,9 @@ fun setFonts(input: ParamsCustomization.CustomizationEditor, opts: JSONObject) =
|
|
|
771
811
|
"rfidProcessingScreenHintLabel" -> CustomizationFont.RFID_PROCESSING_SCREEN_HINT_LABEL.setFont(input, value)
|
|
772
812
|
"rfidProcessingScreenProgressLabel" -> CustomizationFont.RFID_PROCESSING_SCREEN_PROGRESS_LABEL.setFont(input, value)
|
|
773
813
|
"rfidProcessingScreenResultLabel" -> CustomizationFont.RFID_PROCESSING_SCREEN_RESULT_LABEL.setFont(input, value)
|
|
814
|
+
"rfidEnableNfcTitleText" -> CustomizationFont.RFID_ENABLE_NFC_TITLE_TEXT.setFont(input, value)
|
|
815
|
+
"rfidEnableNfcDescriptionText" -> CustomizationFont.RFID_ENABLE_NFC_DESCRIPTION_TEXT.setFont(input, value)
|
|
816
|
+
"rfidEnableNfcButtonText" -> CustomizationFont.RFID_ENABLE_NFC_BUTTON_TEXT.setFont(input, value)
|
|
774
817
|
}
|
|
775
818
|
}
|
|
776
819
|
|
|
@@ -778,16 +821,21 @@ fun getFonts(fonts: Map<CustomizationFont, Typeface>, sizes: Map<CustomizationFo
|
|
|
778
821
|
"rfidProcessingScreenHintLabel" to CustomizationFont.RFID_PROCESSING_SCREEN_HINT_LABEL.getFont(fonts, sizes),
|
|
779
822
|
"rfidProcessingScreenProgressLabel" to CustomizationFont.RFID_PROCESSING_SCREEN_PROGRESS_LABEL.getFont(fonts, sizes),
|
|
780
823
|
"rfidProcessingScreenResultLabel" to CustomizationFont.RFID_PROCESSING_SCREEN_RESULT_LABEL.getFont(fonts, sizes),
|
|
824
|
+
"rfidEnableNfcTitleText" to CustomizationFont.RFID_ENABLE_NFC_TITLE_TEXT.getFont(fonts, sizes),
|
|
825
|
+
"rfidEnableNfcDescriptionText" to CustomizationFont.RFID_ENABLE_NFC_DESCRIPTION_TEXT.getFont(fonts, sizes),
|
|
826
|
+
"rfidEnableNfcButtonText" to CustomizationFont.RFID_ENABLE_NFC_BUTTON_TEXT.getFont(fonts, sizes),
|
|
781
827
|
).toJson()
|
|
782
828
|
|
|
783
829
|
fun setImages(input: ParamsCustomization.CustomizationEditor, opts: JSONObject) = opts.forEach { key, v ->
|
|
784
830
|
when (key) {
|
|
785
831
|
"rfidProcessingScreenFailureImage" -> input.setImage(CustomizationImage.RFID_PROCESSING_SCREEN_FAILURE_IMAGE, v.toDrawable())
|
|
832
|
+
"rfidEnableNfcImage" -> input.setImage(CustomizationImage.RFID_ENABLE_NFC_IMAGE, v.toDrawable())
|
|
786
833
|
}
|
|
787
834
|
}
|
|
788
835
|
|
|
789
836
|
fun getImages(input: Map<CustomizationImage, Drawable>) = mapOf(
|
|
790
837
|
"rfidProcessingScreenFailureImage" to (input[CustomizationImage.RFID_PROCESSING_SCREEN_FAILURE_IMAGE] ?: ContextCompat.getDrawable(context, com.regula.documentreader.api.R.drawable.reg_ic_error)).toBase64(),
|
|
838
|
+
"rfidEnableNfcImage" to (input[CustomizationImage.RFID_ENABLE_NFC_IMAGE] ?: ContextCompat.getDrawable(context, com.regula.documentreader.api.R.drawable.reg_enable_nfc)).toBase64(),
|
|
791
839
|
).toJson()
|
|
792
840
|
|
|
793
841
|
fun CustomizationFont.getFont(fonts: Map<CustomizationFont, Typeface>, sizes: Map<CustomizationFont, Int>) =
|
|
@@ -27,6 +27,8 @@ import com.regula.documentreader.api.params.BackendProcessingConfig
|
|
|
27
27
|
import com.regula.documentreader.api.params.BleDeviceConfig
|
|
28
28
|
import com.regula.documentreader.api.params.DocReaderConfig
|
|
29
29
|
import com.regula.documentreader.api.params.FaceApiParams
|
|
30
|
+
import com.regula.documentreader.api.params.FilterObject
|
|
31
|
+
import com.regula.documentreader.api.params.FilterObjectType
|
|
30
32
|
import com.regula.documentreader.api.params.Functionality
|
|
31
33
|
import com.regula.documentreader.api.params.ImageInputData
|
|
32
34
|
import com.regula.documentreader.api.params.ImageQA
|
|
@@ -192,6 +194,7 @@ fun initConfigFromJSON(input: JSONObject) = input.let {
|
|
|
192
194
|
|
|
193
195
|
if (it.has("licenseUpdate")) result.setLicenseUpdate(it.getBoolean("licenseUpdate"))
|
|
194
196
|
if (it.has("delayedNNLoad")) result.isDelayedNNLoad = it.getBoolean("delayedNNLoad")
|
|
197
|
+
result.licenseUpdateTimeout = it.getDoubleOrNull("licenseUpdateTimeout")
|
|
195
198
|
result.blackList = it.getJSONObjectOrNull("blackList")
|
|
196
199
|
result
|
|
197
200
|
}
|
|
@@ -203,6 +206,7 @@ fun generateInitConfig(input: DocReaderConfig?) = input?.let {
|
|
|
203
206
|
"databasePath" to it.customDbPath,
|
|
204
207
|
"licenseUpdate" to it.isLicenseUpdate,
|
|
205
208
|
"delayedNNLoad" to it.isDelayedNNLoad,
|
|
209
|
+
"licenseUpdateTimeout" to it.licenseUpdateTimeout,
|
|
206
210
|
"blackList" to it.blackList
|
|
207
211
|
).toJson()
|
|
208
212
|
}
|
|
@@ -213,6 +217,7 @@ fun initBleDeviceConfigFromJSON(input: JSONObject) = input.let {
|
|
|
213
217
|
|
|
214
218
|
if (it.has("licenseUpdate")) result.setLicenseUpdate(it.getBoolean("licenseUpdate"))
|
|
215
219
|
if (it.has("delayedNNLoad")) result.isDelayedNNLoad = it.getBoolean("delayedNNLoad")
|
|
220
|
+
result.licenseUpdateTimeout = it.getDoubleOrNull("licenseUpdateTimeout")
|
|
216
221
|
result.blackList = it.getJSONObjectOrNull("blackList")
|
|
217
222
|
result
|
|
218
223
|
}
|
|
@@ -1793,3 +1798,28 @@ fun generateMatrix(input: Matrix?) = input?.let {
|
|
|
1793
1798
|
for (f in floats) result.put(java.lang.Float.valueOf(f))
|
|
1794
1799
|
result
|
|
1795
1800
|
}
|
|
1801
|
+
|
|
1802
|
+
fun filterObjectFromJSON(it: JSONObject): FilterObject {
|
|
1803
|
+
val result = FilterObject()
|
|
1804
|
+
|
|
1805
|
+
result.docIDsFilter = filterObjectTypeIntFromJSON(it.getJSONObjectOrNull("docIDsFilter"))
|
|
1806
|
+
result.docFormatsFilter = filterObjectTypeIntFromJSON(it.getJSONObjectOrNull("docFormatsFilter"))
|
|
1807
|
+
result.docCategoriesFilter = filterObjectTypeIntFromJSON(it.getJSONObjectOrNull("docCategoriesFilter"))
|
|
1808
|
+
result.docCountriesFilter = filterObjectTypeStringFromJSON(it.getJSONObjectOrNull("docCountriesFilter"))
|
|
1809
|
+
|
|
1810
|
+
return result
|
|
1811
|
+
}
|
|
1812
|
+
|
|
1813
|
+
fun filterObjectTypeIntFromJSON(input: JSONObject?): FilterObjectType<Int>? = input?.let {
|
|
1814
|
+
val array = it.getJSONArray("list").toArray<Int>()!!
|
|
1815
|
+
if (it.getBoolean("isInclude"))
|
|
1816
|
+
return FilterObjectType.createIncludeList(array)
|
|
1817
|
+
return FilterObjectType.createExcludeList(array)
|
|
1818
|
+
}
|
|
1819
|
+
|
|
1820
|
+
fun filterObjectTypeStringFromJSON(input: JSONObject?): FilterObjectType<String>? = input?.let {
|
|
1821
|
+
val array = it.getJSONArray("list").toArray<String>()!!
|
|
1822
|
+
if (it.getBoolean("isInclude"))
|
|
1823
|
+
return FilterObjectType.createIncludeList(array)
|
|
1824
|
+
return FilterObjectType.createExcludeList(array)
|
|
1825
|
+
}
|
|
@@ -44,7 +44,7 @@ import org.json.JSONObject
|
|
|
44
44
|
import com.regula.plugin.documentreader.Convert.toBase64
|
|
45
45
|
import com.regula.plugin.documentreader.Convert.toByteArray
|
|
46
46
|
|
|
47
|
-
fun methodCall(method: String, callback: (Any?) -> Unit): Any = when (method) {
|
|
47
|
+
fun methodCall(method: String, callback: (Any?) -> Unit): Any? = when (method) {
|
|
48
48
|
"getDocumentReaderIsReady" -> getDocumentReaderIsReady(callback)
|
|
49
49
|
"getDocumentReaderStatus" -> getDocumentReaderStatus(callback)
|
|
50
50
|
"getRfidSessionStatus" -> getRfidSessionStatus(callback)
|
|
@@ -122,6 +122,16 @@ fun methodCall(method: String, callback: (Any?) -> Unit): Any = when (method) {
|
|
|
122
122
|
"finalizePackage" -> finalizePackage(callback)
|
|
123
123
|
"endBackendTransaction" -> endBackendTransaction()
|
|
124
124
|
"getTranslation" -> getTranslation(callback, args(0), args(1))
|
|
125
|
+
// remove after finishing old dr support
|
|
126
|
+
"processParamsSetCheckFilter" -> processParamsSetCheckFilter(args(0), args(1))
|
|
127
|
+
"processParamsRemoveCheckFilter" -> processParamsRemoveCheckFilter(args(0))
|
|
128
|
+
"processParamsClearCheckFilter" -> processParamsClearCheckFilter()
|
|
129
|
+
"authenticityParamsSetCheckFilter" -> authenticityParamsSetCheckFilter(args(0), args(1))
|
|
130
|
+
"authenticityParamsRemoveCheckFilter" -> authenticityParamsRemoveCheckFilter(args(0))
|
|
131
|
+
"authenticityParamsClearCheckFilter" -> authenticityParamsClearCheckFilter()
|
|
132
|
+
"livenessParamsSetCheckFilter" -> livenessParamsSetCheckFilter(args(0), args(1))
|
|
133
|
+
"livenessParamsRemoveCheckFilter" -> livenessParamsRemoveCheckFilter(args(0))
|
|
134
|
+
"livenessParamsClearCheckFilter" -> livenessParamsClearCheckFilter()
|
|
125
135
|
else -> Unit
|
|
126
136
|
}
|
|
127
137
|
|
|
@@ -452,6 +462,19 @@ fun getTranslation(callback: Callback, className: String, value: Int) = when (cl
|
|
|
452
462
|
else -> Unit
|
|
453
463
|
}
|
|
454
464
|
|
|
465
|
+
// remove after finishing old dr support
|
|
466
|
+
fun processParamsSetCheckFilter(checkType: String, filter: JSONObject) = Instance().processParams().setCheckFilter(checkType, filterObjectFromJSON(filter))
|
|
467
|
+
fun processParamsRemoveCheckFilter(checkType: String) = Instance().processParams().removeCheckFilter(checkType)
|
|
468
|
+
fun processParamsClearCheckFilter() = Instance().processParams().clearCheckFilter()
|
|
469
|
+
|
|
470
|
+
fun authenticityParamsSetCheckFilter(checkType: String, filter: JSONObject) = Instance().processParams().authenticityParams?.setCheckFilter(checkType, filterObjectFromJSON(filter))
|
|
471
|
+
fun authenticityParamsRemoveCheckFilter(checkType: String) = Instance().processParams().authenticityParams?.removeCheckFilter(checkType)
|
|
472
|
+
fun authenticityParamsClearCheckFilter() = Instance().processParams().authenticityParams?.clearCheckFilter()
|
|
473
|
+
|
|
474
|
+
fun livenessParamsSetCheckFilter(checkType: String, filter: JSONObject) = Instance().processParams().authenticityParams?.livenessParams?.setCheckFilter(checkType, filterObjectFromJSON(filter))
|
|
475
|
+
fun livenessParamsRemoveCheckFilter(checkType: String) = Instance().processParams().authenticityParams?.livenessParams?.removeCheckFilter(checkType)
|
|
476
|
+
fun livenessParamsClearCheckFilter() = Instance().processParams().authenticityParams?.livenessParams?.clearCheckFilter()
|
|
477
|
+
|
|
455
478
|
// --------------------------------------------------------------------------------------------------------------------------
|
|
456
479
|
|
|
457
480
|
val completion = { action: Int, results: DocumentReaderResults?, error: DocumentReaderException? ->
|
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": "8.4.
|
|
14
|
-
"@regulaforensics/react-native-document-reader-core-fullauthrfid": "8.4.
|
|
13
|
+
"@regulaforensics/react-native-document-reader-api": "8.4.289-rc",
|
|
14
|
+
"@regulaforensics/react-native-document-reader-core-fullauthrfid": "8.4.955-rc",
|
|
15
15
|
"react-native-progress": "5.0.0",
|
|
16
16
|
"react-native-radio-buttons-group": "3.0.5",
|
|
17
17
|
"@rneui/base": "4.0.0-rc.7",
|
package/index.d.ts
CHANGED
|
@@ -1499,6 +1499,7 @@ export class DocReaderConfig {
|
|
|
1499
1499
|
customDb?: string
|
|
1500
1500
|
databasePath?: string
|
|
1501
1501
|
licenseUpdate?: boolean
|
|
1502
|
+
licenseUpdateTimeout?: number
|
|
1502
1503
|
delayedNNLoad?: boolean
|
|
1503
1504
|
blackList?: Record<string, string>
|
|
1504
1505
|
|
|
@@ -1510,6 +1511,7 @@ export class DocReaderConfig {
|
|
|
1510
1511
|
result.customDb = jsonObject["customDb"]
|
|
1511
1512
|
result.databasePath = jsonObject["databasePath"]
|
|
1512
1513
|
result.licenseUpdate = jsonObject["licenseUpdate"]
|
|
1514
|
+
result.licenseUpdateTimeout = jsonObject["licenseUpdateTimeout"]
|
|
1513
1515
|
result.delayedNNLoad = jsonObject["delayedNNLoad"]
|
|
1514
1516
|
result.blackList = jsonObject["blackList"]
|
|
1515
1517
|
|
|
@@ -1826,6 +1828,7 @@ export class Functionality {
|
|
|
1826
1828
|
manualMultipageMode?: boolean
|
|
1827
1829
|
singleResult?: boolean
|
|
1828
1830
|
torchTurnedOn?: boolean
|
|
1831
|
+
preventScreenRecording?: boolean
|
|
1829
1832
|
showCaptureButtonDelayFromDetect?: number
|
|
1830
1833
|
showCaptureButtonDelayFromStart?: number
|
|
1831
1834
|
rfidTimeout?: number
|
|
@@ -1864,6 +1867,7 @@ export class Functionality {
|
|
|
1864
1867
|
result.manualMultipageMode = jsonObject["manualMultipageMode"]
|
|
1865
1868
|
result.singleResult = jsonObject["singleResult"]
|
|
1866
1869
|
result.torchTurnedOn = jsonObject["torchTurnedOn"]
|
|
1870
|
+
result.preventScreenRecording = jsonObject["preventScreenRecording"]
|
|
1867
1871
|
result.showCaptureButtonDelayFromDetect = jsonObject["showCaptureButtonDelayFromDetect"]
|
|
1868
1872
|
result.showCaptureButtonDelayFromStart = jsonObject["showCaptureButtonDelayFromStart"]
|
|
1869
1873
|
result.rfidTimeout = jsonObject["rfidTimeout"]
|
|
@@ -2328,6 +2332,10 @@ export class CustomizationColors {
|
|
|
2328
2332
|
rfidProcessingScreenProgressBarBackground?: number
|
|
2329
2333
|
rfidProcessingScreenResultLabelText?: number
|
|
2330
2334
|
rfidProcessingScreenLoadingBar?: number
|
|
2335
|
+
rfidEnableNfcTitleText?: number
|
|
2336
|
+
rfidEnableNfcDescriptionText?: number
|
|
2337
|
+
rfidEnableNfcButtonText?: number
|
|
2338
|
+
rfidEnableNfcButtonBackground?: number
|
|
2331
2339
|
|
|
2332
2340
|
static fromJson(jsonObject?: any): CustomizationColors | undefined {
|
|
2333
2341
|
if (jsonObject == null || jsonObject == undefined) return undefined
|
|
@@ -2341,6 +2349,10 @@ export class CustomizationColors {
|
|
|
2341
2349
|
result.rfidProcessingScreenProgressBarBackground = jsonObject["rfidProcessingScreenProgressBarBackground"]
|
|
2342
2350
|
result.rfidProcessingScreenResultLabelText = jsonObject["rfidProcessingScreenResultLabelText"]
|
|
2343
2351
|
result.rfidProcessingScreenLoadingBar = jsonObject["rfidProcessingScreenLoadingBar"]
|
|
2352
|
+
result.rfidEnableNfcTitleText = jsonObject["rfidEnableNfcTitleText"]
|
|
2353
|
+
result.rfidEnableNfcDescriptionText = jsonObject["rfidEnableNfcDescriptionText"]
|
|
2354
|
+
result.rfidEnableNfcButtonText = jsonObject["rfidEnableNfcButtonText"]
|
|
2355
|
+
result.rfidEnableNfcButtonBackground = jsonObject["rfidEnableNfcButtonBackground"]
|
|
2344
2356
|
|
|
2345
2357
|
return result
|
|
2346
2358
|
}
|
|
@@ -2350,6 +2362,9 @@ export class CustomizationFonts {
|
|
|
2350
2362
|
rfidProcessingScreenHintLabel?: Font
|
|
2351
2363
|
rfidProcessingScreenProgressLabel?: Font
|
|
2352
2364
|
rfidProcessingScreenResultLabel?: Font
|
|
2365
|
+
rfidEnableNfcTitleText?: Font
|
|
2366
|
+
rfidEnableNfcDescriptionText?: Font
|
|
2367
|
+
rfidEnableNfcButtonText?: Font
|
|
2353
2368
|
|
|
2354
2369
|
static fromJson(jsonObject?: any): CustomizationFonts | undefined {
|
|
2355
2370
|
if (jsonObject == null || jsonObject == undefined) return undefined
|
|
@@ -2358,6 +2373,9 @@ export class CustomizationFonts {
|
|
|
2358
2373
|
result.rfidProcessingScreenHintLabel = Font.fromJson(jsonObject["rfidProcessingScreenHintLabel"])
|
|
2359
2374
|
result.rfidProcessingScreenProgressLabel = Font.fromJson(jsonObject["rfidProcessingScreenProgressLabel"])
|
|
2360
2375
|
result.rfidProcessingScreenResultLabel = Font.fromJson(jsonObject["rfidProcessingScreenResultLabel"])
|
|
2376
|
+
result.rfidEnableNfcTitleText = Font.fromJson(jsonObject["rfidEnableNfcTitleText"])
|
|
2377
|
+
result.rfidEnableNfcDescriptionText = Font.fromJson(jsonObject["rfidEnableNfcDescriptionText"])
|
|
2378
|
+
result.rfidEnableNfcButtonText = Font.fromJson(jsonObject["rfidEnableNfcButtonText"])
|
|
2361
2379
|
|
|
2362
2380
|
return result
|
|
2363
2381
|
}
|
|
@@ -2365,12 +2383,14 @@ export class CustomizationFonts {
|
|
|
2365
2383
|
|
|
2366
2384
|
export class CustomizationImages {
|
|
2367
2385
|
rfidProcessingScreenFailureImage?: string
|
|
2386
|
+
rfidEnableNfcImage?: string
|
|
2368
2387
|
|
|
2369
2388
|
static fromJson(jsonObject?: any): CustomizationImages | undefined {
|
|
2370
2389
|
if (jsonObject == null || jsonObject == undefined) return undefined
|
|
2371
2390
|
const result = new CustomizationImages
|
|
2372
2391
|
|
|
2373
2392
|
result.rfidProcessingScreenFailureImage = jsonObject["rfidProcessingScreenFailureImage"]
|
|
2393
|
+
result.rfidEnableNfcImage = jsonObject["rfidEnableNfcImage"]
|
|
2374
2394
|
|
|
2375
2395
|
return result
|
|
2376
2396
|
}
|
|
@@ -2862,6 +2882,45 @@ export class PrepareProgress {
|
|
|
2862
2882
|
}
|
|
2863
2883
|
}
|
|
2864
2884
|
|
|
2885
|
+
export class FilterObjectType {
|
|
2886
|
+
list?: any[]
|
|
2887
|
+
isInclude?: boolean
|
|
2888
|
+
|
|
2889
|
+
static fromJson(jsonObject?: any): FilterObjectType | undefined {
|
|
2890
|
+
if (jsonObject == null || jsonObject == undefined) return undefined
|
|
2891
|
+
const result = new FilterObjectType
|
|
2892
|
+
|
|
2893
|
+
result.list = []
|
|
2894
|
+
if (jsonObject["list"] != null) {
|
|
2895
|
+
for (const i in jsonObject["list"]) {
|
|
2896
|
+
result.list.push(jsonObject["list"][i])
|
|
2897
|
+
}
|
|
2898
|
+
}
|
|
2899
|
+
result.isInclude = jsonObject["isInclude"]
|
|
2900
|
+
|
|
2901
|
+
return result
|
|
2902
|
+
}
|
|
2903
|
+
}
|
|
2904
|
+
|
|
2905
|
+
export class FilterObject {
|
|
2906
|
+
docIDsFilter?: FilterObjectType
|
|
2907
|
+
docFormatsFilter?: FilterObjectType
|
|
2908
|
+
docCategoriesFilter?: FilterObjectType
|
|
2909
|
+
docCountriesFilter?: FilterObjectType
|
|
2910
|
+
|
|
2911
|
+
static fromJson(jsonObject?: any): FilterObject | undefined {
|
|
2912
|
+
if (jsonObject == null || jsonObject == undefined) return undefined
|
|
2913
|
+
const result = new FilterObject
|
|
2914
|
+
|
|
2915
|
+
result.docIDsFilter = FilterObjectType.fromJson(jsonObject["docIDsFilter"])
|
|
2916
|
+
result.docFormatsFilter = FilterObjectType.fromJson(jsonObject["docFormatsFilter"])
|
|
2917
|
+
result.docCategoriesFilter = FilterObjectType.fromJson(jsonObject["docCategoriesFilter"])
|
|
2918
|
+
result.docCountriesFilter = FilterObjectType.fromJson(jsonObject["docCountriesFilter"])
|
|
2919
|
+
|
|
2920
|
+
return result
|
|
2921
|
+
}
|
|
2922
|
+
}
|
|
2923
|
+
|
|
2865
2924
|
export const FontStyle = {
|
|
2866
2925
|
NORMAL: 0,
|
|
2867
2926
|
BOLD: 1,
|
|
@@ -2902,6 +2961,10 @@ export const CustomizationColor = {
|
|
|
2902
2961
|
RFID_PROCESSING_SCREEN_PROGRESS_BAR_BACKGROUND: "rfidProcessingScreenProgressBarBackground",
|
|
2903
2962
|
RFID_PROCESSING_SCREEN_RESULT_LABEL_TEXT: "rfidProcessingScreenResultLabelText",
|
|
2904
2963
|
RFID_PROCESSING_SCREEN_LOADING_BAR: "rfidProcessingScreenLoadingBar",
|
|
2964
|
+
RFID_ENABLE_NFC_TITLE_TEXT: "rfidEnableNfcTitleText",
|
|
2965
|
+
RFID_ENABLE_NFC_DESCRIPTION_TEXT: "rfidEnableNfcDescriptionText",
|
|
2966
|
+
RFID_ENABLE_NFC_BUTTON_TEXT: "rfidEnableNfcButtonText",
|
|
2967
|
+
RFID_ENABLE_NFC_BUTTON_BACKGROUND: "rfidEnableNfcButtonBackground",
|
|
2905
2968
|
}
|
|
2906
2969
|
|
|
2907
2970
|
export const eRFID_ErrorCodes = {
|
|
@@ -3021,6 +3084,16 @@ export const eRFID_ErrorCodes = {
|
|
|
3021
3084
|
RFID_ERROR_LAYER34_SAM_ACKNOWLEDGE: 0x840F0000,
|
|
3022
3085
|
}
|
|
3023
3086
|
|
|
3087
|
+
export const LivenessCheckType = {
|
|
3088
|
+
OVI: "checkOVI",
|
|
3089
|
+
MLI: "checkMLI",
|
|
3090
|
+
HOLO: "checkHolo",
|
|
3091
|
+
ED: "checkED",
|
|
3092
|
+
BLACK_AND_WHITE_COPY: "checkBlackAndWhiteCopy",
|
|
3093
|
+
DYNAPRINT: "checkDynaprint",
|
|
3094
|
+
GEOMETRY: "checkGeometry",
|
|
3095
|
+
}
|
|
3096
|
+
|
|
3024
3097
|
export const eLDS_ParsingErrorCodes = {
|
|
3025
3098
|
ERR_LDS_OK: 0x00000001,
|
|
3026
3099
|
ERR_LDS_ASN_INCORRECT_DATA: 0x80000001,
|
|
@@ -3235,6 +3308,10 @@ export const LineCap = {
|
|
|
3235
3308
|
SQUARE: 2,
|
|
3236
3309
|
}
|
|
3237
3310
|
|
|
3311
|
+
export const FilterCheckType = {
|
|
3312
|
+
CHECK_AUTH: "checkAuth",
|
|
3313
|
+
}
|
|
3314
|
+
|
|
3238
3315
|
export const eRPRM_FieldVerificationResult = {
|
|
3239
3316
|
RCF_DISABLED: 0,
|
|
3240
3317
|
RCF_VERIFIED: 1,
|
|
@@ -3332,6 +3409,7 @@ export const DocumentReaderErrorCodes = {
|
|
|
3332
3409
|
SAVE_DB: 8,
|
|
3333
3410
|
DOWNLOAD_DB_INCORRECT_CHECKSUM: 9,
|
|
3334
3411
|
DB_DOWNLOAD: 10,
|
|
3412
|
+
RFID_ERROR: 12,
|
|
3335
3413
|
LICENSE_ABSENT_OR_CORRUPTED: 13,
|
|
3336
3414
|
LICENSE_INVALID_DATE: 14,
|
|
3337
3415
|
LICENSE_INVALID_VERSION: 15,
|
|
@@ -3354,6 +3432,8 @@ export const DocumentReaderErrorCodes = {
|
|
|
3354
3432
|
NATIVE_JAVA_EXCEPTION: 1000,
|
|
3355
3433
|
BACKEND_ONLINE_PROCESSING: 303,
|
|
3356
3434
|
WRONG_INPUT: 400,
|
|
3435
|
+
RESULT_UNAVAILABLE: 410,
|
|
3436
|
+
RESULT_WRONG_OUTPUT: 411,
|
|
3357
3437
|
STATE_EXCEPTION: 500,
|
|
3358
3438
|
BLE_EXCEPTION: 600,
|
|
3359
3439
|
FEATURE_BLUETOOTH_LE_NOT_SUPPORTED: 601,
|
|
@@ -3576,6 +3656,8 @@ export const eCheckDiagnose = {
|
|
|
3576
3656
|
FIELD_POS_CORRECTOR_FACE_PRESENCE_CHECK_ERROR: 84,
|
|
3577
3657
|
FIELD_POS_CORRECTOR_FACE_ABSENCE_CHECK_ERROR: 85,
|
|
3578
3658
|
CHD_FIELD_POS_CORRECTOR_INCORRECT_HEAD_POSITION: 86,
|
|
3659
|
+
CHD_FIELD_POS_CORRECTOR_AGE_CHECK_ERROR: 87,
|
|
3660
|
+
CHD_FIELD_POS_CORRECTOR_SEX_CHECK_ERROR: 88,
|
|
3579
3661
|
OVI_IR_INVISIBLE: 90,
|
|
3580
3662
|
OVI_INSUFFICIENT_AREA: 91,
|
|
3581
3663
|
OVI_COLOR_INVARIABLE: 92,
|
|
@@ -4044,6 +4126,8 @@ export const eRPRM_SecurityFeatureType = {
|
|
|
4044
4126
|
SECURITY_FEATURE_TYPE_LIVENESS_BLACK_AND_WHITE_COPY_CHECK: 53,
|
|
4045
4127
|
SECURITY_FEATURE_TYPE_LIVENESS_DYNAPRINT_CHECK: 54,
|
|
4046
4128
|
SECURITY_FEATURE_TYPE_LIVENESS_GEOMETRY_CHECK: 55,
|
|
4129
|
+
SECURITY_FEATURE_TYPE_AGE_CHECK: 56,
|
|
4130
|
+
SECURITY_FEATURE_TYPE_SEX_CHECK: 57,
|
|
4047
4131
|
}
|
|
4048
4132
|
|
|
4049
4133
|
export const OnlineMode = {
|
|
@@ -4056,6 +4140,24 @@ export const eRFID_SDK_ProfilerType = {
|
|
|
4056
4140
|
SPT_DOC_9303_LDS_PKI_MAINTENANCE: 0x00000002,
|
|
4057
4141
|
}
|
|
4058
4142
|
|
|
4143
|
+
export const AuthenticityCheckType = {
|
|
4144
|
+
USE_LIVENESS: "checkLiveness",
|
|
4145
|
+
UV_LUMINISCENCE: "checkUVLuminiscence",
|
|
4146
|
+
IR_B900: "checkIRB900",
|
|
4147
|
+
IMAGE_PATTERNS: "checkImagePatterns",
|
|
4148
|
+
FIBERS: "checkFibers",
|
|
4149
|
+
EXT_MRZ: "checkExtMRZ",
|
|
4150
|
+
EXT_OCR: "checkExtOCR",
|
|
4151
|
+
AXIAL: "checkAxial",
|
|
4152
|
+
BARCODE_FORMAT: "checkBarcodeFormat",
|
|
4153
|
+
IR_VISIBILITY: "checkIRVisibility",
|
|
4154
|
+
IPI: "checkIPI",
|
|
4155
|
+
PHOTO_EMBEDDING: "checkPhotoEmbedding",
|
|
4156
|
+
PHOTO_COMPARISON: "checkPhotoComparison",
|
|
4157
|
+
LETTER_SCREEN: "checkLetterScreen++",
|
|
4158
|
+
SECURITY_TEXT: "checkSecurityText",
|
|
4159
|
+
}
|
|
4160
|
+
|
|
4059
4161
|
export const diDocType = {
|
|
4060
4162
|
dtNotDefined: 0,
|
|
4061
4163
|
dtPassport: 11,
|
|
@@ -4320,6 +4422,9 @@ export const CustomizationFont = {
|
|
|
4320
4422
|
RFID_PROCESSING_SCREEN_HINT_LABEL: "rfidProcessingScreenHintLabel",
|
|
4321
4423
|
RFID_PROCESSING_SCREEN_PROGRESS_LABEL: "rfidProcessingScreenProgressLabel",
|
|
4322
4424
|
RFID_PROCESSING_SCREEN_RESULT_LABEL: "rfidProcessingScreenResultLabel",
|
|
4425
|
+
RFID_ENABLE_NFC_TITLE_TEXT: "rfidEnableNfcTitleText",
|
|
4426
|
+
RFID_ENABLE_NFC_DESCRIPTION_TEXT: "rfidEnableNfcDescriptionText",
|
|
4427
|
+
RFID_ENABLE_NFC_BUTTON_TEXT: "rfidEnableNfcButtonText",
|
|
4323
4428
|
}
|
|
4324
4429
|
|
|
4325
4430
|
export const ImageFormat = {
|
|
@@ -5326,6 +5431,7 @@ export const LCID = {
|
|
|
5326
5431
|
|
|
5327
5432
|
export const CustomizationImage = {
|
|
5328
5433
|
RFID_PROCESSING_SCREEN_FAILURE_IMAGE: "rfidProcessingScreenFailureImage",
|
|
5434
|
+
RFID_ENABLE_NFC_IMAGE: "rfidEnableNfcImage",
|
|
5329
5435
|
}
|
|
5330
5436
|
|
|
5331
5437
|
export const DocReaderFrame = {
|
|
@@ -5358,6 +5464,7 @@ export const Enum = {
|
|
|
5358
5464
|
eRPRM_Authenticity,
|
|
5359
5465
|
CustomizationColor,
|
|
5360
5466
|
eRFID_ErrorCodes,
|
|
5467
|
+
LivenessCheckType,
|
|
5361
5468
|
eLDS_ParsingErrorCodes,
|
|
5362
5469
|
eRFID_CertificateType,
|
|
5363
5470
|
RGLMeasureSystem,
|
|
@@ -5365,6 +5472,7 @@ export const Enum = {
|
|
|
5365
5472
|
FrameShapeType,
|
|
5366
5473
|
eRFID_BaudRate,
|
|
5367
5474
|
LineCap,
|
|
5475
|
+
FilterCheckType,
|
|
5368
5476
|
eRPRM_FieldVerificationResult,
|
|
5369
5477
|
DocReaderAction,
|
|
5370
5478
|
eProcessGLCommands,
|
|
@@ -5395,6 +5503,7 @@ export const Enum = {
|
|
|
5395
5503
|
eRPRM_SecurityFeatureType,
|
|
5396
5504
|
OnlineMode,
|
|
5397
5505
|
eRFID_SDK_ProfilerType,
|
|
5506
|
+
AuthenticityCheckType,
|
|
5398
5507
|
diDocType,
|
|
5399
5508
|
ButtonTag,
|
|
5400
5509
|
HoloAnimationType,
|
|
@@ -5478,4 +5587,13 @@ export default class DocumentReader {
|
|
|
5478
5587
|
static finalizePackage(successCallback: (response: string) => void, errorCallback?: (error: string) => void): void
|
|
5479
5588
|
static endBackendTransaction(successCallback: (response: string) => void, errorCallback?: (error: string) => void): void
|
|
5480
5589
|
static getTranslation(className: string, value: number, successCallback: (response: string) => void, errorCallback?: (error: string) => void): void
|
|
5590
|
+
static processParamsSetCheckFilter(checkType: string, filter: FilterObject, successCallback: (response: string) => void, errorCallback?: (error: string) => void): void
|
|
5591
|
+
static processParamsRemoveCheckFilter(checkType: string, successCallback: (response: string) => void, errorCallback?: (error: string) => void): void
|
|
5592
|
+
static processParamsClearCheckFilter(successCallback: (response: string) => void, errorCallback?: (error: string) => void): void
|
|
5593
|
+
static authenticityParamsSetCheckFilter(checkType: string, filter: FilterObject, successCallback: (response: string) => void, errorCallback?: (error: string) => void): void
|
|
5594
|
+
static authenticityParamsRemoveCheckFilter(checkType: string, successCallback: (response: string) => void, errorCallback?: (error: string) => void): void
|
|
5595
|
+
static authenticityParamsClearCheckFilter(successCallback: (response: string) => void, errorCallback?: (error: string) => void): void
|
|
5596
|
+
static livenessParamsSetCheckFilter(checkType: string, filter: FilterObject, successCallback: (response: string) => void, errorCallback?: (error: string) => void): void
|
|
5597
|
+
static livenessParamsRemoveCheckFilter(checkType: string, successCallback: (response: string) => void, errorCallback?: (error: string) => void): void
|
|
5598
|
+
static livenessParamsClearCheckFilter(successCallback: (response: string) => void, errorCallback?: (error: string) => void): void
|
|
5481
5599
|
}
|
package/index.js
CHANGED
|
@@ -1013,6 +1013,7 @@ export class DocReaderConfig {
|
|
|
1013
1013
|
result.customDb = jsonObject["customDb"]
|
|
1014
1014
|
result.databasePath = jsonObject["databasePath"]
|
|
1015
1015
|
result.licenseUpdate = jsonObject["licenseUpdate"]
|
|
1016
|
+
result.licenseUpdateTimeout = jsonObject["licenseUpdateTimeout"]
|
|
1016
1017
|
result.delayedNNLoad = jsonObject["delayedNNLoad"]
|
|
1017
1018
|
result.blackList = jsonObject["blackList"]
|
|
1018
1019
|
|
|
@@ -1257,6 +1258,7 @@ export class Functionality {
|
|
|
1257
1258
|
result.manualMultipageMode = jsonObject["manualMultipageMode"]
|
|
1258
1259
|
result.singleResult = jsonObject["singleResult"]
|
|
1259
1260
|
result.torchTurnedOn = jsonObject["torchTurnedOn"]
|
|
1261
|
+
result.preventScreenRecording = jsonObject["preventScreenRecording"]
|
|
1260
1262
|
result.showCaptureButtonDelayFromDetect = jsonObject["showCaptureButtonDelayFromDetect"]
|
|
1261
1263
|
result.showCaptureButtonDelayFromStart = jsonObject["showCaptureButtonDelayFromStart"]
|
|
1262
1264
|
result.rfidTimeout = jsonObject["rfidTimeout"]
|
|
@@ -1559,6 +1561,10 @@ export class CustomizationColors {
|
|
|
1559
1561
|
result.rfidProcessingScreenProgressBarBackground = jsonObject["rfidProcessingScreenProgressBarBackground"]
|
|
1560
1562
|
result.rfidProcessingScreenResultLabelText = jsonObject["rfidProcessingScreenResultLabelText"]
|
|
1561
1563
|
result.rfidProcessingScreenLoadingBar = jsonObject["rfidProcessingScreenLoadingBar"]
|
|
1564
|
+
result.rfidEnableNfcTitleText = jsonObject["rfidEnableNfcTitleText"]
|
|
1565
|
+
result.rfidEnableNfcDescriptionText = jsonObject["rfidEnableNfcDescriptionText"]
|
|
1566
|
+
result.rfidEnableNfcButtonText = jsonObject["rfidEnableNfcButtonText"]
|
|
1567
|
+
result.rfidEnableNfcButtonBackground = jsonObject["rfidEnableNfcButtonBackground"]
|
|
1562
1568
|
|
|
1563
1569
|
return result
|
|
1564
1570
|
}
|
|
@@ -1572,6 +1578,9 @@ export class CustomizationFonts {
|
|
|
1572
1578
|
result.rfidProcessingScreenHintLabel = Font.fromJson(jsonObject["rfidProcessingScreenHintLabel"])
|
|
1573
1579
|
result.rfidProcessingScreenProgressLabel = Font.fromJson(jsonObject["rfidProcessingScreenProgressLabel"])
|
|
1574
1580
|
result.rfidProcessingScreenResultLabel = Font.fromJson(jsonObject["rfidProcessingScreenResultLabel"])
|
|
1581
|
+
result.rfidEnableNfcTitleText = Font.fromJson(jsonObject["rfidEnableNfcTitleText"])
|
|
1582
|
+
result.rfidEnableNfcDescriptionText = Font.fromJson(jsonObject["rfidEnableNfcDescriptionText"])
|
|
1583
|
+
result.rfidEnableNfcButtonText = Font.fromJson(jsonObject["rfidEnableNfcButtonText"])
|
|
1575
1584
|
|
|
1576
1585
|
return result
|
|
1577
1586
|
}
|
|
@@ -1583,6 +1592,7 @@ export class CustomizationImages {
|
|
|
1583
1592
|
const result = new CustomizationImages()
|
|
1584
1593
|
|
|
1585
1594
|
result.rfidProcessingScreenFailureImage = jsonObject["rfidProcessingScreenFailureImage"]
|
|
1595
|
+
result.rfidEnableNfcImage = jsonObject["rfidEnableNfcImage"]
|
|
1586
1596
|
|
|
1587
1597
|
return result
|
|
1588
1598
|
}
|
|
@@ -1865,6 +1875,35 @@ export class PrepareProgress {
|
|
|
1865
1875
|
}
|
|
1866
1876
|
}
|
|
1867
1877
|
|
|
1878
|
+
export class FilterObjectType {
|
|
1879
|
+
static fromJson(jsonObject) {
|
|
1880
|
+
if (jsonObject == null) return null
|
|
1881
|
+
const result = new FilterObjectType()
|
|
1882
|
+
|
|
1883
|
+
result.list = []
|
|
1884
|
+
if (jsonObject["list"] != null)
|
|
1885
|
+
for (const i in jsonObject["list"])
|
|
1886
|
+
result.list.push(jsonObject["list"][i])
|
|
1887
|
+
result.isInclude = jsonObject["isInclude"]
|
|
1888
|
+
|
|
1889
|
+
return result
|
|
1890
|
+
}
|
|
1891
|
+
}
|
|
1892
|
+
|
|
1893
|
+
export class FilterObject {
|
|
1894
|
+
static fromJson(jsonObject) {
|
|
1895
|
+
if (jsonObject == null) return null
|
|
1896
|
+
const result = new FilterObject()
|
|
1897
|
+
|
|
1898
|
+
result.docIDsFilter = FilterObjectType.fromJson(jsonObject["docIDsFilter"])
|
|
1899
|
+
result.docFormatsFilter = FilterObjectType.fromJson(jsonObject["docFormatsFilter"])
|
|
1900
|
+
result.docCategoriesFilter = FilterObjectType.fromJson(jsonObject["docCategoriesFilter"])
|
|
1901
|
+
result.docCountriesFilter = FilterObjectType.fromJson(jsonObject["docCountriesFilter"])
|
|
1902
|
+
|
|
1903
|
+
return result
|
|
1904
|
+
}
|
|
1905
|
+
}
|
|
1906
|
+
|
|
1868
1907
|
// Enum
|
|
1869
1908
|
|
|
1870
1909
|
export const FontStyle = {
|
|
@@ -1907,6 +1946,10 @@ export const CustomizationColor = {
|
|
|
1907
1946
|
RFID_PROCESSING_SCREEN_PROGRESS_BAR_BACKGROUND: "rfidProcessingScreenProgressBarBackground",
|
|
1908
1947
|
RFID_PROCESSING_SCREEN_RESULT_LABEL_TEXT: "rfidProcessingScreenResultLabelText",
|
|
1909
1948
|
RFID_PROCESSING_SCREEN_LOADING_BAR: "rfidProcessingScreenLoadingBar",
|
|
1949
|
+
RFID_ENABLE_NFC_TITLE_TEXT: "rfidEnableNfcTitleText",
|
|
1950
|
+
RFID_ENABLE_NFC_DESCRIPTION_TEXT: "rfidEnableNfcDescriptionText",
|
|
1951
|
+
RFID_ENABLE_NFC_BUTTON_TEXT: "rfidEnableNfcButtonText",
|
|
1952
|
+
RFID_ENABLE_NFC_BUTTON_BACKGROUND: "rfidEnableNfcButtonBackground",
|
|
1910
1953
|
}
|
|
1911
1954
|
|
|
1912
1955
|
export const eRFID_ErrorCodes = {
|
|
@@ -2026,6 +2069,16 @@ export const eRFID_ErrorCodes = {
|
|
|
2026
2069
|
RFID_ERROR_LAYER34_SAM_ACKNOWLEDGE: 0x840F0000,
|
|
2027
2070
|
}
|
|
2028
2071
|
|
|
2072
|
+
export const LivenessCheckType = {
|
|
2073
|
+
OVI: "checkOVI",
|
|
2074
|
+
MLI: "checkMLI",
|
|
2075
|
+
HOLO: "checkHolo",
|
|
2076
|
+
ED: "checkED",
|
|
2077
|
+
BLACK_AND_WHITE_COPY: "checkBlackAndWhiteCopy",
|
|
2078
|
+
DYNAPRINT: "checkDynaprint",
|
|
2079
|
+
GEOMETRY: "checkGeometry",
|
|
2080
|
+
}
|
|
2081
|
+
|
|
2029
2082
|
export const eLDS_ParsingErrorCodes = {
|
|
2030
2083
|
ERR_LDS_OK: 0x00000001,
|
|
2031
2084
|
ERR_LDS_ASN_INCORRECT_DATA: 0x80000001,
|
|
@@ -2240,6 +2293,10 @@ export const LineCap = {
|
|
|
2240
2293
|
SQUARE: 2,
|
|
2241
2294
|
}
|
|
2242
2295
|
|
|
2296
|
+
export const FilterCheckType = {
|
|
2297
|
+
CHECK_AUTH: "checkAuth",
|
|
2298
|
+
}
|
|
2299
|
+
|
|
2243
2300
|
export const eRPRM_FieldVerificationResult = {
|
|
2244
2301
|
RCF_DISABLED: 0,
|
|
2245
2302
|
RCF_VERIFIED: 1,
|
|
@@ -2337,6 +2394,7 @@ export const DocumentReaderErrorCodes = {
|
|
|
2337
2394
|
SAVE_DB: 8,
|
|
2338
2395
|
DOWNLOAD_DB_INCORRECT_CHECKSUM: 9,
|
|
2339
2396
|
DB_DOWNLOAD: 10,
|
|
2397
|
+
RFID_ERROR: 12,
|
|
2340
2398
|
LICENSE_ABSENT_OR_CORRUPTED: 13,
|
|
2341
2399
|
LICENSE_INVALID_DATE: 14,
|
|
2342
2400
|
LICENSE_INVALID_VERSION: 15,
|
|
@@ -2359,6 +2417,8 @@ export const DocumentReaderErrorCodes = {
|
|
|
2359
2417
|
NATIVE_JAVA_EXCEPTION: 1000,
|
|
2360
2418
|
BACKEND_ONLINE_PROCESSING: 303,
|
|
2361
2419
|
WRONG_INPUT: 400,
|
|
2420
|
+
RESULT_UNAVAILABLE: 410,
|
|
2421
|
+
RESULT_WRONG_OUTPUT: 411,
|
|
2362
2422
|
STATE_EXCEPTION: 500,
|
|
2363
2423
|
BLE_EXCEPTION: 600,
|
|
2364
2424
|
FEATURE_BLUETOOTH_LE_NOT_SUPPORTED: 601,
|
|
@@ -2581,6 +2641,8 @@ export const eCheckDiagnose = {
|
|
|
2581
2641
|
FIELD_POS_CORRECTOR_FACE_PRESENCE_CHECK_ERROR: 84,
|
|
2582
2642
|
FIELD_POS_CORRECTOR_FACE_ABSENCE_CHECK_ERROR: 85,
|
|
2583
2643
|
CHD_FIELD_POS_CORRECTOR_INCORRECT_HEAD_POSITION: 86,
|
|
2644
|
+
CHD_FIELD_POS_CORRECTOR_AGE_CHECK_ERROR: 87,
|
|
2645
|
+
CHD_FIELD_POS_CORRECTOR_SEX_CHECK_ERROR: 88,
|
|
2584
2646
|
OVI_IR_INVISIBLE: 90,
|
|
2585
2647
|
OVI_INSUFFICIENT_AREA: 91,
|
|
2586
2648
|
OVI_COLOR_INVARIABLE: 92,
|
|
@@ -3049,6 +3111,8 @@ export const eRPRM_SecurityFeatureType = {
|
|
|
3049
3111
|
SECURITY_FEATURE_TYPE_LIVENESS_BLACK_AND_WHITE_COPY_CHECK: 53,
|
|
3050
3112
|
SECURITY_FEATURE_TYPE_LIVENESS_DYNAPRINT_CHECK: 54,
|
|
3051
3113
|
SECURITY_FEATURE_TYPE_LIVENESS_GEOMETRY_CHECK: 55,
|
|
3114
|
+
SECURITY_FEATURE_TYPE_AGE_CHECK: 56,
|
|
3115
|
+
SECURITY_FEATURE_TYPE_SEX_CHECK: 57,
|
|
3052
3116
|
}
|
|
3053
3117
|
|
|
3054
3118
|
export const OnlineMode = {
|
|
@@ -3061,6 +3125,24 @@ export const eRFID_SDK_ProfilerType = {
|
|
|
3061
3125
|
SPT_DOC_9303_LDS_PKI_MAINTENANCE: 0x00000002,
|
|
3062
3126
|
}
|
|
3063
3127
|
|
|
3128
|
+
export const AuthenticityCheckType = {
|
|
3129
|
+
USE_LIVENESS: "checkLiveness",
|
|
3130
|
+
UV_LUMINISCENCE: "checkUVLuminiscence",
|
|
3131
|
+
IR_B900: "checkIRB900",
|
|
3132
|
+
IMAGE_PATTERNS: "checkImagePatterns",
|
|
3133
|
+
FIBERS: "checkFibers",
|
|
3134
|
+
EXT_MRZ: "checkExtMRZ",
|
|
3135
|
+
EXT_OCR: "checkExtOCR",
|
|
3136
|
+
AXIAL: "checkAxial",
|
|
3137
|
+
BARCODE_FORMAT: "checkBarcodeFormat",
|
|
3138
|
+
IR_VISIBILITY: "checkIRVisibility",
|
|
3139
|
+
IPI: "checkIPI",
|
|
3140
|
+
PHOTO_EMBEDDING: "checkPhotoEmbedding",
|
|
3141
|
+
PHOTO_COMPARISON: "checkPhotoComparison",
|
|
3142
|
+
LETTER_SCREEN: "checkLetterScreen++",
|
|
3143
|
+
SECURITY_TEXT: "checkSecurityText",
|
|
3144
|
+
}
|
|
3145
|
+
|
|
3064
3146
|
export const diDocType = {
|
|
3065
3147
|
dtNotDefined: 0,
|
|
3066
3148
|
dtPassport: 11,
|
|
@@ -3325,6 +3407,9 @@ export const CustomizationFont = {
|
|
|
3325
3407
|
RFID_PROCESSING_SCREEN_HINT_LABEL: "rfidProcessingScreenHintLabel",
|
|
3326
3408
|
RFID_PROCESSING_SCREEN_PROGRESS_LABEL: "rfidProcessingScreenProgressLabel",
|
|
3327
3409
|
RFID_PROCESSING_SCREEN_RESULT_LABEL: "rfidProcessingScreenResultLabel",
|
|
3410
|
+
RFID_ENABLE_NFC_TITLE_TEXT: "rfidEnableNfcTitleText",
|
|
3411
|
+
RFID_ENABLE_NFC_DESCRIPTION_TEXT: "rfidEnableNfcDescriptionText",
|
|
3412
|
+
RFID_ENABLE_NFC_BUTTON_TEXT: "rfidEnableNfcButtonText",
|
|
3328
3413
|
}
|
|
3329
3414
|
|
|
3330
3415
|
export const ImageFormat = {
|
|
@@ -4331,6 +4416,7 @@ export const LCID = {
|
|
|
4331
4416
|
|
|
4332
4417
|
export const CustomizationImage = {
|
|
4333
4418
|
RFID_PROCESSING_SCREEN_FAILURE_IMAGE: "rfidProcessingScreenFailureImage",
|
|
4419
|
+
RFID_ENABLE_NFC_IMAGE: "rfidEnableNfcImage",
|
|
4334
4420
|
}
|
|
4335
4421
|
|
|
4336
4422
|
export const DocReaderFrame = {
|
|
@@ -4363,6 +4449,7 @@ export const Enum = {
|
|
|
4363
4449
|
eRPRM_Authenticity,
|
|
4364
4450
|
CustomizationColor,
|
|
4365
4451
|
eRFID_ErrorCodes,
|
|
4452
|
+
LivenessCheckType,
|
|
4366
4453
|
eLDS_ParsingErrorCodes,
|
|
4367
4454
|
eRFID_CertificateType,
|
|
4368
4455
|
RGLMeasureSystem,
|
|
@@ -4370,6 +4457,7 @@ export const Enum = {
|
|
|
4370
4457
|
FrameShapeType,
|
|
4371
4458
|
eRFID_BaudRate,
|
|
4372
4459
|
LineCap,
|
|
4460
|
+
FilterCheckType,
|
|
4373
4461
|
eRPRM_FieldVerificationResult,
|
|
4374
4462
|
DocReaderAction,
|
|
4375
4463
|
eProcessGLCommands,
|
|
@@ -4400,6 +4488,7 @@ export const Enum = {
|
|
|
4400
4488
|
eRPRM_SecurityFeatureType,
|
|
4401
4489
|
OnlineMode,
|
|
4402
4490
|
eRFID_SDK_ProfilerType,
|
|
4491
|
+
AuthenticityCheckType,
|
|
4403
4492
|
diDocType,
|
|
4404
4493
|
ButtonTag,
|
|
4405
4494
|
HoloAnimationType,
|
|
@@ -4484,5 +4573,14 @@ DocumentReader.getDocReaderDocumentsDatabase = (successCallback, errorCallback)
|
|
|
4484
4573
|
DocumentReader.finalizePackage = (successCallback, errorCallback) => RNRegulaDocumentReader.exec("DocumentReader", "finalizePackage", [], successCallback, errorCallback)
|
|
4485
4574
|
DocumentReader.endBackendTransaction = (successCallback, errorCallback) => RNRegulaDocumentReader.exec("DocumentReader", "endBackendTransaction", [], successCallback, errorCallback)
|
|
4486
4575
|
DocumentReader.getTranslation = (className, value, successCallback, errorCallback) => RNRegulaDocumentReader.exec("DocumentReader", "getTranslation", [className, value], successCallback, errorCallback)
|
|
4576
|
+
DocumentReader.processParamsSetCheckFilter = (checkType, filter, successCallback, errorCallback) => RNRegulaDocumentReader.exec("DocumentReader", "processParamsSetCheckFilter", [checkType, filter], successCallback, errorCallback)
|
|
4577
|
+
DocumentReader.processParamsRemoveCheckFilter = (checkType, successCallback, errorCallback) => RNRegulaDocumentReader.exec("DocumentReader", "processParamsRemoveCheckFilter", [checkType], successCallback, errorCallback)
|
|
4578
|
+
DocumentReader.processParamsClearCheckFilter = (successCallback, errorCallback) => RNRegulaDocumentReader.exec("DocumentReader", "processParamsClearCheckFilter", [], successCallback, errorCallback)
|
|
4579
|
+
DocumentReader.authenticityParamsSetCheckFilter = (checkType, filter, successCallback, errorCallback) => RNRegulaDocumentReader.exec("DocumentReader", "authenticityParamsSetCheckFilter", [checkType, filter], successCallback, errorCallback)
|
|
4580
|
+
DocumentReader.authenticityParamsRemoveCheckFilter = (checkType, successCallback, errorCallback) => RNRegulaDocumentReader.exec("DocumentReader", "authenticityParamsRemoveCheckFilter", [checkType], successCallback, errorCallback)
|
|
4581
|
+
DocumentReader.authenticityParamsClearCheckFilter = (successCallback, errorCallback) => RNRegulaDocumentReader.exec("DocumentReader", "authenticityParamsClearCheckFilter", [], successCallback, errorCallback)
|
|
4582
|
+
DocumentReader.livenessParamsSetCheckFilter = (checkType, filter, successCallback, errorCallback) => RNRegulaDocumentReader.exec("DocumentReader", "livenessParamsSetCheckFilter", [checkType, filter], successCallback, errorCallback)
|
|
4583
|
+
DocumentReader.livenessParamsRemoveCheckFilter = (checkType, successCallback, errorCallback) => RNRegulaDocumentReader.exec("DocumentReader", "livenessParamsRemoveCheckFilter", [checkType], successCallback, errorCallback)
|
|
4584
|
+
DocumentReader.livenessParamsClearCheckFilter = (successCallback, errorCallback) => RNRegulaDocumentReader.exec("DocumentReader", "livenessParamsClearCheckFilter", [], successCallback, errorCallback)
|
|
4487
4585
|
|
|
4488
4586
|
export default DocumentReader
|
package/ios/RGLWConfig.m
CHANGED
|
@@ -34,6 +34,7 @@
|
|
|
34
34
|
if([options valueForKey:@"singleResult"] != nil)
|
|
35
35
|
functionality.singleResult = [[options valueForKey:@"singleResult"] boolValue];
|
|
36
36
|
if(options[@"torchTurnedOn"]) functionality.torchTurnedOn = [options[@"torchTurnedOn"] boolValue];
|
|
37
|
+
if(options[@"preventScreenRecording"]) functionality.preventScreenRecording = [options[@"preventScreenRecording"] boolValue];
|
|
37
38
|
|
|
38
39
|
// Int
|
|
39
40
|
if([options valueForKey:@"showCaptureButtonDelayFromDetect"] != nil)
|
|
@@ -88,6 +89,7 @@
|
|
|
88
89
|
result[@"manualMultipageMode"] = [NSNumber numberWithBool:functionality.manualMultipageMode];
|
|
89
90
|
result[@"singleResult"] = [NSNumber numberWithBool:functionality.singleResult];
|
|
90
91
|
result[@"torchTurnedOn"] = @(functionality.torchTurnedOn);
|
|
92
|
+
result[@"preventScreenRecording"] = @(functionality.preventScreenRecording);
|
|
91
93
|
|
|
92
94
|
// Int
|
|
93
95
|
result[@"showCaptureButtonDelayFromDetect"] = [NSNumber numberWithDouble:functionality.showCaptureButtonDelayFromDetect];
|
|
@@ -257,22 +259,29 @@
|
|
|
257
259
|
processParams.lcidFilter = [options mutableArrayValueForKey:@"lcidFilter"];
|
|
258
260
|
|
|
259
261
|
// JSONObject
|
|
260
|
-
if([
|
|
262
|
+
if (options[@"customParams"]) processParams.customParams = options[@"customParams"];
|
|
263
|
+
if ([options valueForKey:@"imageQA"] != nil)
|
|
261
264
|
[self setImageQA:processParams.imageQA input:[options valueForKey:@"imageQA"]];
|
|
262
|
-
if([options valueForKey:@"rfidParams"] != nil)
|
|
265
|
+
if ([options valueForKey:@"rfidParams"] != nil)
|
|
263
266
|
processParams.rfidParams = [RGLWJSONConstructor rfidParamsFromJson:[options valueForKey:@"rfidParams"]];
|
|
264
|
-
if([options valueForKey:@"faceApiParams"] != nil)
|
|
267
|
+
if ([options valueForKey:@"faceApiParams"] != nil)
|
|
265
268
|
processParams.faceApiParams = [RGLWJSONConstructor faceAPIParamsFromJson:[options valueForKey:@"faceApiParams"]];
|
|
266
|
-
if([options valueForKey:@"backendProcessingConfig"] != nil)
|
|
269
|
+
if ([options valueForKey:@"backendProcessingConfig"] != nil)
|
|
267
270
|
processParams.backendProcessingConfig = [RGLWJSONConstructor backendProcessingConfigFromJson:[options valueForKey:@"backendProcessingConfig"]];
|
|
268
|
-
if([options valueForKey:@"authenticityParams"] != nil) {
|
|
271
|
+
if ([options valueForKey:@"authenticityParams"] != nil) {
|
|
269
272
|
if(processParams.authenticityParams == nil) processParams.authenticityParams = [RGLAuthenticityParams defaultParams];
|
|
270
273
|
[self setAuthenticityParams:processParams.authenticityParams input:[options valueForKey:@"authenticityParams"]];
|
|
271
274
|
}
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
275
|
+
|
|
276
|
+
if (options[@"setCheckFilter"]) [processParams
|
|
277
|
+
addFilter:[RGLWJSONConstructor filterObjectFromJson: options[@"setCheckFilter"][@"filterObject"]] forCheckType:options[@"setCheckFilter"][@"checkType"]];
|
|
278
|
+
if (options[@"removeCheckFilter"]) [processParams removeFilterForCheckType: options[@"removeCheckFilter"]];
|
|
279
|
+
if (options[@"clearCheckFilter"]) [processParams clearCheckFilter];
|
|
280
|
+
if (options[@"checkFilters"]) {
|
|
281
|
+
[processParams clearCheckFilter];
|
|
282
|
+
for (NSString* key in options[@"checkFilters"])
|
|
283
|
+
[processParams addFilter:[RGLWJSONConstructor filterObjectFromJson: options[@"checkFilters"][key]] forCheckType: key];
|
|
284
|
+
}
|
|
276
285
|
}
|
|
277
286
|
|
|
278
287
|
+(NSDictionary*)getProcessParams:(RGLProcessParams*)processParams {
|
|
@@ -1008,6 +1017,16 @@
|
|
|
1008
1017
|
if([input valueForKey:@"checkLetterScreen"] != nil)
|
|
1009
1018
|
result.checkLetterScreen = [input valueForKey:@"checkLetterScreen"];
|
|
1010
1019
|
if(input[@"checkSecurityText"]) result.checkSecurityText = input[@"checkSecurityText"];
|
|
1020
|
+
|
|
1021
|
+
if (input[@"setCheckFilter"]) [result
|
|
1022
|
+
addFilter:[RGLWJSONConstructor filterObjectFromJson: input[@"setCheckFilter"][@"filterObject"]] forCheckType:input[@"setCheckFilter"][@"checkType"]];
|
|
1023
|
+
if (input[@"removeCheckFilter"]) [result removeFilterForCheckType: input[@"removeCheckFilter"]];
|
|
1024
|
+
if (input[@"clearCheckFilter"]) [result clearCheckFilter];
|
|
1025
|
+
if (input[@"checkFilters"]) {
|
|
1026
|
+
[result clearCheckFilter];
|
|
1027
|
+
for (NSString* key in input[@"checkFilters"])
|
|
1028
|
+
[result addFilter:[RGLWJSONConstructor filterObjectFromJson: input[@"checkFilters"][key]] forCheckType: key];
|
|
1029
|
+
}
|
|
1011
1030
|
}
|
|
1012
1031
|
|
|
1013
1032
|
+(NSDictionary*)getAuthenticityParams:(RGLAuthenticityParams*)input {
|
|
@@ -1046,6 +1065,16 @@
|
|
|
1046
1065
|
if(input[@"checkBlackAndWhiteCopy"]) result.checkBlackAndWhiteCopy = input[@"checkBlackAndWhiteCopy"];
|
|
1047
1066
|
if(input[@"checkDynaprint"]) result.checkDynaprint = input[@"checkDynaprint"];
|
|
1048
1067
|
if(input[@"checkGeometry"]) result.checkGeometry = input[@"checkGeometry"];
|
|
1068
|
+
|
|
1069
|
+
if (input[@"setCheckFilter"]) [result
|
|
1070
|
+
addFilter:[RGLWJSONConstructor filterObjectFromJson: input[@"setCheckFilter"][@"filterObject"]] forCheckType:input[@"setCheckFilter"][@"checkType"]];
|
|
1071
|
+
if (input[@"removeCheckFilter"]) [result removeFilterForCheckType: input[@"removeCheckFilter"]];
|
|
1072
|
+
if (input[@"clearCheckFilter"]) [result clearCheckFilter];
|
|
1073
|
+
if (input[@"checkFilters"]) {
|
|
1074
|
+
[result clearCheckFilter];
|
|
1075
|
+
for (NSString* key in input[@"checkFilters"])
|
|
1076
|
+
[result addFilter:[RGLWJSONConstructor filterObjectFromJson: input[@"checkFilters"][key]] forCheckType: key];
|
|
1077
|
+
}
|
|
1049
1078
|
}
|
|
1050
1079
|
|
|
1051
1080
|
+(NSDictionary*)getLivenessParams:(RGLLivenessParams*)input {
|
|
@@ -175,6 +175,7 @@
|
|
|
175
175
|
+(NSDictionary* _Nullable)generateTCCParams:(RGLTCCParams* _Nullable)input;
|
|
176
176
|
+(RGLTransactionInfo* _Nullable)transactionInfoFromJson:(NSDictionary* _Nullable)input;
|
|
177
177
|
+(NSDictionary* _Nullable)generateTransactionInfo:(RGLTransactionInfo* _Nullable)input;
|
|
178
|
+
+(RGLFilterObject* _Nonnull)filterObjectFromJson:(NSDictionary* _Nonnull)input;
|
|
178
179
|
|
|
179
180
|
@end
|
|
180
181
|
|
|
@@ -161,6 +161,7 @@ static NSMutableArray* weakReferencesHolder;
|
|
|
161
161
|
|
|
162
162
|
if (input[@"databasePath"]) config.databasePath = [[NSBundle mainBundle] pathForResource:input[@"databasePath"] ofType:nil];
|
|
163
163
|
if (input[@"licenseUpdate"]) config.licenseUpdateCheck = [input[@"licenseUpdate"] boolValue];
|
|
164
|
+
if (input[@"licenseUpdateTimeout"]) config.licenseUpdateTimeout = input[@"licenseUpdateTimeout"];
|
|
164
165
|
if (input[@"delayedNNLoad"]) config.delayedNNLoadEnabled = [input[@"delayedNNLoad"] boolValue];
|
|
165
166
|
|
|
166
167
|
return config;
|
|
@@ -173,6 +174,7 @@ static NSMutableArray* weakReferencesHolder;
|
|
|
173
174
|
result[@"license"] = [self base64Encode: input.licenseData];
|
|
174
175
|
result[@"databasePath"] = input.databasePath;
|
|
175
176
|
result[@"licenseUpdate"] = @(input.licenseUpdateCheck);
|
|
177
|
+
result[@"licenseUpdateTimeout"] = input.licenseUpdateTimeout;
|
|
176
178
|
result[@"delayedNNLoad"] = @(input.delayedNNLoadEnabled);
|
|
177
179
|
|
|
178
180
|
return result;
|
|
@@ -184,6 +186,7 @@ static NSMutableArray* weakReferencesHolder;
|
|
|
184
186
|
|
|
185
187
|
if (input[@"databasePath"]) config.databasePath = [[NSBundle mainBundle] pathForResource:input[@"databasePath"] ofType:nil];
|
|
186
188
|
if (input[@"licenseUpdate"]) config.licenseUpdateCheck = [input[@"licenseUpdate"] boolValue];
|
|
189
|
+
if (input[@"licenseUpdateTimeout"]) config.licenseUpdateTimeout = input[@"licenseUpdateTimeout"];
|
|
187
190
|
if (input[@"delayedNNLoad"]) config.delayedNNLoadEnabled = [input[@"delayedNNLoad"] boolValue];
|
|
188
191
|
|
|
189
192
|
return config;
|
|
@@ -2347,6 +2350,24 @@ static NSMutableArray* weakReferencesHolder;
|
|
|
2347
2350
|
return result;
|
|
2348
2351
|
}
|
|
2349
2352
|
|
|
2353
|
+
+(RGLFilterObject*)filterObjectFromJson:(NSDictionary*)input {
|
|
2354
|
+
RGLFilterObject* result = [RGLFilterObject new];
|
|
2355
|
+
|
|
2356
|
+
result.docIDsFilter = [self filterObjectTypeFromJSON: input[@"docIDsFilter"]];
|
|
2357
|
+
result.docFormatsFilter = [self filterObjectTypeFromJSON: input[@"docFormatsFilter"]];
|
|
2358
|
+
result.docCategoriesFilter = [self filterObjectTypeFromJSON: input[@"docCategoriesFilter"]];
|
|
2359
|
+
result.docCountriesFilter = [self filterObjectTypeFromJSON: input[@"docCountriesFilter"]];
|
|
2360
|
+
|
|
2361
|
+
return result;
|
|
2362
|
+
}
|
|
2363
|
+
|
|
2364
|
+
+(RGLFilterObjectType*)filterObjectTypeFromJSON:(NSDictionary*)input {
|
|
2365
|
+
NSArray* array = input[@"list"];
|
|
2366
|
+
if ([input[@"isInclude"] boolValue])
|
|
2367
|
+
return [RGLFilterObjectType createIncludeList:array];
|
|
2368
|
+
return [RGLFilterObjectType createExcludeList:array];
|
|
2369
|
+
}
|
|
2370
|
+
|
|
2350
2371
|
+(NSDictionary*)generateDictionary:(NSDictionary<NSNumber*, NSNumber*>*)input {
|
|
2351
2372
|
if(input == nil) return nil;
|
|
2352
2373
|
NSMutableDictionary* result = [NSMutableDictionary new];
|
package/ios/RGLWMain.h
CHANGED
|
@@ -32,5 +32,5 @@ static NSString* _Nonnull rfidOnRetryReadChipEvent = @"rfidOnRetryReadChipEvent"
|
|
|
32
32
|
static NSString* _Nonnull paCertificateCompletionEvent = @"pa_certificate_completion";
|
|
33
33
|
static NSString* _Nonnull taCertificateCompletionEvent = @"ta_certificate_completion";
|
|
34
34
|
static NSString* _Nonnull taSignatureCompletionEvent = @"ta_signature_completion";
|
|
35
|
-
static NSString* _Nonnull
|
|
36
|
-
static NSString* _Nonnull
|
|
35
|
+
static NSString* _Nonnull drVideoEncoderCompletionEvent = @"video_encoder_completion";
|
|
36
|
+
static NSString* _Nonnull drOnCustomButtonTappedEvent = @"onCustomButtonTappedEvent";
|
package/ios/RGLWMain.m
CHANGED
|
@@ -83,6 +83,16 @@
|
|
|
83
83
|
@"containers": ^{ [self containers :args[0] :args[1] :callback]; },
|
|
84
84
|
@"encryptedContainers": ^{ [self encryptedContainers :args[0] :callback]; },
|
|
85
85
|
@"getTranslation": ^{ [self getTranslation :args[0] :args[1] :callback]; },
|
|
86
|
+
// remove after finishing old dr support
|
|
87
|
+
@"processParamsSetCheckFilter": ^{ [self processParamsSetCheckFilter :args[0] :args[1]]; },
|
|
88
|
+
@"processParamsRemoveCheckFilter": ^{ [self processParamsRemoveCheckFilter :args[0]]; },
|
|
89
|
+
@"processParamsClearCheckFilter": ^{ [self processParamsClearCheckFilter]; },
|
|
90
|
+
@"authenticityParamsSetCheckFilter": ^{ [self authenticityParamsSetCheckFilter :args[0] :args[1]]; },
|
|
91
|
+
@"authenticityParamsRemoveCheckFilter": ^{ [self authenticityParamsRemoveCheckFilter :args[0]]; },
|
|
92
|
+
@"authenticityParamsClearCheckFilter": ^{ [self authenticityParamsClearCheckFilter]; },
|
|
93
|
+
@"livenessParamsSetCheckFilter": ^{ [self livenessParamsSetCheckFilter :args[0] :args[1]]; },
|
|
94
|
+
@"livenessParamsRemoveCheckFilter": ^{ [self livenessParamsRemoveCheckFilter :args[0]]; },
|
|
95
|
+
@"livenessParamsClearCheckFilter": ^{ [self livenessParamsClearCheckFilter]; },
|
|
86
96
|
};
|
|
87
97
|
((void(^)(void))Switch[method])();
|
|
88
98
|
}
|
|
@@ -520,6 +530,42 @@ RGLWCallback savedCallbackForBluetoothResult;
|
|
|
520
530
|
callback([RGLDocumentReaderTextField lcidName:[value intValue]]);
|
|
521
531
|
}
|
|
522
532
|
|
|
533
|
+
+ (void)processParamsSetCheckFilter:(NSString*)checkType :(NSDictionary*)filter {
|
|
534
|
+
[RGLDocReader.shared.processParams addFilter:[RGLWJSONConstructor filterObjectFromJson:filter] forCheckType:checkType];
|
|
535
|
+
}
|
|
536
|
+
|
|
537
|
+
+ (void)processParamsRemoveCheckFilter:(NSString*)checkType {
|
|
538
|
+
[RGLDocReader.shared.processParams removeFilterForCheckType:checkType];
|
|
539
|
+
}
|
|
540
|
+
|
|
541
|
+
+ (void)processParamsClearCheckFilter {
|
|
542
|
+
[RGLDocReader.shared.processParams clearCheckFilter];
|
|
543
|
+
}
|
|
544
|
+
|
|
545
|
+
+ (void)authenticityParamsSetCheckFilter:(NSString*)checkType :(NSDictionary*)filter {
|
|
546
|
+
[RGLDocReader.shared.processParams.authenticityParams addFilter:[RGLWJSONConstructor filterObjectFromJson:filter] forCheckType:checkType];
|
|
547
|
+
}
|
|
548
|
+
|
|
549
|
+
+ (void)authenticityParamsRemoveCheckFilter:(NSString*)checkType {
|
|
550
|
+
[RGLDocReader.shared.processParams.authenticityParams removeFilterForCheckType:checkType];
|
|
551
|
+
}
|
|
552
|
+
|
|
553
|
+
+ (void)authenticityParamsClearCheckFilter {
|
|
554
|
+
[RGLDocReader.shared.processParams.authenticityParams clearCheckFilter];
|
|
555
|
+
}
|
|
556
|
+
|
|
557
|
+
+ (void)livenessParamsSetCheckFilter:(NSString*)checkType :(NSDictionary*)filter {
|
|
558
|
+
[RGLDocReader.shared.processParams.authenticityParams.livenessParams addFilter:[RGLWJSONConstructor filterObjectFromJson:filter] forCheckType:checkType];
|
|
559
|
+
}
|
|
560
|
+
|
|
561
|
+
+ (void)livenessParamsRemoveCheckFilter:(NSString*)checkType {
|
|
562
|
+
[RGLDocReader.shared.processParams.authenticityParams.livenessParams removeFilterForCheckType:checkType];
|
|
563
|
+
}
|
|
564
|
+
|
|
565
|
+
+ (void)livenessParamsClearCheckFilter {
|
|
566
|
+
[RGLDocReader.shared.processParams.authenticityParams.livenessParams clearCheckFilter];
|
|
567
|
+
}
|
|
568
|
+
|
|
523
569
|
+(RGLDocumentReaderCompletion _Nonnull)completion {
|
|
524
570
|
return ^(RGLDocReaderAction action, RGLDocumentReaderResults * _Nullable results, NSError * _Nullable error) {
|
|
525
571
|
sendEvent(completionEvent, [RGLWJSONConstructor generateCompletion:[RGLWConfig generateDocReaderAction: action] :results :error]);
|
|
@@ -561,12 +607,12 @@ RGLWCallback savedCallbackForBluetoothResult;
|
|
|
561
607
|
|
|
562
608
|
// RGLCustomizationActionDelegate
|
|
563
609
|
- (void)onCustomButtonTappedWithTag:(NSInteger)tag {
|
|
564
|
-
sendEvent(
|
|
610
|
+
sendEvent(drOnCustomButtonTappedEvent, @(tag));
|
|
565
611
|
}
|
|
566
612
|
|
|
567
613
|
// RGLRecordScanningProcessDelegate
|
|
568
614
|
- (void)didFinishRecordingToFile:(NSURL *)fileURL {
|
|
569
|
-
sendEvent(
|
|
615
|
+
sendEvent(drVideoEncoderCompletionEvent, fileURL.absoluteString);
|
|
570
616
|
}
|
|
571
617
|
|
|
572
618
|
- (void)didFailWithError:(NSError *)error {
|
|
@@ -15,8 +15,8 @@ RCT_EXPORT_MODULE();
|
|
|
15
15
|
paCertificateCompletionEvent,
|
|
16
16
|
taCertificateCompletionEvent,
|
|
17
17
|
taSignatureCompletionEvent,
|
|
18
|
-
|
|
19
|
-
|
|
18
|
+
drVideoEncoderCompletionEvent,
|
|
19
|
+
drOnCustomButtonTappedEvent];
|
|
20
20
|
}
|
|
21
21
|
|
|
22
22
|
static bool hasListeners;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@regulaforensics/react-native-document-reader-api",
|
|
3
|
-
"version": "8.4.
|
|
3
|
+
"version": "8.4.289-rc",
|
|
4
4
|
"description": "React Native module for reading and validation of identification documents (API framework)",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|