// Generated by dts-bundle v0.7.3
// Dependencies for this module:
//   ../../events
//   ../../@polyv/chat-image-upload-sdk
//   ../../@just4/ajax/interfaces
//   ../../@just4/load-script/interfaces

declare module '@polyv/chat-sdk' {
  /**
    * SDK 调用入口。
    * @packageDocumentation
    */
  import { Events, SocketIOEvents } from '@polyv/chat-sdk/constants/events';
  import { ChatController as Chat } from '@polyv/chat-sdk/controller/chat';
  export { Events, SocketIOEvents };
  export { ChatConfig, ChannelInfo, UserInfo, DomainInfo, PlvSocketConfig } from '@polyv/chat-sdk/types/config';
  export { PlvSocket } from '@polyv/chat-sdk/core/core';
  export { Chat };
  export { AskController as Ask } from '@polyv/chat-sdk/controller/ask';
  export { DiscussionController as Discussion } from '@polyv/chat-sdk/controller/discussion';
  export * from '@polyv/chat-sdk/controller/discussion/enum';
  export { BanType } from '@polyv/chat-sdk/types/message-receive';
  export { SpecialUserTypes } from '@polyv/chat-sdk/constants/special-user-types';
  export const events: Readonly<{
    BEFORE_SETUP: Events.BEFORE_SETUP;
    BEFORE_CONNECT: Events.BEFORE_CONNECT;
    DESTROYED: Events.DESTROYED;
    LOGIN: Events.LOGIN;
    RELOGIN: Events.RELOGIN;
    LOGIN_CB: Events.LOGIN_CB;
    LOGIN_SUCCESS: Events.LOGIN_SUCCESS;
    LOGOUT: Events.LOGOUT;
    TOKEN_EXPIRED: Events.TOKEN_EXPIRED;
    OVERTIMECONNECT: Events.OVERTIMECONNECT;
    CLOSEROOM: Events.CLOSEROOM;
    OPENROOM: Events.OPENROOM;
    SHIELD: Events.SHIELD;
    ADD_SHIELD: Events.ADD_SHIELD;
    CENSOR_CHANGE: Events.CENSOR_CHANGE;
    ADD_CENSORER: Events.ADD_CENSORER;
    REMOVE_SHIELD: Events.REMOVE_SHIELD;
    KICK: Events.KICK;
    UNKICK: Events.UNKICK;
    SPEAK: Events.SPEAK;
    SEND_MESSAGE: Events.SEND_MESSAGE;
    SPEAK_ERROR: Events.SPEAK_ERROR;
    CENSOR: Events.CENSOR;
    SELF_SPEAK: Events.SELF_SPEAK;
    CHAT_IMG: Events.CHAT_IMG;
    ON_SLICE_ID: Events.ON_SLICE_ID;
    EMOTION: Events.EMOTION;
    CUSTOMER_MESSAGE: Events.CUSTOMER_MESSAGE;
    REWARD: Events.REWARD;
    REDPAPER: Events.REDPAPER;
    RED_PAPER_RESULT: Events.RED_PAPER_RESULT;
    SYS_MSG: Events.SYS_MSG;
    REMOVE_HISTORY: Events.REMOVE_HISTORY;
    REMOVE_CONTENT: Events.REMOVE_CONTENT;
    CHAT_IMG_UPLOAD_PROGRESS: Events.CHAT_IMG_UPLOAD_PROGRESS;
    SELF_CHAT_IMG: Events.SELF_CHAT_IMG;
    SELF_CHAT_IMG_RESULT: Events.SELF_CHAT_IMG_RESULT;
    S_QUESTION: Events.S_QUESTION;
    T_ANSWER: Events.T_ANSWER;
    T_ANSWER_ERROR: Events.T_ANSWER_ERROR;
    AskQuestionError: Events.AskQuestionError;
    SET_NICK: Events.SET_NICK;
    GET_FULL_MESSAGE: Events.GET_FULL_MESSAGE;
    SEND_FILE: Events.SEND_FILE;
    LIKES: Events.LIKES;
    UPDATE_SESSION_ID: Events.UPDATE_SESSION_ID;
    FLOWERS: Events.FLOWERS;
    MAX_VIEWER_LOGIN: Events.MAX_VIEWER_LOGIN;
    MotivationLikes: Events.MotivationLikes;
    SPEAK_TO_TOP: Events.SPEAK_TO_TOP;
    SPEAK_CANCEL_TOP: Events.SPEAK_CANCEL_TOP;
    REFRESH_PRODUCT_LIST: Events.REFRESH_PRODUCT_LIST;
    MESSAGE: import("./constants/events").CustomSocketIOEvents.MESSAGE;
    CONNECT: SocketIOEvents.CONNECT;
    DISCONNECT: SocketIOEvents.DISCONNECT;
    RECONNECT: SocketIOEvents.RECONNECT;
    RECONNECT_ATTEMPT: SocketIOEvents.RECONNECT_ATTEMPT;
    ERROR: SocketIOEvents.ERROR;
    CONNECT_ERROR: SocketIOEvents.CONNECT_ERROR;
    CONNECT_TIMEOUT: SocketIOEvents.CONNECT_TIMEOUT;
    RECONNECTING: SocketIOEvents.RECONNECTING;
  }>;
}

declare module '@polyv/chat-sdk/constants/events' {
  /**
    * 封装聊天室消息及限定对外触发事件的参数
    * @packageDocumentation
    */
  import { AskError, AskMsg } from '@polyv/chat-sdk/controller/ask/types';
  import { ChatImgUploadProgressMsg, EmotionMessage, RemoveHistoryMessage } from '@polyv/chat-sdk/types/message';
  import { LoginAck, LoginUser, ReceiveLoginMsg, ReceiveLogoutMsg, ReceiveCloseRoomMsg, ReceiveSpeakMsg, ReceiveChatImgMsg, LocalChatImgMsg, ReceiveShieldMsg, CustomerMessage, RedPackMsg, RedpackResultMsg, RemoveContentMsg, RewardMsg, SysMsg } from '@polyv/chat-sdk/types/message-receive';
  /**
    * SocketIO 事件
    */
  export enum SocketIOEvents {
      /** 连接socket */
      CONNECT = "connect",
      /** 取消连接 */
      DISCONNECT = "disconnect",
      /** 重新连接后 */
      RECONNECT = "reconnect",
      /** 重新连接开始 */
      RECONNECT_ATTEMPT = "reconnect_attempt",
      /** 错误 */
      ERROR = "error",
      /** 连接错误 */
      CONNECT_ERROR = "connect_error",
      /** 连接超时 */
      CONNECT_TIMEOUT = "connect_timeout",
      /** 重连中 */
      RECONNECTING = "reconnecting"
  }
  /**
    * 自定义socketio事件
    */
  export enum CustomSocketIOEvents {
      MESSAGE = "message"
  }
  /**
    * 聊天室 SDK 事件
    */
  export enum Events {
      /** 准备设置 SDK */
      BEFORE_SETUP = "BEFORE_SETUP",
      /** 准备连接聊天室 */
      BEFORE_CONNECT = "BEFORE_CONNECT",
      /** 已销毁 */
      DESTROYED = "DESTROYED",
      /**
        * 用户登录聊天室
        * 事件参数：{@link ReceiveLoginMsg}
        * @event
       */
      LOGIN = "LOGIN",
      /**
        * 用户重复登录聊天室
        * 事件参数：{@link LoginUser}
        * @event
       */
      RELOGIN = "RELOGIN",
      /**
        * 登录回调事件。消息主体为数组，含有部分指示用户及频道状态的字段
        * 事件参数：{@link LoginAck}
        * @event
       */
      LOGIN_CB = "LOGIN_CB",
      /**
        * 登录成功(登录回调字符串首位为2)。消息主体同 LOGIN_CB
        * 事件参数：{@link LoginAck}
        * @event
       */
      LOGIN_SUCCESS = "LOGIN_SUCCESS",
      /**
        * 用户登出聊天室
        * 事件参数：{@link ReceiveLogoutMsg}
        * @event
       */
      LOGOUT = "LOGOUT",
      /**
        * 聊天室登录token过期/无效
        * 事件参数：null
        * @event
       */
      TOKEN_EXPIRED = "TOKEN_EXPIRED",
      /**
        * 登陆聊天室超时(setup 后30秒以上未登录成功)
        * 事件参数：null
        * @event
       */
      OVERTIMECONNECT = "OVERTIMECONNECT",
      /**
        * 聊天室关闭
        * 事件参数：{@link ReceiveCloseRoomMsg}
        * @event
       */
      CLOSEROOM = "CLOSEROOM",
      /**
        * 聊天室开启
        * 事件参数：{@link ReceiveCloseRoomMsg}
        * @event
       */
      OPENROOM = "OPENROOM",
      /**
        * 发送禁言事件，将某个用户id或ip进行禁言
        * @event
        */
      SHIELD = "SHIELD",
      /**
        * 禁言事件
        * 事件参数：{@link ReceiveShieldMsg}
        * @event
       */
      ADD_SHIELD = "ADD_SHIELD",
      /**
       * 审核切换事件
       * @event
      */
      CENSOR_CHANGE = "CHANGE",
      /**
        * 添加审核者
        * @event
        */
      ADD_CENSORER = "ADD_CENSORER",
      /**
        * 解除用户禁言
        * 事件参数：{@link ReceiveShieldMsg}
        * @event
       */
      REMOVE_SHIELD = "REMOVE_SHIELD",
      /**
        * 踢出用户
        * @event
        */
      KICK = "KICK",
      /**
        * 取消踢出用户
        * @event
        */
      UNKICK = "UNKICK",
      /**
        * 收到用户发言事件
        * 事件参数：{@link ReceiveSpeakMsg}
        * @event
       */
      SPEAK = "SPEAK",
      /**
        * 个人发言成功事件
        * 事件参数：{@link ReceiveSpeakMsg}
        * @event
       */
      SEND_MESSAGE = "SEND_MESSAGE",
      /**
        * 个人发言失败(含违禁词等)
        * 事件参数：{@link ReceiveSpeakMsg}
        * @event
       */
      SPEAK_ERROR = "SPEAK_ERROR",
      /**
        * 个人发言审核回调
        * 事件参数：{@link ReceiveSpeakMsg}
        * @event
       */
      CENSOR = "CENSOR",
      /**
        * 接收到自己发言
        * 事件参数：{@link ReceiveSpeakMsg}
        * @event
       */
      SELF_SPEAK = "SELF_SPEAK",
      /**
        * 图片消息
        * 事件参数：{@link ReceiveChatImgMsg}
        * @event
       */
      CHAT_IMG = "CHAT_IMG",
      ON_SLICE_ID = "onSliceID",
      /**
        * 表情消息
        * @event
        */
      EMOTION = "EMOTION",
      /**
        * 自定义消息
        * 事件参数：{@link CustomerMessage}
        * @event
       */
      CUSTOMER_MESSAGE = "CUSTOMER_MESSAGE",
      /**
        * 打赏消息
        * 事件参数：{@link RewardMsg}
        * @event
       */
      REWARD = "REWARD",
      /**
        * 红包消息
        * 事件参数：{@link RedPackMsg}
        * @event
       */
      REDPAPER = "REDPAPER",
      /**
        * 有人领取到红包
        * 事件参数：{@link RedpackResultMsg}
        * @event
       */
      RED_PAPER_RESULT = "RED_PAPER_RESULT",
      /**
        * 系统消息(封装)
        * 事件参数：{@link SysMsg}
        * @event
       */
      SYS_MSG = "SYS_MSG",
      /**
        * 管理员清空聊天室
        * 事件参数：null
        * @event
       */
      REMOVE_HISTORY = "REMOVE_HISTORY",
      /**
        * 管理员删除单条消息
        * 事件参数：{@link RemoveContentMsg}
        * @event
       */
      REMOVE_CONTENT = "REMOVE_CONTENT",
      /**
        * 图片上传过程状态
        * 事件参数：{@link ChatImgUploadProgressMsg}
        * @event
       */
      CHAT_IMG_UPLOAD_PROGRESS = "CHAT_IMG_UPLOAD_PROGRESS",
      /**
        * 个人图片开始上传
        * 事件参数：{@link LocalChatImgMsg}
        * @event
       */
      SELF_CHAT_IMG = "SELF_CHAT_IMG",
      /**
        * 个人图片消息发送结果
        * 事件参数：{@link ReceiveChatImgMsg}
        * @event
       */
      SELF_CHAT_IMG_RESULT = "SELF_CHAT_IMG_RESULT",
      /**
        * 学生提问
        * 事件参数：{@link AskMsg}
        * @event
        */
      S_QUESTION = "S_QUESTION",
      /**
        * 讲师或特殊身份回答
        * 事件参数：{@link AskMsg}
        * @event
        */
      T_ANSWER = "T_ANSWER",
      /**
        * 回答异常
        */
      T_ANSWER_ERROR = "T_ANSWER_ERROR",
      /**
        * 提问异常
        */
      AskQuestionError = "AskQuestionError",
      /**
        * 设置昵称
        */
      SET_NICK = "SET_NICK",
      /**
        * 获取完整聊天信息
        */
      GET_FULL_MESSAGE = "GET_FULL_MESSAGE",
      /**
        * 发送文件分享消息
        */
      SEND_FILE = "SEND_FILE",
      /**
        * 点赞消息
        */
      LIKES = "LIKES",
      /**
        * 内部自定义事件
        * -----
        */
      UPDATE_SESSION_ID = "UPDATE_SESSION_ID",
      /**
        * 送花消息
        */
      FLOWERS = "FLOWERS",
      /**
        * 已达到最大并发
        */
      MAX_VIEWER_LOGIN = "maxViewerLogin",
      MotivationLikes = "MotivationLikes",
      /**
        * 评论上墙
        */
      SPEAK_TO_TOP = "TO_TOP",
      /**
        * 取消上墙
        */
      SPEAK_CANCEL_TOP = "CANCEL_TOP",
      /**
        * 刷新商品列表
        */
      REFRESH_PRODUCT_LIST = "REFRESH_PRODUCT_LIST"
  }
  /** SDK 仅转发事件 */
  export type ForwardEvent = 'ForwardEvent';
  /** SDK 触发事件类型 */
  export type EventType = Events | SocketIOEvents | ForwardEvent | CustomSocketIOEvents;
  /** SDK 触发事件数据 */
  export type ETypeParam = {
      /** 针对仅转发的事件 */
      [key: string]: unknown;
      [Events.BEFORE_SETUP]: null;
      [Events.BEFORE_CONNECT]: null;
      [Events.DESTROYED]: null;
      [SocketIOEvents.CONNECT]: null;
      [SocketIOEvents.CONNECT_ERROR]: null;
      [SocketIOEvents.CONNECT_TIMEOUT]: null;
      [SocketIOEvents.DISCONNECT]: null;
      [SocketIOEvents.ERROR]: null;
      [SocketIOEvents.RECONNECT]: null;
      [SocketIOEvents.RECONNECTING]: null;
      [SocketIOEvents.RECONNECT_ATTEMPT]: null;
      [Events.LOGIN]: ReceiveLoginMsg;
      [Events.LOGOUT]: ReceiveLogoutMsg;
      [Events.RELOGIN]: LoginUser;
      [Events.CLOSEROOM]: ReceiveCloseRoomMsg;
      [Events.OPENROOM]: ReceiveCloseRoomMsg;
      [Events.TOKEN_EXPIRED]: null;
      [Events.SPEAK]: ReceiveSpeakMsg;
      [Events.CENSOR]: ReceiveSpeakMsg;
      [Events.SELF_SPEAK]: ReceiveSpeakMsg;
      [Events.SPEAK_ERROR]: ReceiveSpeakMsg;
      [Events.SEND_MESSAGE]: ReceiveSpeakMsg;
      [Events.CHAT_IMG]: ReceiveChatImgMsg;
      [Events.ADD_SHIELD]: ReceiveShieldMsg;
      [Events.REMOVE_SHIELD]: ReceiveShieldMsg;
      [Events.CHAT_IMG_UPLOAD_PROGRESS]: ChatImgUploadProgressMsg;
      [Events.CUSTOMER_MESSAGE]: CustomerMessage;
      [Events.LOGIN_CB]: LoginAck;
      [Events.MAX_VIEWER_LOGIN]: LoginAck;
      [Events.LOGIN_SUCCESS]: LoginAck;
      [Events.REDPAPER]: RedPackMsg;
      [Events.RED_PAPER_RESULT]: RedpackResultMsg;
      [Events.REMOVE_CONTENT]: RemoveContentMsg;
      [Events.REMOVE_HISTORY]: RemoveHistoryMessage;
      [Events.REWARD]: RewardMsg;
      [Events.SELF_CHAT_IMG]: LocalChatImgMsg;
      [Events.SELF_CHAT_IMG_RESULT]: ReceiveChatImgMsg;
      [Events.SYS_MSG]: SysMsg;
      [Events.EMOTION]: EmotionMessage;
      [Events.S_QUESTION]: AskMsg;
      [Events.T_ANSWER]: AskMsg;
      [Events.T_ANSWER_ERROR]: AskError;
  };
  /** event emitter 事件处理器 */
  export interface Listener {
      (args: unknown): unknown;
  }
  /** socketIO 事件处理器 */
  export interface WsListener {
      (args: string): unknown;
  }
}

