消息服务器后台管理客户端代理接口封装对象
- chatGroupAdd
- chatGroupDel
- chatGroupIdByName
- chatGroupList
- chatGroupLoadMembers
- chatGroupSetMembers
- chatGroupUpdate
- login
- logout
- storageClean
- storageClear
- storageConfig
- storageStateSummaryPoll
- systemStateSummaryPoll
- userAdd
- userDel
- userDisable
- userEnable
- userList
- userReset
- userSetPassword
- userStatePoll
- userUpdate
• new IMSAdmAgent(server
, ssl
, onSessionStateUpdate
, sess?
)
构造函数
Name | Type | Description |
---|---|---|
server |
string |
服务器地址:端口 |
ssl |
boolean |
是否采用https协议 |
onSessionStateUpdate |
(up : boolean , err? : string ) => void
|
会话状态更新回调函数 |
sess? |
Session |
可选共享会话对象(统一认证用) |
▸ chatGroupAdd(config
): Promise
<number
>
新建群聊组
Name | Type | Description |
---|---|---|
config |
ChatGroup |
群聊组配置参数 ChatGroup |
Promise
<number
>
群聊组ID
▸ chatGroupDel(ids
): Promise
<void
>
删除群聊组
Name | Type | Description |
---|---|---|
ids |
number [] |
群聊组ID列表 |
Promise
<void
>
▸ chatGroupIdByName(name
): Promise
<number
>
群聊组名称转换为ID
Name | Type | Description |
---|---|---|
name |
string |
群聊组名称 |
Promise
<number
>
群聊组ID
▸ chatGroupList(offset
, rows
, filter?
): Promise
<{ items
: ChatGroup
[] ; total
: number
}>
群聊组分页列表
Name | Type | Description |
---|---|---|
offset |
number |
返回记录起始偏移量 |
rows |
number |
最大返回项目数 |
filter? |
string |
搜索过滤字符串(组名称或拼音首字母) |
Promise
<{ items
: ChatGroup
[] ; total
: number
}>
群聊组总数及分页列表
▸ chatGroupLoadMembers(id
): Promise
<{ id
: string
; name
: string
}[]>
获取群聊组用户成员
Name | Type | Description |
---|---|---|
id |
number |
群聊组ID |
Promise
<{ id
: string
; name
: string
}[]>
群聊用户组成员ID,名称列表
▸ chatGroupSetMembers(id
, userIds
): Promise
<void
>
设置群聊组用户成员
Name | Type | Description |
---|---|---|
id |
number |
群聊组ID |
userIds |
string [] |
用户ID列表 |
Promise
<void
>
▸ chatGroupUpdate(config
): Promise
<void
>
更新群聊组配置
Name | Type | Description |
---|---|---|
config |
ChatGroup |
群聊组ID及配置参数 ChatGroup |
Promise
<void
>
▸ login(acc
, password
, autoRetry
): Promise
<void
>
登录服务器后台
Name | Type | Description |
---|---|---|
acc |
string |
登录账号 |
password |
string |
登录密码 |
autoRetry |
boolean |
会话中断,是否自动登录 |
Promise
<void
>
无
▸ logout(): Promise
<void
>
登出系统
Promise
<void
>
无
▸ storageClean(password
): Promise
<void
>
清理存储空间
Name | Type | Description |
---|---|---|
password |
string |
登录用户密码 |
Promise
<void
>
▸ storageClear(password
): Promise
<void
>
初始化存储空间
Name | Type | Description |
---|---|---|
password |
string |
登录用户密码 |
Promise
<void
>
▸ storageConfig(password
, autoClean
, cleanHourPerDay?
, keepDays?
): Promise
<void
>
配置存储空间管理参数
Name | Type | Description |
---|---|---|
password |
string |
登录用户密码 |
autoClean |
boolean |
后台自动清理 |
cleanHourPerDay? |
number |
每天清理空间时间 |
keepDays? |
number |
历史记录保持天数 |
Promise
<void
>
▸ storageStateSummaryPoll(): Promise
<StorageStateSummary
>
轮询存储状态
Promise
<StorageStateSummary
>
存储状态概览StorageStateSummary
▸ systemStateSummaryPoll(): Promise
<SystemStateSummary
>
轮询系统状态
Promise
<SystemStateSummary
>
系统状态概览SystemStateSummary
▸ userAdd(config
): Promise
<void
>
新建用户
Name | Type | Description |
---|---|---|
config |
User |
用户配置参数 User |
Promise
<void
>
▸ userDel(ids
): Promise
<void
>
批量删除用户
Name | Type | Description |
---|---|---|
ids |
string [] |
用户ID列表 |
Promise
<void
>
▸ userDisable(ids
): Promise
<void
>
禁用用户
Name | Type | Description |
---|---|---|
ids |
string [] |
用户ID列表 |
Promise
<void
>
▸ userEnable(ids
): Promise
<void
>
启用用户
Name | Type | Description |
---|---|---|
ids |
string [] |
用户ID列表 |
Promise
<void
>
▸ userList(offset
, rows
, filter?
): Promise
<ResultOfUserList
>
用户分页列表
Name | Type | Description |
---|---|---|
offset |
number |
返回记录起始偏移量 |
rows |
number |
最大返回项目数 |
filter? |
string |
搜索过滤字符串(用户名称或拼音首字母) |
Promise
<ResultOfUserList
>
用户账号总数及分页列表 ResultOfUserList[]
▸ userReset(ids
): Promise
<void
>
重置用户密码
Name | Type | Description |
---|---|---|
ids |
string [] |
用户ID列表 |
Promise
<void
>
▸ userSetPassword(oldPass
, newPass
): Promise
<void
>
设置当前用户登录密码
Name | Type | Description |
---|---|---|
oldPass |
string |
原密码 |
newPass |
string |
新密码 |
Promise
<void
>
▸ userStatePoll(ids
): Promise
<{ [userId: string]
: UserState
; }>
用户实时状态查询
Name | Type | Description |
---|---|---|
ids |
string [] |
欲查询用户ID列表 |
Promise
<{ [userId: string]
: UserState
; }>
用户登录状态映射表,未登录用户不返回对应项 { [userId: string]: UserState }
▸ userUpdate(config
): Promise
<void
>
更新用户配置
Name | Type | Description |
---|---|---|
config |
User |
用户ID及配置参数 User |
Promise
<void
>
Ƭ ChatGroup: Object
群聊组配置
Name | Type |
---|---|
id? |
number |
name |
string |
Ƭ ResultOfUserList: Object
用户检索列表返回结果数据结构
Name | Type | Description |
---|---|---|
items |
User [] |
用户项目列表(offset,rows范围) |
total |
number |
满足检索条件用户项目总数 |
Ƭ StorageStateSummary: Object
数据存储状态配置
Name | Type | Description |
---|---|---|
recordTotalTime |
string |
录音净时长总计 |
remainDuration |
string |
剩余可存储时长 |
storageAutoClean |
boolean |
硬盘是否自动清理 |
storageAutoCleanTimePerDay |
number |
硬盘自动清理时间 |
storageKeepDays |
number |
历史存储记录保存天数 |
storageTotal |
number |
数据硬盘总容量 |
storageUsed |
number |
数据硬盘占用 |
storedDuration |
string |
记录已存储时长 |
Ƭ SystemStateSummary: Object
系统状态概览数据结构
Name | Type | Description |
---|---|---|
conferenceTotal |
number |
占用会议室总数 |
partyTotal |
number |
会议授权总方数 |
partyUsed |
number |
会议占用总方数 |
system |
{ cpuUsed : number ; memoryTotal : number ; memoryUsed : number ; storageTotal : number ; storageUsed : number } |
系统资源 |
system.cpuUsed |
number |
CPU占用 |
system.memoryTotal |
number |
内存总数 |
system.memoryUsed |
number |
内存占用 |
system.storageTotal |
number |
数据硬盘总容量 |
system.storageUsed |
number |
数据硬盘占用 |
Ƭ User: Object
用户账号
Name | Type | Description |
---|---|---|
createTime? |
string | Date
|
创建时间 |
enabled |
boolean |
是否启用 |
id |
string |
登录ID |
name |
string |
名称 |
Ƭ UserState: Object
用户登录状态
Name | Type | Description |
---|---|---|
ipAddr |
string |
终端IP地址 |
loginDuration |
string |
登录时长 |
loginTime |
string |
登录时间 |