import { OssServiceType } from '../oss/index';

export interface SocketType {
  oss?: OssServiceType;
  socket?: SocketIOClient.Socket;
  subscribe?: (opts: SubscribeOptions) => void;
  send?: (opts: EmitOptions) => void;
  sendFile?: (oss_path: string, files: File[]) => void,
  throttle?: (throttleOpts: any) => Function,
  defaultThrottleSend?: (opts: any) => Promise<any>,
  setUserId?: (userId: string) => Promise<any>
}

export interface SubscribeOptions {
  eventName: string;
  callback: (data: any) => void;
}

export interface EmitOptions {
  eventName: string;
  data: any;
}