theragist-ts 1.0.45 → 1.0.46
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/dist/call/message.d.ts +3 -0
- package/dist/call/message.js +82 -31
- package/dist/chat/message.d.ts +51 -0
- package/dist/chat/message.js +756 -2
- package/dist/chat/service.d.ts +25 -1
- package/dist/chat/service.js +111 -0
- package/dist/group/message.d.ts +21 -0
- package/dist/group/message.js +323 -4
- package/dist/index.d.ts +1 -1
- package/dist/index.js +105 -98
- package/dist/post/message.d.ts +9 -0
- package/dist/post/message.js +141 -5
- package/package.json +1 -1
package/dist/call/message.d.ts
CHANGED
|
@@ -100,6 +100,8 @@ export interface CallRoom {
|
|
|
100
100
|
activeParticipants: number;
|
|
101
101
|
createdAt: string;
|
|
102
102
|
meetingId: string;
|
|
103
|
+
participants: CallParticipant[];
|
|
104
|
+
expiresAt: string;
|
|
103
105
|
}
|
|
104
106
|
export interface CallParticipant {
|
|
105
107
|
id: string;
|
|
@@ -107,6 +109,7 @@ export interface CallParticipant {
|
|
|
107
109
|
userId: string;
|
|
108
110
|
fullName: string;
|
|
109
111
|
avatarUrl: string;
|
|
112
|
+
username: string;
|
|
110
113
|
userRole: string;
|
|
111
114
|
participantRole: string;
|
|
112
115
|
status: string;
|
package/dist/call/message.js
CHANGED
|
@@ -1342,6 +1342,8 @@ function createBaseCallRoom() {
|
|
|
1342
1342
|
activeParticipants: 0,
|
|
1343
1343
|
createdAt: "",
|
|
1344
1344
|
meetingId: "",
|
|
1345
|
+
participants: [],
|
|
1346
|
+
expiresAt: "",
|
|
1345
1347
|
};
|
|
1346
1348
|
}
|
|
1347
1349
|
exports.CallRoom = {
|
|
@@ -1397,6 +1399,12 @@ exports.CallRoom = {
|
|
|
1397
1399
|
if (message.meetingId !== "") {
|
|
1398
1400
|
writer.uint32(138).string(message.meetingId);
|
|
1399
1401
|
}
|
|
1402
|
+
for (const v of message.participants) {
|
|
1403
|
+
exports.CallParticipant.encode(v, writer.uint32(146).fork()).join();
|
|
1404
|
+
}
|
|
1405
|
+
if (message.expiresAt !== "") {
|
|
1406
|
+
writer.uint32(154).string(message.expiresAt);
|
|
1407
|
+
}
|
|
1400
1408
|
return writer;
|
|
1401
1409
|
},
|
|
1402
1410
|
decode(input, length) {
|
|
@@ -1525,6 +1533,20 @@ exports.CallRoom = {
|
|
|
1525
1533
|
message.meetingId = reader.string();
|
|
1526
1534
|
continue;
|
|
1527
1535
|
}
|
|
1536
|
+
case 18: {
|
|
1537
|
+
if (tag !== 146) {
|
|
1538
|
+
break;
|
|
1539
|
+
}
|
|
1540
|
+
message.participants.push(exports.CallParticipant.decode(reader, reader.uint32()));
|
|
1541
|
+
continue;
|
|
1542
|
+
}
|
|
1543
|
+
case 19: {
|
|
1544
|
+
if (tag !== 154) {
|
|
1545
|
+
break;
|
|
1546
|
+
}
|
|
1547
|
+
message.expiresAt = reader.string();
|
|
1548
|
+
continue;
|
|
1549
|
+
}
|
|
1528
1550
|
}
|
|
1529
1551
|
if ((tag & 7) === 4 || tag === 0) {
|
|
1530
1552
|
break;
|
|
@@ -1552,9 +1574,14 @@ exports.CallRoom = {
|
|
|
1552
1574
|
activeParticipants: isSet(object.activeParticipants) ? globalThis.Number(object.activeParticipants) : 0,
|
|
1553
1575
|
createdAt: isSet(object.createdAt) ? globalThis.String(object.createdAt) : "",
|
|
1554
1576
|
meetingId: isSet(object.meetingId) ? globalThis.String(object.meetingId) : "",
|
|
1577
|
+
participants: globalThis.Array.isArray(object === null || object === void 0 ? void 0 : object.participants)
|
|
1578
|
+
? object.participants.map((e) => exports.CallParticipant.fromJSON(e))
|
|
1579
|
+
: [],
|
|
1580
|
+
expiresAt: isSet(object.expiresAt) ? globalThis.String(object.expiresAt) : "",
|
|
1555
1581
|
};
|
|
1556
1582
|
},
|
|
1557
1583
|
toJSON(message) {
|
|
1584
|
+
var _a;
|
|
1558
1585
|
const obj = {};
|
|
1559
1586
|
if (message.id !== "") {
|
|
1560
1587
|
obj.id = message.id;
|
|
@@ -1607,13 +1634,19 @@ exports.CallRoom = {
|
|
|
1607
1634
|
if (message.meetingId !== "") {
|
|
1608
1635
|
obj.meetingId = message.meetingId;
|
|
1609
1636
|
}
|
|
1637
|
+
if ((_a = message.participants) === null || _a === void 0 ? void 0 : _a.length) {
|
|
1638
|
+
obj.participants = message.participants.map((e) => exports.CallParticipant.toJSON(e));
|
|
1639
|
+
}
|
|
1640
|
+
if (message.expiresAt !== "") {
|
|
1641
|
+
obj.expiresAt = message.expiresAt;
|
|
1642
|
+
}
|
|
1610
1643
|
return obj;
|
|
1611
1644
|
},
|
|
1612
1645
|
create(base) {
|
|
1613
1646
|
return exports.CallRoom.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
1614
1647
|
},
|
|
1615
1648
|
fromPartial(object) {
|
|
1616
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s;
|
|
1649
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u;
|
|
1617
1650
|
const message = createBaseCallRoom();
|
|
1618
1651
|
message.id = (_a = object.id) !== null && _a !== void 0 ? _a : "";
|
|
1619
1652
|
message.roomName = (_b = object.roomName) !== null && _b !== void 0 ? _b : "";
|
|
@@ -1632,6 +1665,8 @@ exports.CallRoom = {
|
|
|
1632
1665
|
message.activeParticipants = (_q = object.activeParticipants) !== null && _q !== void 0 ? _q : 0;
|
|
1633
1666
|
message.createdAt = (_r = object.createdAt) !== null && _r !== void 0 ? _r : "";
|
|
1634
1667
|
message.meetingId = (_s = object.meetingId) !== null && _s !== void 0 ? _s : "";
|
|
1668
|
+
message.participants = ((_t = object.participants) === null || _t === void 0 ? void 0 : _t.map((e) => exports.CallParticipant.fromPartial(e))) || [];
|
|
1669
|
+
message.expiresAt = (_u = object.expiresAt) !== null && _u !== void 0 ? _u : "";
|
|
1635
1670
|
return message;
|
|
1636
1671
|
},
|
|
1637
1672
|
};
|
|
@@ -1642,6 +1677,7 @@ function createBaseCallParticipant() {
|
|
|
1642
1677
|
userId: "",
|
|
1643
1678
|
fullName: "",
|
|
1644
1679
|
avatarUrl: "",
|
|
1680
|
+
username: "",
|
|
1645
1681
|
userRole: "",
|
|
1646
1682
|
participantRole: "",
|
|
1647
1683
|
status: "",
|
|
@@ -1670,32 +1706,35 @@ exports.CallParticipant = {
|
|
|
1670
1706
|
if (message.avatarUrl !== "") {
|
|
1671
1707
|
writer.uint32(42).string(message.avatarUrl);
|
|
1672
1708
|
}
|
|
1709
|
+
if (message.username !== "") {
|
|
1710
|
+
writer.uint32(50).string(message.username);
|
|
1711
|
+
}
|
|
1673
1712
|
if (message.userRole !== "") {
|
|
1674
|
-
writer.uint32(
|
|
1713
|
+
writer.uint32(58).string(message.userRole);
|
|
1675
1714
|
}
|
|
1676
1715
|
if (message.participantRole !== "") {
|
|
1677
|
-
writer.uint32(
|
|
1716
|
+
writer.uint32(66).string(message.participantRole);
|
|
1678
1717
|
}
|
|
1679
1718
|
if (message.status !== "") {
|
|
1680
|
-
writer.uint32(
|
|
1719
|
+
writer.uint32(74).string(message.status);
|
|
1681
1720
|
}
|
|
1682
1721
|
if (message.joinedAt !== "") {
|
|
1683
|
-
writer.uint32(
|
|
1722
|
+
writer.uint32(82).string(message.joinedAt);
|
|
1684
1723
|
}
|
|
1685
1724
|
if (message.leftAt !== "") {
|
|
1686
|
-
writer.uint32(
|
|
1725
|
+
writer.uint32(90).string(message.leftAt);
|
|
1687
1726
|
}
|
|
1688
1727
|
if (message.durationSeconds !== 0) {
|
|
1689
|
-
writer.uint32(
|
|
1728
|
+
writer.uint32(96).int32(message.durationSeconds);
|
|
1690
1729
|
}
|
|
1691
1730
|
if (message.connectionQuality !== "") {
|
|
1692
|
-
writer.uint32(
|
|
1731
|
+
writer.uint32(106).string(message.connectionQuality);
|
|
1693
1732
|
}
|
|
1694
1733
|
if (message.isMuted !== false) {
|
|
1695
|
-
writer.uint32(
|
|
1734
|
+
writer.uint32(112).bool(message.isMuted);
|
|
1696
1735
|
}
|
|
1697
1736
|
if (message.isVideoOff !== false) {
|
|
1698
|
-
writer.uint32(
|
|
1737
|
+
writer.uint32(120).bool(message.isVideoOff);
|
|
1699
1738
|
}
|
|
1700
1739
|
return writer;
|
|
1701
1740
|
},
|
|
@@ -1745,62 +1784,69 @@ exports.CallParticipant = {
|
|
|
1745
1784
|
if (tag !== 50) {
|
|
1746
1785
|
break;
|
|
1747
1786
|
}
|
|
1748
|
-
message.
|
|
1787
|
+
message.username = reader.string();
|
|
1749
1788
|
continue;
|
|
1750
1789
|
}
|
|
1751
1790
|
case 7: {
|
|
1752
1791
|
if (tag !== 58) {
|
|
1753
1792
|
break;
|
|
1754
1793
|
}
|
|
1755
|
-
message.
|
|
1794
|
+
message.userRole = reader.string();
|
|
1756
1795
|
continue;
|
|
1757
1796
|
}
|
|
1758
1797
|
case 8: {
|
|
1759
1798
|
if (tag !== 66) {
|
|
1760
1799
|
break;
|
|
1761
1800
|
}
|
|
1762
|
-
message.
|
|
1801
|
+
message.participantRole = reader.string();
|
|
1763
1802
|
continue;
|
|
1764
1803
|
}
|
|
1765
1804
|
case 9: {
|
|
1766
1805
|
if (tag !== 74) {
|
|
1767
1806
|
break;
|
|
1768
1807
|
}
|
|
1769
|
-
message.
|
|
1808
|
+
message.status = reader.string();
|
|
1770
1809
|
continue;
|
|
1771
1810
|
}
|
|
1772
1811
|
case 10: {
|
|
1773
1812
|
if (tag !== 82) {
|
|
1774
1813
|
break;
|
|
1775
1814
|
}
|
|
1776
|
-
message.
|
|
1815
|
+
message.joinedAt = reader.string();
|
|
1777
1816
|
continue;
|
|
1778
1817
|
}
|
|
1779
1818
|
case 11: {
|
|
1780
|
-
if (tag !==
|
|
1819
|
+
if (tag !== 90) {
|
|
1781
1820
|
break;
|
|
1782
1821
|
}
|
|
1783
|
-
message.
|
|
1822
|
+
message.leftAt = reader.string();
|
|
1784
1823
|
continue;
|
|
1785
1824
|
}
|
|
1786
1825
|
case 12: {
|
|
1787
|
-
if (tag !==
|
|
1826
|
+
if (tag !== 96) {
|
|
1788
1827
|
break;
|
|
1789
1828
|
}
|
|
1790
|
-
message.
|
|
1829
|
+
message.durationSeconds = reader.int32();
|
|
1791
1830
|
continue;
|
|
1792
1831
|
}
|
|
1793
1832
|
case 13: {
|
|
1794
|
-
if (tag !==
|
|
1833
|
+
if (tag !== 106) {
|
|
1795
1834
|
break;
|
|
1796
1835
|
}
|
|
1797
|
-
message.
|
|
1836
|
+
message.connectionQuality = reader.string();
|
|
1798
1837
|
continue;
|
|
1799
1838
|
}
|
|
1800
1839
|
case 14: {
|
|
1801
1840
|
if (tag !== 112) {
|
|
1802
1841
|
break;
|
|
1803
1842
|
}
|
|
1843
|
+
message.isMuted = reader.bool();
|
|
1844
|
+
continue;
|
|
1845
|
+
}
|
|
1846
|
+
case 15: {
|
|
1847
|
+
if (tag !== 120) {
|
|
1848
|
+
break;
|
|
1849
|
+
}
|
|
1804
1850
|
message.isVideoOff = reader.bool();
|
|
1805
1851
|
continue;
|
|
1806
1852
|
}
|
|
@@ -1819,6 +1865,7 @@ exports.CallParticipant = {
|
|
|
1819
1865
|
userId: isSet(object.userId) ? globalThis.String(object.userId) : "",
|
|
1820
1866
|
fullName: isSet(object.fullName) ? globalThis.String(object.fullName) : "",
|
|
1821
1867
|
avatarUrl: isSet(object.avatarUrl) ? globalThis.String(object.avatarUrl) : "",
|
|
1868
|
+
username: isSet(object.username) ? globalThis.String(object.username) : "",
|
|
1822
1869
|
userRole: isSet(object.userRole) ? globalThis.String(object.userRole) : "",
|
|
1823
1870
|
participantRole: isSet(object.participantRole) ? globalThis.String(object.participantRole) : "",
|
|
1824
1871
|
status: isSet(object.status) ? globalThis.String(object.status) : "",
|
|
@@ -1847,6 +1894,9 @@ exports.CallParticipant = {
|
|
|
1847
1894
|
if (message.avatarUrl !== "") {
|
|
1848
1895
|
obj.avatarUrl = message.avatarUrl;
|
|
1849
1896
|
}
|
|
1897
|
+
if (message.username !== "") {
|
|
1898
|
+
obj.username = message.username;
|
|
1899
|
+
}
|
|
1850
1900
|
if (message.userRole !== "") {
|
|
1851
1901
|
obj.userRole = message.userRole;
|
|
1852
1902
|
}
|
|
@@ -1880,22 +1930,23 @@ exports.CallParticipant = {
|
|
|
1880
1930
|
return exports.CallParticipant.fromPartial(base !== null && base !== void 0 ? base : {});
|
|
1881
1931
|
},
|
|
1882
1932
|
fromPartial(object) {
|
|
1883
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p;
|
|
1933
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q;
|
|
1884
1934
|
const message = createBaseCallParticipant();
|
|
1885
1935
|
message.id = (_a = object.id) !== null && _a !== void 0 ? _a : "";
|
|
1886
1936
|
message.roomId = (_b = object.roomId) !== null && _b !== void 0 ? _b : "";
|
|
1887
1937
|
message.userId = (_c = object.userId) !== null && _c !== void 0 ? _c : "";
|
|
1888
1938
|
message.fullName = (_d = object.fullName) !== null && _d !== void 0 ? _d : "";
|
|
1889
1939
|
message.avatarUrl = (_e = object.avatarUrl) !== null && _e !== void 0 ? _e : "";
|
|
1890
|
-
message.
|
|
1891
|
-
message.
|
|
1892
|
-
message.
|
|
1893
|
-
message.
|
|
1894
|
-
message.
|
|
1895
|
-
message.
|
|
1896
|
-
message.
|
|
1897
|
-
message.
|
|
1898
|
-
message.
|
|
1940
|
+
message.username = (_f = object.username) !== null && _f !== void 0 ? _f : "";
|
|
1941
|
+
message.userRole = (_g = object.userRole) !== null && _g !== void 0 ? _g : "";
|
|
1942
|
+
message.participantRole = (_h = object.participantRole) !== null && _h !== void 0 ? _h : "";
|
|
1943
|
+
message.status = (_j = object.status) !== null && _j !== void 0 ? _j : "";
|
|
1944
|
+
message.joinedAt = (_k = object.joinedAt) !== null && _k !== void 0 ? _k : "";
|
|
1945
|
+
message.leftAt = (_l = object.leftAt) !== null && _l !== void 0 ? _l : "";
|
|
1946
|
+
message.durationSeconds = (_m = object.durationSeconds) !== null && _m !== void 0 ? _m : 0;
|
|
1947
|
+
message.connectionQuality = (_o = object.connectionQuality) !== null && _o !== void 0 ? _o : "";
|
|
1948
|
+
message.isMuted = (_p = object.isMuted) !== null && _p !== void 0 ? _p : false;
|
|
1949
|
+
message.isVideoOff = (_q = object.isVideoOff) !== null && _q !== void 0 ? _q : false;
|
|
1899
1950
|
return message;
|
|
1900
1951
|
},
|
|
1901
1952
|
};
|
package/dist/chat/message.d.ts
CHANGED
|
@@ -13,6 +13,12 @@ export interface Conversation {
|
|
|
13
13
|
lastMessageAt: string;
|
|
14
14
|
unreadCount: number;
|
|
15
15
|
}
|
|
16
|
+
export interface MentionedUser {
|
|
17
|
+
userId: string;
|
|
18
|
+
fullName: string;
|
|
19
|
+
avatarUrl: string;
|
|
20
|
+
username: string;
|
|
21
|
+
}
|
|
16
22
|
export interface DirectMessage {
|
|
17
23
|
id: string;
|
|
18
24
|
senderId: string;
|
|
@@ -25,6 +31,7 @@ export interface DirectMessage {
|
|
|
25
31
|
isRead: boolean;
|
|
26
32
|
createdAt: string;
|
|
27
33
|
replyTo: MessageReply | undefined;
|
|
34
|
+
mentions: MentionedUser[];
|
|
28
35
|
}
|
|
29
36
|
export interface MessageReply {
|
|
30
37
|
id: string;
|
|
@@ -71,8 +78,46 @@ export interface DeleteMessageRequest {
|
|
|
71
78
|
export interface DeleteMessageResponse {
|
|
72
79
|
success: boolean;
|
|
73
80
|
}
|
|
81
|
+
export interface CallEvent {
|
|
82
|
+
id: string;
|
|
83
|
+
roomType: string;
|
|
84
|
+
callType: string;
|
|
85
|
+
callStatus: string;
|
|
86
|
+
callerId: string;
|
|
87
|
+
callerName: string;
|
|
88
|
+
callerAvatar: string;
|
|
89
|
+
callerUsername: string;
|
|
90
|
+
calleeId: string;
|
|
91
|
+
calleeName: string;
|
|
92
|
+
calleeAvatar: string;
|
|
93
|
+
calleeUsername: string;
|
|
94
|
+
durationSeconds: number;
|
|
95
|
+
startedAt: string;
|
|
96
|
+
endedAt: string;
|
|
97
|
+
createdAt: string;
|
|
98
|
+
}
|
|
99
|
+
export interface ListDirectMessageCallEventsRequest {
|
|
100
|
+
userId: string;
|
|
101
|
+
pagination: BaseListRequest | undefined;
|
|
102
|
+
}
|
|
103
|
+
export interface ListDirectMessageCallEventsResponse {
|
|
104
|
+
calls: CallEvent[];
|
|
105
|
+
}
|
|
106
|
+
export interface ChatTimelineItem {
|
|
107
|
+
message?: DirectMessage | undefined;
|
|
108
|
+
callEvent?: CallEvent | undefined;
|
|
109
|
+
timestamp: string;
|
|
110
|
+
}
|
|
111
|
+
export interface ListChatTimelineRequest {
|
|
112
|
+
userId: string;
|
|
113
|
+
pagination: BaseListRequest | undefined;
|
|
114
|
+
}
|
|
115
|
+
export interface ListChatTimelineResponse {
|
|
116
|
+
items: ChatTimelineItem[];
|
|
117
|
+
}
|
|
74
118
|
export declare const ChatUser: MessageFns<ChatUser>;
|
|
75
119
|
export declare const Conversation: MessageFns<Conversation>;
|
|
120
|
+
export declare const MentionedUser: MessageFns<MentionedUser>;
|
|
76
121
|
export declare const DirectMessage: MessageFns<DirectMessage>;
|
|
77
122
|
export declare const MessageReply: MessageFns<MessageReply>;
|
|
78
123
|
export declare const ListConversationsRequest: MessageFns<ListConversationsRequest>;
|
|
@@ -85,6 +130,12 @@ export declare const MarkDirectMessagesReadRequest: MessageFns<MarkDirectMessage
|
|
|
85
130
|
export declare const MarkDirectMessagesReadResponse: MessageFns<MarkDirectMessagesReadResponse>;
|
|
86
131
|
export declare const DeleteMessageRequest: MessageFns<DeleteMessageRequest>;
|
|
87
132
|
export declare const DeleteMessageResponse: MessageFns<DeleteMessageResponse>;
|
|
133
|
+
export declare const CallEvent: MessageFns<CallEvent>;
|
|
134
|
+
export declare const ListDirectMessageCallEventsRequest: MessageFns<ListDirectMessageCallEventsRequest>;
|
|
135
|
+
export declare const ListDirectMessageCallEventsResponse: MessageFns<ListDirectMessageCallEventsResponse>;
|
|
136
|
+
export declare const ChatTimelineItem: MessageFns<ChatTimelineItem>;
|
|
137
|
+
export declare const ListChatTimelineRequest: MessageFns<ListChatTimelineRequest>;
|
|
138
|
+
export declare const ListChatTimelineResponse: MessageFns<ListChatTimelineResponse>;
|
|
88
139
|
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
89
140
|
export type DeepPartial<T> = T extends Builtin ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
|
|
90
141
|
[K in keyof T]?: DeepPartial<T[K]>;
|