import Server from './help/Server';
import BaseModule from '../../common/Module';
import { CmdEnum, EventMap, CmdMap } from '../../protocol/account';
import { ModuleName } from '../../types/protocol';
import { AccountInfo, AppType, BaseAccountInfo, DebugTenant } from '../../types/commonData';
import { LoginOptions, LogoutOptions, AccountOptionsBase, Env } from '../../types/account';
export default abstract class AccountModule extends BaseModule<ModuleName.account, EventMap> implements CmdMap {
    constructor();
    protected abstract clearUserData(): void;
    protected abstract updateFeatureGating(): Promise<void>;
    protected abstract openLoginBrowser(url: string, server: Server | {
        close: () => void;
    }): Promise<void | {
        session: string;
        session_list: string[];
    }>;
    protected abstract closeBrowser(): void;
    protected created(): Promise<void>;
    protected getLoginUrl(address: string, token: string, environment: string): {
        redirectUrl: string;
        loginUrl: string;
    };
    protected checkLogin(token: string, environment: Env, retryCount?: number): Promise<{
        cookie: string;
        environment: Env;
    }>;
    private chooseEnvironment;
    private formatTenantList;
    private requestUserInfo;
    private requestLoginTenantList;
    parseCredentialBindingIdentities(data: any, brand: 'feishu' | 'lark'): any;
    private requestAllTenantList;
    closeLoginChrome(): void;
    reInitEventTracker(): void;
    [CmdEnum.Login](options: LoginOptions): Promise<void>;
    loginV1(options: LoginOptions): Promise<void>;
    loginV2(options: LoginOptions): Promise<void>;
    [CmdEnum.Logout](options: LogoutOptions): Promise<void>;
    [CmdEnum.Info](environment?: string): AccountInfo | undefined;
    [CmdEnum.IsLogin](environment?: string): boolean;
    [CmdEnum.tenantList](): Promise<BaseAccountInfo[] | void>;
    [CmdEnum.switchTenant](account: BaseAccountInfo): Promise<{
        result: 'success' | 'fail' | 'noneed';
        msg?: string;
    }>;
    [CmdEnum.switchDebugTenant](account: DebugTenant, compilePath: string, appType: AppType): Promise<{
        result: 'success' | 'fail' | 'noneed';
        msg?: string;
    }>;
    [CmdEnum.switchEnv](options: AccountOptionsBase): Promise<{
        accountInfo: AccountInfo;
    }>;
    clearCompileProcess(): void;
    private refreshAccountInfo;
    private getPassportWebHeader;
}