declare module '@polyv/chat-sdk/controller/chat' {
  import { Message } from '@polyv/chat-sdk/message';
  import { ChatConfig, MsgHandlers, GetRoomSignData } from '@polyv/chat-sdk/types/config';
  import { ResponseBody, SpeakOptions, RemoveHistoryParams } from '@polyv/chat-sdk/types/index';
  import { ChatImgContent, SendFileContent, ChatSpeakTopContent } from '@polyv/chat-sdk/types/message';
  import { BanType } from '@polyv/chat-sdk/types/message-receive';
  import { ChannelHistoryOptions, SessionHistoryOptions, TimeHistoryOptions, SdkSessionMsgResData, SdkTimeMsgResData, ApiMsg, PlaybackMsgPartRes, PlaybackMsgRes, SendFileResultData, SpeakTopParams } from '@polyv/chat-sdk/controller/chat/types';
  import { AskController, CensorController, UserController } from '@polyv/chat-sdk/controller';
  import { DiscussionController } from '@polyv/chat-sdk/controller/discussion';
  export class ChatController extends Message {
      /** 房间是否全体禁言 */
      protected _isRoomClosed: boolean;
      /** 是否 IP 被屏蔽 */
      protected _isIPBlocked: boolean;
      /** 是否 ID 被屏蔽 */
      protected _isIDBlocked: boolean;
      /** 聊天审核模块 */
      censor: CensorController;
      /** 提问模块 */
      ask: AskController;
      /** 用户模块 */
      user: UserController;
      /** 洽谈室模块 */
      discussion: DiscussionController;
      /** 禁言类型 */
      BanType: typeof BanType;
      protected msgHandlers: MsgHandlers;
      constructor(config: ChatConfig);
      /**
        * 发送聊天室消息
        * @param content 消息内容
        */
      send(options: SpeakOptions): Promise<unknown>;
      /**
        * 根据索引值获取历史聊天消息
        * @param options 消息过滤参数
        * @returns
        */
      getChannelHistory(options: ChannelHistoryOptions): Promise<ApiMsg[]>;
      /**
        * 根据索引值获取历史聊天消息
        * 改接口将会返回准确的禁言状态
        * @param options 消息过滤参数
        * @returns
        */
      getChannelHistory2(options: ChannelHistoryOptions): Promise<ApiMsg[]>;
      /**
        * 根据场次id获取历史聊天消息
        * @param options 消息过滤参数
        * @returns
        */
      getSessionHistory(options: SessionHistoryOptions): Promise<SdkSessionMsgResData>;
      /**
        * 根据时间获取聊天记录
        * @param options 消息过滤参数
        * @returns
        */
      getTimeHistory(options: TimeHistoryOptions): Promise<SdkTimeMsgResData>;
      /**
        * 切换聊天室发言状态
        * @param enabled 是否允许发言
        */
      setChatEnabled(enabled: boolean): Promise<void>;
      /**
        * 异步方式获取房间号签名
        * @param data 签名数据
        */
      _getRoomSign(data: GetRoomSignData): Promise<string>;
      /**
        * 设置昵称
        * @param nickname 昵称
        */
      setNickname(nickname: string): void;
      /**
        * 获取特定直播场次聊天消息分段
        */
      getPlaybackMsgPart(page?: number, sessionId?: string, videoId?: string): Promise<PlaybackMsgPartRes>;
      /**
        * 获取特定场次及分段的聊天消息数据
        */
      getPlaybackMsg(id: number, sessionId?: string): Promise<PlaybackMsgRes>;
      /**
        * 删除某条消息
        * @param content 消息内容
        */
      delete(id: string): Promise<unknown>;
      /**
        * 清空聊天历史记录
        * @api
        */
      removeHistory(params?: RemoveHistoryParams): Promise<void>;
      getFullMessage(id: string): Promise<unknown>;
      /** 发送图片消息 */
      emitImgMsg(content: ChatImgContent): void;
      /**
        * 文件分享消息
        * http://yapi.igeeker.org/project/77/interface/api/35345
        */
      sendFile(content: SendFileContent): Promise<ResponseBody<SendFileResultData>>;
      /** 激励 */
      motivate(motivatedId: string, type: 'speak' | 'mic', speakId?: string): Promise<ResponseBody>;
      /**
        * 添加评论上墙
        * @param params 评论上墙数据
        */
      speakToTop(params: SpeakTopParams): Promise<ResponseBody>;
      /**
        * 添加评论上墙
        * @param params 评论上墙数据
        */
      speakCancelTop(params: SpeakTopParams): Promise<ResponseBody>;
      getSpeakTopInit(): ChatSpeakTopContent | undefined;
  }
}

declare module '@polyv/chat-sdk/types/config' {
  /**
    * 聊天室实例配置
    * @packageDocumentation
    */
  import { PlvSocket } from '@polyv/chat-sdk/core/core';
  import { SocketMessage, SocketBaseMessage } from '@polyv/chat-sdk/types/message';
  /**
    * 用户配置信息。
    */
  export interface UserInfo {
      /** 用户 id */
      userId: string;
      /** 用户昵称 */
      nick: string;
      /** 用户头像 */
      pic: string;
      /** 用户角色。云课堂观众传slice，普通频道观众传student，讲师端传teacher，销售传sales其他按照具体角色传入 */
      userType: string;
      /** 用户自定义身份 */
      actor?: string;
      /** 用户自定义身份背景色 */
      actorBgColor?: string;
      /** 用户自定义身份字体色 */
      actorFColor?: string;
      /** 用户自定义参数 param4 */
      param4?: string;
      /** 用户自定义参数 param5 */
      param5?: string;
      /** 用户 unionId */
      unionId?: string;
      /** 用户来源, 如 webClient */
      userSource?: string;
  }
  /**
    * 特殊用户自定义头衔信息配置
    */
  export interface AuthorizationConfig {
      /** 自定义头衔 */
      actor?: string;
      /** 自定义头衔背景色 */
      bgColor?: string;
      /** 自定义头衔字体色 */
      fColor?: string;
  }
  /**
    * 频道配置信息。
    */
  export interface ChannelInfo {
      /** 频道id */
      channelId: string;
      /** 频道房间号(若不传入，房间号默认为频道号) */
      roomId: string;
      /** 子房间号数组 */
      sibRooms?: string[];
      /** 频道所属客户账号 id(对于活动直播或三分屏直播等支持严禁词的场景必传，用于根据用户账号设置，进行严禁词过滤) */
      accountId?: string;
      /** 频道当前场次 id */
      sessionId?: string;
  }
  /**
    * 聊天室自定义域名配置。
    */
  export interface DomainInfo {
      /** 聊天室 websocket 服务域名 */
      wsHost?: string;
      /** 聊天室 api 接口域名 */
      apiHost?: string;
      /** 保利威直播 api 接口域名 */
      polyvApiHost?: string;
      /** elog 接口域名 */
      elogDomain?: string;
  }
  /** 外部获取 token 时的回调data */
  export interface GetChannelTokenCbData {
      /** 账号 appId */
      appId: string;
      /** 频道 api token */
      channelToken: string;
  }
  export interface GetChannelTokenCb {
      (data: GetChannelTokenCbData): unknown;
  }
  /** 外部获取频道 token 异步函数 */
  export interface GetChannelToken {
      (cb: GetChannelTokenCb): unknown;
  }
  /** 外部获取公用 token 时的回调data */
  export interface GetCommonTokenCbData {
      /** 公用 api token */
      commonToken: string;
  }
  export interface GetCommonTokenCb {
      (data: GetCommonTokenCbData): unknown;
  }
  /** 外部获取公用 token 异步函数 */
  export interface GetCommonToken {
      (cb: GetCommonTokenCb): unknown;
  }
  /**
    * 获取房间号签名数据
    */
  export interface GetRoomSignData {
      /** 频道号 */
      channelId: string;
      /** 房间号 */
      roomId: string;
  }
  /**
    * 获取房间号签名回调类型
    */
  export interface GetRoomSignCb {
      (sign: string): unknown;
  }
  /**
    * 获取房间号签名类型
    */
  export interface GetRoomSign {
      (data: GetRoomSignData, cb: GetRoomSignCb): unknown;
  }
  export interface GetChatTokenCb {
      (token: string): unknown;
  }
  /** 外部获取频道 token 异步函数 */
  export interface GetChatToken {
      (cb: GetChatTokenCb): unknown;
  }
  /** PlvSocket类配置 */
  export interface PlvSocketConfig {
      /** 外部 socket */
      socket?: SocketIOClient.Socket;
      /** 聊天室登录 token(若使用外部socket，可不传) */
      token?: string;
      /** 聊天室连麦 token */
      mediaChannelKey?: string;
      /** 聊天室域名 */
      wsHost?: string;
      /** 频道配置信息 */
      channelInfo: ChannelInfo;
      /** 用户配置信息 */
      userInfo: UserInfo;
      /** 自定义头衔信息，非必需 */
      authorization?: AuthorizationConfig;
      /** 初始化的时候是否发送聊天室登录消息 */
      login?: boolean;
      /** 修改token */
      getToken?: GetChatToken;
      /** 分组Id */
      groupId?: string;
  }
  export interface MsgHandlers {
      [key: string]: (msg: SocketMessage | SocketBaseMessage) => void;
  }
  /** Message类配置 */
  export interface MessageConfig {
      /** 聊天室自定义域名配置信息（可选，内部设置默认值） */
      domainInfo?: DomainInfo;
      /** 聊天室类实例 */
      plvSocket: PlvSocket;
  }
  /** Chat类配置 */
  export interface ChatConfig extends MessageConfig {
      /** 特殊身份发言是否审核 */
      specialToCensored?: boolean;
      /** 获取 api 频道 token 外部异步函数 */
      getChannelToken?: GetChannelToken;
      /** 获取 api 公用 token 外部异步函数 */
      getCommonToken?: GetCommonToken;
      /** 获取房间号签名，用于禁言、踢出、删除聊天消息等 */
      getRoomSign?: GetRoomSign;
      /** 分组Id */
      groupId?: string;
      /** 是否初始化提问模块 */
      initAsk?: boolean;
      /** 是否初始化洽谈室模块 */
      initDiscussion?: boolean;
      /** 洽谈室信息 */
      discussionInfo?: DiscussionInfo;
  }
  /** 洽谈室信息 */
  export interface DiscussionInfo {
      /** 活动 id */
      activityId: string;
      /** 销售 id */
      followerId: string;
  }
}

