node-nim 9.4.0-rc.1 → 9.7.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 +130 -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/qchat_def/public_def.js +102 -69
- 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 +11 -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/qchat_def/attachment_def.d.ts +4 -4
- package/types/qchat_def/channel_def.d.ts +47 -47
- package/types/qchat_def/instance_def.d.ts +9 -11
- package/types/qchat_def/message_def.d.ts +27 -23
- package/types/qchat_def/public_def.d.ts +20 -70
- package/types/qchat_def/role_def.d.ts +45 -45
- package/types/qchat_def/server_def.d.ts +44 -44
- package/types/qchat_def/system_notification_def.d.ts +9 -9
|
@@ -90,9 +90,9 @@ export interface QChatChannelCreateResp {
|
|
|
90
90
|
/** 频道信息 */
|
|
91
91
|
channel_info?: QChatChannelInfo;
|
|
92
92
|
}
|
|
93
|
-
export
|
|
94
|
-
export
|
|
95
|
-
export
|
|
93
|
+
export type QChatChannelDeleteResp = QChatBaseResp;
|
|
94
|
+
export type QChatChannelUpdateResp = QChatChannelCreateResp;
|
|
95
|
+
export type QChatChannelUpdateCategoryInfoResp = QChatChannelCreateResp;
|
|
96
96
|
export interface QChatChannelGetChannelsResp {
|
|
97
97
|
/** 操作结果, 参考NIMResCode */
|
|
98
98
|
res_code?: NIMResCode;
|
|
@@ -111,8 +111,8 @@ export interface QChatChannelUnreadResp {
|
|
|
111
111
|
/** 未读数信息 */
|
|
112
112
|
unread_infos?: Array<NIMQChatUnreadInfo>;
|
|
113
113
|
}
|
|
114
|
-
export
|
|
115
|
-
export
|
|
114
|
+
export type QChatChannelUpdateWhiteBlackRoleResp = QChatBaseResp;
|
|
115
|
+
export type QChatChannelUpdateWhiteBlackMembersResp = QChatBaseResp;
|
|
116
116
|
export interface QChatChannelGetWhiteBlackRolesPageResp {
|
|
117
117
|
/** 操作结果, 参考NIMResCode */
|
|
118
118
|
res_code?: NIMResCode;
|
|
@@ -141,17 +141,17 @@ export interface QChatChannelGetExistingWhiteBlackMembersResp {
|
|
|
141
141
|
/** 身份组列表,结果中不包含成员有效属性 vaild_flag */
|
|
142
142
|
members?: Array<QChatMemberInfo>;
|
|
143
143
|
}
|
|
144
|
-
export
|
|
145
|
-
export
|
|
146
|
-
export
|
|
144
|
+
export type QChatChannelGetMembersPageResp = QChatServerGetMembersPageResp;
|
|
145
|
+
export type QChatChannelSearchPageResp = QChatChannelGetChannelsPageResp;
|
|
146
|
+
export type QChatChannelMemberSearchResp = QChatServerGetMembersResp;
|
|
147
147
|
export interface QChatChannelCategoryCreateResp {
|
|
148
148
|
/** 操作结果, 参考NIMResCode */
|
|
149
149
|
res_code?: NIMResCode;
|
|
150
150
|
/** 分类信息 */
|
|
151
151
|
category_info?: QChatChannelCategoryInfo;
|
|
152
152
|
}
|
|
153
|
-
export
|
|
154
|
-
export
|
|
153
|
+
export type QChatChannelCategoryRemoveResp = QChatBaseResp;
|
|
154
|
+
export type QChatChannelCategoryUpdateResp = QChatChannelCategoryCreateResp;
|
|
155
155
|
export interface QChatChannelGetCategoriesByIDResp {
|
|
156
156
|
/** 操作结果, 参考NIMResCode */
|
|
157
157
|
res_code?: NIMResCode;
|
|
@@ -166,8 +166,8 @@ export interface QChatChannelGetCategoriesPageResp {
|
|
|
166
166
|
/** 分类信息 */
|
|
167
167
|
categories?: Array<QChatChannelCategoryInfo>;
|
|
168
168
|
}
|
|
169
|
-
export
|
|
170
|
-
export
|
|
169
|
+
export type QChatChannelGetCategoryChannelsPageResp = QChatChannelGetChannelsPageResp;
|
|
170
|
+
export type QChatChannelCategoryUpdateWhiteBlackRoleResp = QChatBaseResp;
|
|
171
171
|
export interface QChatChannelCategoryGetWhiteBlackRolesPageResp {
|
|
172
172
|
/** 操作结果, 参考NIMResCode */
|
|
173
173
|
res_code?: NIMResCode;
|
|
@@ -182,7 +182,7 @@ export interface QChatChannelCategoryGetExistingWhiteBlackRolesResp {
|
|
|
182
182
|
/** 身份组列表 */
|
|
183
183
|
roles?: Array<QChatServerRoleInfo>;
|
|
184
184
|
}
|
|
185
|
-
export
|
|
185
|
+
export type QChatChannelCategoryUpdateWhiteBlackMembersResp = QChatBaseResp;
|
|
186
186
|
export interface QChatChannelCategoryGetWhiteBlackMembersPageResp {
|
|
187
187
|
/** 操作结果, 参考NIMResCode */
|
|
188
188
|
res_code?: NIMResCode;
|
|
@@ -197,7 +197,7 @@ export interface QChatChannelCategoryGetExistingWhiteBlackMembersResp {
|
|
|
197
197
|
/** 成员列表 */
|
|
198
198
|
members?: Array<QChatMemberInfo>;
|
|
199
199
|
}
|
|
200
|
-
export
|
|
200
|
+
export type QChatChannelUpdateRTCInfoResp = QChatBaseResp;
|
|
201
201
|
export interface QChatChannelGetRTCInfoResp {
|
|
202
202
|
/** 操作结果, 参考NIMResCode */
|
|
203
203
|
res_code?: NIMResCode;
|
|
@@ -211,71 +211,71 @@ export interface QChatChannelGetRTCOnlineMembersResp {
|
|
|
211
211
|
members?: Array<QChatMemberInfo>;
|
|
212
212
|
}
|
|
213
213
|
/** 未读信息回调 */
|
|
214
|
-
export
|
|
214
|
+
export type ChannelUnreadCallback = (resp: QChatChannelUnreadResp) => void;
|
|
215
215
|
/** 创建频道回调 */
|
|
216
|
-
export
|
|
216
|
+
export type ChannelCreateCallback = (resp: QChatChannelCreateResp) => void;
|
|
217
217
|
/** 删除频道回调 */
|
|
218
|
-
export
|
|
218
|
+
export type ChannelDeleteCallback = (resp: QChatChannelDeleteResp) => void;
|
|
219
219
|
/** 更新频道回调 */
|
|
220
|
-
export
|
|
220
|
+
export type ChannelUpdateCallback = (resp: QChatChannelUpdateResp) => void;
|
|
221
221
|
/** 更新频道的分组信息回调 */
|
|
222
|
-
export
|
|
222
|
+
export type ChannelUpdateCategoryInfoCallback = (resp: QChatChannelUpdateCategoryInfoResp) => void;
|
|
223
223
|
/** 查询频道列表回调 */
|
|
224
|
-
export
|
|
224
|
+
export type GetChannelsCallback = (resp: QChatChannelGetChannelsResp) => void;
|
|
225
225
|
/** 分页查询频道列表回调 */
|
|
226
|
-
export
|
|
226
|
+
export type GetChannelsPageCallback = (resp: QChatChannelGetChannelsPageResp) => void;
|
|
227
227
|
/** 分页查询成员列表回调 */
|
|
228
|
-
export
|
|
228
|
+
export type ChannelGetMembersPageCallback = (resp: QChatChannelGetMembersPageResp) => void;
|
|
229
229
|
/** 查询未读消息数回调 */
|
|
230
|
-
export
|
|
230
|
+
export type ChannelQueryUnreadInfoCallback = (resp: QChatChannelQueryUnreadInfoResp) => void;
|
|
231
231
|
/** 订阅回调 */
|
|
232
|
-
export
|
|
232
|
+
export type ChannelSubscribeCallback = (resp: QChatChannelSubscribeResp) => void;
|
|
233
233
|
/** 更新白/黑名单身份组回调 */
|
|
234
|
-
export
|
|
234
|
+
export type UpdateWhiteBlackRoleCallback = (resp: QChatChannelUpdateWhiteBlackRoleResp) => void;
|
|
235
235
|
/** 更新白/黑名单成员回调 */
|
|
236
|
-
export
|
|
236
|
+
export type UpdateWhiteBlackMembersCallback = (resp: QChatChannelUpdateWhiteBlackMembersResp) => void;
|
|
237
237
|
/** 分页查询白/黑名单身份组回调 */
|
|
238
|
-
export
|
|
238
|
+
export type GetWhiteBlackRolesPageCallback = (resp: QChatChannelGetWhiteBlackRolesPageResp) => void;
|
|
239
239
|
/** 分页查询白/黑名单成员回调 */
|
|
240
|
-
export
|
|
240
|
+
export type GetWhiteBlackMembersPageCallback = (resp: QChatChannelGetWhiteBlackMembersPageResp) => void;
|
|
241
241
|
/** 查询已存在白/黑名单身份组回调 */
|
|
242
|
-
export
|
|
242
|
+
export type GetExistingWhiteBlackRolesCallback = (resp: QChatChannelGetExistingWhiteBlackRolesResp) => void;
|
|
243
243
|
/** 查询已存在白/黑名单成员回调 */
|
|
244
|
-
export
|
|
244
|
+
export type GetExistingWhiteBlackMembersCallback = (resp: QChatChannelGetExistingWhiteBlackMembersResp) => void;
|
|
245
245
|
/** 搜索频道分页回调 */
|
|
246
|
-
export
|
|
246
|
+
export type ChannelSearchPageCallback = GetChannelsPageCallback;
|
|
247
247
|
/** 搜索频道成员回调 */
|
|
248
|
-
export
|
|
248
|
+
export type ChannelMemberSearchCallback = ServerGetMembersCallback;
|
|
249
249
|
/** 创建频道分组回调 */
|
|
250
|
-
export
|
|
250
|
+
export type ChannelCategoryCreateCallback = (resp: QChatChannelCategoryCreateResp) => void;
|
|
251
251
|
/** 删除频道分组回调 */
|
|
252
|
-
export
|
|
252
|
+
export type ChannelCategoryRemoveCallback = (resp: QChatChannelCategoryRemoveResp) => void;
|
|
253
253
|
/** 更新频道分组回调 */
|
|
254
|
-
export
|
|
254
|
+
export type ChannelCategoryUpdateCallback = (resp: QChatChannelCategoryUpdateResp) => void;
|
|
255
255
|
/** 根据频道分组ID查询频道分组列表回调 */
|
|
256
|
-
export
|
|
256
|
+
export type ChannelGetCategoriesByIDCallback = (resp: QChatChannelGetCategoriesByIDResp) => void;
|
|
257
257
|
/** 分页查询频道分组回调 */
|
|
258
|
-
export
|
|
258
|
+
export type ChannelGetCategoriesPageCallback = (resp: QChatChannelGetCategoriesPageResp) => void;
|
|
259
259
|
/** 分页查询指定频道分组中的频道 */
|
|
260
|
-
export
|
|
260
|
+
export type ChannelGetCategoryChannelsPageCallback = (resp: QChatChannelGetCategoryChannelsPageResp) => void;
|
|
261
261
|
/** 更新频道分组白/黑名单身份组 */
|
|
262
|
-
export
|
|
262
|
+
export type ChannelCategoryUpdateWhiteBlackRoleCallback = (resp: QChatChannelCategoryUpdateWhiteBlackRoleResp) => void;
|
|
263
263
|
/** 分页查询频道分组白/黑名单身份组 */
|
|
264
|
-
export
|
|
264
|
+
export type ChannelCategoryGetWhiteBlackRolesPageCallback = (resp: QChatChannelCategoryGetWhiteBlackRolesPageResp) => void;
|
|
265
265
|
/** 批量查询频道分组白/黑名单身份组 */
|
|
266
|
-
export
|
|
266
|
+
export type ChannelCategoryGetExistingWhiteBlackRolesCallback = (resp: QChatChannelCategoryGetExistingWhiteBlackRolesResp) => void;
|
|
267
267
|
/** 更新频道分组白/黑名单成员 */
|
|
268
|
-
export
|
|
268
|
+
export type ChannelCategoryUpdateWhiteBlackMembersCallback = (resp: QChatChannelCategoryUpdateWhiteBlackMembersResp) => void;
|
|
269
269
|
/** 分页查询频道分组白/黑名单成员 */
|
|
270
|
-
export
|
|
270
|
+
export type ChannelCategoryGetWhiteBlackMembersPageCallback = (resp: QChatChannelCategoryGetWhiteBlackMembersPageResp) => void;
|
|
271
271
|
/** 批量查询频道分组白/黑名单成员 */
|
|
272
|
-
export
|
|
272
|
+
export type ChannelCategoryGetExistingWhiteBlackMembersCallback = (resp: QChatChannelCategoryGetExistingWhiteBlackMembersResp) => void;
|
|
273
273
|
/** 修改RTC频道参数回调 */
|
|
274
|
-
export
|
|
274
|
+
export type ChannelUpdateRTCInfoCallback = (resp: QChatChannelUpdateRTCInfoResp) => void;
|
|
275
275
|
/** 查询RTC频道参数回调 */
|
|
276
|
-
export
|
|
276
|
+
export type ChannelGetRTCInfoCallback = (resp: QChatChannelGetRTCInfoResp) => void;
|
|
277
277
|
/** 查询RTC频道在线成员回调 */
|
|
278
|
-
export
|
|
278
|
+
export type ChannelGetRTCOnlineMembersCallback = (resp: QChatChannelGetRTCOnlineMembersResp) => void;
|
|
279
279
|
/** @interface QChatChannelSubscribeParam */
|
|
280
280
|
export interface QChatChannelSubscribeParam {
|
|
281
281
|
/** 操作类型 */
|
|
@@ -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使用默认值 */
|
|
@@ -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;
|
|
@@ -74,6 +74,8 @@ export interface QChatMessageSend {
|
|
|
74
74
|
mention_all?: boolean;
|
|
75
75
|
/** 可选,被艾特的人的accid列表 */
|
|
76
76
|
mention_accids?: Array<string>;
|
|
77
|
+
/** 可选,被艾特的人的身份组id列表 */
|
|
78
|
+
mention_role_ids?: Array<number>;
|
|
77
79
|
/** 必填,该消息是否存储云端历史,0:不支持,1:支持 */
|
|
78
80
|
history_enable?: boolean;
|
|
79
81
|
/** 可选,自定义的推送属性,限制json */
|
|
@@ -141,6 +143,8 @@ export interface QChatMessage {
|
|
|
141
143
|
mention_all?: boolean;
|
|
142
144
|
/** 可选,被艾特的人的accid列表 */
|
|
143
145
|
mention_accids?: Array<string>;
|
|
146
|
+
/** 可选,被艾特的人的身份组id列表 */
|
|
147
|
+
mention_role_ids?: Array<number>;
|
|
144
148
|
/** 必填,该消息是否存储云端历史,0:不支持,1:支持 */
|
|
145
149
|
history_enable?: boolean;
|
|
146
150
|
/** 可选,自定义的推送属性,限制json */
|
|
@@ -212,7 +216,7 @@ export interface QChatSendMessageResp {
|
|
|
212
216
|
message?: QChatMessage;
|
|
213
217
|
}
|
|
214
218
|
/** @interface QChatReplyMessageResp */
|
|
215
|
-
export
|
|
219
|
+
export type QChatReplyMessageResp = QChatSendMessageResp;
|
|
216
220
|
/** @interface QChatUpdateMessageResp */
|
|
217
221
|
export interface QChatUpdateMessageResp {
|
|
218
222
|
/** 操作结果, 参考NIMResCode */
|
|
@@ -235,11 +239,11 @@ export interface QChatGetLastMessagesResp {
|
|
|
235
239
|
messages?: Map<number, QChatMessage>;
|
|
236
240
|
}
|
|
237
241
|
/** @interface QChatGetMessagesCacheResp */
|
|
238
|
-
export
|
|
242
|
+
export type QChatGetMessagesCacheResp = QChatGetMessagesResp;
|
|
239
243
|
/** @interface QChatGetMessageHistoryByIdsResp */
|
|
240
|
-
export
|
|
244
|
+
export type QChatGetMessageHistoryByIdsResp = QChatGetMessagesResp;
|
|
241
245
|
/** @interface QChatGetReferMessagesResp */
|
|
242
|
-
export
|
|
246
|
+
export type QChatGetReferMessagesResp = QChatGetMessagesResp;
|
|
243
247
|
/** @interface QChatMarkMessageReadResp */
|
|
244
248
|
export interface QChatMarkMessageReadResp {
|
|
245
249
|
/** 操作结果, 参考NIMResCode */
|
|
@@ -277,9 +281,9 @@ export interface QChatGetThreadRootMessagesMetaResp {
|
|
|
277
281
|
meta_infos?: Array<NIMQChatThreadMessageMetaInfo>;
|
|
278
282
|
}
|
|
279
283
|
/** @interface QChatAddQuickCommentResp */
|
|
280
|
-
export
|
|
284
|
+
export type QChatAddQuickCommentResp = QChatBaseResp;
|
|
281
285
|
/** @interface QChatRemoveQuickCommentResp */
|
|
282
|
-
export
|
|
286
|
+
export type QChatRemoveQuickCommentResp = QChatBaseResp;
|
|
283
287
|
/** @interface QChatQuickCommentDetail */
|
|
284
288
|
export interface QChatQuickCommentDetail {
|
|
285
289
|
/** 表示评论类型 */
|
|
@@ -323,37 +327,37 @@ export interface QChatMessageSearchPageResp {
|
|
|
323
327
|
messages?: Array<QChatMessage>;
|
|
324
328
|
}
|
|
325
329
|
/** 接收消息回调 */
|
|
326
|
-
export
|
|
330
|
+
export type RecvMsgCallback = (resp: QChatRecvMsgResp) => void;
|
|
327
331
|
/** 发送消息回调 */
|
|
328
|
-
export
|
|
332
|
+
export type SendMsgCallback = (resp: QChatSendMessageResp) => void;
|
|
329
333
|
/** 更新消息回调 */
|
|
330
|
-
export
|
|
334
|
+
export type UpdateMsgCallback = (resp: QChatUpdateMessageResp) => void;
|
|
331
335
|
/** 消息更新回调 */
|
|
332
|
-
export
|
|
336
|
+
export type MsgUpdatedCallback = (resp: QChatMsgUpdatedResp) => void;
|
|
333
337
|
/** 查询历史消息回调 */
|
|
334
|
-
export
|
|
338
|
+
export type GetMessagesCallback = (resp: QChatGetMessagesResp) => void;
|
|
335
339
|
/** 查询频道最后一条消息回调 */
|
|
336
|
-
export
|
|
340
|
+
export type GetLastMessagesCallback = (resp: QChatGetLastMessagesResp) => void;
|
|
337
341
|
/** 本地获取消息回调 */
|
|
338
|
-
export
|
|
342
|
+
export type GetMessagesCacheCallback = GetMessagesCallback;
|
|
339
343
|
/** 消息已读标记回调 */
|
|
340
|
-
export
|
|
344
|
+
export type MarkMessageReadCallback = (resp: QChatMarkMessageReadResp) => void;
|
|
341
345
|
/** 回复消息回调 */
|
|
342
|
-
export
|
|
346
|
+
export type ReplyMessageCallback = (resp: QChatReplyMessageResp) => void;
|
|
343
347
|
/** 根据消息 ID 查询消息回调 */
|
|
344
|
-
export
|
|
348
|
+
export type GetMessageHistoryByIdsCallback = GetMessagesCallback;
|
|
345
349
|
/** 获取关联消息回调 */
|
|
346
|
-
export
|
|
350
|
+
export type GetReferMessagesCallback = GetMessagesCallback;
|
|
347
351
|
/** 获取 thread 消息回调 */
|
|
348
|
-
export
|
|
352
|
+
export type GetThreadMessagesCallback = (resp: QChatGetThreadMessagesResp) => void;
|
|
349
353
|
/** 查询Thread消息元信息回调 */
|
|
350
|
-
export
|
|
354
|
+
export type GetThreadRootMessagesMetaCallback = (resp: QChatGetThreadRootMessagesMetaResp) => void;
|
|
351
355
|
/** 添加快捷回复回调 */
|
|
352
|
-
export
|
|
356
|
+
export type QuickCommentCallback = QChatBaseCallback;
|
|
353
357
|
/** 查询快捷回复回调 */
|
|
354
|
-
export
|
|
358
|
+
export type GetQuickCommentsCallback = (resp: QChatGetQuickCommentsResp) => void;
|
|
355
359
|
/** 消息分页搜索回调 */
|
|
356
|
-
export
|
|
360
|
+
export type MessageSearchPageCallback = (resp: QChatMessageSearchPageResp) => void;
|
|
357
361
|
/** @interface QChatSendMessageParam */
|
|
358
362
|
export interface QChatSendMessageParam {
|
|
359
363
|
/** 圈组消息体 */
|
|
@@ -93,138 +93,88 @@ export declare enum NIMQChatChannelSearchSort {
|
|
|
93
93
|
kNIMQChatChannelSearchSortCreateTime = 1
|
|
94
94
|
}
|
|
95
95
|
export declare enum NIMResCode {
|
|
96
|
-
/** 错误 */
|
|
97
96
|
kNIMResError = 0,
|
|
98
|
-
/** 没有错误,一切正常 */
|
|
99
97
|
kNIMResSuccess = 200,
|
|
100
|
-
/** 客户端版本不正确 */
|
|
101
98
|
kNIMResVersionError = 201,
|
|
102
|
-
/** 用户名或密码错误 */
|
|
103
99
|
kNIMResUidPassError = 302,
|
|
104
|
-
/** 禁止操作 */
|
|
105
100
|
kNIMResForbidden = 403,
|
|
106
|
-
/** 请求的目标(用户或对象)不存在 */
|
|
107
101
|
kNIMResNotExist = 404,
|
|
108
|
-
/** 数据自上次查询以来未发生变化(用于增量更新) */
|
|
109
102
|
kNIMResNoModify = 406,
|
|
110
|
-
/** 请求过程超时 */
|
|
111
103
|
kNIMResTimeoutError = 408,
|
|
112
|
-
/** 参数错误 */
|
|
113
104
|
kNIMResParameterError = 414,
|
|
114
|
-
/** 网络连接出现错误 */
|
|
115
105
|
kNIMResConnectionError = 415,
|
|
116
|
-
/** 操作太过频繁 */
|
|
117
106
|
kNIMResFrequently = 416,
|
|
118
|
-
/** 对象已经存在/重复操作 */
|
|
119
107
|
kNIMResExist = 417,
|
|
120
|
-
/** 超限 */
|
|
121
108
|
kNIMResOverrun = 419,
|
|
122
|
-
/** 帐号被禁用 */
|
|
123
109
|
kNIMResAccountBlock = 422,
|
|
124
|
-
/** 未知错误,或者不方便告诉你 */
|
|
125
110
|
kNIMResUnknownError = 500,
|
|
126
|
-
/** 服务器数据错误 */
|
|
127
111
|
kNIMResServerDataError = 501,
|
|
128
|
-
/** 服务器太忙 */
|
|
129
112
|
kNIMResTooBuzy = 503,
|
|
130
|
-
/** 超过配置有效期 */
|
|
131
113
|
kNIMResExceedLimit = 508,
|
|
132
|
-
/** 协议无效, 不允许访问的协议 */
|
|
133
114
|
kNIMResInvalid = 509,
|
|
134
|
-
/** 已达到人数限制 */
|
|
135
115
|
kNIMResTeamECountLimit = 801,
|
|
136
|
-
/** 没有权限 */
|
|
137
116
|
kNIMResTeamENAccess = 802,
|
|
138
|
-
/** 群不存在 */
|
|
139
117
|
kNIMResTeamENotExist = 803,
|
|
140
|
-
/** 用户不在兴趣组里面 */
|
|
141
118
|
kNIMResTeamEMemberNotExist = 804,
|
|
142
|
-
/** 群类型不对 */
|
|
143
119
|
kNIMResTeamErrType = 805,
|
|
144
|
-
/** 创建群数量限制 */
|
|
145
120
|
kNIMResTeamLimit = 806,
|
|
146
|
-
/** 群成员状态不对 */
|
|
147
121
|
kNIMResTeamUserStatusErr = 807,
|
|
148
|
-
/** 申请成功 */
|
|
149
122
|
kNIMResTeamApplySuccess = 808,
|
|
150
|
-
/** 已经在群里 */
|
|
151
123
|
kNIMResTeamAlreadyIn = 809,
|
|
152
|
-
/** 邀请成功 */
|
|
153
124
|
kNIMResTeamInviteSuccess = 810,
|
|
154
|
-
/** 强推列表账号数量超限 */
|
|
155
125
|
kNIMResForcePushCountLimit = 811,
|
|
156
|
-
/** 操作成功,但部分成员的群数量超限 */
|
|
157
126
|
kNIMResTeamMemberLimit = 813,
|
|
158
|
-
|
|
127
|
+
kNIMResTeamGetInfoListPartSuccess = 816,
|
|
159
128
|
kNIMResInvalidProtocol = 997,
|
|
160
|
-
/** 解包错误 */
|
|
161
129
|
kNIMResEUnpacket = 998,
|
|
162
|
-
/** 打包错误 */
|
|
163
130
|
kNIMResEPacket = 999,
|
|
164
|
-
/** 被接收方加入黑名单 SDK版本大于2.5.0支持 */
|
|
165
131
|
kNIMResInBlack = 7101,
|
|
166
|
-
|
|
132
|
+
kNIMResRoomNotExists = 10404,
|
|
133
|
+
kNIMResRoomHasExists = 10405,
|
|
134
|
+
kNIMResRoomMemberNotExists = 10406,
|
|
135
|
+
kNIMResRoomMemberHasExists = 10407,
|
|
136
|
+
kNIMResRoomInviteNotExists = 10408,
|
|
137
|
+
kNIMResRoomInviteHasReject = 10409,
|
|
138
|
+
kNIMResRoomInviteHasAccept = 10410,
|
|
139
|
+
kNIMResPeerNimOffline = 10201,
|
|
140
|
+
kNIMResPeerPushOffline = 10202,
|
|
141
|
+
kNIMResRoomUidConflict = 10417,
|
|
142
|
+
kNIMResRoomMemberExceed = 10419,
|
|
143
|
+
kNIMResRoomMemberHasExistsOtherClient = 10420,
|
|
167
144
|
kNIMLocalRes = 10000,
|
|
168
|
-
/** 客户端本地错误号,需要重新向IM服务器获取进入聊天室权限 */
|
|
169
145
|
kNIMResRoomLocalNeedRequestAgain = 10001,
|
|
170
|
-
/** 客户端本地错误号,本地网络错误,需要检查本地网络 */
|
|
171
146
|
kNIMLocalResNetworkError = 10010,
|
|
172
|
-
/** (发送文件消息或者stop_upload_ex)HTTP upload to NOS上传暂停 */
|
|
173
147
|
kNIMLocalResMsgNosUploadCancel = 10200,
|
|
174
|
-
/** (收到文件消息或者stop_download_ex)HTTP download from NOS下载暂停 */
|
|
175
148
|
kNIMLocalResMsgNosDownloadCancel = 10206,
|
|
176
|
-
/** 收到文件消息,NOS下载完成后本地文件检查错误,一般为下载的文件大小与文件信息不符 */
|
|
177
149
|
kNIMLocalResMsgNosDownloadCheckError = 10207,
|
|
178
|
-
/** 禁止访问 */
|
|
179
150
|
kNIMLocalResMsgAccessDenied = 10403,
|
|
180
|
-
/** 本地资源不存在 */
|
|
181
151
|
kNIMLocalResMsgFileNotExist = 10404,
|
|
182
|
-
/** 本地错误码,参数错误,(收到消息,资源下载地址无效,无法下载) */
|
|
183
152
|
kNIMLocalResParameterError = 10414,
|
|
184
|
-
/** 本地错误码,操作太过频繁 */
|
|
185
153
|
kNIMLocalResFrequently = 10416,
|
|
186
|
-
/** 本地错误码,对象已经存在/重复操作,(收到消息,本地资源已存在,不需要重复下载) */
|
|
187
154
|
kNIMLocalResExist = 10417,
|
|
188
|
-
|
|
155
|
+
kNIMLocalResParaError = 10450,
|
|
189
156
|
kNIMLocalResMsgSendNosError = 10502,
|
|
190
|
-
/** 本地错误码,超过配置有效期或者所需参数不存在 */
|
|
191
157
|
kNIMLocalResExceedLimit = 10508,
|
|
192
|
-
/** 导入消息历史时验证身份和加密密钥不通过 */
|
|
193
158
|
kNIMLocalResCheckMsgDBFailed = 10600,
|
|
194
|
-
/** 导入消息历史时写记录失败 */
|
|
195
159
|
kNIMLocalResImportMsgDBFailed = 10601,
|
|
196
|
-
|
|
160
|
+
kNIMLocalResTMembersSyncUndone = 10602,
|
|
197
161
|
kNIMLocalResRtsError = 11100,
|
|
198
|
-
/** rts会话 id不存在 */
|
|
199
162
|
kNIMLocalResRtsIdNotExist = 11101,
|
|
200
|
-
/** rts会话 音视频已存在 */
|
|
201
163
|
kNIMLocalResRtsVChatExist = 11417,
|
|
202
|
-
/** rts会话 通道状态不正确 */
|
|
203
164
|
kNIMLocalResRtsStatusError = 11501,
|
|
204
|
-
/** rts会话 通道不存在 */
|
|
205
165
|
kNIMLocalResRtsChannelNotExist = 11510,
|
|
206
|
-
/** 主链接错误 */
|
|
207
166
|
kNIMResRoomLinkError = 13001,
|
|
208
|
-
/** 聊天室状态异常 */
|
|
209
167
|
kNIMResRoomError = 13002,
|
|
210
|
-
/** 黑名单用户禁止进入 */
|
|
211
168
|
kNIMResRoomBlackBeOut = 13003,
|
|
212
|
-
/** 被禁言 */
|
|
213
169
|
kNIMResRoomBeMuted = 13004,
|
|
214
|
-
/** 聊天室处于整体禁言状态,只有管理员能发言 */
|
|
215
170
|
kNIMResRoomAllMuted = 13006,
|
|
216
|
-
/** 还未初始化或初始化未正常完成 */
|
|
217
171
|
kNIMLocalResAPIErrorInitUndone = 20000,
|
|
218
|
-
/** 还未登陆或登录未完成 */
|
|
219
172
|
kNIMLocalResAPIErrorLoginUndone = 20001,
|
|
220
|
-
/** 已经登录 */
|
|
221
173
|
kNIMLocalResAPIErrorLogined = 20002,
|
|
222
|
-
/** SDK版本不对,可能会引发其他问题 */
|
|
223
174
|
kNIMLocalResAPIErrorVersionError = 20003,
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
kNIMLocalResAPIErrorRunOutOfLinkAddress = 20005
|
|
175
|
+
kNIMLocalResAPIErrorChatroomMixError = 20005,
|
|
176
|
+
kNIMLocalResAPIErrorLoginExceedRetryCount = 20006,
|
|
177
|
+
kNIMLocalResAPIErrorRunOutOfLinkAddress = 20007
|
|
228
178
|
}
|
|
229
179
|
export declare enum NIMQChatPermissions {
|
|
230
180
|
/** 管理服务器,Server */
|
|
@@ -536,8 +486,8 @@ export declare enum NIMQChatSystemNotificationStatus {
|
|
|
536
486
|
kNIMQChatSystemNotificationNormal = 0,
|
|
537
487
|
kNIMQChatSystemNotificationUser = 10000
|
|
538
488
|
}
|
|
539
|
-
export
|
|
540
|
-
export
|
|
489
|
+
export type QChatPermission = Map<NIMQChatPermissions, NIMQChatPermissionsOption>;
|
|
490
|
+
export type QChatBaseCallback = (resp: QChatBaseResp) => void;
|
|
541
491
|
export interface NIMQChatChannelIDInfo {
|
|
542
492
|
/** server id */
|
|
543
493
|
server_id?: number;
|