node-nim 10.5.2 → 10.6.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.
Files changed (67) hide show
  1. package/dist/nim/msglog.js +8 -0
  2. package/dist/nim/msglog.js.map +1 -1
  3. package/dist/v2/v2_nim_ai_service.js.map +1 -1
  4. package/dist/v2/v2_nim_chatroom_client.js +153 -40
  5. package/dist/v2/v2_nim_chatroom_client.js.map +1 -1
  6. package/dist/v2/v2_nim_chatroom_queue_service.js +148 -0
  7. package/dist/v2/v2_nim_chatroom_queue_service.js.map +1 -0
  8. package/dist/v2/v2_nim_chatroom_service.js +201 -65
  9. package/dist/v2/v2_nim_chatroom_service.js.map +1 -1
  10. package/dist/v2/v2_nim_client.js +116 -25
  11. package/dist/v2/v2_nim_client.js.map +1 -1
  12. package/dist/v2/v2_nim_conversation_group_service.js +57 -9
  13. package/dist/v2/v2_nim_conversation_group_service.js.map +1 -1
  14. package/dist/v2/v2_nim_conversation_service.js +149 -27
  15. package/dist/v2/v2_nim_conversation_service.js.map +1 -1
  16. package/dist/v2/v2_nim_friend_service.js +152 -36
  17. package/dist/v2/v2_nim_friend_service.js.map +1 -1
  18. package/dist/v2/v2_nim_login_service.js +66 -14
  19. package/dist/v2/v2_nim_login_service.js.map +1 -1
  20. package/dist/v2/v2_nim_message_service.js +335 -93
  21. package/dist/v2/v2_nim_message_service.js.map +1 -1
  22. package/dist/v2/v2_nim_notification_service.js +11 -4
  23. package/dist/v2/v2_nim_notification_service.js.map +1 -1
  24. package/dist/v2/v2_nim_passthrough_service.js +39 -0
  25. package/dist/v2/v2_nim_passthrough_service.js.map +1 -0
  26. package/dist/v2/v2_nim_setting_service.js +81 -29
  27. package/dist/v2/v2_nim_setting_service.js.map +1 -1
  28. package/dist/v2/v2_nim_signalling_service.js +172 -44
  29. package/dist/v2/v2_nim_signalling_service.js.map +1 -1
  30. package/dist/v2/v2_nim_storage_service.js +116 -37
  31. package/dist/v2/v2_nim_storage_service.js.map +1 -1
  32. package/dist/v2/v2_nim_subscription_service.js +42 -12
  33. package/dist/v2/v2_nim_subscription_service.js.map +1 -1
  34. package/dist/v2/v2_nim_team_service.js +349 -140
  35. package/dist/v2/v2_nim_team_service.js.map +1 -1
  36. package/dist/v2/v2_nim_user_service.js +62 -19
  37. package/dist/v2/v2_nim_user_service.js.map +1 -1
  38. package/dist/v2/v2_nim_utilities.js +306 -129
  39. package/dist/v2/v2_nim_utilities.js.map +1 -1
  40. package/dist/v2_def/v2_nim_enum_def.js +14 -3
  41. package/dist/v2_def/v2_nim_enum_def.js.map +1 -1
  42. package/dist/v2_def/v2_nim_struct_def.js +0 -2
  43. package/dist/v2_def/v2_nim_struct_def.js.map +1 -1
  44. package/package.json +1 -1
  45. package/types/nim/msglog.d.ts +7 -1
  46. package/types/nim_def/msglog_def.d.ts +2 -0
  47. package/types/v2/v2_nim_ai_service.d.ts +3 -3
  48. package/types/v2/v2_nim_chatroom_client.d.ts +153 -42
  49. package/types/v2/v2_nim_chatroom_queue_service.d.ts +96 -0
  50. package/types/v2/v2_nim_chatroom_service.d.ts +203 -67
  51. package/types/v2/v2_nim_client.d.ts +117 -30
  52. package/types/v2/v2_nim_conversation_group_service.d.ts +59 -11
  53. package/types/v2/v2_nim_conversation_service.d.ts +151 -29
  54. package/types/v2/v2_nim_friend_service.d.ts +139 -39
  55. package/types/v2/v2_nim_login_service.d.ts +70 -15
  56. package/types/v2/v2_nim_message_service.d.ts +337 -95
  57. package/types/v2/v2_nim_notification_service.d.ts +13 -6
  58. package/types/v2/v2_nim_passthrough_service.d.ts +25 -0
  59. package/types/v2/v2_nim_setting_service.d.ts +83 -31
  60. package/types/v2/v2_nim_signalling_service.d.ts +174 -46
  61. package/types/v2/v2_nim_storage_service.d.ts +119 -40
  62. package/types/v2/v2_nim_subscription_service.d.ts +44 -14
  63. package/types/v2/v2_nim_team_service.d.ts +335 -142
  64. package/types/v2/v2_nim_user_service.d.ts +64 -21
  65. package/types/v2/v2_nim_utilities.d.ts +306 -129
  66. package/types/v2_def/v2_nim_enum_def.d.ts +10 -0
  67. package/types/v2_def/v2_nim_struct_def.d.ts +48 -8
