npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

ufimsadmapi

v1.0.3

Published

ufimserver administration API

Downloads

3

Readme

Classes

Class: IMSAdmAgent

消息服务器后台管理客户端代理接口封装对象

Table of contents

Constructors

Methods

Constructors

constructor

new IMSAdmAgent(server, ssl, onSessionStateUpdate, sess?)

构造函数

Parameters

| Name | Type | Description | | :------ | :------ | :------ | | server | string | 服务器地址:端口 | | ssl | boolean | 是否采用https协议 | | onSessionStateUpdate | (up: boolean, err?: string) => void | 会话状态更新回调函数 | | sess? | Session | 可选共享会话对象(统一认证用) |

Methods

chatGroupAdd

chatGroupAdd(config): Promise<number>

新建群聊组

Parameters

| Name | Type | Description | | :------ | :------ | :------ | | config | ChatGroup | 群聊组配置参数 ChatGroup |

Returns

Promise<number>

群聊组ID


chatGroupDel

chatGroupDel(ids): Promise<void>

删除群聊组

Parameters

| Name | Type | Description | | :------ | :------ | :------ | | ids | number[] | 群聊组ID列表 |

Returns

Promise<void>


chatGroupIdByName

chatGroupIdByName(name): Promise<number>

群聊组名称转换为ID

Parameters

| Name | Type | Description | | :------ | :------ | :------ | | name | string | 群聊组名称 |

Returns

Promise<number>

群聊组ID


chatGroupList

chatGroupList(offset, rows, filter?): Promise<{ items: ChatGroup[] ; total: number }>

群聊组分页列表

Parameters

| Name | Type | Description | | :------ | :------ | :------ | | offset | number | 返回记录起始偏移量 | | rows | number | 最大返回项目数 | | filter? | string | 搜索过滤字符串(组名称或拼音首字母) |

Returns

Promise<{ items: ChatGroup[] ; total: number }>

群聊组总数及分页列表


chatGroupLoadMembers

chatGroupLoadMembers(id): Promise<{ id: string ; name: string }[]>

获取群聊组用户成员

Parameters

| Name | Type | Description | | :------ | :------ | :------ | | id | number | 群聊组ID |

Returns

Promise<{ id: string ; name: string }[]>

群聊用户组成员ID,名称列表


chatGroupSetMembers

chatGroupSetMembers(id, userIds): Promise<void>

设置群聊组用户成员

Parameters

| Name | Type | Description | | :------ | :------ | :------ | | id | number | 群聊组ID | | userIds | string[] | 用户ID列表 |

Returns

Promise<void>


chatGroupUpdate

chatGroupUpdate(config): Promise<void>

更新群聊组配置

Parameters

| Name | Type | Description | | :------ | :------ | :------ | | config | ChatGroup | 群聊组ID及配置参数 ChatGroup |

Returns

Promise<void>


login

login(acc, password, autoRetry): Promise<void>

登录服务器后台

Parameters

| Name | Type | Description | | :------ | :------ | :------ | | acc | string | 登录账号 | | password | string | 登录密码 | | autoRetry | boolean | 会话中断,是否自动登录 |

Returns

Promise<void>


logout

logout(): Promise<void>

登出系统

Returns

Promise<void>


storageClean

storageClean(password): Promise<void>

清理存储空间

Parameters

| Name | Type | Description | | :------ | :------ | :------ | | password | string | 登录用户密码 |

Returns

Promise<void>


storageClear

storageClear(password): Promise<void>

初始化存储空间

Parameters

| Name | Type | Description | | :------ | :------ | :------ | | password | string | 登录用户密码 |

Returns

Promise<void>


storageConfig

storageConfig(password, autoClean, cleanHourPerDay?, keepDays?): Promise<void>

配置存储空间管理参数

Parameters

| Name | Type | Description | | :------ | :------ | :------ | | password | string | 登录用户密码 | | autoClean | boolean | 后台自动清理 | | cleanHourPerDay? | number | 每天清理空间时间 | | keepDays? | number | 历史记录保持天数 |

Returns

Promise<void>


storageStateSummaryPoll

storageStateSummaryPoll(): Promise<StorageStateSummary>

轮询存储状态

Returns

Promise<StorageStateSummary>

存储状态概览StorageStateSummary


systemStateSummaryPoll

