types

types

"flooNotice" (res)

Floo通知

Kind: event emitted by types

Param Type Description
res object 结果
res.category string 类别
res.desc string 描述

Example

{category: 'loginMessage',desc: 'socket connecting...'} // 开始建连接
{category: 'loginMessage',desc: 'socket connect success...'} // 连接成功
{category: 'loginMessage',desc: 'logining socket service...'} // 开始登录
{category: 'loginMessage',desc: 'login socket failure ......'} // 登录失败
{category: 'loginMessage',desc: 'login socket success.....'} // 登录成功
{category: 'loginMessage', desc: 'getting token...' } //获取token
{category: 'loginMessage',desc: 'token sucecc, getting roster lists..'} // 获取token成功,开始获取好友列表
{category: 'loginMessage',desc: 'get roster list failure:' + ex.message} // 获取好友列表失败
{category: 'action', desc: 'relogin' } // 需要自动登录
{category: 'action', desc: 'relogin_manually' }  // 需要手动登录
{category: 'conversation_deleted',desc: { id, source:'user_operation' }} // 会话被删除。ID:会话ID, source: 来源
{category: 'userNotice', desc:'PASSWORD_CHANGED'} // 用户密码改变
{category: 'userNotice', desc:'FROZEN'} // 用户账户被封禁
{category: 'userNotice', desc:'REMOVED'} // 用户被删除
{category: 'userNotice', desc:'KICK_BY_SAME_DEVICE'} // 当前设备被相同设备踢下线
{category: 'userNotice', desc:'KICKED_BY_OTHER_DEVICE'} // 当前设备被其它设备踢下线
{category: 'userNotice', desc:'INFO_UPDATED'} // 用户信息改变:profile或setting
{category: 'userNotice', desc:'DEVICE_LOGIN'} // 用户其它设备上线
{category: 'userNotice', desc:'DEVICE_LOGOUT'} // 用户其它设备下线
{category: 'userNotice', desc:'DEVICE_ADDED'} // 新设备通知
{category: 'userNotice', desc:'DEVICE_REMOVED'} // 设备被移除的通知
{category: 'userNotice', desc:'CLUSTER_CHANGED'} // 用户所在集群改变 需要重新登录

"flooError" (res)

Floo错误

Kind: event emitted by types

Param Type Description
res object
res.category string 类别
res.desc string 描述

Example

{category: 'USER_BANNED', desc:'用户被禁言'}
{category: 'USER_FROZEN', desc:'用户被冻结,请联系App管理员。'}
{category: 'APP_FROZEN', desc:'APP 被冻结,请登陆蓝莺IM控制台查看详情。'}
{category: 'LICENSE', desc:'无效 LICENSE,请确认服务已按时付费。'}
{category: 'LICENSE', desc:'超出 LICENSE 用户数限制,请购买更高规格服务。'}
{category: 'DNS_FAILED', desc: dnsServer } // DNS错误: 无法访问

"loginFail" (desc)

登录失败

Kind: event emitted by types

Param Type Description
desc string 失败原因

"loginSuccess" (res)

登录成功

Kind: event emitted by types

Param Type Description
res object 空对象

"onGroupListUpdate" (meta)

群列表更新

Kind: event emitted by types

Param Type Description
meta Meta | undefined 通知消息内容

"onGroupMemberChanged" (groupId)

群成员列表更新

Kind: event emitted by types

Param Type Description
groupId number 群ID

"onGroupMessage" (meta)

收到群消息

Kind: event emitted by types

Param Type Description
meta Meta 消息内容

"onInputStatusMessage" (res)

对方正在输入

Kind: event emitted by types

Param Type Description
res object
res.ext string 扩展字段
res.from string 发送者用户ID
res.to string 接收者用户ID

"onMentionMessage" (meta)

收到群组@消息

Kind: event emitted by types

Param Type Description
meta Meta 消息内容

"onMessageCanceled" (res)

