import { MsgLang, ApiResponse } from '../index';
export declare type RegionType = 'cn' | 'as' | 'us' | 'eu';
export interface UserInfo {
    countryCode?: string;
    phoneNumber?: string;
    email?: string;
    apikey: string;
    nickname?: string;
    wxServiceId?: string;
    wxAppId?: string;
    wxId?: string;
    wxOpenId?: string;
    yanKanYunInfo?: any;
    accountLevel: number;
    levelExpiredAt?: number;
    denyRecharge?: boolean;
    accountConsult?: boolean;
    ipCountry?: string;
}
export interface CommonUserResponse {
    error: number;
    msg: string;
    data?: {
        user: UserInfo;
        at: string;
        rt: string;
        region: RegionType;
    };
}
export declare const user: {
    login(params: {
        lang?: MsgLang;
        countryCode: string;
        email?: string;
        phoneNumber?: string;
        password: string;
    }): Promise<CommonUserResponse>;
    logout(): Promise<ApiResponse>;
    changePwd(params: {
        oldPassword: string;
        newPassword: string;
    }): Promise<ApiResponse>;
    getProfile(): Promise<{
        error: number;
        msg: string;
        data: {
            user: UserInfo;
            region: RegionType;
        };
    }>;
    updateProfile(params: {
        nickname?: string;
        acceptEmailAd?: boolean;
        accountConsult?: boolean;
    }): Promise<ApiResponse>;
    refresh(): Promise<{
        error: number;
        msg: string;
        data: {
            at: string;
            rt: string;
        };
    }>;
    register(params: {
        countryCode: string;
        email?: string;
        phoneNumber?: string;
        verificationCode: string;
        password: string;
    }): Promise<CommonUserResponse>;
    sendVerificationCode(params: {
        type: 0 | 1 | 3 | 4;
        email?: string;
        phoneNumber?: string;
    }): Promise<ApiResponse>;
    smsLogin(params: {
        countryCode: string;
        lang?: MsgLang;
        phoneNumber: string;
        verificationCode: string;
    }): Promise<CommonUserResponse>;
    resetPwd(params: {
        email?: string;
        phoneNumber?: string;
        verificationCode: string;
        password: string;
    }): Promise<CommonUserResponse>;
    closeAccount(params: {
        verificationCode: string;
    }): Promise<ApiResponse>;
};
