@regulaforensics/cordova-plugin-document-reader-api 7.6.674-nightly → 8.1.61-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.
@@ -11,6 +11,13 @@
11
11
 
12
12
  @implementation RGLWJSONConstructor
13
13
 
14
+ static NSMutableArray* weakReferencesHolder;
15
+ +(void) holdWeakReference:(id)reference {
16
+ if(!weakReferencesHolder)
17
+ weakReferencesHolder = [NSMutableArray new];
18
+ [weakReferencesHolder addObject:reference];
19
+ }
20
+
14
21
  +(NSString*)dictToString:(NSDictionary*)input {
15
22
  if(input == nil) return nil;
16
23
  return [[NSString alloc] initWithData:[NSJSONSerialization dataWithJSONObject:input options:NSJSONWritingPrettyPrinted error:nil] encoding:NSUTF8StringEncoding];
@@ -104,8 +111,9 @@
104
111
 
105
112
  NSString* transactionId = [input valueForKey:@"transactionId"];
106
113
  NSString* tag = [input valueForKey:@"tag"];
114
+ NSString* sessionLogFolder = input[@"sessionLogFolder"];
107
115
 
108
- return [[RGLTransactionInfo alloc] initWithTag:tag transactionId:transactionId];
116
+ return [[RGLTransactionInfo alloc] initWithTag:tag transactionId:transactionId sessionLogFolder:sessionLogFolder];
109
117
  }
110
118
 
111
119
  +(NSDictionary*)generateTransactionInfo:(RGLTransactionInfo*)input {
@@ -114,6 +122,7 @@
114
122
 
115
123
  result[@"transactionId"] = input.transactionId;
116
124
  result[@"tag"] = input.tag;
125
+ result[@"sessionLogFolder"] = input.sessionLogFolder;
117
126
 
118
127
  return result;
119
128
  }
@@ -349,14 +358,14 @@
349
358
  return [RGLWConfig getDataGroups:input];
350
359
  }
351
360
 
352
- +(RGLDTCDataGroup*)dtcDataGroupsFromJson:(NSDictionary*)input {
361
+ +(RGLDTCDataGroup*)dtcDataGroupFromJson:(NSDictionary*)input {
353
362
  RGLDTCDataGroup *result = [RGLDTCDataGroup new];
354
- [RGLWConfig setDataGroups :result dict:input];
363
+ [RGLWConfig setDTCDataGroup:result dict:input];
355
364
  return result;
356
365
  }
357
366
 
358
- +(NSDictionary*)generateRGLDTCDataGroups:(RGLDTCDataGroup*)input {
359
- return [RGLWConfig getDataGroups:input];
367
+ +(NSDictionary*)generateRGLDTCDataGroup:(RGLDTCDataGroup*)input {
368
+ return [RGLWConfig getDTCDataGroup:input];
360
369
  }
361
370
 
362
371
  +(RGLRFIDScenario*)rfidScenarioFromJson:(NSDictionary*)input {
@@ -406,6 +415,11 @@
406
415
  [RGLWConfig setProcessParams:[input valueForKey:@"processParams"] :params];
407
416
  result.processParams = params;
408
417
  }
418
+ if([input valueForKey:@"requestHeaders"] != nil) {
419
+ RGLWRequestInterceptorProxy* proxy = [[RGLWRequestInterceptorProxy alloc] initWithHeaders:[input valueForKey:@"requestHeaders"]];
420
+ [self holdWeakReference: proxy];
421
+ result.requestInterceptingDelegate = proxy;
422
+ }
409
423
 
410
424
  return result;
411
425
  }
@@ -1684,10 +1698,12 @@
1684
1698
  NSMutableArray<RGLAuthenticityElement*> *array = [NSMutableArray new];
1685
1699
  for(NSDictionary* item in [input valueForKey:@"elements"])
1686
1700
  [array addObject:[self authenticityElementFromJson:item]];
1687
- return [[RGLAuthenticityCheck alloc]
1688
- initWithAuthenticity:[[input valueForKey:@"type"] integerValue]
1689
- elements:array
1690
- pageIndex:[[input valueForKey:@"pageIndex"] integerValue]];
1701
+ RGLAuthenticityCheck* result = [[RGLAuthenticityCheck alloc]
1702
+ initWithAuthenticity:[[input valueForKey:@"type"] integerValue]
1703
+ elements:array
1704
+ pageIndex:[[input valueForKey:@"pageIndex"] integerValue]];
1705
+ if (input[@"status"]) [result setValue:input[@"status"] forKey:@"status"];
1706
+ return result;;
1691
1707
  }
1692
1708
 
