valtech-components 2.0.892 → 2.0.893
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/esm2022/lib/services/auth/auth-state.service.mjs +12 -1
- package/esm2022/lib/services/auth/auth.service.mjs +15 -1
- package/esm2022/lib/services/auth/types.mjs +2 -1
- package/esm2022/lib/version.mjs +2 -2
- package/fesm2022/valtech-components.mjs +27 -1
- package/fesm2022/valtech-components.mjs.map +1 -1
- package/lib/services/auth/auth-state.service.d.ts +5 -0
- package/lib/services/auth/types.d.ts +6 -0
- package/lib/version.d.ts +1 -1
- package/package.json +1 -1
|
@@ -87,6 +87,11 @@ export declare class AuthStateService {
|
|
|
87
87
|
* Actualiza el userId y email (después de parsear el token).
|
|
88
88
|
*/
|
|
89
89
|
updateUserInfo(userId: string, email: string): void;
|
|
90
|
+
/**
|
|
91
|
+
* Actualiza la organización activa del usuario.
|
|
92
|
+
* Invocado tras parsear el JWT (claim "org") o tras switchOrg exitoso.
|
|
93
|
+
*/
|
|
94
|
+
updateActiveOrg(activeOrg: string | null): void;
|
|
90
95
|
/**
|
|
91
96
|
* Hidrata el state con campos del profile (nombre, handle, avatar, phone).
|
|
92
97
|
* Invocado tras `getProfile()` o `updateProfile()` para que consumers de
|
|
@@ -63,6 +63,8 @@ export interface AuthState {
|
|
|
63
63
|
avatarUrl?: string | null;
|
|
64
64
|
/** Teléfono (poblado tras `getProfile()`) */
|
|
65
65
|
phone?: string | null;
|
|
66
|
+
/** ID de la organización activa */
|
|
67
|
+
activeOrg?: string | null;
|
|
66
68
|
/** Roles del usuario */
|
|
67
69
|
roles: string[];
|
|
68
70
|
/** Permisos del usuario (formato 'resource:action') */
|
|
@@ -86,6 +88,8 @@ export interface AuthUser {
|
|
|
86
88
|
phone?: string;
|
|
87
89
|
/** Username/handle del usuario (ej: @victorv) */
|
|
88
90
|
handle?: string;
|
|
91
|
+
/** ID de la organización activa */
|
|
92
|
+
activeOrg?: string;
|
|
89
93
|
/** URL del avatar del usuario */
|
|
90
94
|
avatarUrl?: string;
|
|
91
95
|
roles: string[];
|
|
@@ -539,6 +543,8 @@ export interface JWTClaims {
|
|
|
539
543
|
sid?: string;
|
|
540
544
|
/** Usuario tiene suscripción premium activa */
|
|
541
545
|
premium?: boolean;
|
|
546
|
+
/** Active organization ID (JWT claim "org") */
|
|
547
|
+
org?: string;
|
|
542
548
|
/** Issued at */
|
|
543
549
|
iat: number;
|
|
544
550
|
/** Expiration */
|
package/lib/version.d.ts
CHANGED