@dative-gpi/foundation-core-domain 0.0.193 → 0.0.195
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/models/alerts/alertDetails.ts +7 -8
- package/models/alerts/alertInfos.ts +5 -7
- package/models/alerts/alertState.ts +22 -23
- package/models/index.ts +1 -0
- package/models/terminals/index.ts +2 -0
- package/models/terminals/terminalDetails.ts +21 -0
- package/models/terminals/terminalInfos.ts +33 -0
- package/models/userOrganisations/userOrganisationInfos.ts +3 -0
- package/package.json +2 -2
|
@@ -1,16 +1,15 @@
|
|
|
1
|
-
import type
|
|
2
|
-
import { AlertInfos } from "./alertInfos";
|
|
1
|
+
import { AlertInfos, type AlertInfosDTO } from "./alertInfos";
|
|
3
2
|
|
|
4
3
|
export class AlertDetails extends AlertInfos {
|
|
5
|
-
|
|
4
|
+
description: string;
|
|
6
5
|
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
constructor(params: AlertDetailsDTO) {
|
|
7
|
+
super(params);
|
|
9
8
|
|
|
10
|
-
|
|
11
|
-
|
|
9
|
+
this.description = params.description;
|
|
10
|
+
}
|
|
12
11
|
}
|
|
13
12
|
|
|
14
13
|
export interface AlertDetailsDTO extends AlertInfosDTO {
|
|
15
|
-
|
|
14
|
+
description: string;
|
|
16
15
|
}
|
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type AlertStatus, type Criticity } from "@dative-gpi/foundation-shared-domain/models";
|
|
2
2
|
import { utcToEpoch } from "@dative-gpi/foundation-shared-domain/tools";
|
|
3
3
|
|
|
4
|
-
import type
|
|
5
|
-
import {
|
|
6
|
-
import type
|
|
7
|
-
import {
|
|
8
|
-
import type { SelectedEntities } from "../enums/sharedEnums";
|
|
9
|
-
import type { DateVariable } from "../shared/dateVariable";
|
|
4
|
+
import { AlertDataDefinition, type AlertDataDefinitionDTO } from "./alertDataDefinition";
|
|
5
|
+
import { AlertState, type AlertStateDTO } from "./alertState";
|
|
6
|
+
import { type SelectedEntities } from "../enums/sharedEnums";
|
|
7
|
+
import { type DateVariable } from "../shared/dateVariable";
|
|
10
8
|
|
|
11
9
|
export class AlertInfos {
|
|
12
10
|
id: string;
|
|
@@ -1,32 +1,31 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type AlertStatus } from "@dative-gpi/foundation-shared-domain/models";
|
|
2
2
|
import { utcToEpoch } from "@dative-gpi/foundation-shared-domain/tools";
|
|
3
3
|
|
|
4
|
-
import type
|
|
5
|
-
import { AlertDataDefinition } from "./alertDataDefinition";
|
|
4
|
+
import { AlertDataDefinition, type AlertDataDefinitionDTO } from "./alertDataDefinition";
|
|
6
5
|
|
|
7
6
|
export class AlertState {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
7
|
+
id: string;
|
|
8
|
+
status: AlertStatus;
|
|
9
|
+
sourceTimestamp: number;
|
|
10
|
+
enqueuedTimestamp: number;
|
|
11
|
+
processedTimestamp: number;
|
|
12
|
+
metadataValues?: AlertDataDefinition[];
|
|
14
13
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
14
|
+
constructor(params: AlertStateDTO) {
|
|
15
|
+
this.id = params.id;
|
|
16
|
+
this.status = params.status;
|
|
17
|
+
this.sourceTimestamp = utcToEpoch(params.sourceTimestamp);
|
|
18
|
+
this.enqueuedTimestamp = utcToEpoch(params.enqueuedTimestamp);
|
|
19
|
+
this.processedTimestamp = utcToEpoch(params.processedTimestamp);
|
|
20
|
+
this.metadataValues = params.metadataValues?.map(dto => new AlertDataDefinition(dto));
|
|
21
|
+
}
|
|
23
22
|
}
|
|
24
23
|
|
|
25
24
|
export interface AlertStateDTO {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
25
|
+
id: string;
|
|
26
|
+
status: AlertStatus;
|
|
27
|
+
sourceTimestamp: string;
|
|
28
|
+
enqueuedTimestamp: string;
|
|
29
|
+
processedTimestamp: string;
|
|
30
|
+
metadataValues?: AlertDataDefinitionDTO[];
|
|
32
31
|
}
|
package/models/index.ts
CHANGED
|
@@ -48,6 +48,7 @@ export * from "./scenarios"; // No service
|
|
|
48
48
|
export * from "./shared"; // No service
|
|
49
49
|
export * from "./serviceAccountOrganisationAuthTokens";
|
|
50
50
|
export * from "./serviceAccountOrganisations";
|
|
51
|
+
export * from "./terminals";
|
|
51
52
|
export * from "./userOrganisationColumns"; // No service
|
|
52
53
|
export * from "./userOrganisations";
|
|
53
54
|
export * from "./userOrganisationTables";
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { TerminalInfos, type TerminalInfosDTO } from "./terminalInfos";
|
|
2
|
+
|
|
3
|
+
export class TerminalDetails extends TerminalInfos {
|
|
4
|
+
constructor(params: TerminalDetailsDTO) {
|
|
5
|
+
super(params);
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export interface TerminalDetailsDTO extends TerminalInfosDTO {
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export interface CreateTerminalDTO {
|
|
13
|
+
label: string;
|
|
14
|
+
icon: string;
|
|
15
|
+
key: string;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export interface UpdateTerminalDTO {
|
|
19
|
+
label: string;
|
|
20
|
+
icon: string;
|
|
21
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { utcToEpoch } from "@dative-gpi/foundation-shared-domain/tools";
|
|
2
|
+
|
|
3
|
+
export class TerminalInfos {
|
|
4
|
+
id: string;
|
|
5
|
+
userId: string;
|
|
6
|
+
label: string;
|
|
7
|
+
icon: string;
|
|
8
|
+
key: string;
|
|
9
|
+
lastConnection: number;
|
|
10
|
+
|
|
11
|
+
constructor(params: TerminalInfosDTO) {
|
|
12
|
+
this.id = params.id;
|
|
13
|
+
this.userId = params.userId;
|
|
14
|
+
this.label = params.label;
|
|
15
|
+
this.icon = params.icon;
|
|
16
|
+
this.key = params.key;
|
|
17
|
+
this.lastConnection = utcToEpoch(params.lastConnection);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export interface TerminalInfosDTO {
|
|
23
|
+
id: string;
|
|
24
|
+
userId: string;
|
|
25
|
+
label: string;
|
|
26
|
+
icon: string;
|
|
27
|
+
key: string;
|
|
28
|
+
lastConnection: string;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
export interface TerminalFilters {
|
|
32
|
+
key?: string | null;
|
|
33
|
+
}
|
|
@@ -13,6 +13,7 @@ export class UserOrganisationInfos {
|
|
|
13
13
|
imageId: string | null;
|
|
14
14
|
userType: UserType;
|
|
15
15
|
validity: UserValidityState;
|
|
16
|
+
allowNotifications: boolean;
|
|
16
17
|
allowSms: boolean;
|
|
17
18
|
allowEmails: boolean;
|
|
18
19
|
email: string;
|
|
@@ -34,6 +35,7 @@ export class UserOrganisationInfos {
|
|
|
34
35
|
this.imageId = params.imageId;
|
|
35
36
|
this.userType = params.userType;
|
|
36
37
|
this.validity = params.validity;
|
|
38
|
+
this.allowNotifications = params.allowNotifications;
|
|
37
39
|
this.allowSms = params.allowSms;
|
|
38
40
|
this.allowEmails = params.allowEmails;
|
|
39
41
|
this.email = params.email;
|
|
@@ -57,6 +59,7 @@ export interface UserOrganisationInfosDTO {
|
|
|
57
59
|
imageId: string | null;
|
|
58
60
|
userType: UserType;
|
|
59
61
|
validity: UserValidityState;
|
|
62
|
+
allowNotifications: boolean;
|
|
60
63
|
allowSms: boolean;
|
|
61
64
|
allowEmails: boolean;
|
|
62
65
|
email: string;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dative-gpi/foundation-core-domain",
|
|
3
3
|
"sideEffects": false,
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.195",
|
|
5
5
|
"description": "",
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"access": "public"
|
|
@@ -9,5 +9,5 @@
|
|
|
9
9
|
"main": "index.ts",
|
|
10
10
|
"author": "",
|
|
11
11
|
"license": "ISC",
|
|
12
|
-
"gitHead": "
|
|
12
|
+
"gitHead": "acda9a6c41eb4f36cd702ef36bfe6be21bb6dd70"
|
|
13
13
|
}
|