蓝莺开发者
Web & Mini ProgramiOSAndroidC++Server API

types#

types#

"flooNotice" (res)#

Floo通知

Kind: event emitted by types

ParamTypeDescription
resobject结果
res.categorystring类别
res.descstring描述

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

ParamTypeDescription
resobject
res.categorystring类别
res.descstring描述

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

ParamTypeDescription
descstring失败原因

"loginSuccess" (res)#

登录成功

Kind: event emitted by types

ParamTypeDescription
resobject空对象

"onGroupListUpdate" (meta)#

群列表更新

Kind: event emitted by types

ParamTypeDescription
metaMeta | undefined通知消息内容

"onGroupMemberChanged" (groupId)#

群成员列表更新

Kind: event emitted by types

ParamTypeDescription
groupIdnumber群ID

"onGroupMessage" (meta)#

收到群消息

Kind: event emitted by types

ParamTypeDescription
metaMeta消息内容

"onInputStatusMessage" (res)#

对方正在输入

Kind: event emitted by types

ParamTypeDescription
resobject
res.extstring扩展字段
res.fromstring发送者用户ID
res.tostring接收者用户ID

"onMentionMessage" (meta)#

收到群组@消息

Kind: event emitted by types

ParamTypeDescription
metaMeta消息内容

"onMessageCanceled" (res)#

消息被取消已读

Kind: event emitted by types

ParamTypeDescription
resobject
res.uidstring会话ID
res.midstring消息ID

"onMessageDeleted" (res)#

消息被删除

Kind: event emitted by types

ParamTypeDescription
resobject
res.uidstring会话ID
res.midstring消息ID

"onMessageRecalled" (res)#

消息被撤回

Kind: event emitted by types

ParamTypeDescription
resobject
res.uidstring会话ID
res.midstring消息ID

"onMessageStatusChanged" (res)#

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

Kind: event emitted by types

ParamTypeDescription
resobject
res.uidstring会话ID
res.midstring消息ID

"onReceiveHistoryMsg" (res)#

收到历史消息

Kind: event emitted by types

ParamTypeDescription
resobject
res.nextnumber下次取历史消息的key

"onRosterInfoUpdate" (res)#

好友信息变更

Kind: event emitted by types

ParamTypeDescription
resobject
res.rosterIdsArray.<number>好友的用户ID列表

"onRosterListUpdate" (meta)#

好友列表变更

Kind: event emitted by types

ParamTypeDescription
metaMeta好友通知的消息内容

"onRosterApplied" (meta)#

收到好友申请

Kind: event emitted by types

ParamTypeDescription
metaMeta好友申请的消息内容

"onRosterMessage" (meta)#

收到单聊消息

Kind: event emitted by types

ParamTypeDescription
metaMeta消息内容

"onRosterRTCMessage" (meta)#

收到单聊RTC消息

Kind: event emitted by types

ParamTypeDescription
metaMeta消息内容

"onSendingMessageStatusChanged" (res)#

消息发送状态变更

Kind: event emitted by types

ParamTypeDescription
resobject
res.status:number发送状态,取值为sendingfailedsent
res.mid:number客户端生成的client_mid

"onUnreadChange" (cid)#

未读数改变

Kind: event emitted by types

ParamTypeDescription
cidnumber会话ID

"recentlistUpdate"#

最近会话更新

Kind: event emitted by types

"onGroupCreated" (meta)#

群组创建通知

Kind: event emitted by types

ParamTypeDescription
metaMeta群通知的消息内容

"onGroupDestoryed" (meta)#

群组解散通知

Kind: event emitted by types

ParamTypeDescription
metaMeta群通知的消息内容

"onGroupJoined" (meta)#

成员入群通知

Kind: event emitted by types

ParamTypeDescription
metaMeta群通知的消息内容

"onGroupLeaved" (meta)#

成员退群通知

Kind: event emitted by types

ParamTypeDescription
metaMeta群通知的消息内容

"onGroupKicked" (meta)#

成员被踢出群通知

Kind: event emitted by types

ParamTypeDescription
metaMeta群通知的消息内容

"onGroupApplyAccepted" (meta)#

群申请被通过

Kind: event emitted by types