@@ -3,74 +3,135 @@ import { EventEmitter } from 'eventemitter3';
3
3
  import { V2NIMConversationType } from 'ts/v2_def/v2_nim_enum_def';
4
4
  /** @brief 消息创建器 */
5
5
  export declare class V2NIMMessageCreator {
6
- /** @brief 创建文本消息 */
7
- /** @param text 文本内容 */
8
- /** @return V2NIMMessage */
6
+ /**
7
+ * @brief 创建文本消息
8
+ * @param text 文本内容
9
+ * @returns V2NIMMessage
10
+ * @example
11
+ * ```javascript
12
+ * const message = v2.messageCreator.createTextMessage('Hello, world!')
13
+ * ```
14
+ */
9
15
  static createTextMessage(text: string): V2NIMMessage | null;
10
16
  createTextMessage(text: string): V2NIMMessage | null;
11
- /** @brief 创建图片消息 */
12
- /** @param imagePath 图片路径 */
13
- /** @param name 文件显示名称, 为空则使用文件名 */
14
- /** @param sceneName 文件存储场景 */
15
- /** @param width 图片宽度 */
16
- /** @param height 图片高度 */
17
- /** @return V2NIMMessage */
17
+ /**
18
+ * @brief 创建图片消息
19
+ * @param imagePath 图片路径
20
+ * @param name 文件显示名称, 为空则使用文件名
21
+ * @param sceneName 文件存储场景
22
+ * @param width 图片宽度
23
+ * @param height 图片高度
24
+ * @returns V2NIMMessage
25
+ * @example
26
+ * ```javascript
27
+ * const message = v2.messageCreator.createImageMessage(imagePath, name, sceneName, width, height)
28
+ * ```
29
+ */
18
30
  static createImageMessage(imagePath: string, name: string, sceneName: string, width: number, height: number): V2NIMMessage | null;
19
31
  createImageMessage(imagePath: string, name: string, sceneName: string, width: number, height: number): V2NIMMessage | null;
20
- /** @brief 创建音频消息 */
21
- /** @param audioPath 音频路径 */
22
- /** @param name 文件显示名称, 为空则使用文件名 */
23
- /** @param sceneName 文件存储场景 */
24
- /** @param duration 音频时长 */
25
- /** @return V2NIMMessage */
32
+ /**
33
+ * @brief 创建音频消息
34
+ * @param audioPath 音频路径
35
+ * @param name 文件显示名称, 为空则使用文件名
36
+ * @param sceneName 文件存储场景
37
+ * @param duration 音频时长
38
+ * @returns V2NIMMessage
39
+ * @example
40
+ * ```javascript
41
+ * const message = v2.messageCreator.createAudioMessage(audioPath, name, sceneName, duration)
42
+ * ```
43
+ */
26
44
  static createAudioMessage(audioPath: string, name: string, sceneName: string, duration: number): V2NIMMessage | null;
27
45
  createAudioMessage(audioPath: string, name: string, sceneName: string, duration: number): V2NIMMessage | null;
28
- /** @brief 创建视频消息 */
29
- /** @param videoPath 视频路径 */
30
- /** @param name 文件显示名称, 为空则使用文件名 */
31
- /** @param sceneName 文件存储场景 */
32
- /** @param duration 视频时长 */
33
- /** @param width 视频宽度 */
34
- /** @param height 视频高度 */
35
- /** @return V2NIMMessage */
46
+ /**
47
+ * @brief 创建视频消息
48
+ * @param videoPath 视频路径
49
+ * @param name 文件显示名称, 为空则使用文件名
50
+ * @param sceneName 文件存储场景
51
+ * @param duration 视频时长
52
+ * @param width 视频宽度
53
+ * @param height 视频高度
54
+ * @returns V2NIMMessage
55
+ * @example
56
+ * ```javascript
57
+ * const message = v2.messageCreator.createVideoMessage(videoPath, name, sceneName, duration, width, height)
58
+ * ```
59
+ */
36
60
  static createVideoMessage(videoPath: string, name: string, sceneName: string, duration: number, width: number, height: number): V2NIMMessage | null;
37
61
  createVideoMessage(videoPath: string, name: string, sceneName: string, duration: number, width: number, height: number): V2NIMMessage | null;
38
- /** @brief 创建文件消息 */
39
- /** @param filePath 文件路径 */
40
- /** @param name 文件显示名称, 为空则使用文件名 */
41
- /** @param sceneName 文件存储场景 */
42
- /** @return V2NIMMessage */
62
+ /**
63
+ * @brief 创建文件消息
64
+ * @param filePath 文件路径
65
+ * @param name 文件显示名称, 为空则使用文件名
66
+ * @param sceneName 文件存储场景
67
+ * @returns V2NIMMessage
68
+ * @example
69
+ * ```javascript
70
+ * const message = v2.messageCreator.createFileMessage(filePath, name, sceneName)
71
+ * ```
72
+ */
43
73
  static createFileMessage(filePath: string, name: string, sceneName: string): V2NIMMessage | null;
44
74
  createFileMessage(filePath: string, name: string, sceneName: string): V2NIMMessage | null;
45
- /** @brief 创建位置消息 */
46
- /** @param latitude 纬度 */
47
- /** @param longitude 经度 */
48
- /** @param address 详细位置信息 */
49
- /** @return V2NIMMessage */
75
+ /**
76
+ * @brief 创建位置消息
77
+ * @param latitude 纬度
78
+ * @param longitude 经度
79
+ * @param address 详细位置信息
80
+ * @returns V2NIMMessage
81
+ * @example
82
+ * ```javascript
83
+ * const message = v2.messageCreator.createLocationMessage(latitude, longitude, address)
84
+ * ```
85
+ */
50
86
  static createLocationMessage(latitude: number, longitude: number, address: string): V2NIMMessage | null;
51
87
  createLocationMessage(latitude: number, longitude: number, address: string): V2NIMMessage | null;
52
- /** @brief 创建自定义消息 */
53
- /** @param text 文本内容 */
54
- /** @param rawAttachment 附件 */
55
- /** @return V2NIMMessage */
88
+ /**
89
+ * @brief 创建自定义消息
90
+ * @param text 文本内容
91
+ * @param rawAttachment 附件
92
+ * @returns V2NIMMessage
93
+ * @example
94
+ * ```javascript
95
+ * const message = v2.messageCreator.createCustomMessage(text, rawAttachment)
96
+ * ```
97
+ */
56
98
  static createCustomMessage(text: string, rawAttachment: string): V2NIMMessage | null;
57
99
  createCustomMessage(text: string, rawAttachment: string): V2NIMMessage | null;
58
- /** @brief 创建提示消息 */
59
- /** @param text 文本内容 */
60
- /** @return V2NIMMessage */
100
+ /**
101
+ * @brief 创建提示消息
102
+ * @param text 文本内容
103
+ * @returns V2NIMMessage
104
+ * @example
105
+ * ```javascript
106
+ * const message = v2.messageCreator.createTipsMessage(text)
107
+ * ```
108
+ */
61
109
  static createTipsMessage(text: string): V2NIMMessage | null;
62
110
  createTipsMessage(text: string): V2NIMMessage | null;
63
- /** @brief 创建转发消息 */
64
- /** @param message 原消息 */
65
- /** @return V2NIMMessage */
111
+ /**
112
+ * @brief 创建转发消息
113
+ * @param message 原消息
114
+ * @returns V2NIMMessage
115
+ * @example
116
+ * ```javascript
117
+ * const message = v2.messageCreator.createForwardMessage(message)
118
+ * ```
119
+ */
66
120
  static createForwardMessage(message: V2NIMMessage): V2NIMMessage | null;
67
121
  createForwardMessage(message: V2NIMMessage): V2NIMMessage | null;
68
- /** @brief 创建话单类消息 */
69
- /** @param callType 话单类型,业务自定义,内容不校验 */
70
- /** @param channelId 话单频道 ID,内容不校验 */
71
- /** @param status 通话状态,业务自定义状态,内容不校验 */
72
- /** @param durations 通话成员时长列表,内容不校验 */
73
- /** @param text 话单描述 */
122
+ /**
123
+ * @brief 创建话单类消息
124
+ * @param callType 话单类型,业务自定义,内容不校验
125
+ * @param channelId 话单频道 ID,内容不校验
126
+ * @param status 通话状态,业务自定义状态,内容不校验
127
+ * @param durations 通话成员时长列表,内容不校验
128
+ * @param text 话单描述
129
+ * @returns V2NIMMessage
130
+ * @example
131
+ * ```javascript
132
+ * const message = v2.messageCreator.createCallMessage(callType, channelId, status, durations, text)
133
+ * ```
134
+ */
74
135
  static createCallMessage(callType: number, channelId: string, status: number, durations: Array<V2NIMMessageCallDuration>, text: string): V2NIMMessage | null;
75
136
  createCallMessage(callType: number, channelId: string, status: number, durations: Array<V2NIMMessageCallDuration>, text: string): V2NIMMessage;
76
137
  }
