@fork-anyone/node-nim
Version:
NetEase IM nodejs wrapper based on NetEase IM C++ SDK
40 lines (39 loc) • 2.03 kB
TypeScript
import { EventEmitter } from 'eventemitter3';
import { QChatSendSystemNotificationParam, QChatUpdateSystemNotificationParam, QChatMarkSystemNotificationsReadParam, QChatSendTypingEventParam, QChatMarkSystemNotificationsReadResp, QChatSendSystemNotificationResp, QChatSendTypingEventResp, QChatUpdateSystemNotificationResp, QChatRecvSystemNotificationResp, QChatRecvTypingEventResp, QChatSystemNotificationUpdatedResp } from '../qchat_def/system_notification_def';
export declare interface QChatSystemNotificationEvents {
/** 接受系统通知 */
notification: [QChatRecvSystemNotificationResp];
/** 正在输入事件 */
typingEvent: [QChatRecvTypingEventResp];
/** 系统通知更新 */
update: [QChatSystemNotificationUpdatedResp];
}
export declare class QChatSystemNotificationModule extends EventEmitter<QChatSystemNotificationEvents> {
instance: any;
constructor(sdk: any);
/** 注册全局回调 */
initEventHandlers(): void;
/** @fn send(param: QChatSendSystemNotificationParam)
* 发送系统消息
* @param[in] param 接口参数
* @return void
*/
send(param: QChatSendSystemNotificationParam): Promise<QChatSendSystemNotificationResp>;
/** @fn update(param: QChatUpdateSystemNotificationParam)
* @brief 更新系统消息
* @param[in] param 接口参数
*/
update(param: QChatUpdateSystemNotificationParam): Promise<QChatUpdateSystemNotificationResp>;
/** @fn markSystemNotificationsRead(param: QChatMarkSystemNotificationsReadParam)
* @brief 标记系统通知消息已读
* @param param 接口参数
* @return void
*/
markSystemNotificationsRead(param: QChatMarkSystemNotificationsReadParam): Promise<QChatMarkSystemNotificationsReadResp>;
/** @fn sendTypingEvent(param: QChatSendTypingEventParam)
* @brief 发送正在输入事件
* @param param 接口参数
* @return void
*/
sendTypingEvent(param: QChatSendTypingEventParam): Promise<QChatSendTypingEventResp>;
}