declare module '@polyv/chat-sdk/core/core' {
  import EventEmitter from 'events';
  import { PlvSocketConfig, UserInfo, ChannelInfo } from '@polyv/chat-sdk/types/config';
  import { Events, SocketIOEvents, WsListener, EventType, ETypeParam } from '@polyv/chat-sdk/constants/events';
  import { SocketMessage } from '@polyv/chat-sdk/types/message';
  export class PlvSocket extends EventEmitter {
      /** 聊天室配置 */
      protected _config: PlvSocketConfig;
      /** socketio 实例 */
      protected _socket: SocketIOClient.Socket;
      /**
        * 获取socket实例对象
        */
      get socket(): SocketIOClient.Socket;
      /**
        * 获取socketId
        */
      get socketId(): string;
      /**
        * 获取userInfo
        */
      get userInfo(): UserInfo;
      /**
        * 获取channelInfo
        */
      get channelInfo(): ChannelInfo;
      /**
        * 获取token
        */
      get token(): string | undefined;
      constructor(config: PlvSocketConfig);
      /** socketIO 及聊天室业务事件常量 */
      static events: Readonly<typeof Events & typeof SocketIOEvents>;
      /** websocket 支持程度 */
      static supportsWebSocket(): boolean;
      /**
        * 更新配置
        * @param newConfig 新配置参数
        */
      updateConfig(newConfig: PlvSocketConfig): this;
      /**
        * 初始化
        */
      init(): Promise<unknown>;
      /**
        * 绑定 socketio 原生事件
        */
      protected bindWsEvents(): this;
      /** 封装聊天室审核消息 */
      protected handleCensorMsg(msg: SocketMessage): Promise<this>;
      protected handleMotivationMsg: (msg: SocketMessage) => void;
      protected handleProductMsg: (msg: SocketMessage) => void;
      protected handleSpeakToTop: (msg: SocketMessage) => void;
      protected handleSpeakCancelTop: (msg: SocketMessage) => void;
      /**
        * 登录聊天室
        */
      login: () => Promise<unknown>;
      /**
        * 发布事件
        * @param event 事件名称
        * @param args 事件数据
        * @returns this
        */
      trigger<E extends EventType>(event: E, args: ETypeParam[E]): this;
      /**
        * 发送聊天室业务消息(message事件)。
        * 一般 message 事件都会回调并且Promise被resolved，若出现没有回调的事件，promise 可能不被resolved。
        */
      emitMsg(data: unknown): Promise<unknown[]>;
      /**
        * 直接发送 socketIO 消息
        * @param event 事件名称
        * @param args 事件参数
        * @returns this
        */
      emitWs(event: string, ...args: unknown[]): this;
      /**
        * 直接监听 socketIO 消息
        * @param event 事件名称
        * @param listener 事件处理器
        * @returns this
        */
      onWs(event: string, listener: WsListener): this;
      /**
        * 取消监听 socketIO 消息
        * @param event 事件名称
        * @param listener 事件处理器
        * @returns this
        */
      offWs(event: string, listener: WsListener): this;
      /**
        * 修改聊天室用户信息
        * @api
        * @param userInfo 用户信息
        */
      updateUserInfo(userInfo?: Partial<UserInfo>): void;
      /**
        * 销毁聊天室实例
        */
      destroy(): Promise<this>;
  }
}

declare module '@polyv/chat-sdk/controller/ask' {
  import { Message } from '@polyv/chat-sdk/message';
  import { ChatConfig, MsgHandlers } from '@polyv/chat-sdk/types/config';
  import { ChatImgContent } from '@polyv/chat-sdk/types/message';
  import { AskMsg, AskMsgByApi, AskSocketMsg, CommonAskMsg, GetAskListOptions, SendAskAnswerData, SendAskQuestionData, SendAskImageOptions, GetQuestionListOptions, QuestionListApiResponse, GetQuestionUserListOfTimestampOptions, QuestionUserListOfTimestampResponse, GetQuestionListOfUserIdOptions } from '@polyv/chat-sdk/controller/ask/types';
  /**
    * 提问控制器
    * @class
    */
  export class AskController extends Message {
      constructor(config: ChatConfig);
      /** 封装事件处理器(注意this上下文) */
      msgHandlers: MsgHandlers;
      /**
        * 消息中的 s_userId 是否跟某个人关联
        * @api
        * @param msg 消息体
        * @param userId 用户id
        */
      isAnswerUser(msg: AskMsg, userId: string): boolean;
      /**
        * 判断消息是否属于某个用户有关的消息
        * @api
        * @param msg 消息体
        * @param userId 用户id
        */
      isMsgOfUser(msg: AskMsg, userId: string): boolean;
      /**
        * 发送提问消息
        * @api
        */
      sendQuestion(data: SendAskQuestionData): void;
      /**
        * 发送提问图片消息
        * @api
        */
      sendAskImage(data: SendAskImageOptions): void;
      /**
        * 发送回答消息
        * @api
        */
      sendAnswer(data: SendAskAnswerData): void;
      /**
        * 处理来自 socket 的提问消息
        * @param msg 消息体
        */
      handleAskSocketMsg(msg: AskSocketMsg): void;
      /**
        * 获取提问列表
        * @api
        */
      getAskList(options?: GetAskListOptions): Promise<AskMsg[]>;
      /**
        * 处理提问数据，将其转换成内部定义的类型
        * @param commonData 公共数据
        * @param msg 提问消息
        */
      machAskInfo(commonData: CommonAskMsg, msg: AskMsgByApi | AskSocketMsg): AskMsg | undefined;
      /** 发送图片消息 */
      emitImgMsg(content: ChatImgContent, sUserId: string): void;
      /** 获取提问列表(新) */
      getQuestionList(options?: GetQuestionListOptions): Promise<QuestionListApiResponse>;
      /** 获取提问用户列表 */
      getQuestionUserList(options?: GetQuestionListOptions): Promise<QuestionListApiResponse>;
      /**
        * @description: 根据时间戳获取用户列表
        * @param {GetQuestionUserListOfTimestampOptions} options
        * @return {Promise<QuestionUserListOfTimestampResponse>}
        */
      getQuestionUserListOfTimestamp(options?: GetQuestionUserListOfTimestampOptions): Promise<QuestionUserListOfTimestampResponse>;
      /** 获取提问列表(助教使用) */
      getQuestionListOfUserId(options?: GetQuestionListOfUserIdOptions): Promise<QuestionListApiResponse>;
  }
}

declare module '@polyv/chat-sdk/controller/discussion' {
  import { Message } from '@polyv/chat-sdk/message';
  import { ChatConfig } from '@polyv/chat-sdk/types/config';
  import { ChatImgContent } from '@polyv/chat-sdk/types/message';
  import { DiscussionEvents, DiscussionMessageSource, DiscussionMessageStatus, DiscussionMessageType } from '@polyv/chat-sdk/controller/discussion/enum';
  import { ClientController } from '@polyv/chat-sdk/controller/discussion/services/client-controller';
  import { SalesController } from '@polyv/chat-sdk/controller/discussion/services/sales-controller';
  import { DiscussionMsgFilter } from '@polyv/chat-sdk/controller/discussion/msg-filter/msg-filter';
  import { DiscussionSendSystemMessageOptions } from '@polyv/chat-sdk/controller/discussion/types';
  export class DiscussionController extends Message {
      DiscussionMessageStatus: typeof DiscussionMessageStatus;
      DiscussionMessageType: typeof DiscussionMessageType;
      DiscussionMessageSource: typeof DiscussionMessageSource;
      DiscussionEvents: typeof DiscussionEvents;
      /** 销售端 */
      sales: SalesController;
      /** 客户端 */
      client: ClientController;
      /** 消息过滤器 */
      protected __msgFilter: DiscussionMsgFilter;
      msgHandlers: {
          onSliceID: (data: unknown) => void;
      };
      discussionConfig: ChatConfig;
      constructor(config: ChatConfig);
      setup(): Promise<void>;
      /**
        * 当前是否为销售身份
        */
      currentIsSales(): boolean;
      __setUnReadCount(count?: number): void;
      __addUnReadCount(): void;
      __clearUnReadCount(): void;
      /** 发送洽谈室 socket 信息 */
      _sendDiscussionSocket(socketData: Record<string, unknown>): Promise<unknown>;
      /**
        * 发送本地系统消息
        * @api
        */
      sendSystemMessage(options: DiscussionSendSystemMessageOptions): void;
      /** 发送图片消息 */
      emitImgMsg(content: ChatImgContent): void;
  }
}

declare module '@polyv/chat-sdk/controller/discussion/enum' {
  /**
    * 洽谈室事件
    */
  export enum DiscussionEvents {
      /**
        * 聊天消息
        */
      ChatMessage = "ChatMessage",
      /**
        * 客户端未读消息
        * number
        */
      ClientUnreadCount = "ClientUnreadCount",
      /**
        * 客户读取文档
        * { id, clientId }
        */
      ClientReadFile = "ClientReadFile",
      /**
        * 客户提交表单
        * { id, clientId }
        */
      ClientSubmitForm = "ClientSubmitForm",
      /**
        * 客户已读消息
        * { clientId }
        */
      ClientReadMessage = "ClientReadMessage",
      /**
        * 客户的跟进人变更
        * { followerId, nick, pic, actor }
        */
      ClientUpdateFollower = "ClientUpdateFollower",
      /**
        * 销售推送文档
        * { id, name, url, timestamp, clientId, isReaded, status }
        */
      SalesPushFile = "SalesPushFile",
      /**
        * 销售推送文档
        * { id, name, timestamp, clientId, isSubmited, status }
        */
      SalesPushForm = "SalesPushForm",
      /**
        * 销售已读某个客户消息
        * { clientId }
        */
      SalesReadClientMessage = "SalesReadClientMessage",
      /**
        * 销售收到某个客户表单提交
        * { clientId }
        */
      SalesReceiveSubmitForm = "SalesReceiveSubmitForm",
      /**
        * 销售中某个客户的跟进人变更
        * { clientId, nick, pic, status }
        */
      SalesUpdateClient = "SalesUpdateClient",
      /**
        * 销售添加客户
        * { DiscussionClientInfo }
        */
      SalesAddClient = "SalesAddClient",
      /**
        * 销售置顶客户
        */
      SalesTopClient = "SalesTopClient"
  }
  /**
    * 洽谈室消息状态
    */
  export enum DiscussionMessageStatus {
      /** 未推送，仅销售端素材库中存在 */
      NotPush = "N",
      /** 未读 */
      UnRead = "U",
      /** 已读 */
      Readed = "R",
      /** 已提交 */
      Submited = "S"
  }
  /**
    * 洽谈室消息类型（聊天室 node 中的类型）
    */
  export enum DiscussionMessageType {
      /** 发言 */
      Speak = "speak",
      /** 表单 */
      Form = "form",
      /** 文件 */
      File = "file",
      /** 卡片 */
      Card = "card"
  }
  /**
    * 洽谈室消息来源（区分后的类型）
    */
  export enum DiscussionMessageSource {
      /** 发言 */
      Speak = "speak",
      /** 推送表单 */
      PushForm = "push-form",
      /** 提交表单 */
      SubmitForm = "submit-form",
      /** 推送文档 */
      PushFile = "push-file",
      /** 已读文档 */
      ReadFile = "read-file",
      /** 更换跟进人 */
      UpdateClient = "update-client",
      /** 系统消息 */
      System = "system"
  }
  /**
    * 洽谈室 socket 事件
    */
  export enum DiscussionSocketEvent {
      /** 发言 */
      Speak = "SPEAK",
      /** 销售推送文件 */
      PushFile = "PUSH_FILE",
      /** 文件消息 */
      File = "FILE",
      /** 已读消息 */
      Read = "READ",
      /** 表单消息 */
      Form = "FORM",
      /** 销售 推送表单 */
      PushForm = "PUSH_FORM",
      /** 客户端 提交表单 */
      SubmitForm = "SUBMIT_FORM",
      /** 添加客户 */
      AddClient = "ADD_CLIENT",
      /** 变更客户 */
      UpdateClient = "UPDATE_CLIENT",
      /** 变更跟进人 */
      UpdateFollower = "UPDATE_FOLLOWER",
      /** 更新跟进人信息 */
      UpdateFollowerMessage = "UPDATE_FOLLOWER_MESSAGE",
      /** 置顶客户 */
      ClientTop = "CLIENT_TOP"
  }
}

