@regulaforensics/document-reader 8.4.401-beta → 8.4.507-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.
Files changed (88) hide show
  1. package/README.md +1 -1
  2. package/RNDocumentReader.podspec +2 -2
  3. package/android/build.gradle +2 -2
  4. package/android/cordova.gradle +2 -2
  5. package/android/src/main/java/com/regula/plugin/documentreader/Config.kt +11 -31
  6. package/android/src/main/java/com/regula/plugin/documentreader/JSONConstructor.kt +338 -59
  7. package/android/src/main/java/com/regula/plugin/documentreader/Main.kt +69 -35
  8. package/android/src/main/java/com/regula/plugin/documentreader/Utils.kt +62 -0
  9. package/examples/capacitor/ios/App/App/Info.plist +2 -0
  10. package/examples/capacitor/package-lock.json +9 -9
  11. package/examples/capacitor/package.json +3 -3
  12. package/examples/ionic/config.xml +2 -0
  13. package/examples/ionic/package-lock.json +5262 -2655
  14. package/examples/ionic/package.json +12 -12
  15. package/examples/react_native/app.config.ts +3 -1
  16. package/examples/react_native/package-lock.json +37 -37
  17. package/examples/react_native/package.json +3 -3
  18. package/ios/RGLWConfig.m +11 -32
  19. package/ios/RGLWJSONConstructor.h +19 -1
  20. package/ios/RGLWJSONConstructor.m +349 -18
  21. package/ios/RGLWMain.m +49 -46
  22. package/package.json +1 -1
  23. package/plugin.xml +2 -2
  24. package/test/json.tsx +201 -124
  25. package/test/package-lock.json +1 -1
  26. package/test/test.tsx +12 -3
  27. package/www/capacitor/engagement/DataRetrieval.js +55 -0
  28. package/www/capacitor/engagement/DeviceEngagement.js +30 -0
  29. package/www/capacitor/engagement/DeviceRetrievalMethod.js +41 -0
  30. package/www/capacitor/engagement/DocumentRequestMDL.js +212 -0
  31. package/www/capacitor/engagement/NameSpaceMDL.js +33 -0
  32. package/www/capacitor/index.js +58 -7
  33. package/www/capacitor/info/DocReaderException.js +2 -0
  34. package/www/capacitor/params/Functionality.js +16 -0
  35. package/www/capacitor/params/customization/Customization.js +8 -0
  36. package/www/capacitor/params/process_params/AuthenticityParams.js +1 -44
  37. package/www/capacitor/params/process_params/LivenessParams.js +0 -36
  38. package/www/capacitor/params/process_params/ProcessParams.js +26 -30
  39. package/www/capacitor/results/Results.js +8 -1
  40. package/www/capacitor/results/status/AgeStatus.js +35 -0
  41. package/www/capacitor/results/status/ResultsStatus.js +13 -0
  42. package/www/capacitor/results/visible_digital_seals/DocFeature.js +23 -0
  43. package/www/capacitor/results/visible_digital_seals/VDSData.js +75 -0
  44. package/www/capacitor/results/visual_results/FieldType.js +3 -0
  45. package/www/capacitor/rfid/PKDCertificate.js +3 -0
  46. package/www/cordova.js +1276 -683
  47. package/www/react-native/engagement/DataRetrieval.js +55 -0
  48. package/www/react-native/engagement/DeviceEngagement.js +30 -0
  49. package/www/react-native/engagement/DeviceRetrievalMethod.js +41 -0
  50. package/www/react-native/engagement/DocumentRequestMDL.js +212 -0
  51. package/www/react-native/engagement/NameSpaceMDL.js +33 -0
  52. package/www/react-native/index.js +58 -7
  53. package/www/react-native/info/DocReaderException.js +2 -0
  54. package/www/react-native/params/Functionality.js +16 -0
  55. package/www/react-native/params/customization/Customization.js +8 -0
  56. package/www/react-native/params/process_params/AuthenticityParams.js +1 -44
  57. package/www/react-native/params/process_params/LivenessParams.js +0 -36
  58. package/www/react-native/params/process_params/ProcessParams.js +26 -30
  59. package/www/react-native/results/Results.js +8 -1
  60. package/www/react-native/results/status/AgeStatus.js +35 -0
  61. package/www/react-native/results/status/ResultsStatus.js +13 -0
  62. package/www/react-native/results/visible_digital_seals/DocFeature.js +23 -0
  63. package/www/react-native/results/visible_digital_seals/VDSData.js +75 -0
  64. package/www/react-native/results/visual_results/FieldType.js +3 -0
  65. package/www/react-native/rfid/PKDCertificate.js +3 -0
  66. package/www/types/engagement/DataRetrieval.d.ts +28 -0
  67. package/www/types/engagement/DeviceEngagement.d.ts +16 -0
  68. package/www/types/engagement/DeviceRetrievalMethod.d.ts +18 -0
  69. package/www/types/engagement/DocumentRequestMDL.d.ts +61 -0
  70. package/www/types/engagement/NameSpaceMDL.d.ts +16 -0
  71. package/www/types/index.d.ts +40 -8
  72. package/www/types/info/DocReaderException.d.ts +2 -0
  73. package/www/types/params/Functionality.d.ts +7 -0
  74. package/www/types/params/customization/Customization.d.ts +5 -0
  75. package/www/types/params/process_params/AuthenticityParams.d.ts +0 -25
  76. package/www/types/params/process_params/LivenessParams.d.ts +0 -18
  77. package/www/types/params/process_params/ProcessParams.d.ts +18 -11
  78. package/www/types/results/Results.d.ts +9 -1
  79. package/www/types/results/status/AgeStatus.d.ts +14 -0
  80. package/www/types/results/status/ResultsStatus.d.ts +9 -0
  81. package/www/types/results/visible_digital_seals/DocFeature.d.ts +9 -0
  82. package/www/types/results/visible_digital_seals/VDSData.d.ts +32 -0
  83. package/www/types/results/visible_digital_seals/VDSNCData.d.ts +1 -1
  84. package/www/types/results/visual_results/FieldType.d.ts +6 -0
  85. package/www/types/rfid/PKDCertificate.d.ts +7 -1
  86. package/www/capacitor/params/process_params/FilterObject.js +0 -60
  87. package/www/react-native/params/process_params/FilterObject.js +0 -60
  88. package/www/types/params/process_params/FilterObject.d.ts +0 -32
