@regulaforensics/document-reader 8.4.375-beta → 8.4.386-beta
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/RNDocumentReader.podspec +2 -2
- package/android/build.gradle +2 -2
- package/android/cordova.gradle +2 -2
- package/android/src/main/java/com/regula/plugin/documentreader/Config.kt +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/examples/capacitor/package-lock.json +351 -313
- package/examples/capacitor/package.json +3 -3
- package/examples/ionic/package.json +3 -3
- package/examples/react_native/package.json +3 -3
- package/ios/RGLWConfig.m +38 -9
- package/ios/RGLWJSONConstructor.h +1 -0
- package/ios/RGLWJSONConstructor.m +21 -0
- package/ios/RGLWMain.m +46 -0
- package/package.json +1 -1
- package/plugin.xml +2 -2
- package/test/json.tsx +72 -31
- package/test/package-lock.json +1 -1
- package/test/test.tsx +3 -2
- package/www/capacitor/config/InitConfig.js +3 -0
- package/www/capacitor/index.js +5 -4
- package/www/capacitor/info/DocReaderException.js +2 -0
- package/www/capacitor/params/Functionality.js +8 -0
- package/www/capacitor/params/customization/CustomizationColors.js +32 -0
- package/www/capacitor/params/customization/CustomizationFonts.js +24 -0
- package/www/capacitor/params/customization/CustomizationImages.js +8 -0
- package/www/capacitor/params/process_params/AuthenticityParams.js +44 -0
- package/www/capacitor/params/process_params/FilterObject.js +60 -0
- package/www/capacitor/params/process_params/LivenessParams.js +38 -2
- package/www/capacitor/params/process_params/ProcessParams.js +30 -0
- package/www/capacitor/results/authenticity/CheckDiagnose.js +2 -0
- package/www/capacitor/results/authenticity/SecurityFeatureType.js +3 -1
- package/www/cordova.js +371 -92
- package/www/react-native/config/InitConfig.js +3 -0
- package/www/react-native/index.js +5 -4
- package/www/react-native/info/DocReaderException.js +2 -0
- package/www/react-native/params/Functionality.js +8 -0
- package/www/react-native/params/customization/CustomizationColors.js +32 -0
- package/www/react-native/params/customization/CustomizationFonts.js +24 -0
- package/www/react-native/params/customization/CustomizationImages.js +8 -0
- package/www/react-native/params/process_params/AuthenticityParams.js +44 -0
- package/www/react-native/params/process_params/FilterObject.js +60 -0
- package/www/react-native/params/process_params/LivenessParams.js +38 -2
- package/www/react-native/params/process_params/ProcessParams.js +30 -0
- package/www/react-native/results/authenticity/CheckDiagnose.js +2 -0
- package/www/react-native/results/authenticity/SecurityFeatureType.js +3 -1
- package/www/types/config/InitConfig.d.ts +5 -0
- package/www/types/index.d.ts +5 -4
- package/www/types/info/DocReaderException.d.ts +4 -0
- package/www/types/params/Functionality.d.ts +6 -0
- package/www/types/params/customization/CustomizationColors.d.ts +16 -8
- package/www/types/params/customization/CustomizationFonts.d.ts +6 -0
- package/www/types/params/customization/CustomizationImages.d.ts +6 -1
- package/www/types/params/process_params/AuthenticityParams.d.ts +25 -0
- package/www/types/params/process_params/FilterObject.d.ts +32 -0
- package/www/types/params/process_params/LivenessParams.d.ts +18 -0
- package/www/types/params/process_params/ProcessParams.d.ts +11 -0
- package/www/types/results/authenticity/CheckDiagnose.d.ts +4 -0
- package/www/types/results/authenticity/SecurityFeatureType.d.ts +4 -0
package/RNDocumentReader.podspec
CHANGED
|
@@ -5,7 +5,7 @@ source = File.join(__dir__, 'ios')
|
|
|
5
5
|
|
|
6
6
|
Pod::Spec.new do |s|
|
|
7
7
|
s.name = 'RNDocumentReader'
|
|
8
|
-
s.version = '8.4.
|
|
8
|
+
s.version = '8.4.386-beta'
|
|
9
9
|
s.summary = package['description']
|
|
10
10
|
s.license = package['license']
|
|
11
11
|
|
|
@@ -16,6 +16,6 @@ Pod::Spec.new do |s|
|
|
|
16
16
|
s.ios.deployment_target = '13.0'
|
|
17
17
|
s.source_files = 'ios/**/*.{h,m}'
|
|
18
18
|
s.exclude_files = [ 'ios/CVDDocumentReader.h', 'ios/CVDDocumentReader.m' ]
|
|
19
|
-
s.dependency '
|
|
19
|
+
s.dependency 'DocumentReaderStage', '8.4.5290'
|
|
20
20
|
s.dependency 'React'
|
|
21
21
|
end
|
package/android/build.gradle
CHANGED
|
@@ -20,7 +20,7 @@ android {
|
|
|
20
20
|
rootProject.allprojects {
|
|
21
21
|
repositories {
|
|
22
22
|
maven {
|
|
23
|
-
url "https://maven.regulaforensics.com/RegulaDocumentReader"
|
|
23
|
+
url "https://maven.regulaforensics.com/RegulaDocumentReader/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.
|
|
32
|
+
implementation('com.regula.documentreader:api:8.4.11971'){
|
|
33
33
|
transitive = true
|
|
34
34
|
}
|
|
35
35
|
}
|
package/android/cordova.gradle
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
repositories {
|
|
2
2
|
maven {
|
|
3
|
-
url "https://maven.regulaforensics.com/RegulaDocumentReader"
|
|
3
|
+
url "https://maven.regulaforensics.com/RegulaDocumentReader/Stage"
|
|
4
4
|
}
|
|
5
5
|
}
|
|
6
6
|
|
|
7
7
|
dependencies {
|
|
8
8
|
//noinspection GradleDependency
|
|
9
|
-
implementation('com.regula.documentreader:api:8.
|
|
9
|
+
implementation('com.regula.documentreader:api:8.4.11971'){
|
|
10
10
|
transitive = true
|
|
11
11
|
}
|
|
12
12
|
}
|
|
@@ -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? ->
|