declare module '@polyv/chat-sdk/types/message-receive' {
  /**
    * 定义接收到的消息接口
    * @packageDocumentation
    */
  import { SocketMessage, MessageUser, SystemMessageUser, ChatImgContent } from '@polyv/chat-sdk/types/message';
  import { msgTypes } from '@polyv/chat-sdk/constants/msg-types';
  import { Events } from '@polyv/chat-sdk/constants/events';
  /** 登录用户接口 */
  export interface LoginUser {
    /** 头衔，如讲师 */
    actor: string;
    banned: boolean;
    /** 频道号 */
    channelId: string;
    /** 用户ip */
    clientIp: string;
    /** 用户昵称 */
    nick: string;
    /** 用户头像 */
    pic: string;
    /** 房间号 */
    roomId: string;
    status: string;
    uid: string;
    /** 用户id */
    userId: string;
    /** 用户类型 */
    userType: string;
  }
  /** 用户登录消息 */
  export interface ReceiveLoginMsg extends SocketMessage {
    /** 事件名，LOGIN */
    EVENT: string;
    /** 在线人数 */
    onlineUserNumber?: number;
    /** 时间戳 */
    timeStamp: number;
    /** 登录用户信息 */
    user: LoginUser;
  }
  /** 登录消息回调 */
  export type LoginAck = [number, unknown];
  /** 用户登出事件 */
  export interface ReceiveLogoutMsg {
    /** 事件名 */
    EVENT: string;
    /** 频道号 */
    channelId: string;
    /** 在线人数 */
    onlineUserNumber?: number;
    /** 事件时间戳 */
    timeStamp: number;
    /** 用户 socketid */
    uid: string;
    /** 用户id */
    userId: string;
  }
  /** 关闭聊天室 value 字段 */
  export interface CloseRoomMsgValue {
    /** 是否已关闭 */
    closed: boolean;
  }
  /** 关闭聊天室消息体 */
  export interface ReceiveCloseRoomMsg extends SocketMessage {
    value: CloseRoomMsgValue;
  }
  /** 收到的 speak 消息 */
  export interface ReceiveSpeakMsg extends SocketMessage {
    /** 消息id */
    id: string;
    /** 房间号，场次聊天消息才有 */
    roomId?: string;
    /** 区分消息来源，extend(管理员聊天)、其他(公聊) */
    source?: string;
    /** 发言审核回调消息，指示状态，censor、error(含有违规词) */
    status?: string;
    /** 发言用户信息 */
    user: MessageUser;
    /** 消息内容 */
    values?: string[];
    /** 消息内容(封装, 代替原来的values数组) */
    content: string;
    image?: ChatImgContent;
    /** 公屏回复，引用源消息 */
    quote?: MsgQuote;
    /** 指示消息类型 */
    msgType: msgTypes;
    /** 发送的内容是否过长 */
    overLen?: boolean;
  }
  /** 图片消息 */
  export interface ReceiveChatImgMsg extends SocketMessage {
    /** 图片发送状态 */
    result: boolean;
    /** 消息发送者 */
    user: MessageUser;
    /** 消息内容 */
    values: ChatImgContent[];
    /** 图片内容 */
    content: ChatImgContent;
  }
  /** 图片消息 */
  export interface LocalChatImgMsg extends SocketMessage {
    /** 图片发送状态 */
    result: boolean;
    /** 消息发送者 */
    user: MessageUser;
    /** 图片内容 */
    content: ChatImgContent;
    /** 图片本地 blob 地址 */
    imgBlobSrc?: string;
  }
  /** 禁言枚举类型 */
  export enum BanType {
    /** 根据 ip 禁言 */
    ip = "ip",
    /** 根据 userId 禁言 */
    userId = "userId"
  }
  /** 发送禁言事件 */
  export interface SendShieldMsg<E extends Events.REMOVE_SHIELD | Events.SHIELD> {
    EVENT: E;
    /** 频道号 */
    channelId: string;
    /** 房间号 */
    roomId: string;
    /** 禁言类型 */
    type: BanType;
    /** 禁言目标，userId 或 ip */
    value: string;
    /** 房间号签名 */
    sign: string;
  }
  /** 禁言 data 字段 */
  export interface ShieldMsgData {
    /** 禁言类型 */
    banType: BanType;
    /** 用户id */
    userId?: string;
    /** 用户ip */
    ip?: string;
  }
  /** 取消禁言消息 */
  export interface ReceiveShieldMsg extends SocketMessage {
    data: ShieldMsgData;
    /** 用户id或用户ip */
    value: string;
  }
  /** 发送踢出参数类型 */
  export interface SendKickedMsg {
    EVENT: Events.KICK;
    /** 房间号 */
    roomId: string;
    /** 频道号 */
    channelId: string;
    /** 签名 */
    sign: string;
    /** 踢出的 userId */
    userId: string;
    type: 'userId';
  }
  /** 红包消息 */
  export interface RedPackMsg extends SocketMessage {
    content: RedPackMsgContent;
  }
  /** 红包被人领取消息 */
  export interface RedpackResultMsg {
    /** 事件名，RED_PAPER_RESULT */
    EVENT: string;
    /** 红包是否领取完，Y：是，N：否 */
    isOver: string;
    /** 领取用户昵称 */
    nick: string;
    /** 红包id */
    redpackId: string;
    /** 房间号 */
    roomId: string;
    /** 红包类型，rain：红包雨，normal：普通红包 */
    type: string;
    /** 是否抢红包成功，1：成功，0：失败 */
    status: string;
  }
  /** 公屏回复红包消息， content 字段 */
  export interface RedPackMsgContent {
    /** 祝福语 */
    content: string;
    /** 红包总金额 */
    totalAmount: number;
    /** 红包个数 */
    number: number;
    /** 用于调用领取红包接口 */
    redCacheId: string;
    /** 红包id，用于调用领取红包接口 */
    redpackId: string;
    /** 红包类型(normal: 普通红包, rain: 红包雨) */
    type: string;
    /** 消息类型: redpaper */
    msgSource: string;
  }
  /** 公屏回复，引用源消息 */
  export interface MsgQuote {
    /** 图片内容，引用图片消息时存在 */
    image?: ChatImgContent;
    /** 普通消息文字或红包消息内容键值对 */
    content?: string | RedPackMsgContent;
    /** 引用源消息不具有详细的 user 字段，只有昵称 nick */
    nick: string;
    /** 引用源消息所在分房间号 */
    quoteRoomId?: string;
    msgType: string;
  }
  /** 自定义消息体 */
  export interface CustomerMessage {
    /** 事件名 */
    EVENT: string;
    /** 消息id */
    id: string;
    /** 消息内容 */
    content: string;
    /** 房间号 */
    roomId: string;
    /** 消息用户 */
    user: SystemMessageUser;
  }
  /** 移除消息 */
  export interface RemoveContentMsg {
    /** 事件名，REMOVE_CONTENT */
    EVENT: string;
    /** 消息id */
    id: string;
    /** 房间号 */
    roomId: string;
  }
  /** 打赏消息 */
  export interface RewardMsg {
    /** 事件名，REWARD */
    EVENT: string;
    /** 房间号 */
    roomId: string;
    /** 打赏礼物信息 */
    content: RewardMsgContent;
  }
  /** 打赏消息 content 字段 */
  export interface RewardMsgContent {
    /** 打赏礼物图片 */
    gimg: string;
    /** 打赏礼物个数 */
    goodNum: number;
    /** 打赏礼物名称 */
    rewardContent: string;
    /** 打赏用户信息 */
    rewardUser: RewardMsgUser;
    /** 打赏用户昵称 */
    unick: string;
  }
  /** 打赏用户信息 */
  export interface RewardMsgUser {
    /** 用户id */
    userId: string;
  }
  /** 打赏用户信息 */
  export interface RewardMsgUser {
    /** 用户id */
    userId: string;
  }
  /** 系统消息(封装) */
  export interface SysMsg {
    /** 消息id，本地生成 */
    id: string;
    /** 插入时间 */
    time: number;
    /** 消息内容 */
    content: string;
    user: SystemMessageUser;
    /** 消息类型(封装) */
    msgType: msgTypes;
  }
  /** 发送评论上墙参数类型 */
  export interface SendSpeakTopMsg {
    EVENT: Events.SPEAK_TO_TOP | Events.SPEAK_CANCEL_TOP;
    /** 消息id */
    id: string;
  }
}

declare module '@polyv/chat-sdk/constants/special-user-types' {
  /**
    * 特殊用户角色
    */
  export enum SpecialUserTypes {
    /** 讲师 */
    TEACHER = "teacher",
    /** 管理员 */
    MANAGER = "manager",
    /** 嘉宾 */
    GUEST = "guest",
    /** 助教 */
    ASSISTANT = "assistant",
    /** 参会者 */
    ATTENDEE = "attendee"
  }
}

declare module '@polyv/chat-sdk/controller/ask/types' {
  import { Events } from '@polyv/chat-sdk/constants/events';
  import { msgTypes } from '@polyv/chat-sdk/constants/msg-types';
  import { ChatImgContent, MessageUser, SocketMessage } from '@polyv/chat-sdk/types/message';
  /**
    * 获取提问列表参数
    */
  export interface GetAskListOptions {
      /** 房间号 */
      roomId?: string;
      /** 开始位置，默认：0 */
      start?: number;
      /** 结束位置，默认：9 */
      end?: number;
  }
  /**
    * 通过 socket 接收到的提问消息
    */
  export interface AskSocketMsg extends SocketMessage {
      EVENT: Events.T_ANSWER | Events.S_QUESTION;
      /** 内容 */
      content: string;
      /** 消息类型，undefined 表示文本消息 */
      msgType?: 'image';
      /** 房间号 */
      roomId: string;
      /** 回答的用户 id，空值代表提问的消息 */
      s_userId?: string;
      /** 用户信息 */
      user: MessageUser;
      /** 消息状态 */
      status?: 'error';
      /** 异常时的消息 */
      message?: string;
  }
  export interface AskApiMsgImageContent {
      /** id */
      id: string;
      /** 图片地址 */
      url: string;
      width?: number;
      height?: number;
      msgSource?: string;
  }
  /**
    * 提问消息公用接口
    */
  export interface CommonAskMsg {
      /** 消息 id */
      id: string;
      /** 消息发送时间 */
      time: number;
      /** 回答的用户 id，空值代表提问的消息 */
      s_userId?: string;
      /** 发送者信息 */
      user: MessageUser;
  }
  /**
    * 通过 api 接口获取回来的提问消息
    */
  export interface AskMsgByApi extends CommonAskMsg {
      /** 消息内容 */
      content: string;
      /** 消息类型 */
      msgType: '' | 'image';
  }
  /**
    * 提问文本消息
    */
  export interface NormalAskMsg extends CommonAskMsg {
      /** 消息内容 */
      content: string;
      /** 消息类型 */
      msgType: msgTypes.NORMAL;
  }
  /**
    * 提问图片消息
    */
  export interface ImageAskMsg extends CommonAskMsg {
      /** 图片消息内容 */
      content: ChatImgContent;
      /** 消息类型 */
      msgType: msgTypes.CHAT_IMG;
  }
  /**
    * api 接口里的提问消息
    */
  export type AskMsg = NormalAskMsg | ImageAskMsg;
  /**
    * 提问异常
    */
  export interface AskError {
      message: string;
  }
  export interface SendAskQuestionData {
      /** 内容 */
      content: string;
      /** 消息类型，undefined 表示文本消息 */
      msgType?: 'image';
      /** 房间号 */
      roomId?: string;
  }
  /**
    * 发送提问图片消息
    */
  export interface SendAskImageOptions {
      /** 图片 id */
      imageId: string;
      /** 图片地址 */
      imageUrl: string;
      /** 图片尺寸 */
      size?: {
          width: number;
          height: number;
      };
  }
  export interface SendAskAnswerData extends SendAskQuestionData {
      s_userId: string;
  }
  export interface GetQuestionListOptions {
      /** 房间号 */
      roomId?: string;
      /** 用户ID */
      userId?: string;
      /** 页码 */
      page?: number;
      /** 每页大小 */
      size?: number;
  }
  export interface QuestionListApiResponse {
      list: string[];
      page: number;
      size: number;
      totalCount: number;
      totalPage: number;
  }
  export interface GetQuestionUserListOfTimestampOptions {
      /** 房间号 */
      roomId?: string;
      /** 用户id */
      userId?: string;
      /** 时间戳 */
      timestamp?: string;
      /** 该 timestamp 的用户列表中存在多少个，首次可以不传 */
      index?: number;
      /** 长度 */
      size?: number;
      /** 排序 */
      order?: string;
  }
  /** 提问用户列表返回结构 */
  export interface QuestionUserListOfTimestampResponse {
      list: Array<{
          userId: string;
          pic: string;
          nick: string;
          actor: string;
      }>;
  }
  export interface GetQuestionListOfUserIdOptions extends GetQuestionListOptions {
      /** 获取的目标用户id */
      objectUserId?: string;
  }
}

