@posiwise/common-services 0.2.14 → 0.2.15

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.
@@ -20,11 +20,17 @@ export declare class AuthService {
20
20
  private readonly integrationsApi;
21
21
  private readonly document;
22
22
  private readonly platformSubject;
23
+ private readonly userDataSubject;
23
24
  private readonly twitterEndpoint;
24
25
  auth_token: string;
25
26
  header_key: string;
26
27
  platform: string;
27
28
  platform$: import("rxjs").Observable<string>;
29
+ userData$: import("rxjs").Observable<{
30
+ email?: string;
31
+ name?: string;
32
+ userId?: string;
33
+ }>;
28
34
  isUserPersonated: boolean;
29
35
  constructor(localStorage: LocalStorage, secureTokenStorage: SecureTokenStorageService, router: Router, http: MainApiHttpService, userService: UserService, toastr: CustomToastService, appConfigService: AppConfigService, integrationsApi: IntegrationsApiHttpService, document: Document);
30
36
  getToken(): string;
@@ -52,6 +58,22 @@ export declare class AuthService {
52
58
  */
53
59
  removeImpersonationTokens(): import("rxjs").Observable<boolean>;
54
60
  getToken$(): import("rxjs").Observable<string>;
61
+ /**
62
+ * Get user data (email, name, userId) after login
63
+ * Similar to getToken$() but returns user information
64
+ * @returns Observable with user data: { email?: string; name?: string; userId?: string }
65
+ */
66
+ getUserData$(): import("rxjs").Observable<{
67
+ email?: string;
68
+ name?: string;
69
+ userId?: string;
70
+ }>;
71
+ /**
72
+ * Set user data in the BehaviorSubject
73
+ * Called after user logs in to update user information across the app
74
+ * @param userData User data object with email, name, and userId
75
+ */
76
+ private setUserData;
55
77
  getNewsletterSubscription(token: string): import("rxjs").Observable<any>;
56
78
  unsubscribeNewsletter(token: string): import("rxjs").Observable<any>;
57
79
  validateReCaptcha(token: string): import("rxjs").Observable<any>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@posiwise/common-services",
3
- "version": "0.2.14",
3
+ "version": "0.2.15",
4
4
  "peerDependencies": {
5
5
  "@angular/common": "^19.2.18",
6
6
  "@angular/core": "^19.2.18",