ParamTypeDescription
metaMeta群通知的消息内容

"onGroupApplyDeclined" (meta)#

群申请被拒绝

Kind: event emitted by types

ParamTypeDescription
metaMeta群通知的消息内容

"onGroupBaned" (meta)#

被群禁言

Kind: event emitted by types

ParamTypeDescription
metaMeta群通知的消息内容

"onGroupUnbaned" (meta)#

被群取消禁言

Kind: event emitted by types

ParamTypeDescription
metaMeta群通知的消息内容

"onRosterMessageContentAppend" (meta)#

收到单聊消息内容追加

Kind: event emitted by types

ParamTypeDescription
metaMeta好友消息内容追加的消息

"onGroupMessageContentAppend" (meta)#

Kind: event emitted by types

ParamTypeDescription
metaMeta群组消息内容替换的消息

"onRosterMessageReplace" (meta)#

Kind: event emitted by types

ParamTypeDescription
metaMeta好友消息内容替换的消息

"onGroupMessageReplace" (meta)#

Kind: event emitted by types

ParamTypeDescription
metaMeta群组消息内容替换的消息

types~RosterItem : object#

好友信息

Kind: inner typedef of types
Properties

NameTypeDescription
aliasstring别名
auth_modenumber验证方式, 0 - 无需验证,任何人可以加为好友, 1 - 需要同意方可加为好友, 2 - 需要回答问题正确方可加为好友, 3 - 拒绝所有加好友申请,int32
auth_questionstring验证问题
avatarstring头像
descriptionstring描述信息
extstring扩展信息
mute_notificationboolean是否接收消息提醒
nick_namestring昵称或名称
public_infostring公开信息,好友和陌生人可见
relationnumber关系: 0 - 好友,1 - 被删除,2 - 陌生人, int32
user_idnumber好友用户ID,int64
usernamestring用户名

types~UserSettings : object#

用户设置信息

Kind: inner typedef of types
Properties

NameTypeDescription
auth_answerstring验证问题答案
auth_modenumber验证方式, 0 - 无需验证,任何人可以加为好友, 1 - 需要同意方可加为好友, 2 - 需要回答问题正确方可加为好友, 3 - 拒绝所有加好友申请,int32
auth_questionstring验证问题
auto_downloadboolean是否自动下载
group_confirmboolean邀请入群时是否需要用户确认: true - 需要用户同意才可加入, false - 自动同意邀请
idnumber用户ID, int64
no_pushboolean是否关闭推送消息
no_push_detailboolean是否推送详情
no_push_end_hournumber推送免打扰结束时间,int32
no_push_start_hournumber推送免打扰开始时间,int32
no_soundsboolean收到消息时是否静音
push_nick_namestring推送昵称
push_tokenstring推送token
silence_end_timenumber推送不提醒结束时间,int32
silence_start_timenumber推送不提醒开始时间,int32
user_idnumber用户ID,int64
vibratoryboolean收到消息时否振动

types~UserProfile : object#

用户信息

Kind: inner typedef of types
Properties

NameTypeDescription
avatarstring头像 url
descriptionstring描述信息
emailstring邮箱
mobilestring手机号码
nick_namestring昵称
private_infostring私有信息,仅自己可见
public_infostring公开信息,好友和陌生人可见
user_idnumber用户ID,int64
usernamestring用户名

types~Meta : object#

消息体

Kind: inner typedef of types
Properties

NameTypeDescription
idstring消息ID
fromstring发送者
tostring接收者
contentstring消息内容
typestring消息类型: text - 文本, image - 图片, audio - 语音, video - 视频,file - 文件, location - 位置, command - 命令, forward - 转发
extstring | object扩展字段
configstring | objectSDK扩展字段
attachstring | object附件信息
statusnumber消息状态: 0 - 未读, 1 - 已投递, 2 - 已读
timestampstring消息发送时间戳(毫秒)
toTypestring接收者类型: roster - 好友, group - 群组

types~RosterApplication : object#

加好友申请列表项

Kind: inner typedef of types
Properties

NameTypeDescription
expired_timenumber过期时间,int64
reasonstring申请描述
statusnumber状态: 0 - 等待确认, 1 - 接受, 2 - 拒绝。 int32
user_idnumber发起加好友申请的用户ID,int64