declare module '@polyv/chat-sdk/types/message' {
  /**
    * 聊天室消息基本接口
    * @packageDocumentation
    */
  import { ImageStatus } from '@polyv/chat-image-upload-sdk';
  import { Events } from '@polyv/chat-sdk/constants/events';
  import { msgTypes } from '@polyv/chat-sdk/constants/msg-types';
  /** 消息基础接口 */
  export interface SocketMessage {
      EVENT: string;
      [key: string]: unknown;
      /** 发送消息用户信息 */
      user: MessageUser;
  }
  export interface SocketBaseMessage {
      EVENT: string;
      [key: string]: unknown;
  }
  /** 消息发送者 */
  export interface MessageUser {
      /** 发送者 id */
      userId: string;
      /** 发送者昵称 */
      nick: string;
      /** 发送者头像 */
      pic?: string;
      /** 发送者身份 */
      userType: string;
      /** socketId */
      uid?: string;
      /** 用户头衔 */
      actor?: string;
  }
  /** 系统发出消息时的用户字段，如自定义消息 CUSTOMER_MESSAGE */
  export interface SystemMessageUser {
      /** 系统用户名，默认"系统" */
      nick: string;
      /** 系统用户头像 */
      pic: string;
      /** 用户发出消息所在房间 */
      roomId: string;
      uid: string;
  }
  /** 表情 socket 消息 */
  export interface EmotionSocketMessage {
      /** 表情 id */
      id: string;
      /** 消息 id */
      messageId: string;
      /** 用户信息 */
      user: MessageUser;
  }
  /** 表情事件类型 */
  export interface EmotionMessage {
      EVENT: Events.EMOTION;
      /** 消息 id */
      id: string;
      /** 表情 id */
      emotionId: string;
      /** 表情标题 */
      title: string;
      /** 表情图片地址 */
      content: string;
      /** 指示消息类型 */
      msgType: msgTypes.EMOTION;
      /** 用户信息 */
      user: MessageUser;
  }
  /** 清空聊天室事件类型 */
  export interface RemoveHistoryMessage {
      EVENT: Events.REMOVE_HISTORY;
      roomId: string;
      /** 签名，仅发送时存在 */
      sign?: string;
  }
  export interface OnSliceIDMessage extends SocketBaseMessage {
      EVENT: Events.ON_SLICE_ID;
      data: {
          /** 洽谈室未读消息 */
          unReadCountFromDiscussion?: number;
          speakTop?: ChatSpeakTopContent;
      };
  }
  /**
    * sliceId 评论上墙已上墙的数据
    */
  export interface ChatSpeakTopContent {
      content: string;
      id: number;
      nick: string;
      pic: string;
      topActor: string;
  }
  export interface ChatSpeakTopMessage extends SocketBaseMessage, ChatSpeakTopContent {
      EVENT: Events.SPEAK_TO_TOP;
  }
  /** 图片上传封装事件 */
  export interface ChatImgUploadProgressMsg extends SocketMessage {
      /** 图片发送状态 */
      result: boolean;
      /** 消息发送者 */
      user: MessageUser;
      /** 图片内容 */
      content: ChatImgContent;
  }
  /** 图片上传过程事件字段 */
  interface UploadImgSize {
      /** 宽度 */
      width: number;
      /** 高度 */
      height: number;
  }
  /** 图片消息 content 字段 */
  export interface ChatImgContent {
      /** 图片id(上传 SDK 内部定义id) */
      id: string;
      /** 图片上传状态 */
      status: ImageStatus;
      /** 预览图片地址（本地地址） */
      imgSrc?: string;
      /** 事件提示 */
      msg?: string;
      /** 上传成功后，对象存储地址 */
      uploadImgUrl: string;
      /** 上传成功后，对象存储地址(场次聊天消息特有字段) */
      url?: string;
      /** 图片类型 */
      type: string;
      /** 图片宽高信息 */
      size: UploadImgSize;
      /** 消息来源, chatImg */
      msgSource: string;
  }
  export interface SendFileContent {
      /** 文件地址 */
      url: string;
      /** 文件名称 */
      name: string;
      /** extend表示发给特殊身份 */
      source?: string;
      /** 特殊身份是否需要审核 */
      specialToCensored?: boolean;
      /** 是否跳过审核, Y表示跳过，N表示不跳过 */
      freeReview?: 'Y' | 'N';
      /** 回复消息的id */
      quoteId?: string;
  }
  export {};
}

declare module '@polyv/chat-sdk/message' {
  import EventEmitter from 'events';
  import { ImageStatus } from '@polyv/chat-image-upload-sdk';
  import { SocketIOEvents, CustomSocketIOEvents, Events, WsListener, EventType } from '@polyv/chat-sdk/constants/events';
  import { msgTypes } from '@polyv/chat-sdk/constants/msg-types';
  import { MessageConfig, MsgHandlers, DomainInfo, UserInfo, ChannelInfo, PlvSocketConfig } from '@polyv/chat-sdk/types/config';
  import { SpeakOptions } from '@polyv/chat-sdk/types/index';
  import { SocketMessage, ChatImgContent } from '@polyv/chat-sdk/types/message';
  import APIQuery from '@polyv/chat-sdk/utils/ajax';
  import UploadImage from '@polyv/chat-sdk/utils/upload-image';
  import { ImageUploadOptions } from '@polyv/chat-sdk/message/types';
  export abstract class Message extends EventEmitter {
      /**
        * 事件列表
        */
      static EVENTS: Readonly<{
          BEFORE_SETUP: Events.BEFORE_SETUP;
          BEFORE_CONNECT: Events.BEFORE_CONNECT;
          DESTROYED: Events.DESTROYED;
          LOGIN: Events.LOGIN;
          RELOGIN: Events.RELOGIN;
          LOGIN_CB: Events.LOGIN_CB;
          LOGIN_SUCCESS: Events.LOGIN_SUCCESS;
          LOGOUT: Events.LOGOUT;
          TOKEN_EXPIRED: Events.TOKEN_EXPIRED;
          OVERTIMECONNECT: Events.OVERTIMECONNECT;
          CLOSEROOM: Events.CLOSEROOM;
          OPENROOM: Events.OPENROOM;
          SHIELD: Events.SHIELD;
          ADD_SHIELD: Events.ADD_SHIELD;
          CENSOR_CHANGE: Events.CENSOR_CHANGE;
          ADD_CENSORER: Events.ADD_CENSORER;
          REMOVE_SHIELD: Events.REMOVE_SHIELD;
          KICK: Events.KICK;
          UNKICK: Events.UNKICK;
          SPEAK: Events.SPEAK;
          SEND_MESSAGE: Events.SEND_MESSAGE;
          SPEAK_ERROR: Events.SPEAK_ERROR;
          CENSOR: Events.CENSOR;
          SELF_SPEAK: Events.SELF_SPEAK;
          CHAT_IMG: Events.CHAT_IMG;
          ON_SLICE_ID: Events.ON_SLICE_ID;
          EMOTION: Events.EMOTION;
          CUSTOMER_MESSAGE: Events.CUSTOMER_MESSAGE;
          REWARD: Events.REWARD;
          REDPAPER: Events.REDPAPER;
          RED_PAPER_RESULT: Events.RED_PAPER_RESULT;
          SYS_MSG: Events.SYS_MSG;
          REMOVE_HISTORY: Events.REMOVE_HISTORY;
          REMOVE_CONTENT: Events.REMOVE_CONTENT;
          CHAT_IMG_UPLOAD_PROGRESS: Events.CHAT_IMG_UPLOAD_PROGRESS;
          SELF_CHAT_IMG: Events.SELF_CHAT_IMG;
          SELF_CHAT_IMG_RESULT: Events.SELF_CHAT_IMG_RESULT;
          S_QUESTION: Events.S_QUESTION;
          T_ANSWER: Events.T_ANSWER;
          T_ANSWER_ERROR: Events.T_ANSWER_ERROR;
          AskQuestionError: Events.AskQuestionError;
          SET_NICK: Events.SET_NICK;
          GET_FULL_MESSAGE: Events.GET_FULL_MESSAGE;
          SEND_FILE: Events.SEND_FILE;
          LIKES: Events.LIKES;
          UPDATE_SESSION_ID: Events.UPDATE_SESSION_ID;
          FLOWERS: Events.FLOWERS;
          MAX_VIEWER_LOGIN: Events.MAX_VIEWER_LOGIN;
          MotivationLikes: Events.MotivationLikes;
          SPEAK_TO_TOP: Events.SPEAK_TO_TOP;
          SPEAK_CANCEL_TOP: Events.SPEAK_CANCEL_TOP;
          REFRESH_PRODUCT_LIST: Events.REFRESH_PRODUCT_LIST;
          MESSAGE: CustomSocketIOEvents.MESSAGE;
          CONNECT: SocketIOEvents.CONNECT;
          DISCONNECT: SocketIOEvents.DISCONNECT;
          RECONNECT: SocketIOEvents.RECONNECT;
          RECONNECT_ATTEMPT: SocketIOEvents.RECONNECT_ATTEMPT;
          ERROR: SocketIOEvents.ERROR;
          CONNECT_ERROR: SocketIOEvents.CONNECT_ERROR;
          CONNECT_TIMEOUT: SocketIOEvents.CONNECT_TIMEOUT;
          RECONNECTING: SocketIOEvents.RECONNECTING;
      }>;
      /** 当前页面访问协议 */
      static PROTOCOL: string;
      /** 上传图片工具 */
      protected _uploader: UploadImage;
      /** 用户ip */
      protected _ip: string;
      /** 域名 */
      protected _domainInfo: DomainInfo;
      /** 是否被禁言 */
      protected _isBlocked: boolean;
      /** 直播 api 实例 */
      readonly _liveApi: APIQuery;
      /** 聊天室 api 实例 */
      readonly _chatApi: APIQuery;
      /** 聊天室配置 */
      readonly _config: MessageConfig;
      /** TODO:子房间号 */
      subRooms: string[];
      /** socket实例 */
      get socket(): undefined | SocketIOClient.Socket;
      /** socketID */
      get socketID(): string;
      get events(): typeof Message.EVENTS;
      /** 消息类型常量 */
      get msgTypes(): typeof msgTypes;
      /** 上传图片状态类型常量 */
      get uploadImgStatus(): typeof ImageStatus;
      get userInfo(): UserInfo;
      get channelInfo(): ChannelInfo;
      get token(): string | undefined;
      protected msgHandlers: MsgHandlers;
      constructor(config: MessageConfig);
      /**
        * 初始化聊天室 SDK。
        * 返回一个 Promise，当完成连接 websocket 且发送 LOGIN 登录聊天室后端成功后，promise 被 resolved。
        */
      setup(): Promise<unknown>;
      /** 初始化uploader(图片上传 SDK) */
      createImageUploader(options: ImageUploadOptions): UploadImage;
      get plvSocketEvents(): string[];
      /**
        * 监听socket消息并进一步转发
        */
      bindEvents(): this;
      /**
        * 为聊天室 websocket 消息封装消息类型
        * @param msg 消息数据
        * @returns 封装消息
        */
      handleWsMsgType(msg: SocketMessage): string;
      /**
        * 处理登录消息，记录用户ip
        * @param msg 消息体
        */
      protected onLogin(msg: SocketMessage): void;
      protected trigger(event: EventType, msg: unknown): void;
      /**
        * 直接发送 socketIO 消息
        * @param event 事件名称
        * @param args 事件参数
        * @returns this
        */
      emitWs(event: string, ...args: unknown[]): this;
      /**
        * 直接监听 socketIO 消息
        * @param event 事件名称
        * @param listener 事件处理器
        * @returns this
        */
      onWs(event: string, listener: WsListener): this;
      /**
        * 取消监听 socketIO 消息
        * @param event 事件名称
        * @param listener 事件处理器
        * @returns this
        */
      offWs(event: string, listener: WsListener): this;
      /** 触发自己发送消息回调 */
      protected triggerSelfMsg(options: SpeakOptions, res: [string, {
          content: string;
      } | undefined]): void;
      /** 发送消息 */
      emitMsg(data: unknown): Promise<unknown[]>;
      /**
        * 处理聊天图片事件
        * @param msg 消息体
        */
      protected onChatImg(msg: SocketMessage): void;
      isSpecialUserType(userType: string): boolean;
      /**
        * 封装本地系统消息并触发事件
        * @param content 消息内容
        * @returns this
        */
      pushLocalSysMsg(content: string): this;
      /** 获取图片上传sdk */
      getUploader(): UploadImage;
      updateConfig(config: PlvSocketConfig): void;
      /**
        * 销毁聊天室实例
        */
      destroy(): Promise<unknown>;
      abstract emitImgMsg(content: ChatImgContent, sUserId?: string): void;
  }
}

declare module '@polyv/chat-sdk/types/index' {
  /**
    * 常用类型声明
    * @packageDocumentation
    */
  export * as Config from '@polyv/chat-sdk/types/config';
  import { ReceiveSpeakMsg } from '@polyv/chat-sdk/types/message-receive';
  /**
    * 字符串常量枚举类型
   */
  export type strKVPair = {
      [key: string]: string;
  };
  /**
    * 通用对象定义
    */
  export type UniversalParams = {
      [key: string]: unknown;
  };
  /** api 接口响应数据 */
  export interface ResponseBody<T = unknown> {
      code: number;
      data: T;
      message: string;
      status: string;
  }
  /** 发送消息方法 */
  export interface SpeakOptions {
      content: string;
      quoteMsg?: ReceiveSpeakMsg;
  }
  /** 清空聊天历史记录 */
  export interface RemoveHistoryParams {
      /** 房间号 */
      roomId?: string;
  }
  /**
    * 后端接口返回的分页格式
    */
  export interface ApiPageResult<I> {
      contents: I[];
      pageNumber: number;
      pageSize: number;
      totalPages: number;
      totalItems: number;
  }
}

