easemob-websdk 4.24.0 → 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/Easemob-chat.d.ts CHANGED
@@ -284,6 +284,8 @@ export declare namespace EasemobChat {
284
284
  autoReconnectNumMax?: number;
285
285
  /** Whether DNS is enabled or not. It is enabled by default. The private cloud should be turned off */
286
286
  isHttpDNS?: boolean;
287
+ /** Whether to calculate attachment MD5, include it in uploads, and precheck large attachments. Defaults to `false`. DNS config takes precedence when provided. */
288
+ enableMd5Check?: boolean;
287
289
  /** The URL of the specified REST server. This command is used when DNS is not enabled. Usually this API is used for specific customers and need to contact account manager to get it. */
288
290
  apiUrl?: string;
289
291
  /** The URL of the specified message server. This command is used when DNS is not enabled. Usually this API is used for specific customers and need to contact account manager to get it. */
@@ -621,18 +623,29 @@ export declare namespace EasemobChat {
621
623
  success: boolean;
622
624
  }
623
625
 
624
- interface InviteUsersToGroupResult {
625
- /** Action. */
626
- action: 'invite';
627
- /** The group ID. */
628
- id: string;
629
- /** The reason for failure. */
630
- reason?: string;
631
- /** The result of the invitation. */
632
- result: boolean;
633
- /** The ID of the invited user. */
634
- user: UserId;
635
- }
626
+ type InviteUsersToGroupResult =
627
+ | {
628
+ /** Action. */
629
+ action: 'invite';
630
+ /** The group ID. */
631
+ id: string;
632
+ /** The invitation is delivered successfully. */
633
+ result: true;
634
+ /** The ID of the invited user. */
635
+ user: UserId;
636
+ }
637
+ | {
638
+ /** Action. */
639
+ action: 'invite';
640
+ /** The group ID. */
641
+ id: string;
642
+ /** The reason for failure, for example, the invitee does not exist. */
643
+ reason: string;
644
+ /** The invitation fails to be delivered. */
645
+ result: false;
646
+ /** The ID of the invited user. */
647
+ user: UserId;
648
+ };
636
649
 
637
650
  interface JoinGroupResult {
638
651
  /** Action. */
@@ -1502,6 +1515,10 @@ export declare namespace EasemobChat {
1502
1515
  OPERATION_UNSUPPORTED = 53,
1503
1516
  /** An operation that is not allowed. */
1504
1517
  OPERATION_NOT_ALLOWED = 54,
1518
+ /** Token expired. */
1519
+ WEBIM_TOKEN_EXPIRED = 56,
1520
+ /** Server serving disabled. */
1521
+ WEBIM_SERVER_SERVING_DISABLED = 57,
1505
1522
  /** The uploading of the file failed. */
1506
1523
  WEBIM_UPLOADFILE_ERROR = 101,
1507
1524
  /** The current user is not logged in when uploading the file. */
@@ -3381,6 +3398,7 @@ export declare namespace EasemobChat {
3381
3398
  * Invites users into a group.
3382
3399
  * Creates a group instance "inviteNeedConfirm:true", the invited users will receive "operation: 'inviteToJoin'" in the callback of onGroupEvent.
3383
3400
  * Creates a group instance "inviteNeedConfirm:false", the invited users will receive "operation: 'directJoined'" in the callback of onGroupEvent.
3401
+ * When inviting multiple users, the request can partially succeed. Check the `result` of each item in the returned `data` array. A failed item has `result: false` and includes the failure reason in `reason`.
3384
3402
  *
3385
3403
  * ```typescript
3386
3404
  * connection.inviteUsersToGroup({groupId: 'groupId', users: ['user1', 'user2']})
@@ -6852,6 +6870,7 @@ export declare namespace EasemobChat {
6852
6870
  interface ChannelMsgBody extends ChannelMsgSetParameters {
6853
6871
  /** The message ID. */
6854
6872
  id: string;
6873
+ /** The ID of the last read message. */
6855
6874
  mid?: string;
6856
6875
  /** Whether it's group chat. */
6857
6876
  group?: string;
@@ -6882,8 +6901,8 @@ export declare namespace EasemobChat {
6882
6901
  interface CreateChannelMsgParameters {
6883
6902
  /** The message type. */
6884
6903
  type: 'channel';
6885
- /** The ID of the read message. */
6886
- id?: string;
6904
+ /** The ID of the last read message. */
6905
+ mid?: string;
6887
6906
  /** The session type. */
6888
6907
  chatType: ChatType;
6889
6908
  /** The receipt. */