types~GroupInfoAndSettings : object#

群信息

Kind: inner typedef of types
Properties

NameTypeDescription
apply_approvalnumber入群申请审批设置, 0:同意所有申请 1:需要管理员确认 2:拒绝所有申请
avatarstring群头像
ban_expire_timenumber全员禁言过期时间(秒),禁言期间只允许管理员发消息, 为0或小于当前时间表示不禁言, -1表示永久禁言
created_atnumber创建时间
descriptionstring群描述
extstring群扩展信息
group_idnumber群id,int64
history_visibleboolean新成员可见历史聊天记录设置
member_inviteboolean群成员邀请设置: false - 不允许邀请, true - 允许邀请(默认)
member_modifyboolean群成员修改群信息设置: false - 群成员不能修改群信息(默认), true - 群成员可以修改群信息
msg_mute_modenumber群消息屏蔽模式: 0 - 表示不屏蔽, 1 - 表示屏蔽本地消息通知, 2 - 表示屏蔽消息,不接收消息
msg_push_modenumber群消息推送模式:0 - 接收所有推送,1 - 不接受推送,2 - 接收管理员和@消息推送, 3 - 只接收管理员消息推送, 4 - 只接收@消息推送
namestring群名称
owner_idnumber群主id,int64
read_ackboolean群消息已读功能设置
statusnumber群状态, 0:正常, 1:已解散
typenumber群类型: 1表示公开群,0表示私有群, 2表示聊天室
updated_atnumber更新时间,int64
countnumber群成员数
capacitynumber群容量

types~BriefGroupInfoAndSettings : object#

群简要信息及用户设置

Kind: inner typedef of types
Properties

NameTypeDescription
apply_approvalnumber入群申请审批设置, 0:同意所有申请 1:需要管理员确认 2:拒绝所有申请
avatarstring群头像
capacitynumber群容量
countnumber群成员数
group_idnumber群id,int64
msg_mute_modenumber群消息屏蔽模式: 0 - 表示不屏蔽, 1 - 表示屏蔽本地消息通知, 2 - 表示屏蔽消息,不接收消息
msg_push_modenumber群消息推送模式:0 - 接收所有推送,1 - 不接受推送,2 - 接收管理员和@消息推送, 3 - 只接收管理员消息推送, 4 - 只接收@消息推送
namestring群名称
ownernumber群主id,int64
statusnumber群状态, 0:正常, 1:已解散,int32
typenumber群类型: 1表示公开群,0表示私有群, 2表示聊天室。int32

types~GroupMember : object#

群成员格式

Kind: inner typedef of types
Properties

NameTypeDescription
display_namestring成员群名片
join_timenumber成员入群时间,int64
user_idnumber用户id,int64
avatarstring头像地址

types~GroupMemberBanned : object#

禁言成员

Kind: inner typedef of types
Properties

NameTypeDescription
display_namestring成员群名片
join_timenumber成员入群时间,int64
user_idnumber用户id,int64
avatarstring头像地址
expired_timenumber禁言过期时间

types~GroupUserRelationResponse : object#

群用户请求结果

Kind: inner typedef of types
Properties

NameTypeDescription
reasonstring原因
resultstring结果
user_idnumber用户ID,int64

types~GroupAnnouncement : object#

群公告内容

Kind: inner typedef of types
Properties

NameTypeDescription
authornumber公告发布者,int64
contentstring公告内容
created_atnumber公告发布时间,int64
group_idnumber群id,int64
idnumber公告id,int64
titlestring公告标题

types~GroupInfoRequest : object#

创建群

Kind: inner typedef of types
Properties

NameTypeDescription
avatarstring群头像
descriptionstring群描述
namestring群名称
typenumber群类型 1表示公开群,0表示私有群, 2表示聊天室,int32
user_listArray.<number>邀请入群的用户id列表

types~GroupBannedMemberRequest : object#

禁言请求

Kind: inner typedef of types
Properties

NameTypeDescription
durationnumber禁言时长,单位为分钟,int64
group_idnumber群id,int64
user_listArray.<number>用户id列表

