@regulaforensics/cordova-plugin-document-reader-api 9.5.547-rc → 9.5.550-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.
@@ -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.5.547-rc",
17
- "@regulaforensics/cordova-plugin-document-reader-core-fullauthrfid": "9.5.2461-rc",
16
+ "@regulaforensics/cordova-plugin-document-reader-api": "9.5.550-rc",
17
+ "@regulaforensics/cordova-plugin-document-reader-core-fullauthrfid": "9.5.2476-rc",
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": "9.5.547-rc",
3
+ "version": "9.5.550-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.5.547-rc" xmlns="http://apache.org/cordova/ns/plugins/1.0">
2
+ <plugin id="@regulaforensics/cordova-plugin-document-reader-api" version="9.5.550-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/CocoaPods/Specs.git"/>
30
30
  </config>
31
31
  <pods>
32
- <pod name="DocumentReaderStage" spec="9.5.6348" />
32
+ <pod name="DocumentReaderStage" spec="9.5.6354" />
33
33
  </pods>
34
34
  </podspec>
35
35
  </platform>
@@ -51,6 +51,7 @@ fun setFunctionality(config: Functionality, input: JSONObject) = input.forEach {
51
51
  "manualMultipageMode" -> editor.setManualMultipageMode(v as Boolean)
52
52
  "torchTurnedOn" -> editor.setTorchTurnedOn(v as Boolean)
53
53
  "preventScreenRecording" -> editor.setPreventScreenRecording(v as Boolean)
54
+ "hideStatusBar" -> editor.setHideStatusBar(v as Boolean)
54
55
  "showCaptureButtonDelayFromDetect" -> editor.setShowCaptureButtonDelayFromDetect(v.toLong())
55
56
  "showCaptureButtonDelayFromStart" -> editor.setShowCaptureButtonDelayFromStart(v.toLong())
56
57
  "orientation" -> editor.setOrientation(v.toInt())
@@ -88,6 +89,7 @@ fun getFunctionality(input: Functionality) = mapOf(
88
89
  "manualMultipageMode" to input.isManualMultipageMode,
89
90
  "torchTurnedOn" to input.isTorchTurnedOn,
90
91
  "preventScreenRecording" to input.doPreventScreenRecording(),
92
+ "hideStatusBar" to input.doHideStatusBar(),
91
93
  "showCaptureButtonDelayFromDetect" to input.showCaptureButtonDelayFromDetect,
92
94
  "showCaptureButtonDelayFromStart" to input.showCaptureButtonDelayFromStart,
93
95
  "orientation" to input.orientation,
@@ -129,7 +131,6 @@ fun setProcessParams(processParams: ProcessParam, opts: JSONObject) = opts.forEa
129
131
  "updateOCRValidityByGlare" -> processParams.updateOCRValidityByGlare = v as Boolean
130
132
  "noGraphics" -> processParams.noGraphics = v as Boolean
131
133
  "multiDocOnImage" -> processParams.multiDocOnImage = v as Boolean
132
- "forceReadMrzBeforeLocate" -> processParams.forceReadMrzBeforeLocate = v as Boolean
133
134
  "parseBarcodes" -> processParams.parseBarcodes = v as Boolean
134
135
  "shouldReturnPackageForReprocess" -> processParams.shouldReturnPackageForReprocess = v as Boolean
135
136
  "disablePerforationOCR" -> processParams.disablePerforationOCR = v as Boolean
@@ -153,6 +154,7 @@ fun setProcessParams(processParams: ProcessParam, opts: JSONObject) = opts.forEa
153
154
  "strictExpiryDate" -> processParams.strictExpiryDate = v as Boolean
154
155
  "debugSaveBinarySession" -> processParams.debugSaveBinarySession = v as Boolean
155
156
  "checkVDS" -> processParams.checkVDS = v as Boolean
157
+ "strictAgeCheck" -> processParams.strictAgeCheck = v as Boolean
156
158
  "measureSystem" -> processParams.measureSystem = v.toInt()
157
159
  "barcodeParserType" -> processParams.barcodeParserType = v.toInt()
158
160
  "perspectiveAngle" -> processParams.perspectiveAngle = v.toInt()
@@ -222,7 +224,6 @@ fun getProcessParams(processParams: ProcessParam) = mapOf(
222
224
  "updateOCRValidityByGlare" to processParams.updateOCRValidityByGlare,
223
225
  "noGraphics" to processParams.noGraphics,
224
226
  "multiDocOnImage" to processParams.multiDocOnImage,
225
- "forceReadMrzBeforeLocate" to processParams.forceReadMrzBeforeLocate,
226
227
  "parseBarcodes" to processParams.parseBarcodes,
227
228
  "shouldReturnPackageForReprocess" to processParams.shouldReturnPackageForReprocess,
228
229
  "disablePerforationOCR" to processParams.disablePerforationOCR,
@@ -246,6 +247,7 @@ fun getProcessParams(processParams: ProcessParam) = mapOf(
246
247
  "strictExpiryDate" to processParams.strictExpiryDate,
247
248
  "debugSaveBinarySession" to processParams.debugSaveBinarySession,
248
249
  "checkVDS" to processParams.checkVDS,
250
+ "strictAgeCheck" to processParams.strictAgeCheck,
249
251
  "measureSystem" to processParams.measureSystem,
250
252
  "barcodeParserType" to processParams.barcodeParserType,
251
253
  "perspectiveAngle" to processParams.perspectiveAngle,
@@ -753,6 +755,7 @@ fun setLivenessParams(input: LivenessParams, opts: JSONObject) = opts.forEach {
753
755
  "checkBlackAndWhiteCopy" -> input.checkBlackAndWhiteCopy = v as Boolean
754
756
  "checkDynaprint" -> input.checkDynaprint = v as Boolean
755
757
  "checkGeometry" -> input.checkGeometry = v as Boolean
758
+ "checkBarcodeBackground" -> input.checkBarcodeBackground = v as Boolean
756
759
  }
757
760
  }
758
761
 
@@ -765,6 +768,7 @@ fun getLivenessParams(input: LivenessParams?) = input?.let {
765
768
  "checkBlackAndWhiteCopy" to input.checkBlackAndWhiteCopy,
766
769
  "checkDynaprint" to input.checkDynaprint,
767
770
  "checkGeometry" to input.checkGeometry,
771
+ "checkBarcodeBackground" to input.checkBarcodeBackground,
768
772
  ).toJson()
769
773
  }
770
774
 
@@ -273,6 +273,12 @@ fun recognizeConfigFromJSON(input: JSONObject) = input.let {
273
273
  for (i in images.indices) images[i] = base64Images.getString(i).toBitmap()
274
274
  builder.setBitmaps(images)
275
275
  }
276
+ if (it.has("dataList")) {
277
+ val array = it.getJSONArray("dataList")
278
+ val dataList = mutableListOf<ByteArray>()
279
+ for (i in 0..< array.length()) dataList.add(array.getString(i).toByteArray()!!)
280
+ builder.setData(dataList)
281
+ }
276
282
  if (it.has("imageInputData")) {
277
283
  val base64InputData = it.getJSONArray("imageInputData")
278
284
  val inputData = arrayOfNulls<ImageInputData>(base64InputData.length())
@@ -291,14 +297,8 @@ fun generateRecognizeConfig(input: RecognizeConfig?) = input?.let {
291
297
  "livePortrait" to it.livePortrait.toBase64(),
292
298
  "extPortrait" to it.extPortrait.toBase64(),
293
299
  "image" to it.bitmap.toBase64(),
294
- "data" to it.data.toBase64(),
295
- "images" to
296
- if (it.bitmaps == null) null
297
- else {
298
- val array = JSONArray()
299
- for (bitmap in it.bitmaps!!) array.put(bitmap.toBase64())
300
- array
301
- },
300
+ "images" to it.bitmaps?.map { bp -> bp.toBase64() }?.toJson(),
301
+ "dataList" to it.data?.map { bp -> bp.toBase64() }?.toJson(),
302
302
  "imageInputData" to it.imageInputData.toJson(::generateImageInputData)
303
303
  ).toJson()
304
304
  }
@@ -6,7 +6,7 @@ repositories {
6
6
 
7
7
  dependencies {
8
8
  //noinspection GradleDependency
9
- implementation ('com.regula.documentreader:api:9.4.12852'){
9
+ implementation ('com.regula.documentreader:api:9.5.12856'){
10
10
  transitive = true
11
11
  }
12
12
  }
@@ -163,8 +163,6 @@
163
163
  processParams.noGraphics = [options valueForKey:@"noGraphics"];
164
164
  if([options valueForKey:@"multiDocOnImage"] != nil)
165
165
  processParams.multiDocOnImage = [options valueForKey:@"multiDocOnImage"];
166
- if([options valueForKey:@"forceReadMrzBeforeLocate"] != nil)
167
- processParams.forceReadMrzBeforeLocate = [options valueForKey:@"forceReadMrzBeforeLocate"];
168
166
  if([options valueForKey:@"parseBarcodes"] != nil)
169
167
  processParams.parseBarcodes = [options valueForKey:@"parseBarcodes"];
170
168
  if([options valueForKey:@"shouldReturnPackageForReprocess"] != nil)
@@ -197,6 +195,7 @@
197
195
  if (options[@"strictExpiryDate"]) processParams.strictExpiryDate = options[@"strictExpiryDate"];
198
196
  if (options[@"debugSaveBinarySession"]) processParams.debugSaveBinarySession = options[@"debugSaveBinarySession"];
199
197
  if (options[@"checkVDS"]) processParams.checkVDS = options[@"checkVDS"];
198
+ if (options[@"strictAgeCheck"]) processParams.strictAgeCheck = options[@"strictAgeCheck"];
200
199
 
201
200
  // Int
202
201
  if([options valueForKey:@"measureSystem"] != nil)
@@ -308,7 +307,6 @@
308
307
  result[@"updateOCRValidityByGlare"] = processParams.updateOCRValidityByGlare;
309
308
  result[@"noGraphics"] = processParams.noGraphics;
310
309
  result[@"multiDocOnImage"] = processParams.multiDocOnImage;
311
- result[@"forceReadMrzBeforeLocate"] = processParams.forceReadMrzBeforeLocate;
312
310
  result[@"parseBarcodes"] = processParams.parseBarcodes;
313
311
  result[@"shouldReturnPackageForReprocess"] = processParams.shouldReturnPackageForReprocess;
314
312
  result[@"disablePerforationOCR"] = processParams.disablePerforationOCR;
@@ -332,6 +330,7 @@
332
330
  result[@"strictExpiryDate"] = processParams.strictExpiryDate;
333
331
  result[@"debugSaveBinarySession"] = processParams.debugSaveBinarySession;
334
332
  result[@"checkVDS"] = processParams.checkVDS;
333
+ result[@"strictAgeCheck"] = processParams.strictAgeCheck;
335
334
 
336
335
  // Int
337
336
  result[@"measureSystem"] = [NSNumber numberWithInteger:processParams.measureSystem];
@@ -1065,6 +1064,7 @@
1065
1064
  if(input[@"checkBlackAndWhiteCopy"]) result.checkBlackAndWhiteCopy = input[@"checkBlackAndWhiteCopy"];
1066
1065
  if(input[@"checkDynaprint"]) result.checkDynaprint = input[@"checkDynaprint"];
1067
1066
  if(input[@"checkGeometry"]) result.checkGeometry = input[@"checkGeometry"];
1067
+ if(input[@"checkBarcodeBackground"]) result.checkBarcodeBackground = input[@"checkBarcodeBackground"];
1068
1068
  }
1069
1069
 
1070
1070
  +(NSDictionary*)getLivenessParams:(RGLLivenessParams*)input {
@@ -1078,6 +1078,7 @@
1078
1078
  result[@"checkBlackAndWhiteCopy"] = input.checkBlackAndWhiteCopy;
1079
1079
  result[@"checkDynaprint"] = input.checkDynaprint;
1080
1080
  result[@"checkGeometry"] = input.checkGeometry;
1081
+ result[@"checkBarcodeBackground"] = input.checkBarcodeBackground;
1081
1082
 
1082
1083
  return result;
1083
1084
  }
@@ -227,10 +227,16 @@ static NSMutableArray* weakReferencesHolder;
227
227
  if (input[@"image"]) config.image = [RGLWJSONConstructor imageWithBase64:input[@"image"]];
228
228
  if (input[@"data"]) config.imageData = [RGLWJSONConstructor base64Decode:input[@"data"]];
229
229
  if (input[@"images"]) {
230
- NSMutableArray<UIImage*>* images = [NSMutableArray new];
231
- for(NSString* base64 in input[@"images"])
232
- [images addObject:[RGLWJSONConstructor imageWithBase64:base64]];
233
- config.images = images;
230
+ NSMutableArray<UIImage*>* list = [NSMutableArray new];
231
+ for(NSString* item in input[@"images"])
232
+ [list addObject:[RGLWJSONConstructor imageWithBase64:item]];
233
+ config.images = list;
234
+ }
235
+ if (input[@"dataList"]) {
236
+ NSMutableArray<NSData*>* list = [NSMutableArray new];
237
+ for(NSString* item in input[@"dataList"])
238
+ [list addObject:[RGLWJSONConstructor base64Decode:item]];
239
+ config.imageDataArray = list;
234
240
  }
235
241
  if(input[@"imageInputData"]) {
236
242
  NSMutableArray<RGLImageInput*>* imageInputs = [NSMutableArray new];
@@ -261,10 +267,16 @@ static NSMutableArray* weakReferencesHolder;
261
267
  result[@"image"] = [self base64WithImage: input.image];
262
268
  result[@"data"] = [self base64Encode: input.imageData];
263
269
  if(input.images != nil) {
264
- NSMutableArray *array = [NSMutableArray new];
270
+ NSMutableArray *list = [NSMutableArray new];
265
271
  for(UIImage* item in input.images)
266
- [array addObject:[self base64WithImage:item]];
267
- result[@"images"] = array;
272
+ [list addObject:[self base64WithImage:item]];
273
+ result[@"images"] = list;
274
+ }
275
+ if(input.imageDataArray != nil) {
276
+ NSMutableArray *list = [NSMutableArray new];
277
+ for(NSData* item in input.imageDataArray)
278
+ [list addObject:[self base64Encode:item]];
279
+ result[@"dataList"] = list;
268
280
  }
269
281
  if(input.imageInputs != nil) {
270
282
  NSMutableArray *array = [NSMutableArray new];
@@ -1115,6 +1115,10 @@ class RecognizeConfig {
1115
1115
  if (jsonObject["images"] != null)
1116
1116
  for (const i in jsonObject["images"])
1117
1117
  result.images.push(jsonObject["images"][i])
1118
+ result.dataList = []
1119
+ if (jsonObject["dataList"] != null)
1120
+ for (const i in jsonObject["dataList"])
1121
+ result.dataList.push(jsonObject["dataList"][i])
1118
1122
  result.imageInputData = []
1119
1123
  if (jsonObject["imageInputData"] != null)
1120
1124
  for (const i in jsonObject["imageInputData"])
@@ -1251,6 +1255,7 @@ class Functionality {
1251
1255
  result.torchTurnedOn = jsonObject["torchTurnedOn"]
1252
1256
  result.preventScreenRecording = jsonObject["preventScreenRecording"]
1253
1257
  result.homeIndicatorAutoHide = jsonObject["homeIndicatorAutoHide"]
1258
+ result.hideStatusBar = jsonObject["hideStatusBar"]
1254
1259
  result.showCaptureButtonDelayFromDetect = jsonObject["showCaptureButtonDelayFromDetect"]
1255
1260
  result.showCaptureButtonDelayFromStart = jsonObject["showCaptureButtonDelayFromStart"]
1256
1261
  result.rfidTimeout = jsonObject["rfidTimeout"]
@@ -1398,6 +1403,7 @@ class LivenessParams {
1398
1403
  result.checkBlackAndWhiteCopy = jsonObject["checkBlackAndWhiteCopy"]
1399
1404
  result.checkDynaprint = jsonObject["checkDynaprint"]
1400
1405
  result.checkGeometry = jsonObject["checkGeometry"]
1406
+ result.checkBarcodeBackground = jsonObject["checkBarcodeBackground"]
1401
1407
 
1402
1408
  return result
1403
1409
  }
@@ -1455,7 +1461,6 @@ class ProcessParams {
1455
1461
  result.updateOCRValidityByGlare = jsonObject["updateOCRValidityByGlare"]
1456
1462
  result.noGraphics = jsonObject["noGraphics"]
1457
1463
  result.multiDocOnImage = jsonObject["multiDocOnImage"]
1458
- result.forceReadMrzBeforeLocate = jsonObject["forceReadMrzBeforeLocate"]
1459
1464
  result.parseBarcodes = jsonObject["parseBarcodes"]
1460
1465
  result.shouldReturnPackageForReprocess = jsonObject["shouldReturnPackageForReprocess"]
1461
1466
  result.disablePerforationOCR = jsonObject["disablePerforationOCR"]
@@ -1478,6 +1483,7 @@ class ProcessParams {
1478
1483
  result.strictExpiryDate = jsonObject["strictExpiryDate"]
1479
1484
  result.debugSaveBinarySession = jsonObject["debugSaveBinarySession"]
1480
1485
  result.checkVDS = jsonObject["checkVDS"]
1486
+ result.strictAgeCheck = jsonObject["strictAgeCheck"]
1481
1487
  result.barcodeParserType = jsonObject["barcodeParserType"]
1482
1488
  result.perspectiveAngle = jsonObject["perspectiveAngle"]
1483
1489
  result.minDPI = jsonObject["minDPI"]