node-nim 9.5.0-rc.1 → 9.8.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 +128 -149
- package/dist/chatroom/chatroom.js +14 -4
- package/dist/chatroom/chatroom.js.map +1 -1
- package/dist/loader.js +15 -7
- package/dist/loader.js.map +1 -1
- package/dist/nim/client.js +5 -5
- package/dist/nim/client.js.map +1 -1
- package/dist/nim/friend.js.map +1 -1
- package/dist/nim/global.js.map +1 -1
- package/dist/nim/msglog.js +24 -0
- package/dist/nim/msglog.js.map +1 -1
- package/dist/nim/nos.js.map +1 -1
- package/dist/nim/online_session.js.map +1 -1
- package/dist/nim/pass_through_proxy.js.map +1 -1
- package/dist/nim/plugin.js.map +1 -1
- package/dist/nim/session.js.map +1 -1
- package/dist/nim/subscribe_event.js.map +1 -1
- package/dist/nim/super_team.js.map +1 -1
- package/dist/nim/sysmsg.js.map +1 -1
- package/dist/nim/talk.js.map +1 -1
- package/dist/nim/talkex.js.map +1 -1
- package/dist/nim/team.js.map +1 -1
- package/dist/nim/tool.js.map +1 -1
- package/dist/nim/user.js.map +1 -1
- package/dist/nim_def/client_def.js +164 -79
- package/dist/nim_def/client_def.js.map +1 -1
- package/dist/nim_def/msglog_def.js +1 -0
- package/dist/nim_def/msglog_def.js.map +1 -1
- package/dist/node-nim.js +97 -1
- package/dist/node-nim.js.map +1 -1
- package/dist/qchat/channel.js +19 -0
- package/dist/qchat/channel.js.map +1 -1
- package/dist/qchat/server.js +57 -0
- package/dist/qchat/server.js.map +1 -1
- package/dist/qchat_def/public_def.js +118 -70
- package/dist/qchat_def/public_def.js.map +1 -1
- package/package.json +64 -64
- package/script/download-sdk.mjs +67 -64
- package/types/chatroom/chatroom.d.ts +24 -23
- package/types/chatroom_def/chatroom_def.d.ts +44 -18
- package/types/nim/client.d.ts +8 -8
- package/types/nim/friend.d.ts +6 -6
- package/types/nim/global.d.ts +6 -6
- package/types/nim/msglog.d.ts +43 -28
- package/types/nim/nos.d.ts +5 -5
- package/types/nim/online_session.d.ts +4 -4
- package/types/nim/pass_through_proxy.d.ts +1 -1
- package/types/nim/plugin.d.ts +2 -2
- package/types/nim/session.d.ts +19 -19
- package/types/nim/subscribe_event.d.ts +5 -5
- package/types/nim/super_team.d.ts +24 -24
- package/types/nim/sysmsg.d.ts +8 -8
- package/types/nim/talk.d.ts +3 -3
- package/types/nim/talkex.d.ts +11 -11
- package/types/nim/team.d.ts +33 -33
- package/types/nim/tool.d.ts +2 -2
- package/types/nim/user.d.ts +8 -8
- package/types/nim_def/client_def.d.ts +95 -92
- package/types/nim_def/data_sync_def.d.ts +1 -1
- package/types/nim_def/friend_def.d.ts +10 -10
- package/types/nim_def/global_def.d.ts +13 -13
- package/types/nim_def/msglog_def.d.ts +54 -45
- package/types/nim_def/nos_def.d.ts +14 -14
- package/types/nim_def/online_session_def.d.ts +9 -9
- package/types/nim_def/pass_through_proxy_def.d.ts +3 -3
- package/types/nim_def/plugin_def.d.ts +4 -4
- package/types/nim_def/session_def.d.ts +36 -36
- package/types/nim_def/subscribe_event_def.d.ts +12 -12
- package/types/nim_def/super_team_def.d.ts +32 -32
- package/types/nim_def/sysmsg_def.d.ts +13 -13
- package/types/nim_def/talk_def.d.ts +12 -11
- package/types/nim_def/talkex_def.d.ts +27 -27
- package/types/nim_def/team_def.d.ts +47 -47
- package/types/nim_def/tool_def.d.ts +4 -4
- package/types/nim_def/user_def.d.ts +14 -14
- package/types/node-nim.d.ts +61 -0
- package/types/qchat/channel.d.ts +7 -1
- package/types/qchat/server.d.ts +19 -1
- package/types/qchat_def/attachment_def.d.ts +4 -4
- package/types/qchat_def/channel_def.d.ts +68 -49
- package/types/qchat_def/instance_def.d.ts +9 -13
- package/types/qchat_def/message_def.d.ts +31 -23
- package/types/qchat_def/public_def.d.ts +35 -71
- package/types/qchat_def/role_def.d.ts +45 -76
- package/types/qchat_def/server_def.d.ts +92 -48
- package/types/qchat_def/system_notification_def.d.ts +9 -9
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { NIMQChatChannelType, NIMQChatChannelViewMode, NIMQChatChannelSyncMode, NIMQChatChannelIDInfo, NIMQChatSubscribeType, NIMQChatSubscribeOpeType, NIMQChatChannelWhiteBlackType, NIMQChatChannelWhiteBlackOpeType, NIMQChatSearchOrder, NIMQChatChannelSearchSort, QChatBaseResp, QChatBusinessAntiSpamInfo, QChatPageInfo, QChatMemberInfo, QChatServerRoleInfo, NIMQChatUnreadInfo, NIMResCode } from './public_def';
|
|
1
|
+
import { NIMQChatChannelType, NIMQChatChannelViewMode, NIMQChatChannelSyncMode, NIMQChatChannelIDInfo, NIMQChatSubscribeType, NIMQChatSubscribeOpeType, NIMQChatChannelWhiteBlackType, NIMQChatChannelWhiteBlackOpeType, NIMQChatSearchOrder, NIMQChatChannelSearchSort, QChatBaseResp, QChatBusinessAntiSpamInfo, QChatPageInfo, QChatMemberInfo, QChatServerRoleInfo, NIMQChatUnreadInfo, NIMResCode, NIMQChatChannelVisitorMode } from './public_def';
|
|
2
2
|
import { QChatServerGetMembersPageResp, QChatServerGetMembersResp, ServerGetMembersCallback } from './server_def';
|
|
3
3
|
export interface QChatChannelInfo {
|
|
4
4
|
/** server id */
|
|
@@ -17,6 +17,8 @@ export interface QChatChannelInfo {
|
|
|
17
17
|
owner?: string;
|
|
18
18
|
/** 查看模式,只有在category_id为0或sync_mode为kNIMQChatChannelSyncModeNoSync时有效 */
|
|
19
19
|
view_mode?: NIMQChatChannelViewMode;
|
|
20
|
+
/** 圈组频道游客访问模式 */
|
|
21
|
+
visitor_mode?: NIMQChatChannelVisitorMode;
|
|
20
22
|
/** 有效标记,false:无效 true:有效 */
|
|
21
23
|
valid_flag?: boolean;
|
|
22
24
|
/** 创建时间 */
|
|
@@ -75,7 +77,13 @@ export interface QChatChannelCategoryInfo {
|
|
|
75
77
|
export interface QChatChannelSubscribeResp {
|
|
76
78
|
/** 操作结果, 参考NIMResCode */
|
|
77
79
|
res_code?: NIMResCode;
|
|
78
|
-
/**
|
|
80
|
+
/** 失败列表 */
|
|
81
|
+
failed_channels?: Array<NIMQChatChannelIDInfo>;
|
|
82
|
+
}
|
|
83
|
+
export interface QChatChannelSubscribeAsVisitorResp {
|
|
84
|
+
/** 操作结果, 参考NIMResCode */
|
|
85
|
+
res_code?: NIMResCode;
|
|
86
|
+
/** 失败列表 */
|
|
79
87
|
failed_channels?: Array<NIMQChatChannelIDInfo>;
|
|
80
88
|
}
|
|
81
89
|
export interface QChatChannelQueryUnreadInfoResp {
|
|
@@ -90,9 +98,9 @@ export interface QChatChannelCreateResp {
|
|
|
90
98
|
/** 频道信息 */
|
|
91
99
|
channel_info?: QChatChannelInfo;
|
|
92
100
|
}
|
|
93
|
-
export
|
|
94
|
-
export
|
|
95
|
-
export
|
|
101
|
+
export type QChatChannelDeleteResp = QChatBaseResp;
|
|
102
|
+
export type QChatChannelUpdateResp = QChatChannelCreateResp;
|
|
103
|
+
export type QChatChannelUpdateCategoryInfoResp = QChatChannelCreateResp;
|
|
96
104
|
export interface QChatChannelGetChannelsResp {
|
|
97
105
|
/** 操作结果, 参考NIMResCode */
|
|
98
106
|
res_code?: NIMResCode;
|
|
@@ -111,8 +119,8 @@ export interface QChatChannelUnreadResp {
|
|
|
111
119
|
/** 未读数信息 */
|
|
112
120
|
unread_infos?: Array<NIMQChatUnreadInfo>;
|
|
113
121
|
}
|
|
114
|
-
export
|
|
115
|
-
export
|
|
122
|
+
export type QChatChannelUpdateWhiteBlackRoleResp = QChatBaseResp;
|
|
123
|
+
export type QChatChannelUpdateWhiteBlackMembersResp = QChatBaseResp;
|
|
116
124
|
export interface QChatChannelGetWhiteBlackRolesPageResp {
|
|
117
125
|
/** 操作结果, 参考NIMResCode */
|
|
118
126
|
res_code?: NIMResCode;
|
|
@@ -141,17 +149,17 @@ export interface QChatChannelGetExistingWhiteBlackMembersResp {
|
|
|
141
149
|
/** 身份组列表,结果中不包含成员有效属性 vaild_flag */
|
|
142
150
|
members?: Array<QChatMemberInfo>;
|
|
143
151
|
}
|
|
144
|
-
export
|
|
145
|
-
export
|
|
146
|
-
export
|
|
152
|
+
export type QChatChannelGetMembersPageResp = QChatServerGetMembersPageResp;
|
|
153
|
+
export type QChatChannelSearchPageResp = QChatChannelGetChannelsPageResp;
|
|
154
|
+
export type QChatChannelMemberSearchResp = QChatServerGetMembersResp;
|
|
147
155
|
export interface QChatChannelCategoryCreateResp {
|
|
148
156
|
/** 操作结果, 参考NIMResCode */
|
|
149
157
|
res_code?: NIMResCode;
|
|
150
158
|
/** 分类信息 */
|
|
151
159
|
category_info?: QChatChannelCategoryInfo;
|
|
152
160
|
}
|
|
153
|
-
export
|
|
154
|
-
export
|
|
161
|
+
export type QChatChannelCategoryRemoveResp = QChatBaseResp;
|
|
162
|
+
export type QChatChannelCategoryUpdateResp = QChatChannelCategoryCreateResp;
|
|
155
163
|
export interface QChatChannelGetCategoriesByIDResp {
|
|
156
164
|
/** 操作结果, 参考NIMResCode */
|
|
157
165
|
res_code?: NIMResCode;
|
|
@@ -166,8 +174,8 @@ export interface QChatChannelGetCategoriesPageResp {
|
|
|
166
174
|
/** 分类信息 */
|
|
167
175
|
categories?: Array<QChatChannelCategoryInfo>;
|
|
168
176
|
}
|
|
169
|
-
export
|
|
170
|
-
export
|
|
177
|
+
export type QChatChannelGetCategoryChannelsPageResp = QChatChannelGetChannelsPageResp;
|
|
178
|
+
export type QChatChannelCategoryUpdateWhiteBlackRoleResp = QChatBaseResp;
|
|
171
179
|
export interface QChatChannelCategoryGetWhiteBlackRolesPageResp {
|
|
172
180
|
/** 操作结果, 参考NIMResCode */
|
|
173
181
|
res_code?: NIMResCode;
|
|
@@ -182,7 +190,7 @@ export interface QChatChannelCategoryGetExistingWhiteBlackRolesResp {
|
|
|
182
190
|
/** 身份组列表 */
|
|
183
191
|
roles?: Array<QChatServerRoleInfo>;
|
|
184
192
|
}
|
|
185
|
-
export
|
|
193
|
+
export type QChatChannelCategoryUpdateWhiteBlackMembersResp = QChatBaseResp;
|
|
186
194
|
export interface QChatChannelCategoryGetWhiteBlackMembersPageResp {
|
|
187
195
|
/** 操作结果, 参考NIMResCode */
|
|
188
196
|
res_code?: NIMResCode;
|
|
@@ -197,7 +205,7 @@ export interface QChatChannelCategoryGetExistingWhiteBlackMembersResp {
|
|
|
197
205
|
/** 成员列表 */
|
|
198
206
|
members?: Array<QChatMemberInfo>;
|
|
199
207
|
}
|
|
200
|
-
export
|
|
208
|
+
export type QChatChannelUpdateRTCInfoResp = QChatBaseResp;
|
|
201
209
|
export interface QChatChannelGetRTCInfoResp {
|
|
202
210
|
/** 操作结果, 参考NIMResCode */
|
|
203
211
|
res_code?: NIMResCode;
|
|
@@ -211,71 +219,73 @@ export interface QChatChannelGetRTCOnlineMembersResp {
|
|
|
211
219
|
members?: Array<QChatMemberInfo>;
|
|
212
220
|
}
|
|
213
221
|
/** 未读信息回调 */
|
|
214
|
-
export
|
|
222
|
+
export type ChannelUnreadCallback = (resp: QChatChannelUnreadResp) => void;
|
|
215
223
|
/** 创建频道回调 */
|
|
216
|
-
export
|
|
224
|
+
export type ChannelCreateCallback = (resp: QChatChannelCreateResp) => void;
|
|
217
225
|
/** 删除频道回调 */
|
|
218
|
-
export
|
|
226
|
+
export type ChannelDeleteCallback = (resp: QChatChannelDeleteResp) => void;
|
|
219
227
|
/** 更新频道回调 */
|
|
220
|
-
export
|
|
228
|
+
export type ChannelUpdateCallback = (resp: QChatChannelUpdateResp) => void;
|
|
221
229
|
/** 更新频道的分组信息回调 */
|
|
222
|
-
export
|
|
230
|
+
export type ChannelUpdateCategoryInfoCallback = (resp: QChatChannelUpdateCategoryInfoResp) => void;
|
|
223
231
|
/** 查询频道列表回调 */
|
|
224
|
-
export
|
|
232
|
+
export type GetChannelsCallback = (resp: QChatChannelGetChannelsResp) => void;
|
|
225
233
|
/** 分页查询频道列表回调 */
|
|
226
|
-
export
|
|
234
|
+
export type GetChannelsPageCallback = (resp: QChatChannelGetChannelsPageResp) => void;
|
|
227
235
|
/** 分页查询成员列表回调 */
|
|
228
|
-
export
|
|
236
|
+
export type ChannelGetMembersPageCallback = (resp: QChatChannelGetMembersPageResp) => void;
|
|
229
237
|
/** 查询未读消息数回调 */
|
|
230
|
-
export
|
|
238
|
+
export type ChannelQueryUnreadInfoCallback = (resp: QChatChannelQueryUnreadInfoResp) => void;
|
|
239
|
+
/** 订阅回调 */
|
|
240
|
+
export type ChannelSubscribeCallback = (resp: QChatChannelSubscribeResp) => void;
|
|
231
241
|
/** 订阅回调 */
|
|
232
|
-
export
|
|
242
|
+
export type ChannelSubscribeAsVisitorCallback = (resp: QChatChannelSubscribeAsVisitorResp) => void;
|
|
233
243
|
/** 更新白/黑名单身份组回调 */
|
|
234
|
-
export
|
|
244
|
+
export type UpdateWhiteBlackRoleCallback = (resp: QChatChannelUpdateWhiteBlackRoleResp) => void;
|
|
235
245
|
/** 更新白/黑名单成员回调 */
|
|
236
|
-
export
|
|
246
|
+
export type UpdateWhiteBlackMembersCallback = (resp: QChatChannelUpdateWhiteBlackMembersResp) => void;
|
|
237
247
|
/** 分页查询白/黑名单身份组回调 */
|
|
238
|
-
export
|
|
248
|
+
export type GetWhiteBlackRolesPageCallback = (resp: QChatChannelGetWhiteBlackRolesPageResp) => void;
|
|
239
249
|
/** 分页查询白/黑名单成员回调 */
|
|
240
|
-
export
|
|
250
|
+
export type GetWhiteBlackMembersPageCallback = (resp: QChatChannelGetWhiteBlackMembersPageResp) => void;
|
|
241
251
|
/** 查询已存在白/黑名单身份组回调 */
|
|
242
|
-
export
|
|
252
|
+
export type GetExistingWhiteBlackRolesCallback = (resp: QChatChannelGetExistingWhiteBlackRolesResp) => void;
|
|
243
253
|
/** 查询已存在白/黑名单成员回调 */
|
|
244
|
-
export
|
|
254
|
+
export type GetExistingWhiteBlackMembersCallback = (resp: QChatChannelGetExistingWhiteBlackMembersResp) => void;
|
|
245
255
|
/** 搜索频道分页回调 */
|
|
246
|
-
export
|
|
256
|
+
export type ChannelSearchPageCallback = GetChannelsPageCallback;
|
|
247
257
|
/** 搜索频道成员回调 */
|
|
248
|
-
export
|
|
258
|
+
export type ChannelMemberSearchCallback = ServerGetMembersCallback;
|
|
249
259
|
/** 创建频道分组回调 */
|
|
250
|
-
export
|
|
260
|
+
export type ChannelCategoryCreateCallback = (resp: QChatChannelCategoryCreateResp) => void;
|
|
251
261
|
/** 删除频道分组回调 */
|
|
252
|
-
export
|
|
262
|
+
export type ChannelCategoryRemoveCallback = (resp: QChatChannelCategoryRemoveResp) => void;
|
|
253
263
|
/** 更新频道分组回调 */
|
|
254
|
-
export
|
|
264
|
+
export type ChannelCategoryUpdateCallback = (resp: QChatChannelCategoryUpdateResp) => void;
|
|
255
265
|
/** 根据频道分组ID查询频道分组列表回调 */
|
|
256
|
-
export
|
|
266
|
+
export type ChannelGetCategoriesByIDCallback = (resp: QChatChannelGetCategoriesByIDResp) => void;
|
|
257
267
|
/** 分页查询频道分组回调 */
|
|
258
|
-
export
|
|
268
|
+
export type ChannelGetCategoriesPageCallback = (resp: QChatChannelGetCategoriesPageResp) => void;
|
|
259
269
|
/** 分页查询指定频道分组中的频道 */
|
|
260
|
-
export
|
|
270
|
+
export type ChannelGetCategoryChannelsPageCallback = (resp: QChatChannelGetCategoryChannelsPageResp) => void;
|
|
261
271
|
/** 更新频道分组白/黑名单身份组 */
|
|
262
|
-
export
|
|
272
|
+
export type ChannelCategoryUpdateWhiteBlackRoleCallback = (resp: QChatChannelCategoryUpdateWhiteBlackRoleResp) => void;
|
|
263
273
|
/** 分页查询频道分组白/黑名单身份组 */
|
|
264
|
-
export
|
|
274
|
+
export type ChannelCategoryGetWhiteBlackRolesPageCallback = (resp: QChatChannelCategoryGetWhiteBlackRolesPageResp) => void;
|
|
265
275
|
/** 批量查询频道分组白/黑名单身份组 */
|
|
266
|
-
export
|
|
276
|
+
export type ChannelCategoryGetExistingWhiteBlackRolesCallback = (resp: QChatChannelCategoryGetExistingWhiteBlackRolesResp) => void;
|
|
267
277
|
/** 更新频道分组白/黑名单成员 */
|
|
268
|
-
export
|
|
278
|
+
export type ChannelCategoryUpdateWhiteBlackMembersCallback = (resp: QChatChannelCategoryUpdateWhiteBlackMembersResp) => void;
|
|
269
279
|
/** 分页查询频道分组白/黑名单成员 */
|
|
270
|
-
export
|
|
280
|
+
export type ChannelCategoryGetWhiteBlackMembersPageCallback = (resp: QChatChannelCategoryGetWhiteBlackMembersPageResp) => void;
|
|
271
281
|
/** 批量查询频道分组白/黑名单成员 */
|
|
272
|
-
export
|
|
282
|
+
export type ChannelCategoryGetExistingWhiteBlackMembersCallback = (resp: QChatChannelCategoryGetExistingWhiteBlackMembersResp) => void;
|
|
273
283
|
/** 修改RTC频道参数回调 */
|
|
274
|
-
export
|
|
284
|
+
export type ChannelUpdateRTCInfoCallback = (resp: QChatChannelUpdateRTCInfoResp) => void;
|
|
275
285
|
/** 查询RTC频道参数回调 */
|
|
276
|
-
export
|
|
286
|
+
export type ChannelGetRTCInfoCallback = (resp: QChatChannelGetRTCInfoResp) => void;
|
|
277
287
|
/** 查询RTC频道在线成员回调 */
|
|
278
|
-
export
|
|
288
|
+
export type ChannelGetRTCOnlineMembersCallback = (resp: QChatChannelGetRTCOnlineMembersResp) => void;
|
|
279
289
|
/** @interface QChatChannelSubscribeParam */
|
|
280
290
|
export interface QChatChannelSubscribeParam {
|
|
281
291
|
/** 操作类型 */
|
|
@@ -285,6 +295,13 @@ export interface QChatChannelSubscribeParam {
|
|
|
285
295
|
/** ID 列表 */
|
|
286
296
|
id_infos?: Array<NIMQChatChannelIDInfo>;
|
|
287
297
|
}
|
|
298
|
+
/** @interface QChatChannelSubscribeAsVisitorParam */
|
|
299
|
+
export interface QChatChannelSubscribeAsVisitorParam {
|
|
300
|
+
/** 操作类型 */
|
|
301
|
+
ope_type?: NIMQChatSubscribeOpeType;
|
|
302
|
+
/** ID 列表 */
|
|
303
|
+
id_infos?: Array<NIMQChatChannelIDInfo>;
|
|
304
|
+
}
|
|
288
305
|
/** @interface QChatChannelQueryUnreadInfoParam */
|
|
289
306
|
export interface QChatChannelQueryUnreadInfoParam {
|
|
290
307
|
/** 待查询的ID列表 */
|
|
@@ -314,6 +331,8 @@ export interface QChatChannelUpdateParam {
|
|
|
314
331
|
custom?: string;
|
|
315
332
|
/** 查看模式 */
|
|
316
333
|
view_mode?: NIMQChatChannelViewMode;
|
|
334
|
+
/** 圈组频道游客访问模式 */
|
|
335
|
+
visitor_mode?: NIMQChatChannelVisitorMode;
|
|
317
336
|
/** 反垃圾信息 */
|
|
318
337
|
anti_spam_info?: QChatBusinessAntiSpamInfo;
|
|
319
338
|
}
|
|
@@ -90,23 +90,23 @@ export interface QChatGetRTCTokenResp {
|
|
|
90
90
|
ttl?: number;
|
|
91
91
|
}
|
|
92
92
|
/** 获取自定义token回调 */
|
|
93
|
-
export
|
|
93
|
+
export type CustomTokenCallback = (resp: QChatCustomTokenResp) => QChatCustomTokenResp;
|
|
94
94
|
/** 被踢回调 */
|
|
95
|
-
export
|
|
95
|
+
export type KickedCallback = (resp: QChatKickedResp) => void;
|
|
96
96
|
/** 登录状态回调 */
|
|
97
|
-
export
|
|
97
|
+
export type LoginStatusCallback = (resp: QChatLoginStatusResp) => void;
|
|
98
98
|
/** 多点登录回调 */
|
|
99
|
-
export
|
|
99
|
+
export type MultispotLoginCallback = (resp: QChatMultispotLoginResp) => void;
|
|
100
100
|
/** SDK系统日志回调模板 */
|
|
101
|
-
export
|
|
101
|
+
export type SDKLogCallback = (resp: QChatSDKLogResp) => void;
|
|
102
102
|
/** 登录回调 */
|
|
103
|
-
export
|
|
103
|
+
export type QChatLoginCallback = (resp: QChatLoginResp) => void;
|
|
104
104
|
/** 登出回调 */
|
|
105
|
-
export
|
|
105
|
+
export type QChatLogoutCallback = (resp: QChatLogoutResp) => void;
|
|
106
106
|
/** 踢掉自己其他端回调 */
|
|
107
|
-
export
|
|
107
|
+
export type KickCallback = (resp: QChatKickResp) => void;
|
|
108
108
|
/** 获取RTC频道token回调 */
|
|
109
|
-
export
|
|
109
|
+
export type GetRTCTokenCallback = (resp: QChatGetRTCTokenResp) => void;
|
|
110
110
|
/** @struct NIMQChatEncryptionConfiguration
|
|
111
111
|
* @brief 圈组协议加密配置
|
|
112
112
|
*/
|
|
@@ -162,8 +162,6 @@ export interface QChatMessageCacheConfiguration {
|
|
|
162
162
|
export interface QChatInitParam {
|
|
163
163
|
/** APP数据存储路径,如果为空,则使用系统默认路径 */
|
|
164
164
|
app_data_path?: string;
|
|
165
|
-
/** APP安装路径,用于加载依赖库,如果为空,则使用当前路径 */
|
|
166
|
-
app_install_path?: string;
|
|
167
165
|
/** 自定义通信超时时间,单位秒, 为0使用默认值 */
|
|
168
166
|
custom_timeout?: number;
|
|
169
167
|
/** 自定义鉴权超时时间,单位秒, 为0使用默认值 */
|
|
@@ -205,8 +203,6 @@ export interface QChatKickParam {
|
|
|
205
203
|
}
|
|
206
204
|
/** @interface QChatGetRTCTokenParam */
|
|
207
205
|
export interface QChatGetRTCTokenParam {
|
|
208
|
-
/** 获取RTC频道token回调 */
|
|
209
|
-
cb?: GetRTCTokenCallback;
|
|
210
206
|
/** device_id */
|
|
211
207
|
device_id?: string;
|
|
212
208
|
}
|
|
@@ -18,7 +18,7 @@ export interface QChatMessageUpdateInfo {
|
|
|
18
18
|
}
|
|
19
19
|
/** @interface QChatMessageAntiSpamInfo */
|
|
20
20
|
export interface QChatMessageAntiSpamInfo {
|
|
21
|
-
/** 是否需要使用自定义反垃圾字段(即antiSpamContent), false:不需要, true
|
|
21
|
+
/** 是否需要使用自定义反垃圾字段(即antiSpamContent), false:不需要, true:需要 */
|
|
22
22
|
use_custom_content?: boolean;
|
|
23
23
|
/** 单条消息是否使用易盾反垃圾, false:(在开通易盾的情况下)不过易盾反垃圾, 其他都是按照原来的规则 */
|
|
24
24
|
anti_spam_using_yidun?: boolean;
|
|
@@ -60,6 +60,8 @@ export interface QChatMessageSend {
|
|
|
60
60
|
channel_id?: number;
|
|
61
61
|
/** 必填,消息类型 */
|
|
62
62
|
msg_type?: NIMQChatMsgType;
|
|
63
|
+
/** 可选,消息子类型 */
|
|
64
|
+
msg_sub_type?: number;
|
|
63
65
|
/** 可选,消息内容 */
|
|
64
66
|
msg_body?: string;
|
|
65
67
|
/** 可选,消息附件 */
|
|
@@ -74,6 +76,8 @@ export interface QChatMessageSend {
|
|
|
74
76
|
mention_all?: boolean;
|
|
75
77
|
/** 可选,被艾特的人的accid列表 */
|
|
76
78
|
mention_accids?: Array<string>;
|
|
79
|
+
/** 可选,被艾特的人的身份组id列表 */
|
|
80
|
+
mention_role_ids?: Array<number>;
|
|
77
81
|
/** 必填,该消息是否存储云端历史,0:不支持,1:支持 */
|
|
78
82
|
history_enable?: boolean;
|
|
79
83
|
/** 可选,自定义的推送属性,限制json */
|
|
@@ -127,6 +131,8 @@ export interface QChatMessage {
|
|
|
127
131
|
channel_id?: number;
|
|
128
132
|
/** 必填,消息类型 */
|
|
129
133
|
msg_type?: NIMQChatMsgType;
|
|
134
|
+
/** 可选,消息子类型 */
|
|
135
|
+
msg_sub_type?: number;
|
|
130
136
|
/** 可选,消息内容 */
|
|
131
137
|
msg_body?: string;
|
|
132
138
|
/** 可选,消息附件 */
|
|
@@ -141,6 +147,8 @@ export interface QChatMessage {
|
|
|
141
147
|
mention_all?: boolean;
|
|
142
148
|
/** 可选,被艾特的人的accid列表 */
|
|
143
149
|
mention_accids?: Array<string>;
|
|
150
|
+
/** 可选,被艾特的人的身份组id列表 */
|
|
151
|
+
mention_role_ids?: Array<number>;
|
|
144
152
|
/** 必填,该消息是否存储云端历史,0:不支持,1:支持 */
|
|
145
153
|
history_enable?: boolean;
|
|
146
154
|
/** 可选,自定义的推送属性,限制json */
|
|
@@ -212,7 +220,7 @@ export interface QChatSendMessageResp {
|
|
|
212
220
|
message?: QChatMessage;
|
|
213
221
|
}
|
|
214
222
|
/** @interface QChatReplyMessageResp */
|
|
215
|
-
export
|
|
223
|
+
export type QChatReplyMessageResp = QChatSendMessageResp;
|
|
216
224
|
/** @interface QChatUpdateMessageResp */
|
|
217
225
|
export interface QChatUpdateMessageResp {
|
|
218
226
|
/** 操作结果, 参考NIMResCode */
|
|
@@ -235,11 +243,11 @@ export interface QChatGetLastMessagesResp {
|
|
|
235
243
|
messages?: Map<number, QChatMessage>;
|
|
236
244
|
}
|
|
237
245
|
/** @interface QChatGetMessagesCacheResp */
|
|
238
|
-
export
|
|
246
|
+
export type QChatGetMessagesCacheResp = QChatGetMessagesResp;
|
|
239
247
|
/** @interface QChatGetMessageHistoryByIdsResp */
|
|
240
|
-
export
|
|
248
|
+
export type QChatGetMessageHistoryByIdsResp = QChatGetMessagesResp;
|
|
241
249
|
/** @interface QChatGetReferMessagesResp */
|
|
242
|
-
export
|
|
250
|
+
export type QChatGetReferMessagesResp = QChatGetMessagesResp;
|
|
243
251
|
/** @interface QChatMarkMessageReadResp */
|
|
244
252
|
export interface QChatMarkMessageReadResp {
|
|
245
253
|
/** 操作结果, 参考NIMResCode */
|
|
@@ -277,9 +285,9 @@ export interface QChatGetThreadRootMessagesMetaResp {
|
|
|
277
285
|
meta_infos?: Array<NIMQChatThreadMessageMetaInfo>;
|
|
278
286
|
}
|
|
279
287
|
/** @interface QChatAddQuickCommentResp */
|
|
280
|
-
export
|
|
288
|
+
export type QChatAddQuickCommentResp = QChatBaseResp;
|
|
281
289
|
/** @interface QChatRemoveQuickCommentResp */
|
|
282
|
-
export
|
|
290
|
+
export type QChatRemoveQuickCommentResp = QChatBaseResp;
|
|
283
291
|
/** @interface QChatQuickCommentDetail */
|
|
284
292
|
export interface QChatQuickCommentDetail {
|
|
285
293
|
/** 表示评论类型 */
|
|
@@ -323,37 +331,37 @@ export interface QChatMessageSearchPageResp {
|
|
|
323
331
|
messages?: Array<QChatMessage>;
|
|
324
332
|
}
|
|
325
333
|
/** 接收消息回调 */
|
|
326
|
-
export
|
|
334
|
+
export type RecvMsgCallback = (resp: QChatRecvMsgResp) => void;
|
|
327
335
|
/** 发送消息回调 */
|
|
328
|
-
export
|
|
336
|
+
export type SendMsgCallback = (resp: QChatSendMessageResp) => void;
|
|
329
337
|
/** 更新消息回调 */
|
|
330
|
-
export
|
|
338
|
+
export type UpdateMsgCallback = (resp: QChatUpdateMessageResp) => void;
|
|
331
339
|
/** 消息更新回调 */
|
|
332
|
-
export
|
|
340
|
+
export type MsgUpdatedCallback = (resp: QChatMsgUpdatedResp) => void;
|
|
333
341
|
/** 查询历史消息回调 */
|
|
334
|
-
export
|
|
342
|
+
export type GetMessagesCallback = (resp: QChatGetMessagesResp) => void;
|
|
335
343
|
/** 查询频道最后一条消息回调 */
|
|
336
|
-
export
|
|
344
|
+
export type GetLastMessagesCallback = (resp: QChatGetLastMessagesResp) => void;
|
|
337
345
|
/** 本地获取消息回调 */
|
|
338
|
-
export
|
|
346
|
+
export type GetMessagesCacheCallback = GetMessagesCallback;
|
|
339
347
|
/** 消息已读标记回调 */
|
|
340
|
-
export
|
|
348
|
+
export type MarkMessageReadCallback = (resp: QChatMarkMessageReadResp) => void;
|
|
341
349
|
/** 回复消息回调 */
|
|
342
|
-
export
|
|
350
|
+
export type ReplyMessageCallback = (resp: QChatReplyMessageResp) => void;
|
|
343
351
|
/** 根据消息 ID 查询消息回调 */
|
|
344
|
-
export
|
|
352
|
+
export type GetMessageHistoryByIdsCallback = GetMessagesCallback;
|
|
345
353
|
/** 获取关联消息回调 */
|
|
346
|
-
export
|
|
354
|
+
export type GetReferMessagesCallback = GetMessagesCallback;
|
|
347
355
|
/** 获取 thread 消息回调 */
|
|
348
|
-
export
|
|
356
|
+
export type GetThreadMessagesCallback = (resp: QChatGetThreadMessagesResp) => void;
|
|
349
357
|
/** 查询Thread消息元信息回调 */
|
|
350
|
-
export
|
|
358
|
+
export type GetThreadRootMessagesMetaCallback = (resp: QChatGetThreadRootMessagesMetaResp) => void;
|
|
351
359
|
/** 添加快捷回复回调 */
|
|
352
|
-
export
|
|
360
|
+
export type QuickCommentCallback = QChatBaseCallback;
|
|
353
361
|
/** 查询快捷回复回调 */
|
|
354
|
-
export
|
|
362
|
+
export type GetQuickCommentsCallback = (resp: QChatGetQuickCommentsResp) => void;
|
|
355
363
|
/** 消息分页搜索回调 */
|
|
356
|
-
export
|
|
364
|
+
export type MessageSearchPageCallback = (resp: QChatMessageSearchPageResp) => void;
|
|
357
365
|
/** @interface QChatSendMessageParam */
|
|
358
366
|
export interface QChatSendMessageParam {
|
|
359
367
|
/** 圈组消息体 */
|
|
@@ -28,6 +28,14 @@ export declare enum NIMQChatChannelViewMode {
|
|
|
28
28
|
/** 私密模式 */
|
|
29
29
|
kNIMQChatChannelViewModePrivate = 1
|
|
30
30
|
}
|
|
31
|
+
export declare enum NIMQChatChannelVisitorMode {
|
|
32
|
+
/** 游客可见 */
|
|
33
|
+
kNIMQChatChannelVisitorModeVisible = 0,
|
|
34
|
+
/** 游客不可见 */
|
|
35
|
+
kNIMQChatChannelVisitorModeInvisible = 1,
|
|
36
|
+
/** 跟随模式, 频道公开游客可见, 频道私密游客不可见 */
|
|
37
|
+
kNIMQChatChannelVisitorModeFollow = 2
|
|
38
|
+
}
|
|
31
39
|
export declare enum NIMQChatChannelSyncMode {
|
|
32
40
|
/** 不与频道分组同步 */
|
|
33
41
|
kNIMQChatChannelSyncModeNoSync = 0,
|
|
@@ -52,7 +60,11 @@ export declare enum NIMQChatSubscribeType {
|
|
|
52
60
|
/** 订阅某个server的【通知】 */
|
|
53
61
|
kNIMQChatSubscribeTypeServerNotification = 4,
|
|
54
62
|
/** 订阅某个channel的【正在输入事件】 */
|
|
55
|
-
kNIMQChatSubscribeTypeTypingEvent = 5
|
|
63
|
+
kNIMQChatSubscribeTypeTypingEvent = 5,
|
|
64
|
+
/** 以游客身份订阅某个channel的【消息】/【通知】 */
|
|
65
|
+
kNIMQChatSubscribeTypeVisitorMsg = 6,
|
|
66
|
+
/** 以游客身份订阅某个server的【消息】/【通知】 */
|
|
67
|
+
kNIMQChatSubscribeTypeVisitorServerNotification = 7
|
|
56
68
|
}
|
|
57
69
|
export declare enum NIMQChatDownloadResType {
|
|
58
70
|
/** 原文件 */
|
|
@@ -93,138 +105,88 @@ export declare enum NIMQChatChannelSearchSort {
|
|
|
93
105
|
kNIMQChatChannelSearchSortCreateTime = 1
|
|
94
106
|
}
|
|
95
107
|
export declare enum NIMResCode {
|
|
96
|
-
/** 错误 */
|
|
97
108
|
kNIMResError = 0,
|
|
98
|
-
/** 没有错误,一切正常 */
|
|
99
109
|
kNIMResSuccess = 200,
|
|
100
|
-
/** 客户端版本不正确 */
|
|
101
110
|
kNIMResVersionError = 201,
|
|
102
|
-
/** 用户名或密码错误 */
|
|
103
111
|
kNIMResUidPassError = 302,
|
|
104
|
-
/** 禁止操作 */
|
|
105
112
|
kNIMResForbidden = 403,
|
|
106
|
-
/** 请求的目标(用户或对象)不存在 */
|
|
107
113
|
kNIMResNotExist = 404,
|
|
108
|
-
/** 数据自上次查询以来未发生变化(用于增量更新) */
|
|
109
114
|
kNIMResNoModify = 406,
|
|
110
|
-
/** 请求过程超时 */
|
|
111
115
|
kNIMResTimeoutError = 408,
|
|
112
|
-
/** 参数错误 */
|
|
113
116
|
kNIMResParameterError = 414,
|
|
114
|
-
/** 网络连接出现错误 */
|
|
115
117
|
kNIMResConnectionError = 415,
|
|
116
|
-
/** 操作太过频繁 */
|
|
117
118
|
kNIMResFrequently = 416,
|
|
118
|
-
/** 对象已经存在/重复操作 */
|
|
119
119
|
kNIMResExist = 417,
|
|
120
|
-
/** 超限 */
|
|
121
120
|
kNIMResOverrun = 419,
|
|
122
|
-
/** 帐号被禁用 */
|
|
123
121
|
kNIMResAccountBlock = 422,
|
|
124
|
-
/** 未知错误,或者不方便告诉你 */
|
|
125
122
|
kNIMResUnknownError = 500,
|
|
126
|
-
/** 服务器数据错误 */
|
|
127
123
|
kNIMResServerDataError = 501,
|
|
128
|
-
/** 服务器太忙 */
|
|
129
124
|
kNIMResTooBuzy = 503,
|
|
130
|
-
/** 超过配置有效期 */
|
|
131
125
|
kNIMResExceedLimit = 508,
|
|
132
|
-
/** 协议无效, 不允许访问的协议 */
|
|
133
126
|
kNIMResInvalid = 509,
|
|
134
|
-
/** 已达到人数限制 */
|
|
135
127
|
kNIMResTeamECountLimit = 801,
|
|
136
|
-
/** 没有权限 */
|
|
137
128
|
kNIMResTeamENAccess = 802,
|
|
138
|
-
/** 群不存在 */
|
|
139
129
|
kNIMResTeamENotExist = 803,
|
|
140
|
-
/** 用户不在兴趣组里面 */
|
|
141
130
|
kNIMResTeamEMemberNotExist = 804,
|
|
142
|
-
/** 群类型不对 */
|
|
143
131
|
kNIMResTeamErrType = 805,
|
|
144
|
-
/** 创建群数量限制 */
|
|
145
132
|
kNIMResTeamLimit = 806,
|
|
146
|
-
/** 群成员状态不对 */
|
|
147
133
|
kNIMResTeamUserStatusErr = 807,
|
|
148
|
-
/** 申请成功 */
|
|
149
134
|
kNIMResTeamApplySuccess = 808,
|
|
150
|
-
/** 已经在群里 */
|
|
151
135
|
kNIMResTeamAlreadyIn = 809,
|
|
152
|
-
/** 邀请成功 */
|
|
153
136
|
kNIMResTeamInviteSuccess = 810,
|
|
154
|
-
/** 强推列表账号数量超限 */
|
|
155
137
|
kNIMResForcePushCountLimit = 811,
|
|
156
|
-
/** 操作成功,但部分成员的群数量超限 */
|
|
157
138
|
kNIMResTeamMemberLimit = 813,
|
|
158
|
-
|
|
139
|
+
kNIMResTeamGetInfoListPartSuccess = 816,
|
|
159
140
|
kNIMResInvalidProtocol = 997,
|
|
160
|
-
/** 解包错误 */
|
|
161
141
|
kNIMResEUnpacket = 998,
|
|
162
|
-
/** 打包错误 */
|
|
163
142
|
kNIMResEPacket = 999,
|
|
164
|
-
/** 被接收方加入黑名单 SDK版本大于2.5.0支持 */
|
|
165
143
|
kNIMResInBlack = 7101,
|
|
166
|
-
|
|
144
|
+
kNIMResRoomNotExists = 10404,
|
|
145
|
+
kNIMResRoomHasExists = 10405,
|
|
146
|
+
kNIMResRoomMemberNotExists = 10406,
|
|
147
|
+
kNIMResRoomMemberHasExists = 10407,
|
|
148
|
+
kNIMResRoomInviteNotExists = 10408,
|
|
149
|
+
kNIMResRoomInviteHasReject = 10409,
|
|
150
|
+
kNIMResRoomInviteHasAccept = 10410,
|
|
151
|
+
kNIMResPeerNimOffline = 10201,
|
|
152
|
+
kNIMResPeerPushOffline = 10202,
|
|
153
|
+
kNIMResRoomUidConflict = 10417,
|
|
154
|
+
kNIMResRoomMemberExceed = 10419,
|
|
155
|
+
kNIMResRoomMemberHasExistsOtherClient = 10420,
|
|
167
156
|
kNIMLocalRes = 10000,
|
|
168
|
-
/** 客户端本地错误号,需要重新向IM服务器获取进入聊天室权限 */
|
|
169
157
|
kNIMResRoomLocalNeedRequestAgain = 10001,
|
|
170
|
-
/** 客户端本地错误号,本地网络错误,需要检查本地网络 */
|
|
171
158
|
kNIMLocalResNetworkError = 10010,
|
|
172
|
-
/** (发送文件消息或者stop_upload_ex)HTTP upload to NOS上传暂停 */
|
|
173
159
|
kNIMLocalResMsgNosUploadCancel = 10200,
|
|
174
|
-
/** (收到文件消息或者stop_download_ex)HTTP download from NOS下载暂停 */
|
|
175
160
|
kNIMLocalResMsgNosDownloadCancel = 10206,
|
|
176
|
-
/** 收到文件消息,NOS下载完成后本地文件检查错误,一般为下载的文件大小与文件信息不符 */
|
|
177
161
|
kNIMLocalResMsgNosDownloadCheckError = 10207,
|
|
178
|
-
/** 禁止访问 */
|
|
179
162
|
kNIMLocalResMsgAccessDenied = 10403,
|
|
180
|
-
/** 本地资源不存在 */
|
|
181
163
|
kNIMLocalResMsgFileNotExist = 10404,
|
|
182
|
-
/** 本地错误码,参数错误,(收到消息,资源下载地址无效,无法下载) */
|
|
183
164
|
kNIMLocalResParameterError = 10414,
|
|
184
|
-
/** 本地错误码,操作太过频繁 */
|
|
185
165
|
kNIMLocalResFrequently = 10416,
|
|
186
|
-
/** 本地错误码,对象已经存在/重复操作,(收到消息,本地资源已存在,不需要重复下载) */
|
|
187
166
|
kNIMLocalResExist = 10417,
|
|
188
|
-
|
|
167
|
+
kNIMLocalResParaError = 10450,
|
|
189
168
|
kNIMLocalResMsgSendNosError = 10502,
|
|
190
|
-
/** 本地错误码,超过配置有效期或者所需参数不存在 */
|
|
191
169
|
kNIMLocalResExceedLimit = 10508,
|
|
192
|
-
/** 导入消息历史时验证身份和加密密钥不通过 */
|
|
193
170
|
kNIMLocalResCheckMsgDBFailed = 10600,
|
|
194
|
-
/** 导入消息历史时写记录失败 */
|
|
195
171
|
kNIMLocalResImportMsgDBFailed = 10601,
|
|
196
|
-
|
|
172
|
+
kNIMLocalResTMembersSyncUndone = 10602,
|
|
197
173
|
kNIMLocalResRtsError = 11100,
|
|
198
|
-
/** rts会话 id不存在 */
|
|
199
174
|
kNIMLocalResRtsIdNotExist = 11101,
|
|
200
|
-
/** rts会话 音视频已存在 */
|
|
201
175
|
kNIMLocalResRtsVChatExist = 11417,
|
|
202
|
-
/** rts会话 通道状态不正确 */
|
|
203
176
|
kNIMLocalResRtsStatusError = 11501,
|
|
204
|
-
/** rts会话 通道不存在 */
|
|
205
177
|
kNIMLocalResRtsChannelNotExist = 11510,
|
|
206
|
-
/** 主链接错误 */
|
|
207
178
|
kNIMResRoomLinkError = 13001,
|
|
208
|
-
/** 聊天室状态异常 */
|
|
209
179
|
kNIMResRoomError = 13002,
|
|
210
|
-
/** 黑名单用户禁止进入 */
|
|
211
180
|
kNIMResRoomBlackBeOut = 13003,
|
|
212
|
-
/** 被禁言 */
|
|
213
181
|
kNIMResRoomBeMuted = 13004,
|
|
214
|
-
/** 聊天室处于整体禁言状态,只有管理员能发言 */
|
|
215
182
|
kNIMResRoomAllMuted = 13006,
|
|
216
|
-
/** 还未初始化或初始化未正常完成 */
|
|
217
183
|
kNIMLocalResAPIErrorInitUndone = 20000,
|
|
218
|
-
/** 还未登陆或登录未完成 */
|
|
219
184
|
kNIMLocalResAPIErrorLoginUndone = 20001,
|
|
220
|
-
/** 已经登录 */
|
|
221
185
|
kNIMLocalResAPIErrorLogined = 20002,
|
|
222
|
-
/** SDK版本不对,可能会引发其他问题 */
|
|
223
186
|
kNIMLocalResAPIErrorVersionError = 20003,
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
kNIMLocalResAPIErrorRunOutOfLinkAddress = 20005
|
|
187
|
+
kNIMLocalResAPIErrorChatroomMixError = 20005,
|
|
188
|
+
kNIMLocalResAPIErrorLoginExceedRetryCount = 20006,
|
|
189
|
+
kNIMLocalResAPIErrorRunOutOfLinkAddress = 20007
|
|
228
190
|
}
|
|
229
191
|
export declare enum NIMQChatPermissions {
|
|
230
192
|
/** 管理服务器,Server */
|
|
@@ -528,6 +490,8 @@ export declare enum NIMQChatSystemNotificationType {
|
|
|
528
490
|
kNIMQChatSystemNotificationTypeServerEnterLeave = 32,
|
|
529
491
|
/** 用户通过邀请码加入服务器 msg_data: NIMQChatSystemNotificationDataServerJoinByInviteCode */
|
|
530
492
|
kNIMQChatSystemNotificationTypeServerJoinByInviteCode = 33,
|
|
493
|
+
/** 频道对游客可见性变更 msg_data: NIMQChatSystemNotificationDataChannelGuestVisibilityChange*/
|
|
494
|
+
NIMQChatSystemNotificationTypeChannelVisitorVisibilityChange = 34,
|
|
531
495
|
/** 自定义系统通知 msg_data: NULL */
|
|
532
496
|
kNIMQChatSystemNotificationTypeCustom = 100
|
|
533
497
|
}
|
|
@@ -536,8 +500,8 @@ export declare enum NIMQChatSystemNotificationStatus {
|
|
|
536
500
|
kNIMQChatSystemNotificationNormal = 0,
|
|
537
501
|
kNIMQChatSystemNotificationUser = 10000
|
|
538
502
|
}
|
|
539
|
-
export
|
|
540
|
-
export
|
|
503
|
+
export type QChatPermission = Map<NIMQChatPermissions, NIMQChatPermissionsOption>;
|
|
504
|
+
export type QChatBaseCallback = (resp: QChatBaseResp) => void;
|
|
541
505
|
export interface NIMQChatChannelIDInfo {
|
|
542
506
|
/** server id */
|
|
543
507
|
server_id?: number;
|