@@ -0,0 +1,55 @@
1
+ import { MDLIntentToRetain } from "./NameSpaceMDL";
2
+ import { DocumentRequestMDL } from "./DocumentRequestMDL";
3
+
4
+ export class DataRetrieval {
5
+ deviceRetrieval
6
+ docRequestPreset
7
+ intentToRetain = MDLIntentToRetain.FALSE
8
+ requests = []
9
+
10
+ constructor(deviceRetrieval) {
11
+ this.deviceRetrieval = deviceRetrieval
12
+ }
13
+
14
+ setDocRequestPreset(docRequestPreset, intentToRetain) {
15
+ this.docRequestPreset = docRequestPreset
16
+ this.intentToRetain = intentToRetain
17
+ }
18
+
19
+ addDocRequest(request) {
20
+ requests.push(request);
21
+ }
22
+
23
+ static fromJson(jsonObject) {
24
+ if (jsonObject == null) return null
25
+ const result = new DataRetrieval(jsonObject["deviceRetrieval"])
26
+
27
+ result.docRequestPreset = jsonObject["docRequestPreset"]
28
+ result.intentToRetain = jsonObject["intentToRetain"]
29
+ result.requests = (jsonObject["requests"]).map(item => DocumentRequestMDL.fromJson(item));
30
+
31
+ return result
32
+ }
33
+
34
+ toJson() {
35
+ return {
36
+ "deviceRetrieval": this.deviceRetrieval,
37
+ "docRequestPreset": this.docRequestPreset,
38
+ "intentToRetain": this.intentToRetain,
39
+ "requests": this.requests.map(item => item.toJson())
40
+ }
41
+ }
42
+ }
43
+
44
+ export const MDLDocRequestPreset = {
45
+ ALL: 0,
46
+ AGE: 1,
47
+ STANDARD_ID: 2,
48
+ TRAVEL: 3,
49
+ DRIVERS_LICENSE: 4,
50
+ }
51
+
52
+ export const MDLDeviceRetrieval = {
53
+ NFC: 1,
54
+ BLE: 2,
55
+ }
@@ -0,0 +1,30 @@
1
+ import { DeviceRetrievalMethod } from "./DeviceRetrievalMethod";
2
+
3
+ export class DeviceEngagement {
4
+ deviceRetrievalMethods = []
5
+
6
+ static fromJson(jsonObject) {
7
+ if (jsonObject == null) return null
8
+ const result = new DeviceEngagement()
9
+
10
+ for (var item of jsonObject["deviceRetrievalMethods"]) {
11
+ item = DeviceRetrievalMethod.fromJson(item);
12
+ if (item != null) {
13
+ result.deviceRetrievalMethods.push(item);
14
+ }
15
+ }
16
+
17
+ return result
18
+ }
19
+
20
+ toJson() {
21
+ return {
22
+ "deviceRetrievalMethods": this.deviceRetrievalMethods.map(e => e.toJson()),
23
+ }
24
+ }
25
+ }
26
+
27
+ export const MDLDeviceEngagement = {
28
+ QR: 0,
29
+ NFC: 1,
30
+ }
@@ -0,0 +1,41 @@
1
+ import { MDLDeviceRetrieval } from "./DataRetrieval";
2
+
3
+ export class DeviceRetrievalMethod {
4
+ type
5
+ version
6
+ cmdMaxLength
7
+ respMaxLength
8
+ clientModeSupport
9
+ clientModeUUID
10
+ serverModeSupport
11
+ serverModeUUID
12
+
13
+ static fromJson(jsonObject) {
14
+ if (jsonObject == null) return null
15
+ const result = new DeviceRetrievalMethod()
16
+
17
+ result.type = jsonObject["type"]
18
+ result.version = jsonObject["version"]
19
+ result.cmdMaxLength = jsonObject["cmdMaxLength"]
20
+ result.respMaxLength = jsonObject["respMaxLength"]
21
+ result.clientModeSupport = jsonObject["clientModeSupport"]
22
+ result.clientModeUUID = jsonObject["clientModeUUID"]
23
+ result.serverModeSupport = jsonObject["serverModeSupport"]
24
+ result.serverModeUUID = jsonObject["serverModeUUID"]
25
+
26
+ return result
27
+ }
28
+
29
+ toJson() {
30
+ return {
31
+ "type": this.type,
32
+ "version": this.version,
33
+ "cmdMaxLength": this.cmdMaxLength,
34
+ "respMaxLength": this.respMaxLength,
35
+ "clientModeSupport": this.clientModeSupport,
36
+ "clientModeUUID": this.clientModeUUID,
37
+ "serverModeSupport": this.serverModeSupport,
38
+ "serverModeUUID": this.serverModeUUID,
39
+ }
40
+ }
41
+ }
@@ -0,0 +1,212 @@
1
+ import { NameSpaceMDL, MDLIntentToRetain } from "./NameSpaceMDL";
2
+
3
+ export class DocumentRequestMDL {
4
+ docType
5
+ namespaces = []
6
+
7
+ constructor(docType) {
8
+ this.docType = docType
9
+ }
10
+
11
+ addNameSpace(namespace) {
12
+ this.namespaces.push(namespace);
13
+ }
14
+
15
+ static fromJson(jsonObject) {
16
+ if (jsonObject == null) return null;
17
+ var docType = jsonObject["docType"];
18
+ if (docType == "org.iso.18013.5.1.mDL") {
19
+ return DocumentRequest18013MDL.fromJson(jsonObject);
20
+ }
21
+ var result = new DocumentRequestMDL(docType);
22
+
23
+ result.namespaces = (jsonObject["namespaces"]).map(item => NameSpaceMDL.fromJson(item));
24
+
25
+ return result;
26
+ }
27
+
28
+ toJson() {
29
+ return {
30
+ "docType": this.docType,
31
+ "namespaces": this.namespaces.map(item => item.toJson())
32
+ }
33
+ }
34
+ }
35
+
36
+ export class DocumentRequest18013MDL extends DocumentRequestMDL {
37
+ familyName
38
+ givenName
39
+ birthDate
40
+ issueDate
41
+ expiryDate
42
+ issuingCountry
43
+ issuingAuthority
44
+ documentNumber
45
+ portrait
46
+ drivingPrivileges
47
+ unDistinguishingSign
48
+ administrativeNumber
49
+ sex
50
+ height
51
+ weight
52
+ eyeColour
53
+ hairColour
54
+ birthPlace
55
+ residentAddress
56
+ portraitCaptureDate
57
+ ageInYears
58
+ ageBirthYear
59
+ ageOver18
60
+ issuingJurisdiction
61
+ nationality
62
+ residentCity
63
+ residentState
64
+ residentPostalCode
65
+ residentCountry
66
+ biometricTemplateFace
67
+ biometricTemplateIris
68
+ biometricTemplateFinger
69
+ biometricTemplateSignatureSign
70
+ familyNameNationalCharacter
71
+ givenNameNationalCharacter
72
+ signatureUsualMark
73
+
74
+ constructor() {
75
+ super("org.iso.18013.5.1.mDL")
76
+ }
77
+
78
+ disableIntentToRetainValues() {
79
+ this.setAll(MDLIntentToRetain.FALSE);
80
+ }
81
+
82
+ enableIntentToRetainValues() {
83
+ this.setAll(MDLIntentToRetain.TRUE);
84
+ }
85
+
86
+ setAll(value) {
87
+ this.familyName = value;
88
+ this.givenName = value;
89
+ this.birthDate = value;
90
+ this.issueDate = value;
91
+ this.expiryDate = value;
92
+ this.issuingCountry = value;
93
+ this.issuingAuthority = value;
94
+ this.documentNumber = value;
95
+ this.portrait = value;
96
+ this.drivingPrivileges = value;
97
+ this.unDistinguishingSign = value;
98
+ this.administrativeNumber = value;
99
+ this.sex = value;
100
+ this.height = value;
101
+ this.weight = value;
102
+ this.eyeColour = value;
103
+ this.hairColour = value;
104
+ this.birthPlace = value;
105
+ this.residentAddress = value;
106
+ this.portraitCaptureDate = value;
107
+ this.ageInYears = value;
108
+ this.ageBirthYear = value;
109
+ this.ageOver18 = value;
110
+ this.issuingJurisdiction = value;
111
+ this.nationality = value;
112
+ this.residentCity = value;
113
+ this.residentState = value;
114
+ this.residentPostalCode = value;
115
+ this.residentCountry = value;
116
+ this.biometricTemplateFace = value;
117
+ this.biometricTemplateIris = value;
118
+ this.biometricTemplateFinger = value;
119
+ this.biometricTemplateSignatureSign = value;
120
+ this.familyNameNationalCharacter = value;
121
+ this.givenNameNationalCharacter = value;
122
+ this.signatureUsualMark = value;
123
+ }
124
+
125
+ static fromJson(jsonObject) {
126
+ if (jsonObject == null) return null
127
+ const result = new DocumentRequest18013MDL()
128
+
129
+ result.namespaces = (jsonObject["namespaces"]).map(item => NameSpaceMDL.fromJson(item));
130
+ result.familyName = jsonObject["familyName"]
131
+ result.givenName = jsonObject["givenName"]
132
+ result.birthDate = jsonObject["birthDate"]
133
+ result.issueDate = jsonObject["issueDate"]
134
+ result.expiryDate = jsonObject["expiryDate"]
135
+ result.issuingCountry = jsonObject["issuingCountry"]
136
+ result.issuingAuthority = jsonObject["issuingAuthority"]
137
+ result.documentNumber = jsonObject["documentNumber"]
138
+ result.portrait = jsonObject["portrait"]
139
+ result.drivingPrivileges = jsonObject["drivingPrivileges"]
140
+ result.unDistinguishingSign = jsonObject["unDistinguishingSign"]
141
+ result.administrativeNumber = jsonObject["administrativeNumber"]
142
+ result.sex = jsonObject["sex"]
143
+ result.height = jsonObject["height"]
144
+ result.weight = jsonObject["weight"]
145
+ result.eyeColour = jsonObject["eyeColour"]
146
+ result.hairColour = jsonObject["hairColour"]
147
+ result.birthPlace = jsonObject["birthPlace"]
148
+ result.residentAddress = jsonObject["residentAddress"]
149
+ result.portraitCaptureDate = jsonObject["portraitCaptureDate"]
150
+ result.ageInYears = jsonObject["ageInYears"]
151
+ result.ageBirthYear = jsonObject["ageBirthYear"]
152
+ result.ageOver18 = jsonObject["ageOver18"]
153
+ result.issuingJurisdiction = jsonObject["issuingJurisdiction"]
154
+ result.nationality = jsonObject["nationality"]
155
+ result.residentCity = jsonObject["residentCity"]
156
+ result.residentState = jsonObject["residentState"]
157
+ result.residentPostalCode = jsonObject["residentPostalCode"]
158
+ result.residentCountry = jsonObject["residentCountry"]
159
+ result.biometricTemplateFace = jsonObject["biometricTemplateFace"]
160
+ result.biometricTemplateIris = jsonObject["biometricTemplateIris"]
161
+ result.biometricTemplateFinger = jsonObject["biometricTemplateFinger"]
162
+ result.biometricTemplateSignatureSign = jsonObject["biometricTemplateSignatureSign"]
163
+ result.familyNameNationalCharacter = jsonObject["familyNameNationalCharacter"]
164
+ result.givenNameNationalCharacter = jsonObject["givenNameNationalCharacter"]
165
+ result.signatureUsualMark = jsonObject["signatureUsualMark"]
166
+
167
+ return result
168
+ }
169
+
170
+ toJson() {
171
+ return {
172
+ "docType": this.docType,
173
+ "namespaces": this.namespaces.map(item => item.toJson()),
174
+ "familyName": this.familyName,
175
+ "givenName": this.givenName,
176
+ "birthDate": this.birthDate,
177
+ "issueDate": this.issueDate,
178
+ "expiryDate": this.expiryDate,
179
+ "issuingCountry": this.issuingCountry,
180
+ "issuingAuthority": this.issuingAuthority,
181
+ "documentNumber": this.documentNumber,
182
+ "portrait": this.portrait,
183
+ "drivingPrivileges": this.drivingPrivileges,
184
+ "unDistinguishingSign": this.unDistinguishingSign,
185
+ "administrativeNumber": this.administrativeNumber,
186
+ "sex": this.sex,
187
+ "height": this.height,
188
+ "weight": this.weight,
189
+ "eyeColour": this.eyeColour,
190
+ "hairColour": this.hairColour,
191
+ "birthPlace": this.birthPlace,
192
+ "residentAddress": this.residentAddress,
193
+ "portraitCaptureDate": this.portraitCaptureDate,
194
+ "ageInYears": this.ageInYears,
195
+ "ageBirthYear": this.ageBirthYear,
196
+ "ageOver18": this.ageOver18,
197
+ "issuingJurisdiction": this.issuingJurisdiction,
198
+ "nationality": this.nationality,
199
+ "residentCity": this.residentCity,
200
+ "residentState": this.residentState,
201
+ "residentPostalCode": this.residentPostalCode,
202
+ "residentCountry": this.residentCountry,
203
+ "biometricTemplateFace": this.biometricTemplateFace,
204
+ "biometricTemplateIris": this.biometricTemplateIris,
205
+ "biometricTemplateFinger": this.biometricTemplateFinger,
206
+ "biometricTemplateSignatureSign": this.biometricTemplateSignatureSign,
207
+ "familyNameNationalCharacter": this.familyNameNationalCharacter,
208
+ "givenNameNationalCharacter": this.givenNameNationalCharacter,
209
+ "signatureUsualMark": this.signatureUsualMark,
210
+ }
211
+ }
212
+ }
@@ -0,0 +1,33 @@
1
+ export class NameSpaceMDL {
2
+ name
3
+ map = {}
4
+
5
+ constructor(name) {
6
+ this.name = name
7
+ }
8
+
9
+ addField(name, intentToRetain) {
10
+ this.map[name] = intentToRetain;
11
+ }
12
+
13
+ static fromJson(jsonObject) {
14
+ if (jsonObject == null) return null
15
+ const result = new NameSpaceMDL(jsonObject["name"])
16
+
17
+ result.map = jsonObject["map"]
18
+
19
+ return result
20
+ }
21
+
22
+ toJson() {
23
+ return {
24
+ "name": this.name,
25
+ "map": this.map
26
+ }
27
+ }
28
+ }
29
+
30
+ export const MDLIntentToRetain = {
31
+ FALSE: 0,
32
+ TRUE: 1,
33
+ }
@@ -43,8 +43,9 @@ import { RFIDStatus } from './results/status/RFIDStatus';
43
43
  import { ResultsStatus } from './results/status/ResultsStatus';
