node-nim 9.11.0 → 9.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +114 -71
- package/package.json +3 -2
- package/types/chatroom/chatroom.d.ts +1 -1
- package/types/chatroom_def/chatroom_def.d.ts +1 -1
- package/types/nim/friend.d.ts +1 -1
- package/types/nim/global.d.ts +1 -1
- package/types/nim/msglog.d.ts +1 -1
- package/types/nim/nos.d.ts +1 -1
- package/types/nim/online_session.d.ts +1 -1
- package/types/nim/pass_through_proxy.d.ts +1 -1
- package/types/nim/plugin.d.ts +1 -1
- package/types/nim/session.d.ts +1 -1
- package/types/nim/subscribe_event.d.ts +1 -1
- package/types/nim/sysmsg.d.ts +1 -1
- package/types/nim/talk.d.ts +1 -1
- package/types/nim/talkex.d.ts +1 -1
- package/types/nim/team.d.ts +1 -1
- package/types/nim/tool.d.ts +1 -1
- package/types/nim/user.d.ts +1 -1
- package/types/qchat_def/instance_def.d.ts +2 -0
package/README.md
CHANGED
|
@@ -1,37 +1,106 @@
|
|
|
1
|
-
# NetEase IM
|
|
1
|
+
# NetEase Electron IM SDK
|
|
2
2
|
|
|
3
|
-
[](https://codecov.io/gh/netease-im/node-nim) [](https://github.com/netease-im/node-nim/releases)
|
|
3
|
+
[](https://codecov.io/gh/netease-im/node-nim) [](https://github.com/netease-im/node-nim/releases)
|
|
4
|
+
[中文](README_CN.md)
|
|
5
|
+
[API Document](https://github.com/netease-im/node-nim/wiki)
|
|
4
6
|
|
|
5
7
|
## Table of Contents
|
|
6
8
|
|
|
7
|
-
- [NetEase IM
|
|
9
|
+
- [NetEase Electron IM SDK](#netease-electron-im-sdk)
|
|
8
10
|
- [Table of Contents](#table-of-contents)
|
|
9
11
|
- [Introduction](#introduction)
|
|
12
|
+
- [Runtime Requirements](#runtime-requirements)
|
|
13
|
+
- [System Requirements](#system-requirements)
|
|
14
|
+
- [Supported Platforms](#supported-platforms)
|
|
10
15
|
- [Installation](#installation)
|
|
11
16
|
- [Build From Source](#build-from-source)
|
|
12
|
-
- [Unit Test](#unit-test)
|
|
13
|
-
- [Sample Code](#sample-code)
|
|
14
17
|
- [Quick Start](#quick-start)
|
|
18
|
+
- [Initialize SDK](#initialize-sdk)
|
|
19
|
+
- [Login](#login)
|
|
20
|
+
- [Send Message](#send-message)
|
|
15
21
|
|
|
16
22
|
## Introduction
|
|
17
23
|
|
|
18
|
-
node-nim is a wrapper
|
|
19
|
-
For
|
|
24
|
+
`node-nim` is a Node.js wrapper for the [NetEase IM PC SDK](https://doc.yunxin.163.com/messaging/docs/home-page?platform=pc), enabling you to utilize all of its features in your preferred frontend framework with native platform performance.
|
|
25
|
+
For comprehensive documentation, changelog, and technical support, please visit https://dev.yunxin.163.com/.
|
|
26
|
+
|
|
27
|
+
## Runtime Requirements
|
|
28
|
+
|
|
29
|
+
| Runtime | Version |
|
|
30
|
+
| -------- | ----------- |
|
|
31
|
+
| Electron | >= v8.5.5 |
|
|
32
|
+
| Node.js | >= v12.13.0 |
|
|
33
|
+
|
|
34
|
+
## System Requirements
|
|
35
|
+
|
|
36
|
+
| System | Requirements |
|
|
37
|
+
| ------- | ------------- |
|
|
38
|
+
| Windows | >= Windows 7 |
|
|
39
|
+
| macOS | >= 10.14.0 |
|
|
40
|
+
| Linux | glibc >= 2.23 |
|
|
41
|
+
|
|
42
|
+
## Supported Platforms
|
|
43
|
+
|
|
44
|
+
| Platform | Architecture |
|
|
45
|
+
| -------- | ------------ |
|
|
46
|
+
| Windows | x64 |
|
|
47
|
+
| Windows | ia32 |
|
|
48
|
+
| macOS | x64 |
|
|
49
|
+
| macOS | arm64 |
|
|
50
|
+
| Linux | x64 |
|
|
51
|
+
| Linux | arm64 |
|
|
20
52
|
|
|
21
53
|
## Installation
|
|
22
54
|
|
|
23
|
-
node-nim
|
|
55
|
+
`node-nim` is an NPM package that can be installed using the `npm install` command.
|
|
56
|
+
It will automatically download the prebuilt binary file that fits your current platform.
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
npm install node-nim --save-dev
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Maybe you need to build ia32 app on x64 platform or something like that, you can use `--arch` and `--platform` to specify the platform you want to build.
|
|
63
|
+
|
|
64
|
+
- Windows x64
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
npm install node-nim --save-dev --arch=x64 --platform=win32
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
- Windows x86
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
npm install node-nim --save-dev --arch=ia32 --platform=win32
|
|
74
|
+
```
|
|
24
75
|
|
|
25
|
-
|
|
76
|
+
- macOS x64
|
|
26
77
|
|
|
78
|
+
```bash
|
|
79
|
+
npm install node-nim --save-dev --arch=x64 --platform=darwin
|
|
27
80
|
```
|
|
28
|
-
|
|
81
|
+
|
|
82
|
+
- macOS arm64
|
|
83
|
+
|
|
84
|
+
```bash
|
|
85
|
+
npm install node-nim --save-dev --arch=arm64 --platform=darwin
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
- Linux x64
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
npm install node-nim --save-dev --arch=x64 --platform=linux
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
- Linux arm64
|
|
95
|
+
|
|
96
|
+
```bash
|
|
97
|
+
npm install node-nim --save-dev --arch=arm64 --platform=linux
|
|
29
98
|
```
|
|
30
99
|
|
|
31
100
|
## Build From Source
|
|
32
101
|
|
|
33
|
-
Technically, nim sdk is shipped with a prebuilt node-nim.node binary file, so
|
|
34
|
-
But if you want to add
|
|
102
|
+
Technically, native nim sdk is shipped with a prebuilt node-nim.node binary file, so `there is no need to build it yourself.`.
|
|
103
|
+
But if you want to add personal features or simply prefer to do so, feel free to build it!
|
|
35
104
|
Build Requirements:
|
|
36
105
|
|
|
37
106
|
- Node.js
|
|
@@ -48,79 +117,53 @@ cmake --build build --config Release
|
|
|
48
117
|
|
|
49
118
|
And voilà, you now have your own node-nim binary file in the `build` directory.
|
|
50
119
|
|
|
51
|
-
##
|
|
52
|
-
|
|
53
|
-
Execute following script to run unit test, [check this](./test/test_all.js), and you can also get an coverage report under 'coverage'.
|
|
54
|
-
|
|
55
|
-
```
|
|
56
|
-
npm run coverage
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
## Sample Code
|
|
120
|
+
## Quick Start
|
|
60
121
|
|
|
61
|
-
```
|
|
62
|
-
// Chatroom
|
|
122
|
+
```ts
|
|
63
123
|
import * as node_nim from 'node-nim'
|
|
64
|
-
let ret = node_nim.chatroom.init('', '')
|
|
65
|
-
if (!ret) {
|
|
66
|
-
console.log('init failed')
|
|
67
|
-
process.exit(1)
|
|
68
|
-
}
|
|
69
|
-
node_nim.chatroom.initEventHandlers()
|
|
70
|
-
ret = node_nim.chatroom.enter('room_id', 'login_data', {}, '')
|
|
71
|
-
if (!ret) {
|
|
72
|
-
console.log('enter failed')
|
|
73
|
-
process.exit(1)
|
|
74
|
-
}
|
|
75
124
|
```
|
|
76
125
|
|
|
77
|
-
|
|
78
|
-
// NIM
|
|
79
|
-
import * as node_nim from 'node-nim'
|
|
80
|
-
const result = node_nim.nim.client.init('app_key', 'app_data_dir', 'app_install_dir', {
|
|
81
|
-
db_encrypt_key: 'abcdefghijklmnopqrstuvwxyz012345'
|
|
82
|
-
})
|
|
126
|
+
### Initialize SDK
|
|
83
127
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
128
|
+
```ts
|
|
129
|
+
const result = node_nim.nim.client.init('appkey', '', '', {
|
|
130
|
+
database_encrypt_key_: 'abcdefghijklmnopqrstuvwxyz012345'
|
|
131
|
+
})
|
|
132
|
+
if (result) {
|
|
133
|
+
node_nim.nim.initEventHandlers() // init event handlers
|
|
134
|
+
node_nim.nim.talk.on('receiveMsg', (result) => {
|
|
135
|
+
console.log('receiveMsg', result)
|
|
136
|
+
})
|
|
137
|
+
node_nim.nim.talk.on('sendMsg', (message: node_nim.IMMessage) => {
|
|
138
|
+
console.log('sendMsg: ', message)
|
|
139
|
+
})
|
|
140
|
+
// add more event handlers here
|
|
141
|
+
// ...
|
|
87
142
|
}
|
|
143
|
+
return result
|
|
144
|
+
```
|
|
88
145
|
|
|
89
|
-
|
|
146
|
+
### Login
|
|
90
147
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
'
|
|
95
|
-
|
|
96
|
-
''
|
|
97
|
-
)
|
|
98
|
-
if (resp[0].res_code_ != node_nim.NIMResCode.kNIMResSuccess) {
|
|
148
|
+
```ts
|
|
149
|
+
let [loginResult] = await node_nim.nim.client.login('appkey', 'account', 'password', null, '')
|
|
150
|
+
if (loginResult.res_code_ == node_nim.NIMResCode.kNIMResSuccess) {
|
|
151
|
+
console.log('login succeeded')
|
|
152
|
+
} else {
|
|
99
153
|
console.log('login failed')
|
|
100
|
-
process.exit(1)
|
|
101
154
|
}
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
console.log('receiveMsg', result)
|
|
106
|
-
})
|
|
107
|
-
node_nim.nim.talk.on('sendMsg', (msg) => {
|
|
108
|
-
console.log('sendMsg', msg)
|
|
109
|
-
})
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
### Send Message
|
|
110
158
|
|
|
159
|
+
```ts
|
|
111
160
|
node_nim.nim.talk.sendMsg(
|
|
112
161
|
{
|
|
113
|
-
session_type_:
|
|
114
|
-
receiver_accid_: '
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
content_: 'Send from NIM node quick start.',
|
|
118
|
-
client_msg_id_: new Date().getTime().toString() // use an uuid
|
|
162
|
+
session_type_: node_nim.NIMSessionType.kNIMSessionTypeP2P,
|
|
163
|
+
receiver_accid_: 'receiver',
|
|
164
|
+
type_: node_nim.NIMMessageType.kNIMMessageTypeText,
|
|
165
|
+
content_: 'Send from NIM node quick start.'
|
|
119
166
|
},
|
|
120
167
|
''
|
|
121
168
|
)
|
|
122
169
|
```
|
|
123
|
-
|
|
124
|
-
## Quick Start
|
|
125
|
-
|
|
126
|
-
Check out this [quick start project](https://github.com/netease-im/node-nim-quick-start) and try out NIM's outstanding features!
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "node-nim",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.12.0",
|
|
4
4
|
"description": "NetEase IM nodejs wrapper based on NetEase IM C++ SDK",
|
|
5
5
|
"main": "dist/node-nim.js",
|
|
6
6
|
"bin": {
|
|
@@ -17,7 +17,8 @@
|
|
|
17
17
|
"scripts": {
|
|
18
18
|
"coverage": "nyc mocha test/test_all.js -slow 200 -timeout 10000",
|
|
19
19
|
"build_ts": "rimraf ./dist && rimraf ./types && tsc",
|
|
20
|
-
"
|
|
20
|
+
"build_wiki_doc": "typedoc --plugin typedoc-plugin-markdown --plugin typedoc-github-wiki-theme --theme github-wiki --out wiki_doc",
|
|
21
|
+
"build_markdown_doc": "typedoc --plugin typedoc-plugin-markdown --theme markdown --out markdown_doc",
|
|
21
22
|
"prepublishOnly": "npm run build_ts",
|
|
22
23
|
"install": "npm run download_sdk",
|
|
23
24
|
"download_sdk": "node -e \"require('./script/download-sdk.js').downloadSDK()\"",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { EventEmitter } from 'eventemitter3';
|
|
2
2
|
import { ChatRoomIndependentEnterInfo, ChatRoomAnoymityEnterInfo, ChatRoomEnterInfo, NIMChatRoomLoginState, ChatRoomMessage, ChatRoomGetMembersParameters, GetMembersCallback, GetMembersCountByTagCallback, ChatRoomGetMsgHistoryParameters, GetMsgHistoryCallback, ChatRoomSetMemberAttributeParameters, SetMemberAttributeCallback, GetChatRoomInfoCallback, KickMemberCallback, NIMChatRoomProxyType, TempMuteMemberCallback, ChatRoomInfo, UpdateRoomInfoCallback, ChatRoomMemberInfo, UpdateMyRoomRoleCallback, ChatRoomQueueElement, ChatRoomQueueOfferOption, QueueOfferCallback, QueuePollCallback, QueueListCallback, QueueHeaderCallback, QueueDropCallback, QueueBatchUpdateCallback, NIMChatRoomLocation, UpdateLocationCallback, ChatRoomUpdateTagsInfo, UpdateTagsCallback, ChatRoomNotification, NIMChatRoomEnterStep, NIMChatRoomExitReason, NIMChatRoomLinkCondition, ChatRoomGetMsgHistoryByTagsParameters, ChatRoomConfig, ChatRoomGetMembersByTagParameters, ChatRoomBatchMembers } from '../chatroom_def/chatroom_def';
|
|
3
|
-
import { NIMResCode } from '
|
|
3
|
+
import { NIMResCode } from '../nim_def/client_def';
|
|
4
4
|
export declare interface ChatRoomEvents {
|
|
5
5
|
/** 登录 */
|
|
6
6
|
enter: [number, NIMChatRoomEnterStep, number, ChatRoomInfo, ChatRoomMemberInfo];
|
package/types/nim/friend.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { EventEmitter } from 'eventemitter3';
|
|
2
2
|
import { DeleteFriendOption, FriendProfile, NIMFriendAPI, FriendOptCallback, GetFriendProfileCallback, GetFriendsListCallback, NIMVerifyType, FriendChangeEvent } from '../nim_def/friend_def';
|
|
3
|
-
import { NIMResCode } from '
|
|
3
|
+
import { NIMResCode } from '../nim_def/client_def';
|
|
4
4
|
export declare interface NIMFriendEvents {
|
|
5
5
|
/** 好友变更通知 */
|
|
6
6
|
change: [FriendChangeEvent];
|
package/types/nim/global.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { EventEmitter } from 'eventemitter3';
|
|
2
2
|
import { CachedFileInfo, DeleteCachedFileCallback, DetectProxyCallback, ExceptionCallback, GetCachedFileInfoCallback, NIMCachedFileType, NIMGlobalAPI, NIMProxyDetectStep, NIMProxyType, NIMSDKException, SDKDBErrorInfo, SDKFeedbackCallback, UploadSDKLogCallback } from '../nim_def/global_def';
|
|
3
|
-
import { NIMResCode } from '
|
|
3
|
+
import { NIMResCode } from '../nim_def/client_def';
|
|
4
4
|
export declare interface NIMGlobalEvents {
|
|
5
5
|
/** SDK DB操作出错 */
|
|
6
6
|
dbError: [SDKDBErrorInfo];
|
package/types/nim/msglog.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { EventEmitter } from 'eventemitter3';
|
|
2
2
|
import { NIMSessionType } from '../nim_def/session_def';
|
|
3
3
|
import { NIMMsgLogAPI, QuerySingleMsgCallback, QueryMsgCallback, NIMMessageType, ModifyMultipleMsglogCallback, NIMMsgLogStatus, ModifySingleMsglogCallback, NIMMsgLogSubStatus, DBFunctionCallback, ImportDbPrgCallback, MessageStatusChangedCallback, LogsBackupExportInfo, LogsBackupImportInfo, DeleteHistoryOnLineAsyncCallback, DeleteHistoryOnLineAsyncExCallback, DeleteMessageSelfAsyncCallback, QueryMessageIsThreadRootCallback, QueryMsgAsyncParam, QueryMessageOnlineCallback, QueryThreadHistoryMsgAsyncParam, QueryThreadHistoryMsgCallback, FullTextSearchOnlineAsyncParam, FullTextSearchOnlineAsyncCallback, IMMessage, QueryMsgByKeywordOnlineParam, QueryMsgOnlineAsyncParam, DeleteMsglogSelfNotifyItemInfo, DeleteMsglogSelfNotifyParam, MessageStatusChangedResult, QueryMsgByOptionsAsyncParam, QueryMsglogResult, NIMMsglogSearchDirection, GetMessagesDynamicallyCallback, GetMessagesResult } from '../nim_def/msglog_def';
|
|
4
|
-
import { NIMResCode } from '
|
|
4
|
+
import { NIMResCode } from '../nim_def/client_def';
|
|
5
5
|
export declare interface NIMMsgLogEvents {
|
|
6
6
|
/** 单向删除消息记录通知 */
|
|
7
7
|
localMsgDeleted: [Array<DeleteMsglogSelfNotifyItemInfo>];
|
package/types/nim/nos.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { EventEmitter } from 'eventemitter3';
|
|
2
2
|
import { DownloadMediaCallback, DownloadMediaExCallback, DownloadMediaResult, InitNosConfigParam, InitNosResult, InitNosResultCallback, NIMNOSAPI, NOSParams, ProgressCallback, ProgressExCallback, SafeURLToOriginURLCallback, SpeedCallback, TransferInfoCallback, UploadMediaExCallback, UploadMediaResult } from '../nim_def/nos_def';
|
|
3
3
|
import { IMMessage } from '../nim_def/msglog_def';
|
|
4
|
-
import { NIMResCode } from '
|
|
4
|
+
import { NIMResCode } from '../nim_def/client_def';
|
|
5
5
|
export declare interface NIMNOSEvents {
|
|
6
6
|
/** 下载回调 */
|
|
7
7
|
downloadComplete: [number, string, string, string];
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { EventEmitter } from 'eventemitter3';
|
|
2
2
|
import { NIMSessionType } from '../nim_def/session_def';
|
|
3
3
|
import { DeleteOnlineSessionInfoCallback, DeleteSessionParam, NIMOnlineSessionAPI, QueryOnlineSessionInfoCallback, QueryOnlineSessionListCallback, QuerySessionListResult, SessionInfo, UpdateOnlineSessionInfoCallback } from '../nim_def/online_session_def';
|
|
4
|
-
import { NIMResCode } from '
|
|
4
|
+
import { NIMResCode } from '../nim_def/client_def';
|
|
5
5
|
export declare interface NIMOnlineSessionEvents {
|
|
6
6
|
/** 会话变更 */
|
|
7
7
|
change: [SessionInfo];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { NIMPassThroughProxyAPI, NIMSendHttpRequestMethods, SendHttpRequestCallback } from '../nim_def/pass_through_proxy_def';
|
|
2
2
|
import { EventEmitter } from 'eventemitter3';
|
|
3
|
-
import { NIMResCode } from '
|
|
3
|
+
import { NIMResCode } from '../nim_def/client_def';
|
|
4
4
|
export declare interface NIMPassThroughProxyEvents {
|
|
5
5
|
/** 接受到 HTTP 透传消息 */
|
|
6
6
|
receiveHttpMsg: [string, string, number];
|
package/types/nim/plugin.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { NIMPluginAPI, ChatRoomRequestEnterCallback, QChatRequestLinkAddressCallback } from '../nim_def/plugin_def';
|
|
2
2
|
import { EventEmitter } from 'eventemitter3';
|
|
3
|
-
import { NIMResCode } from '
|
|
3
|
+
import { NIMResCode } from '../nim_def/client_def';
|
|
4
4
|
export declare interface NIMPluginEvents {
|
|
5
5
|
}
|
|
6
6
|
export declare class NIMPlugin extends EventEmitter<NIMPluginEvents> {
|
package/types/nim/session.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { EventEmitter } from 'eventemitter3';
|
|
2
2
|
import { IMMessage, NIMMessageType } from '../nim_def/msglog_def';
|
|
3
3
|
import { CancelToStickTopSessionCallback, DeleteHasmoreRoammsgCallback, DeleteSessionRoamingMessageCallback, MultiUnreadCountZeroInfo, NIMSessionAPI, NIMSessionType, QueryAllHasmoreRoammsgCallback, QueryHasmoreRoammsgCallback, QuerySessionDataCallback, QuerySessionListCallback, QueryStickTopSessionListCallback, SessionChangeCallback, SessionData, SessionDataList, SessionRoamMsgHasMoreTagInfo, SetMultiUnreadCountZeroAsyncCallback, SetToStickTopSessionCallback, UpdateHasmoreRoammsgCallback, UpdateStickTopSessionCallback } from '../nim_def/session_def';
|
|
4
|
-
import { NIMResCode } from '
|
|
4
|
+
import { NIMResCode } from '../nim_def/client_def';
|
|
5
5
|
export declare interface NIMSessionEvents {
|
|
6
6
|
/** 会话变更 */
|
|
7
7
|
change: [number, SessionData, number];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { EventEmitter } from 'eventemitter3';
|
|
2
2
|
import { NIMSubscribeEventAPI, EventData, PublishEventCallback, NIMEventType, NIMEventSubscribeSyncEventType, SubscribeEventCallback, UnSubscribeEventCallback, BatchUnSubscribeEventCallback, QuerySubscribeEventCallback, EventSubscribeData } from '../nim_def/subscribe_event_def';
|
|
3
|
-
import { NIMResCode } from '
|
|
3
|
+
import { NIMResCode } from '../nim_def/client_def';
|
|
4
4
|
export declare interface NIMSubscribeEventEvents {
|
|
5
5
|
/** 订阅的事件 */
|
|
6
6
|
push: [number, EventData];
|
package/types/nim/sysmsg.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { EventEmitter } from 'eventemitter3';
|
|
2
2
|
import { NIMSysMsgAPI, SysMessage, NIMSysMsgStatus, NIMSysMsgType, NotifySingleSysmsgCallback, NotifySysmsgResCallback, QuerySysmsgCallback } from '../nim_def/sysmsg_def';
|
|
3
3
|
import { SendMessageArc } from '../nim_def/talk_def';
|
|
4
|
-
import { NIMResCode } from '
|
|
4
|
+
import { NIMResCode } from '../nim_def/client_def';
|
|
5
5
|
export declare interface NIMSysMsgEvents {
|
|
6
6
|
/** 系统通知 */
|
|
7
7
|
receiveSystemMsg: [SysMessage];
|
package/types/nim/talk.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { EventEmitter } from 'eventemitter3';
|
|
2
2
|
import { IMMessage, NIMMessageType } from '../nim_def/msglog_def';
|
|
3
3
|
import { BroadcastMessage, MessageFilterCallback, NIMTalkAPI, RecallMsgNotify, RecallMsgsCallback, SendMessageArc, TeamNotificationFilterCallback } from '../nim_def/talk_def';
|
|
4
|
-
import { NIMResCode } from '
|
|
4
|
+
import { NIMResCode } from '../nim_def/client_def';
|
|
5
5
|
export declare interface NIMTalkEvents {
|
|
6
6
|
/** 发送消息回调 */
|
|
7
7
|
sendMsg: [SendMessageArc];
|
package/types/nim/talkex.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { EventEmitter } from 'eventemitter3';
|
|
2
2
|
import { NIMTalkExAPI, CollectInfo, AddCollectCallback, RemoveCollectsParm, RemoveCollectsCallback, MatchCollectParm, UpdateCollectCallback, QueryCollectsParm, QueryCollectsCallback, QuickCommentInfo, AddQuickCommentCallback, RemoveQuickCommentParam, RemoveQuickCommentCallback, QueryQuickCommentsParam, QueryQuickCommentCallback, PinMessageInfo, PinMessageCallback, ModifyPinMessageParam, UnPinMessageCallback, UpdatePinMessageCallback, QueryPinMessageCallback, CollectInfoList, QueryQuickCommentsResponse, QueryAllPinMessageResponse } from '../nim_def/talkex_def';
|
|
3
3
|
import { IMMessage } from '../nim_def/msglog_def';
|
|
4
|
-
import { NIMResCode } from '
|
|
4
|
+
import { NIMResCode } from '../nim_def/client_def';
|
|
5
5
|
export declare interface NIMTalkExEvents {
|
|
6
6
|
/** 添加快捷回复 */
|
|
7
7
|
addQuickComment: [number, QuickCommentInfo];
|
package/types/nim/team.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { EventEmitter } from 'eventemitter3';
|
|
2
2
|
import { IMMessage } from '../nim_def/msglog_def';
|
|
3
3
|
import { NIMTeamAPI, TeamInfo, TeamEventCallback, QueryAllMyTeamsCallback, QueryAllMyTeamsInfoCallback, QueryTeamMyAllMemberInfosCallback, QueryTeamMembersCallback, QueryTeamMemberCallback, QueryTeamInfoCallback, QueryTeamMembersOnlineCallback, TeamMsgAckReadCallback, QueryTeamMembersInvitorCallback, QueryTeamsInfoCallback, UpdateTInfoLocalCallback, GetTeamInfoBatchSFTransCallback, GetTeamInfoListCallback, TeamMemberProperty, TeamEvent } from '../nim_def/team_def';
|
|
4
|
-
import { NIMResCode } from '
|
|
4
|
+
import { NIMResCode } from '../nim_def/client_def';
|
|
5
5
|
export declare interface NIMTeamEvents {
|
|
6
6
|
/** 群事件 */
|
|
7
7
|
teamEvent: [TeamEvent];
|
package/types/nim/tool.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { EventEmitter } from 'eventemitter3';
|
|
2
2
|
import { NIMToolAPI, NIMAppDataType, AudioInfo, GetAudioTextCallback, FilterClientAntispamCallback } from '../nim_def/tool_def';
|
|
3
|
-
import { NIMResCode } from '
|
|
3
|
+
import { NIMResCode } from '../nim_def/client_def';
|
|
4
4
|
export declare interface NIMToolEvents {
|
|
5
5
|
}
|
|
6
6
|
export declare class NIMTool extends EventEmitter<NIMToolEvents> {
|
package/types/nim/user.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { EventEmitter } from 'eventemitter3';
|
|
2
2
|
import { NIMUserAPI, SetRelationCallback, GetSpecialListCallback, GetUserNameCardCallback, UpdateMyUserNameCardCallback, NINPushType, UserNameCard, SpecialRelationshipChangeEvent, BlackMuteListInfo } from '../nim_def/user_def';
|
|
3
|
-
import { NIMResCode } from '
|
|
3
|
+
import { NIMResCode } from '../nim_def/client_def';
|
|
4
4
|
export declare interface NIMUserEvents {
|
|
5
5
|
/** 用户属性变更 */
|
|
6
6
|
specialRelationChange: [SpecialRelationshipChangeEvent];
|
|
@@ -170,6 +170,8 @@ export interface QChatInitParam {
|
|
|
170
170
|
auth_timeout?: number;
|
|
171
171
|
/** 数据库加密密钥,如果为空,则使用默认值 */
|
|
172
172
|
database_encrypt_key?: string;
|
|
173
|
+
/** 自动订阅 */
|
|
174
|
+
auto_subscribe?: boolean;
|
|
173
175
|
/** 加密配置 */
|
|
174
176
|
encryption_configuration?: QChatEncryptionConfiguration;
|
|
175
177
|
/** FCS配置 */
|