@@ -79,136 +140,252 @@ export declare class V2NIMMessageConverter {
79
140
  /**
80
141
  * @brief 将消息序列化为 Json 字符串
81
142
  * @param message V2NIMMessage 消息对象
82
- * @return string
143
+ * @returns string
144
+ * @example
145
+ * ```javascript
146
+ * const jsonString = v2.messageConverter.messageSerialization(message)
147
+ * ```
83
148
  */
84
149
  messageSerialization(message: V2NIMMessage): string | null;
85
150
  /**
86
151
  * @brief 将 Json 字符串反序列化为消息对象
87
152
  * @param message Json 字符串
88
- * @return V2NIMMessage
153
+ * @returns V2NIMMessage
154
+ * @example
155
+ * ```javascript
156
+ * const message = v2.messageConverter.messageDeserialization(jsonString)
157
+ * ```
89
158
  */
90
159
  messageDeserialization(message: string): V2NIMMessage | null;
91
160
  }
92
161
  /** @brief 会话ID工具 */
93
162
  export declare class V2NIMConversationIdUtil {
94
- /** @brief 获取点对点会话ID */
95
- /** @param accountId 账号ID */
96
- /** @return string */
163
+ /**
164
+ * @brief 获取点对点会话ID
165
+ * @param accountId 账号ID
166
+ * @returns string
167
+ * @example
168
+ * ```javascript
169
+ * const conversationId = v2.conversationIdUtil.p2pConversationId(accountId)
170
+ * ```
171
+ */
97
172
  static p2pConversationId(accountId: string): string;
98
173
  p2pConversationId(accountId: string): string;
99
- /** @brief 获取群组会话ID */
100
- /** @param teamId 群组ID */
101
- /** @return string */
174
+ /**
175
+ * @brief 获取群组会话ID
176
+ * @param teamId 群组ID
177
+ * @returns string
178
+ * @example
179
+ * ```javascript
180
+ * const conversationId = v2.conversationIdUtil.teamConversationId(teamId)
181
+ * ```
182
+ */
102
183
  static teamConversationId(teamId: string): string;
103
184
  teamConversationId(teamId: string): string;
104
- /** @brief 获取超级群会话ID */
105
- /** @param superTeamId 超级群ID */
106
- /** @return string */
185
+ /**
186
+ * @brief 获取超级群会话ID
187
+ * @param superTeamId 超级群ID
188
+ * @returns string
189
+ * @example
190
+ * ```javascript
191
+ * const conversationId = v2.conversationIdUtil.superTeamConversationId(superTeamId)
192
+ * ```
193
+ */
107
194
  static superTeamConversationId(superTeamId: string): string;
108
195
  superTeamConversationId(superTeamId: string): string;
109
- /** @brief 获取会话ID对应的会话类型 */
110
- /** @param conversationId 会话ID */
111
- /** @return V2NIMConversationType */
196
+ /**
197
+ * @brief 获取会话ID对应的会话类型
198
+ * @param conversationId 会话ID
199
+ * @returns V2NIMConversationType
200
+ * @example
201
+ * ```javascript
202
+ * const conversationType = v2.conversationIdUtil.parseConversationType(conversationId)
203
+ * ```
204
+ */
112
205
  static parseConversationType(conversationId: string): V2NIMConversationType;
113
206
  parseConversationType(conversationId: string): V2NIMConversationType;
114
- /** @brief 获取会话ID对应的目标ID */
115
- /** @param conversationId 会话ID */
116
- /** @return string */
207
+ /**
208
+ * @brief 获取会话ID对应的目标ID
209
+ * @param conversationId 会话ID
210
+ * @returns string
211
+ * @example
212
+ * ```javascript
213
+ * const targetId = v2.conversationIdUtil.parseConversationTargetId(conversationId)
214
+ * ```
215
+ */
117
216
  static parseConversationTargetId(conversationId: string): string;
118
217
  parseConversationTargetId(conversationId: string): string;
119
218
  }
