polfan-server-js-client 0.3.0 → 0.3.1

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 (37) hide show
  1. package/.idea/workspace.xml +27 -17
  2. package/build/index.cjs.js +80 -52
  3. package/build/index.cjs.js.map +1 -1
  4. package/build/index.js +62 -62
  5. package/build/index.umd.js +1 -1
  6. package/build/index.umd.js.map +1 -1
  7. package/build/types/AbstractChatClient.d.ts +6 -2
  8. package/build/types/Permissions.d.ts +4 -0
  9. package/build/types/state-tracker/RoomsManager.d.ts +1 -1
  10. package/build/types/state-tracker/SpacesManager.d.ts +6 -0
  11. package/build/types/types/src/index.d.ts +6 -2
  12. package/build/types/types/src/schemes/Message.d.ts +1 -1
  13. package/build/types/types/src/schemes/RoomSummary.d.ts +1 -0
  14. package/build/types/types/src/schemes/commands/GetInvited.d.ts +3 -0
  15. package/build/types/types/src/schemes/commands/Invite.d.ts +5 -0
  16. package/build/types/types/src/schemes/commands/JoinRoom.d.ts +10 -0
  17. package/build/types/types/src/schemes/commands/Uninvite.d.ts +5 -0
  18. package/build/types/types/src/schemes/events/Invited.d.ts +10 -0
  19. package/build/types/types/src/schemes/events/RoomMembersJoined.d.ts +9 -0
  20. package/build/types/types/src/schemes/events/RoomSummaryUpdated.d.ts +2 -1
  21. package/package.json +1 -1
  22. package/src/AbstractChatClient.ts +10 -2
  23. package/src/Permissions.ts +1 -0
  24. package/src/state-tracker/RoomsManager.ts +4 -4
  25. package/src/state-tracker/SpacesManager.ts +10 -0
  26. package/src/state-tracker/UsersManager.ts +1 -1
  27. package/src/types/src/index.ts +10 -2
  28. package/src/types/src/schemes/Message.ts +1 -1
  29. package/src/types/src/schemes/RoomSummary.ts +2 -1
  30. package/src/types/src/schemes/commands/GetInvited.ts +3 -0
  31. package/src/types/src/schemes/commands/Invite.ts +5 -0
  32. package/src/types/src/schemes/commands/JoinRoom.ts +12 -0
  33. package/src/types/src/schemes/commands/Uninvite.ts +5 -0
  34. package/src/types/src/schemes/events/Invited.ts +13 -0
  35. package/src/types/src/schemes/events/RoomMembersJoined.ts +11 -0
  36. package/src/types/src/schemes/events/RoomSummaryUpdated.ts +3 -2
  37. package/src/types/src/schemes/events/RoomMemberJoined.ts +0 -6
