polfan-server-js-client 0.1.6 → 0.1.7

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 (251) hide show
  1. package/.idea/vcs.xml +1 -0
  2. package/build/index.js +26 -9
  3. package/build/index.js.map +1 -1
  4. package/build/types/state-tracker/MessagesManager.d.ts +1 -1
  5. package/build/types/types/dist/index.d.ts +1 -0
  6. package/build/types/types/dist/schemes/AckReport.d.ts +1 -0
  7. package/build/types/types/dist/schemes/ChatLocation.d.ts +1 -0
  8. package/build/types/types/dist/schemes/Envelope.d.ts +1 -0
  9. package/build/types/types/dist/schemes/Message.d.ts +1 -0
  10. package/build/types/types/dist/schemes/PermissionOverwritesValue.d.ts +1 -0
  11. package/build/types/types/dist/schemes/Role.d.ts +1 -0
  12. package/build/types/types/dist/schemes/Room.d.ts +1 -0
  13. package/build/types/types/dist/schemes/RoomMember.d.ts +1 -0
  14. package/build/types/types/dist/schemes/RoomSummary.d.ts +1 -0
  15. package/build/types/types/dist/schemes/Space.d.ts +1 -0
  16. package/build/types/types/dist/schemes/SpaceMember.d.ts +1 -0
  17. package/build/types/types/dist/schemes/Topic.d.ts +1 -0
  18. package/build/types/types/dist/schemes/User.d.ts +1 -0
  19. package/build/types/types/dist/schemes/UserState.d.ts +1 -0
  20. package/build/types/types/dist/schemes/commands/Ack.d.ts +1 -0
  21. package/build/types/types/dist/schemes/commands/AssignRole.d.ts +1 -0
  22. package/build/types/types/dist/schemes/commands/CreateMessage.d.ts +1 -0
  23. package/build/types/types/dist/schemes/commands/CreateOwner.d.ts +1 -0
  24. package/build/types/types/dist/schemes/commands/CreateRole.d.ts +1 -0
  25. package/build/types/types/dist/schemes/commands/CreateRoom.d.ts +1 -0
  26. package/build/types/types/dist/schemes/commands/CreateSpace.d.ts +1 -0
  27. package/build/types/types/dist/schemes/commands/CreateTopic.d.ts +1 -0
  28. package/build/types/types/dist/schemes/commands/DeassignRole.d.ts +1 -0
  29. package/build/types/types/dist/schemes/commands/DeleteOwner.d.ts +1 -0
  30. package/build/types/types/dist/schemes/commands/DeleteRole.d.ts +1 -0
  31. package/build/types/types/dist/schemes/commands/DeleteRoom.d.ts +1 -0
  32. package/build/types/types/dist/schemes/commands/DeleteSpace.d.ts +1 -0
  33. package/build/types/types/dist/schemes/commands/DeleteTopic.d.ts +1 -0
  34. package/build/types/types/dist/schemes/commands/GetAckReports.d.ts +1 -0
  35. package/build/types/types/dist/schemes/commands/GetComputedPermissions.d.ts +1 -0
  36. package/build/types/types/dist/schemes/commands/GetOwners.d.ts +1 -0
  37. package/build/types/types/dist/schemes/commands/GetPermissionOverwriteTargets.d.ts +1 -0
  38. package/build/types/types/dist/schemes/commands/GetPermissionOverwrites.d.ts +1 -0
  39. package/build/types/types/dist/schemes/commands/GetRoomMembers.d.ts +1 -0
  40. package/build/types/types/dist/schemes/commands/GetSession.d.ts +1 -0
  41. package/build/types/types/dist/schemes/commands/GetSpaceMembers.d.ts +1 -0
  42. package/build/types/types/dist/schemes/commands/GetSpaceRooms.d.ts +1 -0
  43. package/build/types/types/dist/schemes/commands/JoinRoom.d.ts +1 -0
  44. package/build/types/types/dist/schemes/commands/JoinSpace.d.ts +1 -0
  45. package/build/types/types/dist/schemes/commands/LeaveRoom.d.ts +1 -0
  46. package/build/types/types/dist/schemes/commands/LeaveSpace.d.ts +1 -0
  47. package/build/types/types/dist/schemes/commands/SetPermissionOverwrites.d.ts +1 -0
  48. package/build/types/types/dist/schemes/commands/UpdateRole.d.ts +1 -0
  49. package/build/types/types/dist/schemes/commands/UpdateRoom.d.ts +1 -0
  50. package/build/types/types/dist/schemes/commands/UpdateSpace.d.ts +1 -0
  51. package/build/types/types/dist/schemes/events/AckReports.d.ts +1 -0
  52. package/build/types/types/dist/schemes/events/Bye.d.ts +1 -0
  53. package/build/types/types/dist/schemes/events/ComputedPermissions.d.ts +1 -0
  54. package/build/types/types/dist/schemes/events/Error.d.ts +1 -0
  55. package/build/types/types/dist/schemes/events/NewMessage.d.ts +1 -0
  56. package/build/types/types/dist/schemes/events/NewRole.d.ts +1 -0
  57. package/build/types/types/dist/schemes/events/NewRoom.d.ts +1 -0
  58. package/build/types/types/dist/schemes/events/NewTopic.d.ts +1 -0
  59. package/build/types/types/dist/schemes/events/Ok.d.ts +1 -0
  60. package/build/types/types/dist/schemes/events/Owners.d.ts +1 -0
  61. package/build/types/types/dist/schemes/events/PermissionOverwriteTargets.d.ts +1 -0
  62. package/build/types/types/dist/schemes/events/PermissionOverwrites.d.ts +1 -0
  63. package/build/types/types/dist/schemes/events/PermissionOverwritesUpdated.d.ts +1 -0
  64. package/build/types/types/dist/schemes/events/RoleDeleted.d.ts +1 -0
  65. package/build/types/types/dist/schemes/events/RoleUpdated.d.ts +1 -0
  66. package/build/types/types/dist/schemes/events/RoomDeleted.d.ts +1 -0
  67. package/build/types/types/dist/schemes/events/RoomJoined.d.ts +1 -0
  68. package/build/types/types/dist/schemes/events/RoomLeft.d.ts +1 -0
  69. package/build/types/types/dist/schemes/events/RoomMemberJoined.d.ts +1 -0
  70. package/build/types/types/dist/schemes/events/RoomMemberLeft.d.ts +1 -0
  71. package/build/types/types/dist/schemes/events/RoomMemberUpdated.d.ts +1 -0
  72. package/build/types/types/dist/schemes/events/RoomMembers.d.ts +1 -0
  73. package/build/types/types/dist/schemes/events/RoomUpdated.d.ts +1 -0
  74. package/build/types/types/dist/schemes/events/Session.d.ts +1 -0
  75. package/build/types/types/dist/schemes/events/SpaceDeleted.d.ts +1 -0
  76. package/build/types/types/dist/schemes/events/SpaceJoined.d.ts +1 -0
  77. package/build/types/types/dist/schemes/events/SpaceLeft.d.ts +1 -0
  78. package/build/types/types/dist/schemes/events/SpaceMemberJoined.d.ts +1 -0
  79. package/build/types/types/dist/schemes/events/SpaceMemberLeft.d.ts +1 -0
  80. package/build/types/types/dist/schemes/events/SpaceMemberUpdated.d.ts +1 -0
  81. package/build/types/types/dist/schemes/events/SpaceMembers.d.ts +1 -0
  82. package/build/types/types/dist/schemes/events/SpaceRooms.d.ts +1 -0
  83. package/build/types/types/dist/schemes/events/SpaceUpdated.d.ts +1 -0
  84. package/build/types/types/dist/schemes/events/TopicDeleted.d.ts +1 -0
  85. package/build/types/types/dist/schemes/events/UserUpdated.d.ts +1 -0
  86. package/build/types/types/src/schemes/Topic.d.ts +5 -1
  87. package/package.json +1 -1
  88. package/src/state-tracker/MessagesManager.ts +20 -6
  89. package/src/types/dist/index.d.ts +82 -0
  90. package/src/types/dist/index.js +2 -0
  91. package/src/types/dist/schemes/AckReport.d.ts +7 -0
  92. package/src/types/dist/schemes/AckReport.js +2 -0
  93. package/src/types/dist/schemes/ChatLocation.d.ts +5 -0
  94. package/src/types/dist/schemes/ChatLocation.js +2 -0
  95. package/src/types/dist/schemes/Envelope.d.ts +5 -0
  96. package/src/types/dist/schemes/Envelope.js +2 -0
  97. package/src/types/dist/schemes/Message.d.ts +7 -0
  98. package/src/types/dist/schemes/Message.js +2 -0
  99. package/src/types/dist/schemes/PermissionOverwritesValue.d.ts +4 -0
  100. package/src/types/dist/schemes/PermissionOverwritesValue.js +2 -0
  101. package/src/types/dist/schemes/Role.d.ts +6 -0
  102. package/src/types/dist/schemes/Role.js +2 -0
  103. package/src/types/dist/schemes/Room.d.ts +10 -0
  104. package/src/types/dist/schemes/Room.js +2 -0
  105. package/src/types/dist/schemes/RoomMember.d.ts +7 -0
  106. package/src/types/dist/schemes/RoomMember.js +2 -0
  107. package/src/types/dist/schemes/RoomSummary.d.ts +5 -0
  108. package/src/types/dist/schemes/RoomSummary.js +2 -0
  109. package/src/types/dist/schemes/Space.d.ts +6 -0
  110. package/src/types/dist/schemes/Space.js +2 -0
  111. package/src/types/dist/schemes/SpaceMember.d.ts +5 -0
  112. package/src/types/dist/schemes/SpaceMember.js +2 -0
  113. package/src/types/dist/schemes/Topic.d.ts +9 -0
  114. package/src/types/dist/schemes/Topic.js +2 -0
  115. package/src/types/dist/schemes/User.d.ts +8 -0
  116. package/src/types/dist/schemes/User.js +2 -0
  117. package/src/types/dist/schemes/UserState.d.ts +6 -0
  118. package/src/types/dist/schemes/UserState.js +2 -0
  119. package/src/types/dist/schemes/commands/Ack.d.ts +5 -0
  120. package/src/types/dist/schemes/commands/Ack.js +2 -0
  121. package/src/types/dist/schemes/commands/AssignRole.d.ts +6 -0
  122. package/src/types/dist/schemes/commands/AssignRole.js +2 -0
  123. package/src/types/dist/schemes/commands/CreateMessage.d.ts +5 -0
  124. package/src/types/dist/schemes/commands/CreateMessage.js +2 -0
  125. package/src/types/dist/schemes/commands/CreateOwner.d.ts +5 -0
  126. package/src/types/dist/schemes/commands/CreateOwner.js +2 -0
  127. package/src/types/dist/schemes/commands/CreateRole.d.ts +5 -0
  128. package/src/types/dist/schemes/commands/CreateRole.js +2 -0
  129. package/src/types/dist/schemes/commands/CreateRoom.d.ts +7 -0
  130. package/src/types/dist/schemes/commands/CreateRoom.js +2 -0
  131. package/src/types/dist/schemes/commands/CreateSpace.d.ts +3 -0
  132. package/src/types/dist/schemes/commands/CreateSpace.js +2 -0
  133. package/src/types/dist/schemes/commands/CreateTopic.d.ts +12 -0
  134. package/src/types/dist/schemes/commands/CreateTopic.js +2 -0
  135. package/src/types/dist/schemes/commands/DeassignRole.d.ts +6 -0
  136. package/src/types/dist/schemes/commands/DeassignRole.js +2 -0
  137. package/src/types/dist/schemes/commands/DeleteOwner.d.ts +5 -0
  138. package/src/types/dist/schemes/commands/DeleteOwner.js +2 -0
  139. package/src/types/dist/schemes/commands/DeleteRole.d.ts +4 -0
  140. package/src/types/dist/schemes/commands/DeleteRole.js +2 -0
  141. package/src/types/dist/schemes/commands/DeleteRoom.d.ts +3 -0
  142. package/src/types/dist/schemes/commands/DeleteRoom.js +2 -0
  143. package/src/types/dist/schemes/commands/DeleteSpace.d.ts +3 -0
  144. package/src/types/dist/schemes/commands/DeleteSpace.js +2 -0
  145. package/src/types/dist/schemes/commands/DeleteTopic.d.ts +4 -0
  146. package/src/types/dist/schemes/commands/DeleteTopic.js +2 -0
  147. package/src/types/dist/schemes/commands/GetAckReports.d.ts +4 -0
  148. package/src/types/dist/schemes/commands/GetAckReports.js +2 -0
  149. package/src/types/dist/schemes/commands/GetComputedPermissions.d.ts +4 -0
  150. package/src/types/dist/schemes/commands/GetComputedPermissions.js +2 -0
  151. package/src/types/dist/schemes/commands/GetOwners.d.ts +4 -0
  152. package/src/types/dist/schemes/commands/GetOwners.js +2 -0
  153. package/src/types/dist/schemes/commands/GetPermissionOverwriteTargets.d.ts +4 -0
  154. package/src/types/dist/schemes/commands/GetPermissionOverwriteTargets.js +2 -0
  155. package/src/types/dist/schemes/commands/GetPermissionOverwrites.d.ts +6 -0
  156. package/src/types/dist/schemes/commands/GetPermissionOverwrites.js +2 -0
  157. package/src/types/dist/schemes/commands/GetRoomMembers.d.ts +3 -0
  158. package/src/types/dist/schemes/commands/GetRoomMembers.js +2 -0
  159. package/src/types/dist/schemes/commands/GetSession.d.ts +2 -0
  160. package/src/types/dist/schemes/commands/GetSession.js +2 -0
  161. package/src/types/dist/schemes/commands/GetSpaceMembers.d.ts +3 -0
  162. package/src/types/dist/schemes/commands/GetSpaceMembers.js +2 -0
  163. package/src/types/dist/schemes/commands/GetSpaceRooms.d.ts +3 -0
  164. package/src/types/dist/schemes/commands/GetSpaceRooms.js +2 -0
  165. package/src/types/dist/schemes/commands/JoinRoom.d.ts +3 -0
  166. package/src/types/dist/schemes/commands/JoinRoom.js +2 -0
  167. package/src/types/dist/schemes/commands/JoinSpace.d.ts +3 -0
  168. package/src/types/dist/schemes/commands/JoinSpace.js +2 -0
  169. package/src/types/dist/schemes/commands/LeaveRoom.d.ts +3 -0
  170. package/src/types/dist/schemes/commands/LeaveRoom.js +2 -0
  171. package/src/types/dist/schemes/commands/LeaveSpace.d.ts +3 -0
  172. package/src/types/dist/schemes/commands/LeaveSpace.js +2 -0
  173. package/src/types/dist/schemes/commands/SetPermissionOverwrites.d.ts +8 -0
  174. package/src/types/dist/schemes/commands/SetPermissionOverwrites.js +2 -0
  175. package/src/types/dist/schemes/commands/UpdateRole.d.ts +7 -0
  176. package/src/types/dist/schemes/commands/UpdateRole.js +2 -0
  177. package/src/types/dist/schemes/commands/UpdateRoom.d.ts +5 -0
  178. package/src/types/dist/schemes/commands/UpdateRoom.js +2 -0
  179. package/src/types/dist/schemes/commands/UpdateSpace.d.ts +4 -0
  180. package/src/types/dist/schemes/commands/UpdateSpace.js +2 -0
  181. package/src/types/dist/schemes/events/AckReports.d.ts +4 -0
  182. package/src/types/dist/schemes/events/AckReports.js +2 -0
  183. package/src/types/dist/schemes/events/Bye.d.ts +3 -0
  184. package/src/types/dist/schemes/events/Bye.js +2 -0
  185. package/src/types/dist/schemes/events/ComputedPermissions.d.ts +5 -0
  186. package/src/types/dist/schemes/events/ComputedPermissions.js +2 -0
  187. package/src/types/dist/schemes/events/Error.d.ts +4 -0
  188. package/src/types/dist/schemes/events/Error.js +2 -0
  189. package/src/types/dist/schemes/events/NewMessage.d.ts +6 -0
  190. package/src/types/dist/schemes/events/NewMessage.js +2 -0
  191. package/src/types/dist/schemes/events/NewRole.d.ts +5 -0
  192. package/src/types/dist/schemes/events/NewRole.js +2 -0
  193. package/src/types/dist/schemes/events/NewRoom.d.ts +5 -0
  194. package/src/types/dist/schemes/events/NewRoom.js +2 -0
  195. package/src/types/dist/schemes/events/NewTopic.d.ts +5 -0
  196. package/src/types/dist/schemes/events/NewTopic.js +2 -0
  197. package/src/types/dist/schemes/events/Ok.d.ts +2 -0
  198. package/src/types/dist/schemes/events/Ok.js +2 -0
  199. package/src/types/dist/schemes/events/Owners.d.ts +8 -0
  200. package/src/types/dist/schemes/events/Owners.js +2 -0
  201. package/src/types/dist/schemes/events/PermissionOverwriteTargets.d.ts +10 -0
  202. package/src/types/dist/schemes/events/PermissionOverwriteTargets.js +2 -0
  203. package/src/types/dist/schemes/events/PermissionOverwrites.d.ts +8 -0
  204. package/src/types/dist/schemes/events/PermissionOverwrites.js +2 -0
  205. package/src/types/dist/schemes/events/PermissionOverwritesUpdated.d.ts +8 -0
  206. package/src/types/dist/schemes/events/PermissionOverwritesUpdated.js +2 -0
  207. package/src/types/dist/schemes/events/RoleDeleted.d.ts +4 -0
  208. package/src/types/dist/schemes/events/RoleDeleted.js +2 -0
  209. package/src/types/dist/schemes/events/RoleUpdated.d.ts +5 -0
  210. package/src/types/dist/schemes/events/RoleUpdated.js +2 -0
  211. package/src/types/dist/schemes/events/RoomDeleted.d.ts +3 -0
  212. package/src/types/dist/schemes/events/RoomDeleted.js +2 -0
  213. package/src/types/dist/schemes/events/RoomJoined.d.ts +4 -0
  214. package/src/types/dist/schemes/events/RoomJoined.js +2 -0
  215. package/src/types/dist/schemes/events/RoomLeft.d.ts +3 -0
  216. package/src/types/dist/schemes/events/RoomLeft.js +2 -0
  217. package/src/types/dist/schemes/events/RoomMemberJoined.d.ts +5 -0
  218. package/src/types/dist/schemes/events/RoomMemberJoined.js +2 -0
  219. package/src/types/dist/schemes/events/RoomMemberLeft.d.ts +4 -0
  220. package/src/types/dist/schemes/events/RoomMemberLeft.js +2 -0
  221. package/src/types/dist/schemes/events/RoomMemberUpdated.d.ts +6 -0
  222. package/src/types/dist/schemes/events/RoomMemberUpdated.js +2 -0
  223. package/src/types/dist/schemes/events/RoomMembers.d.ts +5 -0
  224. package/src/types/dist/schemes/events/RoomMembers.js +2 -0
  225. package/src/types/dist/schemes/events/RoomUpdated.d.ts +4 -0
  226. package/src/types/dist/schemes/events/RoomUpdated.js +2 -0
  227. package/src/types/dist/schemes/events/Session.d.ts +7 -0
  228. package/src/types/dist/schemes/events/Session.js +2 -0
  229. package/src/types/dist/schemes/events/SpaceDeleted.d.ts +3 -0
  230. package/src/types/dist/schemes/events/SpaceDeleted.js +2 -0
  231. package/src/types/dist/schemes/events/SpaceJoined.d.ts +4 -0
  232. package/src/types/dist/schemes/events/SpaceJoined.js +2 -0
  233. package/src/types/dist/schemes/events/SpaceLeft.d.ts +3 -0
  234. package/src/types/dist/schemes/events/SpaceLeft.js +2 -0
  235. package/src/types/dist/schemes/events/SpaceMemberJoined.d.ts +5 -0
  236. package/src/types/dist/schemes/events/SpaceMemberJoined.js +2 -0
  237. package/src/types/dist/schemes/events/SpaceMemberLeft.d.ts +4 -0
  238. package/src/types/dist/schemes/events/SpaceMemberLeft.js +2 -0
  239. package/src/types/dist/schemes/events/SpaceMemberUpdated.d.ts +6 -0
  240. package/src/types/dist/schemes/events/SpaceMemberUpdated.js +2 -0
  241. package/src/types/dist/schemes/events/SpaceMembers.d.ts +5 -0
  242. package/src/types/dist/schemes/events/SpaceMembers.js +2 -0
  243. package/src/types/dist/schemes/events/SpaceRooms.d.ts +5 -0
  244. package/src/types/dist/schemes/events/SpaceRooms.js +2 -0
  245. package/src/types/dist/schemes/events/SpaceUpdated.d.ts +4 -0
  246. package/src/types/dist/schemes/events/SpaceUpdated.js +2 -0
  247. package/src/types/dist/schemes/events/TopicDeleted.d.ts +4 -0
  248. package/src/types/dist/schemes/events/TopicDeleted.js +2 -0
  249. package/src/types/dist/schemes/events/UserUpdated.d.ts +4 -0
  250. package/src/types/dist/schemes/events/UserUpdated.js +2 -0
  251. package/src/types/src/schemes/Topic.ts +6 -1
