easemob-websdk 4.17.1 → 4.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Easemob-chat.d.ts +49 -2
- package/Easemob-chat.js +2 -1
- package/circleSdk/Easemob-chat.d.ts +8066 -0
- package/circleSdk/Easemob-chat.js +1 -0
- package/miniCore/miniCore.js +2 -1
- package/miniProgram/Easemob-chat.js +2 -1
- package/package.json +1 -1
- package/status.d.ts +6 -0
- package/uniApp/Easemob-chat.js +2 -1
package/Easemob-chat.d.ts
CHANGED
|
@@ -278,6 +278,8 @@ export declare namespace EasemobChat {
|
|
|
278
278
|
customOSPlatform?: number;
|
|
279
279
|
/** Customize device name. The device name can only be set through this parameter after configuring customOSPlatform. */
|
|
280
280
|
customDeviceName?: string;
|
|
281
|
+
/** Whether to enable auto login mode. Only supported on uniapp platform. */
|
|
282
|
+
isAutoLogin?: boolean;
|
|
281
283
|
};
|
|
282
284
|
|
|
283
285
|
interface RegisterUserResult extends AsyncResult {
|
|
@@ -1425,12 +1427,18 @@ export declare namespace EasemobChat {
|
|
|
1425
1427
|
WEBIM_CONNCTION_USER_LOGIN_ANOTHER_DEVICE = 206,
|
|
1426
1428
|
/** The user was removed. */
|
|
1427
1429
|
WEBIM_CONNCTION_USER_REMOVED = 207,
|
|
1430
|
+
/** The user is already logged in. */
|
|
1431
|
+
WEBIM_USER_ALREADY_LOGIN = 208,
|
|
1432
|
+
/** The number of devices the user is logged in to exceeds the limit. */
|
|
1433
|
+
USER_LOGIN_TOO_MANY_DEVICES = 214,
|
|
1428
1434
|
/** The password is renewed. */
|
|
1429
1435
|
WEBIM_CONNCTION_USER_KICKED_BY_CHANGE_PASSWORD = 216,
|
|
1430
1436
|
/** The user was kicked off from another device. */
|
|
1431
1437
|
WEBIM_CONNCTION_USER_KICKED_BY_OTHER_DEVICE = 217,
|
|
1432
1438
|
/** Global muted. */
|
|
1433
1439
|
USER_MUTED_BY_ADMIN = 219,
|
|
1440
|
+
/** The user device is changed. */
|
|
1441
|
+
USER_DEVICE_CHANGED = 220,
|
|
1434
1442
|
/**
|
|
1435
1443
|
* The user is not on your contact list, and you cannot send messages to him or her.
|
|
1436
1444
|
* Note: You can send messages to strangers by default. This error occurs only when you enable the function of allowing to send messages only to your contacts.
|
|
@@ -1587,6 +1595,7 @@ export declare namespace EasemobChat {
|
|
|
1587
1595
|
*/
|
|
1588
1596
|
onPresence?: (msg: PresenceMsg) => void;
|
|
1589
1597
|
onTextMessage?: (msg: TextMsgBody) => void;
|
|
1598
|
+
onStreamMessage?: (msg: StreamMsgBody) => void;
|
|
1590
1599
|
onPictureMessage?: (msg: ImgMsgBody) => void;
|
|
1591
1600
|
onAudioMessage?: (msg: AudioMsgBody) => void;
|
|
1592
1601
|
onVideoMessage?: (msg: VideoMsgBody) => void;
|
|
@@ -5995,6 +6004,7 @@ export declare namespace EasemobChat {
|
|
|
5995
6004
|
| 'onReadMessage'
|
|
5996
6005
|
| 'onRecallMessage'
|
|
5997
6006
|
| 'onChannelMessage'
|
|
6007
|
+
| 'onStreamMessage'
|
|
5998
6008
|
| 'onError'
|
|
5999
6009
|
| 'onOffline'
|
|
6000
6010
|
| 'onOnline'
|
|
@@ -6199,6 +6209,8 @@ export declare namespace EasemobChat {
|
|
|
6199
6209
|
) => void;
|
|
6200
6210
|
/** The callback to receive a text message. */
|
|
6201
6211
|
onTextMessage?: (msg: TextMsgBody) => void;
|
|
6212
|
+
/** The callback to receive a stream message. */
|
|
6213
|
+
onStreamMessage?: (msg: StreamMsgBody) => void;
|
|
6202
6214
|
/** The callback to receive a image message. */
|
|
6203
6215
|
onImageMessage?: (msg: ImgMsgBody) => void;
|
|
6204
6216
|
/** The callback to receive a audio message. */
|
|
@@ -6837,6 +6849,39 @@ export declare namespace EasemobChat {
|
|
|
6837
6849
|
receiverList?: string[];
|
|
6838
6850
|
}
|
|
6839
6851
|
|
|
6852
|
+
interface StreamChunk {
|
|
6853
|
+
/** The custom type. */
|
|
6854
|
+
customType: string;
|
|
6855
|
+
/** The sequence number. */
|
|
6856
|
+
seq: number;
|
|
6857
|
+
/** The status. */
|
|
6858
|
+
status: StreamStatus;
|
|
6859
|
+
/** The error type. */
|
|
6860
|
+
errorType: number;
|
|
6861
|
+
/** The text. */
|
|
6862
|
+
text: string; // 增量内容
|
|
6863
|
+
/** The finish reason. */
|
|
6864
|
+
finishReason?: number;
|
|
6865
|
+
}
|
|
6866
|
+
|
|
6867
|
+
enum StreamStatus {
|
|
6868
|
+
/** The stream start. */
|
|
6869
|
+
START = 0,
|
|
6870
|
+
/** The stream start and completed. */
|
|
6871
|
+
START_AND_COMPLETED = 1,
|
|
6872
|
+
/** The stream in progress. */
|
|
6873
|
+
IN_PROGRESS = 2,
|
|
6874
|
+
/** The stream completed. */
|
|
6875
|
+
COMPLETED = 3,
|
|
6876
|
+
/** The stream error. */
|
|
6877
|
+
ERROR = 4,
|
|
6878
|
+
}
|
|
6879
|
+
|
|
6880
|
+
interface StreamMsgBody extends TextMsgBody {
|
|
6881
|
+
/** The stream chunk. */
|
|
6882
|
+
stream: Omit<StreamChunk, 'seq'>;
|
|
6883
|
+
}
|
|
6884
|
+
|
|
6840
6885
|
interface CombineMsgBody {
|
|
6841
6886
|
/** The message ID. */
|
|
6842
6887
|
id: string;
|
|
@@ -8005,7 +8050,8 @@ export declare namespace EasemobChat {
|
|
|
8005
8050
|
| VideoMsgBody
|
|
8006
8051
|
| FileMsgBody
|
|
8007
8052
|
| ReadMsgBody
|
|
8008
|
-
| CombineMsgBody
|
|
8053
|
+
| CombineMsgBody
|
|
8054
|
+
| StreamMsgBody;
|
|
8009
8055
|
|
|
8010
8056
|
type MessageSetParameters =
|
|
8011
8057
|
| ReadMsgSetParameters
|
|
@@ -8046,7 +8092,8 @@ export declare namespace EasemobChat {
|
|
|
8046
8092
|
| AudioMsgBody
|
|
8047
8093
|
| VideoMsgBody
|
|
8048
8094
|
| FileMsgBody
|
|
8049
|
-
| CombineMsgBody
|
|
8095
|
+
| CombineMsgBody
|
|
8096
|
+
| StreamMsgBody;
|
|
8050
8097
|
|
|
8051
8098
|
type MessagePriority = 'high' | 'normal' | 'low';
|
|
8052
8099
|
interface MetaExts {
|