import { Merchant, MerchantConfiguration, WebApplicationConfiguration } from '@bringg/types';
import { BringgDashboardSDK } from '../../BringgDashboardSDK';
import { ConfigurationRegion } from '../../Core/ConfigurationProvider';
import { SessionInitParams } from '../../LoginParams';
import PersistentConnection from '../PersistentConnection';
import User from './User';
export default class Session {
    sdk: BringgDashboardSDK;
    user: User;
    merchant: Merchant;
    merchantConfiguration: MerchantConfiguration;
    webApplicationConfiguration: WebApplicationConfiguration;
    eventHandlers: Set<(n: string, s?: object) => void>;
    _persistentConnection: PersistentConnection;
    private constructor();
    setEventHandler(fun: (n: string, s?: object) => void): void;
    sendDataEvent(name: string, message?: object): void;
    update<T>(key: string, value: T): void;
    private static sendDataEventInternal;
    private static _merge;
    static fromUser(user: User, initRealTime?: boolean): Promise<Session>;
    get userId(): number;
    get region(): string;
    get clientId(): string;
    get config(): ConfigurationRegion;
    static init(params: SessionInitParams): Promise<Session>;
    private static loginWithEmailRetry;
    /**
     * need this for the sake of explicit update in case realtime is down
     */
    refreshCurrentUser(): Promise<User>;
    logout(keepServerSession?: boolean): Promise<boolean>;
    switchAccounts(): Promise<Session>;
    impersonate(user_id: number): Promise<Session>;
    impersonateByTeam(team_id: number): Promise<Session>;
    unwindImpersonation(): Promise<Session>;
    static initWithAuthToken(region: string, authToken: string, initRealTime?: boolean): Promise<Session>;
    get persistentConnection(): PersistentConnection;
    private static checked;
}
