@regulaforensics/react-native-document-reader-api 6.6.0 → 6.7.1

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/index.js CHANGED
@@ -176,6 +176,8 @@ export class DocumentReaderTextField {
176
176
  if (jsonObject["validityList"] != null)
177
177
  for (const i in jsonObject["validityList"])
178
178
  result.validityList.push(DocumentReaderValidity.fromJson(jsonObject["validityList"][i]))
179
+ result.comparisonStatus = jsonObject["comparisonStatus"]
180
+ result.validityStatus = jsonObject["validityStatus"]
179
181
 
180
182
  return result
181
183
  }
@@ -300,8 +302,10 @@ export class DocumentReaderNotification {
300
302
  const result = new DocumentReaderNotification()
301
303
 
302
304
  result.code = jsonObject["code"]
303
- result.attachment = jsonObject["attachment"]
304
305
  result.value = jsonObject["value"]
306
+ result.notificationCode = jsonObject["notificationCode"]
307
+ result.dataFileType = jsonObject["dataFileType"]
308
+ result.progress = jsonObject["progress"]
305
309
 
306
310
  return result
307
311
  }
@@ -1013,7 +1017,131 @@ export class DocumentReaderValidity {
1013
1017
  }
1014
1018
 
1015
1019
  export class DocumentReaderResults {
1016
- getTextFieldValueByType({ fieldType, lcid = 0, source = -1, original = false }) {
1020
+ constructor() {
1021
+ // temporary fix, otherwise rawResult can't be accessed in textFieldValueByType
1022
+ // soon all classes will be rewritten to use constructors
1023
+ this.rawResult = ""
1024
+ }
1025
+
1026
+ textFieldValueByType(fieldType, successCallback, errorCallback) {
1027
+ RNRegulaDocumentReader.exec("DocumentReader", "textFieldValueByType", [this.rawResult, fieldType], successCallback, errorCallback)
1028
+ }
1029
+
1030
+ textFieldValueByTypeLcid(fieldType, lcid, successCallback, errorCallback) {
1031
+ RNRegulaDocumentReader.exec("DocumentReader", "textFieldValueByTypeLcid", [this.rawResult, fieldType, lcid], successCallback, errorCallback)
1032
+ }
1033
+
1034
+ textFieldValueByTypeSource(fieldType, source, successCallback, errorCallback) {
1035
+ RNRegulaDocumentReader.exec("DocumentReader", "textFieldValueByTypeSource", [this.rawResult, fieldType, source], successCallback, errorCallback)
1036
+ }
1037
+
1038
+ textFieldValueByTypeLcidSource(fieldType, lcid, source, successCallback, errorCallback) {
1039
+ RNRegulaDocumentReader.exec("DocumentReader", "textFieldValueByTypeLcidSource", [this.rawResult, fieldType, lcid, source], successCallback, errorCallback)
1040
+ }
1041
+
1042
+ textFieldValueByTypeSourceOriginal(fieldType, source, original, successCallback, errorCallback) {
1043
+ RNRegulaDocumentReader.exec("DocumentReader", "textFieldValueByTypeSourceOriginal", [this.rawResult, fieldType, source, original], successCallback, errorCallback)
1044
+ }
1045
+
1046
+ textFieldValueByTypeLcidSourceOriginal(fieldType, lcid, source, original, successCallback, errorCallback) {
1047
+ RNRegulaDocumentReader.exec("DocumentReader", "textFieldValueByTypeLcidSourceOriginal", [this.rawResult, fieldType, lcid, source, original], successCallback, errorCallback)
1048
+ }
1049
+
1050
+ textFieldByType(fieldType, successCallback, errorCallback) {
1051
+ RNRegulaDocumentReader.exec("DocumentReader", "textFieldByType", [this.rawResult, fieldType], successCallback, errorCallback)
1052
+ }
1053
+
1054
+ textFieldByTypeLcid(fieldType, lcid, successCallback, errorCallback) {
1055
+ RNRegulaDocumentReader.exec("DocumentReader", "textFieldByTypeLcid", [this.rawResult, fieldType, lcid], successCallback, errorCallback)
1056
+ }
1057
+
1058
+ graphicFieldByTypeSource(fieldType, source, successCallback, errorCallback) {
1059
+ RNRegulaDocumentReader.exec("DocumentReader", "graphicFieldByTypeSource", [this.rawResult, fieldType, source], successCallback, errorCallback)
1060
+ }
1061
+
1062
+ graphicFieldByTypeSourcePageIndex(fieldType, source, pageIndex, successCallback, errorCallback) {
1063
+ RNRegulaDocumentReader.exec("DocumentReader", "graphicFieldByTypeSourcePageIndex", [this.rawResult, fieldType, source, pageIndex], successCallback, errorCallback)
1064
+ }
1065
+
1066
+ graphicFieldByTypeSourcePageIndexLight(fieldType, source, pageIndex, light, successCallback, errorCallback) {
1067
+ RNRegulaDocumentReader.exec("DocumentReader", "graphicFieldByTypeSourcePageIndex", [this.rawResult, fieldType, source, pageIndex, light], successCallback, errorCallback)
1068
+ }
1069
+
1070
+ graphicFieldImageByType(fieldType, successCallback, errorCallback) {
1071
+ RNRegulaDocumentReader.exec("DocumentReader", "graphicFieldImageByType", [this.rawResult, fieldType], successCallback, errorCallback)
1072
+ }
1073
+
1074
+ graphicFieldImageByTypeSource(fieldType, source, successCallback, errorCallback) {
1075
+ RNRegulaDocumentReader.exec("DocumentReader", "graphicFieldImageByTypeSource", [this.rawResult, fieldType, source], successCallback, errorCallback)
1076
+ }
1077
+
1078
+ graphicFieldImageByTypeSourcePageIndex(fieldType, source, pageIndex, successCallback, errorCallback) {
1079
+ RNRegulaDocumentReader.exec("DocumentReader", "graphicFieldImageByTypeSourcePageIndex", [this.rawResult, fieldType, source, pageIndex], successCallback, errorCallback)
1080
+ }
1081
+
1082
+ graphicFieldImageByTypeSourcePageIndexLight(fieldType, source, pageIndex, light, successCallback, errorCallback) {
1083
+ RNRegulaDocumentReader.exec("DocumentReader", "graphicFieldImageByTypeSourcePageIndexLight", [this.rawResult, fieldType, source, pageIndex, light], successCallback, errorCallback)
1084
+ }
1085
+
1086
+ containers(resultType, successCallback, errorCallback) {
1087
+ RNRegulaDocumentReader.exec("DocumentReader", "containers", [this.rawResult, resultType], successCallback, errorCallback)
1088
+ }
1089
+
1090
+ encryptedContainers(successCallback, errorCallback) {
1091
+ RNRegulaDocumentReader.exec("DocumentReader", "encryptedContainers", [this.rawResult], successCallback, errorCallback)
1092
+ }
1093
+
1094
+ static fromJson(jsonObject) {
1095
+ if (jsonObject == null) return null
1096
+ const result = new DocumentReaderResults()
1097
+
1098
+ result.videoCaptureSessionId = jsonObject["videoCaptureSessionId"]
1099
+ result.chipPage = jsonObject["chipPage"]
1100
+ result.irElapsedTime = jsonObject["irElapsedTime"]
1101
+ result.processingFinishedStatus = jsonObject["processingFinishedStatus"]
1102
+ result.elapsedTime = jsonObject["elapsedTime"]
1103
+ result.elapsedTimeRFID = jsonObject["elapsedTimeRFID"]
1104
+ result.morePagesAvailable = jsonObject["morePagesAvailable"]
1105
+ result.rfidResult = jsonObject["rfidResult"]
1106
+ result.highResolution = jsonObject["highResolution"]
1107
+ result.graphicResult = DocumentReaderGraphicResult.fromJson(jsonObject["graphicResult"])
1108
+ result.textResult = DocumentReaderTextResult.fromJson(jsonObject["textResult"])
1109
+ result.documentPosition = []
1110
+ if (jsonObject["documentPosition"] != null)
1111
+ for (const i in jsonObject["documentPosition"])
1112
+ result.documentPosition.push(ElementPosition.fromJson(jsonObject["documentPosition"][i]))
1113
+ result.barcodePosition = []
1114
+ if (jsonObject["barcodePosition"] != null)
1115
+ for (const i in jsonObject["barcodePosition"])
1116
+ result.barcodePosition.push(ElementPosition.fromJson(jsonObject["barcodePosition"][i]))
1117
+ result.mrzPosition = []
1118
+ if (jsonObject["mrzPosition"] != null)
1119
+ for (const i in jsonObject["mrzPosition"])
1120
+ result.mrzPosition.push(ElementPosition.fromJson(jsonObject["mrzPosition"][i]))
1121
+ result.imageQuality = []
1122
+ if (jsonObject["imageQuality"] != null)
1123
+ for (const i in jsonObject["imageQuality"])
1124
+ result.imageQuality.push(ImageQualityGroup.fromJson(jsonObject["imageQuality"][i]))
1125
+ result.rawResult = jsonObject["rawResult"]
1126
+ result.documentReaderNotification = DocumentReaderNotification.fromJson(jsonObject["documentReaderNotification"])
1127
+ result.rfidSessionData = RFIDSessionData.fromJson(jsonObject["rfidSessionData"])
1128
+ result.authenticityResult = DocumentReaderAuthenticityResult.fromJson(jsonObject["authenticityResult"])
1129
+ result.barcodeResult = DocumentReaderBarcodeResult.fromJson(jsonObject["barcodeResult"])
1130
+ result.ppmIn = jsonObject["ppmIn"]
1131
+ result.documentType = []
1132
+ if (jsonObject["documentType"] != null)
1133
+ for (const i in jsonObject["documentType"])
1134
+ result.documentType.push(DocumentReaderDocumentType.fromJson(jsonObject["documentType"][i]))
1135
+ result.status = DocumentReaderResultsStatus.fromJson(jsonObject["status"])
1136
+ result.vdsncData = VDSNCData.fromJson(jsonObject["vdsncData"])
1137
+
1138
+ return result
1139
+ }
1140
+
1141
+ /**
1142
+ * @deprecated Use textFieldValueBy...()
1143
+ */
1144
+ getTextFieldValueByType({ fieldType, lcid = 0, source = -1, original = false }) {
1017
1145
  if (this.textResult == null) return null
1018
1146
  const field = this.findByTypeAndLcid(fieldType, lcid)
1019
1147
  if (field == null) return null
@@ -1022,12 +1150,18 @@ export class DocumentReaderResults {
1022
1150
  return original ? value.originalValue : value.value
1023
1151
  }
1024
1152
 
1153
+ /**
1154
+ * @deprecated
1155
+ */
1025
1156
  getTextFieldStatusByType(fieldType, lcid = 0) {
1026
1157
  if (this.textResult == null) return 0
1027
1158
  const field = this.findByTypeAndLcid(fieldType, lcid)
1028
1159
  return field != null ? field.status : 0
1029
1160
  }
1030
1161
 
1162
+ /**
1163
+ * @deprecated Use graphicFieldImageBy...()
1164
+ */
1031
1165
  getGraphicFieldImageByType({ fieldType, source = -1, pageIndex = -1, light = -1 }) {
1032
1166
  if (this.graphicResult == null) return null
1033
1167
  const foundFields = []
@@ -1051,6 +1185,9 @@ export class DocumentReaderResults {
1051
1185
  return foundFields[0].value
1052
1186
  }
1053
1187
 
1188
+ /**
1189
+ * @deprecated
1190
+ */
1054
1191
  getQualityResult(imageQualityCheckType, securityFeature = -1, pageIndex = 0) {
1055
1192
  let resultSum = 2
1056
1193
  if (this.imageQuality == null) return resultSum
@@ -1080,6 +1217,9 @@ export class DocumentReaderResults {
1080
1217
  return resultSum
1081
1218
  }
1082
1219
 
1220
+ /**
1221
+ * @deprecated
1222
+ */
1083
1223
  findByTypeAndLcid(type, lcid) {
1084
1224
  let field
1085
1225
  const foundFields = []
@@ -1103,6 +1243,9 @@ export class DocumentReaderResults {
1103
1243
  return foundField
1104
1244
  }
1105
1245
 
1246
+ /**
1247
+ * @deprecated
1248
+ */
1106
1249
  findBySource(field, sourceType) {
1107
1250
  let value
1108
1251
  if (sourceType === -1) {
@@ -1122,6 +1265,9 @@ export class DocumentReaderResults {
1122
1265
  return null
1123
1266
  }
1124
1267
 
1268
+ /**
1269
+ * @deprecated Use containers()
1270
+ */
1125
1271
  getContainers(resultTypes) {
1126
1272
  try {
1127
1273
  const json = JSON.parse(this.rawResult)
@@ -1148,6 +1294,9 @@ export class DocumentReaderResults {
1148
1294
  }
1149
1295
  }
1150
1296
 
1297
+ /**
1298
+ * @deprecated Use encryptedContainers()
1299
+ */
1151
1300
  getEncryptedContainers() {
1152
1301
  return this.getContainers([
1153
1302
  eRPRM_ResultType.RPRM_RESULT_TYPE_INTERNAL_RFID_SESSION,
@@ -1155,50 +1304,6 @@ export class DocumentReaderResults {
1155
1304
  eRPRM_ResultType.RPRM_RESULT_TYPE_INTERNAL_LICENSE
1156
1305
  ])
1157
1306
  }
1158
-
1159
- static fromJson(jsonObject) {
1160
- if (jsonObject == null) return null
1161
- const result = new DocumentReaderResults()
1162
-
1163
- result.chipPage = jsonObject["chipPage"]
1164
- result.processingFinishedStatus = jsonObject["processingFinishedStatus"]
1165
- result.elapsedTime = jsonObject["elapsedTime"]
1166
- result.elapsedTimeRFID = jsonObject["elapsedTimeRFID"]
1167
- result.morePagesAvailable = jsonObject["morePagesAvailable"]
1168
- result.rfidResult = jsonObject["rfidResult"]
1169
- result.highResolution = jsonObject["highResolution"]
1170
- result.graphicResult = DocumentReaderGraphicResult.fromJson(jsonObject["graphicResult"])
1171
- result.textResult = DocumentReaderTextResult.fromJson(jsonObject["textResult"])
1172
- result.documentPosition = []
1173
- if (jsonObject["documentPosition"] != null)
1174
- for (const i in jsonObject["documentPosition"])
1175
- result.documentPosition.push(ElementPosition.fromJson(jsonObject["documentPosition"][i]))
1176
- result.barcodePosition = []
1177
- if (jsonObject["barcodePosition"] != null)
1178
- for (const i in jsonObject["barcodePosition"])
1179
- result.barcodePosition.push(ElementPosition.fromJson(jsonObject["barcodePosition"][i]))
1180
- result.mrzPosition = []
1181
- if (jsonObject["mrzPosition"] != null)
1182
- for (const i in jsonObject["mrzPosition"])
1183
- result.mrzPosition.push(ElementPosition.fromJson(jsonObject["mrzPosition"][i]))
1184
- result.imageQuality = []
1185
- if (jsonObject["imageQuality"] != null)
1186
- for (const i in jsonObject["imageQuality"])
1187
- result.imageQuality.push(ImageQualityGroup.fromJson(jsonObject["imageQuality"][i]))
1188
- result.rawResult = jsonObject["rawResult"]
1189
- result.documentReaderNotification = DocumentReaderNotification.fromJson(jsonObject["documentReaderNotification"])
1190
- result.rfidSessionData = RFIDSessionData.fromJson(jsonObject["rfidSessionData"])
1191
- result.authenticityResult = DocumentReaderAuthenticityResult.fromJson(jsonObject["authenticityResult"])
1192
- result.barcodeResult = DocumentReaderBarcodeResult.fromJson(jsonObject["barcodeResult"])
1193
- result.documentType = []
1194
- if (jsonObject["documentType"] != null)
1195
- for (const i in jsonObject["documentType"])
1196
- result.documentType.push(DocumentReaderDocumentType.fromJson(jsonObject["documentType"][i]))
1197
- result.status = DocumentReaderResultsStatus.fromJson(jsonObject["status"])
1198
- result.vdsncData = VDSNCData.fromJson(jsonObject["vdsncData"])
1199
-
1200
- return result
1201
- }
1202
1307
  }
1203
1308
 
1204
1309
  // Enum
@@ -2020,6 +2125,7 @@ export const eRPRM_ResultType = {
2020
2125
  RPRM_RESULT_TYPE_INTERNAL_RFID_SESSION: 48,
2021
2126
  RPRM_RESULT_TYPE_INTERNAL_ENCRYPTED_RCL: 49,
2022
2127
  RPRM_RESULT_TYPE_INTERNAL_LICENSE: 50,
2128
+ RPRM_RESULT_TYPE_TEXT: 36,
2023
2129
  RPRM_RESULT_TYPE_IMAGES: 37,
2024
2130
  RPRM_RESULT_TYPE_HOLO_PARAMS: 47,
2025
2131
  RPRM_RESULT_TYPE_DOCUMENT_POSITION: 85,
@@ -2060,17 +2166,17 @@ export const eRPRM_FieldVerificationResult = {
2060
2166
  }
2061
2167
 
2062
2168
  export const DocReaderAction = {
2063
- COMPLETE: 1,
2064
- PROCESS: 0,
2065
- CANCEL: 2,
2066
- ERROR: 3,
2067
- NOTIFICATION: 5,
2068
- PROCESS_WHITE_UV_IMAGES: 6,
2069
- PROCESS_WHITE_FLASHLIGHT: 7,
2070
- MORE_PAGES_AVAILABLE: 8,
2071
- PROCESS_IR_FRAME: 9,
2072
- TIMEOUT: 10,
2073
- PROCESSING_ON_SERVICE: 11,
2169
+ COMPLETE: 0,
2170
+ PROCESS: 1,
2171
+ MORE_PAGES_AVAILABLE: 2,
2172
+ CANCEL: 3,
2173
+ ERROR: 4,
2174
+ PROCESS_WHITE_FLASHLIGHT: 5,
2175
+ TIMEOUT: 6,
2176
+ PROCESSING_ON_SERVICE: 7,
2177
+ NOTIFICATION: 101,
2178
+ PROCESS_WHITE_UV_IMAGES: 102,
2179
+ PROCESS_IR_FRAME: 103,
2074
2180
  }
2075
2181
 
2076
2182
  export const eProcessGLCommands = {
@@ -2361,6 +2467,13 @@ export const RFIDDelegate = {
2361
2467
  FULL: 2,
2362
2468
  }
2363
2469
 
2470
+ export const TextProcessing = {
2471
+ ocNoChange: 0,
2472
+ ocUppercase: 1,
2473
+ ocLowercase: 2,
2474
+ ocCapital: 3,
2475
+ }
2476
+
2364
2477
  export const ProcessingFinishedStatus = {
2365
2478
  NOT_READY: 0,
2366
2479
  READY: 1,
@@ -3060,6 +3173,31 @@ export const eImageQualityCheckType = {
3060
3173
  IQC_SCREEN_CAPTURE: 6,
3061
3174
  IQC_PORTRAIT: 7,
3062
3175
  IQC_HANDWRITTEN: 8,
3176
+
3177
+ getTranslation: function (value) {
3178
+ switch (value) {
3179
+ case this.IQC_IMAGE_GLARES:
3180
+ return "Glares"
3181
+ case this.IQC_IMAGE_FOCUS:
3182
+ return "Focus"
3183
+ case this.IQC_IMAGE_RESOLUTION:
3184
+ return "Resolution"
3185
+ case this.IQC_IMAGE_COLORNESS:
3186
+ return "Color"
3187
+ case this.IQC_PERSPECTIVE:
3188
+ return "Perspective angle"
3189
+ case this.IQC_BOUNDS:
3190
+ return "Bounds"
3191
+ case this.IQC_SCREEN_CAPTURE:
3192
+ return "Moire pattern"
3193
+ case this.IQC_PORTRAIT:
3194
+ return "Portrait"
3195
+ case this.IQC_HANDWRITTEN:
3196
+ return "Handwritten"
3197
+ default:
3198
+ return value
3199
+ }
3200
+ }
3063
3201
  }
3064
3202
 
3065
3203
  export const MRZFormat = {
@@ -3468,6 +3606,10 @@ export const eGraphicFieldType = {
3468
3606
  }
3469
3607
  }
3470
3608
 
3609
+ export const RegDeviceConfigType = {
3610
+ DEVICE_7310: 1,
3611
+ }
3612
+
3471
3613
  export const CameraMode = {
3472
3614
  AUTO: 0,
3473
3615
  CAMERA1: 1,
@@ -3614,7 +3756,7 @@ export const eRFID_DataFile_Type = {
3614
3756
  case this.DFT_PASSPORT_DG5:
3615
3757
  return "Portrait(s) (DG5)"
3616
3758
  case this.DFT_ID_DG5:
3617
- return "Surname/given name at birth" + " (DG5)"
3759
+ return "Family name" + " (DG5)"
3618
3760
  case this.DFT_DL_DG5:
3619
3761
  return "Signature / usual mark image (DG5)"
3620
3762
  case this.DFT_PASSPORT_DG6:
@@ -4346,6 +4488,12 @@ export const eVisualFieldType = {
4346
4488
  FT_THIRD_NAME: 648,
4347
4489
  FT_FOURTH_NAME: 649,
4348
4490
  FT_LAST_NAME: 650,
4491
+ FT_DLCLASSCODE_RM_FROM: 651,
4492
+ FT_DLCLASSCODE_RM_NOTES: 652,
4493
+ FT_DLCLASSCODE_RM_TO: 653,
4494
+ FT_DLCLASSCODE_PW_FROM: 654,
4495
+ FT_DLCLASSCODE_PW_NOTES: 655,
4496
+ FT_DLCLASSCODE_PW_TO: 656,
4349
4497
 
4350
4498
  getTranslation: function (value) {
4351
4499
  switch (value) {
@@ -4602,7 +4750,7 @@ export const eVisualFieldType = {
4602
4750
  case this.FT_JURISDICTION_RESTRICTION_CODE:
4603
4751
  return "Jurisdiction restriction code"
4604
4752
  case this.FT_FAMILY_NAME:
4605
- return "Surname/given name at birth"
4753
+ return "Family name"
4606
4754
  case this.FT_GIVEN_NAMES_RUS:
4607
4755
  return "Given name (National)"
4608
4756
  case this.FT_VISA_ID_RUS:
@@ -5549,6 +5697,18 @@ export const eVisualFieldType = {
5549
5697
  return "Fourth name"
5550
5698
  case this.FT_LAST_NAME:
5551
5699
  return "Last name"
5700
+ case this.FT_DLCLASSCODE_PW_FROM:
5701
+ return "DL class code PW valid from"
5702
+ case this.FT_DLCLASSCODE_PW_NOTES:
5703
+ return "DL class code PW notes"
5704
+ case this.FT_DLCLASSCODE_PW_TO:
5705
+ return "DL class code PW valid to"
5706
+ case this.FT_DLCLASSCODE_RM_FROM:
5707
+ return "DL class code RM valid from"
5708
+ case this.FT_DLCLASSCODE_RM_NOTES:
5709
+ return "DL class code RM notes"
5710
+ case this.FT_DLCLASSCODE_RM_TO:
5711
+ return "DL class code RM valid to"
5552
5712
  default:
5553
5713
  return value
5554
5714
  }
@@ -6151,6 +6311,7 @@ export const Enum = {
6151
6311
  eSignManagementAction,
6152
6312
  eCheckDiagnose,
6153
6313
  RFIDDelegate,
6314
+ TextProcessing,
6154
6315
  ProcessingFinishedStatus,
6155
6316
  DocFormat,
6156
6317
  eLDS_ParsingNotificationCodes,
@@ -6165,6 +6326,7 @@ export const Enum = {
6165
6326
  eRequestCommand,
6166
6327
  ImageFormat,
6167
6328
  eGraphicFieldType,
6329
+ RegDeviceConfigType,
6168
6330
  CameraMode,
6169
6331
  CaptureMode,
6170
6332
  eCheckResult,
@@ -21,6 +21,7 @@
21
21
  +(NSMutableDictionary* _Nonnull)generateVideoEncoderCompletion:(NSURL* _Nullable)input :(NSError* _Nullable)error;
22
22
  +(NSString*_Nonnull)generateNSData:(NSData *_Nullable)input;
23
23
  +(NSMutableDictionary* _Nonnull)generatePACertificateCompletion:(NSData *_Nullable)serialNumber :(RGLPAResourcesIssuer *_Nullable)issuer;
24
+ +(NSMutableDictionary* _Nonnull)generateRGLRFIDNotify:(RGLRFIDNotify* _Nullable)input;
24
25
  +(NSMutableDictionary* _Nonnull)generateRGLDocumentReaderResults:(RGLDocumentReaderResults* _Nullable)input;
25
26
  +(NSMutableDictionary* _Nonnull)generateRGLPosition:(RGLPosition* _Nullable)input;
26
27
  +(NSMutableDictionary* _Nonnull)generateRGLDocumentReaderBarcodeResult:(RGLDocumentReaderBarcodeResult* _Nullable)input;
@@ -63,7 +64,6 @@
63
64
  +(NSMutableDictionary* _Nonnull)generateRGLOpticalStatus:(RGLOpticalStatus* _Nullable)input;
64
65
  +(NSMutableDictionary* _Nonnull)generateRGLVDSNCData:(RGLVDSNCData* _Nullable)input;
65
66
  +(NSMutableDictionary* _Nonnull)generateRGLBytesData:(RGLBytesData* _Nullable)input;
66
- +(NSMutableDictionary* _Nonnull)generateRGLRFIDNotify:(RGLRFIDNotify* _Nullable)input;
67
67
  +(NSMutableDictionary* _Nonnull)generateRGLUVFiberElement:(RGLUVFiberElement* _Nullable)input;
68
68
  +(NSMutableDictionary* _Nonnull)generateRGLDocReaderDocumentsDatabase:(RGLDocReaderDocumentsDatabase* _Nullable)input;
69
69
  +(NSMutableDictionary* _Nonnull)generateRGLDocumentReaderComparison:(RGLDocumentReaderComparison* _Nullable)input;
@@ -126,25 +126,31 @@
126
126
  }
127
127
 
128
128
  +(NSInteger)generateDocReaderAction:(RGLDocReaderAction)input {
129
- NSInteger result = 0;
129
+ NSInteger result = -1;
130
130
  switch (input) {
131
131
  case RGLDocReaderActionComplete:
132
- result = 1;
132
+ result = 0;
133
133
  break;
134
134
  case RGLDocReaderActionProcess:
135
- result = 0;
135
+ result = 1;
136
136
  break;
137
137
  case RGLDocReaderActionMorePagesAvailable:
138
- result = 8;
138
+ result = 2;
139
139
  break;
140
140
  case RGLDocReaderActionCancel:
141
- result = 2;
141
+ result = 3;
142
142
  break;
143
143
  case RGLDocReaderActionError:
144
- result = 3;
144
+ result = 4;
145
+ break;
146
+ case RGLDocReaderActionProcessWhiteFlashLight:
147
+ result = 5;
145
148
  break;
146
149
  case RGLDocReaderActionProcessTimeout:
147
- result = 10;
150
+ result = 6;
151
+ break;
152
+ case RGLDocReaderActionProcessOnServer:
153
+ result = 7;
148
154
  break;
149
155
  default:
150
156
  break;
@@ -160,13 +166,13 @@
160
166
  result = 999;
161
167
  break;
162
168
  case RGLRFIDCompleteActionError:
163
- result = 3;
169
+ result = 4;
164
170
  break;
165
171
  case RGLRFIDCompleteActionCancel:
166
- result = 2;
172
+ result = 3;
167
173
  break;
168
174
  case RGLRFIDCompleteActionSessionRestarted:
169
- result = 1;
175
+ result = 0;
170
176
  break;
171
177
  default:
172
178
  break;
@@ -175,31 +181,8 @@
175
181
  return result;
176
182
  }
177
183
 
178
- +(NSNumber*)generateRGLImageQualityCheckType:(RGLImageQualityCheckType)value {
179
- if(value == RGLImageQualityCheckTypeImageGlares)
180
- return @0;
181
- else if(value == RGLImageQualityCheckTypeImageFocus)
182
- return @1;
183
- else if(value == RGLImageQualityCheckTypeImageResolution)
184
- return @2;
185
- else if(value == RGLImageQualityCheckTypeImageColorness)
186
- return @3;
187
- else if(value == RGLImageQualityCheckTypeImagePerspective)
188
- return @4;
189
- else if(value == RGLImageQualityCheckTypeImageBounds)
190
- return @5;
191
- else if(value == RGLImageQualityCheckTypeScreenCapture)
192
- return @6;
193
- else if(value == RGLImageQualityCheckTypePortrait)
194
- return @7;
195
- else if(value == RGLImageQualityCheckTypeHandwritten)
196
- return @8;
197
- else
198
- return @0;
199
- }
200
-
201
184
  +(NSInteger)generateRFIDNotificationAction:(RGLRFIDNotificationAction)input {
202
- return 5;
185
+ return 101;
203
186
  }
204
187
 
205
188
  +(NSMutableDictionary*)generateCompletion:(NSInteger)action :(RGLDocumentReaderResults*)results :(NSError*)error :(RGLRFIDNotify*)notify {
@@ -207,28 +190,15 @@
207
190
 
208
191
  switch (action) {
209
192
  case 0:
210
- break;
211
- case 1:
212
- result[@"results"] = [self generateRGLDocumentReaderResults:results];
213
- break;
214
193
  case 2:
215
- result[@"results"] = [self generateRGLDocumentReaderResults:results];
216
- break;
217
194
  case 3:
195
+ case 4:
196
+ case 6:
218
197
  result[@"results"] = [self generateRGLDocumentReaderResults:results];
219
198
  break;
220
- case 10:
221
- result[@"results"] = [self generateRGLDocumentReaderResults:results];
222
- break;
223
- case 5:
199
+ case 101:
224
200
  result[@"results"] = [self generateResultsWithNotification:[self generateRGLRFIDNotify:notify]];
225
201
  break;
226
- case 6:
227
- result[@"results"] = [self generateResultsWithNotification:[self generateRGLRFIDNotify:notify]];
228
- break;
229
- case 8:
230
- result[@"results"] = [self generateRGLDocumentReaderResults:results];
231
- break;
232
202
  case 999:
233
203
  result[@"results"] = [self generateResultsWithRFID :results :1];
234
204
  action = 1;
@@ -260,6 +230,29 @@
260
230
  return result;
261
231
  }
262
232
 
233
+ +(NSNumber*)generateRGLImageQualityCheckType:(RGLImageQualityCheckType)value {
234
+ if(value == RGLImageQualityCheckTypeImageGlares)
235
+ return @0;
236
+ else if(value == RGLImageQualityCheckTypeImageFocus)
237
+ return @1;
238
+ else if(value == RGLImageQualityCheckTypeImageResolution)
239
+ return @2;
240
+ else if(value == RGLImageQualityCheckTypeImageColorness)
241
+ return @3;
242
+ else if(value == RGLImageQualityCheckTypeImagePerspective)
243
+ return @4;
244
+ else if(value == RGLImageQualityCheckTypeImageBounds)
245
+ return @5;
246
+ else if(value == RGLImageQualityCheckTypeScreenCapture)
247
+ return @6;
248
+ else if(value == RGLImageQualityCheckTypePortrait)
249
+ return @7;
250
+ else if(value == RGLImageQualityCheckTypeHandwritten)
251
+ return @8;
252
+ else
253
+ return @0;
254
+ }
255
+
263
256
  +(NSString*)generateNSData:(NSData *)input {
264
257
  return [NSKeyedUnarchiver unarchiveObjectWithData:input];
265
258
  }
@@ -273,6 +266,19 @@
273
266
  return result;
274
267
  }
275
268
 
269
+ +(NSMutableDictionary* _Nonnull)generateRGLRFIDNotify:(RGLRFIDNotify* _Nullable)input {
270
+ NSMutableDictionary *result = [NSMutableDictionary new];
271
+ if(input == nil) return result;
272
+
273
+ result[@"code"] = @(input.code);
274
+ result[@"value"] = @(input.value);
275
+ result[@"notificationCode"] = @(input.code & 0xFFFF0000);
276
+ result[@"dataFileType"] = @(input.code & 0x0000FFFF);
277
+ // result[@"progress"] = @(input.value & 0xFFFFFFF0);
278
+
279
+ return result;
280
+ }
281
+
276
282
  // To JSON
277
283
 
278
284
  +(NSMutableDictionary* _Nonnull)generateRGLDocumentReaderResults:(RGLDocumentReaderResults* _Nullable)input {
@@ -1100,17 +1106,6 @@
1100
1106
  return result;
1101
1107
  }
1102
1108
 
1103
- +(NSMutableDictionary* _Nonnull)generateRGLRFIDNotify:(RGLRFIDNotify* _Nullable)input {
1104
- NSMutableDictionary *result = [NSMutableDictionary new];
1105
- if(input == nil) return result;
1106
-
1107
- result[@"code"] = @(input.code);
1108
- result[@"value"] = @(input.value);
1109
- result[@"attachment"] = @(input.attachment);
1110
-
1111
- return result;
1112
- }
1113
-
1114
1109
  +(NSMutableDictionary* _Nonnull)generateRGLUVFiberElement:(RGLUVFiberElement* _Nullable)input {
1115
1110
  NSMutableDictionary *result = [NSMutableDictionary new];
1116
1111
  if(input == nil) return result;