@rongcloud/engine 4.5.4 → 4.6.0-beem.10
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/dist/index.d.ts +1069 -909
- package/dist/index.esm.js +2 -2
- package/dist/index.js +2 -2
- package/dist/index.umd.js +1 -1
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* RCEngine - v4.
|
|
3
|
-
* CommitId -
|
|
4
|
-
*
|
|
2
|
+
* RCEngine - v4.6.0-beem.10
|
|
3
|
+
* CommitId - 380698dd4b968e43299324a459a97dd44ba27b0b
|
|
4
|
+
* Mon Jun 06 2022 13:04:41 GMT+0800 (China Standard Time)
|
|
5
5
|
* ©2020 RongCloud, Inc. All rights reserved.
|
|
6
6
|
*/
|
|
7
7
|
/**
|
|
@@ -908,13 +908,17 @@ declare enum ErrorCode {
|
|
|
908
908
|
*/
|
|
909
909
|
RC_CONN_USER_BLOCKED = 31009,
|
|
910
910
|
/**
|
|
911
|
-
* Disconnect
|
|
911
|
+
* Disconnect,该用户其他设备登录,本端被踢下线;
|
|
912
912
|
*/
|
|
913
913
|
RC_DISCONN_KICK = 31010,
|
|
914
914
|
/**
|
|
915
|
-
* Disconnect
|
|
915
|
+
* Disconnect,连接被服务端主动关闭;
|
|
916
916
|
*/
|
|
917
917
|
RC_DISCONN_EXCEPTION = 31011,
|
|
918
|
+
/**
|
|
919
|
+
* 开启禁止把已在线客户端踢下线开关后,该错误码标识已有同类型端在线,禁止链接;
|
|
920
|
+
*/
|
|
921
|
+
RC_DISCONN_SAME_CLIENT_ON_LINE = 31023,
|
|
918
922
|
/**
|
|
919
923
|
* app 验证Token 验证不通过。所有内部超时,访问失败,返回给客户端sdk都是验证不通过,由服务端日志去看具体是那种失败。
|
|
920
924
|
*/
|
|
@@ -1204,7 +1208,19 @@ declare enum RTCMode {
|
|
|
1204
1208
|
/**
|
|
1205
1209
|
* 直播模式
|
|
1206
1210
|
*/
|
|
1207
|
-
LIVE = 2
|
|
1211
|
+
LIVE = 2,
|
|
1212
|
+
/**
|
|
1213
|
+
* sip呼叫
|
|
1214
|
+
*/
|
|
1215
|
+
SIP = 4,
|
|
1216
|
+
/**
|
|
1217
|
+
* 呼叫模式.包括单呼和群呼
|
|
1218
|
+
*/
|
|
1219
|
+
CALL = 5,
|
|
1220
|
+
/**
|
|
1221
|
+
* 会议
|
|
1222
|
+
*/
|
|
1223
|
+
MEETING = 6
|
|
1208
1224
|
}
|
|
1209
1225
|
/**
|
|
1210
1226
|
* 直播类型
|
|
@@ -1617,6 +1633,10 @@ declare enum ConnectionStatus {
|
|
|
1617
1633
|
* appkey 不正确
|
|
1618
1634
|
*/
|
|
1619
1635
|
APPKEY_IS_FAKE = 20,
|
|
1636
|
+
/**
|
|
1637
|
+
* 其他端登录,本端禁止连接和重连
|
|
1638
|
+
*/
|
|
1639
|
+
FORBID_RECONNECT_BY_OTHER_SAME_CLIENT = 31023,
|
|
1620
1640
|
/**
|
|
1621
1641
|
* 互踢次数过多(`count > 5`),此时可能出现:在其它他设备登陆有 reconnect 逻辑
|
|
1622
1642
|
*/
|
|
@@ -2321,6 +2341,7 @@ interface IJoinRTCRoomData extends IRTCUsers {
|
|
|
2321
2341
|
value: string;
|
|
2322
2342
|
}[];
|
|
2323
2343
|
kvEntries: IServerRTCRoomEntry[];
|
|
2344
|
+
offlineKickTime: number;
|
|
2324
2345
|
}
|
|
2325
2346
|
|
|
2326
2347
|
/**
|
|
@@ -2638,6 +2659,7 @@ declare class PluginContext {
|
|
|
2638
2659
|
* 目前仅通知:主播加入、退出房间的人员列表变更,发布、取消发布资源列表变更
|
|
2639
2660
|
*/
|
|
2640
2661
|
onrtcdatachange?(data: IServerRTCRoomEntry[], roomdId?: string): void;
|
|
2662
|
+
onCallInfo?(data: string): void;
|
|
2641
2663
|
/**
|
|
2642
2664
|
* 获取 `@rongcloud/engine` 包版本
|
|
2643
2665
|
*/
|
|
@@ -2681,6 +2703,10 @@ declare class PluginContext {
|
|
|
2681
2703
|
* 获取加入 RTC 房间的用户信息(当前仅能查自己的)
|
|
2682
2704
|
*/
|
|
2683
2705
|
getRTCJoinedUserInfo(userId: string): IPromiseResult<IRTCJoinedInfo[]>;
|
|
2706
|
+
setCallInfo(targetId: string, key: string, value: string): IPromiseResult<{
|
|
2707
|
+
key: string;
|
|
2708
|
+
value: string;
|
|
2709
|
+
}>;
|
|
2684
2710
|
}
|
|
2685
2711
|
|
|
2686
2712
|
declare enum ReceivedStatus {
|
|
@@ -2873,8 +2899,13 @@ declare enum MessageType {
|
|
|
2873
2899
|
*/
|
|
2874
2900
|
GROUP_READ_RECEIPT_REQUEST = "RC:RRMsg",
|
|
2875
2901
|
/**
|
|
2876
|
-
*
|
|
2902
|
+
* 消息送达报告,仅单聊
|
|
2903
|
+
*/
|
|
2904
|
+
DELIVERED = "RC:Delivered",
|
|
2905
|
+
/**
|
|
2906
|
+
* 消息送达状态报告,仅群聊
|
|
2877
2907
|
*/
|
|
2908
|
+
DELIVERED_MSG = "RC:DRMsg",
|
|
2878
2909
|
CHATROOM_JOIN = "RC:ChrmJoinNtf",
|
|
2879
2910
|
/**
|
|
2880
2911
|
* 用户退出聊天室
|
|
@@ -3220,715 +3251,528 @@ interface ITypingMessage {
|
|
|
3220
3251
|
}
|
|
3221
3252
|
|
|
3222
3253
|
/**
|
|
3223
|
-
*
|
|
3254
|
+
* 消息送达相关接口
|
|
3224
3255
|
*/
|
|
3225
|
-
|
|
3226
|
-
|
|
3227
|
-
|
|
3256
|
+
|
|
3257
|
+
interface IDeliveredUser {
|
|
3258
|
+
time: number;
|
|
3259
|
+
userId: string;
|
|
3260
|
+
}
|
|
3261
|
+
interface IGroupMessageDeliverInfo {
|
|
3262
|
+
totalCount: number;
|
|
3263
|
+
list: IDeliveredUser[];
|
|
3264
|
+
}
|
|
3265
|
+
interface IMessageDeliver {
|
|
3266
|
+
deliverTime: number;
|
|
3267
|
+
messageUId: string;
|
|
3268
|
+
conversationType: ConversationType;
|
|
3228
3269
|
targetId: string;
|
|
3229
|
-
|
|
3230
|
-
|
|
3270
|
+
}
|
|
3271
|
+
interface IGroupMessageDeliveredStatusInfo {
|
|
3272
|
+
MessageUId: string;
|
|
3273
|
+
deliveryCount: number;
|
|
3274
|
+
}
|
|
3275
|
+
interface IGroupMessageDeliverStatus {
|
|
3276
|
+
totalCount: number;
|
|
3277
|
+
list: IGroupMessageDeliveredStatusInfo[];
|
|
3231
3278
|
}
|
|
3232
3279
|
|
|
3233
|
-
|
|
3280
|
+
/**
|
|
3281
|
+
* engine 基本接口定义,用于约束 Electron 下主进程、渲染进程、JSEngine 的编码一致性
|
|
3282
|
+
*/
|
|
3283
|
+
interface IEngine {
|
|
3234
3284
|
/**
|
|
3235
|
-
*
|
|
3285
|
+
* 建立连接
|
|
3286
|
+
* @param token
|
|
3287
|
+
* @param naviInfo
|
|
3288
|
+
* @param reconnectKickEnable
|
|
3236
3289
|
*/
|
|
3237
|
-
|
|
3290
|
+
connect(token: string, naviInfo: INaviInfo, reconnectKickEnable?: boolean): Promise<ErrorCode>;
|
|
3238
3291
|
/**
|
|
3239
|
-
*
|
|
3292
|
+
* 获取导航信息
|
|
3293
|
+
* @param uris
|
|
3294
|
+
* @param appkey
|
|
3295
|
+
* @param token
|
|
3296
|
+
* @param checkCA
|
|
3240
3297
|
*/
|
|
3241
|
-
|
|
3242
|
-
}
|
|
3243
|
-
declare type IMessageListnenr = (message: IReceivedMessage, leftCount?: number, hasMore?: boolean) => void;
|
|
3244
|
-
declare type IConnectionStatusListener = (status: ConnectionStatus) => void;
|
|
3245
|
-
declare type IConversationStateListener = (conversation: IUpdatedConversation[]) => void;
|
|
3246
|
-
declare type IChatroomListener = (state: IChatroomListenerData) => void;
|
|
3247
|
-
declare type IRTCInnerListener = {
|
|
3248
|
-
message?: IMessageListnenr;
|
|
3249
|
-
status?: IConnectionStatusListener;
|
|
3250
|
-
};
|
|
3251
|
-
declare type IExpansionListener = (data: IExpansionListenerData) => void;
|
|
3252
|
-
declare type ITagListener = () => void;
|
|
3253
|
-
declare type IConversationTagListener = () => void;
|
|
3254
|
-
declare type ItypingStateListener = (data: ITypingMessage[]) => void;
|
|
3255
|
-
declare type IMessageBlockedListener = (data: IBlockedMessageInfo) => void;
|
|
3256
|
-
interface ISendExMsgOptions {
|
|
3257
|
-
channelId: string;
|
|
3258
|
-
conversationType: ConversationType;
|
|
3259
|
-
targetId: string;
|
|
3298
|
+
getNaviInfo(uris: string[], appkey: string, token: string, checkCA?: boolean): Promise<INaviInfo | null>;
|
|
3260
3299
|
/**
|
|
3261
|
-
*
|
|
3300
|
+
* 上报版本信息
|
|
3301
|
+
* @param version
|
|
3302
|
+
*/
|
|
3303
|
+
reportSDKInfo(version: {
|
|
3304
|
+
[name: string]: string;
|
|
3305
|
+
}): void;
|
|
3306
|
+
/**
|
|
3307
|
+
* 连接时间
|
|
3308
|
+
*/
|
|
3309
|
+
getConnectedTime(): number;
|
|
3310
|
+
/**
|
|
3311
|
+
* 调用非标准方法。所谓非标准方法,是为某些特定需求或产品添加,暂未作为标准接口添加至 API 层。
|
|
3312
|
+
* 对于未实现的方法,接口响应 Unsupport 错误码
|
|
3313
|
+
* @param method
|
|
3314
|
+
* @param args
|
|
3315
|
+
*/
|
|
3316
|
+
callExtra(method: string | keyof IExtraMethod, ...args: any[]): Promise<IAsyncRes<unknown>>;
|
|
3317
|
+
/**
|
|
3318
|
+
* 获取历史消息
|
|
3319
|
+
* @param conversationType
|
|
3320
|
+
* @param targetId
|
|
3321
|
+
* @param timestamp
|
|
3322
|
+
* @param count
|
|
3323
|
+
* @param order
|
|
3324
|
+
*/
|
|
3325
|
+
getHistoryMessage(conversationType: ConversationType, targetId: string,
|
|
3326
|
+
/**
|
|
3327
|
+
* 拉取时间戳,值为 `0` 表示从当前时间拉取
|
|
3328
|
+
*/
|
|
3329
|
+
timestamp: number,
|
|
3330
|
+
/**
|
|
3331
|
+
* 获取条数, 有效值 `1` - `20`
|
|
3332
|
+
*/
|
|
3333
|
+
count: number,
|
|
3334
|
+
/**
|
|
3335
|
+
* @description
|
|
3336
|
+
* 1. `0` 表示升序,获取消息发送时间比传入 `sentTime` 小 的消息
|
|
3337
|
+
* 2. `1` 表示降序,获取消息发送时间比传入 `sentTime` 大 的消息
|
|
3338
|
+
*/
|
|
3339
|
+
order: 0 | 1,
|
|
3340
|
+
/**
|
|
3341
|
+
* 会话的业务标识
|
|
3262
3342
|
*/
|
|
3263
|
-
|
|
3343
|
+
channelId: string,
|
|
3264
3344
|
/**
|
|
3265
|
-
*
|
|
3345
|
+
* 消息类型
|
|
3346
|
+
*/
|
|
3347
|
+
objectName: string): IPromiseResult<{
|
|
3348
|
+
list: IReceivedMessage[];
|
|
3349
|
+
hasMore: boolean;
|
|
3350
|
+
}>;
|
|
3351
|
+
/**
|
|
3352
|
+
* 删除历史消息 通过 messageUId
|
|
3266
3353
|
*/
|
|
3267
|
-
|
|
3354
|
+
deleteRemoteMessage(conversationType: ConversationType, targetId: string,
|
|
3268
3355
|
/**
|
|
3269
|
-
*
|
|
3356
|
+
* @description
|
|
3357
|
+
* message 中 messageUId、setTime、messageDirection 为必须参数
|
|
3270
3358
|
*/
|
|
3271
|
-
|
|
3359
|
+
messages: {
|
|
3360
|
+
messageUId: string;
|
|
3361
|
+
sentTime: number;
|
|
3362
|
+
messageDirection: MessageDirection;
|
|
3363
|
+
}[],
|
|
3272
3364
|
/**
|
|
3273
|
-
*
|
|
3365
|
+
* 会话的业务标识
|
|
3274
3366
|
*/
|
|
3275
|
-
|
|
3276
|
-
|
|
3277
|
-
};
|
|
3367
|
+
channelId: string): Promise<ErrorCode>;
|
|
3368
|
+
recallMsg(conversationType: ConversationType, targetId: string, messageUId: string, sentTime: number, recallMsgOptions: IRecallMsgOptions): IPromiseResult<IReceivedMessage>;
|
|
3278
3369
|
/**
|
|
3279
|
-
*
|
|
3370
|
+
* 删除历史消息 通过 时间戳
|
|
3371
|
+
* @param timestamp 小于等于传入时间戳的消息均删除
|
|
3280
3372
|
*/
|
|
3281
|
-
|
|
3373
|
+
deleteRemoteMessageByTimestamp(conversationType: ConversationType, targetId: string, timestamp: number,
|
|
3282
3374
|
/**
|
|
3283
|
-
*
|
|
3375
|
+
* 会话的业务标识
|
|
3284
3376
|
*/
|
|
3285
|
-
|
|
3286
|
-
[key: string]: string;
|
|
3287
|
-
} | null;
|
|
3288
|
-
}
|
|
3289
|
-
interface IWatcher {
|
|
3290
|
-
message?: IMessageListnenr;
|
|
3291
|
-
connectionState?: IConnectionStatusListener;
|
|
3292
|
-
conversationState?: IConversationStateListener;
|
|
3293
|
-
chatroomState?: IChatroomListener;
|
|
3294
|
-
expansion?: IExpansionListener;
|
|
3377
|
+
channelId: string): Promise<ErrorCode>;
|
|
3295
3378
|
/**
|
|
3296
|
-
*
|
|
3379
|
+
* 获取会话列表
|
|
3380
|
+
* @param count 指定获取数量, 不传则获取全部会话列表,默认 `300`
|
|
3297
3381
|
*/
|
|
3298
|
-
|
|
3382
|
+
getConversationList(
|
|
3299
3383
|
/**
|
|
3300
|
-
*
|
|
3384
|
+
* 拉取数量, 有效值 0 - 1000, 默认 300
|
|
3301
3385
|
*/
|
|
3302
|
-
|
|
3386
|
+
count: number,
|
|
3303
3387
|
/**
|
|
3304
|
-
*
|
|
3388
|
+
* 会话类型
|
|
3389
|
+
* @todo 待确认是否生效
|
|
3305
3390
|
*/
|
|
3306
|
-
|
|
3391
|
+
conversationType?: ConversationType,
|
|
3307
3392
|
/**
|
|
3308
|
-
*
|
|
3309
|
-
|
|
3310
|
-
|
|
3393
|
+
* 起始时间
|
|
3394
|
+
*/
|
|
3395
|
+
startTime?: number,
|
|
3311
3396
|
/**
|
|
3312
|
-
*
|
|
3313
|
-
|
|
3314
|
-
|
|
3397
|
+
* 获取顺序
|
|
3398
|
+
*/
|
|
3399
|
+
order?: 0 | 1,
|
|
3315
3400
|
/**
|
|
3316
|
-
*
|
|
3317
|
-
|
|
3318
|
-
|
|
3319
|
-
}
|
|
3320
|
-
interface IPluginGenerator<API, InitOption> {
|
|
3401
|
+
* 会话的业务标识
|
|
3402
|
+
*/
|
|
3403
|
+
channelId?: string): IPromiseResult<IReceivedConversation[]>;
|
|
3321
3404
|
/**
|
|
3322
|
-
*
|
|
3323
|
-
|
|
3324
|
-
|
|
3405
|
+
* 获取指定会话
|
|
3406
|
+
*/
|
|
3407
|
+
getConversation(conversationType: ConversationType, targetId: string, channelId: string): IPromiseResult<IReceivedConversation | null>;
|
|
3325
3408
|
/**
|
|
3326
|
-
*
|
|
3409
|
+
* 删除会话
|
|
3410
|
+
* @description 该删除操作会删除服务器端存储的会话数据
|
|
3411
|
+
* @param conversationType
|
|
3412
|
+
* @param targetId
|
|
3327
3413
|
*/
|
|
3328
|
-
|
|
3414
|
+
removeConversation(conversationType: ConversationType, targetId: string, channelId: string): Promise<ErrorCode>;
|
|
3329
3415
|
/**
|
|
3330
|
-
*
|
|
3416
|
+
* 获取所有会话未读数
|
|
3417
|
+
* @param channelId 多组织 Id
|
|
3418
|
+
* @param conversationTypes
|
|
3419
|
+
* @param includeMuted 包含已设置免打扰的会话
|
|
3331
3420
|
*/
|
|
3332
|
-
|
|
3421
|
+
getAllConversationUnreadCount(channelId: string, conversationTypes: ConversationType[], includeMuted: boolean): IPromiseResult<number>;
|
|
3333
3422
|
/**
|
|
3334
|
-
*
|
|
3423
|
+
* 获取指定会话未读数
|
|
3335
3424
|
*/
|
|
3336
|
-
|
|
3425
|
+
getConversationUnreadCount(conversationType: ConversationType, targetId: string, channelId: string): IPromiseResult<number>;
|
|
3337
3426
|
/**
|
|
3338
|
-
*
|
|
3339
|
-
* @param context 插件调用上下文,用于实现插件的消息注册、消息首发等
|
|
3340
|
-
* @param runtime 运行时实例,用于标识最终的运行时平台
|
|
3341
|
-
* @param options 初始化参数
|
|
3427
|
+
* 清除指定会话未读数
|
|
3342
3428
|
*/
|
|
3343
|
-
|
|
3344
|
-
}
|
|
3345
|
-
interface IAPIContextOption {
|
|
3429
|
+
clearConversationUnreadCount(conversationType: ConversationType, targetId: string, channelId: string): Promise<ErrorCode>;
|
|
3346
3430
|
/**
|
|
3347
|
-
*
|
|
3431
|
+
* 获取第一个未读消息
|
|
3348
3432
|
*/
|
|
3349
|
-
|
|
3433
|
+
getFirstUnreadMessage(conversationType: ConversationType, targetId: string, channelId: string): IPromiseResult<IReceivedMessage | null>;
|
|
3350
3434
|
/**
|
|
3351
|
-
*
|
|
3435
|
+
* 设置/保存指定会话消息草稿
|
|
3436
|
+
* @draft 草稿内容
|
|
3352
3437
|
*/
|
|
3353
|
-
|
|
3438
|
+
saveConversationMessageDraft(conversationType: ConversationType, targetId: string, draft: string): Promise<ErrorCode>;
|
|
3354
3439
|
/**
|
|
3355
|
-
*
|
|
3356
|
-
* 1. 私有云环境下该值为必填项
|
|
3357
|
-
* 2. 当存在自定义导航地址时,SDK 内部默认地址将无效
|
|
3358
|
-
* 3. 当存在自定义导航地址时,地址 url 中需包含 http/https 协议头,否则视为无效值
|
|
3359
|
-
* 4. 建立 ws/wss 连接前的 ping 接口使用的协议与导航 url 中的协议相同
|
|
3360
|
-
* 5. 建立 websocket 建立连接时将根据 ping 接口使用的 http/https 协议来确定使用 ws/wss 协议
|
|
3361
|
-
* 6. 动态导航使用的协议头将与自定义导航地址相同
|
|
3362
|
-
* 7. 公有云默认使用 https 协议
|
|
3440
|
+
* 获取指定会话消息草稿
|
|
3363
3441
|
*/
|
|
3364
|
-
|
|
3365
|
-
/**
|
|
3366
|
-
* (参数已废弃)~~c++ 协议栈数据库地址~~
|
|
3367
|
-
* @deprecated
|
|
3368
|
-
*/
|
|
3369
|
-
dbPath?: string;
|
|
3442
|
+
getConversationMessageDraft(conversationType: ConversationType, targetId: string): IPromiseResult<string>;
|
|
3370
3443
|
/**
|
|
3371
|
-
*
|
|
3444
|
+
* 清除指定会话消息草稿
|
|
3372
3445
|
*/
|
|
3373
|
-
|
|
3446
|
+
clearConversationMessageDraft(conversationType: ConversationType, targetId: string): Promise<ErrorCode>;
|
|
3374
3447
|
/**
|
|
3375
|
-
*
|
|
3448
|
+
* 从服务端拉取会话状态
|
|
3376
3449
|
*/
|
|
3377
|
-
|
|
3450
|
+
pullConversationStatus(timestamp: number): Promise<IAsyncRes<IServerConversationStatus[]>>;
|
|
3378
3451
|
/**
|
|
3379
|
-
*
|
|
3452
|
+
* 批量设置会话 置顶、免打扰
|
|
3380
3453
|
*/
|
|
3381
|
-
|
|
3382
|
-
|
|
3383
|
-
* 修改默认的 log 输出函数
|
|
3384
|
-
*/
|
|
3385
|
-
logStdout?: (logLevel: LogLevel, content: string) => void;
|
|
3454
|
+
batchSetConversationStatus(statusList: ISetConversationStatusOptions[]): Promise<ErrorCode>;
|
|
3455
|
+
sendMessage(conversationType: ConversationType, targetId: string, options: ISendMsgOptions, onBefore?: (messageId: number) => void): IPromiseResult<IReceivedMessage>;
|
|
3386
3456
|
/**
|
|
3387
|
-
*
|
|
3388
|
-
* @deprecated
|
|
3457
|
+
* 断开连接
|
|
3389
3458
|
*/
|
|
3390
|
-
|
|
3459
|
+
disconnect(): void;
|
|
3391
3460
|
/**
|
|
3392
|
-
*
|
|
3461
|
+
* 拉取用户级配置数据
|
|
3393
3462
|
*/
|
|
3394
|
-
|
|
3463
|
+
pullUserSettings(version: number): IPromiseResult<IServerUserSetting>;
|
|
3395
3464
|
/**
|
|
3396
|
-
*
|
|
3465
|
+
* 消息注册
|
|
3466
|
+
* @description
|
|
3467
|
+
* 消息注册需在应用初始化完成前进行,否则在搭配 C++ 协议栈使用时,
|
|
3468
|
+
* 本端发出的消息将不默认作为未知消息处理,不存储、不计数
|
|
3469
|
+
* @param objectName 消息类型,如:RC:TxtMsg
|
|
3470
|
+
* @param isPersited 是否存储
|
|
3471
|
+
* @param isCounted 是否技术
|
|
3472
|
+
* @param searchProps 搜索字段,只在搭配协议栈使用时有效
|
|
3397
3473
|
*/
|
|
3398
|
-
|
|
3474
|
+
registerMessageType(objectName: string, isPersited: boolean, isCounted: boolean, searchProps: string[]): void;
|
|
3399
3475
|
/**
|
|
3400
|
-
*
|
|
3401
|
-
|
|
3402
|
-
|
|
3403
|
-
|
|
3404
|
-
declare class APIContext {
|
|
3405
|
-
private _runtime;
|
|
3406
|
-
private static _context?;
|
|
3407
|
-
static init(runtime: IRuntime, options: IAPIContextOption): APIContext;
|
|
3408
|
-
static destroy(): void;
|
|
3409
|
-
private _token;
|
|
3476
|
+
* 加入聊天室
|
|
3477
|
+
* @param count 拉取消息数量
|
|
3478
|
+
*/
|
|
3479
|
+
joinChatroom(chatroomId: string, count: number): Promise<ErrorCode>;
|
|
3410
3480
|
/**
|
|
3411
|
-
*
|
|
3412
|
-
|
|
3413
|
-
|
|
3481
|
+
* 加入已存在的聊天室
|
|
3482
|
+
* @param count 拉取消息数量
|
|
3483
|
+
*/
|
|
3484
|
+
joinExistChatroom(chatroomId: string, count: number): Promise<ErrorCode>;
|
|
3414
3485
|
/**
|
|
3415
|
-
*
|
|
3416
|
-
|
|
3417
|
-
|
|
3418
|
-
private readonly _engine;
|
|
3486
|
+
* 退出聊天室
|
|
3487
|
+
*/
|
|
3488
|
+
quitChatroom(chatroomId: string): Promise<ErrorCode>;
|
|
3419
3489
|
/**
|
|
3420
|
-
*
|
|
3421
|
-
|
|
3422
|
-
|
|
3423
|
-
|
|
3424
|
-
|
|
3425
|
-
private readonly _options;
|
|
3426
|
-
private _versionInfo;
|
|
3427
|
-
private _typingInfo;
|
|
3490
|
+
* 获取聊天室信息
|
|
3491
|
+
* @param count 获取人数, 范围 0 - 20
|
|
3492
|
+
* @param order 排序方式, 1 正序, 2 倒序
|
|
3493
|
+
*/
|
|
3494
|
+
getChatroomInfo(chatroomId: string, count: number, order: number): IPromiseResult<IChatroomInfo>;
|
|
3428
3495
|
/**
|
|
3429
|
-
*
|
|
3430
|
-
|
|
3431
|
-
|
|
3432
|
-
|
|
3496
|
+
* 获取聊天室历史消息
|
|
3497
|
+
*/
|
|
3498
|
+
getChatroomHistoryMessages(chatroomId: string, timestamp: number, count: number, order: number): IPromiseResult<{
|
|
3499
|
+
list: IReceivedMessage[];
|
|
3500
|
+
hasMore: boolean;
|
|
3501
|
+
}>;
|
|
3433
3502
|
/**
|
|
3434
|
-
*
|
|
3435
|
-
|
|
3436
|
-
|
|
3437
|
-
*/
|
|
3438
|
-
install<T, O>(plugin: IPluginGenerator<T, O>, options: O): T | null;
|
|
3439
|
-
private _connectionStatus;
|
|
3440
|
-
private _canRedirectConnect;
|
|
3503
|
+
* 设置聊天室属性
|
|
3504
|
+
*/
|
|
3505
|
+
setChatroomEntry(chatroomId: string, entry: IChrmKVEntry): Promise<ErrorCode>;
|
|
3441
3506
|
/**
|
|
3442
|
-
*
|
|
3507
|
+
* 批量设置聊天室属性
|
|
3443
3508
|
*/
|
|
3444
|
-
|
|
3509
|
+
setChatroomEntries(chatroomId: string, entry: IChrmKVEntries): Promise<{
|
|
3510
|
+
code: ErrorCode;
|
|
3511
|
+
data?: any;
|
|
3512
|
+
}>;
|
|
3445
3513
|
/**
|
|
3446
|
-
*
|
|
3447
|
-
|
|
3514
|
+
* 强制设置聊天室属性
|
|
3515
|
+
*/
|
|
3516
|
+
forceSetChatroomEntry(chatroomId: string, entry: IChrmKVEntry): Promise<ErrorCode>;
|
|
3517
|
+
/**
|
|
3518
|
+
* 删除聊天室属性
|
|
3519
|
+
*/
|
|
3520
|
+
removeChatroomEntry(chatroomId: string, entry: IChrmKVEntry): Promise<ErrorCode>;
|
|
3521
|
+
/**
|
|
3522
|
+
* 批量删除聊天室属性
|
|
3448
3523
|
*/
|
|
3449
|
-
|
|
3450
|
-
|
|
3524
|
+
removeChatroomEntries(chatroomId: string, entries: IChrmKVEntries): Promise<{
|
|
3525
|
+
code: ErrorCode;
|
|
3526
|
+
data?: any;
|
|
3527
|
+
}>;
|
|
3451
3528
|
/**
|
|
3452
|
-
*
|
|
3529
|
+
* 强制删除聊天室属性
|
|
3453
3530
|
*/
|
|
3454
|
-
|
|
3531
|
+
forceRemoveChatroomEntry(chatroomId: string, entry: IChrmKVEntry): Promise<ErrorCode>;
|
|
3455
3532
|
/**
|
|
3456
|
-
|
|
3533
|
+
* 获取聊天室 key 对应 value
|
|
3457
3534
|
*/
|
|
3458
|
-
|
|
3535
|
+
getChatroomEntry(chatroomId: string, key: string): IPromiseResult<string | null>;
|
|
3459
3536
|
/**
|
|
3460
|
-
|
|
3537
|
+
* 获取聊天室所有 key value
|
|
3461
3538
|
*/
|
|
3462
|
-
|
|
3539
|
+
getAllChatroomEntry(chatroomId: string): IPromiseResult<{
|
|
3540
|
+
[key: string]: string;
|
|
3541
|
+
}>;
|
|
3463
3542
|
/**
|
|
3464
|
-
*
|
|
3465
|
-
|
|
3466
|
-
|
|
3543
|
+
* 获取上传认证信息
|
|
3544
|
+
* @description
|
|
3545
|
+
* 若不传 fileName 百度上传认证字段(bosToken、bosDate、path)均返回 null
|
|
3546
|
+
*/
|
|
3547
|
+
getFileToken(fileType: FileType, fileName?: string, httpMethod?: string, queryUriString?: string): Promise<IAsyncRes<IUploadAuth>>;
|
|
3467
3548
|
/**
|
|
3468
|
-
*
|
|
3469
|
-
|
|
3470
|
-
|
|
3471
|
-
|
|
3472
|
-
|
|
3473
|
-
private _MessageBlockedListener;
|
|
3549
|
+
* 获取文件上传后下载地址
|
|
3550
|
+
*/
|
|
3551
|
+
getFileUrl(fileType: FileType, uploadMethod: UploadMethod, fileName?: string, originName?: string): IPromiseResult<{
|
|
3552
|
+
downloadUrl: string;
|
|
3553
|
+
}>;
|
|
3474
3554
|
/**
|
|
3475
|
-
*
|
|
3476
|
-
|
|
3477
|
-
|
|
3555
|
+
* 创建标签
|
|
3556
|
+
* @param tag 标签
|
|
3557
|
+
*/
|
|
3558
|
+
createTag(tag: ITagParam): IPromiseResult<IAsyncRes>;
|
|
3478
3559
|
/**
|
|
3479
|
-
*
|
|
3480
|
-
|
|
3481
|
-
|
|
3560
|
+
* 删除标签
|
|
3561
|
+
* @param tagId 标签id
|
|
3562
|
+
*/
|
|
3563
|
+
removeTag(tagId: string): IPromiseResult<IAsyncRes>;
|
|
3482
3564
|
/**
|
|
3483
|
-
*
|
|
3484
|
-
* @param
|
|
3485
|
-
|
|
3486
|
-
|
|
3565
|
+
* 编辑标签
|
|
3566
|
+
* @param tag 标签
|
|
3567
|
+
*/
|
|
3568
|
+
updateTag(tag: ITagParam): IPromiseResult<IAsyncRes>;
|
|
3487
3569
|
/**
|
|
3488
|
-
*
|
|
3489
|
-
* 添加 typing 时不触发通知,只有在轮询时间点校验 _typingChangedList 的长度大于 0 时才通知
|
|
3570
|
+
* 获取标签列表
|
|
3490
3571
|
*/
|
|
3491
|
-
|
|
3492
|
-
private _typingInternalTimer;
|
|
3493
|
-
private _typingExpireTime;
|
|
3494
|
-
private _typingChangedList;
|
|
3572
|
+
getTagList(): IPromiseResult<Array<ITagInfo>>;
|
|
3495
3573
|
/**
|
|
3496
|
-
*
|
|
3574
|
+
* 添加会话到标签(给多个会话增加标签)
|
|
3575
|
+
* @param tagId 标签id
|
|
3576
|
+
* @param conversations 要添加的会话列表
|
|
3497
3577
|
*/
|
|
3498
|
-
|
|
3499
|
-
getConnectedTime(): number;
|
|
3500
|
-
getServerTime(): number;
|
|
3501
|
-
getDeviceId(): string;
|
|
3502
|
-
getCurrentUserId(): string;
|
|
3503
|
-
getConnectionStatus(): ConnectionStatus;
|
|
3578
|
+
addTagForConversations(tagId: string, conversations: IConversationOption[]): IPromiseResult<IAsyncRes>;
|
|
3504
3579
|
/**
|
|
3505
|
-
*
|
|
3506
|
-
* @param
|
|
3507
|
-
* @param
|
|
3580
|
+
* 删除标签中的会话(从多个会话中批量删除指定标签)
|
|
3581
|
+
* @param tagId 标签id
|
|
3582
|
+
* @param conversations 要删除的会话列表
|
|
3508
3583
|
*/
|
|
3509
|
-
|
|
3584
|
+
removeTagForConversations(tagId: string, conversations: IConversationOption[]): IPromiseResult<IAsyncRes>;
|
|
3510
3585
|
/**
|
|
3511
|
-
*
|
|
3586
|
+
* 删除会话中的标签(从单一会话中批量删除标签)
|
|
3587
|
+
* @param conversationType 会话类型
|
|
3588
|
+
* @param targetId 会话id
|
|
3589
|
+
* @param tagIds 要删除的标签列表
|
|
3512
3590
|
*/
|
|
3513
|
-
|
|
3514
|
-
disconnect(): Promise<void>;
|
|
3515
|
-
reconnect(): Promise<IConnectResult>;
|
|
3516
|
-
private _getTokenWithoutNavi;
|
|
3591
|
+
removeTagsForConversation(conversation: IConversationOption, tagIds: string[]): IPromiseResult<IAsyncRes>;
|
|
3517
3592
|
/**
|
|
3518
|
-
*
|
|
3593
|
+
* 获取标签下的会话列表
|
|
3594
|
+
* @param tagId 标签id
|
|
3519
3595
|
*/
|
|
3520
|
-
|
|
3596
|
+
getConversationListByTag(tagId: string, startTime: number, count?: number, channelId?: string): IPromiseResult<IReceivedConversationByTag[]>;
|
|
3521
3597
|
/**
|
|
3522
|
-
*
|
|
3523
|
-
* @
|
|
3524
|
-
* @param
|
|
3525
|
-
* @param isPersited 是否存储
|
|
3526
|
-
* @param isCounted 是否技术
|
|
3527
|
-
* @param searchProps 搜索字段,只在搭配协议栈使用时有效
|
|
3598
|
+
* 获取标签下的未读消息数
|
|
3599
|
+
* @param tagId 标签id
|
|
3600
|
+
* @param containMuted 是否包含免打扰会话
|
|
3528
3601
|
*/
|
|
3529
|
-
|
|
3602
|
+
getUnreadCountByTag(tagId: string, containMuted: boolean): IPromiseResult<number>;
|
|
3530
3603
|
/**
|
|
3531
|
-
*
|
|
3532
|
-
* @param
|
|
3533
|
-
* @param targetId
|
|
3534
|
-
* @param objectName
|
|
3535
|
-
* @param content
|
|
3536
|
-
* @param options
|
|
3604
|
+
* 设置标签中会话置顶
|
|
3605
|
+
* @param conversation 会话
|
|
3537
3606
|
*/
|
|
3538
|
-
|
|
3607
|
+
setConversationStatusInTag(tagId: string, conversation: IConversationOption, status: ITagStatus): IPromiseResult<IAsyncRes>;
|
|
3539
3608
|
/**
|
|
3540
|
-
*
|
|
3541
|
-
* @param
|
|
3542
|
-
|
|
3543
|
-
|
|
3544
|
-
*/
|
|
3545
|
-
sendExpansionMessage(options: ISendExMsgOptions): Promise<IAsyncRes<ErrorCode>>;
|
|
3609
|
+
* 获取会话里的标签
|
|
3610
|
+
* @param config
|
|
3611
|
+
*/
|
|
3612
|
+
getTagsForConversation(conversation: IConversationOption): IPromiseResult<IConversationTag[]>;
|
|
3546
3613
|
/**
|
|
3547
3614
|
* 发送群组消息已读回执
|
|
3548
3615
|
* 导航下发已读回执开关为 true 时调用
|
|
3549
|
-
* @param targetId 群组会话id
|
|
3550
|
-
* @param messageUIds 消息id
|
|
3551
3616
|
*/
|
|
3552
3617
|
sendReadReceiptMessage(targetId: string, messageUIds: string[], channelId?: string): Promise<IAsyncRes>;
|
|
3553
3618
|
/**
|
|
3554
3619
|
* 获取群组消息已读列表
|
|
3555
|
-
* @param targetId
|
|
3556
|
-
* @param messageUIds
|
|
3557
3620
|
*/
|
|
3558
|
-
getMessageReader(targetId: string, messageUId: string, channelId?: string):
|
|
3621
|
+
getMessageReader(targetId: string, messageUId: string, channelId?: string): IPromiseResult<IMessageReaderResponse>;
|
|
3559
3622
|
/**
|
|
3560
|
-
*
|
|
3623
|
+
* 获取服务器时间
|
|
3561
3624
|
*/
|
|
3562
|
-
|
|
3625
|
+
getServerTime(): number;
|
|
3563
3626
|
/**
|
|
3564
|
-
*
|
|
3565
|
-
* @param targetId 会话 Id
|
|
3566
|
-
* @param timestamp 拉取时间戳
|
|
3567
|
-
* @param count 拉取条数
|
|
3568
|
-
* @param order 1 正序拉取,0 为倒序拉取
|
|
3569
|
-
* @param channelId
|
|
3570
|
-
* @param objectName
|
|
3627
|
+
* 获取设备ID
|
|
3571
3628
|
*/
|
|
3572
|
-
|
|
3573
|
-
list: IReceivedMessage[];
|
|
3574
|
-
hasMore: boolean;
|
|
3575
|
-
}>>;
|
|
3576
|
-
/**
|
|
3577
|
-
* 获取会话列表
|
|
3578
|
-
* @param count 指定获取数量, 不传则获取全部会话列表,默认 `300`
|
|
3579
|
-
*/
|
|
3580
|
-
getConversationList(count?: number, conversationType?: ConversationType, startTime?: number, order?: 0 | 1, channelId?: string): Promise<IAsyncRes<IReceivedConversation[]>>;
|
|
3581
|
-
/**
|
|
3582
|
-
* 获取单一会话数据
|
|
3583
|
-
* @param conversationType
|
|
3584
|
-
* @param targetId
|
|
3585
|
-
* @param channelId
|
|
3586
|
-
*/
|
|
3587
|
-
getConversation(conversationType: ConversationType, targetId: string, channelId: string): IPromiseResult<IReceivedConversation | null>;
|
|
3588
|
-
/**
|
|
3589
|
-
* 删除会话
|
|
3590
|
-
*/
|
|
3591
|
-
removeConversation(conversationType: ConversationType, targetId: string, channelId?: string): Promise<ErrorCode>;
|
|
3592
|
-
/**
|
|
3593
|
-
* 清除会话消息未读数
|
|
3594
|
-
*/
|
|
3595
|
-
clearUnreadCount(conversationType: ConversationType, targetId: string, channelId?: string): Promise<ErrorCode>;
|
|
3596
|
-
/**
|
|
3597
|
-
* 清除全部会话消息未读数
|
|
3598
|
-
*/
|
|
3599
|
-
clearAllUnreadCount(): Promise<ErrorCode>;
|
|
3600
|
-
/**
|
|
3601
|
-
* 获取指定会话消息未读数
|
|
3602
|
-
*/
|
|
3603
|
-
getUnreadCount(conversationType: ConversationType, targetId: string, channelId?: string): Promise<IAsyncRes<number>>;
|
|
3604
|
-
/**
|
|
3605
|
-
* 获取所有会话未读数
|
|
3606
|
-
* @param channelId 多组织 Id
|
|
3607
|
-
* @param conversationTypes
|
|
3608
|
-
* @param includeMuted 包含已设置免打扰的会话
|
|
3609
|
-
*/
|
|
3610
|
-
getTotalUnreadCount(channelId: string, conversationTypes?: ConversationType[], includeMuted?: boolean): Promise<IAsyncRes<number>>;
|
|
3611
|
-
/**
|
|
3612
|
-
* 获取第一个未读消息
|
|
3613
|
-
*/
|
|
3614
|
-
getFirstUnreadMessage(conversationType: ConversationType, targetId: string, channelId?: string): Promise<IAsyncRes<IReceivedMessage | null>>;
|
|
3615
|
-
setConversationStatus(conversationType: ConversationType, targetId: string, isTop?: boolean, notificationStatus?: 1 | 2, channelId?: string): Promise<ErrorCode>;
|
|
3616
|
-
saveConversationMessageDraft(conversationType: ConversationType, targetId: string, draft: string): Promise<ErrorCode>;
|
|
3617
|
-
getConversationMessageDraft(conversationType: ConversationType, targetId: string): Promise<IAsyncRes<string>>;
|
|
3618
|
-
clearConversationMessageDraft(conversationType: ConversationType, targetId: string): Promise<ErrorCode>;
|
|
3619
|
-
recallMessage(conversationType: ConversationType, targetId: string, messageUId: string, sentTime: number, recallMsgOptions: IRecallMsgOptions): Promise<IAsyncRes<IReceivedMessage>>;
|
|
3620
|
-
/**
|
|
3621
|
-
* 删除远端消息
|
|
3622
|
-
* @param conversationType
|
|
3623
|
-
* @param targetId
|
|
3624
|
-
* @param list
|
|
3625
|
-
*/
|
|
3626
|
-
deleteRemoteMessage(conversationType: ConversationType, targetId: string, list: {
|
|
3627
|
-
messageUId: string;
|
|
3628
|
-
sentTime: number;
|
|
3629
|
-
messageDirection: MessageDirection;
|
|
3630
|
-
}[], channelId?: string): Promise<ErrorCode>;
|
|
3631
|
-
/**
|
|
3632
|
-
* 根据时间戳删除指定时间之前的
|
|
3633
|
-
* @param conversationType
|
|
3634
|
-
* @param targetId
|
|
3635
|
-
* @param timestamp
|
|
3636
|
-
*/
|
|
3637
|
-
deleteRemoteMessageByTimestamp(conversationType: ConversationType, targetId: string, timestamp: number, channelId?: string): Promise<ErrorCode>;
|
|
3638
|
-
/**
|
|
3639
|
-
* 加入聊天室,若聊天室不存在则创建聊天室
|
|
3640
|
-
* @param roomId 聊天室房间 Id
|
|
3641
|
-
* @param count 进入聊天室成功后,自动拉取的历史消息数量,默认值为 `10`,最大有效值为 `50`,`-1` 为不拉取
|
|
3642
|
-
*/
|
|
3643
|
-
joinChatroom(roomId: string, count?: number): Promise<ErrorCode>;
|
|
3644
|
-
/**
|
|
3645
|
-
* 加入聊天室,若聊天室不存在则抛出异常
|
|
3646
|
-
* @param roomId 聊天室房间 Id
|
|
3647
|
-
* @param count 进入聊天室成功后,自动拉取的历史消息数量,默认值为 `10`,最大有效值为 `50`,`-1` 为不拉取
|
|
3648
|
-
*/
|
|
3649
|
-
joinExistChatroom(roomId: string, count?: number): Promise<ErrorCode>;
|
|
3650
|
-
/**
|
|
3651
|
-
* 退出聊天室
|
|
3652
|
-
* @param roomId
|
|
3653
|
-
*/
|
|
3654
|
-
quitChatroom(roomId: string): Promise<ErrorCode>;
|
|
3655
|
-
/**
|
|
3656
|
-
* 获取聊天室房间数据
|
|
3657
|
-
* @description count 或 order 有一个为 0 时,只返回成员总数,不返回成员列表信息
|
|
3658
|
-
* @param roomId 聊天室 Id
|
|
3659
|
-
* @param count 获取房间人员列表数量,最大有效值 `20`,最小值未 `0`,默认为 0
|
|
3660
|
-
* @param order 人员排序方式,`1` 为正序,`2` 为倒序,默认为 0
|
|
3661
|
-
*/
|
|
3662
|
-
getChatroomInfo(roomId: string, count?: number, order?: 0 | 1 | 2): Promise<IAsyncRes<IChatroomInfo>>;
|
|
3663
|
-
/**
|
|
3664
|
-
* 在指定聊天室中设置自定义属性
|
|
3665
|
-
* @description 仅聊天室中不存在此属性或属性设置者为己方时可设置成功
|
|
3666
|
-
* @param roomId 聊天室房间 id
|
|
3667
|
-
* @param entry 属性信息
|
|
3668
|
-
*/
|
|
3669
|
-
setChatroomEntry(roomId: string, entry: IChatroomEntry): Promise<ErrorCode>;
|
|
3670
|
-
setChatroomEntries(roomId: string, entryOptions: IChatroomEntries): Promise<{
|
|
3671
|
-
code: ErrorCode;
|
|
3672
|
-
data?: any;
|
|
3673
|
-
}>;
|
|
3674
|
-
/**
|
|
3675
|
-
* 在指定聊天室中强制增加 / 修改任意聊天室属性
|
|
3676
|
-
* @description 仅聊天室中不存在此属性或属性设置者为己方时可设置成功
|
|
3677
|
-
* @param roomId 聊天室房间 id
|
|
3678
|
-
* @param entry 属性信息
|
|
3679
|
-
*/
|
|
3680
|
-
forceSetChatroomEntry(roomId: string, entry: IChatroomEntry): Promise<ErrorCode>;
|
|
3681
|
-
/**
|
|
3682
|
-
* 删除聊天室属性
|
|
3683
|
-
* @description 该方法仅限于删除自己设置的聊天室属性
|
|
3684
|
-
* @param roomId 聊天室房间 id
|
|
3685
|
-
* @param entry 要移除的属性信息
|
|
3686
|
-
*/
|
|
3687
|
-
removeChatroomEntry(roomId: string, entry: IRemoveChatRoomEntryOption): Promise<ErrorCode>;
|
|
3688
|
-
/**
|
|
3689
|
-
* 批量删除聊天室属性
|
|
3690
|
-
* @description 该方法仅限于删除自己设置的聊天室属性
|
|
3691
|
-
* @param roomId 聊天室房间 id
|
|
3692
|
-
* @param entry 要移除的属性信息
|
|
3693
|
-
*/
|
|
3694
|
-
removeChatroomEntries(roomId: string, entryOptions: IRemoveChatRoomEntriesOption): Promise<{
|
|
3695
|
-
code: ErrorCode;
|
|
3696
|
-
data?: any;
|
|
3697
|
-
}>;
|
|
3698
|
-
/**
|
|
3699
|
-
* 强制删除任意聊天室属性
|
|
3700
|
-
* @description 该方法仅限于删除自己设置的聊天室属性
|
|
3701
|
-
* @param roomId 聊天室房间 id
|
|
3702
|
-
* @param entry 要移除的属性信息
|
|
3703
|
-
*/
|
|
3704
|
-
forceRemoveChatroomEntry(roomId: string, entry: IRemoveChatRoomEntryOption): Promise<ErrorCode>;
|
|
3705
|
-
/**
|
|
3706
|
-
* 获取聊天室中的指定属性
|
|
3707
|
-
* @param roomId 聊天室房间 id
|
|
3708
|
-
* @param key 属性键名
|
|
3709
|
-
*/
|
|
3710
|
-
getChatroomEntry(roomId: string, key: string): Promise<IAsyncRes<string | null>>;
|
|
3711
|
-
/**
|
|
3712
|
-
* 获取聊天室内的所有属性
|
|
3713
|
-
* @param roomId 聊天室房间 id
|
|
3714
|
-
*/
|
|
3715
|
-
getAllChatroomEntries(roomId: string): Promise<IAsyncRes<{
|
|
3716
|
-
[key: string]: string;
|
|
3717
|
-
}>>;
|
|
3718
|
-
/**
|
|
3719
|
-
* 拉取聊天室内的历史消息
|
|
3720
|
-
* @param roomId
|
|
3721
|
-
* @param count 拉取消息条数, 有效值范围 `1 - 20`
|
|
3722
|
-
* @param order 获取顺序,默认值为 0。
|
|
3723
|
-
* * 0:降序,用于获取早于指定时间戳发送的消息
|
|
3724
|
-
* * 1:升序,用于获取晚于指定时间戳发送的消息
|
|
3725
|
-
* @param timestamp 指定拉取消息用到的时间戳。默认值为 `0`,表示按当前时间拉取
|
|
3726
|
-
*/
|
|
3727
|
-
getChatRoomHistoryMessages(roomId: string, count?: number, order?: 0 | 1, timestamp?: number): Promise<IAsyncRes<{
|
|
3728
|
-
list: IReceivedMessage[];
|
|
3729
|
-
hasMore: boolean;
|
|
3730
|
-
}>>;
|
|
3629
|
+
getDeviceId(): string;
|
|
3731
3630
|
/**
|
|
3732
|
-
*
|
|
3733
|
-
* @param fileType 文件类型
|
|
3734
|
-
* @param fileName 文件名称
|
|
3735
|
-
* @param httpMethod STC 分段上传时的必填参数,有效值为 PUT | POST
|
|
3736
|
-
* @param queryString STC 分段上传时的查询字符串
|
|
3737
|
-
* @description
|
|
3738
|
-
* `httpMethod` 与 `queryString` 为 STC S3 分段上传时的专属参数,STC 分段上传包含三个过程:
|
|
3739
|
-
* 1. 开始分段前调用,此时 `httpMethod` 值应为 `POST`, `queryString` 值为 `uploads`
|
|
3740
|
-
* 2. 上传请求前调用,此时 `httpMethod` 值应为 `PUT`,`queryString` 值为 `partNumber={partamNumer}&uploadId={uploadId}`
|
|
3741
|
-
* 3. 上传结束前调用,此时 `httpMethod` 值应为 `POST`,`queryString` 值为 `uploadId={uploadId}`
|
|
3742
|
-
* @returns
|
|
3631
|
+
* 获取当前 userId
|
|
3743
3632
|
*/
|
|
3744
|
-
|
|
3745
|
-
|
|
3746
|
-
|
|
3747
|
-
}>;
|
|
3633
|
+
getCurrentUserId(): string;
|
|
3634
|
+
getConversationListWithAllChannel(): IPromiseResult<IReceivedConversation[]>;
|
|
3635
|
+
getConversationListWithAllChannelByPage(index: number, limit: number): IPromiseResult<IReceivedConversation[]>;
|
|
3748
3636
|
/**
|
|
3749
|
-
*
|
|
3750
|
-
* @param fileType 文件类型
|
|
3751
|
-
* @param fileName 文件名
|
|
3752
|
-
* @param saveName 下载后的存储文件名
|
|
3753
|
-
* @param uploadRes 插件上传返回的结果。降级百度上传后,用户传入返回结果,再把结果里的下载地址返回给用户,保证兼容之前结果获取
|
|
3754
|
-
* @param serverType 使用的存储服务标识
|
|
3637
|
+
* 设置用户在线状态监听器
|
|
3755
3638
|
*/
|
|
3756
|
-
|
|
3757
|
-
|
|
3758
|
-
|
|
3759
|
-
}, serverType?: UploadMethod): Promise<{
|
|
3760
|
-
downloadUrl: string;
|
|
3761
|
-
}>;
|
|
3762
|
-
/**
|
|
3763
|
-
* 创建标签
|
|
3764
|
-
* @param tag 标签
|
|
3765
|
-
*/
|
|
3766
|
-
createTag(tag: ITagParam): Promise<IAsyncRes>;
|
|
3767
|
-
/**
|
|
3768
|
-
* 删除标签
|
|
3769
|
-
* @param tagId 标签id
|
|
3770
|
-
*/
|
|
3771
|
-
removeTag(tagId: string): Promise<IAsyncRes>;
|
|
3772
|
-
/**
|
|
3773
|
-
* 更新标签
|
|
3774
|
-
* @param tag 标签
|
|
3775
|
-
*/
|
|
3776
|
-
updateTag(tag: ITagParam): Promise<IAsyncRes>;
|
|
3777
|
-
/**
|
|
3778
|
-
* 获取标签列表
|
|
3779
|
-
*/
|
|
3780
|
-
getTagList(): Promise<IAsyncRes<Array<ITagInfo>>>;
|
|
3781
|
-
/**
|
|
3782
|
-
* 添加会话到标签(给多个会话增加标签)
|
|
3783
|
-
* @param tagId 标签id
|
|
3784
|
-
* @param conversations 要添加的会话列表
|
|
3785
|
-
*/
|
|
3786
|
-
addTagForConversations(tagId: string, conversations: IConversationOption[]): Promise<IAsyncRes<IAsyncRes>>;
|
|
3787
|
-
/**
|
|
3788
|
-
* 删除标签中的会话(从多个会话中批量删除指定标签)
|
|
3789
|
-
* @param tagId 标签id
|
|
3790
|
-
* @param conversations 要删除的会话列表
|
|
3791
|
-
*/
|
|
3792
|
-
removeTagForConversations(tagId: string, conversations: IConversationOption[]): Promise<IAsyncRes<IAsyncRes>>;
|
|
3793
|
-
/**
|
|
3794
|
-
* 删除会话中的标签(从单一会话中批量删除标签)
|
|
3795
|
-
* @param conversationType 会话类型
|
|
3796
|
-
* @param targetId 会话id
|
|
3797
|
-
* @param tagIds 要删除的标签列表
|
|
3798
|
-
*/
|
|
3799
|
-
removeTagsForConversation(conversation: IConversationOption, tagIds: string[]): Promise<IAsyncRes<IAsyncRes>>;
|
|
3800
|
-
/**
|
|
3801
|
-
* 获取标签下的会话列表
|
|
3802
|
-
* @param tagId 标签id
|
|
3803
|
-
*/
|
|
3804
|
-
getConversationListByTag(tagId: string, startTime: number, count?: number, channelId?: string): Promise<IAsyncRes<IReceivedConversationByTag[]>>;
|
|
3805
|
-
/**
|
|
3806
|
-
* 获取标签下的未读消息数
|
|
3807
|
-
* @param tagId 标签id
|
|
3808
|
-
* @param containMuted 是否包含免打扰会话
|
|
3809
|
-
*/
|
|
3810
|
-
getUnreadCountByTag(tagId: string, containMuted: boolean): Promise<IAsyncRes<number>>;
|
|
3811
|
-
/**
|
|
3812
|
-
* 设置标签中会话置顶
|
|
3813
|
-
* @param conversation 会话
|
|
3814
|
-
*/
|
|
3815
|
-
setConversationStatusInTag(tagId: string, conversation: IConversationOption, status: {
|
|
3816
|
-
isTop: boolean;
|
|
3817
|
-
}): Promise<IAsyncRes<IAsyncRes>>;
|
|
3639
|
+
setUserStatusListener(config: {
|
|
3640
|
+
userIds: string[];
|
|
3641
|
+
}, listener: Function): void;
|
|
3818
3642
|
/**
|
|
3819
|
-
*
|
|
3820
|
-
|
|
3821
|
-
|
|
3822
|
-
getTagsForConversation(conversation: IConversationOption): Promise<IAsyncRes<IConversationTag[]>>;
|
|
3643
|
+
* 设置当前用户在线状态
|
|
3644
|
+
*/
|
|
3645
|
+
setUserStatus(status: number): Promise<ErrorCode>;
|
|
3823
3646
|
/**
|
|
3824
|
-
*
|
|
3825
|
-
|
|
3826
|
-
|
|
3827
|
-
* @param args
|
|
3828
|
-
*/
|
|
3829
|
-
callExtra(method: string | keyof IExtraMethod, ...args: any[]): Promise<IAsyncRes<unknown>>;
|
|
3647
|
+
* 订阅用户在线状态
|
|
3648
|
+
*/
|
|
3649
|
+
subscribeUserStatus(userIds: string[]): Promise<ErrorCode>;
|
|
3830
3650
|
/**
|
|
3831
|
-
*
|
|
3651
|
+
* 获取用户状态
|
|
3832
3652
|
*/
|
|
3833
|
-
|
|
3653
|
+
getUserStatus(userId: string): IPromiseResult<{
|
|
3654
|
+
status: string;
|
|
3655
|
+
}>;
|
|
3834
3656
|
/**
|
|
3835
|
-
*
|
|
3657
|
+
* 清空所有会话
|
|
3836
3658
|
*/
|
|
3837
|
-
|
|
3838
|
-
userIds: string[];
|
|
3839
|
-
}, listener: Function): void;
|
|
3659
|
+
clearConversations(conversationTypes?: ConversationType[], channelId?: string): Promise<ErrorCode>;
|
|
3840
3660
|
/**
|
|
3841
|
-
*
|
|
3661
|
+
* 加入黑名单
|
|
3842
3662
|
*/
|
|
3843
3663
|
addToBlacklist(userId: string): Promise<ErrorCode>;
|
|
3844
3664
|
/**
|
|
3845
|
-
|
|
3665
|
+
* 将指定用户移除黑名单
|
|
3846
3666
|
*/
|
|
3847
3667
|
removeFromBlacklist(userId: string): Promise<ErrorCode>;
|
|
3848
3668
|
/**
|
|
3849
|
-
|
|
3669
|
+
* 获取黑名单列表
|
|
3850
3670
|
*/
|
|
3851
|
-
getBlacklist():
|
|
3671
|
+
getBlacklist(): IPromiseResult<string[]>;
|
|
3852
3672
|
/**
|
|
3853
|
-
|
|
3673
|
+
* 获取指定人员在黑名单中的状态
|
|
3854
3674
|
*/
|
|
3855
|
-
getBlacklistStatus(userId: string):
|
|
3675
|
+
getBlacklistStatus(userId: string): IPromiseResult<string>;
|
|
3856
3676
|
/**
|
|
3857
3677
|
* 向本地插入一条消息,不发送到服务器
|
|
3858
3678
|
*/
|
|
3859
|
-
insertMessage(conversationType: ConversationType, targetId: string, insertOptions: IInsertMsgOptions):
|
|
3679
|
+
insertMessage(conversationType: ConversationType, targetId: string, insertOptions: IInsertMsgOptions): IPromiseResult<IReceivedMessage>;
|
|
3860
3680
|
/**
|
|
3861
3681
|
* 删除本地消息
|
|
3862
3682
|
*/
|
|
3863
|
-
deleteMessages(
|
|
3683
|
+
deleteMessages(timestamps: number[]): Promise<ErrorCode>;
|
|
3864
3684
|
/**
|
|
3865
|
-
*
|
|
3685
|
+
* 通过时间戳删除本地消息
|
|
3866
3686
|
*/
|
|
3867
|
-
deleteMessagesByTimestamp(conversationType: ConversationType, targetId: string, timestamp: number, cleanSpace: boolean, channelId
|
|
3687
|
+
deleteMessagesByTimestamp(conversationType: ConversationType, targetId: string, timestamp: number, cleanSpace: boolean, channelId: string): Promise<ErrorCode>;
|
|
3868
3688
|
/**
|
|
3869
3689
|
* 清空会话下历史消息
|
|
3870
3690
|
*/
|
|
3871
|
-
clearMessages(conversationType: ConversationType, targetId: string, channelId
|
|
3691
|
+
clearMessages(conversationType: ConversationType, targetId: string, channelId: string): Promise<ErrorCode>;
|
|
3692
|
+
/**
|
|
3693
|
+
* 获取消息
|
|
3694
|
+
*/
|
|
3695
|
+
getMessage(messageId: number): IPromiseResult<IReceivedMessage>;
|
|
3696
|
+
/**
|
|
3697
|
+
* 设置消息内容
|
|
3698
|
+
*/
|
|
3699
|
+
setMessageContent(messageId: number, content: any, messageType: string): Promise<ErrorCode>;
|
|
3700
|
+
/**
|
|
3701
|
+
* 设置消息搜索字段
|
|
3702
|
+
*/
|
|
3703
|
+
setMessageSearchField(messageId: number, content: any, searchFiles: string): Promise<ErrorCode>;
|
|
3704
|
+
/**
|
|
3705
|
+
* 通过关键字与 channelId 搜索所有会话
|
|
3706
|
+
*/
|
|
3707
|
+
searchConversationByContent(keyword: string, customMessageTypes: string[], channelId: string, conversationTypes?: ConversationType[]): IPromiseResult<IReceivedConversation[]>;
|
|
3708
|
+
/**
|
|
3709
|
+
* 通过关键字搜索所有会话
|
|
3710
|
+
*/
|
|
3711
|
+
searchConversationByContentWithAllChannel(keyword: string, customMessageTypes: string[], conversationTypes?: ConversationType[]): IPromiseResult<IReceivedConversation[]>;
|
|
3712
|
+
/**
|
|
3713
|
+
* 按内容搜索指定会话内的消息
|
|
3714
|
+
*/
|
|
3715
|
+
searchMessageByContent(conversationType: ConversationType, targetId: string, keyword: string, timestamp: number, count: number, total: number, channelId: string): IPromiseResult<{
|
|
3716
|
+
messages: IReceivedMessage[];
|
|
3717
|
+
count: number;
|
|
3718
|
+
}>;
|
|
3872
3719
|
/**
|
|
3873
|
-
*
|
|
3874
|
-
|
|
3875
|
-
|
|
3720
|
+
* 按内容搜索指定会话(不区分 channelId)的消息
|
|
3721
|
+
*/
|
|
3722
|
+
searchMessageByContentWithAllChannel(conversationType: ConversationType, targetId: string, keyword: string, timestamp: number, count: number): IPromiseResult<{
|
|
3723
|
+
messages: IReceivedMessage[];
|
|
3724
|
+
count: number;
|
|
3725
|
+
}>;
|
|
3876
3726
|
/**
|
|
3877
|
-
*
|
|
3878
|
-
|
|
3879
|
-
|
|
3727
|
+
* 按内容搜索时间范围内指定会话(不区分 channelId)的消息
|
|
3728
|
+
*/
|
|
3729
|
+
searchMessageByContentInTimeRangeWithAllChannel(conversationType: ConversationType, targetId: string, keyword: string, startTime: number, endTime: number, offset: number, limit: number): IPromiseResult<{
|
|
3730
|
+
messages: IReceivedMessage[];
|
|
3731
|
+
}>;
|
|
3880
3732
|
/**
|
|
3881
|
-
*
|
|
3733
|
+
* 获取会话下所有未读的 @ 消息
|
|
3882
3734
|
*/
|
|
3883
|
-
|
|
3735
|
+
getUnreadMentionedMessages(conversationType: ConversationType, targetId: string, channelId: string): IReceivedMessage[];
|
|
3884
3736
|
/**
|
|
3885
3737
|
* 设置消息发送状态
|
|
3886
3738
|
*/
|
|
3887
3739
|
setMessageSentStatus(messageId: number, sentStatus: number): Promise<ErrorCode>;
|
|
3888
3740
|
/**
|
|
3889
|
-
|
|
3741
|
+
* 设置消息接收状态
|
|
3890
3742
|
*/
|
|
3891
3743
|
setMessageReceivedStatus(messageId: number, receivedStatus: number): Promise<ErrorCode>;
|
|
3892
3744
|
/**
|
|
3893
|
-
*
|
|
3894
|
-
*/
|
|
3895
|
-
setUserStatus(status: number): Promise<ErrorCode>;
|
|
3896
|
-
/**
|
|
3897
|
-
* 订阅用户在线状态
|
|
3745
|
+
* 删除时间戳前的未读数
|
|
3898
3746
|
*/
|
|
3899
|
-
|
|
3747
|
+
clearUnreadCountByTimestamp(conversationType: ConversationType, targetId: string, timestamp: number, channelId: string): Promise<ErrorCode>;
|
|
3900
3748
|
/**
|
|
3901
|
-
*
|
|
3749
|
+
* 获取会话免打扰状态
|
|
3902
3750
|
*/
|
|
3903
|
-
|
|
3904
|
-
status: string;
|
|
3905
|
-
}>>;
|
|
3906
|
-
searchConversationByContent(keyword: string, customMessageTypes?: string[], channelId?: string, conversationTypes?: ConversationType[]): Promise<IAsyncRes<IReceivedConversation[]>>;
|
|
3907
|
-
searchMessageByContent(conversationType: ConversationType, targetId: string, keyword: string, timestamp: number, count: number, total: number, channelId?: string): Promise<IAsyncRes<{
|
|
3908
|
-
messages: IReceivedMessage[];
|
|
3909
|
-
count: number;
|
|
3910
|
-
}>>;
|
|
3911
|
-
getUnreadMentionedMessages(conversationType: ConversationType, targetId: string, channelId?: string): IReceivedMessage[];
|
|
3912
|
-
clearUnreadCountByTimestamp(conversationType: ConversationType, targetId: string, timestamp: number, channelId?: string): Promise<ErrorCode>;
|
|
3751
|
+
getConversationNotificationStatus(conversationType: ConversationType, targetId: string, channelId: string): IPromiseResult<NotificationStatus>;
|
|
3913
3752
|
/**
|
|
3914
|
-
*
|
|
3753
|
+
* 协议栈获取远端历史消息
|
|
3915
3754
|
*/
|
|
3916
|
-
|
|
3917
|
-
getRemoteHistoryMessages(conversationType: ConversationType, targetId: string, timestamp: number, count: number, order: 0 | 1, channelId: string): Promise<IAsyncRes<{
|
|
3755
|
+
getRemoteHistoryMessages(conversationType: ConversationType, targetId: string, timestamp: number, count: number, order: 0 | 1, channelId: string): IPromiseResult<{
|
|
3918
3756
|
list: IReceivedMessage[];
|
|
3919
3757
|
hasMore: boolean;
|
|
3920
|
-
}
|
|
3758
|
+
}>;
|
|
3921
3759
|
/**
|
|
3922
|
-
*
|
|
3923
|
-
* @param roomId
|
|
3924
|
-
* @param mode 房间模式:直播 or 会议
|
|
3925
|
-
* @param mediaType 直播房间模式下的媒体资源类型
|
|
3760
|
+
* 获取群组消息送达列表
|
|
3926
3761
|
*/
|
|
3927
|
-
|
|
3762
|
+
getGroupMessageDeliverList(targetId: string, messageUId: string, channelId: string): IPromiseResult<IGroupMessageDeliverInfo>;
|
|
3763
|
+
/**
|
|
3764
|
+
* 获取单聊消息送达详情
|
|
3765
|
+
*/
|
|
3766
|
+
getPrivateMessageDeliverTime(messageUId: string, channelId: string): IPromiseResult<number>;
|
|
3767
|
+
setCallInfo(targetId: string, key: string, value: string): IPromiseResult<{
|
|
3768
|
+
key: string;
|
|
3769
|
+
value: string;
|
|
3770
|
+
}>;
|
|
3771
|
+
joinRTCRoom(roomId: string, mode: RTCMode, broadcastType?: number): IPromiseResult<IJoinRTCRoomData>;
|
|
3928
3772
|
quitRTCRoom(roomId: string): Promise<ErrorCode>;
|
|
3929
|
-
rtcPing(roomId: string, mode: number,
|
|
3930
|
-
getRTCRoomInfo(roomId: string):
|
|
3931
|
-
getRTCUserInfoList(roomId: string):
|
|
3773
|
+
rtcPing(roomId: string, mode: number, broadcastType?: number): Promise<ErrorCode>;
|
|
3774
|
+
getRTCRoomInfo(roomId: string): IPromiseResult<IRTCRoomInfo>;
|
|
3775
|
+
getRTCUserInfoList(roomId: string): IPromiseResult<IRTCUsers>;
|
|
3932
3776
|
getRTCUserInfo(roomId: string): IPromiseResult<unknown>;
|
|
3933
3777
|
setRTCUserInfo(roomId: string, key: string, value: string): Promise<ErrorCode>;
|
|
3934
3778
|
removeRTCUserInfo(roomId: string, keys: string[]): Promise<ErrorCode>;
|
|
@@ -3936,447 +3780,723 @@ declare class APIContext {
|
|
|
3936
3780
|
name: string;
|
|
3937
3781
|
content: string;
|
|
3938
3782
|
}): Promise<ErrorCode>;
|
|
3783
|
+
/**
|
|
3784
|
+
* 全量订阅资源修改
|
|
3785
|
+
* @param roomId 房间 Id
|
|
3786
|
+
* @param message 向前兼容的消息内容
|
|
3787
|
+
* @param valueInfo 全量资源数据
|
|
3788
|
+
* @param objectName 全量 URI 消息名
|
|
3789
|
+
*/
|
|
3939
3790
|
setRTCTotalRes(roomId: string, message: {
|
|
3940
3791
|
name: string;
|
|
3941
3792
|
content: string;
|
|
3942
|
-
}, valueInfo: string, objectName: string, mcuValInfo
|
|
3943
|
-
|
|
3944
|
-
getRTCData(roomId: string, keys: string[], isInner: boolean, apiType: RTCApiType): Promise<IAsyncRes<KVString>>;
|
|
3793
|
+
}, valueInfo: string, objectName: string, mcuValInfo: string): Promise<ErrorCode>;
|
|
3794
|
+
getRTCData(roomId: string, keys: string[], isInner: boolean, apiType: RTCApiType): IPromiseResult<KVString>;
|
|
3945
3795
|
removeRTCData(roomId: string, keys: string[], isInner: boolean, apiType: RTCApiType, message?: {
|
|
3946
3796
|
name: string;
|
|
3947
3797
|
content: string;
|
|
3948
3798
|
}): Promise<ErrorCode>;
|
|
3949
3799
|
setRTCOutData(roomId: string, rtcData: unknown, type: number, message: unknown): Promise<ErrorCode>;
|
|
3950
3800
|
getRTCOutData(roomId: string, userIds: string[]): IPromiseResult<unknown>;
|
|
3951
|
-
getRTCToken(roomId: string, mode: number, broadcastType?: number):
|
|
3952
|
-
setRTCState(roomId: string,
|
|
3801
|
+
getRTCToken(roomId: string, mode: number, broadcastType?: number): IPromiseResult<IRtcTokenData>;
|
|
3802
|
+
setRTCState(roomId: string, reportId: string): Promise<ErrorCode>;
|
|
3953
3803
|
getRTCUserList(roomId: string): IPromiseResult<IRTCUsers>;
|
|
3804
|
+
setRTCCDNUris(roomId: string, objectName: string, CDNUris: string): Promise<ErrorCode>;
|
|
3805
|
+
}
|
|
3806
|
+
|
|
3807
|
+
interface IExpansionMsgContent {
|
|
3808
|
+
/**
|
|
3809
|
+
* 消息扩展的对象
|
|
3810
|
+
*/
|
|
3811
|
+
put?: {
|
|
3812
|
+
[key: string]: string;
|
|
3813
|
+
};
|
|
3814
|
+
/**
|
|
3815
|
+
* 删除的 keys
|
|
3816
|
+
*/
|
|
3817
|
+
del?: string[];
|
|
3818
|
+
/**
|
|
3819
|
+
* messageUId
|
|
3820
|
+
*/
|
|
3821
|
+
mid: string;
|
|
3822
|
+
/**
|
|
3823
|
+
* 是否删除所有, 有效值:0、1 . ( 后续如有需要, API Layer 层可使用)
|
|
3824
|
+
*/
|
|
3825
|
+
removeAll?: number;
|
|
3826
|
+
}
|
|
3827
|
+
|
|
3828
|
+
/**
|
|
3829
|
+
* 被拦截的消息信息
|
|
3830
|
+
*/
|
|
3831
|
+
interface IBlockedMessageInfo {
|
|
3832
|
+
blockedMessageUId: string;
|
|
3833
|
+
conversationType: number;
|
|
3834
|
+
targetId: string;
|
|
3835
|
+
channelId: string;
|
|
3836
|
+
blockType: MessageBlockType;
|
|
3837
|
+
}
|
|
3838
|
+
|
|
3839
|
+
interface IConnectResult {
|
|
3840
|
+
/**
|
|
3841
|
+
* 连接错误码
|
|
3842
|
+
*/
|
|
3843
|
+
code: ErrorCode;
|
|
3844
|
+
/**
|
|
3845
|
+
* 导航获取成功后即可有相应的值,在导航数据获取完成之前该值为 undefined
|
|
3846
|
+
*/
|
|
3847
|
+
userId?: string;
|
|
3848
|
+
}
|
|
3849
|
+
declare type IMessageListnenr = (message: IReceivedMessage, leftCount?: number, hasMore?: boolean) => void;
|
|
3850
|
+
declare type IConnectionStatusListener = (status: ConnectionStatus) => void;
|
|
3851
|
+
declare type IConversationStateListener = (conversation: IUpdatedConversation[]) => void;
|
|
3852
|
+
declare type IChatroomListener = (state: IChatroomListenerData) => void;
|
|
3853
|
+
declare type IRTCInnerListener = {
|
|
3854
|
+
message?: IMessageListnenr;
|
|
3855
|
+
status?: IConnectionStatusListener;
|
|
3856
|
+
};
|
|
3857
|
+
declare type IExpansionListener = (data: IExpansionListenerData) => void;
|
|
3858
|
+
declare type ITagListener = () => void;
|
|
3859
|
+
declare type IConversationTagListener = () => void;
|
|
3860
|
+
declare type ItypingStateListener = (data: ITypingMessage[]) => void;
|
|
3861
|
+
declare type IMessageDeliveredListener = (data: IMessageDeliver[]) => void;
|
|
3862
|
+
declare type IGroupMessageDeliveredStatusListener = (data: IGroupMessageDeliverStatus) => void;
|
|
3863
|
+
declare type IMessageBlockedListener = (data: IBlockedMessageInfo) => void;
|
|
3864
|
+
interface ISendExMsgOptions {
|
|
3865
|
+
channelId: string;
|
|
3866
|
+
conversationType: ConversationType;
|
|
3867
|
+
targetId: string;
|
|
3868
|
+
/**
|
|
3869
|
+
* 消息 ID
|
|
3870
|
+
*/
|
|
3871
|
+
messageUId: string;
|
|
3872
|
+
/**
|
|
3873
|
+
* 原始消息是否支持扩展的字段
|
|
3874
|
+
*/
|
|
3875
|
+
canIncludeExpansion: boolean;
|
|
3876
|
+
/**
|
|
3877
|
+
* 删除的 keys
|
|
3878
|
+
*/
|
|
3879
|
+
keys?: string[];
|
|
3880
|
+
/**
|
|
3881
|
+
* 扩展对象
|
|
3882
|
+
*/
|
|
3883
|
+
expansion?: {
|
|
3884
|
+
[key: string]: string;
|
|
3885
|
+
};
|
|
3886
|
+
/**
|
|
3887
|
+
* 是否删除所有扩展
|
|
3888
|
+
*/
|
|
3889
|
+
removeAll?: boolean;
|
|
3890
|
+
/**
|
|
3891
|
+
* 原始消息的扩展
|
|
3892
|
+
*/
|
|
3893
|
+
originExpansion?: {
|
|
3894
|
+
[key: string]: string;
|
|
3895
|
+
} | null;
|
|
3896
|
+
}
|
|
3897
|
+
interface IWatcher {
|
|
3898
|
+
message?: IMessageListnenr;
|
|
3899
|
+
connectionState?: IConnectionStatusListener;
|
|
3900
|
+
conversationState?: IConversationStateListener;
|
|
3901
|
+
chatroomState?: IChatroomListener;
|
|
3902
|
+
expansion?: IExpansionListener;
|
|
3903
|
+
/**
|
|
3904
|
+
* 为兼容老版本 RTCLib 与 CallLib 接收消息的方式,新版本消息走插件机制
|
|
3905
|
+
*/
|
|
3906
|
+
rtcInnerWatcher?: IRTCInnerListener;
|
|
3907
|
+
/**
|
|
3908
|
+
* 标签的增删改监听
|
|
3909
|
+
*/
|
|
3910
|
+
tag?: ITagListener;
|
|
3911
|
+
/**
|
|
3912
|
+
* 会话中标签状态变更监听
|
|
3913
|
+
*/
|
|
3914
|
+
conversationTagChanged?: IConversationTagListener;
|
|
3915
|
+
/**
|
|
3916
|
+
* 输入状态变更监听
|
|
3917
|
+
*/
|
|
3918
|
+
typingState?: ItypingStateListener;
|
|
3919
|
+
/**
|
|
3920
|
+
* 是否拉取完毕添加通知
|
|
3921
|
+
*/
|
|
3922
|
+
pullFinished?: ITagListener;
|
|
3923
|
+
/**
|
|
3924
|
+
* 单聊消息送达通知
|
|
3925
|
+
*/
|
|
3926
|
+
messageDelivered?: IMessageDeliveredListener;
|
|
3927
|
+
/**
|
|
3928
|
+
* 群聊消息送达状态通知
|
|
3929
|
+
*/
|
|
3930
|
+
groupMessageDeliveredStatus?: IGroupMessageDeliveredStatusListener;
|
|
3931
|
+
messageBlocked?: IMessageBlockedListener;
|
|
3932
|
+
}
|
|
3933
|
+
interface IPluginGenerator<API, InitOption> {
|
|
3934
|
+
/**
|
|
3935
|
+
* 只读插件标识
|
|
3936
|
+
*/
|
|
3937
|
+
readonly tag: string;
|
|
3938
|
+
/**
|
|
3939
|
+
* 版本号
|
|
3940
|
+
*/
|
|
3941
|
+
readonly version?: string;
|
|
3942
|
+
/**
|
|
3943
|
+
* 插件名称
|
|
3944
|
+
*/
|
|
3945
|
+
readonly name?: string;
|
|
3946
|
+
/**
|
|
3947
|
+
* 插件安装前的环境检测,通过返回 boolean 值确认插件是否可运行
|
|
3948
|
+
*/
|
|
3949
|
+
verify(runtime: IRuntime): boolean;
|
|
3950
|
+
/**
|
|
3951
|
+
* 插件初始化
|
|
3952
|
+
* @param context 插件调用上下文,用于实现插件的消息注册、消息首发等
|
|
3953
|
+
* @param runtime 运行时实例,用于标识最终的运行时平台
|
|
3954
|
+
* @param options 初始化参数
|
|
3955
|
+
*/
|
|
3956
|
+
setup(context: PluginContext, runtime: IRuntime, options: InitOption): API;
|
|
3957
|
+
}
|
|
3958
|
+
interface IAPIContextOption {
|
|
3959
|
+
/**
|
|
3960
|
+
* 应用 appkey
|
|
3961
|
+
*/
|
|
3962
|
+
appkey: string;
|
|
3963
|
+
/**
|
|
3964
|
+
* IMLib 版本号
|
|
3965
|
+
*/
|
|
3966
|
+
apiVersion: string;
|
|
3967
|
+
/**
|
|
3968
|
+
* 自定义导航地址:
|
|
3969
|
+
* 1. 私有云环境下该值为必填项
|
|
3970
|
+
* 2. 当存在自定义导航地址时,SDK 内部默认地址将无效
|
|
3971
|
+
* 3. 当存在自定义导航地址时,地址 url 中需包含 http/https 协议头,否则视为无效值
|
|
3972
|
+
* 4. 建立 ws/wss 连接前的 ping 接口使用的协议与导航 url 中的协议相同
|
|
3973
|
+
* 5. 建立 websocket 建立连接时将根据 ping 接口使用的 http/https 协议来确定使用 ws/wss 协议
|
|
3974
|
+
* 6. 动态导航使用的协议头将与自定义导航地址相同
|
|
3975
|
+
* 7. 公有云默认使用 https 协议
|
|
3976
|
+
*/
|
|
3977
|
+
navigators: string[];
|
|
3978
|
+
/**
|
|
3979
|
+
* (参数已废弃)~~c++ 协议栈数据库地址~~
|
|
3980
|
+
* @deprecated
|
|
3981
|
+
*/
|
|
3982
|
+
dbPath?: string;
|
|
3954
3983
|
/**
|
|
3955
|
-
*
|
|
3984
|
+
* 小程序的 CMP 代理地址
|
|
3956
3985
|
*/
|
|
3957
|
-
|
|
3958
|
-
token: string;
|
|
3959
|
-
kvEntries: IServerRTCRoomEntry[];
|
|
3960
|
-
}>>;
|
|
3986
|
+
miniCMPProxy: string[];
|
|
3961
3987
|
/**
|
|
3962
|
-
*
|
|
3988
|
+
* 指定默认使用的连接类型
|
|
3963
3989
|
*/
|
|
3964
|
-
|
|
3990
|
+
connectionType: 'websocket' | 'comet';
|
|
3965
3991
|
/**
|
|
3966
|
-
*
|
|
3992
|
+
* 修改 engine log 打印等级
|
|
3967
3993
|
*/
|
|
3968
|
-
|
|
3994
|
+
logLevel?: LogLevel;
|
|
3969
3995
|
/**
|
|
3970
|
-
*
|
|
3996
|
+
* 修改默认的 log 输出函数
|
|
3971
3997
|
*/
|
|
3972
|
-
|
|
3973
|
-
}
|
|
3974
|
-
|
|
3975
|
-
/**
|
|
3976
|
-
* engine 基本接口定义,用于约束 Electron 下主进程、渲染进程、JSEngine 的编码一致性
|
|
3977
|
-
*/
|
|
3978
|
-
interface IEngine {
|
|
3998
|
+
logStdout?: (logLevel: LogLevel, content: string) => void;
|
|
3979
3999
|
/**
|
|
3980
|
-
*
|
|
3981
|
-
* @
|
|
3982
|
-
* @param naviInfo
|
|
4000
|
+
* (已废弃)私有云标识
|
|
4001
|
+
* @deprecated
|
|
3983
4002
|
*/
|
|
3984
|
-
|
|
4003
|
+
isEnterPrise?: boolean;
|
|
3985
4004
|
/**
|
|
3986
|
-
*
|
|
3987
|
-
* @param version
|
|
4005
|
+
* typing状态过期时间
|
|
3988
4006
|
*/
|
|
3989
|
-
|
|
3990
|
-
[name: string]: string;
|
|
3991
|
-
}): void;
|
|
4007
|
+
typingExpireTime?: number;
|
|
3992
4008
|
/**
|
|
3993
|
-
*
|
|
4009
|
+
* 是否打开 IndexDB 存储,默认为 true
|
|
3994
4010
|
*/
|
|
3995
|
-
|
|
4011
|
+
indexDBSwitch?: boolean;
|
|
3996
4012
|
/**
|
|
3997
|
-
*
|
|
3998
|
-
* 对于未实现的方法,接口响应 Unsupport 错误码
|
|
3999
|
-
* @param method
|
|
4000
|
-
* @param args
|
|
4013
|
+
* 是否校验证书,默认为 true
|
|
4001
4014
|
*/
|
|
4002
|
-
|
|
4015
|
+
checkCA?: boolean;
|
|
4016
|
+
}
|
|
4017
|
+
declare class APIContext {
|
|
4018
|
+
private _runtime;
|
|
4019
|
+
private static _context?;
|
|
4020
|
+
static init(runtime: IRuntime, options: IAPIContextOption): APIContext;
|
|
4021
|
+
static destroy(): void;
|
|
4022
|
+
private _token;
|
|
4003
4023
|
/**
|
|
4004
|
-
*
|
|
4005
|
-
* @param conversationType
|
|
4006
|
-
* @param targetId
|
|
4007
|
-
* @param timestamp
|
|
4008
|
-
* @param count
|
|
4009
|
-
* @param order
|
|
4024
|
+
* 插件队列,用于逐一派发消息与信令
|
|
4010
4025
|
*/
|
|
4011
|
-
|
|
4026
|
+
private _pluginContextQueue;
|
|
4012
4027
|
/**
|
|
4013
|
-
*
|
|
4028
|
+
* 插件实例Map,用于重复初始化时返回实例
|
|
4014
4029
|
*/
|
|
4015
|
-
|
|
4030
|
+
private _pluginInstanseMap;
|
|
4031
|
+
private readonly _engine;
|
|
4016
4032
|
/**
|
|
4017
|
-
*
|
|
4033
|
+
* 核心库版本号,后期与 4.0 IM SDK 版本号保持一致
|
|
4018
4034
|
*/
|
|
4019
|
-
|
|
4035
|
+
readonly coreVersion: string;
|
|
4036
|
+
readonly appkey: string;
|
|
4037
|
+
readonly apiVersion: string;
|
|
4038
|
+
private readonly _options;
|
|
4039
|
+
private _versionInfo;
|
|
4040
|
+
private _typingInfo;
|
|
4020
4041
|
/**
|
|
4021
|
-
*
|
|
4022
|
-
* 1. `0` 表示升序,获取消息发送时间比传入 `sentTime` 小 的消息
|
|
4023
|
-
* 2. `1` 表示降序,获取消息发送时间比传入 `sentTime` 大 的消息
|
|
4042
|
+
* 内部连接状态标识,为 ture 时不允许调用 reconnect 方法
|
|
4024
4043
|
*/
|
|
4025
|
-
|
|
4044
|
+
private _isInternalConnected;
|
|
4045
|
+
constructor(_runtime: IRuntime, options: IAPIContextOption);
|
|
4026
4046
|
/**
|
|
4027
|
-
*
|
|
4028
|
-
|
|
4029
|
-
|
|
4047
|
+
* 安装使用插件,并初始化插件实例
|
|
4048
|
+
* @param plugin
|
|
4049
|
+
* @param options
|
|
4050
|
+
*/
|
|
4051
|
+
install<T, O>(plugin: IPluginGenerator<T, O>, options: O): T | null;
|
|
4052
|
+
private _connectionStatus;
|
|
4053
|
+
private _canRedirectConnect;
|
|
4030
4054
|
/**
|
|
4031
|
-
*
|
|
4055
|
+
* 重定向后,递归调用 connect
|
|
4032
4056
|
*/
|
|
4033
|
-
|
|
4034
|
-
list: IReceivedMessage[];
|
|
4035
|
-
hasMore: boolean;
|
|
4036
|
-
}>;
|
|
4057
|
+
private _handleRedirect;
|
|
4037
4058
|
/**
|
|
4038
|
-
*
|
|
4039
|
-
|
|
4040
|
-
|
|
4059
|
+
* 连接状态变更回调
|
|
4060
|
+
* @param message
|
|
4061
|
+
*/
|
|
4062
|
+
private _connectionStatusListener;
|
|
4063
|
+
private _messageReceiver;
|
|
4041
4064
|
/**
|
|
4042
|
-
*
|
|
4043
|
-
* message 中 messageUId、setTime、messageDirection 为必须参数
|
|
4065
|
+
* 聊天室相关信息监听
|
|
4044
4066
|
*/
|
|
4045
|
-
|
|
4046
|
-
messageUId: string;
|
|
4047
|
-
sentTime: number;
|
|
4048
|
-
messageDirection: MessageDirection;
|
|
4049
|
-
}[],
|
|
4067
|
+
private _chatroomInfoListener;
|
|
4050
4068
|
/**
|
|
4051
|
-
*
|
|
4069
|
+
* 会话监听相关
|
|
4052
4070
|
*/
|
|
4053
|
-
|
|
4054
|
-
recallMsg(conversationType: ConversationType, targetId: string, messageUId: string, sentTime: number, recallMsgOptions: IRecallMsgOptions): IPromiseResult<IReceivedMessage>;
|
|
4071
|
+
private _conversationInfoListener;
|
|
4055
4072
|
/**
|
|
4056
|
-
*
|
|
4057
|
-
* @param timestamp 小于等于传入时间戳的消息均删除
|
|
4073
|
+
* 消息扩展监听相关
|
|
4058
4074
|
*/
|
|
4059
|
-
|
|
4075
|
+
private _expansionInfoListener;
|
|
4060
4076
|
/**
|
|
4061
|
-
*
|
|
4062
|
-
|
|
4063
|
-
|
|
4077
|
+
* 标签增删改监听
|
|
4078
|
+
*/
|
|
4079
|
+
private _tagListener;
|
|
4064
4080
|
/**
|
|
4065
|
-
*
|
|
4066
|
-
* @param count 指定获取数量, 不传则获取全部会话列表,默认 `300`
|
|
4081
|
+
* 会话标签状态监听
|
|
4067
4082
|
*/
|
|
4068
|
-
|
|
4083
|
+
private _conversationTagListener;
|
|
4084
|
+
private _typingStatusListener;
|
|
4085
|
+
private _pullFinishedListener;
|
|
4086
|
+
private _messageDeliveredListerer;
|
|
4087
|
+
private _groupMessageDeliveredStatusListerer;
|
|
4088
|
+
private _MessageBlockedListener;
|
|
4089
|
+
private _callInfoListener;
|
|
4069
4090
|
/**
|
|
4070
|
-
*
|
|
4091
|
+
* rtc 数据变更通知 pluginContext
|
|
4071
4092
|
*/
|
|
4072
|
-
|
|
4093
|
+
private _rtcDataChange;
|
|
4073
4094
|
/**
|
|
4074
|
-
*
|
|
4075
|
-
* @todo 待确认是否生效
|
|
4095
|
+
* 业务层事件监听器挂载点
|
|
4076
4096
|
*/
|
|
4077
|
-
|
|
4097
|
+
private _watcher;
|
|
4078
4098
|
/**
|
|
4079
|
-
*
|
|
4080
|
-
|
|
4081
|
-
|
|
4099
|
+
* 添加事件监听
|
|
4100
|
+
* @param options
|
|
4101
|
+
*/
|
|
4102
|
+
assignWatcher(watcher: IWatcher): void;
|
|
4082
4103
|
/**
|
|
4083
|
-
*
|
|
4084
|
-
|
|
4085
|
-
|
|
4104
|
+
* 向内存中添加 typing 信息
|
|
4105
|
+
* 添加 typing 时不触发通知,只有在轮询时间点校验 _typingChangedList 的长度大于 0 时才通知
|
|
4106
|
+
*/
|
|
4107
|
+
private _addTypingInfo;
|
|
4108
|
+
private _typingInternalTimer;
|
|
4109
|
+
private _typingExpireTime;
|
|
4110
|
+
private _typingChangedList;
|
|
4086
4111
|
/**
|
|
4087
|
-
*
|
|
4088
|
-
|
|
4089
|
-
|
|
4112
|
+
* 启动定时移除typing
|
|
4113
|
+
*/
|
|
4114
|
+
private _startCheckTypingInfo;
|
|
4115
|
+
getConnectedTime(): number;
|
|
4116
|
+
getServerTime(): number;
|
|
4117
|
+
getDeviceId(): string;
|
|
4118
|
+
getCurrentUserId(): string;
|
|
4119
|
+
getConnectionStatus(): ConnectionStatus;
|
|
4090
4120
|
/**
|
|
4091
|
-
*
|
|
4092
|
-
|
|
4093
|
-
|
|
4121
|
+
* 建立连接,连接失败则抛出异常,连接成功后返回用户 userId,否则返回相应的错误码
|
|
4122
|
+
* @param token
|
|
4123
|
+
* @param refreshNavi 是否需要重新请求导航,当值为 `false` 时,优先使用有效缓存导航,若缓存失效则重新获取导航
|
|
4124
|
+
* @param reconnectKickEnable 设置断线重连时是否踢出当前正在重连的设备 (仅 Electron 环境有效)
|
|
4125
|
+
* 同一个账号在一台新设备上登录的时候,会把这个账号在之前登录的设备上踢出。
|
|
4126
|
+
由于 SDK 有断线重连功能,存在下面情况。
|
|
4127
|
+
用户在 A 设备登录,A 设备网络不稳定,没有连接成功,SDK 启动重连机制。
|
|
4128
|
+
用户此时又在 B 设备登录,B 设备连接成功。
|
|
4129
|
+
A 设备网络稳定之后,用户在 A 设备连接成功,B 设备被踢出。
|
|
4130
|
+
这个字段就是为这种情况加的。
|
|
4131
|
+
设置 reconnectKickEnable 为 true 时,SDK 重连的时候发现此时已有别的设备连接成功,不再强行踢出已有设备,而是踢出重连设备。
|
|
4132
|
+
*/
|
|
4133
|
+
connect(token: string, refreshNavi?: boolean, reconnectKickEnable?: boolean): Promise<IConnectResult>;
|
|
4094
4134
|
/**
|
|
4095
|
-
*
|
|
4096
|
-
|
|
4135
|
+
* 拉取实时配置 web 端需更新 voipCall 字段
|
|
4136
|
+
*/
|
|
4137
|
+
private _pullUserSettings;
|
|
4138
|
+
disconnect(): Promise<void>;
|
|
4139
|
+
reconnect(reconnectKickEnable?: boolean): Promise<IConnectResult>;
|
|
4140
|
+
private _getTokenWithoutNavi;
|
|
4141
|
+
/**
|
|
4142
|
+
* 获取当前缓存的导航数据
|
|
4143
|
+
*/
|
|
4144
|
+
getInfoFromCache(): INaviInfo | null;
|
|
4145
|
+
/**
|
|
4146
|
+
* 消息注册
|
|
4147
|
+
* @description 消息注册需在应用初始化完成前进行
|
|
4148
|
+
* @param objectName 消息类型,如:RC:TxtMsg
|
|
4149
|
+
* @param isPersited 是否存储
|
|
4150
|
+
* @param isCounted 是否技术
|
|
4151
|
+
* @param searchProps 搜索字段,只在搭配协议栈使用时有效
|
|
4152
|
+
*/
|
|
4153
|
+
registerMessageType(objectName: string, isPersited: boolean, isCounted: boolean, searchProps?: string[]): void;
|
|
4154
|
+
/**
|
|
4155
|
+
* 发送消息
|
|
4097
4156
|
* @param conversationType
|
|
4098
4157
|
* @param targetId
|
|
4158
|
+
* @param objectName
|
|
4159
|
+
* @param content
|
|
4160
|
+
* @param options
|
|
4099
4161
|
*/
|
|
4100
|
-
|
|
4162
|
+
sendMessage(conversationType: ConversationType, targetId: string, options: ISendMsgOptions, onBefore?: (messageId: number) => void): Promise<IAsyncRes<IReceivedMessage>>;
|
|
4101
4163
|
/**
|
|
4102
|
-
*
|
|
4103
|
-
* @param
|
|
4104
|
-
* @param
|
|
4105
|
-
* @param
|
|
4164
|
+
* 发送扩展消息
|
|
4165
|
+
* @param messageUId 消息 Id
|
|
4166
|
+
* @param keys 需要删除的 key
|
|
4167
|
+
* @param expansion 设置的扩展
|
|
4168
|
+
*/
|
|
4169
|
+
sendExpansionMessage(options: ISendExMsgOptions): Promise<IAsyncRes<ErrorCode>>;
|
|
4170
|
+
/**
|
|
4171
|
+
* 发送群组消息已读回执
|
|
4172
|
+
* 导航下发已读回执开关为 true 时调用
|
|
4173
|
+
* @param targetId 群组会话id
|
|
4174
|
+
* @param messageUIds 消息id
|
|
4106
4175
|
*/
|
|
4107
|
-
|
|
4176
|
+
sendReadReceiptMessage(targetId: string, messageUIds: string[], channelId?: string): Promise<IAsyncRes>;
|
|
4108
4177
|
/**
|
|
4109
|
-
*
|
|
4178
|
+
* 获取群组消息已读列表
|
|
4179
|
+
* @param targetId
|
|
4180
|
+
* @param messageUIds
|
|
4110
4181
|
*/
|
|
4111
|
-
|
|
4182
|
+
getMessageReader(targetId: string, messageUId: string, channelId?: string): Promise<IAsyncRes<IMessageReaderResponse>>;
|
|
4183
|
+
/**
|
|
4184
|
+
* 反初始化,清空所有监听及计时器
|
|
4185
|
+
*/
|
|
4186
|
+
private _destroy;
|
|
4187
|
+
/**
|
|
4188
|
+
* @param conversationType
|
|
4189
|
+
* @param targetId 会话 Id
|
|
4190
|
+
* @param timestamp 拉取时间戳
|
|
4191
|
+
* @param count 拉取条数
|
|
4192
|
+
* @param order 1 正序拉取,0 为倒序拉取
|
|
4193
|
+
* @param channelId
|
|
4194
|
+
* @param objectName
|
|
4195
|
+
*/
|
|
4196
|
+
getHistoryMessage(conversationType: ConversationType, targetId: string, timestamp?: number, count?: number, order?: 0 | 1, channelId?: string, objectName?: string): Promise<IAsyncRes<{
|
|
4197
|
+
list: IReceivedMessage[];
|
|
4198
|
+
hasMore: boolean;
|
|
4199
|
+
}>>;
|
|
4112
4200
|
/**
|
|
4113
|
-
*
|
|
4201
|
+
* 获取会话列表
|
|
4202
|
+
* @param count 指定获取数量, 不传则获取全部会话列表,默认 `300`
|
|
4114
4203
|
*/
|
|
4115
|
-
|
|
4204
|
+
getConversationList(count?: number, conversationType?: ConversationType, startTime?: number, order?: 0 | 1, channelId?: string): Promise<IAsyncRes<IReceivedConversation[]>>;
|
|
4116
4205
|
/**
|
|
4117
|
-
*
|
|
4206
|
+
* 获取单一会话数据
|
|
4207
|
+
* @param conversationType
|
|
4208
|
+
* @param targetId
|
|
4209
|
+
* @param channelId
|
|
4118
4210
|
*/
|
|
4119
|
-
|
|
4211
|
+
getConversation(conversationType: ConversationType, targetId: string, channelId: string): IPromiseResult<IReceivedConversation | null>;
|
|
4120
4212
|
/**
|
|
4121
|
-
*
|
|
4122
|
-
* @draft 草稿内容
|
|
4213
|
+
* 删除会话
|
|
4123
4214
|
*/
|
|
4124
|
-
|
|
4215
|
+
removeConversation(conversationType: ConversationType, targetId: string, channelId?: string): Promise<ErrorCode>;
|
|
4125
4216
|
/**
|
|
4126
|
-
*
|
|
4217
|
+
* 清除会话消息未读数
|
|
4127
4218
|
*/
|
|
4128
|
-
|
|
4219
|
+
clearUnreadCount(conversationType: ConversationType, targetId: string, channelId?: string): Promise<ErrorCode>;
|
|
4129
4220
|
/**
|
|
4130
|
-
*
|
|
4221
|
+
* 清除全部会话消息未读数
|
|
4131
4222
|
*/
|
|
4132
|
-
|
|
4223
|
+
clearAllUnreadCount(): Promise<ErrorCode>;
|
|
4133
4224
|
/**
|
|
4134
|
-
*
|
|
4225
|
+
* 获取指定会话消息未读数
|
|
4135
4226
|
*/
|
|
4136
|
-
|
|
4227
|
+
getUnreadCount(conversationType: ConversationType, targetId: string, channelId?: string): Promise<IAsyncRes<number>>;
|
|
4137
4228
|
/**
|
|
4138
|
-
*
|
|
4229
|
+
* 获取所有会话未读数
|
|
4230
|
+
* @param channelId 多组织 Id
|
|
4231
|
+
* @param conversationTypes
|
|
4232
|
+
* @param includeMuted 包含已设置免打扰的会话
|
|
4139
4233
|
*/
|
|
4140
|
-
|
|
4141
|
-
sendMessage(conversationType: ConversationType, targetId: string, options: ISendMsgOptions, onBefore?: (messageId: number) => void): IPromiseResult<IReceivedMessage>;
|
|
4234
|
+
getTotalUnreadCount(channelId: string, conversationTypes?: ConversationType[], includeMuted?: boolean): Promise<IAsyncRes<number>>;
|
|
4142
4235
|
/**
|
|
4143
|
-
*
|
|
4236
|
+
* 获取第一个未读消息
|
|
4144
4237
|
*/
|
|
4145
|
-
|
|
4238
|
+
getFirstUnreadMessage(conversationType: ConversationType, targetId: string, channelId?: string): Promise<IAsyncRes<IReceivedMessage | null>>;
|
|
4239
|
+
setConversationStatus(conversationType: ConversationType, targetId: string, isTop?: boolean, notificationStatus?: 1 | 2, channelId?: string): Promise<ErrorCode>;
|
|
4240
|
+
saveConversationMessageDraft(conversationType: ConversationType, targetId: string, draft: string): Promise<ErrorCode>;
|
|
4241
|
+
getConversationMessageDraft(conversationType: ConversationType, targetId: string): Promise<IAsyncRes<string>>;
|
|
4242
|
+
clearConversationMessageDraft(conversationType: ConversationType, targetId: string): Promise<ErrorCode>;
|
|
4243
|
+
recallMessage(conversationType: ConversationType, targetId: string, messageUId: string, sentTime: number, recallMsgOptions: IRecallMsgOptions): Promise<IAsyncRes<IReceivedMessage>>;
|
|
4146
4244
|
/**
|
|
4147
|
-
*
|
|
4245
|
+
* 删除远端消息
|
|
4246
|
+
* @param conversationType
|
|
4247
|
+
* @param targetId
|
|
4248
|
+
* @param list
|
|
4148
4249
|
*/
|
|
4149
|
-
|
|
4250
|
+
deleteRemoteMessage(conversationType: ConversationType, targetId: string, list: {
|
|
4251
|
+
messageUId: string;
|
|
4252
|
+
sentTime: number;
|
|
4253
|
+
messageDirection: MessageDirection;
|
|
4254
|
+
}[], channelId?: string): Promise<ErrorCode>;
|
|
4150
4255
|
/**
|
|
4151
|
-
*
|
|
4152
|
-
* @
|
|
4153
|
-
*
|
|
4154
|
-
*
|
|
4155
|
-
* @param objectName 消息类型,如:RC:TxtMsg
|
|
4156
|
-
* @param isPersited 是否存储
|
|
4157
|
-
* @param isCounted 是否技术
|
|
4158
|
-
* @param searchProps 搜索字段,只在搭配协议栈使用时有效
|
|
4256
|
+
* 根据时间戳删除指定时间之前的
|
|
4257
|
+
* @param conversationType
|
|
4258
|
+
* @param targetId
|
|
4259
|
+
* @param timestamp
|
|
4159
4260
|
*/
|
|
4160
|
-
|
|
4261
|
+
deleteRemoteMessageByTimestamp(conversationType: ConversationType, targetId: string, timestamp: number, channelId?: string): Promise<ErrorCode>;
|
|
4161
4262
|
/**
|
|
4162
|
-
*
|
|
4163
|
-
* @param
|
|
4164
|
-
|
|
4165
|
-
|
|
4263
|
+
* 加入聊天室,若聊天室不存在则创建聊天室
|
|
4264
|
+
* @param roomId 聊天室房间 Id
|
|
4265
|
+
* @param count 进入聊天室成功后,自动拉取的历史消息数量,默认值为 `10`,最大有效值为 `50`,`-1` 为不拉取
|
|
4266
|
+
*/
|
|
4267
|
+
joinChatroom(roomId: string, count?: number): Promise<ErrorCode>;
|
|
4166
4268
|
/**
|
|
4167
|
-
*
|
|
4168
|
-
* @param
|
|
4169
|
-
|
|
4170
|
-
|
|
4269
|
+
* 加入聊天室,若聊天室不存在则抛出异常
|
|
4270
|
+
* @param roomId 聊天室房间 Id
|
|
4271
|
+
* @param count 进入聊天室成功后,自动拉取的历史消息数量,默认值为 `10`,最大有效值为 `50`,`-1` 为不拉取
|
|
4272
|
+
*/
|
|
4273
|
+
joinExistChatroom(roomId: string, count?: number): Promise<ErrorCode>;
|
|
4171
4274
|
/**
|
|
4172
4275
|
* 退出聊天室
|
|
4173
|
-
|
|
4174
|
-
|
|
4175
|
-
|
|
4176
|
-
* 获取聊天室信息
|
|
4177
|
-
* @param count 获取人数, 范围 0 - 20
|
|
4178
|
-
* @param order 排序方式, 1 正序, 2 倒序
|
|
4179
|
-
*/
|
|
4180
|
-
getChatroomInfo(chatroomId: string, count: number, order: number): IPromiseResult<IChatroomInfo>;
|
|
4181
|
-
/**
|
|
4182
|
-
* 获取聊天室历史消息
|
|
4183
|
-
*/
|
|
4184
|
-
getChatroomHistoryMessages(chatroomId: string, timestamp: number, count: number, order: number): IPromiseResult<{
|
|
4185
|
-
list: IReceivedMessage[];
|
|
4186
|
-
hasMore: boolean;
|
|
4187
|
-
}>;
|
|
4276
|
+
* @param roomId
|
|
4277
|
+
*/
|
|
4278
|
+
quitChatroom(roomId: string): Promise<ErrorCode>;
|
|
4188
4279
|
/**
|
|
4189
|
-
*
|
|
4190
|
-
|
|
4191
|
-
|
|
4280
|
+
* 获取聊天室房间数据
|
|
4281
|
+
* @description count 或 order 有一个为 0 时,只返回成员总数,不返回成员列表信息
|
|
4282
|
+
* @param roomId 聊天室 Id
|
|
4283
|
+
* @param count 获取房间人员列表数量,最大有效值 `20`,最小值未 `0`,默认为 0
|
|
4284
|
+
* @param order 人员排序方式,`1` 为正序,`2` 为倒序,默认为 0
|
|
4285
|
+
*/
|
|
4286
|
+
getChatroomInfo(roomId: string, count?: number, order?: 0 | 1 | 2): Promise<IAsyncRes<IChatroomInfo>>;
|
|
4192
4287
|
/**
|
|
4193
|
-
*
|
|
4288
|
+
* 在指定聊天室中设置自定义属性
|
|
4289
|
+
* @description 仅聊天室中不存在此属性或属性设置者为己方时可设置成功
|
|
4290
|
+
* @param roomId 聊天室房间 id
|
|
4291
|
+
* @param entry 属性信息
|
|
4194
4292
|
*/
|
|
4195
|
-
|
|
4293
|
+
setChatroomEntry(roomId: string, entry: IChatroomEntry): Promise<ErrorCode>;
|
|
4294
|
+
setChatroomEntries(roomId: string, entryOptions: IChatroomEntries): Promise<{
|
|
4196
4295
|
code: ErrorCode;
|
|
4197
4296
|
data?: any;
|
|
4198
4297
|
}>;
|
|
4199
4298
|
/**
|
|
4200
|
-
*
|
|
4201
|
-
|
|
4202
|
-
|
|
4299
|
+
* 在指定聊天室中强制增加 / 修改任意聊天室属性
|
|
4300
|
+
* @description 仅聊天室中不存在此属性或属性设置者为己方时可设置成功
|
|
4301
|
+
* @param roomId 聊天室房间 id
|
|
4302
|
+
* @param entry 属性信息
|
|
4303
|
+
*/
|
|
4304
|
+
forceSetChatroomEntry(roomId: string, entry: IChatroomEntry): Promise<ErrorCode>;
|
|
4203
4305
|
/**
|
|
4204
4306
|
* 删除聊天室属性
|
|
4205
|
-
|
|
4206
|
-
|
|
4307
|
+
* @description 该方法仅限于删除自己设置的聊天室属性
|
|
4308
|
+
* @param roomId 聊天室房间 id
|
|
4309
|
+
* @param entry 要移除的属性信息
|
|
4310
|
+
*/
|
|
4311
|
+
removeChatroomEntry(roomId: string, entry: IRemoveChatRoomEntryOption): Promise<ErrorCode>;
|
|
4207
4312
|
/**
|
|
4208
4313
|
* 批量删除聊天室属性
|
|
4314
|
+
* @description 该方法仅限于删除自己设置的聊天室属性
|
|
4315
|
+
* @param roomId 聊天室房间 id
|
|
4316
|
+
* @param entry 要移除的属性信息
|
|
4209
4317
|
*/
|
|
4210
|
-
removeChatroomEntries(
|
|
4318
|
+
removeChatroomEntries(roomId: string, entryOptions: IRemoveChatRoomEntriesOption): Promise<{
|
|
4211
4319
|
code: ErrorCode;
|
|
4212
4320
|
data?: any;
|
|
4213
4321
|
}>;
|
|
4214
4322
|
/**
|
|
4215
|
-
*
|
|
4216
|
-
|
|
4217
|
-
|
|
4323
|
+
* 强制删除任意聊天室属性
|
|
4324
|
+
* @description 该方法仅限于删除自己设置的聊天室属性
|
|
4325
|
+
* @param roomId 聊天室房间 id
|
|
4326
|
+
* @param entry 要移除的属性信息
|
|
4327
|
+
*/
|
|
4328
|
+
forceRemoveChatroomEntry(roomId: string, entry: IRemoveChatRoomEntryOption): Promise<ErrorCode>;
|
|
4218
4329
|
/**
|
|
4219
|
-
|
|
4220
|
-
|
|
4221
|
-
|
|
4330
|
+
* 获取聊天室中的指定属性
|
|
4331
|
+
* @param roomId 聊天室房间 id
|
|
4332
|
+
* @param key 属性键名
|
|
4333
|
+
*/
|
|
4334
|
+
getChatroomEntry(roomId: string, key: string): Promise<IAsyncRes<string | null>>;
|
|
4222
4335
|
/**
|
|
4223
|
-
|
|
4224
|
-
|
|
4225
|
-
|
|
4336
|
+
* 获取聊天室内的所有属性
|
|
4337
|
+
* @param roomId 聊天室房间 id
|
|
4338
|
+
*/
|
|
4339
|
+
getAllChatroomEntries(roomId: string): Promise<IAsyncRes<{
|
|
4226
4340
|
[key: string]: string;
|
|
4227
|
-
}
|
|
4341
|
+
}>>;
|
|
4228
4342
|
/**
|
|
4229
|
-
*
|
|
4343
|
+
* 拉取聊天室内的历史消息
|
|
4344
|
+
* @param roomId
|
|
4345
|
+
* @param count 拉取消息条数, 有效值范围 `1 - 20`
|
|
4346
|
+
* @param order 获取顺序,默认值为 0。
|
|
4347
|
+
* * 0:降序,用于获取早于指定时间戳发送的消息
|
|
4348
|
+
* * 1:升序,用于获取晚于指定时间戳发送的消息
|
|
4349
|
+
* @param timestamp 指定拉取消息用到的时间戳。默认值为 `0`,表示按当前时间拉取
|
|
4350
|
+
*/
|
|
4351
|
+
getChatRoomHistoryMessages(roomId: string, count?: number, order?: 0 | 1, timestamp?: number): Promise<IAsyncRes<{
|
|
4352
|
+
list: IReceivedMessage[];
|
|
4353
|
+
hasMore: boolean;
|
|
4354
|
+
}>>;
|
|
4355
|
+
/**
|
|
4356
|
+
* 获取存储服务鉴权信息
|
|
4357
|
+
* @param fileType 文件类型
|
|
4358
|
+
* @param fileName 文件名称
|
|
4359
|
+
* @param httpMethod STC 分段上传时的必填参数,有效值为 PUT | POST
|
|
4360
|
+
* @param queryString STC 分段上传时的查询字符串
|
|
4230
4361
|
* @description
|
|
4231
|
-
*
|
|
4232
|
-
|
|
4233
|
-
|
|
4362
|
+
* `httpMethod` 与 `queryString` 为 STC S3 分段上传时的专属参数,STC 分段上传包含三个过程:
|
|
4363
|
+
* 1. 开始分段前调用,此时 `httpMethod` 值应为 `POST`, `queryString` 值为 `uploads`
|
|
4364
|
+
* 2. 上传请求前调用,此时 `httpMethod` 值应为 `PUT`,`queryString` 值为 `partNumber={partamNumer}&uploadId={uploadId}`
|
|
4365
|
+
* 3. 上传结束前调用,此时 `httpMethod` 值应为 `POST`,`queryString` 值为 `uploadId={uploadId}`
|
|
4366
|
+
* @returns
|
|
4367
|
+
*/
|
|
4368
|
+
getFileToken(fileType: FileType, fileName?: string, httpMethod?: 'POST' | 'PUT', queryString?: string): Promise<IUploadAuth & {
|
|
4369
|
+
bos: string;
|
|
4370
|
+
qiniu: string;
|
|
4371
|
+
}>;
|
|
4234
4372
|
/**
|
|
4235
|
-
*
|
|
4373
|
+
* 获取 七牛、百度、阿里云 上传成功可下载的 URL
|
|
4374
|
+
* @param fileType 文件类型
|
|
4375
|
+
* @param fileName 文件名
|
|
4376
|
+
* @param saveName 下载后的存储文件名
|
|
4377
|
+
* @param uploadRes 插件上传返回的结果。降级百度上传后,用户传入返回结果,再把结果里的下载地址返回给用户,保证兼容之前结果获取
|
|
4378
|
+
* @param serverType 使用的存储服务标识
|
|
4236
4379
|
*/
|
|
4237
|
-
getFileUrl(fileType: FileType,
|
|
4380
|
+
getFileUrl(fileType: FileType, fileName?: string, saveName?: string, uploadRes?: {
|
|
4381
|
+
isBosRes: boolean;
|
|
4382
|
+
downloadUrl: string;
|
|
4383
|
+
}, serverType?: UploadMethod): Promise<{
|
|
4238
4384
|
downloadUrl: string;
|
|
4239
4385
|
}>;
|
|
4240
4386
|
/**
|
|
4241
4387
|
* 创建标签
|
|
4242
4388
|
* @param tag 标签
|
|
4243
|
-
|
|
4244
|
-
createTag(tag: ITagParam):
|
|
4389
|
+
*/
|
|
4390
|
+
createTag(tag: ITagParam): Promise<IAsyncRes>;
|
|
4245
4391
|
/**
|
|
4246
4392
|
* 删除标签
|
|
4247
4393
|
* @param tagId 标签id
|
|
4248
|
-
|
|
4249
|
-
removeTag(tagId: string):
|
|
4394
|
+
*/
|
|
4395
|
+
removeTag(tagId: string): Promise<IAsyncRes>;
|
|
4250
4396
|
/**
|
|
4251
|
-
*
|
|
4397
|
+
* 更新标签
|
|
4252
4398
|
* @param tag 标签
|
|
4253
|
-
|
|
4254
|
-
updateTag(tag: ITagParam):
|
|
4399
|
+
*/
|
|
4400
|
+
updateTag(tag: ITagParam): Promise<IAsyncRes>;
|
|
4255
4401
|
/**
|
|
4256
4402
|
* 获取标签列表
|
|
4257
4403
|
*/
|
|
4258
|
-
getTagList():
|
|
4404
|
+
getTagList(): Promise<IAsyncRes<Array<ITagInfo>>>;
|
|
4259
4405
|
/**
|
|
4260
4406
|
* 添加会话到标签(给多个会话增加标签)
|
|
4261
4407
|
* @param tagId 标签id
|
|
4262
4408
|
* @param conversations 要添加的会话列表
|
|
4263
4409
|
*/
|
|
4264
|
-
addTagForConversations(tagId: string, conversations: IConversationOption[]):
|
|
4410
|
+
addTagForConversations(tagId: string, conversations: IConversationOption[]): Promise<IAsyncRes<IAsyncRes>>;
|
|
4265
4411
|
/**
|
|
4266
4412
|
* 删除标签中的会话(从多个会话中批量删除指定标签)
|
|
4267
4413
|
* @param tagId 标签id
|
|
4268
4414
|
* @param conversations 要删除的会话列表
|
|
4269
4415
|
*/
|
|
4270
|
-
removeTagForConversations(tagId: string, conversations: IConversationOption[]):
|
|
4416
|
+
removeTagForConversations(tagId: string, conversations: IConversationOption[]): Promise<IAsyncRes<IAsyncRes>>;
|
|
4271
4417
|
/**
|
|
4272
4418
|
* 删除会话中的标签(从单一会话中批量删除标签)
|
|
4273
4419
|
* @param conversationType 会话类型
|
|
4274
4420
|
* @param targetId 会话id
|
|
4275
4421
|
* @param tagIds 要删除的标签列表
|
|
4276
4422
|
*/
|
|
4277
|
-
removeTagsForConversation(conversation: IConversationOption, tagIds: string[]):
|
|
4423
|
+
removeTagsForConversation(conversation: IConversationOption, tagIds: string[]): Promise<IAsyncRes<IAsyncRes>>;
|
|
4278
4424
|
/**
|
|
4279
4425
|
* 获取标签下的会话列表
|
|
4280
4426
|
* @param tagId 标签id
|
|
4281
4427
|
*/
|
|
4282
|
-
getConversationListByTag(tagId: string, startTime: number, count?: number, channelId?: string):
|
|
4428
|
+
getConversationListByTag(tagId: string, startTime: number, count?: number, channelId?: string): Promise<IAsyncRes<IReceivedConversationByTag[]>>;
|
|
4283
4429
|
/**
|
|
4284
4430
|
* 获取标签下的未读消息数
|
|
4285
4431
|
* @param tagId 标签id
|
|
4286
|
-
* @param containMuted 是否包含免打扰会话
|
|
4287
|
-
*/
|
|
4288
|
-
getUnreadCountByTag(tagId: string, containMuted: boolean): IPromiseResult<number>;
|
|
4289
|
-
/**
|
|
4290
|
-
* 设置标签中会话置顶
|
|
4291
|
-
* @param conversation 会话
|
|
4292
|
-
*/
|
|
4293
|
-
setConversationStatusInTag(tagId: string, conversation: IConversationOption, status: ITagStatus): IPromiseResult<IAsyncRes>;
|
|
4294
|
-
/**
|
|
4295
|
-
* 获取会话里的标签
|
|
4296
|
-
* @param config
|
|
4297
|
-
*/
|
|
4298
|
-
getTagsForConversation(conversation: IConversationOption): IPromiseResult<IConversationTag[]>;
|
|
4299
|
-
/**
|
|
4300
|
-
* 发送群组消息已读回执
|
|
4301
|
-
* 导航下发已读回执开关为 true 时调用
|
|
4432
|
+
* @param containMuted 是否包含免打扰会话
|
|
4302
4433
|
*/
|
|
4303
|
-
|
|
4434
|
+
getUnreadCountByTag(tagId: string, containMuted: boolean): Promise<IAsyncRes<number>>;
|
|
4304
4435
|
/**
|
|
4305
|
-
*
|
|
4436
|
+
* 设置标签中会话置顶
|
|
4437
|
+
* @param conversation 会话
|
|
4306
4438
|
*/
|
|
4307
|
-
|
|
4439
|
+
setConversationStatusInTag(tagId: string, conversation: IConversationOption, status: {
|
|
4440
|
+
isTop: boolean;
|
|
4441
|
+
}): Promise<IAsyncRes<IAsyncRes>>;
|
|
4308
4442
|
/**
|
|
4309
|
-
*
|
|
4443
|
+
* 获取会话里的标签
|
|
4444
|
+
* @param conversation
|
|
4310
4445
|
*/
|
|
4311
|
-
|
|
4446
|
+
getTagsForConversation(conversation: IConversationOption): Promise<IAsyncRes<IConversationTag[]>>;
|
|
4312
4447
|
/**
|
|
4313
|
-
*
|
|
4448
|
+
* 调用非标准方法。所谓非标准方法,是为某些特定需求或产品添加,暂未作为标准接口添加至 API 层。
|
|
4449
|
+
* 对于未实现的方法,接口响应 Unsupport 错误码
|
|
4450
|
+
* @param method 方法名
|
|
4451
|
+
* @param args
|
|
4314
4452
|
*/
|
|
4315
|
-
|
|
4453
|
+
callExtra(method: string | keyof IExtraMethod, ...args: any[]): Promise<IAsyncRes<unknown>>;
|
|
4316
4454
|
/**
|
|
4317
|
-
*
|
|
4318
|
-
|
|
4319
|
-
|
|
4455
|
+
* 删除所有会话
|
|
4456
|
+
*/
|
|
4457
|
+
clearConversations(conversationTypes?: ConversationType[], tag?: string): Promise<ErrorCode>;
|
|
4320
4458
|
/**
|
|
4321
|
-
*
|
|
4459
|
+
* 设置用户连接状态监听器
|
|
4322
4460
|
*/
|
|
4323
4461
|
setUserStatusListener(config: {
|
|
4324
4462
|
userIds: string[];
|
|
4325
4463
|
}, listener: Function): void;
|
|
4326
4464
|
/**
|
|
4327
|
-
*
|
|
4328
|
-
*/
|
|
4329
|
-
setUserStatus(status: number): Promise<ErrorCode>;
|
|
4330
|
-
/**
|
|
4331
|
-
* 订阅用户在线状态
|
|
4332
|
-
*/
|
|
4333
|
-
subscribeUserStatus(userIds: string[]): Promise<ErrorCode>;
|
|
4334
|
-
/**
|
|
4335
|
-
* 获取用户状态
|
|
4336
|
-
*/
|
|
4337
|
-
getUserStatus(userId: string): IPromiseResult<{
|
|
4338
|
-
status: string;
|
|
4339
|
-
}>;
|
|
4340
|
-
/**
|
|
4341
|
-
* 清空所有会话
|
|
4342
|
-
*/
|
|
4343
|
-
clearConversations(conversationTypes?: ConversationType[], channelId?: string): Promise<ErrorCode>;
|
|
4344
|
-
/**
|
|
4345
|
-
* 加入黑名单
|
|
4465
|
+
* 添加用户黑名单
|
|
4346
4466
|
*/
|
|
4347
4467
|
addToBlacklist(userId: string): Promise<ErrorCode>;
|
|
4348
4468
|
/**
|
|
4349
|
-
|
|
4469
|
+
* 将指定用户移除黑名单
|
|
4350
4470
|
*/
|
|
4351
4471
|
removeFromBlacklist(userId: string): Promise<ErrorCode>;
|
|
4352
4472
|
/**
|
|
4353
|
-
|
|
4473
|
+
* 获取黑名单列表
|
|
4354
4474
|
*/
|
|
4355
|
-
getBlacklist():
|
|
4475
|
+
getBlacklist(): Promise<IAsyncRes<string[]>>;
|
|
4356
4476
|
/**
|
|
4357
|
-
|
|
4477
|
+
* 获取指定人员在黑名单中的状态
|
|
4358
4478
|
*/
|
|
4359
|
-
getBlacklistStatus(userId: string):
|
|
4479
|
+
getBlacklistStatus(userId: string): Promise<IAsyncRes<string>>;
|
|
4360
4480
|
/**
|
|
4361
4481
|
* 向本地插入一条消息,不发送到服务器
|
|
4362
4482
|
*/
|
|
4363
|
-
insertMessage(conversationType: ConversationType, targetId: string, insertOptions: IInsertMsgOptions):
|
|
4483
|
+
insertMessage(conversationType: ConversationType, targetId: string, insertOptions: IInsertMsgOptions): Promise<IAsyncRes<IReceivedMessage>>;
|
|
4364
4484
|
/**
|
|
4365
4485
|
* 删除本地消息
|
|
4366
4486
|
*/
|
|
4367
|
-
deleteMessages(
|
|
4487
|
+
deleteMessages(timestamp: number[]): Promise<ErrorCode>;
|
|
4368
4488
|
/**
|
|
4369
|
-
*
|
|
4489
|
+
* 从本地消息数据库中删除某一会话指定时间之前的消息数据
|
|
4370
4490
|
*/
|
|
4371
|
-
deleteMessagesByTimestamp(conversationType: ConversationType, targetId: string, timestamp: number, cleanSpace: boolean, channelId
|
|
4491
|
+
deleteMessagesByTimestamp(conversationType: ConversationType, targetId: string, timestamp: number, cleanSpace: boolean, channelId?: string): Promise<ErrorCode>;
|
|
4372
4492
|
/**
|
|
4373
4493
|
* 清空会话下历史消息
|
|
4374
4494
|
*/
|
|
4375
|
-
clearMessages(conversationType: ConversationType, targetId: string, channelId
|
|
4495
|
+
clearMessages(conversationType: ConversationType, targetId: string, channelId?: string): Promise<ErrorCode>;
|
|
4376
4496
|
/**
|
|
4377
|
-
*
|
|
4497
|
+
* 获取本地消息
|
|
4378
4498
|
*/
|
|
4379
|
-
getMessage(messageId: number):
|
|
4499
|
+
getMessage(messageId: number): Promise<IAsyncRes<IReceivedMessage>>;
|
|
4380
4500
|
/**
|
|
4381
4501
|
* 设置消息内容
|
|
4382
4502
|
*/
|
|
@@ -4385,49 +4505,76 @@ interface IEngine {
|
|
|
4385
4505
|
* 设置消息搜索字段
|
|
4386
4506
|
*/
|
|
4387
4507
|
setMessageSearchField(messageId: number, content: any, searchFiles: string): Promise<ErrorCode>;
|
|
4388
|
-
/**
|
|
4389
|
-
* 通过关键字搜索会话
|
|
4390
|
-
*/
|
|
4391
|
-
searchConversationByContent(keyword: string, customMessageTypes: string[], channelId: string, conversationTypes?: ConversationType[]): IPromiseResult<IReceivedConversation[]>;
|
|
4392
|
-
/**
|
|
4393
|
-
* 按内容搜索会话内的消息
|
|
4394
|
-
*/
|
|
4395
|
-
searchMessageByContent(conversationType: ConversationType, targetId: string, keyword: string, timestamp: number, count: number, total: number, channelId: string): IPromiseResult<{
|
|
4396
|
-
messages: IReceivedMessage[];
|
|
4397
|
-
count: number;
|
|
4398
|
-
}>;
|
|
4399
|
-
/**
|
|
4400
|
-
* 获取会话下所有未读的 @ 消息
|
|
4401
|
-
*/
|
|
4402
|
-
getUnreadMentionedMessages(conversationType: ConversationType, targetId: string, channelId: string): IReceivedMessage[];
|
|
4403
4508
|
/**
|
|
4404
4509
|
* 设置消息发送状态
|
|
4405
4510
|
*/
|
|
4406
4511
|
setMessageSentStatus(messageId: number, sentStatus: number): Promise<ErrorCode>;
|
|
4407
4512
|
/**
|
|
4408
|
-
|
|
4513
|
+
* 设置消息接收状态
|
|
4409
4514
|
*/
|
|
4410
4515
|
setMessageReceivedStatus(messageId: number, receivedStatus: number): Promise<ErrorCode>;
|
|
4411
4516
|
/**
|
|
4412
|
-
*
|
|
4517
|
+
* 设置当前用户在线状态
|
|
4413
4518
|
*/
|
|
4414
|
-
|
|
4519
|
+
setUserStatus(status: number): Promise<ErrorCode>;
|
|
4415
4520
|
/**
|
|
4416
|
-
*
|
|
4521
|
+
* 订阅用户在线状态
|
|
4417
4522
|
*/
|
|
4418
|
-
|
|
4523
|
+
subscribeUserStatus(userIds: string[]): Promise<ErrorCode>;
|
|
4419
4524
|
/**
|
|
4420
|
-
*
|
|
4525
|
+
* 获取用户在线状态
|
|
4421
4526
|
*/
|
|
4422
|
-
|
|
4527
|
+
getUserStatus(userId: string): Promise<IAsyncRes<{
|
|
4528
|
+
status: string;
|
|
4529
|
+
}>>;
|
|
4530
|
+
searchConversationByContent(keyword: string, customMessageTypes?: string[], channelId?: string, conversationTypes?: ConversationType[]): Promise<IAsyncRes<IReceivedConversation[]>>;
|
|
4531
|
+
searchConversationByContentWithAllChannel(keyword: string, customMessageTypes?: string[], conversationTypes?: ConversationType[]): Promise<IAsyncRes<IReceivedConversation[]>>;
|
|
4532
|
+
searchMessageByContent(conversationType: ConversationType, targetId: string, keyword: string, timestamp: number, count: number, total: number, channelId?: string): Promise<IAsyncRes<{
|
|
4533
|
+
messages: IReceivedMessage[];
|
|
4534
|
+
count: number;
|
|
4535
|
+
}>>;
|
|
4536
|
+
searchMessageByContentWithAllChannel(conversationType: ConversationType, targetId: string, keyword: string, timestamp: number, count: number): Promise<IAsyncRes<{
|
|
4537
|
+
messages: IReceivedMessage[];
|
|
4538
|
+
count: number;
|
|
4539
|
+
}>>;
|
|
4540
|
+
searchMessageByContentInTimeRangeWithAllChannel(conversationType: ConversationType, targetId: string, keyword: string, startTime: number, endTime: number, offset: number, limit: number): Promise<IAsyncRes<{
|
|
4541
|
+
messages: IReceivedMessage[];
|
|
4542
|
+
}>>;
|
|
4543
|
+
getUnreadMentionedMessages(conversationType: ConversationType, targetId: string, channelId?: string): IReceivedMessage[];
|
|
4544
|
+
clearUnreadCountByTimestamp(conversationType: ConversationType, targetId: string, timestamp: number, channelId?: string): Promise<ErrorCode>;
|
|
4545
|
+
/**
|
|
4546
|
+
* 获取会话免打扰状态
|
|
4547
|
+
*/
|
|
4548
|
+
getConversationNotificationStatus(conversationType: ConversationType, targetId: string, channelId?: string): Promise<IAsyncRes<NotificationStatus>>;
|
|
4549
|
+
getRemoteHistoryMessages(conversationType: ConversationType, targetId: string, timestamp: number, count: number, order: 0 | 1, channelId: string): Promise<IAsyncRes<{
|
|
4423
4550
|
list: IReceivedMessage[];
|
|
4424
4551
|
hasMore: boolean;
|
|
4552
|
+
}>>;
|
|
4553
|
+
/**
|
|
4554
|
+
* 获取群组消息送达信息
|
|
4555
|
+
*/
|
|
4556
|
+
getGroupMessageDeliverList(targetId: string, messageUId: string, channelId?: string): IPromiseResult<IGroupMessageDeliverInfo>;
|
|
4557
|
+
/**
|
|
4558
|
+
* 获取单聊消息送达信息
|
|
4559
|
+
*/
|
|
4560
|
+
getPrivateMessageDeliverTime(messageUId: string, channelId?: string): IPromiseResult<number>;
|
|
4561
|
+
setCallInfo(targetId: string, key: string, value: string): IPromiseResult<{
|
|
4562
|
+
key: string;
|
|
4563
|
+
value: string;
|
|
4425
4564
|
}>;
|
|
4426
|
-
|
|
4565
|
+
getConversationListWithAllChannel(): Promise<IAsyncRes<IReceivedConversation[]>>;
|
|
4566
|
+
getConversationListWithAllChannelByPage(index: number, limit: number): Promise<IAsyncRes<IReceivedConversation[]>>;
|
|
4567
|
+
/**
|
|
4568
|
+
* 加入房间
|
|
4569
|
+
* @param roomId
|
|
4570
|
+
* @param mode 房间模式:直播 or 会议
|
|
4571
|
+
* @param mediaType 直播房间模式下的媒体资源类型
|
|
4572
|
+
*/
|
|
4573
|
+
joinRTCRoom(roomId: string, mode: RTCMode, mediaType?: number, joinType?: RTCJoinType): Promise<IAsyncRes<IJoinRTCRoomData>>;
|
|
4427
4574
|
quitRTCRoom(roomId: string): Promise<ErrorCode>;
|
|
4428
|
-
rtcPing(roomId: string, mode: number,
|
|
4429
|
-
getRTCRoomInfo(roomId: string):
|
|
4430
|
-
getRTCUserInfoList(roomId: string):
|
|
4575
|
+
rtcPing(roomId: string, mode: number, mediaType?: number): Promise<ErrorCode>;
|
|
4576
|
+
getRTCRoomInfo(roomId: string): Promise<IAsyncRes<IRTCRoomInfo>>;
|
|
4577
|
+
getRTCUserInfoList(roomId: string): Promise<IAsyncRes<IRTCUsers>>;
|
|
4431
4578
|
getRTCUserInfo(roomId: string): IPromiseResult<unknown>;
|
|
4432
4579
|
setRTCUserInfo(roomId: string, key: string, value: string): Promise<ErrorCode>;
|
|
4433
4580
|
removeRTCUserInfo(roomId: string, keys: string[]): Promise<ErrorCode>;
|
|
@@ -4435,49 +4582,40 @@ interface IEngine {
|
|
|
4435
4582
|
name: string;
|
|
4436
4583
|
content: string;
|
|
4437
4584
|
}): Promise<ErrorCode>;
|
|
4438
|
-
/**
|
|
4439
|
-
* 全量订阅资源修改
|
|
4440
|
-
* @param roomId 房间 Id
|
|
4441
|
-
* @param message 向前兼容的消息内容
|
|
4442
|
-
* @param valueInfo 全量资源数据
|
|
4443
|
-
* @param objectName 全量 URI 消息名
|
|
4444
|
-
*/
|
|
4445
4585
|
setRTCTotalRes(roomId: string, message: {
|
|
4446
4586
|
name: string;
|
|
4447
4587
|
content: string;
|
|
4448
|
-
}, valueInfo: string, objectName: string, mcuValInfo
|
|
4449
|
-
|
|
4588
|
+
}, valueInfo: string, objectName: string, mcuValInfo?: string): Promise<ErrorCode>;
|
|
4589
|
+
setRTCCDNUris(roomId: string, objectName: string, CDNUris: string): Promise<ErrorCode>;
|
|
4590
|
+
getRTCData(roomId: string, keys: string[], isInner: boolean, apiType: RTCApiType): Promise<IAsyncRes<KVString>>;
|
|
4450
4591
|
removeRTCData(roomId: string, keys: string[], isInner: boolean, apiType: RTCApiType, message?: {
|
|
4451
4592
|
name: string;
|
|
4452
4593
|
content: string;
|
|
4453
4594
|
}): Promise<ErrorCode>;
|
|
4454
4595
|
setRTCOutData(roomId: string, rtcData: unknown, type: number, message: unknown): Promise<ErrorCode>;
|
|
4455
4596
|
getRTCOutData(roomId: string, userIds: string[]): IPromiseResult<unknown>;
|
|
4456
|
-
getRTCToken(roomId: string, mode: number, broadcastType?: number):
|
|
4457
|
-
setRTCState(roomId: string,
|
|
4597
|
+
getRTCToken(roomId: string, mode: number, broadcastType?: number): Promise<IAsyncRes<IRtcTokenData>>;
|
|
4598
|
+
setRTCState(roomId: string, report: string): Promise<ErrorCode>;
|
|
4458
4599
|
getRTCUserList(roomId: string): IPromiseResult<IRTCUsers>;
|
|
4459
|
-
setRTCCDNUris(roomId: string, objectName: string, CDNUris: string): Promise<ErrorCode>;
|
|
4460
|
-
}
|
|
4461
|
-
|
|
4462
|
-
interface IExpansionMsgContent {
|
|
4463
4600
|
/**
|
|
4464
|
-
*
|
|
4465
|
-
|
|
4466
|
-
|
|
4467
|
-
|
|
4468
|
-
|
|
4601
|
+
* 直播观众加房间
|
|
4602
|
+
*/
|
|
4603
|
+
joinLivingRoomAsAudience(roomId: string, mode: RTCMode, broadcastType?: number): Promise<IAsyncRes<{
|
|
4604
|
+
token: string;
|
|
4605
|
+
kvEntries: IServerRTCRoomEntry[];
|
|
4606
|
+
}>>;
|
|
4469
4607
|
/**
|
|
4470
|
-
*
|
|
4471
|
-
|
|
4472
|
-
|
|
4608
|
+
* 直播观众退出房间
|
|
4609
|
+
*/
|
|
4610
|
+
quitLivingRoomAsAudience(roomId: string): Promise<ErrorCode>;
|
|
4473
4611
|
/**
|
|
4474
|
-
*
|
|
4475
|
-
|
|
4476
|
-
|
|
4612
|
+
* 直播身份切换
|
|
4613
|
+
*/
|
|
4614
|
+
rtcIdentityChange(roomId: string, changeType: RTCIdentityChangeType, broadcastType?: number): Promise<IAsyncRes<IJoinRTCRoomData>>;
|
|
4477
4615
|
/**
|
|
4478
|
-
*
|
|
4479
|
-
|
|
4480
|
-
|
|
4616
|
+
* 获取加入 RTC 房间的用户信息(当前仅能查自己的)
|
|
4617
|
+
*/
|
|
4618
|
+
getRTCJoinedUserInfo(userId: string): Promise<IAsyncRes<IRTCJoinedInfo[]>>;
|
|
4481
4619
|
}
|
|
4482
4620
|
|
|
4483
4621
|
declare class RTCPluginContext extends PluginContext {
|
|
@@ -4575,34 +4713,6 @@ declare class RTCPluginContext extends PluginContext {
|
|
|
4575
4713
|
rtcIdentityChange(roomId: string, changeType: RTCIdentityChangeType, broadcastType?: number): IPromiseResult<IJoinRTCRoomData>;
|
|
4576
4714
|
}
|
|
4577
4715
|
|
|
4578
|
-
declare abstract class ANavi {
|
|
4579
|
-
protected readonly _runtime: IRuntime;
|
|
4580
|
-
protected readonly _options: IAPIContextOption;
|
|
4581
|
-
protected readonly _apiVersion: string;
|
|
4582
|
-
protected readonly _appkey: string;
|
|
4583
|
-
protected _naviInfo: INaviInfo | null;
|
|
4584
|
-
constructor(_runtime: IRuntime, _options: IAPIContextOption);
|
|
4585
|
-
/**
|
|
4586
|
-
* @param uris
|
|
4587
|
-
* @param appkey
|
|
4588
|
-
* @param token
|
|
4589
|
-
*/
|
|
4590
|
-
protected abstract _reqNavi(uris: string[], appkey: string, token: string, checkCA?: boolean): Promise<INaviInfo | null>;
|
|
4591
|
-
/**
|
|
4592
|
-
* 获取导航数据
|
|
4593
|
-
* @param token
|
|
4594
|
-
* @param dynamicUris token 携带的动态导航地址
|
|
4595
|
-
* @param force 是否强制重新获取并清空缓存数据
|
|
4596
|
-
*/
|
|
4597
|
-
getInfo(token: string, dynamicUris: string[], force: boolean, checkCA?: boolean): Promise<INaviInfo | null>;
|
|
4598
|
-
protected setNaviInfo2Cache(token: string, naviInfo: INaviInfo): void;
|
|
4599
|
-
getInfoFromCache(token: string): INaviInfo | null;
|
|
4600
|
-
/**
|
|
4601
|
-
* 清空导航数据:内存数据、缓存数据
|
|
4602
|
-
*/
|
|
4603
|
-
private _clear;
|
|
4604
|
-
}
|
|
4605
|
-
|
|
4606
4716
|
interface IEngineWatcher {
|
|
4607
4717
|
/**
|
|
4608
4718
|
* @param message 消息
|
|
@@ -4621,6 +4731,9 @@ interface IEngineWatcher {
|
|
|
4621
4731
|
*/
|
|
4622
4732
|
onRTCDataChange: (data: IServerRTCRoomEntry[], roomId?: string) => void;
|
|
4623
4733
|
pullFinished: () => void;
|
|
4734
|
+
messageDelivered: (data: IMessageDeliver[]) => void;
|
|
4735
|
+
groupMessageDeliveredStatus: (data: IGroupMessageDeliverStatus) => void;
|
|
4736
|
+
callInfo: (data: string) => void;
|
|
4624
4737
|
}
|
|
4625
4738
|
/**
|
|
4626
4739
|
* 引擎定义
|
|
@@ -4629,23 +4742,38 @@ declare abstract class AEngine implements IEngine {
|
|
|
4629
4742
|
readonly runtime: IRuntime;
|
|
4630
4743
|
protected readonly _watcher: IEngineWatcher;
|
|
4631
4744
|
protected readonly _options: IAPIContextOption;
|
|
4632
|
-
/**
|
|
4633
|
-
* 当前用户 Id
|
|
4634
|
-
*/
|
|
4635
|
-
currentUserId: string;
|
|
4636
4745
|
/**
|
|
4637
4746
|
* 连接时间
|
|
4638
4747
|
*/
|
|
4639
4748
|
abstract getConnectedTime(): number;
|
|
4640
|
-
readonly navi: ANavi;
|
|
4641
4749
|
protected readonly _appkey: string;
|
|
4642
4750
|
protected readonly _apiVer: string;
|
|
4751
|
+
protected readonly _apiVersion: string;
|
|
4752
|
+
protected _naviInfo: INaviInfo | null;
|
|
4643
4753
|
/**
|
|
4644
4754
|
* 引擎初始化
|
|
4645
4755
|
* @param _appkey
|
|
4646
4756
|
*/
|
|
4647
4757
|
constructor(runtime: IRuntime, _watcher: IEngineWatcher, _options: IAPIContextOption);
|
|
4648
|
-
|
|
4758
|
+
/**
|
|
4759
|
+
* @param uris
|
|
4760
|
+
* @param appkey
|
|
4761
|
+
* @param token
|
|
4762
|
+
*/
|
|
4763
|
+
abstract getNaviInfo(uris: string[], appkey: string, token: string, checkCA?: boolean): Promise<INaviInfo | null>;
|
|
4764
|
+
/**
|
|
4765
|
+
* 获取导航数据
|
|
4766
|
+
* @param token
|
|
4767
|
+
* @param dynamicUris token 携带的动态导航地址
|
|
4768
|
+
* @param force 是否强制重新获取并清空缓存数据
|
|
4769
|
+
*/
|
|
4770
|
+
getInfo(token: string, dynamicUris: string[], force: boolean, checkCA?: boolean): Promise<INaviInfo | null>;
|
|
4771
|
+
protected setNaviInfo2Cache(token: string, naviInfo: INaviInfo): void;
|
|
4772
|
+
getInfoFromCache(token: string): INaviInfo | null;
|
|
4773
|
+
/**
|
|
4774
|
+
* 清空导航数据:内存数据、缓存数据
|
|
4775
|
+
*/
|
|
4776
|
+
private _clear;
|
|
4649
4777
|
/**
|
|
4650
4778
|
* 调用非标准方法。所谓非标准方法,是为某些特定需求或产品添加,暂未作为标准接口添加至 API 层。
|
|
4651
4779
|
* 对于未实现的方法,接口响应 Unsupport 错误码
|
|
@@ -4657,8 +4785,9 @@ declare abstract class AEngine implements IEngine {
|
|
|
4657
4785
|
* 建立连接
|
|
4658
4786
|
* @param token
|
|
4659
4787
|
* @param naviInfo
|
|
4788
|
+
* @param reconnectKickEnable
|
|
4660
4789
|
*/
|
|
4661
|
-
abstract connect(token: string, naviInfo: INaviInfo): Promise<ErrorCode>;
|
|
4790
|
+
abstract connect(token: string, naviInfo: INaviInfo, reconnectKickEnable?: boolean): Promise<ErrorCode>;
|
|
4662
4791
|
/**
|
|
4663
4792
|
* 发送SDK版本
|
|
4664
4793
|
* @param versionInfo
|
|
@@ -5008,6 +5137,8 @@ declare abstract class AEngine implements IEngine {
|
|
|
5008
5137
|
* 获取当前 userId
|
|
5009
5138
|
*/
|
|
5010
5139
|
abstract getCurrentUserId(): string;
|
|
5140
|
+
abstract getConversationListWithAllChannel(): IPromiseResult<IReceivedConversation[]>;
|
|
5141
|
+
abstract getConversationListWithAllChannelByPage(index: number, limit: number): IPromiseResult<IReceivedConversation[]>;
|
|
5011
5142
|
/**
|
|
5012
5143
|
* 设置用户在线状态监听器
|
|
5013
5144
|
*/
|
|
@@ -5080,6 +5211,10 @@ declare abstract class AEngine implements IEngine {
|
|
|
5080
5211
|
* 通过关键字搜索会话
|
|
5081
5212
|
*/
|
|
5082
5213
|
abstract searchConversationByContent(keyword: string, customMessageTypes: string[], channelId: string, conversationTypes?: ConversationType[]): IPromiseResult<IReceivedConversation[]>;
|
|
5214
|
+
/**
|
|
5215
|
+
* 通过关键字搜索所有会话
|
|
5216
|
+
*/
|
|
5217
|
+
abstract searchConversationByContentWithAllChannel(keyword: string, customMessageTypes: string[], conversationTypes?: ConversationType[]): IPromiseResult<IReceivedConversation[]>;
|
|
5083
5218
|
/**
|
|
5084
5219
|
* 按内容搜索会话内的消息
|
|
5085
5220
|
*/
|
|
@@ -5087,6 +5222,19 @@ declare abstract class AEngine implements IEngine {
|
|
|
5087
5222
|
messages: IReceivedMessage[];
|
|
5088
5223
|
count: number;
|
|
5089
5224
|
}>;
|
|
5225
|
+
/**
|
|
5226
|
+
* 按内容搜索指定会话(不区分 channelId)的消息
|
|
5227
|
+
*/
|
|
5228
|
+
abstract searchMessageByContentWithAllChannel(conversationType: ConversationType, targetId: string, keyword: string, timestamp: number, count: number): IPromiseResult<{
|
|
5229
|
+
messages: IReceivedMessage[];
|
|
5230
|
+
count: number;
|
|
5231
|
+
}>;
|
|
5232
|
+
/**
|
|
5233
|
+
* 按内容搜索时间范围内指定会话(不区分 channelId)的消息
|
|
5234
|
+
*/
|
|
5235
|
+
abstract searchMessageByContentInTimeRangeWithAllChannel(conversationType: ConversationType, targetId: string, keyword: string, startTime: number, endTime: number, offset: number, limit: number): IPromiseResult<{
|
|
5236
|
+
messages: IReceivedMessage[];
|
|
5237
|
+
}>;
|
|
5090
5238
|
/**
|
|
5091
5239
|
* 获取会话下所有未读的 @ 消息
|
|
5092
5240
|
*/
|
|
@@ -5114,6 +5262,18 @@ declare abstract class AEngine implements IEngine {
|
|
|
5114
5262
|
list: IReceivedMessage[];
|
|
5115
5263
|
hasMore: boolean;
|
|
5116
5264
|
}>;
|
|
5265
|
+
/**
|
|
5266
|
+
* 获取群组消息送达列表
|
|
5267
|
+
*/
|
|
5268
|
+
abstract getGroupMessageDeliverList(targetId: string, messageUId: string, channelId: string): IPromiseResult<IGroupMessageDeliverInfo>;
|
|
5269
|
+
/**
|
|
5270
|
+
* 获取单聊消息送达列表
|
|
5271
|
+
*/
|
|
5272
|
+
abstract getPrivateMessageDeliverTime(messageUId: string, channelId: string): IPromiseResult<number>;
|
|
5273
|
+
abstract setCallInfo(targetId: string, key: string, value: string): IPromiseResult<{
|
|
5274
|
+
key: string;
|
|
5275
|
+
value: string;
|
|
5276
|
+
}>;
|
|
5117
5277
|
abstract joinRTCRoom(roomId: string, mode: RTCMode, broadcastType?: number, joinType?: RTCJoinType): IPromiseResult<IJoinRTCRoomData>;
|
|
5118
5278
|
abstract quitRTCRoom(roomId: string): Promise<ErrorCode>;
|
|
5119
5279
|
abstract rtcPing(roomId: string, mode: number, broadcastType?: number): Promise<ErrorCode>;
|
|
@@ -5618,4 +5778,4 @@ declare enum CONNECTION_TYPE {
|
|
|
5618
5778
|
*/
|
|
5619
5779
|
declare const version: string;
|
|
5620
5780
|
|
|
5621
|
-
export { AEngine,
|
|
5781
|
+
export { AEngine, APIContext, AppStorage, AssertRules, CONNECTION_TYPE, CPP_PROTOCAL_MSGTYPE_OPTION, CallLibMsgType, ChatroomEntryType, ChatroomUserChangeType as ChatroomMemberChangeType, CometChannel, ConnectResultCode, ConnectionStatus, ConversationType, DelayTimer, ErrorCode, EventEmitter, FileType, HttpMethod, IAPIContextOption, IAsyncRes, IBlockedMessageInfo, IChatroomEntries, IChatroomEntry, IChatroomInfo, IChatroomListener, IChatroomListenerData, IChrmKVEntries, IChrmKVEntry, IConnectResult, IConnectionStatusListener, IConversationOption, IConversationStateListener, IConversationTag, IConversationTagListener, IDataChannelWatcher, IDeletedExpansion, IDeliveredUser, IEngine, IEngineWatcher, IExpansionListener, IExpansionListenerData, IExpansionMsgContent, IExtraMethod, IGroupMessageDeliverInfo, IGroupMessageDeliverStatus, IGroupMessageDeliveredStatusListener, IInsertMsgOptions, IJoinRTCRoomData, ILocalReadReceiptInfo, ILocalTagStatus, IM_COMET_PULLMSG_TIMEOUT, IM_PING_INTERVAL_TIME, IM_PING_MIN_TIMEOUT, IM_PING_TIMEOUT, IM_SIGNAL_TIMEOUT, IMessageBlockedListener, IMessageDeliver, IMessageDeliveredListener, IMessageListnenr, IMessageReader, IMessageReaderResponse, IMetionedData, INaviInfo, IPluginGenerator, IPromiseResult, IPushConfig, IRTCInnerListener, IRTCJoinedInfo, IRTCRoomInfo, IRTCUsers, IReadReceiptInfo, IRecallMsgOptions, IReceivedConversation, IReceivedConversationByTag, IReceivedMessage, IRemoveChatRoomEntriesOption, IRemoveChatRoomEntryOption, IRequest, IResponse, IRtcTokenData, IRuntime, ISendExMsgOptions, ISendMsgOptions, IServerConversationStatus, IServerRTCRoomEntry, IServerUserSetting, ISetConversationStatusOptions, IStorage, ITagInfo, ITagListener, ITagParam, ITagStatus, ITypingInfo, ITypingMessage, ITypingUser, IUpdatedConversation, IUpdatedExpansion, IUploadAuth, IUserProfile, IWatcher, IWebSocket, ItypingStateListener, KVString, LiveRole, LiveType, LogLevel, LogType, Logger, MAX_MESSAGE_CONTENT_BYTES, MINI_COMET_CONNECT_URIS, MINI_SOCKET_CONNECT_URIS, MentionedType, MessageBlockType, MessageDirection, MessageType, NAVI_CACHE_DURATION, NAVI_REQ_TIMEOUT, NotificationStatus, PING_REQ_TIMEOUT, PUBLIC_CLOUD_NAVI_URIS, PluginContext, RCAssertError, RTCApiType, RTCIdentityChangeType, RTCJoinType, RTCMode, RTCPluginContext, ReceivedStatus, SEND_MESSAGE_TYPE_OPTION, STATUS_MESSAGE, STORAGE_ROOT_KEY, TagChangeType, UploadMethod, VersionManage, WEB_SOCKET_TIMEOUT, WebSocketChannel, appendUrl, assert, cloneByJSON, forEach, formatConnectResponseCode, getBrowser, getMimeKey, getUploadFileName, indexOf, isArray, isArrayBuffer, isBoolean, isFunction, isHttpUrl, isInObject, isInclude, isNull, isNumber, isObject, isString, isUndefined, isValidChrmEntryKey, isValidChrmEntryValue, isValidConversationType, isValidFileType, map, notEmptyArray, notEmptyObject, notEmptyString, pushConfigsToJSON, pushJSONToConfigs, todo, usingCppEngine, validate, version };
|