@regulaforensics/document-reader 9.4.745-rc → 9.4.748-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 (45) hide show
  1. package/RNDocumentReader.podspec +1 -1
  2. package/android/build.gradle +1 -1
  3. package/android/cordova.gradle +1 -1
  4. package/android/src/main/java/com/regula/plugin/documentreader/JSONConstructor.kt +36 -0
  5. package/android/src/main/java/com/regula/plugin/documentreader/Main.kt +46 -43
  6. package/examples/capacitor/package-lock.json +21 -21
  7. package/examples/capacitor/package.json +3 -3
  8. package/examples/ionic/package-lock.json +464 -421
  9. package/examples/ionic/package.json +8 -4
  10. package/examples/react_native/package-lock.json +790 -1341
  11. package/examples/react_native/package.json +7 -3
  12. package/ios/RGLWJSONConstructor.h +4 -0
  13. package/ios/RGLWJSONConstructor.m +93 -47
  14. package/ios/RGLWMain.h +2 -4
  15. package/ios/RGLWMain.m +49 -13
  16. package/ios/RNDocumentReader.m +2 -0
  17. package/package.json +1 -1
  18. package/plugin.xml +1 -1
  19. package/test/json.tsx +11 -0
  20. package/test/package-lock.json +1 -1
  21. package/test/test.tsx +4 -2
  22. package/www/capacitor/config/RFIDConfig.js +14 -0
  23. package/www/capacitor/index.js +9 -7
  24. package/www/capacitor/internal/bridge.js +19 -1
  25. package/www/capacitor/results/rfid/RFIDDataFileType.js +8 -0
  26. package/www/capacitor/results/visible_digital_seals/LDSParsingNotificationCodes.js +2 -0
  27. package/www/capacitor/results/visual_results/FieldType.js +1 -0
  28. package/www/capacitor/rfid/CAProtocol.js +27 -0
  29. package/www/capacitor/rfid/PACEProtocol.js +24 -0
  30. package/www/cordova.js +163 -29
  31. package/www/react-native/config/RFIDConfig.js +14 -0
  32. package/www/react-native/index.js +9 -7
  33. package/www/react-native/internal/bridge.js +19 -1
  34. package/www/react-native/results/rfid/RFIDDataFileType.js +8 -0
  35. package/www/react-native/results/visible_digital_seals/LDSParsingNotificationCodes.js +2 -0
  36. package/www/react-native/results/visual_results/FieldType.js +1 -0
  37. package/www/react-native/rfid/CAProtocol.js +27 -0
  38. package/www/react-native/rfid/PACEProtocol.js +24 -0
  39. package/www/types/config/RFIDConfig.d.ts +35 -3
  40. package/www/types/index.d.ts +3 -1
  41. package/www/types/results/rfid/RFIDDataFileType.d.ts +7 -0
  42. package/www/types/results/visible_digital_seals/LDSParsingNotificationCodes.d.ts +2 -0
  43. package/www/types/results/visual_results/FieldType.d.ts +1 -0
  44. package/www/types/rfid/CAProtocol.d.ts +6 -0
  45. package/www/types/rfid/PACEProtocol.d.ts +5 -0
@@ -0,0 +1,27 @@
1
+ export class CAProtocol {
2
+ version
3
+ scheme
4
+ keyAlgorithm
5
+ chipIndividual
6
+
7
+ static fromJson(jsonObject) {
8
+ if (jsonObject == null) return null
9
+ const result = new CAProtocol()
10
+
11
+ result.version = jsonObject["version"]
12
+ result.scheme = jsonObject["scheme"]
13
+ result.keyAlgorithm = jsonObject["keyAlgorithm"]
14
+ result.chipIndividual = jsonObject["chipIndividual"]
15
+
16
+ return result
17
+ }
18
+
19
+ toJson() {
20
+ return {
21
+ "version": this.version,
22
+ "scheme": this.scheme,
23
+ "keyAlgorithm": this.keyAlgorithm,
24
+ "chipIndividual": this.chipIndividual,
25
+ }
26
+ }
27
+ }
@@ -0,0 +1,24 @@
1
+ export class PACEProtocol {
2
+ version
3
+ stdDomainParams
4
+ keyAlgorithm
5
+
6
+ static fromJson(jsonObject) {
7
+ if (jsonObject == null) return null
8
+ const result = new PACEProtocol()
9
+
10
+ result.version = jsonObject["version"]
11
+ result.stdDomainParams = jsonObject["stdDomainParams"]
12
+ result.keyAlgorithm = jsonObject["keyAlgorithm"]
13
+
14
+ return result
15
+ }
16
+
17
+ toJson() {
18
+ return {
19
+ "version": this.version,
20
+ "stdDomainParams": this.stdDomainParams,
21
+ "keyAlgorithm": this.keyAlgorithm,
22
+ }
23
+ }
24
+ }
@@ -5,6 +5,8 @@ import { RFIDNotification } from "../rfid/RFIDNotification";
5
5
  import { PAResourcesIssuer } from "../rfid/PAResourcesIssuer";
