import { User } from 'nsn-entity';

export type LoginParams = Pick<Partial<User>, 'account' | 'password' | 'captcha' | 'mobile' | 'email' | 'authType'> & {

  /** 是否自动登陆 */
  autoLogin: boolean
};

/** 认证服务 */
export interface AuthService {

  /** 登录 */
  login: (params: LoginParams) => Promise<any>;

  /** 登出 */
  logout: () => Promise<any>;
}