package/build/index.js CHANGED
@@ -699,16 +699,16 @@ var TraversableRemoteCollection = /*#__PURE__*/function (_ObservableIndexedObj)
699
699
  TopicHistoryWindow_createClass(TraversableRemoteCollection, [{
700
700
  key: "state",
701
701
  get:
702
- /**
703
- * Current mode od collection window. To change mode, call one of available fetch methods.
702
+ /**
703
+ * Current mode od collection window. To change mode, call one of available fetch methods.
704
704
  */
705
705
  function get() {
706
706
  return this.currentState;
707
707
  }
708
708
 
709
- /**
710
- * Maximum numer of items stored in window.
711
- * Null for unlimited.
709
+ /**
710
+ * Maximum numer of items stored in window.
711
+ * Null for unlimited.
712
712
  */
713
713
  }, {
714
714
  key: "hasLatest",
@@ -927,8 +927,8 @@ var TraversableRemoteCollection = /*#__PURE__*/function (_ObservableIndexedObj)
927
927
  this.set.apply(this, TopicHistoryWindow_toConsumableArray(result));
928
928
  }
929
929
 
930
- /**
931
- * Return array with messages of count that matching limit.
930
+ /**
931
+ * Return array with messages of count that matching limit.
932
932
  */
933
933
  }, {
934
934
  key: "trimItemsArrayToLimit",
@@ -949,8 +949,8 @@ var TraversableRemoteCollection = /*#__PURE__*/function (_ObservableIndexedObj)
949
949
  var TopicHistoryWindow = /*#__PURE__*/function (_TraversableRemoteCol) {
950
950
  TopicHistoryWindow_inherits(TopicHistoryWindow, _TraversableRemoteCol);
951
951
  var _super2 = TopicHistoryWindow_createSuper(TopicHistoryWindow);
952
- /**
953
- * Reexported available window modes enum.
952
+ /**
953
+ * Reexported available window modes enum.
954
954
  */
955
955
 
956
956
  function TopicHistoryWindow(roomId, topicId, tracker) {
@@ -970,9 +970,9 @@ var TopicHistoryWindow = /*#__PURE__*/function (_TraversableRemoteCol) {
970
970
  return _this2;
971
971
  }
972
972
 
973
- /**
974
- * For internal use.
975
- * @internal
973
+ /**
974
+ * For internal use.
975
+ * @internal
976
976
  */
977
977
  TopicHistoryWindow_createClass(TopicHistoryWindow, [{
978
978
  key: "_updateMessageReference",
@@ -1280,8 +1280,8 @@ var RoomMessagesHistory = /*#__PURE__*/function () {
1280
1280
  }
1281
1281
  }
1282
1282
 
1283
- /**
1284
- * Returns a history window object for the given topic ID, allowing you to view message history.
1283
+ /**
1284
+ * Returns a history window object for the given topic ID, allowing you to view message history.
1285
1285
  */
1286
1286
  RoomMessagesHistory_createClass(RoomMessagesHistory, [{
1287
1287
  key: "getMessagesWindow",
@@ -1423,8 +1423,8 @@ var MessagesManager = /*#__PURE__*/function () {
1423
1423
  });
1424
1424
  }
1425
1425
 
1426
- /**
1427
- * Get history manager for given room ID.
1426
+ /**
1427
+ * Get history manager for given room ID.
1428
1428
  */
1429
1429
  MessagesManager_createClass(MessagesManager, [{
1430
1430
  key: "getRoomHistory",
@@ -1450,10 +1450,10 @@ var MessagesManager = /*#__PURE__*/function () {
1450
1450
  }
1451
1451
  return getRoomHistory;
1452
1452
  }()
1453
- /**
1454
- * Cache followed topics for all joined rooms in a space and fetch them in bulk if necessary.
1455
- * Then you can get them using getRoomFollowedTopics().
1456
- * @see getRoomFollowedTopics
1453
+ /**
1454
+ * Cache followed topics for all joined rooms in a space and fetch them in bulk if necessary.
1455
+ * Then you can get them using getRoomFollowedTopics().
1456
+ * @see getRoomFollowedTopics
1457
1457
  */
1458
1458
  }, {
1459
1459
  key: "cacheSpaceFollowedTopics",
@@ -1524,9 +1524,9 @@ var MessagesManager = /*#__PURE__*/function () {
1524
1524
  }
1525
1525
  return cacheSpaceFollowedTopics;
1526
1526
  }()
1527
- /**
1528
- * Get followed topics for the given room.
1529
- * @return Undefined if you are not in the room, collection otherwise.
1527
+ /**
1528
+ * Get followed topics for the given room.
1529
+ * @return Undefined if you are not in the room, collection otherwise.
1530
1530
  */
1531
1531
  }, {
1532
1532
  key: "getRoomFollowedTopics",
@@ -1596,8 +1596,8 @@ var MessagesManager = /*#__PURE__*/function () {
1596
1596
  }
1597
1597
  return getRoomFollowedTopics;
1598
1598
  }()
1599
- /**
1600
- * Batch acknowledge all missed messages from any topics in given room.
1599
+ /**
1600
+ * Batch acknowledge all missed messages from any topics in given room.
1601
1601
  */
1602
1602
  }, {
1603
1603
  key: "ackRoomFollowedTopics",
@@ -1661,9 +1661,9 @@ var MessagesManager = /*#__PURE__*/function () {
1661
1661
  }
1662
1662
  return ackRoomFollowedTopics;
1663
1663
  }()
1664
- /**
1665
- * Calculate missed messages from any topic in given room.
1666
- * @return Undefined if you are not in room.
1664
+ /**
1665
+ * Calculate missed messages from any topic in given room.
1666
+ * @return Undefined if you are not in room.
1667
1667
  */
1668
1668
  }, {
1669
1669
  key: "calculateRoomMissedMessages",
@@ -1700,9 +1700,9 @@ var MessagesManager = /*#__PURE__*/function () {
1700
1700
  }
1701
1701
  return calculateRoomMissedMessages;
1702
1702
  }()
1703
- /**
1704
- * For internal use. If you want to delete the message, execute a proper command on client object.
1705
- * @internal
1703
+ /**
1704
+ * For internal use. If you want to delete the message, execute a proper command on client object.
1705
+ * @internal
1706
1706
  */
1707
1707
  }, {
1708
1708
  key: "_deleteByTopicIds",
@@ -1965,8 +1965,8 @@ var RoomsManager = /*#__PURE__*/function () {
1965
1965
  });
1966
1966
  }
1967
1967
 
1968
- /**
1969
- * Get collection of room members.
1968
+ /**
1969
+ * Get collection of room members.
1970
1970
  */
1971
1971
  RoomsManager_createClass(RoomsManager, [{
1972
1972
  key: "getMembers",
@@ -2021,8 +2021,8 @@ var RoomsManager = /*#__PURE__*/function () {
2021
2021
  }
2022
2022
  return getMembers;
2023
2023
  }()
2024
- /**
2025
- * Get a room member representing the current user.
2024
+ /**
2025
+ * Get a room member representing the current user.
2026
2026
  */
2027
2027
  }, {
2028
2028
  key: "getMe",
@@ -2063,8 +2063,8 @@ var RoomsManager = /*#__PURE__*/function () {
2063
2063
  }
2064
2064
  return getMe;
2065
2065
  }()
2066
- /**
2067
- * Get collection of all the rooms you are in.
2066
+ /**
2067
+ * Get collection of all the rooms you are in.
2068
2068
  */
2069
2069
  }, {
2070
2070
  key: "get",
@@ -2090,9 +2090,9 @@ var RoomsManager = /*#__PURE__*/function () {
2090
2090
  }
2091
2091
  return get;
2092
2092
  }()
2093
- /**
2094
- * Get a collection of locally cached Topic objects for given room.
2095
- * You can pass topic ids as second argument, to try to fetch them from the server.
2093
+ /**
2094
+ * Get a collection of locally cached Topic objects for given room.
2095
+ * You can pass topic ids as second argument, to try to fetch them from the server.
2096
2096
  */
2097
2097
  }, {
2098
2098
  key: "getTopics",
@@ -2535,8 +2535,8 @@ var SpacesManager = /*#__PURE__*/function () {
2535
2535
  });
2536
2536
  }
2537
2537
 
2538
- /**
2539
- * Get collection of all the spaces you are in.
2538
+ /**
2539
+ * Get collection of all the spaces you are in.
2540
2540
  */
2541
2541
  SpacesManager_createClass(SpacesManager, [{
2542
2542
  key: "get",
@@ -2562,8 +2562,8 @@ var SpacesManager = /*#__PURE__*/function () {
2562
2562
  }
2563
2563
  return get;
2564
2564
  }()
2565
- /**
2566
- * Get collection of space roles.
2565
+ /**
2566
+ * Get collection of space roles.
2567
2567
  */
2568
2568
  }, {
2569
2569
  key: "getRoles",
@@ -2589,8 +2589,8 @@ var SpacesManager = /*#__PURE__*/function () {
2589
2589
  }
2590
2590
  return getRoles;
2591
2591
  }()
2592
- /**
2593
- * Get collection of the all available rooms inside given space.
2592
+ /**
2593
+ * Get collection of the all available rooms inside given space.
2594
2594
  */
2595
2595
  }, {
2596
2596
  key: "getRooms",
@@ -2645,8 +2645,8 @@ var SpacesManager = /*#__PURE__*/function () {
2645
2645
  }
2646
2646
  return getRooms;
2647
2647
  }()
2648
- /**
2649
- * Get collection of space members.
2648
+ /**
2649
+ * Get collection of space members.
2650
2650
  */
2651
2651
  }, {
2652
2652
  key: "getMembers",
@@ -2701,8 +2701,8 @@ var SpacesManager = /*#__PURE__*/function () {
2701
2701
  }
2702
2702
  return getMembers;
2703
2703
  }()