120
219
  /** @brief 本地反垃圾工具 */
121
220
  export declare class V2NIMClientAntispamUtil {
122
- /** @brief 文本本地反垃圾 */
123
- /** @param text 需要本地反垃圾check的文本 */
124
- /** @param replace 敏感内容替换词 */
125
- /** @return V2NIMMessage */
221
+ /**
222
+ * @brief 文本本地反垃圾
223
+ * @param text 需要本地反垃圾check的文本
224
+ * @param replace 敏感内容替换词
225
+ * @returns V2NIMClientAntispamResult
226
+ * @example
227
+ * ```javascript
228
+ * const result = v2.clientAntispamUtil.checkTextAntispam(text, replace)
229
+ * ```
230
+ */
126
231
  static checkTextAntispam(text: string, replace: string): V2NIMClientAntispamResult;
127
232
  checkTextAntispam(text: string, replace: string): V2NIMClientAntispamResult;
128
233
  }
129
234
  /** @brief 聊天室消息创建器 */
130
235
  export declare class V2NIMChatroomMessageCreator extends EventEmitter {
131
- /** @brief 创建文本消息 */
132
- /** @param text 文本内容 */
133
- /** @return V2NIMChatroomMessage */
236
+ /**
237
+ * @brief 创建文本消息
238
+ * @param text 文本内容
239
+ * @returns V2NIMChatroomMessage
240
+ * @example
241
+ * ```javascript
242
+ * const message = v2.chatroomMessageCreator.createTextMessage(text)
243
+ * ```
244
+ */
134
245
  static createTextMessage(text: string): V2NIMChatroomMessage | null;
135
246
  createTextMessage(text: string): V2NIMChatroomMessage | null;
136
- /** @brief 创建图片消息 */
137
- /** @param imagePath 图片路径 */
138
- /** @param name 文件显示名称, 为空则使用文件名 */
139
- /** @param sceneName 文件存储场景 */
140
- /** @param width 图片宽度 */
141
- /** @param height 图片高度 */
142
- /** @return V2NIMChatroomMessage */
247
+ /**
248
+ * @brief 创建图片消息
249
+ * @param imagePath 图片路径
250
+ * @param name 文件显示名称, 为空则使用文件名
251
+ * @param sceneName 文件存储场景
252
+ * @param width 图片宽度
253
+ * @param height 图片高度
254
+ * @returns V2NIMChatroomMessage
255
+ * @example
256
+ * ```javascript
257
+ * const message = v2.chatroomMessageCreator.createImageMessage(imagePath, name, sceneName, width, height)
258
+ * ```
259
+ */
143
260
  static createImageMessage(imagePath: string, name: string, sceneName: string, width: number, height: number): V2NIMChatroomMessage | null;
144
261
  createImageMessage(imagePath: string, name: string, sceneName: string, width: number, height: number): V2NIMChatroomMessage | null;
145
- /** @brief 创建音频消息 */
146
- /** @param audioPath 音频路径 */
147
- /** @param name 文件显示名称, 为空则使用文件名 */
148
- /** @param sceneName 文件存储场景 */
149
- /** @param duration 音频时长 */
150
- /** @return V2NIMChatroomMessage */
262
+ /**
263
+ * @brief 创建音频消息
264
+ * @param audioPath 音频路径
265
+ * @param name 文件显示名称, 为空则使用文件名
266
+ * @param sceneName 文件存储场景
267
+ * @param duration 音频时长
268
+ * @returns V2NIMChatroomMessage
269
+ * @example
270
+ * ```javascript
271
+ * const message = v2.chatroomMessageCreator.createAudioMessage(audioPath, name, sceneName, duration)
272
+ * ```
273
+ */
151
274
  static createAudioMessage(audioPath: string, name: string, sceneName: string, duration: number): V2NIMChatroomMessage | null;
152
275
  createAudioMessage(audioPath: string, name: string, sceneName: string, duration: number): V2NIMChatroomMessage | null;
153
- /** @brief 创建视频消息 */
154
- /** @param videoPath 视频路径 */
155
- /** @param name 文件显示名称, 为空则使用文件名 */
156
- /** @param sceneName 文件存储场景 */
157
- /** @param duration 视频时长 */
158
- /** @param width 视频宽度 */
159
- /** @param height 视频高度 */
160
- /** @return V2NIMChatroomMessage */
276
+ /**
277
+ * @brief 创建视频消息
278
+ * @param videoPath 视频路径
279
+ * @param name 文件显示名称, 为空则使用文件名
280
+ * @param sceneName 文件存储场景
281
+ * @param duration 视频时长
282
+ * @param width 视频宽度
283
+ * @param height 视频高度
284
+ * @returns V2NIMChatroomMessage
285
+ * @example
286
+ * ```javascript
287
+ * const message = v2.chatroomMessageCreator.createVideoMessage(videoPath, name, sceneName, duration, width, height)
288
+ * ```
289
+ */
161
290
  static createVideoMessage(videoPath: string, name: string, sceneName: string, duration: number, width: number, height: number): V2NIMChatroomMessage | null;
162
291
  createVideoMessage(videoPath: string, name: string, sceneName: string, duration: number, width: number, height: number): V2NIMChatroomMessage | null;
163
- /** @brief 创建文件消息 */
164
- /** @param filePath 文件路径 */
165
- /** @param name 文件显示名称, 为空则使用文件名 */
166
- /** @param sceneName 文件存储场景 */
167
- /** @return V2NIMChatroomMessage */
292
+ /**
293
+ * @brief 创建文件消息
294
+ * @param filePath 文件路径
295
+ * @param name 文件显示名称, 为空则使用文件名
296
+ * @param sceneName 文件存储场景
297
+ * @returns V2NIMChatroomMessage
298
+ * @example
299
+ * ```javascript
300
+ * const message = v2.chatroomMessageCreator.createFileMessage(filePath, name, sceneName)
301
+ * ```
302
+ */
168
303
  static createFileMessage(filePath: string, name: string, sceneName: string): V2NIMChatroomMessage | null;
169
304
  createFileMessage(filePath: string, name: string, sceneName: string): V2NIMChatroomMessage | null;
170
- /** @brief 创建位置消息 */
171
- /** @param latitude 纬度 */
172
- /** @param longitude 经度 */
173
- /** @param address 详细位置信息 */
174
- /** @return V2NIMChatroomMessage */
305
+ /**
306
+ * @brief 创建位置消息
307
+ * @param latitude 纬度
308
+ * @param longitude 经度
309
+ * @param address 详细位置信息
310
+ * @returns V2NIMChatroomMessage
311
+ * @example
312
+ * ```javascript
313
+ * const message = v2.chatroomMessageCreator.createLocationMessage(latitude, longitude, address)
314
+ * ```
315
+ */
175
316
  static createLocationMessage(latitude: number, longitude: number, address: string): V2NIMChatroomMessage | null;
176
317
  createLocationMessage(latitude: number, longitude: number, address: string): V2NIMChatroomMessage | null;
177
- /** @brief 创建自定义消息 */
178
- /** @param rawAttachment 自定义附件 */
179
- /** @return V2NIMChatroomMessage */
318
+ /**
319
+ * @brief 创建自定义消息
320
+ * @param rawAttachment 自定义附件
321
+ * @returns V2NIMChatroomMessage
322
+ * @example
323
+ * ```javascript
324
+ * const message = v2.chatroomMessageCreator.createCustomMessage(rawAttachment)
325
+ * ```
326
+ */
180
327
  static createCustomMessage(rawAttachment: string): V2NIMChatroomMessage | null;
181
328
  createCustomMessage(rawAttachment: string): V2NIMChatroomMessage | null;
182
- /** @brief 创建提示消息 */
183
- /** @param text 文本内容 */
184
- /** @return V2NIMChatroomMessage */
329
+ /**
330
+ * @brief 创建提示消息
331
+ * @param text 文本内容
332
+ * @returns V2NIMChatroomMessage
333
+ * @example
334
+ * ```javascript
335
+ * const message = v2.chatroomMessageCreator.createTipsMessage(text)
336
+ * ```
337
+ */
185
338
  static createTipsMessage(text: string): V2NIMChatroomMessage | null;
186
339
  createTipsMessage(text: string): V2NIMChatroomMessage | null;
187
- /** @brief 创建转发消息 */
188
- /** @param message 原消息 */
189
- /** @return V2NIMChatroomMessage */
340
+ /**
341
+ * @brief 创建转发消息
342
+ * @param message 原消息
343
+ * @returns V2NIMChatroomMessage
344
+ * @example
345
+ * ```javascript
346
+ * const message = v2.chatroomMessageCreator.createForwardMessage(message)
347
+ * ```
348
+ */
190
349
  static createForwardMessage(message: V2NIMChatroomMessage): V2NIMChatroomMessage | null;
191
350
  createForwardMessage(message: V2NIMChatroomMessage): V2NIMChatroomMessage | null;
192
351
  }
