polfan-server-js-client 0.0.5 → 0.0.6
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/deployment.xml +21 -0
- package/.idea/modules.xml +8 -0
- package/.idea/polfan-server-js-client.iml +8 -0
- package/.idea/vcs.xml +7 -0
- package/CODE_OF_CONDUCT.md +76 -0
- package/CONTRIBUTING.md +15 -0
- package/LICENSE +21 -0
- package/build/index.js +2 -0
- package/build/index.js.map +1 -0
- package/build/types/Client.d.ts +76 -0
- package/build/types/ObservableInterface.d.ts +9 -0
- package/{dist → build/types}/Token.d.ts +0 -0
- package/{dist → build/types}/connections/ConnectionInterface.d.ts +0 -0
- package/{dist → build/types}/connections/WebApiConnection.d.ts +0 -0
- package/{dist → build/types}/connections/WebSocketConnection.d.ts +0 -0
- package/build/types/dtos/Dto.d.ts +16 -0
- package/{dist → build/types}/dtos/Message.d.ts +0 -0
- package/{dist → build/types}/dtos/Permission.d.ts +0 -0
- package/{dist → build/types}/dtos/Role.d.ts +0 -0
- package/{dist → build/types}/dtos/Room.d.ts +0 -0
- package/{dist → build/types}/dtos/RoomMember.d.ts +0 -0
- package/{dist → build/types}/dtos/RoomSummary.d.ts +0 -0
- package/{dist → build/types}/dtos/Space.d.ts +0 -0
- package/{dist → build/types}/dtos/SpaceMember.d.ts +0 -0
- package/{dist → build/types}/dtos/Topic.d.ts +0 -0
- package/build/types/dtos/User.d.ts +9 -0
- package/{dist → build/types}/dtos/UserState.d.ts +0 -0
- package/{dist → build/types}/dtos/protocol/Envelope.d.ts +0 -0
- package/{dist → build/types}/dtos/protocol/EnvelopeMeta.d.ts +0 -0
- package/{dist → build/types}/dtos/protocol/commands/AssignRole.d.ts +0 -0
- package/{dist → build/types}/dtos/protocol/commands/CreateMessage.d.ts +0 -0
- package/{dist → build/types}/dtos/protocol/commands/CreateRole.d.ts +0 -0
- package/{dist → build/types}/dtos/protocol/commands/CreateRoom.d.ts +0 -0
- package/{dist → build/types}/dtos/protocol/commands/CreateSpace.d.ts +0 -0
- package/{dist → build/types}/dtos/protocol/commands/CreateTopic.d.ts +0 -0
- package/{dist → build/types}/dtos/protocol/commands/DeassignRole.d.ts +0 -0
- package/{dist → build/types}/dtos/protocol/commands/DeleteRole.d.ts +0 -0
- package/{dist → build/types}/dtos/protocol/commands/DeleteRoom.d.ts +0 -0
- package/{dist → build/types}/dtos/protocol/commands/DeleteSpace.d.ts +0 -0
- package/{dist → build/types}/dtos/protocol/commands/DeleteTopic.d.ts +0 -0
- package/{dist → build/types}/dtos/protocol/commands/GetComputedPermissions.d.ts +0 -0
- package/{dist → build/types}/dtos/protocol/commands/GetRolePermissions.d.ts +0 -0
- package/{dist → build/types}/dtos/protocol/commands/GetRoomMembers.d.ts +0 -0
- package/{dist → build/types}/dtos/protocol/commands/GetSession.d.ts +0 -0
- package/{dist → build/types}/dtos/protocol/commands/GetSpaceMembers.d.ts +0 -0
- package/{dist → build/types}/dtos/protocol/commands/GetSpaceRooms.d.ts +0 -0
- package/{dist → build/types}/dtos/protocol/commands/GetUserPermissions.d.ts +0 -0
- package/{dist → build/types}/dtos/protocol/commands/JoinRoom.d.ts +0 -0
- package/{dist → build/types}/dtos/protocol/commands/JoinSpace.d.ts +0 -0
- package/{dist → build/types}/dtos/protocol/commands/LeaveRoom.d.ts +0 -0
- package/{dist → build/types}/dtos/protocol/commands/LeaveSpace.d.ts +0 -0
- package/{dist → build/types}/dtos/protocol/commands/SetRolePermissions.d.ts +0 -0
- package/{dist → build/types}/dtos/protocol/commands/SetUserPermissions.d.ts +0 -0
- package/{dist → build/types}/dtos/protocol/events/Bye.d.ts +0 -0
- package/{dist → build/types}/dtos/protocol/events/Error.d.ts +0 -0
- package/{dist → build/types}/dtos/protocol/events/NewMessage.d.ts +0 -0
- package/{dist → build/types}/dtos/protocol/events/NewRole.d.ts +0 -0
- package/{dist → build/types}/dtos/protocol/events/NewRoom.d.ts +0 -0
- package/{dist → build/types}/dtos/protocol/events/NewTopic.d.ts +0 -0
- package/{dist → build/types}/dtos/protocol/events/Ok.d.ts +0 -0
- package/{dist → build/types}/dtos/protocol/events/Permissions.d.ts +0 -0
- package/{dist → build/types}/dtos/protocol/events/RoleDeleted.d.ts +0 -0
- package/{dist → build/types}/dtos/protocol/events/RoomDeleted.d.ts +0 -0
- package/{dist → build/types}/dtos/protocol/events/RoomJoined.d.ts +0 -0
- package/{dist → build/types}/dtos/protocol/events/RoomLeft.d.ts +0 -0
- package/{dist → build/types}/dtos/protocol/events/RoomMemberJoined.d.ts +0 -0
- package/{dist → build/types}/dtos/protocol/events/RoomMemberLeft.d.ts +0 -0
- package/{dist → build/types}/dtos/protocol/events/RoomMembers.d.ts +0 -0
- package/{dist → build/types}/dtos/protocol/events/Session.d.ts +0 -0
- package/{dist → build/types}/dtos/protocol/events/SpaceDeleted.d.ts +0 -0
- package/{dist → build/types}/dtos/protocol/events/SpaceJoined.d.ts +0 -0
- package/{dist → build/types}/dtos/protocol/events/SpaceLeft.d.ts +0 -0
- package/{dist → build/types}/dtos/protocol/events/SpaceMemberJoined.d.ts +0 -0
- package/{dist → build/types}/dtos/protocol/events/SpaceMemberLeft.d.ts +0 -0
- package/{dist → build/types}/dtos/protocol/events/SpaceMemberUpdate.d.ts +0 -0
- package/{dist → build/types}/dtos/protocol/events/SpaceMembers.d.ts +0 -0
- package/{dist → build/types}/dtos/protocol/events/SpaceRooms.d.ts +0 -0
- package/{dist → build/types}/dtos/protocol/events/TopicDeleted.d.ts +0 -0
- package/build/types/index.d.ts +23 -0
- package/{dist → build/types}/protocol.d.ts +0 -0
- package/{dist → old/dist}/Client.d.ts +0 -0
- package/{dist → old/dist}/ObservableInterface.d.ts +0 -0
- package/old/dist/Token.d.ts +5 -0
- package/old/dist/connections/ConnectionInterface.d.ts +17 -0
- package/old/dist/connections/WebApiConnection.d.ts +15 -0
- package/old/dist/connections/WebSocketConnection.d.ts +19 -0
- package/{dist → old/dist}/dtos/Dto.d.ts +0 -0
- package/old/dist/dtos/Message.d.ts +9 -0
- package/old/dist/dtos/Permission.d.ts +7 -0
- package/old/dist/dtos/Role.d.ts +7 -0
- package/old/dist/dtos/Room.d.ts +8 -0
- package/old/dist/dtos/RoomMember.d.ts +6 -0
- package/old/dist/dtos/RoomSummary.d.ts +7 -0
- package/old/dist/dtos/Space.d.ts +8 -0
- package/old/dist/dtos/SpaceMember.d.ts +7 -0
- package/old/dist/dtos/Topic.d.ts +7 -0
- package/{dist → old/dist}/dtos/User.d.ts +0 -0
- package/old/dist/dtos/UserState.d.ts +8 -0
- package/old/dist/dtos/protocol/Envelope.d.ts +7 -0
- package/old/dist/dtos/protocol/EnvelopeMeta.d.ts +6 -0
- package/{dist → old/dist}/dtos/protocol/ProtocolMessage.d.ts +0 -0
- package/{dist → old/dist}/dtos/protocol/ProtocolMetaData.d.ts +0 -0
- package/old/dist/dtos/protocol/commands/AssignRole.d.ts +7 -0
- package/old/dist/dtos/protocol/commands/CreateMessage.d.ts +7 -0
- package/old/dist/dtos/protocol/commands/CreateRole.d.ts +7 -0
- package/old/dist/dtos/protocol/commands/CreateRoom.d.ts +7 -0
- package/old/dist/dtos/protocol/commands/CreateSpace.d.ts +5 -0
- package/old/dist/dtos/protocol/commands/CreateTopic.d.ts +7 -0
- package/old/dist/dtos/protocol/commands/DeassignRole.d.ts +7 -0
- package/old/dist/dtos/protocol/commands/DeleteRole.d.ts +6 -0
- package/old/dist/dtos/protocol/commands/DeleteRoom.d.ts +5 -0
- package/old/dist/dtos/protocol/commands/DeleteSpace.d.ts +5 -0
- package/old/dist/dtos/protocol/commands/DeleteTopic.d.ts +5 -0
- package/old/dist/dtos/protocol/commands/GetComputedPermissions.d.ts +8 -0
- package/old/dist/dtos/protocol/commands/GetRolePermissions.d.ts +8 -0
- package/old/dist/dtos/protocol/commands/GetRoomMembers.d.ts +5 -0
- package/old/dist/dtos/protocol/commands/GetSession.d.ts +4 -0
- package/old/dist/dtos/protocol/commands/GetSpaceMembers.d.ts +5 -0
- package/old/dist/dtos/protocol/commands/GetSpaceRooms.d.ts +5 -0
- package/old/dist/dtos/protocol/commands/GetUserPermissions.d.ts +8 -0
- package/old/dist/dtos/protocol/commands/JoinRoom.d.ts +5 -0
- package/old/dist/dtos/protocol/commands/JoinSpace.d.ts +5 -0
- package/old/dist/dtos/protocol/commands/LeaveRoom.d.ts +5 -0
- package/old/dist/dtos/protocol/commands/LeaveSpace.d.ts +5 -0
- package/old/dist/dtos/protocol/commands/SetRolePermissions.d.ts +9 -0
- package/old/dist/dtos/protocol/commands/SetUserPermissions.d.ts +9 -0
- package/old/dist/dtos/protocol/events/Bye.d.ts +5 -0
- package/old/dist/dtos/protocol/events/Error.d.ts +6 -0
- package/old/dist/dtos/protocol/events/NewMessage.d.ts +6 -0
- package/old/dist/dtos/protocol/events/NewRole.d.ts +7 -0
- package/old/dist/dtos/protocol/events/NewRoom.d.ts +7 -0
- package/old/dist/dtos/protocol/events/NewTopic.d.ts +7 -0
- package/old/dist/dtos/protocol/events/Ok.d.ts +4 -0
- package/old/dist/dtos/protocol/events/Permissions.d.ts +6 -0
- package/old/dist/dtos/protocol/events/RoleDeleted.d.ts +6 -0
- package/old/dist/dtos/protocol/events/RoomDeleted.d.ts +5 -0
- package/old/dist/dtos/protocol/events/RoomJoined.d.ts +6 -0
- package/old/dist/dtos/protocol/events/RoomLeft.d.ts +5 -0
- package/old/dist/dtos/protocol/events/RoomMemberJoined.d.ts +6 -0
- package/old/dist/dtos/protocol/events/RoomMemberLeft.d.ts +5 -0
- package/old/dist/dtos/protocol/events/RoomMembers.d.ts +6 -0
- package/old/dist/dtos/protocol/events/Session.d.ts +9 -0
- package/old/dist/dtos/protocol/events/SpaceDeleted.d.ts +5 -0
- package/old/dist/dtos/protocol/events/SpaceJoined.d.ts +6 -0
- package/old/dist/dtos/protocol/events/SpaceLeft.d.ts +5 -0
- package/old/dist/dtos/protocol/events/SpaceMemberJoined.d.ts +6 -0
- package/old/dist/dtos/protocol/events/SpaceMemberLeft.d.ts +5 -0
- package/old/dist/dtos/protocol/events/SpaceMemberUpdate.d.ts +6 -0
- package/old/dist/dtos/protocol/events/SpaceMembers.d.ts +6 -0
- package/old/dist/dtos/protocol/events/SpaceRooms.d.ts +6 -0
- package/old/dist/dtos/protocol/events/TopicDeleted.d.ts +5 -0
- package/{dist → old/dist}/index.d.ts +0 -0
- package/{dist → old/dist}/index.js +0 -0
- package/{dist → old/dist}/index.js.map +0 -0
- package/old/dist/protocol.d.ts +7 -0
- package/{dist → old/dist}/pserv-js-client.js +0 -0
- package/{dist → old/dist}/pserv-js-client.js.map +0 -0
- package/old/package-lock.json +2654 -0
- package/old/package.json +22 -0
- package/old/tsconfig.json +12 -0
- package/package.json +55 -13
- package/tsconfig.json +15 -10
- package/webpack.config.demo.js +47 -0
- package/src/Client.ts +0 -166
- package/src/ObservableInterface.ts +0 -22
- package/src/Token.ts +0 -21
- package/src/connections/ConnectionInterface.ts +0 -20
- package/src/connections/WebApiConnection.ts +0 -43
- package/src/connections/WebSocketConnection.ts +0 -47
- package/src/dtos/Dto.ts +0 -45
- package/src/dtos/Message.ts +0 -16
- package/src/dtos/Permission.ts +0 -12
- package/src/dtos/Role.ts +0 -12
- package/src/dtos/Room.ts +0 -15
- package/src/dtos/RoomMember.ts +0 -13
- package/src/dtos/RoomSummary.ts +0 -12
- package/src/dtos/Space.ts +0 -15
- package/src/dtos/SpaceMember.ts +0 -14
- package/src/dtos/Topic.ts +0 -12
- package/src/dtos/User.ts +0 -15
- package/src/dtos/UserState.ts +0 -16
- package/src/dtos/protocol/Envelope.ts +0 -14
- package/src/dtos/protocol/EnvelopeMeta.ts +0 -11
- package/src/dtos/protocol/commands/AssignRole.ts +0 -12
- package/src/dtos/protocol/commands/CreateMessage.ts +0 -12
- package/src/dtos/protocol/commands/CreateRole.ts +0 -12
- package/src/dtos/protocol/commands/CreateRoom.ts +0 -12
- package/src/dtos/protocol/commands/CreateSpace.ts +0 -10
- package/src/dtos/protocol/commands/CreateTopic.ts +0 -12
- package/src/dtos/protocol/commands/DeassignRole.ts +0 -12
- package/src/dtos/protocol/commands/DeleteRole.ts +0 -11
- package/src/dtos/protocol/commands/DeleteRoom.ts +0 -10
- package/src/dtos/protocol/commands/DeleteSpace.ts +0 -10
- package/src/dtos/protocol/commands/DeleteTopic.ts +0 -10
- package/src/dtos/protocol/commands/GetComputedPermissions.ts +0 -13
- package/src/dtos/protocol/commands/GetRolePermissions.ts +0 -13
- package/src/dtos/protocol/commands/GetRoomMembers.ts +0 -10
- package/src/dtos/protocol/commands/GetSession.ts +0 -8
- package/src/dtos/protocol/commands/GetSpaceMembers.ts +0 -10
- package/src/dtos/protocol/commands/GetSpaceRooms.ts +0 -10
- package/src/dtos/protocol/commands/GetUserPermissions.ts +0 -13
- package/src/dtos/protocol/commands/JoinRoom.ts +0 -10
- package/src/dtos/protocol/commands/JoinSpace.ts +0 -10
- package/src/dtos/protocol/commands/LeaveRoom.ts +0 -10
- package/src/dtos/protocol/commands/LeaveSpace.ts +0 -10
- package/src/dtos/protocol/commands/SetRolePermissions.ts +0 -16
- package/src/dtos/protocol/commands/SetUserPermissions.ts +0 -16
- package/src/dtos/protocol/events/Bye.ts +0 -10
- package/src/dtos/protocol/events/Error.ts +0 -11
- package/src/dtos/protocol/events/NewMessage.ts +0 -13
- package/src/dtos/protocol/events/NewRole.ts +0 -14
- package/src/dtos/protocol/events/NewRoom.ts +0 -14
- package/src/dtos/protocol/events/NewTopic.ts +0 -14
- package/src/dtos/protocol/events/Ok.ts +0 -8
- package/src/dtos/protocol/events/Permissions.ts +0 -13
- package/src/dtos/protocol/events/RoleDeleted.ts +0 -11
- package/src/dtos/protocol/events/RoomDeleted.ts +0 -10
- package/src/dtos/protocol/events/RoomJoined.ts +0 -13
- package/src/dtos/protocol/events/RoomLeft.ts +0 -10
- package/src/dtos/protocol/events/RoomMemberJoined.ts +0 -13
- package/src/dtos/protocol/events/RoomMemberLeft.ts +0 -10
- package/src/dtos/protocol/events/RoomMembers.ts +0 -13
- package/src/dtos/protocol/events/Session.ts +0 -17
- package/src/dtos/protocol/events/SpaceDeleted.ts +0 -10
- package/src/dtos/protocol/events/SpaceJoined.ts +0 -13
- package/src/dtos/protocol/events/SpaceLeft.ts +0 -10
- package/src/dtos/protocol/events/SpaceMemberJoined.ts +0 -13
- package/src/dtos/protocol/events/SpaceMemberLeft.ts +0 -10
- package/src/dtos/protocol/events/SpaceMemberUpdate.ts +0 -13
- package/src/dtos/protocol/events/SpaceMembers.ts +0 -13
- package/src/dtos/protocol/events/SpaceRooms.ts +0 -13
- package/src/dtos/protocol/events/TopicDeleted.ts +0 -10
- package/src/index.ts +0 -26
- package/src/protocol.ts +0 -113
- package/webpack.config.js +0 -24
package/src/dtos/SpaceMember.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import {castArray, Dto, DtoData} from "./Dto";
|
|
2
|
-
import {User} from "./User";
|
|
3
|
-
|
|
4
|
-
export class SpaceMember extends Dto {
|
|
5
|
-
public readonly user: User;
|
|
6
|
-
public readonly roles: string[];
|
|
7
|
-
|
|
8
|
-
public constructor(data: DtoData<SpaceMember>) {
|
|
9
|
-
super();
|
|
10
|
-
this.fill(data, {
|
|
11
|
-
user: castArray(data.user, User),
|
|
12
|
-
});
|
|
13
|
-
}
|
|
14
|
-
}
|
package/src/dtos/Topic.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import {Dto, DtoData} from "./Dto";
|
|
2
|
-
|
|
3
|
-
export class Topic extends Dto {
|
|
4
|
-
public readonly id: string;
|
|
5
|
-
public readonly name: string;
|
|
6
|
-
public readonly description: string;
|
|
7
|
-
|
|
8
|
-
public constructor(data: DtoData<Topic>) {
|
|
9
|
-
super();
|
|
10
|
-
this.fill(data);
|
|
11
|
-
}
|
|
12
|
-
}
|
package/src/dtos/User.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import {Dto, DtoData} from "./Dto";
|
|
2
|
-
|
|
3
|
-
export type UserFlag = 'bot' | 'temp';
|
|
4
|
-
|
|
5
|
-
export class User extends Dto {
|
|
6
|
-
public readonly id: string;
|
|
7
|
-
public readonly nick: string;
|
|
8
|
-
public readonly avatar: string;
|
|
9
|
-
public readonly flags: UserFlag[];
|
|
10
|
-
|
|
11
|
-
public constructor(data: DtoData<User>) {
|
|
12
|
-
super();
|
|
13
|
-
this.fill(data);
|
|
14
|
-
}
|
|
15
|
-
}
|
package/src/dtos/UserState.ts
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import {Space} from "./Space";
|
|
2
|
-
import {Room} from "./Room";
|
|
3
|
-
import {castArray, Dto, DtoData} from "./Dto";
|
|
4
|
-
|
|
5
|
-
export class UserState extends Dto {
|
|
6
|
-
public readonly spaces: Space[];
|
|
7
|
-
public readonly rooms: Room[];
|
|
8
|
-
|
|
9
|
-
public constructor(data: DtoData<UserState>) {
|
|
10
|
-
super();
|
|
11
|
-
this.fill(data, {
|
|
12
|
-
spaces: castArray(data.spaces, Space),
|
|
13
|
-
rooms: castArray(data.rooms, Room),
|
|
14
|
-
});
|
|
15
|
-
}
|
|
16
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import {cast, Dto, DtoData} from "../Dto";
|
|
2
|
-
import {EnvelopeMeta} from "./EnvelopeMeta";
|
|
3
|
-
|
|
4
|
-
export class Envelope<T = any> extends Dto {
|
|
5
|
-
public readonly meta: EnvelopeMeta;
|
|
6
|
-
public readonly data: T;
|
|
7
|
-
|
|
8
|
-
public constructor(data: DtoData<Envelope>) {
|
|
9
|
-
super();
|
|
10
|
-
this.fill(data, {
|
|
11
|
-
meta: cast(data.meta, EnvelopeMeta),
|
|
12
|
-
});
|
|
13
|
-
}
|
|
14
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import {Dto, DtoData} from "../../Dto";
|
|
2
|
-
|
|
3
|
-
export class AssignRole extends Dto {
|
|
4
|
-
public readonly roleId: string;
|
|
5
|
-
public readonly spaceId: string;
|
|
6
|
-
public readonly userId: string;
|
|
7
|
-
|
|
8
|
-
public constructor(data: DtoData<AssignRole>) {
|
|
9
|
-
super();
|
|
10
|
-
this.fill(data);
|
|
11
|
-
}
|
|
12
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import {Dto, DtoData} from "../../Dto";
|
|
2
|
-
import {Message} from "../../Message";
|
|
3
|
-
|
|
4
|
-
export class CreateMessage extends Dto {
|
|
5
|
-
public readonly topicId: string;
|
|
6
|
-
public readonly content: string;
|
|
7
|
-
|
|
8
|
-
public constructor(data: DtoData<Message>) {
|
|
9
|
-
super();
|
|
10
|
-
this.fill(data);
|
|
11
|
-
}
|
|
12
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import {Dto, DtoData} from "../../Dto";
|
|
2
|
-
|
|
3
|
-
export class CreateRole extends Dto {
|
|
4
|
-
public readonly spaceId: string;
|
|
5
|
-
public readonly name: string;
|
|
6
|
-
public readonly color: string;
|
|
7
|
-
|
|
8
|
-
public constructor(data: DtoData<CreateRole>) {
|
|
9
|
-
super();
|
|
10
|
-
this.fill(data);
|
|
11
|
-
}
|
|
12
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import {Dto, DtoData} from "../../Dto";
|
|
2
|
-
|
|
3
|
-
export class CreateRoom extends Dto {
|
|
4
|
-
public readonly spaceId: string;
|
|
5
|
-
public readonly name: string;
|
|
6
|
-
public readonly description: string;
|
|
7
|
-
|
|
8
|
-
public constructor(data: DtoData<CreateRoom>) {
|
|
9
|
-
super();
|
|
10
|
-
this.fill(data);
|
|
11
|
-
}
|
|
12
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import {Dto, DtoData} from "../../Dto";
|
|
2
|
-
|
|
3
|
-
export class CreateTopic extends Dto {
|
|
4
|
-
public readonly roomId: string;
|
|
5
|
-
public readonly name: string;
|
|
6
|
-
public readonly description: string;
|
|
7
|
-
|
|
8
|
-
public constructor(data: DtoData<CreateTopic>) {
|
|
9
|
-
super();
|
|
10
|
-
this.fill(data);
|
|
11
|
-
}
|
|
12
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import {Dto, DtoData} from "../../Dto";
|
|
2
|
-
|
|
3
|
-
export class DeassignRole extends Dto {
|
|
4
|
-
public readonly roleId: string;
|
|
5
|
-
public readonly spaceId: string;
|
|
6
|
-
public readonly userId: string;
|
|
7
|
-
|
|
8
|
-
public constructor(data: DtoData<DeassignRole>) {
|
|
9
|
-
super();
|
|
10
|
-
this.fill(data);
|
|
11
|
-
}
|
|
12
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import {Dto, DtoData} from "../../Dto";
|
|
2
|
-
|
|
3
|
-
export class GetComputedPermissions extends Dto {
|
|
4
|
-
public readonly names: string[] | null | undefined;
|
|
5
|
-
public readonly spaceId: string;
|
|
6
|
-
public readonly roomId: string;
|
|
7
|
-
public readonly topicId: string;
|
|
8
|
-
|
|
9
|
-
public constructor(data: DtoData<GetComputedPermissions>) {
|
|
10
|
-
super();
|
|
11
|
-
this.fill(data);
|
|
12
|
-
}
|
|
13
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import {Dto, DtoData} from "../../Dto";
|
|
2
|
-
|
|
3
|
-
export class GetRolePermissions extends Dto {
|
|
4
|
-
public readonly layer: 'Space' | 'Room' | 'Topic';
|
|
5
|
-
public readonly layerId: string;
|
|
6
|
-
public readonly roleId: string;
|
|
7
|
-
public readonly names: string[] | null | undefined;
|
|
8
|
-
|
|
9
|
-
public constructor(data: DtoData<GetRolePermissions>) {
|
|
10
|
-
super();
|
|
11
|
-
this.fill(data);
|
|
12
|
-
}
|
|
13
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import {Dto, DtoData} from "../../Dto";
|
|
2
|
-
|
|
3
|
-
export class GetUserPermissions extends Dto {
|
|
4
|
-
public readonly layer: 'Global' | 'Space' | 'Room' | 'Topic';
|
|
5
|
-
public readonly layerId: string;
|
|
6
|
-
public readonly userId: string;
|
|
7
|
-
public readonly names: string[] | null | undefined;
|
|
8
|
-
|
|
9
|
-
public constructor(data: DtoData<GetUserPermissions>) {
|
|
10
|
-
super();
|
|
11
|
-
this.fill(data);
|
|
12
|
-
}
|
|
13
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import {castArray, Dto, DtoData} from "../../Dto";
|
|
2
|
-
import {Permission} from "../../Permission";
|
|
3
|
-
|
|
4
|
-
export class SetRolePermissions extends Dto {
|
|
5
|
-
public readonly permissions: Permission[];
|
|
6
|
-
public readonly layer: 'Space' | 'Room' | 'Topic';
|
|
7
|
-
public readonly layerId: string;
|
|
8
|
-
public readonly roleId: string;
|
|
9
|
-
|
|
10
|
-
public constructor(data: DtoData<SetRolePermissions>) {
|
|
11
|
-
super();
|
|
12
|
-
this.fill(data, {
|
|
13
|
-
permissions: castArray(data.permissions, Permission),
|
|
14
|
-
});
|
|
15
|
-
}
|
|
16
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import {Permission} from "../../Permission";
|
|
2
|
-
import {castArray, Dto, DtoData} from "../../Dto";
|
|
3
|
-
|
|
4
|
-
export class SetUserPermissions extends Dto {
|
|
5
|
-
public readonly permissions: Permission[];
|
|
6
|
-
public readonly layer: 'Global' | 'Space' | 'Room' | 'Topic';
|
|
7
|
-
public readonly layerId: string;
|
|
8
|
-
public readonly userId: string;
|
|
9
|
-
|
|
10
|
-
public constructor(data: DtoData<SetUserPermissions>) {
|
|
11
|
-
super();
|
|
12
|
-
this.fill(data, {
|
|
13
|
-
permissions: castArray(data.permissions, Permission),
|
|
14
|
-
});
|
|
15
|
-
}
|
|
16
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import {cast, Dto, DtoData} from "../../Dto";
|
|
2
|
-
import {Message} from "../../Message";
|
|
3
|
-
|
|
4
|
-
export class NewMessage extends Dto {
|
|
5
|
-
public readonly message: Message;
|
|
6
|
-
|
|
7
|
-
public constructor(data: DtoData<NewMessage>) {
|
|
8
|
-
super();
|
|
9
|
-
this.fill(data, {
|
|
10
|
-
message: cast(data.message, Message),
|
|
11
|
-
});
|
|
12
|
-
}
|
|
13
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import {cast, Dto, DtoData} from "../../Dto";
|
|
2
|
-
import {Role} from "../../Role";
|
|
3
|
-
|
|
4
|
-
export class NewRole extends Dto {
|
|
5
|
-
public readonly spaceId: string;
|
|
6
|
-
public readonly role: Role;
|
|
7
|
-
|
|
8
|
-
public constructor(data: DtoData<NewRole>) {
|
|
9
|
-
super();
|
|
10
|
-
this.fill(data, {
|
|
11
|
-
role: cast(data.role, Role),
|
|
12
|
-
});
|
|
13
|
-
}
|
|
14
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import {cast, Dto, DtoData} from "../../Dto";
|
|
2
|
-
import {RoomSummary} from "../../RoomSummary";
|
|
3
|
-
|
|
4
|
-
export class NewRoom extends Dto {
|
|
5
|
-
public readonly summary: RoomSummary;
|
|
6
|
-
public readonly spaceId: string;
|
|
7
|
-
|
|
8
|
-
public constructor(data: DtoData<NewRoom>) {
|
|
9
|
-
super();
|
|
10
|
-
this.fill(data, {
|
|
11
|
-
summary: cast(data.summary, RoomSummary),
|
|
12
|
-
});
|
|
13
|
-
}
|
|
14
|
-
}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import {cast, Dto, DtoData} from "../../Dto";
|
|
2
|
-
import {Topic} from "../../Topic";
|
|
3
|
-
|
|
4
|
-
export class NewTopic extends Dto {
|
|
5
|
-
public readonly roomId: string;
|
|
6
|
-
public readonly topic: Topic;
|
|
7
|
-
|
|
8
|
-
public constructor(data: DtoData<NewTopic>) {
|
|
9
|
-
super();
|
|
10
|
-
this.fill(data, {
|
|
11
|
-
topic: cast(data.topic, Topic),
|
|
12
|
-
});
|
|
13
|
-
}
|
|
14
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import {castArray, Dto, DtoData} from "../../Dto";
|
|
2
|
-
import {Permission} from "../../Permission";
|
|
3
|
-
|
|
4
|
-
export class Permissions extends Dto {
|
|
5
|
-
public readonly permissions: Permission[];
|
|
6
|
-
|
|
7
|
-
public constructor(data: DtoData<Permissions>) {
|
|
8
|
-
super();
|
|
9
|
-
this.fill(data, {
|
|
10
|
-
permissions: castArray(data.permissions, Permission),
|
|
11
|
-
});
|
|
12
|
-
}
|
|
13
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import {cast, Dto, DtoData} from "../../Dto";
|
|
2
|
-
import {Room} from "../../Room";
|
|
3
|
-
|
|
4
|
-
export class RoomJoined extends Dto {
|
|
5
|
-
public readonly room: Room;
|
|
6
|
-
|
|
7
|
-
public constructor(data: DtoData<RoomJoined>) {
|
|
8
|
-
super();
|
|
9
|
-
this.fill(data, {
|
|
10
|
-
room: cast(data.room, Room),
|
|
11
|
-
});
|
|
12
|
-
}
|
|
13
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import {cast, Dto, DtoData} from "../../Dto";
|
|
2
|
-
import {RoomMember} from "../../RoomMember";
|
|
3
|
-
|
|
4
|
-
export class RoomMemberJoined extends Dto {
|
|
5
|
-
public readonly member: RoomMember;
|
|
6
|
-
|
|
7
|
-
public constructor(data: DtoData<RoomMemberJoined>) {
|
|
8
|
-
super();
|
|
9
|
-
this.fill(data, {
|
|
10
|
-
member: cast(data.member, RoomMember),
|
|
11
|
-
});
|
|
12
|
-
}
|
|
13
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import {castArray, Dto, DtoData} from "../../Dto";
|
|
2
|
-
import {RoomMember} from "../../RoomMember";
|
|
3
|
-
|
|
4
|
-
export class RoomMembers extends Dto {
|
|
5
|
-
public readonly members: RoomMember[];
|
|
6
|
-
|
|
7
|
-
public constructor(data: DtoData<RoomMembers>) {
|
|
8
|
-
super();
|
|
9
|
-
this.fill(data, {
|
|
10
|
-
members: castArray(data.members, RoomMember),
|
|
11
|
-
});
|
|
12
|
-
}
|
|
13
|
-
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import {cast, Dto, DtoData} from "../../Dto";
|
|
2
|
-
import {UserState} from "../../UserState";
|
|
3
|
-
import {User} from "../../User";
|
|
4
|
-
|
|
5
|
-
export class Session extends Dto {
|
|
6
|
-
public readonly serverVersion: string;
|
|
7
|
-
public readonly state: UserState;
|
|
8
|
-
public readonly user: User;
|
|
9
|
-
|
|
10
|
-
public constructor(data: DtoData<Session>) {
|
|
11
|
-
super();
|
|
12
|
-
this.fill(data, {
|
|
13
|
-
state: cast(data.state, UserState),
|
|
14
|
-
user: cast(data.user, User),
|
|
15
|
-
});
|
|
16
|
-
}
|
|
17
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import {cast, Dto, DtoData} from "../../Dto";
|
|
2
|
-
import {Space} from "../../Space";
|
|
3
|
-
|
|
4
|
-
export class SpaceJoined extends Dto {
|
|
5
|
-
public readonly space: Space;
|
|
6
|
-
|
|
7
|
-
public constructor(data: DtoData<SpaceJoined>) {
|
|
8
|
-
super();
|
|
9
|
-
this.fill(data, {
|
|
10
|
-
space: cast(data.space, Space),
|
|
11
|
-
});
|
|
12
|
-
}
|
|
13
|
-
}
|