valtech-components 2.0.902 → 2.0.904

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.
@@ -10,6 +10,7 @@ import { SigninRequest, SigninResponse, SignupRequest, SignupResponse, VerifyEma
10
10
  import { OAuthService } from './oauth.service';
11
11
  import { FirebaseService, MessagingService } from '../firebase';
12
12
  import { I18nService } from '../i18n';
13
+ import { Firestore } from '@angular/fire/firestore';
13
14
  import { ConfirmationDialogService } from '../confirmation-dialog/confirmation-dialog.service';
14
15
  import * as i0 from "@angular/core";
15
16
  /**
@@ -47,9 +48,11 @@ export declare class AuthService implements OnDestroy {
47
48
  private messagingService;
48
49
  private i18nService;
49
50
  private confirmationService;
51
+ private firestoreInstance;
50
52
  private refreshTimerId;
51
53
  private syncSubscription;
52
- constructor(config: ValtechAuthConfig | null, http: HttpClient, router: Router, stateService: AuthStateService, tokenService: TokenService, storageService: AuthStorageService, syncService: AuthSyncService, firebaseService: FirebaseService, oauthService: OAuthService, messagingService: MessagingService | null, i18nService: I18nService | null, confirmationService: ConfirmationDialogService);
54
+ private firestoreRBACUnsubscribe;
55
+ constructor(config: ValtechAuthConfig | null, http: HttpClient, router: Router, stateService: AuthStateService, tokenService: TokenService, storageService: AuthStorageService, syncService: AuthSyncService, firebaseService: FirebaseService, oauthService: OAuthService, messagingService: MessagingService | null, i18nService: I18nService | null, confirmationService: ConfirmationDialogService, firestoreInstance: Firestore | null);
53
56
  /** Estado completo de autenticación */
54
57
  readonly state: import("@angular/core").Signal<import("./types").AuthState>;
55
58
  /** Usuario está autenticado */
@@ -348,6 +351,8 @@ export declare class AuthService implements OnDestroy {
348
351
  private get usersBaseUrl();
349
352
  private handleSuccessfulAuth;
350
353
  private clearState;
354
+ private setupFirestoreRBACSync;
355
+ private teardownFirestoreRBACSync;
351
356
  private startRefreshTimer;
352
357
  private stopRefreshTimer;
353
358
  private handleSyncEvent;
@@ -459,6 +464,6 @@ export declare class AuthService implements OnDestroy {
459
464
  * Detecta información de la plataforma del dispositivo.
460
465
  */
461
466
  private detectPlatformInfo;
462
- static ɵfac: i0.ɵɵFactoryDeclaration<AuthService, [{ optional: true; }, null, null, null, null, null, null, null, null, { optional: true; }, { optional: true; }, null]>;
467
+ static ɵfac: i0.ɵɵFactoryDeclaration<AuthService, [{ optional: true; }, null, null, null, null, null, null, null, null, { optional: true; }, { optional: true; }, null, { optional: true; }]>;
463
468
  static ɵprov: i0.ɵɵInjectableDeclaration<AuthService>;
464
469
  }
@@ -38,6 +38,13 @@ export interface ValtechAuthConfig {
38
38
  * NotificationActionService usa este map al disparar handoff a otra app.
39
39
  */
40
40
  appUrls?: Record<string, string>;
41
+ /**
42
+ * Habilitar sincronización reactiva de permisos via Firestore onSnapshot (default: false).
43
+ * Requiere enableFirebaseIntegration: true. Cuando un admin asigna o revoca un rol,
44
+ * el frontend actualiza roles/permisos sin recargar la página (~1-3s latencia).
45
+ * Requiere que el backend tenga SyncRBACToFirestore activo.
46
+ */
47
+ enableFirestoreRBAC?: boolean;
41
48
  }
42
49
  /**
43
50
  * Estado completo de autenticación.
package/lib/version.d.ts CHANGED
@@ -2,4 +2,4 @@
2
2
  * Current version of valtech-components.
3
3
  * This is automatically updated during the publish process.
4
4
  */
5
- export declare const VERSION = "2.0.902";
5
+ export declare const VERSION = "2.0.904";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "valtech-components",
3
- "version": "2.0.902",
3
+ "version": "2.0.904",
4
4
  "private": false,
5
5
  "bin": {
6
6
  "valtech-firebase-config": "./src/lib/services/firebase/scripts/generate-sw-config.js"