@devanachat/sdk 0.0.0-stage → 0.7.0
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 +81 -0
- package/LICENSE +21 -0
- package/README.md +418 -2
- package/build/index.cjs.js +3656 -0
- package/build/index.cjs.js.map +1 -0
- package/build/index.mjs +3613 -0
- package/build/index.mjs.map +1 -0
- package/build/index.umd.js +2 -0
- package/build/index.umd.js.map +1 -0
- package/build/types/AbstractChatClient.d.ts +184 -0
- package/build/types/AbstractRestClient.d.ts +21 -0
- package/build/types/EventTarget.d.ts +32 -0
- package/build/types/FilesClient.d.ts +16 -0
- package/build/types/IndexedObjectCollection.d.ts +66 -0
- package/build/types/Permissions.d.ts +117 -0
- package/build/types/WebApiChatClient.d.ts +38 -0
- package/build/types/WebSocketChatClient.d.ts +110 -0
- package/build/types/index.d.ts +19 -0
- package/build/types/protocol/index.d.ts +165 -0
- package/build/types/protocol/schemes/BanObject.d.ts +14 -0
- package/build/types/protocol/schemes/ChatLocation.d.ts +5 -0
- package/build/types/protocol/schemes/Emoticon.d.ts +9 -0
- package/build/types/protocol/schemes/Entitlements.d.ts +92 -0
- package/build/types/protocol/schemes/Envelope.d.ts +5 -0
- package/build/types/protocol/schemes/FollowedTopic.d.ts +10 -0
- package/build/types/protocol/schemes/LeaveReason.d.ts +9 -0
- package/build/types/protocol/schemes/Message.d.ts +32 -0
- package/build/types/protocol/schemes/MessagePoll.d.ts +10 -0
- package/build/types/protocol/schemes/PermissionOverwritesTarget.d.ts +5 -0
- package/build/types/protocol/schemes/PermissionOverwritesValue.d.ts +4 -0
- package/build/types/protocol/schemes/Reaction.d.ts +13 -0
- package/build/types/protocol/schemes/Role.d.ts +20 -0
- package/build/types/protocol/schemes/Room.d.ts +17 -0
- package/build/types/protocol/schemes/RoomHistory.d.ts +5 -0
- package/build/types/protocol/schemes/RoomMember.d.ts +11 -0
- package/build/types/protocol/schemes/RoomStream.d.ts +5 -0
- package/build/types/protocol/schemes/RoomSummary.d.ts +15 -0
- package/build/types/protocol/schemes/SessionData.d.ts +10 -0
- package/build/types/protocol/schemes/Space.d.ts +19 -0
- package/build/types/protocol/schemes/SpaceMember.d.ts +7 -0
- package/build/types/protocol/schemes/SpaceSummary.d.ts +8 -0
- package/build/types/protocol/schemes/Topic.d.ts +8 -0
- package/build/types/protocol/schemes/User.d.ts +23 -0
- package/build/types/protocol/schemes/UserData.d.ts +10 -0
- package/build/types/protocol/schemes/UserInformation.d.ts +11 -0
- package/build/types/protocol/schemes/UserRelationship.d.ts +6 -0
- package/build/types/protocol/schemes/UserState.d.ts +6 -0
- package/build/types/protocol/schemes/commands/Ack.d.ts +5 -0
- package/build/types/protocol/schemes/commands/AssignRole.d.ts +6 -0
- package/build/types/protocol/schemes/commands/Ban.d.ts +10 -0
- package/build/types/protocol/schemes/commands/CreateAccessTicket.d.ts +13 -0
- package/build/types/protocol/schemes/commands/CreateEmoticon.d.ts +5 -0
- package/build/types/protocol/schemes/commands/CreateMessage.d.ts +11 -0
- package/build/types/protocol/schemes/commands/CreateOwner.d.ts +5 -0
- package/build/types/protocol/schemes/commands/CreateRelationship.d.ts +5 -0
- package/build/types/protocol/schemes/commands/CreateRole.d.ts +6 -0
- package/build/types/protocol/schemes/commands/CreateRoom.d.ts +9 -0
- package/build/types/protocol/schemes/commands/CreateSpace.d.ts +6 -0
- package/build/types/protocol/schemes/commands/CreateTopic.d.ts +11 -0
- package/build/types/protocol/schemes/commands/DeassignRole.d.ts +6 -0
- package/build/types/protocol/schemes/commands/DeleteEmoticon.d.ts +3 -0
- package/build/types/protocol/schemes/commands/DeleteOwner.d.ts +5 -0
- package/build/types/protocol/schemes/commands/DeleteRelationship.d.ts +5 -0
- package/build/types/protocol/schemes/commands/DeleteRole.d.ts +4 -0
- package/build/types/protocol/schemes/commands/DeleteRoom.d.ts +3 -0
- package/build/types/protocol/schemes/commands/DeleteSpace.d.ts +3 -0
- package/build/types/protocol/schemes/commands/DeleteTopic.d.ts +4 -0
- package/build/types/protocol/schemes/commands/FollowTopic.d.ts +4 -0
- package/build/types/protocol/schemes/commands/GetBans.d.ts +6 -0
- package/build/types/protocol/schemes/commands/GetClientData.d.ts +2 -0
- package/build/types/protocol/schemes/commands/GetComputedPermissions.d.ts +10 -0
- package/build/types/protocol/schemes/commands/GetDiscoverableSpaces.d.ts +2 -0
- package/build/types/protocol/schemes/commands/GetEmoticons.d.ts +3 -0
- package/build/types/protocol/schemes/commands/GetEntitlements.d.ts +8 -0
- package/build/types/protocol/schemes/commands/GetFollowedTopics.d.ts +4 -0
- package/build/types/protocol/schemes/commands/GetInvited.d.ts +3 -0
- package/build/types/protocol/schemes/commands/GetMessages.d.ts +13 -0
- package/build/types/protocol/schemes/commands/GetOwners.d.ts +4 -0
- package/build/types/protocol/schemes/commands/GetPermissionOverwriteTargets.d.ts +4 -0
- package/build/types/protocol/schemes/commands/GetPermissionOverwrites.d.ts +6 -0
- package/build/types/protocol/schemes/commands/GetReactionDetails.d.ts +8 -0
- package/build/types/protocol/schemes/commands/GetRelationships.d.ts +2 -0
- package/build/types/protocol/schemes/commands/GetRoomMembers.d.ts +3 -0
- package/build/types/protocol/schemes/commands/GetRoomSummary.d.ts +4 -0
- package/build/types/protocol/schemes/commands/GetSession.d.ts +2 -0
- package/build/types/protocol/schemes/commands/GetSessionData.d.ts +2 -0
- package/build/types/protocol/schemes/commands/GetSpaceMembers.d.ts +3 -0
- package/build/types/protocol/schemes/commands/GetSpaceRooms.d.ts +3 -0
- package/build/types/protocol/schemes/commands/GetSpaceSummary.d.ts +3 -0
- package/build/types/protocol/schemes/commands/GetTopics.d.ts +4 -0
- package/build/types/protocol/schemes/commands/GetUserData.d.ts +2 -0
- package/build/types/protocol/schemes/commands/GetUserInfo.d.ts +3 -0
- package/build/types/protocol/schemes/commands/Invite.d.ts +5 -0
- package/build/types/protocol/schemes/commands/JoinRoom.d.ts +13 -0
- package/build/types/protocol/schemes/commands/JoinSpace.d.ts +3 -0
- package/build/types/protocol/schemes/commands/Kick.d.ts +7 -0
- package/build/types/protocol/schemes/commands/LeaveRoom.d.ts +3 -0
- package/build/types/protocol/schemes/commands/LeaveSpace.d.ts +3 -0
- package/build/types/protocol/schemes/commands/Ping.d.ts +2 -0
- package/build/types/protocol/schemes/commands/React.d.ts +6 -0
- package/build/types/protocol/schemes/commands/RedactMessages.d.ts +3 -0
- package/build/types/protocol/schemes/commands/ReportAbuse.d.ts +9 -0
- package/build/types/protocol/schemes/commands/SearchMessages.d.ts +18 -0
- package/build/types/protocol/schemes/commands/SetClientData.d.ts +1 -0
- package/build/types/protocol/schemes/commands/SetPermissionOverwrites.d.ts +8 -0
- package/build/types/protocol/schemes/commands/SetSessionData.d.ts +17 -0
- package/build/types/protocol/schemes/commands/SetUserData.d.ts +6 -0
- package/build/types/protocol/schemes/commands/Unban.d.ts +3 -0
- package/build/types/protocol/schemes/commands/UnfollowTopic.d.ts +4 -0
- package/build/types/protocol/schemes/commands/Uninvite.d.ts +5 -0
- package/build/types/protocol/schemes/commands/Unreact.d.ts +6 -0
- package/build/types/protocol/schemes/commands/UpdateFollowedTopic.d.ts +6 -0
- package/build/types/protocol/schemes/commands/UpdateRole.d.ts +8 -0
- package/build/types/protocol/schemes/commands/UpdateRoom.d.ts +10 -0
- package/build/types/protocol/schemes/commands/UpdateRoomMember.d.ts +8 -0
- package/build/types/protocol/schemes/commands/UpdateSpace.d.ts +12 -0
- package/build/types/protocol/schemes/commands/UpdateSpaceMember.d.ts +6 -0
- package/build/types/protocol/schemes/commands/UpdateTopic.d.ts +5 -0
- package/build/types/protocol/schemes/events/AccessTicket.d.ts +14 -0
- package/build/types/protocol/schemes/events/Bans.d.ts +6 -0
- package/build/types/protocol/schemes/events/Bye.d.ts +4 -0
- package/build/types/protocol/schemes/events/ClientData.d.ts +1 -0
- package/build/types/protocol/schemes/events/ComputedPermissions.d.ts +9 -0
- package/build/types/protocol/schemes/events/DiscoverableSpaces.d.ts +4 -0
- package/build/types/protocol/schemes/events/EmoticonDeleted.d.ts +4 -0
- package/build/types/protocol/schemes/events/Emoticons.d.ts +6 -0
- package/build/types/protocol/schemes/events/EntitlementUsage.d.ts +11 -0
- package/build/types/protocol/schemes/events/Entitlements.d.ts +12 -0
- package/build/types/protocol/schemes/events/Error.d.ts +14 -0
- package/build/types/protocol/schemes/events/FollowedTopicUpdated.d.ts +4 -0
- package/build/types/protocol/schemes/events/FollowedTopics.d.ts +6 -0
- package/build/types/protocol/schemes/events/FoundMessages.d.ts +16 -0
- package/build/types/protocol/schemes/events/Invited.d.ts +10 -0
- package/build/types/protocol/schemes/events/Messages.d.ts +9 -0
- package/build/types/protocol/schemes/events/MessagesRedacted.d.ts +5 -0
- package/build/types/protocol/schemes/events/NewEmoticon.d.ts +4 -0
- package/build/types/protocol/schemes/events/NewMessage.d.ts +4 -0
- package/build/types/protocol/schemes/events/NewRelationship.d.ts +4 -0
- package/build/types/protocol/schemes/events/NewRole.d.ts +5 -0
- package/build/types/protocol/schemes/events/NewRoom.d.ts +5 -0
- package/build/types/protocol/schemes/events/NewTopic.d.ts +5 -0
- package/build/types/protocol/schemes/events/Ok.d.ts +2 -0
- package/build/types/protocol/schemes/events/Owners.d.ts +8 -0
- package/build/types/protocol/schemes/events/PermissionOverwriteTargets.d.ts +10 -0
- package/build/types/protocol/schemes/events/PermissionOverwrites.d.ts +8 -0
- package/build/types/protocol/schemes/events/PermissionOverwritesUpdated.d.ts +8 -0
- package/build/types/protocol/schemes/events/Pong.d.ts +2 -0
- package/build/types/protocol/schemes/events/Reacted.d.ts +9 -0
- package/build/types/protocol/schemes/events/ReactionDetails.d.ts +11 -0
- package/build/types/protocol/schemes/events/ReactionUpdated.d.ts +8 -0
- package/build/types/protocol/schemes/events/RelationshipDeleted.d.ts +4 -0
- package/build/types/protocol/schemes/events/Relationships.d.ts +4 -0
- package/build/types/protocol/schemes/events/RoleDeleted.d.ts +4 -0
- package/build/types/protocol/schemes/events/RoleUpdated.d.ts +5 -0
- package/build/types/protocol/schemes/events/RoomDeleted.d.ts +3 -0
- package/build/types/protocol/schemes/events/RoomJoined.d.ts +4 -0
- package/build/types/protocol/schemes/events/RoomLeft.d.ts +5 -0
- package/build/types/protocol/schemes/events/RoomMemberLeft.d.ts +4 -0
- package/build/types/protocol/schemes/events/RoomMemberUpdated.d.ts +6 -0
- package/build/types/protocol/schemes/events/RoomMembers.d.ts +5 -0
- package/build/types/protocol/schemes/events/RoomMembersJoined.d.ts +9 -0
- package/build/types/protocol/schemes/events/RoomSummary.d.ts +4 -0
- package/build/types/protocol/schemes/events/RoomSummaryUpdated.d.ts +8 -0
- package/build/types/protocol/schemes/events/RoomUpdated.d.ts +4 -0
- package/build/types/protocol/schemes/events/Session.d.ts +9 -0
- package/build/types/protocol/schemes/events/SpaceDeleted.d.ts +3 -0
- package/build/types/protocol/schemes/events/SpaceJoined.d.ts +4 -0
- package/build/types/protocol/schemes/events/SpaceLeft.d.ts +5 -0
- package/build/types/protocol/schemes/events/SpaceMemberJoined.d.ts +5 -0
- package/build/types/protocol/schemes/events/SpaceMemberLeft.d.ts +4 -0
- package/build/types/protocol/schemes/events/SpaceMemberUpdated.d.ts +6 -0
- package/build/types/protocol/schemes/events/SpaceMembers.d.ts +5 -0
- package/build/types/protocol/schemes/events/SpaceRooms.d.ts +5 -0
- package/build/types/protocol/schemes/events/SpaceSummary.d.ts +4 -0
- package/build/types/protocol/schemes/events/SpaceUpdated.d.ts +4 -0
- package/build/types/protocol/schemes/events/TopicDeleted.d.ts +4 -0
- package/build/types/protocol/schemes/events/TopicFollowed.d.ts +4 -0
- package/build/types/protocol/schemes/events/TopicUnfollowed.d.ts +4 -0
- package/build/types/protocol/schemes/events/TopicUpdated.d.ts +6 -0
- package/build/types/protocol/schemes/events/Topics.d.ts +6 -0
- package/build/types/protocol/schemes/events/UserInfo.d.ts +4 -0
- package/build/types/protocol/schemes/events/UserUpdated.d.ts +4 -0
- package/build/types/state-tracker/AsyncUtils.d.ts +15 -0
- package/build/types/state-tracker/ChatStateTracker.d.ts +41 -0
- package/build/types/state-tracker/EmoticonsManager.d.ts +15 -0
- package/build/types/state-tracker/FollowedTopicsManager.d.ts +85 -0
- package/build/types/state-tracker/MessagesManager.d.ts +27 -0
- package/build/types/state-tracker/PermissionsManager.d.ts +51 -0
- package/build/types/state-tracker/RelationshipsManager.d.ts +15 -0
- package/build/types/state-tracker/RoomMessagesHistory.d.ts +72 -0
- package/build/types/state-tracker/RoomsManager.d.ts +72 -0
- package/build/types/state-tracker/SpacesManager.d.ts +63 -0
- package/build/types/state-tracker/TopicHistoryWindow.d.ts +191 -0
- package/build/types/state-tracker/UsersManager.d.ts +23 -0
- package/build/types/state-tracker/functions.d.ts +6 -0
- package/package.json +67 -4
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
import { Envelope } from "./schemes/Envelope";
|
|
2
|
+
import { Message, MessageType, MessageAuthor, MessageMentions } from "./schemes/Message";
|
|
3
|
+
import { PermissionOverwritesValue } from "./schemes/PermissionOverwritesValue";
|
|
4
|
+
import { Role, RoleFlag } from "./schemes/Role";
|
|
5
|
+
import { Room, RoomType } from "./schemes/Room";
|
|
6
|
+
import { RoomMember } from "./schemes/RoomMember";
|
|
7
|
+
import { RoomSummary, RoomSummaryExtras } from "./schemes/RoomSummary";
|
|
8
|
+
import { Space, SpaceDiscoverable, SpaceIntent } from "./schemes/Space";
|
|
9
|
+
import { SpaceMember } from "./schemes/SpaceMember";
|
|
10
|
+
import { Topic } from "./schemes/Topic";
|
|
11
|
+
import { User, UserStatus } from "./schemes/User";
|
|
12
|
+
import { UserState } from "./schemes/UserState";
|
|
13
|
+
import { Bye } from "./schemes/events/Bye";
|
|
14
|
+
import { Error, ErrorCode } from "./schemes/events/Error";
|
|
15
|
+
import { Session } from "./schemes/events/Session";
|
|
16
|
+
import { ComputedPermissions } from "./schemes/events/ComputedPermissions";
|
|
17
|
+
import { SpaceJoined } from "./schemes/events/SpaceJoined";
|
|
18
|
+
import { SpaceLeft } from "./schemes/events/SpaceLeft";
|
|
19
|
+
import { SpaceMemberJoined } from "./schemes/events/SpaceMemberJoined";
|
|
20
|
+
import { SpaceMemberLeft } from "./schemes/events/SpaceMemberLeft";
|
|
21
|
+
import { SpaceMemberUpdated } from "./schemes/events/SpaceMemberUpdated";
|
|
22
|
+
import { SpaceDeleted } from "./schemes/events/SpaceDeleted";
|
|
23
|
+
import { SpaceMembers } from "./schemes/events/SpaceMembers";
|
|
24
|
+
import { SpaceRooms } from "./schemes/events/SpaceRooms";
|
|
25
|
+
import { NewRole } from "./schemes/events/NewRole";
|
|
26
|
+
import { RoleDeleted } from "./schemes/events/RoleDeleted";
|
|
27
|
+
import { RoomJoined } from "./schemes/events/RoomJoined";
|
|
28
|
+
import { RoomLeft } from "./schemes/events/RoomLeft";
|
|
29
|
+
import { RoomMembersJoined } from "./schemes/events/RoomMembersJoined";
|
|
30
|
+
import { RoomMemberLeft } from "./schemes/events/RoomMemberLeft";
|
|
31
|
+
import { RoomMembers } from "./schemes/events/RoomMembers";
|
|
32
|
+
import { RoomMemberUpdated } from "./schemes/events/RoomMemberUpdated";
|
|
33
|
+
import { NewRoom } from "./schemes/events/NewRoom";
|
|
34
|
+
import { RoomDeleted } from "./schemes/events/RoomDeleted";
|
|
35
|
+
import { NewTopic } from "./schemes/events/NewTopic";
|
|
36
|
+
import { TopicDeleted } from "./schemes/events/TopicDeleted";
|
|
37
|
+
import { NewMessage } from "./schemes/events/NewMessage";
|
|
38
|
+
import { PermissionOverwritesUpdated } from "./schemes/events/PermissionOverwritesUpdated";
|
|
39
|
+
import { PermissionOverwrites } from "./schemes/events/PermissionOverwrites";
|
|
40
|
+
import { GetSession } from "./schemes/commands/GetSession";
|
|
41
|
+
import { GetComputedPermissions } from "./schemes/commands/GetComputedPermissions";
|
|
42
|
+
import { JoinSpace } from "./schemes/commands/JoinSpace";
|
|
43
|
+
import { LeaveSpace } from "./schemes/commands/LeaveSpace";
|
|
44
|
+
import { CreateSpace } from "./schemes/commands/CreateSpace";
|
|
45
|
+
import { DeleteSpace } from "./schemes/commands/DeleteSpace";
|
|
46
|
+
import { GetSpaceMembers } from "./schemes/commands/GetSpaceMembers";
|
|
47
|
+
import { GetSpaceRooms } from "./schemes/commands/GetSpaceRooms";
|
|
48
|
+
import { CreateRole } from "./schemes/commands/CreateRole";
|
|
49
|
+
import { DeleteRole } from "./schemes/commands/DeleteRole";
|
|
50
|
+
import { RoleUpdated } from "./schemes/events/RoleUpdated";
|
|
51
|
+
import { AssignRole } from "./schemes/commands/AssignRole";
|
|
52
|
+
import { DeassignRole } from "./schemes/commands/DeassignRole";
|
|
53
|
+
import { SetPermissionOverwrites } from "./schemes/commands/SetPermissionOverwrites";
|
|
54
|
+
import { GetPermissionOverwrites } from "./schemes/commands/GetPermissionOverwrites";
|
|
55
|
+
import { JoinRoom } from "./schemes/commands/JoinRoom";
|
|
56
|
+
import { LeaveRoom } from "./schemes/commands/LeaveRoom";
|
|
57
|
+
import { CreateRoom } from "./schemes/commands/CreateRoom";
|
|
58
|
+
import { DeleteRoom } from "./schemes/commands/DeleteRoom";
|
|
59
|
+
import { GetRoomMembers } from "./schemes/commands/GetRoomMembers";
|
|
60
|
+
import { CreateTopic, CreateTopicInitialMessage } from "./schemes/commands/CreateTopic";
|
|
61
|
+
import { DeleteTopic } from "./schemes/commands/DeleteTopic";
|
|
62
|
+
import { CreateMessage } from "./schemes/commands/CreateMessage";
|
|
63
|
+
import { UpdateRole } from "./schemes/commands/UpdateRole";
|
|
64
|
+
import { Ack } from "./schemes/commands/Ack";
|
|
65
|
+
import { UserUpdated } from "./schemes/events/UserUpdated";
|
|
66
|
+
import { UpdateRoom } from "./schemes/commands/UpdateRoom";
|
|
67
|
+
import { UpdateSpace } from "./schemes/commands/UpdateSpace";
|
|
68
|
+
import { RoomUpdated } from "./schemes/events/RoomUpdated";
|
|
69
|
+
import { SpaceUpdated } from "./schemes/events/SpaceUpdated";
|
|
70
|
+
import { ChatLocation } from "./schemes/ChatLocation";
|
|
71
|
+
import { GetPermissionOverwriteTargets } from "./schemes/commands/GetPermissionOverwriteTargets";
|
|
72
|
+
import { PermissionOverwriteTargets } from "./schemes/events/PermissionOverwriteTargets";
|
|
73
|
+
import { CreateOwner } from "./schemes/commands/CreateOwner";
|
|
74
|
+
import { DeleteOwner } from "./schemes/commands/DeleteOwner";
|
|
75
|
+
import { GetOwners } from "./schemes/commands/GetOwners";
|
|
76
|
+
import { Owners } from "./schemes/events/Owners";
|
|
77
|
+
import { Ok } from "./schemes/events/Ok";
|
|
78
|
+
import { FollowTopic } from "./schemes/commands/FollowTopic";
|
|
79
|
+
import { FollowedTopics } from "./schemes/events/FollowedTopics";
|
|
80
|
+
import { FollowedTopic, NotificationLevel } from "./schemes/FollowedTopic";
|
|
81
|
+
import { UpdateFollowedTopic } from "./schemes/commands/UpdateFollowedTopic";
|
|
82
|
+
import { TopicFollowed } from "./schemes/events/TopicFollowed";
|
|
83
|
+
import { GetFollowedTopics } from "./schemes/commands/GetFollowedTopics";
|
|
84
|
+
import { FollowedTopicUpdated } from "./schemes/events/FollowedTopicUpdated";
|
|
85
|
+
import { GetMessages } from "./schemes/commands/GetMessages";
|
|
86
|
+
import { Messages } from "./schemes/events/Messages";
|
|
87
|
+
import { SearchMessages, SearchDate } from "./schemes/commands/SearchMessages";
|
|
88
|
+
import { FoundMessages, FoundMessage, TextRange } from "./schemes/events/FoundMessages";
|
|
89
|
+
import { Topics } from "./schemes/events/Topics";
|
|
90
|
+
import { GetTopics } from "./schemes/commands/GetTopics";
|
|
91
|
+
import { UpdateTopic } from "./schemes/commands/UpdateTopic";
|
|
92
|
+
import { TopicUpdated } from "./schemes/events/TopicUpdated";
|
|
93
|
+
import { GetDiscoverableSpaces } from "./schemes/commands/GetDiscoverableSpaces";
|
|
94
|
+
import { DiscoverableSpaces } from "./schemes/events/DiscoverableSpaces";
|
|
95
|
+
import { SpaceSummary } from "./schemes/SpaceSummary";
|
|
96
|
+
import { Emoticon } from "./schemes/Emoticon";
|
|
97
|
+
import { Emoticons } from "./schemes/events/Emoticons";
|
|
98
|
+
import { GetEmoticons } from "./schemes/commands/GetEmoticons";
|
|
99
|
+
import { CreateEmoticon } from "./schemes/commands/CreateEmoticon";
|
|
100
|
+
import { DeleteEmoticon } from "./schemes/commands/DeleteEmoticon";
|
|
101
|
+
import { NewEmoticon } from "./schemes/events/NewEmoticon";
|
|
102
|
+
import { EmoticonDeleted } from "./schemes/events/EmoticonDeleted";
|
|
103
|
+
import { PermissionOverwritesTarget } from "./schemes/PermissionOverwritesTarget";
|
|
104
|
+
import { Ban } from "./schemes/commands/Ban";
|
|
105
|
+
import { Unban } from "./schemes/commands/Unban";
|
|
106
|
+
import { GetBans } from "./schemes/commands/GetBans";
|
|
107
|
+
import { BanObject } from "./schemes/BanObject";
|
|
108
|
+
import { Bans } from "./schemes/events/Bans";
|
|
109
|
+
import { Kick } from "./schemes/commands/Kick";
|
|
110
|
+
import { LeaveReason } from "./schemes/LeaveReason";
|
|
111
|
+
import { GetClientData } from "./schemes/commands/GetClientData";
|
|
112
|
+
import { SetClientData } from "./schemes/commands/SetClientData";
|
|
113
|
+
import { ClientData } from "./schemes/events/ClientData";
|
|
114
|
+
import { RoomStream, RoomStreamType } from "./schemes/RoomStream";
|
|
115
|
+
import { RoomHistory, RoomHistoryMode } from "./schemes/RoomHistory";
|
|
116
|
+
import { GetRoomSummary } from "./schemes/commands/GetRoomSummary";
|
|
117
|
+
import { GetSpaceSummary } from "./schemes/commands/GetSpaceSummary";
|
|
118
|
+
import { SpaceSummary as SpaceSummaryEvent } from "./schemes/events/SpaceSummary";
|
|
119
|
+
import { RoomSummary as RoomSummaryEvent } from "./schemes/events/RoomSummary";
|
|
120
|
+
import { UpdateSpaceMember } from "./schemes/commands/UpdateSpaceMember";
|
|
121
|
+
import { NewRelationship } from "./schemes/events/NewRelationship";
|
|
122
|
+
import { RelationshipDeleted } from "./schemes/events/RelationshipDeleted";
|
|
123
|
+
import { UserRelationship, UserRelationshipType } from "./schemes/UserRelationship";
|
|
124
|
+
import { DeleteRelationship } from "./schemes/commands/DeleteRelationship";
|
|
125
|
+
import { Relationships } from "./schemes/events/Relationships";
|
|
126
|
+
import { CreateRelationship } from "./schemes/commands/CreateRelationship";
|
|
127
|
+
import { RoomSummaryUpdated } from "./schemes/events/RoomSummaryUpdated";
|
|
128
|
+
import { UpdateRoomMember } from "./schemes/commands/UpdateRoomMember";
|
|
129
|
+
import { Ping } from "./schemes/commands/Ping";
|
|
130
|
+
import { Pong } from "./schemes/events/Pong";
|
|
131
|
+
import { ReportAbuse } from "./schemes/commands/ReportAbuse";
|
|
132
|
+
import { RedactMessages } from "./schemes/commands/RedactMessages";
|
|
133
|
+
import { MessagesRedacted } from "./schemes/events/MessagesRedacted";
|
|
134
|
+
import { GetRelationships } from "./schemes/commands/GetRelationships";
|
|
135
|
+
import { GetUserInfo } from "./schemes/commands/GetUserInfo";
|
|
136
|
+
import { UserInfo } from "./schemes/events/UserInfo";
|
|
137
|
+
import { UserInformation } from "./schemes/UserInformation";
|
|
138
|
+
import { SetSessionData, SessionPush } from "./schemes/commands/SetSessionData";
|
|
139
|
+
import { SessionData, SessionPlatform } from "./schemes/SessionData";
|
|
140
|
+
import { GetSessionData } from "./schemes/commands/GetSessionData";
|
|
141
|
+
import { UserData, PrivateMessagePolicy } from "./schemes/UserData";
|
|
142
|
+
import { SetUserData } from "./schemes/commands/SetUserData";
|
|
143
|
+
import { GetUserData } from "./schemes/commands/GetUserData";
|
|
144
|
+
import { UnfollowTopic } from "./schemes/commands/UnfollowTopic";
|
|
145
|
+
import { Invite } from "./schemes/commands/Invite";
|
|
146
|
+
import { Uninvite } from "./schemes/commands/Uninvite";
|
|
147
|
+
import { GetInvited } from "./schemes/commands/GetInvited";
|
|
148
|
+
import { Invited } from "./schemes/events/Invited";
|
|
149
|
+
import { TopicUnfollowed } from "./schemes/events/TopicUnfollowed";
|
|
150
|
+
import { MessageReaction, ReactionType, ToggledReaction, UserReaction } from "./schemes/Reaction";
|
|
151
|
+
import { MessagePoll, MessagePollOption } from "./schemes/MessagePoll";
|
|
152
|
+
import { React } from "./schemes/commands/React";
|
|
153
|
+
import { Unreact } from "./schemes/commands/Unreact";
|
|
154
|
+
import { GetReactionDetails } from "./schemes/commands/GetReactionDetails";
|
|
155
|
+
import { ReactionUpdated } from "./schemes/events/ReactionUpdated";
|
|
156
|
+
import { Reacted } from "./schemes/events/Reacted";
|
|
157
|
+
import { ReactionDetails } from "./schemes/events/ReactionDetails";
|
|
158
|
+
import { EntitlementsExtras, EntitlementsMap, EntitlementsSubject, EntitlementTarget, EntitlementValue, HistoryRotation, NO_LIMIT, SearchRange, SpaceFeature, STORAGE_UNIT_BYTES, UiPurpose, UserFeature } from "./schemes/Entitlements";
|
|
159
|
+
import { GetEntitlements } from "./schemes/commands/GetEntitlements";
|
|
160
|
+
import { Entitlements } from "./schemes/events/Entitlements";
|
|
161
|
+
import { EntitlementUsage } from "./schemes/events/EntitlementUsage";
|
|
162
|
+
import { CreateAccessTicket, TicketAudience } from "./schemes/commands/CreateAccessTicket";
|
|
163
|
+
import { AccessTicket } from "./schemes/events/AccessTicket";
|
|
164
|
+
export type { Envelope, Message, MessageType, MessageAuthor, MessageMentions, Role, Room, RoomType, RoomStream, RoomStreamType, RoomHistory, RoomHistoryMode, RoomMember, RoomSummary, RoomSummaryExtras, Space, SpaceMember, Topic, FollowedTopic, NotificationLevel, User, UserState, PermissionOverwritesValue, ChatLocation, SpaceSummary, SpaceDiscoverable, Emoticon, PermissionOverwritesTarget, BanObject, LeaveReason, UserRelationship, UserRelationshipType, CreateTopicInitialMessage, UserInformation, SessionPush, SessionData, SessionPlatform, UserData, PrivateMessagePolicy, ReactionType, MessageReaction, UserReaction, ToggledReaction, MessagePoll, MessagePollOption, EntitlementTarget, EntitlementsSubject, EntitlementValue, EntitlementsMap, EntitlementsExtras, TicketAudience, Bye, Error, Messages, FoundMessages, FoundMessage, TextRange, NewMessage, NewRole, NewRoom, NewTopic, TopicFollowed, TopicUnfollowed, FollowedTopics, FollowedTopicUpdated, ComputedPermissions, PermissionOverwrites, PermissionOverwritesUpdated, RoleDeleted, RoleUpdated, RoomDeleted, RoomUpdated, RoomJoined, RoomLeft, RoomMembersJoined, RoomMemberLeft, RoomMembers, RoomMemberUpdated, UserUpdated, Session, SpaceDeleted, SpaceUpdated, SpaceJoined, SpaceLeft, SpaceMemberJoined, SpaceMemberLeft, SpaceMembers, SpaceMemberUpdated, SpaceRooms, TopicDeleted, TopicUpdated, PermissionOverwriteTargets, Owners, Ok, DiscoverableSpaces, Emoticons, EmoticonDeleted, NewEmoticon, Bans, ClientData, SpaceSummaryEvent, RoomSummaryEvent, NewRelationship, RelationshipDeleted, Relationships, RoomSummaryUpdated, Pong, MessagesRedacted, UserInfo, Invited, ReactionUpdated, Reacted, ReactionDetails, Entitlements, EntitlementUsage, AccessTicket, AssignRole, GetMessages, SearchMessages, SearchDate, CreateMessage, Ack, CreateRole, CreateRoom, CreateSpace, CreateTopic, FollowTopic, UnfollowTopic, UpdateFollowedTopic, GetFollowedTopics, DeassignRole, DeleteRole, DeleteRoom, DeleteSpace, DeleteTopic, SetPermissionOverwrites, GetPermissionOverwrites, GetComputedPermissions, GetRoomMembers, GetSession, GetSpaceMembers, GetSpaceRooms, JoinRoom, JoinSpace, LeaveRoom, LeaveSpace, UpdateRole, UpdateSpace, UpdateRoom, UpdateTopic, GetPermissionOverwriteTargets, CreateOwner, DeleteOwner, GetOwners, Topics, GetTopics, GetDiscoverableSpaces, GetEmoticons, CreateEmoticon, DeleteEmoticon, Ban, Unban, GetBans, Kick, GetClientData, SetClientData, GetSpaceSummary, GetRoomSummary, UpdateSpaceMember, CreateRelationship, DeleteRelationship, GetRelationships, UpdateRoomMember, Ping, ReportAbuse, RedactMessages, GetUserInfo, SetSessionData, GetSessionData, SetUserData, GetUserData, Invite, Uninvite, GetInvited, React, Unreact, GetReactionDetails, GetEntitlements, CreateAccessTicket, };
|
|
165
|
+
export { ErrorCode, NO_LIMIT, STORAGE_UNIT_BYTES, HistoryRotation, RoleFlag, SearchRange, SpaceFeature, SpaceIntent, UiPurpose, UserFeature, UserStatus, };
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { User } from "./User";
|
|
2
|
+
import { ChatLocation } from "./ChatLocation";
|
|
3
|
+
export type BanType = 'Ban' | 'Mute';
|
|
4
|
+
export interface BanObject {
|
|
5
|
+
id: string;
|
|
6
|
+
bannedUser: User;
|
|
7
|
+
banningUser?: User;
|
|
8
|
+
location: ChatLocation;
|
|
9
|
+
reason: string;
|
|
10
|
+
expiresAt?: string;
|
|
11
|
+
createdAt: string;
|
|
12
|
+
type: BanType;
|
|
13
|
+
parentId?: string;
|
|
14
|
+
}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* What a package is attached to. A space package and a user package never describe the same
|
|
3
|
+
* feature, so entitlements of the two targets are never merged, summed or prioritised.
|
|
4
|
+
*/
|
|
5
|
+
export type EntitlementTarget = 'Space' | 'User';
|
|
6
|
+
/**
|
|
7
|
+
* Subject the entitlements belong to, as the billing service knows it.
|
|
8
|
+
*/
|
|
9
|
+
export interface EntitlementsSubject {
|
|
10
|
+
target: EntitlementTarget;
|
|
11
|
+
id: string;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Value of a single entitlement: a flag, a numeric limit ({@link NO_LIMIT} means unlimited)
|
|
15
|
+
* or a dictionary value. A dictionary states its numbers as strings.
|
|
16
|
+
*/
|
|
17
|
+
export type EntitlementValue = boolean | number | string;
|
|
18
|
+
/**
|
|
19
|
+
* Entitlement keys granted by the package, keyed by {@link SpaceFeature} or {@link UserFeature}.
|
|
20
|
+
* A feature the package does not grant is simply absent.
|
|
21
|
+
*/
|
|
22
|
+
export type EntitlementsMap = Record<string, EntitlementValue>;
|
|
23
|
+
/**
|
|
24
|
+
* What the modules of the chat server add to the answer of `GetEntitlements`. The package says
|
|
25
|
+
* how much a subject may take, these say how much of it is already gone.
|
|
26
|
+
*/
|
|
27
|
+
export interface EntitlementsExtras {
|
|
28
|
+
storageUsedBytes?: number;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Value of a numeric limit that is not limited at all.
|
|
32
|
+
*/
|
|
33
|
+
export declare const NO_LIMIT = -1;
|
|
34
|
+
/**
|
|
35
|
+
* Entitlement keys of space packages.
|
|
36
|
+
*/
|
|
37
|
+
export declare enum SpaceFeature {
|
|
38
|
+
MembersLimit = "space.members.limit",
|
|
39
|
+
MembersGuests = "space.members.guests",
|
|
40
|
+
RoomsLimit = "space.rooms.limit",
|
|
41
|
+
RoomsPrivateLimit = "space.rooms.private_limit",
|
|
42
|
+
RoomsArchive = "space.rooms.archive",
|
|
43
|
+
RoomsHistoryRotation = "space.rooms.history_rotation",
|
|
44
|
+
EmoticonsLimit = "space.emoticons.limit",
|
|
45
|
+
MessageLength = "space.message.length",
|
|
46
|
+
StorageLimit = "space.storage.limit",
|
|
47
|
+
StorageSingleFileLimit = "space.storage.single_file_limit",
|
|
48
|
+
AccessWhitelist = "space.access.whitelist",
|
|
49
|
+
SearchRange = "space.search.range",
|
|
50
|
+
ContentExport = "space.content.export",
|
|
51
|
+
ContentAuditLog = "space.content.auditlog",
|
|
52
|
+
AvMemberLimit = "space.av.member_limit",
|
|
53
|
+
AvBroadcasterLimit = "space.av.broadcaster_limit",
|
|
54
|
+
AvQuality = "space.av.quality",
|
|
55
|
+
UiPurpose = "app.ui.purpose",
|
|
56
|
+
ApiAccess = "app.api.access",
|
|
57
|
+
DataSovereignty = "app.data.sovereignty",
|
|
58
|
+
Support = "app.support"
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Entitlement keys of user packages.
|
|
62
|
+
*/
|
|
63
|
+
export declare enum UserFeature {
|
|
64
|
+
MessageLength = "user.message.length",
|
|
65
|
+
StorageLimit = "user.storage.limit",
|
|
66
|
+
StorageSingleFileLimit = "user.storage.single_file_limit"
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* How far back a room of the space may be told to keep its history.
|
|
70
|
+
*/
|
|
71
|
+
export declare enum HistoryRotation {
|
|
72
|
+
Low = "low",
|
|
73
|
+
High = "high"
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* What the space is for; a space for work gets the simplified interface.
|
|
77
|
+
*/
|
|
78
|
+
export declare enum UiPurpose {
|
|
79
|
+
Work = "work",
|
|
80
|
+
Fun = "fun"
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* How much of the space search reaches.
|
|
84
|
+
*/
|
|
85
|
+
export declare enum SearchRange {
|
|
86
|
+
JoinedRooms = "joined_rooms",
|
|
87
|
+
AvailableRooms = "available_rooms"
|
|
88
|
+
}
|
|
89
|
+
/**
|
|
90
|
+
* Every storage entitlement is stated in megabytes.
|
|
91
|
+
*/
|
|
92
|
+
export declare const STORAGE_UNIT_BYTES: number;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ChatLocation } from "./ChatLocation";
|
|
2
|
+
export type NotificationLevel = 'All' | 'Mentions' | 'None';
|
|
3
|
+
export interface FollowedTopic {
|
|
4
|
+
location: ChatLocation;
|
|
5
|
+
lastAckMessageId: string | null;
|
|
6
|
+
notificationLevel: NotificationLevel;
|
|
7
|
+
missed: number | null;
|
|
8
|
+
isUnread: boolean;
|
|
9
|
+
mentionCount: number;
|
|
10
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { BanObject } from "./BanObject";
|
|
2
|
+
import { Error as ErrorObject } from "./events/Error";
|
|
3
|
+
export interface LeaveReason {
|
|
4
|
+
type: 'Leave' | 'Ban' | 'Kick' | 'Service' | 'Error';
|
|
5
|
+
ban?: BanObject;
|
|
6
|
+
kick?: string;
|
|
7
|
+
service?: string;
|
|
8
|
+
error?: ErrorObject;
|
|
9
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { User } from "./User";
|
|
2
|
+
import { ChatLocation } from "./ChatLocation";
|
|
3
|
+
import { MessageReaction } from "./Reaction";
|
|
4
|
+
import { MessagePoll } from "./MessagePoll";
|
|
5
|
+
export type MessageType = 'Text' | 'RoomJoin' | 'RoomMemberAdd' | 'RoomLeave' | 'SpaceJoin' | 'SpaceLeave' | 'TopicChange' | 'CustomNickChange' | 'Ephemeral' | 'Poll';
|
|
6
|
+
/**
|
|
7
|
+
* Mention targets a message actually reached, as resolved by the server: role
|
|
8
|
+
* mentions the author was not allowed to fire are absent, even though they stay
|
|
9
|
+
* in the content. Null when the message mentions nobody.
|
|
10
|
+
*/
|
|
11
|
+
export interface MessageMentions {
|
|
12
|
+
userIds: string[];
|
|
13
|
+
roleIds: string[];
|
|
14
|
+
}
|
|
15
|
+
export interface MessageAuthor {
|
|
16
|
+
user: User;
|
|
17
|
+
customNick?: string;
|
|
18
|
+
color?: string;
|
|
19
|
+
}
|
|
20
|
+
export interface Message {
|
|
21
|
+
id: string;
|
|
22
|
+
location: ChatLocation;
|
|
23
|
+
createdAt: string;
|
|
24
|
+
type: MessageType;
|
|
25
|
+
author: MessageAuthor;
|
|
26
|
+
content?: string;
|
|
27
|
+
topicRef: string | null;
|
|
28
|
+
attachments: string[] | null;
|
|
29
|
+
reactions: MessageReaction[];
|
|
30
|
+
poll?: MessagePoll;
|
|
31
|
+
mentions: MessageMentions | null;
|
|
32
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export type ReactionType = 'Emoji' | 'Emoticon';
|
|
2
|
+
export interface MessageReaction {
|
|
3
|
+
type: ReactionType;
|
|
4
|
+
value: string;
|
|
5
|
+
count: number;
|
|
6
|
+
}
|
|
7
|
+
export interface UserReaction {
|
|
8
|
+
type: ReactionType;
|
|
9
|
+
value: string;
|
|
10
|
+
}
|
|
11
|
+
export interface ToggledReaction extends UserReaction {
|
|
12
|
+
isAdded: boolean;
|
|
13
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Bit flags of a role, stored in {@link Role.flags}.
|
|
3
|
+
*
|
|
4
|
+
* - `SeparateOnMembersList` - available holders of the role are listed in their
|
|
5
|
+
* own group of the members list, headed by the role name.
|
|
6
|
+
* - `MentionableByEveryone` - anybody may mention the role with notification
|
|
7
|
+
* effects; without it the mention is decorative only, unless the author holds
|
|
8
|
+
* the `MentionAllRoles` permission.
|
|
9
|
+
*/
|
|
10
|
+
export declare enum RoleFlag {
|
|
11
|
+
SeparateOnMembersList = 1,
|
|
12
|
+
MentionableByEveryone = 2
|
|
13
|
+
}
|
|
14
|
+
export interface Role {
|
|
15
|
+
id: string;
|
|
16
|
+
priority: number;
|
|
17
|
+
name: string;
|
|
18
|
+
color?: string;
|
|
19
|
+
flags: number;
|
|
20
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Topic } from "./Topic";
|
|
2
|
+
import { User } from "./User";
|
|
3
|
+
import { RoomStream } from "./RoomStream";
|
|
4
|
+
import { RoomHistory } from "./RoomHistory";
|
|
5
|
+
export type RoomType = 'Text' | 'ClassicText' | 'Pm';
|
|
6
|
+
export interface Room {
|
|
7
|
+
id: string;
|
|
8
|
+
spaceId: string | null;
|
|
9
|
+
name: string;
|
|
10
|
+
description: string;
|
|
11
|
+
type: RoomType;
|
|
12
|
+
defaultTopic: Topic | null;
|
|
13
|
+
recipients: User[] | null;
|
|
14
|
+
flags: number;
|
|
15
|
+
stream: RoomStream | null;
|
|
16
|
+
history: RoomHistory | null;
|
|
17
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { User } from "./User";
|
|
2
|
+
import { SpaceMember } from "./SpaceMember";
|
|
3
|
+
export interface RoomMember {
|
|
4
|
+
user: User | null;
|
|
5
|
+
spaceMember: SpaceMember | null;
|
|
6
|
+
roles: string[] | null;
|
|
7
|
+
customNick: string | null;
|
|
8
|
+
customColor: string | null;
|
|
9
|
+
customAvatar: string | null;
|
|
10
|
+
extras: string;
|
|
11
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { RoomType } from "./Room";
|
|
2
|
+
export interface RoomSummaryExtras {
|
|
3
|
+
isPrivate: boolean;
|
|
4
|
+
isInvitationOnly: boolean;
|
|
5
|
+
}
|
|
6
|
+
export interface RoomSummary {
|
|
7
|
+
id: string;
|
|
8
|
+
spaceId?: string;
|
|
9
|
+
name: string;
|
|
10
|
+
description: string;
|
|
11
|
+
memberCount: number;
|
|
12
|
+
type: RoomType;
|
|
13
|
+
extras?: RoomSummaryExtras;
|
|
14
|
+
defaultTopicId?: string | null;
|
|
15
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { SessionPush } from "./commands/SetSessionData";
|
|
2
|
+
/**
|
|
3
|
+
* Platform of a client session. Reported on connect (the `platform` query
|
|
4
|
+
* parameter) and independent of the push registration.
|
|
5
|
+
*/
|
|
6
|
+
export type SessionPlatform = 'web' | 'ios' | 'android' | 'desktop';
|
|
7
|
+
export interface SessionData {
|
|
8
|
+
platform?: SessionPlatform;
|
|
9
|
+
push?: SessionPush;
|
|
10
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Role } from "./Role";
|
|
2
|
+
export type SpaceDiscoverable = 'NotRequested' | 'Requested' | 'Accepted' | 'Declined';
|
|
3
|
+
export declare enum SpaceIntent {
|
|
4
|
+
Community = "Community",
|
|
5
|
+
Friends = "Friends",
|
|
6
|
+
Team = "Team"
|
|
7
|
+
}
|
|
8
|
+
export interface Space {
|
|
9
|
+
id: string;
|
|
10
|
+
name: string;
|
|
11
|
+
description: string;
|
|
12
|
+
roles: Role[];
|
|
13
|
+
systemRoom: string | null;
|
|
14
|
+
defaultRooms: string[];
|
|
15
|
+
icon: string | null;
|
|
16
|
+
banner: string | null;
|
|
17
|
+
discoverable: SpaceDiscoverable;
|
|
18
|
+
flags: number;
|
|
19
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export type UserTags = 'bot' | 'temp' | string;
|
|
2
|
+
/**
|
|
3
|
+
* Availability of a user, aggregated over all of their sessions.
|
|
4
|
+
*
|
|
5
|
+
* - `Offline` - no session is connected and none can be reached asynchronously.
|
|
6
|
+
* - `Online` - at least one session holds a live connection.
|
|
7
|
+
* - `OnlineAsync` - no live connection, but a push-registered device was active
|
|
8
|
+
* recently, so a message will still reach the user.
|
|
9
|
+
*/
|
|
10
|
+
export declare enum UserStatus {
|
|
11
|
+
Offline = 0,
|
|
12
|
+
Online = 1,
|
|
13
|
+
OnlineAsync = 2
|
|
14
|
+
}
|
|
15
|
+
export interface User {
|
|
16
|
+
id: string;
|
|
17
|
+
nick: string;
|
|
18
|
+
avatar: string;
|
|
19
|
+
tags: UserTags[];
|
|
20
|
+
status: UserStatus;
|
|
21
|
+
/** @deprecated Use {@link status}. Kept for clients older than the numeric status. */
|
|
22
|
+
online: boolean;
|
|
23
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export type PrivateMessagePolicy = 'None' | 'Mutual' | 'All';
|
|
2
|
+
export interface UserData {
|
|
3
|
+
privateMessagePolicy: PrivateMessagePolicy;
|
|
4
|
+
/**
|
|
5
|
+
* Whether others may see that the user is reachable on a push-registered
|
|
6
|
+
* device while disconnected. When false the user simply reads as offline.
|
|
7
|
+
*/
|
|
8
|
+
showAsyncPresence: boolean;
|
|
9
|
+
language: string | null;
|
|
10
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { User } from "./User";
|
|
2
|
+
import { SpaceSummary } from "./SpaceSummary";
|
|
3
|
+
import { RoomSummary } from "./RoomSummary";
|
|
4
|
+
export interface UserInformation {
|
|
5
|
+
user: User;
|
|
6
|
+
firstSeenAt: string;
|
|
7
|
+
lastSeenAt: string;
|
|
8
|
+
spaces: SpaceSummary[];
|
|
9
|
+
rooms: RoomSummary[];
|
|
10
|
+
knownAliases?: User[];
|
|
11
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Issues a short-lived signed ticket with which the client authenticates in a service outside the
|
|
3
|
+
* chat server. With `spaceId` the ticket covers that space and requires the `ManageSpace`
|
|
4
|
+
* permission; without it the ticket covers the requesting user.
|
|
5
|
+
*/
|
|
6
|
+
export interface CreateAccessTicket {
|
|
7
|
+
audience: TicketAudience;
|
|
8
|
+
spaceId?: string;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Service a ticket is issued for. A ticket is rejected by every other service.
|
|
12
|
+
*/
|
|
13
|
+
export type TicketAudience = 'billing' | string;
|