1693
1709
  +(NSDictionary*)generateAuthenticityCheck:(RGLAuthenticityCheck*)input {
@@ -1790,8 +1806,10 @@
1790
1806
  NSMutableArray<RGLAuthenticityCheck*> *array = [NSMutableArray new];
1791
1807
  for(NSDictionary* item in [input valueForKey:@"checks"])
1792
1808
  [array addObject:[self authenticityCheckFromJson:item]];
1793
- return [[RGLDocumentReaderAuthenticityResult alloc]
1794
- initWithAuthenticityChecks:array];
1809
+ RGLDocumentReaderAuthenticityResult* result = [[RGLDocumentReaderAuthenticityResult alloc]
1810
+ initWithAuthenticityChecks:array];
1811
+ if (input[@"status"]) [result setValue:input[@"status"] forKey:@"_security"];
1812
+ return result;
1795
1813
  }
1796
1814
 
1797
1815
  +(NSDictionary*)generateDocumentReaderAuthenticityResult:(RGLDocumentReaderAuthenticityResult*)input {
@@ -2336,3 +2354,22 @@
2336
2354
  }
2337
2355
 
2338
2356
  @end
2357
+
2358
+ @implementation RGLWRequestInterceptorProxy {
2359
+ NSDictionary* _headers;
2360
+ }
2361
+
2362
+ - (instancetype)initWithHeaders:(NSDictionary*)headers {
2363
+ self = [super init];
2364
+ _headers = [headers copy];
2365
+ return self;
2366
+ }
2367
+
2368
+ -(NSURLRequest*)interceptorPrepareRequest:(NSURLRequest*)request {
2369
+ NSMutableURLRequest *interceptedRequest = [request mutableCopy];
2370
+ for (NSString* key in _headers.allKeys)
2371
+ [interceptedRequest addValue:[_headers valueForKey:key] forHTTPHeaderField:key];
2372
+ return interceptedRequest;
2373
+ }
2374
+
2375
+ @end
@@ -996,6 +996,7 @@ class OnlineProcessingConfig {
996
996
  result.processParams = ProcessParams.fromJson(jsonObject["processParams"])
997
997
  result.imageFormat = jsonObject["imageFormat"]
998
998
  result.imageCompressionQuality = jsonObject["imageCompressionQuality"]
999
+ result.requestHeaders = jsonObject["requestHeaders"]
999
1000
 
1000
1001
  return result
1001
1002
  }
@@ -1095,6 +1096,7 @@ class TransactionInfo {
1095
1096
 
1096
1097
  result.transactionId = jsonObject["transactionId"]
1097
1098
  result.tag = jsonObject["tag"]
1099
+ result.sessionLogFolder = jsonObject["sessionLogFolder"]
1098
1100
 
1099
1101
  return result
1100
1102
  }