declare module '@polyv/chat-sdk/controller/chat/types' {
  /**
    * 常用类型声明
    * @packageDocumentation
    */
  export * as Config from '@polyv/chat-sdk/types/config';
  import { msgTypes } from '@polyv/chat-sdk/constants/msg-types';
  import { SocketMessage, ChatImgContent, MessageUser } from '@polyv/chat-sdk/types/message';
  import { ResponseBody } from '@polyv/chat-sdk/types';
  /** 公屏回复红包消息， content 字段 */
  export interface RedPackMsgContent {
      /** 祝福语 */
      content: string;
      /** 红包总金额 */
      totalAmount: number;
      /** 红包个数 */
      number: number;
      /** 用于调用领取红包接口 */
      redCacheId: string;
      /** 红包id，用于调用领取红包接口 */
      redpackId: string;
      /** 红包类型(normal: 普通红包, rain: 红包雨) */
      type: string;
      /** 消息类型: redpaper */
      msgSource: string;
  }
  /** 公屏回复，引用源消息 */
  export interface MsgQuote {
      /** 图片内容，引用图片消息时存在 */
      image?: ChatImgContent;
      /** 普通消息文字或红包消息内容键值对 */
      content?: string | RedPackMsgContent;
      /** 引用源消息不具有详细的 user 字段，只有昵称 nick */
      nick: string;
      /** 引用源消息所在分房间号 */
      quoteRoomId?: string;
      msgType: string;
  }
  /** 打赏用户信息 */
  export interface RewardMsgUser {
      /** 用户id */
      userId: string;
  }
  /** 打赏消息 content 字段 */
  export interface RewardMsgContent {
      /** 打赏礼物图片 */
      gimg: string;
      /** 打赏礼物个数 */
      goodNum: number;
      /** 打赏礼物名称 */
      rewardContent: string;
      /** 打赏用户信息 */
      rewardUser: RewardMsgUser;
      /** 打赏用户昵称 */
      unick: string;
  }
  /** 文件分享content字段 */
  export interface FileMsgContent {
      name: string;
      url: string;
  }
  /** 关闭聊天室 value 字段 */
  export interface CloseRoomMsgValue {
      /** 是否已关闭 */
      closed: boolean;
  }
  /** 关闭聊天室消息体 */
  export interface ReceiveCloseRoomMsg extends SocketMessage {
      value: CloseRoomMsgValue;
  }
  /** 禁言枚举类型 */
  export enum BanType {
      /** 根据 ip 禁言 */
      ip = "ip",
      /** 根据 userId 禁言 */
      userId = "userId"
  }
  /** 禁言 data 字段 */
  export interface ShieldMsgData {
      /** 禁言类型 */
      banType: BanType;
      /** 用户id */
      userId?: string;
      /** 用户ip */
      ip?: string;
  }
  /** 取消禁言消息 */
  export interface ReceiveShieldMsg extends SocketMessage {
      data: ShieldMsgData;
      /** 用户id或用户ip */
      value: string;
  }
  /** api 接口返回的消息 */
  export interface ApiMsg {
      /** 消息 ID */
      id: string;
      /** 用户信息 */
      user: MessageUser;
      /** 消息详情(字段类型根据 msgType 而定) */
      content: string | RedPackMsgContent | RewardMsgContent | ChatImgContent | FileMsgContent;
      /** 引用消息 */
      quote?: MsgQuote;
      /** 发送时间 */
      time: number;
      /** 消息类型 */
      msgType: msgTypes;
  }
  /**
    * 场次消息列表响应数据
    */
  export interface SessionMsgResData {
      /** 消息总条数 */
      count: number;
      /** 消息总页数 */
      totalPage: number;
      /** 当前页码 */
      curPage: number;
      /** 每页条数 */
      size: number;
  }
  /**
    * 场次消息列表响应数据(api)
    */
  export interface ApiSessionMsgResData extends SessionMsgResData {
      data: SocketMessage[];
  }
  /**
    * 场次消息列表响应数据(sdk封装)
    */
  export interface SdkSessionMsgResData extends SessionMsgResData {
      data: ApiMsg[];
  }
  /**
    * 获取历史消息接口参数
    */
  export interface ChannelHistoryOptions {
      /** 房间号(若不传，默认取配置中的房间号/频道号) */
      roomId?: string;
      /** 开始索引 */
      start: number;
      /** 结束索引 */
      end: number;
      /** 是否获取全部信息，包括图片和自定义消息，1表示获取全部，后端默认 0 */
      fullMessage?: number;
      /** 签名 */
      sign: string;
      /** 是否仅特殊角色发言(讲师、助教、嘉宾)，后端默认 0(全部获取) */
      getSpecialMessage: number;
      /** 如果传extend，则表示管理员的群聊，为空时表示公聊 */
      source: string;
  }
  /**
    * 获取场次历史消息接口参数
    */
  export interface SessionHistoryOptions {
      /** 场次 id(非必传，默认使用当前配置中的 sessionId) */
      sessionId: string;
      /** 页数 */
      page: number;
      /** 条数(非必传，默认10) */
      size?: number;
      /** 房间号 */
      roomId?: string;
  }
  /**
    * 根据时间段获取历史消息接口参数
    */
  export interface TimeHistoryOptions {
      /** 开始时间  */
      startTime: number;
      /** 结束时间 */
      endTime: number;
      /** 页码，默认1 */
      page?: number;
      /** 单页条数，默认10 */
      size?: number;
  }
  /**
    * 根据时间获取历史消息接口响应数据(api)
    */
  export interface ApiTimeMsgResData {
      list: SocketMessage[];
  }
  /**
    * 根据时间获取历史消息接口响应数据(sdk封装)
    */
  export interface SdkTimeMsgResData {
      data: ApiMsg[];
  }
  interface PartDetail {
      id: number;
      count: number;
      startTime: number;
      endTime: number;
  }
  export interface PlaybackMsgPart {
      partDetail: PartDetail[];
      total: number;
      totalPage: number;
  }
  export type PlaybackMsgPartRes = ResponseBody<PlaybackMsgPart>;
  interface PlaybackMsgItem {
      accountId?: string;
      clientIP?: string;
      content: string | RedPackMsgContent | RewardMsgContent | ChatImgContent;
      event?: string;
      id: string;
      image?: string;
      msgType?: string;
      quote?: MsgQuote;
      relativeTime: number;
      roomId: string;
      sessionId: string;
      time: number;
      user: MessageUser;
      userType: string;
  }
  interface PlaybackLsit {
      list: PlaybackMsgItem[];
  }
  export type PlaybackMsgRes = ResponseBody<PlaybackLsit>;
  export interface SendFileResultData {
      id: string;
  }
  /** 评论上墙请求参数 */
  export interface SpeakTopParams {
      /** 消息id */
      id: string;
  }
}

declare module '@polyv/chat-sdk/controller' {
  export { AskController } from '@polyv/chat-sdk/controller/ask';
  export { EmotionController } from '@polyv/chat-sdk/controller/emotion';
  export { UserController } from '@polyv/chat-sdk/controller/user';
  export { ChatController } from '@polyv/chat-sdk/controller/chat';
  export { CensorController } from '@polyv/chat-sdk/controller/censor';
}

declare module '@polyv/chat-sdk/controller/discussion/services/client-controller' {
  import { DiscussionController } from '@polyv/chat-sdk/controller/discussion/index';
  import { ClientGetFileListOptions, ClientGetFormListOptions, ClientSendMessageOptions, DiscussionClientFileInfo, DiscussionClientFormInfo, DiscussionClientGetHistoryMsgOptions, DiscussionClientReadFileOptions, DiscussionClientSubmitMessageOptions } from '@polyv/chat-sdk/controller/discussion/types/client-types';
  import { DiscussionMsgType } from '@polyv/chat-sdk/controller/discussion/types/msg-types';
  import { DiscussionUserController } from '@polyv/chat-sdk/controller/discussion/services/common';
  /**
    * 客户端控制器
    */
  export class ClientController extends DiscussionUserController {
      constructor(_discussionCtrl: DiscussionController);
      /**
        * 已读销售消息
        * @api
        */
      readMessage(): Promise<void>;
      /**
        * 客户端发送消息
        * @api
        */
      sendMessage(options: ClientSendMessageOptions): Promise<void>;
      /**
        * 获取历史消息
        * @api
        */
      getClientHistoryMessage(options?: DiscussionClientGetHistoryMsgOptions): Promise<DiscussionMsgType[]>;
      /**
        * 获取当前客户的文档列表
        * @api
        */
      getFileList(options: ClientGetFileListOptions): Promise<DiscussionClientFileInfo[]>;
      /**
        * 客户已读文档
        * @api
        */
      readFile(options: DiscussionClientReadFileOptions): Promise<void>;
      /**
        * 获取当前客户的表单列表
        * @api
        */
      getFormList(options: ClientGetFormListOptions): Promise<DiscussionClientFormInfo[]>;
      /**
        * 提交表单
        * @api
        */
      submitForm(options: DiscussionClientSubmitMessageOptions): Promise<void>;
  }
}

declare module '@polyv/chat-sdk/controller/discussion/services/sales-controller' {
  import { DiscussionController } from '@polyv/chat-sdk/controller/discussion';
  import { DiscussionClientInfo } from '@polyv/chat-sdk/controller/discussion/types';
  import { PageResult } from '@polyv/chat-sdk/controller/discussion/types/common';
  import { DiscussionMsgType } from '@polyv/chat-sdk/controller/discussion/types/msg-types';
  import { DiscussionSalesFileInfo, DiscussionSalesFormInfo, DiscussionSalesGetHistoryMsgOptions, DiscussionSalesReadClientMessageOptions, PushFileToClientOptions, PushFormToClientOptions, SalesGetClientChatListOptions, SalesGetFileListOptions, SalesGetFormListOptions, SalesSendMessageOptions } from '@polyv/chat-sdk/controller/discussion/types/sales-types';
  import { DiscussionUserController } from '@polyv/chat-sdk/controller/discussion/services/common';
  /**
    * 销售端控制器
    */
  export class SalesController extends DiscussionUserController {
      constructor(_discussionCtrl: DiscussionController);
      /**
        * 已读客户消息
        * @api
        */
      readClientMessage(options: DiscussionSalesReadClientMessageOptions): Promise<void>;
      /**
        * 销售端发送消息
        * @api
        */
      sendMessage(options: SalesSendMessageOptions): Promise<void>;
      /**
        * 获取客户的历史消息
        * @api
        */
      getClientHistoryMessage(options: DiscussionSalesGetHistoryMsgOptions): Promise<DiscussionMsgType[]>;
      /**
        * 获取当前销售的客户聊天列表
        * @api
        */
      getClientChatList(options?: SalesGetClientChatListOptions): Promise<DiscussionClientInfo[]>;
      /**
        * 获取指定客户的文档列表
        * @api
        */
      getClientFileList(options: SalesGetFileListOptions): Promise<PageResult<DiscussionSalesFileInfo>>;
      /**
        * 推送文档给指定客户
        * @api
        */
      pushFileToClient(options: PushFileToClientOptions): Promise<void>;
      /**
        * 获取指定客户的表单列表
        * @api
        */
      getClientFormList(options: SalesGetFormListOptions): Promise<PageResult<DiscussionSalesFormInfo>>;
      /**
        * 推送表单给指定客户
        * @api
        */
      pushFormToClient(options: PushFormToClientOptions): Promise<void>;
  }
}

declare module '@polyv/chat-sdk/controller/discussion/msg-filter/msg-filter' {
  import { DiscussionMsgType } from '@polyv/chat-sdk/controller/discussion/types/msg-types';
  import { DiscussionChatApiMessageItem } from '@polyv/chat-sdk/controller/discussion/msg-filter/types';
  /**
    * 洽谈室消息过滤器
    */
  export class DiscussionMsgFilter {
    filterApiMessages(messages: DiscussionChatApiMessageItem[], clientId: string): DiscussionMsgType[];
  }
}

declare module '@polyv/chat-sdk/controller/discussion/types' {
  /**
    * 洽谈室客户基础信息
    */
  export interface DiscussionClientBasicInfo {
      /** 客户 id */
      userId: string;
      /** 客户昵称 */
      nick: string;
      /** 客户头像 */
      pic: string;
      /** 客户头衔 */
      actor?: string;
      /** 最新消息时间 */
      timestamp: number;
  }
  /**
    * 洽谈室客户信息
    */
  export interface DiscussionClientInfo extends DiscussionClientBasicInfo {
      /** 客户是否在线 */
      online: 'Y' | 'N';
      /** 消息未读数量 */
      unReadCount: number;
      /** 当前销售是否为该客户的跟进人 */
      isCurrentFollower?: 'Y' | 'N';
  }
  /**
    * 洽谈室文档基础信息
    */
  export interface DiscussionFileBasicInfo {
      /** 文件 id */
      id: string;
      /** 文件名称 */
      name: string;
      /** 文件地址 */
      url: string;
  }
  /**
    * 洽谈室表单基础信息
    */
  export interface DiscussionFormBasicInfo {
      /** 表单 id */
      id: string;
      /** 表单名称 */
      name: string;
  }
  /**
    * 表单详情
    */
  export interface DiscussionFormDetail {
      id: string;
      /** 题目 id */
      fieldId: string;
      /** id */
      formId: string;
      /** 用户id */
      userId?: string;
      /** 表单项名称 */
      formName: string;
      rank?: string;
      /** 提示 */
      tips: string;
      /** 是否必填 */
      required: string;
      /** 区域area 手机号mobile 单选radio, 多选 checkbox, 文本text */
      formType: string;
      /** 选项格式如： "[\"3个月\", \"6个月\", \"1年以内\", \"考察当中/1年以后\"]" */
      options?: string;
      smsCheck?: string;
  }
  export interface DiscussionSendSystemMessageOptions {
      clientId: string;
      content: string;
  }
}

