react-ecosistema-unp 2.0.0 → 2.0.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.
|
@@ -6,20 +6,25 @@ const r = () => {
|
|
|
6
6
|
} catch {
|
|
7
7
|
return null;
|
|
8
8
|
}
|
|
9
|
-
},
|
|
9
|
+
}, s = () => {
|
|
10
10
|
var t, e;
|
|
11
11
|
return ((e = (t = r()) == null ? void 0 : t.user) == null ? void 0 : e.id_busuario) || "";
|
|
12
|
-
},
|
|
12
|
+
}, n = () => {
|
|
13
13
|
var t, e;
|
|
14
14
|
return ((e = (t = r()) == null ? void 0 : t.user) == null ? void 0 : e.nombres) || "";
|
|
15
|
-
},
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
15
|
+
}, o = () => localStorage.getItem("access_token") || "", u = () => {
|
|
16
|
+
var t, e;
|
|
17
|
+
return ((e = (t = r()) == null ? void 0 : t.user) == null ? void 0 : e.servicios) || [];
|
|
18
|
+
}, a = {
|
|
19
|
+
getUserId: s,
|
|
20
|
+
getUserName: n,
|
|
21
|
+
getUserToken: o,
|
|
22
|
+
getUserRoles: u
|
|
19
23
|
};
|
|
20
24
|
export {
|
|
21
25
|
a as auth,
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
u as
|
|
26
|
+
s as getUserId,
|
|
27
|
+
n as getUserName,
|
|
28
|
+
u as getUserRoles,
|
|
29
|
+
o as getUserToken
|
|
25
30
|
};
|
|
@@ -1,9 +1,16 @@
|
|
|
1
|
+
export interface Servicio {
|
|
2
|
+
url: string;
|
|
3
|
+
rol: string;
|
|
4
|
+
id_rol: number;
|
|
5
|
+
}
|
|
1
6
|
declare const getUserId: () => any;
|
|
2
7
|
declare const getUserName: () => any;
|
|
3
8
|
declare const getUserToken: () => string;
|
|
9
|
+
declare const getUserRoles: () => Servicio[];
|
|
4
10
|
declare const auth: {
|
|
5
11
|
getUserId: () => any;
|
|
6
12
|
getUserName: () => any;
|
|
7
13
|
getUserToken: () => string;
|
|
14
|
+
getUserRoles: () => Servicio[];
|
|
8
15
|
};
|
|
9
|
-
export { getUserId, getUserName, getUserToken, auth };
|
|
16
|
+
export { getUserId, getUserName, getUserToken, getUserRoles, auth };
|