消息被取消已读

Kind: event emitted by types

Param Type Description
res object
res.uid string 会话ID
res.mid string 消息ID

"onMessageDeleted" (res)

消息被删除

Kind: event emitted by types

Param Type Description
res object
res.uid string 会话ID
res.mid string 消息ID

"onMessageRecalled" (res)

消息被撤回

Kind: event emitted by types

Param Type Description
res object
res.uid string 会话ID
res.mid string 消息ID

"onMessageStatusChanged" (res)

消息状态变更:撤回/删除/已读

Kind: event emitted by types

Param Type Description
res object
res.uid string 会话ID
res.mid string 消息ID

"onReceiveHistoryMsg" (res)

收到历史消息

Kind: event emitted by types

Param Type Description
res object
res.next number 下次取历史消息的key

"onRosterInfoUpdate" (res)

好友信息变更

Kind: event emitted by types

Param Type Description
res object
res.rosterIds Array.<number> 好友的用户ID列表

"onRosterListUpdate" (meta)

好友列表变更

Kind: event emitted by types

Param Type Description
meta Meta 好友通知的消息内容

"onRosterApplied" (meta)

收到好友申请

Kind: event emitted by types

Param Type Description
meta Meta 好友申请的消息内容

"onRosterMessage" (meta)

收到单聊消息

Kind: event emitted by types

Param Type Description
meta Meta 消息内容

"onRosterRTCMessage" (meta)

收到单聊RTC消息

Kind: event emitted by types

Param Type Description
meta Meta 消息内容

"onSendingMessageStatusChanged" (res)

消息发送状态变更

Kind: event emitted by types

Param Type Description
res object
res.status: number 发送状态,取值为sending failed sent
res.mid: number 客户端生成的client_mid

"onUnreadChange" (cid)

未读数改变

Kind: event emitted by types

Param Type Description
cid number 会话ID

"recentlistUpdate"

最近会话更新

Kind: event emitted by types

"onGroupCreated" (meta)

群组创建通知

Kind: event emitted by types

Param Type Description
meta Meta 群通知的消息内容

"onGroupDestoryed" (meta)

群组解散通知

Kind: event emitted by types

Param Type Description
meta Meta 群通知的消息内容

"onGroupJoined" (meta)

成员入群通知

Kind: event emitted by types

Param Type Description
meta Meta 群通知的消息内容

"onGroupLeaved" (meta)

成员退群通知

Kind: event emitted by types

Param Type Description
meta Meta 群通知的消息内容

"onGroupKicked" (meta)

成员被踢出群通知

Kind: event emitted by types

Param Type Description
meta Meta 群通知的消息内容

"onGroupApplyAccepted" (meta)

群申请被通过

Kind: event emitted by types

Param Type Description
meta Meta 群通知的消息内容

"onGroupApplyDeclined" (meta)

群申请被拒绝

Kind: event emitted by types

Param Type Description
meta Meta 群通知的消息内容

"onGroupBaned" (meta)

被群禁言

Kind: event emitted by types

Param Type Description
meta Meta 群通知的消息内容

"onGroupUnbaned" (meta)

被群取消禁言

Kind: event emitted by types

Param Type Description
meta Meta 群通知的消息内容

"onRosterMessageContentAppend" (meta)

收到单聊消息内容追加

Kind: event emitted by types

Param Type Description
meta Meta 好友消息内容追加的消息

"onGroupMessageContentAppend" (meta)

Kind: event emitted by types

Param Type Description
meta Meta 群组消息内容替换的消息

"onRosterMessageReplace" (meta)

Kind: event emitted by types

Param Type Description
meta Meta 好友消息内容替换的消息

"onGroupMessageReplace" (meta)

Kind: event emitted by types

Param Type Description
meta Meta 群组消息内容替换的消息

types~RosterItem : object

好友信息

Kind: inner typedef of types
Properties