44
44
  import { CheckResult } from './results/status/CheckResult';
45
45
  import { OpticalStatus } from './results/status/OpticalStatus';
46
+ import { AgeStatus } from './results/status/AgeStatus';
46
47
  import { ProcessingFinishedStatus } from './results/Results';
47
- export { RFIDStatus, ResultsStatus, CheckResult, OpticalStatus, ProcessingFinishedStatus };
48
+ export { RFIDStatus, ResultsStatus, CheckResult, OpticalStatus, AgeStatus, ProcessingFinishedStatus };
48
49
 
49
50
  import { CheckDiagnose } from './results/authenticity/CheckDiagnose';
50
51
  import { AuthenticityElement } from './results/authenticity/AuthenticityElement';
@@ -69,8 +70,10 @@ export { ImageQuality, ImageQualityGroup, ImageQualityCheckType };
69
70
  import { LDSParsingErrorCodes } from './results/visible_digital_seals/LDSParsingErrorCodes';
70
71
  import { VDSNCData } from './results/visible_digital_seals/VDSNCData';
71
72
  import { BytesData } from './results/visible_digital_seals/BytesData';
73
+ import { DocFeature } from './results/visible_digital_seals/DocFeature';
74
+ import { VDSData } from './results/visible_digital_seals/VDSData';
72
75
  import { LDSParsingNotificationCodes } from './results/visible_digital_seals/LDSParsingNotificationCodes';
