node-nim 9.16.11 → 9.18.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 +58 -44
- package/dist/chatroom/chatroom.js +219 -0
- package/dist/chatroom/chatroom.js.map +1 -1
- package/dist/chatroom_def/chatroom_def.js +146 -73
- package/dist/chatroom_def/chatroom_def.js.map +1 -1
- package/dist/loader.js +1 -1
- package/dist/loader.js.map +1 -1
- package/dist/nim/client.js +1 -1
- package/dist/nim/client.js.map +1 -1
- package/dist/nim/data_sync.js.map +1 -1
- package/dist/nim/friend.js +9 -9
- package/dist/nim/friend.js.map +1 -1
- package/dist/nim/global.js.map +1 -1
- package/dist/nim/msglog.js +1 -1
- 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 +7 -7
- package/dist/nim/pass_through_proxy.js.map +1 -1
- package/dist/nim/plugin.js +3 -3
- package/dist/nim/plugin.js.map +1 -1
- package/dist/nim/session.js +49 -49
- package/dist/nim/session.js.map +1 -1
- package/dist/nim/subscribe_event.js +15 -15
- package/dist/nim/subscribe_event.js.map +1 -1
- package/dist/nim/super_team.js +63 -63
- package/dist/nim/super_team.js.map +1 -1
- package/dist/nim/sysmsg.js +14 -14
- package/dist/nim/sysmsg.js.map +1 -1
- package/dist/nim/talk.js +10 -10
- package/dist/nim/talk.js.map +1 -1
- package/dist/nim/talkex.js +27 -27
- package/dist/nim/talkex.js.map +1 -1
- package/dist/nim/team.js +86 -86
- package/dist/nim/team.js.map +1 -1
- package/dist/nim/tool.js.map +1 -1
- package/dist/nim/user.js +2 -2
- package/dist/nim/user.js.map +1 -1
- package/dist/nim_def/client_def.js +145 -118
- package/dist/nim_def/client_def.js.map +1 -1
- package/dist/nim_def/data_sync_def.js +18 -9
- package/dist/nim_def/data_sync_def.js.map +1 -1
- package/dist/nim_def/doc_trans_def.js +10 -5
- package/dist/nim_def/doc_trans_def.js.map +1 -1
- package/dist/nim_def/friend_def.js +28 -14
- package/dist/nim_def/friend_def.js.map +1 -1
- package/dist/nim_def/global_def.js +32 -16
- package/dist/nim_def/global_def.js.map +1 -1
- package/dist/nim_def/msglog_def.js +192 -116
- package/dist/nim_def/msglog_def.js.map +1 -1
- package/dist/nim_def/nos_def.js +12 -6
- package/dist/nim_def/nos_def.js.map +1 -1
- package/dist/nim_def/pass_through_proxy_def.js +5 -0
- package/dist/nim_def/pass_through_proxy_def.js.map +1 -1
- package/dist/nim_def/session_def.js +30 -15
- package/dist/nim_def/session_def.js.map +1 -1
- package/dist/nim_def/subscribe_event_def.js +32 -15
- package/dist/nim_def/subscribe_event_def.js.map +1 -1
- package/dist/nim_def/super_team_def.js +52 -27
- package/dist/nim_def/super_team_def.js.map +1 -1
- package/dist/nim_def/sysmsg_def.js +32 -17
- package/dist/nim_def/sysmsg_def.js.map +1 -1
- package/dist/nim_def/team_def.js +56 -29
- package/dist/nim_def/team_def.js.map +1 -1
- package/dist/nim_def/tool_def.js +8 -4
- package/dist/nim_def/tool_def.js.map +1 -1
- package/dist/nim_def/user_def.js +16 -8
- package/dist/nim_def/user_def.js.map +1 -1
- package/dist/node-nim.js +19 -0
- package/dist/node-nim.js.map +1 -1
- package/dist/qchat/attachment.js.map +1 -1
- package/dist/qchat/channel.js.map +1 -1
- package/dist/qchat/channel_category.js.map +1 -1
- package/dist/qchat/instance.js.map +1 -1
- package/dist/qchat/message.js.map +1 -1
- package/dist/qchat/role.js.map +1 -1
- package/dist/qchat/server.js.map +1 -1
- package/dist/qchat/system_notification.js.map +1 -1
- package/dist/qchat_def/public_def.js +8 -1
- package/dist/qchat_def/public_def.js.map +1 -1
- package/package.json +9 -6
- package/types/chatroom/chatroom.d.ts +219 -0
- package/types/chatroom_def/chatroom_def.d.ts +150 -74
- package/types/nim/client.d.ts +1 -1
- package/types/nim/friend.d.ts +9 -9
- package/types/nim/msglog.d.ts +1 -1
- package/types/nim/pass_through_proxy.d.ts +7 -7
- package/types/nim/plugin.d.ts +3 -3
- package/types/nim/session.d.ts +49 -49
- package/types/nim/subscribe_event.d.ts +15 -15
- package/types/nim/super_team.d.ts +63 -63
- package/types/nim/sysmsg.d.ts +14 -14
- package/types/nim/talk.d.ts +10 -10
- package/types/nim/talkex.d.ts +27 -27
- package/types/nim/team.d.ts +86 -86
- package/types/nim/user.d.ts +2 -2
- package/types/nim_def/client_def.d.ts +321 -126
- package/types/nim_def/data_sync_def.d.ts +18 -9
- package/types/nim_def/doc_trans_def.d.ts +10 -5
- package/types/nim_def/friend_def.d.ts +52 -26
- package/types/nim_def/global_def.d.ts +32 -16
- package/types/nim_def/msglog_def.d.ts +448 -218
- package/types/nim_def/nos_def.d.ts +62 -31
- package/types/nim_def/online_session_def.d.ts +21 -9
- package/types/nim_def/pass_through_proxy_def.d.ts +5 -0
- package/types/nim_def/session_def.d.ts +92 -46
- package/types/nim_def/subscribe_event_def.d.ts +75 -35
- package/types/nim_def/super_team_def.d.ts +74 -36
- package/types/nim_def/sysmsg_def.d.ts +78 -40
- package/types/nim_def/talk_def.d.ts +77 -20
- package/types/nim_def/talkex_def.d.ts +92 -46
- package/types/nim_def/team_def.d.ts +93 -39
- package/types/nim_def/tool_def.d.ts +16 -8
- package/types/nim_def/user_def.d.ts +52 -26
- package/types/node-nim.d.ts +19 -0
- package/types/qchat_def/public_def.d.ts +6 -0
- package/types/qchat_def/role_def.d.ts +3 -1
|
@@ -2,264 +2,455 @@ import { NIMClientType, NIMResCode } from './client_def';
|
|
|
2
2
|
import { NIMSessionType } from './session_def';
|
|
3
3
|
/** @enum NIMNotificationId 通知类型 */
|
|
4
4
|
export declare enum NIMNotificationId {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
5
|
+
/** 普通群拉人,{"ids":["a1", "a2"],"user_namecards":["namecard1", "namecard2"], "attach" : ""} attach为可选字段,作为应用自定义扩展字段,解析前需要判断有没有这个字段 */
|
|
6
|
+
kNIMNotificationIdTeamInvite = 0,
|
|
7
|
+
/** 普通群踢人,{"ids":["a1", "a2"],"user_namecards":["namecard1", "namecard2"], "attach" : ""} attach为可选字段,作为应用自定义扩展字段,解析前需要判断有没有这个字段 */
|
|
8
|
+
kNIMNotificationIdTeamKick = 1,
|
|
9
|
+
/** 退出群,{"id" : "a1","user_namecards":["namecard1", "namecard2"]}*/
|
|
10
|
+
kNIMNotificationIdTeamLeave = 2,
|
|
11
|
+
/** 群信息更新,{"team_info":team_info,"user_namecards":["namecard1", "namecard2"]}*/
|
|
12
|
+
kNIMNotificationIdTeamUpdate = 3,
|
|
13
|
+
/** 群解散,{"user_namecards":["namecard1", "namecard2"]}*/
|
|
14
|
+
kNIMNotificationIdTeamDismiss = 4,
|
|
15
|
+
/** 高级群申请加入成功,{"id":"a1","user_namecards":["namecard1", "namecard2"]}*/
|
|
16
|
+
kNIMNotificationIdTeamApplyPass = 5,
|
|
17
|
+
/** 高级群移交群主,{"id":"a1", "leave" : boolean,"user_namecards":["namecard1", "namecard2"]}*/
|
|
18
|
+
kNIMNotificationIdTeamOwnerTransfer = 6,
|
|
19
|
+
/** 增加管理员,{"ids":["a1","a2"],"user_namecards":["namecard1", "namecard2"]}*/
|
|
20
|
+
kNIMNotificationIdTeamAddManager = 7,
|
|
21
|
+
/** 删除管理员,{"ids":["a1","a2"],"user_namecards":["namecard1", "namecard2"]}*/
|
|
22
|
+
kNIMNotificationIdTeamRemoveManager = 8,
|
|
23
|
+
/** 高级群接受邀请进群,{"id":"a1","user_namecards":["namecard1", "namecard2"]}*/
|
|
24
|
+
kNIMNotificationIdTeamInviteAccept = 9,
|
|
25
|
+
/** 禁言/解禁群成员,{"user_namecards":["namecard1", "namecard2"],"team_info":team_info,"id":"a1","mute":1-禁言,0-解禁} */
|
|
26
|
+
kNIMNotificationIdTeamMuteMember = 10,
|
|
27
|
+
/** 未接电话,{"calltype":1,"channel":6146078138783760761,"from":"id1","ids":["id1","id2"], "time":1430995380471}*/
|
|
28
|
+
kNIMNotificationIdNetcallMiss = 101,
|
|
29
|
+
/** 话单,{"calltype":2,"channel":6146077129466446197,"duration":8,"ids":["id1","id2"],"time":1430995117398}*/
|
|
30
|
+
kNIMNotificationIdNetcallBill = 102,
|
|
31
|
+
/** 创建群 {"team_info" : team_info} //群组信息(Keys SEE MORE `nim_team_def.h` 『群组信息 Json Keys』)*/
|
|
32
|
+
kNIMNotificationIdTeamSyncCreate = 1000,
|
|
33
|
+
/** 群成员变更{"team_member" : team_member_info} //群组成员信息(不包括自己)(Keys SEE MORE `nim_team_def.h` 『群组成员信息 Json Keys』)*/
|
|
34
|
+
kNIMNotificationIdTeamMemberChanged = 1001,
|
|
35
|
+
/** 同步通知:修改群成员属性(可能是自己的或别人的){"team_member" : team_member_info} 目前只需kNIMTeamUserKeyNick和kNIMTeamUserKeyBits*/
|
|
36
|
+
kNIMNotificationIdTeamSyncUpdateMemberProperty = 1002,
|
|
37
|
+
/** 本地操作创建群 {"ids" : ["a1", "a2"]}*/
|
|
38
|
+
kNIMNotificationIdLocalCreateTeam = 2000,
|
|
39
|
+
/** 本地操作申请加入群 {}*/
|
|
40
|
+
kNIMNotificationIdLocalApplyTeam = 2001,
|
|
41
|
+
/** 本地操作拒绝申请 {"id":"a1"}*/
|
|
42
|
+
kNIMNotificationIdLocalRejectApply = 2002,
|
|
43
|
+
/** 本地操作拒绝邀请 {"id":"a1"}*/
|
|
44
|
+
kNIMNotificationIdLocalRejectInvite = 2003,
|
|
45
|
+
/** 本地操作更新群成员属性 {"team_member" : team_member_info} */
|
|
46
|
+
kNIMNotificationIdLocalUpdateMemberProperty = 2004,
|
|
47
|
+
/** 本地操作更新他人nickname {}*/
|
|
48
|
+
kNIMNotificationIdLocalUpdateOtherNick = 2005,
|
|
49
|
+
/** 本地操作获取群信息 {"team_info":team_info}*/
|
|
50
|
+
kNIMNotificationIdLocalGetTeamInfo = 2006,
|
|
51
|
+
/** 本地操作获取群成员信息结束*/
|
|
52
|
+
kNIMNotificationIdLocalGetTeamList = 2007,
|
|
53
|
+
/** 本地操作对群成员禁言 {"id":"a1", "mute":1-禁言,0-解禁} */
|
|
54
|
+
kNIMNotificationIdLocalMuteMember = 2008,
|
|
55
|
+
/** 本地操作对群禁言 {} */
|
|
56
|
+
kNIMNotificationIdLocalMute = 2009,
|
|
57
|
+
/** 获取群消息未读数 {[{"client_msg_id":"", "count":int, "read_accid":"当前已读成员的accid"},...]}*/
|
|
58
|
+
kNIMNotificationIdLocalGetTeamMsgUnreadCount = 2010,
|
|
59
|
+
/** 获取群消息未读列表 {"client_msg_id":"", "read":["id1",...], "unread":["id2",...]}*/
|
|
60
|
+
kNIMNotificationIdLocalGetTeamMsgUnreadList = 2011,
|
|
61
|
+
/** 拒绝电话,{"calltype":1,"channel":6146078138783760761,"from":"id1","ids":["id1","id2"],"time":1430995380471}*/
|
|
62
|
+
kNIMNotificationIdLocalNetcallReject = 3103,
|
|
63
|
+
/** 无应答,未接通电话,{"calltype":1,"channel":6146078138783760761,"from":"id1","ids":["id1","id2"],"time":1430995380471}*/
|
|
64
|
+
kNIMNotificationIdLocalNetcallNoResponse = 3104,
|
|
65
|
+
/** 未接通前主叫方挂断,{"calltype":1,"channel":6146078138783760761,"from":"id1","ids":["id1","id2"],"time":1430995380471}*/
|
|
66
|
+
kNIMNotificationIdLocalNetcallCanceled = 3105,
|
|
67
|
+
/** 超大群拉人,{"ids":["a1", "a2"],"user_namecards":["namecard1", "namecard2"], "attach" : ""} attach为可选字段,作为应用自定义扩展字段,解析前需要判断有没有这个字段 */
|
|
68
|
+
kNIMNotificationIdSuperTeamInvite = 401,
|
|
69
|
+
/** 超大群踢人,{"ids":["a1", "a2"],"user_namecards":["namecard1", "namecard2"], "attach" : ""} attach为可选字段,作为应用自定义扩展字段,解析前需要判断有没有这个字段 */
|
|
70
|
+
kNIMNotificationIdSuperTeamKick = 402,
|
|
71
|
+
/** 退出超大群,{"id" : "a1","user_namecards":["namecard1", "namecard2"]}*/
|
|
72
|
+
kNIMNotificationIdSuperTeamLeave = 403,
|
|
73
|
+
/** 超大群群信息更新,{"team_info":team_info,"user_namecards":["namecard1", "namecard2"]}*/
|
|
74
|
+
kNIMNotificationIdSuperTeamUpdate = 404,
|
|
75
|
+
/** 超大群解散,{"user_namecards":["namecard1", "namecard2"]}*/
|
|
76
|
+
kNIMNotificationIdSuperTeamDismiss = 405,
|
|
77
|
+
/** 超大群移交群主,{"id":"a1","uinfos":["uinfo1", "uinfo2"]}*/
|
|
78
|
+
kNIMNotificationIdSuperTeamOwnerTransfer = 406,
|
|
79
|
+
/** 超大群增加管理员,{"ids":["a1","a2"],"uinfos":["uinfo1", "uinfo2"]}*/
|
|
80
|
+
kNIMNotificationIdSuperTeamAddManager = 407,
|
|
81
|
+
/** 超大群删除管理员,{"ids":["a1","a2"],"uinfos":["uinfo1", "uinfo2"]}*/
|
|
82
|
+
kNIMNotificationIdSuperTeamRemoveManager = 408,
|
|
83
|
+
/** 超大群禁言/解禁群成员,{"uinfos":["uinfo1", "uinfo2"],“tinfo”:tinfo,"id":"a1","mute":1-禁言,0-解禁}*/
|
|
84
|
+
kNIMNotificationIdSuperTeamMuteMember = 409,
|
|
85
|
+
/** 超大群申请加入成功,{"tinfo":tinfo,"id":"a1","uinfos":["uinfo1", "uinfo2"]}*/
|
|
86
|
+
kNIMNotificationIdSuperTeamApplyPass = 410,
|
|
87
|
+
/** 超大群接受邀请进群,{"tinfo":tinfo,"id":"a1"}*/
|
|
88
|
+
kNIMNotificationIdSuperTeamInviteAccept = 411
|
|
59
89
|
}
|
|
60
90
|
/** @enum NIMMessageType Message Type */
|
|
61
91
|
export declare enum NIMMessageType {
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
92
|
+
/** 文本类型消息*/
|
|
93
|
+
kNIMMessageTypeText = 0,
|
|
94
|
+
/** 图片类型消息*/
|
|
95
|
+
kNIMMessageTypeImage = 1,
|
|
96
|
+
/** 声音类型消息*/
|
|
97
|
+
kNIMMessageTypeAudio = 2,
|
|
98
|
+
/** 视频类型消息*/
|
|
99
|
+
kNIMMessageTypeVideo = 3,
|
|
100
|
+
/** 位置类型消息*/
|
|
101
|
+
kNIMMessageTypeLocation = 4,
|
|
102
|
+
/** 系统类型通知(包括入群出群通知等) NIMNotificationId*/
|
|
103
|
+
kNIMMessageTypeNotification = 5,
|
|
104
|
+
/** 文件类型消息*/
|
|
105
|
+
kNIMMessageTypeFile = 6,
|
|
106
|
+
/** 提醒类型消息,Tip内容根据格式要求填入消息结构中的kNIMMsgKeyServerExt字段*/
|
|
107
|
+
kNIMMessageTypeTips = 10,
|
|
108
|
+
/** 波特机器人消息*/
|
|
109
|
+
kNIMMessageTypeRobot = 11,
|
|
110
|
+
/** G2话单消息*/
|
|
111
|
+
kNIMMessageTypeG2NetCall = 12,
|
|
112
|
+
/** 自定义消息*/
|
|
113
|
+
kNIMMessageTypeCustom = 100,
|
|
114
|
+
/** 未知类型消息,本地使用,发送时勿使用,作为默认值*/
|
|
115
|
+
kNIMMessageTypeUnknown = 1000
|
|
74
116
|
}
|
|
75
117
|
/** @enum NIMMessageFeature 消息种类 */
|
|
76
118
|
export declare enum NIMMessageFeature {
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
119
|
+
/** 默认*/
|
|
120
|
+
kNIMMessageFeatureDefault = 0,
|
|
121
|
+
/** 离线消息*/
|
|
122
|
+
kNIMMessageFeatureLeaveMsg = 1,
|
|
123
|
+
/** 漫游消息*/
|
|
124
|
+
kNIMMessageFeatureRoamMsg = 2,
|
|
125
|
+
/** 同步消息*/
|
|
126
|
+
kNIMMessageFeatureSyncMsg = 3,
|
|
127
|
+
/** 透传消息*/
|
|
128
|
+
kNIMMessageFeatureCustomizedMsg = 4
|
|
82
129
|
}
|
|
83
130
|
/** @enum NIMMsgLogStatus 消息状态 */
|
|
84
131
|
export declare enum NIMMsgLogStatus {
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
132
|
+
/** 默认,不能当查询条件,意义太多*/
|
|
133
|
+
kNIMMsgLogStatusNone = 0,
|
|
134
|
+
/** 收到消息,未读*/
|
|
135
|
+
kNIMMsgLogStatusUnread = 1,
|
|
136
|
+
/** 收到消息,已读*/
|
|
137
|
+
kNIMMsgLogStatusRead = 2,
|
|
138
|
+
/** 已删*/
|
|
139
|
+
kNIMMsgLogStatusDeleted = 3,
|
|
140
|
+
/** 发送中*/
|
|
141
|
+
kNIMMsgLogStatusSending = 4,
|
|
142
|
+
/** 发送失败*/
|
|
143
|
+
kNIMMsgLogStatusSendFailed = 5,
|
|
144
|
+
/** 已发送*/
|
|
145
|
+
kNIMMsgLogStatusSent = 6,
|
|
146
|
+
/** 对方已读发送的内容*/
|
|
147
|
+
kNIMMsgLogStatusReceipt = 7,
|
|
148
|
+
/** 草稿*/
|
|
149
|
+
kNIMMsgLogStatusDraft = 8,
|
|
150
|
+
/** 发送取消*/
|
|
151
|
+
kNIMMsgLogStatusSendCancel = 9,
|
|
152
|
+
/** 被对方拒绝,比如被对方加入黑名单等等*/
|
|
153
|
+
kNIMMsgLogStatusRefused = 10
|
|
96
154
|
}
|
|
97
155
|
/** @enum NIMMsgLogSubStatus 消息子状态 */
|
|
98
156
|
export declare enum NIMMsgLogSubStatus {
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
157
|
+
/** 默认状态*/
|
|
158
|
+
kNIMMsgLogSubStatusNone = 0,
|
|
159
|
+
/** 未播放*/
|
|
160
|
+
kNIMMsgLogSubStatusNotPlaying = 20,
|
|
161
|
+
/** 已播放*/
|
|
162
|
+
kNIMMsgLogSubStatusPlayed = 21
|
|
102
163
|
}
|
|
103
164
|
/** @enum NIMMsgLogQueryRange 消息历史的检索范围 */
|
|
104
165
|
export declare enum NIMMsgLogQueryRange {
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
166
|
+
/** 指定的个人(点对点会话)(注意:暂不支持指定多个人的检索!)*/
|
|
167
|
+
kNIMMsgLogQueryRangeP2P = 0,
|
|
168
|
+
/** 指定的群组(注意:暂不支持指定多个群组的检索!)*/
|
|
169
|
+
kNIMMsgLogQueryRangeTeam = 1,
|
|
170
|
+
/** 指定的超大群组(注意:暂不支持指定多个群组的检索!)*/
|
|
171
|
+
kNIMMsgLogQueryRangeSuperTeam = 5,
|
|
172
|
+
/** 全部*/
|
|
173
|
+
kNIMMsgLogQueryRangeAll = 100,
|
|
174
|
+
/** 所有个人会话*/
|
|
175
|
+
kNIMMsgLogQueryRangeAllP2P = 101,
|
|
176
|
+
/** 所有群组*/
|
|
177
|
+
kNIMMsgLogQueryRangeAllTeam = 102,
|
|
178
|
+
/** 所有超大群组*/
|
|
179
|
+
kNIMMsgLogQueryRangeAllSuperTeam = 103,
|
|
180
|
+
/** 未知(如指定个人和群组的集合)(注意:暂不支持指定个人和群组的混合检索!)*/
|
|
181
|
+
kNIMMsgLogQueryRangeUnknown = 200
|
|
113
182
|
}
|
|
114
183
|
/** @enum NIMMsglogSearchDirection 消息历史查询方向 */
|
|
115
184
|
export declare enum NIMMsglogSearchDirection {
|
|
116
|
-
|
|
117
|
-
|
|
185
|
+
/** 以时间点为准向前搜索 */
|
|
186
|
+
kForward = 0,
|
|
187
|
+
/** 以时间点为准向后搜索 */
|
|
188
|
+
kBackward = 1
|
|
118
189
|
}
|
|
119
190
|
export declare enum NIMMsglogSearchSegmentEngine {
|
|
191
|
+
/** 不使用分词逻辑 */
|
|
120
192
|
kSegmentEngineDefault = 0,
|
|
193
|
+
/** 单字分词逻辑,默认 */
|
|
121
194
|
kSegmentEngineSimple = 1,
|
|
195
|
+
/** Jieba 分词,使用 HMM 模型 */
|
|
122
196
|
kSegmentEngineJiebaCutWithHMM = 2,
|
|
197
|
+
/** Jieba 分词,不使用 HMM 模型 */
|
|
123
198
|
kSegmentEngineJiebaCutWithoutHMM = 3,
|
|
199
|
+
/** Jieba 分词,使用全模式 */
|
|
124
200
|
kSegmentEngineJiebaCutAll = 4,
|
|
201
|
+
/** Jieba 分词,搜索引擎模式 */
|
|
125
202
|
kSegmentEngineJiebaCutForSearch = 5,
|
|
203
|
+
/** Jieba 分词,使用 HMM 模型 */
|
|
126
204
|
kSegmentEngineJiebaCutHMM = 6
|
|
127
205
|
}
|
|
128
206
|
export declare enum NIMBuildingMsglogIndexesCompleteReason {
|
|
207
|
+
/** 构建消息索引表完成 */
|
|
129
208
|
kBuildingMsglogIndexesCompleted = 0,
|
|
209
|
+
/** 用户取消 */
|
|
130
210
|
kBuildingMsglogIndexesCanceled = 1,
|
|
211
|
+
/** 构建失败 */
|
|
131
212
|
kBuildingMsglogIndexesError = 2,
|
|
213
|
+
/** 磁盘空间不足 */
|
|
132
214
|
kBuildingMsglogIndexesFullDisk = 3,
|
|
215
|
+
/** 当前正在构建中,请勿频繁操作 */
|
|
133
216
|
kBuildingMsglogIndexesInProgress = 4
|
|
134
217
|
}
|
|
135
218
|
/** @enum NIMMsglogQuerySource 消息历史查询来源 */
|
|
136
219
|
export declare enum NIMMsglogQuerySource {
|
|
137
|
-
|
|
138
|
-
|
|
220
|
+
/** 本地查询*/
|
|
221
|
+
kNIMMsglogQuerySourceLocal = 0,
|
|
222
|
+
/** 云端查询*/
|
|
223
|
+
kNIMMsglogQuerySourceServer = 1
|
|
139
224
|
}
|
|
140
225
|
export declare enum BoolStatus {
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
226
|
+
/** 未初始化 */
|
|
227
|
+
BS_NOT_INIT = -1,
|
|
228
|
+
/** false */
|
|
229
|
+
BS_FALSE = 0,
|
|
230
|
+
/** true */
|
|
231
|
+
BS_TRUE = 1
|
|
144
232
|
}
|
|
145
233
|
export interface QueryMsgOnlineAsyncParam {
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
234
|
+
/** 查询id,对方的account id或者群组tid */
|
|
235
|
+
id_?: string;
|
|
236
|
+
/** enum 会话类型,双人0,群组1 (nim_msglog_def.h) */
|
|
237
|
+
to_type_?: NIMSessionType;
|
|
238
|
+
/** number 本次查询的消息条数上限(最多100条) */
|
|
239
|
+
limit_count_?: number;
|
|
240
|
+
/** number 起始时间点,单位:毫秒 */
|
|
241
|
+
from_time_?: number;
|
|
242
|
+
/** number 结束时间点,单位:毫秒 */
|
|
243
|
+
end_time_?: number;
|
|
244
|
+
/** number 结束查询的最后一条消息的server_msg_id(不包含在查询结果中) */
|
|
245
|
+
end_msg_id_?: string;
|
|
246
|
+
/** boolean true:反向查询(按时间正序起查,正序排列),false:按时间逆序起查,逆序排列(建议默认为false) */
|
|
247
|
+
reverse_?: boolean;
|
|
248
|
+
/** boolean 将在线查询结果保存到本地,false: 不保存 */
|
|
249
|
+
need_save_to_local_?: boolean;
|
|
250
|
+
/** boolean 查询结果回来后,如果 need_save_to_local_ 为 true 是否要替换本地已经存在的消息 */
|
|
251
|
+
replace_local_message_?: boolean;
|
|
252
|
+
/** boolean 查询结果回来后,是否需要sdk自动下载消息附件。true:需要,false:不需要 */
|
|
253
|
+
auto_download_attachment_?: boolean;
|
|
254
|
+
/** vector 要获取或排除掉的消息类型 由 is_exclusion_type_ 参数决定 */
|
|
255
|
+
msg_type_list_?: Array<NIMMessageType>;
|
|
256
|
+
/** boolean true : 获取除msg_type_list_中指定的所有类型消息 ,false :只获取 msg_type_list_ 中指定的类型的消息 */
|
|
257
|
+
is_exclusion_type_?: boolean;
|
|
158
258
|
}
|
|
159
259
|
export interface QueryMsgByKeywordOnlineParam {
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
260
|
+
/** 查询id,对方的account id或者群组tid */
|
|
261
|
+
id_?: string;
|
|
262
|
+
/** 要查询的关键字 */
|
|
263
|
+
keyword_?: string;
|
|
264
|
+
/** enum 会话类型,双人0,群组1 (nim_msglog_def.h) */
|
|
265
|
+
to_type_?: NIMSessionType;
|
|
266
|
+
/** number 本次查询的消息条数上限(最多100条) */
|
|
267
|
+
limit_count_?: number;
|
|
268
|
+
/** number 起始时间点,单位:毫秒 */
|
|
269
|
+
from_time_?: number;
|
|
270
|
+
/** number 结束时间点,单位:毫秒 */
|
|
271
|
+
end_time_?: number;
|
|
272
|
+
/** boolean true:反向查询(按时间正序起查,正序排列),false:按时间逆序起查,逆序排列(建议默认为false) */
|
|
273
|
+
reverse_?: boolean;
|
|
167
274
|
}
|
|
168
275
|
export interface MessageSetting {
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
276
|
+
/** 该消息是否为重发状态 */
|
|
277
|
+
resend_flag_?: BoolStatus;
|
|
278
|
+
/** 该消息是否存储云端历史 */
|
|
279
|
+
server_history_saved_?: BoolStatus;
|
|
280
|
+
/** 该消息是否支持漫游 */
|
|
281
|
+
roaming_?: BoolStatus;
|
|
282
|
+
/** 该消息是否支持发送者多端同步 */
|
|
283
|
+
self_sync_?: BoolStatus;
|
|
284
|
+
/** 是否需要推送 */
|
|
285
|
+
need_push_?: BoolStatus;
|
|
286
|
+
/** 是否要做消息计数 */
|
|
287
|
+
push_need_badge_?: BoolStatus;
|
|
288
|
+
/** 需要推送昵称 */
|
|
289
|
+
push_need_prefix_?: BoolStatus;
|
|
290
|
+
/** 是否要抄送 */
|
|
291
|
+
routable_?: BoolStatus;
|
|
292
|
+
/** 是否被拉黑 */
|
|
293
|
+
is_blacklisted_?: BoolStatus;
|
|
294
|
+
/** 是否支持离线消息 */
|
|
295
|
+
need_offline_?: BoolStatus;
|
|
296
|
+
/** 第三方自定义的推送属性,长度2048, json object */
|
|
297
|
+
push_payload_?: object;
|
|
298
|
+
/** 自定义推送文案,长度限制200字节 */
|
|
299
|
+
push_content_?: string;
|
|
300
|
+
/** 第三方扩展字段, 长度限制1024 */
|
|
301
|
+
server_ext_?: object;
|
|
302
|
+
/** 本地扩展字段, 格式不限,长度限制1024 */
|
|
303
|
+
local_ext_?: string;
|
|
304
|
+
/** 群组消息强推开关,强推全员设置true并强推列表为空 */
|
|
305
|
+
is_force_push_?: BoolStatus;
|
|
306
|
+
/** 群组消息强推列表 */
|
|
307
|
+
force_push_ids_list_?: Array<string>;
|
|
308
|
+
/** 群组消息强推文本 */
|
|
309
|
+
force_push_content_?: string;
|
|
310
|
+
/** 是否需要过易盾反垃圾 */
|
|
311
|
+
anti_spam_enable_?: BoolStatus;
|
|
312
|
+
/** (可选)开发者自定义的反垃圾字段,长度限制5000 */
|
|
313
|
+
anti_spam_content_?: string;
|
|
314
|
+
/** (可选)户配置的对某些单条消息另外的反垃圾的业务ID */
|
|
315
|
+
anti_apam_biz_id_?: string;
|
|
316
|
+
/** number, (可选) 单条消息是否使用易盾反垃圾 0:(在开通易盾的情况下)不过易盾反垃圾 */
|
|
317
|
+
anti_apam_using_yidun_?: number;
|
|
318
|
+
/** (可选) 是否命中客户端反垃圾 */
|
|
319
|
+
client_anti_spam_hitting_?: BoolStatus;
|
|
320
|
+
/** 群消息是否需要已读业务,0:不需要,1:需要 */
|
|
321
|
+
team_msg_need_ack_?: BoolStatus;
|
|
322
|
+
/** 是否已经发送群消息已读回执 */
|
|
323
|
+
team_msg_ack_sent_?: BoolStatus;
|
|
324
|
+
/** 群消息未读数 */
|
|
325
|
+
team_msg_unread_count_?: number;
|
|
326
|
+
/** (可选) 消息是否需要刷新到session服务,0:否,1:是;只有消息存离线的情况下,才会判断该参数,缺省:1 */
|
|
327
|
+
is_update_session_?: BoolStatus;
|
|
328
|
+
/** (可选)String, 易盾反垃圾增强反作弊专属字段, 限制json,长度限制1024 */
|
|
329
|
+
yidun_anti_cheating_?: string;
|
|
330
|
+
/** (可选)String, 环境变量,用于指向不同的抄送、第三方回调等配置(于8.0.0添加) */
|
|
331
|
+
env_config_?: string;
|
|
332
|
+
/** (可选)String, 易盾反垃圾扩展字段,限制 json,长度限制 1024 */
|
|
333
|
+
anti_spam_ext?: string;
|
|
334
|
+
/** String, 易盾反垃圾返回的结果字段 */
|
|
335
|
+
anti_spam_res?: string;
|
|
199
336
|
}
|
|
200
337
|
export interface IMMessageThreadInfo {
|
|
338
|
+
/** 被回复消息的消息发送者 */
|
|
201
339
|
reply_msg_from_account_?: string;
|
|
340
|
+
/** 被回复消息的消息接受者,群的话是tid */
|
|
202
341
|
reply_msg_to_account_?: string;
|
|
342
|
+
/** 被回复消息的消息发送时间 */
|
|
203
343
|
reply_msg_time_?: number;
|
|
344
|
+
/** 被回复消息的消息ID(serverId) */
|
|
204
345
|
reply_msg_id_server_?: string;
|
|
346
|
+
/** 被回复消息的消息ID(clientId) */
|
|
205
347
|
reply_msg_id_client_?: string;
|
|
348
|
+
/** thread消息的消息发送者 */
|
|
206
349
|
thread_msg_from_account_?: string;
|
|
350
|
+
/** thread消息的消息接受者,群的话是tid */
|
|
207
351
|
thread_msg_to_account_?: string;
|
|
352
|
+
/** thread消息的消息发送时间 */
|
|
208
353
|
thread_msg_time_?: number;
|
|
354
|
+
/** thread消息的消息ID(serverId) */
|
|
209
355
|
thread_msg_id_server_?: string;
|
|
356
|
+
/** thread消息的消息ID(clientId) */
|
|
210
357
|
thread_msg_id_client_?: string;
|
|
358
|
+
/** 消息是否已经被删除(可能是撤回,也可能是单向删除),查询thread消息历史时可能会有这个字段,大于0表示已经删除(目前撤回和单向删除都是1,未来可能区分) */
|
|
211
359
|
deleted_?: number;
|
|
212
360
|
}
|
|
213
361
|
export interface IMMessageRobotInfo {
|
|
362
|
+
/** 机器人 function */
|
|
214
363
|
function_?: string;
|
|
364
|
+
/** 机器人 topic */
|
|
215
365
|
topic_?: string;
|
|
366
|
+
/** 机器人 custom_content */
|
|
216
367
|
custom_content_?: string;
|
|
368
|
+
/** 机器人 account */
|
|
217
369
|
account_?: string;
|
|
218
370
|
}
|
|
219
371
|
export interface IMMessage {
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
372
|
+
/** 错误码 */
|
|
373
|
+
rescode_?: NIMResCode;
|
|
374
|
+
/** 消息属性 */
|
|
375
|
+
feature_?: NIMMessageFeature;
|
|
376
|
+
/** 会话类型 */
|
|
377
|
+
session_type_?: NIMSessionType;
|
|
378
|
+
/** 接收者ID */
|
|
379
|
+
receiver_accid_?: string;
|
|
380
|
+
/** 发送者ID */
|
|
381
|
+
sender_accid_?: string;
|
|
382
|
+
/** 消息时间戳(毫秒) */
|
|
383
|
+
timetag_?: number;
|
|
384
|
+
/** 消息内容,长度限制10000 */
|
|
385
|
+
content_?: string;
|
|
386
|
+
/** 消息类型 */
|
|
387
|
+
type_?: NIMMessageType;
|
|
388
|
+
/** 消息附件 ,长度限制10000 */
|
|
389
|
+
attach_?: string;
|
|
390
|
+
/** 消息ID(客户端) */
|
|
391
|
+
client_msg_id_?: string;
|
|
392
|
+
/** 消息属性设置 */
|
|
393
|
+
msg_setting_?: MessageSetting;
|
|
394
|
+
/** 第三方回调回来的自定义扩展字段 v7.8添加 */
|
|
395
|
+
third_party_callback_ext_?: string;
|
|
396
|
+
/** 消息的子类型,客户端定义,服务器透传 */
|
|
397
|
+
sub_type_?: number;
|
|
398
|
+
/** 媒体文件本地绝对路径(客户端) */
|
|
399
|
+
local_res_path_?: string;
|
|
400
|
+
/** 会话ID(客户端) */
|
|
401
|
+
local_talk_id_?: string;
|
|
402
|
+
/** 媒体文件ID(客户端) */
|
|
403
|
+
local_res_id_?: string;
|
|
404
|
+
/** 消息状态(客户端) */
|
|
405
|
+
status_?: NIMMsgLogStatus;
|
|
406
|
+
/** 消息子状态(客户端) */
|
|
407
|
+
sub_status_?: NIMMsgLogSubStatus;
|
|
408
|
+
/** thread消息信息 */
|
|
409
|
+
thread_info_?: IMMessageThreadInfo;
|
|
410
|
+
/** 机器人消息信息 */
|
|
411
|
+
robot_info_?: IMMessageRobotInfo;
|
|
412
|
+
/** 发送者客户端类型(只读) */
|
|
413
|
+
readonly_sender_client_type_?: NIMClientType;
|
|
414
|
+
/** 发送者客户端设备ID(只读) */
|
|
415
|
+
readonly_sender_device_id_?: string;
|
|
416
|
+
/** 发送者昵称(只读) */
|
|
417
|
+
readonly_sender_nickname_?: string;
|
|
418
|
+
/** 消息ID(服务器,只读) */
|
|
419
|
+
readonly_server_id_?: string;
|
|
244
420
|
}
|
|
245
421
|
export interface QueryMsgAsyncParam {
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
422
|
+
/** enum 会话类型,双人0,群组1,超大群5 (nim_msglog_def.h) */
|
|
423
|
+
to_type_?: NIMSessionType;
|
|
424
|
+
/** string 消息的发送方 */
|
|
425
|
+
from_account?: string;
|
|
426
|
+
/** string 消息的接收方 */
|
|
427
|
+
to_account?: string;
|
|
428
|
+
/** number 消息的服务端id */
|
|
429
|
+
server_id?: string;
|
|
430
|
+
/** string 消息的客户端id */
|
|
431
|
+
client_id?: string;
|
|
432
|
+
/** number 消息时间戳 */
|
|
433
|
+
time?: number;
|
|
252
434
|
}
|
|
253
435
|
export interface QueryThreadHistoryMsgAsyncParam {
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
436
|
+
/** number 起始时间 缺省0 */
|
|
437
|
+
from_time?: number;
|
|
438
|
+
/** number 结束时间 缺省0 */
|
|
439
|
+
to_time?: number;
|
|
440
|
+
/** string 截至消息的服务端id,不包含在查询结果中 缺省0 */
|
|
441
|
+
exclude_msg_id?: string;
|
|
442
|
+
/** number 查询条数限制 缺省100 */
|
|
443
|
+
limit?: number;
|
|
444
|
+
/** number 排序 缺省0 false */
|
|
445
|
+
reverse?: number;
|
|
446
|
+
}
|
|
447
|
+
/** @enum NIMFullTextSearchRule 全文检索规则 */
|
|
260
448
|
export declare enum NIMFullTextSearchRule {
|
|
449
|
+
/** 降序排列 */
|
|
261
450
|
kNIMFullTextSearchOrderByAsc = 1,
|
|
451
|
+
/** 升序排列 */
|
|
262
452
|
kNIMFullTextSearchOrderByDesc = 2,
|
|
453
|
+
/** 按会话排序 */
|
|
263
454
|
kNIMFullTextSearchNoGroupBySession = 4
|
|
264
455
|
}
|
|
265
456
|
export interface FullTextSearchOnlineAsyncParam {
|
|
@@ -287,63 +478,102 @@ export interface FullTextSearchOnlineAsyncParam {
|
|
|
287
478
|
msg_sub_type_filter_list_?: Array<number>;
|
|
288
479
|
}
|
|
289
480
|
export interface QueryMsglogResult {
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
481
|
+
/** 消息历史数 */
|
|
482
|
+
count_?: number;
|
|
483
|
+
/** 消息历史查询来源 */
|
|
484
|
+
source_?: NIMMsglogQuerySource;
|
|
485
|
+
/** 消息历史 */
|
|
486
|
+
msglogs_?: Array<IMMessage>;
|
|
293
487
|
}
|
|
294
488
|
export interface DeleteMsglogSelfNotifyParam {
|
|
295
|
-
|
|
489
|
+
/** 被删除的消息基本信息 */
|
|
490
|
+
item_list?: Array<DeleteMsglogSelfNotifyItemInfo>;
|
|
296
491
|
}
|
|
297
492
|
export interface MessageStatusChangedResult {
|
|
298
|
-
|
|
299
|
-
|
|
493
|
+
/** 错误码 */
|
|
494
|
+
rescode_?: NIMResCode;
|
|
495
|
+
/** 结果 */
|
|
496
|
+
results_?: Array<MessageStatusChanged>;
|
|
300
497
|
}
|
|
301
498
|
export interface MessageStatusChanged {
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
499
|
+
/** 变更后的状态 */
|
|
500
|
+
status_?: NIMMsgLogStatus;
|
|
501
|
+
/** 会话ID */
|
|
502
|
+
talk_id_?: string;
|
|
503
|
+
/** 临界的消息的时间戳 */
|
|
504
|
+
msg_timetag_?: number;
|
|
305
505
|
}
|
|
306
506
|
export interface LogsBackupExportInfo {
|
|
507
|
+
/** 数据库密码 */
|
|
307
508
|
encrypt_key_?: string;
|
|
509
|
+
/** 克隆数据库 */
|
|
308
510
|
cloned_?: boolean;
|
|
309
511
|
}
|
|
310
512
|
export interface LogsBackupImportInfo {
|
|
513
|
+
/** 克隆数据库 */
|
|
311
514
|
cloned_?: boolean;
|
|
312
515
|
}
|
|
313
516
|
export interface DeleteMsglogSelfNotifyItemInfo {
|
|
517
|
+
/** 会话id */
|
|
314
518
|
session_id_?: string;
|
|
519
|
+
/** 消息ID */
|
|
315
520
|
client_id_?: string;
|
|
521
|
+
/** 自定义字段 */
|
|
316
522
|
ext_?: string;
|
|
317
523
|
}
|
|
318
524
|
export interface QueryMsgByOptionsAsyncParam {
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
525
|
+
/** 消息历史的检索范围(目前暂不支持某些范围的组合检索,详见NIMMsgLogQueryRange说明) */
|
|
526
|
+
query_range_?: NIMMsgLogQueryRange;
|
|
527
|
+
/** 会话id(对方的account id或者群组tid)的集合,目前暂不支持多个的组合检索,详见NIMMsgLogQueryRange说明 */
|
|
528
|
+
ids_?: Array<string>;
|
|
529
|
+
/** 本次查询的消息条数上限(最多100条) */
|
|
530
|
+
limit_count_?: number;
|
|
531
|
+
/** 起始时间点,单位:毫秒 */
|
|
532
|
+
from_time_?: number;
|
|
533
|
+
/** 结束时间点,单位:毫秒 */
|
|
534
|
+
end_time_?: number;
|
|
535
|
+
/** 结束查询的最后一条消息的end_client_msg_id(不包含在查询结果中) */
|
|
536
|
+
end_client_msg_id_?: string;
|
|
537
|
+
/** true:反向查询(按时间正序起查,正序排列),false:按时间逆序起查,逆序排列(建议默认为false) */
|
|
538
|
+
reverse_?: boolean;
|
|
539
|
+
/** 检索的消息类型(目前只支持kNIMMessageTypeText、kNIMMessageTypeImage和kNIMMessageTypeFile这三种类型消息) */
|
|
540
|
+
msg_type_?: NIMMessageType;
|
|
541
|
+
/** 消息的子类型 */
|
|
542
|
+
msg_sub_type_?: number;
|
|
543
|
+
/** 检索文本(目前只支持kNIMMessageTypeText和kNIMMessageTypeFile这两种类型消息的文本关键字检索,即支持文字消息和文件名的检索 */
|
|
544
|
+
search_content_?: string;
|
|
329
545
|
}
|
|
330
546
|
export interface GetMessagesResult {
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
547
|
+
/** 操作结果 */
|
|
548
|
+
rescode_?: NIMResCode;
|
|
549
|
+
/** 会话ID */
|
|
550
|
+
session_id_?: string;
|
|
551
|
+
/** 会话类型 */
|
|
552
|
+
session_type_?: NIMSessionType;
|
|
553
|
+
/** 结果是否可信:例如当查询范围不在可信时间段内, 但远端请求失败时, 返回的本地结果可能不完整 */
|
|
554
|
+
reliable_?: boolean;
|
|
555
|
+
/** 历史消息列表 */
|
|
556
|
+
messages_?: Array<IMMessage>;
|
|
336
557
|
}
|
|
337
558
|
export interface QueryMsgByKeywordParam {
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
559
|
+
/** 要查询的关键字 */
|
|
560
|
+
keyword_: string;
|
|
561
|
+
/** 查询id,对方的account id或者群组tid */
|
|
562
|
+
account_id_?: string;
|
|
563
|
+
/** enum 会话类型,双人0,群组1 (nim_msglog_def.h) */
|
|
564
|
+
to_type_?: NIMSessionType;
|
|
565
|
+
/** array 要获取的消息类型,默认只有文本类消息,可自行扩充其他类型消息,除通知类消息不受支持外,其他类型消息(包括自定义消息)均可检索 */
|
|
566
|
+
type_: Array<NIMMessageType>;
|
|
567
|
+
/** number 本次查询的消息条数上限 */
|
|
568
|
+
limit_count_?: number;
|
|
569
|
+
/** number 起始时间点,单位:毫秒 */
|
|
570
|
+
from_time_?: number;
|
|
571
|
+
/** number 结束时间点,单位:毫秒 */
|
|
572
|
+
end_time_?: number;
|
|
573
|
+
/** enum 查询方向 */
|
|
574
|
+
direction_?: NIMMsglogSearchDirection;
|
|
575
|
+
/** enum 分段引擎 */
|
|
576
|
+
segment_engine_?: NIMMsglogSearchSegmentEngine;
|
|
347
577
|
}
|
|
348
578
|
export type QueryMsgCallback = (rescode: NIMResCode, id: string, to_type: NIMSessionType, result: QueryMsglogResult) => void;
|
|
349
579
|
export type GetMessagesDynamicallyCallback = (result: GetMessagesResult) => void;
|