@regulaforensics/document-reader 9.1.485-nightly → 9.1.493-beta
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/RNDocumentReader.podspec +2 -2
- package/android/build.gradle +2 -2
- package/android/cordova.gradle +2 -2
- package/android/src/main/java/com/regula/plugin/documentreader/Config.kt +8 -0
- package/android/src/main/java/com/regula/plugin/documentreader/JSONConstructor.kt +346 -40
- package/android/src/main/java/com/regula/plugin/documentreader/Main.kt +62 -8
- package/android/src/main/java/com/regula/plugin/documentreader/Utils.kt +62 -0
- package/examples/capacitor/ios/App/App/Info.plist +2 -0
- package/examples/capacitor/package.json +1 -1
- package/examples/ionic/config.xml +2 -0
- package/examples/ionic/package-lock.json +5257 -2650
- package/examples/ionic/package.json +10 -10
- package/examples/react_native/app.config.ts +3 -1
- package/examples/react_native/package-lock.json +3 -3
- package/examples/react_native/package.json +1 -1
- package/ios/RGLWConfig.m +9 -2
- package/ios/RGLWJSONConstructor.h +19 -0
- package/ios/RGLWJSONConstructor.m +349 -0
- package/ios/RGLWMain.m +49 -0
- package/package.json +1 -1
- package/plugin.xml +2 -2
- package/test/json.tsx +200 -95
- package/test/package-lock.json +1 -1
- package/test/test.tsx +12 -2
- package/www/capacitor/engagement/DataRetrieval.js +55 -0
- package/www/capacitor/engagement/DeviceEngagement.js +30 -0
- package/www/capacitor/engagement/DeviceRetrievalMethod.js +41 -0
- package/www/capacitor/engagement/DocumentRequestMDL.js +212 -0
- package/www/capacitor/engagement/NameSpaceMDL.js +33 -0
- package/www/capacitor/index.js +54 -2
- package/www/capacitor/info/DocReaderException.js +2 -0
- package/www/capacitor/params/Functionality.js +16 -0
- package/www/capacitor/params/customization/Customization.js +8 -0
- package/www/capacitor/params/process_params/ProcessParams.js +16 -0
- package/www/capacitor/results/Results.js +8 -1
- package/www/capacitor/results/status/AgeStatus.js +35 -0
- package/www/capacitor/results/status/ResultsStatus.js +13 -0
- package/www/capacitor/results/visible_digital_seals/DocFeature.js +23 -0
- package/www/capacitor/results/visible_digital_seals/VDSData.js +75 -0
- package/www/capacitor/results/visual_results/FieldType.js +3 -0
- package/www/capacitor/rfid/PKDCertificate.js +3 -0
- package/www/cordova.js +951 -177
- package/www/react-native/engagement/DataRetrieval.js +55 -0
- package/www/react-native/engagement/DeviceEngagement.js +30 -0
- package/www/react-native/engagement/DeviceRetrievalMethod.js +41 -0
- package/www/react-native/engagement/DocumentRequestMDL.js +212 -0
- package/www/react-native/engagement/NameSpaceMDL.js +33 -0
- package/www/react-native/index.js +54 -2
- package/www/react-native/info/DocReaderException.js +2 -0
- package/www/react-native/params/Functionality.js +16 -0
- package/www/react-native/params/customization/Customization.js +8 -0
- package/www/react-native/params/process_params/ProcessParams.js +16 -0
- package/www/react-native/results/Results.js +8 -1
- package/www/react-native/results/status/AgeStatus.js +35 -0
- package/www/react-native/results/status/ResultsStatus.js +13 -0
- package/www/react-native/results/visible_digital_seals/DocFeature.js +23 -0
- package/www/react-native/results/visible_digital_seals/VDSData.js +75 -0
- package/www/react-native/results/visual_results/FieldType.js +3 -0
- package/www/react-native/rfid/PKDCertificate.js +3 -0
- package/www/types/engagement/DataRetrieval.d.ts +28 -0
- package/www/types/engagement/DeviceEngagement.d.ts +16 -0
- package/www/types/engagement/DeviceRetrievalMethod.d.ts +18 -0
- package/www/types/engagement/DocumentRequestMDL.d.ts +61 -0
- package/www/types/engagement/NameSpaceMDL.d.ts +16 -0
- package/www/types/index.d.ts +35 -2
- package/www/types/info/DocReaderException.d.ts +2 -0
- package/www/types/params/Functionality.d.ts +7 -0
- package/www/types/params/customization/Customization.d.ts +5 -0
- package/www/types/params/process_params/ProcessParams.d.ts +13 -0
- package/www/types/results/Results.d.ts +9 -1
- package/www/types/results/status/AgeStatus.d.ts +14 -0
- package/www/types/results/status/ResultsStatus.d.ts +9 -0
- package/www/types/results/visible_digital_seals/DocFeature.d.ts +9 -0
- package/www/types/results/visible_digital_seals/VDSData.d.ts +32 -0
- package/www/types/results/visible_digital_seals/VDSNCData.d.ts +1 -1
- package/www/types/results/visual_results/FieldType.d.ts +6 -0
- package/www/types/rfid/PKDCertificate.d.ts +7 -1
|
@@ -13,6 +13,7 @@ import { GraphicResult } from "./visual_results/GraphicResult";
|
|
|
13
13
|
import { TextResult } from "./visual_results/TextResult";
|
|
14
14
|
import { TextField } from "./visual_results/TextField";
|
|
15
15
|
import { VDSNCData } from "./visible_digital_seals/VDSNCData";
|
|
16
|
+
import { VDSData } from "./visible_digital_seals/VDSData";
|
|
16
17
|
import { Position } from "./Position";
|
|
17
18
|
import { DocumentType } from "./DocumentType";
|
|
18
19
|
import { TransactionInfo } from "./TransactionInfo";
|
|
@@ -31,6 +32,7 @@ export class Results {
|
|
|
31
32
|
chipPage
|
|
32
33
|
barcodeResult
|
|
33
34
|
vdsncData
|
|
35
|
+
vdsData
|
|
34
36
|
dtcData
|
|
35
37
|
processingFinishedStatus
|
|
36
38
|
morePagesAvailable
|
|
@@ -205,6 +207,7 @@ export class Results {
|
|
|
205
207
|
result.barcodeResult = BarcodeResult.fromJson(jsonObject["barcodeResult"]);
|
|
206
208
|
result.status = ResultsStatus.fromJson(jsonObject["status"]);
|
|
207
209
|
result.vdsncData = VDSNCData.fromJson(jsonObject["vdsncData"]);
|
|
210
|
+
result.vdsData = VDSData.fromJson(jsonObject["vdsData"]);
|
|
208
211
|
result.dtcData = jsonObject["dtcData"];
|
|
209
212
|
result.transactionInfo = TransactionInfo.fromJson(jsonObject["transactionInfo"]);
|
|
210
213
|
|
|
@@ -275,6 +278,7 @@ export class Results {
|
|
|
275
278
|
"rfidSessionData": this.rfidSessionData?.toJson(),
|
|
276
279
|
"barcodeResult": this.barcodeResult?.toJson(),
|
|
277
280
|
"vdsncData": this.vdsncData?.toJson(),
|
|
281
|
+
"vdsData": this.vdsData?.toJson(),
|
|
278
282
|
"dtcData": this.dtcData,
|
|
279
283
|
"chipPage": this.chipPage,
|
|
280
284
|
"processingFinishedStatus": this.processingFinishedStatus,
|
|
@@ -339,5 +343,8 @@ export const ResultType = {
|
|
|
339
343
|
RFID_IMAGE_DATA: 103,
|
|
340
344
|
RFID_BINARY_DATA: 104,
|
|
341
345
|
RFID_ORIGINAL_GRAPHICS: 105,
|
|
342
|
-
RFID_DTC_VC: 109
|
|
346
|
+
RFID_DTC_VC: 109,
|
|
347
|
+
MDL_PARSED_RESPONSE: 121,
|
|
348
|
+
VDS_NC: 124,
|
|
349
|
+
VDS: 125,
|
|
343
350
|
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { CheckResult } from './CheckResult';
|
|
2
|
+
|
|
3
|
+
export class AgeStatus {
|
|
4
|
+
threshold
|
|
5
|
+
overThreshold
|
|
6
|
+
over18
|
|
7
|
+
over21
|
|
8
|
+
over25
|
|
9
|
+
over65
|
|
10
|
+
|
|
11
|
+
static fromJson(jsonObject) {
|
|
12
|
+
if (jsonObject == null) return null;
|
|
13
|
+
const result = new AgeStatus();
|
|
14
|
+
|
|
15
|
+
result.threshold = jsonObject["threshold"];
|
|
16
|
+
result.overThreshold = jsonObject["overThreshold"];
|
|
17
|
+
result.over18 = jsonObject["over18"];
|
|
18
|
+
result.over21 = jsonObject["over21"];
|
|
19
|
+
result.over25 = jsonObject["over25"];
|
|
20
|
+
result.over65 = jsonObject["over65"];
|
|
21
|
+
|
|
22
|
+
return result;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
toJson() {
|
|
26
|
+
return {
|
|
27
|
+
"threshold": this.threshold,
|
|
28
|
+
"overThreshold": this.overThreshold,
|
|
29
|
+
"over18": this.over18,
|
|
30
|
+
"over21": this.over21,
|
|
31
|
+
"over25": this.over25,
|
|
32
|
+
"over65": this.over65,
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { CheckResult } from './CheckResult';
|
|
2
2
|
import { OpticalStatus } from './OpticalStatus';
|
|
3
|
+
import { AgeStatus } from './AgeStatus';
|
|
3
4
|
import { RFIDStatus } from './RFIDStatus';
|
|
4
5
|
|
|
5
6
|
export class ResultsStatus {
|
|
@@ -10,6 +11,10 @@ export class ResultsStatus {
|
|
|
10
11
|
detailsRFID
|
|
11
12
|
portrait
|
|
12
13
|
stopList
|
|
14
|
+
mDL
|
|
15
|
+
age
|
|
16
|
+
captureProcessIntegrity
|
|
17
|
+
ageStatus
|
|
13
18
|
|
|
14
19
|
static fromJson(jsonObject) {
|
|
15
20
|
if (jsonObject == null) return null;
|
|
@@ -22,6 +27,10 @@ export class ResultsStatus {
|
|
|
22
27
|
result.detailsRFID = RFIDStatus.fromJson(jsonObject["detailsRFID"]);
|
|
23
28
|
result.portrait = jsonObject["portrait"];
|
|
24
29
|
result.stopList = jsonObject["stopList"];
|
|
30
|
+
result.mDL = jsonObject["mDL"];
|
|
31
|
+
result.age = jsonObject["age"];
|
|
32
|
+
result.captureProcessIntegrity = jsonObject["captureProcessIntegrity"];
|
|
33
|
+
result.ageStatus = AgeStatus.fromJson(jsonObject["detailsAge"]);
|
|
25
34
|
|
|
26
35
|
return result;
|
|
27
36
|
}
|
|
@@ -33,8 +42,12 @@ export class ResultsStatus {
|
|
|
33
42
|
"rfid": this.rfid,
|
|
34
43
|
"portrait": this.portrait,
|
|
35
44
|
"stopList": this.stopList,
|
|
45
|
+
"mDL": this.mDL,
|
|
46
|
+
"age": this.age,
|
|
47
|
+
"captureProcessIntegrity": this.captureProcessIntegrity,
|
|
36
48
|
"detailsOptical": this.detailsOptical?.toJson(),
|
|
37
49
|
"detailsRFID": this.detailsRFID?.toJson(),
|
|
50
|
+
"detailsAge": this.ageStatus?.toJson(),
|
|
38
51
|
}
|
|
39
52
|
}
|
|
40
53
|
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { BytesData } from './BytesData';
|
|
2
|
+
|
|
3
|
+
export class DocFeature {
|
|
4
|
+
type
|
|
5
|
+
data
|
|
6
|
+
|
|
7
|
+
static fromJson(jsonObject) {
|
|
8
|
+
if (jsonObject == null) return null;
|
|
9
|
+
|
|
10
|
+
const result = new DocFeature();
|
|
11
|
+
result.type = jsonObject["type"];
|
|
12
|
+
result.data = BytesData.fromJson(jsonObject["data"]);
|
|
13
|
+
|
|
14
|
+
return result;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
toJson() {
|
|
18
|
+
return {
|
|
19
|
+
"type": this.type,
|
|
20
|
+
"data": this.data?.toJson(),
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { CertificateChain } from '../rfid/CertificateChain';
|
|
2
|
+
import { BytesData } from './BytesData';
|
|
3
|
+
import { DocFeature } from './DocFeature';
|
|
4
|
+
|
|
5
|
+
export class VDSData {
|
|
6
|
+
type
|
|
7
|
+
docType
|
|
8
|
+
featureRef
|
|
9
|
+
version
|
|
10
|
+
issuingCountry
|
|
11
|
+
docIssueDate
|
|
12
|
+
signature
|
|
13
|
+
signatureDate
|
|
14
|
+
signer
|
|
15
|
+
certificate
|
|
16
|
+
certificateChain
|
|
17
|
+
docFeatures
|
|
18
|
+
notifications
|
|
19
|
+
|
|
20
|
+
static fromJson(jsonObject) {
|
|
21
|
+
if (jsonObject == null) return null;
|
|
22
|
+
const result = new VDSData();
|
|
23
|
+
|
|
24
|
+
result.type = jsonObject["type"];
|
|
25
|
+
result.docType = jsonObject["docType"];
|
|
26
|
+
result.featureRef = jsonObject["featureRef"];
|
|
27
|
+
result.version = jsonObject["version"];
|
|
28
|
+
result.issuingCountry = jsonObject["issuingCountry"];
|
|
29
|
+
result.docIssueDate = jsonObject["docIssueDate"];
|
|
30
|
+
result.signature = BytesData.fromJson(jsonObject["signature"]);
|
|
31
|
+
result.signatureDate = jsonObject["signatureDate"];
|
|
32
|
+
result.signer = jsonObject["signer"];
|
|
33
|
+
result.certificate = jsonObject["certificate"];
|
|
34
|
+
result.notifications = jsonObject["notifications"];
|
|
35
|
+
|
|
36
|
+
if (jsonObject["certificateChain"] != null) {
|
|
37
|
+
result.certificateChain = [];
|
|
38
|
+
for (const item of jsonObject["certificateChain"]) {
|
|
39
|
+
const certificateChain = CertificateChain.fromJson(item);
|
|
40
|
+
if (certificateChain != null) {
|
|
41
|
+
result.certificateChain.push(certificateChain);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
if (jsonObject["docFeatures"] != null) {
|
|
46
|
+
result.docFeatures = [];
|
|
47
|
+
for (const item of jsonObject["docFeatures"]) {
|
|
48
|
+
const docFeature = DocFeature.fromJson(item);
|
|
49
|
+
if (docFeature != null) {
|
|
50
|
+
result.docFeatures.push(docFeature);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
return result;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
toJson() {
|
|
59
|
+
return {
|
|
60
|
+
"type": this.type,
|
|
61
|
+
"docType": this.docType,
|
|
62
|
+
"featureRef": this.featureRef,
|
|
63
|
+
"version": this.version,
|
|
64
|
+
"issuingCountry": this.issuingCountry,
|
|
65
|
+
"docIssueDate": this.docIssueDate,
|
|
66
|
+
"signature": this.signature?.toJson(),
|
|
67
|
+
"signatureDate": this.signatureDate,
|
|
68
|
+
"signer": this.signer,
|
|
69
|
+
"certificate": this.certificate,
|
|
70
|
+
"certificateChain": this.certificateChain?.map(e => e.toJson()),
|
|
71
|
+
"docFeatures": this.docFeatures?.map(e => e.toJson()),
|
|
72
|
+
"notifications": this.notifications,
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
}
|
|
@@ -653,6 +653,9 @@ export const FieldType = {
|
|
|
653
653
|
NATIONALITY_CODE_ALPHA_2: 697,
|
|
654
654
|
FIRST_ISSUE_DATE_CHECKDIGIT: 698,
|
|
655
655
|
FIRST_ISSUE_DATE_CHECKSUM: 699,
|
|
656
|
+
COMMERCIAL_INDICATOR: 701,
|
|
657
|
+
NON_DOMICILED_INDICATOR: 702,
|
|
658
|
+
JURISDICTION_SPECIFIC_DATA: 703,
|
|
656
659
|
}
|
|
657
660
|
|
|
658
661
|
FieldType.getTranslation = async function (value) {
|