@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.
Files changed (196) hide show
  1. package/CHANGELOG.md +81 -0
  2. package/LICENSE +21 -0
  3. package/README.md +418 -2
  4. package/build/index.cjs.js +3656 -0
  5. package/build/index.cjs.js.map +1 -0
  6. package/build/index.mjs +3613 -0
  7. package/build/index.mjs.map +1 -0
  8. package/build/index.umd.js +2 -0
  9. package/build/index.umd.js.map +1 -0
  10. package/build/types/AbstractChatClient.d.ts +184 -0
  11. package/build/types/AbstractRestClient.d.ts +21 -0
  12. package/build/types/EventTarget.d.ts +32 -0
  13. package/build/types/FilesClient.d.ts +16 -0
  14. package/build/types/IndexedObjectCollection.d.ts +66 -0
  15. package/build/types/Permissions.d.ts +117 -0
  16. package/build/types/WebApiChatClient.d.ts +38 -0
  17. package/build/types/WebSocketChatClient.d.ts +110 -0
  18. package/build/types/index.d.ts +19 -0
  19. package/build/types/protocol/index.d.ts +165 -0
  20. package/build/types/protocol/schemes/BanObject.d.ts +14 -0
  21. package/build/types/protocol/schemes/ChatLocation.d.ts +5 -0
  22. package/build/types/protocol/schemes/Emoticon.d.ts +9 -0
  23. package/build/types/protocol/schemes/Entitlements.d.ts +92 -0
  24. package/build/types/protocol/schemes/Envelope.d.ts +5 -0
  25. package/build/types/protocol/schemes/FollowedTopic.d.ts +10 -0
  26. package/build/types/protocol/schemes/LeaveReason.d.ts +9 -0
  27. package/build/types/protocol/schemes/Message.d.ts +32 -0
  28. package/build/types/protocol/schemes/MessagePoll.d.ts +10 -0
  29. package/build/types/protocol/schemes/PermissionOverwritesTarget.d.ts +5 -0
  30. package/build/types/protocol/schemes/PermissionOverwritesValue.d.ts +4 -0
  31. package/build/types/protocol/schemes/Reaction.d.ts +13 -0
  32. package/build/types/protocol/schemes/Role.d.ts +20 -0
  33. package/build/types/protocol/schemes/Room.d.ts +17 -0
  34. package/build/types/protocol/schemes/RoomHistory.d.ts +5 -0
  35. package/build/types/protocol/schemes/RoomMember.d.ts +11 -0
  36. package/build/types/protocol/schemes/RoomStream.d.ts +5 -0
  37. package/build/types/protocol/schemes/RoomSummary.d.ts +15 -0
  38. package/build/types/protocol/schemes/SessionData.d.ts +10 -0
  39. package/build/types/protocol/schemes/Space.d.ts +19 -0
  40. package/build/types/protocol/schemes/SpaceMember.d.ts +7 -0
  41. package/build/types/protocol/schemes/SpaceSummary.d.ts +8 -0
  42. package/build/types/protocol/schemes/Topic.d.ts +8 -0
  43. package/build/types/protocol/schemes/User.d.ts +23 -0
  44. package/build/types/protocol/schemes/UserData.d.ts +10 -0
  45. package/build/types/protocol/schemes/UserInformation.d.ts +11 -0
  46. package/build/types/protocol/schemes/UserRelationship.d.ts +6 -0
  47. package/build/types/protocol/schemes/UserState.d.ts +6 -0
  48. package/build/types/protocol/schemes/commands/Ack.d.ts +5 -0
  49. package/build/types/protocol/schemes/commands/AssignRole.d.ts +6 -0
  50. package/build/types/protocol/schemes/commands/Ban.d.ts +10 -0
  51. package/build/types/protocol/schemes/commands/CreateAccessTicket.d.ts +13 -0
  52. package/build/types/protocol/schemes/commands/CreateEmoticon.d.ts +5 -0
  53. package/build/types/protocol/schemes/commands/CreateMessage.d.ts +11 -0
  54. package/build/types/protocol/schemes/commands/CreateOwner.d.ts +5 -0
  55. package/build/types/protocol/schemes/commands/CreateRelationship.d.ts +5 -0
  56. package/build/types/protocol/schemes/commands/CreateRole.d.ts +6 -0
  57. package/build/types/protocol/schemes/commands/CreateRoom.d.ts +9 -0
  58. package/build/types/protocol/schemes/commands/CreateSpace.d.ts +6 -0
  59. package/build/types/protocol/schemes/commands/CreateTopic.d.ts +11 -0
  60. package/build/types/protocol/schemes/commands/DeassignRole.d.ts +6 -0
  61. package/build/types/protocol/schemes/commands/DeleteEmoticon.d.ts +3 -0
  62. package/build/types/protocol/schemes/commands/DeleteOwner.d.ts +5 -0
  63. package/build/types/protocol/schemes/commands/DeleteRelationship.d.ts +5 -0
  64. package/build/types/protocol/schemes/commands/DeleteRole.d.ts +4 -0
  65. package/build/types/protocol/schemes/commands/DeleteRoom.d.ts +3 -0
  66. package/build/types/protocol/schemes/commands/DeleteSpace.d.ts +3 -0
  67. package/build/types/protocol/schemes/commands/DeleteTopic.d.ts +4 -0
  68. package/build/types/protocol/schemes/commands/FollowTopic.d.ts +4 -0
  69. package/build/types/protocol/schemes/commands/GetBans.d.ts +6 -0
  70. package/build/types/protocol/schemes/commands/GetClientData.d.ts +2 -0
  71. package/build/types/protocol/schemes/commands/GetComputedPermissions.d.ts +10 -0
  72. package/build/types/protocol/schemes/commands/GetDiscoverableSpaces.d.ts +2 -0
  73. package/build/types/protocol/schemes/commands/GetEmoticons.d.ts +3 -0
  74. package/build/types/protocol/schemes/commands/GetEntitlements.d.ts +8 -0
  75. package/build/types/protocol/schemes/commands/GetFollowedTopics.d.ts +4 -0
  76. package/build/types/protocol/schemes/commands/GetInvited.d.ts +3 -0
  77. package/build/types/protocol/schemes/commands/GetMessages.d.ts +13 -0
  78. package/build/types/protocol/schemes/commands/GetOwners.d.ts +4 -0
  79. package/build/types/protocol/schemes/commands/GetPermissionOverwriteTargets.d.ts +4 -0
  80. package/build/types/protocol/schemes/commands/GetPermissionOverwrites.d.ts +6 -0
  81. package/build/types/protocol/schemes/commands/GetReactionDetails.d.ts +8 -0
  82. package/build/types/protocol/schemes/commands/GetRelationships.d.ts +2 -0
  83. package/build/types/protocol/schemes/commands/GetRoomMembers.d.ts +3 -0
  84. package/build/types/protocol/schemes/commands/GetRoomSummary.d.ts +4 -0
  85. package/build/types/protocol/schemes/commands/GetSession.d.ts +2 -0
  86. package/build/types/protocol/schemes/commands/GetSessionData.d.ts +2 -0
  87. package/build/types/protocol/schemes/commands/GetSpaceMembers.d.ts +3 -0
  88. package/build/types/protocol/schemes/commands/GetSpaceRooms.d.ts +3 -0
  89. package/build/types/protocol/schemes/commands/GetSpaceSummary.d.ts +3 -0
  90. package/build/types/protocol/schemes/commands/GetTopics.d.ts +4 -0
  91. package/build/types/protocol/schemes/commands/GetUserData.d.ts +2 -0
  92. package/build/types/protocol/schemes/commands/GetUserInfo.d.ts +3 -0
  93. package/build/types/protocol/schemes/commands/Invite.d.ts +5 -0
  94. package/build/types/protocol/schemes/commands/JoinRoom.d.ts +13 -0
  95. package/build/types/protocol/schemes/commands/JoinSpace.d.ts +3 -0
  96. package/build/types/protocol/schemes/commands/Kick.d.ts +7 -0
  97. package/build/types/protocol/schemes/commands/LeaveRoom.d.ts +3 -0
  98. package/build/types/protocol/schemes/commands/LeaveSpace.d.ts +3 -0
  99. package/build/types/protocol/schemes/commands/Ping.d.ts +2 -0
  100. package/build/types/protocol/schemes/commands/React.d.ts +6 -0
  101. package/build/types/protocol/schemes/commands/RedactMessages.d.ts +3 -0
  102. package/build/types/protocol/schemes/commands/ReportAbuse.d.ts +9 -0
  103. package/build/types/protocol/schemes/commands/SearchMessages.d.ts +18 -0
  104. package/build/types/protocol/schemes/commands/SetClientData.d.ts +1 -0
  105. package/build/types/protocol/schemes/commands/SetPermissionOverwrites.d.ts +8 -0
  106. package/build/types/protocol/schemes/commands/SetSessionData.d.ts +17 -0
  107. package/build/types/protocol/schemes/commands/SetUserData.d.ts +6 -0
  108. package/build/types/protocol/schemes/commands/Unban.d.ts +3 -0
  109. package/build/types/protocol/schemes/commands/UnfollowTopic.d.ts +4 -0
  110. package/build/types/protocol/schemes/commands/Uninvite.d.ts +5 -0
  111. package/build/types/protocol/schemes/commands/Unreact.d.ts +6 -0
  112. package/build/types/protocol/schemes/commands/UpdateFollowedTopic.d.ts +6 -0
  113. package/build/types/protocol/schemes/commands/UpdateRole.d.ts +8 -0
  114. package/build/types/protocol/schemes/commands/UpdateRoom.d.ts +10 -0
  115. package/build/types/protocol/schemes/commands/UpdateRoomMember.d.ts +8 -0
  116. package/build/types/protocol/schemes/commands/UpdateSpace.d.ts +12 -0
  117. package/build/types/protocol/schemes/commands/UpdateSpaceMember.d.ts +6 -0
  118. package/build/types/protocol/schemes/commands/UpdateTopic.d.ts +5 -0
  119. package/build/types/protocol/schemes/events/AccessTicket.d.ts +14 -0
  120. package/build/types/protocol/schemes/events/Bans.d.ts +6 -0
  121. package/build/types/protocol/schemes/events/Bye.d.ts +4 -0
  122. package/build/types/protocol/schemes/events/ClientData.d.ts +1 -0
  123. package/build/types/protocol/schemes/events/ComputedPermissions.d.ts +9 -0
  124. package/build/types/protocol/schemes/events/DiscoverableSpaces.d.ts +4 -0
  125. package/build/types/protocol/schemes/events/EmoticonDeleted.d.ts +4 -0
  126. package/build/types/protocol/schemes/events/Emoticons.d.ts +6 -0
  127. package/build/types/protocol/schemes/events/EntitlementUsage.d.ts +11 -0
  128. package/build/types/protocol/schemes/events/Entitlements.d.ts +12 -0
  129. package/build/types/protocol/schemes/events/Error.d.ts +14 -0
  130. package/build/types/protocol/schemes/events/FollowedTopicUpdated.d.ts +4 -0
  131. package/build/types/protocol/schemes/events/FollowedTopics.d.ts +6 -0
  132. package/build/types/protocol/schemes/events/FoundMessages.d.ts +16 -0
  133. package/build/types/protocol/schemes/events/Invited.d.ts +10 -0
  134. package/build/types/protocol/schemes/events/Messages.d.ts +9 -0
  135. package/build/types/protocol/schemes/events/MessagesRedacted.d.ts +5 -0
  136. package/build/types/protocol/schemes/events/NewEmoticon.d.ts +4 -0
  137. package/build/types/protocol/schemes/events/NewMessage.d.ts +4 -0
  138. package/build/types/protocol/schemes/events/NewRelationship.d.ts +4 -0
  139. package/build/types/protocol/schemes/events/NewRole.d.ts +5 -0
  140. package/build/types/protocol/schemes/events/NewRoom.d.ts +5 -0
  141. package/build/types/protocol/schemes/events/NewTopic.d.ts +5 -0
  142. package/build/types/protocol/schemes/events/Ok.d.ts +2 -0
  143. package/build/types/protocol/schemes/events/Owners.d.ts +8 -0
  144. package/build/types/protocol/schemes/events/PermissionOverwriteTargets.d.ts +10 -0
  145. package/build/types/protocol/schemes/events/PermissionOverwrites.d.ts +8 -0
  146. package/build/types/protocol/schemes/events/PermissionOverwritesUpdated.d.ts +8 -0
  147. package/build/types/protocol/schemes/events/Pong.d.ts +2 -0
  148. package/build/types/protocol/schemes/events/Reacted.d.ts +9 -0
  149. package/build/types/protocol/schemes/events/ReactionDetails.d.ts +11 -0
  150. package/build/types/protocol/schemes/events/ReactionUpdated.d.ts +8 -0
  151. package/build/types/protocol/schemes/events/RelationshipDeleted.d.ts +4 -0
  152. package/build/types/protocol/schemes/events/Relationships.d.ts +4 -0
  153. package/build/types/protocol/schemes/events/RoleDeleted.d.ts +4 -0
  154. package/build/types/protocol/schemes/events/RoleUpdated.d.ts +5 -0
  155. package/build/types/protocol/schemes/events/RoomDeleted.d.ts +3 -0
  156. package/build/types/protocol/schemes/events/RoomJoined.d.ts +4 -0
  157. package/build/types/protocol/schemes/events/RoomLeft.d.ts +5 -0
  158. package/build/types/protocol/schemes/events/RoomMemberLeft.d.ts +4 -0
  159. package/build/types/protocol/schemes/events/RoomMemberUpdated.d.ts +6 -0
  160. package/build/types/protocol/schemes/events/RoomMembers.d.ts +5 -0
  161. package/build/types/protocol/schemes/events/RoomMembersJoined.d.ts +9 -0
  162. package/build/types/protocol/schemes/events/RoomSummary.d.ts +4 -0
  163. package/build/types/protocol/schemes/events/RoomSummaryUpdated.d.ts +8 -0
  164. package/build/types/protocol/schemes/events/RoomUpdated.d.ts +4 -0
  165. package/build/types/protocol/schemes/events/Session.d.ts +9 -0
  166. package/build/types/protocol/schemes/events/SpaceDeleted.d.ts +3 -0
  167. package/build/types/protocol/schemes/events/SpaceJoined.d.ts +4 -0
  168. package/build/types/protocol/schemes/events/SpaceLeft.d.ts +5 -0
  169. package/build/types/protocol/schemes/events/SpaceMemberJoined.d.ts +5 -0
  170. package/build/types/protocol/schemes/events/SpaceMemberLeft.d.ts +4 -0
  171. package/build/types/protocol/schemes/events/SpaceMemberUpdated.d.ts +6 -0
  172. package/build/types/protocol/schemes/events/SpaceMembers.d.ts +5 -0
  173. package/build/types/protocol/schemes/events/SpaceRooms.d.ts +5 -0
  174. package/build/types/protocol/schemes/events/SpaceSummary.d.ts +4 -0
  175. package/build/types/protocol/schemes/events/SpaceUpdated.d.ts +4 -0
  176. package/build/types/protocol/schemes/events/TopicDeleted.d.ts +4 -0
  177. package/build/types/protocol/schemes/events/TopicFollowed.d.ts +4 -0
  178. package/build/types/protocol/schemes/events/TopicUnfollowed.d.ts +4 -0
  179. package/build/types/protocol/schemes/events/TopicUpdated.d.ts +6 -0
  180. package/build/types/protocol/schemes/events/Topics.d.ts +6 -0
  181. package/build/types/protocol/schemes/events/UserInfo.d.ts +4 -0
  182. package/build/types/protocol/schemes/events/UserUpdated.d.ts +4 -0
  183. package/build/types/state-tracker/AsyncUtils.d.ts +15 -0
  184. package/build/types/state-tracker/ChatStateTracker.d.ts +41 -0
  185. package/build/types/state-tracker/EmoticonsManager.d.ts +15 -0
  186. package/build/types/state-tracker/FollowedTopicsManager.d.ts +85 -0
  187. package/build/types/state-tracker/MessagesManager.d.ts +27 -0
  188. package/build/types/state-tracker/PermissionsManager.d.ts +51 -0
  189. package/build/types/state-tracker/RelationshipsManager.d.ts +15 -0
  190. package/build/types/state-tracker/RoomMessagesHistory.d.ts +72 -0
  191. package/build/types/state-tracker/RoomsManager.d.ts +72 -0
  192. package/build/types/state-tracker/SpacesManager.d.ts +63 -0
  193. package/build/types/state-tracker/TopicHistoryWindow.d.ts +191 -0
  194. package/build/types/state-tracker/UsersManager.d.ts +23 -0
  195. package/build/types/state-tracker/functions.d.ts +6 -0
  196. package/package.json +67 -4