systemStateSummaryPoll(): Promise<SystemStateSummary>

轮询系统状态

Returns

Promise<SystemStateSummary>

系统状态概览SystemStateSummary


userAdd

userAdd(config): Promise<void>

新建用户

Parameters

| Name | Type | Description | | :------ | :------ | :------ | | config | User | 用户配置参数 User |

Returns

Promise<void>


userDel

userDel(ids): Promise<void>

批量删除用户

Parameters

| Name | Type | Description | | :------ | :------ | :------ | | ids | string[] | 用户ID列表 |

Returns

Promise<void>


userDisable

userDisable(ids): Promise<void>

禁用用户

Parameters

| Name | Type | Description | | :------ | :------ | :------ | | ids | string[] | 用户ID列表 |

Returns

Promise<void>


userEnable

userEnable(ids): Promise<void>

启用用户

Parameters

| Name | Type | Description | | :------ | :------ | :------ | | ids | string[] | 用户ID列表 |

Returns

Promise<void>


userList

userList(offset, rows, filter?): Promise<ResultOfUserList>

用户分页列表

Parameters

| Name | Type | Description | | :------ | :------ | :------ | | offset | number | 返回记录起始偏移量 | | rows | number | 最大返回项目数 | | filter? | string | 搜索过滤字符串(用户名称或拼音首字母) |

Returns

Promise<ResultOfUserList>

用户账号总数及分页列表 ResultOfUserList[]


userReset

userReset(ids): Promise<void>

重置用户密码

Parameters

| Name | Type | Description | | :------ | :------ | :------ | | ids | string[] | 用户ID列表 |

Returns

Promise<void>


userSetPassword

userSetPassword(oldPass, newPass): Promise<void>

设置当前用户登录密码

Parameters

| Name | Type | Description | | :------ | :------ | :------ | | oldPass | string | 原密码 | | newPass | string | 新密码 |

Returns

Promise<void>


userStatePoll

userStatePoll(ids): Promise<{ [userId: string]: UserState; }>

用户实时状态查询

Parameters

| Name | Type | Description | | :------ | :------ | :------ | | ids | string[] | 欲查询用户ID列表 |

Returns

Promise<{ [userId: string]: UserState; }>

用户登录状态映射表,未登录用户不返回对应项 { [userId: string]: UserState }


userUpdate

userUpdate(config): Promise<void>

更新用户配置

Parameters

| Name | Type | Description | | :------ | :------ | :------ | | config | User | 用户ID及配置参数 User |

Returns

Promise<void>

ufimsadmapi

Table of contents

Classes

Type Aliases

Type Aliases

ChatGroup

Ƭ ChatGroup: Object

群聊组配置

Type declaration

| Name | Type | | :------ | :------ | | id? | number | | name | string |


ResultOfUserList

Ƭ ResultOfUserList: Object

用户检索列表返回结果数据结构

Type declaration

| Name | Type | Description | | :------ | :------ | :------ | | items | User[] | 用户项目列表(offset,rows范围) | | total | number | 满足检索条件用户项目总数 |


StorageStateSummary

Ƭ StorageStateSummary: Object

数据存储状态配置

Type declaration

| Name | Type | Description | | :------ | :------ | :------ | | recordTotalTime | string | 录音净时长总计 | | remainDuration | string | 剩余可存储时长 | | storageAutoClean | boolean | 硬盘是否自动清理 | | storageAutoCleanTimePerDay | number | 硬盘自动清理时间 | | storageKeepDays | number | 历史存储记录保存天数 | | storageTotal | number | 数据硬盘总容量 | | storageUsed | number | 数据硬盘占用 | | storedDuration | string | 记录已存储时长 |


SystemStateSummary

Ƭ SystemStateSummary: Object

系统状态概览数据结构

Type declaration

| 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

Ƭ User: Object

用户账号

Type declaration

| Name | Type | Description | | :------ | :------ | :------ | | createTime? | string | Date | 创建时间 | | enabled | boolean | 是否启用 | | id | string | 登录ID | | name | string | 名称 |


UserState

Ƭ UserState: Object

用户登录状态

Type declaration

| Name | Type | Description | | :------ | :------ | :------ | | ipAddr | string | 终端IP地址 | | loginDuration | string | 登录时长 | | loginTime | string | 登录时间 |