easemob-websdk 4.10.0 → 4.12.0-beta
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/CHANGELOG.md +33 -0
- package/Easemob-chat.d.ts +79 -19
- package/Easemob-chat.js +1 -1
- package/chatroom/chatroom.js +1 -1
- package/contact/contact.js +1 -1
- package/group/group.js +1 -1
- package/localCache/localCache.js +1 -1
- package/message/audio.d.ts +4 -0
- package/message/cmd.d.ts +4 -0
- package/message/combine.d.ts +4 -46
- package/message/custom.d.ts +4 -0
- package/message/file.d.ts +4 -0
- package/message/img.d.ts +4 -0
- package/message/location.d.ts +4 -0
- package/message/text.d.ts +4 -0
- package/message/video.d.ts +4 -0
- package/miniCore/miniCore.d.ts +13 -4
- package/miniCore/miniCore.js +1 -1
- package/miniProgram/Easemob-chat.js +1 -1
- package/package.json +10 -10
- package/presence/presence.js +1 -1
- package/silent/silent.d.ts +17 -1
- package/silent/silent.js +1 -1
- package/thread/thread.js +1 -1
- package/translation/translation.js +1 -1
- package/types/chatRoomApi.d.ts +20 -0
- package/types/common.d.ts +2 -0
- package/types/engineCore.d.ts +1 -0
- package/uniApp/Easemob-chat.js +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,38 @@
|
|
|
1
1
|
# Changes to easemob chat
|
|
2
2
|
|
|
3
|
+
## 4.12.0 (Jan 9, 2025)
|
|
4
|
+
|
|
5
|
+
### 新增特性
|
|
6
|
+
|
|
7
|
+
1. `onModifiedMessage` 事件回调中增加 ext 字段。
|
|
8
|
+
2. 加入聊天室 `joinChatRoom` 成功回调新增当前聊天室信息。
|
|
9
|
+
|
|
10
|
+
### 修复
|
|
11
|
+
|
|
12
|
+
1. 格式化小程序SDK API 请求失败错误码, 和Web端统一。
|
|
13
|
+
2. 修复uniapp sdk 在4.36版本运行到鸿蒙平台,无限重连的问题。
|
|
14
|
+
3. 修复偶现无法拉取消息的问题。
|
|
15
|
+
|
|
16
|
+
### 优化
|
|
17
|
+
|
|
18
|
+
1. 优化重连时间间隔
|
|
19
|
+
2. 小程序SDK支持httpDNS, 默认开启
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
## 4.11.0 (Nov 29, 2024)
|
|
23
|
+
|
|
24
|
+
### 新增特性
|
|
25
|
+
|
|
26
|
+
1. 获取历史消息时,消息体内增加 isRead, isDelivery 字段,只支持单聊。
|
|
27
|
+
2. 禁言回调中携带禁言到期的时间戳。
|
|
28
|
+
3. 去掉 sockjs
|
|
29
|
+
4. 群组/聊天室禁言事件增加 userId 字段,表示被禁言的人
|
|
30
|
+
5. uniapp sdk 支持鸿蒙系统
|
|
31
|
+
|
|
32
|
+
### 修复
|
|
33
|
+
|
|
34
|
+
1. 修复 pin 消息事件 conversationId 不对
|
|
35
|
+
|
|
3
36
|
## 4.10.0 (Oct 10, 2024)
|
|
4
37
|
|
|
5
38
|
### 新增特性
|
package/Easemob-chat.d.ts
CHANGED
|
@@ -26,19 +26,6 @@ export declare namespace EasemobChat {
|
|
|
26
26
|
/** The group ID. */
|
|
27
27
|
type GroupId = string;
|
|
28
28
|
|
|
29
|
-
interface CommonRequestResult {
|
|
30
|
-
/** The result of request. */
|
|
31
|
-
result: boolean;
|
|
32
|
-
/** Action. */
|
|
33
|
-
action: string;
|
|
34
|
-
/** The reason of failure. */
|
|
35
|
-
reason?: string;
|
|
36
|
-
/** The user ID. */
|
|
37
|
-
user: string;
|
|
38
|
-
/** The group/chat room ID. */
|
|
39
|
-
id: string;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
29
|
interface Jid {
|
|
43
30
|
appKey: string;
|
|
44
31
|
clientResource: string;
|
|
@@ -256,9 +243,11 @@ export declare namespace EasemobChat {
|
|
|
256
243
|
| GroupMemberAttributesUpdateMultiDeviceInfo
|
|
257
244
|
| NotificationMultiDeviceInfo;
|
|
258
245
|
|
|
259
|
-
|
|
260
|
-
/** The unique application key registered
|
|
261
|
-
appKey
|
|
246
|
+
type ConnectionParameters = {
|
|
247
|
+
/** The unique application key registered on the console. */
|
|
248
|
+
appKey?: string;
|
|
249
|
+
/** The unique application id registered on the console. */
|
|
250
|
+
appId?: string;
|
|
262
251
|
/** Whether to enable the delivery receipt function. - `true`: Enable; - (Default)`false`: Do not enable. */
|
|
263
252
|
delivery?: boolean;
|
|
264
253
|
/** Heartbeat interval, in milliseconds. */
|
|
@@ -285,7 +274,7 @@ export declare namespace EasemobChat {
|
|
|
285
274
|
* <br> This parameter has an impact on the kicking policy during a multi-device login scenario.
|
|
286
275
|
*/
|
|
287
276
|
isFixedDeviceId?: boolean;
|
|
288
|
-
}
|
|
277
|
+
};
|
|
289
278
|
|
|
290
279
|
interface RegisterUserResult extends AsyncResult {
|
|
291
280
|
entities: BaseUserInfo[];
|
|
@@ -366,6 +355,24 @@ export declare namespace EasemobChat {
|
|
|
366
355
|
id: string;
|
|
367
356
|
}
|
|
368
357
|
|
|
358
|
+
interface JoinChatRoomInfo {
|
|
359
|
+
/** Whether all members are muted. */
|
|
360
|
+
isAllMembersMuted: boolean;
|
|
361
|
+
/** Chatroom creation time. */
|
|
362
|
+
createTimestamp: number;
|
|
363
|
+
/** Whether the member is on the allowlist. */
|
|
364
|
+
isInAllowlist: boolean;
|
|
365
|
+
/** The current number of members in the chat room. */
|
|
366
|
+
memberCount: number;
|
|
367
|
+
/** The member mute expiration time. if the member is not muted, the value is -1. */
|
|
368
|
+
muteExpireTimestamp: number;
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
type JoinChatRoomResult = CommonRequestResult & {
|
|
372
|
+
/** The information returned after joining a chat room. */
|
|
373
|
+
info: JoinChatRoomInfo;
|
|
374
|
+
};
|
|
375
|
+
|
|
369
376
|
interface AddUsersToChatRoomResult {
|
|
370
377
|
/** The newly added members. */
|
|
371
378
|
newmembers: string[];
|
|
@@ -1837,10 +1844,10 @@ export declare namespace EasemobChat {
|
|
|
1837
1844
|
* - (Default) `false`: The user joins the chat room, without leaving all other chat rooms.
|
|
1838
1845
|
*/
|
|
1839
1846
|
leaveOtherRooms?: boolean;
|
|
1840
|
-
success?: (res: AsyncResult<
|
|
1847
|
+
success?: (res: AsyncResult<JoinChatRoomResult>) => void;
|
|
1841
1848
|
error?: (error: ErrorEvent) => void;
|
|
1842
1849
|
}
|
|
1843
|
-
): Promise<AsyncResult<
|
|
1850
|
+
): Promise<AsyncResult<JoinChatRoomResult>>;
|
|
1844
1851
|
|
|
1845
1852
|
/**
|
|
1846
1853
|
* @deprecated Use {@link leaveChatRoom} instead.
|
|
@@ -5391,6 +5398,20 @@ export declare namespace EasemobChat {
|
|
|
5391
5398
|
}
|
|
5392
5399
|
): Promise<AsyncResult<TranslationLanguageType>>;
|
|
5393
5400
|
|
|
5401
|
+
/**
|
|
5402
|
+
* Get all conversations in silent mode.
|
|
5403
|
+
*
|
|
5404
|
+
* ```typescript
|
|
5405
|
+
* connection.getSilentModeRemindTypeConversations({pageSize: 10})
|
|
5406
|
+
* ```
|
|
5407
|
+
*/
|
|
5408
|
+
getSilentModeRemindTypeConversations(params: {
|
|
5409
|
+
/** The cursor that specifies where to start to get data. If there will be data on the next page, this method will return the value of this field to indicate the position to start to get data of the next page. If it is null, the data of the first page will be fetched. */
|
|
5410
|
+
cursor?: string;
|
|
5411
|
+
/** The number of data entries per page. The default value is 10. */
|
|
5412
|
+
pageSize: number;
|
|
5413
|
+
}): Promise<AsyncResult<GetSilentModeRemindTypeConversationsResult>>;
|
|
5414
|
+
|
|
5394
5415
|
/**
|
|
5395
5416
|
* Adds a reaction to the message.
|
|
5396
5417
|
*
|
|
@@ -5688,6 +5709,8 @@ export declare namespace EasemobChat {
|
|
|
5688
5709
|
reason?: string;
|
|
5689
5710
|
/** The updated announcement. */
|
|
5690
5711
|
announcement?: string;
|
|
5712
|
+
/** Expiration time for user mute. */
|
|
5713
|
+
muteTimestamp?: { [key: string]: number };
|
|
5691
5714
|
}
|
|
5692
5715
|
|
|
5693
5716
|
interface GetChatroomAttributesResult {
|
|
@@ -6250,6 +6273,7 @@ export declare namespace EasemobChat {
|
|
|
6250
6273
|
kicked?: string;
|
|
6251
6274
|
detail?: GroupModifyInfo;
|
|
6252
6275
|
ext?: string;
|
|
6276
|
+
muteTimestamp?: { [key: string]: number };
|
|
6253
6277
|
}
|
|
6254
6278
|
|
|
6255
6279
|
interface ReadMsgSetParameters {
|
|
@@ -6521,6 +6545,10 @@ export declare namespace EasemobChat {
|
|
|
6521
6545
|
modifiedInfo?: ModifiedMsgInfo;
|
|
6522
6546
|
/** The list of message recipients. */
|
|
6523
6547
|
receiverList?: string[];
|
|
6548
|
+
/** Has the message been read (only single chat messages have this field). */
|
|
6549
|
+
isRead?: boolean;
|
|
6550
|
+
/** Has the message been delivered (only single chat messages have this field). */
|
|
6551
|
+
isDelivered?: boolean;
|
|
6524
6552
|
}
|
|
6525
6553
|
|
|
6526
6554
|
interface CreateTextMsgParameters {
|
|
@@ -6614,6 +6642,10 @@ export declare namespace EasemobChat {
|
|
|
6614
6642
|
onFileUploadError?: (error: any) => void;
|
|
6615
6643
|
/** The callback of file upload completion. */
|
|
6616
6644
|
onFileUploadComplete?: (data: { url: string; secret: string }) => void;
|
|
6645
|
+
/** Has the message been read (only single chat messages have this field). */
|
|
6646
|
+
isRead?: boolean;
|
|
6647
|
+
/** Has the message been delivered (only single chat messages have this field). */
|
|
6648
|
+
isDelivered?: boolean;
|
|
6617
6649
|
}
|
|
6618
6650
|
|
|
6619
6651
|
type CombineMsgList = Exclude<
|
|
@@ -6734,6 +6766,10 @@ export declare namespace EasemobChat {
|
|
|
6734
6766
|
deliverOnlineOnly?: boolean;
|
|
6735
6767
|
/** The list of message recipients. */
|
|
6736
6768
|
receiverList?: string[];
|
|
6769
|
+
/** Has the message been read (only single chat messages have this field). */
|
|
6770
|
+
isRead?: boolean;
|
|
6771
|
+
/** Has the message been delivered (only single chat messages have this field). */
|
|
6772
|
+
isDelivered?: boolean;
|
|
6737
6773
|
}
|
|
6738
6774
|
|
|
6739
6775
|
interface CreateCmdMsgParameters {
|
|
@@ -6848,6 +6884,10 @@ export declare namespace EasemobChat {
|
|
|
6848
6884
|
receiverList?: string[];
|
|
6849
6885
|
/** Message modified info. */
|
|
6850
6886
|
modifiedInfo?: ModifiedMsgInfo;
|
|
6887
|
+
/** Has the message been read (only single chat messages have this field). */
|
|
6888
|
+
isRead?: boolean;
|
|
6889
|
+
/** Has the message been delivered (only single chat messages have this field). */
|
|
6890
|
+
isDelivered?: boolean;
|
|
6851
6891
|
}
|
|
6852
6892
|
|
|
6853
6893
|
interface CreateCustomMsgParameters {
|
|
@@ -6968,6 +7008,10 @@ export declare namespace EasemobChat {
|
|
|
6968
7008
|
deliverOnlineOnly?: boolean;
|
|
6969
7009
|
/** The list of message recipients. */
|
|
6970
7010
|
receiverList?: string[];
|
|
7011
|
+
/** Has the message been read (only single chat messages have this field). */
|
|
7012
|
+
isRead?: boolean;
|
|
7013
|
+
/** Has the message been delivered (only single chat messages have this field). */
|
|
7014
|
+
isDelivered?: boolean;
|
|
6971
7015
|
}
|
|
6972
7016
|
|
|
6973
7017
|
interface CreateLocationMsgParameters {
|
|
@@ -7112,6 +7156,10 @@ export declare namespace EasemobChat {
|
|
|
7112
7156
|
* - (Default) `false`: The message is delivered when the recipient(s) is/are online. If the recipient(s) is/are offline, the message will not be delivered to them until they get online.
|
|
7113
7157
|
*/
|
|
7114
7158
|
deliverOnlineOnly?: boolean;
|
|
7159
|
+
/** Has the message been read (only single chat messages have this field). */
|
|
7160
|
+
isRead?: boolean;
|
|
7161
|
+
/** Has the message been delivered (only single chat messages have this field). */
|
|
7162
|
+
isDelivered?: boolean;
|
|
7115
7163
|
}
|
|
7116
7164
|
|
|
7117
7165
|
interface CreateFileMsgParameters {
|
|
@@ -7258,6 +7306,10 @@ export declare namespace EasemobChat {
|
|
|
7258
7306
|
thumbnailWidth?: number;
|
|
7259
7307
|
/** The thumbnail height. */
|
|
7260
7308
|
thumbnailHeight?: number;
|
|
7309
|
+
/** Has the message been read (only single chat messages have this field). */
|
|
7310
|
+
isRead?: boolean;
|
|
7311
|
+
/** Has the message been delivered (only single chat messages have this field). */
|
|
7312
|
+
isDelivered?: boolean;
|
|
7261
7313
|
}
|
|
7262
7314
|
|
|
7263
7315
|
interface CreateImgMsgParameters {
|
|
@@ -7407,6 +7459,10 @@ export declare namespace EasemobChat {
|
|
|
7407
7459
|
deliverOnlineOnly?: boolean;
|
|
7408
7460
|
/** The list of message recipients. */
|
|
7409
7461
|
receiverList?: string[];
|
|
7462
|
+
/** Has the message been read (only single chat messages have this field). */
|
|
7463
|
+
isRead?: boolean;
|
|
7464
|
+
/** Has the message been delivered (only single chat messages have this field). */
|
|
7465
|
+
isDelivered?: boolean;
|
|
7410
7466
|
}
|
|
7411
7467
|
|
|
7412
7468
|
interface CreateAudioMsgParameters {
|
|
@@ -7556,6 +7612,10 @@ export declare namespace EasemobChat {
|
|
|
7556
7612
|
deliverOnlineOnly?: boolean;
|
|
7557
7613
|
/** The list of message recipients. */
|
|
7558
7614
|
receiverList?: string[];
|
|
7615
|
+
/** Has the message been read (only single chat messages have this field). */
|
|
7616
|
+
isRead?: boolean;
|
|
7617
|
+
/** Has the message been delivered (only single chat messages have this field). */
|
|
7618
|
+
isDelivered?: boolean;
|
|
7559
7619
|
}
|
|
7560
7620
|
|
|
7561
7621
|
interface CreateVideoMsgParameters {
|