73
- export { LDSParsingErrorCodes, VDSNCData, BytesData, LDSParsingNotificationCodes };
76
+ export { LDSParsingErrorCodes, VDSNCData, BytesData, DocFeature, VDSData, LDSParsingNotificationCodes };
74
77
 
75
78
  import { SecurityObject } from './results/rfid/SecurityObject';
76
79
  import { CardProperties } from './results/rfid/CardProperties';
@@ -94,17 +97,16 @@ import { Extension } from './results/rfid/Extension';
94
97
  import { AccessControlProcedureType } from './results/rfid/AccessControlProcedureType';
95
98
  export { SecurityObject, CardProperties, DataField, Attribute, SignerInfo, SecurityObjectCertificates, CertificateChain, Authority, File, RFIDValue, RFIDValidity, RFIDDataFileType, CertificateData, FileData, RFIDCertificateType, RFIDSessionData, Application, RFIDApplicationType, RFIDAccessControlProcedureType, Extension, AccessControlProcedureType };
96
99
 
97
- import { FilterObject, FilterObjectType } from './params/process_params/FilterObject';
98
- import { LivenessParams, LivenessCheckType } from './params/process_params/LivenessParams';
99
- import { ProcessParams, MeasureSystem, MRZFormat, LogLevel, MrzDetectionModes, FilterCheckType } from './params/process_params/ProcessParams';
100
+ import { LivenessParams } from './params/process_params/LivenessParams';
101
+ import { ProcessParams, MeasureSystem, MRZFormat, LogLevel, MrzDetectionModes } from './params/process_params/ProcessParams';
100
102
  import { GlaresCheckParams } from './params/process_params/GlaresCheckParams';