Name Type Description
alias string 别名
auth_mode number 验证方式, 0 - 无需验证,任何人可以加为好友, 1 - 需要同意方可加为好友, 2 - 需要回答问题正确方可加为好友, 3 - 拒绝所有加好友申请,int32
auth_question string 验证问题
avatar string 头像
description string 描述信息
ext string 扩展信息
mute_notification boolean 是否接收消息提醒
nick_name string 昵称或名称
public_info string 公开信息,好友和陌生人可见
relation number 关系: 0 - 好友,1 - 被删除,2 - 陌生人, int32
user_id number 好友用户ID,int64
username string 用户名

types~UserSettings : object

用户设置信息

Kind: inner typedef of types
Properties

Name Type Description
auth_answer string 验证问题答案
auth_mode number 验证方式, 0 - 无需验证,任何人可以加为好友, 1 - 需要同意方可加为好友, 2 - 需要回答问题正确方可加为好友, 3 - 拒绝所有加好友申请,int32
auth_question string 验证问题
auto_download boolean 是否自动下载
group_confirm boolean 邀请入群时是否需要用户确认: true - 需要用户同意才可加入, false - 自动同意邀请
id number 用户ID, int64
no_push boolean 是否关闭推送消息
no_push_detail boolean 是否推送详情
no_push_end_hour number 推送免打扰结束时间,int32
no_push_start_hour number 推送免打扰开始时间,int32
no_sounds boolean 收到消息时是否静音
push_nick_name string 推送昵称
push_token string 推送token
silence_end_time number 推送不提醒结束时间,int32
silence_start_time number 推送不提醒开始时间,int32
user_id number 用户ID,int64
vibratory boolean 收到消息时否振动

types~UserProfile : object

用户信息

Kind: inner typedef of types
Properties

Name Type Description
avatar string 头像 url
description string 描述信息
email string 邮箱
mobile string 手机号码
nick_name string 昵称
private_info string 私有信息,仅自己可见
public_info string 公开信息,好友和陌生人可见
user_id number 用户ID,int64
username string 用户名

types~Meta : object

消息体

Kind: inner typedef of types
Properties

Name Type Description
id string 消息ID
from string 发送者
to string 接收者
content string 消息内容
type string 消息类型: text - 文本, image - 图片, audio - 语音, video - 视频,file - 文件, location - 位置, command - 命令, forward - 转发
ext string | object 扩展字段
config string | object SDK扩展字段
attach string | object 附件信息
status number 消息状态: 0 - 未读, 1 - 已投递, 2 - 已读
timestamp string 消息发送时间戳(毫秒)
toType string 接收者类型: roster - 好友, group - 群组

types~RosterApplication : object

加好友申请列表项

Kind: inner typedef of types
Properties

Name Type Description
expired_time number 过期时间,int64
reason string 申请描述
status number 状态: 0 - 等待确认, 1 - 接受, 2 - 拒绝。 int32
user_id number 发起加好友申请的用户ID,int64

types~GroupInfoAndSettings : object

群信息

Kind: inner typedef of types
Properties

Name Type Description
apply_approval number 入群申请审批设置, 0:同意所有申请 1:需要管理员确认 2:拒绝所有申请
avatar string 群头像
ban_expire_time number 全员禁言过期时间(秒),禁言期间只允许管理员发消息, 为0或小于当前时间表示不禁言, -1表示永久禁言
created_at number 创建时间
description string 群描述
ext string 群扩展信息
group_id number 群id,int64
history_visible boolean 新成员可见历史聊天记录设置
member_invite boolean 群成员邀请设置: false - 不允许邀请, true - 允许邀请(默认)
member_modify boolean 群成员修改群信息设置: false - 群成员不能修改群信息(默认), true - 群成员可以修改群信息
msg_mute_mode number 群消息屏蔽模式: 0 - 表示不屏蔽, 1 - 表示屏蔽本地消息通知, 2 - 表示屏蔽消息,不接收消息
msg_push_mode number 群消息推送模式:0 - 接收所有推送,1 - 不接受推送,2 - 接收管理员和@消息推送, 3 - 只接收管理员消息推送, 4 - 只接收@消息推送
name string 群名称
owner_id number 群主id,int64
read_ack boolean 群消息已读功能设置
status number 群状态, 0:正常, 1:已解散
type number 群类型: 1表示公开群,0表示私有群, 2表示聊天室
updated_at number 更新时间,int64
count number 群成员数
capacity number 群容量

