node-nim
Version:
NetEase IM nodejs wrapper based on NetEase IM C++ SDK
140 lines (139 loc) • 8.22 kB
TypeScript
import { EventEmitter } from 'eventemitter3';
import { QChatChannelCreateParam, QChatChannelDeleteParam, QChatChannelUpdateParam, QChatChannelUpdateCategoryInfoParam, QChatChannelSubscribeParam, QChatChannelQueryUnreadInfoParam, QChatChannelGetChannelsParam, QChatChannelGetChannelsPageParam, QChatChannelGetMembersPageParam, QChatChannelUpdateWhiteBlackRoleParam, QChatChannelUpdateWhiteBlackMembersParam, QChatChannelGetWhiteBlackRolesPageParam, QChatChannelGetWhiteBlackMembersPageParam, QChatChannelGetExistingWhiteBlackRolesParam, QChatChannelGetExistingWhiteBlackMembersParam, QChatChannelSearchPageParam, QChatChannelMemberSearchParam, QChatChannelUpdateRTCInfoParam, QChatChannelGetRTCInfoParam, QChatChannelGetRTCOnlineMembersParam, QChatChannelCreateResp, QChatChannelDeleteResp, QChatChannelGetChannelsPageResp, QChatChannelGetChannelsResp, QChatChannelGetExistingWhiteBlackMembersResp, QChatChannelGetExistingWhiteBlackRolesResp, QChatChannelGetMembersPageResp, QChatChannelGetRTCInfoResp, QChatChannelGetRTCOnlineMembersResp, QChatChannelGetWhiteBlackMembersPageResp, QChatChannelGetWhiteBlackRolesPageResp, QChatChannelMemberSearchResp, QChatChannelQueryUnreadInfoResp, QChatChannelSearchPageResp, QChatChannelSubscribeResp, QChatChannelUpdateCategoryInfoResp, QChatChannelUpdateResp, QChatChannelUpdateRTCInfoResp, QChatChannelUpdateWhiteBlackMembersResp, QChatChannelUpdateWhiteBlackRoleResp, QChatChannelUnreadResp, QChatChannelSubscribeAsVisitorParam, QChatChannelSubscribeAsVisitorResp } from '../qchat_def/channel_def';
export declare interface QChatChannelEvents {
/** 频道未读数 */
unread: [QChatChannelUnreadResp];
}
export declare class QChatChannelModule extends EventEmitter<QChatChannelEvents> {
instance: any;
constructor();
/** 注册全局回调 */
initEventHandlers(): void;
/** @fn createChannel(param: QChatChannelCreateParam)
* 创建频道
* @param[in] param 接口参数
* @return void
*/
createChannel(param: QChatChannelCreateParam): Promise<QChatChannelCreateResp>;
/** @fn deleteChannel(param: QChatChannelDeleteParam)
* 删除频道
* @param[in] param 接口参数
* @return void
*/
deleteChannel(param: QChatChannelDeleteParam): Promise<QChatChannelDeleteResp>;
/** @fn updateChannel(param: QChatChannelUpdateParam)
* 更新频道
* @param[in] param 接口参数
* @return void
*/
updateChannel(param: QChatChannelUpdateParam): Promise<QChatChannelUpdateResp>;
/** @fn updateCategoryInfo(param: QChatChannelUpdateCategoryInfoParam)
* 更新频道的分组信息
* @param[in] param 接口参数
* @return void
*/
updateCategoryInfo(param: QChatChannelUpdateCategoryInfoParam): Promise<QChatChannelUpdateCategoryInfoResp>;
/** @fn subscribe(param: QChatChannelSubscribeParam)
* 订阅频道未读状态、未读数或未读消息、事件
* @param[in] param 接口参数
* @return void
*/
subscribe(param: QChatChannelSubscribeParam): Promise<QChatChannelSubscribeResp>;
/** @fn subscribeAsVisitor(param: QChatChannelSubscribeAsVisitorParam)
* 以游客模式订阅频道未读状态、未读数或未读消息、事件
* @param[in] param 接口参数
* @return void
*/
subscribeAsVisitor(param: QChatChannelSubscribeAsVisitorParam): Promise<QChatChannelSubscribeAsVisitorResp>;
/** @fn queryUnreadInfo(param: QChatChannelQueryUnreadInfoParam)
* 查询消息未读数
* @param[in] param 接口参数
* @return void
*/
queryUnreadInfo(param: QChatChannelQueryUnreadInfoParam): Promise<QChatChannelQueryUnreadInfoResp>;
/** @fn getChannels(param: QChatChannelGetChannelsParam)
* 查询频道列表
* @param[in] param 接口参数
* @return void
*/
getChannels(param: QChatChannelGetChannelsParam): Promise<QChatChannelGetChannelsResp>;
/** @fn getChannelsByPage(param: QChatChannelGetChannelsPageParam)
* 查询频道列表(分页)
* @param[in] param 接口参数
* @return void
*/
getChannelsByPage(param: QChatChannelGetChannelsPageParam): Promise<QChatChannelGetChannelsPageResp>;
/** @fn getMembersByPage(param: QChatChannelGetMembersPageParam)
* 查询频道用户列表(分页),与查询服务器成员不同,查询频道成员指可以查看该频道的成员信息,取决于频道的白/黑名单设置
* 私有频道设置的白名单用户为该频道下的成员,公共频道除了黑名单中的成员均可以访问该频道
* @param[in] param 接口参数
* @return void
*/
getMembersByPage(param: QChatChannelGetMembersPageParam): Promise<QChatChannelGetMembersPageResp>;
/** @fn updateWhiteBlackRole(param: QChatChannelUpdateWhiteBlackRoleParam)
* 更新频道白/黑名单身份组,公开频道:黑名单,私有频道:白名单
* @param[in] param 接口参数
* @return void
*/
updateWhiteBlackRole(param: QChatChannelUpdateWhiteBlackRoleParam): Promise<QChatChannelUpdateWhiteBlackRoleResp>;
/** @fn updateWhiteBlackMembers(param: QChatChannelUpdateWhiteBlackMembersParam)
* 更新频道白/黑名单成员,公开频道:黑名单,私有频道:白名单
* @param[in] param 接口参数
* @return void
*/
updateWhiteBlackMembers(param: QChatChannelUpdateWhiteBlackMembersParam): Promise<QChatChannelUpdateWhiteBlackMembersResp>;
/** @fn getWhiteBlackRolesPage(param: QChatChannelGetWhiteBlackRolesPageParam)
* 查询频道白/黑名单身份组列表(分页)
* @param[in] param 接口参数
* @return void
*/
getWhiteBlackRolesPage(param: QChatChannelGetWhiteBlackRolesPageParam): Promise<QChatChannelGetWhiteBlackRolesPageResp>;
/** @fn getWhiteBlackMembersPage(param: QChatChannelGetWhiteBlackMembersPageParam)
* 查询频道白/黑名单成员列表(分页)
* @param[in] param 接口参数
* @return void
*/
getWhiteBlackMembersPage(param: QChatChannelGetWhiteBlackMembersPageParam): Promise<QChatChannelGetWhiteBlackMembersPageResp>;
/** @fn getExistingWhiteBlackRoles(param: QChatChannelGetExistingWhiteBlackRolesParam)
* 根据身份组ID查询已存在的白/黑名单身份组
* @param[in] param 接口参数
* @return void
*/
getExistingWhiteBlackRoles(param: QChatChannelGetExistingWhiteBlackRolesParam): Promise<QChatChannelGetExistingWhiteBlackRolesResp>;
/** @fn getExistingWhiteBlackMembers(param: QChatChannelGetExistingWhiteBlackMembersParam)
* 根据成员ID查询已存在的白/黑名单成员
* @param[in] param 接口参数
* @return void
*/
getExistingWhiteBlackMembers(param: QChatChannelGetExistingWhiteBlackMembersParam): Promise<QChatChannelGetExistingWhiteBlackMembersResp>;
/** @fn channelSearchByPage(param: QChatChannelSearchByPageParam)
* 根据关键字搜索频道列表(分页)
* @param[in] param 接口参数
* @return void
*/
channelSearchByPage(param: QChatChannelSearchPageParam): Promise<QChatChannelSearchPageResp>;
/** @fn channelMemberSearch(param: QChatChannelMemberSearchParam)
* 根据关键字搜索频道成员列表
* @param[in] param 接口参数
* @return void
*/
channelMemberSearch(param: QChatChannelMemberSearchParam): Promise<QChatChannelMemberSearchResp>;
/** @fn updateRTCInfo(param: QChatChannelUpdateRTCInfoParam)
* 更新频道RTC信息
* @param[in] param 接口参数
* @return void
*/
updateRTCInfo(param: QChatChannelUpdateRTCInfoParam): Promise<QChatChannelUpdateRTCInfoResp>;
/** @fn getRTCInfo(param: QChatChannelGetRTCInfoParam)
* 查询频道RTC信息
* @param[in] param 接口参数
* @return void
*/
getRTCInfo(param: QChatChannelGetRTCInfoParam): Promise<QChatChannelGetRTCInfoResp>;
/** @fn getRTCOnlineMembers(param: QChatChannelGetRTCOnlineMembersParam)
* 查询频道RTC在线成员列表
* @param[in] param 接口参数
* @return void
*/
getRTCOnlineMembers(param: QChatChannelGetRTCOnlineMembersParam): Promise<QChatChannelGetRTCOnlineMembersResp>;
}