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; /** * Create a user account. */ createNewUser(email: string, password: string, data?: P): Promise; /** * Handle login from third party. Returns True if the user has been created, * false if it was an existing user. */ loginUserFromSocialProvider(providerName: 'facebook' | 'google'): Promise; /** * Log out. */ logout(): Promise; /** * Set user data. */ setData(data: { [key: string]: any; }): Promise; /** * Get user data. */ getData(name: string, defaultValue?: any): any; /** * Update the account email address. */ requestEmailChange(email: string): Promise; /** * Send the email confirm email again. */ resendEmailChange(): Promise; /** * Confirm an email address. */ confirmEmail(token: string): Promise; /** * Update the account email address. */ updatePassword(oldPassword: string, newPassword: string): Promise; /** * Recover a lost password. */ requestLostPassword(email: string): Promise; /** * Change a lost password. */ confirmLostPassword(token: string, password: string): Promise; /** * Validate a user token. */ validateUserToken(type: string, token: string): Promise; }