import { AuthService } from "."; export declare enum STATUS { SUCCESS = 1, FAILED = -1, FORCE = 0, MODIFY = 2 } export interface Result { status: STATUS; code?: number; message?: string; token?: string; } export interface AuthServiceParams { forceLogin: (params: ForceLoginFields) => Promise; afterSuccess: (token: any) => void; onError: () => void; logout: () => void; readonly [field: number]: STATUS; } export interface AccountFields { username: string; password: string; } export interface MobileFields { phone: string; validateCode: string; } export interface ForceLoginFields { username: string; token: string; } export type LoginFields = AccountFields | MobileFields; export interface UserInfo { [key: string]: any; } export interface LoginServiceParams { url: string; fields: LoginFields; parent?: AuthService; contentType?: string; } export interface ForceServiceParams { url: string; fields: ForceLoginFields; } export interface LogoutServiceParams { url: string; }