easemob-websdk 4.2.1 → 4.3.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 +8 -0
- package/Easemob-chat.d.ts +90 -16
- package/Easemob-chat.js +1 -1
- package/contact/contact.d.ts +42 -1
- package/contact/contact.js +1 -1
- package/message/audio.d.ts +2 -0
- package/message/cmd.d.ts +2 -0
- package/message/combine.d.ts +156 -149
- package/message/custom.d.ts +2 -0
- package/message/file.d.ts +2 -0
- package/message/img.d.ts +2 -0
- package/message/location.d.ts +2 -0
- package/message/text.d.ts +2 -0
- package/message/video.d.ts +2 -0
- package/miniCore/miniCore.d.ts +3 -3
- package/miniCore/miniCore.js +1 -1
- package/miniProgram/Easemob-chat.js +1 -1
- package/package.json +1 -1
- package/types/indexApi.d.ts +23 -1
- package/types/message.d.ts +22 -11
- package/uniApp/Easemob-chat.js +1 -1
package/package.json
CHANGED
package/types/indexApi.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Jid } from './common';
|
|
1
|
+
import { Jid, UserId } from './common';
|
|
2
2
|
import { MessagesType, MessageBody, ModifiedMsg } from './message';
|
|
3
3
|
interface UpdateOwnUserInfoParams {
|
|
4
4
|
/** The nickname. */
|
|
@@ -148,6 +148,25 @@ interface PinConversation {
|
|
|
148
148
|
pinnedTime: number;
|
|
149
149
|
}
|
|
150
150
|
|
|
151
|
+
interface ContactItem {
|
|
152
|
+
/** The user ID. */
|
|
153
|
+
userId: UserId;
|
|
154
|
+
/** The user remark. */
|
|
155
|
+
remark: string;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
interface CursorContactsResult {
|
|
159
|
+
/** 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.*/
|
|
160
|
+
cursor?: string;
|
|
161
|
+
/** The contact list. */
|
|
162
|
+
contacts: ContactItem[];
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
interface OperateResult {
|
|
166
|
+
/** The userIds of the operation successfully. */
|
|
167
|
+
userIds: UserId[];
|
|
168
|
+
}
|
|
169
|
+
|
|
151
170
|
export type {
|
|
152
171
|
UploadTokenResult,
|
|
153
172
|
SessionInfo,
|
|
@@ -159,6 +178,9 @@ export type {
|
|
|
159
178
|
ServerConversations,
|
|
160
179
|
ConversationItem,
|
|
161
180
|
PinConversation,
|
|
181
|
+
ContactItem,
|
|
182
|
+
CursorContactsResult,
|
|
183
|
+
OperateResult,
|
|
162
184
|
};
|
|
163
185
|
export type {
|
|
164
186
|
RosterData,
|
package/types/message.d.ts
CHANGED
|
@@ -110,12 +110,13 @@ interface TextMsgBody {
|
|
|
110
110
|
[key: string]: any;
|
|
111
111
|
};
|
|
112
112
|
time: number;
|
|
113
|
-
reactions?: Reaction;
|
|
113
|
+
reactions?: Reaction[];
|
|
114
114
|
translations?: TranslationResult;
|
|
115
115
|
chatThread?: ChatThread;
|
|
116
116
|
chatThreadOverview?: ChatThreadOverview;
|
|
117
117
|
onlineState?: ONLINESTATETYPE;
|
|
118
118
|
priority?: MessagePriority;
|
|
119
|
+
broadcast?: boolean;
|
|
119
120
|
deliverOnlineOnly?: boolean;
|
|
120
121
|
modifiedInfo?: ModifiedMsgInfo;
|
|
121
122
|
}
|
|
@@ -165,11 +166,12 @@ interface CmdMsgBody {
|
|
|
165
166
|
[key: string]: any;
|
|
166
167
|
};
|
|
167
168
|
time: number;
|
|
168
|
-
reactions?: Reaction;
|
|
169
|
+
reactions?: Reaction[];
|
|
169
170
|
chatThread?: ChatThread;
|
|
170
171
|
chatThreadOverview?: ChatThreadOverview;
|
|
171
172
|
onlineState?: ONLINESTATETYPE;
|
|
172
173
|
priority?: MessagePriority;
|
|
174
|
+
broadcast?: boolean;
|
|
173
175
|
deliverOnlineOnly?: boolean;
|
|
174
176
|
}
|
|
175
177
|
interface CreateCmdMsgParameters {
|
|
@@ -227,11 +229,12 @@ interface CustomMsgBody {
|
|
|
227
229
|
[key: string]: any;
|
|
228
230
|
};
|
|
229
231
|
time: number;
|
|
230
|
-
reactions?: Reaction;
|
|
232
|
+
reactions?: Reaction[];
|
|
231
233
|
chatThread?: ChatThread;
|
|
232
234
|
chatThreadOverview?: ChatThreadOverview;
|
|
233
235
|
onlineState?: ONLINESTATETYPE;
|
|
234
236
|
priority?: MessagePriority;
|
|
237
|
+
broadcast?: boolean;
|
|
235
238
|
deliverOnlineOnly?: boolean;
|
|
236
239
|
}
|
|
237
240
|
interface CreateCustomMsgParameters {
|
|
@@ -290,11 +293,12 @@ interface LocationMsgBody {
|
|
|
290
293
|
[key: string]: any;
|
|
291
294
|
};
|
|
292
295
|
time: number;
|
|
293
|
-
reactions?: Reaction;
|
|
296
|
+
reactions?: Reaction[];
|
|
294
297
|
chatThread?: ChatThread;
|
|
295
298
|
chatThreadOverview?: ChatThreadOverview;
|
|
296
299
|
onlineState?: ONLINESTATETYPE;
|
|
297
300
|
priority?: MessagePriority;
|
|
301
|
+
broadcast?: boolean;
|
|
298
302
|
deliverOnlineOnly?: boolean;
|
|
299
303
|
}
|
|
300
304
|
interface CreateLocationMsgParameters {
|
|
@@ -357,11 +361,12 @@ interface ImgMsgBody extends ImgMsgSetParameters {
|
|
|
357
361
|
secret?: string;
|
|
358
362
|
thumb?: string;
|
|
359
363
|
thumb_secret?: string;
|
|
360
|
-
reactions?: Reaction;
|
|
364
|
+
reactions?: Reaction[];
|
|
361
365
|
chatThread?: ChatThread;
|
|
362
366
|
chatThreadOverview?: ChatThreadOverview;
|
|
363
367
|
onlineState?: ONLINESTATETYPE;
|
|
364
368
|
priority?: MessagePriority;
|
|
369
|
+
broadcast?: boolean;
|
|
365
370
|
deliverOnlineOnly?: boolean;
|
|
366
371
|
}
|
|
367
372
|
interface CreateImgMsgParameters {
|
|
@@ -440,11 +445,12 @@ interface AudioMsgBody extends AudioMsgSetParameters {
|
|
|
440
445
|
[key: string]: any;
|
|
441
446
|
};
|
|
442
447
|
time: number;
|
|
443
|
-
reactions?: Reaction;
|
|
448
|
+
reactions?: Reaction[];
|
|
444
449
|
chatThread?: ChatThread;
|
|
445
450
|
chatThreadOverview?: ChatThreadOverview;
|
|
446
451
|
onlineState?: ONLINESTATETYPE;
|
|
447
452
|
priority?: MessagePriority;
|
|
453
|
+
broadcast?: boolean;
|
|
448
454
|
deliverOnlineOnly?: boolean;
|
|
449
455
|
}
|
|
450
456
|
interface CreateAudioMsgParameters {
|
|
@@ -523,11 +529,12 @@ interface VideoMsgBody extends VideoMsgSetParameters {
|
|
|
523
529
|
};
|
|
524
530
|
group?: string;
|
|
525
531
|
time: number;
|
|
526
|
-
reactions?: Reaction;
|
|
532
|
+
reactions?: Reaction[];
|
|
527
533
|
chatThread?: ChatThread;
|
|
528
534
|
chatThreadOverview?: ChatThreadOverview;
|
|
529
535
|
onlineState?: ONLINESTATETYPE;
|
|
530
536
|
priority?: MessagePriority;
|
|
537
|
+
broadcast?: boolean;
|
|
531
538
|
deliverOnlineOnly?: boolean;
|
|
532
539
|
}
|
|
533
540
|
interface CreateVideoMsgParameters {
|
|
@@ -606,11 +613,12 @@ interface FileMsgBody extends FileMsgSetParameters {
|
|
|
606
613
|
[key: string]: any;
|
|
607
614
|
};
|
|
608
615
|
time: number;
|
|
609
|
-
reactions?: Reaction;
|
|
616
|
+
reactions?: Reaction[];
|
|
610
617
|
chatThread?: ChatThread;
|
|
611
618
|
chatThreadOverview?: ChatThreadOverview;
|
|
612
619
|
onlineState?: ONLINESTATETYPE;
|
|
613
620
|
priority?: MessagePriority;
|
|
621
|
+
broadcast?: boolean;
|
|
614
622
|
deliverOnlineOnly?: boolean;
|
|
615
623
|
}
|
|
616
624
|
interface CreateFileMsgParameters {
|
|
@@ -731,6 +739,8 @@ interface CombineMsgBody {
|
|
|
731
739
|
isChatThread?: boolean;
|
|
732
740
|
/** The message priority. */
|
|
733
741
|
priority?: MessagePriority;
|
|
742
|
+
/** Whether global notify message or not. */
|
|
743
|
+
broadcast?: boolean;
|
|
734
744
|
/** Whether the message is delivered only when the recipient(s) is/are online:
|
|
735
745
|
* - `true`: The message is delivered only when the recipient(s) is/are online. If the recipient is offline, the message is discarded.
|
|
736
746
|
* - (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.
|
|
@@ -751,7 +761,7 @@ interface CombineMsgBody {
|
|
|
751
761
|
/** The summary list of the combined message. */
|
|
752
762
|
summary: string;
|
|
753
763
|
/** The Reaction list of the message. */
|
|
754
|
-
reactions?: Reaction;
|
|
764
|
+
reactions?: Reaction[];
|
|
755
765
|
/** The information of a threaded message. */
|
|
756
766
|
chatThread?: ChatThread;
|
|
757
767
|
/** The overview of a threaded message. */
|
|
@@ -825,8 +835,9 @@ declare type MessagePriority =
|
|
|
825
835
|
| 'normal'
|
|
826
836
|
/** Low. */
|
|
827
837
|
| 'low';
|
|
828
|
-
interface
|
|
838
|
+
interface MetaExts {
|
|
829
839
|
chatroom_msg_tag: number;
|
|
840
|
+
is_broadcast?: boolean;
|
|
830
841
|
}
|
|
831
842
|
export type {
|
|
832
843
|
MessageType,
|
|
@@ -877,5 +888,5 @@ export type {
|
|
|
877
888
|
CreateReadMsgParameters,
|
|
878
889
|
CreateAudioMsgParameters,
|
|
879
890
|
MessagePriority,
|
|
880
|
-
|
|
891
|
+
MetaExts,
|
|
881
892
|
};
|