types~BriefGroupInfoAndSettings : object

群简要信息及用户设置

Kind: inner typedef of types
Properties

Name Type Description
apply_approval number 入群申请审批设置, 0:同意所有申请 1:需要管理员确认 2:拒绝所有申请
avatar string 群头像
capacity number 群容量
count number 群成员数
group_id number 群id,int64
msg_mute_mode number 群消息屏蔽模式: 0 - 表示不屏蔽, 1 - 表示屏蔽本地消息通知, 2 - 表示屏蔽消息,不接收消息
msg_push_mode number 群消息推送模式:0 - 接收所有推送,1 - 不接受推送,2 - 接收管理员和@消息推送, 3 - 只接收管理员消息推送, 4 - 只接收@消息推送
name string 群名称
owner number 群主id,int64
status number 群状态, 0:正常, 1:已解散,int32
type number 群类型: 1表示公开群,0表示私有群, 2表示聊天室。int32

types~GroupMember : object

群成员格式

Kind: inner typedef of types
Properties

Name Type Description
display_name string 成员群名片
join_time number 成员入群时间,int64
user_id number 用户id,int64
avatar string 头像地址

types~GroupMemberBanned : object

禁言成员

Kind: inner typedef of types
Properties

Name Type Description
display_name string 成员群名片
join_time number 成员入群时间,int64
user_id number 用户id,int64
avatar string 头像地址
expired_time number 禁言过期时间

types~GroupUserRelationResponse : object

群用户请求结果

Kind: inner typedef of types
Properties

Name Type Description
reason string 原因
result string 结果
user_id number 用户ID,int64

types~GroupAnnouncement : object

群公告内容

Kind: inner typedef of types
Properties

Name Type Description
author number 公告发布者,int64
content string 公告内容
created_at number 公告发布时间,int64
group_id number 群id,int64
id number 公告id,int64
title string 公告标题

types~GroupInfoRequest : object

创建群

Kind: inner typedef of types
Properties

Name Type Description
avatar string 群头像
description string 群描述
name string 群名称
type number 群类型 1表示公开群,0表示私有群, 2表示聊天室,int32
user_list Array.<number> 邀请入群的用户id列表

types~GroupBannedMemberRequest : object

禁言请求

Kind: inner typedef of types
Properties

Name Type Description
duration number 禁言时长,单位为分钟,int64
group_id number 群id,int64
user_list Array.<number> 用户id列表

types~GroupBlockedListItem : object

群组黑名单

Kind: inner typedef of types
Properties

Name Type Description
user_id number 用户id,int64
group_id number 群id,int64
create_at string 创建时间

types~GroupInvitation : object

群组邀请信息

Kind: inner typedef of types
Properties

Name Type Description
group_id number 群ID
inviter_id number 邀请者ID
invitee_id number 被邀请者ID
reason string 原因
status number 状态: 0 - 待处理,1 - 用户同意,2 - 用户拒绝
expire_time number 过期时间
create_at string 创建时间

types~GroupApplication : object

群申请信息

Kind: inner typedef of types
Properties

Name Type Description
group_id number 群ID
applicant_id number 申请者ID
reason string 原因
expire_time number 过期时间
status number 状态: 0 - 待处理,1 - 同意,2 - 拒绝

types~GroupSharedFile : object

群共享文件返回格式

Kind: inner typedef of types
Properties

