import { AuthService } from 'angularx-social-login';
import { SessionService, UserService, ProfileService, RecoveryService } from '@relevance/angular-core';
import { ISession, IUser, IProfile, IGenericProfile } from '@relevance/core';
import { AccountServiceConfig, AnonymousUserFactory, SocialUserProfileFactory } from './account.config';
/**
* This service handle account management.
*/
export declare class AccountService {
private oauthService;
private sessionService;
private userService;
private profileService;
private recoveryService;
private config;
private anonymousUser;
private socialUserProfile;
private currentSession;
private currentUser;
constructor(oauthService: AuthService, sessionService: SessionService, userService: UserService, profileService: ProfileService
, recoveryService: RecoveryService, config: AccountServiceConfig, anonymousUser?: AnonymousUserFactory, socialUserProfile?: SocialUserProfileFactory
);
/**
* Get the storage backend.
*/
private getStorage;
/**
* Get the anonymous user object.
*/
private createAnonymousUser;
/**
* Get the user profile from a social login user.
*/
private getProfileFromSocialUser;
/**
* Reload the current state.
*/
private reload;
/**
* Save the current state.
*/
private saveCurrentContext;
/**
* Load the previous stage.
*/
private loadCurrentContext;
/**
* Clear the previous state.
*/
private clearCurrentContext;
/**
* Get the service configuration.
*/
getConfig(): AccountServiceConfig;
/**
* Check if a user ID is the currently logged in user.
*/
isCurrentUser(userId: string): boolean;
/**
* Get the anonymous user.
*/
getAnonymousUser(): U;
/**
* Clear the anonymous user.
*/
clearAnonymousUser(): void;
/**
* Get the currently active user.
*/
getCurrentUser(): U;
/**
* Get the currently active session.
*/
getCurrentSession(): S;
/**
* Check whether the current session is a valid one.
*/
isLoggedIn(): boolean;
/**
* Get the currently active session.
*/
getSession(sessionId?: string): Promise;
/**
* Get a user.
*/
getUser(userId?: string): Promise;
/**
* Log in a user.
*/
loginUser(email: string, password: string): Promise