101
103
  import { FaceApiParams } from './params/process_params/FaceApiParams';
102
104
  import { RFIDParams } from './params/process_params/RFIDParams';
103
105
  import { ImageQA } from './params/process_params/ImageQA';
104
- import { AuthenticityParams, AuthenticityCheckType } from './params/process_params/AuthenticityParams';
106
+ import { AuthenticityParams } from './params/process_params/AuthenticityParams';
105
107
  import { BackendProcessingConfig } from './params/process_params/BackendProcessingConfig';
106
108
  import { FaceApiSearchParams } from './params/process_params/FaceApiSearchParams';
107
- export { FilterObject, FilterObjectType, LivenessParams, LivenessCheckType, ProcessParams, MeasureSystem, MRZFormat, LogLevel, MrzDetectionModes, FilterCheckType, GlaresCheckParams, FaceApiParams, RFIDParams, ImageQA, AuthenticityParams, AuthenticityCheckType, BackendProcessingConfig, FaceApiSearchParams };
109
+ export { LivenessParams, ProcessParams, MeasureSystem, MRZFormat, LogLevel, MrzDetectionModes, GlaresCheckParams, FaceApiParams, RFIDParams, ImageQA, AuthenticityParams, BackendProcessingConfig, FaceApiSearchParams };
108
110
 
