@regulaforensics/cordova-plugin-document-reader-api 8.4.270-nightly → 8.4.272-nightly
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/example/package.json +2 -2
- package/package.json +1 -1
- package/plugin.xml +2 -2
- package/src/android/Config.kt +49 -1
- package/src/android/JSONConstructor.kt +30 -0
- package/src/android/Main.kt +24 -1
- package/src/android/build.gradle +1 -1
- package/src/ios/RGLWConfig.m +38 -9
- package/src/ios/RGLWDocumentReader.m +1 -1
- package/src/ios/RGLWJSONConstructor.h +1 -0
- package/src/ios/RGLWJSONConstructor.m +21 -0
- package/src/ios/RGLWMain.h +2 -2
- package/src/ios/RGLWMain.m +48 -2
- package/www/DocumentReader.js +100 -0
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 Cordova
|
|
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.
|
package/example/package.json
CHANGED
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
"author": "Regula Forensics Inc.",
|
|
14
14
|
"license": "commercial",
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@regulaforensics/cordova-plugin-document-reader-api": "8.4.
|
|
17
|
-
"@regulaforensics/cordova-plugin-document-reader-core-fullauthrfid": "8.4.
|
|
16
|
+
"@regulaforensics/cordova-plugin-document-reader-api": "8.4.272-nightly",
|
|
17
|
+
"@regulaforensics/cordova-plugin-document-reader-core-fullauthrfid": "8.4.962-nightly",
|
|
18
18
|
"cordova-android": "13.0.0",
|
|
19
19
|
"cordova-ios": "7.1.1",
|
|
20
20
|
"cordova-plugin-add-swift-support": "2.0.2",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@regulaforensics/cordova-plugin-document-reader-api",
|
|
3
|
-
"version": "8.4.
|
|
3
|
+
"version": "8.4.272-nightly",
|
|
4
4
|
"description": "Cordova plugin for reading and validation of identification documents (API framework)",
|
|
5
5
|
"cordova": {
|
|
6
6
|
"id": "@regulaforensics/cordova-plugin-document-reader-api",
|
package/plugin.xml
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<?xml version='1.0' encoding='utf-8'?>
|
|
2
|
-
<plugin id="@regulaforensics/cordova-plugin-document-reader-api" version="8.4.
|
|
2
|
+
<plugin id="@regulaforensics/cordova-plugin-document-reader-api" version="8.4.272-nightly" xmlns="http://apache.org/cordova/ns/plugins/1.0">
|
|
3
3
|
<name>DocumentReaderApi</name>
|
|
4
4
|
<description>Cordova plugin Document reader api</description>
|
|
5
5
|
<license>commercial</license>
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
<source url="https://github.com/CocoaPods/Specs.git"/>
|
|
30
30
|
</config>
|
|
31
31
|
<pods>
|
|
32
|
-
<pod name="DocumentReaderNightly" spec="8.4.
|
|
32
|
+
<pod name="DocumentReaderNightly" spec="8.4.5302" />
|
|
33
33
|
</pods>
|
|
34
34
|
</podspec>
|
|
35
35
|
</platform>
|
package/src/android/Config.kt
CHANGED
|
@@ -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
|
+
}
|
package/src/android/Main.kt
CHANGED
|
@@ -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/src/android/build.gradle
CHANGED
package/src/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 {
|
|
@@ -17,7 +17,7 @@ UIViewController*(^RGLWRootViewController)(void) = ^UIViewController*(){
|
|
|
17
17
|
};
|
|
18
18
|
|
|
19
19
|
static RGLWEventSender sendEvent = ^(NSString* event, id data) {
|
|
20
|
-
NSArray *skippedEvents = @[
|
|
20
|
+
NSArray *skippedEvents = @[drVideoEncoderCompletionEvent, drOnCustomButtonTappedEvent];
|
|
21
21
|
if([skippedEvents containsObject:event]) return;
|
|
22
22
|
|
|
23
23
|
NSArray *singleEvents = @[completionEvent, databaseProgressEvent];
|
|
@@ -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/src/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/src/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 {
|
package/www/DocumentReader.js
CHANGED
|
@@ -1011,6 +1011,7 @@ class DocReaderConfig {
|
|
|
1011
1011
|
result.customDb = jsonObject["customDb"]
|
|
1012
1012
|
result.databasePath = jsonObject["databasePath"]
|
|
1013
1013
|
result.licenseUpdate = jsonObject["licenseUpdate"]
|
|
1014
|
+
result.licenseUpdateTimeout = jsonObject["licenseUpdateTimeout"]
|
|
1014
1015
|
result.delayedNNLoad = jsonObject["delayedNNLoad"]
|
|
1015
1016
|
result.blackList = jsonObject["blackList"]
|
|
1016
1017
|
|
|
@@ -1182,6 +1183,7 @@ class Functionality {
|
|
|
1182
1183
|
result.manualMultipageMode = jsonObject["manualMultipageMode"]
|
|
1183
1184
|
result.singleResult = jsonObject["singleResult"]
|
|
1184
1185
|
result.torchTurnedOn = jsonObject["torchTurnedOn"]
|
|
1186
|
+
result.preventScreenRecording = jsonObject["preventScreenRecording"]
|
|
1185
1187
|
result.showCaptureButtonDelayFromDetect = jsonObject["showCaptureButtonDelayFromDetect"]
|
|
1186
1188
|
result.showCaptureButtonDelayFromStart = jsonObject["showCaptureButtonDelayFromStart"]
|
|
1187
1189
|
result.rfidTimeout = jsonObject["rfidTimeout"]
|
|
@@ -1484,6 +1486,10 @@ class CustomizationColors {
|
|
|
1484
1486
|
result.rfidProcessingScreenProgressBarBackground = jsonObject["rfidProcessingScreenProgressBarBackground"]
|
|
1485
1487
|
result.rfidProcessingScreenResultLabelText = jsonObject["rfidProcessingScreenResultLabelText"]
|
|
1486
1488
|
result.rfidProcessingScreenLoadingBar = jsonObject["rfidProcessingScreenLoadingBar"]
|
|
1489
|
+
result.rfidEnableNfcTitleText = jsonObject["rfidEnableNfcTitleText"]
|
|
1490
|
+
result.rfidEnableNfcDescriptionText = jsonObject["rfidEnableNfcDescriptionText"]
|
|
1491
|
+
result.rfidEnableNfcButtonText = jsonObject["rfidEnableNfcButtonText"]
|
|
1492
|
+
result.rfidEnableNfcButtonBackground = jsonObject["rfidEnableNfcButtonBackground"]
|
|
1487
1493
|
|
|
1488
1494
|
return result
|
|
1489
1495
|
}
|
|
@@ -1497,6 +1503,9 @@ class CustomizationFonts {
|
|
|
1497
1503
|
result.rfidProcessingScreenHintLabel = Font.fromJson(jsonObject["rfidProcessingScreenHintLabel"])
|
|
1498
1504
|
result.rfidProcessingScreenProgressLabel = Font.fromJson(jsonObject["rfidProcessingScreenProgressLabel"])
|
|
1499
1505
|
result.rfidProcessingScreenResultLabel = Font.fromJson(jsonObject["rfidProcessingScreenResultLabel"])
|
|
1506
|
+
result.rfidEnableNfcTitleText = Font.fromJson(jsonObject["rfidEnableNfcTitleText"])
|
|
1507
|
+
result.rfidEnableNfcDescriptionText = Font.fromJson(jsonObject["rfidEnableNfcDescriptionText"])
|
|
1508
|
+
result.rfidEnableNfcButtonText = Font.fromJson(jsonObject["rfidEnableNfcButtonText"])
|
|
1500
1509
|
|
|
1501
1510
|
return result
|
|
1502
1511
|
}
|
|
@@ -1508,6 +1517,7 @@ class CustomizationImages {
|
|
|
1508
1517
|
const result = new CustomizationImages()
|
|
1509
1518
|
|
|
1510
1519
|
result.rfidProcessingScreenFailureImage = jsonObject["rfidProcessingScreenFailureImage"]
|
|
1520
|
+
result.rfidEnableNfcImage = jsonObject["rfidEnableNfcImage"]
|
|
1511
1521
|
|
|
1512
1522
|
return result
|
|
1513
1523
|
}
|
|
@@ -1790,6 +1800,35 @@ class PrepareProgress {
|
|
|
1790
1800
|
}
|
|
1791
1801
|
}
|
|
1792
1802
|
|
|
1803
|
+
class FilterObjectType {
|
|
1804
|
+
static fromJson(jsonObject) {
|
|
1805
|
+
if (jsonObject == null) return null
|
|
1806
|
+
const result = new FilterObjectType()
|
|
1807
|
+
|
|
1808
|
+
result.list = []
|
|
1809
|
+
if (jsonObject["list"] != null)
|
|
1810
|
+
for (const i in jsonObject["list"])
|
|
1811
|
+
result.list.push(jsonObject["list"][i])
|
|
1812
|
+
result.isInclude = jsonObject["isInclude"]
|
|
1813
|
+
|
|
1814
|
+
return result
|
|
1815
|
+
}
|
|
1816
|
+
}
|
|
1817
|
+
|
|
1818
|
+
class FilterObject {
|
|
1819
|
+
static fromJson(jsonObject) {
|
|
1820
|
+
if (jsonObject == null) return null
|
|
1821
|
+
const result = new FilterObject()
|
|
1822
|
+
|
|
1823
|
+
result.docIDsFilter = FilterObjectType.fromJson(jsonObject["docIDsFilter"])
|
|
1824
|
+
result.docFormatsFilter = FilterObjectType.fromJson(jsonObject["docFormatsFilter"])
|
|
1825
|
+
result.docCategoriesFilter = FilterObjectType.fromJson(jsonObject["docCategoriesFilter"])
|
|
1826
|
+
result.docCountriesFilter = FilterObjectType.fromJson(jsonObject["docCountriesFilter"])
|
|
1827
|
+
|
|
1828
|
+
return result
|
|
1829
|
+
}
|
|
1830
|
+
}
|
|
1831
|
+
|
|
1793
1832
|
// Enum
|
|
1794
1833
|
|
|
1795
1834
|
const FontStyle = {
|
|
@@ -1832,6 +1871,10 @@ const CustomizationColor = {
|
|
|
1832
1871
|
RFID_PROCESSING_SCREEN_PROGRESS_BAR_BACKGROUND: "rfidProcessingScreenProgressBarBackground",
|
|
1833
1872
|
RFID_PROCESSING_SCREEN_RESULT_LABEL_TEXT: "rfidProcessingScreenResultLabelText",
|
|
1834
1873
|
RFID_PROCESSING_SCREEN_LOADING_BAR: "rfidProcessingScreenLoadingBar",
|
|
1874
|
+
RFID_ENABLE_NFC_TITLE_TEXT: "rfidEnableNfcTitleText",
|
|
1875
|
+
RFID_ENABLE_NFC_DESCRIPTION_TEXT: "rfidEnableNfcDescriptionText",
|
|
1876
|
+
RFID_ENABLE_NFC_BUTTON_TEXT: "rfidEnableNfcButtonText",
|
|
1877
|
+
RFID_ENABLE_NFC_BUTTON_BACKGROUND: "rfidEnableNfcButtonBackground",
|
|
1835
1878
|
}
|
|
1836
1879
|
|
|
1837
1880
|
const eRFID_ErrorCodes = {
|
|
@@ -1951,6 +1994,16 @@ const eRFID_ErrorCodes = {
|
|
|
1951
1994
|
RFID_ERROR_LAYER34_SAM_ACKNOWLEDGE: 0x840F0000,
|
|
1952
1995
|
}
|
|
1953
1996
|
|
|
1997
|
+
const LivenessCheckType = {
|
|
1998
|
+
OVI: "checkOVI",
|
|
1999
|
+
MLI: "checkMLI",
|
|
2000
|
+
HOLO: "checkHolo",
|
|
2001
|
+
ED: "checkED",
|
|
2002
|
+
BLACK_AND_WHITE_COPY: "checkBlackAndWhiteCopy",
|
|
2003
|
+
DYNAPRINT: "checkDynaprint",
|
|
2004
|
+
GEOMETRY: "checkGeometry",
|
|
2005
|
+
}
|
|
2006
|
+
|
|
1954
2007
|
const eLDS_ParsingErrorCodes = {
|
|
1955
2008
|
ERR_LDS_OK: 0x00000001,
|
|
1956
2009
|
ERR_LDS_ASN_INCORRECT_DATA: 0x80000001,
|
|
@@ -2165,6 +2218,10 @@ const LineCap = {
|
|
|
2165
2218
|
SQUARE: 2,
|
|
2166
2219
|
}
|
|
2167
2220
|
|
|
2221
|
+
const FilterCheckType = {
|
|
2222
|
+
CHECK_AUTH: "checkAuth",
|
|
2223
|
+
}
|
|
2224
|
+
|
|
2168
2225
|
const eRPRM_FieldVerificationResult = {
|
|
2169
2226
|
RCF_DISABLED: 0,
|
|
2170
2227
|
RCF_VERIFIED: 1,
|
|
@@ -2262,6 +2319,7 @@ const DocumentReaderErrorCodes = {
|
|
|
2262
2319
|
SAVE_DB: 8,
|
|
2263
2320
|
DOWNLOAD_DB_INCORRECT_CHECKSUM: 9,
|
|
2264
2321
|
DB_DOWNLOAD: 10,
|
|
2322
|
+
RFID_ERROR: 12,
|
|
2265
2323
|
LICENSE_ABSENT_OR_CORRUPTED: 13,
|
|
2266
2324
|
LICENSE_INVALID_DATE: 14,
|
|
2267
2325
|
LICENSE_INVALID_VERSION: 15,
|
|
@@ -2284,6 +2342,8 @@ const DocumentReaderErrorCodes = {
|
|
|
2284
2342
|
NATIVE_JAVA_EXCEPTION: 1000,
|
|
2285
2343
|
BACKEND_ONLINE_PROCESSING: 303,
|
|
2286
2344
|
WRONG_INPUT: 400,
|
|
2345
|
+
RESULT_UNAVAILABLE: 410,
|
|
2346
|
+
RESULT_WRONG_OUTPUT: 411,
|
|
2287
2347
|
STATE_EXCEPTION: 500,
|
|
2288
2348
|
BLE_EXCEPTION: 600,
|
|
2289
2349
|
FEATURE_BLUETOOTH_LE_NOT_SUPPORTED: 601,
|
|
@@ -2506,6 +2566,8 @@ const eCheckDiagnose = {
|
|
|
2506
2566
|
FIELD_POS_CORRECTOR_FACE_PRESENCE_CHECK_ERROR: 84,
|
|
2507
2567
|
FIELD_POS_CORRECTOR_FACE_ABSENCE_CHECK_ERROR: 85,
|
|
2508
2568
|
CHD_FIELD_POS_CORRECTOR_INCORRECT_HEAD_POSITION: 86,
|
|
2569
|
+
CHD_FIELD_POS_CORRECTOR_AGE_CHECK_ERROR: 87,
|
|
2570
|
+
CHD_FIELD_POS_CORRECTOR_SEX_CHECK_ERROR: 88,
|
|
2509
2571
|
OVI_IR_INVISIBLE: 90,
|
|
2510
2572
|
OVI_INSUFFICIENT_AREA: 91,
|
|
2511
2573
|
OVI_COLOR_INVARIABLE: 92,
|
|
@@ -2974,6 +3036,8 @@ const eRPRM_SecurityFeatureType = {
|
|
|
2974
3036
|
SECURITY_FEATURE_TYPE_LIVENESS_BLACK_AND_WHITE_COPY_CHECK: 53,
|
|
2975
3037
|
SECURITY_FEATURE_TYPE_LIVENESS_DYNAPRINT_CHECK: 54,
|
|
2976
3038
|
SECURITY_FEATURE_TYPE_LIVENESS_GEOMETRY_CHECK: 55,
|
|
3039
|
+
SECURITY_FEATURE_TYPE_AGE_CHECK: 56,
|
|
3040
|
+
SECURITY_FEATURE_TYPE_SEX_CHECK: 57,
|
|
2977
3041
|
}
|
|
2978
3042
|
|
|
2979
3043
|
const OnlineMode = {
|
|
@@ -2986,6 +3050,24 @@ const eRFID_SDK_ProfilerType = {
|
|
|
2986
3050
|
SPT_DOC_9303_LDS_PKI_MAINTENANCE: 0x00000002,
|
|
2987
3051
|
}
|
|
2988
3052
|
|
|
3053
|
+
const AuthenticityCheckType = {
|
|
3054
|
+
USE_LIVENESS: "checkLiveness",
|
|
3055
|
+
UV_LUMINISCENCE: "checkUVLuminiscence",
|
|
3056
|
+
IR_B900: "checkIRB900",
|
|
3057
|
+
IMAGE_PATTERNS: "checkImagePatterns",
|
|
3058
|
+
FIBERS: "checkFibers",
|
|
3059
|
+
EXT_MRZ: "checkExtMRZ",
|
|
3060
|
+
EXT_OCR: "checkExtOCR",
|
|
3061
|
+
AXIAL: "checkAxial",
|
|
3062
|
+
BARCODE_FORMAT: "checkBarcodeFormat",
|
|
3063
|
+
IR_VISIBILITY: "checkIRVisibility",
|
|
3064
|
+
IPI: "checkIPI",
|
|
3065
|
+
PHOTO_EMBEDDING: "checkPhotoEmbedding",
|
|
3066
|
+
PHOTO_COMPARISON: "checkPhotoComparison",
|
|
3067
|
+
LETTER_SCREEN: "checkLetterScreen++",
|
|
3068
|
+
SECURITY_TEXT: "checkSecurityText",
|
|
3069
|
+
}
|
|
3070
|
+
|
|
2989
3071
|
const diDocType = {
|
|
2990
3072
|
dtNotDefined: 0,
|
|
2991
3073
|
dtPassport: 11,
|
|
@@ -3250,6 +3332,9 @@ const CustomizationFont = {
|
|
|
3250
3332
|
RFID_PROCESSING_SCREEN_HINT_LABEL: "rfidProcessingScreenHintLabel",
|
|
3251
3333
|
RFID_PROCESSING_SCREEN_PROGRESS_LABEL: "rfidProcessingScreenProgressLabel",
|
|
3252
3334
|
RFID_PROCESSING_SCREEN_RESULT_LABEL: "rfidProcessingScreenResultLabel",
|
|
3335
|
+
RFID_ENABLE_NFC_TITLE_TEXT: "rfidEnableNfcTitleText",
|
|
3336
|
+
RFID_ENABLE_NFC_DESCRIPTION_TEXT: "rfidEnableNfcDescriptionText",
|
|
3337
|
+
RFID_ENABLE_NFC_BUTTON_TEXT: "rfidEnableNfcButtonText",
|
|
3253
3338
|
}
|
|
3254
3339
|
|
|
3255
3340
|
const ImageFormat = {
|
|
@@ -4256,6 +4341,7 @@ const LCID = {
|
|
|
4256
4341
|
|
|
4257
4342
|
const CustomizationImage = {
|
|
4258
4343
|
RFID_PROCESSING_SCREEN_FAILURE_IMAGE: "rfidProcessingScreenFailureImage",
|
|
4344
|
+
RFID_ENABLE_NFC_IMAGE: "rfidEnableNfcImage",
|
|
4259
4345
|
}
|
|
4260
4346
|
|
|
4261
4347
|
const DocReaderFrame = {
|
|
@@ -4288,6 +4374,7 @@ const Enum = {
|
|
|
4288
4374
|
eRPRM_Authenticity,
|
|
4289
4375
|
CustomizationColor,
|
|
4290
4376
|
eRFID_ErrorCodes,
|
|
4377
|
+
LivenessCheckType,
|
|
4291
4378
|
eLDS_ParsingErrorCodes,
|
|
4292
4379
|
eRFID_CertificateType,
|
|
4293
4380
|
RGLMeasureSystem,
|
|
@@ -4295,6 +4382,7 @@ const Enum = {
|
|
|
4295
4382
|
FrameShapeType,
|
|
4296
4383
|
eRFID_BaudRate,
|
|
4297
4384
|
LineCap,
|
|
4385
|
+
FilterCheckType,
|
|
4298
4386
|
eRPRM_FieldVerificationResult,
|
|
4299
4387
|
DocReaderAction,
|
|
4300
4388
|
eProcessGLCommands,
|
|
@@ -4325,6 +4413,7 @@ const Enum = {
|
|
|
4325
4413
|
eRPRM_SecurityFeatureType,
|
|
4326
4414
|
OnlineMode,
|
|
4327
4415
|
eRFID_SDK_ProfilerType,
|
|
4416
|
+
AuthenticityCheckType,
|
|
4328
4417
|
diDocType,
|
|
4329
4418
|
ButtonTag,
|
|
4330
4419
|
HoloAnimationType,
|
|
@@ -4409,6 +4498,15 @@ DocumentReader.getDocReaderDocumentsDatabase = (successCallback, errorCallback)
|
|
|
4409
4498
|
DocumentReader.finalizePackage = (successCallback, errorCallback) => cordova.exec(successCallback, errorCallback, "DocumentReader", "exec", ["finalizePackage"])
|
|
4410
4499
|
DocumentReader.endBackendTransaction = (successCallback, errorCallback) => cordova.exec(successCallback, errorCallback, "DocumentReader", "exec", ["endBackendTransaction"])
|
|
4411
4500
|
DocumentReader.getTranslation = (className, value, successCallback, errorCallback) => cordova.exec(successCallback, errorCallback, "DocumentReader", "exec", ["getTranslation", className, value])
|
|
4501
|
+
DocumentReader.processParamsSetCheckFilter = (checkType, filter, successCallback, errorCallback) => cordova.exec(successCallback, errorCallback, "DocumentReader", "exec", ["processParamsSetCheckFilter", checkType, filter])
|
|
4502
|
+
DocumentReader.processParamsRemoveCheckFilter = (checkType, successCallback, errorCallback) => cordova.exec(successCallback, errorCallback, "DocumentReader", "exec", ["processParamsRemoveCheckFilter", checkType])
|
|
4503
|
+
DocumentReader.processParamsClearCheckFilter = (successCallback, errorCallback) => cordova.exec(successCallback, errorCallback, "DocumentReader", "exec", ["processParamsClearCheckFilter"])
|
|
4504
|
+
DocumentReader.authenticityParamsSetCheckFilter = (checkType, filter, successCallback, errorCallback) => cordova.exec(successCallback, errorCallback, "DocumentReader", "exec", ["authenticityParamsSetCheckFilter", checkType, filter])
|
|
4505
|
+
DocumentReader.authenticityParamsRemoveCheckFilter = (checkType, successCallback, errorCallback) => cordova.exec(successCallback, errorCallback, "DocumentReader", "exec", ["authenticityParamsRemoveCheckFilter", checkType])
|
|
4506
|
+
DocumentReader.authenticityParamsClearCheckFilter = (successCallback, errorCallback) => cordova.exec(successCallback, errorCallback, "DocumentReader", "exec", ["authenticityParamsClearCheckFilter"])
|
|
4507
|
+
DocumentReader.livenessParamsSetCheckFilter = (checkType, filter, successCallback, errorCallback) => cordova.exec(successCallback, errorCallback, "DocumentReader", "exec", ["livenessParamsSetCheckFilter", checkType, filter])
|
|
4508
|
+
DocumentReader.livenessParamsRemoveCheckFilter = (checkType, successCallback, errorCallback) => cordova.exec(successCallback, errorCallback, "DocumentReader", "exec", ["livenessParamsRemoveCheckFilter", checkType])
|
|
4509
|
+
DocumentReader.livenessParamsClearCheckFilter = (successCallback, errorCallback) => cordova.exec(successCallback, errorCallback, "DocumentReader", "exec", ["livenessParamsClearCheckFilter"])
|
|
4412
4510
|
|
|
4413
4511
|
DocumentReader.textFieldValueByType = (results, fieldType, successCallback, errorCallback) => cordova.exec(successCallback, errorCallback, "DocumentReader", "exec", ["textFieldValueByType", results.rawResult, fieldType])
|
|
4414
4512
|
DocumentReader.textFieldValueByTypeLcid = (results, fieldType, lcid, successCallback, errorCallback) => cordova.exec(successCallback, errorCallback, "DocumentReader", "exec", ["textFieldValueByTypeLcid", results.rawResult, fieldType, lcid])
|
|
@@ -4520,5 +4618,7 @@ DocumentReaderPlugin.EIDDataGroups = EIDDataGroups
|
|
|
4520
4618
|
DocumentReaderPlugin.DTCDataGroup = DTCDataGroup
|
|
4521
4619
|
DocumentReaderPlugin.RFIDScenario = RFIDScenario
|
|
4522
4620
|
DocumentReaderPlugin.PrepareProgress = PrepareProgress
|
|
4621
|
+
DocumentReaderPlugin.FilterObjectType = FilterObjectType
|
|
4622
|
+
DocumentReaderPlugin.FilterObject = FilterObject
|
|
4523
4623
|
|
|
4524
4624
|
module.exports = DocumentReaderPlugin
|