valtech-components 2.0.445 → 2.0.446

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 (50) hide show
  1. package/esm2022/public-api.mjs +9 -6
  2. package/fesm2022/valtech-components.mjs +5 -3237
  3. package/fesm2022/valtech-components.mjs.map +1 -1
  4. package/lib/components/organisms/article/article.component.d.ts +5 -5
  5. package/package.json +1 -1
  6. package/public-api.d.ts +0 -5
  7. package/esm2022/lib/components/molecules/feedback-form/feedback-form.component.mjs +0 -352
  8. package/esm2022/lib/components/molecules/feedback-form/types.mjs +0 -2
  9. package/esm2022/lib/services/auth/auth-state.service.mjs +0 -173
  10. package/esm2022/lib/services/auth/auth.service.mjs +0 -454
  11. package/esm2022/lib/services/auth/config.mjs +0 -76
  12. package/esm2022/lib/services/auth/guards.mjs +0 -194
  13. package/esm2022/lib/services/auth/index.mjs +0 -70
  14. package/esm2022/lib/services/auth/interceptor.mjs +0 -98
  15. package/esm2022/lib/services/auth/storage.service.mjs +0 -138
  16. package/esm2022/lib/services/auth/sync.service.mjs +0 -146
  17. package/esm2022/lib/services/auth/token.service.mjs +0 -113
  18. package/esm2022/lib/services/auth/types.mjs +0 -29
  19. package/esm2022/lib/services/content/content-types/blog.mjs +0 -275
  20. package/esm2022/lib/services/content/content-types/documentation.mjs +0 -303
  21. package/esm2022/lib/services/content/content-types/news.mjs +0 -277
  22. package/esm2022/lib/services/content/index.mjs +0 -51
  23. package/esm2022/lib/services/content/transformer.mjs +0 -265
  24. package/esm2022/lib/services/content/types.mjs +0 -41
  25. package/esm2022/lib/services/feedback/config.mjs +0 -49
  26. package/esm2022/lib/services/feedback/feedback.service.mjs +0 -174
  27. package/esm2022/lib/services/feedback/index.mjs +0 -44
  28. package/esm2022/lib/services/feedback/types.mjs +0 -30
  29. package/lib/components/molecules/feedback-form/feedback-form.component.d.ts +0 -56
  30. package/lib/components/molecules/feedback-form/types.d.ts +0 -54
  31. package/lib/services/auth/auth-state.service.d.ts +0 -85
  32. package/lib/services/auth/auth.service.d.ts +0 -146
  33. package/lib/services/auth/config.d.ts +0 -38
  34. package/lib/services/auth/guards.d.ts +0 -123
  35. package/lib/services/auth/index.d.ts +0 -63
  36. package/lib/services/auth/interceptor.d.ts +0 -22
  37. package/lib/services/auth/storage.service.d.ts +0 -48
  38. package/lib/services/auth/sync.service.d.ts +0 -49
  39. package/lib/services/auth/token.service.d.ts +0 -51
  40. package/lib/services/auth/types.d.ts +0 -315
  41. package/lib/services/content/content-types/blog.d.ts +0 -148
  42. package/lib/services/content/content-types/documentation.d.ts +0 -183
  43. package/lib/services/content/content-types/news.d.ts +0 -162
  44. package/lib/services/content/index.d.ts +0 -49
  45. package/lib/services/content/transformer.d.ts +0 -96
  46. package/lib/services/content/types.d.ts +0 -220
  47. package/lib/services/feedback/config.d.ts +0 -35
  48. package/lib/services/feedback/feedback.service.d.ts +0 -76
  49. package/lib/services/feedback/index.d.ts +0 -40
  50. package/lib/services/feedback/types.d.ts +0 -107
