藍鶯開發者
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 解說。