import { Long } from 'bson'; import { Channel, ChannelMeta, ChannelSession, ChannelTemplate, NormalChannelManageSession, SetChannelMeta } from '../../channel'; import { Chat, Chatlog, ChatLogged, ChatType } from '../../chat'; import { TalkSession } from '../client'; import { AsyncCommandResult, CommandResult } from '../../request'; import { MShipRes, ShipRes } from '../../packet/chat'; import { ChannelUser } from '../../user'; import { ChannelMetaType } from '../../channel/meta'; import { MediaKeyComponent, MediaMultiPost, MediaPost, MediaUploadForm } from '../../media'; import { ConnectionSession } from '../../network'; import { FixedReadStream } from '../../stream'; /** * Default ChannelSession implementation */ export declare class TalkChannelSession implements ChannelSession { private _channel; private _session; currentMsgId: number; constructor(channel: Channel, session: TalkSession); get session(): TalkSession; sendChat(chat: Chat | string, noSeen?: boolean): AsyncCommandResult; forwardChat(chat: Chat, noSeen?: boolean): AsyncCommandResult; deleteChat(chat: ChatLogged): Promise<{ success: boolean; status: number; }>; markRead(chat: ChatLogged): Promise<{ success: boolean; status: number; }>; setMeta(type: ChannelMetaType, meta: ChannelMeta | string): AsyncCommandResult; setPushAlert(flag: boolean): AsyncCommandResult; inviteUsers(users: ChannelUser[]): AsyncCommandResult; syncChatList(endLogId: Long, startLogId?: Long): AsyncIterableIterator>; getChatListFrom(startLogId?: Long): AsyncCommandResult; createTrailerSession(media: MediaKeyComponent, type: ChatType): AsyncCommandResult; downloadMedia(media: MediaKeyComponent, type: ChatType, offset?: number): AsyncCommandResult; downloadMediaThumb(media: MediaKeyComponent, type: ChatType, offset?: number): AsyncCommandResult; shipMedia(type: ChatType, form: MediaUploadForm): AsyncCommandResult; shipMultiMedia(type: ChatType, forms: MediaUploadForm[]): AsyncCommandResult; uploadMedia(type: ChatType, form: MediaUploadForm): AsyncCommandResult; uploadMultiMedia(type: ChatType, forms: MediaUploadForm[]): AsyncCommandResult; } /** * Default ChannelManageSession implementation. */ export declare class TalkChannelManageSession implements NormalChannelManageSession { private _session; constructor(session: TalkSession); createChannel(template: ChannelTemplate): AsyncCommandResult; createMemoChannel(): AsyncCommandResult; leaveChannel(channel: Channel, block?: boolean): AsyncCommandResult; }