magicrealmsshared 0.3.6 → 0.3.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/dist/types/types.d.ts +16 -0
- package/package.json +1 -1
- package/src/types/types.ts +23 -0
package/dist/types/types.d.ts
CHANGED
|
@@ -1,9 +1,25 @@
|
|
|
1
|
+
export type NamedObject<T> = ObjectWithId<T> & {
|
|
2
|
+
name: string;
|
|
3
|
+
};
|
|
1
4
|
export type ObjectWithId<T> = {
|
|
2
5
|
_id: T;
|
|
3
6
|
};
|
|
4
7
|
export type WorldObject<T> = ObjectWithId<T> & {
|
|
5
8
|
pos: GeoJSON.Point;
|
|
6
9
|
};
|
|
10
|
+
export type Privileges = {
|
|
11
|
+
all?: boolean;
|
|
12
|
+
};
|
|
13
|
+
export type Player<T> = ObjectWithId<T> & {
|
|
14
|
+
email: string;
|
|
15
|
+
password: string;
|
|
16
|
+
registerTime: Date;
|
|
17
|
+
loginTime: Date;
|
|
18
|
+
interactTime: Date;
|
|
19
|
+
privileges?: Privileges;
|
|
20
|
+
displayname: string;
|
|
21
|
+
color: number;
|
|
22
|
+
};
|
|
7
23
|
export type Well<T> = WorldObject<T> & {
|
|
8
24
|
name: string;
|
|
9
25
|
color: number;
|
package/package.json
CHANGED
package/src/types/types.ts
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
|
|
2
2
|
//#region Base Types
|
|
3
|
+
export type NamedObject<T> = ObjectWithId<T> & {
|
|
4
|
+
name: string;
|
|
5
|
+
}
|
|
6
|
+
|
|
3
7
|
export type ObjectWithId<T> = {
|
|
4
8
|
_id: T
|
|
5
9
|
}
|
|
@@ -9,6 +13,25 @@
|
|
|
9
13
|
}
|
|
10
14
|
//#endregion
|
|
11
15
|
|
|
16
|
+
export type Privileges = {
|
|
17
|
+
all?: boolean,
|
|
18
|
+
//TODO: add other privileges as required
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export type Player<T> = ObjectWithId<T> & {
|
|
22
|
+
email: string,
|
|
23
|
+
password: string,
|
|
24
|
+
registerTime: Date,
|
|
25
|
+
loginTime: Date,
|
|
26
|
+
interactTime: Date,
|
|
27
|
+
|
|
28
|
+
privileges?: Privileges,
|
|
29
|
+
|
|
30
|
+
displayname: string,
|
|
31
|
+
|
|
32
|
+
color: number,
|
|
33
|
+
};
|
|
34
|
+
|
|
12
35
|
export type Well<T> = WorldObject<T> & {
|
|
13
36
|
name: string,
|
|
14
37
|
color: number,
|