6
6
  import { PKDCertificate } from "../rfid/PKDCertificate";
7
7
  import { TAChallenge } from "../rfid/TAChallenge";
8
+ import { PACEProtocol } from "../rfid/PACEProtocol";
9
+ import { CAProtocol } from "../rfid/CAProtocol";
8
10
 
9
11
  /**
10
12
  * A configuration file for the RFID chip processing.
@@ -49,6 +51,16 @@ export declare class RFIDConfig {
49
51
  */
50
52
  onRequestTASignature?: TaSignatureCompletion;
51
53
 
54
+ /**
55
+ * Callback for receiving RFID request data
56
+ */
57
+ onRequestPACEProtocol?: PACEProtocolCompletion;
58
+
59
+ /**
60
+ * Callback for receiving RFID request data
61
+ */
62
+ onRequestCAProtocol?: CAProtocolCompletion;
63
+
52
64
  /**
53
65
  * Regular RFID chip reading.
54
66
  *
@@ -106,12 +118,12 @@ export type ChipDetectedCompletion = () => void;
106
118
  export type RetryReadChipCompletion = (error: RFIDException) => void;
107
119
 
108
120
  /**
109
- * Callback for receiving RFID request data
121
+ * Callback for receiving RFID request data.
110
122
  */
111
123
  export type PaCertificateCompletion = (serialNumber: string, issuer: PAResourcesIssuer | null, request: PKDCertificateRequest) => void;
112
124
 
113
125
  /**
114
- * Callback for receiving RFID request data
126
+ * Callback for receiving RFID request data.
115
127
  */
116
128
  export type TaCertificateCompletion = (keyCAR: string | null, request: PKDCertificateRequest) => void;
117
129
 
