@pagopa/io-react-native-cie 1.1.1 → 1.1.2
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/android/src/main/java/com/pagopa/ioreactnativecie/IoReactNativeCieModule.kt +2 -4
- package/lib/module/manager/index.js +3 -3
- package/lib/module/manager/index.js.map +1 -1
- package/lib/module/utils/index.js.map +1 -1
- package/lib/typescript/src/manager/index.d.ts +3 -3
- package/lib/typescript/src/manager/index.d.ts.map +1 -1
- package/lib/typescript/src/utils/index.d.ts +4 -4
- package/lib/typescript/src/utils/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/manager/index.ts +3 -3
- package/src/utils/index.ts +4 -4
|
@@ -93,15 +93,13 @@ class IoReactNativeCieModule(reactContext: ReactApplicationContext) :
|
|
|
93
93
|
}
|
|
94
94
|
|
|
95
95
|
@ReactMethod
|
|
96
|
-
fun setAlertMessage(key: String, value: String
|
|
96
|
+
fun setAlertMessage(key: String, value: String) {
|
|
97
97
|
// Android does not support alert messages for NFC reading
|
|
98
|
-
promise.resolve(null)
|
|
99
98
|
}
|
|
100
99
|
|
|
101
100
|
@ReactMethod
|
|
102
|
-
fun setCurrentAlertMessage(value: String
|
|
101
|
+
fun setCurrentAlertMessage(value: String) {
|
|
103
102
|
// Android does not support alert messages for NFC reading
|
|
104
|
-
promise.resolve(null)
|
|
105
103
|
}
|
|
106
104
|
|
|
107
105
|
@ReactMethod
|
|
@@ -62,7 +62,7 @@ const removeAllListeners = () => {
|
|
|
62
62
|
* ```
|
|
63
63
|
*/
|
|
64
64
|
const setCustomIdpUrl = url => {
|
|
65
|
-
|
|
65
|
+
IoReactNativeCie.setCustomIdpUrl(url ?? getDefaultIdpUrl());
|
|
66
66
|
};
|
|
67
67
|
|
|
68
68
|
/**
|
|
@@ -78,7 +78,7 @@ const setCustomIdpUrl = url => {
|
|
|
78
78
|
* ```
|
|
79
79
|
*/
|
|
80
80
|
export const setAlertMessage = (key, value) => {
|
|
81
|
-
|
|
81
|
+
IoReactNativeCie.setAlertMessage(key, value);
|
|
82
82
|
};
|
|
83
83
|
|
|
84
84
|
/**
|
|
@@ -93,7 +93,7 @@ export const setAlertMessage = (key, value) => {
|
|
|
93
93
|
* ```
|
|
94
94
|
*/
|
|
95
95
|
export const setCurrentAlertMessage = value => {
|
|
96
|
-
|
|
96
|
+
IoReactNativeCie.setCurrentAlertMessage(value);
|
|
97
97
|
};
|
|
98
98
|
|
|
99
99
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["NativeEventEmitter","IoReactNativeCie","getDefaultIdpUrl","DEFAULT_TIMEOUT","eventEmitter","addListener","event","listener","subscription","remove","removeListener","removeAllListeners","setCustomIdpUrl","url","setAlertMessage","key","value","setCurrentAlertMessage","startReadingAttributes","timeout","startReading","pin","authenticationUrl","stopReading"],"sourceRoot":"../../../src","sources":["manager/index.ts"],"mappings":";;AAAA,SAASA,kBAAkB,QAAQ,cAAc;AACjD,SAASC,gBAAgB,QAAQ,cAAW;AAE5C,SAASC,gBAAgB,QAAQ,YAAS;AAE1C,MAAMC,eAAe,GAAG,KAAK;AAE7B,MAAMC,YAAY,GAAG,IAAIJ,kBAAkB,CAACC,gBAAgB,CAAC;;AAE7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMI,WAAW,GAAGA,CAClBC,KAAQ,EACRC,QAA6B,KAC1B;EACH,MAAMC,YAAY,GAAGJ,YAAY,CAACC,WAAW,CAACC,KAAK,EAAEC,QAAQ,CAAC;EAC9D,OAAOC,YAAY,CAACC,MAAM;AAC5B,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA,MAAMC,cAAc,GAAIJ,KAAe,IAAK;EAC1CF,YAAY,CAACO,kBAAkB,CAACL,KAAK,CAAC;AACxC,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMK,kBAAkB,GAAGA,CAAA,KAAM;EAC/BP,YAAY,CAACO,kBAAkB,CAAC,SAAS,CAAC;EAC1CP,YAAY,CAACO,kBAAkB,CAAC,SAAS,CAAC;EAC1CP,YAAY,CAACO,kBAAkB,CAAC,qBAAqB,CAAC;EACtDP,YAAY,CAACO,kBAAkB,CAAC,WAAW,CAAC;AAC9C,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,eAAe,GAAIC,GAAuB,IAAK;
|
|
1
|
+
{"version":3,"names":["NativeEventEmitter","IoReactNativeCie","getDefaultIdpUrl","DEFAULT_TIMEOUT","eventEmitter","addListener","event","listener","subscription","remove","removeListener","removeAllListeners","setCustomIdpUrl","url","setAlertMessage","key","value","setCurrentAlertMessage","startReadingAttributes","timeout","startReading","pin","authenticationUrl","stopReading"],"sourceRoot":"../../../src","sources":["manager/index.ts"],"mappings":";;AAAA,SAASA,kBAAkB,QAAQ,cAAc;AACjD,SAASC,gBAAgB,QAAQ,cAAW;AAE5C,SAASC,gBAAgB,QAAQ,YAAS;AAE1C,MAAMC,eAAe,GAAG,KAAK;AAE7B,MAAMC,YAAY,GAAG,IAAIJ,kBAAkB,CAACC,gBAAgB,CAAC;;AAE7D;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMI,WAAW,GAAGA,CAClBC,KAAQ,EACRC,QAA6B,KAC1B;EACH,MAAMC,YAAY,GAAGJ,YAAY,CAACC,WAAW,CAACC,KAAK,EAAEC,QAAQ,CAAC;EAC9D,OAAOC,YAAY,CAACC,MAAM;AAC5B,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA,MAAMC,cAAc,GAAIJ,KAAe,IAAK;EAC1CF,YAAY,CAACO,kBAAkB,CAACL,KAAK,CAAC;AACxC,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMK,kBAAkB,GAAGA,CAAA,KAAM;EAC/BP,YAAY,CAACO,kBAAkB,CAAC,SAAS,CAAC;EAC1CP,YAAY,CAACO,kBAAkB,CAAC,SAAS,CAAC;EAC1CP,YAAY,CAACO,kBAAkB,CAAC,qBAAqB,CAAC;EACtDP,YAAY,CAACO,kBAAkB,CAAC,WAAW,CAAC;AAC9C,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,eAAe,GAAIC,GAAuB,IAAK;EACnDZ,gBAAgB,CAACW,eAAe,CAACC,GAAG,IAAIX,gBAAgB,CAAC,CAAC,CAAC;AAC7D,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMY,eAAe,GAAGA,CAACC,GAAoB,EAAEC,KAAa,KAAK;EACtEf,gBAAgB,CAACa,eAAe,CAACC,GAAG,EAAEC,KAAK,CAAC;AAC9C,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,sBAAsB,GAAID,KAAa,IAAK;EACvDf,gBAAgB,CAACgB,sBAAsB,CAACD,KAAK,CAAC;AAChD,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAME,sBAAsB,GAAG,MAAAA,CAC7BC,OAAe,GAAGhB,eAAe,KACf;EAClB,OAAOF,gBAAgB,CAACiB,sBAAsB,CAACC,OAAO,CAAC;AACzD,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,YAAY,GAAG,MAAAA,CACnBC,GAAW,EACXC,iBAAyB,EACzBH,OAAe,GAAGhB,eAAe,KACf;EAClB,OAAOF,gBAAgB,CAACmB,YAAY,CAACC,GAAG,EAAEC,iBAAiB,EAAEH,OAAO,CAAC;AACvE,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMI,WAAW,GAAG,MAAAA,CAAA,KAA2B;EAC7C,OAAOtB,gBAAgB,CAACsB,WAAW,CAAC,CAAC;AACvC,CAAC;AAED,SACElB,WAAW,EACXK,cAAc,EACdC,kBAAkB,EAClBC,eAAe,EACfM,sBAAsB,EACtBE,YAAY,EACZG,WAAW","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["IoReactNativeCie","hasNfcFeature","isNfcEnabled","isCieAuthenticationSupported","openNfcSettings"],"sourceRoot":"../../../src","sources":["utils/index.ts"],"mappings":";;AAAA,SAASA,gBAAgB,QAAQ,cAAW;;AAE5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,aAAa,GAAG,MAAAA,CAAA,
|
|
1
|
+
{"version":3,"names":["IoReactNativeCie","hasNfcFeature","isNfcEnabled","isCieAuthenticationSupported","openNfcSettings"],"sourceRoot":"../../../src","sources":["utils/index.ts"],"mappings":";;AAAA,SAASA,gBAAgB,QAAQ,cAAW;;AAE5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,aAAa,GAAG,MAAAA,CAAA,KAA8B;EACzD,OAAOD,gBAAgB,CAACC,aAAa,CAAC,CAAC;AACzC,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,YAAY,GAAG,MAAAA,CAAA,KAA8B;EACxD,OAAOF,gBAAgB,CAACE,YAAY,CAAC,CAAC;AACxC,CAAC;;AAED;AACA;AACA;AACA;AACA,OAAO,MAAMC,4BAA4B,GAAG,MAAAA,CAAA,KAA8B;EACxE,OAAOH,gBAAgB,CAACG,4BAA4B,CAAC,CAAC;AACxD,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,eAAe,GAAG,MAAAA,CAAA,KAA8B;EAC3D,OAAOJ,gBAAgB,CAACI,eAAe,CAAC,CAAC;AAC3C,CAAC","ignoreList":[]}
|
|
@@ -41,7 +41,7 @@ declare const removeAllListeners: () => void;
|
|
|
41
41
|
* CieManager.setCustomIdpUrl('https://custom.idp.com/auth');
|
|
42
42
|
* ```
|
|
43
43
|
*/
|
|
44
|
-
declare const setCustomIdpUrl: (url: string | undefined) =>
|
|
44
|
+
declare const setCustomIdpUrl: (url: string | undefined) => void;
|
|
45
45
|
/**
|
|
46
46
|
* Sets an alert message for the CIE reading process.
|
|
47
47
|
*
|
|
@@ -54,7 +54,7 @@ declare const setCustomIdpUrl: (url: string | undefined) => any;
|
|
|
54
54
|
* CieManager.setAlertMessage('readingInstructions', 'Please scan your CIE card');
|
|
55
55
|
* ```
|
|
56
56
|
*/
|
|
57
|
-
export declare const setAlertMessage: (key: AlertMessageKey, value: string) =>
|
|
57
|
+
export declare const setAlertMessage: (key: AlertMessageKey, value: string) => void;
|
|
58
58
|
/**
|
|
59
59
|
* Updates the current displayed alert message for the CIE reading process.
|
|
60
60
|
*
|
|
@@ -66,7 +66,7 @@ export declare const setAlertMessage: (key: AlertMessageKey, value: string) => a
|
|
|
66
66
|
* CieManager.setCurrentAlertMessage('Please scan your CIE card');
|
|
67
67
|
* ```
|
|
68
68
|
*/
|
|
69
|
-
export declare const setCurrentAlertMessage: (value: string) =>
|
|
69
|
+
export declare const setCurrentAlertMessage: (value: string) => void;
|
|
70
70
|
/**
|
|
71
71
|
* Starts the process of reading attributes from the CIE card.
|
|
72
72
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/manager/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,KAAK,QAAQ,EAAE,KAAK,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAOhF;;;;;;;;;;;;;GAaG;AACH,QAAA,MAAM,WAAW,GAAI,CAAC,SAAS,QAAQ,EACrC,OAAO,CAAC,EACR,UAAU,gBAAgB,CAAC,CAAC,CAAC,eAI9B,CAAC;AAEF;;;;GAIG;AACH,QAAA,MA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L,WAAW,EACX,cAAc,EACd,kBAAkB,EAClB,eAAe,EACf,sBAAsB,EACtB,YAAY,EACZ,WAAW,GACZ,CAAC"}
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* @returns A promise that resolves to true if the device supports NFC, false otherwise.
|
|
7
7
|
* @throws {CieError} If cannot check if NFC is available.
|
|
8
8
|
*/
|
|
9
|
-
export declare const hasNfcFeature: () => Promise<
|
|
9
|
+
export declare const hasNfcFeature: () => Promise<boolean>;
|
|
10
10
|
/**
|
|
11
11
|
* Checks if NFC is currently enabled on the device.
|
|
12
12
|
*
|
|
@@ -15,16 +15,16 @@ export declare const hasNfcFeature: () => Promise<any>;
|
|
|
15
15
|
* @returns A promise that resolves to true if NFC is enabled, false otherwise.
|
|
16
16
|
* @throws {CieError} If cannot check if NFC is enabled.
|
|
17
17
|
*/
|
|
18
|
-
export declare const isNfcEnabled: () => Promise<
|
|
18
|
+
export declare const isNfcEnabled: () => Promise<boolean>;
|
|
19
19
|
/**
|
|
20
20
|
* Verifies if the device supports CIE (Electronic Identity Card) authentication.
|
|
21
21
|
* @returns A promise that resolves to true if CIE authentication is supported, false otherwise.
|
|
22
22
|
*/
|
|
23
|
-
export declare const isCieAuthenticationSupported: () => Promise<
|
|
23
|
+
export declare const isCieAuthenticationSupported: () => Promise<boolean>;
|
|
24
24
|
/**
|
|
25
25
|
* Opens the device's NFC settings page, allowing users to enable or disable NFC.
|
|
26
26
|
* @returns A promise that resolves when the settings page is opened.
|
|
27
27
|
* @throws {CieError} If cannot open the settings page.
|
|
28
28
|
*/
|
|
29
|
-
export declare const openNfcSettings: () => Promise<
|
|
29
|
+
export declare const openNfcSettings: () => Promise<boolean>;
|
|
30
30
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/utils/index.ts"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AACH,eAAO,MAAM,aAAa,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/utils/index.ts"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AACH,eAAO,MAAM,aAAa,QAAa,OAAO,CAAC,OAAO,CAErD,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,YAAY,QAAa,OAAO,CAAC,OAAO,CAEpD,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,4BAA4B,QAAa,OAAO,CAAC,OAAO,CAEpE,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,eAAe,QAAa,OAAO,CAAC,OAAO,CAEvD,CAAC"}
|
package/package.json
CHANGED
package/src/manager/index.ts
CHANGED
|
@@ -66,7 +66,7 @@ const removeAllListeners = () => {
|
|
|
66
66
|
* ```
|
|
67
67
|
*/
|
|
68
68
|
const setCustomIdpUrl = (url: string | undefined) => {
|
|
69
|
-
|
|
69
|
+
IoReactNativeCie.setCustomIdpUrl(url ?? getDefaultIdpUrl());
|
|
70
70
|
};
|
|
71
71
|
|
|
72
72
|
/**
|
|
@@ -82,7 +82,7 @@ const setCustomIdpUrl = (url: string | undefined) => {
|
|
|
82
82
|
* ```
|
|
83
83
|
*/
|
|
84
84
|
export const setAlertMessage = (key: AlertMessageKey, value: string) => {
|
|
85
|
-
|
|
85
|
+
IoReactNativeCie.setAlertMessage(key, value);
|
|
86
86
|
};
|
|
87
87
|
|
|
88
88
|
/**
|
|
@@ -97,7 +97,7 @@ export const setAlertMessage = (key: AlertMessageKey, value: string) => {
|
|
|
97
97
|
* ```
|
|
98
98
|
*/
|
|
99
99
|
export const setCurrentAlertMessage = (value: string) => {
|
|
100
|
-
|
|
100
|
+
IoReactNativeCie.setCurrentAlertMessage(value);
|
|
101
101
|
};
|
|
102
102
|
|
|
103
103
|
/**
|
package/src/utils/index.ts
CHANGED
|
@@ -8,7 +8,7 @@ import { IoReactNativeCie } from '../native';
|
|
|
8
8
|
* @returns A promise that resolves to true if the device supports NFC, false otherwise.
|
|
9
9
|
* @throws {CieError} If cannot check if NFC is available.
|
|
10
10
|
*/
|
|
11
|
-
export const hasNfcFeature = async () => {
|
|
11
|
+
export const hasNfcFeature = async (): Promise<boolean> => {
|
|
12
12
|
return IoReactNativeCie.hasNfcFeature();
|
|
13
13
|
};
|
|
14
14
|
|
|
@@ -20,7 +20,7 @@ export const hasNfcFeature = async () => {
|
|
|
20
20
|
* @returns A promise that resolves to true if NFC is enabled, false otherwise.
|
|
21
21
|
* @throws {CieError} If cannot check if NFC is enabled.
|
|
22
22
|
*/
|
|
23
|
-
export const isNfcEnabled = async () => {
|
|
23
|
+
export const isNfcEnabled = async (): Promise<boolean> => {
|
|
24
24
|
return IoReactNativeCie.isNfcEnabled();
|
|
25
25
|
};
|
|
26
26
|
|
|
@@ -28,7 +28,7 @@ export const isNfcEnabled = async () => {
|
|
|
28
28
|
* Verifies if the device supports CIE (Electronic Identity Card) authentication.
|
|
29
29
|
* @returns A promise that resolves to true if CIE authentication is supported, false otherwise.
|
|
30
30
|
*/
|
|
31
|
-
export const isCieAuthenticationSupported = async () => {
|
|
31
|
+
export const isCieAuthenticationSupported = async (): Promise<boolean> => {
|
|
32
32
|
return IoReactNativeCie.isCieAuthenticationSupported();
|
|
33
33
|
};
|
|
34
34
|
|
|
@@ -37,6 +37,6 @@ export const isCieAuthenticationSupported = async () => {
|
|
|
37
37
|
* @returns A promise that resolves when the settings page is opened.
|
|
38
38
|
* @throws {CieError} If cannot open the settings page.
|
|
39
39
|
*/
|
|
40
|
-
export const openNfcSettings = async () => {
|
|
40
|
+
export const openNfcSettings = async (): Promise<boolean> => {
|
|
41
41
|
return IoReactNativeCie.openNfcSettings();
|
|
42
42
|
};
|