2704
- /**
2705
- * Get a space member representing the current user.
2704
+ /**
2705
+ * Get a space member representing the current user.
2706
2706
  */
2707
2707
  }, {
2708
2708
  key: "getMe",
@@ -3512,8 +3512,8 @@ var PermissionsManager = /*#__PURE__*/function (_EventTarget) {
3512
3512
  }
3513
3513
  }
3514
3514
 
3515
- /**
3516
- * @return Matched and deleted ids
3515
+ /**
3516
+ * @return Matched and deleted ids
3517
3517
  */
3518
3518
  }, {
3519
3519
  key: "deleteOverwritesByIdPrefix",
@@ -3957,24 +3957,24 @@ function ChatStateTracker_toPrimitive(input, hint) { if (ChatStateTracker_typeof
3957
3957
 
3958
3958
 
3959
3959
  var ChatStateTracker = /*#__PURE__*/function () {
3960
- /**
3961
- * State of your permissions.
3960
+ /**
3961
+ * State of your permissions.
3962
3962
  */
3963
3963
 
3964
- /**
3965
- * State of the rooms you are in.
3964
+ /**
3965
+ * State of the rooms you are in.
3966
3966
  */
3967
3967
 
3968
- /**
3969
- * State of the spaces you are in.
3968
+ /**
3969
+ * State of the spaces you are in.
3970
3970
  */
3971
3971
 
3972
- /**
3973
- * State of the emoticons (global and space-related).
3972
+ /**
3973
+ * State of the emoticons (global and space-related).
3974
3974
  */
3975
3975
 
3976
- /**
3977
- * Users related state.
3976
+ /**
3977
+ * Users related state.
3978
3978
  */
3979
3979
 
3980
3980
  function ChatStateTracker(client) {