import { EventEmitter } from 'eventemitter3'; import { DeleteFriendOption, FriendProfile, NIMFriendAPI, FriendOptCallback, GetFriendProfileCallback, GetFriendsListCallback, NIMVerifyType, FriendChangeEvent } from '../nim_def/friend_def'; import { NIMResCode } from '../nim_def/client_def'; export declare interface NIMFriendEvents { /** 好友变更通知 */ change: [FriendChangeEvent]; } export declare class NIMFriend extends EventEmitter { friend: NIMFriendAPI; constructor(); /** 注册全局回调 */ initEventHandlers(): void; /** 添加、验证好友 * @param accid 对方帐号 * @param verify_type 好友验证类型 * @param msg 接口扩展字段 * @param cb 好友请求回调函数 * @param jsonExtension json扩展参数(备用,目前不需要) * @return boolean 检查参数如果不符合要求则返回失败 * @note *
     * 200:成功
     * 404:用户不存在
     * 500:未知错误
     * 
*/ request(accid: string, verify_type: NIMVerifyType, msg: string, cb: FriendOptCallback | null, jsonExtension: string): Promise<[NIMResCode] | null>; /** 删除好友 * @param accid 对方帐号 * @param option 删除好友选项,目前仅有是否删除备注信息选项 * @param cb 删除好友回调函数 * @return boolean 检查参数如果不符合要求则返回失败 * @note *
     * 200:成功
     * 404:用户不存在
     * 500:未知错误
     * 
*/ delete(accid: string, option: DeleteFriendOption, cb: FriendOptCallback | null): Promise<[NIMResCode] | null>; /** 更新好友资料 * @param profile 好友资料 * @param cb 更新好友资料回调函数 * @param jsonExtension json扩展参数(备用,目前不需要) * @return boolean 检查参数如果不符合要求则返回失败 * @note *
     * 200:成功
     * 404:用户不存在
     * 500:未知错误
     * 
*/ update(profile: FriendProfile, cb: FriendOptCallback | null, jsonExtension: string): Promise<[NIMResCode] | null>; /** 增量获取好友列表 * @param cb 获取好友列表回调函数 * @param jsonExtension json扩展参数(备用,目前不需要) * @return void 无返回值 * @note *
     * 200:成功
     * 
*/ getList(cb: GetFriendsListCallback | null, jsonExtension: string): Promise<[NIMResCode, Array]>; /** 获取好友信息 * @param accid 对方帐号 * @param cb 获取好友信息回调函数 * @param jsonExtension json扩展参数(备用,目前不需要) * @return void 无返回值 */ getFriendProfile(accid: string, cb: GetFriendProfileCallback | null, jsonExtension: string): Promise<[string, FriendProfile]>; /** 增量获取好友列表 * @param keyword 要查询的关键字 * @param cb 获取好友列表回调函数 * @param jsonExtension json扩展参数(备用,目前不需要) * @return boolean 返回 true 表示发送查询请求成功,返回 false 表示关键字为空 * @note *
     * 200:成功
     * 
*/ queryFriendListByKeyword(keyword: string, cb: GetFriendsListCallback | null, jsonExtension: string): Promise<[NIMResCode, Array] | null>; }