easemob-websdk 4.24.1 → 4.24.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "easemob-websdk",
3
- "version": "4.24.1",
3
+ "version": "4.24.2",
4
4
  "description": "Easemob chat web sdk",
5
5
  "main": "Easemob-chat.js",
6
6
  "typings": "Easemob-chat.d.ts",
@@ -117,18 +117,29 @@ interface DestroyGroupResult {
117
117
  /** The operation result. */
118
118
  success: boolean;
119
119
  }
120
- interface InviteUsersToGroupResult {
121
- /** The action. */
122
- action: 'invite';
123
- /** The group ID. */
124
- id: string;
125
- /** The reason for failure. */
126
- reason?: string;
127
- /** The invitation result. - `true`: The invitation is delivered successfully; - `false`: The invitation fails to be delivered. */
128
- result: boolean;
129
- /** The invitee ID. */
130
- user: UserId;
131
- }
120
+ type InviteUsersToGroupResult =
121
+ | {
122
+ /** The action. */
123
+ action: 'invite';
124
+ /** The group ID. */
125
+ id: string;
126
+ /** The invitation is delivered successfully. */
127
+ result: true;
128
+ /** The invitee ID. */
129
+ user: UserId;
130
+ }
131
+ | {
132
+ /** The action. */
133
+ action: 'invite';
134
+ /** The group ID. */
135
+ id: string;
136
+ /** The reason for failure, for example, the invitee does not exist. */
137
+ reason: string;
138
+ /** The invitation fails to be delivered. */
139
+ result: false;
140
+ /** The invitee ID. */
141
+ user: UserId;
142
+ };
132
143
 
133
144
  interface GroupInfo {
134
145
  /** The number of existing members. */
@@ -758,6 +758,8 @@ interface ChannelMsgSetParameters {
758
758
  }
759
759
  interface ChannelMsgBody extends ChannelMsgSetParameters {
760
760
  id: string;
761
+ /** The ID of the last read message. */
762
+ mid?: string;
761
763
  group?: string;
762
764
  type: 'channel';
763
765
  time: number;
@@ -766,6 +768,8 @@ interface ChannelMsgBody extends ChannelMsgSetParameters {
766
768
  interface CreateChannelMsgParameters {
767
769
  /** The message type. */
768
770
  type: 'channel';
771
+ /** The ID of the last read message. */
772
+ mid?: string;
769
773
  /** The conversation type. */
770
774
  chatType: ChatType;
771
775
  /** The recipient. */