tering-serieuze-types 1.2.4 → 1.3.0
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/dto/index.ts +41 -0
- package/interfaces/index.ts +29 -1
- package/package.json +1 -1
package/dto/index.ts
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { ToggleableUserInterfaceProperties } from '../interfaces';
|
|
2
|
+
|
|
3
|
+
export class PlayJingleDto {
|
|
4
|
+
folder: string;
|
|
5
|
+
|
|
6
|
+
file: string;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export class AddUserDto {
|
|
10
|
+
email: string;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export class RemoveUserDto {
|
|
14
|
+
id: number;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export class ToggleBoolDto {
|
|
18
|
+
id: number;
|
|
19
|
+
field: keyof ToggleableUserInterfaceProperties;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export class EmulateFireDepartmentDto {
|
|
23
|
+
city: string;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export class RemoveButtonDto {
|
|
27
|
+
buttonId: string;
|
|
28
|
+
owner: number;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export class SaveButtonEventDto {
|
|
32
|
+
ButtonSingleClick: string[];
|
|
33
|
+
ButtonDoubleClick: string[];
|
|
34
|
+
ButtonHold: string[];
|
|
35
|
+
[key: string]: string[];
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export class HandleClickDto {
|
|
39
|
+
bdAddr: string;
|
|
40
|
+
clickType: string;
|
|
41
|
+
}
|
package/interfaces/index.ts
CHANGED
|
@@ -1,9 +1,37 @@
|
|
|
1
|
+
export interface UserInterface extends ToggleableUserInterfaceProperties {
|
|
2
|
+
id: string;
|
|
3
|
+
email: string;
|
|
4
|
+
favoriteJingles: string[];
|
|
5
|
+
isRegistering?: number;
|
|
6
|
+
windowState: any;
|
|
7
|
+
buttons: ButtonInterface[];
|
|
8
|
+
}
|
|
9
|
+
|
|
1
10
|
export interface ToggleableUserInterfaceProperties {
|
|
2
11
|
isAdmin: boolean;
|
|
3
12
|
isBanned: boolean;
|
|
4
13
|
playJinglesLocal: boolean;
|
|
5
14
|
}
|
|
6
15
|
|
|
16
|
+
export interface ButtonInterface {
|
|
17
|
+
bdAddr: string;
|
|
18
|
+
owner?: UserInterface;
|
|
19
|
+
batteryLevel?: number;
|
|
20
|
+
lastBatteryUpdate?: Date;
|
|
21
|
+
ButtonSingleClick?: WebsocketAction;
|
|
22
|
+
ButtonDoubleClick?: WebsocketAction;
|
|
23
|
+
ButtonHold?: WebsocketAction;
|
|
24
|
+
batteryState?: number;
|
|
25
|
+
|
|
26
|
+
[key: string]: any;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export interface WebsocketAction {
|
|
30
|
+
serviceName: string;
|
|
31
|
+
methodName: string;
|
|
32
|
+
data: any;
|
|
33
|
+
}
|
|
34
|
+
|
|
7
35
|
export interface PlayJingleDto {
|
|
8
36
|
folder: string;
|
|
9
37
|
|
|
@@ -42,5 +70,5 @@ export interface SaveButtonEventDto {
|
|
|
42
70
|
|
|
43
71
|
export interface HandleClickDto {
|
|
44
72
|
bdAddr: string;
|
|
45
|
-
|
|
73
|
+
clickType: string;
|
|
46
74
|
}
|