@pagopa/io-react-native-iso18013 0.7.0 → 0.8.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.
Files changed (45) hide show
  1. package/IoReactNativeIso18013.podspec +1 -1
  2. package/README.md +1 -1
  3. package/android/build.gradle +3 -2
  4. package/android/gradle.properties +3 -3
  5. package/android/src/main/AndroidManifest.xml +17 -0
  6. package/android/src/main/AndroidManifestNew.xml +17 -0
  7. package/android/src/main/java/com/ioreactnativeiso18013/Enums.kt +42 -0
  8. package/android/src/main/java/com/ioreactnativeiso18013/IoNfcEngagementService.kt +17 -0
  9. package/android/src/main/java/com/ioreactnativeiso18013/IoReactNativeIso18013Module.kt +326 -132
  10. package/android/src/main/res/values/strings.xml +5 -0
  11. package/android/src/main/res/xml/nfc_engagement_apdu_service.xml +9 -0
  12. package/ios/IoReactNativeIso18013.mm +8 -9
  13. package/ios/IoReactNativeIso18013.swift +264 -191
  14. package/lib/module/cbor/cbor/README.md +3 -2
  15. package/lib/module/cbor/cose/README.md +7 -5
  16. package/lib/module/iso18013/iso18013-5/README.md +162 -42
  17. package/lib/module/iso18013/iso18013-5/error.js +1 -3
  18. package/lib/module/iso18013/iso18013-5/error.js.map +1 -1
  19. package/lib/module/iso18013/iso18013-5/index.js +1 -1
  20. package/lib/module/iso18013/iso18013-5/index.js.map +1 -1
  21. package/lib/module/iso18013/iso18013-5/proximity.js +29 -19
  22. package/lib/module/iso18013/iso18013-5/proximity.js.map +1 -1
  23. package/lib/module/iso18013/iso18013-7/README.md +2 -2
  24. package/lib/module/schema.js +1 -1
  25. package/lib/module/schema.js.map +1 -1
  26. package/lib/typescript/src/cbor/cbor/error.d.ts +5 -5
  27. package/lib/typescript/src/cbor/cose/error.d.ts +5 -5
  28. package/lib/typescript/src/iso18013/iso18013-5/error.d.ts +9 -9
  29. package/lib/typescript/src/iso18013/iso18013-5/error.d.ts.map +1 -1
  30. package/lib/typescript/src/iso18013/iso18013-5/index.d.ts +1 -1
  31. package/lib/typescript/src/iso18013/iso18013-5/index.d.ts.map +1 -1
  32. package/lib/typescript/src/iso18013/iso18013-5/proximity.d.ts +32 -13
  33. package/lib/typescript/src/iso18013/iso18013-5/proximity.d.ts.map +1 -1
  34. package/lib/typescript/src/iso18013/iso18013-7/error.d.ts +5 -5
  35. package/lib/typescript/src/schema.d.ts +7 -17
  36. package/lib/typescript/src/schema.d.ts.map +1 -1
  37. package/package.json +7 -7
  38. package/src/cbor/cbor/README.md +3 -2
  39. package/src/cbor/cose/README.md +7 -5
  40. package/src/iso18013/iso18013-5/README.md +162 -42
  41. package/src/iso18013/iso18013-5/error.ts +0 -2
  42. package/src/iso18013/iso18013-5/index.ts +3 -2
  43. package/src/iso18013/iso18013-5/proximity.ts +52 -23
  44. package/src/iso18013/iso18013-7/README.md +2 -2
  45. package/src/schema.ts +1 -1
@@ -42,8 +42,9 @@ This table contains the list of error codes that can be thrown by the `CBOR` mod
42
42
  | DECODE_ERROR | Android/iOS | An error occurred while decoding the CBOR |
43
43
  | DECODE_DOCUMENTS_ERROR | Android/iOS | An error occurred while decoding a CBOR mDOC |
44
44
  | DECODE_ISSUER_SIGNED_ERROR | Android/iOS | An error occurred while decoding a CBOR Issuer Signed object |
45
+ | EUNSPECIFIED | Android | Default error when no other error is specified |
45
46
 
46
- An error can be parsed using the `ModuleErrorSchema` with type `ModuleErrorCodes` exposed by the `ISO18013_5` module. The error can be parsed as follows:
47
+ An error can be parsed using the `ModuleErrorSchema` with type `ModuleErrorCodes` exposed by the `CBOR` module. The error can be parsed as follows:
47
48
 
48
49
  ```typescript
49
50
  import { CBOR } from '@pagopa/io-react-native-iso18013';
@@ -65,7 +66,7 @@ The parsed object will contain properties from both iOS and Android platforms:
65
66
  userInfo?: Record<string, any> | null;
66
67
  nativeStackAndroid?: Array<{
67
68
  lineNumber: number;
68
- file: string;
69
+ file: string | null
69
70
  methodName: string;
70
71
  class: string;
71
72
  }>;
@@ -11,20 +11,21 @@ import { COSE } from '@pagopa/io-react-native-iso18013';
11
11
  #### `sign`
12
12
 
13
13
  Signs base64 encoded data using COSE (CBOR Object Signing and Encryption).
14
- Returns a `Promise` which resolves to a `string` containing the COSE-Sign1 object in base64 encoding or rejects with an instance of `CoseFailure` in case of failures.
14
+ Returns a `Promise` which resolves to a `string` containing the COSE-Sign1 object in base64 encoding or rejects with a `ModuleError` in case of failures.
15
15
 
16
16
  ```typescript
17
17
  try {
18
18
  const coseSign1 = await COSE.sign('base64EncodedData', 'keyTag');
19
19
  } catch (e) {
20
- const { message, userInfo } = e as CoseFailure;
20
+ const parsedError = COSE.ModuleErrorSchema.parse(e);
21
+ console.log(parsedError.code, parsedError.message);
21
22
  }
22
23
  ```
23
24
 
24
25
  #### `verify`
25
26
 
26
27
  Verifies a COSE-Sign1 object using the provided public key.
27
- Returns a `Promise` which resolves to a `boolean` indicating if the signature is valid or rejects with an instance of `CoseFailure` in case of failures.
28
+ Returns a `Promise` which resolves to a `boolean` indicating if the signature is valid or rejects with a `ModuleError` in case of failures.
28
29
 
29
30
  ```typescript
30
31
  // public key in JWK format
