import { Subscription, PartialObserver } from 'rxjs'; import { FronteggState } from '@frontegg/redux-store'; import { FronteggAppService } from './frontegg-app.service'; import * as i0 from "@angular/core"; export declare type User = FronteggState['auth']['user']; /** * A service for managing user state subscription * The service gives the ability to subscribe to user state change and get a manipulated data when the user state changes */ export declare class FronteggUserSubscriptionService { private fronteggAppService; private userStateSubject; constructor(fronteggAppService: FronteggAppService); /** * Trigger user subject change event if the user reference changes * No need for deep equal because we already check it internally * @param authState AuthState object */ private updateUserStateIfNeeded; /** * The function gives the ability to return a manipulated data of the user state as a subscription. * * @param dataManipulator Manipulator function that receives user state and returns a manipulated data * @param observer For receiving manipulated data result * @returns a subscription to be able to unsubscribe */ getUserManipulatorSubscription(dataManipulator: (user: User) => Result, observer: PartialObserver): Subscription; static ɵfac: i0.ɵɵFactoryDeclaration; static ɵprov: i0.ɵɵInjectableDeclaration; } //# sourceMappingURL=frontegg-user-subscription.service.d.ts.map