@pagopa/io-react-native-iso18013 0.8.1 → 0.8.3
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/IoReactNativeIso18013.podspec +1 -1
- package/android/src/main/java/com/ioreactnativeiso18013/IoReactNativeIso18013Module.kt +5 -0
- package/ios/IoReactNativeIso18013.mm +2 -0
- package/ios/IoReactNativeIso18013.swift +14 -0
- package/lib/module/cbor/cbor/schema.js +1 -1
- package/lib/module/cbor/cbor/schema.js.map +1 -1
- package/lib/module/iso18013/iso18013-5/README.md +18 -8
- package/lib/module/iso18013/iso18013-5/index.js +1 -1
- package/lib/module/iso18013/iso18013-5/index.js.map +1 -1
- package/lib/module/iso18013/iso18013-5/proximity.js +10 -0
- package/lib/module/iso18013/iso18013-5/proximity.js.map +1 -1
- package/lib/module/iso18013/iso18013-5/request.js +2 -2
- package/lib/module/iso18013/iso18013-5/request.js.map +1 -1
- package/lib/module/schema.js +10 -10
- package/lib/module/schema.js.map +1 -1
- package/lib/typescript/src/cbor/cbor/error.d.ts +18 -50
- package/lib/typescript/src/cbor/cbor/error.d.ts.map +1 -1
- package/lib/typescript/src/cbor/cbor/schema.d.ts +229 -2213
- package/lib/typescript/src/cbor/cbor/schema.d.ts.map +1 -1
- package/lib/typescript/src/cbor/cbor/schema.utils.d.ts +1 -1
- package/lib/typescript/src/cbor/cbor/schema.utils.d.ts.map +1 -1
- package/lib/typescript/src/cbor/cose/error.d.ts +18 -50
- package/lib/typescript/src/cbor/cose/error.d.ts.map +1 -1
- package/lib/typescript/src/iso18013/iso18013-5/error.d.ts +24 -50
- package/lib/typescript/src/iso18013/iso18013-5/error.d.ts.map +1 -1
- package/lib/typescript/src/iso18013/iso18013-5/index.d.ts +1 -1
- package/lib/typescript/src/iso18013/iso18013-5/index.d.ts.map +1 -1
- package/lib/typescript/src/iso18013/iso18013-5/proximity.d.ts +7 -0
- package/lib/typescript/src/iso18013/iso18013-5/proximity.d.ts.map +1 -1
- package/lib/typescript/src/iso18013/iso18013-5/request.d.ts +2 -14
- package/lib/typescript/src/iso18013/iso18013-5/request.d.ts.map +1 -1
- package/lib/typescript/src/iso18013/iso18013-7/error.d.ts +14 -50
- package/lib/typescript/src/iso18013/iso18013-7/error.d.ts.map +1 -1
- package/lib/typescript/src/schema.d.ts +6 -49
- package/lib/typescript/src/schema.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/cbor/cbor/schema.ts +1 -1
- package/src/iso18013/iso18013-5/README.md +18 -8
- package/src/iso18013/iso18013-5/index.ts +1 -0
- package/src/iso18013/iso18013-5/proximity.ts +10 -0
- package/src/iso18013/iso18013-5/request.ts +2 -2
- package/src/schema.ts +13 -20
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../../src/cbor/cbor/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,oBAAY,gBAAgB;IAC1B,GAAG,0BAA0B;IAC7B,MAAM,4BAA4B;CACnC;AAED,eAAO,MAAM,YAAY,
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../../src/cbor/cbor/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,oBAAY,gBAAgB;IAC1B,GAAG,0BAA0B;IAC7B,MAAM,4BAA4B;CACnC;AAED,eAAO,MAAM,YAAY,oCAAiC,CAAC;AAC3D,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AAExD;;GAEG;AACH,eAAO,MAAM,aAAa;;;;;iBAKxB,CAAC;AAEH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC;AAE1D;;GAEG;AACH,eAAO,MAAM,2BAA2B;;;;iBAItC,CAAC;AAEH,MAAM,MAAM,2BAA2B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MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAA+B,CAAC;AAEhE;;GAEG;AACH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAAkC,CAAC;AAEtE,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,SAAS,CAAC,CAAC"}
|
|
@@ -4,5 +4,5 @@ import { z } from 'zod';
|
|
|
4
4
|
* Otherwise, return the value as is.
|
|
5
5
|
* Useful for unescaping stringified JSON content
|
|
6
6
|
*/
|
|
7
|
-
export declare const coerceToJSON: z.
|
|
7
|
+
export declare const coerceToJSON: z.ZodPipe<z.ZodAny, z.ZodTransform<any, any>>;
|
|
8
8
|
//# sourceMappingURL=schema.utils.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.utils.d.ts","sourceRoot":"","sources":["../../../../../src/cbor/cbor/schema.utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;GAIG;AACH,eAAO,MAAM,YAAY,
|
|
1
|
+
{"version":3,"file":"schema.utils.d.ts","sourceRoot":"","sources":["../../../../../src/cbor/cbor/schema.utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;GAIG;AACH,eAAO,MAAM,YAAY,+CAKvB,CAAC"}
|
|
@@ -2,67 +2,35 @@ import z from 'zod';
|
|
|
2
2
|
/**
|
|
3
3
|
* Error codes which the COSE module uses to reject a promise.
|
|
4
4
|
*/
|
|
5
|
-
declare const ModuleErrorCodesSchema: z.ZodEnum<
|
|
5
|
+
declare const ModuleErrorCodesSchema: z.ZodEnum<{
|
|
6
|
+
EUNSPECIFIED: "EUNSPECIFIED";
|
|
7
|
+
SIGN_ERROR: "SIGN_ERROR";
|
|
8
|
+
VERIFY_ERROR: "VERIFY_ERROR";
|
|
9
|
+
THREADING_ERROR: "THREADING_ERROR";
|
|
10
|
+
}>;
|
|
6
11
|
export type ModuleErrorCodes = z.infer<typeof ModuleErrorCodesSchema>;
|
|
7
12
|
/**
|
|
8
13
|
* Schema which can be used to parse a rejected promise error by the COSE module.
|
|
9
14
|
*/
|
|
10
|
-
export declare const ModuleErrorSchema: z.
|
|
11
|
-
code: z.ZodEnum<
|
|
15
|
+
export declare const ModuleErrorSchema: z.ZodObject<{
|
|
16
|
+
code: z.ZodEnum<{
|
|
17
|
+
EUNSPECIFIED: "EUNSPECIFIED";
|
|
18
|
+
SIGN_ERROR: "SIGN_ERROR";
|
|
19
|
+
VERIFY_ERROR: "VERIFY_ERROR";
|
|
20
|
+
THREADING_ERROR: "THREADING_ERROR";
|
|
21
|
+
}>;
|
|
12
22
|
message: z.ZodString;
|
|
13
23
|
name: z.ZodString;
|
|
14
|
-
userInfo: z.
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
message: string;
|
|
18
|
-
name: string;
|
|
19
|
-
userInfo?: Record<string, any> | null | undefined;
|
|
20
|
-
}, {
|
|
21
|
-
code: "EUNSPECIFIED" | "SIGN_ERROR" | "VERIFY_ERROR" | "THREADING_ERROR";
|
|
22
|
-
message: string;
|
|
23
|
-
name: string;
|
|
24
|
-
userInfo?: Record<string, any> | null | undefined;
|
|
25
|
-
}>, z.ZodObject<{
|
|
24
|
+
userInfo: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodAny>>>;
|
|
25
|
+
domain: z.ZodOptional<z.ZodString>;
|
|
26
|
+
nativeStackIOS: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
26
27
|
nativeStackAndroid: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
27
28
|
lineNumber: z.ZodNumber;
|
|
28
29
|
file: z.ZodNullable<z.ZodString>;
|
|
29
30
|
methodName: z.ZodString;
|
|
30
31
|
class: z.ZodString;
|
|
31
|
-
},
|
|
32
|
-
|
|
33
|
-
file: string | null;
|
|
34
|
-
methodName: string;
|
|
35
|
-
class: string;
|
|
36
|
-
}, {
|
|
37
|
-
lineNumber: number;
|
|
38
|
-
file: string | null;
|
|
39
|
-
methodName: string;
|
|
40
|
-
class: string;
|
|
41
|
-
}>, "many">>;
|
|
42
|
-
}, "strip", z.ZodTypeAny, {
|
|
43
|
-
nativeStackAndroid?: {
|
|
44
|
-
lineNumber: number;
|
|
45
|
-
file: string | null;
|
|
46
|
-
methodName: string;
|
|
47
|
-
class: string;
|
|
48
|
-
}[] | undefined;
|
|
49
|
-
}, {
|
|
50
|
-
nativeStackAndroid?: {
|
|
51
|
-
lineNumber: number;
|
|
52
|
-
file: string | null;
|
|
53
|
-
methodName: string;
|
|
54
|
-
class: string;
|
|
55
|
-
}[] | undefined;
|
|
56
|
-
}>>, z.ZodObject<{
|
|
57
|
-
domain: z.ZodOptional<z.ZodString>;
|
|
58
|
-
nativeStackIOS: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
59
|
-
}, "strip", z.ZodTypeAny, {
|
|
60
|
-
domain?: string | undefined;
|
|
61
|
-
nativeStackIOS?: string[] | undefined;
|
|
62
|
-
}, {
|
|
63
|
-
domain?: string | undefined;
|
|
64
|
-
nativeStackIOS?: string[] | undefined;
|
|
65
|
-
}>>;
|
|
32
|
+
}, z.core.$strip>>>;
|
|
33
|
+
}, z.core.$strip>;
|
|
66
34
|
export type ModuleError = z.infer<typeof ModuleErrorSchema>;
|
|
67
35
|
export {};
|
|
68
36
|
//# sourceMappingURL=error.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error.d.ts","sourceRoot":"","sources":["../../../../../src/cbor/cose/error.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAC;AAGpB;;GAEG;AACH,QAAA,MAAM,sBAAsB,
|
|
1
|
+
{"version":3,"file":"error.d.ts","sourceRoot":"","sources":["../../../../../src/cbor/cose/error.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAC;AAGpB;;GAEG;AACH,QAAA,MAAM,sBAAsB;;;;;EAK1B,CAAC;AAEH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAEtE;;GAEG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;iBAE7B,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC"}
|
|
@@ -7,67 +7,41 @@ export type OnErrorPayload = z.infer<typeof OnErrorPayloadSchema>;
|
|
|
7
7
|
/**
|
|
8
8
|
* Error codes which the ISO18013_5 module uses to reject a promise.
|
|
9
9
|
*/
|
|
10
|
-
declare const ModuleErrorCodesSchema: z.ZodEnum<
|
|
10
|
+
declare const ModuleErrorCodesSchema: z.ZodEnum<{
|
|
11
|
+
EUNSPECIFIED: "EUNSPECIFIED";
|
|
12
|
+
DRH_NOT_DEFINED: "DRH_NOT_DEFINED";
|
|
13
|
+
START_ERROR: "START_ERROR";
|
|
14
|
+
SEND_RESPONSE_ERROR: "SEND_RESPONSE_ERROR";
|
|
15
|
+
SEND_ERROR_RESPONSE_ERROR: "SEND_ERROR_RESPONSE_ERROR";
|
|
16
|
+
GENERATE_RESPONSE_ERROR: "GENERATE_RESPONSE_ERROR";
|
|
17
|
+
CLOSE_ERROR: "CLOSE_ERROR";
|
|
18
|
+
}>;
|
|
11
19
|
export type ModuleErrorCodes = z.infer<typeof ModuleErrorCodesSchema>;
|
|
12
20
|
/**
|
|
13
21
|
* Schema which can be used to parse a rejected promise error by the ISO18013_5 module.
|
|
14
22
|
*/
|
|
15
|
-
export declare const ModuleErrorSchema: z.
|
|
16
|
-
code: z.ZodEnum<
|
|
23
|
+
export declare const ModuleErrorSchema: z.ZodObject<{
|
|
24
|
+
code: z.ZodEnum<{
|
|
25
|
+
EUNSPECIFIED: "EUNSPECIFIED";
|
|
26
|
+
DRH_NOT_DEFINED: "DRH_NOT_DEFINED";
|
|
27
|
+
START_ERROR: "START_ERROR";
|
|
28
|
+
SEND_RESPONSE_ERROR: "SEND_RESPONSE_ERROR";
|
|
29
|
+
SEND_ERROR_RESPONSE_ERROR: "SEND_ERROR_RESPONSE_ERROR";
|
|
30
|
+
GENERATE_RESPONSE_ERROR: "GENERATE_RESPONSE_ERROR";
|
|
31
|
+
CLOSE_ERROR: "CLOSE_ERROR";
|
|
32
|
+
}>;
|
|
17
33
|
message: z.ZodString;
|
|
18
34
|
name: z.ZodString;
|
|
19
|
-
userInfo: z.
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
message: string;
|
|
23
|
-
name: string;
|
|
24
|
-
userInfo?: Record<string, any> | null | undefined;
|
|
25
|
-
}, {
|
|
26
|
-
code: "EUNSPECIFIED" | "DRH_NOT_DEFINED" | "START_ERROR" | "SEND_RESPONSE_ERROR" | "SEND_ERROR_RESPONSE_ERROR" | "GENERATE_RESPONSE_ERROR" | "CLOSE_ERROR";
|
|
27
|
-
message: string;
|
|
28
|
-
name: string;
|
|
29
|
-
userInfo?: Record<string, any> | null | undefined;
|
|
30
|
-
}>, z.ZodObject<{
|
|
35
|
+
userInfo: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodAny>>>;
|
|
36
|
+
domain: z.ZodOptional<z.ZodString>;
|
|
37
|
+
nativeStackIOS: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
31
38
|
nativeStackAndroid: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
32
39
|
lineNumber: z.ZodNumber;
|
|
33
40
|
file: z.ZodNullable<z.ZodString>;
|
|
34
41
|
methodName: z.ZodString;
|
|
35
42
|
class: z.ZodString;
|
|
36
|
-
},
|
|
37
|
-
|
|
38
|
-
file: string | null;
|
|
39
|
-
methodName: string;
|
|
40
|
-
class: string;
|
|
41
|
-
}, {
|
|
42
|
-
lineNumber: number;
|
|
43
|
-
file: string | null;
|
|
44
|
-
methodName: string;
|
|
45
|
-
class: string;
|
|
46
|
-
}>, "many">>;
|
|
47
|
-
}, "strip", z.ZodTypeAny, {
|
|
48
|
-
nativeStackAndroid?: {
|
|
49
|
-
lineNumber: number;
|
|
50
|
-
file: string | null;
|
|
51
|
-
methodName: string;
|
|
52
|
-
class: string;
|
|
53
|
-
}[] | undefined;
|
|
54
|
-
}, {
|
|
55
|
-
nativeStackAndroid?: {
|
|
56
|
-
lineNumber: number;
|
|
57
|
-
file: string | null;
|
|
58
|
-
methodName: string;
|
|
59
|
-
class: string;
|
|
60
|
-
}[] | undefined;
|
|
61
|
-
}>>, z.ZodObject<{
|
|
62
|
-
domain: z.ZodOptional<z.ZodString>;
|
|
63
|
-
nativeStackIOS: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
64
|
-
}, "strip", z.ZodTypeAny, {
|
|
65
|
-
domain?: string | undefined;
|
|
66
|
-
nativeStackIOS?: string[] | undefined;
|
|
67
|
-
}, {
|
|
68
|
-
domain?: string | undefined;
|
|
69
|
-
nativeStackIOS?: string[] | undefined;
|
|
70
|
-
}>>;
|
|
43
|
+
}, z.core.$strip>>>;
|
|
44
|
+
}, z.core.$strip>;
|
|
71
45
|
export type ModuleError = z.infer<typeof ModuleErrorSchema>;
|
|
72
46
|
export {};
|
|
73
47
|
//# sourceMappingURL=error.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error.d.ts","sourceRoot":"","sources":["../../../../../src/iso18013/iso18013-5/error.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAC;AAGpB;;GAEG;AACH,eAAO,MAAM,oBAAoB,yBAAoC,CAAC;AAEtE,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAElE;;GAEG;AACH,QAAA,MAAM,sBAAsB,
|
|
1
|
+
{"version":3,"file":"error.d.ts","sourceRoot":"","sources":["../../../../../src/iso18013/iso18013-5/error.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAC;AAGpB;;GAEG;AACH,eAAO,MAAM,oBAAoB,yBAAoC,CAAC;AAEtE,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAElE;;GAEG;AACH,QAAA,MAAM,sBAAsB;;;;;;;;EAQ1B,CAAC;AAEH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAEtE;;GAEG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;iBAE7B,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { type VerifierRequest, parseVerifierRequest } from './request';
|
|
2
2
|
export { type OnErrorPayload, OnErrorPayloadSchema, ModuleErrorSchema, type ModuleErrorCodes, type ModuleError, } from './error';
|
|
3
|
-
export { ErrorCode, type Events, type EventsPayload, type EngagementMode, type RetrievalMethod, addListener, startEngagement, close, generateResponse, sendErrorResponse, sendResponse, } from './proximity';
|
|
3
|
+
export { ErrorCode, type Events, type EventsPayload, type EngagementMode, type RetrievalMethod, addListener, startEngagement, close, generateResponse, sendErrorResponse, sendResponse, setHceModalMessage, } from './proximity';
|
|
4
4
|
export { type RequestedDocument, type AcceptedFields } from '../types';
|
|
5
5
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/iso18013/iso18013-5/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,eAAe,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAC;AAEvE,OAAO,EACL,KAAK,cAAc,EACnB,oBAAoB,EACpB,iBAAiB,EACjB,KAAK,gBAAgB,EACrB,KAAK,WAAW,GACjB,MAAM,SAAS,CAAC;AAEjB,OAAO,EACL,SAAS,EACT,KAAK,MAAM,EACX,KAAK,aAAa,EAClB,KAAK,cAAc,EACnB,KAAK,eAAe,EACpB,WAAW,EACX,eAAe,EACf,KAAK,EACL,gBAAgB,EAChB,iBAAiB,EACjB,YAAY,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/iso18013/iso18013-5/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,eAAe,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAC;AAEvE,OAAO,EACL,KAAK,cAAc,EACnB,oBAAoB,EACpB,iBAAiB,EACjB,KAAK,gBAAgB,EACrB,KAAK,WAAW,GACjB,MAAM,SAAS,CAAC;AAEjB,OAAO,EACL,SAAS,EACT,KAAK,MAAM,EACX,KAAK,aAAa,EAClB,KAAK,cAAc,EACnB,KAAK,eAAe,EACpB,WAAW,EACX,eAAe,EACf,KAAK,EACL,gBAAgB,EAChB,iBAAiB,EACjB,YAAY,EACZ,kBAAkB,GACnB,MAAM,aAAa,CAAC;AAErB,OAAO,EAAE,KAAK,iBAAiB,EAAE,KAAK,cAAc,EAAE,MAAM,UAAU,CAAC"}
|
|
@@ -111,4 +111,11 @@ export declare function sendResponse(response: string): Promise<boolean>;
|
|
|
111
111
|
* @param callback - The callback to be called when the event is emitted. The callback will receive the event payload as an argument.
|
|
112
112
|
*/
|
|
113
113
|
export declare function addListener<E extends Events>(event: E, callback: (data: EventsPayload[E]) => void): import("react-native").EmitterSubscription;
|
|
114
|
+
/**
|
|
115
|
+
* **iOS only**
|
|
116
|
+
*
|
|
117
|
+
* Sets a custom message to be displayed in the NFC HCE modal during NFC engagement.
|
|
118
|
+
* @param message - The custom message to be displayed in the NFC HCE modal.
|
|
119
|
+
*/
|
|
120
|
+
export declare function setHceModalMessage(message: string): void;
|
|
114
121
|
//# sourceMappingURL=proximity.d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wBAAgB,WAAW,CAAC,CAAC,SAAS,MAAM,EAC1C,KAAK,EAAE,CAAC,EACR,QAAQ,EAAE,CAAC,IAAI,EAAE,aAAa,CAAC,CAAC,CAAC,KAAK,IAAI,8CAG3C;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAExD"}
|
|
@@ -2,20 +2,8 @@ import { z } from 'zod';
|
|
|
2
2
|
declare const VerifierRequest: z.ZodObject<{
|
|
3
3
|
request: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
4
4
|
isAuthenticated: z.ZodBoolean;
|
|
5
|
-
},
|
|
6
|
-
|
|
7
|
-
}, z.ZodRecord<z.ZodString, z.ZodBoolean>, "strip">, z.objectInputType<{
|
|
8
|
-
isAuthenticated: z.ZodBoolean;
|
|
9
|
-
}, z.ZodRecord<z.ZodString, z.ZodBoolean>, "strip">>>;
|
|
10
|
-
}, "strip", z.ZodTypeAny, {
|
|
11
|
-
request: Record<string, z.objectOutputType<{
|
|
12
|
-
isAuthenticated: z.ZodBoolean;
|
|
13
|
-
}, z.ZodRecord<z.ZodString, z.ZodBoolean>, "strip">>;
|
|
14
|
-
}, {
|
|
15
|
-
request: Record<string, z.objectInputType<{
|
|
16
|
-
isAuthenticated: z.ZodBoolean;
|
|
17
|
-
}, z.ZodRecord<z.ZodString, z.ZodBoolean>, "strip">>;
|
|
18
|
-
}>;
|
|
5
|
+
}, z.core.$catchall<z.ZodRecord<z.ZodString, z.ZodBoolean>>>>;
|
|
6
|
+
}, z.core.$strip>;
|
|
19
7
|
/**
|
|
20
8
|
* VerifierRequest type returned by the `onDocumentRequestReceived` event in `Events`.
|
|
21
9
|
* The outermost key represents the credential doctype, the inner key represents the namespace and the innermost key represents the requested fields with a boolean value
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"request.d.ts","sourceRoot":"","sources":["../../../../../src/iso18013/iso18013-5/request.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAWxB,QAAA,MAAM,eAAe
|
|
1
|
+
{"version":3,"file":"request.d.ts","sourceRoot":"","sources":["../../../../../src/iso18013/iso18013-5/request.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAWxB,QAAA,MAAM,eAAe;;;;iBAEnB,CAAC;AAEH;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,eAAe,CAAC,CAAC;AAE9D;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB,GAAI,OAAO,OAAO,KAAG,eAErD,CAAC"}
|
|
@@ -2,67 +2,31 @@ import z from 'zod';
|
|
|
2
2
|
/**
|
|
3
3
|
* Error codes which the ISO18013_7 module uses to reject a promise.
|
|
4
4
|
*/
|
|
5
|
-
declare const ModuleErrorCodesSchema: z.ZodEnum<
|
|
5
|
+
declare const ModuleErrorCodesSchema: z.ZodEnum<{
|
|
6
|
+
EUNSPECIFIED: "EUNSPECIFIED";
|
|
7
|
+
GENERATE_OID4VP_RESPONSE_ERROR: "GENERATE_OID4VP_RESPONSE_ERROR";
|
|
8
|
+
}>;
|
|
6
9
|
export type ModuleErrorCodes = z.infer<typeof ModuleErrorCodesSchema>;
|
|
7
10
|
/**
|
|
8
11
|
* Schema which can be used to parse a rejected promise error by the ISO18013_7 module.
|
|
9
12
|
*/
|
|
10
|
-
export declare const ModuleErrorSchema: z.
|
|
11
|
-
code: z.ZodEnum<
|
|
13
|
+
export declare const ModuleErrorSchema: z.ZodObject<{
|
|
14
|
+
code: z.ZodEnum<{
|
|
15
|
+
EUNSPECIFIED: "EUNSPECIFIED";
|
|
16
|
+
GENERATE_OID4VP_RESPONSE_ERROR: "GENERATE_OID4VP_RESPONSE_ERROR";
|
|
17
|
+
}>;
|
|
12
18
|
message: z.ZodString;
|
|
13
19
|
name: z.ZodString;
|
|
14
|
-
userInfo: z.
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
message: string;
|
|
18
|
-
name: string;
|
|
19
|
-
userInfo?: Record<string, any> | null | undefined;
|
|
20
|
-
}, {
|
|
21
|
-
code: "EUNSPECIFIED" | "GENERATE_OID4VP_RESPONSE_ERROR";
|
|
22
|
-
message: string;
|
|
23
|
-
name: string;
|
|
24
|
-
userInfo?: Record<string, any> | null | undefined;
|
|
25
|
-
}>, z.ZodObject<{
|
|
20
|
+
userInfo: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodAny>>>;
|
|
21
|
+
domain: z.ZodOptional<z.ZodString>;
|
|
22
|
+
nativeStackIOS: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
26
23
|
nativeStackAndroid: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
27
24
|
lineNumber: z.ZodNumber;
|
|
28
25
|
file: z.ZodNullable<z.ZodString>;
|
|
29
26
|
methodName: z.ZodString;
|
|
30
27
|
class: z.ZodString;
|
|
31
|
-
},
|
|
32
|
-
|
|
33
|
-
file: string | null;
|
|
34
|
-
methodName: string;
|
|
35
|
-
class: string;
|
|
36
|
-
}, {
|
|
37
|
-
lineNumber: number;
|
|
38
|
-
file: string | null;
|
|
39
|
-
methodName: string;
|
|
40
|
-
class: string;
|
|
41
|
-
}>, "many">>;
|
|
42
|
-
}, "strip", z.ZodTypeAny, {
|
|
43
|
-
nativeStackAndroid?: {
|
|
44
|
-
lineNumber: number;
|
|
45
|
-
file: string | null;
|
|
46
|
-
methodName: string;
|
|
47
|
-
class: string;
|
|
48
|
-
}[] | undefined;
|
|
49
|
-
}, {
|
|
50
|
-
nativeStackAndroid?: {
|
|
51
|
-
lineNumber: number;
|
|
52
|
-
file: string | null;
|
|
53
|
-
methodName: string;
|
|
54
|
-
class: string;
|
|
55
|
-
}[] | undefined;
|
|
56
|
-
}>>, z.ZodObject<{
|
|
57
|
-
domain: z.ZodOptional<z.ZodString>;
|
|
58
|
-
nativeStackIOS: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
59
|
-
}, "strip", z.ZodTypeAny, {
|
|
60
|
-
domain?: string | undefined;
|
|
61
|
-
nativeStackIOS?: string[] | undefined;
|
|
62
|
-
}, {
|
|
63
|
-
domain?: string | undefined;
|
|
64
|
-
nativeStackIOS?: string[] | undefined;
|
|
65
|
-
}>>;
|
|
28
|
+
}, z.core.$strip>>>;
|
|
29
|
+
}, z.core.$strip>;
|
|
66
30
|
export type ModuleError = z.infer<typeof ModuleErrorSchema>;
|
|
67
31
|
export {};
|
|
68
32
|
//# sourceMappingURL=error.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error.d.ts","sourceRoot":"","sources":["../../../../../src/iso18013/iso18013-7/error.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAC;AAGpB;;GAEG;AACH,QAAA,MAAM,sBAAsB
|
|
1
|
+
{"version":3,"file":"error.d.ts","sourceRoot":"","sources":["../../../../../src/iso18013/iso18013-7/error.ts"],"names":[],"mappings":"AAAA,OAAO,CAAC,MAAM,KAAK,CAAC;AAGpB;;GAEG;AACH,QAAA,MAAM,sBAAsB;;;EAG1B,CAAC;AAEH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAEtE;;GAEG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;iBAE7B,CAAC;AAEF,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC"}
|
|
@@ -3,64 +3,21 @@ import { z } from 'zod';
|
|
|
3
3
|
* Schema for parsing common parameters of a rejected promise error in a native module.
|
|
4
4
|
* This schema contains the common parameters that are shared across both Android and iOS native modules.
|
|
5
5
|
* Parameters which are platform specific are defined as optional and must be checked at runtime.
|
|
6
|
-
* It accepts a generic code schema to allow for different error codes which can be defined in each module.
|
|
7
6
|
* @param codeSchema - The Zod schema for the error codes used by the module.
|
|
8
7
|
* @returns A schema for the common parameters of a rejected promise error in a native module.
|
|
9
8
|
*/
|
|
10
|
-
export declare const GenericModuleErrorSchema: <CodeType extends z.
|
|
9
|
+
export declare const GenericModuleErrorSchema: <CodeType extends z.ZodType<string>>(codeSchema: CodeType) => z.ZodObject<{
|
|
11
10
|
code: CodeType;
|
|
12
11
|
message: z.ZodString;
|
|
13
12
|
name: z.ZodString;
|
|
14
|
-
userInfo: z.
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
message: z.ZodString;
|
|
18
|
-
name: z.ZodString;
|
|
19
|
-
userInfo: z.ZodUnion<[z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>, z.ZodNull]>;
|
|
20
|
-
}>, any> extends infer T ? { [k in keyof T]: T[k]; } : never, z.baseObjectInputType<{
|
|
21
|
-
code: CodeType;
|
|
22
|
-
message: z.ZodString;
|
|
23
|
-
name: z.ZodString;
|
|
24
|
-
userInfo: z.ZodUnion<[z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>, z.ZodNull]>;
|
|
25
|
-
}> extends infer T_1 ? { [k_1 in keyof T_1]: T_1[k_1]; } : never>, z.ZodObject<{
|
|
13
|
+
userInfo: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodAny>>>;
|
|
14
|
+
domain: z.ZodOptional<z.ZodString>;
|
|
15
|
+
nativeStackIOS: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
26
16
|
nativeStackAndroid: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
27
17
|
lineNumber: z.ZodNumber;
|
|
28
18
|
file: z.ZodNullable<z.ZodString>;
|
|
29
19
|
methodName: z.ZodString;
|
|
30
20
|
class: z.ZodString;
|
|
31
|
-
},
|
|
32
|
-
|
|
33
|
-
file: string | null;
|
|
34
|
-
methodName: string;
|
|
35
|
-
class: string;
|
|
36
|
-
}, {
|
|
37
|
-
lineNumber: number;
|
|
38
|
-
file: string | null;
|
|
39
|
-
methodName: string;
|
|
40
|
-
class: string;
|
|
41
|
-
}>, "many">>;
|
|
42
|
-
}, "strip", z.ZodTypeAny, {
|
|
43
|
-
nativeStackAndroid?: {
|
|
44
|
-
lineNumber: number;
|
|
45
|
-
file: string | null;
|
|
46
|
-
methodName: string;
|
|
47
|
-
class: string;
|
|
48
|
-
}[] | undefined;
|
|
49
|
-
}, {
|
|
50
|
-
nativeStackAndroid?: {
|
|
51
|
-
lineNumber: number;
|
|
52
|
-
file: string | null;
|
|
53
|
-
methodName: string;
|
|
54
|
-
class: string;
|
|
55
|
-
}[] | undefined;
|
|
56
|
-
}>>, z.ZodObject<{
|
|
57
|
-
domain: z.ZodOptional<z.ZodString>;
|
|
58
|
-
nativeStackIOS: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
59
|
-
}, "strip", z.ZodTypeAny, {
|
|
60
|
-
domain?: string | undefined;
|
|
61
|
-
nativeStackIOS?: string[] | undefined;
|
|
62
|
-
}, {
|
|
63
|
-
domain?: string | undefined;
|
|
64
|
-
nativeStackIOS?: string[] | undefined;
|
|
65
|
-
}>>;
|
|
21
|
+
}, z.core.$strip>>>;
|
|
22
|
+
}, z.core.$strip>;
|
|
66
23
|
//# sourceMappingURL=schema.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../src/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../src/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AA2BxB;;;;;;GAMG;AACH,eAAO,MAAM,wBAAwB,GAAI,QAAQ,SAAS,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,EACzE,YAAY,QAAQ;;;;;;;;;;;;;iBAYhB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pagopa/io-react-native-iso18013",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.3",
|
|
4
4
|
"description": "React Native bridge for iso18013 methods",
|
|
5
5
|
"source": "./src/index.tsx",
|
|
6
6
|
"main": "./lib/module/index.js",
|
|
@@ -158,6 +158,6 @@
|
|
|
158
158
|
"version": "0.49.8"
|
|
159
159
|
},
|
|
160
160
|
"dependencies": {
|
|
161
|
-
"zod": "
|
|
161
|
+
"zod": "4.3.6"
|
|
162
162
|
}
|
|
163
163
|
}
|
package/src/cbor/cbor/schema.ts
CHANGED
|
@@ -90,7 +90,7 @@ export const IssuerAuthPayload = z.object({
|
|
|
90
90
|
validityInfo: IssuerAuthPayloadValidityInfo,
|
|
91
91
|
digestAlgorithm: z.string().optional(),
|
|
92
92
|
deviceKeyInfo: IssuerAuthPayloadDeviceKeyInfo,
|
|
93
|
-
valueDigests: z.record(z.any()),
|
|
93
|
+
valueDigests: z.record(z.string(), z.any()),
|
|
94
94
|
});
|
|
95
95
|
|
|
96
96
|
export type IssuerAuthPayload = z.infer<typeof IssuerAuthPayload>;
|
|
@@ -249,14 +249,14 @@ ISO18013_5.addListener(
|
|
|
249
249
|
|
|
250
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.
|
|
251
251
|
|
|
252
|
-
| Parameter | Platform | Default
|
|
253
|
-
| ------------------- | ----------- |
|
|
254
|
-
| `peripheralMode` | Android | `true`
|
|
255
|
-
| `centralClientMode` | Android | `false`
|
|
256
|
-
| `clearBleCache` | Android | `true`
|
|
257
|
-
| `certificates` | Android/iOS | `[]`
|
|
258
|
-
| `engagementModes` | Android/iOS | `['qrcode', 'nfc']`
|
|
259
|
-
| `retrievalMethods` | Android/iOS | `['ble', 'nfc']`
|
|
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'`) |
|
|
260
260
|
|
|
261
261
|
```typescript
|
|
262
262
|
import { ISO18013_5 } from '@pagopa/io-react-native-iso18013';
|
|
@@ -339,6 +339,16 @@ import { ISO18013_5 } from '@pagopa/io-react-native-iso18013';
|
|
|
339
339
|
await ISO18013_5.close();
|
|
340
340
|
```
|
|
341
341
|
|
|
342
|
+
#### `setHceModalMessage` (iOS Only)
|
|
343
|
+
|
|
344
|
+
Sets the message to display in the HCE system modal
|
|
345
|
+
|
|
346
|
+
```typescript
|
|
347
|
+
import { ISO18013_5 } from '@pagopa/io-react-native-iso18013';
|
|
348
|
+
|
|
349
|
+
await ISO18013_5.setHceModalMessage('My custom message');
|
|
350
|
+
```
|
|
351
|
+
|
|
342
352
|
## Proximity Sequence Diagram
|
|
343
353
|
|
|
344
354
|
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.
|
|
@@ -165,3 +165,13 @@ export function addListener<E extends Events>(
|
|
|
165
165
|
) {
|
|
166
166
|
return eventEmitter.addListener(event, callback);
|
|
167
167
|
}
|
|
168
|
+
|
|
169
|
+
/**
|
|
170
|
+
* **iOS only**
|
|
171
|
+
*
|
|
172
|
+
* Sets a custom message to be displayed in the NFC HCE modal during NFC engagement.
|
|
173
|
+
* @param message - The custom message to be displayed in the NFC HCE modal.
|
|
174
|
+
*/
|
|
175
|
+
export function setHceModalMessage(message: string): void {
|
|
176
|
+
IoReactNativeIso18013.setHceModalMessage(message);
|
|
177
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
|
|
3
3
|
// Inner data: a record of booleans with the attributes and the intent to retain flag
|
|
4
|
-
const booleanFieldGroup = z.record(z.boolean());
|
|
4
|
+
const booleanFieldGroup = z.record(z.string(), z.boolean());
|
|
5
5
|
|
|
6
6
|
const credentialEntrySchema = z
|
|
7
7
|
.object({
|
|
@@ -10,7 +10,7 @@ const credentialEntrySchema = z
|
|
|
10
10
|
.catchall(booleanFieldGroup);
|
|
11
11
|
|
|
12
12
|
const VerifierRequest = z.object({
|
|
13
|
-
request: z.record(credentialEntrySchema),
|
|
13
|
+
request: z.record(z.string(), credentialEntrySchema),
|
|
14
14
|
});
|
|
15
15
|
|
|
16
16
|
/**
|
package/src/schema.ts
CHANGED
|
@@ -12,36 +12,27 @@ const StackTraceElementSchema = z.object({
|
|
|
12
12
|
|
|
13
13
|
/**
|
|
14
14
|
* Schema for parsing specific parameters of a rejected promise error in an Android native module.
|
|
15
|
-
* It's defined as partial to allow merging with the common schema and it must be checked at runtime.
|
|
16
15
|
*/
|
|
17
|
-
const ModuleErrorAndroidSchema = z
|
|
18
|
-
.
|
|
19
|
-
|
|
20
|
-
})
|
|
21
|
-
.partial();
|
|
16
|
+
const ModuleErrorAndroidSchema = z.object({
|
|
17
|
+
nativeStackAndroid: z.array(StackTraceElementSchema).optional(),
|
|
18
|
+
});
|
|
22
19
|
|
|
23
20
|
/**
|
|
24
21
|
* Schema for parsing specific parameters of a rejected promise error in an iOS native module.
|
|
25
|
-
* It's defined as partial to allow merging with the common schema and it must be checked at runtime.
|
|
26
22
|
*/
|
|
27
|
-
const ModuleErrorIosSchema = z
|
|
28
|
-
.
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
})
|
|
32
|
-
.partial();
|
|
23
|
+
const ModuleErrorIosSchema = z.object({
|
|
24
|
+
domain: z.string().optional(),
|
|
25
|
+
nativeStackIOS: z.array(z.string()).optional(),
|
|
26
|
+
});
|
|
33
27
|
|
|
34
28
|
/**
|
|
35
29
|
* Schema for parsing common parameters of a rejected promise error in a native module.
|
|
36
30
|
* This schema contains the common parameters that are shared across both Android and iOS native modules.
|
|
37
31
|
* Parameters which are platform specific are defined as optional and must be checked at runtime.
|
|
38
|
-
* It accepts a generic code schema to allow for different error codes which can be defined in each module.
|
|
39
32
|
* @param codeSchema - The Zod schema for the error codes used by the module.
|
|
40
33
|
* @returns A schema for the common parameters of a rejected promise error in a native module.
|
|
41
34
|
*/
|
|
42
|
-
export const GenericModuleErrorSchema = <
|
|
43
|
-
CodeType extends z.ZodEnum<[string, ...string[]]>,
|
|
44
|
-
>(
|
|
35
|
+
export const GenericModuleErrorSchema = <CodeType extends z.ZodType<string>>(
|
|
45
36
|
codeSchema: CodeType
|
|
46
37
|
) =>
|
|
47
38
|
z
|
|
@@ -49,7 +40,9 @@ export const GenericModuleErrorSchema = <
|
|
|
49
40
|
code: codeSchema,
|
|
50
41
|
message: z.string(),
|
|
51
42
|
name: z.string(),
|
|
52
|
-
userInfo: z.record(z.string(), z.any()).
|
|
43
|
+
userInfo: z.record(z.string(), z.any()).nullish(),
|
|
53
44
|
})
|
|
54
|
-
.
|
|
55
|
-
|
|
45
|
+
.extend({
|
|
46
|
+
...ModuleErrorAndroidSchema.shape,
|
|
47
|
+
...ModuleErrorIosSchema.shape,
|
|
48
|
+
});
|