@@ -38,7 +39,8 @@ const publicKey = {
38
39
  try {
39
40
  const isValid = await COSE.verify('coseSign1Base64Data', publicKey);
40
41
  } catch (e) {
41
- const { message, userInfo } = e as CoseFailure;
42
+ const parsedError = COSE.ModuleErrorSchema.parse(e);
43
+ console.log(parsedError.code, parsedError.message);
42
44
  }
43
45
  ```
44
46
 
@@ -73,7 +75,7 @@ The parsed object will contain properties from both iOS and Android platforms:
73
75
  userInfo?: Record<string, any> | null;
74
76
  nativeStackAndroid?: Array<{
75
77
  lineNumber: number;
76
- file: string;
78
+ file: string | null
77
79
  methodName: string;
78
80
  class: string;
79
81
  }>;
@@ -9,27 +9,78 @@ yarn add @pagopa/io-react-native-iso18013
9
9
  cd ios && bundle exec pod install && cd ..
10
10
  ```
11
11
 
12
+ ## Permission
13
+
14
+ This library uses Bluetooth capabilities in order to implement the proximity flow defined in the ISO 18013-5 standard. Thus, Bluetooth permissions must be added to the native projects.
15
+
16
+ ### Android
17
+
18
+ Add the following permissions to your `AndroidManifest.xml`:
19
+
20
+ ```xml
21
+ <!-- Required for Bluetooth on Android >=12 or SDK >=31 -->
22
+
23
+ <!-- We defined the neverForLocation flag as we do not derive it from the Bluetooth -->
24
+ <uses-permission android:name="android.permission.BLUETOOTH_SCAN" android:usesPermissionFlags="neverForLocation"/>
25
+ <uses-permission android:name="android.permission.BLUETOOTH_CONNECT" />
26
+ <uses-permission android:name="android.permission.BLUETOOTH_ADVERTISE" />
27
+
28
+ <!-- Required for Bluetooth on Android <=11 SDK <= 30 -->
29
+ <uses-permission android:name="android.permission.BLUETOOTH"
30
+ android:maxSdkVersion="30" />
31
+ <uses-permission android:name="android.permission.BLUETOOTH_ADMIN"
32
+ android:maxSdkVersion="30" />
33
+ <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" android:maxSdkVersion="30"/>
34
+ ```
35
+
36
+ Please note that the `neverForLocation` flag of `BLUETOOTH_SCAN` indicates that the app does not derive location information from Bluetooth scans. However, you still need to include the `ACCESS_FINE_LOCATION` permission for Android versions <=11 (SDK <=30) to enable Bluetooth scanning.
37
+
38
+ ### iOS
39
+
40
+ Add the following keys to your `Info.plist`:
41
+
42
+ ```xml
43
+ <!-- Required for Bluetooth usage -->
44
+ <key>NSBluetoothAlwaysUsageDescription</key>
45
+ <string>$(PRODUCT_NAME) needs access BLE.</string>
46
+ <key>NSBluetoothPeripheralUsageDescription</key>
47
+ <string>$(PRODUCT_NAME) needs access BLE.</string>
48
+ <key>NSBluetoothScanUsageDescription</key>
49
+ <string>$(PRODUCT_NAME) needs access to scan for nearby Bluetooth devices.</string>
50
+ ```
51
+
52
+ More info can be found in the [official Android documentation](https://developer.android.com/develop/connectivity/bluetooth/bt-permissions).
53
+
12
54
  ## Events
13
55
 
14
56
  This library emits the following events:
15
57
  | Event | Payload | Description |
16
- |---------------------------|--------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------|
17
- | onDeviceConnecting (iOS only) | `undefined` | Event dispatched when the verifier app is connecting |
58
+ |---------------------------|---------------------------------------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------|
59
+ | onQrCodeString | `{ data: string }` | Event dispatched when the QR Code payload is generated. Contains the QR code string to display. |
60
+ | onNfcStarted | `undefined` | Event dispatched when NFC starts successfully. |
61
+ | onNfcStopped | `undefined` | Event dispatched when NFC stops successfully. |
62
+ | onDeviceConnecting | `undefined` | Event dispatched when the verifier app is connecting. |
18
63
  | onDeviceConnected | `undefined` | Event dispatched when the verifier app is connected. |
19
- | onDocumentRequestReceived | `{ data: string } \| undefined` | Event dispatched when the consumer app receives a new request, contained in the data payload. It can be parsed via the `parseVerifierRequest` provided [here](src/schema.ts). |
64
+ | onDocumentRequestReceived | `{ data: string; retrievalMethod: RetrievalMethod }` | Event dispatched when the consumer app receives a new request. The `data` payload can be parsed via the `parseVerifierRequest` function. The `retrievalMethod` indicates whether BLE or NFC was used. |
20
65
  | onDeviceDisconnected | `undefined` | Event dispatched when the verifier app disconnects by sending the END (0x02) flag. |
21
- | onError | `{ error: string } \| undefined` | Event dispatched when an error occurs which is contained in the error payload. It can be parsed via the `parseError` provided [here](src/schema.ts). |
66
+ | onError | `{ error?: string } \| undefined` | Event dispatched when an error occurs which is contained in the error payload. It can be parsed with `ISO18013_5.OnErrorPayloadSchema`. |
22
67
 
23
- The events flow is described in the following diagram:
68
+ Where `RetrievalMethod` is defined as `'ble' | 'nfc'`.
69
+
70
+ ### QR Code engagement flow
71
+
72
+ The events flow for QR Code engagement is described in the following diagram:
24
73
 
25
74
  ```mermaid
26
75
  flowchart LR
27
- onDeviceConnecting["onDeviceConnecting *(iOS only)*"]
76
+ onQrCodeString["onQrCodeString"]
77
+ onDeviceConnecting["onDeviceConnecting"]
28
78
  onDeviceConnected["onDeviceConnected"]
29
79
  onDocumentRequestReceived["onDocumentRequestReceived"]
30
80
  onDeviceDisconnected["onDeviceDisconnected"]
31
81
  onError["onError"]
32
82
 
83
+ onQrCodeString -- "Verifier scan the QR Code" --> onDeviceConnecting
33
84
  onDeviceConnecting -- "Verifier app connects" --> onDeviceConnected
34
85
 
35
86
  onDeviceConnected -- "Verifier app sends request" --> onDocumentRequestReceived
@@ -40,6 +91,36 @@ flowchart LR
40
91
  onDocumentRequestReceived -- "Error status or abrupt disconnection" --> onError
41
92
  ```
42
93
 
94
+ ### NFC engagement flow
95
+
96
+ The events flow for NFC engagement is described in the following diagram:
97
+
98
+ ```mermaid
99
+ flowchart LR
100
+ onNfcStarted["onNfcStarted"]
101
+ onNfcStopped["onNfcStopped"]
102
+ onDeviceConnecting["onDeviceConnecting"]
103
+ onDeviceConnected["onDeviceConnected"]
104
+ onDocumentRequestReceived["onDocumentRequestReceived"]
105
+ onDeviceDisconnected["onDeviceDisconnected"]
106
+ onError["onError"]
107
+
108
+ onNfcStarted -- "Verifier taps NFC" --> onDeviceConnecting
109
+ onDeviceConnecting -- "Verifier app connects" --> onDeviceConnected
110
+
111
+ onDeviceConnected -- "Verifier app sends request" --> onDocumentRequestReceived
112
+ onDeviceConnected -- "Verifier sends END (0x02)" --> onDeviceDisconnected
113
+ onDeviceConnected -- "Error status or abrupt disconnection" --> onError
114
+
115
+ onDocumentRequestReceived -- "Verifier sends END (0x02)" --> onDeviceDisconnected
116
+ onDocumentRequestReceived -- "Error status or abrupt disconnection" --> onError
117
+
118
+ onError --> onNfcStopped
119
+ onDeviceDisconnected --> onNfcStopped
120
+ ```
121
+
122
+ ### Listen for events
123
+
43
124
  Listeners can be added using the `addListener` method and removed by using the returned reference by calling the `remove` method.
44
125
 
45
126
  ```typescript
@@ -52,6 +133,39 @@ const listener = ISO18013_5.addListener('event', () =>
52
133
  listener.remove();
53
134
  ```
54
135
 
136
+ #### `onQrCodeString`
137
+
138
+ ```typescript
139
+ import { ISO18013_5 } from '@pagopa/io-react-native-iso18013';
140
+
141
+ ISO18013_5.addListener(
142
+ 'onQrCodeString',
143
+ (payload: ISO18013_5.EventsPayload['onQrCodeString']) => {
144
+ console.log('QR Code payload received: ', payload.data);
145
+ }
146
+ );
147
+ ```
148
+
149
+ #### `onNfcStarted`
150
+
151
+ ```typescript
152
+ import { ISO18013_5 } from '@pagopa/io-react-native-iso18013';
153
+
154
+ ISO18013_5.addListener('onNfcStarted', () => {
155
+ console.log('NFC started and ready for engagement');
156
+ });
157
+ ```
158
+
159
+ #### `onNfcStopped`
160
+
161
+ ```typescript
162
+ import { ISO18013_5 } from '@pagopa/io-react-native-iso18013';
163
+
164
+ ISO18013_5.addListener('onNfcStopped', () => {
165
+ console.log('NFC stopped');
166
+ });
167
+ ```
168
+
55
169
  #### `onDeviceConnecting`
56
170
 
57
171
  ```typescript
@@ -117,13 +231,13 @@ ISO18013_5.addListener(
117
231
  if (!data || !data.error) {
118
232
  throw new Error('No error data received');
119
233
  }
120
- const parsedError = parseError(data.error);
234
+ const parsedError = ISO18013_5.OnErrorPayloadSchema.parse(data.error);
121
235
  console.error(`onError: ${parsedError}`);
122
236
  } catch (e) {
123
237
  console.error('Error parsing onError data:', e);
124
238
  } finally {
125
239
  // Close the flow on error
126
- await closeFlow();
240
+ await ISO18013_5.close();
127
241
  }
128
242
  }
129
243
  );
@@ -131,27 +245,37 @@ ISO18013_5.addListener(
131
245
 
132
246
  ## Methods
133
247
 
134
- #### `start`
248
+ #### `startEngagement`
249
+
250
+ Starts the proximity flow with the specified engagement and retrieval modes. By default enables both QR code and NFC engagement with both BLE and NFC retrieval. NFC engagement requires iOS 17.4+ on iOS and HCE support on Android.
135
251
 
136
- Starts the proximity flow and starts the bluetooth service. This method also accepts optional parameters to configure the initialization on Android, along with the possibility
137
- to specify a certificates of array to verify the reader app.
252
+ | Parameter | Platform | Default | Description |
253
+ | ------------------- | ----------- | -------------------- | ------------------------------------------------------------------------------------------------------------------------- |
254
+ | `peripheralMode` | Android | `true` | Whether the device is in peripheral mode |
255
+ | `centralClientMode` | Android | `false` | Whether the device is in central client mode |
256
+ | `clearBleCache` | Android | `true` | Whether the BLE cache should be cleared |
257
+ | `certificates` | Android/iOS | `[]` | Two-dimensional array of base64 strings representing DER encoded X.509 certificates used to authenticate the verifier app |
258
+ | `engagementModes` | Android/iOS | `['qrcode', 'nfc']` | Array of engagement modes to activate (`'qrcode'` and/or `'nfc'`) |
259
+ | `retrievalMethods` | Android/iOS | `['ble', 'nfc']` | Array of supported retrieval methods (`'ble'` and/or `'nfc'`) |
138
260
 
139
261
  ```typescript
140
262
  import { ISO18013_5 } from '@pagopa/io-react-native-iso18013';
141
263
 
142
- await ISO18013_5.start();
143
- ```
144
-
145
- #### `getQrCodeString`
264
+ // Starts both QR and NFC engagement with BLE and NFC retrieval (defaults)
265
+ await ISO18013_5.startEngagement();
146
266
 
147
- Returns the QR code string which contains a base64url encoded CBOR object which encodes the bluetooth engagement data.
148
- It can be used to display the QR code in the UI which will be scanned by the verifier app.
149
-
150
- ```typescript
151
- import { ISO18013_5 } from '@pagopa/io-react-native-iso18013';
267
+ // QR code engagement only (BLE retrieval)
268
+ await ISO18013_5.startEngagement({
269
+ engagementModes: ['qrcode'],
270
+ retrievalMethods: ['ble'],
271
+ });
152
272
 
153
- const qrCodeString = await ISO18013_5.getQrCodeString();
154
- console.log(qrCodeString);
273
+ // NFC engagement only, with both retrieval methods
274
+ await ISO18013_5.startEngagement({
275
+ engagementModes: ['nfc'],
276
+ retrievalMethods: ['ble', 'nfc'],
277
+ certificates: [['base64DerCert1']],
278
+ });
155
279
  ```
156
280
 
157
281
  #### `generateResponse`
@@ -199,16 +323,15 @@ await ISO18013_5.sendResponse(response);
199
323
  Sends an error response to the verifier app. The supported error codes are defined in the Table 20 of the ISO 18013-5 standard and are coded in the `ErrorCode` enum.
200
324
 
201
325
  ```typescript
202
- import { ISO18013_5, ErrorCode } from '@pagopa/io-react-native-iso18013';
326
+ import { ISO18013_5 } from '@pagopa/io-react-native-iso18013';
203
327
 
204
- await ISO18013_5.sendErrorResponse(ErrorCode.SESSION_ENCRYPTION);
328
+ await ISO18013_5.sendErrorResponse(ISO18013_5.ErrorCode.SESSION_ENCRYPTION);
205
329
  ```
206
330
 
207
331
  #### `close`
208
332
 
209
- Closes the QR engagement by releasing the resources allocated during the `start` method.
333
+ Closes the QR/NFC engagement by releasing the bluetooth connection and clearing any allocated resources.
210
334
  Before starting a new flow, it is necessary to call this method to ensure that the previous flow is properly closed.
211
- Listeners can be added using the `addListener` method and removed using the `removeListener` method.
212
335
 
213
336
  ```typescript
214
337
  import { ISO18013_5 } from '@pagopa/io-react-native-iso18013';
@@ -218,7 +341,7 @@ await ISO18013_5.close();
218
341
 
219
342
  ## Proximity Sequence Diagram
220
343
 
221
- This section describes a high level overview of the happy flow interactions between an app implementing the `io-react-native-proximity` library and a verifier app.
344
+ This section describes a high level overview of the happy flow interactions between an app implementing the `io-react-native-iso18013` library and a verifier app.
222
345
 
223
346
  ```mermaid
224
347
  sequenceDiagram
@@ -227,9 +350,8 @@ sequenceDiagram
227
350
  participant verifier as Verifier App
228
351
 
229
352
  Note over proximity, verifier: If an error occurs during the flow, the onError callback is triggered
230
- app->>+proximity: Calls start()
231
- app->>+proximity: Calls getQrCode()
232
- proximity-->>+app: QR code string
353
+ app->>+proximity: Calls startEngagement()
354
+ proximity->>+app: Triggers the onQrCodeString callback with QR code data
233
355
  app->>+app: Renders the QR code string
234
356
  verifier->>+app: Scans the QR code
235
357
  proximity->>+app: Triggers the onDeviceConnecting callback
@@ -266,17 +388,15 @@ sequenceDiagram
266
388
 
267
389
  This table contains the list of error codes that can be thrown by the `ISO18013_5` module which are mapped via the `ModuleErrorCodes` type:
268
390
 
269
- | Type | Platform | Description |
270
- | ------------------------- | ----------- | ---------------------------------------------------------------------------- |
271
- | DRH_NOT_DEFINED | Android | The device retrieval helper hasn't been initialized, call the `start` method |
272
- | QR_ENGAGEMENT_NOT_DEFINED | Android | The QR engagement hasn't been initialized, call the `start` method |
273
- | START_ERROR | Android/iOS | An error occurred while initializing the required resources |
274
- | GET_QR_CODE_ERROR | Android/iOS | An error occurred while generating the engagement QR code |
275
- | SEND_RESPONSE_ERROR | Android/iOS | An error occurred while sending the response for the verifier app |
276
- | SEND_ERROR_RESPONSE_ERROR | Android/iOS | An error occurred while sending the error response to the verifier app |
277
- | GENERATE_RESPONSE_ERROR | Android/iOS | An error occurred while generating the response for the verifier app |
278
- | CLOSE_ERROR | Android | An error occured while closing the required resources |
279
- | EUNSPECIFIED | Android | Default error when no other error is specified |
391
+ | Type | Platform | Description |
392
+ | ------------------------- | ----------- | ---------------------------------------------------------------------- |
393
+ | DRH_NOT_DEFINED | Android | The device retrieval helper hasn't been initialized |
394
+ | START_ERROR | Android/iOS | An error occurred while starting the engagement |
395
+ | SEND_RESPONSE_ERROR | Android/iOS | An error occurred while sending the response for the verifier app |
396
+ | SEND_ERROR_RESPONSE_ERROR | Android/iOS | An error occurred while sending the error response to the verifier app |
397
+ | GENERATE_RESPONSE_ERROR | Android/iOS | An error occurred while generating the response for the verifier app |
398
+ | CLOSE_ERROR | Android | An error occurred while closing the required resources |
399
+ | EUNSPECIFIED | Android | Default error when no other error is specified |
280
400
 
281
401
  An error can be parsed using the `ModuleErrorSchema` with type `ModuleErrorCodes` exposed by the `ISO18013_5` module. The error can be parsed as follows:
282
402
 
@@ -300,7 +420,7 @@ The parsed object will contain properties from both iOS and Android platforms:
300
420
  userInfo?: Record<string, any> | null;
301
421
  nativeStackAndroid?: Array<{
302
422
  lineNumber: number;
303
- file: string;
423
+ file: string | null
304
424
  methodName: string;
305
425
  class: string;
306
426
  }>;
@@ -12,9 +12,7 @@ export const OnErrorPayloadSchema = z.string().catch('Unknown error');
12
12
  */
13
13
  const ModuleErrorCodesSchema = z.enum(['DRH_NOT_DEFINED',
14
14
  // Android only
15
- 'QR_ENGAGEMENT_NOT_DEFINED',
16
- // Android only
17
- 'START_ERROR', 'GET_QR_CODE_ERROR', 'SEND_RESPONSE_ERROR', 'SEND_ERROR_RESPONSE_ERROR', 'GENERATE_RESPONSE_ERROR', 'CLOSE_ERROR',
15
+ 'START_ERROR', 'SEND_RESPONSE_ERROR', 'SEND_ERROR_RESPONSE_ERROR', 'GENERATE_RESPONSE_ERROR', 'CLOSE_ERROR',
18
16
  // Android only
19
17
  'EUNSPECIFIED' // Android only default when no other error is specified
20
18
  ]);
@@ -1 +1 @@
1
- {"version":3,"names":["z","GenericModuleErrorSchema","OnErrorPayloadSchema","string","catch","ModuleErrorCodesSchema","enum","ModuleErrorSchema"],"sourceRoot":"../../../../src","sources":["iso18013/iso18013-5/error.ts"],"mappings":";;AAAA,OAAOA,CAAC,MAAM,KAAK;AACnB,SAASC,wBAAwB,QAAQ,iBAAc;;AAEvD;AACA;AACA;AACA,OAAO,MAAMC,oBAAoB,GAAGF,CAAC,CAACG,MAAM,CAAC,CAAC,CAACC,KAAK,CAAC,eAAe,CAAC;AAIrE;AACA;AACA;AACA,MAAMC,sBAAsB,GAAGL,CAAC,CAACM,IAAI,CAAC,CACpC,iBAAiB;AAAE;AACnB,2BAA2B;AAAE;AAC7B,aAAa,EACb,mBAAmB,EACnB,qBAAqB,EACrB,2BAA2B,EAC3B,yBAAyB,EACzB,aAAa;AAAE;AACf,cAAc,CAAE;AAAA,CACjB,CAAC;AAIF;AACA;AACA;AACA,OAAO,MAAMC,iBAAiB,GAAGN,wBAAwB,CACvDI,sBACF,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["z","GenericModuleErrorSchema","OnErrorPayloadSchema","string","catch","ModuleErrorCodesSchema","enum","ModuleErrorSchema"],"sourceRoot":"../../../../src","sources":["iso18013/iso18013-5/error.ts"],"mappings":";;AAAA,OAAOA,CAAC,MAAM,KAAK;AACnB,SAASC,wBAAwB,QAAQ,iBAAc;;AAEvD;AACA;AACA;AACA,OAAO,MAAMC,oBAAoB,GAAGF,CAAC,CAACG,MAAM,CAAC,CAAC,CAACC,KAAK,CAAC,eAAe,CAAC;AAIrE;AACA;AACA;AACA,MAAMC,sBAAsB,GAAGL,CAAC,CAACM,IAAI,CAAC,CACpC,iBAAiB;AAAE;AACnB,aAAa,EACb,qBAAqB,EACrB,2BAA2B,EAC3B,yBAAyB,EACzB,aAAa;AAAE;AACf,cAAc,CAAE;AAAA,CACjB,CAAC;AAIF;AACA;AACA;AACA,OAAO,MAAMC,iBAAiB,GAAGN,wBAAwB,CACvDI,sBACF,CAAC","ignoreList":[]}
@@ -2,5 +2,5 @@
2
2
 
3
3
  export { parseVerifierRequest } from "./request.js";
4
4
  export { OnErrorPayloadSchema, ModuleErrorSchema } from "./error.js";
5
- export { ErrorCode, addListener, close, generateResponse, getQrCodeString, sendErrorResponse, sendResponse, start } from "./proximity.js";
5
+ export { ErrorCode, addListener, startEngagement, close, generateResponse, sendErrorResponse, sendResponse } from "./proximity.js";
6
6
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["parseVerifierRequest","OnErrorPayloadSchema","ModuleErrorSchema","ErrorCode","addListener","close","generateResponse","getQrCodeString","sendErrorResponse","sendResponse","start"],"sourceRoot":"../../../../src","sources":["iso18013/iso18013-5/index.ts"],"mappings":";;AAAA,SAA+BA,oBAAoB,QAAQ,cAAW;AAEtE,SAEEC,oBAAoB,EACpBC,iBAAiB,QAGZ,YAAS;AAEhB,SACEC,SAAS,EAGTC,WAAW,EACXC,KAAK,EACLC,gBAAgB,EAChBC,eAAe,EACfC,iBAAiB,EACjBC,YAAY,EACZC,KAAK,QACA,gBAAa","ignoreList":[]}
1
+ {"version":3,"names":["parseVerifierRequest","OnErrorPayloadSchema","ModuleErrorSchema","ErrorCode","addListener","startEngagement","close","generateResponse","sendErrorResponse","sendResponse"],"sourceRoot":"../../../../src","sources":["iso18013/iso18013-5/index.ts"],"mappings":";;AAAA,SAA+BA,oBAAoB,QAAQ,cAAW;AAEtE,SAEEC,oBAAoB,EACpBC,iBAAiB,QAGZ,YAAS;AAEhB,SACEC,SAAS,EAKTC,WAAW,EACXC,eAAe,EACfC,KAAK,EACLC,gBAAgB,EAChBC,iBAAiB,EACjBC,YAAY,QACP,gBAAa","ignoreList":[]}
@@ -6,9 +6,12 @@ const eventEmitter = new NativeEventEmitter(IoReactNativeIso18013);
6
6
 
7
7
  /**
8
8
  * Events emitted by the native module:
9
- * - `onDeviceConnecting`: (iOS only) Emitted when the device is connecting to the verifier app.
9
+ * - `onQrCodeString`: Emitted when the QR Code payload is generated.
10
+ * - `onNfcStarted`: Emitted when NFC starts successfully.
11
+ * - `onNfcStopped`: Emitted when NFC stops successfully.
12
+ * - `onDeviceConnecting`: Emitted when the device is connecting to the verifier app (QR and NFC flows on both iOS and Android).
10
13
  * - `onDeviceConnected`: Emitted when the device is connected to the verifier app.
11
- * - `onDocumentRequestReceived`: Emitted when a document request is received from the verifier app. Carries a payload containing the request data.
14
+ * - `onDocumentRequestReceived`: Emitted when a document request is received from the verifier app. Carries a payload containing the request data and the retrieval method.
12
15
  * - `onDeviceDisconnected`: Emitted when the device is disconnected from the verifier app.
13
16
  * - `onError`: Emitted when an error occurs. Carries a payload containing the error data.
14
17
  */
@@ -30,37 +33,44 @@ export let ErrorCode = /*#__PURE__*/function (ErrorCode) {
30
33
  }({});
31
34
 
32
35
  /**
33
- * Starts the proximity flow by allocating the necessary resources and initializing the Bluetooth stack.
36
+ * Supported engagement modes for initiating the presentation session.
37
+ * - qrcode: the presentation session is initiated by scanning a QR code generated by the verifier app. The requested data is then retrieved via BLE communication between the user device and the verifier app.
38
+ * - nfc: the presentation session is initiated by tapping the user device on an NFC tag of the verifier app. The requested data is then retrieved via NFC or BLE communication between the user device and the verifier app.
39
+ */
40
+
41
+ /**
42
+ * Supported methods for retrieving the requested data from the user device.
43
+ * - ble: the requested data is retrieved via Bluetooth Low Energy communication between the user device and the verifier app.
44
+ * - nfc: the requested data is retrieved via NFC communication between the user device and the verifier app.
45
+ */
46
+
47
+ /**
48
+ * Starts proximity engagement with caller-controlled retrieval methods.
34
49
  * Resolves to true or rejects in case of error.
35
50
  * @param config.peripheralMode (Android only) - Whether the device is in peripheral mode. Defaults to true
36
51
  * @param config.centralClientMode (Android only) - Whether the device is in central client mode. Defaults to false
37
52
  * @param config.clearBleCache (Android only) - Whether the BLE cache should be cleared. Defaults to true
38
53
  * @param config.certificates - Two-dimensional array of base64 strings representing DER encoded X.509 certificate which are used to authenticate the verifier app
54
+ * @param config.engagementMethods - Array of engagements methods initiated. Defaults to ['qr', 'nfc']
55
+ * @param config.retrievalMethods - Array of supported retrieval methods. Defaults to ['ble', 'nfc']
39
56
  * @throws {ModuleError} in case of error which can be parsed with {@link ModuleErrorSchema}
40
57
  */
41
- export function start(config = {}) {
58
+ export function startEngagement(config = {}) {
42
59
  const {
43
- peripheralMode,
44
- centralClientMode,
45
- clearBleCache,
46
- certificates
60
+ peripheralMode = true,
61
+ centralClientMode = false,
62
+ clearBleCache = true,
63
+ certificates = [],
64
+ engagementModes = ['qrcode', 'nfc'],
65
+ retrievalMethods = ['ble', 'nfc']
47
66
  } = config;
48
67
  if (Platform.OS === 'ios') {
49
- return IoReactNativeIso18013.start(certificates ? certificates : []);
68
+ return IoReactNativeIso18013.startEngagement(certificates, engagementModes, retrievalMethods);
50
69
  } else {
51
- return IoReactNativeIso18013.start(peripheralMode ? peripheralMode : true, centralClientMode ? centralClientMode : false, clearBleCache ? clearBleCache : true, certificates ? certificates : []);
70
+ return IoReactNativeIso18013.startEngagement(peripheralMode, centralClientMode, clearBleCache, certificates, engagementModes, retrievalMethods);
52
71
  }
53
72
  }
54
73
 
55
- /**
56
- * Creates a QR code to be scanned in order to initialize the presentation.
57
- * Resolves with a string containing the QR code or rejects in case of error.
58
- * @throws {ModuleError} in case of error which can be parsed with {@link ModuleErrorSchema}
59
- */
60
- export function getQrCodeString() {
61
- return IoReactNativeIso18013.getQrCodeString();
62
- }
63
-
64
74
  /**
65
75
  * Closes the bluetooth connection and clears any resource.
66
76
  * Resolves to true after closing the connection or rejects in case of error.
@@ -1 +1 @@
1
- {"version":3,"names":["NativeEventEmitter","Platform","IoReactNativeIso18013","eventEmitter","ErrorCode","start","config","peripheralMode","centralClientMode","clearBleCache","certificates","OS","getQrCodeString","close","sendErrorResponse","code","generateResponse","documents","acceptedFields","sendResponse","response","addListener","event","callback"],"sourceRoot":"../../../../src","sources":["iso18013/iso18013-5/proximity.ts"],"mappings":";;AAAA,SAASA,kBAAkB,EAAEC,QAAQ,QAAQ,cAAc;AAC3D,SAASC,qBAAqB,QAAQ,aAAI;AAG1C,MAAMC,YAAY,GAAG,IAAIH,kBAAkB,CAACE,qBAAqB,CAAC;;AAElE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAUA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA,WAAYE,SAAS,0BAATA,SAAS;EAATA,SAAS,CAATA,SAAS;EAATA,SAAS,CAATA,SAAS;EAATA,SAAS,CAATA,SAAS;EAAA,OAATA,SAAS;AAAA;;AAMrB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,KAAKA,CACnBC,MAKC,GAAG,CAAC,CAAC,EACY;EAClB,MAAM;IAAEC,cAAc;IAAEC,iBAAiB;IAAEC,aAAa;IAAEC;EAAa,CAAC,GACtEJ,MAAM;EACR,IAAIL,QAAQ,CAACU,EAAE,KAAK,KAAK,EAAE;IACzB,OAAOT,qBAAqB,CAACG,KAAK,CAACK,YAAY,GAAGA,YAAY,GAAG,EAAE,CAAC;EACtE,CAAC,MAAM;IACL,OAAOR,qBAAqB,CAACG,KAAK,CAChCE,cAAc,GAAGA,cAAc,GAAG,IAAI,EACtCC,iBAAiB,GAAGA,iBAAiB,GAAG,KAAK,EAC7CC,aAAa,GAAGA,aAAa,GAAG,IAAI,EACpCC,YAAY,GAAGA,YAAY,GAAG,EAChC,CAAC;EACH;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASE,eAAeA,CAAA,EAAoB;EACjD,OAAOV,qBAAqB,CAACU,eAAe,CAAC,CAAC;AAChD;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,KAAKA,CAAA,EAAqB;EACxC,OAAOX,qBAAqB,CAACW,KAAK,CAAC,CAAC;AACtC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,iBAAiBA,CAACC,IAAe,EAAoB;EACnE,OAAOb,qBAAqB,CAACY,iBAAiB,CAACC,IAAI,CAAC;AACtD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,gBAAgBA,CAC9BC,SAAmC,EACnCC,cAA8B,EACb;EACjB,OAAOhB,qBAAqB,CAACc,gBAAgB,CAACC,SAAS,EAAEC,cAAc,CAAC;AAC1E;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,YAAYA,CAACC,QAAgB,EAAoB;EAC/D,OAAOlB,qBAAqB,CAACiB,YAAY,CAACC,QAAQ,CAAC;AACrD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,WAAWA,CACzBC,KAAQ,EACRC,QAA0C,EAC1C;EACA,OAAOpB,YAAY,CAACkB,WAAW,CAACC,KAAK,EAAEC,QAAQ,CAAC;AAClD","ignoreList":[]}
1
+ {"version":3,"names":["NativeEventEmitter","Platform","IoReactNativeIso18013","eventEmitter","ErrorCode","startEngagement","config","peripheralMode","centralClientMode","clearBleCache","certificates","engagementModes","retrievalMethods","OS","close","sendErrorResponse","code","generateResponse","documents","acceptedFields","sendResponse","response","addListener","event","callback"],"sourceRoot":"../../../../src","sources":["iso18013/iso18013-5/proximity.ts"],"mappings":";;AAAA,SAASA,kBAAkB,EAAEC,QAAQ,QAAQ,cAAc;AAC3D,SAASC,qBAAqB,QAAQ,aAAI;AAG1C,MAAMC,YAAY,GAAG,IAAIH,kBAAkB,CAACE,qBAAqB,CAAC;;AAElE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAcA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA,WAAYE,SAAS,0BAATA,SAAS;EAATA,SAAS,CAATA,SAAS;EAATA,SAAS,CAATA,SAAS;EAATA,SAAS,CAATA,SAAS;EAAA,OAATA,SAAS;AAAA;;AAMrB;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,eAAeA,CAC7BC,MAOC,GAAG,CAAC,CAAC,EACY;EAClB,MAAM;IACJC,cAAc,GAAG,IAAI;IACrBC,iBAAiB,GAAG,KAAK;IACzBC,aAAa,GAAG,IAAI;IACpBC,YAAY,GAAG,EAAE;IACjBC,eAAe,GAAG,CAAC,QAAQ,EAAE,KAAK,CAAC;IACnCC,gBAAgB,GAAG,CAAC,KAAK,EAAE,KAAK;EAClC,CAAC,GAAGN,MAAM;EAEV,IAAIL,QAAQ,CAACY,EAAE,KAAK,KAAK,EAAE;IACzB,OAAOX,qBAAqB,CAACG,eAAe,CAC1CK,YAAY,EACZC,eAAe,EACfC,gBACF,CAAC;EACH,CAAC,MAAM;IACL,OAAOV,qBAAqB,CAACG,eAAe,CAC1CE,cAAc,EACdC,iBAAiB,EACjBC,aAAa,EACbC,YAAY,EACZC,eAAe,EACfC,gBACF,CAAC;EACH;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASE,KAAKA,CAAA,EAAqB;EACxC,OAAOZ,qBAAqB,CAACY,KAAK,CAAC,CAAC;AACtC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,iBAAiBA,CAACC,IAAe,EAAoB;EACnE,OAAOd,qBAAqB,CAACa,iBAAiB,CAACC,IAAI,CAAC;AACtD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,gBAAgBA,CAC9BC,SAAmC,EACnCC,cAA8B,EACb;EACjB,OAAOjB,qBAAqB,CAACe,gBAAgB,CAACC,SAAS,EAAEC,cAAc,CAAC;AAC1E;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,YAAYA,CAACC,QAAgB,EAAoB;EAC/D,OAAOnB,qBAAqB,CAACkB,YAAY,CAACC,QAAQ,CAAC;AACrD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,WAAWA,CACzBC,KAAQ,EACRC,QAA0C,EAC1C;EACA,OAAOrB,YAAY,CAACmB,WAAW,CAACC,KAAK,EAAEC,QAAQ,CAAC;AAClD","ignoreList":[]}
@@ -52,7 +52,7 @@ This table contains the list of error codes that can be thrown by the `ISO18013_
52
52
  | ------------------------------ | ----------- | ----------------------------------------------- |
53
53
  | GENERATE_OID4VP_RESPONSE_ERROR | Android/iOS | An error occurred while generating the response |
54
54
 
55
- An error can be parsed using the `ModuleErrorSchema` with type `ModuleErrorCodes` exposed by the `ISO18013_5` module. The error can be parsed as follows:
55
+ An error can be parsed using the `ModuleErrorSchema` with type `ModuleErrorCodes` exposed by the `ISO18013_7` module. The error can be parsed as follows:
56
56
 
57
57
  ```typescript
58
58
  import { ISO18013_7 } from '@pagopa/io-react-native-iso18013';
@@ -74,7 +74,7 @@ The parsed object will contain properties from both iOS and Android platforms:
74
74
  userInfo?: Record<string, any> | null;
75
75
  nativeStackAndroid?: Array<{
76
76
  lineNumber: number;
77
- file: string;
77
+ file: string | null
78
78
  methodName: string;
79
79
  class: string;
80
80
  }>;
@@ -7,7 +7,7 @@ import { z } from 'zod';
7
7
  */
8
8
  const StackTraceElementSchema = z.object({
9
9
  lineNumber: z.number(),
10
- file: z.string(),
10
+ file: z.string().nullable(),
11
11
  methodName: z.string(),
12
12
  class: z.string()
13
13
  });
@@ -1 +1 @@
1
- {"version":3,"names":["z","StackTraceElementSchema","object","lineNumber","number","file","string","methodName","class","ModuleErrorAndroidSchema","nativeStackAndroid","array","partial","ModuleErrorIosSchema","domain","nativeStackIOS","GenericModuleErrorSchema","codeSchema","code","message","name","userInfo","record","any","optional","or","null","and"],"sourceRoot":"../../src","sources":["schema.ts"],"mappings":";;AAAA,SAASA,CAAC,QAAQ,KAAK;;AAEvB;AACA;AACA;AACA,MAAMC,uBAAuB,GAAGD,CAAC,CAACE,MAAM,CAAC;EACvCC,UAAU,EAAEH,CAAC,CAACI,MAAM,CAAC,CAAC;EACtBC,IAAI,EAAEL,CAAC,CAACM,MAAM,CAAC,CAAC;EAChBC,UAAU,EAAEP,CAAC,CAACM,MAAM,CAAC,CAAC;EACtBE,KAAK,EAAER,CAAC,CAACM,MAAM,CAAC;AAClB,CAAC,CAAC;;AAEF;AACA;AACA;AACA;AACA,MAAMG,wBAAwB,GAAGT,CAAC,CAC/BE,MAAM,CAAC;EACNQ,kBAAkB,EAAEV,CAAC,CAACW,KAAK,CAACV,uBAAuB;AACrD,CAAC,CAAC,CACDW,OAAO,CAAC,CAAC;;AAEZ;AACA;AACA;AACA;AACA,MAAMC,oBAAoB,GAAGb,CAAC,CAC3BE,MAAM,CAAC;EACNY,MAAM,EAAEd,CAAC,CAACM,MAAM,CAAC,CAAC;EAClBS,cAAc,EAAEf,CAAC,CAACW,KAAK,CAACX,CAAC,CAACM,MAAM,CAAC,CAAC;AACpC,CAAC,CAAC,CACDM,OAAO,CAAC,CAAC;;AAEZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMI,wBAAwB,GAGnCC,UAAoB,IAEpBjB,CAAC,CACEE,MAAM,CAAC;EACNgB,IAAI,EAAED,UAAU;EAChBE,OAAO,EAAEnB,CAAC,CAACM,MAAM,CAAC,CAAC;EACnBc,IAAI,EAAEpB,CAAC,CAACM,MAAM,CAAC,CAAC;EAChBe,QAAQ,EAAErB,CAAC,CAACsB,MAAM,CAACtB,CAAC,CAACM,MAAM,CAAC,CAAC,EAAEN,CAAC,CAACuB,GAAG,CAAC,CAAC,CAAC,CAACC,QAAQ,CAAC,CAAC,CAACC,EAAE,CAACzB,CAAC,CAAC0B,IAAI,CAAC,CAAC;AAChE,CAAC,CAAC,CACDC,GAAG,CAAClB,wBAAwB,CAAC,CAC7BkB,GAAG,CAACd,oBAAoB,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["z","StackTraceElementSchema","object","lineNumber","number","file","string","nullable","methodName","class","ModuleErrorAndroidSchema","nativeStackAndroid","array","partial","ModuleErrorIosSchema","domain","nativeStackIOS","GenericModuleErrorSchema","codeSchema","code","message","name","userInfo","record","any","optional","or","null","and"],"sourceRoot":"../../src","sources":["schema.ts"],"mappings":";;AAAA,SAASA,CAAC,QAAQ,KAAK;;AAEvB;AACA;AACA;AACA,MAAMC,uBAAuB,GAAGD,CAAC,CAACE,MAAM,CAAC;EACvCC,UAAU,EAAEH,CAAC,CAACI,MAAM,CAAC,CAAC;EACtBC,IAAI,EAAEL,CAAC,CAACM,MAAM,CAAC,CAAC,CAACC,QAAQ,CAAC,CAAC;EAC3BC,UAAU,EAAER,CAAC,CAACM,MAAM,CAAC,CAAC;EACtBG,KAAK,EAAET,CAAC,CAACM,MAAM,CAAC;AAClB,CAAC,CAAC;;AAEF;AACA;AACA;AACA;AACA,MAAMI,wBAAwB,GAAGV,CAAC,CAC/BE,MAAM,CAAC;EACNS,kBAAkB,EAAEX,CAAC,CAACY,KAAK,CAACX,uBAAuB;AACrD,CAAC,CAAC,CACDY,OAAO,CAAC,CAAC;;AAEZ;AACA;AACA;AACA;AACA,MAAMC,oBAAoB,GAAGd,CAAC,CAC3BE,MAAM,CAAC;EACNa,MAAM,EAAEf,CAAC,CAACM,MAAM,CAAC,CAAC;EAClBU,cAAc,EAAEhB,CAAC,CAACY,KAAK,CAACZ,CAAC,CAACM,MAAM,CAAC,CAAC;AACpC,CAAC,CAAC,CACDO,OAAO,CAAC,CAAC;;AAEZ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMI,wBAAwB,GAGnCC,UAAoB,IAEpBlB,CAAC,CACEE,MAAM,CAAC;EACNiB,IAAI,EAAED,UAAU;EAChBE,OAAO,EAAEpB,CAAC,CAACM,MAAM,CAAC,CAAC;EACnBe,IAAI,EAAErB,CAAC,CAACM,MAAM,CAAC,CAAC;EAChBgB,QAAQ,EAAEtB,CAAC,CAACuB,MAAM,CAACvB,CAAC,CAACM,MAAM,CAAC,CAAC,EAAEN,CAAC,CAACwB,GAAG,CAAC,CAAC,CAAC,CAACC,QAAQ,CAAC,CAAC,CAACC,EAAE,CAAC1B,CAAC,CAAC2B,IAAI,CAAC,CAAC;AAChE,CAAC,CAAC,CACDC,GAAG,CAAClB,wBAAwB,CAAC,CAC7BkB,GAAG,CAACd,oBAAoB,CAAC","ignoreList":[]}
@@ -25,31 +25,31 @@ export declare const ModuleErrorSchema: z.ZodIntersection<z.ZodIntersection<z.Zo
25
25
  }>, z.ZodObject<{
26
26
  nativeStackAndroid: z.ZodOptional<z.ZodArray<z.ZodObject<{
27
27
  lineNumber: z.ZodNumber;
28
- file: z.ZodString;
28
+ file: z.ZodNullable<z.ZodString>;
29
29
  methodName: z.ZodString;
30
30
  class: z.ZodString;
31
31
  }, "strip", z.ZodTypeAny, {
32
32
  lineNumber: number;
33
- file: string;
33
+ file: string | null;
34
34
  methodName: string;
35
35
  class: string;
36
36
  }, {
37
37
  lineNumber: number;
38
- file: string;
38
+ file: string | null;
39
39
  methodName: string;
40
40
  class: string;
41
41
  }>, "many">>;
42
42
  }, "strip", z.ZodTypeAny, {
43
43
  nativeStackAndroid?: {
44
44
  lineNumber: number;
45
- file: string;
45
+ file: string | null;
46
46
  methodName: string;
47
47
  class: string;
48
48
  }[] | undefined;
49
49
  }, {
50
50
  nativeStackAndroid?: {
51
51
  lineNumber: number;
52
- file: string;
52
+ file: string | null;
53
53
  methodName: string;
54
54
  class: string;
55
55
  }[] | undefined;
@@ -25,31 +25,31 @@ export declare const ModuleErrorSchema: z.ZodIntersection<z.ZodIntersection<z.Zo
25
25
  }>, z.ZodObject<{
26
26
  nativeStackAndroid: z.ZodOptional<z.ZodArray<z.ZodObject<{
27
27
  lineNumber: z.ZodNumber;
28
- file: z.ZodString;
28
+ file: z.ZodNullable<z.ZodString>;
29
29
  methodName: z.ZodString;
30
30
  class: z.ZodString;
31
31
  }, "strip", z.ZodTypeAny, {
32
32
  lineNumber: number;
33
- file: string;
33
+ file: string | null;
34
34
  methodName: string;
35
35
  class: string;
36
36
  }, {
37
37
  lineNumber: number;
38
- file: string;
38
+ file: string | null;
39
39
  methodName: string;
40
40
  class: string;
41
41
  }>, "many">>;
42
42
  }, "strip", z.ZodTypeAny, {
43
43
  nativeStackAndroid?: {
44
44
  lineNumber: number;
45
- file: string;
45
+ file: string | null;
46
46
  methodName: string;
47
47
  class: string;
48
48
  }[] | undefined;
49
49
  }, {
50
50
  nativeStackAndroid?: {
51
51
  lineNumber: number;
52
- file: string;
52
+ file: string | null;
53
53
  methodName: string;
54
54
  class: string;
55
55
  }[] | undefined;