import { Feature } from 'oak-frontend-base/lib/types/Feature'; import { Cache } from 'oak-frontend-base/lib/features/cache'; import { LocalStorage } from 'oak-frontend-base/lib/features/localStorage'; import { CommonAspectDict } from 'oak-common-aspect'; import { EntityDict } from '../general-app-domain'; import { AspectDict } from '../aspects/AspectDict'; import { BackendRuntimeContext } from '../context/BackendRuntimeContext'; import { FrontendRuntimeContext } from '../context/FrontendRuntimeContext'; export declare class Token, FrontCxt extends FrontendRuntimeContext, AD extends AspectDict & CommonAspectDict> extends Feature { private tokenValue?; private cache; private storage; constructor(cache: Cache, storage: LocalStorage); loadTokenInfo(): Promise; loginByMobile(mobile: string, password?: string, captcha?: string): Promise; loginWechat(code: string): Promise; loginWechatMp(): Promise; syncUserInfoWechatMp(): Promise; logout(): Promise; getTokenValue(): string | undefined; getToken(allowUnloggedIn?: boolean): Partial | undefined; getUserId(allowUnloggedIn?: boolean): NonNullable | undefined; getUserInfo(): ED["token"]["Schema"]["user"] | undefined; isRoot(): boolean; /** * 这个是指token的player到底是不是root * @returns */ isReallyRoot(): boolean; sendCaptcha(mobile: string): Promise; switchTo(userId: string): Promise; refreshWechatPublicUserInfo(): Promise; getWechatMpUserPhoneNumber(code: string): Promise; }