modelence 0.6.0-dev.8 → 0.6.0-dev.9
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/dist/bin/modelence.js +1 -1
- package/dist/{chunk-QPYE7K3S.js → chunk-G4KW3SLC.js} +3 -3
- package/dist/{chunk-QPYE7K3S.js.map → chunk-G4KW3SLC.js.map} +1 -1
- package/dist/client.d.ts +1 -1
- package/dist/client.js +1 -1
- package/dist/client.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/{package-KK3UD6VZ.js → package-ACIQW6FM.js} +2 -2
- package/dist/{package-KK3UD6VZ.js.map → package-ACIQW6FM.js.map} +1 -1
- package/dist/server.d.ts +1 -1
- package/dist/server.js +2 -2
- package/dist/server.js.map +1 -1
- package/dist/{types--0Hhbo72.d.ts → types-B8cRKzII.d.ts} +7 -7
- package/package.json +1 -1
|
@@ -35,15 +35,15 @@ type RoleDefinition = {
|
|
|
35
35
|
permissions: Permission[];
|
|
36
36
|
};
|
|
37
37
|
|
|
38
|
-
type
|
|
38
|
+
type canAccessChannel = (props: {
|
|
39
39
|
user: User | null;
|
|
40
40
|
session: Session | null;
|
|
41
41
|
roles: string[];
|
|
42
42
|
}) => Promise<boolean>;
|
|
43
43
|
declare class ServerChannel<T = any> {
|
|
44
44
|
readonly category: string;
|
|
45
|
-
readonly
|
|
46
|
-
constructor(category: string,
|
|
45
|
+
readonly canAccessChannel: canAccessChannel | null;
|
|
46
|
+
constructor(category: string, canAccessChannel?: canAccessChannel);
|
|
47
47
|
broadcast(id: string, data: T): void;
|
|
48
48
|
}
|
|
49
49
|
|
|
@@ -52,8 +52,8 @@ declare class ClientChannel<T = any> {
|
|
|
52
52
|
private readonly onMessage;
|
|
53
53
|
constructor(category: string, onMessage: (data: T) => void);
|
|
54
54
|
init(): void;
|
|
55
|
-
|
|
56
|
-
|
|
55
|
+
joinChannel(id: string): void;
|
|
56
|
+
leaveChannel(id: string): void;
|
|
57
57
|
}
|
|
58
58
|
|
|
59
59
|
interface WebsocketServerProvider {
|
|
@@ -88,11 +88,11 @@ interface WebsocketClientProvider {
|
|
|
88
88
|
category: string;
|
|
89
89
|
id: string;
|
|
90
90
|
}): void;
|
|
91
|
-
|
|
91
|
+
joinChannel(props: {
|
|
92
92
|
category: string;
|
|
93
93
|
id: string;
|
|
94
94
|
}): void;
|
|
95
|
-
|
|
95
|
+
leaveChannel(props: {
|
|
96
96
|
category: string;
|
|
97
97
|
id: string;
|
|
98
98
|
}): void;
|