easemob-websdk 4.1.0-beta3 → 4.1.0-beta4

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 CHANGED
@@ -137,6 +137,17 @@ export declare namespace EasemobChat {
137
137
  parentId?: string;
138
138
  }
139
139
 
140
+ interface RoamingDeleteMultiDeviceInfo {
141
+ /** Event name of multi device event. */
142
+ operation: 'deleteRoaming';
143
+ /** The target user ID or group ID. */
144
+ conversationId: string;
145
+ /** The chat type. */
146
+ chatType: 'singleChat' | 'groupChat';
147
+ /** The client resource. */
148
+ resource: string;
149
+ }
150
+
140
151
  interface ConnectionParameters {
141
152
  /** The unique application key registered in console. */
142
153
  appKey: string;
@@ -3878,6 +3889,33 @@ export declare namespace EasemobChat {
3878
3889
  }
3879
3890
  ): Promise<HistoryMessages>;
3880
3891
 
3892
+ /**
3893
+ * Delete roaming messages.
3894
+ *
3895
+ * ```typescript
3896
+ * connection.removeHistoryMessages({targetId: 'userId', chatType: 'singleChat', time: Date.now()})
3897
+ *
3898
+ * connection.removeHistoryMessages({targetId: 'userId', chatType: 'singleChat', messageIds: ['messageId']})
3899
+ * ```
3900
+ */
3901
+ removeHistoryMessages(
3902
+ this: Connection,
3903
+ options: {
3904
+ /** The ID of the peer user or group. */
3905
+ targetId: string;
3906
+ /**
3907
+ * conversation type:
3908
+ * - `singleChat`: single chat;
3909
+ * - `groupChat`: group chat.
3910
+ */
3911
+ chatType: 'singleChat' | 'groupChat';
3912
+ /** List of message IDs to be deleted, The number of IDs cannot exceed 20. */
3913
+ messageIds?: Array<string>;
3914
+ /** The starting point in time to delete the message. */
3915
+ beforeTimeStamp?: number;
3916
+ }
3917
+ ): Promise<void>;
3918
+
3881
3919
  /**
3882
3920
  * Adds a friend.
3883
3921
  *
@@ -5636,7 +5674,8 @@ export declare namespace EasemobChat {
5636
5674
  type MultiDeviceData =
5637
5675
  | ThreadMultiDeviceInfo
5638
5676
  | ServerChangeInfo
5639
- | ChannelChangeInfo;
5677
+ | ChannelChangeInfo
5678
+ | RoamingDeleteMultiDeviceInfo;
5640
5679
 
5641
5680
  type Event =
5642
5681
  | 'onOpened'