easemob-websdk 4.0.8-beta → 4.0.9
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 +10 -1
- package/Easemob-chat.d.ts +755 -416
- package/Easemob-chat.js +1 -1
- package/package.json +1 -1
package/Easemob-chat.d.ts
CHANGED
|
@@ -644,7 +644,6 @@ export declare namespace EasemobChat {
|
|
|
644
644
|
|
|
645
645
|
interface DeleteSessionResult {
|
|
646
646
|
/** The result of request. */
|
|
647
|
-
/** 请求结果。 */
|
|
648
647
|
result: 'ok';
|
|
649
648
|
}
|
|
650
649
|
// The contact api result end.
|
|
@@ -742,92 +741,6 @@ export declare namespace EasemobChat {
|
|
|
742
741
|
/** The expiration time of the presence subscription. */
|
|
743
742
|
expire: number;
|
|
744
743
|
}
|
|
745
|
-
|
|
746
|
-
interface SilentModeConversationType {
|
|
747
|
-
/** Silent mode type. */
|
|
748
|
-
type: string;
|
|
749
|
-
/** Silent mode duration, duration of Unix timestamp. */
|
|
750
|
-
ignoreDuration: number;
|
|
751
|
-
/** Silent mode interval. */
|
|
752
|
-
ignoreInterval: string;
|
|
753
|
-
}
|
|
754
|
-
|
|
755
|
-
interface ConversationSilentModeType {
|
|
756
|
-
/** User push map. */
|
|
757
|
-
user: {
|
|
758
|
-
[propname: UserId]: SilentModeConversationType;
|
|
759
|
-
};
|
|
760
|
-
/** Group push map. */
|
|
761
|
-
group: {
|
|
762
|
-
[propname: string]: SilentModeConversationType;
|
|
763
|
-
};
|
|
764
|
-
}
|
|
765
|
-
|
|
766
|
-
interface TranslationLanguageType {
|
|
767
|
-
/** Translation language. */
|
|
768
|
-
language: string;
|
|
769
|
-
}
|
|
770
|
-
|
|
771
|
-
enum SILENTMODETYPE {
|
|
772
|
-
/** All messsage. */
|
|
773
|
-
ALL = 'ALL',
|
|
774
|
-
/** @ messaage of myself. */
|
|
775
|
-
AT = 'AT',
|
|
776
|
-
/** None. */
|
|
777
|
-
NONE = 'NONE',
|
|
778
|
-
}
|
|
779
|
-
|
|
780
|
-
enum CONVERSATIONTYPE {
|
|
781
|
-
/** Single chat. */
|
|
782
|
-
SINGLECHAT = 'singleChat',
|
|
783
|
-
/** Group chat. */
|
|
784
|
-
GROUPCHAT = 'groupChat',
|
|
785
|
-
/** Chat room. */
|
|
786
|
-
CHATROOM = 'chatRoom',
|
|
787
|
-
}
|
|
788
|
-
|
|
789
|
-
type ConversationListType = {
|
|
790
|
-
/** Conversation id. */
|
|
791
|
-
id: string;
|
|
792
|
-
/** Conversation type. */
|
|
793
|
-
type: string;
|
|
794
|
-
};
|
|
795
|
-
|
|
796
|
-
interface SilentModeRemindType {
|
|
797
|
-
/** Silent mode type. */
|
|
798
|
-
paramType: 0;
|
|
799
|
-
/** Silent mode type. */
|
|
800
|
-
remindType: SILENTMODETYPE;
|
|
801
|
-
}
|
|
802
|
-
|
|
803
|
-
interface SilentModeDuration {
|
|
804
|
-
/** Silent mode type. */
|
|
805
|
-
paramType: 1;
|
|
806
|
-
/** Silent mode duration, duration of Unix timestamp. */
|
|
807
|
-
duration: number;
|
|
808
|
-
}
|
|
809
|
-
|
|
810
|
-
interface SilentModeInterval {
|
|
811
|
-
/** Silent mode type. */
|
|
812
|
-
paramType: 2;
|
|
813
|
-
/** Start time interval. */
|
|
814
|
-
startTime: Interval;
|
|
815
|
-
/** End time interval. */
|
|
816
|
-
endTime: Interval;
|
|
817
|
-
}
|
|
818
|
-
|
|
819
|
-
type Interval = {
|
|
820
|
-
/** Hours. */
|
|
821
|
-
hours: number;
|
|
822
|
-
/** Minutes. */
|
|
823
|
-
minutes: number;
|
|
824
|
-
};
|
|
825
|
-
|
|
826
|
-
type SilentModeParamType =
|
|
827
|
-
| SilentModeRemindType
|
|
828
|
-
| SilentModeDuration
|
|
829
|
-
| SilentModeInterval;
|
|
830
|
-
|
|
831
744
|
interface ChatThread {
|
|
832
745
|
/** The Message ID for creating thread. */
|
|
833
746
|
messageId: string;
|
|
@@ -980,6 +893,91 @@ export declare namespace EasemobChat {
|
|
|
980
893
|
unread_num: number;
|
|
981
894
|
}
|
|
982
895
|
|
|
896
|
+
interface SilentModeConversationType {
|
|
897
|
+
/** Silent mode type. */
|
|
898
|
+
type: string;
|
|
899
|
+
/** Silent mode duration, duration of Unix timestamp. */
|
|
900
|
+
ignoreDuration: number;
|
|
901
|
+
/** Silent mode interval. */
|
|
902
|
+
ignoreInterval: string;
|
|
903
|
+
}
|
|
904
|
+
|
|
905
|
+
interface ConversationSilentModeType {
|
|
906
|
+
/** User push map. */
|
|
907
|
+
user: {
|
|
908
|
+
[propname: UserId]: SilentModeConversationType;
|
|
909
|
+
};
|
|
910
|
+
/** Group push map. */
|
|
911
|
+
group: {
|
|
912
|
+
[propname: string]: SilentModeConversationType;
|
|
913
|
+
};
|
|
914
|
+
}
|
|
915
|
+
|
|
916
|
+
interface TranslationLanguageType {
|
|
917
|
+
/** Translation language. */
|
|
918
|
+
language: string;
|
|
919
|
+
}
|
|
920
|
+
|
|
921
|
+
enum SILENTMODETYPE {
|
|
922
|
+
/** All message. */
|
|
923
|
+
ALL = 'ALL',
|
|
924
|
+
/** @ message of myself. */
|
|
925
|
+
AT = 'AT',
|
|
926
|
+
/** None. */
|
|
927
|
+
NONE = 'NONE',
|
|
928
|
+
}
|
|
929
|
+
|
|
930
|
+
enum CONVERSATIONTYPE {
|
|
931
|
+
/** Single chat. */
|
|
932
|
+
SINGLECHAT = 'singleChat',
|
|
933
|
+
/** Group chat. */
|
|
934
|
+
GROUPCHAT = 'groupChat',
|
|
935
|
+
/** Chat room. */
|
|
936
|
+
CHATROOM = 'chatRoom',
|
|
937
|
+
}
|
|
938
|
+
|
|
939
|
+
type ConversationListType = {
|
|
940
|
+
/** Conversation id. */
|
|
941
|
+
id: string;
|
|
942
|
+
/** Conversation type. */
|
|
943
|
+
type: string;
|
|
944
|
+
};
|
|
945
|
+
|
|
946
|
+
interface SilentModeRemindType {
|
|
947
|
+
/** Silent mode type. */
|
|
948
|
+
paramType: 0;
|
|
949
|
+
/** Silent mode type. */
|
|
950
|
+
remindType: SILENTMODETYPE;
|
|
951
|
+
}
|
|
952
|
+
|
|
953
|
+
interface SilentModeDuration {
|
|
954
|
+
/** Silent mode type. */
|
|
955
|
+
paramType: 1;
|
|
956
|
+
/** Silent mode duration, duration of Unix timestamp. */
|
|
957
|
+
duration: number;
|
|
958
|
+
}
|
|
959
|
+
|
|
960
|
+
interface SilentModeInterval {
|
|
961
|
+
/** Silent mode type. */
|
|
962
|
+
paramType: 2;
|
|
963
|
+
/** Start time interval. */
|
|
964
|
+
startTime: Interval;
|
|
965
|
+
/** End time interval. */
|
|
966
|
+
endTime: Interval;
|
|
967
|
+
}
|
|
968
|
+
|
|
969
|
+
type Interval = {
|
|
970
|
+
/** Hours. */
|
|
971
|
+
hours: number;
|
|
972
|
+
/** Minutes. */
|
|
973
|
+
minutes: number;
|
|
974
|
+
};
|
|
975
|
+
|
|
976
|
+
type SilentModeParamType =
|
|
977
|
+
| SilentModeRemindType
|
|
978
|
+
| SilentModeDuration
|
|
979
|
+
| SilentModeInterval;
|
|
980
|
+
|
|
983
981
|
interface GetReactionDetailResult {
|
|
984
982
|
/** The reaction to be added to the message. The length is limited to 128 characters. */
|
|
985
983
|
reaction: string;
|
|
@@ -1362,7 +1360,6 @@ export declare namespace EasemobChat {
|
|
|
1362
1360
|
* ```typescript
|
|
1363
1361
|
* connection.removeChatRoomMember({chatRoomId: 'chatRoomId', username: 'username'})
|
|
1364
1362
|
* ```
|
|
1365
|
-
* @since v4.0.1
|
|
1366
1363
|
*/
|
|
1367
1364
|
removeChatRoomMember(
|
|
1368
1365
|
this: Connection,
|
|
@@ -1391,7 +1388,6 @@ export declare namespace EasemobChat {
|
|
|
1391
1388
|
* ```typescript
|
|
1392
1389
|
* connection.removeChatRoomMembers({chatRoomId: 'chatRoomId', users: ['user1', 'user2']})
|
|
1393
1390
|
* ```
|
|
1394
|
-
* @since v4.0.1
|
|
1395
1391
|
*/
|
|
1396
1392
|
removeChatRoomMembers(
|
|
1397
1393
|
this: Connection,
|
|
@@ -1421,7 +1417,7 @@ export declare namespace EasemobChat {
|
|
|
1421
1417
|
): Promise<AsyncResult<AddUsersToChatRoomResult>>;
|
|
1422
1418
|
|
|
1423
1419
|
/**
|
|
1424
|
-
* Joins the chat room. After
|
|
1420
|
+
* Joins the chat room. After a user joins successfully, other members in the chat room will receive operation: 'memberPresence' in the onChatroomEvent callback.
|
|
1425
1421
|
*
|
|
1426
1422
|
* ```typescript
|
|
1427
1423
|
* connection.joinChatRoom({roomId: 'roomId'})
|
|
@@ -1438,7 +1434,8 @@ export declare namespace EasemobChat {
|
|
|
1438
1434
|
): Promise<AsyncResult<CommonRequestResult>>;
|
|
1439
1435
|
|
|
1440
1436
|
/**
|
|
1441
|
-
*
|
|
1437
|
+
* @deprecated Use {@link leaveChatRoom} instead.
|
|
1438
|
+
* Exits chat room. And others will receive "operation: 'memberAbsence'" in the callback of onChatroomEvent.
|
|
1442
1439
|
*
|
|
1443
1440
|
* ```typescript
|
|
1444
1441
|
* connection.quitChatRoom({roomId: 'roomId'})
|
|
@@ -1453,6 +1450,22 @@ export declare namespace EasemobChat {
|
|
|
1453
1450
|
}
|
|
1454
1451
|
): Promise<AsyncResult<{ result: boolean }>>;
|
|
1455
1452
|
|
|
1453
|
+
/**
|
|
1454
|
+
* Exits chat room. And others will receive "operation: 'memberAbsence'" in the callback of onChatroomEvent.
|
|
1455
|
+
*
|
|
1456
|
+
* ```typescript
|
|
1457
|
+
* connection.leaveChatRoom({roomId: 'roomId'})
|
|
1458
|
+
* ```
|
|
1459
|
+
*/
|
|
1460
|
+
leaveChatRoom(
|
|
1461
|
+
this: Connection,
|
|
1462
|
+
params: {
|
|
1463
|
+
roomId: string;
|
|
1464
|
+
success?: (res: AsyncResult<{ result: boolean }>) => void;
|
|
1465
|
+
error?: (error: ErrorEvent) => void;
|
|
1466
|
+
}
|
|
1467
|
+
): Promise<AsyncResult<{ result: boolean }>>;
|
|
1468
|
+
|
|
1456
1469
|
/** @deprecated */
|
|
1457
1470
|
listChatRoomMember(
|
|
1458
1471
|
this: Connection,
|
|
@@ -1466,12 +1479,11 @@ export declare namespace EasemobChat {
|
|
|
1466
1479
|
): Promise<AsyncResult<{ member: string }[]>>;
|
|
1467
1480
|
|
|
1468
1481
|
/**
|
|
1469
|
-
*
|
|
1482
|
+
* Lists all chat room members with pagination.
|
|
1470
1483
|
*
|
|
1471
1484
|
* ```typescript
|
|
1472
1485
|
* connection.listChatRoomMembers({pageNum: 1, pageSize: 20, chatRoomId: 'chatRoomId'})
|
|
1473
1486
|
* ```
|
|
1474
|
-
* @since v4.0.1
|
|
1475
1487
|
*/
|
|
1476
1488
|
listChatRoomMembers(
|
|
1477
1489
|
this: Connection,
|
|
@@ -1485,7 +1497,7 @@ export declare namespace EasemobChat {
|
|
|
1485
1497
|
): Promise<AsyncResult<{ member: string }[]>>;
|
|
1486
1498
|
|
|
1487
1499
|
/**
|
|
1488
|
-
* Gets all admins
|
|
1500
|
+
* Gets all admins of the chat room.
|
|
1489
1501
|
*
|
|
1490
1502
|
* ```typescript
|
|
1491
1503
|
* connection.getChatRoomAdmin({chatRoomId: 'chatRoomId'})
|
|
@@ -1501,7 +1513,7 @@ export declare namespace EasemobChat {
|
|
|
1501
1513
|
): Promise<AsyncResult<GetChatRoomAdminResult>>;
|
|
1502
1514
|
|
|
1503
1515
|
/**
|
|
1504
|
-
* Sets
|
|
1516
|
+
* Sets a user as chat room admin. Only the chat room owner can call this method. The members who are set as admins will receive "operation: 'setAdmin'" in the callback of onChatroomEvent.
|
|
1505
1517
|
*
|
|
1506
1518
|
* ```typescript
|
|
1507
1519
|
* connection.setChatRoomAdmin({chatRoomId: 'chatRoomId', username: 'user1'})
|
|
@@ -1518,7 +1530,7 @@ export declare namespace EasemobChat {
|
|
|
1518
1530
|
): Promise<AsyncResult<SetChatRoomAdminResult>>;
|
|
1519
1531
|
|
|
1520
1532
|
/**
|
|
1521
|
-
* Removes
|
|
1533
|
+
* Removes chat room admins. Only the chat room owner can call this method. The users whose admin privileges are removed will receive "operation: 'removeAdmin'" in the callback of onChatroomEvent.
|
|
1522
1534
|
*
|
|
1523
1535
|
* ```typescript
|
|
1524
1536
|
* connection.removeChatRoomAdmin({chatRoomId: 'chatRoomId', username: 'user1'})
|
|
@@ -1535,12 +1547,11 @@ export declare namespace EasemobChat {
|
|
|
1535
1547
|
): Promise<AsyncResult<RemoveChatRoomAdminResult>>;
|
|
1536
1548
|
|
|
1537
1549
|
/**
|
|
1538
|
-
*
|
|
1550
|
+
* Mutes chat room member. Only the chat room owner can call this method. The muted member and other members will receive "operation:'muteMember'" in the callback of onChatroomEvent.
|
|
1539
1551
|
*
|
|
1540
1552
|
* ```typescript
|
|
1541
1553
|
* connection.muteChatRoomMember({username: 'user1', muteDuration: -1, chatRoomId: 'chatRoomId'})
|
|
1542
1554
|
* ```
|
|
1543
|
-
* @since 1.4.11
|
|
1544
1555
|
*/
|
|
1545
1556
|
muteChatRoomMember(
|
|
1546
1557
|
this: Connection,
|
|
@@ -1567,12 +1578,11 @@ export declare namespace EasemobChat {
|
|
|
1567
1578
|
): Promise<AsyncResult<UnmuteChatRoomMemberResult[]>>;
|
|
1568
1579
|
|
|
1569
1580
|
/**
|
|
1570
|
-
*
|
|
1581
|
+
* Unmute the chat room member. Only the chatroom owner can call this method. The members who are muted and others will receive "operation: 'unmuteMember'" in the callback of onChatroomEvent.
|
|
1571
1582
|
*
|
|
1572
1583
|
* ```typescript
|
|
1573
1584
|
* connection.unmuteChatRoomMember({chatRoomId: 'chatRoomId', username: 'user1'})
|
|
1574
1585
|
* `
|
|
1575
|
-
* @since v4.0.1
|
|
1576
1586
|
*/
|
|
1577
1587
|
unmuteChatRoomMember(
|
|
1578
1588
|
this: Connection,
|
|
@@ -1599,13 +1609,12 @@ export declare namespace EasemobChat {
|
|
|
1599
1609
|
): Promise<AsyncResult<GetChatRoomMuteListResult[]>>;
|
|
1600
1610
|
|
|
1601
1611
|
/**
|
|
1612
|
+
* @deprecated
|
|
1602
1613
|
* Gets all members who are muted in the chat room.
|
|
1603
1614
|
*
|
|
1604
1615
|
* ```typescript
|
|
1605
1616
|
* connection.getChatRoomMuteList({chatRoomId: 'chatRoomId'})
|
|
1606
1617
|
* ```
|
|
1607
|
-
*
|
|
1608
|
-
* @since v4.0.1
|
|
1609
1618
|
*/
|
|
1610
1619
|
getChatRoomMuteList(
|
|
1611
1620
|
this: Connection,
|
|
@@ -1618,6 +1627,24 @@ export declare namespace EasemobChat {
|
|
|
1618
1627
|
}
|
|
1619
1628
|
): Promise<AsyncResult<GetChatRoomMuteListResult[]>>;
|
|
1620
1629
|
|
|
1630
|
+
/**
|
|
1631
|
+
* Gets all members who are muted in the chat room.
|
|
1632
|
+
*
|
|
1633
|
+
* ```typescript
|
|
1634
|
+
* connection.getChatRoomMutelist({chatRoomId: 'chatRoomId'})
|
|
1635
|
+
* ```
|
|
1636
|
+
*/
|
|
1637
|
+
getChatRoomMutelist(
|
|
1638
|
+
this: Connection,
|
|
1639
|
+
params: {
|
|
1640
|
+
chatRoomId: string;
|
|
1641
|
+
success?: (
|
|
1642
|
+
res: AsyncResult<GetChatRoomMuteListResult[]>
|
|
1643
|
+
) => void;
|
|
1644
|
+
error?: (error: ErrorEvent) => void;
|
|
1645
|
+
}
|
|
1646
|
+
): Promise<AsyncResult<GetChatRoomMuteListResult[]>>;
|
|
1647
|
+
|
|
1621
1648
|
/** @deprecated */
|
|
1622
1649
|
chatRoomBlockSingle(
|
|
1623
1650
|
this: Connection,
|
|
@@ -1630,12 +1657,11 @@ export declare namespace EasemobChat {
|
|
|
1630
1657
|
): Promise<AsyncResult<CommonRequestResult>>;
|
|
1631
1658
|
|
|
1632
1659
|
/**
|
|
1633
|
-
* Adds a
|
|
1660
|
+
* Adds a member to the chat room blocklist. Only the chat room owner or admin can call this method.
|
|
1634
1661
|
*
|
|
1635
1662
|
* ```typescript
|
|
1636
1663
|
* connection.blockChatRoomMember({chatRoomId: 'chatRoomId', username: 'user1'})
|
|
1637
1664
|
* ```
|
|
1638
|
-
*@since v4.0.1
|
|
1639
1665
|
*/
|
|
1640
1666
|
blockChatRoomMember(
|
|
1641
1667
|
this: Connection,
|
|
@@ -1659,13 +1685,11 @@ export declare namespace EasemobChat {
|
|
|
1659
1685
|
): Promise<AsyncResult<CommonRequestResult[]>>;
|
|
1660
1686
|
|
|
1661
1687
|
/**
|
|
1662
|
-
* Adds
|
|
1688
|
+
* Adds members to the chat room blocklist. Only the chat room owner or admin can call this method.
|
|
1663
1689
|
*
|
|
1664
1690
|
* ```typescript
|
|
1665
1691
|
* connection.blockChatRoomMembers({usernames: ['user1', 'user2'], chatRoomId: 'chatRoomId'})
|
|
1666
1692
|
* ```
|
|
1667
|
-
*
|
|
1668
|
-
* @since v4.0.1
|
|
1669
1693
|
*/
|
|
1670
1694
|
blockChatRoomMembers(
|
|
1671
1695
|
this: Connection,
|
|
@@ -1694,7 +1718,6 @@ export declare namespace EasemobChat {
|
|
|
1694
1718
|
* ```typescript
|
|
1695
1719
|
* connection.unblockChatRoomMember({chatRoomId: 'chatRoomId', username: 'user1'})
|
|
1696
1720
|
* ```
|
|
1697
|
-
* @since v4.0.1
|
|
1698
1721
|
*/
|
|
1699
1722
|
unblockChatRoomMember(
|
|
1700
1723
|
this: Connection,
|
|
@@ -1723,8 +1746,6 @@ export declare namespace EasemobChat {
|
|
|
1723
1746
|
* ```typescript
|
|
1724
1747
|
* connection.unblockChatRoomMembers({chatRoomId: 'chatRoomId', usernames: ['user1', 'user2']})
|
|
1725
1748
|
* ```
|
|
1726
|
-
*
|
|
1727
|
-
* @since v4.0.1
|
|
1728
1749
|
*/
|
|
1729
1750
|
unblockChatRoomMembers(
|
|
1730
1751
|
this: Connection,
|
|
@@ -1752,7 +1773,6 @@ export declare namespace EasemobChat {
|
|
|
1752
1773
|
* ```typescript
|
|
1753
1774
|
* connection.getChatRoomBlacklist({chatRoomId: 'chatRoomId'})
|
|
1754
1775
|
* ```
|
|
1755
|
-
* @since v4.0.1
|
|
1756
1776
|
*/
|
|
1757
1777
|
getChatRoomBlacklist(
|
|
1758
1778
|
this: Connection,
|
|
@@ -1782,7 +1802,7 @@ export declare namespace EasemobChat {
|
|
|
1782
1802
|
): Promise<AsyncResult<WhetherAbleSendChatRoomMsgResult>>;
|
|
1783
1803
|
|
|
1784
1804
|
/**
|
|
1785
|
-
*
|
|
1805
|
+
* Unmute all the members in the chat room. Only the chatroom owner or admin can call this method.
|
|
1786
1806
|
*
|
|
1787
1807
|
* ```typescript
|
|
1788
1808
|
* connection.enableSendChatRoomMsg({chatRoomId: 'chatRoomId'})
|
|
@@ -1795,12 +1815,13 @@ export declare namespace EasemobChat {
|
|
|
1795
1815
|
success?: (
|
|
1796
1816
|
res: AsyncResult<WhetherAbleSendChatRoomMsgResult>
|
|
1797
1817
|
) => void;
|
|
1798
|
-
error?: (
|
|
1818
|
+
error?: (error: ErrorEvent) => void;
|
|
1799
1819
|
}
|
|
1800
1820
|
): Promise<AsyncResult<WhetherAbleSendChatRoomMsgResult>>;
|
|
1801
1821
|
|
|
1802
1822
|
/**
|
|
1803
|
-
*
|
|
1823
|
+
* @deprecated Use {@link addUsersToChatRoomAllowlist} instead.
|
|
1824
|
+
* Adds members to the allowlist of the chat room. Users added to the allow list of the chat room will receive "operation: 'addUserToAllowlist'" in the callback of onChatroomEvent.
|
|
1804
1825
|
*
|
|
1805
1826
|
* ```typescript
|
|
1806
1827
|
* connection.addUsersToGroupWhitelist({groupId: 'groupId'})
|
|
@@ -1820,6 +1841,27 @@ export declare namespace EasemobChat {
|
|
|
1820
1841
|
}
|
|
1821
1842
|
): Promise<AsyncResult<CommonRequestResult | CommonRequestResult[]>>;
|
|
1822
1843
|
|
|
1844
|
+
/**`
|
|
1845
|
+
* Adds members to the allowlist of the chat room. Users added to the allow list of the chat room will receive "operation: 'addUserToAllowlist'" in the callback of onChatroomEvent.
|
|
1846
|
+
*
|
|
1847
|
+
* ```typescript
|
|
1848
|
+
* connection.addUsersToChatRoomAllowlist({groupId: 'groupId'})
|
|
1849
|
+
* ```
|
|
1850
|
+
*/
|
|
1851
|
+
addUsersToChatRoomAllowlist(
|
|
1852
|
+
this: Connection,
|
|
1853
|
+
params: {
|
|
1854
|
+
chatRoomId: string;
|
|
1855
|
+
users: string[];
|
|
1856
|
+
success?: (
|
|
1857
|
+
res: AsyncResult<
|
|
1858
|
+
CommonRequestResult | CommonRequestResult[]
|
|
1859
|
+
>
|
|
1860
|
+
) => void;
|
|
1861
|
+
error?: (error: ErrorEvent) => void;
|
|
1862
|
+
}
|
|
1863
|
+
): Promise<AsyncResult<CommonRequestResult | CommonRequestResult[]>>;
|
|
1864
|
+
|
|
1823
1865
|
/** @deprecated */
|
|
1824
1866
|
rmUsersFromChatRoomWhitelist(
|
|
1825
1867
|
this: Connection,
|
|
@@ -1832,12 +1874,12 @@ export declare namespace EasemobChat {
|
|
|
1832
1874
|
): Promise<AsyncResult<CommonRequestResult>>;
|
|
1833
1875
|
|
|
1834
1876
|
/**
|
|
1835
|
-
*
|
|
1877
|
+
* @deprecated Use {@link removeChatRoomAllowlistMember} instead.
|
|
1878
|
+
* Removes members from the allowlist in the chatroom. Only the chatroom owner or admin can call this method. The users who are removed will receive "operation:'removeAllowlistMember'" in the callback of onChatroomEvent.
|
|
1836
1879
|
*
|
|
1837
1880
|
* ```typescript
|
|
1838
1881
|
* connection.removeChatRoomWhitelistMember({chatRoomId: 'chatRoomId', userName: 'user1'})
|
|
1839
1882
|
* `
|
|
1840
|
-
* @since v4.0.1
|
|
1841
1883
|
*/
|
|
1842
1884
|
removeChatRoomWhitelistMember(
|
|
1843
1885
|
this: Connection,
|
|
@@ -1850,7 +1892,25 @@ export declare namespace EasemobChat {
|
|
|
1850
1892
|
): Promise<AsyncResult<CommonRequestResult>>;
|
|
1851
1893
|
|
|
1852
1894
|
/**
|
|
1853
|
-
*
|
|
1895
|
+
* Removes members from the allowlist in the chatroom. Only the chatroom owner or admin can call this method. The users who are removed will receive "operation:'removeAllowlistMember'" in the callback of onChatroomEvent.
|
|
1896
|
+
*
|
|
1897
|
+
* ```typescript
|
|
1898
|
+
* connection.removeChatRoomAllowlistMember({chatRoomId: 'chatRoomId', userName: 'user1'})
|
|
1899
|
+
* `
|
|
1900
|
+
*/
|
|
1901
|
+
removeChatRoomAllowlistMember(
|
|
1902
|
+
this: Connection,
|
|
1903
|
+
params: {
|
|
1904
|
+
chatRoomId: string;
|
|
1905
|
+
userName: string;
|
|
1906
|
+
success?: (res: AsyncResult<CommonRequestResult>) => void;
|
|
1907
|
+
error?: (error: ErrorEvent) => void;
|
|
1908
|
+
}
|
|
1909
|
+
): Promise<AsyncResult<CommonRequestResult>>;
|
|
1910
|
+
|
|
1911
|
+
/**
|
|
1912
|
+
* @deprecated Use {@link getChatRoomAllowlist} instead.
|
|
1913
|
+
* Gets the allowlist of the chat room. Only the chat room owner or admin can call this method.
|
|
1854
1914
|
*
|
|
1855
1915
|
* ```typescript
|
|
1856
1916
|
* connection.getChatRoomWhitelist({chatRoomId: 'chatRoomId'})
|
|
@@ -1866,7 +1926,24 @@ export declare namespace EasemobChat {
|
|
|
1866
1926
|
): Promise<AsyncResult<UserId[]>>;
|
|
1867
1927
|
|
|
1868
1928
|
/**
|
|
1869
|
-
*
|
|
1929
|
+
* Gets the allowlist of the chat room. Only the chat room owner or admin can call this method.
|
|
1930
|
+
*
|
|
1931
|
+
* ```typescript
|
|
1932
|
+
* connection.getChatRoomAllowlist({chatRoomId: 'chatRoomId'})
|
|
1933
|
+
* ```
|
|
1934
|
+
*/
|
|
1935
|
+
getChatRoomAllowlist(
|
|
1936
|
+
this: Connection,
|
|
1937
|
+
params: {
|
|
1938
|
+
chatRoomId: string;
|
|
1939
|
+
success: (res: AsyncResult<UserId[]>) => void;
|
|
1940
|
+
error: (error: ErrorEvent) => void;
|
|
1941
|
+
}
|
|
1942
|
+
): Promise<AsyncResult<UserId[]>>;
|
|
1943
|
+
|
|
1944
|
+
/**
|
|
1945
|
+
* @deprecated Use {@link isInChatRoomAllowlist} instead.
|
|
1946
|
+
* Checks whether chat room members are on the allowlist. Only the chat room owner or admin can call this method. The chat room members can check themselves.
|
|
1870
1947
|
*
|
|
1871
1948
|
* ```typescript
|
|
1872
1949
|
* connection.isChatRoomWhiteUser({chatRoomId: 'chatRoomId', userName: 'user1'})
|
|
@@ -1883,20 +1960,37 @@ export declare namespace EasemobChat {
|
|
|
1883
1960
|
): Promise<AsyncResult<IsChatRoomWhiteUserResult>>;
|
|
1884
1961
|
|
|
1885
1962
|
/**
|
|
1886
|
-
*
|
|
1963
|
+
* Checks whether chat room members are on the allowlist. Only the chat room owner or admin can call this method. The chat room members can check themselves.
|
|
1887
1964
|
*
|
|
1888
1965
|
* ```typescript
|
|
1889
|
-
* connection.
|
|
1890
|
-
*
|
|
1966
|
+
* connection.isInChatRoomAllowlist({chatRoomId: 'chatRoomId', userName: 'user1'})
|
|
1967
|
+
* `
|
|
1891
1968
|
*/
|
|
1892
|
-
|
|
1969
|
+
isInChatRoomAllowlist(
|
|
1893
1970
|
this: Connection,
|
|
1894
1971
|
params: {
|
|
1895
|
-
|
|
1896
|
-
|
|
1897
|
-
|
|
1898
|
-
) => void;
|
|
1899
|
-
|
|
1972
|
+
chatRoomId: string;
|
|
1973
|
+
userName: string;
|
|
1974
|
+
success?: (res: AsyncResult<IsChatRoomWhiteUserResult>) => void;
|
|
1975
|
+
error?: (error: ErrorEvent) => void;
|
|
1976
|
+
}
|
|
1977
|
+
): Promise<AsyncResult<IsChatRoomWhiteUserResult>>;
|
|
1978
|
+
|
|
1979
|
+
/**
|
|
1980
|
+
* Gets the announcement of the chat room.
|
|
1981
|
+
*
|
|
1982
|
+
* ```typescript
|
|
1983
|
+
* connection.fetchChatRoomAnnouncement({roomId: 'roomId'})
|
|
1984
|
+
* ```
|
|
1985
|
+
*/
|
|
1986
|
+
fetchChatRoomAnnouncement(
|
|
1987
|
+
this: Connection,
|
|
1988
|
+
params: {
|
|
1989
|
+
roomId: string;
|
|
1990
|
+
success?: (
|
|
1991
|
+
res: AsyncResult<FetchChatRoomAnnouncementResult>
|
|
1992
|
+
) => void;
|
|
1993
|
+
error?: (error: ErrorEvent) => void;
|
|
1900
1994
|
}
|
|
1901
1995
|
): Promise<AsyncResult<FetchChatRoomAnnouncementResult>>;
|
|
1902
1996
|
|
|
@@ -1920,12 +2014,11 @@ export declare namespace EasemobChat {
|
|
|
1920
2014
|
): Promise<AsyncResult<UpdateChatRoomAnnouncementResult>>;
|
|
1921
2015
|
|
|
1922
2016
|
/**
|
|
1923
|
-
* Uploads shared
|
|
2017
|
+
* Uploads a shared file to the chat room.
|
|
1924
2018
|
*
|
|
1925
2019
|
* ```typescript
|
|
1926
2020
|
* connection.uploadChatRoomSharedFile({roomId: 'roomId', file: 'file object', onFileUploadProgress: onFileUploadProgress, onFileUploadComplete: onFileUploadComplete,onFileUploadError:onFileUploadError,onFileUploadCanceled:onFileUploadCanceled})
|
|
1927
2021
|
* ```
|
|
1928
|
-
* @return Void
|
|
1929
2022
|
*/
|
|
1930
2023
|
uploadChatRoomSharedFile(
|
|
1931
2024
|
this: Connection,
|
|
@@ -1940,7 +2033,7 @@ export declare namespace EasemobChat {
|
|
|
1940
2033
|
): void;
|
|
1941
2034
|
|
|
1942
2035
|
/**
|
|
1943
|
-
* Deletes the chat room
|
|
2036
|
+
* Deletes a shared file of the chat room.
|
|
1944
2037
|
*
|
|
1945
2038
|
* ```typescript
|
|
1946
2039
|
* connection.deleteChatRoomSharedFile({roomId: 'roomId', fileId: 'fileId'})
|
|
@@ -1959,6 +2052,7 @@ export declare namespace EasemobChat {
|
|
|
1959
2052
|
): Promise<AsyncResult<DeleteChatRoomSharedFileResult>>;
|
|
1960
2053
|
|
|
1961
2054
|
/**
|
|
2055
|
+
* @deprecated Use {@link getChatRoomSharedFilelist}
|
|
1962
2056
|
* Gets a list of shared files in the chat room.
|
|
1963
2057
|
*
|
|
1964
2058
|
* ```typescript
|
|
@@ -1976,6 +2070,24 @@ export declare namespace EasemobChat {
|
|
|
1976
2070
|
}
|
|
1977
2071
|
): Promise<AsyncResult<FetchChatRoomSharedFileListResult[]>>;
|
|
1978
2072
|
|
|
2073
|
+
/**
|
|
2074
|
+
* Gets a list of shared files in the chat room.
|
|
2075
|
+
*
|
|
2076
|
+
* ```typescript
|
|
2077
|
+
* connection.getChatRoomSharedFilelist({roomId: 'roomId'})
|
|
2078
|
+
* ```
|
|
2079
|
+
*/
|
|
2080
|
+
getChatRoomSharedFilelist(
|
|
2081
|
+
this: Connection,
|
|
2082
|
+
params: {
|
|
2083
|
+
roomId: string;
|
|
2084
|
+
success?: (
|
|
2085
|
+
res: AsyncResult<FetchChatRoomSharedFileListResult[]>
|
|
2086
|
+
) => void;
|
|
2087
|
+
error?: (error: ErrorEvent) => void;
|
|
2088
|
+
}
|
|
2089
|
+
): Promise<AsyncResult<FetchChatRoomSharedFileListResult[]>>;
|
|
2090
|
+
|
|
1979
2091
|
// Group API
|
|
1980
2092
|
/** @deprecated */
|
|
1981
2093
|
createGroupNew(
|
|
@@ -2012,7 +2124,6 @@ export declare namespace EasemobChat {
|
|
|
2012
2124
|
}
|
|
2013
2125
|
})
|
|
2014
2126
|
* ```
|
|
2015
|
-
* @since v4.0.1
|
|
2016
2127
|
*/
|
|
2017
2128
|
createGroup(
|
|
2018
2129
|
this: Connection,
|
|
@@ -2043,11 +2154,10 @@ export declare namespace EasemobChat {
|
|
|
2043
2154
|
): Promise<AsyncResult<BlockGroupResult>>;
|
|
2044
2155
|
|
|
2045
2156
|
/**
|
|
2046
|
-
*
|
|
2157
|
+
* Blocks group messages. This method is only valid for mobile devices.
|
|
2047
2158
|
* ```typescript
|
|
2048
2159
|
* connection.blockGroupMessages({groupId: 'groupId'})
|
|
2049
2160
|
* ```
|
|
2050
|
-
* @since v4.0.1
|
|
2051
2161
|
*/
|
|
2052
2162
|
blockGroupMessages(
|
|
2053
2163
|
this: Connection,
|
|
@@ -2059,12 +2169,12 @@ export declare namespace EasemobChat {
|
|
|
2059
2169
|
): Promise<AsyncResult<BlockGroupResult>>;
|
|
2060
2170
|
|
|
2061
2171
|
/**
|
|
2062
|
-
*
|
|
2172
|
+
* @deprecated Use {@link getPublicGroups} instead.
|
|
2173
|
+
* Gets public groups with pagination.
|
|
2063
2174
|
*
|
|
2064
2175
|
* ```typescript
|
|
2065
2176
|
* connection.listGroups({limit: 20, cursor: null})
|
|
2066
2177
|
* ```
|
|
2067
|
-
* @since 1.4.11
|
|
2068
2178
|
*/
|
|
2069
2179
|
listGroups(
|
|
2070
2180
|
this: Connection,
|
|
@@ -2076,13 +2186,29 @@ export declare namespace EasemobChat {
|
|
|
2076
2186
|
}
|
|
2077
2187
|
): Promise<AsyncResult<BaseGroupInfo[]>>;
|
|
2078
2188
|
|
|
2189
|
+
/**
|
|
2190
|
+
* Gets public groups with pagination.
|
|
2191
|
+
*
|
|
2192
|
+
* ```typescript
|
|
2193
|
+
* connection.getPublicGroups({limit: 20, cursor: null})
|
|
2194
|
+
* ```
|
|
2195
|
+
*/
|
|
2196
|
+
getPublicGroups(
|
|
2197
|
+
this: Connection,
|
|
2198
|
+
params: {
|
|
2199
|
+
limit: number;
|
|
2200
|
+
cursor?: string;
|
|
2201
|
+
success?: (res: AsyncResult<BaseGroupInfo[]>) => void;
|
|
2202
|
+
error?: (error: ErrorEvent) => void;
|
|
2203
|
+
}
|
|
2204
|
+
): Promise<AsyncResult<BaseGroupInfo[]>>;
|
|
2205
|
+
|
|
2079
2206
|
/**
|
|
2080
2207
|
* Lists all the groups a user has joined.
|
|
2081
2208
|
*
|
|
2082
2209
|
* ```typescript
|
|
2083
2210
|
* connection.getGroup()
|
|
2084
2211
|
* ```
|
|
2085
|
-
* @since 1.4.11
|
|
2086
2212
|
* @deprecated
|
|
2087
2213
|
*/
|
|
2088
2214
|
getGroup(
|
|
@@ -2105,6 +2231,8 @@ export declare namespace EasemobChat {
|
|
|
2105
2231
|
params: {
|
|
2106
2232
|
pageNum: number;
|
|
2107
2233
|
pageSize: number;
|
|
2234
|
+
needAffiliations?: boolean;
|
|
2235
|
+
needRole?: boolean;
|
|
2108
2236
|
success?: (res: AsyncResult<BaseGroupInfo[]>) => void;
|
|
2109
2237
|
error?: (error: ErrorEvent) => void;
|
|
2110
2238
|
}
|
|
@@ -2122,12 +2250,11 @@ export declare namespace EasemobChat {
|
|
|
2122
2250
|
): Promise<AsyncResult<ChangeGroupOwnerResult>>;
|
|
2123
2251
|
|
|
2124
2252
|
/**
|
|
2125
|
-
* Transfers group.
|
|
2253
|
+
* Transfers a group. Only the group owner can call this method. Group members will receive "operation: 'changeOwner'" in the callback of onGroupEvent.
|
|
2126
2254
|
*
|
|
2127
2255
|
* ```typescript
|
|
2128
2256
|
* connection.changeGroupOwner({groupId: 'groupId', newOwner: 'user1'})
|
|
2129
2257
|
* ```
|
|
2130
|
-
* @since v4.0.1
|
|
2131
2258
|
*/
|
|
2132
2259
|
changeGroupOwner(
|
|
2133
2260
|
this: Connection,
|
|
@@ -2140,23 +2267,22 @@ export declare namespace EasemobChat {
|
|
|
2140
2267
|
): Promise<AsyncResult<ChangeGroupOwnerResult>>;
|
|
2141
2268
|
|
|
2142
2269
|
/**
|
|
2143
|
-
* Gets group
|
|
2270
|
+
* Gets specifications of the group.
|
|
2144
2271
|
* ```typescript
|
|
2145
2272
|
* connection.getGroupInfo({groupId: groupId})
|
|
2146
2273
|
* ```
|
|
2147
|
-
* @since 1.4.11
|
|
2148
2274
|
*/
|
|
2149
2275
|
getGroupInfo(
|
|
2150
2276
|
this: Connection,
|
|
2151
2277
|
params: {
|
|
2152
|
-
groupId: string;
|
|
2278
|
+
groupId: string | string[];
|
|
2153
2279
|
success?: (res: AsyncResult<GroupDetailInfo[]>) => void;
|
|
2154
2280
|
error?: (error: ErrorEvent) => void;
|
|
2155
2281
|
}
|
|
2156
2282
|
): Promise<AsyncResult<GroupDetailInfo[]>>;
|
|
2157
2283
|
|
|
2158
2284
|
/**
|
|
2159
|
-
*
|
|
2285
|
+
* Modifies group information. Only the group admin can call this method.
|
|
2160
2286
|
*
|
|
2161
2287
|
* ```typescript
|
|
2162
2288
|
* connection.modifyGroup({groupId: 'groupId', groupName: 'groupName', description:'description'})
|
|
@@ -2186,12 +2312,11 @@ export declare namespace EasemobChat {
|
|
|
2186
2312
|
): Promise<AsyncResult<GroupMember[]>>;
|
|
2187
2313
|
|
|
2188
2314
|
/**
|
|
2189
|
-
* Lists all members of the group
|
|
2315
|
+
* Lists all members of the group with pagination.
|
|
2190
2316
|
*
|
|
2191
2317
|
* ```typescript
|
|
2192
2318
|
* connection.listGroupMembers({pageNum: 1, pageSize: 20, groupId: 'groupId'})
|
|
2193
2319
|
* ```
|
|
2194
|
-
* @since v4.0.1
|
|
2195
2320
|
*/
|
|
2196
2321
|
listGroupMembers(
|
|
2197
2322
|
this: Connection,
|
|
@@ -2205,11 +2330,10 @@ export declare namespace EasemobChat {
|
|
|
2205
2330
|
): Promise<AsyncResult<GroupMember[]>>;
|
|
2206
2331
|
|
|
2207
2332
|
/**
|
|
2208
|
-
* Gets all
|
|
2333
|
+
* Gets all admins in the group.
|
|
2209
2334
|
* ```typescript
|
|
2210
2335
|
* connection.getGroupAdmin({groupId: 'groupId'})
|
|
2211
2336
|
* ```
|
|
2212
|
-
* @since 1.4.11
|
|
2213
2337
|
*/
|
|
2214
2338
|
getGroupAdmin(
|
|
2215
2339
|
this: Connection,
|
|
@@ -2232,12 +2356,11 @@ export declare namespace EasemobChat {
|
|
|
2232
2356
|
): Promise<AsyncResult<SetGroupAdminResult>>;
|
|
2233
2357
|
|
|
2234
2358
|
/**
|
|
2235
|
-
* Sets
|
|
2359
|
+
* Sets a group admin. Only the group owner can call this method. The user set as an admin will receive "operation: 'setAdmin'" in the callback of onGroupEvent.
|
|
2236
2360
|
*
|
|
2237
2361
|
* ```typescript
|
|
2238
2362
|
* connection.setGroupAdmin({groupId: 'groupId', username: 'user1'})
|
|
2239
2363
|
* ```
|
|
2240
|
-
* @since v4.0.1
|
|
2241
2364
|
*/
|
|
2242
2365
|
setGroupAdmin(
|
|
2243
2366
|
this: Connection,
|
|
@@ -2250,10 +2373,10 @@ export declare namespace EasemobChat {
|
|
|
2250
2373
|
): Promise<AsyncResult<SetGroupAdminResult>>;
|
|
2251
2374
|
|
|
2252
2375
|
/**
|
|
2253
|
-
* Removes
|
|
2376
|
+
* Removes a group admin. Only the group owner can call this method. The user whose admin permissions are revoked will receive "operation: 'removeAdmin'" in the callback of onGroupEvent.
|
|
2254
2377
|
*
|
|
2255
2378
|
* ```typescript
|
|
2256
|
-
* connection.removeAdmin({
|
|
2379
|
+
* connection.removeAdmin({groupId: 'groupId', username: 'user1'})
|
|
2257
2380
|
* ```
|
|
2258
2381
|
*/
|
|
2259
2382
|
removeAdmin(
|
|
@@ -2277,12 +2400,11 @@ export declare namespace EasemobChat {
|
|
|
2277
2400
|
): Promise<AsyncResult<DestroyGroupResult>>;
|
|
2278
2401
|
|
|
2279
2402
|
/**
|
|
2280
|
-
* Destroys a group
|
|
2403
|
+
* Destroys a group. Only the group owner can call this method. Group members will receive "operation: 'destroy'" in the callback of onGroupEvent.
|
|
2281
2404
|
*
|
|
2282
2405
|
* ```typescript
|
|
2283
2406
|
* connection.destroyGroup({groupId: 'groupId'})
|
|
2284
2407
|
* ```
|
|
2285
|
-
* @since v4.0.1
|
|
2286
2408
|
*/
|
|
2287
2409
|
destroyGroup(
|
|
2288
2410
|
this: Connection,
|
|
@@ -2294,7 +2416,7 @@ export declare namespace EasemobChat {
|
|
|
2294
2416
|
): Promise<AsyncResult<DestroyGroupResult>>;
|
|
2295
2417
|
|
|
2296
2418
|
/**
|
|
2297
|
-
* Leaves the group
|
|
2419
|
+
* Leaves the group. Group members will receive "operation: 'memberAbsence'" in the callback of onGroupEvent.
|
|
2298
2420
|
*
|
|
2299
2421
|
* ```typescript
|
|
2300
2422
|
* connection.quitGroup({groupId: 'groupId'})
|
|
@@ -2323,12 +2445,13 @@ export declare namespace EasemobChat {
|
|
|
2323
2445
|
): Promise<AsyncResult<InviteUsersToGroupResult[]>>;
|
|
2324
2446
|
|
|
2325
2447
|
/**
|
|
2326
|
-
* Invites users into group.
|
|
2448
|
+
* Invites users into a group.
|
|
2449
|
+
* Creates a group instance "inviteNeedConfirm:true", the invited users will receive "operation: 'inviteToJoin'" in the callback of onGroupEvent.
|
|
2450
|
+
* Creates a group instance "inviteNeedConfirm:false", the invited users will receive "operation: 'directJoined'" in the callback of onGroupEvent.
|
|
2327
2451
|
*
|
|
2328
2452
|
* ```typescript
|
|
2329
2453
|
* connection.inviteUsersToGroup({groupId: 'groupId', users: ['user1', 'user2']})
|
|
2330
2454
|
* ```
|
|
2331
|
-
* @since v4.0.1
|
|
2332
2455
|
*/
|
|
2333
2456
|
inviteUsersToGroup(
|
|
2334
2457
|
this: Connection,
|
|
@@ -2343,12 +2466,11 @@ export declare namespace EasemobChat {
|
|
|
2343
2466
|
): Promise<AsyncResult<InviteUsersToGroupResult[]>>;
|
|
2344
2467
|
|
|
2345
2468
|
/**
|
|
2346
|
-
*
|
|
2469
|
+
* Applies to join the group. The group owner and admin will receive "operation: 'requestToJoin'" in the callback of onGroupEvent.
|
|
2347
2470
|
*
|
|
2348
2471
|
* ```typescript
|
|
2349
2472
|
* connection.joinGroup({groupId: 'groupId', message: 'I want to join the group'})
|
|
2350
2473
|
* ```
|
|
2351
|
-
* @since 1.4.11
|
|
2352
2474
|
*/
|
|
2353
2475
|
joinGroup(
|
|
2354
2476
|
this: Connection,
|
|
@@ -2372,12 +2494,11 @@ export declare namespace EasemobChat {
|
|
|
2372
2494
|
): Promise<AsyncResult<CommonRequestResult>>;
|
|
2373
2495
|
|
|
2374
2496
|
/**
|
|
2375
|
-
*
|
|
2497
|
+
* Accepts a group request. Only the group owner or admin can call this method. The user joining the group will receive "operation: 'acceptRequest'" in the callback of onGroupEvent.
|
|
2376
2498
|
*
|
|
2377
2499
|
* ```typescript
|
|
2378
2500
|
* connection.acceptGroupJoinRequest({applicant: 'user1', groupId: 'groupId'})
|
|
2379
2501
|
* ```
|
|
2380
|
-
* @since v4.0.1
|
|
2381
2502
|
*/
|
|
2382
2503
|
acceptGroupJoinRequest(
|
|
2383
2504
|
this: Connection,
|
|
@@ -2402,12 +2523,11 @@ export declare namespace EasemobChat {
|
|
|
2402
2523
|
): Promise<AsyncResult<CommonRequestResult>>;
|
|
2403
2524
|
|
|
2404
2525
|
/**
|
|
2405
|
-
*
|
|
2526
|
+
* Declines a group request. Only the group owner or admin can call this method.
|
|
2406
2527
|
*
|
|
2407
2528
|
* ```typescript
|
|
2408
2529
|
* connection.rejectGroupJoinRequest({applicant: 'user1', groupId: 'groupId', reason: 'I do not like you'})
|
|
2409
2530
|
* ```
|
|
2410
|
-
* @since v4.0.1
|
|
2411
2531
|
*/
|
|
2412
2532
|
rejectGroupJoinRequest(
|
|
2413
2533
|
this: Connection,
|
|
@@ -2432,12 +2552,11 @@ export declare namespace EasemobChat {
|
|
|
2432
2552
|
): Promise<AsyncResult<CommonRequestResult>>;
|
|
2433
2553
|
|
|
2434
2554
|
/**
|
|
2435
|
-
* Accepts
|
|
2555
|
+
* Accepts a group invitation. If a group member invites a user to join the group, the invitee can call this method to accept the invitation. The inviter will receive "operation: 'acceptInvite'" in the callback of onGroupEvent. The user who joins the group successfully will receive "operation: 'memberPresence'" in the callback of onGroupEvent.
|
|
2436
2556
|
*
|
|
2437
2557
|
* ```typescript
|
|
2438
2558
|
* connection.acceptGroupInvite({invitee: 'myUserId', groupId: 'groupId'})
|
|
2439
2559
|
* ```
|
|
2440
|
-
* @since v4.0.1
|
|
2441
2560
|
*/
|
|
2442
2561
|
acceptGroupInvite(
|
|
2443
2562
|
this: Connection,
|
|
@@ -2461,12 +2580,11 @@ export declare namespace EasemobChat {
|
|
|
2461
2580
|
): Promise<any>;
|
|
2462
2581
|
|
|
2463
2582
|
/**
|
|
2464
|
-
*
|
|
2583
|
+
* Declines a group invitation. If a group member invites a user to join a group, the invitee can call this method to decline the invitation.
|
|
2465
2584
|
*
|
|
2466
2585
|
* ```typescript
|
|
2467
2586
|
* connection.rejectGroupInvite({invitee: 'myUserId', groupId: 'groupId'})
|
|
2468
2587
|
* ```
|
|
2469
|
-
* @since v4.0.1
|
|
2470
2588
|
*/
|
|
2471
2589
|
rejectGroupInvite(
|
|
2472
2590
|
this: Connection,
|
|
@@ -2490,12 +2608,11 @@ export declare namespace EasemobChat {
|
|
|
2490
2608
|
): Promise<AsyncResult<RemoveGroupMemberResult>>;
|
|
2491
2609
|
|
|
2492
2610
|
/**
|
|
2493
|
-
* Removes a group
|
|
2611
|
+
* Removes a member from the group. Only the group owner or admin can call this method. The removed member will receive "operation: 'removeMember' in the callback of onGroupEvent, and other group members will receive "operation: 'memberAbsence' in the callback of onGroupEvent.
|
|
2494
2612
|
*
|
|
2495
2613
|
* ```typescript
|
|
2496
2614
|
* connection.removeGroupMember({groupId: 'groupId', username: 'user1'})
|
|
2497
2615
|
* ```
|
|
2498
|
-
* @since v4.0.1
|
|
2499
2616
|
*/
|
|
2500
2617
|
removeGroupMember(
|
|
2501
2618
|
this: Connection,
|
|
@@ -2519,12 +2636,11 @@ export declare namespace EasemobChat {
|
|
|
2519
2636
|
): Promise<AsyncResult<RemoveGroupMemberResult[]>>;
|
|
2520
2637
|
|
|
2521
2638
|
/**
|
|
2522
|
-
* Removes group
|
|
2639
|
+
* Removes members from the group. Only the group owner or admin can call this method. The removed members will receive "operation: 'removeMember'" in the callback of onGroupEvent, and other group members will receive "operation: 'memberAbsence' in the callback of onGroupEvent.
|
|
2523
2640
|
*
|
|
2524
2641
|
* ```typescript
|
|
2525
2642
|
* connection.removeGroupMembers({groupId: 'groupId', users: ['user1', 'user2']})
|
|
2526
2643
|
* ```
|
|
2527
|
-
* @since v4.0.1
|
|
2528
2644
|
*/
|
|
2529
2645
|
removeGroupMembers(
|
|
2530
2646
|
this: Connection,
|
|
@@ -2549,12 +2665,11 @@ export declare namespace EasemobChat {
|
|
|
2549
2665
|
): Promise<AsyncResult<MuteGroupMemberResult[]>>;
|
|
2550
2666
|
|
|
2551
2667
|
/**
|
|
2552
|
-
* Mutes a group member.
|
|
2668
|
+
* Mutes a group member. Only the group owner or admin can call this method. The muted member and other members will receive "operation:'muteMember'" in the callback of onGroupEvent.
|
|
2553
2669
|
*
|
|
2554
2670
|
* ```typescript
|
|
2555
2671
|
* connection.muteGroupMember({username: 'user1', muteDuration: -1, groupId: 'groupId'})
|
|
2556
2672
|
* ```
|
|
2557
|
-
* @since v4.0.1
|
|
2558
2673
|
*/
|
|
2559
2674
|
muteGroupMember(
|
|
2560
2675
|
this: Connection,
|
|
@@ -2579,12 +2694,11 @@ export declare namespace EasemobChat {
|
|
|
2579
2694
|
): Promise<AsyncResult<UnmuteGroupMemberResult[]>>;
|
|
2580
2695
|
|
|
2581
2696
|
/**
|
|
2582
|
-
*
|
|
2697
|
+
* Unmute a group member. Only the group owner or admin can call this method. All members, including the muted, will receive "operation: 'unmuteMember'" in the callback of onGroupEvent.
|
|
2583
2698
|
*
|
|
2584
2699
|
* ```typescript
|
|
2585
2700
|
* connection.unmuteGroupMember({groupId: 'groupId', username: 'user1'})
|
|
2586
2701
|
* ```
|
|
2587
|
-
* @since v4.0.1
|
|
2588
2702
|
*/
|
|
2589
2703
|
unmuteGroupMember(
|
|
2590
2704
|
this: Connection,
|
|
@@ -2607,12 +2721,11 @@ export declare namespace EasemobChat {
|
|
|
2607
2721
|
): Promise<AsyncResult<GetGroupMuteListResult[]>>;
|
|
2608
2722
|
|
|
2609
2723
|
/**
|
|
2610
|
-
* Gets the
|
|
2724
|
+
* Gets the mute list of the group.
|
|
2611
2725
|
*
|
|
2612
2726
|
* ```typescript
|
|
2613
2727
|
* connection.getGroupMuteList({groupId: 'groupId'})
|
|
2614
2728
|
* ```
|
|
2615
|
-
* @since v4.0.1
|
|
2616
2729
|
*/
|
|
2617
2730
|
getGroupMuteList(
|
|
2618
2731
|
this: Connection,
|
|
@@ -2635,12 +2748,11 @@ export declare namespace EasemobChat {
|
|
|
2635
2748
|
): Promise<AsyncResult<GroupRequestResult>>;
|
|
2636
2749
|
|
|
2637
2750
|
/**
|
|
2638
|
-
* Adds a member to the group
|
|
2751
|
+
* Adds a member to the group blocklist. Only the group owner or admin can call this method. The member added to the blocklist will receive "operation: 'removeMember'" in the callback of onGroupEvent.
|
|
2639
2752
|
*
|
|
2640
2753
|
* ```typescript
|
|
2641
2754
|
* connection.blockGroupMember({groupId: 'groupId', username: 'user1'})
|
|
2642
2755
|
* ```
|
|
2643
|
-
* @since v4.0.1
|
|
2644
2756
|
*/
|
|
2645
2757
|
blockGroupMember(
|
|
2646
2758
|
this: Connection,
|
|
@@ -2664,12 +2776,11 @@ export declare namespace EasemobChat {
|
|
|
2664
2776
|
): Promise<AsyncResult<GroupRequestResult[]>>;
|
|
2665
2777
|
|
|
2666
2778
|
/**
|
|
2667
|
-
* Adds
|
|
2779
|
+
* Adds members to the group blocklist in bulk. Only the group admin can call this method. Members added to the blocklist will receive "operation: 'removeMember'" in the callback of onGroupEvent.
|
|
2668
2780
|
*
|
|
2669
2781
|
* ```typescript
|
|
2670
2782
|
* connection.blockGroupMembers({usernames: ['user1', 'user2'], groupId: 'groupId'})
|
|
2671
2783
|
* ```
|
|
2672
|
-
* @since v4.0.1
|
|
2673
2784
|
*/
|
|
2674
2785
|
blockGroupMembers(
|
|
2675
2786
|
this: Connection,
|
|
@@ -2693,12 +2804,11 @@ export declare namespace EasemobChat {
|
|
|
2693
2804
|
): Promise<AsyncResult<GroupRequestResult>>;
|
|
2694
2805
|
|
|
2695
2806
|
/**
|
|
2696
|
-
*
|
|
2807
|
+
* Removes a member from the group blocklist. Only the group admin can call this method. Members who have been removed from the blocklist will receive "operation: 'unblockMember'" in the callback of onGroupEvent.
|
|
2697
2808
|
*
|
|
2698
2809
|
* ```typescript
|
|
2699
2810
|
* connection.unblockGroupMember({groupId: 'groupId'})
|
|
2700
2811
|
* ```
|
|
2701
|
-
* @since v4.0.1
|
|
2702
2812
|
*/
|
|
2703
2813
|
unblockGroupMember(
|
|
2704
2814
|
this: Connection,
|
|
@@ -2722,12 +2832,11 @@ export declare namespace EasemobChat {
|
|
|
2722
2832
|
): Promise<AsyncResult<GroupRequestResult[]>>;
|
|
2723
2833
|
|
|
2724
2834
|
/**
|
|
2725
|
-
*
|
|
2835
|
+
* Removes members from the group blocklist in bulk. Only the group owner or admin can call this method. Members who are removed from the blocklist will receive "operation: 'unblockMember'" in the callback of onGroupEvent.
|
|
2726
2836
|
*
|
|
2727
2837
|
* ```typescript
|
|
2728
2838
|
* connection.unblockGroupMembers({groupId: 'groupId', usernames: ['user1', 'user2']})
|
|
2729
2839
|
* ```
|
|
2730
|
-
* @since v4.0.1
|
|
2731
2840
|
*/
|
|
2732
2841
|
unblockGroupMembers(
|
|
2733
2842
|
this: Connection,
|
|
@@ -2750,12 +2859,13 @@ export declare namespace EasemobChat {
|
|
|
2750
2859
|
): Promise<AsyncResult<UserId[]>>;
|
|
2751
2860
|
|
|
2752
2861
|
/**
|
|
2753
|
-
* Gets group
|
|
2862
|
+
* Gets the group blocklist.
|
|
2754
2863
|
*
|
|
2755
2864
|
* ```typescript
|
|
2756
2865
|
* connection.getGroupBlacklist({groupId: 'groupId'})
|
|
2757
2866
|
* ```
|
|
2758
|
-
* @
|
|
2867
|
+
* @hidden
|
|
2868
|
+
* @deprecated
|
|
2759
2869
|
*/
|
|
2760
2870
|
getGroupBlacklist(
|
|
2761
2871
|
this: Connection,
|
|
@@ -2767,7 +2877,23 @@ export declare namespace EasemobChat {
|
|
|
2767
2877
|
): Promise<AsyncResult<UserId[]>>;
|
|
2768
2878
|
|
|
2769
2879
|
/**
|
|
2770
|
-
*
|
|
2880
|
+
* Gets the group blocklist.
|
|
2881
|
+
*
|
|
2882
|
+
* ```typescript
|
|
2883
|
+
* connection.getGroupBlocklist({groupId: 'groupId'})
|
|
2884
|
+
* ```
|
|
2885
|
+
*/
|
|
2886
|
+
getGroupBlocklist(
|
|
2887
|
+
this: Connection,
|
|
2888
|
+
params: {
|
|
2889
|
+
groupId: string;
|
|
2890
|
+
success?: (res: AsyncResult<UserId[]>) => void;
|
|
2891
|
+
error?: (error: ErrorEvent) => void;
|
|
2892
|
+
}
|
|
2893
|
+
): Promise<AsyncResult<UserId[]>>;
|
|
2894
|
+
|
|
2895
|
+
/**
|
|
2896
|
+
* Mutes all members. Only the group admin or above can call this method. Group members will receive "operation: 'muteAllMembers'" in the callback of onGroupEvent.
|
|
2771
2897
|
*
|
|
2772
2898
|
* ```typescript
|
|
2773
2899
|
* connection.disableSendGroupMsg({groupId: 'groupId'})
|
|
@@ -2783,7 +2909,7 @@ export declare namespace EasemobChat {
|
|
|
2783
2909
|
): Promise<AsyncResult<{ mute: true }>>;
|
|
2784
2910
|
|
|
2785
2911
|
/**
|
|
2786
|
-
*
|
|
2912
|
+
* Unmute all members. Only the group admin or above can call this method. Group members will receive "operation: 'unmuteAllMembers'" in the callback of onGroupEvent.
|
|
2787
2913
|
*
|
|
2788
2914
|
* ```typescript
|
|
2789
2915
|
* connection.enableSendGroupMsg({groupId: 'groupId'})
|
|
@@ -2799,7 +2925,9 @@ export declare namespace EasemobChat {
|
|
|
2799
2925
|
): Promise<AsyncResult<{ mute: false }>>;
|
|
2800
2926
|
|
|
2801
2927
|
/**
|
|
2802
|
-
*
|
|
2928
|
+
* @hidden
|
|
2929
|
+
* @deprecated Use {@link addUsersToGroupAllowlist} instead.
|
|
2930
|
+
* Adds members to the group allowlist. Members on the allowlist can still post messages even if they are muted in the group. Only the group admin or above can call this method. Members added to the allowlist will receive "operation: 'addUserToAllowlist'" in the callback of onGroupEvent.
|
|
2803
2931
|
*
|
|
2804
2932
|
* ```typescript
|
|
2805
2933
|
* connection.addUsersToGroupWhitelist({groupId: 'groupId'})
|
|
@@ -2815,6 +2943,23 @@ export declare namespace EasemobChat {
|
|
|
2815
2943
|
}
|
|
2816
2944
|
): Promise<AsyncResult<GroupRequestResult[]>>;
|
|
2817
2945
|
|
|
2946
|
+
/**
|
|
2947
|
+
* Adds members to the group allowlist. Members on the allowlist can still post messages even if they are muted in the group. Only the group admin or above can call this method. Members added to the allowlist will receive "operation: 'addUserToAllowlist'" in the callback of onGroupEvent.
|
|
2948
|
+
*
|
|
2949
|
+
* ```typescript
|
|
2950
|
+
* connection.addUsersToGroupAllowlist({groupId: 'groupId'})
|
|
2951
|
+
* ```
|
|
2952
|
+
*/
|
|
2953
|
+
addUsersToGroupAllowlist(
|
|
2954
|
+
this: Connection,
|
|
2955
|
+
params: {
|
|
2956
|
+
groupId: string;
|
|
2957
|
+
users: UserId[];
|
|
2958
|
+
success?: (res: AsyncResult<GroupRequestResult[]>) => void;
|
|
2959
|
+
error?: (error: ErrorEvent) => void;
|
|
2960
|
+
}
|
|
2961
|
+
): Promise<AsyncResult<GroupRequestResult[]>>;
|
|
2962
|
+
|
|
2818
2963
|
/** @deprecated */
|
|
2819
2964
|
rmUsersFromGroupWhitelist(
|
|
2820
2965
|
this: Connection,
|
|
@@ -2827,13 +2972,12 @@ export declare namespace EasemobChat {
|
|
|
2827
2972
|
): Promise<AsyncResult<GroupRequestResult>>;
|
|
2828
2973
|
|
|
2829
2974
|
/**
|
|
2830
|
-
*
|
|
2975
|
+
* @deprecated Use {@link removeGroupAllowlistMember} instead.
|
|
2976
|
+
* Removes a member from the group allowlist. Only the group admin or above can call this method. The user that is removed from the group allowlist will receive "operation:'removeAllowlistMember'" in the callback of onGroupEvent.
|
|
2831
2977
|
*
|
|
2832
2978
|
* ```typescript
|
|
2833
2979
|
* connection.removeGroupWhitelistMember({groupId: 'groupId', userName: 'user1'})
|
|
2834
2980
|
* ```
|
|
2835
|
-
*
|
|
2836
|
-
* @since v4.0.1
|
|
2837
2981
|
*/
|
|
2838
2982
|
removeGroupWhitelistMember(
|
|
2839
2983
|
this: Connection,
|
|
@@ -2846,7 +2990,25 @@ export declare namespace EasemobChat {
|
|
|
2846
2990
|
): Promise<AsyncResult<GroupRequestResult>>;
|
|
2847
2991
|
|
|
2848
2992
|
/**
|
|
2849
|
-
*
|
|
2993
|
+
* Removes a member from the group allowlist. Only the group admin or above can call this method. The user that is removed from the group allowlist will receive "operation:'removeAllowlistMember'" in the callback of onGroupEvent.
|
|
2994
|
+
*
|
|
2995
|
+
* ```typescript
|
|
2996
|
+
* connection.removeGroupAllowlistMember({groupId: 'groupId', userName: 'user1'})
|
|
2997
|
+
* ```
|
|
2998
|
+
*/
|
|
2999
|
+
removeGroupAllowlistMember(
|
|
3000
|
+
this: Connection,
|
|
3001
|
+
params: {
|
|
3002
|
+
groupId: string;
|
|
3003
|
+
userName: UserId;
|
|
3004
|
+
success?: (res: AsyncResult<GroupRequestResult>) => void;
|
|
3005
|
+
error?: (error: ErrorEvent) => void;
|
|
3006
|
+
}
|
|
3007
|
+
): Promise<AsyncResult<GroupRequestResult>>;
|
|
3008
|
+
|
|
3009
|
+
/**
|
|
3010
|
+
* @deprecated Use {@link getGroupAllowlist} instead.
|
|
3011
|
+
* Gets the group allowlist. Only the group admin or above can call this method.
|
|
2850
3012
|
*
|
|
2851
3013
|
* ```typescript
|
|
2852
3014
|
* connection.getGroupWhitelist({groupId: 'groupId'})
|
|
@@ -2861,6 +3023,22 @@ export declare namespace EasemobChat {
|
|
|
2861
3023
|
}
|
|
2862
3024
|
): Promise<AsyncResult<UserId[]>>;
|
|
2863
3025
|
|
|
3026
|
+
/**
|
|
3027
|
+
* Gets the group allowlist. Only the group admin or above can call this method.
|
|
3028
|
+
*
|
|
3029
|
+
* ```typescript
|
|
3030
|
+
* connection.getGroupAllowlist({groupId: 'groupId'})
|
|
3031
|
+
* ```
|
|
3032
|
+
*/
|
|
3033
|
+
getGroupAllowlist(
|
|
3034
|
+
this: Connection,
|
|
3035
|
+
params: {
|
|
3036
|
+
groupId: string;
|
|
3037
|
+
success?: (res: AsyncResult<UserId[]>) => void;
|
|
3038
|
+
error?: (error: ErrorEvent) => void;
|
|
3039
|
+
}
|
|
3040
|
+
): Promise<AsyncResult<UserId[]>>;
|
|
3041
|
+
|
|
2864
3042
|
/** @deprecated */
|
|
2865
3043
|
isGroupWhiteUser(
|
|
2866
3044
|
this: Connection,
|
|
@@ -2873,12 +3051,12 @@ export declare namespace EasemobChat {
|
|
|
2873
3051
|
): Promise<AsyncResult<IsInGroupWhiteListResult>>;
|
|
2874
3052
|
|
|
2875
3053
|
/**
|
|
2876
|
-
*
|
|
3054
|
+
* @deprecated Use {@link isInGroupAllowlist} instead.
|
|
3055
|
+
* Checks whether the current member is on the allowlist. The app admin can check all users; app users can only check themselves.
|
|
2877
3056
|
*
|
|
2878
3057
|
* ```typescript
|
|
2879
3058
|
* connection.isInGroupWhiteList({groupId: 'groupId', userName: 'user1'})
|
|
2880
3059
|
* ```
|
|
2881
|
-
* @since v4.0.1
|
|
2882
3060
|
*/
|
|
2883
3061
|
isInGroupWhiteList(
|
|
2884
3062
|
this: Connection,
|
|
@@ -2891,7 +3069,24 @@ export declare namespace EasemobChat {
|
|
|
2891
3069
|
): Promise<AsyncResult<IsInGroupWhiteListResult>>;
|
|
2892
3070
|
|
|
2893
3071
|
/**
|
|
2894
|
-
*
|
|
3072
|
+
* Checks whether the current member is on the allowlist. The app admin can check all users; app users can only check themselves.
|
|
3073
|
+
*
|
|
3074
|
+
* ```typescript
|
|
3075
|
+
* connection.isInGroupAllowlist({groupId: 'groupId', userName: 'user1'})
|
|
3076
|
+
* ```
|
|
3077
|
+
*/
|
|
3078
|
+
isInGroupAllowlist(
|
|
3079
|
+
this: Connection,
|
|
3080
|
+
params: {
|
|
3081
|
+
groupId: string;
|
|
3082
|
+
userName: UserId;
|
|
3083
|
+
success?: (res: AsyncResult<IsInGroupWhiteListResult>) => void;
|
|
3084
|
+
error?: (error: ErrorEvent) => void;
|
|
3085
|
+
}
|
|
3086
|
+
): Promise<AsyncResult<IsInGroupWhiteListResult>>;
|
|
3087
|
+
|
|
3088
|
+
/**
|
|
3089
|
+
* Checks which members have read group message. This is a [value-added function] and .
|
|
2895
3090
|
*
|
|
2896
3091
|
* ```typescript
|
|
2897
3092
|
* connection.getGroupMsgReadUser({groupId: 'groupId', msgId: 'msgId'})
|
|
@@ -2908,7 +3103,7 @@ export declare namespace EasemobChat {
|
|
|
2908
3103
|
): Promise<AsyncResult<GetGroupMsgReadUserResult>>;
|
|
2909
3104
|
|
|
2910
3105
|
/**
|
|
2911
|
-
* Gets group announcement
|
|
3106
|
+
* Gets the group announcement.
|
|
2912
3107
|
*
|
|
2913
3108
|
* ```typescript
|
|
2914
3109
|
* connection.fetchGroupAnnouncement({groupId: 'groupId'})
|
|
@@ -2924,7 +3119,7 @@ export declare namespace EasemobChat {
|
|
|
2924
3119
|
): Promise<AsyncResult<{ announcement: string }>>;
|
|
2925
3120
|
|
|
2926
3121
|
/**
|
|
2927
|
-
* Updates group announcement.
|
|
3122
|
+
* Updates the group announcement.
|
|
2928
3123
|
*
|
|
2929
3124
|
* ```typescript
|
|
2930
3125
|
* connection.updateGroupAnnouncement({groupId: 'groupId', announcement: 'hello'})
|
|
@@ -2943,7 +3138,7 @@ export declare namespace EasemobChat {
|
|
|
2943
3138
|
): Promise<AsyncResult<UpdateGroupAnnouncementResult>>;
|
|
2944
3139
|
|
|
2945
3140
|
/**
|
|
2946
|
-
* Uploads
|
|
3141
|
+
* Uploads shared files to the group.
|
|
2947
3142
|
*
|
|
2948
3143
|
* ```typescript
|
|
2949
3144
|
* connection.uploadGroupSharedFile({groupId: 'groupId', file: 'file object', onFileUploadProgress: onFileUploadProgress, onFileUploadComplete: onFileUploadComplete,onFileUploadError:onFileUploadError,onFileUploadCanceled:onFileUploadCanceled})
|
|
@@ -2962,7 +3157,7 @@ export declare namespace EasemobChat {
|
|
|
2962
3157
|
): void;
|
|
2963
3158
|
|
|
2964
3159
|
/**
|
|
2965
|
-
* Deletes
|
|
3160
|
+
* Deletes shared files of the group.
|
|
2966
3161
|
*
|
|
2967
3162
|
* ```typescript
|
|
2968
3163
|
* connection.deleteGroupSharedFile({groupId: 'groupId', fileId: 'fileId'})
|
|
@@ -2981,7 +3176,8 @@ export declare namespace EasemobChat {
|
|
|
2981
3176
|
): Promise<AsyncResult<DeleteGroupSharedFileResult>>;
|
|
2982
3177
|
|
|
2983
3178
|
/**
|
|
2984
|
-
*
|
|
3179
|
+
* @deprecated Use {@link getGroupSharedFilelist} instead.
|
|
3180
|
+
* Gets a list of shared files in the group.
|
|
2985
3181
|
*
|
|
2986
3182
|
* ```typescript
|
|
2987
3183
|
* connection.fetchGroupSharedFileList({groupId: 'groupId'})
|
|
@@ -3000,6 +3196,26 @@ export declare namespace EasemobChat {
|
|
|
3000
3196
|
}
|
|
3001
3197
|
): Promise<AsyncResult<FetchGroupSharedFileListResult>>;
|
|
3002
3198
|
|
|
3199
|
+
/**
|
|
3200
|
+
* Gets a list of shared files in the group.
|
|
3201
|
+
*
|
|
3202
|
+
* ```typescript
|
|
3203
|
+
* connection.getGroupSharedFilelist({groupId: 'groupId'})
|
|
3204
|
+
* ```
|
|
3205
|
+
*/
|
|
3206
|
+
getGroupSharedFilelist(
|
|
3207
|
+
this: Connection,
|
|
3208
|
+
params: {
|
|
3209
|
+
groupId: string;
|
|
3210
|
+
pageNum?: number;
|
|
3211
|
+
pageSize?: number;
|
|
3212
|
+
success?: (
|
|
3213
|
+
res: AsyncResult<FetchGroupSharedFileListResult>
|
|
3214
|
+
) => void;
|
|
3215
|
+
error?: (error: ErrorEvent) => void;
|
|
3216
|
+
}
|
|
3217
|
+
): Promise<AsyncResult<FetchGroupSharedFileListResult>>;
|
|
3218
|
+
|
|
3003
3219
|
/**
|
|
3004
3220
|
* Down load group file.
|
|
3005
3221
|
*
|
|
@@ -3020,7 +3236,8 @@ export declare namespace EasemobChat {
|
|
|
3020
3236
|
|
|
3021
3237
|
// Contact API
|
|
3022
3238
|
/**
|
|
3023
|
-
*
|
|
3239
|
+
* @deprecated Use {@link getBlocklist} instead.
|
|
3240
|
+
* Gets the blocklist.
|
|
3024
3241
|
*
|
|
3025
3242
|
* ```typescript
|
|
3026
3243
|
* connection.getBlacklist()
|
|
@@ -3034,6 +3251,21 @@ export declare namespace EasemobChat {
|
|
|
3034
3251
|
}
|
|
3035
3252
|
): Promise<AsyncResult<UserId[]>>;
|
|
3036
3253
|
|
|
3254
|
+
/**
|
|
3255
|
+
* Gets the blocklist.
|
|
3256
|
+
*
|
|
3257
|
+
* ```typescript
|
|
3258
|
+
* connection.getBlocklist()
|
|
3259
|
+
* ```
|
|
3260
|
+
*/
|
|
3261
|
+
getBlocklist(
|
|
3262
|
+
this: Connection,
|
|
3263
|
+
params?: {
|
|
3264
|
+
success?: (res: AsyncResult<UserId[]>) => void;
|
|
3265
|
+
error?: (error: ErrorEvent) => void;
|
|
3266
|
+
}
|
|
3267
|
+
): Promise<AsyncResult<UserId[]>>;
|
|
3268
|
+
|
|
3037
3269
|
/** @deprecated */
|
|
3038
3270
|
getRoster(
|
|
3039
3271
|
this: Connection,
|
|
@@ -3044,12 +3276,11 @@ export declare namespace EasemobChat {
|
|
|
3044
3276
|
): Promise<AsyncResult<UserId[]>>;
|
|
3045
3277
|
|
|
3046
3278
|
/**
|
|
3047
|
-
* Gets
|
|
3279
|
+
* Gets the contact list.
|
|
3048
3280
|
*
|
|
3049
3281
|
* ```typescript
|
|
3050
3282
|
* connection.getContacts()
|
|
3051
3283
|
* ```
|
|
3052
|
-
* @since v4.0.1
|
|
3053
3284
|
*/
|
|
3054
3285
|
getContacts(
|
|
3055
3286
|
this: Connection,
|
|
@@ -3072,12 +3303,11 @@ export declare namespace EasemobChat {
|
|
|
3072
3303
|
): Promise<AsyncResult<UploadTokenResult>>;
|
|
3073
3304
|
|
|
3074
3305
|
/**
|
|
3075
|
-
*
|
|
3306
|
+
* Uploads the token to the server. This method is used when the SDK is used on a native client on which a third-party push service is to be integrated.
|
|
3076
3307
|
*
|
|
3077
3308
|
* ```typescript
|
|
3078
3309
|
* connection.uploadPushToken({deviceId: 'deviceId', deviceToken: 'deviceToken', notifierName: 'notifierName'})
|
|
3079
3310
|
* ```
|
|
3080
|
-
* @since v4.0.1
|
|
3081
3311
|
*/
|
|
3082
3312
|
uploadPushToken(
|
|
3083
3313
|
this: Connection,
|
|
@@ -3091,7 +3321,8 @@ export declare namespace EasemobChat {
|
|
|
3091
3321
|
): Promise<AsyncResult<UploadTokenResult>>;
|
|
3092
3322
|
|
|
3093
3323
|
/**
|
|
3094
|
-
*
|
|
3324
|
+
* @deprecated Use {@link getConversationlist} instead.
|
|
3325
|
+
* Gets the conversation list.
|
|
3095
3326
|
*
|
|
3096
3327
|
* ```typescript
|
|
3097
3328
|
* connection.getSessionList()
|
|
@@ -3125,6 +3356,7 @@ export declare namespace EasemobChat {
|
|
|
3125
3356
|
): Promise<AsyncResult<conversationList[]>>;
|
|
3126
3357
|
|
|
3127
3358
|
/**
|
|
3359
|
+
* @deprecated Use Use {@link deleteConversation} instead.
|
|
3128
3360
|
* Delete the session.
|
|
3129
3361
|
*
|
|
3130
3362
|
* ```typescript
|
|
@@ -3143,6 +3375,25 @@ export declare namespace EasemobChat {
|
|
|
3143
3375
|
): Promise<AsyncResult<DeleteSessionResult>>;
|
|
3144
3376
|
|
|
3145
3377
|
/**
|
|
3378
|
+
* Deletes the conversation.
|
|
3379
|
+
*
|
|
3380
|
+
* ```typescript
|
|
3381
|
+
* connection.deleteConversation()
|
|
3382
|
+
* ```
|
|
3383
|
+
*/
|
|
3384
|
+
deleteConversation(
|
|
3385
|
+
this: Connection,
|
|
3386
|
+
params: {
|
|
3387
|
+
channel: string;
|
|
3388
|
+
chatType: 'singleChat' | 'groupChat';
|
|
3389
|
+
deleteRoam: boolean;
|
|
3390
|
+
success?: (res: AsyncResult<DeleteSessionResult>) => void;
|
|
3391
|
+
error?: (error: ErrorEvent) => void;
|
|
3392
|
+
}
|
|
3393
|
+
): Promise<AsyncResult<DeleteSessionResult>>;
|
|
3394
|
+
|
|
3395
|
+
/**
|
|
3396
|
+
* @deprecated Use {@link updateUserInfo} instead.
|
|
3146
3397
|
* Updates own information.
|
|
3147
3398
|
*
|
|
3148
3399
|
* ```typescript
|
|
@@ -3158,7 +3409,22 @@ export declare namespace EasemobChat {
|
|
|
3158
3409
|
): Promise<AsyncResult<UpdateOwnUserInfoParams>>;
|
|
3159
3410
|
|
|
3160
3411
|
/**
|
|
3161
|
-
*
|
|
3412
|
+
* Modifies the user's attributes.
|
|
3413
|
+
*
|
|
3414
|
+
* ```typescript
|
|
3415
|
+
* connection.updateOwnUserInfo({nickname: 'Tom', avatarurl: 'avatarurl', mail: 'abc@gmail,com', ext: JSON.stringify({hobby: 'football'})})
|
|
3416
|
+
*
|
|
3417
|
+
* connection.updateUserInfo('nickname', 'Tom')
|
|
3418
|
+
* ```
|
|
3419
|
+
*/
|
|
3420
|
+
updateUserInfo(
|
|
3421
|
+
this: Connection,
|
|
3422
|
+
params: UpdateOwnUserInfoParams | ConfigurableKey,
|
|
3423
|
+
value?: any
|
|
3424
|
+
): Promise<AsyncResult<UpdateOwnUserInfoParams>>;
|
|
3425
|
+
|
|
3426
|
+
/**
|
|
3427
|
+
* Queries the user attributes.
|
|
3162
3428
|
*
|
|
3163
3429
|
* ```typescript
|
|
3164
3430
|
* connection.fetchUserInfoById('user1') | fetchUserInfoById(['user1', 'user2'])
|
|
@@ -3173,8 +3439,9 @@ export declare namespace EasemobChat {
|
|
|
3173
3439
|
[key: string]: UpdateOwnUserInfoParams;
|
|
3174
3440
|
}>
|
|
3175
3441
|
>;
|
|
3442
|
+
|
|
3176
3443
|
/**
|
|
3177
|
-
*
|
|
3444
|
+
* Changes the nickname shown when the message push notification is received. This nickname is specified during user registration and it's not the same as the nickname attribute of the user.
|
|
3178
3445
|
*
|
|
3179
3446
|
* ```typescript
|
|
3180
3447
|
* connection.updateCurrentUserNick('Tom')
|
|
@@ -3186,6 +3453,7 @@ export declare namespace EasemobChat {
|
|
|
3186
3453
|
): Promise<AsyncResult<BaseUserInfo[]>>;
|
|
3187
3454
|
|
|
3188
3455
|
/**
|
|
3456
|
+
* @deprecated Use {@link getHistoryMessages} instead.
|
|
3189
3457
|
* Gets historical messages.
|
|
3190
3458
|
*
|
|
3191
3459
|
* ```typescript
|
|
@@ -3221,10 +3489,10 @@ export declare namespace EasemobChat {
|
|
|
3221
3489
|
cursor?: number | string | null;
|
|
3222
3490
|
/** The number of messages to retrieve each time. The default value is 20,The maximum value is 50. */
|
|
3223
3491
|
pageSize?: number;
|
|
3224
|
-
/** The chat type
|
|
3492
|
+
/** The chat type:
|
|
3225
3493
|
* - `singleChat`: one-to-one chat;
|
|
3226
|
-
* - `
|
|
3227
|
-
* - `
|
|
3494
|
+
* - `groupChat`: group chat;
|
|
3495
|
+
* - `chatRoom`: chat room.
|
|
3228
3496
|
* - (Default)`singleChat`: No.
|
|
3229
3497
|
*/
|
|
3230
3498
|
chatType?: 'singleChat' | 'groupChat' | 'chatRoom';
|
|
@@ -3240,7 +3508,7 @@ export declare namespace EasemobChat {
|
|
|
3240
3508
|
): Promise<HistoryMessages>;
|
|
3241
3509
|
|
|
3242
3510
|
/**
|
|
3243
|
-
* Adds
|
|
3511
|
+
* Adds a friend.
|
|
3244
3512
|
*
|
|
3245
3513
|
* ```typescript
|
|
3246
3514
|
* connection.addContact('user1', 'I am Bob')
|
|
@@ -3249,7 +3517,7 @@ export declare namespace EasemobChat {
|
|
|
3249
3517
|
addContact(this: Connection, to: string, message?: string): void;
|
|
3250
3518
|
|
|
3251
3519
|
/**
|
|
3252
|
-
* Deletes contact.
|
|
3520
|
+
* Deletes the contact.
|
|
3253
3521
|
*
|
|
3254
3522
|
* ```typescript
|
|
3255
3523
|
* connection.deleteContact('user1')
|
|
@@ -3261,12 +3529,11 @@ export declare namespace EasemobChat {
|
|
|
3261
3529
|
acceptInvitation(this: Connection, to: string): void;
|
|
3262
3530
|
|
|
3263
3531
|
/**
|
|
3264
|
-
*
|
|
3532
|
+
* Accepts a friend request.
|
|
3265
3533
|
*
|
|
3266
3534
|
* ```typescript
|
|
3267
3535
|
* connection.acceptContactInvite('user1')
|
|
3268
3536
|
* ```
|
|
3269
|
-
* @since v4.0.1
|
|
3270
3537
|
*/
|
|
3271
3538
|
acceptContactInvite(this: Connection, to: string): void;
|
|
3272
3539
|
|
|
@@ -3274,12 +3541,11 @@ export declare namespace EasemobChat {
|
|
|
3274
3541
|
declineInvitation(this: Connection, to: string): void;
|
|
3275
3542
|
|
|
3276
3543
|
/**
|
|
3277
|
-
* Declines
|
|
3544
|
+
* Declines a friend request.
|
|
3278
3545
|
*
|
|
3279
3546
|
* ```typescript
|
|
3280
3547
|
* connection.declineContactInvite('user1')
|
|
3281
3548
|
* ```
|
|
3282
|
-
* @since v4.0.1
|
|
3283
3549
|
*/
|
|
3284
3550
|
declineContactInvite(this: Connection, to: string): void;
|
|
3285
3551
|
|
|
@@ -3292,12 +3558,12 @@ export declare namespace EasemobChat {
|
|
|
3292
3558
|
): void;
|
|
3293
3559
|
|
|
3294
3560
|
/**
|
|
3561
|
+
* @deprecated
|
|
3295
3562
|
* Add contacts to your blacklist.
|
|
3296
3563
|
*
|
|
3297
3564
|
* ```typescript
|
|
3298
3565
|
* connection.addUsersToBlacklist({name: 'user1'})
|
|
3299
3566
|
* ```
|
|
3300
|
-
* @since v4.0.1
|
|
3301
3567
|
*/
|
|
3302
3568
|
addUsersToBlacklist(
|
|
3303
3569
|
this: Connection,
|
|
@@ -3306,6 +3572,20 @@ export declare namespace EasemobChat {
|
|
|
3306
3572
|
}
|
|
3307
3573
|
): void;
|
|
3308
3574
|
|
|
3575
|
+
/**
|
|
3576
|
+
* Adds a contact to the blocklist.
|
|
3577
|
+
*
|
|
3578
|
+
* ```typescript
|
|
3579
|
+
* connection.addUsersToBlocklist({name: 'user1'})
|
|
3580
|
+
* ```
|
|
3581
|
+
*/
|
|
3582
|
+
addUsersToBlocklist(
|
|
3583
|
+
this: Connection,
|
|
3584
|
+
options: {
|
|
3585
|
+
name: UserId | UserId[];
|
|
3586
|
+
}
|
|
3587
|
+
): void;
|
|
3588
|
+
|
|
3309
3589
|
/** @deprecated */
|
|
3310
3590
|
removeFromBlackList(
|
|
3311
3591
|
this: Connection,
|
|
@@ -3315,12 +3595,12 @@ export declare namespace EasemobChat {
|
|
|
3315
3595
|
): void;
|
|
3316
3596
|
|
|
3317
3597
|
/**
|
|
3598
|
+
* @deprecated
|
|
3318
3599
|
* Removes friends from your blacklist
|
|
3319
3600
|
*
|
|
3320
3601
|
* ```typescript
|
|
3321
3602
|
* connection.removeUserFromBlackList({name: 'user1'})
|
|
3322
3603
|
* ```
|
|
3323
|
-
* @since v4.0.1
|
|
3324
3604
|
*/
|
|
3325
3605
|
removeUserFromBlackList(
|
|
3326
3606
|
this: Connection,
|
|
@@ -3329,6 +3609,20 @@ export declare namespace EasemobChat {
|
|
|
3329
3609
|
}
|
|
3330
3610
|
): void;
|
|
3331
3611
|
|
|
3612
|
+
/**
|
|
3613
|
+
* Removes contacts from the blocklist.
|
|
3614
|
+
*
|
|
3615
|
+
* ```typescript
|
|
3616
|
+
* connection.removeUserFromBlocklist({name: 'user1'})
|
|
3617
|
+
* ```
|
|
3618
|
+
*/
|
|
3619
|
+
removeUserFromBlocklist(
|
|
3620
|
+
this: Connection,
|
|
3621
|
+
options: {
|
|
3622
|
+
name: UserId | UserId[];
|
|
3623
|
+
}
|
|
3624
|
+
): void;
|
|
3625
|
+
|
|
3332
3626
|
/** @deprecated*/
|
|
3333
3627
|
subscribe(
|
|
3334
3628
|
this: Connection,
|
|
@@ -3342,7 +3636,7 @@ export declare namespace EasemobChat {
|
|
|
3342
3636
|
removeRoster(this: Connection, options: { to: UserId }): void;
|
|
3343
3637
|
|
|
3344
3638
|
/**
|
|
3345
|
-
*
|
|
3639
|
+
* Recalls a message.
|
|
3346
3640
|
*
|
|
3347
3641
|
* ```typescript
|
|
3348
3642
|
* connection.recallMessage({mid: 'messageId', to: 'user1', type: 'singleChat', isChatThread: false})
|
|
@@ -3436,6 +3730,7 @@ export declare namespace EasemobChat {
|
|
|
3436
3730
|
}): Promise<AsyncResult<PublishPresenceResult>>;
|
|
3437
3731
|
|
|
3438
3732
|
/**
|
|
3733
|
+
* @deprecated Use {@link getSubscribedPresencelist} instead.
|
|
3439
3734
|
* Uses pagination to get a list of users whose presence states you have subscribed to.
|
|
3440
3735
|
*
|
|
3441
3736
|
* ```typescript
|
|
@@ -3456,6 +3751,27 @@ export declare namespace EasemobChat {
|
|
|
3456
3751
|
}
|
|
3457
3752
|
): Promise<AsyncResult<GetSubscribedPresenceListResult>>;
|
|
3458
3753
|
|
|
3754
|
+
/**
|
|
3755
|
+
* Uses pagination to get a list of users whose presence states you have subscribed to.
|
|
3756
|
+
*
|
|
3757
|
+
* ```typescript
|
|
3758
|
+
* connection.getSubscribedPresencelist({usernames: ['user1','user2']})
|
|
3759
|
+
* ```
|
|
3760
|
+
*/
|
|
3761
|
+
getSubscribedPresencelist(
|
|
3762
|
+
this: Connection,
|
|
3763
|
+
params: {
|
|
3764
|
+
/** The current page number, starting from 1. */
|
|
3765
|
+
pageNum: number;
|
|
3766
|
+
/** The number of subscribers per page. */
|
|
3767
|
+
pageSize: number;
|
|
3768
|
+
success?: (
|
|
3769
|
+
res: AsyncResult<GetSubscribedPresenceListResult>
|
|
3770
|
+
) => void;
|
|
3771
|
+
error?: (error: ErrorEvent) => void;
|
|
3772
|
+
}
|
|
3773
|
+
): Promise<AsyncResult<GetSubscribedPresenceListResult>>;
|
|
3774
|
+
|
|
3459
3775
|
/**
|
|
3460
3776
|
* Gets the current presence state of users.
|
|
3461
3777
|
*
|
|
@@ -3474,42 +3790,226 @@ export declare namespace EasemobChat {
|
|
|
3474
3790
|
): Promise<AsyncResult<SubscribePresenceResult>>;
|
|
3475
3791
|
|
|
3476
3792
|
/**
|
|
3477
|
-
*
|
|
3793
|
+
* Creates a chatThread.
|
|
3478
3794
|
*
|
|
3479
3795
|
* ```typescript
|
|
3480
|
-
*
|
|
3796
|
+
* connection.createChatThread({parentId: 'parentId',name: 'threadName',messageId: 'messageId'})
|
|
3481
3797
|
* ```
|
|
3482
3798
|
*/
|
|
3483
|
-
|
|
3799
|
+
createChatThread(
|
|
3484
3800
|
this: Connection,
|
|
3485
3801
|
params: {
|
|
3486
|
-
|
|
3487
|
-
|
|
3802
|
+
/** Generally refers to the group ID. */
|
|
3803
|
+
parentId: string;
|
|
3804
|
+
/** The chatThread name. */
|
|
3805
|
+
name: string;
|
|
3806
|
+
/** The parent message ID. */
|
|
3488
3807
|
messageId: string;
|
|
3489
3808
|
}
|
|
3490
|
-
): Promise<
|
|
3809
|
+
): Promise<AsyncResult<CreateChatThreadResult>>;
|
|
3491
3810
|
|
|
3492
3811
|
/**
|
|
3493
|
-
*
|
|
3812
|
+
* Joins the chatThread.
|
|
3494
3813
|
*
|
|
3495
3814
|
* ```typescript
|
|
3496
|
-
* connection.
|
|
3815
|
+
* connection.joinChatThread({chatThreadId: 'chatThreadId'})
|
|
3497
3816
|
* ```
|
|
3498
3817
|
*/
|
|
3499
|
-
|
|
3818
|
+
joinChatThread(
|
|
3500
3819
|
this: Connection,
|
|
3501
3820
|
params: {
|
|
3502
|
-
/**
|
|
3503
|
-
|
|
3504
|
-
success?: (
|
|
3505
|
-
res: AsyncResult<SilentModeConversationType>
|
|
3506
|
-
) => void;
|
|
3507
|
-
error?: (error: ErrorEvent) => void;
|
|
3821
|
+
/** The chatThread ID. */
|
|
3822
|
+
chatThreadId: string;
|
|
3508
3823
|
}
|
|
3509
|
-
): Promise<AsyncResult<
|
|
3824
|
+
): Promise<AsyncResult<JoinChatThreadResult>>;
|
|
3510
3825
|
|
|
3511
3826
|
/**
|
|
3512
|
-
*
|
|
3827
|
+
* Leaves the chatThread.
|
|
3828
|
+
*
|
|
3829
|
+
* ```typescript
|
|
3830
|
+
* connection.leaveChatThread({chatThreadId: 'chatThreadId'})
|
|
3831
|
+
* ```
|
|
3832
|
+
*/
|
|
3833
|
+
leaveChatThread(
|
|
3834
|
+
this: Connection,
|
|
3835
|
+
params: {
|
|
3836
|
+
/** The chatThread ID. */
|
|
3837
|
+
chatThreadId: string;
|
|
3838
|
+
}
|
|
3839
|
+
): Promise<void>;
|
|
3840
|
+
|
|
3841
|
+
/**
|
|
3842
|
+
* Deletes the chatThread,group leader and administrator have this permission.
|
|
3843
|
+
*
|
|
3844
|
+
* ```typescript
|
|
3845
|
+
* connection.destroyChatThread({chatThreadId: 'chatThreadId'})
|
|
3846
|
+
* ```
|
|
3847
|
+
*/
|
|
3848
|
+
destroyChatThread(
|
|
3849
|
+
this: Connection,
|
|
3850
|
+
params: {
|
|
3851
|
+
/** The chatThread ID. */
|
|
3852
|
+
chatThreadId: string;
|
|
3853
|
+
}
|
|
3854
|
+
): Promise<void>;
|
|
3855
|
+
|
|
3856
|
+
/**
|
|
3857
|
+
* Modifies the chatThread name.
|
|
3858
|
+
*
|
|
3859
|
+
* ```typescript
|
|
3860
|
+
* connection.changeChatThreadName({chatThreadId: 'chatThreadId',name: 'name'})
|
|
3861
|
+
* ```
|
|
3862
|
+
*/
|
|
3863
|
+
changeChatThreadName(
|
|
3864
|
+
this: Connection,
|
|
3865
|
+
params: {
|
|
3866
|
+
/** The chatThread ID. */
|
|
3867
|
+
chatThreadId: string;
|
|
3868
|
+
/** The chatThread name. */
|
|
3869
|
+
name: string;
|
|
3870
|
+
}
|
|
3871
|
+
): Promise<AsyncResult<ChangeChatThreadName>>;
|
|
3872
|
+
|
|
3873
|
+
/**
|
|
3874
|
+
* Lists all members of the chatThread with pagination.
|
|
3875
|
+
*
|
|
3876
|
+
* ```typescript
|
|
3877
|
+
* connection.getChatThreadMembers({chatThreadId: 'chatThreadId',pageSize:20,cursor:'cursor'})
|
|
3878
|
+
* ```
|
|
3879
|
+
*/
|
|
3880
|
+
getChatThreadMembers(
|
|
3881
|
+
this: Connection,
|
|
3882
|
+
params: {
|
|
3883
|
+
/** The Thread ID. */
|
|
3884
|
+
chatThreadId: string;
|
|
3885
|
+
/** The number of members per page. The default value is 20, and the maximum value is 50.*/
|
|
3886
|
+
pageSize?: number;
|
|
3887
|
+
/** The cursor that specifies where to start to get data. If there will be data on the next page, this method will return the value of this field to indicate the position to start to get data of the next page. If it is empty string, the data of the first page will be fetched.*/
|
|
3888
|
+
cursor?: string;
|
|
3889
|
+
}
|
|
3890
|
+
): Promise<AsyncResult<ChatThreadMembers>>;
|
|
3891
|
+
|
|
3892
|
+
/**
|
|
3893
|
+
* Removes a member from the chatThread.
|
|
3894
|
+
*
|
|
3895
|
+
* ```typescript
|
|
3896
|
+
* connection.removeChatThreadMember({chatThreadId: 'chatThreadId',username:'username'})
|
|
3897
|
+
* ```
|
|
3898
|
+
*/
|
|
3899
|
+
removeChatThreadMember(
|
|
3900
|
+
this: Connection,
|
|
3901
|
+
params: {
|
|
3902
|
+
/** The chatThread ID. */
|
|
3903
|
+
chatThreadId: string;
|
|
3904
|
+
/** The member ID to remove. */
|
|
3905
|
+
username: string;
|
|
3906
|
+
}
|
|
3907
|
+
): Promise<AsyncResult<RemoveMemberResult>>;
|
|
3908
|
+
|
|
3909
|
+
/**
|
|
3910
|
+
* Gets the list of joined chatThreads with pagination.When parentId is not null, get the list of chatThread under the specified group.
|
|
3911
|
+
*
|
|
3912
|
+
* ```typescript
|
|
3913
|
+
* connection.getJoinedChatThreads({parentId: 'parentId',cursor: 'cursor',pageSize: 50})
|
|
3914
|
+
* ```
|
|
3915
|
+
*/
|
|
3916
|
+
getJoinedChatThreads(
|
|
3917
|
+
this: Connection,
|
|
3918
|
+
params: {
|
|
3919
|
+
/** Generally refers to the group ID. */
|
|
3920
|
+
parentId?: string;
|
|
3921
|
+
/** The number of thread per page. The default value is 20, and the maximum value is 50. */
|
|
3922
|
+
pageSize?: number;
|
|
3923
|
+
/** The cursor that specifies where to start to get data. If there will be data on the next page, this method will return the value of this field to indicate the position to start to get data of the next page. If it is null, the data of the first page will be fetched.*/
|
|
3924
|
+
cursor?: string;
|
|
3925
|
+
}
|
|
3926
|
+
): Promise<AsyncResult<ChatThreadDetail[]>>;
|
|
3927
|
+
|
|
3928
|
+
/**
|
|
3929
|
+
* Gets the thread list of the specified group with pagination.
|
|
3930
|
+
* ```typescript
|
|
3931
|
+
* connection.getChatThreads({parentId: 'parentId, cursor:'cursor' ,pageSize: 50})
|
|
3932
|
+
* ```
|
|
3933
|
+
*/
|
|
3934
|
+
getChatThreads(
|
|
3935
|
+
this: Connection,
|
|
3936
|
+
params: {
|
|
3937
|
+
/** Generally refers to the group ID. */
|
|
3938
|
+
parentId: string;
|
|
3939
|
+
/** The number of thread per page. The default value is 20, and the maximum value is 50. */
|
|
3940
|
+
pageSize?: number;
|
|
3941
|
+
/** The cursor that specifies where to start to get data. If there will be data on the next page, this method will return the value of this field to indicate the position to start to get data of the next page. If it is empty string, the data of the first page will be fetched.*/
|
|
3942
|
+
cursor?: string;
|
|
3943
|
+
}
|
|
3944
|
+
): Promise<AsyncResult<ChatThreadDetail[]>>;
|
|
3945
|
+
|
|
3946
|
+
/**
|
|
3947
|
+
* Gets the latest message content of the chatThread in batch,with a maximum of 20 messages.
|
|
3948
|
+
*
|
|
3949
|
+
* ```typescript
|
|
3950
|
+
* connection.getChatThreadLastMessage({chatThreadIds: ['chatThreadId1','chatThreadId2']})
|
|
3951
|
+
* ```
|
|
3952
|
+
*/
|
|
3953
|
+
getChatThreadLastMessage(
|
|
3954
|
+
this: Connection,
|
|
3955
|
+
params: {
|
|
3956
|
+
/** The array of chatThread IDs to query.*/
|
|
3957
|
+
chatThreadIds: string[];
|
|
3958
|
+
}
|
|
3959
|
+
): Promise<AsyncResult<ChatThreadLastMessage>>;
|
|
3960
|
+
|
|
3961
|
+
/**
|
|
3962
|
+
* Gets detail of the chatThread.
|
|
3963
|
+
*
|
|
3964
|
+
* ```typescript
|
|
3965
|
+
* connection.getChatThreadDetail({chatThreadId: 'chatThreadId'})
|
|
3966
|
+
* ```
|
|
3967
|
+
*/
|
|
3968
|
+
getChatThreadDetail(
|
|
3969
|
+
this: Connection,
|
|
3970
|
+
params: {
|
|
3971
|
+
/** The chatThread ID. */
|
|
3972
|
+
chatThreadId: string;
|
|
3973
|
+
}
|
|
3974
|
+
): Promise<AsyncResult<ChatThreadDetail>>;
|
|
3975
|
+
|
|
3976
|
+
/**
|
|
3977
|
+
* Reports a message.
|
|
3978
|
+
*
|
|
3979
|
+
* ```typescript
|
|
3980
|
+
* reportMessage({reportType: 'adult', reportReason: 'reason', messageId: 'id'})
|
|
3981
|
+
* ```
|
|
3982
|
+
*/
|
|
3983
|
+
reportMessage(
|
|
3984
|
+
this: Connection,
|
|
3985
|
+
params: {
|
|
3986
|
+
reportType: string;
|
|
3987
|
+
reportReason: string;
|
|
3988
|
+
messageId: string;
|
|
3989
|
+
}
|
|
3990
|
+
): Promise<void>;
|
|
3991
|
+
|
|
3992
|
+
/**
|
|
3993
|
+
* Set the DND Settings for the current login user.
|
|
3994
|
+
*
|
|
3995
|
+
* ```typescript
|
|
3996
|
+
* connection.setSilentModeForAll({options: {paramType: 0, remindType: 'ALL'}})
|
|
3997
|
+
* ```
|
|
3998
|
+
*/
|
|
3999
|
+
setSilentModeForAll(
|
|
4000
|
+
this: Connection,
|
|
4001
|
+
params: {
|
|
4002
|
+
/** Options object include paramType,remindType,duration,startTime,endTime. */
|
|
4003
|
+
options: SilentModeParamType;
|
|
4004
|
+
success?: (
|
|
4005
|
+
res: AsyncResult<SilentModeConversationType>
|
|
4006
|
+
) => void;
|
|
4007
|
+
error?: (error: ErrorEvent) => void;
|
|
4008
|
+
}
|
|
4009
|
+
): Promise<AsyncResult<SilentModeConversationType>>;
|
|
4010
|
+
|
|
4011
|
+
/**
|
|
4012
|
+
* Get the DND Settings of the current user.
|
|
3513
4013
|
*
|
|
3514
4014
|
* ```typescript
|
|
3515
4015
|
* connection.getSilentModeForAll()
|
|
@@ -3646,55 +4146,6 @@ export declare namespace EasemobChat {
|
|
|
3646
4146
|
}
|
|
3647
4147
|
): Promise<AsyncResult<TranslationLanguageType>>;
|
|
3648
4148
|
|
|
3649
|
-
/**
|
|
3650
|
-
* Creates a chatThread.
|
|
3651
|
-
*
|
|
3652
|
-
* ```typescript
|
|
3653
|
-
* connection.createChatThread({parentId: 'parentId',name: 'threadName',messageId: 'messageId'})
|
|
3654
|
-
* ```
|
|
3655
|
-
*/
|
|
3656
|
-
createChatThread(
|
|
3657
|
-
this: Connection,
|
|
3658
|
-
params: {
|
|
3659
|
-
/** Generally refers to the group ID. */
|
|
3660
|
-
parentId: string;
|
|
3661
|
-
/** The chatThread name. */
|
|
3662
|
-
name: string;
|
|
3663
|
-
/** The parent message ID. */
|
|
3664
|
-
messageId: string;
|
|
3665
|
-
}
|
|
3666
|
-
): Promise<AsyncResult<CreateChatThreadResult>>;
|
|
3667
|
-
|
|
3668
|
-
/**
|
|
3669
|
-
* Joins the chatThread.
|
|
3670
|
-
*
|
|
3671
|
-
* ```typescript
|
|
3672
|
-
* connection.joinChatThread({chatThreadId: 'chatThreadId'})
|
|
3673
|
-
* ```
|
|
3674
|
-
*/
|
|
3675
|
-
joinChatThread(
|
|
3676
|
-
this: Connection,
|
|
3677
|
-
params: {
|
|
3678
|
-
/** The chatThread ID. */
|
|
3679
|
-
chatThreadId: string;
|
|
3680
|
-
}
|
|
3681
|
-
): Promise<AsyncResult<JoinChatThreadResult>>;
|
|
3682
|
-
|
|
3683
|
-
/**
|
|
3684
|
-
* Leaves the chatThread.
|
|
3685
|
-
*
|
|
3686
|
-
* ```typescript
|
|
3687
|
-
* connection.leaveChatThread({chatThreadId: 'chatThreadId'})
|
|
3688
|
-
* ```
|
|
3689
|
-
*/
|
|
3690
|
-
leaveChatThread(
|
|
3691
|
-
this: Connection,
|
|
3692
|
-
params: {
|
|
3693
|
-
/** The chatThread ID. */
|
|
3694
|
-
chatThreadId: string;
|
|
3695
|
-
}
|
|
3696
|
-
): Promise<void>;
|
|
3697
|
-
|
|
3698
4149
|
/**
|
|
3699
4150
|
* Adds a reaction to the message.
|
|
3700
4151
|
*
|
|
@@ -3712,21 +4163,6 @@ export declare namespace EasemobChat {
|
|
|
3712
4163
|
}
|
|
3713
4164
|
): Promise<void>;
|
|
3714
4165
|
|
|
3715
|
-
/**
|
|
3716
|
-
* Deletes the chatThread,group leader and administrator have this permission.
|
|
3717
|
-
*
|
|
3718
|
-
* ```typescript
|
|
3719
|
-
* connection.destroyChatThread({chatThreadId: 'chatThreadId'})
|
|
3720
|
-
* ```
|
|
3721
|
-
*/
|
|
3722
|
-
destroyChatThread(
|
|
3723
|
-
this: Connection,
|
|
3724
|
-
params: {
|
|
3725
|
-
/** The chatThread ID. */
|
|
3726
|
-
chatThreadId: string;
|
|
3727
|
-
}
|
|
3728
|
-
): Promise<void>;
|
|
3729
|
-
|
|
3730
4166
|
/**
|
|
3731
4167
|
* Removes a reaction from a message.
|
|
3732
4168
|
*
|
|
@@ -3745,133 +4181,36 @@ export declare namespace EasemobChat {
|
|
|
3745
4181
|
): Promise<void>;
|
|
3746
4182
|
|
|
3747
4183
|
/**
|
|
3748
|
-
*
|
|
3749
|
-
*
|
|
3750
|
-
* ```typescript
|
|
3751
|
-
* connection.changeChatThreadName({chatThreadId: 'chatThreadId',name: 'name'})
|
|
3752
|
-
* ```
|
|
3753
|
-
*/
|
|
3754
|
-
changeChatThreadName(
|
|
3755
|
-
this: Connection,
|
|
3756
|
-
params: {
|
|
3757
|
-
/** The chatThread ID. */
|
|
3758
|
-
chatThreadId: string;
|
|
3759
|
-
/** The chatThread name. */
|
|
3760
|
-
name: string;
|
|
3761
|
-
}
|
|
3762
|
-
): Promise<AsyncResult<ChangeChatThreadName>>;
|
|
3763
|
-
|
|
3764
|
-
/**
|
|
3765
|
-
* Lists all members of the chatThread with pagination.
|
|
3766
|
-
*
|
|
3767
|
-
* ```typescript
|
|
3768
|
-
* connection.getChatThreadMembers({chatThreadId: 'chatThreadId',pageSize:20,cursor:'cursor'})
|
|
3769
|
-
* ```
|
|
3770
|
-
*/
|
|
3771
|
-
getChatThreadMembers(
|
|
3772
|
-
this: Connection,
|
|
3773
|
-
params: {
|
|
3774
|
-
/** The Thread ID. */
|
|
3775
|
-
chatThreadId: string;
|
|
3776
|
-
/** The number of members per page. The default value is 20, and the maximum value is 50.*/
|
|
3777
|
-
pageSize?: number;
|
|
3778
|
-
/** The cursor that specifies where to start to get data. If there will be data on the next page, this method will return the value of this field to indicate the position to start to get data of the next page. If it is empty string, the data of the first page will be fetched.*/
|
|
3779
|
-
cursor?: string;
|
|
3780
|
-
}
|
|
3781
|
-
): Promise<AsyncResult<ChatThreadMembers>>;
|
|
3782
|
-
|
|
3783
|
-
/**
|
|
3784
|
-
* Removes a member from the chatThread.
|
|
3785
|
-
*
|
|
3786
|
-
* ```typescript
|
|
3787
|
-
* connection.removeChatThreadMember({chatThreadId: 'chatThreadId',username:'username'})
|
|
3788
|
-
* ```
|
|
3789
|
-
*/
|
|
3790
|
-
removeChatThreadMember(
|
|
3791
|
-
this: Connection,
|
|
3792
|
-
params: {
|
|
3793
|
-
/** The chatThread ID. */
|
|
3794
|
-
chatThreadId: string;
|
|
3795
|
-
/** The member ID to remove. */
|
|
3796
|
-
username: string;
|
|
3797
|
-
}
|
|
3798
|
-
): Promise<AsyncResult<RemoveMemberResult>>;
|
|
3799
|
-
|
|
3800
|
-
/**
|
|
3801
|
-
* Gets the list of joined chatThreads with pagination.When parentId is not null, get the list of chatThread under the specified group.
|
|
3802
|
-
*
|
|
3803
|
-
* ```typescript
|
|
3804
|
-
* connection.getJoinedChatThreads({parentId: 'parentId',cursor: 'cursor',pageSize: 50})
|
|
3805
|
-
* ```
|
|
3806
|
-
*/
|
|
3807
|
-
getJoinedChatThreads(
|
|
3808
|
-
this: Connection,
|
|
3809
|
-
params: {
|
|
3810
|
-
/** Generally refers to the group ID. */
|
|
3811
|
-
parentId?: string;
|
|
3812
|
-
/** The number of thread per page. The default value is 20, and the maximum value is 50. */
|
|
3813
|
-
pageSize?: number;
|
|
3814
|
-
/** The cursor that specifies where to start to get data. If there will be data on the next page, this method will return the value of this field to indicate the position to start to get data of the next page. If it is null, the data of the first page will be fetched.*/
|
|
3815
|
-
cursor?: string;
|
|
3816
|
-
}
|
|
3817
|
-
): Promise<AsyncResult<ChatThreadDetail[]>>;
|
|
3818
|
-
|
|
3819
|
-
/**
|
|
3820
|
-
* Gets the thread list of the specified group with pagination.
|
|
3821
|
-
* ```typescript
|
|
3822
|
-
* connection.getChatThreads({parentId: 'parentId, cursor:'cursor' ,pageSize: 50})
|
|
3823
|
-
* ```
|
|
3824
|
-
*/
|
|
3825
|
-
getChatThreads(
|
|
3826
|
-
this: Connection,
|
|
3827
|
-
params: {
|
|
3828
|
-
/** Generally refers to the group ID. */
|
|
3829
|
-
parentId: string;
|
|
3830
|
-
/** The number of thread per page. The default value is 20, and the maximum value is 50. */
|
|
3831
|
-
pageSize?: number;
|
|
3832
|
-
/** The cursor that specifies where to start to get data. If there will be data on the next page, this method will return the value of this field to indicate the position to start to get data of the next page. If it is empty string, the data of the first page will be fetched.*/
|
|
3833
|
-
cursor?: string;
|
|
3834
|
-
}
|
|
3835
|
-
): Promise<AsyncResult<ChatThreadDetail[]>>;
|
|
3836
|
-
|
|
3837
|
-
/**
|
|
3838
|
-
* Gets the latest message content of the chatThread in batch,with a maximum of 20 messages.
|
|
3839
|
-
*
|
|
3840
|
-
* ```typescript
|
|
3841
|
-
* connection.getChatThreadLastMessage({chatThreadIds: ['chatThreadId1','chatThreadId2']})
|
|
3842
|
-
* ```
|
|
3843
|
-
*/
|
|
3844
|
-
getChatThreadLastMessage(
|
|
3845
|
-
this: Connection,
|
|
3846
|
-
params: {
|
|
3847
|
-
/** The array of chatThread IDs to query.*/
|
|
3848
|
-
chatThreadIds: string[];
|
|
3849
|
-
}
|
|
3850
|
-
): Promise<AsyncResult<ChatThreadLastMessage>>;
|
|
3851
|
-
|
|
3852
|
-
/**
|
|
3853
|
-
* Gets detail of the chatThread.
|
|
4184
|
+
* @deprecated
|
|
4185
|
+
* Gets the reaction list for the message.
|
|
3854
4186
|
*
|
|
3855
4187
|
* ```typescript
|
|
3856
|
-
* connection.
|
|
4188
|
+
* connection.getReactionList({chatType: 'chatType', messageId: 'messageId'})
|
|
3857
4189
|
* ```
|
|
3858
4190
|
*/
|
|
3859
|
-
|
|
4191
|
+
getReactionList(
|
|
3860
4192
|
this: Connection,
|
|
3861
4193
|
params: {
|
|
3862
|
-
/** The
|
|
3863
|
-
|
|
4194
|
+
/** The conversation type:
|
|
4195
|
+
* - singleChat;
|
|
4196
|
+
* - groupChat;
|
|
4197
|
+
*/
|
|
4198
|
+
chatType: 'singleChat' | 'groupChat';
|
|
4199
|
+
/** The message ID. */
|
|
4200
|
+
messageId: string | Array<string>;
|
|
4201
|
+
/** The group ID. */
|
|
4202
|
+
groupId?: string;
|
|
3864
4203
|
}
|
|
3865
|
-
): Promise<AsyncResult<
|
|
4204
|
+
): Promise<AsyncResult<GetReactionListResult[]>>;
|
|
3866
4205
|
|
|
3867
4206
|
/**
|
|
3868
|
-
*
|
|
4207
|
+
* Gets the reaction list for the message.
|
|
3869
4208
|
*
|
|
3870
4209
|
* ```typescript
|
|
3871
|
-
* connection.
|
|
4210
|
+
* connection.getReactionlist({chatType: 'chatType', messageId: 'messageId'})
|
|
3872
4211
|
* ```
|
|
3873
4212
|
*/
|
|
3874
|
-
|
|
4213
|
+
getReactionlist(
|
|
3875
4214
|
this: Connection,
|
|
3876
4215
|
params: {
|
|
3877
4216
|
/** The conversation type:
|
|
@@ -4063,7 +4402,7 @@ export declare namespace EasemobChat {
|
|
|
4063
4402
|
|
|
4064
4403
|
/**
|
|
4065
4404
|
* @module listen
|
|
4066
|
-
* @deprecated
|
|
4405
|
+
* @deprecated
|
|
4067
4406
|
*/
|
|
4068
4407
|
interface ListenParameters {
|
|
4069
4408
|
onOpened?: () => void;
|