193
352
  export declare class V2NIMStorageUtil {
194
- /** @brief 生成图片缩略图链接 */
195
- /** @param uri 图片原始链接 */
196
- /** @param thumbSize 缩放的尺寸,如指定为 150,则取 150*150 */
197
- /** @return string 图片缩略图链接 */
353
+ /**
354
+ * @brief 生成图片缩略图链接
355
+ * @param uri 图片原始链接
356
+ * @param thumbSize 缩放的尺寸,如指定为 150,则取 150*150
357
+ * @returns string 图片缩略图链接
358
+ * @example
359
+ * ```javascript
360
+ * const url = v2.storageUtil.imageThumbUrl(uri, thumbSize)
361
+ * ```
362
+ */
198
363
  imageThumbUrl(uri: string, thumbSize: Number): string;
199
- /** @brief 生成视频封面链接 */
200
- /** @param uri 视频原始链接 */
201
- /** @param offset 截图时间点,单位:秒 */
202
- /** @param thumbSize 缩放的尺寸,如指定为 150,则取 150*150 */
203
- /** @param type 截图类型,如:png、jpeg */
204
- /** @return string 视频封面链接 */
364
+ /**
365
+ * @brief 生成视频封面链接
366
+ * @param uri 视频原始链接
367
+ * @param offset 截图时间点,单位:秒
368
+ * @param thumbSize 缩放的尺寸,如指定为 150,则取 150*150
369
+ * @param type 截图类型,如:png、jpeg
370
+ * @returns string 视频封面链接
371
+ * @example
372
+ * ```javascript
373
+ * const url = v2.storageUtil.videoCoverUrl(uri, offset, thumbSize, type)
374
+ * ```
375
+ */
205
376
  videoCoverUrl(uri: string, offset: Number, thumbSize: Number, type: string): string;
206
377
  }
