@regulaforensics/document-reader 9.7.952-rc → 9.7.954-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/RNDocumentReader.podspec +2 -2
- package/android/src/main/{java → kotlin}/com/regula/plugin/documentreader/Config.kt +30 -10
- package/android/src/main/{java → kotlin}/com/regula/plugin/documentreader/JSONConstructor.kt +12 -1
- package/android/src/main/{java → kotlin}/com/regula/plugin/documentreader/Utils.kt +1 -1
- package/examples/capacitor/README.md +1 -1
- package/examples/capacitor/package-lock.json +14 -14
- package/examples/capacitor/package.json +1 -1
- package/examples/capacitor/scripts/android.sh +3 -1
- package/examples/capacitor/scripts/ios.sh +3 -1
- package/examples/capacitor/scripts/setup.sh +2 -0
- package/examples/ionic/README.md +1 -1
- package/examples/ionic/config.xml +0 -2
- package/examples/ionic/images/icon.png +0 -0
- package/examples/ionic/index.tsx +1 -1
- package/examples/ionic/package-lock.json +2385 -2013
- package/examples/ionic/package.json +24 -24
- package/examples/ionic/patches/cordova-plugin-ionic-webview+5.0.1.patch +23 -0
- package/examples/ionic/scripts/android.sh +4 -1
- package/examples/ionic/scripts/ios.sh +5 -2
- package/examples/ionic/scripts/setup.sh +2 -0
- package/examples/ionic/tsconfig.json +1 -1
- package/examples/react_native/README.md +1 -1
- package/examples/react_native/package-lock.json +651 -707
- package/examples/react_native/package.json +3 -2
- package/examples/react_native/scripts/android.sh +5 -5
- package/examples/react_native/scripts/ios.sh +5 -5
- package/examples/react_native/scripts/setup.sh +2 -0
- package/ios/RGLWConfig.h +2 -0
- package/ios/RGLWConfig.m +25 -5
- package/ios/RGLWJSONConstructor.h +2 -0
- package/ios/RGLWJSONConstructor.m +12 -0
- package/package.json +1 -1
- package/plugin.xml +8 -8
- package/test/json.tsx +6 -0
- package/test/package-lock.json +1 -1
- package/test/test.tsx +206 -2
- package/www/capacitor/index.js +207 -17
- package/www/capacitor/params/process_params/AuthenticityParams.js +15 -0
- package/www/capacitor/params/process_params/AuthenticityPropertiesParams.js +31 -0
- package/www/capacitor/params/process_params/FaceApiParams.js +5 -1
- package/www/capacitor/results/authenticity/Authenticity.js +2 -1
- package/www/capacitor/results/authenticity/CheckDiagnose.js +4 -1
- package/www/capacitor/results/authenticity/SecurityFeatureType.js +1 -0
- package/www/capacitor/results/visual_results/FieldType.js +3 -1
- package/www/cordova.js +199 -123
- package/www/react-native/index.js +207 -17
- package/www/react-native/params/process_params/AuthenticityParams.js +15 -0
- package/www/react-native/params/process_params/AuthenticityPropertiesParams.js +31 -0
- package/www/react-native/params/process_params/FaceApiParams.js +5 -1
- package/www/react-native/results/authenticity/Authenticity.js +2 -1
- package/www/react-native/results/authenticity/CheckDiagnose.js +4 -1
- package/www/react-native/results/authenticity/SecurityFeatureType.js +1 -0
- package/www/react-native/results/visual_results/FieldType.js +3 -1
- package/www/types/index.d.ts +206 -19
- package/www/types/params/process_params/AuthenticityParams.d.ts +5 -4
- package/www/types/params/process_params/AuthenticityPropertiesParams.d.ts +10 -0
- package/www/types/params/process_params/FaceApiParams.d.ts +4 -0
- package/www/types/params/process_params/ProcessParams.d.ts +3 -2
- package/www/types/results/authenticity/Authenticity.d.ts +1 -0
- package/www/types/results/authenticity/CheckDiagnose.d.ts +3 -0
- package/www/types/results/authenticity/SecurityFeatureType.d.ts +1 -0
- package/www/types/results/visual_results/FieldType.d.ts +3 -1
- /package/android/src/main/{java → kotlin}/com/regula/plugin/documentreader/BluetoothUtil.kt +0 -0
- /package/android/src/main/{java → kotlin}/com/regula/plugin/documentreader/Main.kt +0 -0
- /package/android/src/main/{java → kotlin}/com/regula/plugin/documentreader/RNDocumentReaderModule.kt +0 -0
package/RNDocumentReader.podspec
CHANGED
|
@@ -5,7 +5,7 @@ source = File.join(__dir__, 'ios')
|
|
|
5
5
|
|
|
6
6
|
Pod::Spec.new do |s|
|
|
7
7
|
s.name = 'RNDocumentReader'
|
|
8
|
-
s.version = '9.7.
|
|
8
|
+
s.version = '9.7.954-rc'
|
|
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 'DocumentReaderStage', '9.7.
|
|
19
|
+
s.dependency 'DocumentReaderStage', '9.7.6763'
|
|
20
20
|
s.dependency 'React'
|
|
21
21
|
end
|
|
@@ -16,6 +16,7 @@ import com.regula.documentreader.api.enums.CustomizationScaleType
|
|
|
16
16
|
import com.regula.documentreader.api.enums.CustomizationTiming
|
|
17
17
|
import com.regula.documentreader.api.enums.LogLevel
|
|
18
18
|
import com.regula.documentreader.api.params.AuthenticityParams
|
|
19
|
+
import com.regula.documentreader.api.params.AuthenticityPropertiesParams
|
|
19
20
|
import com.regula.documentreader.api.params.Functionality
|
|
20
21
|
import com.regula.documentreader.api.params.ImageQA
|
|
21
22
|
import com.regula.documentreader.api.params.LivenessParams
|
|
@@ -718,10 +719,15 @@ fun setAuthenticityParams(input: AuthenticityParams, opts: JSONObject) = opts.fo
|
|
|
718
719
|
"checkPhotoComparison" -> input.checkPhotoComparison = v as Boolean
|
|
719
720
|
"checkLetterScreen" -> input.checkLetterScreen = v as Boolean
|
|
720
721
|
"checkSecurityText" -> input.checkSecurityText = v as Boolean
|
|
722
|
+
"checkProperties" -> input.checkProperties = v as Boolean
|
|
721
723
|
"livenessParams" -> {
|
|
722
724
|
if (input.livenessParams == null) input.livenessParams = LivenessParams.defaultParams()
|
|
723
725
|
setLivenessParams(input.livenessParams!!, v as JSONObject)
|
|
724
726
|
}
|
|
727
|
+
"propertiesParams" -> {
|
|
728
|
+
if (input.propertiesParams == null) input.propertiesParams = AuthenticityPropertiesParams.defaultParams()
|
|
729
|
+
setAuthenticityPropertiesParams(input.propertiesParams!!, v as JSONObject)
|
|
730
|
+
}
|
|
725
731
|
}
|
|
726
732
|
}
|
|
727
733
|
|
|
@@ -729,7 +735,7 @@ fun getAuthenticityParams(input: AuthenticityParams?) = input?.let {
|
|
|
729
735
|
mapOf(
|
|
730
736
|
"useLivenessCheck" to it.useLivenessCheck,
|
|
731
737
|
"checkUVLuminiscence" to it.checkUVLuminiscence,
|
|
732
|
-
"checkIRB900" to
|
|
738
|
+
"checkIRB900" to it.checkIRB900,
|
|
733
739
|
"checkImagePatterns" to it.checkImagePatterns,
|
|
734
740
|
"checkFibers" to it.checkFibers,
|
|
735
741
|
"checkExtMRZ" to it.checkExtMRZ,
|
|
@@ -742,7 +748,9 @@ fun getAuthenticityParams(input: AuthenticityParams?) = input?.let {
|
|
|
742
748
|
"checkPhotoComparison" to it.checkPhotoComparison,
|
|
743
749
|
"checkLetterScreen" to it.checkLetterScreen,
|
|
744
750
|
"checkSecurityText" to it.checkSecurityText,
|
|
745
|
-
"
|
|
751
|
+
"checkProperties" to it.checkProperties,
|
|
752
|
+
"livenessParams" to getLivenessParams(it.livenessParams),
|
|
753
|
+
"propertiesParams" to getAuthenticityPropertiesParams(it.propertiesParams),
|
|
746
754
|
).toJson()
|
|
747
755
|
}
|
|
748
756
|
|
|
@@ -761,14 +769,26 @@ fun setLivenessParams(input: LivenessParams, opts: JSONObject) = opts.forEach {
|
|
|
761
769
|
|
|
762
770
|
fun getLivenessParams(input: LivenessParams?) = input?.let {
|
|
763
771
|
mapOf(
|
|
764
|
-
"checkOVI" to
|
|
765
|
-
"checkMLI" to
|
|
766
|
-
"checkHolo" to
|
|
767
|
-
"checkED" to
|
|
768
|
-
"checkBlackAndWhiteCopy" to
|
|
769
|
-
"checkDynaprint" to
|
|
770
|
-
"checkGeometry" to
|
|
771
|
-
"checkBarcodeBackground" to
|
|
772
|
+
"checkOVI" to it.checkOVI,
|
|
773
|
+
"checkMLI" to it.checkMLI,
|
|
774
|
+
"checkHolo" to it.checkHolo,
|
|
775
|
+
"checkED" to it.checkED,
|
|
776
|
+
"checkBlackAndWhiteCopy" to it.checkBlackAndWhiteCopy,
|
|
777
|
+
"checkDynaprint" to it.checkDynaprint,
|
|
778
|
+
"checkGeometry" to it.checkGeometry,
|
|
779
|
+
"checkBarcodeBackground" to it.checkBarcodeBackground,
|
|
780
|
+
).toJson()
|
|
781
|
+
}
|
|
782
|
+
|
|
783
|
+
fun setAuthenticityPropertiesParams(input: AuthenticityPropertiesParams, opts: JSONObject) = opts.forEach { k, v ->
|
|
784
|
+
when (k) {
|
|
785
|
+
"checkHoldersSignature" -> input.checkHoldersSignature = v as Boolean
|
|
786
|
+
}
|
|
787
|
+
}
|
|
788
|
+
|
|
789
|
+
fun getAuthenticityPropertiesParams(input: AuthenticityPropertiesParams?) = input?.let {
|
|
790
|
+
mapOf(
|
|
791
|
+
"checkHoldersSignature" to it.checkHoldersSignature,
|
|
772
792
|
).toJson()
|
|
773
793
|
}
|
|
774
794
|
|
package/android/src/main/{java → kotlin}/com/regula/plugin/documentreader/JSONConstructor.kt
RENAMED
|
@@ -27,6 +27,7 @@ import com.regula.documentreader.api.enums.eRFID_DataFile_Type
|
|
|
27
27
|
import com.regula.documentreader.api.enums.eRPRM_Lights
|
|
28
28
|
import com.regula.documentreader.api.listener.NetworkInterceptorListener
|
|
29
29
|
import com.regula.documentreader.api.params.AuthenticityParams
|
|
30
|
+
import com.regula.documentreader.api.params.AuthenticityPropertiesParams
|
|
30
31
|
import com.regula.documentreader.api.params.BackendProcessingConfig
|
|
31
32
|
import com.regula.documentreader.api.params.BleDeviceConfig
|
|
32
33
|
import com.regula.documentreader.api.params.Bsi
|
|
@@ -378,6 +379,7 @@ fun faceApiParamsFromJSON(input: JSONObject?) = input?.let {
|
|
|
378
379
|
result.search = faceApiSearchParamsFromJSON(it.getJSONObjectOrNull("searchParams"))
|
|
379
380
|
result.proxy = it.getStringOrNull("proxy")
|
|
380
381
|
result.proxyUserPwd = it.getStringOrNull("proxyPassword")
|
|
382
|
+
result.livenessTransactionId = it.getStringOrNull("livenessTransactionId")
|
|
381
383
|
result.proxyType = it.getIntOrNull("proxyType")
|
|
382
384
|
|
|
383
385
|
result
|
|
@@ -392,6 +394,7 @@ fun generateFaceApiParams(input: FaceApiParams?) = input?.let {
|
|
|
392
394
|
"serviceTimeout" to it.serviceTimeout,
|
|
393
395
|
"proxy" to it.proxy,
|
|
394
396
|
"proxyPassword" to it.proxyUserPwd,
|
|
397
|
+
"livenessTransactionId" to it.livenessTransactionId,
|
|
395
398
|
"proxyType" to it.proxyType
|
|
396
399
|
).toJson()
|
|
397
400
|
}
|
|
@@ -464,6 +467,14 @@ fun livenessParamsFromJSON(input: JSONObject): LivenessParams {
|
|
|
464
467
|
|
|
465
468
|
fun generateLivenessParams(input: LivenessParams?) = getLivenessParams(input)
|
|
466
469
|
|
|
470
|
+
fun authenticityPropertiesParamsFromJSON(input: JSONObject): AuthenticityPropertiesParams {
|
|
471
|
+
val result = AuthenticityPropertiesParams.defaultParams()
|
|
472
|
+
setAuthenticityPropertiesParams(result, input)
|
|
473
|
+
return result
|
|
474
|
+
}
|
|
475
|
+
|
|
476
|
+
fun generateAuthenticityPropertiesParams(input: AuthenticityPropertiesParams?) = getAuthenticityPropertiesParams(input)
|
|
477
|
+
|
|
467
478
|
fun eDLDataGroupsFromJSON(input: JSONObject): EDLDataGroups {
|
|
468
479
|
val result = EDLDataGroups()
|
|
469
480
|
setDataGroups(result, input)
|
|
@@ -582,7 +593,7 @@ fun generateImageInputData(input: ImageInputData?) = input?.let {
|
|
|
582
593
|
).toJson()
|
|
583
594
|
}
|
|
584
595
|
|
|
585
|
-
fun pkdCertificateFromJSON(input: JSONObject?) = input?.let {
|
|
596
|
+
fun pkdCertificateFromJSON(input: JSONObject?): PKDCertificate? = input?.let {
|
|
586
597
|
var resourceType = 0
|
|
587
598
|
var binaryData = ByteArray(0)
|
|
588
599
|
|
|
@@ -237,7 +237,7 @@ internal object Convert {
|
|
|
237
237
|
BitmapDrawable(context.resources, Bitmap.createScaledBitmap(bitmap, width, height, false))
|
|
238
238
|
}
|
|
239
239
|
|
|
240
|
-
fun Drawable?.toBase64() = this?.let {
|
|
240
|
+
fun Drawable?.toBase64(): String? = this?.let {
|
|
241
241
|
if (this is BitmapDrawable) if (bitmap != null) return bitmap.toBase64()
|
|
242
242
|
val bitmap: Bitmap = if (intrinsicWidth <= 0 || intrinsicHeight <= 0) Bitmap.createBitmap(1, 1, Bitmap.Config.ARGB_8888) else Bitmap.createBitmap(intrinsicWidth, intrinsicHeight, Bitmap.Config.ARGB_8888)
|
|
243
243
|
val canvas = Canvas(bitmap)
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* IOS: `npm run ios`.
|
|
10
10
|
* Android: `npm run android`.
|
|
11
11
|
|
|
12
|
-
**Note**: this is just one way of running the app. You can also pass
|
|
12
|
+
**Note**: this is just one way of running the app. You can also pass `-- -o` or `-- --open` argument to the command, and this will open Xcode/Android Studio, then run the app directly from the IDE. Overall, this is a more consistent way, so if you're having troubles running the app from terminal, try running it from the IDE.
|
|
13
13
|
|
|
14
14
|
## Additional examples
|
|
15
15
|
|
|
@@ -1763,15 +1763,15 @@
|
|
|
1763
1763
|
}
|
|
1764
1764
|
},
|
|
1765
1765
|
"node_modules/brace-expansion": {
|
|
1766
|
-
"version": "5.0.
|
|
1767
|
-
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.
|
|
1768
|
-
"integrity": "sha512-
|
|
1766
|
+
"version": "5.0.8",
|
|
1767
|
+
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-5.0.8.tgz",
|
|
1768
|
+
"integrity": "sha512-JZyDyq3D4AUifKTPOB7DELf6XsB3WdPuNxCtob1vFXPsSXhdAiHBWJ/tJ8HAc9aH84BK+5JFZLNkJKx3G9kzQg==",
|
|
1769
1769
|
"license": "MIT",
|
|
1770
1770
|
"dependencies": {
|
|
1771
1771
|
"balanced-match": "^4.0.2"
|
|
1772
1772
|
},
|
|
1773
1773
|
"engines": {
|
|
1774
|
-
"node": "
|
|
1774
|
+
"node": "20 || >=22"
|
|
1775
1775
|
}
|
|
1776
1776
|
},
|
|
1777
1777
|
"node_modules/braces": {
|
|
@@ -2432,9 +2432,9 @@
|
|
|
2432
2432
|
"license": "MIT"
|
|
2433
2433
|
},
|
|
2434
2434
|
"node_modules/nanoid": {
|
|
2435
|
-
"version": "3.3.
|
|
2436
|
-
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.
|
|
2437
|
-
"integrity": "sha512-
|
|
2435
|
+
"version": "3.3.16",
|
|
2436
|
+
"resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.16.tgz",
|
|
2437
|
+
"integrity": "sha512-bzlKTyNJ7+LdGIIwy8ijFpIqEQIvafahV7eYykJ8Cvh42EdJeODoJ6gUJXpQJvej1BddH8OqTXZNE/KfbWAu8Q==",
|
|
2438
2438
|
"funding": [
|
|
2439
2439
|
{
|
|
2440
2440
|
"type": "github",
|
|
@@ -2601,9 +2601,9 @@
|
|
|
2601
2601
|
}
|
|
2602
2602
|
},
|
|
2603
2603
|
"node_modules/postcss": {
|
|
2604
|
-
"version": "8.5.
|
|
2605
|
-
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.
|
|
2606
|
-
"integrity": "sha512-
|
|
2604
|
+
"version": "8.5.22",
|
|
2605
|
+
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.22.tgz",
|
|
2606
|
+
"integrity": "sha512-KBDEIpLrvpv16pp3K0Fw+UCoZfopFjjgeB+0tA/aaThfEE74kKDLrgg603YvOWJyg3+WYtyq3xYsQWsIyZlPqQ==",
|
|
2607
2607
|
"funding": [
|
|
2608
2608
|
{
|
|
2609
2609
|
"type": "opencollective",
|
|
@@ -2621,7 +2621,7 @@
|
|
|
2621
2621
|
"license": "MIT",
|
|
2622
2622
|
"peer": true,
|
|
2623
2623
|
"dependencies": {
|
|
2624
|
-
"nanoid": "^3.3.
|
|
2624
|
+
"nanoid": "^3.3.16",
|
|
2625
2625
|
"picocolors": "^1.1.1",
|
|
2626
2626
|
"source-map-js": "^1.2.1"
|
|
2627
2627
|
},
|
|
@@ -3057,9 +3057,9 @@
|
|
|
3057
3057
|
}
|
|
3058
3058
|
},
|
|
3059
3059
|
"node_modules/tar": {
|
|
3060
|
-
"version": "7.5.
|
|
3061
|
-
"resolved": "https://registry.npmjs.org/tar/-/tar-7.5.
|
|
3062
|
-
"integrity": "sha512-
|
|
3060
|
+
"version": "7.5.21",
|
|
3061
|
+
"resolved": "https://registry.npmjs.org/tar/-/tar-7.5.21.tgz",
|
|
3062
|
+
"integrity": "sha512-XdhtCvlMywwxpCW8YEq3lOXBJpUPTR2OHHcwLPO3HwsJqOHa2Ok/oJ7ruGzp+JrKoRPVCzJwAdEjqLW/vNRPHA==",
|
|
3063
3063
|
"license": "BlueOak-1.0.0",
|
|
3064
3064
|
"dependencies": {
|
|
3065
3065
|
"@isaacs/fs-minipass": "^4.0.0",
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
"android": "scripts/android.sh"
|
|
7
7
|
},
|
|
8
8
|
"dependencies": {
|
|
9
|
-
"@regulaforensics/document-reader": "9.7.
|
|
9
|
+
"@regulaforensics/document-reader": "9.7.954-rc",
|
|
10
10
|
"@regulaforensics/document-reader-core-fullauthrfid": "9.6.2444",
|
|
11
11
|
"@regulaforensics/document-reader-btdevice": "9.6.55",
|
|
12
12
|
"@awesome-cordova-plugins/file": "^8.1.0",
|
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
#!/usr/bin/env bash
|
|
2
2
|
set -e
|
|
3
3
|
|
|
4
|
-
if [[
|
|
4
|
+
if [[ " $* " == *" --open "* ]] || [[ " $* " == *" -o "* ]]; then
|
|
5
5
|
ionic cap sync android
|
|
6
6
|
open -a 'Android Studio' android
|
|
7
7
|
else
|
|
8
8
|
ionic cap run android
|
|
9
9
|
fi
|
|
10
|
+
|
|
11
|
+
exit 0
|
package/examples/ionic/README.md
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* IOS: `npm run ios`.
|
|
10
10
|
* Android: `npm run android`.
|
|
11
11
|
|
|
12
|
-
**Note**: this is just one way of running the app. You can also pass
|
|
12
|
+
**Note**: this is just one way of running the app. You can also pass `-- -o` or `-- --open` argument to the command, and this will open Xcode/Android Studio, then run the app directly from the IDE. Overall, this is a more consistent way, so if you're having troubles running the app from terminal, try running it from the IDE.
|
|
13
13
|
|
|
14
14
|
## Additional examples
|
|
15
15
|
|
|
@@ -7,8 +7,6 @@
|
|
|
7
7
|
<resource-file src="assets/db.dat" target="app/src/main/assets/Regula/db.dat" />
|
|
8
8
|
<preference name="orientation" value="portrait" />
|
|
9
9
|
<preference name="AndroidEdgeToEdge" value="true" />
|
|
10
|
-
<preference name="android-minSdkVersion" value="24" />
|
|
11
|
-
<preference name="android-targetSdkVersion" value="36" />
|
|
12
10
|
<preference name="GradlePluginKotlinEnabled" value="true" />
|
|
13
11
|
<config-file parent="/*" target="AndroidManifest.xml">
|
|
14
12
|
<uses-permission android:name="android.permission.NFC" />
|
|
Binary file
|
package/examples/ionic/index.tsx
CHANGED
|
@@ -12,7 +12,7 @@ import { main } from './src/main'
|
|
|
12
12
|
|
|
13
13
|
export async function loadAsset(path: string): Promise<string> {
|
|
14
14
|
var dir = await File.resolveDirectoryUrl(File.applicationDirectory + "www/assets")
|
|
15
|
-
var fileEntry = await File.getFile(dir, path,
|
|
15
|
+
var fileEntry = await File.getFile(dir, path, {})
|
|
16
16
|
var result = await new Promise<string>((resolve, _) => {
|
|
17
17
|
fileEntry.file(file => {
|
|
18
18
|
var reader = new FileReader()
|