import { Chat , Chatlog , ChatLogged , ChatType } from '../chat' ; import { Channel } from './channel' ; import { AsyncCommandResult , CommandResult } from '../request' ; import { Long } from '..' ; import { ChannelUser , NormalChannelUserInfo } from '../user' ; import { ChannelMeta , NormalChannelInfo , SetChannelMeta } from './channel-info' ; import { ChatOnRoomRes } from '../packet/chat' ; import { ChannelMetaType } from './meta' ; import { MediaKeyComponent , MediaMultiPost , MediaPost , MediaUploadForm } from '../media' ; import { FixedReadStream } from '../stream' ; export interface ChannelTemplate { userList : ChannelUser [ ] ; name ? : string ; profileURL ? : string ; } /**
 * Classes which provides channel session operations should implement this.
 */ export interface ChannelSession { param chat param { boolean } noSeen sendChat ( chat , noSeen ? ) : AsyncCommandResult < Chatlog > ; param chat param { boolean } noSeen forwardChat ( chat , noSeen ? ) : AsyncCommandResult < Chatlog > ; param chat deleteChat ( chat ) : AsyncCommandResult ; param chat markRead ( chat ) : AsyncCommandResult ; param type param meta setMeta ( type , meta ) : AsyncCommandResult < SetChannelMeta > ; param flag setPushAlert ( flag ) : AsyncCommandResult ; param endLogId param startLogId returns syncChatList ( endLogId , startLogId ? ) : AsyncIterableIterator < CommandResult < Chatlog [ ] > > ; param startLogId getChatListFrom ( startLogId ? ) : AsyncCommandResult < Chatlog [ ] > ; param media param type param { number } offset downloadMedia ( media , type , offset ? ) : AsyncCommandResult < FixedReadStream > ; param media param type param { number } offset downloadMediaThumb ( media , type , offset ? ) : AsyncCommandResult < FixedReadStream > ; param type param form uploadMedia ( type , form ) : AsyncCommandResult < MediaPost > ; param type param forms uploadMultiMedia ( type , forms ) : AsyncCommandResult < MediaMultiPost > ; } /**
 * Classes which provides normal channel session operations should implement this.
 */ export interface NormalChannelSession { /**
     * Send CHATONROOM and get room infos.
     * Official client sends this and update some infos before opening chatroom window.
     */ chatON ( ) : AsyncCommandResult < Readonly < ChatOnRoomRes > > ; /**
     * Get latest channel info
     */ getLatestChannelInfo ( ) : AsyncCommandResult < NormalChannelInfo > ; param channelUsers getLatestUserInfo ( ... channelUsers ) : AsyncCommandResult < NormalChannelUserInfo [ ] > ; see getLatestUserInfo getAllLatestUserInfo ( ) : AsyncCommandResult < NormalChannelUserInfo [ ] > ; param userList inviteUsers ( userList ) : AsyncCommandResult ; } export interface ChannelManageSession { param channel param block returns leaveChannel ( channel , block ? ) : AsyncCommandResult < Long > ; } /**
 * Classes which can manage normal channels should implement this.
 */ export interface NormalChannelManageSession extends ChannelManageSession { param template createChannel ( template ) : AsyncCommandResult < Channel > ; /**
     * Create memo channel.
     * Perform CREATE command.
     */ createMemoChannel ( ) : AsyncCommandResult < Channel > ; }