@@ -1179,6 +1181,7 @@ class Functionality {
1179
1181
  result.recordScanningProcess = jsonObject["recordScanningProcess"]
1180
1182
  result.manualMultipageMode = jsonObject["manualMultipageMode"]
1181
1183
  result.singleResult = jsonObject["singleResult"]
1184
+ result.torchTurnedOn = jsonObject["torchTurnedOn"]
1182
1185
  result.showCaptureButtonDelayFromDetect = jsonObject["showCaptureButtonDelayFromDetect"]
1183
1186
  result.showCaptureButtonDelayFromStart = jsonObject["showCaptureButtonDelayFromStart"]
1184
1187
  result.rfidTimeout = jsonObject["rfidTimeout"]
@@ -1232,6 +1235,7 @@ class ImageQA {
1232
1235
  result.expectedPass.push(jsonObject["expectedPass"][i])
1233
1236
  result.documentPositionIndent = jsonObject["documentPositionIndent"]
1234
1237
  result.brightnessThreshold = jsonObject["brightnessThreshold"]
1238
+ result.occlusionCheck = jsonObject["occlusionCheck"]
1235
1239
 
1236
1240
  return result
1237
1241
  }
@@ -1308,6 +1312,8 @@ class LivenessParams {
1308
1312
  result.checkMLI = jsonObject["checkMLI"]
1309
1313
  result.checkHolo = jsonObject["checkHolo"]
1310
1314
  result.checkED = jsonObject["checkED"]
1315
+ result.checkBlackAndWhiteCopy = jsonObject["checkBlackAndWhiteCopy"]
1316
+ result.checkDynaprint = jsonObject["checkDynaprint"]
1311
1317
 
1312
1318
  return result
1313
1319
  }
@@ -1333,6 +1339,7 @@ class AuthenticityParams {
1333
1339
  result.checkPhotoEmbedding = jsonObject["checkPhotoEmbedding"]
1334
1340
  result.checkPhotoComparison = jsonObject["checkPhotoComparison"]
1335
1341
  result.checkLetterScreen = jsonObject["checkLetterScreen"]
1342
+ result.checkSecurityText = jsonObject["checkSecurityText"]
1336
1343
 
1337
1344
  return result
1338
1345
  }
@@ -1378,6 +1385,7 @@ class ProcessParams {
1378
1385
  result.strictBarcodeDigitalSignatureCheck = jsonObject["strictBarcodeDigitalSignatureCheck"]
1379
1386
  result.selectLongestNames = jsonObject["selectLongestNames"]
1380
1387
  result.generateDTCVC = jsonObject["generateDTCVC"]
1388
+ result.strictDLCategoryExpiry = jsonObject["strictDLCategoryExpiry"]
1381
1389
  result.barcodeParserType = jsonObject["barcodeParserType"]
1382
1390
  result.perspectiveAngle = jsonObject["perspectiveAngle"]
1383
1391
  result.minDPI = jsonObject["minDPI"]
@@ -1396,7 +1404,6 @@ class ProcessParams {
1396
1404
  result.dateFormat = jsonObject["dateFormat"]
1397
1405
  result.scenario = jsonObject["scenario"]
1398
1406
  result.captureButtonScenario = jsonObject["captureButtonScenario"]
1399
- result.sessionLogFolder = jsonObject["sessionLogFolder"]
1400
1407
  result.timeout = jsonObject["timeout"]
1401
1408
  result.timeoutFromFirstDetect = jsonObject["timeoutFromFirstDetect"]
1402
1409
  result.timeoutFromFirstDocType = jsonObject["timeoutFromFirstDocType"]
@@ -1670,27 +1677,11 @@ class EIDDataGroups {
1670
1677
  }
1671
1678
  }
1672
1679
 
1673
- class DTCDataGroups {
1680
+ class DTCDataGroup {
1674
1681
  static fromJson(jsonObject) {
1675
1682
  if (jsonObject == null) return null
1676
- const result = new DTCDataGroups()
1683
+ const result = new DTCDataGroup()
1677
1684
 
1678
- result.DG1 = jsonObject["DG1"]
1679
- result.DG2 = jsonObject["DG2"]
1680
- result.DG3 = jsonObject["DG3"]
1681
- result.DG4 = jsonObject["DG4"]
1682
- result.DG5 = jsonObject["DG5"]
1683
- result.DG6 = jsonObject["DG6"]
1684
- result.DG7 = jsonObject["DG7"]
1685
- result.DG8 = jsonObject["DG8"]
1686
- result.DG9 = jsonObject["DG9"]
1687
- result.DG10 = jsonObject["DG10"]
1688
- result.DG11 = jsonObject["DG11"]
1689
- result.DG12 = jsonObject["DG12"]
1690
- result.DG13 = jsonObject["DG13"]
1691
- result.DG14 = jsonObject["DG14"]
1692
- result.DG15 = jsonObject["DG15"]
1693
- result.DG16 = jsonObject["DG16"]
1694
1685
  result.DG17 = jsonObject["DG17"]
1695
1686
  result.DG18 = jsonObject["DG18"]
1696
1687
  result.DG22 = jsonObject["DG22"]
@@ -1742,6 +1733,8 @@ class RFIDScenario {
1742
1733
  result.proceedReadingAlways = jsonObject["proceedReadingAlways"]
1743
1734
  result.readDTC = jsonObject["readDTC"]
1744
1735
  result.mrzStrictCheck = jsonObject["mrzStrictCheck"]
1736
+ result.loadCRLFromRemote = jsonObject["loadCRLFromRemote"]
1737
+ result.independentSODStatus = jsonObject["independentSODStatus"]
1745
1738
  result.readingBuffer = jsonObject["readingBuffer"]
1746
1739
  result.onlineTAToSignDataType = jsonObject["onlineTAToSignDataType"]
1747
1740
  result.defaultReadingBufferSize = jsonObject["defaultReadingBufferSize"]
@@ -1761,7 +1754,7 @@ class RFIDScenario {
1761
1754
  result.eDLDataGroups = EDLDataGroups.fromJson(jsonObject["eDLDataGroups"])
1762
1755
  result.ePassportDataGroups = EPassportDataGroups.fromJson(jsonObject["ePassportDataGroups"])
1763
1756
  result.eIDDataGroups = EIDDataGroups.fromJson(jsonObject["eIDDataGroups"])
1764
- result.dtcDataGroups = DTCDataGroups.fromJson(jsonObject["dtcDataGroups"])
1757
+ result.dtcDataGroups = DTCDataGroup.fromJson(jsonObject["dtcDataGroups"])
1765
1758
 
1766
1759
  return result
1767
1760
  }
@@ -2384,6 +2377,7 @@ const ViewContentMode = {
2384
2377
 
2385
2378
  const BarcodeResult = {
2386
2379
  NO_ERR: 0,
2380
+ INVALID_RESULT: 140,
2387
2381
  NULL_PTR_ERR: -6001,
2388
2382
  BAD_ARG_ERR: -6002,
2389
2383
  SIZE_ERR: -6003,
@@ -2552,6 +2546,7 @@ const eCheckDiagnose = {
2552
2546
  OCR_QUALITY_INVALID_FONT: 221,
2553
2547
  OCR_QUALITY_INVALID_BACKGROUND: 222,
2554
2548
  LAS_INK_INVALID_LINES_FREQUENCY: 230,
2549
+ DOC_LIVENESS_DOCUMENT_NOT_LIVE: 238,
2555
2550
  CHD_DOC_LIVENESS_BLACK_AND_WHITE_COPY_DETECTED: 239,
2556
2551
  DOC_LIVENESS_ELECTRONIC_DEVICE_DETECTED: 240,
2557
2552
  DOC_LIVENESS_INVALID_BARCODE_BACKGROUND: 241,
@@ -2860,6 +2855,7 @@ const eImageQualityCheckType = {
2860
2855
  IQC_PORTRAIT: 7,
2861
2856
  IQC_HANDWRITTEN: 8,
2862
2857
  IQC_BRIGHTNESS: 9,
2858
+ IQC_OCCLUSION: 10,
2863
2859
  }
2864
2860
 
2865
2861
  const MRZFormat = {
@@ -4043,6 +4039,8 @@ const eVisualFieldType = {
4043
4039
  FT_DIGITAL_TRAVEL_AUTHORIZATION_NUMBER: 690,
4044
4040
  FT_DATE_OF_FIRST_POSITIVE_TEST_RESULT: 691,
4045
4041
  FT_EF_CARD_ACCESS: 692,
4042
+ FT_SHORT_FLIGHT_NUMBER: 693,
4043
+ FT_AIRLINE_CODE: 694,
4046
4044
  }
4047
4045
 
4048
4046
  const DocReaderOrientation = {
@@ -4358,7 +4356,7 @@ DocumentReader.setTCCParams = (params, successCallback, errorCallback) => cordov
4358
4356
  DocumentReader.addPKDCertificates = (certificates, successCallback, errorCallback) => cordova.exec(successCallback, errorCallback, "DocumentReader", "exec", ["addPKDCertificates", certificates])
4359
4357
  DocumentReader.clearPKDCertificates = (successCallback, errorCallback) => cordova.exec(successCallback, errorCallback, "DocumentReader", "exec", ["clearPKDCertificates"])
4360
4358
  DocumentReader.startNewSession = (successCallback, errorCallback) => cordova.exec(successCallback, errorCallback, "DocumentReader", "exec", ["startNewSession"])
4361
- DocumentReader.connectBluetoothDevice = (successCallback, errorCallback) => cordova.exec(successCallback, errorCallback, "DocumentReader", "exec", ["connectBluetoothDevice"])
4359
+ DocumentReader.connectBluetoothDevice = (btDeviceName, successCallback, errorCallback) => cordova.exec(successCallback, errorCallback, "DocumentReader", "exec", ["connectBluetoothDevice", btDeviceName])
4362
4360
  DocumentReader.setLocalizationDictionary = (dictionary, successCallback, errorCallback) => cordova.exec(successCallback, errorCallback, "DocumentReader", "exec", ["setLocalizationDictionary", dictionary])
4363
4361
  DocumentReader.getLicense = (successCallback, errorCallback) => cordova.exec(successCallback, errorCallback, "DocumentReader", "exec", ["getLicense"])
4364
4362
  DocumentReader.getAvailableScenarios = (successCallback, errorCallback) => cordova.exec(successCallback, errorCallback, "DocumentReader", "exec", ["getAvailableScenarios"])
@@ -4478,7 +4476,7 @@ DocumentReaderPlugin.Customization = Customization
4478
4476
  DocumentReaderPlugin.EDLDataGroups = EDLDataGroups
4479
4477
  DocumentReaderPlugin.EPassportDataGroups = EPassportDataGroups
4480
4478
  DocumentReaderPlugin.EIDDataGroups = EIDDataGroups
4481
- DocumentReaderPlugin.DTCDataGroups = DTCDataGroups
4479
+ DocumentReaderPlugin.DTCDataGroup = DTCDataGroup
4482
4480
  DocumentReaderPlugin.RFIDScenario = RFIDScenario
4483
4481
  DocumentReaderPlugin.PrepareProgress = PrepareProgress
4484
4482
 
@@ -1,5 +0,0 @@
1
- blank_issues_enabled: false
2
- contact_links:
3
- - name: Submit a request
4
- url: https://support.regulaforensics.com/hc/requests/new?utm_source=github
5
- about: Submit any requests to Regula Support Team