@@ -31,7 +31,7 @@ export declare class MessagesManager {
31
31
  * For internal use. If you want to add new topic, execute a proper command on client object.
32
32
  * @internal
33
33
  */
34
- _handleNewTopics(roomId: string, ...topics: Topic[]): void;
34
+ _handleNewTopics(roomId: string, ...newTopics: Topic[]): void;
35
35
  private handleNewMessage;
36
36
  private handleAckReports;
37
37
  private createAckReportsForNewTopics;
@@ -0,0 +1 @@
1
+ export const __esModule: boolean;
@@ -0,0 +1 @@
1
+ export const __esModule: boolean;
@@ -0,0 +1 @@
1
+ export const __esModule: boolean;
@@ -0,0 +1 @@
1
+ export const __esModule: boolean;
@@ -0,0 +1 @@
1
+ export const __esModule: boolean;
@@ -0,0 +1 @@
1
+ export const __esModule: boolean;
@@ -0,0 +1 @@
1
+ export const __esModule: boolean;
@@ -0,0 +1 @@
1
+ export const __esModule: boolean;
@@ -0,0 +1 @@
1
+ export const __esModule: boolean;
@@ -0,0 +1 @@
1
+ export const __esModule: boolean;
@@ -0,0 +1 @@
1
+ export const __esModule: boolean;
@@ -0,0 +1 @@
1
+ export const __esModule: boolean;
@@ -0,0 +1 @@
1
+ export const __esModule: boolean;
@@ -0,0 +1 @@
1
+ export const __esModule: boolean;
@@ -0,0 +1 @@
1
+ export const __esModule: boolean;
@@ -0,0 +1 @@
1
+ export const __esModule: boolean;
@@ -0,0 +1 @@
1
+ export const __esModule: boolean;
@@ -0,0 +1 @@
1
+ export const __esModule: boolean;
@@ -0,0 +1 @@
1
+ export const __esModule: boolean;
@@ -0,0 +1 @@
1
+ export const __esModule: boolean;
@@ -0,0 +1 @@
1
+ export const __esModule: boolean;
@@ -0,0 +1 @@
1
+ export const __esModule: boolean;
@@ -0,0 +1 @@
1
+ export const __esModule: boolean;
@@ -0,0 +1 @@
1
+ export const __esModule: boolean;
@@ -0,0 +1 @@
1
+ export const __esModule: boolean;
@@ -0,0 +1 @@
1
+ export const __esModule: boolean;
@@ -0,0 +1 @@
1
+ export const __esModule: boolean;
@@ -0,0 +1 @@
1
+ export const __esModule: boolean;
@@ -0,0 +1 @@
1
+ export const __esModule: boolean;
@@ -0,0 +1 @@
1
+ export const __esModule: boolean;
@@ -0,0 +1 @@
1
+ export const __esModule: boolean;
@@ -0,0 +1 @@
1
+ export const __esModule: boolean;
@@ -0,0 +1 @@
1
+ export const __esModule: boolean;
@@ -0,0 +1 @@
1
+ export const __esModule: boolean;
@@ -0,0 +1 @@
1
+ export const __esModule: boolean;
@@ -0,0 +1 @@
1
+ export const __esModule: boolean;
@@ -0,0 +1 @@
1
+ export const __esModule: boolean;
@@ -0,0 +1 @@
1
+ export const __esModule: boolean;
@@ -0,0 +1 @@
1
+ export const __esModule: boolean;
@@ -0,0 +1 @@
1
+ export const __esModule: boolean;
@@ -0,0 +1 @@
1
+ export const __esModule: boolean;
@@ -0,0 +1 @@
1
+ export const __esModule: boolean;
@@ -0,0 +1 @@
1
+ export const __esModule: boolean;
@@ -0,0 +1 @@
1
+ export const __esModule: boolean;
@@ -0,0 +1 @@
1
+ export const __esModule: boolean;
@@ -0,0 +1 @@
1
+ export const __esModule: boolean;
@@ -0,0 +1 @@
1
+ export const __esModule: boolean;
@@ -0,0 +1 @@
1
+ export const __esModule: boolean;
@@ -0,0 +1 @@
1
+ export const __esModule: boolean;
@@ -0,0 +1 @@
1
+ export const __esModule: boolean;
@@ -0,0 +1 @@
1
+ export const __esModule: boolean;
@@ -0,0 +1 @@
1
+ export const __esModule: boolean;
@@ -0,0 +1 @@
1
+ export const __esModule: boolean;
@@ -0,0 +1 @@
1
+ export const __esModule: boolean;
@@ -0,0 +1 @@
1
+ export const __esModule: boolean;
@@ -0,0 +1 @@
1
+ export const __esModule: boolean;
@@ -0,0 +1 @@
1
+ export const __esModule: boolean;
@@ -0,0 +1 @@
1
+ export const __esModule: boolean;
@@ -0,0 +1 @@
1
+ export const __esModule: boolean;
@@ -0,0 +1 @@
1
+ export const __esModule: boolean;
@@ -0,0 +1 @@
1
+ export const __esModule: boolean;
@@ -0,0 +1 @@
1
+ export const __esModule: boolean;
@@ -0,0 +1 @@
1
+ export const __esModule: boolean;
@@ -0,0 +1 @@
1
+ export const __esModule: boolean;
@@ -0,0 +1 @@
1
+ export const __esModule: boolean;
@@ -0,0 +1 @@
1
+ export const __esModule: boolean;
@@ -0,0 +1 @@
1
+ export const __esModule: boolean;
@@ -0,0 +1 @@
1
+ export const __esModule: boolean;
@@ -0,0 +1 @@
1
+ export const __esModule: boolean;
@@ -0,0 +1 @@
1
+ export const __esModule: boolean;
@@ -0,0 +1 @@
1
+ export const __esModule: boolean;
@@ -0,0 +1 @@
1
+ export const __esModule: boolean;
@@ -0,0 +1 @@
1
+ export const __esModule: boolean;
@@ -0,0 +1 @@
1
+ export const __esModule: boolean;
@@ -0,0 +1 @@
1
+ export const __esModule: boolean;
@@ -0,0 +1 @@
1
+ export const __esModule: boolean;
@@ -0,0 +1 @@
1
+ export const __esModule: boolean;
@@ -0,0 +1 @@
1
+ export const __esModule: boolean;
@@ -0,0 +1 @@
1
+ export const __esModule: boolean;
@@ -0,0 +1 @@
1
+ export const __esModule: boolean;
@@ -0,0 +1 @@
1
+ export const __esModule: boolean;
@@ -1,5 +1,9 @@
1
+ import { MessageReference } from "./commands/CreateTopic";
2
+ import { Message } from "./Message";
1
3
  export interface Topic {
2
4
  id: string;
3
5
  name: string;
4
- description: string;
6
+ messageCount: number;
7
+ messageRef?: MessageReference;
8
+ lastMessage?: Message;
5
9
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "polfan-server-js-client",
3
- "version": "0.1.6",
3
+ "version": "0.1.7",
4
4
  "description": "JavaScript client library for handling communication with Polfan chat server.",
5
5
  "author": "Jarosław Żak",
6
6
  "license": "MIT",
@@ -89,12 +89,26 @@ export class MessagesManager {
89
89
  * For internal use. If you want to add new topic, execute a proper command on client object.
90
90
  * @internal
91
91
  */
92
- public _handleNewTopics(roomId: string, ...topics: Topic[]): void {
93
- this.list.set(...topics.map<[string, ObservableIndexedObjectCollection<Message>]>(topic => [
94
- getCombinedId({roomId, topicId: topic.id}),
95
- new ObservableIndexedObjectCollection<Message>('id'),
96
- ]));
97
- this.createAckReportsForNewTopics(roomId, topics);
92
+ public _handleNewTopics(roomId: string, ...newTopics: Topic[]):void {
93
+ for (const newTopic of newTopics) {
94
+ const newTopicCombinedId = getCombinedId({roomId, topicId: newTopic.id});
95
+
96
+ this.list.set([newTopicCombinedId, new ObservableIndexedObjectCollection<Message>('id')]);
97
+
98
+ // If new topic refers to some message from this room, update other structures
99
+ if (newTopic.messageRef) {
100
+ const refTopicCombinedId = getCombinedId({roomId, topicId: newTopic.messageRef.topicId});
101
+ const refTopicMessages = this.list.get(refTopicCombinedId);
102
+ const refMessage = refTopicMessages?.get(newTopic.messageRef.messageId);
103
+
104
+ if (refMessage) {
105
+ // Update referenced topic ID in message
106
+ refTopicMessages.set({...refMessage, topicRef: newTopic.id});
107
+ }
108
+ }
109
+ }
110
+
111
+ this.createAckReportsForNewTopics(roomId, newTopics);
98
112
  }
99
113
 
100
114
  private handleNewMessage(ev: NewMessage): void {
@@ -0,0 +1,82 @@
1
+ import { Envelope } from "./schemes/Envelope";
2
+ import { Message } from "./schemes/Message";
3
+ import { PermissionOverwritesValue } from "./schemes/PermissionOverwritesValue";
4
+ import { Role } from "./schemes/Role";
5
+ import { Room } from "./schemes/Room";
6
+ import { RoomMember } from "./schemes/RoomMember";
7
+ import { RoomSummary } from "./schemes/RoomSummary";
8
+ import { Space } from "./schemes/Space";
9
+ import { SpaceMember } from "./schemes/SpaceMember";
10
+ import { Topic } from "./schemes/Topic";
11
+ import { User } from "./schemes/User";
12
+ import { UserState } from "./schemes/UserState";
13
+ import { Bye } from "./schemes/events/Bye";
14
+ import { Error } 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 { RoomMemberJoined } from "./schemes/events/RoomMemberJoined";
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 } 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 { GetAckReports } from "./schemes/commands/GetAckReports";
65
+ import { Ack } from "./schemes/commands/Ack";
66
+ import { AckReports } from "./schemes/events/AckReports";
67
+ import { AckReport } from "./schemes/AckReport";
68
+ import { UserUpdated } from "./schemes/events/UserUpdated";
69
+ import { UpdateRoom } from "./schemes/commands/UpdateRoom";
70
+ import { UpdateSpace } from "./schemes/commands/UpdateSpace";
71
+ import { RoomUpdated } from "./schemes/events/RoomUpdated";
72
+ import { SpaceUpdated } from "./schemes/events/SpaceUpdated";
73
+ import { ChatLocation } from "./schemes/ChatLocation";
74
+ import { GetPermissionOverwriteTargets } from "./schemes/commands/GetPermissionOverwriteTargets";
75
+ import { PermissionOverwriteTargets } from "./schemes/events/PermissionOverwriteTargets";
76
+ import { CreateOwner } from "./schemes/commands/CreateOwner";
77
+ import { DeleteOwner } from "./schemes/commands/DeleteOwner";
78
+ import { GetOwners } from "./schemes/commands/GetOwners";
79
+ import { Owners } from "./schemes/events/Owners";
80
+ import { Ok } from "./schemes/events/Ok";
81
+ import { RoomType } from "./schemes/Room";
82
+ export { Envelope, Message, AckReport, Role, Room, RoomType, RoomMember, RoomSummary, Space, SpaceMember, Topic, User, UserState, PermissionOverwritesValue, ChatLocation, Bye, Error, NewMessage, AckReports, NewRole, NewRoom, NewTopic, ComputedPermissions, PermissionOverwrites, PermissionOverwritesUpdated, RoleDeleted, RoleUpdated, RoomDeleted, RoomUpdated, RoomJoined, RoomLeft, RoomMemberJoined, RoomMemberLeft, RoomMembers, RoomMemberUpdated, UserUpdated, Session, SpaceDeleted, SpaceUpdated, SpaceJoined, SpaceLeft, SpaceMemberJoined, SpaceMemberLeft, SpaceMembers, SpaceMemberUpdated, SpaceRooms, TopicDeleted, PermissionOverwriteTargets, Owners, Ok, AssignRole, CreateMessage, Ack, CreateRole, CreateRoom, CreateSpace, CreateTopic, DeassignRole, DeleteRole, DeleteRoom, DeleteSpace, DeleteTopic, SetPermissionOverwrites, GetPermissionOverwrites, GetComputedPermissions, GetRoomMembers, GetSession, GetSpaceMembers, GetSpaceRooms, GetAckReports, JoinRoom, JoinSpace, LeaveRoom, LeaveSpace, UpdateRole, UpdateSpace, UpdateRoom, GetPermissionOverwriteTargets, CreateOwner, DeleteOwner, GetOwners, };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,7 @@
1
+ export interface AckReport {
2
+ roomId: string;
3
+ topicId: string;
4
+ lastAckMessageId: string | null;
5
+ missed: number | null;
6
+ missedMoreThan: number | null;
7
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,5 @@
1
+ export interface ChatLocation {
2
+ spaceId?: string;
3
+ roomId?: string;
4
+ topicId?: string;
5
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,5 @@
1
+ export interface Envelope<T = any> {
2
+ type: string;
3
+ ref?: string;
4
+ data: T;
5
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,7 @@
1
+ import { User } from "./User";
2
+ export interface Message {
3
+ id: string;
4
+ author: User;
5
+ content: string;
6
+ topicRef: string | null;
7
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,4 @@
1
+ export interface PermissionOverwritesValue {
2
+ allow: number | null;
3
+ deny: number | null;
4
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,6 @@
1
+ export interface Role {
2
+ id: string;
3
+ priority: number;
4
+ name: string;
5
+ color?: string;
6
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,10 @@
1
+ import { Topic } from "./Topic";
2
+ export type RoomType = 'Text';
3
+ export interface Room {
4
+ id: string;
5
+ spaceId: string | null;
6
+ name: string;
7
+ description: string;
8
+ type: RoomType;
9
+ defaultTopic: Topic | null;
10
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,7 @@
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
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,5 @@
1
+ export interface RoomSummary {
2
+ id: string;
3
+ name: string;
4
+ description: string;
5
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,6 @@
1
+ import { Role } from "./Role";
2
+ export interface Space {
3
+ id: string;
4
+ name: string;
5
+ roles: Role[];
6
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,5 @@
1
+ import { User } from "./User";
2
+ export interface SpaceMember {
3
+ user: User | null;
4
+ roles: string[];
5
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,9 @@
1
+ import { MessageReference } from "./commands/CreateTopic";
2
+ import { Message } from "./Message";
3
+ export interface Topic {
4
+ id: string;
5
+ name: string;
6
+ messageCount: number;
7
+ messageRef?: MessageReference;
8
+ lastMessage?: Message;
9
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,8 @@
1
+ export type UserFlag = 'bot' | 'temp';
2
+ export interface User {
3
+ id: string;
4
+ nick: string;
5
+ avatar: string;
6
+ flags: UserFlag[];
7
+ online: boolean;
8
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,6 @@
1
+ import { Space } from "./Space";
2
+ import { Room } from "./Room";
3
+ export interface UserState {
4
+ spaces: Space[];
5
+ rooms: Room[];
6
+ }