easemob-websdk 4.1.5 → 4.1.7-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 +18 -0
- package/Easemob-chat.d.ts +295 -116
- package/Easemob-chat.js +1 -1
- package/chatroom/chatroom.js +1 -1
- package/contact/contact.d.ts +73 -20
- package/contact/contact.js +1 -1
- package/group/group.js +1 -1
- package/message/audio.d.ts +8 -4
- package/message/channel.d.ts +4 -4
- package/message/cmd.d.ts +8 -4
- package/message/custom.d.ts +6 -4
- package/message/delivery.d.ts +4 -4
- package/message/file.d.ts +6 -4
- package/message/img.d.ts +10 -4
- package/message/location.d.ts +6 -4
- package/message/read.d.ts +4 -4
- package/message/text.d.ts +8 -4
- package/message/video.d.ts +8 -4
- package/miniCore/miniCore.js +1 -1
- package/miniProgram/Easemob-chat.js +1 -1
- package/package.json +1 -1
- package/presence/presence.js +1 -1
- package/types/engineCore.d.ts +15 -0
- package/types/indexApi.d.ts +49 -23
- package/types/status.d.ts +6 -0
- package/uniApp/Easemob-chat.js +1 -1
package/Easemob-chat.d.ts
CHANGED
|
@@ -57,13 +57,6 @@ export declare namespace EasemobChat {
|
|
|
57
57
|
jid: Jid;
|
|
58
58
|
}
|
|
59
59
|
|
|
60
|
-
interface SendMsgResult {
|
|
61
|
-
/** The message local ID. */
|
|
62
|
-
localMsgId: string;
|
|
63
|
-
/** The ID of the message on the server. */
|
|
64
|
-
serverMsgId: string;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
60
|
// eventHandle types
|
|
68
61
|
type OnPresenceMsgType =
|
|
69
62
|
| 'rmChatRoomMute'
|
|
@@ -166,8 +159,23 @@ export declare namespace EasemobChat {
|
|
|
166
159
|
userId: UserId;
|
|
167
160
|
}
|
|
168
161
|
|
|
162
|
+
interface ConversationChangedInfo {
|
|
163
|
+
/** The multi-device conversation event. */
|
|
164
|
+
operation:
|
|
165
|
+
| 'pinnedConversation'
|
|
166
|
+
| 'unpinnedConversation'
|
|
167
|
+
| 'deleteConversation';
|
|
168
|
+
/** The conversation ID. */
|
|
169
|
+
conversationId: string;
|
|
170
|
+
/** The conversation type. */
|
|
171
|
+
conversationType: 'singleChat' | 'groupChat';
|
|
172
|
+
/** The UNIX timestamp of the current operation. The unit is millisecond.*/
|
|
173
|
+
timestamp: number;
|
|
174
|
+
}
|
|
175
|
+
|
|
169
176
|
type MultiDeviceEvent =
|
|
170
177
|
| ThreadMultiDeviceInfo
|
|
178
|
+
| ConversationChangedInfo
|
|
171
179
|
| RoamingDeleteMultiDeviceInfo
|
|
172
180
|
| GroupMemberAttributesUpdateMultiDeviceInfo;
|
|
173
181
|
|
|
@@ -657,19 +665,19 @@ export declare namespace EasemobChat {
|
|
|
657
665
|
interface UpdateOwnUserInfoParams {
|
|
658
666
|
/** The nickname. */
|
|
659
667
|
nickname?: string;
|
|
660
|
-
/** The avatar
|
|
668
|
+
/** The avatar URL. */
|
|
661
669
|
avatarurl?: string;
|
|
662
|
-
/** The email. */
|
|
670
|
+
/** The email address. */
|
|
663
671
|
mail?: string;
|
|
664
672
|
/** The phone number. */
|
|
665
673
|
phone?: string;
|
|
666
|
-
/** Gender. */
|
|
667
|
-
gender?: string;
|
|
668
|
-
/**
|
|
674
|
+
/** Gender. You can define it with the following type: string, number, boolean. */
|
|
675
|
+
gender?: string | number | boolean;
|
|
676
|
+
/** Signature. */
|
|
669
677
|
sign?: string;
|
|
670
678
|
/** Birthday. */
|
|
671
679
|
birth?: string;
|
|
672
|
-
/** Extension. */
|
|
680
|
+
/** Extension. You can define it with the following type: string, number, boolean. */
|
|
673
681
|
ext?: string;
|
|
674
682
|
}
|
|
675
683
|
|
|
@@ -691,24 +699,24 @@ export declare namespace EasemobChat {
|
|
|
691
699
|
}
|
|
692
700
|
|
|
693
701
|
interface BaseUserInfo {
|
|
694
|
-
/** Whether the current user is enabled.
|
|
702
|
+
/** Whether the current user is enabled. - `true`: Yes; - `false`: No.*/
|
|
695
703
|
activated: boolean;
|
|
696
|
-
/** The
|
|
704
|
+
/** The timestamp when the current user is created. */
|
|
697
705
|
created: number;
|
|
698
|
-
/** The time when
|
|
706
|
+
/** The time when the user information is last modified. */
|
|
699
707
|
modified: number;
|
|
700
|
-
/**
|
|
708
|
+
/** The display name in the message push notification. */
|
|
701
709
|
nickname: string;
|
|
702
710
|
/** The user type. */
|
|
703
711
|
type: string;
|
|
704
712
|
/** The user ID. */
|
|
705
713
|
username: string;
|
|
706
|
-
/** The user uuid. */
|
|
714
|
+
/** The user uuid on the server. */
|
|
707
715
|
uuid: string;
|
|
708
716
|
}
|
|
709
717
|
|
|
710
718
|
interface PushInfo {
|
|
711
|
-
/** The device
|
|
719
|
+
/** The device ID, used to identify a device, which can be customized.*/
|
|
712
720
|
device_id: string;
|
|
713
721
|
/** The push token, which can be defined by yourself, is generally used to identify the same device. */
|
|
714
722
|
device_token: string;
|
|
@@ -717,14 +725,14 @@ export declare namespace EasemobChat {
|
|
|
717
725
|
}
|
|
718
726
|
|
|
719
727
|
interface UploadTokenResult extends BaseUserInfo {
|
|
720
|
-
/** The push
|
|
728
|
+
/** The push information. */
|
|
721
729
|
pushInfo: PushInfo[];
|
|
722
730
|
}
|
|
723
731
|
|
|
724
732
|
interface SessionInfo {
|
|
725
|
-
/** The
|
|
733
|
+
/** The conversation ID. */
|
|
726
734
|
channel_id: string;
|
|
727
|
-
/** The last message
|
|
735
|
+
/** The content of the last message.*/
|
|
728
736
|
meta: {
|
|
729
737
|
/** The message sender. */
|
|
730
738
|
from: string;
|
|
@@ -732,19 +740,78 @@ export declare namespace EasemobChat {
|
|
|
732
740
|
id: string;
|
|
733
741
|
/** The message content. */
|
|
734
742
|
payload: string;
|
|
735
|
-
/** The time
|
|
743
|
+
/** The time when the message is received. */
|
|
736
744
|
timestamp: number;
|
|
737
|
-
/**
|
|
745
|
+
/** The message recipient. */
|
|
738
746
|
to: string;
|
|
739
747
|
};
|
|
740
748
|
/** The number of unread messages. */
|
|
741
749
|
unread_num: number;
|
|
742
750
|
}
|
|
743
751
|
|
|
752
|
+
interface ConversationList {
|
|
753
|
+
/** The conversation ID. */
|
|
754
|
+
channel_id: string;
|
|
755
|
+
/** Overview of the latest news. */
|
|
756
|
+
lastMessage: MessageBody | Record<string, never>;
|
|
757
|
+
/** The number of unread messages. */
|
|
758
|
+
unread_num: number;
|
|
759
|
+
}
|
|
760
|
+
interface ConversationInfo {
|
|
761
|
+
/** The conversation list. */
|
|
762
|
+
channel_infos: ConversationList[];
|
|
763
|
+
}
|
|
744
764
|
interface DeleteSessionResult {
|
|
745
765
|
/** The result of request. */
|
|
746
766
|
result: 'ok';
|
|
747
767
|
}
|
|
768
|
+
|
|
769
|
+
interface SendMsgResult {
|
|
770
|
+
/** The local ID of the message. */
|
|
771
|
+
localMsgId: string;
|
|
772
|
+
/** The message ID on the server. */
|
|
773
|
+
serverMsgId: string;
|
|
774
|
+
}
|
|
775
|
+
|
|
776
|
+
interface HistoryMessages {
|
|
777
|
+
/** The position from which to start getting data for the next query. If the number of returned data entries is smaller than that specified in the request, the cursor is an empty string (''), which indicates that the current page is the last page; otherwise, the SDK returns the specific cursor position which indicates where to start getting data for the next query. */
|
|
778
|
+
cursor?: string;
|
|
779
|
+
/** The historical messages. */
|
|
780
|
+
messages: MessagesType[];
|
|
781
|
+
/** Whether it is the last page of data.
|
|
782
|
+
* - `true`: Yes;
|
|
783
|
+
* - `false`: No.
|
|
784
|
+
* If the number of data entries is smaller than the message count set in the request, `false` is returned; otherwise, `true` is returned.
|
|
785
|
+
*/
|
|
786
|
+
isLast: boolean;
|
|
787
|
+
}
|
|
788
|
+
|
|
789
|
+
interface ServerConversations {
|
|
790
|
+
/** The conversation list. */
|
|
791
|
+
conversations: ConversationItem[];
|
|
792
|
+
/** The position from which to start getting data for the next query. If the number of returned data entries is smaller than that specified in the request, the cursor is `'undefined'`, which indicates that the current page is the last page; otherwise, the SDK returns the specific cursor position which indicates where to start getting data for the next query.*/
|
|
793
|
+
cursor: string;
|
|
794
|
+
}
|
|
795
|
+
interface ConversationItem {
|
|
796
|
+
/** The conversation ID. */
|
|
797
|
+
conversationId: string;
|
|
798
|
+
/** The conversation type. */
|
|
799
|
+
conversationType: 'singleChat' | 'groupChat';
|
|
800
|
+
/** Whether the conversation is pinned. `true`: pinned; `false`: unpinned. */
|
|
801
|
+
isPinned: boolean;
|
|
802
|
+
/** The UNIX timestamp when the conversation is pinned. The unit is millisecond. This value is `0` when conversation is not pinned. */
|
|
803
|
+
pinnedTime: number;
|
|
804
|
+
/** Overview of the latest message. */
|
|
805
|
+
lastMessage: MessageBody | Record<string, never> | null;
|
|
806
|
+
/** The number of unread messages. */
|
|
807
|
+
unReadCount: number;
|
|
808
|
+
}
|
|
809
|
+
interface PinConversation {
|
|
810
|
+
/** Whether the conversation is pinned. `true`: pinned; `false`: unpinned.*/
|
|
811
|
+
isPinned: boolean;
|
|
812
|
+
/** The UNIX timestamp when the conversation is pinned. The unit is millisecond. This value is `0` when the conversation is not pinned. */
|
|
813
|
+
pinnedTime: number;
|
|
814
|
+
}
|
|
748
815
|
// The contact api result end.
|
|
749
816
|
|
|
750
817
|
interface LoginResult {
|
|
@@ -971,24 +1038,6 @@ export declare namespace EasemobChat {
|
|
|
971
1038
|
/** The creation time. */
|
|
972
1039
|
createTimestamp?: number;
|
|
973
1040
|
}
|
|
974
|
-
interface HistoryMessages {
|
|
975
|
-
//** 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 empty string, the data of the first page will be fetched.*/
|
|
976
|
-
cursor?: string;
|
|
977
|
-
/** The Historical messages. */
|
|
978
|
-
messages: MessageBody[];
|
|
979
|
-
}
|
|
980
|
-
interface ConversationList {
|
|
981
|
-
/** The conversation ID. */
|
|
982
|
-
channel_id: string;
|
|
983
|
-
/** Overview of the latest news. */
|
|
984
|
-
lastMessage: MessageBody | Record<string, never>;
|
|
985
|
-
/** The number of unread messages. */
|
|
986
|
-
unread_num: number;
|
|
987
|
-
}
|
|
988
|
-
interface ConversationInfo {
|
|
989
|
-
/** The conversation list. */
|
|
990
|
-
channel_infos: ConversationList[];
|
|
991
|
-
}
|
|
992
1041
|
|
|
993
1042
|
interface SilentModeConversationType {
|
|
994
1043
|
/** Silent mode type. */
|
|
@@ -1255,6 +1304,8 @@ export declare namespace EasemobChat {
|
|
|
1255
1304
|
THREAD_NOT_EXIST = 1300,
|
|
1256
1305
|
/** Chat thread already exists. */
|
|
1257
1306
|
THREAD_ALREADY_EXIST = 1301,
|
|
1307
|
+
/** The current conversation not exist . */
|
|
1308
|
+
CONVERSATION_NOT_EXIST = 1400,
|
|
1258
1309
|
}
|
|
1259
1310
|
|
|
1260
1311
|
/**
|
|
@@ -3927,7 +3978,7 @@ export declare namespace EasemobChat {
|
|
|
3927
3978
|
>;
|
|
3928
3979
|
|
|
3929
3980
|
/**
|
|
3930
|
-
* Gets the conversation list and the latest message
|
|
3981
|
+
* Gets the conversation list and the latest message in the conversation.
|
|
3931
3982
|
*
|
|
3932
3983
|
* ```typescript
|
|
3933
3984
|
* connection.getConversationlist()
|
|
@@ -3936,9 +3987,9 @@ export declare namespace EasemobChat {
|
|
|
3936
3987
|
getConversationlist(
|
|
3937
3988
|
this: Connection,
|
|
3938
3989
|
params?: {
|
|
3939
|
-
/** The page number, starting from 1. */
|
|
3990
|
+
/** The current page number, starting from 1. */
|
|
3940
3991
|
pageNum?: number;
|
|
3941
|
-
/** The number of
|
|
3992
|
+
/** The number of conversations that you expect to get on each page. The value cannot exceed 20. */
|
|
3942
3993
|
pageSize?: number;
|
|
3943
3994
|
success?: (res: AsyncResult<ConversationInfo>) => void;
|
|
3944
3995
|
error?: (error: ErrorEvent) => void;
|
|
@@ -3947,7 +3998,7 @@ export declare namespace EasemobChat {
|
|
|
3947
3998
|
|
|
3948
3999
|
/**
|
|
3949
4000
|
* @deprecated Use Use {@link deleteConversation} instead.
|
|
3950
|
-
* Delete the
|
|
4001
|
+
* Delete the conversation.
|
|
3951
4002
|
*
|
|
3952
4003
|
* ```typescript
|
|
3953
4004
|
* connection.deleteSession()
|
|
@@ -3956,14 +4007,14 @@ export declare namespace EasemobChat {
|
|
|
3956
4007
|
deleteSession(
|
|
3957
4008
|
this: Connection,
|
|
3958
4009
|
params: {
|
|
3959
|
-
/** The conversation ID: the peer
|
|
4010
|
+
/** The conversation ID: The user ID of the peer user or group ID. */
|
|
3960
4011
|
channel: string;
|
|
3961
4012
|
/** The conversation type.
|
|
3962
4013
|
* - `singleChat`: one-to-one chat;
|
|
3963
4014
|
* - `groupChat`: group chat.
|
|
3964
4015
|
*/
|
|
3965
4016
|
chatType: 'singleChat' | 'groupChat';
|
|
3966
|
-
/** Whether to delete
|
|
4017
|
+
/** Whether to delete historical messages on the server during conversation deletion.
|
|
3967
4018
|
* - `true`: Yes;
|
|
3968
4019
|
* - `false`: No.
|
|
3969
4020
|
*/
|
|
@@ -3983,14 +4034,14 @@ export declare namespace EasemobChat {
|
|
|
3983
4034
|
deleteConversation(
|
|
3984
4035
|
this: Connection,
|
|
3985
4036
|
params: {
|
|
3986
|
-
/** The conversation ID: the peer
|
|
4037
|
+
/** The conversation ID: The user ID of the peer user or group ID. */
|
|
3987
4038
|
channel: string;
|
|
3988
4039
|
/** The conversation type.
|
|
3989
4040
|
* - `singleChat`: one-to-one chat;
|
|
3990
4041
|
* - `groupChat`: group chat.
|
|
3991
4042
|
*/
|
|
3992
4043
|
chatType: 'singleChat' | 'groupChat';
|
|
3993
|
-
/** Whether to delete
|
|
4044
|
+
/** Whether to delete historical messages on the server during conversation deletion.
|
|
3994
4045
|
* - `true`: Yes;
|
|
3995
4046
|
* - `false`: No.
|
|
3996
4047
|
*/
|
|
@@ -4111,7 +4162,7 @@ export declare namespace EasemobChat {
|
|
|
4111
4162
|
cursor?: number | string | null;
|
|
4112
4163
|
/** The number of messages to retrieve each time. The default value is 20,The maximum value is 50. */
|
|
4113
4164
|
pageSize?: number;
|
|
4114
|
-
/** The chat type:
|
|
4165
|
+
/** The chat type for SDK:
|
|
4115
4166
|
* - `singleChat`: one-to-one chat;
|
|
4116
4167
|
* - `groupChat`: group chat;
|
|
4117
4168
|
* - (Default)`singleChat`: No.
|
|
@@ -4142,7 +4193,7 @@ export declare namespace EasemobChat {
|
|
|
4142
4193
|
): Promise<HistoryMessages>;
|
|
4143
4194
|
|
|
4144
4195
|
/**
|
|
4145
|
-
*
|
|
4196
|
+
* Unidirectionally deletes historical messages from the server.
|
|
4146
4197
|
*
|
|
4147
4198
|
* ```typescript
|
|
4148
4199
|
* connection.removeHistoryMessages({targetId: 'userId', chatType: 'singleChat', time: Date.now()})
|
|
@@ -4161,9 +4212,9 @@ export declare namespace EasemobChat {
|
|
|
4161
4212
|
* - `groupChat`: group chat.
|
|
4162
4213
|
*/
|
|
4163
4214
|
chatType: 'singleChat' | 'groupChat';
|
|
4164
|
-
/**
|
|
4215
|
+
/** The ID list of messages to be deleted. A maximum of 20 message IDs can be passed in. */
|
|
4165
4216
|
messageIds?: Array<string>;
|
|
4166
|
-
/** The starting
|
|
4217
|
+
/** The starting timestamp for message deletion. Messages with the timestamp before the specified one will be deleted. */
|
|
4167
4218
|
beforeTimeStamp?: number;
|
|
4168
4219
|
}
|
|
4169
4220
|
): Promise<void>;
|
|
@@ -4175,7 +4226,11 @@ export declare namespace EasemobChat {
|
|
|
4175
4226
|
* connection.addContact('user1', 'I am Bob')
|
|
4176
4227
|
* ```
|
|
4177
4228
|
*/
|
|
4178
|
-
addContact(
|
|
4229
|
+
addContact(
|
|
4230
|
+
this: Connection,
|
|
4231
|
+
to: string,
|
|
4232
|
+
message?: string
|
|
4233
|
+
): Promise<void>;
|
|
4179
4234
|
|
|
4180
4235
|
/**
|
|
4181
4236
|
* Deletes the contact.
|
|
@@ -4184,10 +4239,10 @@ export declare namespace EasemobChat {
|
|
|
4184
4239
|
* connection.deleteContact('user1')
|
|
4185
4240
|
* ```
|
|
4186
4241
|
*/
|
|
4187
|
-
deleteContact(this: Connection, to: string): void
|
|
4242
|
+
deleteContact(this: Connection, to: string): Promise<void>;
|
|
4188
4243
|
|
|
4189
4244
|
/** @deprecated Use {@link acceptContactInvite} instead. */
|
|
4190
|
-
acceptInvitation(this: Connection, to: string): void
|
|
4245
|
+
acceptInvitation(this: Connection, to: string): Promise<void>;
|
|
4191
4246
|
|
|
4192
4247
|
/**
|
|
4193
4248
|
* Accepts a friend request.
|
|
@@ -4196,10 +4251,10 @@ export declare namespace EasemobChat {
|
|
|
4196
4251
|
* connection.acceptContactInvite('user1')
|
|
4197
4252
|
* ```
|
|
4198
4253
|
*/
|
|
4199
|
-
acceptContactInvite(this: Connection, to: string): void
|
|
4254
|
+
acceptContactInvite(this: Connection, to: string): Promise<void>;
|
|
4200
4255
|
|
|
4201
4256
|
/** @deprecated Use {@link declineContactInvite} instead. */
|
|
4202
|
-
declineInvitation(this: Connection, to: string): void
|
|
4257
|
+
declineInvitation(this: Connection, to: string): Promise<void>;
|
|
4203
4258
|
|
|
4204
4259
|
/**
|
|
4205
4260
|
* Declines a friend request.
|
|
@@ -4208,7 +4263,7 @@ export declare namespace EasemobChat {
|
|
|
4208
4263
|
* connection.declineContactInvite('user1')
|
|
4209
4264
|
* ```
|
|
4210
4265
|
*/
|
|
4211
|
-
declineContactInvite(this: Connection, to: string): void
|
|
4266
|
+
declineContactInvite(this: Connection, to: string): Promise<void>;
|
|
4212
4267
|
|
|
4213
4268
|
/** @deprecated Use {@link addUsersToBlocklist} instead. */
|
|
4214
4269
|
addToBlackList(
|
|
@@ -4217,7 +4272,7 @@ export declare namespace EasemobChat {
|
|
|
4217
4272
|
/** The user ID. You can type a specific user ID to add a single user to the blocklist or type an array of user IDs, like ["user1","user2"], to add multiple users. */
|
|
4218
4273
|
name: UserId | UserId[];
|
|
4219
4274
|
}
|
|
4220
|
-
): void
|
|
4275
|
+
): Promise<void>;
|
|
4221
4276
|
|
|
4222
4277
|
/**
|
|
4223
4278
|
* @deprecated Use {@link addUsersToBlocklist} instead.
|
|
@@ -4228,7 +4283,7 @@ export declare namespace EasemobChat {
|
|
|
4228
4283
|
/** The user ID. You can type a specific user ID to add a single user to the blocklist or type an array of user IDs, like ["user1","user2"], to add multiple users. */
|
|
4229
4284
|
name: UserId | UserId[];
|
|
4230
4285
|
}
|
|
4231
|
-
): void
|
|
4286
|
+
): Promise<void>;
|
|
4232
4287
|
|
|
4233
4288
|
/**
|
|
4234
4289
|
* Adds a contact to the blocklist.
|
|
@@ -4243,7 +4298,7 @@ export declare namespace EasemobChat {
|
|
|
4243
4298
|
/** The user ID. You can type a specific user ID to add a single user to the blocklist or type an array of user IDs, like ["user1","user2"], to add multiple users. */
|
|
4244
4299
|
name: UserId | UserId[];
|
|
4245
4300
|
}
|
|
4246
|
-
): void
|
|
4301
|
+
): Promise<void>;
|
|
4247
4302
|
|
|
4248
4303
|
/** @deprecated Use {@link removeUserFromBlackList} instead. */
|
|
4249
4304
|
removeFromBlackList(
|
|
@@ -4252,7 +4307,7 @@ export declare namespace EasemobChat {
|
|
|
4252
4307
|
/** The user ID. You can type a specific user ID to remove a single user from the blocklist or type an array of user IDs, like ["user1","user2"], to remove multiple users. */
|
|
4253
4308
|
name: UserId | UserId[];
|
|
4254
4309
|
}
|
|
4255
|
-
): void
|
|
4310
|
+
): Promise<void>;
|
|
4256
4311
|
|
|
4257
4312
|
/**
|
|
4258
4313
|
* @deprecated Use {@link removeUserFromBlackList} instead.
|
|
@@ -4263,7 +4318,7 @@ export declare namespace EasemobChat {
|
|
|
4263
4318
|
/** The user ID. You can type a specific user ID to remove a single user from the blocklist or type an array of user IDs, like ["user1","user2"], to remove multiple users. */
|
|
4264
4319
|
name: UserId | UserId[];
|
|
4265
4320
|
}
|
|
4266
|
-
): void
|
|
4321
|
+
): Promise<void>;
|
|
4267
4322
|
|
|
4268
4323
|
/**
|
|
4269
4324
|
* Removes contacts from the blocklist.
|
|
@@ -4278,7 +4333,7 @@ export declare namespace EasemobChat {
|
|
|
4278
4333
|
/** The user ID. You can type a specific user ID to remove a single user from the blocklist or type an array of user IDs, like ["user1","user2"], to remove multiple users. */
|
|
4279
4334
|
name: UserId | UserId[];
|
|
4280
4335
|
}
|
|
4281
|
-
): void
|
|
4336
|
+
): Promise<void>;
|
|
4282
4337
|
|
|
4283
4338
|
/**
|
|
4284
4339
|
* Recalls a message.
|
|
@@ -4302,11 +4357,11 @@ export declare namespace EasemobChat {
|
|
|
4302
4357
|
type?: 'chat' | 'groupchat' | 'chatroom';
|
|
4303
4358
|
/** The chat type for SDK new:
|
|
4304
4359
|
* - `singleChat`: one-to-one chat;
|
|
4305
|
-
* - `
|
|
4360
|
+
* - `groupChat`: group chat;
|
|
4306
4361
|
* - `chatroom`: chat room.
|
|
4307
4362
|
*/
|
|
4308
4363
|
chatType?: 'singleChat' | 'groupChat' | 'chatRoom';
|
|
4309
|
-
/**
|
|
4364
|
+
/** Whether the message is in the thread. */
|
|
4310
4365
|
isChatThread?: boolean;
|
|
4311
4366
|
success?: (res: number) => void;
|
|
4312
4367
|
fail?: (error: ErrorEvent) => void;
|
|
@@ -4650,7 +4705,7 @@ export declare namespace EasemobChat {
|
|
|
4650
4705
|
): Promise<AsyncResult<ChatThreadDetail>>;
|
|
4651
4706
|
|
|
4652
4707
|
/**
|
|
4653
|
-
* Reports
|
|
4708
|
+
* Reports an inappropriate message.
|
|
4654
4709
|
*
|
|
4655
4710
|
* ```typescript
|
|
4656
4711
|
* reportMessage({reportType: 'adult', reportReason: 'reason', messageId: 'id'})
|
|
@@ -4659,15 +4714,75 @@ export declare namespace EasemobChat {
|
|
|
4659
4714
|
reportMessage(
|
|
4660
4715
|
this: Connection,
|
|
4661
4716
|
params: {
|
|
4662
|
-
/** The type of
|
|
4717
|
+
/** The type of reporting. */
|
|
4663
4718
|
reportType: string;
|
|
4664
|
-
/** The reason for reporting. */
|
|
4719
|
+
/** The reason for reporting. You need to type a specific reason. */
|
|
4665
4720
|
reportReason: string;
|
|
4666
|
-
/** ID of the message to
|
|
4721
|
+
/** The ID of the message to report. */
|
|
4667
4722
|
messageId: string;
|
|
4668
4723
|
}
|
|
4669
4724
|
): Promise<void>;
|
|
4670
4725
|
|
|
4726
|
+
/**
|
|
4727
|
+
* Gets the list of conversations from the server with pagination.
|
|
4728
|
+
*
|
|
4729
|
+
* The SDK returns the list of conversations in the reverse chronological order of their active time (the timestamp of the last message).
|
|
4730
|
+
*
|
|
4731
|
+
* If there is no message in the conversation, the SDK retrieves the list of conversations in the reverse chronological order of their creation time.
|
|
4732
|
+
*
|
|
4733
|
+
* ```typescript
|
|
4734
|
+
* connection.getServerConversations({pageSize:50, cursor: ''})
|
|
4735
|
+
* ```
|
|
4736
|
+
*/
|
|
4737
|
+
getServerConversations(
|
|
4738
|
+
this: any,
|
|
4739
|
+
params: {
|
|
4740
|
+
/** The number of conversations that you expect to get on each page. The value range is [1,50] and the default value is `20`. */
|
|
4741
|
+
pageSize?: number;
|
|
4742
|
+
/** The position from which to start getting data. If you set `cursor` to an empty string (''), the SDK retrieves conversations from the latest active one.*/
|
|
4743
|
+
cursor?: string;
|
|
4744
|
+
}
|
|
4745
|
+
): Promise<AsyncResult<ServerConversations>>;
|
|
4746
|
+
/**
|
|
4747
|
+
* Get the list of pinned conversations from the server with pagination.
|
|
4748
|
+
*
|
|
4749
|
+
* The SDK returns the pinned conversations in the reverse chronological order of their pinning.
|
|
4750
|
+
*
|
|
4751
|
+
* ```typescript
|
|
4752
|
+
* connection.getServerPinnedConversations({pageSize:50, cursor: ''})
|
|
4753
|
+
* ```
|
|
4754
|
+
*/
|
|
4755
|
+
getServerPinnedConversations(
|
|
4756
|
+
this: any,
|
|
4757
|
+
params: {
|
|
4758
|
+
/** The number of conversations that you expect to get on each page. The value range is [1,50] and the default value is `20`. */
|
|
4759
|
+
pageSize?: number;
|
|
4760
|
+
/** The position from which to start getting data. If you pass in an empty string (''), the SDK retrieves conversations from the latest pinned one.*/
|
|
4761
|
+
cursor?: string;
|
|
4762
|
+
}
|
|
4763
|
+
): Promise<AsyncResult<ServerConversations>>;
|
|
4764
|
+
/**
|
|
4765
|
+
* Sets whether to pin a conversation.
|
|
4766
|
+
*
|
|
4767
|
+
* ```typescript
|
|
4768
|
+
* connection.pinConversation({conversationId:'conversationId',conversationType: 'singleChat', isPinned: boolean})
|
|
4769
|
+
* ```
|
|
4770
|
+
*/
|
|
4771
|
+
pinConversation(
|
|
4772
|
+
this: any,
|
|
4773
|
+
params: {
|
|
4774
|
+
/** The conversation ID. */
|
|
4775
|
+
conversationId: string;
|
|
4776
|
+
/** The conversation type. */
|
|
4777
|
+
conversationType: 'singleChat' | 'groupChat';
|
|
4778
|
+
/** Whether to pin the conversation:
|
|
4779
|
+
* - `true`: Yes.
|
|
4780
|
+
* - `false`: No. The conversation is unpinned.
|
|
4781
|
+
*/
|
|
4782
|
+
isPinned: boolean;
|
|
4783
|
+
}
|
|
4784
|
+
): Promise<AsyncResult<PinConversation>>;
|
|
4785
|
+
|
|
4671
4786
|
/**
|
|
4672
4787
|
* Set the DND Settings for the current login user.
|
|
4673
4788
|
*
|
|
@@ -5613,8 +5728,8 @@ export declare namespace EasemobChat {
|
|
|
5613
5728
|
/** Message priority. */
|
|
5614
5729
|
priority?: MessagePriority;
|
|
5615
5730
|
/** Whether the message is delivered only when the recipient(s) is/are online:
|
|
5616
|
-
* - `true`: The message is delivered only when the recipient(s) is/are online. If the recipient is offline, the message is
|
|
5617
|
-
* - (Default) `false`: The message is delivered
|
|
5731
|
+
* - `true`: The message is delivered only when the recipient(s) is/are online. If the recipient is offline, the message is discarded.
|
|
5732
|
+
* - (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.
|
|
5618
5733
|
*/
|
|
5619
5734
|
deliverOnlineOnly?: boolean;
|
|
5620
5735
|
}
|
|
@@ -5643,8 +5758,8 @@ export declare namespace EasemobChat {
|
|
|
5643
5758
|
/** Message priority. */
|
|
5644
5759
|
priority?: MessagePriority;
|
|
5645
5760
|
/** Whether the message is delivered only when the recipient(s) is/are online:
|
|
5646
|
-
* - `true`: The message is delivered only when the recipient(s) is/are online. If the recipient is offline, the message is
|
|
5647
|
-
* - (Default) `false`: The message is delivered
|
|
5761
|
+
* - `true`: The message is delivered only when the recipient(s) is/are online. If the recipient is offline, the message is discarded.
|
|
5762
|
+
* - (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.
|
|
5648
5763
|
*/
|
|
5649
5764
|
deliverOnlineOnly?: boolean;
|
|
5650
5765
|
}
|
|
@@ -5683,8 +5798,8 @@ export declare namespace EasemobChat {
|
|
|
5683
5798
|
/** Message priority. */
|
|
5684
5799
|
priority?: MessagePriority;
|
|
5685
5800
|
/** Whether the message is delivered only when the recipient(s) is/are online:
|
|
5686
|
-
* - `true`: The message is delivered only when the recipient(s) is/are online. If the recipient is offline, the message is
|
|
5687
|
-
* - (Default) `false`: The message is delivered
|
|
5801
|
+
* - `true`: The message is delivered only when the recipient(s) is/are online. If the recipient is offline, the message is discarded.
|
|
5802
|
+
* - (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.
|
|
5688
5803
|
*/
|
|
5689
5804
|
deliverOnlineOnly?: boolean;
|
|
5690
5805
|
}
|
|
@@ -5703,8 +5818,8 @@ export declare namespace EasemobChat {
|
|
|
5703
5818
|
/** Message priority. */
|
|
5704
5819
|
priority?: MessagePriority;
|
|
5705
5820
|
/** Whether the message is delivered only when the recipient(s) is/are online:
|
|
5706
|
-
* - `true`: The message is delivered only when the recipient(s) is/are online. If the recipient is offline, the message is
|
|
5707
|
-
* - (Default) `false`: The message is delivered
|
|
5821
|
+
* - `true`: The message is delivered only when the recipient(s) is/are online. If the recipient is offline, the message is discarded.
|
|
5822
|
+
* - (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.
|
|
5708
5823
|
*/
|
|
5709
5824
|
deliverOnlineOnly?: boolean;
|
|
5710
5825
|
}
|
|
@@ -5735,8 +5850,8 @@ export declare namespace EasemobChat {
|
|
|
5735
5850
|
/** Message priority. */
|
|
5736
5851
|
priority?: MessagePriority;
|
|
5737
5852
|
/** Whether the message is delivered only when the recipient(s) is/are online:
|
|
5738
|
-
* - `true`: The message is delivered only when the recipient(s) is/are online. If the recipient is offline, the message is
|
|
5739
|
-
* - (Default) `false`: The message is delivered
|
|
5853
|
+
* - `true`: The message is delivered only when the recipient(s) is/are online. If the recipient is offline, the message is discarded.
|
|
5854
|
+
* - (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.
|
|
5740
5855
|
*/
|
|
5741
5856
|
deliverOnlineOnly?: boolean;
|
|
5742
5857
|
}
|
|
@@ -5764,8 +5879,8 @@ export declare namespace EasemobChat {
|
|
|
5764
5879
|
/** Message priority. */
|
|
5765
5880
|
priority?: MessagePriority;
|
|
5766
5881
|
/** Whether the message is delivered only when the recipient(s) is/are online:
|
|
5767
|
-
* - `true`: The message is delivered only when the recipient(s) is/are online. If the recipient is offline, the message is
|
|
5768
|
-
* - (Default) `false`: The message is delivered
|
|
5882
|
+
* - `true`: The message is delivered only when the recipient(s) is/are online. If the recipient is offline, the message is discarded.
|
|
5883
|
+
* - (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.
|
|
5769
5884
|
*/
|
|
5770
5885
|
deliverOnlineOnly?: boolean;
|
|
5771
5886
|
}
|
|
@@ -5840,10 +5955,13 @@ export declare namespace EasemobChat {
|
|
|
5840
5955
|
/** Message priority. */
|
|
5841
5956
|
priority?: MessagePriority;
|
|
5842
5957
|
/** Whether the message is delivered only when the recipient(s) is/are online:
|
|
5843
|
-
* - `true`: The message is delivered only when the recipient(s) is/are online. If the recipient is offline, the message is
|
|
5844
|
-
* - (Default) `false`: The message is delivered
|
|
5958
|
+
* - `true`: The message is delivered only when the recipient(s) is/are online. If the recipient is offline, the message is discarded.
|
|
5959
|
+
* - (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.
|
|
5845
5960
|
*/
|
|
5846
5961
|
deliverOnlineOnly?: boolean;
|
|
5962
|
+
/** The list of message recipients. */
|
|
5963
|
+
/** 消息接收方列表。 */
|
|
5964
|
+
receiverList?: string[];
|
|
5847
5965
|
}
|
|
5848
5966
|
|
|
5849
5967
|
interface CreateTextMsgParameters {
|
|
@@ -5866,10 +5984,13 @@ export declare namespace EasemobChat {
|
|
|
5866
5984
|
/** Message priority. */
|
|
5867
5985
|
priority?: MessagePriority;
|
|
5868
5986
|
/** Whether the message is delivered only when the recipient(s) is/are online:
|
|
5869
|
-
* - `true`: The message is delivered only when the recipient(s) is/are online. If the recipient is offline, the message is
|
|
5870
|
-
* - (Default) `false`: The message is delivered
|
|
5987
|
+
* - `true`: The message is delivered only when the recipient(s) is/are online. If the recipient is offline, the message is discarded.
|
|
5988
|
+
* - (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.
|
|
5871
5989
|
*/
|
|
5872
5990
|
deliverOnlineOnly?: boolean;
|
|
5991
|
+
/** The list of message recipients. */
|
|
5992
|
+
/** 消息接收方列表。 */
|
|
5993
|
+
receiverList?: string[];
|
|
5873
5994
|
}
|
|
5874
5995
|
|
|
5875
5996
|
interface CmdParameters {
|
|
@@ -5937,10 +6058,13 @@ export declare namespace EasemobChat {
|
|
|
5937
6058
|
/** Message priority. */
|
|
5938
6059
|
priority?: MessagePriority;
|
|
5939
6060
|
/** Whether the message is delivered only when the recipient(s) is/are online:
|
|
5940
|
-
* - `true`: The message is delivered only when the recipient(s) is/are online. If the recipient is offline, the message is
|
|
5941
|
-
* - (Default) `false`: The message is delivered
|
|
6061
|
+
* - `true`: The message is delivered only when the recipient(s) is/are online. If the recipient is offline, the message is discarded.
|
|
6062
|
+
* - (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.
|
|
5942
6063
|
*/
|
|
5943
6064
|
deliverOnlineOnly?: boolean;
|
|
6065
|
+
/** The list of message recipients. */
|
|
6066
|
+
/** 消息接收方列表。 */
|
|
6067
|
+
receiverList?: string[];
|
|
5944
6068
|
}
|
|
5945
6069
|
|
|
5946
6070
|
interface CreateCmdMsgParameters {
|
|
@@ -5965,10 +6089,13 @@ export declare namespace EasemobChat {
|
|
|
5965
6089
|
/** Message priority. */
|
|
5966
6090
|
priority?: MessagePriority;
|
|
5967
6091
|
/** Whether the message is delivered only when the recipient(s) is/are online:
|
|
5968
|
-
* - `true`: The message is delivered only when the recipient(s) is/are online. If the recipient is offline, the message is
|
|
5969
|
-
* - (Default) `false`: The message is delivered
|
|
6092
|
+
* - `true`: The message is delivered only when the recipient(s) is/are online. If the recipient is offline, the message is discarded.
|
|
6093
|
+
* - (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.
|
|
5970
6094
|
*/
|
|
5971
6095
|
deliverOnlineOnly?: boolean;
|
|
6096
|
+
/** The list of message recipients. */
|
|
6097
|
+
/** 消息接收方列表。 */
|
|
6098
|
+
receiverList?: string[];
|
|
5972
6099
|
}
|
|
5973
6100
|
|
|
5974
6101
|
interface CustomParameters {
|
|
@@ -6041,10 +6168,13 @@ export declare namespace EasemobChat {
|
|
|
6041
6168
|
/** Message priority. */
|
|
6042
6169
|
priority?: MessagePriority;
|
|
6043
6170
|
/** Whether the message is delivered only when the recipient(s) is/are online:
|
|
6044
|
-
* - `true`: The message is delivered only when the recipient(s) is/are online. If the recipient is offline, the message is
|
|
6045
|
-
* - (Default) `false`: The message is delivered
|
|
6171
|
+
* - `true`: The message is delivered only when the recipient(s) is/are online. If the recipient is offline, the message is discarded.
|
|
6172
|
+
* - (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.
|
|
6046
6173
|
*/
|
|
6047
6174
|
deliverOnlineOnly?: boolean;
|
|
6175
|
+
/** The list of message recipients. */
|
|
6176
|
+
/** 消息接收方列表。 */
|
|
6177
|
+
receiverList?: string[];
|
|
6048
6178
|
}
|
|
6049
6179
|
|
|
6050
6180
|
interface CreateCustomMsgParameters {
|
|
@@ -6069,10 +6199,13 @@ export declare namespace EasemobChat {
|
|
|
6069
6199
|
/** Message priority. */
|
|
6070
6200
|
priority?: MessagePriority;
|
|
6071
6201
|
/** Whether the message is delivered only when the recipient(s) is/are online:
|
|
6072
|
-
* - `true`: The message is delivered only when the recipient(s) is/are online. If the recipient is offline, the message is
|
|
6073
|
-
* - (Default) `false`: The message is delivered
|
|
6202
|
+
* - `true`: The message is delivered only when the recipient(s) is/are online. If the recipient is offline, the message is discarded.
|
|
6203
|
+
* - (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.
|
|
6074
6204
|
*/
|
|
6075
6205
|
deliverOnlineOnly?: boolean;
|
|
6206
|
+
/** The list of message recipients. */
|
|
6207
|
+
/** 消息接收方列表。 */
|
|
6208
|
+
receiverList?: string[];
|
|
6076
6209
|
}
|
|
6077
6210
|
|
|
6078
6211
|
interface LocationParameters {
|
|
@@ -6153,10 +6286,13 @@ export declare namespace EasemobChat {
|
|
|
6153
6286
|
/** Message priority. */
|
|
6154
6287
|
priority?: MessagePriority;
|
|
6155
6288
|
/** Whether the message is delivered only when the recipient(s) is/are online:
|
|
6156
|
-
* - `true`: The message is delivered only when the recipient(s) is/are online. If the recipient is offline, the message is
|
|
6157
|
-
* - (Default) `false`: The message is delivered
|
|
6289
|
+
* - `true`: The message is delivered only when the recipient(s) is/are online. If the recipient is offline, the message is discarded.
|
|
6290
|
+
* - (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.
|
|
6158
6291
|
*/
|
|
6159
6292
|
deliverOnlineOnly?: boolean;
|
|
6293
|
+
/** The list of message recipients. */
|
|
6294
|
+
/** 消息接收方列表。 */
|
|
6295
|
+
receiverList?: string[];
|
|
6160
6296
|
}
|
|
6161
6297
|
|
|
6162
6298
|
interface CreateLocationMsgParameters {
|
|
@@ -6185,10 +6321,13 @@ export declare namespace EasemobChat {
|
|
|
6185
6321
|
/** Message priority. */
|
|
6186
6322
|
priority?: MessagePriority;
|
|
6187
6323
|
/** Whether the message is delivered only when the recipient(s) is/are online:
|
|
6188
|
-
* - `true`: The message is delivered only when the recipient(s) is/are online. If the recipient is offline, the message is
|
|
6189
|
-
* - (Default) `false`: The message is delivered
|
|
6324
|
+
* - `true`: The message is delivered only when the recipient(s) is/are online. If the recipient is offline, the message is discarded.
|
|
6325
|
+
* - (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.
|
|
6190
6326
|
*/
|
|
6191
6327
|
deliverOnlineOnly?: boolean;
|
|
6328
|
+
/** The list of message recipients. */
|
|
6329
|
+
/** 消息接收方列表。 */
|
|
6330
|
+
receiverList?: string[];
|
|
6192
6331
|
}
|
|
6193
6332
|
|
|
6194
6333
|
interface FileParameters {
|
|
@@ -6291,8 +6430,8 @@ export declare namespace EasemobChat {
|
|
|
6291
6430
|
/** Message priority. */
|
|
6292
6431
|
priority?: MessagePriority;
|
|
6293
6432
|
/** Whether the message is delivered only when the recipient(s) is/are online:
|
|
6294
|
-
* - `true`: The message is delivered only when the recipient(s) is/are online. If the recipient is offline, the message is
|
|
6295
|
-
* - (Default) `false`: The message is delivered
|
|
6433
|
+
* - `true`: The message is delivered only when the recipient(s) is/are online. If the recipient is offline, the message is discarded.
|
|
6434
|
+
* - (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.
|
|
6296
6435
|
*/
|
|
6297
6436
|
deliverOnlineOnly?: boolean;
|
|
6298
6437
|
}
|
|
@@ -6338,10 +6477,13 @@ export declare namespace EasemobChat {
|
|
|
6338
6477
|
/** Message priority. */
|
|
6339
6478
|
priority?: MessagePriority;
|
|
6340
6479
|
/** Whether the message is delivered only when the recipient(s) is/are online:
|
|
6341
|
-
* - `true`: The message is delivered only when the recipient(s) is/are online. If the recipient is offline, the message is
|
|
6342
|
-
* - (Default) `false`: The message is delivered
|
|
6480
|
+
* - `true`: The message is delivered only when the recipient(s) is/are online. If the recipient is offline, the message is discarded.
|
|
6481
|
+
* - (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.
|
|
6343
6482
|
*/
|
|
6344
6483
|
deliverOnlineOnly?: boolean;
|
|
6484
|
+
/** The list of message recipients. */
|
|
6485
|
+
/** 消息接收方列表。 */
|
|
6486
|
+
receiverList?: string[];
|
|
6345
6487
|
}
|
|
6346
6488
|
|
|
6347
6489
|
interface ImgParameters {
|
|
@@ -6425,10 +6567,16 @@ export declare namespace EasemobChat {
|
|
|
6425
6567
|
/** Message priority. */
|
|
6426
6568
|
priority?: MessagePriority;
|
|
6427
6569
|
/** Whether the message is delivered only when the recipient(s) is/are online:
|
|
6428
|
-
* - `true`: The message is delivered only when the recipient(s) is/are online. If the recipient is offline, the message is
|
|
6429
|
-
* - (Default) `false`: The message is delivered
|
|
6570
|
+
* - `true`: The message is delivered only when the recipient(s) is/are online. If the recipient is offline, the message is discarded.
|
|
6571
|
+
* - (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.
|
|
6430
6572
|
*/
|
|
6431
6573
|
deliverOnlineOnly?: boolean;
|
|
6574
|
+
/** The list of message recipients. */
|
|
6575
|
+
receiverList?: string[];
|
|
6576
|
+
/** The thumbnail width. */
|
|
6577
|
+
thumbnailWidth?: number;
|
|
6578
|
+
/** The thumbnail height. */
|
|
6579
|
+
thumbnailHeight?: number;
|
|
6432
6580
|
}
|
|
6433
6581
|
|
|
6434
6582
|
interface CreateImgMsgParameters {
|
|
@@ -6474,10 +6622,16 @@ export declare namespace EasemobChat {
|
|
|
6474
6622
|
/** Message priority. */
|
|
6475
6623
|
priority?: MessagePriority;
|
|
6476
6624
|
/** Whether the message is delivered only when the recipient(s) is/are online:
|
|
6477
|
-
* - `true`: The message is delivered only when the recipient(s) is/are online. If the recipient is offline, the message is
|
|
6478
|
-
* - (Default) `false`: The message is delivered
|
|
6625
|
+
* - `true`: The message is delivered only when the recipient(s) is/are online. If the recipient is offline, the message is discarded.
|
|
6626
|
+
* - (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.
|
|
6479
6627
|
*/
|
|
6480
6628
|
deliverOnlineOnly?: boolean;
|
|
6629
|
+
/** The list of message recipients. */
|
|
6630
|
+
receiverList?: string[];
|
|
6631
|
+
/** The thumbnail width. */
|
|
6632
|
+
thumbnailWidth?: number;
|
|
6633
|
+
/** The thumbnail height. */
|
|
6634
|
+
thumbnailHeight?: number;
|
|
6481
6635
|
}
|
|
6482
6636
|
|
|
6483
6637
|
interface AudioParameters {
|
|
@@ -6562,10 +6716,13 @@ export declare namespace EasemobChat {
|
|
|
6562
6716
|
/** Message priority. */
|
|
6563
6717
|
priority?: MessagePriority;
|
|
6564
6718
|
/** Whether the message is delivered only when the recipient(s) is/are online:
|
|
6565
|
-
* - `true`: The message is delivered only when the recipient(s) is/are online. If the recipient is offline, the message is
|
|
6566
|
-
* - (Default) `false`: The message is delivered
|
|
6719
|
+
* - `true`: The message is delivered only when the recipient(s) is/are online. If the recipient is offline, the message is discarded.
|
|
6720
|
+
* - (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.
|
|
6567
6721
|
*/
|
|
6568
6722
|
deliverOnlineOnly?: boolean;
|
|
6723
|
+
/** The list of message recipients. */
|
|
6724
|
+
/** 消息接收方列表。 */
|
|
6725
|
+
receiverList?: string[];
|
|
6569
6726
|
}
|
|
6570
6727
|
|
|
6571
6728
|
interface CreateAudioMsgParameters {
|
|
@@ -6611,10 +6768,13 @@ export declare namespace EasemobChat {
|
|
|
6611
6768
|
/** Message priority. */
|
|
6612
6769
|
priority?: MessagePriority;
|
|
6613
6770
|
/** Whether the message is delivered only when the recipient(s) is/are online:
|
|
6614
|
-
* - `true`: The message is delivered only when the recipient(s) is/are online. If the recipient is offline, the message is
|
|
6615
|
-
* - (Default) `false`: The message is delivered
|
|
6771
|
+
* - `true`: The message is delivered only when the recipient(s) is/are online. If the recipient is offline, the message is discarded.
|
|
6772
|
+
* - (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.
|
|
6616
6773
|
*/
|
|
6617
6774
|
deliverOnlineOnly?: boolean;
|
|
6775
|
+
/** The list of message recipients. */
|
|
6776
|
+
/** 消息接收方列表。 */
|
|
6777
|
+
receiverList?: string[];
|
|
6618
6778
|
}
|
|
6619
6779
|
|
|
6620
6780
|
interface VideoParameters {
|
|
@@ -6699,10 +6859,13 @@ export declare namespace EasemobChat {
|
|
|
6699
6859
|
/** Message priority. */
|
|
6700
6860
|
priority?: MessagePriority;
|
|
6701
6861
|
/** Whether the message is delivered only when the recipient(s) is/are online:
|
|
6702
|
-
* - `true`: The message is delivered only when the recipient(s) is/are online. If the recipient is offline, the message is
|
|
6703
|
-
* - (Default) `false`: The message is delivered
|
|
6862
|
+
* - `true`: The message is delivered only when the recipient(s) is/are online. If the recipient is offline, the message is discarded.
|
|
6863
|
+
* - (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.
|
|
6704
6864
|
*/
|
|
6705
6865
|
deliverOnlineOnly?: boolean;
|
|
6866
|
+
/** The list of message recipients. */
|
|
6867
|
+
/** 消息接收方列表。 */
|
|
6868
|
+
receiverList?: string[];
|
|
6706
6869
|
}
|
|
6707
6870
|
|
|
6708
6871
|
interface CreateVideoMsgParameters {
|
|
@@ -6750,10 +6913,13 @@ export declare namespace EasemobChat {
|
|
|
6750
6913
|
/** Message priority. */
|
|
6751
6914
|
priority?: MessagePriority;
|
|
6752
6915
|
/** Whether the message is delivered only when the recipient(s) is/are online:
|
|
6753
|
-
* - `true`: The message is delivered only when the recipient(s) is/are online. If the recipient is offline, the message is
|
|
6754
|
-
* - (Default) `false`: The message is delivered
|
|
6916
|
+
* - `true`: The message is delivered only when the recipient(s) is/are online. If the recipient is offline, the message is discarded.
|
|
6917
|
+
* - (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.
|
|
6755
6918
|
*/
|
|
6756
6919
|
deliverOnlineOnly?: boolean;
|
|
6920
|
+
/** The list of message recipients. */
|
|
6921
|
+
/** 消息接收方列表。 */
|
|
6922
|
+
receiverList?: string[];
|
|
6757
6923
|
}
|
|
6758
6924
|
|
|
6759
6925
|
interface ReceivedMsgBody {
|
|
@@ -6802,6 +6968,19 @@ export declare namespace EasemobChat {
|
|
|
6802
6968
|
| VideoParameters
|
|
6803
6969
|
| FileParameters;
|
|
6804
6970
|
|
|
6971
|
+
type MessagesType =
|
|
6972
|
+
| TextMsgBody
|
|
6973
|
+
| DeliveryMsgBody
|
|
6974
|
+
| ChannelMsgBody
|
|
6975
|
+
| CmdMsgBody
|
|
6976
|
+
| CustomMsgBody
|
|
6977
|
+
| ImgMsgBody
|
|
6978
|
+
| LocationMsgBody
|
|
6979
|
+
| AudioMsgBody
|
|
6980
|
+
| VideoMsgBody
|
|
6981
|
+
| FileMsgBody
|
|
6982
|
+
| ReadMsgBody;
|
|
6983
|
+
|
|
6805
6984
|
type MessageSetParameters =
|
|
6806
6985
|
| ReadMsgSetParameters
|
|
6807
6986
|
| DeliveryMsgSetParameters
|