@@ -121,7 +133,7 @@ export type TaCertificateCompletion = (keyCAR: string | null, request: PKDCertif
121
133
  export type PKDCertificateRequest = (certificates?: PKDCertificate[]) => Promise<void>;
122
134
 
123
135
  /**
124
- * Callback for receiving RFID request data
136
+ * Callback for receiving RFID request data.
125
137
  */
126
138
  export type TaSignatureCompletion = (challenge: TAChallenge | null, request: TASignatureRequest) => void;
127
139
 
@@ -129,3 +141,23 @@ export type TaSignatureCompletion = (challenge: TAChallenge | null, request: TAS
129
141
  * Provided to a user for passing TASignature to the native part of DocumentReader. Base64 string.
130
142
  */
131
143
  export type TASignatureRequest = (signature?: string) => Promise<void>;
144
+
145
+ /**
146
+ * Callback for receiving RFID request data.
147
+ */
148
+ export type PACEProtocolCompletion = (protocols: PACEProtocol[], request: PACEProtocolRequest) => void;
149
+
150
+ /**
151
+ * Provided to a user for choosing PACEProtocol.
152
+ */
153
+ export type PACEProtocolRequest = (protocol: PACEProtocol) => Promise<void>;
154
+
155
+ /**
156
+ * Callback for receiving RFID request data.
157
+ */
158
+ export type CAProtocolCompletion = (protocols: CAProtocol[], request: CAProtocolRequest) => void;
159
+
160
+ /**
161
+ * Provided to a user for choosing CAProtocol.
162
+ */
163
+ export type CAProtocolRequest = (protocol: CAProtocol) => Promise<void>;
@@ -133,8 +133,10 @@ import { TccParams } from './rfid/TccParams';
133
133
  import { RFIDNotification, RFIDNotificationCodes } from './rfid/RFIDNotification';
134
134
  import { PAAttribute } from './rfid/PAAttribute';
135
135
  import { TAChallenge } from './rfid/TAChallenge';
136
+ import { PACEProtocol } from './rfid/PACEProtocol';
137
+ import { CAProtocol } from './rfid/CAProtocol';
136
138
  import { PKDCertificate, PKDResourceType } from './rfid/PKDCertificate';
137
- export { PAResourcesIssuer, RFIDErrorCodes, TccParams, RFIDNotification, RFIDNotificationCodes, PAAttribute, TAChallenge, PKDCertificate, PKDResourceType };
139
+ export { PAResourcesIssuer, RFIDErrorCodes, TccParams, RFIDNotification, RFIDNotificationCodes, PAAttribute, TAChallenge, PACEProtocol, CAProtocol, PKDCertificate, PKDResourceType };
138
140
 
139
141
  import { DataRetrieval, MDLDocRequestPreset, MDLDeviceRetrieval } from './mdl/DataRetrieval';
140
142
  import { DeviceEngagement, MDLDeviceEngagement } from './mdl/DeviceEngagement';
@@ -54,6 +54,7 @@ export declare enum RFIDDataFileType {
54
54
  ID_DG19 = 119,
55
55
  ID_DG20 = 120,
56
56
  ID_DG21 = 121,
57
+ ID_DG22 = 122,
57
58
  DL_COM = 150,
58
59
  DL_DG1 = 151,
59
60
  DL_DG2 = 152,
@@ -89,6 +90,12 @@ export declare enum RFIDDataFileType {
89
90
  SESSION = 701,
90
91
  LOGDATA = 702,
91
92
  CHIP_PROPERTIES = 703,
93
+ POST_CA_RESPONSE = 710,
94
+ POST_CA_PUBLIC_KEY = 711,
95
+ POST_CA_INFO = 712,
96
+ POST_CA_DPARAMS = 713,
97
+ POST_CA_CHECK_PK = 714,
98
+ POST_CA_CHECK_SK = 715,
92
99
  SAM_DATA = 800,
93
100
  SAM_DATA_MAX = 832,
94
101
  VDS = 900,
@@ -207,6 +207,8 @@ export declare enum LDSParsingNotificationCodes {
207
207
  SI_STORAGE_PRIVILEGED_TI_INCORRECT_USAGE = -1862266610,
208
208
  SI_STORAGE_RI_DOMAIN_PARAMS_MULTIPLE_ENTRIES = -1862266609,
209
209
  SI_STORAGE_PACE_INFOS_NON_CONSISTANT = -1862266608,
210
+ SI_STORAGE_CS_NONCONSISTANT = 0x91000111,
211
+ SI_STORAGE_CS_PACE_CAM_KEY_MISSING = 0x91000112,
210
212
  CV_CERTIFICATE_PROFILE_INCORRECT_VERSION = -1862266367,
211
213
  CV_CERTIFICATE_VALIDITY = -1862266366,
212
214
  CV_CERTIFICATE_NON_CV_CA_DOMAIN_PARAMETERS = -1862266365,
@@ -1315,6 +1315,7 @@ export declare enum FieldType {
1315
1315
  /** Jurisdiction specific data. */
1316
1316
  JURISDICTION_SPECIFIC_DATA = 703,
1317
1317
  DATA_DATE_OF_EXPIRY = 704,
1318
+ CONSUL = 705,
1318
1319
  }
1319
1320
 
1320
1321
  export declare namespace FieldType {
@@ -0,0 +1,6 @@
1
+ export declare class CAProtocol {
2
+ readonly version: string;
3
+ readonly scheme: string;
4
+ readonly keyAlgorithm: string;
5
+ readonly chipIndividual: boolean;
6
+ }
@@ -0,0 +1,5 @@
1
+ export declare class PACEProtocol {
2
+ readonly version: string;
3
+ readonly stdDomainParams: string;
4
+ readonly keyAlgorithm: string;
5
+ }