@dative-gpi/foundation-core-domain 1.0.26 → 1.0.28-remove-deprecated2
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/actions/actionInfos.ts +1 -1
- package/models/alerts/alertDetails.ts +3 -1
- package/models/alerts/alertInfos.ts +15 -11
- package/models/alerts/alertState.ts +5 -5
- package/models/chartOrganisationTypes/chartOrganisationTypeDetails.ts +18 -5
- package/models/chartOrganisationTypes/chartOrganisationTypeInfos.ts +9 -3
- package/models/chartOrganisations/chartOrganisationDetails.ts +21 -8
- package/models/chartOrganisations/chartOrganisationInfos.ts +9 -3
- package/models/charts/chartAllowedStep.ts +31 -0
- package/models/charts/chartAllowedStepTranslation.ts +19 -0
- package/models/charts/chartAxis.ts +1 -1
- package/models/charts/chartDetails.ts +13 -2
- package/models/charts/chartFilter.ts +1 -1
- package/models/charts/chartInfos.ts +5 -2
- package/models/charts/chartOperand.ts +1 -1
- package/models/charts/chartPreset.ts +4 -0
- package/models/charts/chartTimeRange.ts +3 -1
- package/models/charts/chartTimeStep.ts +1 -5
- package/models/charts/index.ts +2 -0
- package/models/comments/commentInfos.ts +3 -3
- package/models/connectivityAlerts/connectivityAlertInfos.ts +10 -4
- package/models/connectivityScenarios/connectivityScenarioDetails.ts +2 -2
- package/models/connectivityScenarios/index.ts +2 -1
- package/models/customProperties/customPropertyColor.ts +1 -1
- package/models/customProperties/customPropertyInfos.ts +1 -4
- package/models/customPropertyValues/customPropertyValueInfos.ts +2 -2
- package/models/dashboardDatePresets/dashboardDatePresetDetails.ts +3 -1
- package/models/dashboardDatePresets/dashboardDatePresetInfos.ts +1 -1
- package/models/dashboardEntityPresets/dashboardEntityPresetDetails.ts +2 -2
- package/models/dashboardEntityPresets/dashboardEntityPresetInfos.ts +4 -4
- package/models/dashboardOrganisationTypes/dashboardOrganisationTypeDetails.ts +4 -1
- package/models/dashboardOrganisationTypes/dashboardOrganisationTypeInfos.ts +2 -1
- package/models/dashboardOrganisations/dashboardOrganisationDetails.ts +3 -1
- package/models/dashboardOrganisations/dashboardOrganisationInfos.ts +2 -1
- package/models/dashboardShallowDatePresets/dashboardShallowDatePresetDetails.ts +1 -1
- package/models/dashboardShallowDatePresets/dashboardShallowDatePresetInfos.ts +1 -1
- package/models/dashboardShallowEntityPresets/dashboardShallowEntityPresetDetails.ts +2 -2
- package/models/dashboardShallowEntityPresets/dashboardShallowEntityPresetInfos.ts +4 -4
- package/models/dashboardShallowVariables/dashboardShallowVariableDetails.ts +1 -5
- package/models/dashboardShallowVariables/dashboardShallowVariableInfos.ts +3 -12
- package/models/dashboardShallows/dashboardShallowDetails.ts +63 -23
- package/models/dashboardShallows/dashboardShallowInfos.ts +1 -1
- package/models/dashboardVariableValues/dashboardVariableValue.ts +6 -3
- package/models/dashboardVariables/dashboardVariableDetails.ts +3 -3
- package/models/dashboardVariables/dashboardVariableInfos.ts +1 -1
- package/models/dashboards/dashboardInfos.ts +1 -1
- package/models/dataDefinitions/dataDefinitionInfos.ts +1 -1
- package/models/deviceConnectivities/deviceConnectivityInfos.ts +5 -5
- package/models/deviceExplorerElements/deviceExplorerElementDetails.ts +11 -0
- package/models/deviceExplorerElements/deviceExplorerElementInfos.ts +116 -0
- package/models/deviceExplorerElements/index.ts +2 -0
- package/models/deviceOrganisations/deviceOrganisationAlert.ts +4 -4
- package/models/deviceOrganisations/deviceOrganisationDetails.ts +0 -3
- package/models/deviceOrganisations/deviceOrganisationInfos.ts +11 -12
- package/models/deviceStatuses/deviceStatusInfos.ts +4 -4
- package/models/folders/folderInfos.ts +1 -0
- package/models/groups/groupInfos.ts +1 -2
- package/models/index.ts +16 -16
- package/models/organisations/organisationDetails.ts +1 -1
- package/models/roleOrganisationTypes/roleOrganisationTypeDetails.ts +7 -8
- package/models/roleOrganisationTypes/roleOrganisationTypeInfos.ts +41 -43
- package/models/roleOrganisations/roleOrganisationDetails.ts +2 -4
- package/models/roleOrganisations/roleOrganisationInfos.ts +36 -38
- package/models/scenarioDeviceOrganisations/scenarioDeviceOrganisationDetails.ts +25 -8
- package/models/scenarioDeviceOrganisations/scenarioDeviceOrganisationInfos.ts +35 -13
- package/models/scenarioOrganisationTypes/scenarioOrganisationTypeDetails.ts +19 -3
- package/models/scenarioOrganisationTypes/scenarioOrganisationTypeInfos.ts +31 -8
- package/models/scenarioOrganisations/scenarioOrganisationDetails.ts +27 -5
- package/models/scenarioOrganisations/scenarioOrganisationInfos.ts +31 -8
- package/models/scenarioParameterDeviceOrganisations/index.ts +2 -0
- package/models/scenarioParameterDeviceOrganisations/scenarioParameterDeviceOrganisationDetails.ts +24 -0
- package/models/scenarioParameterDeviceOrganisations/scenarioParameterDeviceOrganisationInfos.ts +45 -0
- package/models/scenarios/index.ts +5 -1
- package/models/scenarios/scenarioChart.ts +30 -0
- package/models/scenarios/scenarioParameter.ts +52 -0
- package/models/scenarios/scenarioParameterOverride.ts +20 -0
- package/models/scenarios/translationScenarioParameter.ts +14 -0
- package/models/serviceAccountOrganisationAuthTokens/serviceAccountOrganisationAuthTokenInfos.ts +3 -3
- package/models/serviceAccountOrganisations/serviceAccountOrganisationDetails.ts +2 -7
- package/models/serviceAccountOrganisations/serviceAccountOrganisationInfos.ts +1 -5
- package/models/serviceAccountRoleOrganisations/index.ts +2 -0
- package/models/serviceAccountRoleOrganisations/serviceAccountRoleOrganisationDetails.ts +33 -0
- package/models/serviceAccountRoleOrganisations/serviceAccountRoleOrganisationInfos.ts +42 -0
- package/models/shared/timeRange.ts +5 -1
- package/models/userOrganisationTables/userOrganisationTableInfos.ts +2 -2
- package/models/userOrganisations/userOrganisationDetails.ts +2 -2
- package/models/userOrganisations/userOrganisationInfos.ts +3 -2
- package/models/widgetTemplates/widgetTemplateInfos.ts +16 -2
- package/models/widgets/widgetInfos.ts +16 -4
- package/package.json +4 -4
- package/models/enums/actionEnums.ts +0 -6
- package/models/enums/applicationEnums.ts +0 -8
- package/models/enums/chartEnums.ts +0 -109
- package/models/enums/customPropertyEnums.ts +0 -12
- package/models/enums/index.ts +0 -8
- package/models/enums/notificationEnums.ts +0 -6
- package/models/enums/roleEnums.ts +0 -5
- package/models/enums/sharedEnums.ts +0 -27
- package/models/enums/userEnums.ts +0 -12
- package/models/notifications/index.ts +0 -2
- package/models/notifications/notificationDetails.ts +0 -10
- package/models/notifications/notificationInfos.ts +0 -43
- package/models/scenarioDiffusions/index.ts +0 -1
- package/models/scenarioDiffusions/scenarioDiffusion.ts +0 -25
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { isoToEpoch } from "@dative-gpi/foundation-shared-domain/tools";
|
|
2
2
|
|
|
3
3
|
export class CommentInfos {
|
|
4
4
|
id: string;
|
|
@@ -17,11 +17,11 @@ export class CommentInfos {
|
|
|
17
17
|
this.userId = params.userId;
|
|
18
18
|
this.userName = params.userName;
|
|
19
19
|
this.userImageId = params.userImageId;
|
|
20
|
-
this.timestamp =
|
|
20
|
+
this.timestamp = isoToEpoch(params.timestamp)!;
|
|
21
21
|
this.comment = params.comment;
|
|
22
22
|
this.edited = params.edited;
|
|
23
23
|
this.editTimestamp = params.editTimestamp ?
|
|
24
|
-
|
|
24
|
+
isoToEpoch(params.editTimestamp) : null;
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
27
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { AlertStatus } from "@dative-gpi/foundation-shared-domain/
|
|
2
|
-
import {
|
|
1
|
+
import type { AlertStatus } from "@dative-gpi/foundation-shared-domain/enums";
|
|
2
|
+
import { isoToEpoch } from "@dative-gpi/foundation-shared-domain/tools";
|
|
3
3
|
|
|
4
4
|
import type { DeviceConnectivityInfosDTO } from "../deviceConnectivities/deviceConnectivityInfos";
|
|
5
5
|
import { DeviceConnectivityInfos } from "../deviceConnectivities/deviceConnectivityInfos";
|
|
@@ -13,6 +13,8 @@ export class ConnectivityAlertInfos {
|
|
|
13
13
|
deviceOrganisationLabel: string;
|
|
14
14
|
deviceOrganisationImageId: string | null;
|
|
15
15
|
deviceOrganisationConnectivity: DeviceConnectivityInfos | null;
|
|
16
|
+
time: number;
|
|
17
|
+
lastMessageProcessedTimestamp: number;
|
|
16
18
|
triggerProcessedTimestamp: number;
|
|
17
19
|
resolveProcessedTimestamp: number | null;
|
|
18
20
|
status: AlertStatus;
|
|
@@ -27,9 +29,11 @@ export class ConnectivityAlertInfos {
|
|
|
27
29
|
this.deviceOrganisationImageId = params.deviceOrganisationImageId;
|
|
28
30
|
this.deviceOrganisationConnectivity = params.deviceOrganisationConnectivity ?
|
|
29
31
|
new DeviceConnectivityInfos({ ...params.deviceOrganisationConnectivity, id: params.deviceOrganisationId }) : null;
|
|
30
|
-
this.
|
|
32
|
+
this.time = params.time;
|
|
33
|
+
this.lastMessageProcessedTimestamp = isoToEpoch(params.lastMessageProcessedTimestamp);
|
|
34
|
+
this.triggerProcessedTimestamp = isoToEpoch(params.triggerProcessedTimestamp);
|
|
31
35
|
this.resolveProcessedTimestamp = params.resolveProcessedTimestamp ?
|
|
32
|
-
|
|
36
|
+
isoToEpoch(params.resolveProcessedTimestamp) : null;
|
|
33
37
|
this.status = params.status;
|
|
34
38
|
}
|
|
35
39
|
}
|
|
@@ -43,6 +47,8 @@ export interface ConnectivityAlertInfosDTO {
|
|
|
43
47
|
deviceOrganisationLabel: string;
|
|
44
48
|
deviceOrganisationImageId: string | null;
|
|
45
49
|
deviceOrganisationConnectivity: DeviceConnectivityInfosDTO | null;
|
|
50
|
+
time: number;
|
|
51
|
+
lastMessageProcessedTimestamp: string;
|
|
46
52
|
triggerProcessedTimestamp: string;
|
|
47
53
|
resolveProcessedTimestamp: string | null;
|
|
48
54
|
status: AlertStatus;
|
|
@@ -11,8 +11,8 @@ export class ConnectivityScenarioDetails extends ConnectivityScenarioInfos {
|
|
|
11
11
|
export interface ConnectivityScenarioDetailsDTO extends ConnectivityScenarioInfosDTO {
|
|
12
12
|
}
|
|
13
13
|
|
|
14
|
-
export interface
|
|
15
|
-
|
|
14
|
+
export interface UpsertConnectivityScenarioDTO {
|
|
15
|
+
deviceOrganisationsIds: string[];
|
|
16
16
|
time: number;
|
|
17
17
|
warnDeviceManager: boolean;
|
|
18
18
|
warnOnReconnection: boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { CustomPropertyColorDTO } from "./customPropertyColor";
|
|
2
2
|
import { CustomPropertyColor } from "./customPropertyColor";
|
|
3
|
-
import type { PropertyDataType, PropertyEntity } from "
|
|
3
|
+
import type { PropertyDataType, PropertyEntity } from "@dative-gpi/foundation-shared-domain/enums";
|
|
4
4
|
|
|
5
5
|
export class CustomPropertyInfos {
|
|
6
6
|
id: string;
|
|
@@ -10,7 +10,6 @@ export class CustomPropertyInfos {
|
|
|
10
10
|
index: number;
|
|
11
11
|
entity: PropertyEntity;
|
|
12
12
|
dataType: PropertyDataType;
|
|
13
|
-
addInInfos: boolean;
|
|
14
13
|
readOnlyCore: boolean;
|
|
15
14
|
readOnlyAdmin: boolean;
|
|
16
15
|
defaultValue: string;
|
|
@@ -29,7 +28,6 @@ export class CustomPropertyInfos {
|
|
|
29
28
|
this.index = params.index;
|
|
30
29
|
this.entity = params.entity;
|
|
31
30
|
this.dataType = params.dataType;
|
|
32
|
-
this.addInInfos = params.addInInfos;
|
|
33
31
|
this.readOnlyCore = params.readOnlyCore;
|
|
34
32
|
this.readOnlyAdmin = params.readOnlyAdmin;
|
|
35
33
|
this.defaultValue = params.defaultValue;
|
|
@@ -50,7 +48,6 @@ export class CustomPropertyInfos {
|
|
|
50
48
|
index: number;
|
|
51
49
|
entity: number;
|
|
52
50
|
dataType: number;
|
|
53
|
-
addInInfos: boolean;
|
|
54
51
|
readOnlyCore: boolean;
|
|
55
52
|
readOnlyAdmin: boolean;
|
|
56
53
|
defaultValue: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { isoToEpoch } from "@dative-gpi/foundation-shared-domain/tools";
|
|
2
2
|
|
|
3
3
|
export class CustomPropertyValueInfos {
|
|
4
4
|
value: string;
|
|
@@ -7,7 +7,7 @@ export class CustomPropertyValueInfos {
|
|
|
7
7
|
constructor(params: CustomPropertyValueInfosDTO) {
|
|
8
8
|
this.value = params.value;
|
|
9
9
|
this.timestamp = params.timestamp ?
|
|
10
|
-
|
|
10
|
+
isoToEpoch(params.timestamp) : null;
|
|
11
11
|
}
|
|
12
12
|
}
|
|
13
13
|
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import type { AutoRefresh } from "@dative-gpi/foundation-shared-domain/enums";
|
|
2
|
+
|
|
1
3
|
import type { DashboardDatePresetTranslationDTO } from "./dashboardDatePresetTranslation";
|
|
2
4
|
|
|
3
5
|
export interface CreateDashboardDatePresetDTO {
|
|
@@ -6,6 +8,6 @@ export interface CreateDashboardDatePresetDTO {
|
|
|
6
8
|
startDate: string;
|
|
7
9
|
endDate: string;
|
|
8
10
|
useAutoRefresh: boolean;
|
|
9
|
-
autoRefresh:
|
|
11
|
+
autoRefresh: AutoRefresh;
|
|
10
12
|
translations: DashboardDatePresetTranslationDTO[];
|
|
11
13
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AutoRefresh } from "@dative-gpi/foundation-shared-domain/
|
|
1
|
+
import type { AutoRefresh } from "@dative-gpi/foundation-shared-domain/enums";
|
|
2
2
|
import { translate } from "@dative-gpi/foundation-shared-services/tools/translate";
|
|
3
3
|
|
|
4
4
|
import type { DashboardDatePresetTranslationDTO } from "./dashboardDatePresetTranslation";
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import type { DashboardEntityPresetTranslationDTO } from "./dashboardEntityPresetTranslation";
|
|
2
|
-
import type {
|
|
2
|
+
import type { EntityType } from "@dative-gpi/foundation-shared-domain/enums";
|
|
3
3
|
|
|
4
4
|
export interface CreateDashboardEntityPresetDTO {
|
|
5
5
|
hiddenCode: string;
|
|
6
6
|
labelDefault: string;
|
|
7
7
|
singleEntity: boolean;
|
|
8
|
-
|
|
8
|
+
entityType: EntityType;
|
|
9
9
|
entitiesFilters: string;
|
|
10
10
|
entitiesIds: string[];
|
|
11
11
|
translations: DashboardEntityPresetTranslationDTO[];
|
|
@@ -2,13 +2,13 @@ import { translate } from "@dative-gpi/foundation-shared-services/tools/translat
|
|
|
2
2
|
|
|
3
3
|
import type { DashboardEntityPresetTranslationDTO } from "./dashboardEntityPresetTranslation";
|
|
4
4
|
import { DashboardEntityPresetTranslation } from "./dashboardEntityPresetTranslation";
|
|
5
|
-
import type {
|
|
5
|
+
import type { EntityType } from "@dative-gpi/foundation-shared-domain/enums";
|
|
6
6
|
|
|
7
7
|
export class DashboardEntityPresetInfos {
|
|
8
8
|
hiddenCode: string;
|
|
9
9
|
labelDefault: string;
|
|
10
10
|
singleEntity: boolean;
|
|
11
|
-
|
|
11
|
+
entityType: EntityType;
|
|
12
12
|
entitiesFilters: string;
|
|
13
13
|
entitiesIds: string[];
|
|
14
14
|
translations: DashboardEntityPresetTranslation[];
|
|
@@ -21,7 +21,7 @@ export class DashboardEntityPresetInfos {
|
|
|
21
21
|
this.hiddenCode = params.hiddenCode;
|
|
22
22
|
this.labelDefault = params.labelDefault;
|
|
23
23
|
this.singleEntity = params.singleEntity;
|
|
24
|
-
this.
|
|
24
|
+
this.entityType = params.entityType;
|
|
25
25
|
this.entitiesFilters = params.entitiesFilters;
|
|
26
26
|
this.entitiesIds = params.entitiesIds.slice();
|
|
27
27
|
this.translations = params.translations.map(t => new DashboardEntityPresetTranslation(t));
|
|
@@ -32,7 +32,7 @@ export interface DashboardEntityPresetInfosDTO {
|
|
|
32
32
|
hiddenCode: string;
|
|
33
33
|
labelDefault: string;
|
|
34
34
|
singleEntity: boolean;
|
|
35
|
-
|
|
35
|
+
entityType: EntityType;
|
|
36
36
|
entitiesFilters: string;
|
|
37
37
|
entitiesIds: string[];
|
|
38
38
|
translations: DashboardEntityPresetTranslationDTO[];
|
|
@@ -15,13 +15,15 @@ import type { CreateWidgetDTO } from "../widgets/widgetDetails";
|
|
|
15
15
|
export class DashboardOrganisationTypeDetails extends DashboardOrganisationTypeInfos {
|
|
16
16
|
labelDefault: string;
|
|
17
17
|
translations: DashboardTranslation[];
|
|
18
|
+
|
|
19
|
+
widgets: WidgetInfos[];
|
|
20
|
+
|
|
18
21
|
entityPresetCode: string | null;
|
|
19
22
|
datePresetCode: string | null;
|
|
20
23
|
variableCode: string | null;
|
|
21
24
|
datePresets: DashboardDatePresetInfos[];
|
|
22
25
|
entityPresets: DashboardEntityPresetInfos[];
|
|
23
26
|
variables: DashboardVariableInfos[];
|
|
24
|
-
widgets: WidgetInfos[];
|
|
25
27
|
|
|
26
28
|
constructor(params: DashboardOrganisationTypeDetailsDTO) {
|
|
27
29
|
super(params);
|
|
@@ -55,6 +57,7 @@ export interface UpdateDashboardOrganisationTypeDTO {
|
|
|
55
57
|
image: string | null;
|
|
56
58
|
labelDefault: string;
|
|
57
59
|
code: string;
|
|
60
|
+
colors: string[];
|
|
58
61
|
icon: string;
|
|
59
62
|
tags: string[];
|
|
60
63
|
translations: DashboardTranslationDTO[];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ApplicationScope } from "
|
|
1
|
+
import type { ApplicationScope } from "@dative-gpi/foundation-shared-domain/enums";
|
|
2
2
|
|
|
3
3
|
export class DashboardOrganisationTypeInfos {
|
|
4
4
|
id: string;
|
|
@@ -46,5 +46,6 @@ export interface DashboardOrganisationTypeInfosDTO {
|
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
export interface DashboardOrganisationTypeFilters {
|
|
49
|
+
dashboardOrganisationTypesIds?: string[] | null;
|
|
49
50
|
search?: string | null;
|
|
50
51
|
}
|
|
@@ -18,13 +18,15 @@ export class DashboardOrganisationDetails extends DashboardOrganisationInfos {
|
|
|
18
18
|
labelDefault: string;
|
|
19
19
|
path: PathCrumb[];
|
|
20
20
|
translations: DashboardTranslation[];
|
|
21
|
+
|
|
22
|
+
widgets: WidgetInfos[];
|
|
23
|
+
|
|
21
24
|
entityPresetCode: string | null;
|
|
22
25
|
datePresetCode: string | null;
|
|
23
26
|
variableCode: string | null;
|
|
24
27
|
datePresets: DashboardDatePresetInfos[];
|
|
25
28
|
entityPresets: DashboardEntityPresetInfos[];
|
|
26
29
|
variables: DashboardVariableInfos[];
|
|
27
|
-
widgets: WidgetInfos[];
|
|
28
30
|
|
|
29
31
|
constructor(params: DashboardOrganisationDetailsDTO) {
|
|
30
32
|
super(params);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ApplicationScope } from "
|
|
1
|
+
import type { ApplicationScope } from "@dative-gpi/foundation-shared-domain/enums";
|
|
2
2
|
|
|
3
3
|
export class DashboardOrganisationInfos {
|
|
4
4
|
id: string;
|
|
@@ -52,6 +52,7 @@ export interface DashboardOrganisationInfosDTO {
|
|
|
52
52
|
}
|
|
53
53
|
|
|
54
54
|
export interface DashboardOrganisationFilters {
|
|
55
|
+
dashboardOrganisationsIds?: string[] | null;
|
|
55
56
|
root?: boolean | null;
|
|
56
57
|
folderId?: string | null;
|
|
57
58
|
search?: string | null;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { EntityType } from "@dative-gpi/foundation-shared-domain/enums";
|
|
2
2
|
|
|
3
3
|
export interface CreateDashboardShallowEntityPresetDTO {
|
|
4
4
|
hiddenCode: string;
|
|
5
5
|
singleEntity: boolean;
|
|
6
|
-
|
|
6
|
+
entityType: EntityType;
|
|
7
7
|
entitiesFilters: string;
|
|
8
8
|
entitiesIds: string[];
|
|
9
9
|
}
|
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { EntityType } from "@dative-gpi/foundation-shared-domain/enums";
|
|
2
2
|
|
|
3
3
|
export class DashboardShallowEntityPresetInfos {
|
|
4
4
|
hiddenCode: string;
|
|
5
5
|
singleEntity: boolean;
|
|
6
|
-
|
|
6
|
+
entityType: EntityType;
|
|
7
7
|
entitiesFilters: string;
|
|
8
8
|
entitiesIds: string[];
|
|
9
9
|
|
|
10
10
|
constructor(params: DashboardShallowEntityPresetInfosDTO) {
|
|
11
11
|
this.hiddenCode = params.hiddenCode;
|
|
12
12
|
this.singleEntity = params.singleEntity;
|
|
13
|
-
this.
|
|
13
|
+
this.entityType = params.entityType;
|
|
14
14
|
this.entitiesFilters = params.entitiesFilters;
|
|
15
15
|
this.entitiesIds = params.entitiesIds.slice();
|
|
16
16
|
}
|
|
@@ -19,7 +19,7 @@ export class DashboardShallowEntityPresetInfos {
|
|
|
19
19
|
export interface DashboardShallowEntityPresetInfosDTO {
|
|
20
20
|
hiddenCode: string;
|
|
21
21
|
singleEntity: boolean;
|
|
22
|
-
|
|
22
|
+
entityType: EntityType;
|
|
23
23
|
entitiesFilters: string;
|
|
24
24
|
entitiesIds: string[];
|
|
25
25
|
}
|
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
import type { CreateDashboardVariableValueDTO } from "../dashboardVariableValues";
|
|
2
|
-
|
|
3
1
|
export interface CreateDashboardShallowVariableDTO {
|
|
4
2
|
hiddenCode: string;
|
|
5
|
-
|
|
6
|
-
useOnlyAllowedValues: boolean;
|
|
7
|
-
allowedValues: CreateDashboardVariableValueDTO[];
|
|
3
|
+
value: string;
|
|
8
4
|
}
|
|
@@ -1,23 +1,14 @@
|
|
|
1
|
-
import type { DashboardVariableValueDTO } from "../dashboardVariableValues";
|
|
2
|
-
import { DashboardVariableValue } from "../dashboardVariableValues";
|
|
3
|
-
|
|
4
1
|
export class DashboardShallowVariableInfos {
|
|
5
2
|
hiddenCode: string;
|
|
6
|
-
|
|
7
|
-
useOnlyAllowedValues: boolean;
|
|
8
|
-
allowedValues: DashboardVariableValue[];
|
|
3
|
+
value: string;
|
|
9
4
|
|
|
10
5
|
constructor(params: DashboardShallowVariableInfosDTO) {
|
|
11
6
|
this.hiddenCode = params.hiddenCode;
|
|
12
|
-
this.
|
|
13
|
-
this.useOnlyAllowedValues = params.useOnlyAllowedValues;
|
|
14
|
-
this.allowedValues = params.allowedValues.map(dto => new DashboardVariableValue(dto));
|
|
7
|
+
this.value = params.value;
|
|
15
8
|
}
|
|
16
9
|
}
|
|
17
10
|
|
|
18
11
|
export interface DashboardShallowVariableInfosDTO {
|
|
19
12
|
hiddenCode: string;
|
|
20
|
-
|
|
21
|
-
useOnlyAllowedValues: boolean;
|
|
22
|
-
allowedValues: DashboardVariableValueDTO[];
|
|
13
|
+
value: string;
|
|
23
14
|
}
|
|
@@ -19,43 +19,82 @@ import { WidgetInfos } from "../widgets/widgetInfos";
|
|
|
19
19
|
import type { PathCrumbDTO } from "../shared/pathCrumb";
|
|
20
20
|
import { PathCrumb } from "../shared/pathCrumb";
|
|
21
21
|
|
|
22
|
+
|
|
22
23
|
export class DashboardShallowDetails extends DashboardShallowInfos {
|
|
23
24
|
labelDefault: string;
|
|
25
|
+
translations: DashboardTranslation[];
|
|
24
26
|
path: PathCrumb[];
|
|
27
|
+
|
|
28
|
+
widgets: WidgetInfos[];
|
|
29
|
+
|
|
30
|
+
defaultEntityPresetCode: string | null;
|
|
31
|
+
defaultDatePresetCode: string | null;
|
|
32
|
+
defaultVariableCode: string | null;
|
|
33
|
+
defaultDatePresets: DashboardDatePresetInfos[];
|
|
34
|
+
defaultEntityPresets: DashboardEntityPresetInfos[];
|
|
35
|
+
defaultVariables: DashboardVariableInfos[];
|
|
36
|
+
|
|
25
37
|
overrideEntityPresetCode: string | null;
|
|
26
38
|
overrideDatePresetCode: string | null;
|
|
27
39
|
overrideVariableCode: string | null;
|
|
28
40
|
overrideDatePresets: DashboardShallowDatePresetInfos[];
|
|
29
41
|
overrideEntityPresets: DashboardShallowEntityPresetInfos[];
|
|
30
42
|
overrideVariables: DashboardShallowVariableInfos[];
|
|
31
|
-
|
|
32
|
-
entityPresetCode
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
43
|
+
|
|
44
|
+
get entityPresetCode() {
|
|
45
|
+
return this.overrideEntityPresetCode ?? this.defaultEntityPresetCode;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
get datePresetCode() {
|
|
49
|
+
return this.overrideDatePresetCode ?? this.defaultDatePresetCode;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
get variableCode() {
|
|
53
|
+
return this.overrideVariableCode ?? this.defaultVariableCode;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
get datePresets() : DashboardDatePresetInfos[] {
|
|
57
|
+
return this.defaultDatePresets.map(d => {
|
|
58
|
+
const override = this.overrideDatePresets.find(od => od.hiddenCode === d.hiddenCode);
|
|
59
|
+
return override ? new DashboardDatePresetInfos({ ...d, ...override }) : d;
|
|
60
|
+
})
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
get entityPresets() {
|
|
64
|
+
return this.defaultEntityPresets.map(d => {
|
|
65
|
+
const override = this.overrideEntityPresets.find(od => od.hiddenCode === d.hiddenCode);
|
|
66
|
+
return override ? new DashboardEntityPresetInfos({ ...d, ...override }) : d;
|
|
67
|
+
})
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
get variables() {
|
|
71
|
+
return this.defaultVariables.map(d => {
|
|
72
|
+
const override = this.overrideVariables.find(od => od.hiddenCode === d.hiddenCode);
|
|
73
|
+
return override ? new DashboardVariableInfos({ ...d, ...override }) : d;
|
|
74
|
+
})
|
|
75
|
+
}
|
|
39
76
|
|
|
40
77
|
constructor(params: DashboardShallowDetailsDTO) {
|
|
41
78
|
super(params);
|
|
42
|
-
|
|
79
|
+
|
|
43
80
|
this.labelDefault = params.labelDefault;
|
|
44
81
|
this.path = params.path.map(dto => new PathCrumb(dto)).sort((a, b) => b.index - a.index);
|
|
82
|
+
this.translations = params.translations.map(t => new DashboardTranslation(t));
|
|
83
|
+
this.widgets = params.widgets.map(dto => new WidgetInfos(dto));
|
|
84
|
+
|
|
45
85
|
this.overrideEntityPresetCode = params.overrideEntityPresetCode;
|
|
46
86
|
this.overrideDatePresetCode = params.overrideDatePresetCode;
|
|
47
87
|
this.overrideVariableCode = params.overrideVariableCode;
|
|
48
88
|
this.overrideDatePresets = params.overrideDatePresets.map(dto => new DashboardShallowDatePresetInfos(dto));
|
|
49
89
|
this.overrideEntityPresets = params.overrideEntityPresets.map(dto => new DashboardShallowEntityPresetInfos(dto));
|
|
50
90
|
this.overrideVariables = params.overrideVariables.map(dto => new DashboardShallowVariableInfos(dto));
|
|
51
|
-
|
|
52
|
-
this.
|
|
53
|
-
this.
|
|
54
|
-
this.
|
|
55
|
-
this.
|
|
56
|
-
this.
|
|
57
|
-
this.
|
|
58
|
-
this.widgets = params.widgets.map(dto => new WidgetInfos(dto));
|
|
91
|
+
|
|
92
|
+
this.defaultEntityPresetCode = params.defaultEntityPresetCode;
|
|
93
|
+
this.defaultDatePresetCode = params.defaultDatePresetCode;
|
|
94
|
+
this.defaultVariableCode = params.defaultVariableCode;
|
|
95
|
+
this.defaultDatePresets = params.defaultDatePresets.map(dto => new DashboardDatePresetInfos(dto));
|
|
96
|
+
this.defaultEntityPresets = params.defaultEntityPresets.map(dto => new DashboardEntityPresetInfos(dto));
|
|
97
|
+
this.defaultVariables = params.defaultVariables.map(dto => new DashboardVariableInfos(dto));
|
|
59
98
|
}
|
|
60
99
|
}
|
|
61
100
|
|
|
@@ -71,12 +110,12 @@ export interface DashboardShallowDetailsDTO extends DashboardShallowInfosDTO {
|
|
|
71
110
|
translations: DashboardTranslationDTO[];
|
|
72
111
|
dashboardId: string;
|
|
73
112
|
scope: number;
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
113
|
+
defaultEntityPresetCode: string | null;
|
|
114
|
+
defaultDatePresetCode: string | null;
|
|
115
|
+
defaultVariableCode: string | null;
|
|
116
|
+
defaultDatePresets: DashboardDatePresetInfosDTO[];
|
|
117
|
+
defaultEntityPresets: DashboardEntityPresetInfosDTO[];
|
|
118
|
+
defaultVariables: DashboardVariableInfosDTO[];
|
|
80
119
|
widgets: WidgetInfosDTO[];
|
|
81
120
|
}
|
|
82
121
|
|
|
@@ -90,6 +129,7 @@ export interface UpdateDashboardShallowDTO {
|
|
|
90
129
|
image: string | null;
|
|
91
130
|
labelDefault: string;
|
|
92
131
|
code: string;
|
|
132
|
+
colors: string[];
|
|
93
133
|
icon: string;
|
|
94
134
|
tags: string[];
|
|
95
135
|
overrideEntityPresetCode: string | null;
|
|
@@ -1,15 +1,19 @@
|
|
|
1
|
+
import { translate } from "@dative-gpi/foundation-shared-services/tools/translate";
|
|
2
|
+
|
|
1
3
|
import type { DashboardVariableValueTranslationDTO } from "./dashboardVariableValueTranslation";
|
|
2
4
|
import { DashboardVariableValueTranslation } from "./dashboardVariableValueTranslation";
|
|
3
5
|
|
|
4
6
|
export class DashboardVariableValue {
|
|
5
7
|
value: string;
|
|
6
|
-
label: string;
|
|
7
8
|
labelDefault: string;
|
|
8
9
|
translations: DashboardVariableValueTranslation[];
|
|
9
10
|
|
|
11
|
+
get label() {
|
|
12
|
+
return translate(this.translations, t => t.label, this.labelDefault)
|
|
13
|
+
};
|
|
14
|
+
|
|
10
15
|
constructor(params: DashboardVariableValueDTO) {
|
|
11
16
|
this.value = params.value;
|
|
12
|
-
this.label = params.label;
|
|
13
17
|
this.labelDefault = params.labelDefault;
|
|
14
18
|
this.translations = params.translations.map(t => new DashboardVariableValueTranslation(t));
|
|
15
19
|
}
|
|
@@ -17,7 +21,6 @@ export class DashboardVariableValue {
|
|
|
17
21
|
|
|
18
22
|
export interface DashboardVariableValueDTO {
|
|
19
23
|
value: string;
|
|
20
|
-
label: string;
|
|
21
24
|
labelDefault: string;
|
|
22
25
|
translations: DashboardVariableValueTranslationDTO[];
|
|
23
26
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { DashboardVariableType } from "@dative-gpi/foundation-shared-domain/
|
|
1
|
+
import type { DashboardVariableType } from "@dative-gpi/foundation-shared-domain/enums";
|
|
2
2
|
|
|
3
3
|
import type { DashboardVariableTranslationDTO } from "./dashboardVariableTranslation";
|
|
4
4
|
import type { CreateDashboardVariableValueDTO } from "../dashboardVariableValues";
|
|
@@ -8,8 +8,8 @@ export interface CreateDashboardVariableDTO {
|
|
|
8
8
|
variableType: DashboardVariableType;
|
|
9
9
|
labelDefault: string;
|
|
10
10
|
code: string;
|
|
11
|
-
|
|
11
|
+
value: string;
|
|
12
12
|
useOnlyAllowedValues: boolean;
|
|
13
13
|
allowedValues: CreateDashboardVariableValueDTO[];
|
|
14
14
|
translations: DashboardVariableTranslationDTO[];
|
|
15
|
-
}
|
|
15
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { DashboardVariableType } from "@dative-gpi/foundation-shared-domain/
|
|
1
|
+
import type { DashboardVariableType } from "@dative-gpi/foundation-shared-domain/enums";
|
|
2
2
|
|
|
3
3
|
import { DashboardVariableTranslation, type DashboardVariableTranslationDTO } from "./dashboardVariableTranslation";
|
|
4
4
|
import { DashboardVariableValue, type DashboardVariableValueDTO } from "../dashboardVariableValues";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { DataDefinitionMappingInfosDTO } from "../dataDefinitionMappings/dataDefinitionMappingInfos";
|
|
2
2
|
import { DataDefinitionMappingInfos } from "../dataDefinitionMappings/dataDefinitionMappingInfos";
|
|
3
|
-
import type { DataTable } from "
|
|
3
|
+
import type { DataTable } from "@dative-gpi/foundation-shared-domain/enums";
|
|
4
4
|
|
|
5
5
|
export class DataDefinitionInfos {
|
|
6
6
|
id: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { ConnectivityStatus } from "@dative-gpi/foundation-shared-domain/
|
|
2
|
-
import {
|
|
1
|
+
import type { ConnectivityStatus } from "@dative-gpi/foundation-shared-domain/enums";
|
|
2
|
+
import { isoToEpoch } from "@dative-gpi/foundation-shared-domain/tools";
|
|
3
3
|
|
|
4
4
|
export class DeviceConnectivityInfos {
|
|
5
5
|
id: string;
|
|
@@ -13,11 +13,11 @@ export class DeviceConnectivityInfos {
|
|
|
13
13
|
constructor(params: DeviceConnectivityInfosDTO) {
|
|
14
14
|
this.id = params.id;
|
|
15
15
|
this.sourceTimestamp = params.sourceTimestamp ?
|
|
16
|
-
|
|
16
|
+
isoToEpoch(params.sourceTimestamp) : null;
|
|
17
17
|
this.enqueuedTimestamp = params.enqueuedTimestamp ?
|
|
18
|
-
|
|
18
|
+
isoToEpoch(params.enqueuedTimestamp) : null;
|
|
19
19
|
this.processedTimestamp = params.processedTimestamp ?
|
|
20
|
-
|
|
20
|
+
isoToEpoch(params.processedTimestamp) : null;
|
|
21
21
|
this.status = params.status;
|
|
22
22
|
this.icon = params.icon;
|
|
23
23
|
this.color = params.color;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { DeviceExplorerElementInfos, type DeviceExplorerElementInfosDTO } from "./deviceExplorerElementInfos";
|
|
2
|
+
|
|
3
|
+
export class DeviceExplorerElementDetails extends DeviceExplorerElementInfos {
|
|
4
|
+
|
|
5
|
+
constructor(params: DeviceExplorerElementDetailsDTO) {
|
|
6
|
+
super(params);
|
|
7
|
+
}
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export interface DeviceExplorerElementDetailsDTO extends DeviceExplorerElementInfosDTO {
|
|
11
|
+
}
|