109
111
  import { Functionality, CameraPosition, CaptureMode, CameraMode, CaptureSessionPreset, DocReaderFrame, CameraSize } from './params/Functionality';
110
112
  export { Functionality, CameraPosition, CaptureMode, CameraMode, CaptureSessionPreset, DocReaderFrame, CameraSize };
@@ -132,6 +134,13 @@ import { TAChallenge } from './rfid/TAChallenge';
132
134
  import { PKDCertificate, PKDResourceType } from './rfid/PKDCertificate';
133
135
  export { PAResourcesIssuer, RFIDErrorCodes, TccParams, RFIDNotification, RFIDNotificationCodes, PAAttribute, TAChallenge, PKDCertificate, PKDResourceType };
134
136
 
137
+ import { DataRetrieval, MDLDocRequestPreset, MDLDeviceRetrieval } from './engagement/DataRetrieval';
138
+ import { DeviceEngagement, MDLDeviceEngagement } from './engagement/DeviceEngagement';
139
+ import { NameSpaceMDL, MDLIntentToRetain } from './engagement/NameSpaceMDL';
140
+ import { DocumentRequestMDL, DocumentRequest18013MDL } from './engagement/DocumentRequestMDL';
141
+ import { DeviceRetrievalMethod } from './engagement/DeviceRetrievalMethod';
142
+ export { DataRetrieval, MDLDocRequestPreset, MDLDeviceRetrieval, DeviceEngagement, MDLDeviceEngagement, DeviceRetrievalMethod, DocumentRequest18013MDL, MDLIntentToRetain, NameSpaceMDL, DocumentRequestMDL };
143
+
135
144
  export class DocumentReader {
136
145
  static get instance() { return DocumentReader._instance }
137
146
  static _instance = new DocumentReader()
@@ -372,6 +381,48 @@ export class DocumentReader {
372
381
  exec("endBackendTransaction", []);
373
382
  }
374
383
 
384
+ async readMDL(type, retrieval) {
385
+ var response = await exec("startReadMDl", [type, retrieval.toJson()]);
386
+ var jsonObject = JSON.parse(response);
387
+ return [
388
+ jsonObject["action"],
389
+ Results.fromJson(jsonObject["results"]),
390
+ DocReaderException.fromJson(jsonObject["error"]),
391
+ ]
392
+ }
393
+
394
+ async engageDevice(type, options) {
395
+ var response = "";
396
+ if (options?.withoutUI != true) {
397
+ response = await exec("startEngageDevice", [type.value]);
398
+ } else if (type == MDLDeviceEngagement.NFC) {
399
+ response = await exec("engageDeviceNFC", []);
400
+ } else if (type == MDLDeviceEngagement.QR && options?.data != null) {
401
+ response = await exec("engageDeviceData", [options.data]);
402
+ }
403
+
404
+ var jsonObject = JSON.parse(response);
405
+ return [
406
+ DeviceEngagement.fromJson(jsonObject["deviceEngagement"]),
407
+ DocReaderException.fromJson(jsonObject["error"]),
408
+ ]
409
+ }
410
+
411
+ async retrieveData(retrieval, options) {
412
+ var func = "startRetrieveData";
413
+ if (options?.withoutUI == MDLDeviceRetrieval.NFC) func = "engageDeviceNFC";
414
+ if (options?.withoutUI == MDLDeviceRetrieval.BLE) func = "engageDeviceBLE";
415
+
416
+ var response = await exec(func, [retrieval.toJson(), options?.engagement?.toJson()]);
417
+ var jsonObject = JSON.parse(response);
418
+
419
+ return [
420
+ jsonObject["action"],
421
+ Results.fromJson(jsonObject["results"]),
422
+ DocReaderException.fromJson(jsonObject["error"]),
423
+ ]
424
+ }
425
+
375
426
  _successOrErrorFromJson(jsonString) {
376
427
  var jsonObject = JSON.parse(jsonString);
377
428
  var success = jsonObject["success"];
@@ -53,6 +53,7 @@ export const ErrorCodes = {
53
53
  CAMERA_NO_PERMISSION: 29,
54
54
  CAMERA_NOT_AVAILABLE: 30,
55
55
  CANNOT_USE_CAMERA_IN_SCENARIO: 40,
56
+ BLUETOOTH_NO_PERMISSION: 41,
56
57
  BACKEND_ONLINE_PROCESSING: 303,
57
58
  WRONG_INPUT: 400,
58
59
  RESULT_UNAVAILABLE: 410,
@@ -62,5 +63,6 @@ export const ErrorCodes = {
62
63
  FEATURE_BLUETOOTH_LE_NOT_SUPPORTED: 601,
63
64
  APP_BACKGROUND: 700,
64
65
  ONLINE_PROCESSING_WRONG_INPUT: 800,
66
+ MDL_EXCEPTION: 900,
65
67
  NATIVE_JAVA_EXCEPTION: 1000
66
68
  }
@@ -111,6 +111,12 @@ export class Functionality {
111
111
  this._set({ "preventScreenRecording": val });
112
112
  }
113
113
 
114
+ get homeIndicatorAutoHide() { return this._homeIndicatorAutoHide; }
115
+ set homeIndicatorAutoHide(val) {
116
+ this._homeIndicatorAutoHide = val;
117
+ this._set({ "homeIndicatorAutoHide": val });
118
+ }
119
+
114
120
  get showCaptureButtonDelayFromDetect() { return this._showCaptureButtonDelayFromDetect; }
115
121
  set showCaptureButtonDelayFromDetect(val) {
116
122
  this._showCaptureButtonDelayFromDetect = val;
@@ -189,6 +195,12 @@ export class Functionality {
189
195
  this._set({ "videoRecordingSizeDownscaleFactor": val });
190
196
  }
191
197
 
198
+ get mdlTimeout() { return this._mdlTimeout; }
199
+ set mdlTimeout(val) {
200
+ this._mdlTimeout = val;
201
+ this._set({ "mdlTimeout": val });
202
+ }
203
+
192
204
  get excludedCamera2Models() { return this._excludedCamera2Models; }
193
205
  set excludedCamera2Models(val) {
194
206
  this._excludedCamera2Models = val;
@@ -229,6 +241,7 @@ export class Functionality {
229
241
  result._singleResult = jsonObject["singleResult"];
230
242
  result._torchTurnedOn = jsonObject["torchTurnedOn"];
231
243
  result._preventScreenRecording = jsonObject["preventScreenRecording"];
244
+ result._homeIndicatorAutoHide = jsonObject["homeIndicatorAutoHide"];
232
245
  result._showCaptureButtonDelayFromDetect = jsonObject["showCaptureButtonDelayFromDetect"];
233
246
  result._showCaptureButtonDelayFromStart = jsonObject["showCaptureButtonDelayFromStart"];
234
247
  result._rfidTimeout = jsonObject["rfidTimeout"];
@@ -242,6 +255,7 @@ export class Functionality {
242
255
  result._zoomFactor = jsonObject["zoomFactor"];
243
256
  result._exposure = jsonObject["exposure"];
244
257
  result._videoRecordingSizeDownscaleFactor = jsonObject["videoRecordingSizeDownscaleFactor"];
258
+ result._mdlTimeout = jsonObject["mdlTimeout"];
245
259
  result._excludedCamera2Models = jsonObject["excludedCamera2Models"];
246
260
  result._cameraResolutionAndroid = CameraSize.fromJson(jsonObject["cameraSize"]);
247
261
  result._cameraResolutionIOS = jsonObject["videoSessionPreset"];
@@ -269,6 +283,7 @@ export class Functionality {
269
283
  "singleResult": this.singleResult,
270
284
  "torchTurnedOn": this.torchTurnedOn,
271
285
  "preventScreenRecording": this.preventScreenRecording,
286
+ "homeIndicatorAutoHide": this.homeIndicatorAutoHide,
272
287
  "showCaptureButtonDelayFromDetect": this.showCaptureButtonDelayFromDetect,
273
288
  "showCaptureButtonDelayFromStart": this.showCaptureButtonDelayFromStart,
274
289
  "rfidTimeout": this.rfidTimeout,
@@ -282,6 +297,7 @@ export class Functionality {
282
297
  "zoomFactor": this.zoomFactor,
283
298
  "exposure": this.exposure,
284
299
  "videoRecordingSizeDownscaleFactor": this.videoRecordingSizeDownscaleFactor,
300
+ "mdlTimeout": this.mdlTimeout,
285
301
  "excludedCamera2Models": this.excludedCamera2Models,
286
302
  "cameraSize": this.cameraResolutionAndroid?.toJson(),
287
303
  "videoSessionPreset": this.cameraResolutionIOS,
@@ -240,6 +240,12 @@ export class Customization {
240
240
  this._set({ "cameraPreviewVerticalPositionMultiplier": val });
241
241
  }
242
242
 
243
+ get multipageButtonPositionMultiplier() { return this._multipageButtonPositionMultiplier; }
244
+ set multipageButtonPositionMultiplier(val) {
245
+ this._multipageButtonPositionMultiplier = val;
246
+ this._set({ "multipageButtonPositionMultiplier": val });
247
+ }
248
+
243
249
  get multipageAnimationFrontImage() { return this._multipageAnimationFrontImage; }
244
250
  set multipageAnimationFrontImage(val) {
245
251
  this._multipageAnimationFrontImage = val;
@@ -476,6 +482,7 @@ export class Customization {
476
482
  result._activityIndicatorPortraitPositionMultiplier = jsonObject["activityIndicatorPortraitPositionMultiplier"];
477
483
  result._activityIndicatorLandscapePositionMultiplier = jsonObject["activityIndicatorLandscapePositionMultiplier"];
478
484
  result._cameraPreviewVerticalPositionMultiplier = jsonObject["cameraPreviewVerticalPositionMultiplier"];
485
+ result._multipageButtonPositionMultiplier = jsonObject["multipageButtonPositionMultiplier"];
479
486
  result._multipageAnimationFrontImage = jsonObject["multipageAnimationFrontImage"];
480
487
  result._multipageAnimationBackImage = jsonObject["multipageAnimationBackImage"];
481
488
  result._borderBackgroundImage = jsonObject["borderBackgroundImage"];
@@ -554,6 +561,7 @@ export class Customization {
554
561
  "activityIndicatorPortraitPositionMultiplier": this.activityIndicatorPortraitPositionMultiplier,
555
562
  "activityIndicatorLandscapePositionMultiplier": this.activityIndicatorLandscapePositionMultiplier,
556
563
  "cameraPreviewVerticalPositionMultiplier": this.cameraPreviewVerticalPositionMultiplier,
564
+ "multipageButtonPositionMultiplier": this.multipageButtonPositionMultiplier,
557
565
  "multipageAnimationFrontImage": this.multipageAnimationFrontImage,
558
566
  "multipageAnimationBackImage": this.multipageAnimationBackImage,
559
567
  "borderBackgroundImage": this.borderBackgroundImage,
@@ -1,6 +1,5 @@
1
1
  import { DocumentReader } from '../../index';
2
2
  import { LivenessParams } from './LivenessParams';
3
- import { FilterObject } from './FilterObject';
4
3
 
5
4
  export class AuthenticityParams {
6
5
  get useLivenessCheck() { return this._useLivenessCheck; }
@@ -9,6 +8,7 @@ export class AuthenticityParams {
9
8
  this._set({ "useLivenessCheck": val });
10
9
  }
11
10
 
11
+ _livenessParams = new LivenessParams();
12
12
  get livenessParams() { return this._livenessParams; }
13
13
  set livenessParams(val) { (this._livenessParams = val)._apply(); }
14
14
 
@@ -96,28 +96,6 @@ export class AuthenticityParams {
96
96
  this._set({ "checkSecurityText": val });
97
97
  }
98
98
 
99
- _checkFilters = {};
100
-
101
- setCheckFilter(checkType, filter) {
102
- this._checkFilters[checkType] = filter;
103
- this._set({
104
- "setCheckFilter": {
105
- "checkType": checkType,
106
- "filterObject": filter.toJson(),
107
- },
108
- });
109
- }
110
-
111
- removeCheckFilter(checkType) {
112
- delete this._checkFilters[checkType];
113
- this._set({ "removeCheckFilter": checkType });
114
- }
115
-
116
- clearCheckFilter() {
117
- this._checkFilters = {};
118
- this._set({ "clearCheckFilter": null });
119
- }
120
-
121
99
  static fromJson(jsonObject) {
122
100
  if (jsonObject == null) return new AuthenticityParams();
123
101
 
@@ -139,8 +117,6 @@ export class AuthenticityParams {
139
117
  result._checkPhotoComparison = jsonObject["checkPhotoComparison"];
140
118
  result._checkLetterScreen = jsonObject["checkLetterScreen"];
141
119
  result._checkSecurityText = jsonObject["checkSecurityText"];
142
- result._checkFilters = Object.fromEntries(Object.entries(jsonObject["checkFilters"] ?? {})
143
- .map(([k, v]) => [k, FilterObject.fromJson(v)]));
144
120
 
145
121
  return result;
146
122
  }
@@ -170,25 +146,6 @@ export class AuthenticityParams {
170
146
  "checkPhotoComparison": this.checkPhotoComparison,
171
147
  "checkLetterScreen": this.checkLetterScreen,
172
148
  "checkSecurityText": this.checkSecurityText,
173
- "checkFilters": Object.fromEntries(Object.entries(this._checkFilters).map(([k, v]) => [k, v.toJson()])),
174
149
  }
175
150
  }
176
151
  }
177
-
178
- export const AuthenticityCheckType = {
179
- USE_LIVENESS: "checkLiveness",
180
- UV_LUMINISCENCE: "checkUVLuminiscence",
181
- IR_B900: "checkIRB900",
182
- IMAGE_PATTERNS: "checkImagePatterns",
183
- FIBERS: "checkFibers",
184
- EXT_MRZ: "checkExtMRZ",
185
- EXT_OCR: "checkExtOCR",
186
- AXIAL: "checkAxial",
187
- BARCODE_FORMAT: "checkBarcodeFormat",
188
- IR_VISIBILITY: "checkIRVisibility",
189
- IPI: "checkIPI",
190
- PHOTO_EMBEDDING: "checkPhotoEmbedding",
191
- PHOTO_COMPARISON: "checkPhotoComparison",
192
- LETTER_SCREEN: "checkLetterScreen",
193
- SECURITY_TEXT: "checkSecurityText",
194
- };