declare module '@polyv/chat-sdk/constants/msg-types' {
  /**
    * 聊天室消息类型封装
    * 历史消息根据 msgSource、websocket 消息根据事件类型来判断和封装
    * @packageDocumentation
    */
  export enum msgTypes {
    /** 普通文本消息 */
    NORMAL = "NORMAL",
    /** 图片消息 */
    CHAT_IMG = "CHAT_IMG",
    /** 表情消息 */
    EMOTION = "EMOTION",
    /** 红包消息 */
    REDPAPER = "REDPAPER",
    /** 自定义消息 */
    CUSTOMER_MESSAGE = "CUSTOMER_MESSAGE",
    /** 打赏消息 */
    REWARD = "REWARD",
    /** 系统消息(封装) */
    SYSTEM = "SYSTEM",
    /** 某人抢到红包系统提示(封装) */
    RED_PAPER_RESULT = "RED_PAPER_RESULT",
    /** 文件分享 */
    FILE = "FILE",
    /** 严禁词 */
    BadWord = "BadWord"
  }
}

declare module '@polyv/chat-sdk/utils/ajax' {
  /**
    * api 请求封装
    * @packageDocumentation
    */
  import { IAJAXOptions } from '@just4/ajax/interfaces';
  import { UniversalParams } from '@polyv/chat-sdk/types';
  import { IJSONPOptions } from '@just4/load-script/interfaces';
  /** ajax 请求库构造函数参数 */
  interface APIQueryConfig {
      /** 请求前缀 */
      baseURL: string;
      /** 超时数值 */
      timeout?: number;
  }
  /**
    * API 请求封装
    * @class
    */
  export default class APIQuery {
      constructor(options: APIQueryConfig);
      /**
        * 修改请求前缀
        * @param baseURL 新的请求前缀
        * @returns this
        */
      setBaseURL(baseURL: string): this;
      _addBaseURL(url: string): string;
      _request(url: string, options: IAJAXOptions): Promise<unknown>;
      get(url: string, params: UniversalParams, options?: IAJAXOptions): Promise<unknown>;
      post(url: string, data: UniversalParams, options?: IAJAXOptions): Promise<unknown>;
      /**
        * 发送 jsonp 请求
        * @param url 地址
        * @param options 配置
        */
      jsonp(url: string, options?: IJSONPOptions): Promise<unknown>;
  }
  export {};
}

declare module '@polyv/chat-sdk/utils/upload-image' {
  import { ChatImageUpload, ChatImageUploadOptions, FailErrorData } from '@polyv/chat-image-upload-sdk';
  export default class ImageUpload {
    imgUploadCtx?: ChatImageUpload;
    constructor(options: ChatImageUploadOptions);
    uploadFile(fail?: (err: FailErrorData) => unknown): void;
    sendImg(file: File): Promise<import("@polyv/chat-image-upload-sdk").ChatImage> | undefined;
    reSendImg(id: string): Promise<import("@polyv/chat-image-upload-sdk").ChatImage> | undefined;
    destroy(): void;
  }
}

declare module '@polyv/chat-sdk/message/types' {
  import { ChatImageUploadOptions } from '@polyv/chat-image-upload-sdk';
  export interface ImageUploadOptions extends ChatImageUploadOptions {
    sendChatImgSocketAfterSuccess?: boolean;
  }
}

declare module '@polyv/chat-sdk/types' {
  /**
    * 常用类型声明
    * @packageDocumentation
    */
  export * as Config from '@polyv/chat-sdk/types/config';
  import { ReceiveSpeakMsg } from '@polyv/chat-sdk/types/message-receive';
  /**
    * 字符串常量枚举类型
   */
  export type strKVPair = {
      [key: string]: string;
  };
  /**
    * 通用对象定义
    */
  export type UniversalParams = {
      [key: string]: unknown;
  };
  /** api 接口响应数据 */
  export interface ResponseBody<T = unknown> {
      code: number;
      data: T;
      message: string;
      status: string;
  }
  /** 发送消息方法 */
  export interface SpeakOptions {
      content: string;
      quoteMsg?: ReceiveSpeakMsg;
  }
  /** 清空聊天历史记录 */
  export interface RemoveHistoryParams {
      /** 房间号 */
      roomId?: string;
  }
  /**
    * 后端接口返回的分页格式
    */
  export interface ApiPageResult<I> {
      contents: I[];
      pageNumber: number;
      pageSize: number;
      totalPages: number;
      totalItems: number;
  }
}

declare module '@polyv/chat-sdk/controller/emotion' {
  import { EmotionData, GetEmotionDataParams, GetEmotionListParams } from '@polyv/chat-sdk/controller/emotion/types';
  export interface EmotionConfig {
      channelId: string;
      apiHost: string;
  }
  /**
    * 表情控制器
    * @class
    */
  export class EmotionController {
      constructor(config: EmotionConfig);
      /**
        * 获取表情列表
        * @api
        */
      getEmotionList(params: GetEmotionListParams): Promise<EmotionData[]>;
      /**
        * 获取表情数据
        * @api
        * @param params 调用参数
        * @returns 返回表情数据，如果对应的 id 不存在则返回 undefined
        */
      getEmotionData(params: GetEmotionDataParams): Promise<EmotionData | undefined>;
  }
}

declare module '@polyv/chat-sdk/controller/user' {
  import { ChatController } from '@polyv/chat-sdk/controller/chat';
  import { ResponseBody } from '@polyv/chat-sdk/types';
  import { BannedParams, GetUserListOptions, KickedParams, OnlineUserData, OnlineUserListOptions, UserData, ForbidOptions, ForbidResponseData } from '@polyv/chat-sdk/controller/user/types';
  /**
    * @class 聊天室成员模块
    */
  export class UserController {
      chat: ChatController;
      constructor(chat: ChatController);
      /**
        * 获取聊天室在线列表
        * @param options 调用参数
        */
      getOnlineUserList(options?: OnlineUserListOptions): Promise<OnlineUserData>;
      /**
        * 获取所有禁言用户列表
        * @param options 调用参数
        */
      getBannedUserList(options?: GetUserListOptions): Promise<UserData[]>;
      /**
        * 获取所有禁言用户列表 - 分页
        * @param options 调用参数
        */
      getBannedUserListPage(options?: GetUserListOptions): Promise<{
          total: number;
          list: UserData[];
      }>;
      /**
        * 获取所有的禁言 ip 列表
        * @param options 调用参数
        */
      getBannedIpList(options?: GetUserListOptions): Promise<string[]>;
      /**
        * 获取所有踢出用户列表
        * @param options 调用参数
        */
      getKickedUserList(options?: GetUserListOptions): Promise<UserData[]>;
      /**
        * 添加禁言
        * @param params 禁言数据
        */
      addBanned(params: BannedParams): Promise<ResponseBody>;
      /**
        * 移除禁言
        * @param params 禁言数据
        */
      removeBanned(params: BannedParams): Promise<ResponseBody>;
      /**
        * 踢出某个用户
        * @param params 踢出数据
        */
      addKicked(params: KickedParams): Promise<ResponseBody>;
      /**
        * 移除某个踢出的用户
        * @param params 踢出数据
        */
      removeKicked(params: KickedParams): Promise<unknown>;
      /**
        * 已废弃
        * 获取禁言/踢出列表
        * @param options 调用参数
        */
      getBanAndKickList(options: ForbidOptions): Promise<ForbidResponseData>;
  }
}

declare module '@polyv/chat-sdk/controller/censor' {
  import { ChatController } from '@polyv/chat-sdk/controller/chat';
  /**
    * 聊天审核控制器
    * @class
    */
  export class CensorController {
      chat: ChatController;
      constructor(chat: ChatController);
      /**
        * 切换审核开关
        * @api
        */
      toggleCensorStatus(open: boolean): void;
      /**
        * 添加审核者
        * @api
        */
      addCensorUser(): Promise<unknown[]>;
  }
}

declare module '@polyv/chat-sdk/controller/discussion/index' {
  import { Message } from '@polyv/chat-sdk/message';
  import { ChatConfig } from '@polyv/chat-sdk/types/config';
  import { ChatImgContent } from '@polyv/chat-sdk/types/message';
  import { DiscussionEvents, DiscussionMessageSource, DiscussionMessageStatus, DiscussionMessageType } from '@polyv/chat-sdk/controller/discussion/enum';
  import { ClientController } from '@polyv/chat-sdk/controller/discussion/services/client-controller';
  import { SalesController } from '@polyv/chat-sdk/controller/discussion/services/sales-controller';
  import { DiscussionMsgFilter } from '@polyv/chat-sdk/controller/discussion/msg-filter/msg-filter';
  import { DiscussionSendSystemMessageOptions } from '@polyv/chat-sdk/controller/discussion/types';
  export class DiscussionController extends Message {
      DiscussionMessageStatus: typeof DiscussionMessageStatus;
      DiscussionMessageType: typeof DiscussionMessageType;
      DiscussionMessageSource: typeof DiscussionMessageSource;
      DiscussionEvents: typeof DiscussionEvents;
      /** 销售端 */
      sales: SalesController;
      /** 客户端 */
      client: ClientController;
      /** 消息过滤器 */
      protected __msgFilter: DiscussionMsgFilter;
      msgHandlers: {
          onSliceID: (data: unknown) => void;
      };
      discussionConfig: ChatConfig;
      constructor(config: ChatConfig);
      setup(): Promise<void>;
      /**
        * 当前是否为销售身份
        */
      currentIsSales(): boolean;
      __setUnReadCount(count?: number): void;
      __addUnReadCount(): void;
      __clearUnReadCount(): void;
      /** 发送洽谈室 socket 信息 */
      _sendDiscussionSocket(socketData: Record<string, unknown>): Promise<unknown>;
      /**
        * 发送本地系统消息
        * @api
        */
      sendSystemMessage(options: DiscussionSendSystemMessageOptions): void;
      /** 发送图片消息 */
      emitImgMsg(content: ChatImgContent): void;
  }
}

declare module '@polyv/chat-sdk/controller/discussion/types/client-types' {
  import { DiscussionMessageStatus } from '@polyv/chat-sdk/controller/discussion/enum';
  import { DiscussionFileBasicInfo, DiscussionFormBasicInfo } from '@polyv/chat-sdk/controller/discussion/types/index';
  /**
    * 客户端 - 获取文档列表参数类型
    */
  export interface ClientGetFileListOptions {
      /** 每页长度，默认：10 */
      size?: number;
      /** 最后一条数据的推送时间 */
      lastTime?: number;
      publish?: 'Y' | 'N';
  }
  /**
    * 客户端 - 获取表单列表参数类型
    */
  export interface ClientGetFormListOptions {
      /** 每页长度，默认：10 */
      size?: number;
      /** 最后一条数据的推送时间 */
      lastTime?: number;
      publish?: 'Y' | 'N';
  }
  /**
    * 客户端 - 文档信息
    */
  export interface DiscussionClientFileInfo extends DiscussionFileBasicInfo {
      /** 文档状态 */
      status: DiscussionMessageStatus;
      /** 推送时间 */
      timestamp: number;
      /** 是否为推送 */
      publish: 'Y' | 'N';
  }
  /**
    * 客户端 - 洽谈室发言
    */
  export interface ClientSendMessageOptions {
      /** 发言内容 */
      content: string;
  }
  export interface DiscussionClientFormInfo extends DiscussionFormBasicInfo {
      /** 文档状态 */
      status: DiscussionMessageStatus;
      /** 推送时间 */
      timestamp: number;
      /** 是否为推送 */
      publish: 'Y' | 'N';
  }
  /**
    * 客户端 - 读文档参数
    */
  export interface DiscussionClientReadFileOptions {
      /** 文档 id */
      id: string;
      /** 文档名称 */
      name: string;
      /** 文档地址 */
      url: string;
  }
  /**
    * 客户端 - 已读消息
    */
  export interface DiscussionClientSubmitMessageOptions {
      /** 标识，消息 id、文件 id、表单 id */
      id?: string;
      /** 表单名称 */
      name?: string;
      /** 消息类型 */
      formData: Array<{
          id: string;
          answer: string;
      }>;
  }
  /**
    * 客户端 - 获取洽谈室历史消息选项
    */
  export interface DiscussionClientGetHistoryMsgOptions {
      /** 从哪个消息 id 开始 */
      id?: string;
      /** 每页长度 */
      size?: number;
  }
}