Name Type Description
created_at number int64
file_id number 共享文件id,int64
group_id number 群id,int64
name string 共享文件名称
size number 共享文件大小,int64
type string 共享文件类型
updated_at number int64
uploader number 共享文件上传者,int64
url string 共享文件url

types~GroupSharedFileResponse : object

删除群共享文件结果

Kind: inner typedef of types
Properties

Name Type Description
file_id number 文件ID
reason string 原因
result string 结果

types~GroupBanAllResponse : object

全员禁言结果

Kind: inner typedef of types
Properties

Name Type Description
ban_expire_time number 全员禁言过期时间,int64

types~FileUpload : object

文件上传信息

Kind: inner typedef of types
Properties

Name Type Description
download_url string 下载地址
oss_body_param object.<string, string> 额外参数
upload_url string 上传地址

types~FileUploadResult : object

文件上传结果

Kind: inner typedef of types
Properties

Name Type Description
url string 下载地址

types~fileUploadProgress : function

文件上传进度回调

Kind: inner typedef of types

Param Type Description
res object 进度
res.loaded number 已下载字节数
res.total number 总字节数

types~ConversationItem : object

会话信息

Kind: inner typedef of types
Properties

Name Type Description
id number 会话ID
content string 消息内容
timestamp string 消息发送时间戳(毫秒)
type string 会话类型: roster - 单聊, group - 群聊

types~UserProfile : object

用户信息

Kind: inner typedef of types
Properties

Name Type Description
avatar string 头像 url
description string 描述信息
email string 邮箱
mobile string 手机号码
nick_name string 昵称
private_info string 私有信息,仅自己可见
public_info string 公开信息,好友和陌生人可见
user_id number 用户ID,int64
username string 用户名

types~UserSettings : object

用户设置信息

Kind: inner typedef of types
Properties

Name Type Description
auth_answer string 验证问题答案
auth_mode number 验证方式, 0 - 无需验证,任何人可以加为好友, 1 - 需要同意方可加为好友, 2 - 需要回答问题正确方可加为好友, 3 - 拒绝所有加好友申请,int32
auth_question string 验证问题
auto_download boolean 是否自动下载
group_confirm boolean 邀请入群时是否需要用户确认: true - 需要用户同意才可加入, false - 自动同意邀请
id number 设置ID
no_push boolean 是否关闭推送消息
no_push_detail boolean 是否推送详情
no_push_end_hour number 推送免打扰结束时间,int32
no_push_start_hour number 推送免打扰开始时间,int32
no_sounds boolean 收到消息时是否静音
push_nick_name string 推送昵称
push_token string 推送token
silence_end_time number 推送不提醒结束时间,int32
silence_start_time number 推送不提醒开始时间,int32
user_id number 用户ID,int64
vibratory boolean 收到消息时否振动

types~Event : string

监听事件名称

Kind: inner typedef of types

types~EventCallback : function

监听事件回调

Kind: inner typedef of types

Param Type Description
res flooNotice | flooError | loginFail | loginSuccess | onGroupListUpdate | onGroupMemberChanged | onGroupMessage | onInputStatusMessage | onMentionMessage | onMessageCanceled | onMessageDeleted | onMessageRecalled | onMessageStatusChanged | onReceiveHistoryMsg | onRosterInfoUpdate | onRosterListUpdate | onRosterMessage | onRosterRTCMessage | onSendingMessageStatusChanged | onUnreadChange | recentlistUpdate | onGroupCreated | onGroupDestoryed | onGroupJoined | onGroupApplyAccepted | onGroupApplyDeclined | onGroupBaned | onGroupUnbaned | onRosterMessageContentAppend | onGroupMessageContentAppend | onRosterMessageReplace | onGroupMessageReplace 事件结果
© 2019-2023 美信拓扑 | 官网 该文件修订时间: 2024-03-14 15:59:02

results matching ""

    No results matching ""