207
378
  export declare class V2NIMMessageAttachmentCreator {
208
- /** @brief 构造地理位置消息附件 */
209
- /** @param latitude 纬度 */
210
- /** @param longitude 经度 */
211
- /** @param address 详细位置信息 */
212
- /** @return V2NIMMessageLocationAttachment */
379
+ /**
380
+ * @brief 构造地理位置消息附件
381
+ * @param latitude 纬度
382
+ * @param longitude 经度
383
+ * @param address 详细位置信息
384
+ * @returns V2NIMMessageLocationAttachment
385
+ * @example
386
+ * ```javascript
387
+ * const attachment = v2.messageAttachmentCreator.createLocationMessageAttachment(latitude, longitude, address)
388
+ * ```
389
+ */
213
390
  createLocationMessageAttachment(latitude: number | null, longitude: number | null, address: string): V2NIMMessageLocationAttachment;
214
391
  }
@@ -1128,3 +1128,13 @@ export declare enum V2NIMUserStatusType {
1128
1128
  /** 断开连接 */
1129
1129
  V2NIM_USER_STATUS_TYPE_DISCONNECT = 3
1130
1130
  }
1131
+ export declare enum V2NIMProxyRequestMethod {
1132
+ /** GET 请求 */
1133
+ V2NIM_PROXY_REQUEST_METHOD_GET = 1,
1134
+ /** POST 请求 */
1135
+ V2NIM_PROXY_REQUEST_METHOD_POST = 2,
1136
+ /** PUT 请求 */
1137
+ V2NIM_PROXY_REQUEST_METHOD_PUT = 3,
1138
+ /** DELETE 请求 */
1139
+ V2NIM_PROXY_REQUEST_METHOD_DELETE = 4
1140
+ }
@@ -1,4 +1,4 @@
1
- import { V2NIMAIModelType, V2NIMAsymmetricEncryptionAlgorithm, V2NIMChatroomKickedReason, V2NIMChatroomMemberRole, V2NIMChatroomMessageNotificationType, V2NIMChatroomQueueChangeType, V2NIMChatroomQueueLevelMode, V2NIMClientAntispamOperateType, V2NIMClientAntispamThesaurusMatchType, V2NIMConversationType, V2NIMDataSyncLevel, V2NIMDataSyncState, V2NIMDataSyncType, V2NIMDownloadAttachmentType, V2NIMFCSAuthType, V2NIMFriendAddApplicationStatus, V2NIMFriendAddMode, V2NIMIPProtocolVersion, V2NIMKickedOfflineReason, V2NIMLastMessageState, V2NIMLoginAuthType, V2NIMLoginClientType, V2NIMMessageAttachmentUploadState, V2NIMMessageClientAntispamOperatorType, V2NIMMessageNotificationType, V2NIMMessagePinState, V2NIMMessageQuickCommentType, V2NIMMessageRevokeType, V2NIMMessageSendingState, V2NIMMessageType, V2NIMQueryDirection, V2NIMSDKLogLevel, V2NIMSignallingChannelType, V2NIMSignallingEventType, V2NIMSortOrder, V2NIMSQLCipherVersion, V2NIMSymmetricEncryptionAlgorithm, V2NIMTeamAgreeMode, V2NIMTeamChatBannedMode, V2NIMTeamInviteMode, V2NIMTeamJoinActionStatus, V2NIMTeamJoinActionType, V2NIMTeamJoinMode, V2NIMTeamMemberRole, V2NIMTeamMemberRoleQueryType, V2NIMTeamType, V2NIMTeamUpdateExtensionMode, V2NIMTeamUpdateInfoMode } from "./v2_nim_enum_def";
1
+ import { V2NIMAIModelType, V2NIMAsymmetricEncryptionAlgorithm, V2NIMChatroomKickedReason, V2NIMChatroomMemberRole, V2NIMChatroomMessageNotificationType, V2NIMChatroomQueueChangeType, V2NIMChatroomQueueLevelMode, V2NIMClientAntispamOperateType, V2NIMClientAntispamThesaurusMatchType, V2NIMConversationType, V2NIMDataSyncType, V2NIMDownloadAttachmentType, V2NIMFCSAuthType, V2NIMFriendAddApplicationStatus, V2NIMFriendAddMode, V2NIMIPProtocolVersion, V2NIMLoginAuthType, V2NIMLoginClientType, V2NIMMessageAttachmentUploadState, V2NIMMessageClientAntispamOperatorType, V2NIMMessageNotificationType, V2NIMMessagePinState, V2NIMMessageRevokeType, V2NIMMessageSendingState, V2NIMMessageType, V2NIMProxyRequestMethod, V2NIMQueryDirection, V2NIMSDKLogLevel, V2NIMSignallingChannelType, V2NIMSignallingEventType, V2NIMSortOrder, V2NIMSQLCipherVersion, V2NIMSymmetricEncryptionAlgorithm, V2NIMTeamAgreeMode, V2NIMTeamChatBannedMode, V2NIMTeamInviteMode, V2NIMTeamJoinActionStatus, V2NIMTeamJoinActionType, V2NIMTeamJoinMode, V2NIMTeamMemberRole, V2NIMTeamMemberRoleQueryType, V2NIMTeamType, V2NIMTeamUpdateExtensionMode, V2NIMTeamUpdateInfoMode } from './v2_nim_enum_def';
2
2
  export interface V2NIMError {
3
3
  /** 错误码, 详见 V2NIMErrorCode */
4
4
  code?: number;
@@ -760,7 +760,7 @@ export interface V2NIMMessageQuickComment {
760
760
  }
761
761
  export interface V2NIMMessageQuickCommentNotification {
762
762
  /** 快捷评论操作类型 */
763
- operationType?: V2NIMMessageQuickCommentType;
763
+ operationType?: V2NIMMessageQuickComment;
764
764
  /** 快捷评论 */
765
765
  quickComment?: V2NIMMessageQuickComment;
766
766
  }
@@ -859,11 +859,11 @@ export interface V2NIMLoginOption {
859
859
  /** 登陆扩展信息获取回调 */
860
860
  loginExtensionProvider?: V2NIMLoginExtensionProvider;
861
861
  /** 数据同步等级 */
862
- syncLevel?: V2NIMDataSyncLevel;
862
+ syncLevel?: V2NIMDataSyncDetail;
863
863
  }
864
864
  export interface V2NIMLoginClient {
865
865
  /** 客户端类型 */
866
- type?: V2NIMLoginClientType;
866
+ type?: V2NIMLoginClient;
867
867
  /** 操作系统 */
868
868
  os?: string;
869
869
  /** 登录时间 */
@@ -879,11 +879,11 @@ export interface V2NIMLoginClient {
879
879
  }
880
880
  export interface V2NIMKickedOfflineDetail {
881
881
  /** 原因 */
882
- reason?: V2NIMKickedOfflineReason;
882
+ reason?: V2NIMKickedOfflineDetail;
883
883
  /** 说明 */
884
884
  reasonDesc?: string;
885
885
  /** 客户端类型 */
886
- clientType?: V2NIMLoginClientType;
886
+ clientType?: V2NIMLoginClient;
887
887
  /** 自定义客户端类型 */
888
888
  customClientType?: number;
889
889
  }
@@ -891,11 +891,11 @@ export interface V2NIMDataSyncDetail {
891
891
  /** 数据同步类型 */
892
892
  type?: V2NIMDataSyncType;
893
893
  /** 数据同步状态 */
894
- state?: V2NIMDataSyncState;
894
+ state?: V2NIMDataSyncDetail;
895
895
  }
896
896
  export interface V2NIMLastMessage {
897
897
  /** 最后一条消息状态 */
898
- lastMessageState?: V2NIMLastMessageState;
898
+ lastMessageState?: V2NIMMessagePinState;
899
899
  /** 最后一条消息引用 */
900
900
  messageRefer?: V2NIMMessageRefer;
901
901
  /** 最后一条消息类型 */
@@ -1735,6 +1735,18 @@ export interface V2NIMChatroomQueueOfferParams {
1735
1735
  /** 元素属于的账号 */
1736
1736
  elementOwnerAccountId?: string;
1737
1737
  }
1738
+ export interface V2NIMChatroomQueueElement {
1739
+ /** 元素的唯一 key */
1740
+ key: string;
1741
+ /** 元素的值 */
1742
+ value: string;
1743
+ /** 该元素所属于的账号 */
1744
+ accountId?: string;
1745
+ /** 该元素所属于的账号的昵称 */
1746
+ nick?: string;
1747
+ /** 其他的扩展字段 JSON String */
1748
+ extension?: string;
1749
+ }
1738
1750
  export interface V2NIMUploadFileParams {
1739
1751
  /** 文件地址 */
1740
1752
  filePath?: string;
@@ -2039,3 +2051,31 @@ export interface V2NIMUserStatus {
2039
2051
  /** 获取预留状态中的配置信息,由服务端填入 JSON array 格式 */
2040
2052
  serverExtension?: string;
2041
2053
  }
2054
+ /** @brief HTTP 代理请求参数 */
2055
+ export interface V2NIMProxyRequest {
2056
+ /** 请求路径 */
2057
+ path: string;
2058
+ /** 请求方法 */
2059
+ method: V2NIMProxyRequestMethod;
2060
+ /** 映射一个请求地址,不传使用服务器默认的配置 */
2061
+ zone?: string;
2062
+ /** 请求头 */
2063
+ header?: string;
2064
+ /** 请求体 */
2065
+ body?: string;
2066
+ }
2067
+ /** @brief HTTP 代理响应 */
2068
+ export interface V2NIMProxyResponse {
2069
+ /** 响应头 */
2070
+ header: string;
2071
+ /** 响应体 */
2072
+ body: string;
2073
+ }
2074
+ export interface V2NIMProxyNotify {
2075
+ /** 发送方账号 */
2076
+ fromAccountId: string;
2077
+ /** 通知体 */
2078
+ body: string;
2079
+ /** 发送时间,毫秒 */
2080
+ time: number;
2081
+ }