types~GroupBlockedListItem : object#

群组黑名单

Kind: inner typedef of types
Properties

NameTypeDescription
user_idnumber用户id,int64
group_idnumber群id,int64
create_atstring创建时间

types~GroupInvitation : object#

群组邀请信息

Kind: inner typedef of types
Properties

NameTypeDescription
group_idnumber群ID
inviter_idnumber邀请者ID
invitee_idnumber被邀请者ID
reasonstring原因
statusnumber状态: 0 - 待处理,1 - 用户同意,2 - 用户拒绝
expire_timenumber过期时间
create_atstring创建时间

types~GroupApplication : object#

群申请信息

Kind: inner typedef of types
Properties

NameTypeDescription
group_idnumber群ID
applicant_idnumber申请者ID
reasonstring原因
expire_timenumber过期时间
statusnumber状态: 0 - 待处理,1 - 同意,2 - 拒绝

types~GroupSharedFile : object#

群共享文件返回格式

Kind: inner typedef of types
Properties

NameTypeDescription
created_atnumberint64
file_idnumber共享文件id,int64
group_idnumber群id,int64
namestring共享文件名称
sizenumber共享文件大小,int64
typestring共享文件类型
updated_atnumberint64
uploadernumber共享文件上传者,int64
urlstring共享文件url

types~GroupSharedFileResponse : object#

删除群共享文件结果

Kind: inner typedef of types
Properties

NameTypeDescription
file_idnumber文件ID
reasonstring原因
resultstring结果

types~GroupBanAllResponse : object#

全员禁言结果

Kind: inner typedef of types
Properties

NameTypeDescription
ban_expire_timenumber全员禁言过期时间,int64

types~FileUpload : object#

文件上传信息

Kind: inner typedef of types
Properties

NameTypeDescription
download_urlstring下载地址
oss_body_paramobject.<string, string>额外参数
upload_urlstring上传地址

types~FileUploadResult : object#

文件上传结果

Kind: inner typedef of types
Properties

NameTypeDescription
urlstring下载地址

types~fileUploadProgress : function#

文件上传进度回调

Kind: inner typedef of types

ParamTypeDescription
resobject进度
res.loadednumber已下载字节数
res.totalnumber总字节数

types~ConversationItem : object#

会话信息

Kind: inner typedef of types
Properties

NameTypeDescription
idnumber会话ID
contentstring消息内容
timestampstring消息发送时间戳(毫秒)
typestring会话类型: roster - 单聊, group - 群聊

types~UserProfile : object#

用户信息

Kind: inner typedef of types
Properties

NameTypeDescription
avatarstring头像 url
descriptionstring描述信息
emailstring邮箱
mobilestring手机号码
nick_namestring昵称
private_infostring私有信息,仅自己可见
public_infostring公开信息,好友和陌生人可见
user_idnumber用户ID,int64
usernamestring用户名

types~UserSettings : object#

用户设置信息

Kind: inner typedef of types
Properties

NameTypeDescription
auth_answerstring验证问题答案
auth_modenumber验证方式, 0 - 无需验证,任何人可以加为好友, 1 - 需要同意方可加为好友, 2 - 需要回答问题正确方可加为好友, 3 - 拒绝所有加好友申请,int32
auth_questionstring验证问题
auto_downloadboolean是否自动下载
group_confirmboolean邀请入群时是否需要用户确认: true - 需要用户同意才可加入, false - 自动同意邀请
idnumber设置ID
no_pushboolean是否关闭推送消息
no_push_detailboolean是否推送详情
no_push_end_hournumber推送免打扰结束时间,int32
no_push_start_hournumber推送免打扰开始时间,int32
no_soundsboolean收到消息时是否静音
push_nick_namestring推送昵称
push_tokenstring推送token
silence_end_timenumber推送不提醒结束时间,int32
silence_start_timenumber推送不提醒开始时间,int32
user_idnumber用户ID,int64
vibratoryboolean收到消息时否振动

types~Event : string#

监听事件名称

Kind: inner typedef of types

types~EventCallback : function#

监听事件回调

Kind: inner typedef of types

自动生成的 API 内容,仅在必要位置补充精简的 AI 解释。