nim-web-sdk-ng 0.12.2 → 0.13.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/dist/CHATROOM_BROWSER_SDK/ChatroomInterface.d.ts +23 -6
- package/dist/CHATROOM_BROWSER_SDK/ChatroomMemberServiceInterface.d.ts +2 -2
- package/dist/CHATROOM_BROWSER_SDK/ChatroomMsgServiceInterface.d.ts +34 -10
- package/dist/CHATROOM_BROWSER_SDK/ChatroomQueueInterface.d.ts +50 -1
- package/dist/CHATROOM_BROWSER_SDK/CloudStorageServiceInterface.d.ts +16 -8
- package/dist/CHATROOM_BROWSER_SDK/index.d.ts +36 -0
- package/dist/CHATROOM_BROWSER_SDK/types.d.ts +75 -68
- package/dist/CHATROOM_BROWSER_SDK.js +15 -4
- package/dist/CHATROOM_MINIAPP_SDK/ChatroomInterface.d.ts +23 -6
- package/dist/CHATROOM_MINIAPP_SDK/ChatroomMemberServiceInterface.d.ts +2 -2
- package/dist/CHATROOM_MINIAPP_SDK/ChatroomMsgServiceInterface.d.ts +34 -10
- package/dist/CHATROOM_MINIAPP_SDK/ChatroomQueueInterface.d.ts +50 -1
- package/dist/CHATROOM_MINIAPP_SDK/CloudStorageServiceInterface.d.ts +16 -8
- package/dist/CHATROOM_MINIAPP_SDK/index.d.ts +36 -0
- package/dist/CHATROOM_MINIAPP_SDK/types.d.ts +75 -68
- package/dist/CHATROOM_MINIAPP_SDK.js +15 -4
- package/dist/CHATROOM_UNIAPP_SDK.js +15 -4
- package/dist/NIM_BROWSER_SDK/CloudSessionServiceInterface.d.ts +29 -5
- package/dist/NIM_BROWSER_SDK/CloudStorageServiceInterface.d.ts +78 -7
- package/dist/NIM_BROWSER_SDK/EventServiceInterface.d.ts +4 -4
- package/dist/NIM_BROWSER_SDK/FriendServiceInterface.d.ts +6 -6
- package/dist/NIM_BROWSER_SDK/MsgLogServiceInterface.d.ts +36 -5
- package/dist/NIM_BROWSER_SDK/MsgServiceInterface.d.ts +100 -63
- package/dist/NIM_BROWSER_SDK/NIMInterface.d.ts +100 -9
- package/dist/NIM_BROWSER_SDK/OfflinePushInterface.d.ts +214 -0
- package/dist/NIM_BROWSER_SDK/PluginServiceInterface.d.ts +9 -1
- package/dist/NIM_BROWSER_SDK/SessionServiceInterface.d.ts +35 -2
- package/dist/NIM_BROWSER_SDK/SignalingServiceInterface.d.ts +183 -77
- package/dist/NIM_BROWSER_SDK/SuperTeamServiceInterface.d.ts +6 -2
- package/dist/NIM_BROWSER_SDK/SystemMessageServiceInterface.d.ts +1 -40
- package/dist/NIM_BROWSER_SDK/TeamServiceInterface.d.ts +16 -3
- package/dist/NIM_BROWSER_SDK/UserServiceInterface.d.ts +9 -92
- package/dist/NIM_BROWSER_SDK/index.d.ts +54 -0
- package/dist/NIM_BROWSER_SDK/types.d.ts +2 -3
- package/dist/NIM_BROWSER_SDK.js +15 -4
- package/dist/NIM_MINIAPP_SDK/CloudSessionServiceInterface.d.ts +29 -5
- package/dist/NIM_MINIAPP_SDK/CloudStorageServiceInterface.d.ts +78 -7
- package/dist/NIM_MINIAPP_SDK/EventServiceInterface.d.ts +4 -4
- package/dist/NIM_MINIAPP_SDK/FriendServiceInterface.d.ts +6 -6
- package/dist/NIM_MINIAPP_SDK/MsgLogServiceInterface.d.ts +36 -5
- package/dist/NIM_MINIAPP_SDK/MsgServiceInterface.d.ts +100 -63
- package/dist/NIM_MINIAPP_SDK/NIMInterface.d.ts +100 -9
- package/dist/NIM_MINIAPP_SDK/OfflinePushInterface.d.ts +214 -0
- package/dist/NIM_MINIAPP_SDK/PluginServiceInterface.d.ts +9 -1
- package/dist/NIM_MINIAPP_SDK/SessionServiceInterface.d.ts +35 -2
- package/dist/NIM_MINIAPP_SDK/SignalingServiceInterface.d.ts +183 -77
- package/dist/NIM_MINIAPP_SDK/SuperTeamServiceInterface.d.ts +6 -2
- package/dist/NIM_MINIAPP_SDK/SystemMessageServiceInterface.d.ts +1 -40
- package/dist/NIM_MINIAPP_SDK/TeamServiceInterface.d.ts +16 -3
- package/dist/NIM_MINIAPP_SDK/UserServiceInterface.d.ts +9 -92
- package/dist/NIM_MINIAPP_SDK/index.d.ts +54 -0
- package/dist/NIM_MINIAPP_SDK/types.d.ts +2 -3
- package/dist/NIM_MINIAPP_SDK.js +15 -4
- package/dist/NIM_UNIAPP_SDK.js +15 -4
- package/dist/QCHAT_BROWSER_SDK/CloudStorageServiceInterface.d.ts +8 -0
- package/dist/QCHAT_BROWSER_SDK/QChatMediaServiceInterface.d.ts +6 -3
- package/dist/QCHAT_BROWSER_SDK/QChatMsgServiceInterface.d.ts +74 -7
- package/dist/QCHAT_BROWSER_SDK/types.d.ts +18 -4
- package/dist/QCHAT_BROWSER_SDK.js +15 -4
- package/dist/QCHAT_UNIAPP_SDK.js +15 -4
- package/dist/esm/adapters.d.ts +3 -1
- package/dist/esm/chatroom/empty.d.ts +3 -0
- package/dist/esm/chatroom/src/ChatroomInterface.d.ts +23 -6
- package/dist/esm/chatroom/src/ChatroomMemberServiceInterface.d.ts +2 -2
- package/dist/esm/chatroom/src/ChatroomMsgServiceInterface.d.ts +34 -10
- package/dist/esm/chatroom/src/ChatroomQueueInterface.d.ts +50 -1
- package/dist/esm/chatroom/src/CloudStorageServiceInterface.d.ts +16 -8
- package/dist/esm/chatroom/src/index.d.ts +36 -0
- package/dist/esm/chatroom/src/types.d.ts +75 -68
- package/dist/esm/index.d.ts +9 -1
- package/dist/esm/index.js +15 -4
- package/dist/esm/nim/empty.d.ts +3 -0
- package/dist/esm/nim/src/CloudSessionServiceInterface.d.ts +29 -5
- package/dist/esm/nim/src/CloudStorageServiceInterface.d.ts +78 -7
- package/dist/esm/nim/src/EventServiceInterface.d.ts +4 -4
- package/dist/esm/nim/src/FriendServiceInterface.d.ts +6 -6
- package/dist/esm/nim/src/MsgLogServiceInterface.d.ts +36 -5
- package/dist/esm/nim/src/MsgServiceInterface.d.ts +100 -63
- package/dist/esm/nim/src/NIMInterface.d.ts +100 -9
- package/dist/esm/nim/src/OfflinePushInterface.d.ts +214 -0
- package/dist/esm/nim/src/PluginServiceInterface.d.ts +9 -1
- package/dist/esm/nim/src/SessionServiceInterface.d.ts +35 -2
- package/dist/esm/nim/src/SignalingServiceInterface.d.ts +183 -77
- package/dist/esm/nim/src/SuperTeamServiceInterface.d.ts +6 -2
- package/dist/esm/nim/src/SystemMessageServiceInterface.d.ts +1 -40
- package/dist/esm/nim/src/TeamServiceInterface.d.ts +16 -3
- package/dist/esm/nim/src/UserServiceInterface.d.ts +9 -92
- package/dist/esm/nim/src/index.d.ts +54 -0
- package/dist/esm/nim/src/types.d.ts +2 -3
- package/dist/esm/qchat/empty.d.ts +3 -0
- package/dist/esm/qchat/src/CloudStorageServiceInterface.d.ts +8 -0
- package/dist/esm/qchat/src/QChatMediaServiceInterface.d.ts +6 -3
- package/dist/esm/qchat/src/QChatMsgServiceInterface.d.ts +74 -7
- package/dist/esm/qchat/src/types.d.ts +18 -4
- package/package.json +1 -1
|
@@ -43,6 +43,9 @@ export interface ChatroomInterface {
|
|
|
43
43
|
* @locale
|
|
44
44
|
*
|
|
45
45
|
* @locale en
|
|
46
|
+
* Update the parameters for initialization and apply them after initialization is complete
|
|
47
|
+
*
|
|
48
|
+
* Note that the parameters will take effect on the next call to connect or reconnect.
|
|
46
49
|
* @locale
|
|
47
50
|
*/
|
|
48
51
|
setOptions(options: ChatroomInitializeOptions): void;
|
|
@@ -77,7 +80,7 @@ export interface ChatroomInterface {
|
|
|
77
80
|
* eg . new sdk ( { ... ChatroomInitializeOptions })
|
|
78
81
|
* @locale
|
|
79
82
|
*/
|
|
80
|
-
export
|
|
83
|
+
export interface ChatroomInitializeOptions {
|
|
81
84
|
account: string;
|
|
82
85
|
/**
|
|
83
86
|
* @Multi_Lang_Tag
|
|
@@ -98,7 +101,7 @@ export declare type ChatroomInitializeOptions = {
|
|
|
98
101
|
* @locale
|
|
99
102
|
*
|
|
100
103
|
* @locale en
|
|
101
|
-
* chatroom
|
|
104
|
+
* chatroom ID
|
|
102
105
|
* @locale
|
|
103
106
|
*/
|
|
104
107
|
chatroomId: string;
|
|
@@ -207,7 +210,7 @@ export declare type ChatroomInitializeOptions = {
|
|
|
207
210
|
* @locale
|
|
208
211
|
*
|
|
209
212
|
* @locale en
|
|
210
|
-
* Login
|
|
213
|
+
* Login custom field, used for submitting to the user's third-party callback service for login authentication.
|
|
211
214
|
* @locale
|
|
212
215
|
*/
|
|
213
216
|
loginExt?: string;
|
|
@@ -224,6 +227,13 @@ export declare type ChatroomInitializeOptions = {
|
|
|
224
227
|
* @locale
|
|
225
228
|
*
|
|
226
229
|
* @locale en
|
|
230
|
+
* Whether deviceId is fixed, the default value is false.
|
|
231
|
+
*
|
|
232
|
+
* true:SDK randomly generates a device identifier and stores into the LocalStorage cache, all SDK instances are considered to be common devices for a browser.
|
|
233
|
+
*
|
|
234
|
+
* false:When each SDK instance is connected, the random string is used as a device identifier and different devices are used in each instance.
|
|
235
|
+
*
|
|
236
|
+
* Note: This parameter will affect the strategy of multi-device forced logout. For configurations about multi-device forced logout strategies, see the server documentation.
|
|
227
237
|
* @locale
|
|
228
238
|
*/
|
|
229
239
|
isFixedDeviceId?: boolean;
|
|
@@ -236,11 +246,14 @@ export declare type ChatroomInitializeOptions = {
|
|
|
236
246
|
* @locale
|
|
237
247
|
*
|
|
238
248
|
* @locale en
|
|
249
|
+
* Whether Abtest is enabled. The default value is true
|
|
250
|
+
*
|
|
251
|
+
* Note: If you turn on the switch, the SDK attempts to enable certain new features. You are recommended not turn on it.
|
|
239
252
|
* @locale
|
|
240
253
|
*/
|
|
241
254
|
isAbtestEnable?: boolean;
|
|
242
|
-
}
|
|
243
|
-
export
|
|
255
|
+
}
|
|
256
|
+
export interface ChatroomOtherOptions {
|
|
244
257
|
/**
|
|
245
258
|
* @Multi_Lang_Tag
|
|
246
259
|
* @locale cn
|
|
@@ -252,7 +265,7 @@ export declare type ChatroomOtherOptions = {
|
|
|
252
265
|
* @locale
|
|
253
266
|
*/
|
|
254
267
|
cloudStorageConfig?: NIMEModuleParamCloudStorageConfig;
|
|
255
|
-
}
|
|
268
|
+
}
|
|
256
269
|
/**
|
|
257
270
|
* @Multi_Lang_Tag
|
|
258
271
|
* @locale cn
|
|
@@ -371,6 +384,10 @@ export interface ChatroomEventInterface {
|
|
|
371
384
|
* @locale cn
|
|
372
385
|
* 当前用户标签变更
|
|
373
386
|
* @locale
|
|
387
|
+
*
|
|
388
|
+
* @locale en
|
|
389
|
+
* Tags of members change
|
|
390
|
+
* @locale
|
|
374
391
|
*/
|
|
375
392
|
tagsUpdate: [currentTags: string[]];
|
|
376
393
|
}
|
|
@@ -276,7 +276,7 @@ export declare type QueryMembersByTagOptions = {
|
|
|
276
276
|
* @locale
|
|
277
277
|
*
|
|
278
278
|
* @locale en
|
|
279
|
-
* For
|
|
279
|
+
* For pagination, default value: 100.
|
|
280
280
|
* @locale
|
|
281
281
|
*/
|
|
282
282
|
limit?: number;
|
|
@@ -458,7 +458,7 @@ export declare type QueryMembersOptions = {
|
|
|
458
458
|
* @locale
|
|
459
459
|
*
|
|
460
460
|
* @locale en
|
|
461
|
-
* For
|
|
461
|
+
* For pagination; the default value is 100.
|
|
462
462
|
* @locale
|
|
463
463
|
*/
|
|
464
464
|
limit?: number;
|
|
@@ -7,7 +7,7 @@ export interface ChatroomMsgServiceInterface {
|
|
|
7
7
|
* @locale
|
|
8
8
|
*
|
|
9
9
|
* @locale en
|
|
10
|
-
* Send text
|
|
10
|
+
* Send a text message
|
|
11
11
|
* @locale
|
|
12
12
|
*/
|
|
13
13
|
sendTextMsg(options: ISendTextMsgOptions): Promise<ChatroomMessage>;
|
|
@@ -20,7 +20,7 @@ export interface ChatroomMsgServiceInterface {
|
|
|
20
20
|
* @locale
|
|
21
21
|
*
|
|
22
22
|
* @locale en
|
|
23
|
-
* Send
|
|
23
|
+
* Send an alert
|
|
24
24
|
*
|
|
25
25
|
* Notification messages refer to status notifications in conversations, such as the welcome message when a person joins a conversation and the prompt messages about sensitive words detection.
|
|
26
26
|
* @locale
|
|
@@ -33,7 +33,7 @@ export interface ChatroomMsgServiceInterface {
|
|
|
33
33
|
* @locale
|
|
34
34
|
*
|
|
35
35
|
* @locale en
|
|
36
|
-
* Send location
|
|
36
|
+
* Send an location message
|
|
37
37
|
* @locale
|
|
38
38
|
*/
|
|
39
39
|
sendGeoLocationMsg(options: ISendGeoLocationMsgOptions): Promise<ChatroomMessage>;
|
|
@@ -44,7 +44,7 @@ export interface ChatroomMsgServiceInterface {
|
|
|
44
44
|
* @locale
|
|
45
45
|
*
|
|
46
46
|
* @locale en
|
|
47
|
-
* Send custom
|
|
47
|
+
* Send a custom message
|
|
48
48
|
* @locale
|
|
49
49
|
*/
|
|
50
50
|
sendCustomMsg(options: ISendCustomMsgOptions): Promise<ChatroomMessage>;
|
|
@@ -55,7 +55,7 @@ export interface ChatroomMsgServiceInterface {
|
|
|
55
55
|
* @locale
|
|
56
56
|
*
|
|
57
57
|
* @locale en
|
|
58
|
-
* Send
|
|
58
|
+
* Send an image messages (uploading images supported)
|
|
59
59
|
* @locale
|
|
60
60
|
*/
|
|
61
61
|
sendImageMsg(options: IBaseSendFileOptions): Promise<ChatroomMessage>;
|
|
@@ -66,7 +66,7 @@ export interface ChatroomMsgServiceInterface {
|
|
|
66
66
|
* @locale
|
|
67
67
|
*
|
|
68
68
|
* @locale en
|
|
69
|
-
* Send audio
|
|
69
|
+
* Send an audio message (uploading audios supported)
|
|
70
70
|
* @locale
|
|
71
71
|
*/
|
|
72
72
|
sendAudioMsg(options: IBaseSendFileOptions): Promise<ChatroomMessage>;
|
|
@@ -77,7 +77,7 @@ export interface ChatroomMsgServiceInterface {
|
|
|
77
77
|
* @locale
|
|
78
78
|
*
|
|
79
79
|
* @locale en
|
|
80
|
-
* Send video
|
|
80
|
+
* Send a video message (uploading videos supported)
|
|
81
81
|
* @locale
|
|
82
82
|
*/
|
|
83
83
|
sendVideoMsg(options: IBaseSendFileOptions): Promise<ChatroomMessage>;
|
|
@@ -88,7 +88,7 @@ export interface ChatroomMsgServiceInterface {
|
|
|
88
88
|
* @locale
|
|
89
89
|
*
|
|
90
90
|
* @locale en
|
|
91
|
-
* Send
|
|
91
|
+
* Send a file messages (uploading files supported)
|
|
92
92
|
* @locale
|
|
93
93
|
*/
|
|
94
94
|
sendFileMsg(options: IBaseSendFileOptions): Promise<ChatroomMessage>;
|
|
@@ -99,7 +99,7 @@ export interface ChatroomMsgServiceInterface {
|
|
|
99
99
|
* @locale
|
|
100
100
|
*
|
|
101
101
|
* @locale en
|
|
102
|
-
* Query
|
|
102
|
+
* Query the message history
|
|
103
103
|
* @locale
|
|
104
104
|
*/
|
|
105
105
|
queryMessageHistory(options: QueryMessageHistoryOptions): Promise<ChatroomMessage[]>;
|
|
@@ -110,7 +110,7 @@ export interface ChatroomMsgServiceInterface {
|
|
|
110
110
|
* @locale
|
|
111
111
|
*
|
|
112
112
|
* @locale en
|
|
113
|
-
* Query
|
|
113
|
+
* Query message history by tag
|
|
114
114
|
* @locale
|
|
115
115
|
*/
|
|
116
116
|
getHistoryMsgsByTags(options: GetHistoryMsgsByTagsOptions): Promise<ChatroomMessage[]>;
|
|
@@ -127,6 +127,10 @@ export declare type GetHistoryMsgsByTagsOptions = {
|
|
|
127
127
|
* @locale cn
|
|
128
128
|
* 标签
|
|
129
129
|
* @locale
|
|
130
|
+
*
|
|
131
|
+
* @locale en
|
|
132
|
+
* Tag
|
|
133
|
+
* @locale
|
|
130
134
|
*/
|
|
131
135
|
tags: string[];
|
|
132
136
|
/**
|
|
@@ -134,6 +138,10 @@ export declare type GetHistoryMsgsByTagsOptions = {
|
|
|
134
138
|
* @locale cn
|
|
135
139
|
* 消息类型
|
|
136
140
|
* @locale
|
|
141
|
+
*
|
|
142
|
+
* @locale en
|
|
143
|
+
* Message type
|
|
144
|
+
* @locale
|
|
137
145
|
*/
|
|
138
146
|
types?: TMsgType[];
|
|
139
147
|
/**
|
|
@@ -141,6 +149,10 @@ export declare type GetHistoryMsgsByTagsOptions = {
|
|
|
141
149
|
* @locale cn
|
|
142
150
|
* 开始时间 默认 0
|
|
143
151
|
* @locale
|
|
152
|
+
*
|
|
153
|
+
* @locale en
|
|
154
|
+
* Start time, the default value is 0.
|
|
155
|
+
* @locale
|
|
144
156
|
*/
|
|
145
157
|
fromTime?: number;
|
|
146
158
|
/**
|
|
@@ -148,6 +160,10 @@ export declare type GetHistoryMsgsByTagsOptions = {
|
|
|
148
160
|
* @locale cn
|
|
149
161
|
* 结束时间 默认服务器当前时间
|
|
150
162
|
* @locale
|
|
163
|
+
*
|
|
164
|
+
* @locale en
|
|
165
|
+
* The end time, the current time on the server is used by default
|
|
166
|
+
* @locale
|
|
151
167
|
*/
|
|
152
168
|
toTime?: number;
|
|
153
169
|
/**
|
|
@@ -155,6 +171,10 @@ export declare type GetHistoryMsgsByTagsOptions = {
|
|
|
155
171
|
* @locale cn
|
|
156
172
|
* 数量限制,默认 100
|
|
157
173
|
* @locale
|
|
174
|
+
*
|
|
175
|
+
* @locale en
|
|
176
|
+
* The limit, a maximum of 100 messages are allowed.
|
|
177
|
+
* @locale
|
|
158
178
|
*/
|
|
159
179
|
limit?: number;
|
|
160
180
|
/**
|
|
@@ -162,6 +182,10 @@ export declare type GetHistoryMsgsByTagsOptions = {
|
|
|
162
182
|
* @locale cn
|
|
163
183
|
* 是否反向 0(默认): 正向, 1: 反向
|
|
164
184
|
* @locale
|
|
185
|
+
*
|
|
186
|
+
* @locale en
|
|
187
|
+
* Whether a reverse query is allowed. 0(default): direct, 1: reverse
|
|
188
|
+
* @locale
|
|
165
189
|
*/
|
|
166
190
|
reverse?: 0 | 1;
|
|
167
191
|
};
|
|
@@ -1,30 +1,79 @@
|
|
|
1
1
|
export interface ChatroomQueueInterface {
|
|
2
2
|
/**
|
|
3
|
+
* @Multi_Lang_Tag
|
|
4
|
+
* @locale cn
|
|
3
5
|
* 初始化聊天室队列
|
|
6
|
+
* @locale
|
|
7
|
+
*
|
|
8
|
+
* @locale en
|
|
9
|
+
* initialize the chat room queue
|
|
10
|
+
* @locale
|
|
4
11
|
*/
|
|
5
12
|
init(options: QueueInitOptions): Promise<void>;
|
|
6
13
|
/**
|
|
14
|
+
* @Multi_Lang_Tag
|
|
15
|
+
* @locale cn
|
|
7
16
|
* 加入或者更新队列元素
|
|
17
|
+
* @locale
|
|
18
|
+
*
|
|
19
|
+
* @locale en
|
|
20
|
+
* add or update the queue
|
|
21
|
+
* @locale
|
|
8
22
|
*/
|
|
9
23
|
update(options: QueueUpdateOptions): Promise<void>;
|
|
10
24
|
/**
|
|
25
|
+
* @Multi_Lang_Tag
|
|
26
|
+
* @locale cn
|
|
11
27
|
* 取出聊天室队列指定/第一个元素
|
|
28
|
+
* @locale
|
|
29
|
+
*
|
|
30
|
+
* @locale en
|
|
31
|
+
* Get the specified or first element of the queue
|
|
32
|
+
* @locale
|
|
12
33
|
*/
|
|
13
34
|
poll(options: QueuePollOptions): Promise<ChatroomQueue>;
|
|
14
35
|
/**
|
|
36
|
+
* @Multi_Lang_Tag
|
|
37
|
+
* @locale cn
|
|
15
38
|
* 批量更新聊天室队列元素
|
|
39
|
+
* @locale
|
|
40
|
+
*
|
|
41
|
+
* @locale en
|
|
42
|
+
* Update multiple elements in the queue at a time
|
|
43
|
+
* @locale
|
|
16
44
|
*/
|
|
17
45
|
batchUpdate(options: QueueBatchUpdateOptions): Promise<ChatroomQueue[]>;
|
|
18
46
|
/**
|
|
47
|
+
* @Multi_Lang_Tag
|
|
48
|
+
* @locale cn
|
|
19
49
|
* 排序列出所有元素
|
|
50
|
+
* @locale
|
|
51
|
+
*
|
|
52
|
+
* @locale en
|
|
53
|
+
* sort all elements in a queue
|
|
54
|
+
* @locale
|
|
20
55
|
*/
|
|
21
56
|
fetch(): Promise<ChatroomQueue[]>;
|
|
22
57
|
/**
|
|
58
|
+
* @Multi_Lang_Tag
|
|
59
|
+
* @locale cn
|
|
23
60
|
* 查看聊天室队列中的第一个元素
|
|
61
|
+
* @locale
|
|
62
|
+
*
|
|
63
|
+
* @locale en
|
|
64
|
+
* View the first element of the queue
|
|
65
|
+
* @locale
|
|
24
66
|
*/
|
|
25
67
|
pickHeader(): Promise<ChatroomQueue>;
|
|
26
68
|
/**
|
|
69
|
+
* @Multi_Lang_Tag
|
|
70
|
+
* @locale cn
|
|
27
71
|
* 清空队列
|
|
72
|
+
* @locale
|
|
73
|
+
*
|
|
74
|
+
* @locale en
|
|
75
|
+
* clear queues
|
|
76
|
+
* @locale
|
|
28
77
|
*/
|
|
29
78
|
clear(): Promise<void>;
|
|
30
79
|
}
|
|
@@ -36,7 +85,7 @@ export declare type QueueInitOptions = {
|
|
|
36
85
|
* @locale
|
|
37
86
|
*
|
|
38
87
|
* @locale en
|
|
39
|
-
*
|
|
88
|
+
* The limit of a new queue (0 ~ 1000). You can perform this operation for an existing queue to modify the length of the queue. If the current queue has exceeded the new limit, you cannot add more elements will not be added, but the existing elements cannot be removed.
|
|
40
89
|
* @locale
|
|
41
90
|
*/
|
|
42
91
|
maxItemCount: number;
|
|
@@ -18,7 +18,7 @@ export interface CloudStorageServiceInterface {
|
|
|
18
18
|
* @locale
|
|
19
19
|
*
|
|
20
20
|
* @locale en
|
|
21
|
-
*
|
|
21
|
+
* convert a short link to a long link
|
|
22
22
|
* @locale
|
|
23
23
|
*/
|
|
24
24
|
getOriginUrl(options: string): Promise<string>;
|
|
@@ -28,7 +28,7 @@ export interface CloudStorageServiceInterface {
|
|
|
28
28
|
* 获取文件鉴权的token
|
|
29
29
|
* @locale
|
|
30
30
|
* @locale en
|
|
31
|
-
* Get the token for the authorization
|
|
31
|
+
* Get the token for the authorization for file access.
|
|
32
32
|
* @locale
|
|
33
33
|
*/
|
|
34
34
|
getFileToken(options: GetFileTokenOptions): Promise<GetFileTokenResult | void>;
|
|
@@ -41,7 +41,7 @@ export declare type GetFileTokenOptions = {
|
|
|
41
41
|
* @locale
|
|
42
42
|
*
|
|
43
43
|
* @locale en
|
|
44
|
-
*
|
|
44
|
+
* authentication type, 2: token-based authentication with a validity period, 3: URL-based authentication for access files
|
|
45
45
|
* @locale
|
|
46
46
|
*/
|
|
47
47
|
type: 2 | 3;
|
|
@@ -52,7 +52,7 @@ export declare type GetFileTokenOptions = {
|
|
|
52
52
|
* @locale
|
|
53
53
|
*
|
|
54
54
|
* @locale en
|
|
55
|
-
*
|
|
55
|
+
* If type=3, an array of URLs is required
|
|
56
56
|
* @locale
|
|
57
57
|
*/
|
|
58
58
|
urls?: string[] | string;
|
|
@@ -65,7 +65,7 @@ export declare type GetFileTokenResult = {
|
|
|
65
65
|
* @locale
|
|
66
66
|
*
|
|
67
67
|
* @locale en
|
|
68
|
-
*
|
|
68
|
+
* authentication type, 2: token-based authentication with a validity period, 3: URL-based authentication for access files
|
|
69
69
|
* @locale
|
|
70
70
|
*/
|
|
71
71
|
type: 2 | 3;
|
|
@@ -76,7 +76,7 @@ export declare type GetFileTokenResult = {
|
|
|
76
76
|
* @locale
|
|
77
77
|
*
|
|
78
78
|
* @locale en
|
|
79
|
-
*
|
|
79
|
+
* For type 3, tokens associated with the array of URLs are returned
|
|
80
80
|
* @locale
|
|
81
81
|
*/
|
|
82
82
|
tokens?: string[];
|
|
@@ -87,7 +87,7 @@ export declare type GetFileTokenResult = {
|
|
|
87
87
|
* @locale
|
|
88
88
|
*
|
|
89
89
|
* @locale en
|
|
90
|
-
*
|
|
90
|
+
* token-based authentication
|
|
91
91
|
* @locale
|
|
92
92
|
*/
|
|
93
93
|
token?: string;
|
|
@@ -98,7 +98,7 @@ export declare type GetFileTokenResult = {
|
|
|
98
98
|
* @locale
|
|
99
99
|
*
|
|
100
100
|
* @locale en
|
|
101
|
-
*
|
|
101
|
+
* the validity period of a token
|
|
102
102
|
* @locale
|
|
103
103
|
*/
|
|
104
104
|
ttl: number;
|
|
@@ -111,6 +111,7 @@ export declare type NIMEModuleParamCloudStorageConfig = {
|
|
|
111
111
|
* @locale
|
|
112
112
|
*
|
|
113
113
|
* @locale en
|
|
114
|
+
* Upload address (direct)
|
|
114
115
|
* @locale
|
|
115
116
|
*/
|
|
116
117
|
commonUploadHost?: string;
|
|
@@ -121,6 +122,7 @@ export declare type NIMEModuleParamCloudStorageConfig = {
|
|
|
121
122
|
* @locale
|
|
122
123
|
*
|
|
123
124
|
* @locale en
|
|
125
|
+
* NOS upload address (chunks)
|
|
124
126
|
* @locale
|
|
125
127
|
*/
|
|
126
128
|
chunkUploadHost?: string;
|
|
@@ -131,6 +133,7 @@ export declare type NIMEModuleParamCloudStorageConfig = {
|
|
|
131
133
|
* @locale
|
|
132
134
|
*
|
|
133
135
|
* @locale en
|
|
136
|
+
* Wildcard address of the file URL in the file message, for example: 'https://{host}/{object}'.
|
|
134
137
|
* @locale
|
|
135
138
|
*/
|
|
136
139
|
uploadReplaceFormat?: string;
|
|
@@ -143,6 +146,9 @@ export declare type NIMEModuleParamCloudStorageConfig = {
|
|
|
143
146
|
* @locale
|
|
144
147
|
*
|
|
145
148
|
* @locale en
|
|
149
|
+
* The template for the URL of the received file of a file message
|
|
150
|
+
* If a file messages is received, the URL of a file is replaced with a specified patten for a secured download URL
|
|
151
|
+
* Example: 'https://{bucket}-nosdn.netease.im/{object}'
|
|
146
152
|
* @locale
|
|
147
153
|
*/
|
|
148
154
|
downloadUrl?: string;
|
|
@@ -153,6 +159,7 @@ export declare type NIMEModuleParamCloudStorageConfig = {
|
|
|
153
159
|
* @locale
|
|
154
160
|
*
|
|
155
161
|
* @locale en
|
|
162
|
+
* The received addresses to be replaced with downloadUrl, for example: nos.netease.com/{bucket}/{obj}.
|
|
156
163
|
* @locale
|
|
157
164
|
*/
|
|
158
165
|
downloadHostList?: string[];
|
|
@@ -163,6 +170,7 @@ export declare type NIMEModuleParamCloudStorageConfig = {
|
|
|
163
170
|
* @locale
|
|
164
171
|
*
|
|
165
172
|
* @locale en
|
|
173
|
+
* If the domain name issued by the server exists and the object prefix matches, it will be forcibly replaced with `${protocol}${serverCdnDomain}/${decodePath.slice(prefixIndex)}`
|
|
166
174
|
* @locale
|
|
167
175
|
*/
|
|
168
176
|
nosCdnEnable?: boolean;
|
|
@@ -7,15 +7,36 @@ import { EventEmitter } from 'eventemitter3';
|
|
|
7
7
|
export default class Chatroom extends EventEmitter<ChatroomEventInterface> implements ChatroomInterface {
|
|
8
8
|
static instance: Chatroom | null;
|
|
9
9
|
/**
|
|
10
|
+
* @Multi_Lang_Tag
|
|
11
|
+
* @locale cn
|
|
10
12
|
* 实例的状态
|
|
13
|
+
* @locale
|
|
14
|
+
*
|
|
15
|
+
* @locale en
|
|
16
|
+
* The state of an instance
|
|
17
|
+
* @locale
|
|
11
18
|
*/
|
|
12
19
|
status: NIMEChatroomInstanceStatus;
|
|
13
20
|
/**
|
|
21
|
+
* @Multi_Lang_Tag
|
|
22
|
+
* @locale cn
|
|
14
23
|
* 账号
|
|
24
|
+
* @locale
|
|
25
|
+
*
|
|
26
|
+
* @locale en
|
|
27
|
+
* Account
|
|
28
|
+
* @locale
|
|
15
29
|
*/
|
|
16
30
|
account: string;
|
|
17
31
|
/**
|
|
32
|
+
* @Multi_Lang_Tag
|
|
33
|
+
* @locale cn
|
|
18
34
|
* 连接参数
|
|
35
|
+
* @locale
|
|
36
|
+
*
|
|
37
|
+
* @locale en
|
|
38
|
+
* Connection parameters
|
|
39
|
+
* @locale
|
|
19
40
|
*/
|
|
20
41
|
options: ChatroomInitializeOptions;
|
|
21
42
|
chatroom: ChatroomServiceInterface;
|
|
@@ -28,12 +49,27 @@ export default class Chatroom extends EventEmitter<ChatroomEventInterface> imple
|
|
|
28
49
|
disconnect(): Promise<void>;
|
|
29
50
|
destroy(): Promise<void>;
|
|
30
51
|
/**
|
|
52
|
+
* @Multi_Lang_Tag
|
|
53
|
+
* @locale cn
|
|
31
54
|
* 单例模式获取实例
|
|
55
|
+
* @locale
|
|
56
|
+
*
|
|
57
|
+
* @locale en
|
|
58
|
+
* Get an instance in singleton mode
|
|
59
|
+
* @locale
|
|
32
60
|
*/
|
|
33
61
|
static getInstance(_options?: ChatroomInitializeOptions, _otherOptions?: ChatroomOtherOptions): Chatroom;
|
|
34
62
|
/**
|
|
63
|
+
* @Multi_Lang_Tag
|
|
64
|
+
* @locale cn
|
|
35
65
|
* 设置适配器
|
|
36
66
|
* @param _newAdapters 适配器
|
|
67
|
+
* @locale
|
|
68
|
+
*
|
|
69
|
+
* @locale en
|
|
70
|
+
* Set an adapter
|
|
71
|
+
* @param _newAdapters adapter
|
|
72
|
+
* @locale
|
|
37
73
|
*/
|
|
38
74
|
static setAdapters(_newAdapters: any): void;
|
|
39
75
|
}
|