@@ -1,123 +0,0 @@
1
- import { CanActivateFn } from '@angular/router';
2
- /**
3
- * Guard que verifica si el usuario está autenticado.
4
- * Redirige a loginRoute si no está autenticado.
5
- *
6
- * @example
7
- * ```typescript
8
- * import { authGuard } from 'valtech-components';
9
- *
10
- * const routes: Routes = [
11
- * {
12
- * path: 'dashboard',
13
- * canActivate: [authGuard],
14
- * loadComponent: () => import('./dashboard.page'),
15
- * },
16
- * ];
17
- * ```
18
- */
19
- export declare const authGuard: CanActivateFn;
20
- /**
21
- * Guard que verifica si el usuario NO está autenticado.
22
- * Redirige a homeRoute si ya está autenticado.
23
- * Útil para páginas de login/registro.
24
- *
25
- * @example
26
- * ```typescript
27
- * import { guestGuard } from 'valtech-components';
28
- *
29
- * const routes: Routes = [
30
- * {
31
- * path: 'login',
32
- * canActivate: [guestGuard],
33
- * loadComponent: () => import('./login.page'),
34
- * },
35
- * ];
36
- * ```
37
- */
38
- export declare const guestGuard: CanActivateFn;
39
- /**
40
- * Factory para crear guard de permisos.
41
- * Verifica si el usuario tiene el permiso especificado.
42
- *
43
- * @param permissions - Permiso o lista de permisos requeridos (OR)
44
- * @returns Guard function
45
- *
46
- * @example
47
- * ```typescript
48
- * import { authGuard, permissionGuard } from 'valtech-components';
49
- *
50
- * const routes: Routes = [
51
- * {
52
- * path: 'templates',
53
- * canActivate: [authGuard, permissionGuard('templates:read')],
54
- * loadComponent: () => import('./templates.page'),
55
- * },
56
- * {
57
- * path: 'admin',
58
- * canActivate: [authGuard, permissionGuard(['admin:*', 'super_admin'])],
59
- * loadComponent: () => import('./admin.page'),
60
- * },
61
- * ];
62
- * ```
63
- */
64
- export declare function permissionGuard(permissions: string | string[]): CanActivateFn;
65
- /**
66
- * Guard que lee permisos desde route.data.
67
- * Permite configurar permisos directamente en la definición de rutas.
68
- *
69
- * @example
70
- * ```typescript
71
- * import { authGuard, permissionGuardFromRoute } from 'valtech-components';
72
- *
73
- * const routes: Routes = [
74
- * {
75
- * path: 'admin/users',
76
- * canActivate: [authGuard, permissionGuardFromRoute],
77
- * data: {
78
- * permissions: ['users:read', 'users:manage'],
79
- * requireAll: false // true = AND, false = OR (default)
80
- * },
81
- * loadComponent: () => import('./users.page'),
82
- * },
83
- * ];
84
- * ```
85
- */
86
- export declare const permissionGuardFromRoute: CanActivateFn;
87
- /**
88
- * Guard que verifica si el usuario es super admin.
89
- *
90
- * @example
91
- * ```typescript
92
- * import { authGuard, superAdminGuard } from 'valtech-components';
93
- *
94
- * const routes: Routes = [
95
- * {
96
- * path: 'super-admin',
97
- * canActivate: [authGuard, superAdminGuard],
98
- * loadComponent: () => import('./super-admin.page'),
99
- * },
100
- * ];
101
- * ```
102
- */
103
- export declare const superAdminGuard: CanActivateFn;
104
- /**
105
- * Guard que verifica si el usuario tiene un rol específico.
106
- *
107
- * @param roles - Rol o lista de roles requeridos (OR)
108
- * @returns Guard function
109
- *
110
- * @example
111
- * ```typescript
112
- * import { authGuard, roleGuard } from 'valtech-components';
113
- *
114
- * const routes: Routes = [
115
- * {
116
- * path: 'editor',
117
- * canActivate: [authGuard, roleGuard(['editor', 'admin'])],
118
- * loadComponent: () => import('./editor.page'),
119
- * },
120
- * ];
121
- * ```
122
- */
123
- export declare function roleGuard(roles: string | string[]): CanActivateFn;
@@ -1,63 +0,0 @@
1
- /**
2
- * Valtech Auth Service
3
- *
4
- * Servicio de autenticación reutilizable para aplicaciones Angular.
5
- * Proporciona autenticación con AuthV2, MFA, sincronización entre pestañas,
6
- * y refresh proactivo de tokens.
7
- *
8
- * @example
9
- * ```typescript
10
- * // En main.ts
11
- * import { bootstrapApplication } from '@angular/platform-browser';
12
- * import { provideValtechAuth } from 'valtech-components';
13
- * import { environment } from './environments/environment';
14
- *
15
- * bootstrapApplication(AppComponent, {
16
- * providers: [
17
- * provideValtechAuth({
18
- * apiUrl: environment.apiUrl,
19
- * enableFirebaseIntegration: true,
20
- * }),
21
- * ],
22
- * });
23
- *
24
- * // En app.routes.ts
25
- * import { authGuard, guestGuard, permissionGuard } from 'valtech-components';
26
- *
27
- * const routes: Routes = [
28
- * { path: 'login', canActivate: [guestGuard], loadComponent: () => import('./login.page') },
29
- * { path: 'dashboard', canActivate: [authGuard], loadComponent: () => import('./dashboard.page') },
30
- * { path: 'admin', canActivate: [authGuard, permissionGuard('admin:*')], loadComponent: () => import('./admin.page') },
31
- * ];
32
- *
33
- * // En componentes
34
- * import { AuthService } from 'valtech-components';
35
- *
36
- * @Component({...})
37
- * export class LoginComponent {
38
- * private auth = inject(AuthService);
39
- *
40
- * async login() {
41
- * await firstValueFrom(this.auth.signin({ email, password }));
42
- * if (this.auth.mfaPending().required) {
43
- * // Mostrar UI de MFA
44
- * } else {
45
- * this.router.navigate(['/dashboard']);
46
- * }
47
- * }
48
- *
49
- * // En template: usar signals directamente
50
- * // {{ auth.user()?.email }}
51
- * // @if (auth.hasPermission('templates:edit')) { ... }
52
- * }
53
- * ```
54
- */
55
- export * from './types';
56
- export { VALTECH_AUTH_CONFIG, provideValtechAuth, provideValtechAuthInterceptor, DEFAULT_AUTH_CONFIG, } from './config';
57
- export { AuthService } from './auth.service';
58
- export { authGuard, guestGuard, permissionGuard, permissionGuardFromRoute, superAdminGuard, roleGuard, } from './guards';
59
- export { authInterceptor } from './interceptor';
60
- export { AuthStateService } from './auth-state.service';
61
- export { TokenService } from './token.service';
62
- export { AuthStorageService } from './storage.service';
63
- export { AuthSyncService } from './sync.service';
@@ -1,22 +0,0 @@
1
- import { HttpInterceptorFn } from '@angular/common/http';
2
- /**
3
- * Interceptor HTTP que:
4
- * 1. Agrega header Authorization con Bearer token a requests API
5
- * 2. Maneja errores 401 refrescando el token automáticamente
6
- * 3. Encola requests durante el refresco para evitar múltiples refresh
7
- *
8
- * @example
9
- * ```typescript
10
- * // Incluido automáticamente por provideValtechAuth()
11
- * // Para uso manual:
12
- * import { provideHttpClient, withInterceptors } from '@angular/common/http';
13
- * import { authInterceptor } from 'valtech-components';
14
- *
15
- * bootstrapApplication(AppComponent, {
16
- * providers: [
17
- * provideHttpClient(withInterceptors([authInterceptor])),
18
- * ],
19
- * });
20
- * ```
21
- */
22
- export declare const authInterceptor: HttpInterceptorFn;
@@ -1,48 +0,0 @@
1
- import { StoredAuthState, GetPermissionsResponse } from './types';
2
- import * as i0 from "@angular/core";
3
- /**
4
- * Servicio para persistencia de estado de autenticación en localStorage.
5
- */
6
- export declare class AuthStorageService {
7
- private config;
8
- private keys;
9
- constructor();
10
- /**
11
- * Guarda el estado completo de autenticación.
12
- */
13
- saveState(state: StoredAuthState): void;
14
- /**
15
- * Carga el estado de autenticación desde storage.
16
- */
17
- loadState(): Partial<StoredAuthState>;
18
- /**
19
- * Guarda solo el access token.
20
- */
21
- saveAccessToken(token: string, expiresAt?: number): void;
22
- /**
23
- * Guarda los permisos actualizados.
24
- */
25
- savePermissions(response: GetPermissionsResponse): void;
26
- /**
27
- * Carga los permisos desde storage.
28
- */
29
- loadPermissions(): {
30
- roles: string[];
31
- permissions: string[];
32
- isSuperAdmin: boolean;
33
- };
34
- /**
35
- * Obtiene el refresh token.
36
- */
37
- getRefreshToken(): string | null;
38
- /**
39
- * Limpia todo el estado de autenticación.
40
- */
41
- clear(): void;
42
- /**
43
- * Verifica si hay estado guardado.
44
- */
45
- hasStoredState(): boolean;
46
- static ɵfac: i0.ɵɵFactoryDeclaration<AuthStorageService, never>;
47
- static ɵprov: i0.ɵɵInjectableDeclaration<AuthStorageService>;
48
- }
@@ -1,49 +0,0 @@
1
- import { OnDestroy } from '@angular/core';
2
- import { Observable } from 'rxjs';
3
- import { AuthSyncEvent } from './types';
4
- import * as i0 from "@angular/core";
5
- /**
6
- * Servicio para sincronización de estado de autenticación entre pestañas.
7
- * Usa BroadcastChannel API con fallback a storage events.
8
- */
9
- export declare class AuthSyncService implements OnDestroy {
10
- private config;
11
- private channel;
12
- private channelName;
13
- private eventSubject;
14
- private storageListener;
15
- /** Observable de eventos de sincronización */
16
- readonly onEvent$: Observable<AuthSyncEvent>;
17
- constructor();
18
- /**
19
- * Inicia la sincronización entre pestañas.
20
- */
21
- start(): void;
22
- /**
23
- * Detiene la sincronización.
24
- */
25
- stop(): void;
26
- /**
27
- * Envía un evento a otras pestañas.
28
- */
29
- broadcast(event: Omit<AuthSyncEvent, 'timestamp'>): void;
30
- ngOnDestroy(): void;
31
- /**
32
- * Inicializa BroadcastChannel API.
33
- */
34
- private initBroadcastChannel;
35
- /**
36
- * Inicializa fallback con storage events.
37
- */
38
- private initStorageEvents;
39
- /**
40
- * Envía evento via localStorage (fallback).
41
- */
42
- private broadcastViaStorage;
43
- /**
44
- * Maneja un evento recibido.
45
- */
46
- private handleEvent;
47
- static ɵfac: i0.ɵɵFactoryDeclaration<AuthSyncService, never>;
48
- static ɵprov: i0.ɵɵInjectableDeclaration<AuthSyncService>;
49
- }
@@ -1,51 +0,0 @@
1
- import { JWTClaims } from './types';
2
- import * as i0 from "@angular/core";
3
- /**
4
- * Servicio para manejo de tokens JWT.
5
- * Parseo y validación de tokens sin dependencias externas.
6
- */
7
- export declare class TokenService {
8
- /**
9
- * Parsea un token JWT y extrae los claims.
10
- * @param token - Token JWT
11
- * @returns Claims del token o null si es inválido
12
- */
13
- parseToken(token: string): JWTClaims | null;
14
- /**
15
- * Verifica si un token es válido (no expirado).
16
- * @param token - Token JWT
17
- * @returns true si el token es válido
18
- */
19
- isTokenValid(token: string): boolean;
20
- /**
21
- * Obtiene el tiempo restante del token en segundos.
22
- * @param token - Token JWT
23
- * @returns Segundos restantes o 0 si expirado
24
- */
25
- getTimeToExpiry(token: string): number;
26
- /**
27
- * Obtiene el timestamp de expiración del token.
28
- * @param token - Token JWT
29
- * @returns Timestamp en milisegundos o null
30
- */
31
- getExpirationTime(token: string): number | null;
32
- /**
33
- * Extrae el user ID del token.
34
- * @param token - Token JWT
35
- * @returns User ID o null
36
- */
37
- getUserId(token: string): string | null;
38
- /**
39
- * Extrae el email del token.
40
- * @param token - Token JWT
41
- * @returns Email o null
42
- */
43
- getEmail(token: string): string | null;
44
- /**
45
- * Decodifica base64url a string.
46
- * Base64url usa - y _ en lugar de + y /
47
- */
48
- private base64UrlDecode;
49
- static ɵfac: i0.ɵɵFactoryDeclaration<TokenService, never>;
50
- static ɵprov: i0.ɵɵInjectableDeclaration<TokenService>;
51
- }
@@ -1,315 +0,0 @@
1
- /**
2
- * Tipos e interfaces para el servicio de autenticación de Valtech.
3
- * Alineados con el backend AuthV2.
4
- */
5
- /**
6
- * Configuración para el servicio de autenticación.
7
- */
8
- export interface ValtechAuthConfig {
9
- /** URL base de la API (ej: 'https://api.myvaltech.com') */
10
- apiUrl: string;
11
- /** Prefijo para endpoints de auth (default: '/v2/auth') */
12
- authPrefix?: string;
13
- /** Prefijo para las claves de localStorage (default: 'valtech_auth_') */
14
- storagePrefix?: string;
15
- /** Tiempo antes de expiración para refrescar token en segundos (default: 60) */
16
- refreshBeforeExpiry?: number;
17
- /** Habilitar sincronización entre pestañas (default: true) */
18
- enableTabSync?: boolean;
19
- /** Ruta de redirección cuando no autenticado (default: '/login') */
20
- loginRoute?: string;
21
- /** Ruta de redirección cuando ya autenticado (default: '/') */
22
- homeRoute?: string;
23
- /** Ruta para acceso denegado (default: '/unauthorized') */
24
- unauthorizedRoute?: string;
25
- /** Habilitar integración con FirebaseService (default: false) */
26
- enableFirebaseIntegration?: boolean;
27
- }
28
- /**
29
- * Estado completo de autenticación.
30
- */
31
- export interface AuthState {
32
- /** Usuario está autenticado */
33
- isAuthenticated: boolean;
34
- /** Estado de carga inicial */
35
- isLoading: boolean;
36
- /** Token de acceso actual */
37
- accessToken: string | null;
38
- /** Token de refresco actual */
39
- refreshToken: string | null;
40
- /** ID del usuario */
41
- userId: string | null;
42
- /** Email del usuario */
43
- email: string | null;
44
- /** Roles del usuario */
45
- roles: string[];
46
- /** Permisos del usuario (formato 'resource:action') */
47
- permissions: string[];
48
- /** Usuario es super admin */
49
- isSuperAdmin: boolean;
50
- /** Timestamp de expiración del accessToken (ms) */
51
- expiresAt: number | null;
52
- /** Error de autenticación (si existe) */
53
- error: AuthError | null;
54
- }
55
- /**
56
- * Información del usuario autenticado.
57
- */
58
- export interface AuthUser {
59
- userId: string;
60
- email: string;
61
- name?: string;
62
- roles: string[];
63
- permissions: string[];
64
- isSuperAdmin: boolean;
65
- }
66
- /**
67
- * Error de autenticación.
68
- */
69
- export interface AuthError {
70
- code: string;
71
- message: string;
72
- }
73
- /**
74
- * Estado inicial de autenticación.
75
- */
76
- export declare const INITIAL_AUTH_STATE: AuthState;
77
- /** Métodos de MFA soportados */
78
- export type MFAMethod = 'EMAIL' | 'SMS';
79
- /**
80
- * Estado de MFA pendiente.
81
- */
82
- export interface MFAPendingState {
83
- required: boolean;
84
- mfaToken: string | null;
85
- method: MFAMethod | null;
86
- }
87
- /**
88
- * Estado inicial de MFA.
89
- */
90
- export declare const INITIAL_MFA_STATE: MFAPendingState;
91
- /**
92
- * Resultado de setup de MFA.
93
- */
94
- export interface MFASetupResult {
95
- codeSent: boolean;
96
- message: string;
97
- }
98
- /**
99
- * Estado de MFA del usuario.
100
- */
101
- export interface MFAStatus {
102
- enabled: boolean;
103
- method: MFAMethod | null;
104
- }
105
- /**
106
- * Request para signup (registro).
107
- */
108
- export interface SignupRequest {
109
- email: string;
110
- password: string;
111
- name: string;
112
- phone?: string;
113
- }
114
- /**
115
- * Response de signup (registro).
116
- */
117
- export interface SignupResponse {
118
- operationId: string;
119
- userId: string;
120
- message: string;
121
- }
122
- /**
123
- * Request para verificar email.
124
- */
125
- export interface VerifyEmailRequest {
126
- email: string;
127
- code: string;
128
- }
129
- /**
130
- * Response de verificación de email.
131
- * Si es exitoso, incluye tokens para auto-login.
132
- */
133
- export interface VerifyEmailResponse {
134
- operationId: string;
135
- verified: boolean;
136
- accessToken?: string;
137
- refreshToken?: string;
138
- firebaseToken?: string;
139
- expiresIn?: number;
140
- tokenType?: string;
141
- }
142
- /**
143
- * Request para reenviar código de verificación.
144
- */
145
- export interface ResendCodeRequest {
146
- email: string;
147
- type: 'EMAIL_VERIFY' | 'PASSWORD_RESET';
148
- }
149
- /**
150
- * Response de reenvío de código.
151
- */
152
- export interface ResendCodeResponse {
153
- operationId: string;
154
- sent: boolean;
155
- }
156
- /**
157
- * Request para signin.
158
- */
159
- export interface SigninRequest {
160
- email: string;
161
- password: string;
162
- }
163
- /**
164
- * Response de signin.
165
- */
166
- export interface SigninResponse {
167
- operationId: string;
168
- accessToken?: string;
169
- refreshToken?: string;
170
- firebaseToken?: string;
171
- expiresIn?: number;
172
- tokenType?: string;
173
- mfaRequired?: boolean;
174
- mfaToken?: string;
175
- mfaMethod?: MFAMethod;
176
- roles?: string[];
177
- permissions?: string[];
178
- }
179
- /**
180
- * Request para verificar MFA.
181
- */
182
- export interface MFAVerifyRequest {
183
- mfaToken: string;
184
- code: string;
185
- }
186
- /**
187
- * Response de verificar MFA.
188
- */
189
- export interface MFAVerifyResponse {
190
- operationId: string;
191
- accessToken: string;
192
- refreshToken: string;
193
- firebaseToken?: string;
194
- expiresIn: number;
195
- tokenType: string;
196
- roles?: string[];
197
- permissions?: string[];
198
- }
199
- /**
200
- * Request para refrescar token.
201
- */
202
- export interface RefreshRequest {
203
- refreshToken: string;
204
- }
205
- /**
206
- * Response de refrescar token.
207
- */
208
- export interface RefreshResponse {
209
- operationId: string;
210
- accessToken: string;
211
- expiresIn: number;
212
- }
213
- /**
214
- * Request para logout.
215
- */
216
- export interface LogoutRequest {
217
- refreshToken: string;
218
- }
219
- /**
220
- * Response de logout.
221
- */
222
- export interface LogoutResponse {
223
- operationId: string;
224
- success: boolean;
225
- }
226
- /**
227
- * Response de obtener permisos.
228
- */
229
- export interface GetPermissionsResponse {
230
- operationId: string;
231
- roles: string[];
232
- permissions: string[];
233
- isSuperAdmin: boolean;
234
- }
235
- /**
236
- * Request para setup de MFA.
237
- */
238
- export interface MFASetupRequest {
239
- method: MFAMethod;
240
- phone?: string;
241
- }
242
- /**
243
- * Response de setup de MFA.
244
- */
245
- export interface MFASetupResponse {
246
- operationId: string;
247
- codeSent: boolean;
248
- message: string;
249
- }
250
- /**
251
- * Request para confirmar MFA.
252
- */
253
- export interface MFAConfirmRequest {
254
- code: string;
255
- }
256
- /**
257
- * Response de confirmar MFA.
258
- */
259
- export interface MFAConfirmResponse {
260
- operationId: string;
261
- mfaEnabled: boolean;
262
- method: MFAMethod;
263
- }
264
- /**
265
- * Request para deshabilitar MFA.
266
- */
267
- export interface MFADisableRequest {
268
- password: string;
269
- }
270
- /**
271
- * Response de deshabilitar MFA.
272
- */
273
- export interface MFADisableResponse {
274
- operationId: string;
275
- mfaDisabled: boolean;
276
- }
277
- /** Tipos de eventos de sincronización entre pestañas */
278
- export type AuthSyncEventType = 'LOGIN' | 'LOGOUT' | 'TOKEN_REFRESH' | 'PERMISSIONS_UPDATE';
279
- /**
280
- * Evento de sincronización entre pestañas.
281
- */
282
- export interface AuthSyncEvent {
283
- type: AuthSyncEventType;
284
- timestamp: number;
285
- payload?: {
286
- accessToken?: string;
287
- expiresAt?: number;
288
- };
289
- }
290
- /**
291
- * Claims del JWT de acceso.
292
- */
293
- export interface JWTClaims {
294
- /** User ID */
295
- uid: string;
296
- /** Email */
297
- email: string;
298
- /** Session ID */
299
- sid?: string;
300
- /** Issued at */
301
- iat: number;
302
- /** Expiration */
303
- exp: number;
304
- }
305
- /**
306
- * Datos persistidos en storage.
307
- */
308
- export interface StoredAuthState {
309
- accessToken: string;
310
- refreshToken: string;
311
- roles: string[];
312
- permissions: string[];
313
- isSuperAdmin: boolean;
314
- expiresAt?: number;
315
- }