node-nim 9.14.3 → 10.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (182) hide show
  1. package/README.md +7 -1
  2. package/dist/loader.js +35 -35
  3. package/dist/nim/client.js +184 -184
  4. package/dist/nim/client.js.map +1 -1
  5. package/dist/nim/data_sync.js +19 -19
  6. package/dist/nim/friend.js +150 -150
  7. package/dist/nim/global.js +131 -131
  8. package/dist/nim/msglog.js +687 -687
  9. package/dist/nim/nos.js +216 -180
  10. package/dist/nim/nos.js.map +1 -1
  11. package/dist/nim/online_session.js +85 -85
  12. package/dist/nim/pass_through_proxy.js +39 -39
  13. package/dist/nim/plugin.js +65 -65
  14. package/dist/nim/session.js +392 -392
  15. package/dist/nim/subscribe_event.js +142 -142
  16. package/dist/nim/super_team.js +592 -615
  17. package/dist/nim/super_team.js.map +1 -1
  18. package/dist/nim/sysmsg.js +194 -194
  19. package/dist/nim/talk.js +209 -209
  20. package/dist/nim/talk.js.map +1 -1
  21. package/dist/nim/talkex.js +191 -191
  22. package/dist/nim/team.js +818 -830
  23. package/dist/nim/team.js.map +1 -1
  24. package/dist/nim/tool.js +119 -119
  25. package/dist/nim/user.js +201 -201
  26. package/dist/nim_def/client_def.js +245 -245
  27. package/dist/nim_def/client_def.js.map +1 -1
  28. package/dist/nim_def/data_sync_def.js +20 -20
  29. package/dist/nim_def/doc_trans_def.js +16 -16
  30. package/dist/nim_def/friend_def.js +37 -37
  31. package/dist/nim_def/global_def.js +39 -39
  32. package/dist/nim_def/msglog_def.js +148 -148
  33. package/dist/nim_def/nos_def.js +16 -16
  34. package/dist/nim_def/online_session_def.js +2 -2
  35. package/dist/nim_def/pass_through_proxy_def.js +10 -10
  36. package/dist/nim_def/plugin_def.js +2 -2
  37. package/dist/nim_def/session_def.js +26 -26
  38. package/dist/nim_def/subscribe_event_def.js +52 -52
  39. package/dist/nim_def/super_team_def.js +64 -71
  40. package/dist/nim_def/super_team_def.js.map +1 -1
  41. package/dist/nim_def/sysmsg_def.js +28 -28
  42. package/dist/nim_def/talk_def.js +2 -2
  43. package/dist/nim_def/talkex_def.js +2 -2
  44. package/dist/nim_def/team_def.js +69 -76
  45. package/dist/nim_def/team_def.js.map +1 -1
  46. package/dist/nim_def/tool_def.js +11 -11
  47. package/dist/nim_def/user_def.js +22 -22
  48. package/dist/node-nim.js +171 -171
  49. package/dist/node-nim.js.map +1 -1
  50. package/dist/qchat/attachment.js +63 -63
  51. package/dist/qchat/channel.js +314 -314
  52. package/dist/qchat/channel_category.js +187 -187
  53. package/dist/qchat/instance.js +77 -77
  54. package/dist/qchat/message.js +285 -285
  55. package/dist/qchat/role.js +423 -423
  56. package/dist/qchat/server.js +453 -453
  57. package/dist/qchat/system_notification.js +74 -74
  58. package/dist/qchat_def/attachment_def.js +2 -2
  59. package/dist/qchat_def/channel_def.js +2 -2
  60. package/dist/qchat_def/instance_def.js +2 -2
  61. package/dist/qchat_def/message_def.js +2 -2
  62. package/dist/qchat_def/public_def.js +649 -649
  63. package/dist/qchat_def/public_def.js.map +1 -1
  64. package/dist/qchat_def/role_def.js +2 -2
  65. package/dist/qchat_def/server_def.js +2 -2
  66. package/dist/qchat_def/system_notification_def.js +2 -2
  67. package/dist/v2/v2_nim_chatroom_client.js +135 -0
  68. package/dist/v2/v2_nim_chatroom_client.js.map +1 -0
  69. package/dist/v2/v2_nim_chatroom_service.js +244 -0
  70. package/dist/v2/v2_nim_chatroom_service.js.map +1 -0
  71. package/dist/v2/v2_nim_client.js +138 -0
  72. package/dist/v2/v2_nim_client.js.map +1 -0
  73. package/dist/v2/v2_nim_conversation_group_service.js +116 -0
  74. package/dist/v2/v2_nim_conversation_group_service.js.map +1 -0
  75. package/dist/v2/v2_nim_conversation_service.js +236 -0
  76. package/dist/v2/v2_nim_conversation_service.js.map +1 -0
  77. package/dist/v2/v2_nim_friend_service.js +128 -0
  78. package/dist/v2/v2_nim_friend_service.js.map +1 -0
  79. package/dist/v2/v2_nim_login_service.js +119 -123
  80. package/dist/v2/v2_nim_login_service.js.map +1 -1
  81. package/dist/v2/v2_nim_message_service.js +382 -0
  82. package/dist/v2/v2_nim_message_service.js.map +1 -0
  83. package/dist/v2/v2_nim_notification_service.js +30 -0
  84. package/dist/v2/v2_nim_notification_service.js.map +1 -0
  85. package/dist/v2/v2_nim_setting_service.js +86 -0
  86. package/dist/v2/v2_nim_setting_service.js.map +1 -0
  87. package/dist/v2/v2_nim_storage_service.js +58 -0
  88. package/dist/v2/v2_nim_storage_service.js.map +1 -0
  89. package/dist/v2/v2_nim_team_service.js +360 -0
  90. package/dist/v2/v2_nim_team_service.js.map +1 -0
  91. package/dist/v2/v2_nim_user_service.js +76 -0
  92. package/dist/v2/v2_nim_user_service.js.map +1 -0
  93. package/dist/v2/v2_nim_utilities.js +276 -0
  94. package/dist/v2/v2_nim_utilities.js.map +1 -0
  95. package/dist/v2_def/v2_nim_callback_def.js +2 -2
  96. package/dist/v2_def/v2_nim_enum_def.js +1087 -325
  97. package/dist/v2_def/v2_nim_enum_def.js.map +1 -1
  98. package/dist/v2_def/v2_nim_struct_def.js +2 -2
  99. package/package.json +1 -1
  100. package/script/download-sdk.js +2 -2
  101. package/script/publish-to-netease-npm.js +3 -2
  102. package/types/loader.d.ts +2 -2
  103. package/types/nim/client.d.ts +123 -123
  104. package/types/nim/data_sync.d.ts +12 -12
  105. package/types/nim/friend.d.ts +82 -82
  106. package/types/nim/global.d.ts +69 -69
  107. package/types/nim/msglog.d.ts +392 -392
  108. package/types/nim/nos.d.ts +118 -118
  109. package/types/nim/online_session.d.ts +44 -44
  110. package/types/nim/pass_through_proxy.d.ts +24 -24
  111. package/types/nim/plugin.d.ts +39 -39
  112. package/types/nim/session.d.ts +212 -212
  113. package/types/nim/subscribe_event.d.ts +87 -87
  114. package/types/nim/super_team.d.ts +331 -342
  115. package/types/nim/sysmsg.d.ts +105 -105
  116. package/types/nim/talk.d.ts +94 -94
  117. package/types/nim/talkex.d.ts +95 -95
  118. package/types/nim/team.d.ts +461 -467
  119. package/types/nim/tool.d.ts +77 -77
  120. package/types/nim/user.d.ts +111 -111
  121. package/types/nim_def/client_def.d.ts +284 -284
  122. package/types/nim_def/data_sync_def.d.ts +19 -19
  123. package/types/nim_def/doc_trans_def.d.ts +11 -11
  124. package/types/nim_def/friend_def.d.ts +65 -65
  125. package/types/nim_def/global_def.d.ts +62 -62
  126. package/types/nim_def/msglog_def.d.ts +373 -373
  127. package/types/nim_def/nos_def.d.ts +72 -72
  128. package/types/nim_def/online_session_def.d.ts +34 -34
  129. package/types/nim_def/pass_through_proxy_def.d.ts +13 -13
  130. package/types/nim_def/plugin_def.d.ts +8 -8
  131. package/types/nim_def/session_def.d.ts +114 -114
  132. package/types/nim_def/subscribe_event_def.d.ts +83 -83
  133. package/types/nim_def/super_team_def.d.ts +144 -163
  134. package/types/nim_def/sysmsg_def.d.ts +70 -70
  135. package/types/nim_def/talk_def.d.ts +96 -96
  136. package/types/nim_def/talkex_def.d.ts +112 -112
  137. package/types/nim_def/team_def.d.ts +167 -184
  138. package/types/nim_def/tool_def.d.ts +28 -28
  139. package/types/nim_def/user_def.d.ts +59 -59
  140. package/types/node-nim.d.ts +90 -93
  141. package/types/qchat/attachment.d.ts +40 -40
  142. package/types/qchat/channel.d.ts +139 -139
  143. package/types/qchat/channel_category.d.ts +82 -82
  144. package/types/qchat/instance.d.ts +46 -46
  145. package/types/qchat/message.d.ts +128 -128
  146. package/types/qchat/role.d.ts +166 -166
  147. package/types/qchat/server.d.ts +198 -198
  148. package/types/qchat/system_notification.d.ts +39 -39
  149. package/types/qchat_def/attachment_def.d.ts +71 -71
  150. package/types/qchat_def/channel_def.d.ts +643 -643
  151. package/types/qchat_def/instance_def.d.ts +214 -214
  152. package/types/qchat_def/message_def.d.ts +565 -565
  153. package/types/qchat_def/public_def.d.ts +754 -754
  154. package/types/qchat_def/role_def.d.ts +413 -413
  155. package/types/qchat_def/server_def.d.ts +529 -529
  156. package/types/qchat_def/system_notification_def.d.ts +172 -172
  157. package/types/v2/v2_nim_chatroom_client.d.ts +73 -0
  158. package/types/v2/v2_nim_chatroom_service.d.ts +114 -0
  159. package/types/v2/v2_nim_client.d.ts +75 -0
  160. package/types/v2/v2_nim_conversation_group_service.d.ts +54 -0
  161. package/types/v2/v2_nim_conversation_service.d.ts +110 -0
  162. package/types/v2/v2_nim_friend_service.d.ts +58 -0
  163. package/types/v2/v2_nim_login_service.d.ts +80 -96
  164. package/types/v2/v2_nim_message_service.d.ts +143 -0
  165. package/types/v2/v2_nim_notification_service.d.ts +18 -0
  166. package/types/v2/v2_nim_setting_service.d.ts +43 -0
  167. package/types/v2/v2_nim_storage_service.d.ts +28 -0
  168. package/types/v2/v2_nim_team_service.d.ts +184 -0
  169. package/types/v2/v2_nim_user_service.d.ts +34 -0
  170. package/types/v2/v2_nim_utilities.d.ts +168 -0
  171. package/types/v2_def/v2_nim_callback_def.d.ts +7 -20
  172. package/types/v2_def/v2_nim_enum_def.d.ts +1009 -300
  173. package/types/v2_def/v2_nim_struct_def.d.ts +1539 -338
  174. package/dist/chatroom/chatroom.js +0 -263
  175. package/dist/chatroom/chatroom.js.map +0 -1
  176. package/dist/chatroom_def/chatroom_def.js +0 -120
  177. package/dist/chatroom_def/chatroom_def.js.map +0 -1
  178. package/dist/v2/v2_nim_instance.js +0 -44
  179. package/dist/v2/v2_nim_instance.js.map +0 -1
  180. package/types/chatroom/chatroom.d.ts +0 -55
  181. package/types/chatroom_def/chatroom_def.d.ts +0 -448
  182. package/types/v2/v2_nim_instance.d.ts +0 -25