@@ -0,0 +1,5 @@
1
+ export interface CreateEmoticon {
2
+ name: string;
3
+ fileId: string;
4
+ spaceId?: string;
5
+ }
@@ -0,0 +1,11 @@
1
+ import { ChatLocation } from "../ChatLocation";
2
+ import { MessagePoll } from "../MessagePoll";
3
+ export interface CreateMessage {
4
+ location: ChatLocation;
5
+ content: string;
6
+ attachments?: string[];
7
+ customNick?: string;
8
+ customColor?: string;
9
+ /** Turns the message into a poll; its content becomes the question. */
10
+ poll?: MessagePoll;
11
+ }
@@ -0,0 +1,5 @@
1
+ import { ChatLocation } from "../ChatLocation";
2
+ export interface CreateOwner {
3
+ location: ChatLocation;
4
+ userId: string;
5
+ }
@@ -0,0 +1,5 @@
1
+ import { UserRelationshipType } from "../UserRelationship";
2
+ export interface CreateRelationship {
3
+ refUserId: string;
4
+ type: UserRelationshipType;
5
+ }
@@ -0,0 +1,6 @@
1
+ export interface CreateRole {
2
+ spaceId: string;
3
+ name: string;
4
+ color: string;
5
+ flags?: number;
6
+ }
@@ -0,0 +1,9 @@
1
+ import { RoomType } from "../Room";
2
+ export interface CreateRoom {
3
+ type: RoomType;
4
+ spaceId?: string;
5
+ name?: string;
6
+ description?: string;
7
+ recipientIds?: string[];
8
+ flags?: number;
9
+ }
@@ -0,0 +1,6 @@
1
+ import { SpaceIntent } from "../Space";
2
+ export interface CreateSpace {
3
+ name: string;
4
+ flags?: number;
5
+ intent?: SpaceIntent;
6
+ }
@@ -0,0 +1,11 @@
1
+ import { ChatLocation } from "../ChatLocation";
2
+ export interface CreateTopicInitialMessage {
3
+ content?: string;
4
+ attachments?: string[];
5
+ }
6
+ export interface CreateTopic {
7
+ location: ChatLocation;
8
+ name: string;
9
+ refMessageId?: string;
10
+ initialMessage?: CreateTopicInitialMessage;
11
+ }
@@ -0,0 +1,6 @@
1
+ import { ChatLocation } from "../ChatLocation";
2
+ export interface DeassignRole {
3
+ roleId: string;
4
+ userId: string;
5
+ location: ChatLocation;
6
+ }
@@ -0,0 +1,3 @@
1
+ export interface DeleteEmoticon {
2
+ id: string;
3
+ }
@@ -0,0 +1,5 @@
1
+ import { ChatLocation } from "../ChatLocation";
2
+ export interface DeleteOwner {
3
+ location: ChatLocation;
4
+ userId: string;
5
+ }
@@ -0,0 +1,5 @@
1
+ import { UserRelationshipType } from "../UserRelationship";
2
+ export interface DeleteRelationship {
3
+ refUserId: string;
4
+ type: UserRelationshipType;
5
+ }
@@ -0,0 +1,4 @@
1
+ export interface DeleteRole {
2
+ roleId: string;
3
+ spaceId: string;
4
+ }
@@ -0,0 +1,3 @@
1
+ export interface DeleteRoom {
2
+ id: string;
3
+ }
@@ -0,0 +1,3 @@
1
+ export interface DeleteSpace {
2
+ id: string;
3
+ }
@@ -0,0 +1,4 @@
1
+ import { ChatLocation } from "../ChatLocation";
2
+ export interface DeleteTopic {
3
+ location: ChatLocation;
4
+ }
@@ -0,0 +1,4 @@
1
+ import { ChatLocation } from "../ChatLocation";
2
+ export interface FollowTopic {
3
+ location: ChatLocation;
4
+ }
@@ -0,0 +1,6 @@
1
+ import { ChatLocation } from "../ChatLocation";
2
+ import { BanType } from "../BanObject";
3
+ export interface GetBans {
4
+ location: ChatLocation;
5
+ type?: BanType;
6
+ }
@@ -0,0 +1,2 @@
1
+ export interface GetClientData {
2
+ }
@@ -0,0 +1,10 @@
1
+ import { ChatLocation } from "../ChatLocation";
2
+ /**
3
+ * Computed permissions of a user in the location. Without `userId` those of the requesting
4
+ * user are returned. Another user may be asked about only when you may read the location;
5
+ * on the global layer it requires the global `ManagePermissions` permission.
6
+ */
7
+ export interface GetComputedPermissions {
8
+ location: ChatLocation;
9
+ userId?: string;
10
+ }
@@ -0,0 +1,2 @@
1
+ export interface GetDiscoverableSpaces {
2
+ }
@@ -0,0 +1,3 @@
1
+ export interface GetEmoticons {
2
+ spaceId?: string;
3
+ }
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Package entitlements of a space (readable by its members) or of an account. Without both
3
+ * fields the entitlements of the requesting user are returned; `userId` may only be their own.
4
+ */
5
+ export interface GetEntitlements {
6
+ spaceId?: string;
7
+ userId?: string;
8
+ }
@@ -0,0 +1,4 @@
1
+ import { ChatLocation } from "../ChatLocation";
2
+ export interface GetFollowedTopics {
3
+ location: ChatLocation;
4
+ }
@@ -0,0 +1,3 @@
1
+ export interface GetInvited {
2
+ roomId: string;
3
+ }
@@ -0,0 +1,13 @@
1
+ import { ChatLocation } from "../ChatLocation";
2
+ export interface GetMessages {
3
+ location: ChatLocation;
4
+ before?: string;
5
+ after?: string;
6
+ around?: string;
7
+ limit?: number;
8
+ /**
9
+ * Pull the reactions of the asking user along with the messages, instead of
10
+ * asking for their own state separately.
11
+ */
12
+ includeMyReactions?: boolean;
13
+ }
@@ -0,0 +1,4 @@
1
+ import { ChatLocation } from "../ChatLocation";
2
+ export interface GetOwners {
3
+ location: ChatLocation;
4
+ }
@@ -0,0 +1,4 @@
1
+ import { ChatLocation } from "../ChatLocation";
2
+ export interface GetPermissionOverwriteTargets {
3
+ location: ChatLocation;
4
+ }
@@ -0,0 +1,6 @@
1
+ import { ChatLocation } from "../ChatLocation";
2
+ import { PermissionOverwritesTarget } from "../PermissionOverwritesTarget";
3
+ export interface GetPermissionOverwrites {
4
+ location: ChatLocation;
5
+ target: PermissionOverwritesTarget;
6
+ }
@@ -0,0 +1,8 @@
1
+ import { ReactionType } from "../Reaction";
2
+ export interface GetReactionDetails {
3
+ messageId: string;
4
+ type: ReactionType;
5
+ value: string;
6
+ limit?: number;
7
+ offset?: number;
8
+ }
@@ -0,0 +1,2 @@
1
+ export interface GetRelationships {
2
+ }
@@ -0,0 +1,3 @@
1
+ export interface GetRoomMembers {
2
+ id: string;
3
+ }
@@ -0,0 +1,4 @@
1
+ import { ChatLocation } from "../ChatLocation";
2
+ export interface GetRoomSummary {
3
+ location: ChatLocation;
4
+ }
@@ -0,0 +1,2 @@
1
+ export interface GetSession {
2
+ }
@@ -0,0 +1,2 @@
1
+ export interface GetSessionData {
2
+ }
@@ -0,0 +1,3 @@
1
+ export interface GetSpaceMembers {
2
+ id: string;
3
+ }
@@ -0,0 +1,3 @@
1
+ export interface GetSpaceRooms {
2
+ id: string;
3
+ }
@@ -0,0 +1,3 @@
1
+ export interface GetSpaceSummary {
2
+ id: string;
3
+ }
@@ -0,0 +1,4 @@
1
+ export interface GetTopics {
2
+ roomId: string;
3
+ topicIds: string[];
4
+ }
@@ -0,0 +1,2 @@
1
+ export interface GetUserData {
2
+ }
@@ -0,0 +1,3 @@
1
+ export interface GetUserInfo {
2
+ id: string;
3
+ }
@@ -0,0 +1,5 @@
1
+ export interface Invite {
2
+ roomId: string;
3
+ userIds?: string[];
4
+ roleIds?: string[];
5
+ }
@@ -0,0 +1,13 @@
1
+ export interface JoinRoom {
2
+ id: string;
3
+ /**
4
+ * Ids of the users to add to the room instead of joining it yourself.
5
+ * Requires the `AddMembers` permission.
6
+ */
7
+ userIds?: string[];
8
+ /**
9
+ * Ids of the roles whose members should be added to the room. The space default
10
+ * ("everyone") role is not supported. Requires the `AddMembers` permission.
11
+ */
12
+ roleIds?: string[];
13
+ }
@@ -0,0 +1,3 @@
1
+ export interface JoinSpace {
2
+ id: string;
3
+ }
@@ -0,0 +1,7 @@
1
+ import { ChatLocation } from "../ChatLocation";
2
+ export interface Kick {
3
+ userId: string;
4
+ location: ChatLocation;
5
+ reason: string;
6
+ notify: boolean;
7
+ }
@@ -0,0 +1,3 @@
1
+ export interface LeaveRoom {
2
+ id: string;
3
+ }
@@ -0,0 +1,3 @@
1
+ export interface LeaveSpace {
2
+ id: string;
3
+ }
@@ -0,0 +1,2 @@
1
+ export interface Ping {
2
+ }
@@ -0,0 +1,6 @@
1
+ import { ReactionType } from "../Reaction";
2
+ export interface React {
3
+ messageId: string;
4
+ type: ReactionType;
5
+ value: string;
6
+ }
@@ -0,0 +1,3 @@
1
+ export interface RedactMessages {
2
+ messageId: string;
3
+ }
@@ -0,0 +1,9 @@
1
+ type AbuseCategory = 'SpamOrScam' | 'HarassmentOrBullying' | 'HateSpeechOrExtremism' | 'ThreatsOrViolence' | 'SelfHarmOrSuicide' | 'SexualContent' | 'SexualExploitationOfMinors' | 'ChildSafety' | 'NonConsensualIntimateContent' | 'PrivacyViolation' | 'Impersonation' | 'IllegalGoodsOrServices' | 'RegulatedGoodsOrServices' | 'AccountSecurity' | 'IntellectualProperty' | 'Misinformation';
2
+ type ReportTarget = 'Profile' | 'Message';
3
+ export interface ReportAbuse {
4
+ category: AbuseCategory;
5
+ target: ReportTarget;
6
+ userId?: string;
7
+ messageId?: string;
8
+ }
9
+ export {};
@@ -0,0 +1,18 @@
1
+ /** `YYYY-MM-DD` in the `timezone` of the command. */
2
+ export type SearchDate = string;
3
+ export interface SearchMessages {
4
+ /** Plain text, without modifiers - filters are the fields below. */
5
+ query?: string;
6
+ spaceId?: string | null;
7
+ /** Defaults to true. */
8
+ privateMessages?: boolean;
9
+ from?: string[];
10
+ in?: string[];
11
+ before?: SearchDate[];
12
+ after?: SearchDate[];
13
+ during?: SearchDate[];
14
+ hasFile?: boolean;
15
+ /** Defaults to `UTC`. */
16
+ timezone?: string;
17
+ cursor?: string | null;
18
+ }
@@ -0,0 +1 @@
1
+ export type SetClientData = Record<string, any>;
@@ -0,0 +1,8 @@
1
+ import { PermissionOverwritesValue } from "../PermissionOverwritesValue";
2
+ import { ChatLocation } from "../ChatLocation";
3
+ import { PermissionOverwritesTarget } from "../PermissionOverwritesTarget";
4
+ export interface SetPermissionOverwrites {
5
+ location: ChatLocation;
6
+ target: PermissionOverwritesTarget;
7
+ overwrites: PermissionOverwritesValue;
8
+ }
@@ -0,0 +1,17 @@
1
+ import { SessionPlatform } from "../SessionData";
2
+ export interface SessionPush {
3
+ token?: string;
4
+ active?: boolean;
5
+ /**
6
+ * @deprecated The platform describes the session, not its push registration.
7
+ * Use {@link SetSessionData.platform} (or the `platform` connection query
8
+ * parameter). Still accepted by the server, but the top-level field wins.
9
+ */
10
+ platform?: SessionPlatform;
11
+ }
12
+ export interface SetSessionData {
13
+ clientFocused?: boolean;
14
+ push?: SessionPush;
15
+ /** Client platform of this session; null leaves the stored value unchanged. */
16
+ platform?: SessionPlatform;
17
+ }
@@ -0,0 +1,6 @@
1
+ import { PrivateMessagePolicy } from "../UserData";
2
+ export interface SetUserData {
3
+ privateMessagePolicy?: PrivateMessagePolicy;
4
+ showAsyncPresence?: boolean;
5
+ language?: string;
6
+ }
@@ -0,0 +1,3 @@
1
+ export interface Unban {
2
+ id: string;
3
+ }
@@ -0,0 +1,4 @@
1
+ import { ChatLocation } from "../ChatLocation";
2
+ export interface UnfollowTopic {
3
+ location: ChatLocation;
4
+ }
@@ -0,0 +1,5 @@
1
+ export interface Uninvite {
2
+ roomId: string;
3
+ userIds?: string[];
4
+ roleIds?: string[];
5
+ }
@@ -0,0 +1,6 @@
1
+ import { ReactionType } from "../Reaction";
2
+ export interface Unreact {
3
+ messageId: string;
4
+ type: ReactionType;
5
+ value: string;
6
+ }
@@ -0,0 +1,6 @@
1
+ import { ChatLocation } from "../ChatLocation";
2
+ import { NotificationLevel } from "../FollowedTopic";
3
+ export interface UpdateFollowedTopic {
4
+ location: ChatLocation;
5
+ notificationLevel?: NotificationLevel;
6
+ }
@@ -0,0 +1,8 @@
1
+ export interface UpdateRole {
2
+ spaceId: string;
3
+ id: string;
4
+ priority?: number;
5
+ name?: string;
6
+ color?: string;
7
+ flags?: number;
8
+ }
@@ -0,0 +1,10 @@
1
+ import { RoomStream } from "../RoomStream";
2
+ import { RoomHistory } from "../RoomHistory";
3
+ export interface UpdateRoom {
4
+ id: string;
5
+ name?: string;
6
+ description?: string;
7
+ flags?: number;
8
+ stream?: RoomStream | null;
9
+ history?: RoomHistory;
10
+ }
@@ -0,0 +1,8 @@
1
+ export interface UpdateRoomMember {
2
+ roomId: string;
3
+ userId: string;
4
+ customNick?: string | null;
5
+ customColor?: string | null;
6
+ customAvatar?: string | null;
7
+ extras?: string | null;
8
+ }
@@ -0,0 +1,12 @@
1
+ import { SpaceDiscoverable } from "../Space";
2
+ export interface UpdateSpace {
3
+ id: string;
4
+ name?: string;
5
+ description?: string;
6
+ systemRoom?: string | null;
7
+ defaultRooms?: string[];
8
+ icon?: string | null;
9
+ banner?: string | null;
10
+ discoverable?: SpaceDiscoverable;
11
+ flags?: number;
12
+ }
@@ -0,0 +1,6 @@
1
+ export interface UpdateSpaceMember {
2
+ spaceId: string;
3
+ userId: string;
4
+ customNick?: string | null;
5
+ customAvatar?: string | null;
6
+ }
@@ -0,0 +1,5 @@
1
+ import { ChatLocation } from "../ChatLocation";
2
+ export interface UpdateTopic {
3
+ location: ChatLocation;
4
+ name?: string;
5
+ }
@@ -0,0 +1,14 @@
1
+ import { TicketAudience } from "../commands/CreateAccessTicket";
2
+ /**
3
+ * A signed ticket to send as a bearer token to the service named by {@link audience}. It is
4
+ * valid for a couple of minutes only, so ask for it right before the request.
5
+ */
6
+ export interface AccessTicket {
7
+ id: string;
8
+ token: string;
9
+ audience: TicketAudience;
10
+ /** Resource the ticket covers: `space:<id>` or `user:<id>`. */
11
+ scope: string;
12
+ permissions: string[];
13
+ expiresAt: string;
14
+ }
@@ -0,0 +1,6 @@
1
+ import { ChatLocation } from "../ChatLocation";
2
+ import { BanObject } from "../BanObject";
3
+ export interface Bans {
4
+ location: ChatLocation;
5
+ bans: BanObject[];
6
+ }
@@ -0,0 +1,4 @@
1
+ import { LeaveReason } from "../LeaveReason";
2
+ export interface Bye {
3
+ reason: LeaveReason;
4
+ }
@@ -0,0 +1 @@
1
+ export type ClientData = Record<string, any>;
@@ -0,0 +1,9 @@
1
+ import { ChatLocation } from "../ChatLocation";
2
+ export interface ComputedPermissions {
3
+ permissions: number;
4
+ location: ChatLocation;
5
+ /**
6
+ * The user the permissions were computed for.
7
+ */
8
+ userId: string;
9
+ }
@@ -0,0 +1,4 @@
1
+ import { SpaceSummary } from "../SpaceSummary";
2
+ export interface DiscoverableSpaces {
3
+ summaries: SpaceSummary[];
4
+ }
@@ -0,0 +1,4 @@
1
+ export interface EmoticonDeleted {
2
+ emoticonId: string;
3
+ spaceId?: string;
4
+ }
@@ -0,0 +1,6 @@
1
+ import { Emoticon } from "../Emoticon";
2
+ import { ChatLocation } from "../ChatLocation";
3
+ export interface Emoticons {
4
+ emoticons: Emoticon[];
5
+ location: ChatLocation;
6
+ }
@@ -0,0 +1,11 @@
1
+ import { EntitlementsSubject } from "../Entitlements";
2
+ /**
3
+ * A limit of the package is running out (80%) or is used up (100%). Only the owners of the space
4
+ * are told, because only they can raise the package.
5
+ */
6
+ export interface EntitlementUsage {
7
+ subject: EntitlementsSubject;
8
+ feature: string;
9
+ usage: number;
10
+ limit: number;
11
+ }
@@ -0,0 +1,12 @@
1
+ import { EntitlementsExtras, EntitlementsMap, EntitlementsSubject } from "../Entitlements";
2
+ /**
3
+ * Sent in response to `GetEntitlements` and pushed whenever the package of the subject changes -
4
+ * to every member of the space, or to every session of the user. `extras` is filled in only for
5
+ * the answer to the command: usage changes with every file, so it is asked for when it is needed.
6
+ */
7
+ export interface Entitlements {
8
+ subject: EntitlementsSubject;
9
+ planCode: string;
10
+ entitlements: EntitlementsMap;
11
+ extras?: EntitlementsExtras | null;
12
+ }
@@ -0,0 +1,14 @@
1
+ export interface Error {
2
+ code: string;
3
+ message: string;
4
+ }
5
+ export declare enum ErrorCode {
6
+ Authentication = "AuthenticationException",
7
+ CommandRateLimitExceeded = "CommandRateLimitExceededException",
8
+ InvalidSearchQuery = "InvalidSearchQueryException",
9
+ MessageSearchUnavailable = "MessageSearchUnavailableException",
10
+ MessageNotFound = "MessageNotFoundException",
11
+ RoomNotFound = "RoomNotFoundException",
12
+ TopicNotFound = "TopicNotFoundException",
13
+ UserNotFound = "UserNotFoundException"
14
+ }
@@ -0,0 +1,4 @@
1
+ import { FollowedTopic } from "../FollowedTopic";
2
+ export interface FollowedTopicUpdated {
3
+ followedTopic: FollowedTopic;
4
+ }