import { Observable } from 'rxjs'; import { FusionAuthConfig, UserInfo } from './types'; import * as i0 from "@angular/core"; /** * Service class to use with FusionAuth backend endpoints. */ export declare class FusionAuthService { private core; private autoRefreshTimer?; private isLoggedInSubject; constructor(config: FusionAuthConfig, platformId: Object); /** An observable representing whether the user is logged in. */ isLoggedIn$: Observable; /** A function that returns whether the user is logged in. This returned value is non-observable. */ isLoggedIn(): boolean; /** * Refreshes the access token a single time. * Automatic token refreshing can be enabled if the SDK is configured with `shouldAutoRefresh`. */ refreshToken(): Promise; /** * Initializes automatic access token refreshing. * This is handled automatically if the SDK is configured with `shouldAutoRefresh`. */ initAutoRefresh(): void; /** * Returns an observable request that fetches userInfo, and catches error. */ getUserInfoObservable(callbacks?: { onBegin?: () => void; onDone?: () => void; }): Observable; /** * Fetches userInfo from the 'me' endpoint. * @throws {Error} - if an error occurred while fetching. */ getUserInfo(): Promise; /** * Initiates login flow. * @param {string} [state] - Optional value to be echoed back to the SDK upon redirect. */ startLogin(state?: string): void; /** * Initiates register flow. * @param {string} [state] - Optional value to be echoed back to the SDK upon redirect. */ startRegistration(state?: string): void; /** * Initiates logout flow. */ logout(): void; /** * Redirects to [self service account management](https://fusionauth.io/docs/lifecycle/manage-users/account-management/) * Self service account management is only available in FusionAuth paid plans. */ manageAccount(): void; static ɵfac: i0.ɵɵFactoryDeclaration, never>; static ɵprov: i0.ɵɵInjectableDeclaration>; }