polfan-server-js-client 0.2.3 → 0.2.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.
- package/.idea/copilot.data.migration.agent.xml +6 -0
- package/.idea/copilot.data.migration.ask.xml +6 -0
- package/.idea/copilot.data.migration.ask2agent.xml +6 -0
- package/.idea/copilot.data.migration.edit.xml +6 -0
- package/.idea/workspace.xml +401 -177
- package/README.md +22 -2
- package/babel.config.js +4 -5
- package/build/index.cjs.js +4595 -1816
- package/build/index.cjs.js.map +1 -1
- package/build/index.umd.js +1 -1
- package/build/index.umd.js.map +1 -1
- package/build/types/AbstractChatClient.d.ts +14 -2
- package/build/types/FilesClient.d.ts +7 -6
- package/build/types/IndexedObjectCollection.d.ts +4 -3
- package/build/types/Permissions.d.ts +4 -0
- package/build/types/WebSocketChatClient.d.ts +23 -0
- package/build/types/state-tracker/ChatStateTracker.d.ts +5 -0
- package/build/types/state-tracker/RelationshipsManager.d.ts +15 -0
- package/build/types/state-tracker/RoomMessagesHistory.d.ts +2 -0
- package/build/types/state-tracker/SpacesManager.d.ts +1 -0
- package/build/types/state-tracker/TopicHistoryWindow.d.ts +23 -6
- package/build/types/state-tracker/UsersManager.d.ts +3 -1
- package/build/types/types/src/index.d.ts +14 -3
- package/build/types/types/src/schemes/Emoticon.d.ts +1 -0
- package/build/types/types/src/schemes/Message.d.ts +1 -1
- package/build/types/types/src/schemes/Room.d.ts +2 -0
- package/build/types/types/src/schemes/RoomHistory.d.ts +5 -0
- package/build/types/types/src/schemes/RoomMember.d.ts +3 -0
- package/build/types/types/src/schemes/RoomSummary.d.ts +1 -0
- package/build/types/types/src/schemes/SpaceSummary.d.ts +1 -0
- package/build/types/types/src/schemes/User.d.ts +2 -2
- package/build/types/types/src/schemes/UserRelationship.d.ts +6 -0
- package/build/types/types/src/schemes/commands/CreateMessage.d.ts +2 -0
- package/build/types/types/src/schemes/commands/CreateRelationship.d.ts +5 -0
- package/build/types/types/src/schemes/commands/CreateTopic.d.ts +5 -2
- package/build/types/types/src/schemes/commands/DeleteRelationship.d.ts +5 -0
- package/build/types/types/src/schemes/commands/GetRelationships.d.ts +2 -0
- package/build/types/types/src/schemes/commands/Ping.d.ts +2 -0
- package/build/types/types/src/schemes/commands/UpdateRoom.d.ts +2 -0
- package/build/types/types/src/schemes/commands/UpdateRoomMember.d.ts +7 -0
- package/build/types/types/src/schemes/commands/UpdateSpaceMember.d.ts +5 -0
- package/build/types/types/src/schemes/events/NewRelationship.d.ts +4 -0
- package/build/types/types/src/schemes/events/Pong.d.ts +2 -0
- package/build/types/types/src/schemes/events/RelationshipDeleted.d.ts +4 -0
- package/build/types/types/src/schemes/events/Relationships.d.ts +4 -0
- package/build/types/types/src/schemes/events/RoomSummaryUpdated.d.ts +7 -0
- package/build/types/types/src/schemes/events/Session.d.ts +1 -0
- package/package.json +15 -28
- package/src/AbstractChatClient.ts +30 -4
- package/src/FilesClient.ts +26 -13
- package/src/IndexedObjectCollection.ts +26 -10
- package/src/Permissions.ts +1 -0
- package/src/WebSocketChatClient.ts +92 -14
- package/src/state-tracker/ChatStateTracker.ts +22 -6
- package/src/state-tracker/EmoticonsManager.ts +6 -4
- package/src/state-tracker/MessagesManager.ts +3 -4
- package/src/state-tracker/RelationshipsManager.ts +68 -0
- package/src/state-tracker/RoomMessagesHistory.ts +20 -3
- package/src/state-tracker/RoomsManager.ts +38 -8
- package/src/state-tracker/SpacesManager.ts +28 -1
- package/src/state-tracker/TopicHistoryWindow.ts +92 -32
- package/src/state-tracker/UsersManager.ts +16 -6
- package/src/types/src/index.ts +30 -5
- package/src/types/src/schemes/Emoticon.ts +1 -0
- package/src/types/src/schemes/Message.ts +1 -1
- package/src/types/src/schemes/Room.ts +2 -0
- package/src/types/src/schemes/RoomHistory.ts +6 -0
- package/src/types/src/schemes/RoomMember.ts +3 -0
- package/src/types/src/schemes/RoomSummary.ts +1 -0
- package/src/types/src/schemes/SpaceSummary.ts +1 -0
- package/src/types/src/schemes/User.ts +2 -2
- package/src/types/src/schemes/UserRelationship.ts +8 -0
- package/src/types/src/schemes/commands/CreateMessage.ts +2 -0
- package/src/types/src/schemes/commands/CreateRelationship.ts +6 -0
- package/src/types/src/schemes/commands/CreateTopic.ts +6 -2
- package/src/types/src/schemes/commands/DeleteRelationship.ts +6 -0
- package/src/types/src/schemes/commands/GetRelationships.ts +3 -0
- package/src/types/src/schemes/commands/Ping.ts +3 -0
- package/src/types/src/schemes/commands/UpdateRoom.ts +2 -0
- package/src/types/src/schemes/commands/UpdateRoomMember.ts +7 -0
- package/src/types/src/schemes/commands/UpdateSpaceMember.ts +5 -0
- package/src/types/src/schemes/events/NewRelationship.ts +5 -0
- package/src/types/src/schemes/events/Pong.ts +3 -0
- package/src/types/src/schemes/events/RelationshipDeleted.ts +5 -0
- package/src/types/src/schemes/events/Relationships.ts +5 -0
- package/src/types/src/schemes/events/RoomSummaryUpdated.ts +8 -0
- package/src/types/src/schemes/events/Session.ts +1 -0
- package/tests/history-window.test.ts +6 -1
- package/webpack.config.browser.js +2 -24
- package/webpack.config.node.js +2 -14
- package/.eslintignore +0 -0
- package/.eslintrc.json +0 -0
- package/src/types/src/schemes/commands/SetCustomNick.ts +0 -5
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { IndexedObjectCollection } from "../src";
|
|
2
|
+
import {TopicHistoryWindow, TraversableRemoteCollection, WindowState} from "../src/state-tracker/TopicHistoryWindow";
|
|
2
3
|
|
|
3
4
|
interface SimpleMessage {
|
|
4
5
|
id: number;
|
|
@@ -18,6 +19,10 @@ const messages: SimpleMessage[] = [
|
|
|
18
19
|
];
|
|
19
20
|
|
|
20
21
|
class TestableHistoryWindow extends TraversableRemoteCollection<SimpleMessage> {
|
|
22
|
+
public createMirror(): TraversableRemoteCollection<SimpleMessage> {
|
|
23
|
+
throw new Error('Method not implemented.');
|
|
24
|
+
}
|
|
25
|
+
|
|
21
26
|
public constructor() {
|
|
22
27
|
super('id');
|
|
23
28
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
const path = require('path');
|
|
2
|
-
const TerserPlugin = require(
|
|
3
|
-
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
|
|
2
|
+
const TerserPlugin = require("terser-webpack-plugin");
|
|
4
3
|
|
|
5
4
|
module.exports = {
|
|
6
5
|
mode: "production",
|
|
@@ -27,32 +26,11 @@ module.exports = {
|
|
|
27
26
|
test: /\.(m|j|t)s$/,
|
|
28
27
|
exclude: /(node_modules|bower_components)/,
|
|
29
28
|
use: {
|
|
30
|
-
loader: 'babel-loader'
|
|
31
|
-
options: {
|
|
32
|
-
presets: [
|
|
33
|
-
['@babel/preset-env', { targets: { esmodules: true } }],
|
|
34
|
-
'@babel/preset-typescript'
|
|
35
|
-
],
|
|
36
|
-
plugins: [
|
|
37
|
-
|
|
38
|
-
]
|
|
39
|
-
}
|
|
29
|
+
loader: 'babel-loader'
|
|
40
30
|
}
|
|
41
31
|
},
|
|
42
|
-
{
|
|
43
|
-
test: /\.(sa|sc|c)ss$/,
|
|
44
|
-
use: [
|
|
45
|
-
MiniCssExtractPlugin.loader,
|
|
46
|
-
{ loader: "css-loader", options: { sourceMap: true } },
|
|
47
|
-
],
|
|
48
|
-
}
|
|
49
32
|
]
|
|
50
33
|
},
|
|
51
|
-
plugins: [
|
|
52
|
-
new MiniCssExtractPlugin({
|
|
53
|
-
filename: 'index.css',
|
|
54
|
-
}),
|
|
55
|
-
],
|
|
56
34
|
resolve: {
|
|
57
35
|
extensions: ['.ts', '.js', '.json']
|
|
58
36
|
}
|
package/webpack.config.node.js
CHANGED
|
@@ -24,24 +24,12 @@ module.exports = {
|
|
|
24
24
|
test: /\.(m|j|t)s$/,
|
|
25
25
|
exclude: /(node_modules|bower_components)/,
|
|
26
26
|
use: {
|
|
27
|
-
loader: 'babel-loader'
|
|
28
|
-
options: {
|
|
29
|
-
presets: [
|
|
30
|
-
['@babel/preset-env', { targets: { node: 'current' } }],
|
|
31
|
-
'@babel/preset-typescript'
|
|
32
|
-
],
|
|
33
|
-
plugins: [
|
|
34
|
-
|
|
35
|
-
]
|
|
36
|
-
}
|
|
27
|
+
loader: 'babel-loader'
|
|
37
28
|
}
|
|
38
29
|
},
|
|
39
30
|
]
|
|
40
31
|
},
|
|
41
32
|
resolve: {
|
|
42
33
|
extensions: ['.ts', '.js', '.json']
|
|
43
|
-
}
|
|
44
|
-
externals: [
|
|
45
|
-
|
|
46
|
-
]
|
|
34
|
+
}
|
|
47
35
|
};
|
package/.eslintignore
DELETED
|
File without changes
|
package/.eslintrc.json
DELETED
|
File without changes
|