import { NIMUser } from './User';



/**
 * 设备类型
 * - [相关文档](https://dev.yunxin.163.com/docs/interface/即时通讯Web端/NIMSDK-Web/LoginPort.html#.type)
 */
export const enum NIMClientType {
  /** 安卓 */
  android = 'Android',
  /** 苹果 */
  ios = 'iOS',
  /** 桌面 */
  pc = 'PC',
  /** 微软手机 */
  wp = 'WindowsPhone',
  /** 浏览器 */
  web = 'Web',
}

/**
 * 登录设备
 * - [相关文档](https://dev.yunxin.163.com/docs/interface/即时通讯Web端/NIMSDK-Web/LoginPort.html)
 */
export interface NIMLoginPort {
  /** 登录的设备类型 */
  type: NIMClientType;
  /** 登录设备的操作系统 */
  os: string;
  /** 登录设备的 mac 地址 */
  mac: string;
  /** 登录设备ID, uuid */
  deviceId: string;
  /** 登录的帐号 */
  account: NIMUser['account'];
  /** 登录设备的连接号 */
  connectionId: string;
  /** 登录的服务器IP */
  ip: string;
  /** 登录时刻 时间戳(ms) */
  time: number;
  /** 是否在线 */
  online: boolean;
}
