-
Notifications
You must be signed in to change notification settings - Fork 2
nim.sysmsg.NIMSysMsg
nim/sysmsg.NIMSysMsg
-
EventEmitter
<NIMSysMsgEvents
>↳
NIMSysMsg
- eventNames
- listeners
- listenerCount
- emit
- on
- addListener
- once
- removeListener
- off
- removeAllListeners
- initEventHandlers
- sendCustomNotificationMsg
- queryMsgAsync
- queryUnreadCount
- setStatusAsync
- readAllAsync
- deleteAsync
- deleteAllAsync
- setStatusByTypeAsync
- deleteByTypeAsync
▸ eventNames(): keyof NIMSysMsgEvents
[]
Return an array listing the events for which the emitter has registered listeners.
keyof NIMSysMsgEvents
[]
EventEmitter.eventNames
node_modules/eventemitter3/index.d.ts:15
▸ listeners<T
>(event
): (...args
: ArgumentMap
<NIMSysMsgEvents
>[Extract
<T
, keyof NIMSysMsgEvents
>]) => void
[]
Return the listeners registered for a given event.
Name | Type |
---|---|
T |
extends keyof NIMSysMsgEvents
|
Name | Type |
---|---|
event |
T |
(...args
: ArgumentMap
<NIMSysMsgEvents
>[Extract
<T
, keyof NIMSysMsgEvents
>]) => void
[]
EventEmitter.listeners
node_modules/eventemitter3/index.d.ts:20
▸ listenerCount(event
): number
Return the number of listeners listening to a given event.
Name | Type |
---|---|
event |
keyof NIMSysMsgEvents
|
number
EventEmitter.listenerCount
node_modules/eventemitter3/index.d.ts:27
▸ emit<T
>(event
, ...args
): boolean
Calls each of the listeners registered for a given event.
Name | Type |
---|---|
T |
extends keyof NIMSysMsgEvents
|
Name | Type |
---|---|
event |
T |
...args |
ArgumentMap <NIMSysMsgEvents >[Extract <T , keyof NIMSysMsgEvents >] |
boolean
EventEmitter.emit
node_modules/eventemitter3/index.d.ts:32
▸ on<T
>(event
, fn
, context?
): NIMSysMsg
Add a listener for a given event.
Name | Type |
---|---|
T |
extends keyof NIMSysMsgEvents
|
Name | Type |
---|---|
event |
T |
fn |
(...args : ArgumentMap <NIMSysMsgEvents >[Extract <T , keyof NIMSysMsgEvents >]) => void
|
context? |
any |
EventEmitter.on
node_modules/eventemitter3/index.d.ts:40
▸ addListener<T
>(event
, fn
, context?
): NIMSysMsg
Name | Type |
---|---|
T |
extends keyof NIMSysMsgEvents
|
Name | Type |
---|---|
event |
T |
fn |
(...args : ArgumentMap <NIMSysMsgEvents >[Extract <T , keyof NIMSysMsgEvents >]) => void
|
context? |
any |
EventEmitter.addListener
node_modules/eventemitter3/index.d.ts:45
▸ once<T
>(event
, fn
, context?
): NIMSysMsg
Add a one-time listener for a given event.
Name | Type |
---|---|
T |
extends keyof NIMSysMsgEvents
|
Name | Type |
---|---|
event |
T |
fn |
(...args : ArgumentMap <NIMSysMsgEvents >[Extract <T , keyof NIMSysMsgEvents >]) => void
|
context? |
any |
EventEmitter.once
node_modules/eventemitter3/index.d.ts:54
▸ removeListener<T
>(event
, fn?
, context?
, once?
): NIMSysMsg
Remove the listeners of a given event.
Name | Type |
---|---|
T |
extends keyof NIMSysMsgEvents
|
Name | Type |
---|---|
event |
T |
fn? |
(...args : ArgumentMap <NIMSysMsgEvents >[Extract <T , keyof NIMSysMsgEvents >]) => void
|
context? |
any |
once? |
boolean |
EventEmitter.removeListener
node_modules/eventemitter3/index.d.ts:63
▸ off<T
>(event
, fn?
, context?
, once?
): NIMSysMsg
Name | Type |
---|---|
T |
extends keyof NIMSysMsgEvents
|
Name | Type |
---|---|
event |
T |
fn? |
(...args : ArgumentMap <NIMSysMsgEvents >[Extract <T , keyof NIMSysMsgEvents >]) => void
|
context? |
any |
once? |
boolean |
EventEmitter.off
node_modules/eventemitter3/index.d.ts:69
▸ removeAllListeners(event?
): NIMSysMsg
Remove all listeners, or those of the specified event.
Name | Type |
---|---|
event? |
keyof NIMSysMsgEvents
|
EventEmitter.removeAllListeners
node_modules/eventemitter3/index.d.ts:79
▸ initEventHandlers(): void
注册全局回调
void
ts/nim/sysmsg.ts:30
▸ sendCustomNotificationMsg(msg
): void
发送自定义通知消息
Name | Type |
---|---|
msg |
SysMessage |
void
void 无返回值
ts/nim/sysmsg.ts:38
▸ queryMsgAsync(limit_count
, last_time
, cb
, jsonExtension
): Promise
<null
| [number
, number
, SysMessage
[]]>
查询本地系统消息
Name | Type | Description |
---|---|---|
limit_count |
number |
一次查询数量,建议20 |
last_time |
number |
上次查询最后一条消息的时间戳 |
cb |
null | QuerySysmsgCallback
|
查询本地系统消息的回调函数 |
jsonExtension |
string |
json扩展参数(备用,目前不需要) |
Promise
<null
| [number
, number
, SysMessage
[]]>
boolean 检查参数如果不符合要求则返回失败
ts/nim/sysmsg.ts:49
▸ queryUnreadCount(cb
, jsonExtension
): Promise
<[NIMResCode
, number
]>
查询未读消息数
Note
200:成功
Name | Type | Description |
---|---|---|
cb |
null | NotifySysmsgResCallback
|
查询未读消息数的回调函数 |
jsonExtension |
string |
json扩展参数(备用,目前不需要) |
Promise
<[NIMResCode
, number
]>
void 无返回值
ts/nim/sysmsg.ts:83
▸ setStatusAsync(msg_id
, status
, cb
, jsonExtension
): Promise
<null
| [NIMResCode
, number
, number
]>
设置消息状态
Note
200:成功
Name | Type | Description |
---|---|---|
msg_id |
string |
消息id |
status |
NIMSysMsgStatus |
消息状态 |
cb |
null | NotifySingleSysmsgCallback
|
设置消息状态的回调函数 |
jsonExtension |
string |
json扩展参数(备用,目前不需要) |
Promise
<null
| [NIMResCode
, number
, number
]>
void 无返回值
ts/nim/sysmsg.ts:105
▸ readAllAsync(cb
, jsonExtension
): Promise
<[NIMResCode
, number
]>
设置全部消息为已读
Note
200:成功
Name | Type | Description |
---|---|---|
cb |
null | NotifySysmsgResCallback
|
设置全部消息为已读的回调函数 |
jsonExtension |
string |
json扩展参数(备用,目前不需要) |
Promise
<[NIMResCode
, number
]>
void 无返回值
ts/nim/sysmsg.ts:139
▸ deleteAsync(msg_id
, cb
, jsonExtension
): Promise
<null
| [NIMResCode
, number
, number
]>
删除消息
Note
200:成功
Name | Type | Description |
---|---|---|
msg_id |
string |
消息id |
cb |
null | NotifySingleSysmsgCallback
|
删除消息的回调函数 |
jsonExtension |
string |
json扩展参数(备用,目前不需要) |
Promise
<null
| [NIMResCode
, number
, number
]>
boolean 检查参数如果不符合要求则返回失败
ts/nim/sysmsg.ts:160
▸ deleteAllAsync(cb
, jsonExtension
): Promise
<null
| [NIMResCode
, number
]>
全部删除
Note
200:成功
Name | Type | Description |
---|---|---|
cb |
null | NotifySysmsgResCallback
|
删除消息的回调函数 |
jsonExtension |
string |
json扩展参数(备用,目前不需要) |
Promise
<null
| [NIMResCode
, number
]>
void 无返回值
ts/nim/sysmsg.ts:188
▸ setStatusByTypeAsync(type
, status
, cb
, jsonExtension
): Promise
<null
| [NIMResCode
, number
]>
按类型设置系统通知状态
Note
200:成功
Name | Type | Description |
---|---|---|
type |
NIMSysMsgType |
类型 |
status |
NIMSysMsgStatus |
状态 |
cb |
null | NotifySysmsgResCallback
|
回调函数 |
jsonExtension |
string |
json扩展参数(备用,目前不需要) |
Promise
<null
| [NIMResCode
, number
]>
void 无返回值
ts/nim/sysmsg.ts:214
▸ deleteByTypeAsync(type
, cb
, jsonExtension
): Promise
<null
| [NIMResCode
, number
]>
按类型删除系统通知
Note
200:成功
Name | Type | Description |
---|---|---|
type |
NIMSysMsgType |
类型 |
cb |
null | NotifySysmsgResCallback
|
回调函数 |
jsonExtension |
string |
json扩展参数(备用,目前不需要) |
Promise
<null
| [NIMResCode
, number
]>
void 无返回值
ts/nim/sysmsg.ts:249
• sysmsg: NIMSysMsgAPI
ts/nim/sysmsg.ts:23
• new NIMSysMsg()
EventEmitter<NIMSysMsgEvents>.constructor
ts/nim/sysmsg.ts:24
- chatroom/chatroom
- chatroom_def/chatroom_def
- nim/client
- nim/data_sync
- nim/friend
- nim/global
- nim/msglog
- nim/nos
- nim/online_session
- nim/pass_through_proxy
- nim/plugin
- nim/session
- nim/subscribe_event
- nim/super_team
- nim/sysmsg
- nim/talk
- nim/talkex
- nim/team
- nim/tool
- nim/user
- nim_def/client_def
- nim_def/data_sync_def
- nim_def/doc_trans_def
- nim_def/friend_def
- nim_def/global_def
- nim_def/msglog_def
- nim_def/nos_def
- nim_def/online_session_def
- nim_def/pass_through_proxy_def
- nim_def/plugin_def
- nim_def/session_def
- nim_def/subscribe_event_def
- nim_def/super_team_def
- nim_def/sysmsg_def
- nim_def/talk_def
- nim_def/talkex_def
- nim_def/team_def
- nim_def/tool_def
- nim_def/user_def
- node-nim
- qchat/attachment
- qchat/channel
- qchat/channel_category
- qchat/instance
- qchat/message
- qchat/role
- qchat/server
- qchat/system_notification
- qchat_def/attachment_def
- qchat_def/channel_def
- qchat_def/instance_def
- qchat_def/message_def
- qchat_def/public_def
- qchat_def/role_def
- qchat_def/server_def
- qchat_def/system_notification_def