@omujs/omu 0.9.48 → 0.9.49
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/dts/api/asset/extension.d.ts +25 -0
- package/dist/dts/api/asset/index.d.ts +2 -0
- package/dist/dts/api/dashboard/extension.d.ts +183 -0
- package/{src/api/dashboard/handler.ts → dist/dts/api/dashboard/handler.d.ts} +0 -2
- package/dist/dts/api/dashboard/index.d.ts +3 -0
- package/dist/dts/api/dashboard/packets.d.ts +73 -0
- package/dist/dts/api/endpoint/endpoint.d.ts +21 -0
- package/dist/dts/api/endpoint/extension.d.ts +17 -0
- package/{src/api/endpoint/index.ts → dist/dts/api/endpoint/index.d.ts} +0 -1
- package/dist/dts/api/endpoint/packets.d.ts +51 -0
- package/dist/dts/api/extension-registry.d.ts +8 -0
- package/dist/dts/api/extension.d.ts +11 -0
- package/dist/dts/api/http/extension.d.ts +41 -0
- package/dist/dts/api/http/http.d.ts +36 -0
- package/{src/api/http/index.ts → dist/dts/api/http/index.d.ts} +0 -1
- package/dist/dts/api/http/websocket.d.ts +125 -0
- package/dist/dts/api/i18n/extension.d.ts +19 -0
- package/{src/api/i18n/index.ts → dist/dts/api/i18n/index.d.ts} +0 -1
- package/{src/api/index.ts → dist/dts/api/index.d.ts} +0 -1
- package/dist/dts/api/logger/extension.d.ts +25 -0
- package/dist/dts/api/logger/index.d.ts +1 -0
- package/dist/dts/api/logger/packets.d.ts +18 -0
- package/dist/dts/api/permission/extension.d.ts +19 -0
- package/{src/api/permission/index.ts → dist/dts/api/permission/index.d.ts} +0 -1
- package/dist/dts/api/permission/permission.d.ts +25 -0
- package/dist/dts/api/plugin/extension.d.ts +43 -0
- package/{src/api/plugin/index.ts → dist/dts/api/plugin/index.d.ts} +0 -1
- package/{src/api/plugin/package-info.ts → dist/dts/api/plugin/package-info.d.ts} +0 -7
- package/dist/dts/api/registry/extension.d.ts +23 -0
- package/{src/api/registry/index.ts → dist/dts/api/registry/index.d.ts} +0 -1
- package/dist/dts/api/registry/packets.d.ts +20 -0
- package/{src/api/registry/registry.ts → dist/dts/api/registry/registry.d.ts} +11 -53
- package/dist/dts/api/server/extension.d.ts +61 -0
- package/dist/dts/api/server/index.d.ts +1 -0
- package/dist/dts/api/session/extension.d.ts +52 -0
- package/dist/dts/api/session/index.d.ts +1 -0
- package/dist/dts/api/signal/extension.d.ts +19 -0
- package/dist/dts/api/signal/packets.d.ts +21 -0
- package/dist/dts/api/signal/signal.d.ts +33 -0
- package/dist/dts/api/table/extension.d.ts +26 -0
- package/{src/api/table/index.ts → dist/dts/api/table/index.d.ts} +0 -1
- package/dist/dts/api/table/packets.d.ts +65 -0
- package/dist/dts/api/table/table.d.ts +75 -0
- package/dist/dts/app.d.ts +49 -0
- package/dist/dts/const.d.ts +2 -0
- package/dist/dts/errors.d.ts +36 -0
- package/dist/dts/event/index.d.ts +6 -0
- package/dist/dts/helper.d.ts +10 -0
- package/dist/dts/identifier.d.ts +51 -0
- package/dist/dts/index.d.ts +36 -0
- package/{src/localization/index.ts → dist/dts/localization/index.d.ts} +0 -1
- package/dist/dts/localization/locale.d.ts +735 -0
- package/{src/localization/localization.ts → dist/dts/localization/localization.d.ts} +0 -2
- package/dist/dts/lock.d.ts +6 -0
- package/dist/dts/network/connection.d.ts +17 -0
- package/dist/dts/network/encryption.d.ts +38 -0
- package/dist/dts/network/frame-transport.d.ts +22 -0
- package/{src/network/index.ts → dist/dts/network/index.d.ts} +0 -1
- package/dist/dts/network/network.d.ts +59 -0
- package/{src/network/packet/index.ts → dist/dts/network/packet/index.d.ts} +0 -1
- package/dist/dts/network/packet/packet-types.d.ts +84 -0
- package/dist/dts/network/packet/packet.d.ts +25 -0
- package/dist/dts/network/websocket-transport.d.ts +24 -0
- package/dist/dts/omu.d.ts +61 -0
- package/dist/dts/result.d.ts +26 -0
- package/dist/dts/serialize/bytebuffer.d.ts +73 -0
- package/dist/dts/serialize/serializer.d.ts +26 -0
- package/dist/dts/token.d.ts +14 -0
- package/dist/dts/version.d.ts +2 -0
- package/dist/esm/address.js +4 -0
- package/dist/esm/api/asset/extension.js +911 -0
- package/dist/esm/api/asset/index.js +909 -0
- package/dist/esm/api/dashboard/extension.js +1362 -0
- package/dist/esm/api/dashboard/handler.js +4 -0
- package/dist/esm/api/dashboard/index.js +1361 -0
- package/dist/esm/api/dashboard/packets.js +419 -0
- package/dist/esm/api/endpoint/endpoint.js +383 -0
- package/dist/esm/api/endpoint/extension.js +1096 -0
- package/dist/esm/api/endpoint/index.js +383 -0
- package/dist/esm/api/endpoint/packets.js +799 -0
- package/dist/esm/api/extension-registry.js +23 -0
- package/dist/esm/api/extension.js +278 -0
- package/dist/esm/api/http/extension.js +1420 -0
- package/dist/esm/api/http/http.js +448 -0
- package/dist/esm/api/http/index.js +1419 -0
- package/dist/esm/api/http/websocket.js +220 -0
- package/dist/esm/api/i18n/extension.js +1339 -0
- package/dist/esm/api/i18n/index.js +1337 -0
- package/dist/esm/api/index.js +295 -0
- package/dist/esm/api/logger/extension.js +856 -0
- package/dist/esm/api/logger/index.js +852 -0
- package/dist/esm/api/logger/packets.js +673 -0
- package/dist/esm/api/permission/extension.js +535 -0
- package/dist/esm/api/permission/index.js +294 -0
- package/dist/esm/api/permission/permission.js +294 -0
- package/dist/esm/api/plugin/extension.js +531 -0
- package/dist/esm/api/plugin/index.js +529 -0
- package/dist/esm/api/plugin/package-info.js +4 -0
- package/dist/esm/api/registry/extension.js +1286 -0
- package/dist/esm/api/registry/index.js +1285 -0
- package/dist/esm/api/registry/packets.js +694 -0
- package/dist/esm/api/registry/registry.js +383 -0
- package/dist/esm/api/server/extension.js +2140 -0
- package/dist/esm/api/server/index.js +2118 -0
- package/dist/esm/api/session/extension.js +2235 -0
- package/dist/esm/api/session/index.js +2235 -0
- package/dist/esm/api/signal/extension.js +1031 -0
- package/dist/esm/api/signal/index.js +379 -0
- package/dist/esm/api/signal/packets.js +690 -0
- package/dist/esm/api/signal/signal.js +379 -0
- package/dist/esm/api/table/extension.js +1553 -0
- package/dist/esm/api/table/index.js +1552 -0
- package/dist/esm/api/table/packets.js +904 -0
- package/dist/esm/api/table/table.js +383 -0
- package/dist/esm/app.js +264 -0
- package/dist/esm/const.js +11 -0
- package/dist/esm/errors.js +548 -0
- package/dist/esm/event/index.js +22 -0
- package/dist/esm/helper.js +15 -0
- package/dist/esm/identifier.js +266 -0
- package/dist/esm/index.js +5186 -0
- package/dist/esm/localization/index.js +742 -0
- package/dist/esm/localization/locale.js +742 -0
- package/dist/esm/localization/localization.js +4 -0
- package/dist/esm/lock.js +46 -0
- package/dist/esm/network/connection.js +293 -0
- package/dist/esm/network/encryption.js +986 -0
- package/dist/esm/network/frame-transport.js +531 -0
- package/dist/esm/network/index.js +1627 -0
- package/dist/esm/network/network.js +1368 -0
- package/dist/esm/network/packet/index.js +485 -0
- package/dist/esm/network/packet/packet-types.js +486 -0
- package/dist/esm/network/packet/packet.js +126 -0
- package/dist/esm/network/websocket-transport.js +493 -0
- package/dist/esm/omu.js +4945 -0
- package/dist/esm/result.js +68 -0
- package/dist/esm/serialize/bytebuffer.js +384 -0
- package/dist/esm/serialize/index.js +471 -0
- package/dist/esm/serialize/serializer.js +97 -0
- package/dist/esm/token.js +42 -0
- package/dist/esm/version.js +11 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +4 -1
- package/CHANGELOG.md +0 -1845
- package/src/api/asset/extension.ts +0 -193
- package/src/api/asset/index.ts +0 -5
- package/src/api/dashboard/extension.ts +0 -651
- package/src/api/dashboard/index.ts +0 -38
- package/src/api/dashboard/packets.ts +0 -126
- package/src/api/endpoint/endpoint.ts +0 -56
- package/src/api/endpoint/extension.ts +0 -133
- package/src/api/endpoint/packets.ts +0 -176
- package/src/api/extension-registry.ts +0 -17
- package/src/api/extension.ts +0 -19
- package/src/api/http/extension.ts +0 -401
- package/src/api/http/http.ts +0 -79
- package/src/api/http/websocket.ts +0 -283
- package/src/api/i18n/extension.ts +0 -65
- package/src/api/logger/extension.ts +0 -75
- package/src/api/logger/index.ts +0 -4
- package/src/api/logger/packets.ts +0 -38
- package/src/api/permission/extension.ts +0 -107
- package/src/api/permission/permission.ts +0 -53
- package/src/api/plugin/extension.ts +0 -100
- package/src/api/registry/extension.ts +0 -326
- package/src/api/registry/packets.ts +0 -64
- package/src/api/server/extension.ts +0 -155
- package/src/api/server/index.ts +0 -11
- package/src/api/session/extension.ts +0 -205
- package/src/api/session/index.ts +0 -7
- package/src/api/signal/extension.ts +0 -125
- package/src/api/signal/packets.ts +0 -61
- package/src/api/signal/signal.ts +0 -67
- package/src/api/table/extension.ts +0 -554
- package/src/api/table/packets.ts +0 -252
- package/src/api/table/table.ts +0 -113
- package/src/app.ts +0 -95
- package/src/const.ts +0 -2
- package/src/errors.ts +0 -70
- package/src/event/index.ts +0 -18
- package/src/helper.ts +0 -16
- package/src/identifier.ts +0 -256
- package/src/index.ts +0 -87
- package/src/localization/locale.ts +0 -737
- package/src/lock.ts +0 -43
- package/src/network/connection.ts +0 -45
- package/src/network/encryption.ts +0 -221
- package/src/network/frame-transport.ts +0 -186
- package/src/network/network.ts +0 -322
- package/src/network/packet/packet-types.ts +0 -164
- package/src/network/packet/packet.ts +0 -55
- package/src/network/websocket-transport.ts +0 -123
- package/src/omu.ts +0 -156
- package/src/result.ts +0 -78
- package/src/serialize/bytebuffer.ts +0 -432
- package/src/serialize/serializer.ts +0 -149
- package/src/token.ts +0 -39
- package/src/version.ts +0 -2
- package/tsconfig.json +0 -18
- /package/{src/address.ts → dist/dts/address.d.ts} +0 -0
- /package/{src/api/signal/index.ts → dist/dts/api/signal/index.d.ts} +0 -0
- /package/{src/serialize/index.ts → dist/dts/serialize/index.d.ts} +0 -0
package/src/identifier.ts
DELETED
|
@@ -1,256 +0,0 @@
|
|
|
1
|
-
import type { ExtensionType } from './api';
|
|
2
|
-
import { App } from './app';
|
|
3
|
-
|
|
4
|
-
const NAMESPACE_REGEX = /^(\.[^/:.]|[\w-])+$/;
|
|
5
|
-
const NAME_REGEX = /^[^/:]+$/;
|
|
6
|
-
|
|
7
|
-
export type IntoId = Identifier | string | ExtensionType | App;
|
|
8
|
-
|
|
9
|
-
export class Identifier {
|
|
10
|
-
public readonly namespace: string;
|
|
11
|
-
public readonly path: string[];
|
|
12
|
-
|
|
13
|
-
constructor(
|
|
14
|
-
namespace: string,
|
|
15
|
-
...path: string[]
|
|
16
|
-
) {
|
|
17
|
-
Identifier.validate(namespace, path);
|
|
18
|
-
this.namespace = namespace;
|
|
19
|
-
this.path = path;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
public static serialize(identifier: Identifier): string {
|
|
23
|
-
return identifier.key();
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
public static deserialize(json: string): Identifier {
|
|
27
|
-
return Identifier.fromJson(json);
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
public static from(id: IntoId): Identifier {
|
|
31
|
-
if (id instanceof Identifier) {
|
|
32
|
-
return id;
|
|
33
|
-
} else if (id instanceof App) {
|
|
34
|
-
return id.id;
|
|
35
|
-
} else if (typeof id === 'string') {
|
|
36
|
-
return Identifier.fromKey(id);
|
|
37
|
-
} else {
|
|
38
|
-
// Try to infer
|
|
39
|
-
// Vite does not preserve class information when importing from different packages
|
|
40
|
-
const idCasted = id as { namespace: string; path: string[] };
|
|
41
|
-
if (
|
|
42
|
-
typeof idCasted.namespace === 'string' &&
|
|
43
|
-
Array.isArray(idCasted.path) &&
|
|
44
|
-
idCasted.path.every((p) => typeof p === 'string')
|
|
45
|
-
) {
|
|
46
|
-
return new Identifier(idCasted.namespace, ...idCasted.path);
|
|
47
|
-
}
|
|
48
|
-
const idWithId = id as { id: IntoId | undefined };
|
|
49
|
-
if (typeof idWithId.id !== 'undefined') {
|
|
50
|
-
return Identifier.from(idWithId.id);
|
|
51
|
-
}
|
|
52
|
-
throw new Error(`Cannot convert to Identifier: ${id}`);
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
public static fromOptional(id: IntoId | undefined | null): Identifier | undefined {
|
|
57
|
-
if (id === undefined || id === null) {
|
|
58
|
-
return undefined;
|
|
59
|
-
}
|
|
60
|
-
return Identifier.from(id);
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
static validate(namespace: string, path: string[]): void {
|
|
64
|
-
if (!namespace) {
|
|
65
|
-
throw new Error('Invalid namespace: Namespace cannot be empty');
|
|
66
|
-
}
|
|
67
|
-
if (path.length === 0) {
|
|
68
|
-
throw new Error('Invalid path: Path must have at least one name');
|
|
69
|
-
}
|
|
70
|
-
if (!NAMESPACE_REGEX.test(namespace)) {
|
|
71
|
-
throw new Error(`Invalid namespace: Namespace must match ${NAMESPACE_REGEX}`);
|
|
72
|
-
}
|
|
73
|
-
for (const name of path) {
|
|
74
|
-
if (!NAME_REGEX.test(name)) {
|
|
75
|
-
throw new Error(`Invalid path: Name must match ${NAME_REGEX} but got ${name}`);
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
static format(namespace: string, ...path: string[]): string {
|
|
81
|
-
Identifier.validate(namespace, path);
|
|
82
|
-
return `${namespace}:${path.join('/')}`;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
static fromKey(key: string): Identifier {
|
|
86
|
-
const separator = key.indexOf(':');
|
|
87
|
-
if (separator === -1) {
|
|
88
|
-
throw new Error(`Invalid key: No separator found in ${key}`);
|
|
89
|
-
}
|
|
90
|
-
if (key.indexOf(':', separator + 1) !== -1) {
|
|
91
|
-
throw new Error(`Invalid key: Multiple separators found in ${key}`);
|
|
92
|
-
}
|
|
93
|
-
const namespace = key.slice(0, separator);
|
|
94
|
-
const path = key.slice(separator + 1);
|
|
95
|
-
if (!namespace || !path) {
|
|
96
|
-
throw new Error('Invalid key: Namespace and path cannot be empty');
|
|
97
|
-
}
|
|
98
|
-
return new Identifier(namespace, ...path.split('/'));
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
public static fromUrl(url: string | URL): Identifier {
|
|
102
|
-
const parsedUrl = new URL(url);
|
|
103
|
-
const namespace = Identifier.namespaceFromUrl(parsedUrl.href);
|
|
104
|
-
const path = parsedUrl.pathname.slice(1).split('/');
|
|
105
|
-
return new Identifier(namespace, ...path);
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
public static namespaceFromUrl(url: string | URL): string {
|
|
109
|
-
const parsed = new URL(url);
|
|
110
|
-
return parsed.hostname.split('.').reverse().join('.');
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
public get base(): Identifier {
|
|
114
|
-
return new Identifier(this.namespace, this.path[0]);
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
public toJson(): string {
|
|
118
|
-
return this.key();
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
static fromJson(json: string): Identifier {
|
|
122
|
-
return Identifier.fromKey(json);
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
public key(): string {
|
|
126
|
-
return Identifier.format(this.namespace, ...this.path);
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
public isEqual(other: Identifier): boolean {
|
|
130
|
-
return this.key() === other.key();
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
public isNamespaceEqual(other: Identifier): boolean {
|
|
134
|
-
return this.namespace === other.namespace;
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
public isSubpathOf(other: Identifier): boolean {
|
|
138
|
-
if (this.namespace !== other.namespace) {
|
|
139
|
-
return false;
|
|
140
|
-
}
|
|
141
|
-
if (this.path.length < other.path.length) {
|
|
142
|
-
return false;
|
|
143
|
-
}
|
|
144
|
-
for (let i = 0; i < other.path.length; i++) {
|
|
145
|
-
if (this.path[i] !== other.path[i]) {
|
|
146
|
-
return false;
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
return true;
|
|
150
|
-
}
|
|
151
|
-
|
|
152
|
-
public join(...path: string[]): Identifier {
|
|
153
|
-
return new Identifier(this.namespace, ...this.path, ...path);
|
|
154
|
-
}
|
|
155
|
-
}
|
|
156
|
-
|
|
157
|
-
export class IdentifierMap<T> {
|
|
158
|
-
private readonly map: Map<string, T> = new Map();
|
|
159
|
-
constructor(
|
|
160
|
-
entries?: Iterable<[Identifier, T]>,
|
|
161
|
-
) {
|
|
162
|
-
if (!entries) return;
|
|
163
|
-
for (const [id, value] of entries) {
|
|
164
|
-
this.map.set(id.key(), value);
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
public get size(): number {
|
|
169
|
-
return this.map.size;
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
public set(identifier: Identifier, value: T): void {
|
|
173
|
-
this.map.set(identifier.key(), value);
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
public get(identifier: Identifier): T | undefined {
|
|
177
|
-
return this.map.get(identifier.key());
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
public has(identifier: Identifier): boolean {
|
|
181
|
-
return this.map.has(identifier.key());
|
|
182
|
-
}
|
|
183
|
-
|
|
184
|
-
public delete(identifier: Identifier): void {
|
|
185
|
-
this.map.delete(identifier.key());
|
|
186
|
-
}
|
|
187
|
-
|
|
188
|
-
public clear(): void {
|
|
189
|
-
this.map.clear();
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
public *keys(): IterableIterator<Identifier> {
|
|
193
|
-
for (const key of this.map.keys()) {
|
|
194
|
-
yield Identifier.fromKey(key);
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
public values(): IterableIterator<T> {
|
|
199
|
-
return this.map.values();
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
public *entries(): IterableIterator<[Identifier, T]> {
|
|
203
|
-
for (const [key, value] of this.map.entries()) {
|
|
204
|
-
yield [Identifier.fromKey(key), value];
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
public [Symbol.iterator](): IterableIterator<[Identifier, T]> {
|
|
209
|
-
return this.entries();
|
|
210
|
-
}
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
export class IdentifierSet {
|
|
214
|
-
private readonly set: Set<string> = new Set();
|
|
215
|
-
|
|
216
|
-
public get size(): number {
|
|
217
|
-
return this.set.size;
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
public add(identifier: Identifier): void {
|
|
221
|
-
this.set.add(identifier.key());
|
|
222
|
-
}
|
|
223
|
-
|
|
224
|
-
public has(identifier: Identifier): boolean {
|
|
225
|
-
return this.set.has(identifier.key());
|
|
226
|
-
}
|
|
227
|
-
|
|
228
|
-
public delete(identifier: Identifier): void {
|
|
229
|
-
this.set.delete(identifier.key());
|
|
230
|
-
}
|
|
231
|
-
|
|
232
|
-
public clear(): void {
|
|
233
|
-
this.set.clear();
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
public *keys(): IterableIterator<Identifier> {
|
|
237
|
-
for (const key of this.set.keys()) {
|
|
238
|
-
yield Identifier.fromKey(key);
|
|
239
|
-
}
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
public values(): IterableIterator<Identifier> {
|
|
243
|
-
return this.keys();
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
public *entries(): IterableIterator<[Identifier, Identifier]> {
|
|
247
|
-
for (const key of this.set.keys()) {
|
|
248
|
-
const identifier = Identifier.fromKey(key);
|
|
249
|
-
yield [identifier, identifier];
|
|
250
|
-
}
|
|
251
|
-
}
|
|
252
|
-
|
|
253
|
-
public [Symbol.iterator](): IterableIterator<[Identifier, Identifier]> {
|
|
254
|
-
return this.entries();
|
|
255
|
-
}
|
|
256
|
-
}
|
package/src/index.ts
DELETED
|
@@ -1,87 +0,0 @@
|
|
|
1
|
-
export { AppIndexRegistry, type AppIndexRegistryJSON } from './api/server';
|
|
2
|
-
export { App, AppMetadata } from './app.js';
|
|
3
|
-
export { DisconnectReason } from './errors.js';
|
|
4
|
-
export { Identifier, IdentifierMap, IdentifierSet, IntoId } from './identifier';
|
|
5
|
-
export * as network from './network';
|
|
6
|
-
export { Omu } from './omu.js';
|
|
7
|
-
export { Serializer } from './serialize';
|
|
8
|
-
export type { Serializable } from './serialize';
|
|
9
|
-
export { BrowserSession, type SessionParam, type SessioTokenProvider as TokenProvider } from './token';
|
|
10
|
-
import { ASSET_PERMISSION_ID } from './api/asset';
|
|
11
|
-
import {
|
|
12
|
-
DASHBOARD_APP_INSTALL_PERMISSION_ID,
|
|
13
|
-
DAShBOARD_DRAG_DROP_PERMISSION_ID,
|
|
14
|
-
DASHBOARD_OPEN_APP_PERMISSION_ID,
|
|
15
|
-
DASHBOARD_SET_PERMISSION_ID,
|
|
16
|
-
DASHBOARD_SPEECH_RECOGNITION_PERMISSION_ID,
|
|
17
|
-
DASHBOARD_WEBVIEW_PERMISSION_ID,
|
|
18
|
-
DASHOBARD_APP_EDIT_PERMISSION_ID,
|
|
19
|
-
DASHOBARD_APP_READ_PERMISSION_ID,
|
|
20
|
-
} from './api/dashboard';
|
|
21
|
-
import { HTTP_REQUEST_PERMISSION_ID } from './api/http';
|
|
22
|
-
import { I18N_GET_LOCALES_PERMISSION_ID, I18N_SET_LOCALES_PERMISSION_ID } from './api/i18n';
|
|
23
|
-
import { LOGGER_LOG_PERMISSION_ID } from './api/logger';
|
|
24
|
-
import { PLUGIN_MANAGE_PACKAGE_PERMISSION_ID, PLUGIN_READ_PACKAGE_PERMISSION_ID } from './api/plugin';
|
|
25
|
-
import { REGISTRY_PERMISSION_ID } from './api/registry';
|
|
26
|
-
import { SERVER_APPS_READ_PERMISSION_ID, SERVER_SHUTDOWN_PERMISSION_ID, TRUSTED_ORIGINS_GET_PERMISSION_ID, TRUSTED_ORIGINS_SET_PERMISSION_ID } from './api/server';
|
|
27
|
-
import { GENERATE_TOKEN_PERMISSION_ID, REMOTE_APP_REQUEST_PERMISSION_ID, SESSIONS_READ_PERMISSION_ID } from './api/session';
|
|
28
|
-
import { TABLE_PERMISSION_ID } from './api/table';
|
|
29
|
-
import { Identifier } from './identifier';
|
|
30
|
-
|
|
31
|
-
export const OmuPermissions: {
|
|
32
|
-
// Asset API
|
|
33
|
-
readonly ASSET_PERMISSION_ID: Identifier;
|
|
34
|
-
// Dashboard API
|
|
35
|
-
readonly DASHBOARD_APP_INSTALL_PERMISSION_ID: Identifier; readonly DAShBOARD_DRAG_DROP_PERMISSION_ID: Identifier; readonly DASHBOARD_OPEN_APP_PERMISSION_ID: Identifier; readonly DASHBOARD_SET_PERMISSION_ID: Identifier; readonly DASHBOARD_SPEECH_RECOGNITION_PERMISSION_ID: Identifier; readonly DASHBOARD_WEBVIEW_PERMISSION_ID: Identifier; readonly DASHOBARD_APP_EDIT_PERMISSION_ID: Identifier; readonly DASHOBARD_APP_READ_PERMISSION_ID: Identifier;
|
|
36
|
-
// HTTP API
|
|
37
|
-
readonly HTTP_REQUEST_PERMISSION_ID: Identifier;
|
|
38
|
-
// I18n API
|
|
39
|
-
readonly I18N_GET_LOCALES_PERMISSION_ID: Identifier; readonly I18N_SET_LOCALES_PERMISSION_ID: Identifier;
|
|
40
|
-
// Logger API
|
|
41
|
-
readonly LOGGER_LOG_PERMISSION_ID: Identifier;
|
|
42
|
-
// Plugin API
|
|
43
|
-
readonly PLUGIN_MANAGE_PACKAGE_PERMISSION_ID: Identifier; readonly PLUGIN_READ_PACKAGE_PERMISSION_ID: Identifier;
|
|
44
|
-
// Registry API
|
|
45
|
-
readonly REGISTRY_PERMISSION_ID: Identifier;
|
|
46
|
-
// Server API
|
|
47
|
-
readonly SERVER_APPS_READ_PERMISSION_ID: Identifier; readonly SERVER_SHUTDOWN_PERMISSION_ID: Identifier; readonly TRUSTED_ORIGINS_GET_PERMISSION_ID: Identifier; readonly TRUSTED_ORIGINS_SET_PERMISSION_ID: Identifier;
|
|
48
|
-
// Session API
|
|
49
|
-
readonly GENERATE_TOKEN_PERMISSION_ID: Identifier; readonly REMOTE_APP_REQUEST_PERMISSION_ID: Identifier; readonly SESSIONS_READ_PERMISSION_ID: Identifier;
|
|
50
|
-
// Table API
|
|
51
|
-
readonly TABLE_PERMISSION_ID: Identifier;
|
|
52
|
-
} = {
|
|
53
|
-
// Asset API
|
|
54
|
-
ASSET_PERMISSION_ID: ASSET_PERMISSION_ID,
|
|
55
|
-
// Dashboard API
|
|
56
|
-
DASHBOARD_APP_INSTALL_PERMISSION_ID,
|
|
57
|
-
DAShBOARD_DRAG_DROP_PERMISSION_ID,
|
|
58
|
-
DASHBOARD_OPEN_APP_PERMISSION_ID,
|
|
59
|
-
DASHBOARD_SET_PERMISSION_ID,
|
|
60
|
-
DASHBOARD_SPEECH_RECOGNITION_PERMISSION_ID,
|
|
61
|
-
DASHBOARD_WEBVIEW_PERMISSION_ID,
|
|
62
|
-
DASHOBARD_APP_EDIT_PERMISSION_ID,
|
|
63
|
-
DASHOBARD_APP_READ_PERMISSION_ID,
|
|
64
|
-
// HTTP API
|
|
65
|
-
HTTP_REQUEST_PERMISSION_ID,
|
|
66
|
-
// I18n API
|
|
67
|
-
I18N_GET_LOCALES_PERMISSION_ID,
|
|
68
|
-
I18N_SET_LOCALES_PERMISSION_ID,
|
|
69
|
-
// Logger API
|
|
70
|
-
LOGGER_LOG_PERMISSION_ID,
|
|
71
|
-
// Plugin API
|
|
72
|
-
PLUGIN_MANAGE_PACKAGE_PERMISSION_ID,
|
|
73
|
-
PLUGIN_READ_PACKAGE_PERMISSION_ID,
|
|
74
|
-
// Registry API
|
|
75
|
-
REGISTRY_PERMISSION_ID,
|
|
76
|
-
// Server API
|
|
77
|
-
SERVER_APPS_READ_PERMISSION_ID,
|
|
78
|
-
SERVER_SHUTDOWN_PERMISSION_ID,
|
|
79
|
-
TRUSTED_ORIGINS_GET_PERMISSION_ID,
|
|
80
|
-
TRUSTED_ORIGINS_SET_PERMISSION_ID,
|
|
81
|
-
// Session API
|
|
82
|
-
GENERATE_TOKEN_PERMISSION_ID,
|
|
83
|
-
REMOTE_APP_REQUEST_PERMISSION_ID,
|
|
84
|
-
SESSIONS_READ_PERMISSION_ID,
|
|
85
|
-
// Table API
|
|
86
|
-
TABLE_PERMISSION_ID,
|
|
87
|
-
} as const;
|