declare module '@polyv/chat-sdk/controller/discussion/types/msg-types' {
  import { DiscussionFileBasicInfo, DiscussionFormBasicInfo } from '@polyv/chat-sdk/controller/discussion/types/index';
  import { DiscussionMessageSource, DiscussionMessageStatus } from '@polyv/chat-sdk/controller/discussion/enum';
  /**
    * 洽谈室消息用户类型
    */
  export interface DiscussionMsgUser {
      /** 用户 id */
      userId: string;
      /** 用户昵称 */
      nick: string;
      /** 用户头像 */
      pic: string;
      /** 用户头衔 */
      actor?: string;
      /** 用户身份 */
      userType?: string;
  }
  /**
    * 洽谈室消息基础类型
    */
  export interface DiscussionMsgBasicType<S extends DiscussionMessageSource> {
      /** 消息唯一标识 */
      id: string;
      /** 消息来源 */
      msgSource: S;
      /** 消息时间 */
      time: number;
      /** 是否属于服务端的消息 */
      isServiceMsg: boolean;
      /** 某个客户的消息 */
      clientId: string;
  }
  /**
    * 洽谈室消息公用类型
    */
  export interface DiscussionMsgCommonType<S extends DiscussionMessageSource> extends DiscussionMsgBasicType<S> {
      /** 消息用户 */
      user: DiscussionMsgUser;
  }
  /**
    * 洽谈室消息类型 - 发言
    */
  export interface DiscussionMsgSpeakType extends DiscussionMsgCommonType<DiscussionMessageSource.Speak> {
      /** 发言内容 */
      content: string;
      /** 消息状态 */
      msgStatus: DiscussionMessageStatus;
  }
  /**
    * 洽谈室消息类型 - 推送文档
    */
  export interface DiscussionMsgPushFileType extends DiscussionMsgCommonType<DiscussionMessageSource.PushFile> {
      /** 文件内容 */
      content: DiscussionFileBasicInfo;
      /** 消息状态 */
      msgStatus: DiscussionMessageStatus;
  }
  /**
    * 洽谈室消息类型 - 已读文档
    */
  export interface DiscussionMsgReadFileType extends DiscussionMsgCommonType<DiscussionMessageSource.ReadFile> {
      /** 文件内容 */
      content: DiscussionFileBasicInfo;
  }
  /**
    * 洽谈室消息类型 - 推送表单
    */
  export interface DiscussionMsgPushFormType extends DiscussionMsgCommonType<DiscussionMessageSource.PushForm> {
      /** 表单内容 */
      content: DiscussionFormBasicInfo;
      /** 消息状态 */
      msgStatus: DiscussionMessageStatus;
  }
  /**
    * 洽谈室消息类型 - 提交表单
    */
  export interface DiscussionMsgSubmitFormType extends DiscussionMsgCommonType<DiscussionMessageSource.SubmitForm> {
      /** 表单内容 */
      content: DiscussionFormBasicInfo;
  }
  /**
    * 洽谈室消息类型 - 更换跟进人
    */
  export interface DiscussionMsgUpdateClientType extends DiscussionMsgBasicType<DiscussionMessageSource.UpdateClient> {
      /** 客户 id */
      clientId: string;
      /** 客户昵称 */
      nick: string;
      /** 客户头像 */
      pic: string;
      /** 客户头衔 */
      actor?: string;
      /** 状态，Y-当前销售成为该客户的跟进人，N-该客户的跟进人更换为其他人，D-跟进人被删除 */
      status: 'Y' | 'N' | 'D';
  }
  /**
    * 洽谈室消息类型 - 系统消息
    */
  export interface DiscussionMsgSystemType extends DiscussionMsgBasicType<DiscussionMessageSource.System> {
      /** 消息内容 */
      content: string;
  }
  /**
    * 洽谈室消息类型
    */
  export type DiscussionMsgType = DiscussionMsgSpeakType | DiscussionMsgPushFileType | DiscussionMsgReadFileType | DiscussionMsgPushFormType | DiscussionMsgSubmitFormType | DiscussionMsgUpdateClientType | DiscussionMsgSystemType;
}

declare module '@polyv/chat-sdk/controller/discussion/services/common' {
  import { DiscussionController } from '@polyv/chat-sdk/controller/discussion/index';
  import { DiscussionFormDetail } from '@polyv/chat-sdk/controller/discussion/types';
  import { DiscussionMsgFilter } from '@polyv/chat-sdk/controller/discussion/msg-filter/msg-filter';
  /**
    * 洽谈室用户基础控制器
    */
  export class DiscussionUserController {
      protected _discussionCtrl: DiscussionController;
      /** 消息过滤器 */
      protected _msgFilter: DiscussionMsgFilter;
      constructor(_discussionCtrl: DiscussionController);
      /** 获取当前活动 id */
      protected _getCurrentActivityId(): string;
      /** 发送洽谈室 socket 信息 */
      protected _sendDiscussionSocket(socketData: Record<string, unknown>): Promise<unknown>;
      /** 获取客户表单详情
        * @params id 表单id
        * */
      getClientFormVal(options: {
          clientId: string;
          formId: string;
      }): Promise<unknown>;
      /** 获取表单详情
        * @params id 表单id
        * */
      getFormDetail(id: string): Promise<Array<DiscussionFormDetail>>;
  }
}

declare module '@polyv/chat-sdk/controller/discussion/types/common' {
  /**
    * 分页结果
    */
  export interface PageResult<Item> {
    /** 列表内容 */
    contents: Item[];
    /** 总页数 */
    total: number;
  }
}

declare module '@polyv/chat-sdk/controller/discussion/types/sales-types' {
  import { DiscussionFileBasicInfo, DiscussionFormBasicInfo } from '@polyv/chat-sdk/controller/discussion/types/index';
  import { DiscussionMessageStatus } from '@polyv/chat-sdk/controller/discussion/enum';
  export interface SalesGetClientChatListOptions {
      /** 每页数量，默认：100 */
      size?: number;
      /** 最后一条信息的时间戳 */
      lastTime?: number;
  }
  /**
    * 销售端 - 获取文档列表参数类型
    */
  export interface SalesGetFileListOptions {
      /** 客户 id */
      clientId: string;
      /** 页数，默认：1 */
      page?: number;
      /** 每页长度，默认：10 */
      size?: number;
  }
  /**
    * 销售端 - 洽谈室发言
    */
  export interface SalesSendMessageOptions {
      /** 指定的客户 id */
      clientId: string;
      /** 发言内容 */
      content: string;
  }
  /**
    * 销售端 - 获取文档列表参数类型
    */
  export interface SalesGetFormListOptions {
      /** 客户 id */
      clientId: string;
      /** 页数，默认：1 */
      page?: number;
      /** 每页长度，默认：10 */
      size?: number;
  }
  /**
    * 销售端 - 推送文档到客户参数类型
    */
  export interface PushFileToClientOptions {
      /** 客户 id */
      clientId: string;
      /** 文件 id */
      id: string;
      /** 文件名称 */
      name: string;
      /** 文件地址 */
      url: string;
      /** 是否已读，默认：false */
      isReaded?: boolean;
  }
  /**
    * 销售端 - 推送表单到客户参数类型
    */
  export interface PushFormToClientOptions {
      /** 客户 id */
      clientId: string;
      /** 表单 id */
      id: string;
      /** 文件名称 */
      name: string;
      /** 是否已填写，默认：false */
      isSubmited?: boolean;
  }
  /**
    * 销售端 - 文档信息
    */
  export interface DiscussionSalesFileInfo extends DiscussionFileBasicInfo {
      /** 文档状态 */
      status: DiscussionMessageStatus;
      /** 是否为默认 */
      default: 'Y' | 'N';
  }
  /**
    * 销售端 - 文档信息
    */
  export interface DiscussionSalesFormInfo extends DiscussionFormBasicInfo {
      /** 文档状态 */
      status: DiscussionMessageStatus;
      /** 是否为默认 */
      default: 'Y' | 'N';
  }
  /**
    * 销售端 - 获取洽谈室历史消息选项
    */
  export interface DiscussionSalesGetHistoryMsgOptions {
      /** 客户 id */
      clientId: string;
      /** 从哪个消息 id 开始 */
      id?: string;
      /** 每页长度 */
      size?: number;
  }
  /**
    * 销售端 - 已读客户消息选项
    */
  export interface DiscussionSalesReadClientMessageOptions {
      /** 客户 id */
      clientId: string;
  }
}

declare module '@polyv/chat-sdk/controller/discussion/msg-filter/types' {
  import { DiscussionMessageStatus } from '@polyv/chat-sdk/controller/discussion/enum';
  export interface DiscussionChatApiMessageItem {
    /** 消息标识 id */
    id: number;
    /** 消息类型 */
    msgType: 'speak' | 'file' | 'form';
    /** 发言用户 id */
    userId: string;
    /** 发言用户昵称 */
    nick: string;
    /** 发言用户头像 */
    pic: string;
    /** 发言用户头衔 */
    actor: string;
    /** 发言时间戳 */
    timestamp: number;
    /** 发言内容 */
    content: string;
    /** 消息状态 */
    readed: DiscussionMessageStatus;
  }
}

declare module '@polyv/chat-sdk/controller/emotion/types' {
  /** 表情数据 */
  export interface EmotionData {
    /** 表情 id */
    id: string;
    /** 表情名称 */
    title: string;
    /** 表情图片地址 */
    url: string;
  }
  /** 获取表情列表方法参数类型 */
  export interface GetEmotionListParams {
    /** 频道号，不传时使用当前频道号 */
    channelId?: string;
    /** 账号或用户id */
    accountId: string;
  }
  /** 获取表情信息方法参数类型 */
  export interface GetEmotionDataParams extends GetEmotionListParams {
    /** 表情 id */
    id: string;
  }
  export interface EmotionResponseData {
    list: EmotionData[];
    page: number;
    size: number;
    total: number;
  }
}

declare module '@polyv/chat-sdk/controller/user/types' {
  /**
    * 在线列表类型声明
    * @packageDocumentation
    */
  import { BanType } from '@polyv/chat-sdk/types/message-receive';
  export interface GetUserListOptions {
      /** 房间号(若不传，默认取配置中的房间号/频道号) */
      roomId?: string;
      /** 是否获取分房间下的数据，选传，默认：true */
      toGetSubRooms?: boolean;
      /** 页码 */
      page?: number;
      /** 每页数量 */
      size?: number;
      /** 昵称 */
      keyword?: string;
  }
  /**
    * 获取聊天室在线人数列表方法参数
    */
  export interface OnlineUserListOptions extends GetUserListOptions {
      /** 页数，默认：1 */
      page?: number;
      /** 每页长度，默认：500 */
      len?: number;
      /** 用户昵称关键字 */
      nick?: string;
      /**
        * 请求新的接口
        * 新的接口会返回准确的禁言状态，需要特殊身份才可使用
        */
      newAPI?: Boolean;
  }
  /**
    * 在线人员类型
    */
  export interface UserData {
      /** 头衔 */
      actor?: string;
      /** 频道号 */
      channelId: string;
      /** 房间号 */
      roomId: string;
      /** ip地址 */
      clientIp: string;
      /** 昵称 */
      nick: string;
      /** 头像图片地址 */
      pic: string;
      /** 用户id */
      userId: string;
      /** 用户类型 */
      userType: string;
  }
  /**
    * 在线列表类型
    */
  export interface OnlineUserData {
      /** 在线人数 */
      count: number;
      userlist: UserData[];
  }
  /**
    * 禁言参数类型
    */
  export interface BannedParams {
      /** 频道号 */
      channelId?: string;
      /** 房间号 */
      roomId?: string;
      /** 禁言类型 */
      type: BanType;
      /** 被禁言的目标，值为被禁言的 userId 或 ip */
      value: string;
  }
  /**
    * 踢出参数类型
    */
  export interface KickedParams {
      /** 频道号 */
      channelId?: string;
      /** 房间号 */
      roomId?: string;
      /** 被禁言的 userId */
      userId: string;
      /** 是否获取分房间下的数据，选传，默认：true */
      toGetSubRooms?: boolean;
  }
  /** 封禁参数类型 */
  export interface ForbidOptions {
      /** 封禁类型 */
      type: 'kick' | 'ban';
      /** 每页数量 */
      size: number;
      /** 页码 */
      page: number;
  }
  /** 封禁用户数据类型 */
  export interface ForbidUserData {
      /** 封禁ip */
      ip: string;
      /** 封禁用户昵称 */
      nick: string;
      /** 封禁用户id */
      userId: string;
      /** 是否账号级别 */
      isAccount: boolean;
  }
  /** 封禁接口返回数据 */
  export interface ForbidResponseData {
      /** 页码 */
      page: number;
      /** 每页数量 */
      size: number;
      /** 总条目数 */
      totalCount: number;
      /** 总页数 */
      totalPage: number;
      /** 封禁用户列表 */
      list: ForbidUserData[];
  }
}

declare module '@polyv/chat-sdk/controller/discussion/types/index' {
  /**
    * 洽谈室客户基础信息
    */
  export interface DiscussionClientBasicInfo {
      /** 客户 id */
      userId: string;
      /** 客户昵称 */
      nick: string;
      /** 客户头像 */
      pic: string;
      /** 客户头衔 */
      actor?: string;
      /** 最新消息时间 */
      timestamp: number;
  }
  /**
    * 洽谈室客户信息
    */
  export interface DiscussionClientInfo extends DiscussionClientBasicInfo {
      /** 客户是否在线 */
      online: 'Y' | 'N';
      /** 消息未读数量 */
      unReadCount: number;
      /** 当前销售是否为该客户的跟进人 */
      isCurrentFollower?: 'Y' | 'N';
  }
  /**
    * 洽谈室文档基础信息
    */
  export interface DiscussionFileBasicInfo {
      /** 文件 id */
      id: string;
      /** 文件名称 */
      name: string;
      /** 文件地址 */
      url: string;
  }
  /**
    * 洽谈室表单基础信息
    */
  export interface DiscussionFormBasicInfo {
      /** 表单 id */
      id: string;
      /** 表单名称 */
      name: string;
  }
  /**
    * 表单详情
    */
  export interface DiscussionFormDetail {
      id: string;
      /** 题目 id */
      fieldId: string;
      /** id */
      formId: string;
      /** 用户id */
      userId?: string;
      /** 表单项名称 */
      formName: string;
      rank?: string;
      /** 提示 */
      tips: string;
      /** 是否必填 */
      required: string;
      /** 区域area 手机号mobile 单选radio, 多选 checkbox, 文本text */
      formType: string;
      /** 选项格式如： "[\"3个月\", \"6个月\", \"1年以内\", \"考察当中/1年以后\"]" */
      options?: string;
      smsCheck?: string;
  }
  export interface DiscussionSendSystemMessageOptions {
      clientId: string;
      content: string;
  }
}

