@regulaforensics/cordova-plugin-document-reader-api 9.7.746-rc → 9.7.751-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/example/package.json +2 -2
- package/package.json +1 -1
- package/plugin.xml +2 -2
- package/src/android/Config.kt +2 -0
- package/src/android/JSONConstructor.kt +13 -0
- package/src/android/build.gradle +1 -1
- package/src/ios/RGLWConfig.m +3 -0
- package/src/ios/RGLWJSONConstructor.h +2 -0
- package/src/ios/RGLWJSONConstructor.m +19 -0
- package/src/ios/RGLWMain.h +1 -2
- package/src/ios/RGLWMain.m +1 -1
- package/www/DocumentReader.js +36 -2
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": "9.7.
|
|
17
|
-
"@regulaforensics/cordova-plugin-document-reader-core-fullauthrfid": "9.
|
|
16
|
+
"@regulaforensics/cordova-plugin-document-reader-api": "9.7.751-rc",
|
|
17
|
+
"@regulaforensics/cordova-plugin-document-reader-core-fullauthrfid": "9.8.3248-rc",
|
|
18
18
|
"cordova-android": "15.0.0",
|
|
19
19
|
"cordova-ios": "8.1.1",
|
|
20
20
|
"cordova-plugin-camera": "8.0.0",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@regulaforensics/cordova-plugin-document-reader-api",
|
|
3
|
-
"version": "9.7.
|
|
3
|
+
"version": "9.7.751-rc",
|
|
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="9.7.
|
|
2
|
+
<plugin id="@regulaforensics/cordova-plugin-document-reader-api" version="9.7.751-rc" 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/regulaforensics/podspecs.git"/>
|
|
30
30
|
</config>
|
|
31
31
|
<pods>
|
|
32
|
-
<pod name="DocumentReaderStage" spec="9.8.
|
|
32
|
+
<pod name="DocumentReaderStage" spec="9.8.6896" />
|
|
33
33
|
</pods>
|
|
34
34
|
</podspec>
|
|
35
35
|
</platform>
|
package/src/android/Config.kt
CHANGED
|
@@ -685,6 +685,7 @@ fun setImageQA(input: ImageQA, opts: JSONObject) = opts.forEach { k, v ->
|
|
|
685
685
|
"expectedPass" -> input.expectedPass = v.toIntArray()
|
|
686
686
|
"glaresCheckParams" -> input.glaresCheckParams = glaresCheckParamsFromJSON(v as JSONObject)
|
|
687
687
|
"occlusionCheck" -> input.occlusionCheck = v as Boolean
|
|
688
|
+
"occlusionCheckParams" -> input.occlusionCheckParams = occlusionCheckParamsFromJSON(v as JSONObject)
|
|
688
689
|
}
|
|
689
690
|
}
|
|
690
691
|
|
|
@@ -700,6 +701,7 @@ fun getImageQA(input: ImageQA) = mapOf(
|
|
|
700
701
|
"expectedPass" to input.expectedPass.toJson(),
|
|
701
702
|
"glaresCheckParams" to generateGlaresCheckParams(input.glaresCheckParams),
|
|
702
703
|
"occlusionCheck" to input.occlusionCheck,
|
|
704
|
+
"occlusionCheckParams" to generateOcclusionCheckParams(input.occlusionCheckParams),
|
|
703
705
|
).toJson()
|
|
704
706
|
|
|
705
707
|
fun setAuthenticityParams(input: AuthenticityParams, opts: JSONObject) = opts.forEach { k, v ->
|
|
@@ -38,6 +38,7 @@ import com.regula.documentreader.api.params.ImageInputData
|
|
|
38
38
|
import com.regula.documentreader.api.params.ImageQA
|
|
39
39
|
import com.regula.documentreader.api.params.ImageQA.GlaresCheckParams
|
|
40
40
|
import com.regula.documentreader.api.params.LivenessParams
|
|
41
|
+
import com.regula.documentreader.api.params.OcclusionCheckParams
|
|
41
42
|
import com.regula.documentreader.api.params.OnlineProcessingConfig
|
|
42
43
|
import com.regula.documentreader.api.params.ParamsCustomization
|
|
43
44
|
import com.regula.documentreader.api.params.ProcessParam
|
|
@@ -545,6 +546,18 @@ fun generateGlaresCheckParams(input: GlaresCheckParams?) = input?.let {
|
|
|
545
546
|
).toJson()
|
|
546
547
|
}
|
|
547
548
|
|
|
549
|
+
fun occlusionCheckParamsFromJSON(input: JSONObject?) = input?.let {
|
|
550
|
+
val result = OcclusionCheckParams()
|
|
551
|
+
if (it.has("maxOcclusionPart")) result.maxOcclusionPart = it.getDouble("maxOcclusionPart")
|
|
552
|
+
result
|
|
553
|
+
}
|
|
554
|
+
|
|
555
|
+
fun generateOcclusionCheckParams(input: OcclusionCheckParams?) = input?.let {
|
|
556
|
+
mapOf(
|
|
557
|
+
"maxOcclusionPart" to it.maxOcclusionPart,
|
|
558
|
+
).toJson()
|
|
559
|
+
}
|
|
560
|
+
|
|
548
561
|
@SuppressLint("DiscouragedApi")
|
|
549
562
|
fun typefaceFromJSON(it: JSONObject): Pair<Typeface?, Int?> {
|
|
550
563
|
val font = try {
|
package/src/android/build.gradle
CHANGED
package/src/ios/RGLWConfig.m
CHANGED
|
@@ -971,6 +971,8 @@
|
|
|
971
971
|
if([input valueForKey:@"brightnessThreshold"] != nil)
|
|
972
972
|
result.brightnessThreshold = [input valueForKey:@"brightnessThreshold"];
|
|
973
973
|
if(input[@"occlusionCheck"]) result.occlusionCheck = input[@"occlusionCheck"];
|
|
974
|
+
if([input valueForKey:@"occlusionCheckParams"] != nil)
|
|
975
|
+
result.occlusionCheckParams = [RGLWJSONConstructor occlusionCheckParamsFromJson:[input valueForKey:@"occlusionCheckParams"]];
|
|
974
976
|
}
|
|
975
977
|
|
|
976
978
|
+(NSDictionary*)getImageQA:(RGLImageQA*)input {
|
|
@@ -991,6 +993,7 @@
|
|
|
991
993
|
result[@"glaresCheckParams"] = [RGLWJSONConstructor generateGlaresCheckParams:input.glaresCheckParams];
|
|
992
994
|
result[@"brightnessThreshold"] = input.brightnessThreshold;
|
|
993
995
|
result[@"occlusionCheck"] = input.occlusionCheck;
|
|
996
|
+
result[@"occlusionCheckParams"] = [RGLWJSONConstructor generateOcclusionCheckParams:input.occlusionCheckParams];
|
|
994
997
|
|
|
995
998
|
return result;
|
|
996
999
|
}
|
|
@@ -45,6 +45,8 @@
|
|
|
45
45
|
+(NSDictionary* _Nullable)generateAuthenticityPropertiesParams:(RGLAuthenticityPropertiesParams* _Nullable)input;
|
|
46
46
|
+(RGLGlaresCheckParams* _Nullable)glaresCheckParamsFromJson:(NSDictionary* _Nullable)input;
|
|
47
47
|
+(NSDictionary* _Nullable)generateGlaresCheckParams:(RGLGlaresCheckParams* _Nullable)input;
|
|
48
|
+
+(RGLOcclusionCheckParams* _Nullable)occlusionCheckParamsFromJson:(NSDictionary* _Nullable)input;
|
|
49
|
+
+(NSDictionary* _Nullable)generateOcclusionCheckParams:(RGLOcclusionCheckParams* _Nullable)input;
|
|
48
50
|
+(RGLImageQA* _Nullable)imageQAFromJson:(NSDictionary* _Nullable)input;
|
|
49
51
|
+(NSDictionary* _Nullable)generateImageQA:(RGLImageQA* _Nullable)input;
|
|
50
52
|
+(RGLRFIDParams* _Nullable)rfidParamsFromJson:(NSDictionary* _Nullable)input;
|
|
@@ -507,6 +507,25 @@ static NSMutableArray* weakReferencesHolder;
|
|
|
507
507
|
return result;
|
|
508
508
|
}
|
|
509
509
|
|
|
510
|
+
+(RGLOcclusionCheckParams*)occlusionCheckParamsFromJson:(NSDictionary*)input {
|
|
511
|
+
if(input == nil) return nil;
|
|
512
|
+
RGLOcclusionCheckParams *result = [RGLOcclusionCheckParams new];
|
|
513
|
+
|
|
514
|
+
if([input valueForKey:@"maxOcclusionPart"] != nil)
|
|
515
|
+
result.maxOcclusionPart = [input valueForKey:@"maxOcclusionPart"];
|
|
516
|
+
|
|
517
|
+
return result;
|
|
518
|
+
}
|
|
519
|
+
|
|
520
|
+
+(NSDictionary*)generateOcclusionCheckParams:(RGLOcclusionCheckParams*)input {
|
|
521
|
+
if(input == nil) return nil;
|
|
522
|
+
NSMutableDictionary* result = [NSMutableDictionary new];
|
|
523
|
+
|
|
524
|
+
result[@"maxOcclusionPart"] = input.maxOcclusionPart;
|
|
525
|
+
|
|
526
|
+
return result;
|
|
527
|
+
}
|
|
528
|
+
|
|
510
529
|
+(RGLImageInput*)imageInputFromJson:(NSDictionary*)input {
|
|
511
530
|
if(input == nil) return nil;
|
|
512
531
|
|
package/src/ios/RGLWMain.h
CHANGED
|
@@ -10,8 +10,7 @@ extern UIViewController*_Nonnull(^ _Nonnull RGLWRootViewController)(void);
|
|
|
10
10
|
@interface RGLWMain: NSObject<RGLRecordScanningProcessDelegate,
|
|
11
11
|
RGLDocReaderRFIDDelegate,
|
|
12
12
|
RGLCustomizationActionDelegate,
|
|
13
|
-
RGLDocReaderDatabaseFetchDelegate
|
|
14
|
-
RGLBluetoothDelegate>
|
|
13
|
+
RGLDocReaderDatabaseFetchDelegate>
|
|
15
14
|
|
|
16
15
|
+(void)methodCall:(NSString* _Nonnull)method
|
|
17
16
|
:(NSArray* _Nonnull)args
|
package/src/ios/RGLWMain.m
CHANGED
|
@@ -328,7 +328,7 @@ RGLWCallback savedCallbackForBluetoothResult;
|
|
|
328
328
|
// start searching devices
|
|
329
329
|
if (!bluetooth) {
|
|
330
330
|
bluetooth = [RGLBluetooth new];
|
|
331
|
-
bluetooth.delegate = this;
|
|
331
|
+
bluetooth.delegate = (id<RGLBluetoothDelegate>)this;
|
|
332
332
|
}
|
|
333
333
|
savedCallbackForBluetoothResult = callback;
|
|
334
334
|
[bluetooth connectWithDeviceName:deviceName];
|
package/www/DocumentReader.js
CHANGED
|
@@ -1293,6 +1293,17 @@ class GlaresCheckParams {
|
|
|
1293
1293
|
}
|
|
1294
1294
|
}
|
|
1295
1295
|
|
|
1296
|
+
class OcclusionCheckParams {
|
|
1297
|
+
static fromJson(jsonObject) {
|
|
1298
|
+
if (jsonObject == null) return null
|
|
1299
|
+
const result = new OcclusionCheckParams()
|
|
1300
|
+
|
|
1301
|
+
result.maxOcclusionPart = jsonObject["maxOcclusionPart"]
|
|
1302
|
+
|
|
1303
|
+
return result
|
|
1304
|
+
}
|
|
1305
|
+
}
|
|
1306
|
+
|
|
1296
1307
|
class ImageQA {
|
|
1297
1308
|
static fromJson(jsonObject) {
|
|
1298
1309
|
if (jsonObject == null) return null
|
|
@@ -1303,6 +1314,7 @@ class ImageQA {
|
|
|
1303
1314
|
result.focusCheck = jsonObject["focusCheck"]
|
|
1304
1315
|
result.glaresCheck = jsonObject["glaresCheck"]
|
|
1305
1316
|
result.glaresCheckParams = GlaresCheckParams.fromJson(jsonObject["glaresCheckParams"])
|
|
1317
|
+
result.occlusionCheckParams = OcclusionCheckParams.fromJson(jsonObject["occlusionCheckParams"])
|
|
1306
1318
|
result.colornessCheck = jsonObject["colornessCheck"]
|
|
1307
1319
|
result.screenCapture = jsonObject["screenCapture"]
|
|
1308
1320
|
result.expectedPass = []
|
|
@@ -2577,6 +2589,11 @@ const eRPRM_ResultType = {
|
|
|
2577
2589
|
RPRM_RESULT_TYPE_BSI_XML_V2: 73,
|
|
2578
2590
|
}
|
|
2579
2591
|
|
|
2592
|
+
const CameraTypes = {
|
|
2593
|
+
FRONT: "front",
|
|
2594
|
+
BACK: "back",
|
|
2595
|
+
}
|
|
2596
|
+
|
|
2580
2597
|
const FrameShapeType = {
|
|
2581
2598
|
LINE: 0,
|
|
2582
2599
|
CORNER: 1,
|
|
@@ -2597,6 +2614,9 @@ const eRFID_BaudRate = {
|
|
|
2597
2614
|
rfbr_212: 2,
|
|
2598
2615
|
rfbr_424: 4,
|
|
2599
2616
|
rfbr_848: 8,
|
|
2617
|
+
rfbr_1695: 0x10,
|
|
2618
|
+
rfbr_3390: 0x20,
|
|
2619
|
+
rfbr_6780: 0x40,
|
|
2600
2620
|
}
|
|
2601
2621
|
|
|
2602
2622
|
const LineCap = {
|
|
@@ -2622,7 +2642,6 @@ const DocReaderAction = {
|
|
|
2622
2642
|
PROCESS_WHITE_FLASHLIGHT: 5,
|
|
2623
2643
|
TIMEOUT: 6,
|
|
2624
2644
|
PROCESSING_ON_SERVICE: 7,
|
|
2625
|
-
NOTIFICATION: 101,
|
|
2626
2645
|
PROCESS_WHITE_UV_IMAGES: 102,
|
|
2627
2646
|
PROCESS_IR_FRAME: 103,
|
|
2628
2647
|
}
|
|
@@ -2645,8 +2664,8 @@ const eProcessGLCommands = {
|
|
|
2645
2664
|
}
|
|
2646
2665
|
|
|
2647
2666
|
const eRFIDReadingBufferSize = {
|
|
2648
|
-
STANDARD_LENGTH: 0,
|
|
2649
2667
|
EXTENDED_LENGTH: -1,
|
|
2668
|
+
STANDARD_LENGTH: 0,
|
|
2650
2669
|
}
|
|
2651
2670
|
|
|
2652
2671
|
const PKDResourceType = {
|
|
@@ -2693,6 +2712,13 @@ const eRFID_AuthenticationProcedureType = {
|
|
|
2693
2712
|
aptGeneral: 3,
|
|
2694
2713
|
}
|
|
2695
2714
|
|
|
2715
|
+
const eRFID_AccessControl = {
|
|
2716
|
+
acDefault : 0,
|
|
2717
|
+
acChipAccess_BAC : 1,
|
|
2718
|
+
acChipAccess_PACE : 2,
|
|
2719
|
+
acLocal_PIN : 3,
|
|
2720
|
+
}
|
|
2721
|
+
|
|
2696
2722
|
const DocumentReaderErrorCodes = {
|
|
2697
2723
|
INITIALIZATION_CORE_ABSENT: 0,
|
|
2698
2724
|
INITIALIZATION_FAILED: 1,
|
|
@@ -2830,6 +2856,7 @@ const eRFID_Password_Type = {
|
|
|
2830
2856
|
PPT_PIN_ESIGN: 5,
|
|
2831
2857
|
PPT_SAI: 6,
|
|
2832
2858
|
PPT_MRZ_HASH: 7,
|
|
2859
|
+
PPT_PIN_LOCAL: 8,
|
|
2833
2860
|
}
|
|
2834
2861
|
|
|
2835
2862
|
const ViewContentMode = {
|
|
@@ -2884,6 +2911,8 @@ const BarcodeResult = {
|
|
|
2884
2911
|
}
|
|
2885
2912
|
|
|
2886
2913
|
const eRFID_Application_Type = {
|
|
2914
|
+
AT_UNSPECIFIED: 0,
|
|
2915
|
+
AT_ROOT_FILES: AT_UNSPECIFIED,
|
|
2887
2916
|
ePASSPORT: 1,
|
|
2888
2917
|
eID: 2,
|
|
2889
2918
|
eSIGN: 3,
|
|
@@ -2892,6 +2921,8 @@ const eRFID_Application_Type = {
|
|
|
2892
2921
|
LDS2_VISA_RECORDS: 6,
|
|
2893
2922
|
LDS2_ADD_BIOMETRICS: 7,
|
|
2894
2923
|
eDTC_PC: 8,
|
|
2924
|
+
AT_APPLET_ROOT: 50,
|
|
2925
|
+
AT_USER_DEFINED: 100,
|
|
2895
2926
|
}
|
|
2896
2927
|
|
|
2897
2928
|
const eSignManagementAction = {
|
|
@@ -4845,6 +4876,7 @@ const Enum = {
|
|
|
4845
4876
|
eRFID_CertificateType,
|
|
4846
4877
|
RGLMeasureSystem,
|
|
4847
4878
|
eRPRM_ResultType,
|
|
4879
|
+
CameraTypes,
|
|
4848
4880
|
FrameShapeType,
|
|
4849
4881
|
eMDLDeviceRetrieval,
|
|
4850
4882
|
CustomizationTheme,
|
|
@@ -4856,6 +4888,7 @@ const Enum = {
|
|
|
4856
4888
|
eRFIDReadingBufferSize,
|
|
4857
4889
|
PKDResourceType,
|
|
4858
4890
|
eRFID_AuthenticationProcedureType,
|
|
4891
|
+
eRFID_AccessControl,
|
|
4859
4892
|
DocumentReaderErrorCodes,
|
|
4860
4893
|
ScenarioIdentifier,
|
|
4861
4894
|
eRFID_AccessControl_ProcedureType,
|
|
@@ -5075,6 +5108,7 @@ DocumentReaderPlugin.DocumentReaderResults = DocumentReaderResults
|
|
|
5075
5108
|
DocumentReaderPlugin.CameraSize = CameraSize
|
|
5076
5109
|
DocumentReaderPlugin.Functionality = Functionality
|
|
5077
5110
|
DocumentReaderPlugin.GlaresCheckParams = GlaresCheckParams
|
|
5111
|
+
DocumentReaderPlugin.OcclusionCheckParams = OcclusionCheckParams
|
|
5078
5112
|
DocumentReaderPlugin.ImageQA = ImageQA
|
|
5079
5113
|
DocumentReaderPlugin.RFIDParams = RFIDParams
|
|
5080
5114
|
DocumentReaderPlugin.FaceApiSearchParams = FaceApiSearchParams
|