easemob-websdk 4.1.4-beta2 → 4.1.4

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
@@ -162,7 +162,7 @@ export declare namespace EasemobChat {
162
162
  id: GroupId;
163
163
  /** The name of the multi-device event. */
164
164
  operation: 'memberAttributesUpdate';
165
- /** The user ID of the group member whose custom attributes are set. */
165
+ /** The user ID of the group member whose custom attributes are set. */
166
166
  userId: UserId;
167
167
  }
168
168
 
@@ -781,7 +781,6 @@ export declare namespace EasemobChat {
781
781
  score: number;
782
782
  };
783
783
  }
784
-
785
784
  interface SubscribePresence {
786
785
  /** The expiration time of the presence subscription. */
787
786
  expiry: number;
@@ -990,6 +989,7 @@ export declare namespace EasemobChat {
990
989
  /** The conversation list. */
991
990
  channel_infos: ConversationList[];
992
991
  }
992
+
993
993
  interface SilentModeConversationType {
994
994
  /** Silent mode type. */
995
995
  type: string;
@@ -3105,7 +3105,7 @@ export declare namespace EasemobChat {
3105
3105
  this: Connection,
3106
3106
  params: {
3107
3107
  /** The ID of the group member to mute. */
3108
- username: UserId;
3108
+ username: UserId | UserId[];
3109
3109
  /** The mute duration in milliseconds. The value `-1` indicates that the member is muted permanently.*/
3110
3110
  muteDuration: number;
3111
3111
  /** The group ID. */
@@ -3126,7 +3126,7 @@ export declare namespace EasemobChat {
3126
3126
  this: Connection,
3127
3127
  params: {
3128
3128
  /** The ID of the group member to mute. */
3129
- username: UserId;
3129
+ username: UserId | UserId[];
3130
3130
  /** The mute duration in milliseconds. The value `-1` indicates that the member is muted permanently.*/
3131
3131
  muteDuration: number;
3132
3132
  /** The group ID. */
@@ -3143,7 +3143,7 @@ export declare namespace EasemobChat {
3143
3143
  /** The group ID. */
3144
3144
  groupId: string;
3145
3145
  /** The group member ID to unmute. */
3146
- username: UserId;
3146
+ username: UserId | UserId[];
3147
3147
  success?: (res: AsyncResult<UnmuteGroupMemberResult[]>) => void;
3148
3148
  error?: (error: ErrorEvent) => void;
3149
3149
  }
@@ -3162,7 +3162,7 @@ export declare namespace EasemobChat {
3162
3162
  /** The group ID. */
3163
3163
  groupId: string;
3164
3164
  /** The group member ID to unmute. */
3165
- username: UserId;
3165
+ username: UserId | UserId[];
3166
3166
  success?: (res: AsyncResult<UnmuteGroupMemberResult[]>) => void;
3167
3167
  error?: (error: ErrorEvent) => void;
3168
3168
  }
@@ -4946,7 +4946,7 @@ export declare namespace EasemobChat {
4946
4946
  * (Default)`true`: Yes.
4947
4947
  * `false`: No. */
4948
4948
  autoDelete?: boolean;
4949
- /** Whether to allow a member to overwrite custom chat room attributes set by others.
4949
+ /** Whether to allow a member to overwrite the chat room attribute set by another member.
4950
4950
  * `true`: Yes.
4951
4951
  * (Default)`false`: No. */
4952
4952
  isForced?: boolean;
@@ -5002,9 +5002,9 @@ export declare namespace EasemobChat {
5002
5002
  params: {
5003
5003
  /** The chat room ID. */
5004
5004
  chatRoomId: string;
5005
- /** The maximum number of keys to delete is 10. */
5005
+ /** The array of keys of attributes to remove. The array can contain a maximum number of 10 attribute keys. */
5006
5006
  attributeKeys: Array<string>;
5007
- /** Whether to allow chat room members to delete all of the chat room attributes.
5007
+ /** Whether to allow chat room members to overwrite the chat room attributes set by others.
5008
5008
  * - `true`: Yes;
5009
5009
  * - (Default)`false`: No.
5010
5010
  */
@@ -5071,6 +5071,8 @@ export declare namespace EasemobChat {
5071
5071
  from: string;
5072
5072
  /** Additional data for the operation event. */
5073
5073
  data?: any;
5074
+ /** The modified group info. */
5075
+ detail?: GroupModifyInfo;
5074
5076
  /** ChatRoom attributes. */
5075
5077
  attributes?: {
5076
5078
  [key: string]: string;
@@ -5592,6 +5594,13 @@ export declare namespace EasemobChat {
5592
5594
  isChatThread?: boolean;
5593
5595
  /** Message online state type. */
5594
5596
  onlineState?: ONLINESTATETYPE;
5597
+ /** Message priority. */
5598
+ priority?: MessagePriority;
5599
+ /** Whether the message is delivered only when the recipient(s) is/are online:
5600
+ * - `true`: The message is delivered only when the recipient(s) is/are online. If the recipient is offline, the message is not delivered.
5601
+ * - (Default) `false`: The message is delivered to the recipients regardless of whether they are online or offline.
5602
+ */
5603
+ deliverOnlineOnly?: boolean;
5595
5604
  }
5596
5605
  interface ReadParameters {
5597
5606
  /** The message type. */
@@ -5615,6 +5624,13 @@ export declare namespace EasemobChat {
5615
5624
  ackContent?: string;
5616
5625
  /** Whether the message is a thread message. */
5617
5626
  isChatThread?: boolean;
5627
+ /** Message priority. */
5628
+ priority?: MessagePriority;
5629
+ /** Whether the message is delivered only when the recipient(s) is/are online:
5630
+ * - `true`: The message is delivered only when the recipient(s) is/are online. If the recipient is offline, the message is not delivered.
5631
+ * - (Default) `false`: The message is delivered to the recipients regardless of whether they are online or offline.
5632
+ */
5633
+ deliverOnlineOnly?: boolean;
5618
5634
  }
5619
5635
 
5620
5636
  interface DeliveryParameters {
@@ -5648,6 +5664,13 @@ export declare namespace EasemobChat {
5648
5664
  isChatThread?: boolean;
5649
5665
  /** Message online state type. */
5650
5666
  onlineState?: ONLINESTATETYPE;
5667
+ /** Message priority. */
5668
+ priority?: MessagePriority;
5669
+ /** Whether the message is delivered only when the recipient(s) is/are online:
5670
+ * - `true`: The message is delivered only when the recipient(s) is/are online. If the recipient is offline, the message is not delivered.
5671
+ * - (Default) `false`: The message is delivered to the recipients regardless of whether they are online or offline.
5672
+ */
5673
+ deliverOnlineOnly?: boolean;
5651
5674
  }
5652
5675
 
5653
5676
  interface CreateDeliveryMsgParameters {
@@ -5661,6 +5684,13 @@ export declare namespace EasemobChat {
5661
5684
  from?: string;
5662
5685
  /** Whether the message is a thread message. */
5663
5686
  isChatThread?: boolean;
5687
+ /** Message priority. */
5688
+ priority?: MessagePriority;
5689
+ /** Whether the message is delivered only when the recipient(s) is/are online:
5690
+ * - `true`: The message is delivered only when the recipient(s) is/are online. If the recipient is offline, the message is not delivered.
5691
+ * - (Default) `false`: The message is delivered to the recipients regardless of whether they are online or offline.
5692
+ */
5693
+ deliverOnlineOnly?: boolean;
5664
5694
  }
5665
5695
 
5666
5696
  interface ChannelMsgSetParameters {
@@ -5675,6 +5705,7 @@ export declare namespace EasemobChat {
5675
5705
  interface ChannelMsgBody extends ChannelMsgSetParameters {
5676
5706
  /** The message ID. */
5677
5707
  id: string;
5708
+ mid?: string;
5678
5709
  /** Whether it's group chat. */
5679
5710
  group?: string;
5680
5711
  /** The message type. */
@@ -5685,6 +5716,13 @@ export declare namespace EasemobChat {
5685
5716
  isChatThread?: boolean;
5686
5717
  /** Message online state type. */
5687
5718
  onlineState?: ONLINESTATETYPE;
5719
+ /** Message priority. */
5720
+ priority?: MessagePriority;
5721
+ /** Whether the message is delivered only when the recipient(s) is/are online:
5722
+ * - `true`: The message is delivered only when the recipient(s) is/are online. If the recipient is offline, the message is not delivered.
5723
+ * - (Default) `false`: The message is delivered to the recipients regardless of whether they are online or offline.
5724
+ */
5725
+ deliverOnlineOnly?: boolean;
5688
5726
  }
5689
5727
 
5690
5728
  interface ChannelParameters {
@@ -5697,6 +5735,8 @@ export declare namespace EasemobChat {
5697
5735
  interface CreateChannelMsgParameters {
5698
5736
  /** The message type. */
5699
5737
  type: 'channel';
5738
+ /** The ID of the read message. */
5739
+ id?: string;
5700
5740
  /** The session type. */
5701
5741
  chatType: ChatType;
5702
5742
  /** The receipt. */
@@ -5705,6 +5745,13 @@ export declare namespace EasemobChat {
5705
5745
  from?: string;
5706
5746
  /** Whether the message is a thread message. */
5707
5747
  isChatThread?: boolean;
5748
+ /** Message priority. */
5749
+ priority?: MessagePriority;
5750
+ /** Whether the message is delivered only when the recipient(s) is/are online:
5751
+ * - `true`: The message is delivered only when the recipient(s) is/are online. If the recipient is offline, the message is not delivered.
5752
+ * - (Default) `false`: The message is delivered to the recipients regardless of whether they are online or offline.
5753
+ */
5754
+ deliverOnlineOnly?: boolean;
5708
5755
  }
5709
5756
 
5710
5757
  interface TextParameters {
@@ -5776,6 +5823,11 @@ export declare namespace EasemobChat {
5776
5823
  onlineState?: ONLINESTATETYPE;
5777
5824
  /** Message priority. */
5778
5825
  priority?: MessagePriority;
5826
+ /** Whether the message is delivered only when the recipient(s) is/are online:
5827
+ * - `true`: The message is delivered only when the recipient(s) is/are online. If the recipient is offline, the message is not delivered.
5828
+ * - (Default) `false`: The message is delivered to the recipients regardless of whether they are online or offline.
5829
+ */
5830
+ deliverOnlineOnly?: boolean;
5779
5831
  }
5780
5832
 
5781
5833
  interface CreateTextMsgParameters {
@@ -5797,6 +5849,11 @@ export declare namespace EasemobChat {
5797
5849
  isChatThread?: boolean;
5798
5850
  /** Message priority. */
5799
5851
  priority?: MessagePriority;
5852
+ /** Whether the message is delivered only when the recipient(s) is/are online:
5853
+ * - `true`: The message is delivered only when the recipient(s) is/are online. If the recipient is offline, the message is not delivered.
5854
+ * - (Default) `false`: The message is delivered to the recipients regardless of whether they are online or offline.
5855
+ */
5856
+ deliverOnlineOnly?: boolean;
5800
5857
  }
5801
5858
 
5802
5859
  interface CmdParameters {
@@ -5863,6 +5920,11 @@ export declare namespace EasemobChat {
5863
5920
  onlineState?: ONLINESTATETYPE;
5864
5921
  /** Message priority. */
5865
5922
  priority?: MessagePriority;
5923
+ /** Whether the message is delivered only when the recipient(s) is/are online:
5924
+ * - `true`: The message is delivered only when the recipient(s) is/are online. If the recipient is offline, the message is not delivered.
5925
+ * - (Default) `false`: The message is delivered to the recipients regardless of whether they are online or offline.
5926
+ */
5927
+ deliverOnlineOnly?: boolean;
5866
5928
  }
5867
5929
 
5868
5930
  interface CreateCmdMsgParameters {
@@ -5886,6 +5948,11 @@ export declare namespace EasemobChat {
5886
5948
  isChatThread?: boolean;
5887
5949
  /** Message priority. */
5888
5950
  priority?: MessagePriority;
5951
+ /** Whether the message is delivered only when the recipient(s) is/are online:
5952
+ * - `true`: The message is delivered only when the recipient(s) is/are online. If the recipient is offline, the message is not delivered.
5953
+ * - (Default) `false`: The message is delivered to the recipients regardless of whether they are online or offline.
5954
+ */
5955
+ deliverOnlineOnly?: boolean;
5889
5956
  }
5890
5957
 
5891
5958
  interface CustomParameters {
@@ -5957,6 +6024,11 @@ export declare namespace EasemobChat {
5957
6024
  onlineState?: ONLINESTATETYPE;
5958
6025
  /** Message priority. */
5959
6026
  priority?: MessagePriority;
6027
+ /** Whether the message is delivered only when the recipient(s) is/are online:
6028
+ * - `true`: The message is delivered only when the recipient(s) is/are online. If the recipient is offline, the message is not delivered.
6029
+ * - (Default) `false`: The message is delivered to the recipients regardless of whether they are online or offline.
6030
+ */
6031
+ deliverOnlineOnly?: boolean;
5960
6032
  }
5961
6033
 
5962
6034
  interface CreateCustomMsgParameters {
@@ -5980,6 +6052,11 @@ export declare namespace EasemobChat {
5980
6052
  isChatThread?: boolean;
5981
6053
  /** Message priority. */
5982
6054
  priority?: MessagePriority;
6055
+ /** Whether the message is delivered only when the recipient(s) is/are online:
6056
+ * - `true`: The message is delivered only when the recipient(s) is/are online. If the recipient is offline, the message is not delivered.
6057
+ * - (Default) `false`: The message is delivered to the recipients regardless of whether they are online or offline.
6058
+ */
6059
+ deliverOnlineOnly?: boolean;
5983
6060
  }
5984
6061
 
5985
6062
  interface LocationParameters {
@@ -6059,6 +6136,11 @@ export declare namespace EasemobChat {
6059
6136
  onlineState?: ONLINESTATETYPE;
6060
6137
  /** Message priority. */
6061
6138
  priority?: MessagePriority;
6139
+ /** Whether the message is delivered only when the recipient(s) is/are online:
6140
+ * - `true`: The message is delivered only when the recipient(s) is/are online. If the recipient is offline, the message is not delivered.
6141
+ * - (Default) `false`: The message is delivered to the recipients regardless of whether they are online or offline.
6142
+ */
6143
+ deliverOnlineOnly?: boolean;
6062
6144
  }
6063
6145
 
6064
6146
  interface CreateLocationMsgParameters {
@@ -6086,6 +6168,11 @@ export declare namespace EasemobChat {
6086
6168
  isChatThread?: boolean;
6087
6169
  /** Message priority. */
6088
6170
  priority?: MessagePriority;
6171
+ /** Whether the message is delivered only when the recipient(s) is/are online:
6172
+ * - `true`: The message is delivered only when the recipient(s) is/are online. If the recipient is offline, the message is not delivered.
6173
+ * - (Default) `false`: The message is delivered to the recipients regardless of whether they are online or offline.
6174
+ */
6175
+ deliverOnlineOnly?: boolean;
6089
6176
  }
6090
6177
 
6091
6178
  interface FileParameters {
@@ -6118,6 +6205,8 @@ export declare namespace EasemobChat {
6118
6205
  filename?: string;
6119
6206
  /** The input ID of the file to be uploaded. */
6120
6207
  fileInputId?: string;
6208
+ /** The size of the file. */
6209
+ file_length?: number;
6121
6210
  /** The recipient. */
6122
6211
  to: string;
6123
6212
  /** The sender, which can only be the current user and can not be changed.*/
@@ -6185,6 +6274,11 @@ export declare namespace EasemobChat {
6185
6274
  isChatThread?: boolean;
6186
6275
  /** Message priority. */
6187
6276
  priority?: MessagePriority;
6277
+ /** Whether the message is delivered only when the recipient(s) is/are online:
6278
+ * - `true`: The message is delivered only when the recipient(s) is/are online. If the recipient is offline, the message is not delivered.
6279
+ * - (Default) `false`: The message is delivered to the recipients regardless of whether they are online or offline.
6280
+ */
6281
+ deliverOnlineOnly?: boolean;
6188
6282
  }
6189
6283
 
6190
6284
  interface CreateFileMsgParameters {
@@ -6227,6 +6321,11 @@ export declare namespace EasemobChat {
6227
6321
  isChatThread?: boolean;
6228
6322
  /** Message priority. */
6229
6323
  priority?: MessagePriority;
6324
+ /** Whether the message is delivered only when the recipient(s) is/are online:
6325
+ * - `true`: The message is delivered only when the recipient(s) is/are online. If the recipient is offline, the message is not delivered.
6326
+ * - (Default) `false`: The message is delivered to the recipients regardless of whether they are online or offline.
6327
+ */
6328
+ deliverOnlineOnly?: boolean;
6230
6329
  }
6231
6330
 
6232
6331
  interface ImgParameters {
@@ -6247,6 +6346,8 @@ export declare namespace EasemobChat {
6247
6346
  width?: number;
6248
6347
  /** The image height. */
6249
6348
  height?: number;
6349
+ /** The image file length. */
6350
+ file_length?: number;
6250
6351
  /** The input ID of the file to be uploaded. */
6251
6352
  fileInputId?: string;
6252
6353
  /** The sender, which can only be the current user and can not be changed.*/
@@ -6307,6 +6408,11 @@ export declare namespace EasemobChat {
6307
6408
  onlineState?: ONLINESTATETYPE;
6308
6409
  /** Message priority. */
6309
6410
  priority?: MessagePriority;
6411
+ /** Whether the message is delivered only when the recipient(s) is/are online:
6412
+ * - `true`: The message is delivered only when the recipient(s) is/are online. If the recipient is offline, the message is not delivered.
6413
+ * - (Default) `false`: The message is delivered to the recipients regardless of whether they are online or offline.
6414
+ */
6415
+ deliverOnlineOnly?: boolean;
6310
6416
  }
6311
6417
 
6312
6418
  interface CreateImgMsgParameters {
@@ -6322,6 +6428,8 @@ export declare namespace EasemobChat {
6322
6428
  width?: number;
6323
6429
  /** The image height. */
6324
6430
  height?: number;
6431
+ /** The image file length. */
6432
+ file_length?: number;
6325
6433
  /** The recipient. */
6326
6434
  to: string;
6327
6435
  /** The sender, which can only be the current user and can not be changed.*/
@@ -6349,6 +6457,11 @@ export declare namespace EasemobChat {
6349
6457
  isChatThread?: boolean;
6350
6458
  /** Message priority. */
6351
6459
  priority?: MessagePriority;
6460
+ /** Whether the message is delivered only when the recipient(s) is/are online:
6461
+ * - `true`: The message is delivered only when the recipient(s) is/are online. If the recipient is offline, the message is not delivered.
6462
+ * - (Default) `false`: The message is delivered to the recipients regardless of whether they are online or offline.
6463
+ */
6464
+ deliverOnlineOnly?: boolean;
6352
6465
  }
6353
6466
 
6354
6467
  interface AudioParameters {
@@ -6432,6 +6545,11 @@ export declare namespace EasemobChat {
6432
6545
  onlineState?: ONLINESTATETYPE;
6433
6546
  /** Message priority. */
6434
6547
  priority?: MessagePriority;
6548
+ /** Whether the message is delivered only when the recipient(s) is/are online:
6549
+ * - `true`: The message is delivered only when the recipient(s) is/are online. If the recipient is offline, the message is not delivered.
6550
+ * - (Default) `false`: The message is delivered to the recipients regardless of whether they are online or offline.
6551
+ */
6552
+ deliverOnlineOnly?: boolean;
6435
6553
  }
6436
6554
 
6437
6555
  interface CreateAudioMsgParameters {
@@ -6476,6 +6594,11 @@ export declare namespace EasemobChat {
6476
6594
  isChatThread?: boolean;
6477
6595
  /** Message priority. */
6478
6596
  priority?: MessagePriority;
6597
+ /** Whether the message is delivered only when the recipient(s) is/are online:
6598
+ * - `true`: The message is delivered only when the recipient(s) is/are online. If the recipient is offline, the message is not delivered.
6599
+ * - (Default) `false`: The message is delivered to the recipients regardless of whether they are online or offline.
6600
+ */
6601
+ deliverOnlineOnly?: boolean;
6479
6602
  }
6480
6603
 
6481
6604
  interface VideoParameters {
@@ -6559,6 +6682,11 @@ export declare namespace EasemobChat {
6559
6682
  onlineState?: ONLINESTATETYPE;
6560
6683
  /** Message priority. */
6561
6684
  priority?: MessagePriority;
6685
+ /** Whether the message is delivered only when the recipient(s) is/are online:
6686
+ * - `true`: The message is delivered only when the recipient(s) is/are online. If the recipient is offline, the message is not delivered.
6687
+ * - (Default) `false`: The message is delivered to the recipients regardless of whether they are online or offline.
6688
+ */
6689
+ deliverOnlineOnly?: boolean;
6562
6690
  }
6563
6691
 
6564
6692
  interface CreateVideoMsgParameters {
@@ -6605,6 +6733,11 @@ export declare namespace EasemobChat {
6605
6733
  isChatThread?: boolean;
6606
6734
  /** Message priority. */
6607
6735
  priority?: MessagePriority;
6736
+ /** Whether the message is delivered only when the recipient(s) is/are online:
6737
+ * - `true`: The message is delivered only when the recipient(s) is/are online. If the recipient is offline, the message is not delivered.
6738
+ * - (Default) `false`: The message is delivered to the recipients regardless of whether they are online or offline.
6739
+ */
6740
+ deliverOnlineOnly?: boolean;
6608
6741
  }
6609
6742
 
6610
6743
  interface ReceivedMsgBody {