@@ -1,338 +1,1539 @@
1
- export interface V2NIMError {
2
- /** 错误来源 */
3
- source?: V2NIMErrorSource;
4
- /** 错误码 */
5
- code?: V2NIMErrorCode;
6
- /** 错误描述 */
7
- desc?: string;
8
- /** 错误详情 */
9
- detail?: Map<string, string>;
10
- }
11
- export interface V2NIMLinkOption {
12
- /** 是否使用 https */
13
- useHttps?: boolean;
14
- /** 是否为专属集群 */
15
- exclusiveCluster?: boolean;
16
- /** 非对称加密"交换密钥"协议加密算法 */
17
- asymmetricEncryptionAlgorithm?: V2NIMAsymmetricEncryptionAlgorithm;
18
- /** 对称加密通信加密算法 */
19
- symmetricEncryptionAlgorithm?: V2NIMSymmetricEncryptionAlgorithm;
20
- }
21
- export interface V2NIMAttachmentOption {
22
- /** 缩略图宽度 */
23
- thumbnailWidth?: number;
24
- /** 缩略图高度 */
25
- thumbnailHeight?: number;
26
- /** 缩略图质量, 取值范围 [0, 100], 0 表示使用默认值 */
27
- thumbnailQuality?: number;
28
- /** 缩略图文件名模板, 以{filename}为token进行替换 */
29
- thumbnailNameTemplate?: string;
30
- /** 是否开启动图缩略图的支持 */
31
- enableAnimatedImageThumbnail?: boolean;
32
- /** 是否自动下载图片缩略图 */
33
- autoDownloadImageThumb?: boolean;
34
- /** 是否自动下载视频缩略图 */
35
- autoDownloadVideoThumb?: boolean;
36
- /** 是否自动下载图片 */
37
- autoDownloadImage?: boolean;
38
- /** 是否自动下载音频 */
39
- autoDownloadAudio?: boolean;
40
- /** 是否自动下载视频 */
41
- autoDownloadVideo?: boolean;
42
- }
43
- export interface V2NIMFCSOption {
44
- /** 启用融合存储 */
45
- enableFcs?: boolean;
46
- /** 融合存储认证类型 */
47
- fcsAuthType?: V2NIMFCSAuthType;
48
- /** mock refer */
49
- mockRefer?: string;
50
- /** mock ua */
51
- mockUa?: string;
52
- }
53
- export interface V2NIMPrivateServerOption {
54
- /** IP 协议版本 */
55
- ipProtocolVersion?: V2NIMIPProtocolVersion;
56
- /** 是否使用 httpdns */
57
- useHttpdns?: boolean;
58
- /** lbs 地址 */
59
- lbsAddresses?: Array<string>;
60
- /** nos lbs 地址 */
61
- nosLbsAddress?: string;
62
- /** 默认 link 地址 */
63
- defaultLinkAddress?: string;
64
- /** 默认 ipv6 link 地址 */
65
- defaultLinkAddressIpv6?: string;
66
- /** 默认 nos 上传地址 */
67
- defaultNosUploadAddress?: string;
68
- /** 默认 nos 上传主机地址 */
69
- defaultNosUploadHost?: string;
70
- /** nos 下载地址拼接模板, 用于拼接最终得到的下载地址 */
71
- nosDownloadAddress?: string;
72
- /** nos 加速域名列表 */
73
- nosAccelerateHosts?: Array<string>;
74
- /** nos 加速地址拼接模板, 用于获得加速后的下载地址 */
75
- nosAccelerateAddress?: string;
76
- /** 探测 ipv4 地址类型使用的 url */
77
- probeIpv4Url?: string;
78
- /** 探测 ipv6 地址类型使用的 url */
79
- probeIpv6Url?: string;
80
- /** 非对称加密密钥 A, RSA: module, SM2: X */
81
- asymmetricEncryptionKeyA?: string;
82
- /** 非对称加密密钥 B, RSA: EXP, SM2: SM2Y */
83
- asymmetricEncryptionKeyB?: string;
84
- /** 非对称加密算法 key 版本号 */
85
- asymmetricEncryptionKeyVersion?: number;
86
- }
87
- export interface V2NIMDatabaseOption {
88
- /** 数据库加密密钥 */
89
- encryptionKey?: string;
90
- /** 是否开启用户数据备份(本地)功能 */
91
- enableBackup?: boolean;
92
- /** 是否开启用户数据恢复(本地)功能 */
93
- enableRestore?: boolean;
94
- /** 用户数据备份(本地)目录, 缺省在数据文件所在目录创建一个dbFile.back目录 */
95
- backupFolder?: string;
96
- }
97
- export interface V2NIMBasicOption {
98
- /** 自定义客户端类型 */
99
- customClientType?: number;
100
- /** 登录自定义信息, 最大 32 个字符 */
101
- customTag?: string;
102
- /** 日志保留天数 */
103
- logReserveDays?: number;
104
- /** SDK日志级别 */
105
- sdkLogLevel?: V2NIMSDKLogLevel;
106
- /** 是否禁用 macOS 下的 App Nap 功能 */
107
- disableAppNap?: boolean;
108
- }
109
- export interface V2NIMInitOption {
110
- /** app key */
111
- appkey?: string;
112
- /** app数据目录, 为空则使用默认目录 */
113
- appDataPath?: string;
114
- /** 基础配置 */
115
- basicOption?: V2NIMBasicOption;
116
- /** 连接相关配置 */
117
- linkOption?: V2NIMLinkOption;
118
- /** 数据库配置 */
119
- databaseOption?: V2NIMDatabaseOption;
120
- /** 附件配置 */
121
- attachmentOption?: V2NIMAttachmentOption;
122
- /** 融合存储配置 */
123
- fcsOption?: V2NIMFCSOption;
124
- /** 私有化配置 */
125
- privateServerOption?: V2NIMPrivateServerOption;
126
- }
127
- export interface V2NIMMessageAttachment {
128
- /** 存储 url */
129
- url?: string;
130
- /** 显示名 */
131
- name?: string;
132
- /** md5 */
133
- md5?: string;
134
- /** 数据长度 */
135
- length?: string;
136
- /** 上传状态 */
137
- uploadState?: V2NIMMessageAttachmentUploadState;
138
- /** 下载状态 */
139
- downloadState?: V2NIMMessageAttachmentDownloadState;
140
- }
141
- export interface V2NIMMessagePushOption {
142
- /** 推送文本 */
143
- content?: string;
144
- /** 推送数据 */
145
- payload?: string;
146
- /** 是否强制推送, 忽略用户消息提醒相关设置 */
147
- forcePush?: boolean;
148
- /** 推送文本 */
149
- forcePushContent?: string;
150
- /** 推送目标账号列表 */
151
- forcePushAccountIds?: Array<string>;
152
- }
153
- export interface V2NIMMessageAntiSpamOption {
154
- /** 易盾反作弊(辅助检测数据), json格式, 限制长度1024 */
155
- yidunAntiCheating?: string;
156
- /** 易盾反垃圾(辅助检测数据), json格式, 限制长度1024 */
157
- yidunAntiSpam?: string;
158
- /** 自定义消息中需要反垃圾的内容(仅当消息类型为自定义消息时有效) */
159
- customMessageAntiSpamContent?: string;
160
- /** 指定易盾业务id, 而不使用云信后台配置的 */
161
- yidunBusinessId?: string;
162
- /** 指定不需要易盾反垃圾(仅开通易盾时有效) */
163
- yidunAntiSpamDisabled?: boolean;
164
- }
165
- export interface V2NIMMessageConfig {
166
- /** 是否不需要在服务端保存历史消息 */
167
- historyDisabled?: boolean;
168
- /** 是否不需要漫游消息 */
169
- roamingDisabled?: boolean;
170
- /** 是否不需要离线消息 */
171
- offlineDisabled?: boolean;
172
- /** 是否不需要发送方多端在线同步消息 */
173
- senderSyncDisabled?: boolean;
174
- /** 是否不需要更新消息所属的会话信息 */
175
- conversationUpdateDisabled?: boolean;
176
- /** 是否不需要推送消息 */
177
- pushDisabled?: boolean;
178
- /** 是否不需要推送消息未读角标计数 */
179
- pushBadgeDisabled?: boolean;
180
- /** 是否不需要推送消息发送者昵称 */
181
- pushNickDisabled?: boolean;
182
- /** 是否需要群消息已读回执信息 */
183
- teamReceiptEnabled?: boolean;
184
- /** 是否不需要路由消息 */
185
- routeDisabled?: boolean;
186
- }
187
- export interface V2NIMMessageRefer {
188
- /** 发送方账号 */
189
- senderAccountId?: string;
190
- /** 接收方账号 */
191
- receiverAccountId?: string;
192
- /** 客户端消息 id */
193
- clientId?: string;
194
- /** 服务端消息 id */
195
- serverId?: string;
196
- /** 消息时间 */
197
- time?: number;
198
- }
199
- export interface V2NIMMessageQueryTime {
200
- /** 起始时间 */
201
- begin?: number;
202
- /** 结束时间 */
203
- end?: number;
204
- /** 包含起始时间 */
205
- includeBegin?: boolean;
206
- /** 包含结束时间 */
207
- includeEnd?: boolean;
208
- }
209
- export interface V2NIMMessageUpdatedInfo {
210
- /** 消息状态 */
211
- state?: V2NIMMessageState;
212
- /** 服务端扩展信息 */
213
- serverExtension?: string;
214
- /** 客户端本地扩展信息 */
215
- localExtension?: string;
216
- }
217
- export interface V2NIMMessage {
218
- /** 会话标识 */
219
- conversationId?: string;
220
- /** 客户端消息 id */
221
- clientId?: string;
222
- /** 服务端消息 id */
223
- serverId?: string;
224
- /** 消息时间 */
225
- time?: number;
226
- /** 发送方账号 */
227
- senderAccountId?: string;
228
- /** 接收方账号 */
229
- receiverAccountId?: string;
230
- /** 消息类型 */
231
- type?: V2NIMMessageType;
232
- /** 消息子类型 */
233
- subType?: number;
234
- /** 消息文本 */
235
- text?: string;
236
- /** 附件 */
237
- attachment?: V2NIMMessageAttachment;
238
- /** 服务端扩展信息 */
239
- serverExtension?: string;
240
- /** 客户端本地扩展信息 */
241
- localExtension?: string;
242
- /** 发送状态 */
243
- sendState?: V2NIMMessageSendState;
244
- /** 附件上传状态 */
245
- attachmentUploadState?: V2NIMMessageAttachmentUploadState;
246
- /** 附件下载状态 */
247
- attachmentDownloadState?: V2NIMMessageAttachmentDownloadState;
248
- /** 消息状态 */
249
- state?: V2NIMMessageState;
250
- /** 推送相关 */
251
- pushOption?: V2NIMMessagePushOption;
252
- /** 反垃圾相关 */
253
- antiSpamOption?: V2NIMMessageAntiSpamOption;
254
- /** 设置相关 */
255
- config?: V2NIMMessageConfig;
256
- /** Thread消息引用 */
257
- threadRefer?: V2NIMMessageRefer;
258
- /** 回复消息引用 */
259
- replyRefer?: V2NIMMessageRefer;
260
- }
261
- export interface V2NIMSendMessageParam {
262
- /** 环境变量,用于指向不同的抄送,第三方回调等配置 */
263
- env?: string;
264
- /** 推送相关 */
265
- pushOption?: V2NIMMessagePushOption;
266
- /** 设置相关 */
267
- config?: V2NIMMessageConfig;
268
- /** 反垃圾相关 */
269
- antiSpamOption?: V2NIMMessageAntiSpamOption;
270
- }
271
- export interface V2NIMSendMessageResult {
272
- /** 第三方回调回来的自定义扩展 */
273
- thirdPartyCallbackExtension?: string;
274
- /** 易盾反垃圾返回的结果 */
275
- yidunAntiSpamResult?: string;
276
- }
277
- export interface V2NIMConversation {
278
- /** 会话标识 */
279
- conversationId?: string;
280
- /** 本地扩展信息 */
281
- localExt?: string;
282
- /** 服务端扩展信息 */
283
- serverExt?: string;
284
- /** 未读计数 */
285
- unreadCount?: number;
286
- /** 会话中最新的消息 */
287
- latestMessage?: V2NIMMessage;
288
- }
289
- /** @brief 动态 token 获取回调 */
290
- /** @param account 账号 */
291
- /** @return token */
292
- export type V2NIMTokenProvider = (account: string) => string;
293
- /** @brief 登陆扩展信息获取回调 */
294
- /** @param account 账号 */
295
- /** @return 登陆扩展信息 */
296
- export type V2NIMLoginExtensionProvider = (account: string) => string;
297
- export interface V2NIMLoginOption {
298
- /** 重试次数 */
299
- retryCount?: number;
300
- /** 强制登录模式 */
301
- forceMode?: boolean;
302
- /** 认证类型 */
303
- authType?: V2NIMLoginAuthType;
304
- /** 动态 token 获取回调 */
305
- tokenProvider?: V2NIMTokenProvider;
306
- /** 登陆扩展信息获取回调 */
307
- loginExtensionProvider?: V2NIMLoginExtensionProvider;
308
- /** 数据同步等级 */
309
- syncLevel?: V2NIMDataSyncLevel;
310
- }
311
- export interface V2NIMLoginClient {
312
- /** 客户端类型 */
313
- type?: V2NIMLoginClientType;
314
- /** 操作系统 */
315
- os?: string;
316
- /** 登录时间 */
317
- timestamp?: number;
318
- /** 自定义信息 */
319
- custom?: string;
320
- /** 自定义类型 */
321
- customClientType?: number;
322
- }
323
- export interface V2NIMKickedOfflineDetail {
324
- /** 原因 */
325
- reason?: V2NIMKickedOfflineReason;
326
- /** 说明 */
327
- reasonDesc?: string;
328
- /** 客户端类型 */
329
- clientType?: V2NIMLoginClientType;
330
- /** 自定义客户端类型 */
331
- customClientType?: number;
332
- }
333
- export interface V2NIMDataSyncDetail {
334
- /** 数据同步类型 */
335
- type?: V2NIMDataSyncType;
336
- /** 数据同步状态 */
337
- state?: V2NIMDataSyncState;
338
- }
1
+ export interface V2NIMError {
2
+ /** 错误码, 详见 V2NIMErrorCode */
3
+ code?: number;
4
+ /** 错误描述 */
5
+ desc?: string;
6
+ /** 错误详情 */
7
+ detail?: Map<string, string>;
8
+ }
9
+ export interface V2NIMLinkOption {
10
+ /** 连接超时, 单位毫秒 */
11
+ linkTimeout?: number;
12
+ /** 协议超时, 单位毫秒 */
13
+ protocolTimeout?: number;
14
+ /** 非对称加密"交换密钥"协议加密算法 */
15
+ asymmetricEncryptionAlgorithm?: V2NIMAsymmetricEncryptionAlgorithm;
16
+ /** 对称加密通信加密算法 */
17
+ symmetricEncryptionAlgorithm?: V2NIMSymmetricEncryptionAlgorithm;
18
+ }
19
+ export interface V2NIMFCSOption {
20
+ /** 融合存储认证类型 */
21
+ fcsAuthType?: V2NIMFCSAuthType;
22
+ /** mock refer */
23
+ mockRefer?: string;
24
+ /** mock ua */
25
+ mockUa?: string;
26
+ }
27
+ export interface V2NIMPrivateServerOption {
28
+ /** IP 协议版本 */
29
+ ipProtocolVersion?: V2NIMIPProtocolVersion;
30
+ /** lbs 地址 */
31
+ lbsAddresses?: Array<string>;
32
+ /** nos lbs 地址 */
33
+ nosLbsAddress?: string;
34
+ /** 默认 link 地址 */
35
+ defaultLinkAddress?: string;
36
+ /** 默认 ipv6 link 地址 */
37
+ defaultLinkAddressIpv6?: string;
38
+ /** 默认 nos 上传地址 */
39
+ defaultNosUploadAddress?: string;
40
+ /** 默认 nos 上传主机地址 */
41
+ defaultNosUploadHost?: string;
42
+ /** nos 下载地址拼接模板, 用于拼接最终得到的下载地址 */
43
+ nosDownloadAddress?: string;
44
+ /** nos 加速域名列表 */
45
+ nosAccelerateHosts?: Array<string>;
46
+ /** nos 加速地址拼接模板, 用于获得加速后的下载地址 */
47
+ nosAccelerateAddress?: string;
48
+ /** 探测 ipv4 地址类型使用的 url */
49
+ probeIpv4Url?: string;
50
+ /** 探测 ipv6 地址类型使用的 url */
51
+ probeIpv6Url?: string;
52
+ /** 非对称加密密钥 A, RSA: module, SM2: X */
53
+ asymmetricEncryptionKeyA?: string;
54
+ /** 非对称加密密钥 B, RSA: EXP, SM2: SM2Y */
55
+ asymmetricEncryptionKeyB?: string;
56
+ /** 非对称加密算法 key 版本号 */
57
+ asymmetricEncryptionKeyVersion?: number;
58
+ }
59
+ export interface V2NIMDatabaseOption {
60
+ /** 数据库加密密钥 */
61
+ encryptionKey?: string;
62
+ /** 是否开启用户数据备份(本地)功能 */
63
+ enableBackup?: boolean;
64
+ /** 是否开启用户数据恢复(本地)功能 */
65
+ enableRestore?: boolean;
66
+ /** 用户数据备份(本地)目录, 缺省在数据文件所在目录创建一个dbFile.back目录 */
67
+ backupFolder?: string;
68
+ /** SQLCipher 版本, macOS / Linux 平台有效 */
69
+ sqlcipherVersion?: V2NIMSQLCipherVersion;
70
+ }
71
+ export interface V2NIMBasicOption {
72
+ /** 是否使用 https */
73
+ useHttps?: boolean;
74
+ /** 是否使用 httpdns */
75
+ useHttpdns?: boolean;
76
+ /** 自定义客户端类型 */
77
+ customClientType?: number;
78
+ /** 登录自定义信息, 最大 32 个字符 */
79
+ customTag?: string;
80
+ /** 日志保留天数 */
81
+ logReserveDays?: number;
82
+ /** SDK日志级别 */
83
+ sdkLogLevel?: V2NIMSDKLogLevel;
84
+ /** 是否禁用 macOS 下的 App Nap 功能 */
85
+ disableAppNap?: boolean;
86
+ }
87
+ export interface V2NIMInitOption {
88
+ /** app key */
89
+ appkey?: string;
90
+ /** app 数据目录, 为空则使用默认目录 */
91
+ appDataPath?: string;
92
+ /** 基础配置 */
93
+ basicOption?: V2NIMBasicOption;
94
+ /** 连接相关配置 */
95
+ linkOption?: V2NIMLinkOption;
96
+ /** 数据库配置 */
97
+ databaseOption?: V2NIMDatabaseOption;
98
+ /** 融合存储配置 */
99
+ fcsOption?: V2NIMFCSOption;
100
+ /** 私有化配置 */
101
+ privateServerOption?: V2NIMPrivateServerOption;
102
+ }
103
+ export interface V2NIMStorageScene {
104
+ /** 场景名 */
105
+ sceneName?: string;
106
+ /** 过期时间, 单位秒, 0 表示不过期 */
107
+ expireTime?: number;
108
+ }
109
+ export interface V2NIMMessageAttachment {
110
+ /** 附件内容 */
111
+ raw?: string;
112
+ }
113
+ export interface V2NIMMessageFileAttachment extends V2NIMMessageAttachment {
114
+ /** 文件大小 */
115
+ size?: number;
116
+ /** 文件 md5 */
117
+ md5?: string;
118
+ /** 文件 url */
119
+ url?: string;
120
+ /** 文件显示名称 */
121
+ name?: string;
122
+ /** 文件本地路径 */
123
+ path?: string;
124
+ /** 文件扩展名 */
125
+ ext?: string;
126
+ /** 文件存储场景 */
127
+ sceneName?: string;
128
+ /** 附件上传状态 */
129
+ uploadState?: V2NIMMessageAttachmentUploadState;
130
+ }
131
+ export interface V2NIMMessageImageAttachment extends V2NIMMessageFileAttachment {
132
+ /** 图片宽度 */
133
+ width?: number;
134
+ /** 图片高度 */
135
+ height?: number;
136
+ }
137
+ export interface V2NIMMessageAudioAttachment extends V2NIMMessageFileAttachment {
138
+ /** 语音文件播放时长 */
139
+ duration?: number;
140
+ }
141
+ export interface V2NIMMessageVideoAttachment extends V2NIMMessageFileAttachment {
142
+ /** 视频文件播放时长 */
143
+ duration?: number;
144
+ /** 图片宽度 */
145
+ width?: number;
146
+ /** 图片高度 */
147
+ height?: number;
148
+ }
149
+ export interface V2NIMMessageLocationAttachment extends V2NIMMessageAttachment {
150
+ /** 纬度 */
151
+ latitude?: number;
152
+ /** 经度 */
153
+ longitude?: number;
154
+ /** 详细位置信息 */
155
+ address?: string;
156
+ }
157
+ export interface V2NIMMessageTeamNotificationAttachment extends V2NIMMessageAttachment {
158
+ /** 通知类型 */
159
+ type?: V2NIMMessageNotificationType;
160
+ /** 扩展字段 */
161
+ serverExtension?: string;
162
+ /** 被操作者 ID 列表 */
163
+ targetIds?: Array<string>;
164
+ /** 群成员是否被禁言 */
165
+ chatBanned?: boolean;
166
+ }
167
+ export interface V2NIMChatroomNotificationAttachment extends V2NIMMessageAttachment {
168
+ /** 通知类型 */
169
+ type?: V2NIMChatroomMessageNotificationType;
170
+ /** 被操作的成员账号列表 */
171
+ targetIds?: Array<string>;
172
+ /** 被操作成员的昵称列表 */
173
+ targetNicks?: Array<string>;
174
+ /** 被操作的标签 */
175
+ targetTag?: string;
176
+ /** 操作者 */
177
+ operatorId?: string;
178
+ /** 操作者昵称 */
179
+ operatorNick?: string;
180
+ /** 扩展字段 */
181
+ notificationExtension?: string;
182
+ /** 更新后的标签 */
183
+ tags?: Array<string>;
184
+ }
185
+ export interface V2NIMChatroomMessageRevokeNotificationAttachment extends V2NIMChatroomNotificationAttachment {
186
+ /** 消息撤回 ID */
187
+ messageClientId?: string;
188
+ /** 消息撤回时间 */
189
+ messageTime?: number;
190
+ }
191
+ export interface V2NIMChatroomQueueNotificationAttachment extends V2NIMChatroomNotificationAttachment {
192
+ /** 队列变更的内容 */
193
+ keyValues?: Array<Map<string, string>>;
194
+ /** 队列更新类型 */
195
+ queueChangeType?: V2NIMChatroomQueueChangeType;
196
+ }
197
+ export interface V2NIMChatroomChatBannedNotificationAttachment extends V2NIMChatroomNotificationAttachment {
198
+ /** 成员是否被禁言 */
199
+ chatBanned?: boolean;
200
+ /** 成员是否被临时禁言 */
201
+ tempChatBanned?: boolean;
202
+ /** 成员临时禁言时长 */
203
+ tempChatBannedDuration?: number;
204
+ }
205
+ export interface V2NIMChatroomMemberEnterNotificationAttachment extends V2NIMChatroomNotificationAttachment {
206
+ /** 成员是否被禁言 */
207
+ chatBanned?: boolean;
208
+ /** 成员是否被临时禁言 */
209
+ tempChatBanned?: boolean;
210
+ /** 成员临时禁言时长 */
211
+ tempChatBannedDuration?: number;
212
+ }
213
+ export interface V2NIMChatroomMemberRoleUpdateAttachment extends V2NIMChatroomNotificationAttachment {
214
+ /** 之前的角色类型 */
215
+ previousRole?: V2NIMChatroomMemberRole;
216
+ /** 当前的成员信息 */
217
+ currentMember?: V2NIMChatroomMember;
218
+ }
219
+ export interface V2NIMMessagePushConfig {
220
+ /** 是否需要推送消息 */
221
+ pushEnabled?: boolean;
222
+ /** 是否需要推送消息发送者昵称 */
223
+ pushNickEnabled?: boolean;
224
+ /** 推送文本 */
225
+ pushContent?: string;
226
+ /** 推送数据 */
227
+ pushPayload?: string;
228
+ /** 是否强制推送, 忽略用户提醒相关设置 */
229
+ forcePush?: boolean;
230
+ /** 强制推送文案 */
231
+ forcePushContent?: string;
232
+ /** 强制推送目标账号列表 */
233
+ forcePushAccountIds?: Array<string>;
234
+ }
235
+ export interface V2NIMNotificationPushConfig {
236
+ /** 是否需要推送通知 */
237
+ pushEnabled?: boolean;
238
+ /** 是否需要推送消息发送者昵称 */
239
+ pushNickEnabled?: boolean;
240
+ /** 推送文本 */
241
+ pushContent?: string;
242
+ /** 推送数据 */
243
+ pushPayload?: string;
244
+ /** 是否强制推送, 忽略用户提醒相关设置 */
245
+ forcePush?: boolean;
246
+ /** 强制推送文案 */
247
+ forcePushContent?: string;
248
+ /** 强制推送目标账号列表 */
249
+ forcePushAccountIds?: Array<string>;
250
+ }
251
+ export interface V2NIMMessageAntispamConfig {
252
+ /** 指定是否需要过安全通 */
253
+ antispamEnabled?: boolean;
254
+ /** 指定易盾业务id, 而不使用云信后台配置的 */
255
+ antispamBusinessId?: string;
256
+ /** 自定义消息中需要反垃圾的内容(仅当消息类型为自定义消息时有效), json 格式, 长度不超过 5000 字节, 字段如下 */
257
+ /** type: int, 1: 文本, 2: 图片, 3: 视频 */
258
+ /** data: string, 文本内容/图片地址/视频地址 */
259
+ antispamCustomMessage?: string;
260
+ /** 易盾反作弊(辅助检测数据), json格式, 限制长度 1024 字节 */
261
+ antispamCheating?: string;
262
+ /** 易盾反垃圾(增强检测数据), json格式, 限制长度 1024 字节 */
263
+ antispamExtension?: string;
264
+ }
265
+ export interface V2NIMNotificationAntispamConfig {
266
+ /** 指定是否需要过安全通 */
267
+ antispamEnabled?: boolean;
268
+ /** 自定义消息中需要反垃圾的内容(仅当消息类型为自定义消息时有效), json 格式, 长度不超过 5000 字节, 字段如下 */
269
+ /** type: int, 1: 文本, 2: 图片, 3: 视频 */
270
+ /** data: string, 文本内容/图片地址/视频地址 */
271
+ antispamCustomMessage?: string;
272
+ }
273
+ export interface V2NIMMessageRobotConfig {
274
+ /** 机器人账号, 仅群聊有效 */
275
+ accountId?: string;
276
+ /** 机器人消息话题 */
277
+ topic?: string;
278
+ /** 机器人具体功能, 用户可以自定义输入 */
279
+ function?: string;
280
+ /** 机器人自定义内容 */
281
+ customContent?: string;
282
+ }
283
+ export interface V2NIMMessageRouteConfig {
284
+ /** 是否需要路由消息 */
285
+ routeEnabled?: boolean;
286
+ /** 路由环境变量, 用于指向不同的抄送, 第三方回调等配置 */
287
+ routeEnvironment?: string;
288
+ }
289
+ export interface V2NIMNotificationRouteConfig {
290
+ /** 是否需要路由通知 */
291
+ routeEnabled?: boolean;
292
+ /** 路由环境变量, 用于指向不同的抄送, 第三方回调等配置 */
293
+ routeEnvironment?: string;
294
+ }
295
+ export interface V2NIMMessageConfig {
296
+ /** 是否需要消息已读回执信息 */
297
+ readReceiptEnabled?: boolean;
298
+ /** 是否需要更新消息所属的会话信息 */
299
+ lastMessageUpdateEnabled?: boolean;
300
+ /** 是否需要存历史消息 */
301
+ historyEnabled?: boolean;
302
+ /** 是否需要存漫游消息 */
303
+ roamingEnabled?: boolean;
304
+ /** 是否需要发送方多端在线同步消息 */
305
+ onlineSyncEnabled?: boolean;
306
+ /** 是否需要存离线消息 */
307
+ offlineEnabled?: boolean;
308
+ /** 是否需要计未读 */
309
+ unreadEnabled?: boolean;
310
+ }
311
+ export interface V2NIMNotificationConfig {
312
+ /** 是否需要存离线消息 */
313
+ offlineEnabled?: boolean;
314
+ /** 是否需要计未读 */
315
+ unreadEnabled?: boolean;
316
+ }
317
+ export interface V2NIMMessageRefer {
318
+ /** 发送方账号 */
319
+ senderId?: string;
320
+ /** 接收方账号 */
321
+ receiverId?: string;
322
+ /** 客户端消息 id */
323
+ messageClientId?: string;
324
+ /** 服务端消息 id */
325
+ messageServerId?: string;
326
+ /** 会话类型 */
327
+ conversationType?: V2NIMConversationType;
328
+ /** 会话 ID */
329
+ conversationId?: string;
330
+ /** 消息时间 */
331
+ createTime?: number;
332
+ }
333
+ export interface V2NIMMessageQueryTime {
334
+ /** 起始时间 */
335
+ begin?: number;
336
+ /** 结束时间 */
337
+ end?: number;
338
+ /** 包含起始时间 */
339
+ includeBegin?: boolean;
340
+ /** 包含结束时间 */
341
+ includeEnd?: boolean;
342
+ }
343
+ export interface V2NIMMessage {
344
+ /** 客户端消息 id */
345
+ messageClientId?: string;
346
+ /** 服务端消息 id */
347
+ messageServerId?: string;
348
+ /** 消息时间 */
349
+ createTime?: number;
350
+ /** 消息发送者账号 */
351
+ senderId?: string;
352
+ /** 消息接收者账号 */
353
+ receiverId?: string;
354
+ /** 消息所属会话类型 */
355
+ conversationType?: V2NIMConversationType;
356
+ /** 消息所属会话 ID */
357
+ conversationId?: string;
358
+ /** 消息类型 */
359
+ messageType?: V2NIMMessageType;
360
+ /** 消息内容 */
361
+ subType?: number;
362
+ /** 消息文本 */
363
+ text?: string;
364
+ /** 消息附属附件 */
365
+ attachment?: V2NIMMessageAttachment;
366
+ /** 服务端扩展 */
367
+ serverExtension?: string;
368
+ /** 本地扩展 */
369
+ localExtension?: string;
370
+ /** 回调扩展 */
371
+ callbackExtension?: string;
372
+ /** 消息发送状态 */
373
+ sendingState?: V2NIMMessageSendingState;
374
+ /** 附件上传状态 */
375
+ attachmentUploadState?: V2NIMMessageAttachmentUploadState;
376
+ /** 消息相关配置 */
377
+ messageConfig?: V2NIMMessageConfig;
378
+ /** 推送相关配置 */
379
+ pushConfig?: V2NIMMessagePushConfig;
380
+ /** 路由抄送相关配置 */
381
+ routeConfig?: V2NIMMessageRouteConfig;
382
+ /** 反垃圾相关配置 */
383
+ antispamConfig?: V2NIMMessageAntispamConfig;
384
+ /** 机器人相关配置 */
385
+ robotConfig?: V2NIMMessageRobotConfig;
386
+ /** Thread 消息引用 */
387
+ threadRoot?: V2NIMMessageRefer;
388
+ /** 回复消息引用 */
389
+ threadReply?: V2NIMMessageRefer;
390
+ /** 消息发送者是否是自己 */
391
+ isSelf?: boolean;
392
+ }
393
+ export interface V2NIMCustomNotification {
394
+ /** 通知发送者账号 */
395
+ senderId?: string;
396
+ /** 通知接收者账号 */
397
+ receiverId?: string;
398
+ /** 通知所属会话类型 */
399
+ conversationType?: V2NIMConversationType;
400
+ /** 客户设置时间戳 */
401
+ timestamp?: number;
402
+ /** 通知内容 */
403
+ content?: string;
404
+ /** 通知相关配置 */
405
+ notificationConfig?: V2NIMNotificationConfig;
406
+ /** 离线推送配置相关 */
407
+ pushConfig?: V2NIMNotificationPushConfig;
408
+ /** 反垃圾相关配置 */
409
+ antispamConfig?: V2NIMNotificationAntispamConfig;
410
+ /** 路由抄送相关配置 */
411
+ routeConfig?: V2NIMNotificationRouteConfig;
412
+ }
413
+ export interface V2NIMBroadcastNotification {
414
+ /** 广播通知 ID */
415
+ id?: number;
416
+ /** 广播通知发送者账号 */
417
+ senderId?: string;
418
+ /** 广播通知时间戳 */
419
+ timestamp?: number;
420
+ /** 广播通知内容 */
421
+ content?: string;
422
+ }
423
+ export interface V2NIMSendMessageParams {
424
+ /** 消息相关配置 */
425
+ messageConfig?: V2NIMMessageConfig;
426
+ /** 路由抄送相关配置 */
427
+ routeConfig?: V2NIMMessageRouteConfig;
428
+ /** 推送相关配置 */
429
+ pushConfig?: V2NIMMessagePushConfig;
430
+ /** 反垃圾相关配置 */
431
+ antispamConfig?: V2NIMMessageAntispamConfig;
432
+ /** 机器人相关配置 */
433
+ robotConfig?: V2NIMMessageRobotConfig;
434
+ /** 是否启用本地反垃圾 */
435
+ clientAntispamEnabled?: boolean;
436
+ /** 本地反垃圾命中后替换的文本 */
437
+ clientAntispamReplace?: string;
438
+ }
439
+ export interface V2NIMMessageRevokeParams {
440
+ /** 附言 */
441
+ postscript?: string;
442
+ /** 扩展信息 */
443
+ serverExtension?: string;
444
+ /** 推送文案 */
445
+ pushContent?: string;
446
+ /** 推送数据 */
447
+ pushPayload?: string;
448
+ /** 路由抄送地址 */
449
+ env?: string;
450
+ }
451
+ export interface V2NIMMessageRevokeNotification {
452
+ /** 被撤回的消息引用 */
453
+ messageRefer?: V2NIMMessageRefer;
454
+ /** 扩展信息 */
455
+ serverExtension?: string;
456
+ /** 附言 */
457
+ postscript?: string;
458
+ /** 消息撤回者账号 */
459
+ revokeAccountId?: string;
460
+ /** 消息撤回类型 */
461
+ revokeType?: V2NIMMessageRevokeType;
462
+ /** 第三方回调传入的自定义扩展字段 */
463
+ callbackExtension?: string;
464
+ }
465
+ export interface V2NIMMessagePin {
466
+ /** pin 消息引用 */
467
+ messageRefer?: V2NIMMessageRefer;
468
+ /** 操作者 ID */
469
+ operatorId?: string;
470
+ /** 扩展字段 */
471
+ serverExtension?: string;
472
+ /** 创建时间 */
473
+ createTime?: number;
474
+ /** 更新时间 */
475
+ updateTime?: number;
476
+ }
477
+ export interface V2NIMMessagePinNotification {
478
+ /** 消息 PIN 状态 */
479
+ pinState?: V2NIMMessagePinState;
480
+ /** 消息相关的PIN信息 */
481
+ pin?: V2NIMMessagePin;
482
+ }
483
+ export interface V2NIMSendCustomNotificationParams {
484
+ /** 通知相关配置 */
485
+ notificationConfig?: V2NIMNotificationConfig;
486
+ /** 离线推送配置相关 */
487
+ pushConfig?: V2NIMNotificationPushConfig;
488
+ /** 反垃圾相关配置 */
489
+ antispamConfig?: V2NIMNotificationAntispamConfig;
490
+ /** 路由抄送相关配置 */
491
+ routeConfig?: V2NIMNotificationRouteConfig;
492
+ }
493
+ export interface V2NIMClientAntispamResult {
494
+ /** 客户端反垃圾文本命中后操作类型 */
495
+ operateType?: V2NIMClientAntispamOperateType;
496
+ /** 处理后的文本内容 */
497
+ replacedText?: string;
498
+ }
499
+ export interface V2NIMSendMessageResult {
500
+ /** 发送成功后的消息体 */
501
+ message?: V2NIMMessage;
502
+ /** 反垃圾返回的结果 */
503
+ antispamResult?: string;
504
+ /** 客户端本地反垃圾结果 */
505
+ clientAntispamResult?: V2NIMClientAntispamResult;
506
+ }
507
+ export interface V2NIMTeamMessageReadReceipt {
508
+ /** 会话 ID */
509
+ conversationId?: string;
510
+ /** 消息服务器 ID */
511
+ messageServerId?: string;
512
+ /** 消息客户端 ID */
513
+ messageClientId?: string;
514
+ /** 群消息已读人数 */
515
+ readCount?: number;
516
+ /** 群消息未读人数 */
517
+ unreadCount?: number;
518
+ /** 群消息最新已读账号 */
519
+ latestReadAccount?: string;
520
+ }
521
+ export interface V2NIMTeamMessageReadReceiptDetail {
522
+ /** 群消息已读回执 */
523
+ readReceipt?: V2NIMTeamMessageReadReceipt;
524
+ /** 已读账号列表 */
525
+ readAccountList?: Array<string>;
526
+ /** 未读账号列表 */
527
+ unreadAccountList?: Array<string>;
528
+ }
529
+ export interface V2NIMP2PMessageReadReceipt {
530
+ /** 会话 ID */
531
+ conversationId?: string;
532
+ /** 最后一条已读消息时间, 比该时间早的消息都可以认为已读 */
533
+ timestamp?: number;
534
+ }
535
+ export interface V2NIMMessageClientAntispamResult {
536
+ /** 客户端反垃圾文本命中后操作类型 */
537
+ operateType?: V2NIMMessageClientAntispamOperatorType;
538
+ /** 处理后的文本内容 */
539
+ replaceContent?: string;
540
+ }
541
+ export interface V2NIMMessageListOption {
542
+ /** 根据消息类型查询会话, 为空表示查询所有消息类型 */
543
+ messageTypes?: Array<V2NIMMessageType>;
544
+ /** 会话 ID */
545
+ conversationId?: string;
546
+ /** 消息查询开始时间, 闭区间 */
547
+ beginTime?: number;
548
+ /** 消息查询结束时间, 闭区间 */
549
+ endTime?: number;
550
+ /** 查询条数 */
551
+ limit?: number;
552
+ /** 锚点消息, 根据锚点消息查询, 不包含该消息 */
553
+ anchorMessage?: V2NIMMessage;
554
+ /** 是否反向排序 */
555
+ reverse?: boolean;
556
+ /** 消息查询方向 */
557
+ direction?: V2NIMQueryDirection;
558
+ /** 严格模式, 无法确定消息完整性则返回错误 */
559
+ strictMode?: boolean;
560
+ }
561
+ export interface V2NIMClearHistoryMessageOption {
562
+ /** 需要清空消息的对应的会话 ID */
563
+ conversationId?: string;
564
+ /** 是否同步删除漫游消息, 默认删除, 该字段只 P2P 时有效 */
565
+ deleteRoam?: boolean;
566
+ /** 是否多端同步, 默认不同步 */
567
+ onlineSync?: boolean;
568
+ /** 扩展字段, 多端同步时会同步到其它端 */
569
+ serverExtension?: string;
570
+ }
571
+ export interface V2NIMMessageQuickCommentPushConfig {
572
+ /** 是否需要推送 */
573
+ needPush?: boolean;
574
+ /** 是否需要角标 */
575
+ needBadge?: boolean;
576
+ /** 推送标题 */
577
+ pushTitle?: string;
578
+ /** 推送内容 */
579
+ pushContent?: string;
580
+ /** 推送自定义字段 */
581
+ pushPayload?: string;
582
+ }
583
+ export interface V2NIMMessageQuickComment {
584
+ /** 消息引用 */
585
+ messageRefer?: V2NIMMessageRefer;
586
+ /** 操作者 ID */
587
+ operatorId?: string;
588
+ /** 评论索引 */
589
+ index?: number;
590
+ /** 扩展字段 */
591
+ serverExtension?: string;
592
+ /** 创建时间 */
593
+ createTime?: number;
594
+ }
595
+ export interface V2NIMMessageQuickCommentNotification {
596
+ /** 快捷评论操作类型 */
597
+ operationType?: V2NIMMessageQuickCommentType;
598
+ /** 快捷评论 */
599
+ quickComment?: V2NIMMessageQuickComment;
600
+ }
601
+ export interface V2NIMMessageDeletedNotification {
602
+ /** 被删除的消息引用 */
603
+ messageRefer?: V2NIMMessageRefer;
604
+ /** 被删除的时间 */
605
+ deleteTime?: number;
606
+ /** 被删除时填入的扩展字段 */
607
+ serverExtension?: string;
608
+ }
609
+ export interface V2NIMClearHistoryNotification {
610
+ /** 会话 ID */
611
+ conversationId?: string;
612
+ /** 被删除的时间 */
613
+ deleteTime?: number;
614
+ /** 被删除时填入的扩展字段 */
615
+ serverExtension?: string;
616
+ }
617
+ export interface V2NIMCollection {
618
+ /** 收藏信息服务端 ID */
619
+ collectionId?: string;
620
+ /** 收藏索引 */
621
+ collectionType?: number;
622
+ /** 收藏数据 */
623
+ collectionData?: string;
624
+ /** 扩展字段 */
625
+ serverExtension?: string;
626
+ /** 创建时间 */
627
+ createTime?: number;
628
+ /** 更新时间 */
629
+ updateTime?: number;
630
+ }
631
+ export interface V2NIMAddCollectionParams {
632
+ /** 收藏类型 */
633
+ collectionType?: number;
634
+ /** 收藏数据 */
635
+ collectionData?: string;
636
+ /** 扩展字段 */
637
+ serverExtension?: string;
638
+ }
639
+ export interface V2NIMCollectionOption {
640
+ /** 查询开始时间区间, 闭区间 */
641
+ beginTime?: number;
642
+ /** 查询结束时间区间, 闭区间, 0 表示当前时间 */
643
+ endTime?: number;
644
+ /** 查询锚点 */
645
+ anchorCollection?: V2NIMCollection;
646
+ /** 查询方向 */
647
+ direction?: V2NIMQueryDirection;
648
+ /** 每次查询收藏条数 */
649
+ limit?: number;
650
+ /** 收藏类型 */
651
+ collectionType?: number;
652
+ }
653
+ /** @brief 动态 token 获取回调 */
654
+ /** @param accountId 账号 */
655
+ /** @return token */
656
+ export type V2NIMTokenProvider = (accountId: string) => string;
657
+ /** @brief 登陆扩展信息获取回调 */
658
+ /** @param accountId 账号 */
659
+ /** @return 登陆扩展信息 */
660
+ export type V2NIMLoginExtensionProvider = (accountId: string) => string;
661
+ /** @brief 聊天室 token 获取回调 */
662
+ /** @param appKey app key */
663
+ /** @param roomId 聊天室 ID */
664
+ /** @param account 账号 */
665
+ /** @return token */
666
+ export type V2NIMChatroomTokenProvider = (roomId: string, account: string) => string;
667
+ /** @brief 聊天室登陆扩展信息获取回调 */
668
+ /** @param appKey app key */
669
+ /** @param roomId 聊天室 ID */
670
+ /** @param account 账号 */
671
+ /** @return token */
672
+ export type V2NIMChatroomLoginExtensionProvider = (roomId: string, account: string) => string;
673
+ /** @brief 聊天室 link 获取回调 */
674
+ /** @param roomId 聊天室 ID */
675
+ /** @param account 账号 */
676
+ /** @return link */
677
+ export type V2NIMChatroomLinkProvider = (roomId: string, account: string) => Array<string>;
678
+ export interface V2NIMLoginOption {
679
+ /** 重试次数 */
680
+ retryCount?: number;
681
+ /** 登录超时, 单位毫秒 */
682
+ timeout?: number;
683
+ /** 强制登录模式 */
684
+ forceMode?: boolean;
685
+ /** 认证类型 */
686
+ authType?: V2NIMLoginAuthType;
687
+ /** 动态 token 获取回调 */
688
+ tokenProvider?: V2NIMTokenProvider;
689
+ /** 登陆扩展信息获取回调 */
690
+ loginExtensionProvider?: V2NIMLoginExtensionProvider;
691
+ /** 数据同步等级 */
692
+ syncLevel?: V2NIMDataSyncLevel;
693
+ }
694
+ export interface V2NIMLoginClient {
695
+ /** 客户端类型 */
696
+ type?: V2NIMLoginClientType;
697
+ /** 操作系统 */
698
+ os?: string;
699
+ /** 登录时间 */
700
+ timestamp?: number;
701
+ /** 自定义信息 */
702
+ customTag?: string;
703
+ /** 自定义类型 */
704
+ customClientType?: number;
705
+ /** 客户端 ID */
706
+ clientId?: string;
707
+ }
708
+ export interface V2NIMKickedOfflineDetail {
709
+ /** 原因 */
710
+ reason?: V2NIMKickedOfflineReason;
711
+ /** 说明 */
712
+ reasonDesc?: string;
713
+ /** 客户端类型 */
714
+ clientType?: V2NIMLoginClientType;
715
+ /** 自定义客户端类型 */
716
+ customClientType?: number;
717
+ }
718
+ export interface V2NIMDataSyncDetail {
719
+ /** 数据同步类型 */
720
+ type?: V2NIMDataSyncType;
721
+ /** 数据同步状态 */
722
+ state?: V2NIMDataSyncState;
723
+ }
724
+ export interface V2NIMLastMessage {
725
+ /** 最后一条消息状态 */
726
+ lastMessageState?: V2NIMLastMessageState;
727
+ /** 最后一条消息引用 */
728
+ messageRefer?: V2NIMMessageRefer;
729
+ /** 最后一条消息类型 */
730
+ messageType?: V2NIMMessageType;
731
+ /** 消息子类型 */
732
+ subType?: number;
733
+ /** 消息发送状态 */
734
+ sendingState?: V2NIMMessageSendingState;
735
+ /** 消息文本内容或撤回附言 */
736
+ text?: string;
737
+ /** 消息附件 */
738
+ attachment?: V2NIMMessageAttachment;
739
+ /** 消息撤回者账号 */
740
+ revokeAccountId?: string;
741
+ /** 消息撤回类型 */
742
+ revokeType?: V2NIMMessageRevokeType;
743
+ /** 扩展信息 */
744
+ serverExtension?: string;
745
+ /** 第三方扩展字段 */
746
+ callbackExtension?: string;
747
+ }
748
+ export interface V2NIMConversation {
749
+ /** 会话标识 */
750
+ conversationId?: string;
751
+ /** 会话类型 */
752
+ type?: V2NIMConversationType;
753
+ /** 会话名称 */
754
+ name?: string;
755
+ /** 会话头像 */
756
+ avatar?: string;
757
+ /** 免打扰 */
758
+ mute?: boolean;
759
+ /** 置顶 */
760
+ stickTop?: boolean;
761
+ /** 会话分组 ID 列表 */
762
+ groupIds?: Array<string>;
763
+ /** 本地扩展信息 */
764
+ localExtension?: string;
765
+ /** 服务端扩展信息 */
766
+ serverExtension?: string;
767
+ /** 最后一条消息 */
768
+ lastMessage?: V2NIMLastMessage;
769
+ /** 未读计数 */
770
+ unreadCount?: number;
771
+ /** 会话排序时间 */
772
+ sortOrder?: number;
773
+ /** 会话创建时间 */
774
+ createTime?: number;
775
+ /** 会话更新时间 */
776
+ updateTime?: number;
777
+ }
778
+ export interface V2NIMConversationResult {
779
+ /** 下一次拉取的偏移 */
780
+ offset?: number;
781
+ /** 数据是否拉取完毕 */
782
+ finished?: boolean;
783
+ /** 会话列表 */
784
+ conversationList?: Array<V2NIMConversation>;
785
+ }
786
+ export interface V2NIMConversationOperationResult {
787
+ /** 会话标识 */
788
+ conversationId?: string;
789
+ /** 错误 */
790
+ error?: V2NIMError;
791
+ }
792
+ export interface V2NIMConversationUpdate {
793
+ /** 服务端扩展字段 */
794
+ serverExtension?: string;
795
+ }
796
+ export interface V2NIMConversationOption {
797
+ /** 查询指定会话类型, empty: 不限制会话类型 */
798
+ conversationTypes?: Array<V2NIMConversationType>;
799
+ /** 查询指定分组的会话, null: 查询所有分组, empty: 查询未分组的会话 */
800
+ conversationGroupIds?: Array<string>;
801
+ /** false: 查询所有会话, true: 查询包含未读的会话 */
802
+ onlyUnread?: boolean;
803
+ }
804
+ export interface V2NIMConversationFilter {
805
+ /** 过滤指定对话类型, empty: 不限制会话类型 */
806
+ conversationTypes?: Array<V2NIMConversationType>;
807
+ /** 过滤指定分组的会话, nullopt: 不过滤会话分组 */
808
+ conversationGroupId?: string;
809
+ /** 过滤免打扰会话 */
810
+ ignoreMuted?: boolean;
811
+ }
812
+ export interface V2NIMConversationGroup {
813
+ /** 会话分组 ID */
814
+ groupId?: string;
815
+ /** 会话分组名称 */
816
+ name?: string;
817
+ /** 扩展字段 */
818
+ serverExtension?: string;
819
+ /** 创建时间 */
820
+ createTime?: number;
821
+ /** 更新时间 */
822
+ updateTime?: number;
823
+ }
824
+ export interface V2NIMConversationGroupResult {
825
+ /** 会话分组信息 */
826
+ group?: V2NIMConversationGroup;
827
+ /** 失败的会话列表 */
828
+ failedList?: Array<V2NIMConversationOperationResult>;
829
+ }
830
+ export interface V2NIMMessageSearchParams {
831
+ /** 关键字 */
832
+ keyword?: string;
833
+ /** 查询起始时间 */
834
+ beginTime?: number;
835
+ /** 查询结束时间, 0 表示当前时间 */
836
+ endTime?: number;
837
+ /** 检索会话数量 */
838
+ conversationLimit?: number;
839
+ /** 返回消息数量 */
840
+ messageLimit?: number;
841
+ /** 消息排序规则 */
842
+ sortOrder?: V2NIMSortOrder;
843
+ /** P2P 账号列表 */
844
+ p2pAccountIds?: Array<string>;
845
+ /** 高级群账号列表 */
846
+ teamIds?: Array<string>;
847
+ /** 发送账号列表 */
848
+ senderAccountIds?: Array<string>;
849
+ /** 要检索的消息类型, 为空表示查询所有消息类型 */
850
+ messageTypes?: Array<V2NIMMessageType>;
851
+ /** 要检索的消息子类型, 为空表示查询所有消息子类型 */
852
+ messageSubTypes?: Array<number>;
853
+ }
854
+ export interface V2NIMVoiceToTextParams {
855
+ /** 本地语音文件路径, 若为空则使用 url */
856
+ voicePath?: string;
857
+ /** 语音 url, 若为空则根据 voicePath 自动上传 */
858
+ voiceUrl?: string;
859
+ /** 音频类型, aac, wav, mp3, amr等 */
860
+ mimeType?: string;
861
+ /** 采样率 */
862
+ sampleRate?: string;
863
+ /** 语音时长, 单位毫秒 */
864
+ duration?: number;
865
+ /** 文件存储场景 */
866
+ sceneName?: string;
867
+ }
868
+ export interface V2NIMTeam {
869
+ /** 群组ID */
870
+ teamId?: string;
871
+ /** 群组类型 */
872
+ teamType?: V2NIMTeamType;
873
+ /** 群组名称 */
874
+ name?: string;
875
+ /** 群组创建者/拥有者 ID */
876
+ ownerAccountId?: string;
877
+ /** 群组人数上限 */
878
+ memberLimit?: number;
879
+ /** 群组当前人数 */
880
+ memberCount?: number;
881
+ /** 群组创建时间 */
882
+ createTime?: number;
883
+ /** 群组更新时间 */
884
+ updateTime?: number;
885
+ /** 群组介绍 */
886
+ intro?: string;
887
+ /** 群组公告 */
888
+ announcement?: string;
889
+ /** 群组头像 */
890
+ avatar?: string;
891
+ /** 服务端扩展字段 */
892
+ serverExtension?: string;
893
+ /** 客户自定义扩展, 由openApi设置 */
894
+ customerExtension?: string;
895
+ /** 申请入群模式, 入群验证方式 */
896
+ joinMode?: V2NIMTeamJoinMode;
897
+ /** 被邀请人入群模式, 被邀请人的同意方式 */
898
+ agreeMode?: V2NIMTeamAgreeMode;
899
+ /** 群组邀请模式, 谁可以邀请他人入群 */
900
+ inviteMode?: V2NIMTeamInviteMode;
901
+ /** 群组资料修改模式, 谁可以修改群组资料 */
902
+ updateInfoMode?: V2NIMTeamUpdateInfoMode;
903
+ /** 群组扩展字段修改模式, 谁可以修改群组扩展 */
904
+ updateExtensionMode?: V2NIMTeamUpdateExtensionMode;
905
+ /** 群禁言状态 */
906
+ chatBannedMode?: V2NIMTeamChatBannedMode;
907
+ /** 是否为自己所在且有效的群, 群存在且我在群组中 */
908
+ isValidTeam?: boolean;
909
+ }
910
+ export interface V2NIMTeamMember {
911
+ /** 群组ID */
912
+ teamId?: string;
913
+ /** 群组类型 */
914
+ teamType?: V2NIMTeamType;
915
+ /** 群组成员账号 */
916
+ accountId?: string;
917
+ /** 群组成员类型 */
918
+ memberRole?: V2NIMTeamMemberRole;
919
+ /** 群组昵称 */
920
+ teamNick?: string;
921
+ /** 服务端扩展字段 */
922
+ serverExtension?: string;
923
+ /** 入群时间 */
924
+ joinTime?: number;
925
+ /** 更新时间 */
926
+ updateTime?: number;
927
+ /** 入群邀请人 */
928
+ invitorAccountId?: string;
929
+ /** 是否在群中 */
930
+ inTeam?: boolean;
931
+ /** 聊天是否被禁言 */
932
+ chatBanned?: boolean;
933
+ }
934
+ export interface V2NIMCreateTeamParams {
935
+ /** 群组名称 */
936
+ name?: string;
937
+ /** 群组类型 */
938
+ teamType?: V2NIMTeamType;
939
+ /** 群组人数上限 */
940
+ memberLimit?: number;
941
+ /** 群组介绍 */
942
+ intro?: string;
943
+ /** 群组公告 */
944
+ announcement?: string;
945
+ /** 群组头像 */
946
+ avatar?: string;
947
+ /** 服务端扩展字段 */
948
+ serverExtension?: string;
949
+ /** 申请入群模式, 入群验证方式 */
950
+ joinMode?: V2NIMTeamJoinMode;
951
+ /** 被邀请人入群模式, 被邀请人的同意方式 */
952
+ agreeMode?: V2NIMTeamAgreeMode;
953
+ /** 群组邀请模式, 谁可以邀请他人入群 */
954
+ inviteMode?: V2NIMTeamInviteMode;
955
+ /** 群组资料修改模式, 谁可以修改群组资料 */
956
+ updateInfoMode?: V2NIMTeamUpdateInfoMode;
957
+ /** 群组扩展字段修改模式, 谁可以修改群组扩展 */
958
+ updateExtensionMode?: V2NIMTeamUpdateExtensionMode;
959
+ /** 群禁言状态 */
960
+ chatBannedMode?: V2NIMTeamChatBannedMode;
961
+ }
962
+ export interface V2NIMTeamMemberQueryOption {
963
+ /** 群成员类型 */
964
+ roleQueryType?: V2NIMTeamMemberRoleQueryType;
965
+ /** 是否只返回聊天禁言成员列表 */
966
+ onlyChatBanned?: boolean;
967
+ /** 消息查询方向 */
968
+ direction?: V2NIMQueryDirection;
969
+ /** 分页偏移, 首次传空, 后续拉取采用上一次返回的 nextToken */
970
+ nextToken?: string;
971
+ /** 分页拉取数量 */
972
+ limit?: number;
973
+ }
974
+ export interface V2NIMUpdateTeamInfoParams {
975
+ /** 新修改群组名称 */
976
+ name?: string;
977
+ /** 群组人数上限 */
978
+ memberLimit?: number;
979
+ /** 群组介绍 */
980
+ intro?: string;
981
+ /** 群组公告 */
982
+ announcement?: string;
983
+ /** 群组头像 */
984
+ avatar?: string;
985
+ /** 服务端扩展字段 */
986
+ serverExtension?: string;
987
+ /** 申请入群模式 */
988
+ joinMode?: V2NIMTeamJoinMode;
989
+ /** 被邀请人入群模式 */
990
+ agreeMode?: V2NIMTeamAgreeMode;
991
+ /** 群组邀请模式 */
992
+ inviteMode?: V2NIMTeamInviteMode;
993
+ /** 群组资料修改模式 */
994
+ updateInfoMode?: V2NIMTeamUpdateInfoMode;
995
+ /** 群组扩展字段修改模式 */
996
+ updateExtensionMode?: V2NIMTeamUpdateExtensionMode;
997
+ }
998
+ export interface V2NIMCreateTeamResult {
999
+ /** 被创建的群组信息 */
1000
+ team?: V2NIMTeam;
1001
+ /** 被邀请成员失败列表 */
1002
+ failedList?: Array<string>;
1003
+ }
1004
+ export interface V2NIMUpdateSelfMemberInfoParams {
1005
+ /** 设置的群昵称 */
1006
+ teamNick?: string;
1007
+ /** 设置的群成员扩展字段 */
1008
+ serverExtension?: string;
1009
+ }
1010
+ export interface V2NIMTeamMemberListResult {
1011
+ /** 数据是否拉取完毕 */
1012
+ finished?: boolean;
1013
+ /** 下一次查询的偏移量 */
1014
+ nextToken?: string;
1015
+ /** 拉取的成员列表 */
1016
+ memberList?: Array<V2NIMTeamMember>;
1017
+ }
1018
+ export interface V2NIMTeamJoinActionInfo {
1019
+ /** 入群操作类型 */
1020
+ actionType?: V2NIMTeamJoinActionType;
1021
+ /** 群组ID */
1022
+ teamId?: string;
1023
+ /** 群组类型 */
1024
+ teamType?: V2NIMTeamType;
1025
+ /** 申请者账号 */
1026
+ operatorAccountId?: string;
1027
+ /** 申请入群的附言 */
1028
+ postscript?: string;
1029
+ /** 申请时间 */
1030
+ timestamp?: number;
1031
+ /** 操作状态 */
1032
+ actionStatus?: V2NIMTeamJoinActionStatus;
1033
+ }
1034
+ export interface V2NIMAntispamConfig {
1035
+ /** 易盾业务 ID */
1036
+ antispamBusinessId?: string;
1037
+ }
1038
+ export interface V2NIMUser {
1039
+ /** 账号 ID */
1040
+ accountId?: string;
1041
+ /** 用户昵称 */
1042
+ name?: string;
1043
+ /** 用户头像 */
1044
+ avatar?: string;
1045
+ /** 用户签名 */
1046
+ sign?: string;
1047
+ /** 用户邮箱 */
1048
+ email?: string;
1049
+ /** 用户生日 */
1050
+ birthday?: string;
1051
+ /** 用户手机号 */
1052
+ mobile?: string;
1053
+ /** 用户性别 */
1054
+ gender?: number;
1055
+ /** 用户扩展字段 */
1056
+ serverExtension?: string;
1057
+ /** 用户资料创建时间 */
1058
+ createTime?: number;
1059
+ /** 用户资料更新时间 */
1060
+ updateTime?: number;
1061
+ }
1062
+ export interface V2NIMUserUpdateParams {
1063
+ /** 用户昵称 */
1064
+ name?: string;
1065
+ /** 用户头像 */
1066
+ avatar?: string;
1067
+ /** 用户签名 */
1068
+ sign?: string;
1069
+ /** 用户邮箱 */
1070
+ email?: string;
1071
+ /** 用户生日 */
1072
+ birthday?: string;
1073
+ /** 用户手机号 */
1074
+ mobile?: string;
1075
+ /** 用户性别 */
1076
+ gender?: number;
1077
+ /** 用户扩展字段 */
1078
+ serverExtension?: string;
1079
+ }
1080
+ export interface V2NIMFriend {
1081
+ /** 好友账号 */
1082
+ accountId?: string;
1083
+ /** 好友备注 */
1084
+ alias?: string;
1085
+ /** 好友扩展字段 */
1086
+ serverExtension?: string;
1087
+ /** 用户扩展字段 */
1088
+ customerExtension?: string;
1089
+ /** 创建时间 */
1090
+ createTime?: number;
1091
+ /** 更新时间 */
1092
+ updateTime?: number;
1093
+ }
1094
+ export interface V2NIMFriendAddParams {
1095
+ /** 添加好友模式 */
1096
+ addMode?: V2NIMFriendAddMode;
1097
+ /** 添加/申请添加好友的附言 */
1098
+ postscript?: string;
1099
+ }
1100
+ export interface V2NIMFriendAddApplication {
1101
+ /** 操作者账号 */
1102
+ operatorAccountId?: string;
1103
+ /** 附言 */
1104
+ postscript?: string;
1105
+ /** 状态 */
1106
+ status?: V2NIMFriendAddApplicationStatus;
1107
+ /** 时间 */
1108
+ timestamp?: number;
1109
+ }
1110
+ export interface V2NIMFriendDeleteParams {
1111
+ /** 是否删除备注 */
1112
+ deleteAlias?: boolean;
1113
+ }
1114
+ export interface V2NIMFriendAddRejection {
1115
+ /** 申请者账号 */
1116
+ operatorAccountId?: string;
1117
+ /** 申请添加好友的附言 */
1118
+ postscript?: string;
1119
+ /** 时间 */
1120
+ timestamp?: number;
1121
+ }
1122
+ export interface V2NIMFriendSetParams {
1123
+ /** 别名 */
1124
+ alias?: string;
1125
+ /** 扩展字段 */
1126
+ serverExtension?: string;
1127
+ }
1128
+ export interface V2NIMTeamJoinActionInfoQueryOption {
1129
+ /** 查询类型 */
1130
+ types?: Array<V2NIMTeamJoinActionType>;
1131
+ /** 分页偏移 */
1132
+ offset?: number;
1133
+ /** 查询数量 */
1134
+ limit?: number;
1135
+ /** 查询状态 */
1136
+ status?: Array<V2NIMTeamJoinActionStatus>;
1137
+ }
1138
+ export interface V2NIMTeamJoinActionInfoResult {
1139
+ /** 查询返回的列表 */
1140
+ infos?: Array<V2NIMTeamJoinActionInfo>;
1141
+ /** 下一次的偏移量 */
1142
+ offset?: number;
1143
+ /** 分页结束 */
1144
+ finished?: boolean;
1145
+ }
1146
+ export interface V2NIMFriendAddApplicationQueryOption {
1147
+ /** 分页偏移 */
1148
+ offset?: number;
1149
+ /** 查询数量 */
1150
+ limit?: number;
1151
+ /** 查询状态 */
1152
+ status?: Array<V2NIMFriendAddApplicationStatus>;
1153
+ }
1154
+ export interface V2NIMFriendAddApplicationResult {
1155
+ /** 查询返回的列表 */
1156
+ infos?: Array<V2NIMFriendAddApplication>;
1157
+ /** 下一次的偏移量 */
1158
+ offset?: number;
1159
+ /** 分页结束 */
1160
+ finished?: boolean;
1161
+ }
1162
+ export interface V2NIMChatroomLoginOption {
1163
+ [x: string]: any;
1164
+ /** 认证模式 */
1165
+ authType?: V2NIMLoginAuthType;
1166
+ /** token 获取回调 */
1167
+ tokenProvider?: V2NIMChatroomTokenProvider;
1168
+ /** 登陆扩展回调 */
1169
+ loginExtensionProvider?: V2NIMChatroomLoginExtensionProvider;
1170
+ }
1171
+ export interface V2NIMChatroomTagConfig {
1172
+ /** 登陆标签 */
1173
+ tags?: Array<string>;
1174
+ /** 登录登出通知标签 */
1175
+ notifyTargetTags?: string;
1176
+ }
1177
+ export interface V2NIMLocationInfo {
1178
+ /** 空间坐标 X */
1179
+ x?: number;
1180
+ /** 空间坐标 Y */
1181
+ y?: number;
1182
+ /** 空间坐标 Z */
1183
+ z?: number;
1184
+ }
1185
+ export interface V2NIMChatroomLocationConfig {
1186
+ /** 空间坐标信息 */
1187
+ locationInfo?: V2NIMLocationInfo;
1188
+ /** 订阅的消息的距离 */
1189
+ distance?: number;
1190
+ }
1191
+ export interface V2NIMChatroomEnterParams {
1192
+ [x: string]: any;
1193
+ /** 账号 ID */
1194
+ accountId?: string;
1195
+ /** 静态 token */
1196
+ token?: string;
1197
+ /** 进入聊天室后显示的昵称 */
1198
+ roomNick?: string;
1199
+ /** 进入聊天室后显示的头像 */
1200
+ roomAvatar?: string;
1201
+ /** 登录超时, 单位毫秒 */
1202
+ timeout?: number;
1203
+ /** 聊天室登录相关信息 */
1204
+ loginOption?: V2NIMChatroomLoginOption;
1205
+ /** 匿名模式 */
1206
+ anonymousMode?: boolean;
1207
+ /** 获取聊天室 link 链接地址 */
1208
+ linkProvider?: V2NIMChatroomLinkProvider;
1209
+ /** 用户扩展字段 */
1210
+ serverExtension?: string;
1211
+ /** 通知扩展字段 */
1212
+ notificationExtension?: string;
1213
+ /** 进入聊天室标签信息配置 */
1214
+ tagConfig?: V2NIMChatroomTagConfig;
1215
+ /** 进入聊天室空间位置信息配置 */
1216
+ locationConfig?: V2NIMChatroomLocationConfig;
1217
+ /** 反垃圾配置信息 */
1218
+ antispamConfig?: V2NIMAntispamConfig;
1219
+ }
1220
+ export interface V2NIMChatroomInfo {
1221
+ /** 聊天室 ID */
1222
+ roomId?: string;
1223
+ /** 聊天室名称 */
1224
+ roomName?: string;
1225
+ /** 聊天室公告 */
1226
+ announcement?: string;
1227
+ /** 视频直播拉流地址 */
1228
+ liveUrl?: string;
1229
+ /** 聊天室是否有效 */
1230
+ isValidRoom?: boolean;
1231
+ /** 聊天室扩展字段 */
1232
+ serverExtension?: string;
1233
+ /** 聊天室队列操作权限模式 */
1234
+ queueLevelMode?: V2NIMChatroomQueueLevelMode;
1235
+ /** 聊天室创建者账号 ID */
1236
+ creatorAccountId?: string;
1237
+ /** 聊天室当前在线用户数量 */
1238
+ onlineUserCount?: number;
1239
+ /** 聊天室禁言状态 */
1240
+ chatBanned?: boolean;
1241
+ }
1242
+ export interface V2NIMChatroomEnterInfo {
1243
+ /** 进入聊天室后显示的昵称 */
1244
+ roomNick?: string;
1245
+ /** 进入聊天室后显示的头像 */
1246
+ roomAvatar?: string;
1247
+ /** 用户进入聊天室的时间点 */
1248
+ enterTime?: number;
1249
+ /** 进入的终端类型 */
1250
+ clientType?: number;
1251
+ }
1252
+ export interface V2NIMChatroomMember {
1253
+ /** 聊天室 ID */
1254
+ roomId?: string;
1255
+ /** 成员账号 ID */
1256
+ accountId?: string;
1257
+ /** 聊天室成员角色 */
1258
+ memberRole?: V2NIMChatroomMemberRole;
1259
+ /** 成员等级, 0 表示未设置 */
1260
+ memberLevel?: number;
1261
+ /** 进入聊天室后显示的昵称 */
1262
+ roomNick?: string;
1263
+ /** 进入聊天室后显示的头像 */
1264
+ roomAvatar?: string;
1265
+ /** 聊天室成员扩展字段 */
1266
+ serverExtension?: string;
1267
+ /** 用户是否在线 */
1268
+ isOnline?: boolean;
1269
+ /** 是否在黑名单中 */
1270
+ blocked?: boolean;
1271
+ /** 是否禁言 */
1272
+ chatBanned?: boolean;
1273
+ /** 是否临时禁言 */
1274
+ tempChatBanned?: boolean;
1275
+ /** 临时禁言时长, 单位秒 */
1276
+ tempChatBannedDuration?: number;
1277
+ /** 登录标签 */
1278
+ tags?: Array<string>;
1279
+ /** 登录登出通知标签 */
1280
+ notifyTargetTags?: string;
1281
+ /** 用户进入聊天室的时间点 */
1282
+ enterTime?: number;
1283
+ /** 更新时间 */
1284
+ updateTime?: number;
1285
+ /** 是否有效 */
1286
+ valid?: boolean;
1287
+ /** 多端登录信息 */
1288
+ multiEnterInfo?: Array<V2NIMChatroomEnterInfo>;
1289
+ }
1290
+ export interface V2NIMChatroomCdnInfo {
1291
+ enabled?: boolean;
1292
+ cdnUrls?: Array<string>;
1293
+ timestamp?: number;
1294
+ pollingInterval?: number;
1295
+ decryptType?: number;
1296
+ decryptKey?: string;
1297
+ pollingTimeout?: number;
1298
+ }
1299
+ export interface V2NIMChatroomEnterResult {
1300
+ /** 聊天室信息 */
1301
+ chatroom?: V2NIMChatroomInfo;
1302
+ /** 用户信息 */
1303
+ selfMember?: V2NIMChatroomMember;
1304
+ }
1305
+ export interface V2NIMChatroomKickedInfo {
1306
+ /** 被踢原因 */
1307
+ kickedReason?: V2NIMChatroomKickedReason;
1308
+ /** 被踢扩展字段 */
1309
+ serverExtension?: string;
1310
+ }
1311
+ export interface V2NIMUserInfoConfig {
1312
+ /** 消息发送者 uinfo 的最后更新时间 */
1313
+ userInfoTimestamp?: number;
1314
+ /** 发送方昵称 */
1315
+ senderNick?: string;
1316
+ /** 发送方头像 */
1317
+ senderAvatar?: string;
1318
+ /** 发送方扩展字段 */
1319
+ senderExtension?: string;
1320
+ }
1321
+ export interface V2NIMChatroomMessageConfig {
1322
+ /** 是否需要在服务端保存历史消息 */
1323
+ historyEnabled?: boolean;
1324
+ /** 是否是高优先级消息 */
1325
+ highPriority?: boolean;
1326
+ }
1327
+ export interface V2NIMChatroomMessage {
1328
+ /** 客户端消息 ID */
1329
+ messageClientId?: string;
1330
+ /** 消息发送方客户端类型 */
1331
+ senderClientType?: V2NIMLoginClientType;
1332
+ /** 消息时间, 单位毫秒 */
1333
+ createTime?: number;
1334
+ /** 消息发送者账号 */
1335
+ senderId?: string;
1336
+ /** 聊天室 ID */
1337
+ roomId?: string;
1338
+ /** 消息发送者是否是自己 */
1339
+ isSelf?: boolean;
1340
+ /** 附件上传状态 */
1341
+ attachmentUploadState?: V2NIMMessageAttachmentUploadState;
1342
+ /** 消息发送状态 */
1343
+ sendingState?: V2NIMMessageSendingState;
1344
+ /** 消息类型 */
1345
+ messageType?: V2NIMMessageType;
1346
+ /** 消息子类型 */
1347
+ subType?: number;
1348
+ /** 消息内容 */
1349
+ text?: string;
1350
+ /** 消息附属附件 */
1351
+ attachment?: V2NIMMessageAttachment;
1352
+ /** 服务端扩展 */
1353
+ serverExtension?: string;
1354
+ /** 第三方扩展字段 */
1355
+ callbackExtension?: string;
1356
+ /** 路由抄送相关配置 */
1357
+ routeConfig?: V2NIMMessageRouteConfig;
1358
+ /** 反垃圾相关配置 */
1359
+ antispamConfig?: V2NIMMessageAntispamConfig;
1360
+ /** 消息的目标标签表达式 */
1361
+ notifyTargetTags?: string;
1362
+ /** 聊天室消息配置 */
1363
+ messageConfig?: V2NIMChatroomMessageConfig;
1364
+ /** 消息发送时的用户信息 */
1365
+ userInfoConfig?: V2NIMUserInfoConfig;
1366
+ /** 消息空间坐标信息配置 */
1367
+ locationInfo?: V2NIMLocationInfo;
1368
+ }
1369
+ export interface V2NIMSendChatroomMessageParams {
1370
+ /** 消息相关配置 */
1371
+ messageConfig?: V2NIMChatroomMessageConfig;
1372
+ /** 路由抄送相关配置 */
1373
+ routeConfig?: V2NIMMessageRouteConfig;
1374
+ /** 反垃圾相关配置 */
1375
+ antispamConfig?: V2NIMMessageAntispamConfig;
1376
+ /** 是否启用本地反垃圾 */
1377
+ clientAntispamEnabled?: boolean;
1378
+ /** 反垃圾命中后替换的文本 */
1379
+ clientAntispamReplace?: string;
1380
+ /** 定向消息接收者账号列表, 为空表示不定向, 定向消息不存历史 */
1381
+ receiverIds?: Array<string>;
1382
+ /** 消息的目标标签表达式 */
1383
+ notifyTargetTags?: string;
1384
+ /** 消息空间坐标信息配置 */
1385
+ locationInfo?: V2NIMLocationInfo;
1386
+ }
1387
+ export interface V2NIMSendChatroomMessageResult {
1388
+ /** 发送成功后的消息体 */
1389
+ message?: V2NIMChatroomMessage;
1390
+ /** 云端反垃圾返回的结果 */
1391
+ antispamResult?: string;
1392
+ /** 客户端本地反垃圾结果 */
1393
+ clientAntispamResult?: V2NIMClientAntispamResult;
1394
+ }
1395
+ export interface V2NIMChatroomMemberQueryOption {
1396
+ /** 需要查询的成员类型 */
1397
+ memberRoles?: Array<V2NIMChatroomMemberRole>;
1398
+ /** 是否只返回黑名单成员 */
1399
+ onlyBlocked?: boolean;
1400
+ /** 是否只返回禁言用户 */
1401
+ onlyChatBanned?: boolean;
1402
+ /** 是否只查询在线成员 */
1403
+ onlyOnline?: boolean;
1404
+ /** 偏移量 */
1405
+ pageToken?: string;
1406
+ /** 查询数量 */
1407
+ limit?: number;
1408
+ }
1409
+ export interface V2NIMChatroomMemberListResult {
1410
+ /** 下一次查询的偏移量 */
1411
+ pageToken?: string;
1412
+ /** 数据是否拉取完毕 */
1413
+ finished?: boolean;
1414
+ /** 拉取的成员列表 */
1415
+ memberList?: Array<V2NIMChatroomMember>;
1416
+ }
1417
+ export interface V2NIMChatroomMessageListOption {
1418
+ /** 消息查询方向 */
1419
+ direction?: V2NIMQueryDirection;
1420
+ /** 消息类型 */
1421
+ messageTypes?: Array<V2NIMMessageType>;
1422
+ /** 开始时间 */
1423
+ beginTime?: number;
1424
+ /** 查询数量 */
1425
+ limit?: number;
1426
+ }
1427
+ export interface V2NIMChatroomMemberRoleUpdateParams {
1428
+ /** 设置的成员角色 */
1429
+ memberRole?: V2NIMChatroomMemberRole;
1430
+ /** 设置用户等级 */
1431
+ memberLevel?: number;
1432
+ /** 通知扩展字段 */
1433
+ notificationExtension?: string;
1434
+ }
1435
+ export interface V2NIMChatroomUpdateParams {
1436
+ /** 聊天室名称 */
1437
+ roomName?: string;
1438
+ /** 聊天室公告 */
1439
+ announcement?: string;
1440
+ /** 聊天室直播地址 */
1441
+ liveUrl?: string;
1442
+ /** 聊天室扩展字段 */
1443
+ serverExtension?: string;
1444
+ /** 是否需要通知 */
1445
+ notificationEnabled?: boolean;
1446
+ /** 本次操作生成的通知中的扩展字段 */
1447
+ notificationExtension?: string;
1448
+ }
1449
+ export interface V2NIMChatroomSelfMemberUpdateParams {
1450
+ /** 聊天室显示的昵称 */
1451
+ roomNick?: string;
1452
+ /** 聊天室显示的头像 */
1453
+ roomAvatar?: string;
1454
+ /** 成员扩展字段 */
1455
+ serverExtension?: string;
1456
+ /** 是否需要通知 */
1457
+ notificationEnabled?: boolean;
1458
+ /** 本次操作生成的通知中的扩展字段 */
1459
+ notificationExtension?: string;
1460
+ /** 更新信息持久化 */
1461
+ persistence?: boolean;
1462
+ }
1463
+ export interface V2NIMChatroomTagTempChatBannedParams {
1464
+ /** 禁言的 tag */
1465
+ targetTag?: string;
1466
+ /** 消息的目标标签表达式 */
1467
+ notifyTargetTags?: string;
1468
+ /** 禁言时长, 单位秒 */
1469
+ duration?: number;
1470
+ /** 是否需要通知 */
1471
+ notificationEnabled?: boolean;
1472
+ /** 本次操作生成的通知中的扩展字段 */
1473
+ notificationExtension?: string;
1474
+ }
1475
+ export interface V2NIMChatroomTagsUpdateParams {
1476
+ /** 标签 */
1477
+ tags?: Array<string>;
1478
+ /** 消息的目标标签表达式 */
1479
+ notifyTargetTags?: string;
1480
+ /** 是否需要通知 */
1481
+ notificationEnabled?: boolean;
1482
+ /** 本次操作生成的通知中的扩展字段 */
1483
+ notificationExtension?: string;
1484
+ }
1485
+ export interface V2NIMChatroomTagMemberOption {
1486
+ /** 标签 */
1487
+ tag?: string;
1488
+ /** 偏移量 */
1489
+ pageToken?: string;
1490
+ /** 查询条数 */
1491
+ limit?: number;
1492
+ }
1493
+ export interface V2NIMChatroomTagMessageOption {
1494
+ /** 查询的标签 */
1495
+ tags?: Array<string>;
1496
+ /** 消息类型 */
1497
+ messageTypes?: Array<V2NIMMessageType>;
1498
+ /** 查询起始时间 */
1499
+ beginTime?: number;
1500
+ /** 查询结束时间 */
1501
+ endTime?: number;
1502
+ /** 查询条数 */
1503
+ limit?: number;
1504
+ /** 查询方向 */
1505
+ direction?: V2NIMQueryDirection;
1506
+ }
1507
+ export interface V2NIMClientAntispamThesaurusItem {
1508
+ key?: string;
1509
+ matchType?: V2NIMClientAntispamThesaurusMatchType;
1510
+ operateType?: V2NIMClientAntispamOperateType;
1511
+ config?: string;
1512
+ }
1513
+ export interface V2NIMClientAntispamThesaurus {
1514
+ name?: string;
1515
+ config?: string;
1516
+ items?: Array<V2NIMClientAntispamThesaurusItem>;
1517
+ }
1518
+ export interface V2NIMChatroomQueueOfferParams {
1519
+ /** 元素的唯一key */
1520
+ elementKey?: string;
1521
+ /** 元素的值 */
1522
+ elementValue?: string;
1523
+ /** 元素是否瞬态的 */
1524
+ transient?: boolean;
1525
+ /** 元素属于的账号 */
1526
+ elementOwnerAccountId?: string;
1527
+ }
1528
+ export interface V2NIMUploadFileParams {
1529
+ /** 文件地址 */
1530
+ filePath?: string;
1531
+ /** 场景名 */
1532
+ sceneName?: string;
1533
+ }
1534
+ export interface V2NIMUploadFileTask {
1535
+ /** 上传任务 ID */
1536
+ taskId?: string;
1537
+ /** 上传任务参数 */
1538
+ uploadParams?: V2NIMUploadFileParams;
1539
+ }