@dative-gpi/foundation-core-domain 1.0.44 → 1.0.46
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/alertInfos.ts +11 -11
- package/models/alerts/alertState.ts +5 -5
- package/models/chartOrganisationTypes/chartOrganisationTypeDetails.ts +1 -1
- package/models/chartOrganisationTypes/chartOrganisationTypeInfos.ts +2 -2
- package/models/chartOrganisations/chartOrganisationDetails.ts +1 -1
- package/models/chartOrganisations/chartOrganisationInfos.ts +2 -2
- package/models/charts/chartAxis.ts +1 -1
- package/models/charts/chartDetails.ts +1 -1
- package/models/charts/chartFilter.ts +1 -1
- package/models/charts/chartInfos.ts +2 -2
- package/models/charts/chartOperand.ts +1 -1
- package/models/charts/chartTimeRange.ts +1 -1
- package/models/charts/chartTimeStep.ts +1 -1
- package/models/comments/commentInfos.ts +3 -3
- package/models/connectivityAlerts/connectivityAlertInfos.ts +4 -4
- package/models/customProperties/customPropertyColor.ts +1 -1
- package/models/customProperties/customPropertyInfos.ts +1 -1
- 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/dashboardOrganisationTypeInfos.ts +2 -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/dashboardShallows/dashboardShallowInfos.ts +1 -1
- package/models/dashboardVariables/dashboardVariableDetails.ts +1 -1
- 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/deviceOrganisations/deviceOrganisationAlert.ts +4 -4
- package/models/deviceStatuses/deviceStatusInfos.ts +4 -4
- package/models/index.ts +0 -1
- package/models/notifications/notificationInfos.ts +5 -5
- package/models/organisations/organisationDetails.ts +1 -1
- package/models/roleOrganisationTypes/roleOrganisationTypeInfos.ts +2 -2
- package/models/roleOrganisations/roleOrganisationDetails.ts +1 -1
- package/models/roleOrganisations/roleOrganisationInfos.ts +2 -2
- package/models/scenarioOrganisationTypes/scenarioOrganisationTypeDetails.ts +5 -2
- package/models/scenarioOrganisationTypes/scenarioOrganisationTypeInfos.ts +11 -3
- package/models/scenarioOrganisations/scenarioOrganisationDetails.ts +8 -2
- package/models/scenarioOrganisations/scenarioOrganisationInfos.ts +11 -3
- package/models/scenarios/index.ts +1 -0
- package/models/scenarios/scenarioChart.ts +30 -0
- package/models/serviceAccountOrganisationAuthTokens/serviceAccountOrganisationAuthTokenInfos.ts +3 -3
- package/models/serviceAccountOrganisations/serviceAccountOrganisationInfos.ts +1 -1
- package/models/serviceAccountRoleOrganisations/serviceAccountRoleOrganisationInfos.ts +1 -1
- package/models/shared/timeRange.ts +1 -1
- package/models/userOrganisations/userOrganisationDetails.ts +2 -2
- package/models/userOrganisations/userOrganisationInfos.ts +2 -2
- package/models/widgetTemplates/widgetTemplateInfos.ts +16 -2
- package/models/widgets/widgetInfos.ts +0 -3
- 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
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { type AlertStatus, type Criticity } from "@dative-gpi/foundation-shared-domain/
|
|
2
|
-
import {
|
|
1
|
+
import { type AlertStatus, type Criticity } from "@dative-gpi/foundation-shared-domain/enums";
|
|
2
|
+
import { isoToEpoch } from "@dative-gpi/foundation-shared-domain/tools";
|
|
3
3
|
|
|
4
4
|
import { AlertDataDefinition, type AlertDataDefinitionDTO } from "./alertDataDefinition";
|
|
5
5
|
import { AlertState, type AlertStateDTO } from "./alertState";
|
|
6
|
-
import { type
|
|
6
|
+
import { type EntityType } from "@dative-gpi/foundation-shared-domain/enums";
|
|
7
7
|
import { type DateVariable } from "../shared/dateVariable";
|
|
8
8
|
|
|
9
9
|
export class AlertInfos {
|
|
@@ -55,21 +55,21 @@ export class AlertInfos {
|
|
|
55
55
|
this.acknowledgingUserName = params.acknowledgingUserName;
|
|
56
56
|
this.acknowledgingUserImageId = params.acknowledgingUserImageId;
|
|
57
57
|
this.acknowledgingTimestamp = params.acknowledgingTimestamp ?
|
|
58
|
-
|
|
58
|
+
isoToEpoch(params.acknowledgingTimestamp) : null;
|
|
59
59
|
this.initialState = new AlertState(params.initialState);
|
|
60
60
|
this.triggerSourceTimestamp = params.triggerSourceTimestamp ?
|
|
61
|
-
|
|
61
|
+
isoToEpoch(params.triggerSourceTimestamp) : null;
|
|
62
62
|
this.triggerEnqueuedTimestamp = params.triggerEnqueuedTimestamp ?
|
|
63
|
-
|
|
63
|
+
isoToEpoch(params.triggerEnqueuedTimestamp) : null;
|
|
64
64
|
this.triggerProcessedTimestamp = params.triggerProcessedTimestamp ?
|
|
65
|
-
|
|
65
|
+
isoToEpoch(params.triggerProcessedTimestamp) : null;
|
|
66
66
|
this.lastState = new AlertState(params.lastState);
|
|
67
67
|
this.currentSourceTimestamp = params.currentSourceTimestamp ?
|
|
68
|
-
|
|
68
|
+
isoToEpoch(params.currentSourceTimestamp) : null;
|
|
69
69
|
this.currentEnqueuedTimestamp = params.currentEnqueuedTimestamp ?
|
|
70
|
-
|
|
70
|
+
isoToEpoch(params.currentEnqueuedTimestamp) : null;
|
|
71
71
|
this.currentProcessedTimestamp = params.currentProcessedTimestamp ?
|
|
72
|
-
|
|
72
|
+
isoToEpoch(params.currentProcessedTimestamp) : null;
|
|
73
73
|
this.status = params.status;
|
|
74
74
|
this.tags = params.tags;
|
|
75
75
|
this.history = params.history.map(dto => new AlertState(dto));
|
|
@@ -116,7 +116,7 @@ export interface AlertFilters {
|
|
|
116
116
|
acknowledged?: boolean | null;
|
|
117
117
|
startDate?: string | null;
|
|
118
118
|
endDate?: string | null;
|
|
119
|
-
|
|
119
|
+
EntityType?: EntityType | null;
|
|
120
120
|
entitiesIds?: string[] | null;
|
|
121
121
|
dateVariables?: DateVariable[] | null;
|
|
122
122
|
}
|
|
@@ -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 { AlertDataDefinition, type AlertDataDefinitionDTO } from "./alertDataDefinition";
|
|
5
5
|
|
|
@@ -14,9 +14,9 @@ export class AlertState {
|
|
|
14
14
|
constructor(params: AlertStateDTO) {
|
|
15
15
|
this.id = params.id;
|
|
16
16
|
this.status = params.status;
|
|
17
|
-
this.sourceTimestamp =
|
|
18
|
-
this.enqueuedTimestamp =
|
|
19
|
-
this.processedTimestamp =
|
|
17
|
+
this.sourceTimestamp = isoToEpoch(params.sourceTimestamp);
|
|
18
|
+
this.enqueuedTimestamp = isoToEpoch(params.enqueuedTimestamp);
|
|
19
|
+
this.processedTimestamp = isoToEpoch(params.processedTimestamp);
|
|
20
20
|
this.metadataValues = params.metadataValues?.map(dto => new AlertDataDefinition(dto));
|
|
21
21
|
}
|
|
22
22
|
}
|
|
@@ -20,7 +20,7 @@ import { ChartOperand } from "../charts/chartOperand";
|
|
|
20
20
|
import type { ChartOperandDTO,CreateChartOperandDTO } from "../charts/chartOperand";
|
|
21
21
|
import { ChartSerie } from "../charts/chartSerie";
|
|
22
22
|
import type { ChartSerieDTO,CreateChartSerieDTO } from "../charts/chartSerie";
|
|
23
|
-
import type { ColorSets } from "
|
|
23
|
+
import type { ColorSets } from "@dative-gpi/foundation-shared-domain/enums";
|
|
24
24
|
|
|
25
25
|
export class ChartOrganisationTypeDetails extends ChartOrganisationTypeInfos {
|
|
26
26
|
labelDefault: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ChartModelLabelDTO } from "../charts/chartModelLabel";
|
|
2
2
|
import { ChartModelLabel } from "../charts/chartModelLabel";
|
|
3
|
-
import type { ApplicationScope } from "
|
|
4
|
-
import type { ChartType, PlotPer } from "
|
|
3
|
+
import type { ApplicationScope } from "@dative-gpi/foundation-shared-domain/enums";
|
|
4
|
+
import type { ChartType, PlotPer } from "@dative-gpi/foundation-shared-domain/enums";
|
|
5
5
|
|
|
6
6
|
export class ChartOrganisationTypeInfos {
|
|
7
7
|
id: string;
|
|
@@ -20,7 +20,7 @@ import { ChartOperand } from "../charts/chartOperand";
|
|
|
20
20
|
import type { ChartOperandDTO,CreateChartOperandDTO } from "../charts/chartOperand";
|
|
21
21
|
import { ChartSerie } from "../charts/chartSerie";
|
|
22
22
|
import type { ChartSerieDTO,CreateChartSerieDTO } from "../charts/chartSerie";
|
|
23
|
-
import type { ColorSets } from "
|
|
23
|
+
import type { ColorSets } from "@dative-gpi/foundation-shared-domain/enums";
|
|
24
24
|
|
|
25
25
|
export class ChartOrganisationDetails extends ChartOrganisationInfos {
|
|
26
26
|
labelDefault: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ChartModelLabelDTO } from "../charts/chartModelLabel";
|
|
2
2
|
import { ChartModelLabel } from "../charts/chartModelLabel";
|
|
3
|
-
import type { ApplicationScope } from "
|
|
4
|
-
import type { ChartType, PlotPer } from "
|
|
3
|
+
import type { ApplicationScope } from "@dative-gpi/foundation-shared-domain/enums";
|
|
4
|
+
import type { ChartType, PlotPer } from "@dative-gpi/foundation-shared-domain/enums";
|
|
5
5
|
|
|
6
6
|
export class ChartOrganisationInfos {
|
|
7
7
|
id: string;
|
|
@@ -2,7 +2,7 @@ import type { ChartValueRangeDTO, CreateChartValueRangeDTO } from "./chartValueR
|
|
|
2
2
|
import { ChartValueRange } from "./chartValueRange";
|
|
3
3
|
import type { CreateChartTimeRangeDTO, ChartTimeRangeDTO } from "./chartTimeRange";
|
|
4
4
|
import { ChartTimeRange } from "./chartTimeRange";
|
|
5
|
-
import type { AxisType } from "
|
|
5
|
+
import type { AxisType } from "@dative-gpi/foundation-shared-domain/enums";
|
|
6
6
|
|
|
7
7
|
export class ChartAxis {
|
|
8
8
|
id : string;
|
|
@@ -19,7 +19,7 @@ import type { ChartModifierDTO } from "./chartModifier";
|
|
|
19
19
|
import { ChartFilter} from "./chartFilter";
|
|
20
20
|
import type { ChartFilterDTO } from "./chartFilter";
|
|
21
21
|
|
|
22
|
-
import type { ColorSets } from "
|
|
22
|
+
import type { ColorSets } from "@dative-gpi/foundation-shared-domain/enums";
|
|
23
23
|
|
|
24
24
|
export class ChartDetails extends ChartInfos {
|
|
25
25
|
colorSet: ColorSets;
|
|
@@ -2,7 +2,7 @@ import type { ChartFilterValueDTO, CreateChartFilterValueDTO } from "./chartFilt
|
|
|
2
2
|
import { ChartFilterValue } from "./chartFilterValue";
|
|
3
3
|
import type { ChartFilterTranslationDTO } from "./chartFilterTranslation";
|
|
4
4
|
import { ChartFilterTranslation } from "./chartFilterTranslation";
|
|
5
|
-
import type { FilterType } from "
|
|
5
|
+
import type { FilterType } from "@dative-gpi/foundation-shared-domain/enums";
|
|
6
6
|
|
|
7
7
|
export class ChartFilter {
|
|
8
8
|
id: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ChartModelLabelDTO } from "./chartModelLabel";
|
|
2
2
|
import { ChartModelLabel } from "./chartModelLabel";
|
|
3
|
-
import type { ApplicationScope } from "
|
|
4
|
-
import type { ChartType } from "
|
|
3
|
+
import type { ApplicationScope } from "@dative-gpi/foundation-shared-domain/enums";
|
|
4
|
+
import type { ChartType } from "@dative-gpi/foundation-shared-domain/enums";
|
|
5
5
|
|
|
6
6
|
export class ChartInfos {
|
|
7
7
|
id: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Days } from "@dative-gpi/foundation-shared-domain/
|
|
1
|
+
import type { Days } from "@dative-gpi/foundation-shared-domain/enums";
|
|
2
2
|
|
|
3
3
|
import type { ChartTimeRangeTranslationDTO, CreateChartTimeRangeTranslationDTO } from "./chartTimeRangeTranslation";
|
|
4
4
|
import { ChartTimeRangeTranslation } from "./chartTimeRangeTranslation";
|
|
@@ -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";
|
|
@@ -27,9 +27,9 @@ export class ConnectivityAlertInfos {
|
|
|
27
27
|
this.deviceOrganisationImageId = params.deviceOrganisationImageId;
|
|
28
28
|
this.deviceOrganisationConnectivity = params.deviceOrganisationConnectivity ?
|
|
29
29
|
new DeviceConnectivityInfos({ ...params.deviceOrganisationConnectivity, id: params.deviceOrganisationId }) : null;
|
|
30
|
-
this.triggerProcessedTimestamp =
|
|
30
|
+
this.triggerProcessedTimestamp = isoToEpoch(params.triggerProcessedTimestamp);
|
|
31
31
|
this.resolveProcessedTimestamp = params.resolveProcessedTimestamp ?
|
|
32
|
-
|
|
32
|
+
isoToEpoch(params.resolveProcessedTimestamp) : null;
|
|
33
33
|
this.status = params.status;
|
|
34
34
|
}
|
|
35
35
|
}
|
|
@@ -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;
|
|
@@ -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[];
|
|
@@ -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
|
+
dashboardOrganisationTypeIds?: string[] | null;
|
|
49
50
|
search?: string | null;
|
|
50
51
|
}
|
|
@@ -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
|
+
dashboardOrganisationIds?: 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,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";
|
|
@@ -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;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { AlertStatus, Criticity } from "@dative-gpi/foundation-shared-domain/
|
|
2
|
-
import {
|
|
1
|
+
import type { AlertStatus, Criticity } from "@dative-gpi/foundation-shared-domain/enums";
|
|
2
|
+
import { isoToEpoch } from "@dative-gpi/foundation-shared-domain/tools";
|
|
3
3
|
|
|
4
4
|
export class DeviceOrganisationAlert {
|
|
5
5
|
id: string;
|
|
@@ -14,8 +14,8 @@ export class DeviceOrganisationAlert {
|
|
|
14
14
|
this.label = params.label;
|
|
15
15
|
this.status = params.status;
|
|
16
16
|
this.criticity = params.criticity;
|
|
17
|
-
this.sourceTimestamp = params.sourceTimestamp ?
|
|
18
|
-
this.enqueuedTimestamp = params.enqueuedTimestamp ?
|
|
17
|
+
this.sourceTimestamp = params.sourceTimestamp ? isoToEpoch(params.sourceTimestamp) : undefined;
|
|
18
|
+
this.enqueuedTimestamp = params.enqueuedTimestamp ? isoToEpoch(params.enqueuedTimestamp) : undefined;
|
|
19
19
|
}
|
|
20
20
|
}
|
|
21
21
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { isoToEpoch } from "@dative-gpi/foundation-shared-domain/tools";
|
|
2
2
|
|
|
3
3
|
export class DeviceStatusInfos {
|
|
4
4
|
id: string;
|
|
@@ -33,11 +33,11 @@ export class DeviceStatusGroup {
|
|
|
33
33
|
|
|
34
34
|
constructor(params: DeviceStatusGroupDTO) {
|
|
35
35
|
this.sourceTimestamp = params.sourceTimestamp ?
|
|
36
|
-
|
|
36
|
+
isoToEpoch(params.sourceTimestamp) : null;
|
|
37
37
|
this.enqueuedTimestamp = params.enqueuedTimestamp ?
|
|
38
|
-
|
|
38
|
+
isoToEpoch(params.enqueuedTimestamp) : null;
|
|
39
39
|
this.processedTimestamp = params.processedTimestamp ?
|
|
40
|
-
|
|
40
|
+
isoToEpoch(params.processedTimestamp) : null;
|
|
41
41
|
this.groupByValue = params.groupByValue;
|
|
42
42
|
this.value = params.value;
|
|
43
43
|
this.unit = params.unit;
|
package/models/index.ts
CHANGED
|
@@ -27,7 +27,6 @@ export * from "./dataDefinitionMappings"; // No service
|
|
|
27
27
|
export * from "./deviceConnectivities";
|
|
28
28
|
export * from "./deviceOrganisations";
|
|
29
29
|
export * from "./deviceStatuses";
|
|
30
|
-
export * from "./enums"; // No service
|
|
31
30
|
export * from "./extensionApplications";
|
|
32
31
|
export * from "./folders";
|
|
33
32
|
export * from "./groups";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { type Criticity } from "@dative-gpi/foundation-shared-domain/
|
|
2
|
-
import {
|
|
1
|
+
import { type Criticity } from "@dative-gpi/foundation-shared-domain/enums";
|
|
2
|
+
import { isoToEpoch } from "@dative-gpi/foundation-shared-domain/tools";
|
|
3
3
|
|
|
4
|
-
import { type NotificationType } from "
|
|
4
|
+
import { type NotificationType } from "@dative-gpi/foundation-shared-domain/enums";
|
|
5
5
|
|
|
6
6
|
export class NotificationInfos {
|
|
7
7
|
id: string;
|
|
@@ -18,11 +18,11 @@ export class NotificationInfos {
|
|
|
18
18
|
this.title = params.title;
|
|
19
19
|
this.body = params.body;
|
|
20
20
|
this.pageUrl = params.pageUrl;
|
|
21
|
-
this.timestamp =
|
|
21
|
+
this.timestamp = isoToEpoch(params.timestamp);
|
|
22
22
|
this.criticity = params.criticity as Criticity;
|
|
23
23
|
this.acknowledged = params.acknowledged;
|
|
24
24
|
this.acknowledgingTimestamp = params.acknowledgingTimestamp ?
|
|
25
|
-
|
|
25
|
+
isoToEpoch(params.acknowledgingTimestamp) : null;
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
28
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { PermissionInfos, type PermissionInfosDTO } from "@dative-gpi/foundation-shared-domain/models";
|
|
2
2
|
|
|
3
|
-
import { type ApplicationScope } from "
|
|
4
|
-
import { type UserType } from "
|
|
3
|
+
import { type ApplicationScope } from "@dative-gpi/foundation-shared-domain/enums";
|
|
4
|
+
import { type UserType } from "@dative-gpi/foundation-shared-domain/enums";
|
|
5
5
|
|
|
6
6
|
export class RoleOrganisationTypeInfos {
|
|
7
7
|
id: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { RoleOrganisationInfos, type RoleOrganisationInfosDTO } from "./roleOrganisationInfos";
|
|
2
|
-
import { type RoleType } from "
|
|
2
|
+
import { type RoleType } from "@dative-gpi/foundation-shared-domain/enums";
|
|
3
3
|
|
|
4
4
|
export class RoleOrganisationDetails extends RoleOrganisationInfos {
|
|
5
5
|
description: string;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { PermissionInfos, type PermissionInfosDTO } from "@dative-gpi/foundation-shared-domain/models";
|
|
2
2
|
|
|
3
|
-
import { type ApplicationScope } from "
|
|
4
|
-
import { type UserType } from "
|
|
3
|
+
import { type ApplicationScope } from "@dative-gpi/foundation-shared-domain/enums";
|
|
4
|
+
import { type UserType } from "@dative-gpi/foundation-shared-domain/enums";
|
|
5
5
|
|
|
6
6
|
export class RoleOrganisationInfos {
|
|
7
7
|
id: string;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import type { ResolveOn, TriggerOn } from "@dative-gpi/foundation-shared-domain/
|
|
1
|
+
import type { ResolveOn, TriggerOn } from "@dative-gpi/foundation-shared-domain/enums";
|
|
2
2
|
|
|
3
3
|
import type { ScenarioOrganisationTypeInfosDTO } from "./scenarioOrganisationTypeInfos";
|
|
4
4
|
import { ScenarioOrganisationTypeInfos } from "./scenarioOrganisationTypeInfos";
|
|
5
5
|
import type { CreateTimeRangeDTO, TimeRangeDTO } from "../shared/timeRange";
|
|
6
6
|
import { TimeRange } from "../shared/timeRange";
|
|
7
|
-
import { ScenarioParameter, type CreateScenarioParameterDTO, type ScenarioParameterDTO, type ScenarioTranslationDTO } from "../scenarios";
|
|
7
|
+
import { ScenarioParameter, type CreateScenarioChartDTO, type CreateScenarioParameterDTO, type ScenarioParameterDTO, type ScenarioTranslationDTO } from "../scenarios";
|
|
8
8
|
import { ScenarioTranslation } from "../scenarios";
|
|
9
9
|
|
|
10
10
|
export class ScenarioOrganisationTypeDetails extends ScenarioOrganisationTypeInfos {
|
|
@@ -108,6 +108,8 @@ export interface UpdateScenarioOrganisationTypeDTO {
|
|
|
108
108
|
code: string;
|
|
109
109
|
icon: string;
|
|
110
110
|
tags: string[];
|
|
111
|
+
chartStartDate: string;
|
|
112
|
+
chartEndDate: string;
|
|
111
113
|
alertLabelDefault: string;
|
|
112
114
|
alertDescriptionDefault: string;
|
|
113
115
|
alertCode: string;
|
|
@@ -123,6 +125,7 @@ export interface UpdateScenarioOrganisationTypeDTO {
|
|
|
123
125
|
timeout: number | null;
|
|
124
126
|
lock: number | null;
|
|
125
127
|
waitResolved: boolean;
|
|
128
|
+
charts: CreateScenarioChartDTO[];
|
|
126
129
|
parameters: CreateScenarioParameterDTO[];
|
|
127
130
|
translations: ScenarioTranslationDTO[];
|
|
128
131
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import type { Criticity } from "@dative-gpi/foundation-shared-domain/
|
|
1
|
+
import type { Criticity, ApplicationScope } from "@dative-gpi/foundation-shared-domain/enums";
|
|
2
2
|
|
|
3
|
-
import type
|
|
4
|
-
import { ScenarioParameter, type ScenarioParameterDTO } from "../scenarios";
|
|
3
|
+
import { ScenarioChart, ScenarioParameter, type ScenarioChartDTO, type ScenarioParameterDTO } from "../scenarios";
|
|
5
4
|
|
|
6
5
|
export class ScenarioOrganisationTypeInfos {
|
|
7
6
|
id: string;
|
|
@@ -20,6 +19,9 @@ export class ScenarioOrganisationTypeInfos {
|
|
|
20
19
|
code: string;
|
|
21
20
|
icon: string;
|
|
22
21
|
tags: string[];
|
|
22
|
+
chartStartDate: string;
|
|
23
|
+
chartEndDate: string;
|
|
24
|
+
charts: ScenarioChart[];
|
|
23
25
|
parameters: ScenarioParameter[];
|
|
24
26
|
|
|
25
27
|
constructor(params: ScenarioOrganisationTypeInfosDTO) {
|
|
@@ -38,7 +40,10 @@ export class ScenarioOrganisationTypeInfos {
|
|
|
38
40
|
this.label = params.label;
|
|
39
41
|
this.code = params.code;
|
|
40
42
|
this.icon = params.icon;
|
|
43
|
+
this.chartStartDate = params.chartStartDate;
|
|
44
|
+
this.chartEndDate = params.chartEndDate;
|
|
41
45
|
this.tags = params.tags.slice();
|
|
46
|
+
this.charts = params.charts.map(p => new ScenarioChart(p))
|
|
42
47
|
this.parameters = params.parameters.map(p => new ScenarioParameter(p));
|
|
43
48
|
}
|
|
44
49
|
}
|
|
@@ -60,6 +65,9 @@ export interface ScenarioOrganisationTypeInfosDTO {
|
|
|
60
65
|
code: string;
|
|
61
66
|
icon: string;
|
|
62
67
|
tags: string[];
|
|
68
|
+
chartStartDate: string;
|
|
69
|
+
chartEndDate: string;
|
|
70
|
+
charts: ScenarioChartDTO[];
|
|
63
71
|
parameters: ScenarioParameterDTO[];
|
|
64
72
|
}
|
|
65
73
|
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import type { ResolveOn, TriggerOn } from "@dative-gpi/foundation-shared-domain/
|
|
1
|
+
import type { ResolveOn, TriggerOn } from "@dative-gpi/foundation-shared-domain/enums";
|
|
2
2
|
|
|
3
3
|
import type { ScenarioOrganisationInfosDTO } from "./scenarioOrganisationInfos";
|
|
4
4
|
import { ScenarioOrganisationInfos } from "./scenarioOrganisationInfos";
|
|
5
5
|
import type { CreateTimeRangeDTO, TimeRangeDTO } from "../shared/timeRange";
|
|
6
6
|
import { TimeRange } from "../shared/timeRange";
|
|
7
|
-
import { ScenarioParameter, type CreateScenarioParameterDTO, type ScenarioParameterDTO, type ScenarioTranslationDTO } from "../scenarios";
|
|
7
|
+
import { ScenarioParameter, type CreateScenarioChartDTO, type CreateScenarioParameterDTO, type ScenarioParameterDTO, type ScenarioTranslationDTO } from "../scenarios";
|
|
8
8
|
import { ScenarioTranslation } from "../scenarios";
|
|
9
9
|
|
|
10
10
|
export class ScenarioOrganisationDetails extends ScenarioOrganisationInfos {
|
|
@@ -107,6 +107,8 @@ export interface CreateScenarioOrganisationDTO {
|
|
|
107
107
|
alertCode: string;
|
|
108
108
|
alertIcon: string;
|
|
109
109
|
alertTags: string[];
|
|
110
|
+
chartStartDate: string;
|
|
111
|
+
chartEndDate: string;
|
|
110
112
|
timeRanges: CreateTimeRangeDTO[];
|
|
111
113
|
triggerOn: number;
|
|
112
114
|
triggerCondition: string;
|
|
@@ -117,6 +119,7 @@ export interface CreateScenarioOrganisationDTO {
|
|
|
117
119
|
timeout: number | null;
|
|
118
120
|
lock: number | null;
|
|
119
121
|
waitResolved: boolean;
|
|
122
|
+
charts: CreateScenarioChartDTO[];
|
|
120
123
|
parameters: CreateScenarioParameterDTO[];
|
|
121
124
|
translations: ScenarioTranslationDTO[];
|
|
122
125
|
}
|
|
@@ -133,6 +136,8 @@ export interface UpdateScenarioOrganisationDTO {
|
|
|
133
136
|
code: string;
|
|
134
137
|
icon: string;
|
|
135
138
|
tags: string[];
|
|
139
|
+
chartStartDate: string;
|
|
140
|
+
chartEndDate: string;
|
|
136
141
|
alertLabelDefault: string;
|
|
137
142
|
alertDescriptionDefault: string;
|
|
138
143
|
alertCode: string;
|
|
@@ -148,6 +153,7 @@ export interface UpdateScenarioOrganisationDTO {
|
|
|
148
153
|
timeout: number | null;
|
|
149
154
|
lock: number | null;
|
|
150
155
|
waitResolved: boolean;
|
|
156
|
+
charts: CreateScenarioChartDTO[];
|
|
151
157
|
parameters: CreateScenarioParameterDTO[];
|
|
152
158
|
translations: ScenarioTranslationDTO[];
|
|
153
159
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
import type { Criticity } from "@dative-gpi/foundation-shared-domain/
|
|
1
|
+
import type { Criticity, ApplicationScope } from "@dative-gpi/foundation-shared-domain/enums";
|
|
2
2
|
|
|
3
|
-
import type
|
|
4
|
-
import { ScenarioParameter, type ScenarioParameterDTO } from "../scenarios";
|
|
3
|
+
import { ScenarioParameter, type ScenarioChartDTO, type ScenarioParameterDTO, ScenarioChart } from "../scenarios";
|
|
5
4
|
|
|
6
5
|
export class ScenarioOrganisationInfos {
|
|
7
6
|
id: string;
|
|
@@ -19,6 +18,9 @@ export class ScenarioOrganisationInfos {
|
|
|
19
18
|
code: string;
|
|
20
19
|
icon: string;
|
|
21
20
|
tags: string[];
|
|
21
|
+
chartStartDate: string;
|
|
22
|
+
chartEndDate: string;
|
|
23
|
+
charts: ScenarioChart[];
|
|
22
24
|
parameters: ScenarioParameter[];
|
|
23
25
|
|
|
24
26
|
constructor(params: ScenarioOrganisationInfosDTO) {
|
|
@@ -36,7 +38,10 @@ export class ScenarioOrganisationInfos {
|
|
|
36
38
|
this.label = params.label;
|
|
37
39
|
this.code = params.code;
|
|
38
40
|
this.icon = params.icon;
|
|
41
|
+
this.chartStartDate = params.chartStartDate;
|
|
42
|
+
this.chartEndDate = params.chartEndDate;
|
|
39
43
|
this.tags = params.tags.slice();
|
|
44
|
+
this.charts = params.charts.map(p => new ScenarioChart(p))
|
|
40
45
|
this.parameters = params.parameters.map(p => new ScenarioParameter(p));
|
|
41
46
|
}
|
|
42
47
|
}
|
|
@@ -57,6 +62,9 @@ export interface ScenarioOrganisationInfosDTO {
|
|
|
57
62
|
code: string;
|
|
58
63
|
icon: string;
|
|
59
64
|
tags: string[];
|
|
65
|
+
chartStartDate: string;
|
|
66
|
+
chartEndDate: string;
|
|
67
|
+
charts: ScenarioChartDTO[];
|
|
60
68
|
parameters: ScenarioParameterDTO[];
|
|
61
69
|
}
|
|
62
70
|
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { ApplicationScope } from "../enums/applicationEnums";
|
|
2
|
+
|
|
3
|
+
export class ScenarioChart {
|
|
4
|
+
id: string;
|
|
5
|
+
chartId: string;
|
|
6
|
+
scope: ApplicationScope;
|
|
7
|
+
index: number;
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
constructor(params: ScenarioChartDTO) {
|
|
11
|
+
this.id = params.id;
|
|
12
|
+
this.chartId = params.chartId;
|
|
13
|
+
this.scope = params.scope;
|
|
14
|
+
this.index = params.index;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export interface ScenarioChartDTO {
|
|
19
|
+
id: string;
|
|
20
|
+
chartId: string;
|
|
21
|
+
scope: ApplicationScope;
|
|
22
|
+
index: number;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export interface CreateScenarioChartDTO {
|
|
26
|
+
id: string;
|
|
27
|
+
chartId: string;
|
|
28
|
+
scope: ApplicationScope;
|
|
29
|
+
index: number;
|
|
30
|
+
}
|
package/models/serviceAccountOrganisationAuthTokens/serviceAccountOrganisationAuthTokenInfos.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { isoToEpoch } from "@dative-gpi/foundation-shared-domain/tools";
|
|
2
2
|
|
|
3
3
|
export class ServiceAccountOrganisationAuthTokenInfos {
|
|
4
4
|
id: string;
|
|
@@ -12,8 +12,8 @@ export class ServiceAccountOrganisationAuthTokenInfos {
|
|
|
12
12
|
this.id = params.id;
|
|
13
13
|
this.serviceAccountOrganisationId = params.serviceAccountOrganisationId;
|
|
14
14
|
this.label = params.label;
|
|
15
|
-
this.creationDate =
|
|
16
|
-
this.dateMax =
|
|
15
|
+
this.creationDate = isoToEpoch(params.creationDate);
|
|
16
|
+
this.dateMax = isoToEpoch(params.dateMax);
|
|
17
17
|
this.token = params.token;
|
|
18
18
|
}
|
|
19
19
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PermissionInfos, type PermissionInfosDTO } from "@dative-gpi/foundation-shared-domain/models";
|
|
2
|
-
import { type UserType } from "
|
|
2
|
+
import { type UserType } from "@dative-gpi/foundation-shared-domain/enums";
|
|
3
3
|
|
|
4
4
|
export class ServiceAccountRoleOrganisationInfos {
|
|
5
5
|
id: string;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import type { DashboardType,
|
|
1
|
+
import type { DashboardType, RoleType } from "@dative-gpi/foundation-shared-domain/enums";
|
|
2
|
+
import type { PermissionInfosDTO } from "@dative-gpi/foundation-shared-domain/models";
|
|
2
3
|
import { PermissionInfos } from "@dative-gpi/foundation-shared-domain/models";
|
|
3
4
|
|
|
4
5
|
import type { UserOrganisationInfosDTO } from "./userOrganisationInfos";
|
|
5
6
|
import { UserOrganisationInfos } from "./userOrganisationInfos";
|
|
6
|
-
import type { RoleType } from "../enums/roleEnums";
|
|
7
7
|
|
|
8
8
|
export class UserOrganisationDetails extends UserOrganisationInfos {
|
|
9
9
|
mainDashboardType: DashboardType;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { UserType, UserValidityState } from "
|
|
2
|
-
import type { RoleType } from "
|
|
1
|
+
import type { UserType, UserValidityState } from "@dative-gpi/foundation-shared-domain/enums";
|
|
2
|
+
import type { RoleType } from "@dative-gpi/foundation-shared-domain/enums";
|
|
3
3
|
|
|
4
4
|
export class UserOrganisationInfos {
|
|
5
5
|
id: string;
|
|
@@ -1,4 +1,18 @@
|
|
|
1
|
-
import
|
|
1
|
+
import _ from "lodash";
|
|
2
|
+
import type { WidgetCategory } from "@dative-gpi/foundation-shared-domain/enums";
|
|
3
|
+
|
|
4
|
+
const clean = <T>(meta: T): T => {
|
|
5
|
+
const newMeta = _.cloneDeepWith(meta, (value) => {
|
|
6
|
+
if (typeof value === "string") {
|
|
7
|
+
try {
|
|
8
|
+
return JSON.parse(value as string);
|
|
9
|
+
} catch {
|
|
10
|
+
return value
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
return newMeta;
|
|
15
|
+
}
|
|
2
16
|
|
|
3
17
|
export class WidgetTemplateInfos {
|
|
4
18
|
id: string;
|
|
@@ -20,7 +34,7 @@ export class WidgetTemplateInfos {
|
|
|
20
34
|
this.category = params.category;
|
|
21
35
|
this.defaultWidth = params.defaultWidth;
|
|
22
36
|
this.defaultHeight = params.defaultHeight;
|
|
23
|
-
this.defaultMeta = params.defaultMeta;
|
|
37
|
+
this.defaultMeta = clean(params.defaultMeta);
|
|
24
38
|
}
|
|
25
39
|
}
|
|
26
40
|
|
|
@@ -16,7 +16,6 @@ const clean = <T>(meta: T): T => {
|
|
|
16
16
|
export class WidgetInfos {
|
|
17
17
|
id: string;
|
|
18
18
|
templateId: string;
|
|
19
|
-
code: string;
|
|
20
19
|
hideBorders: boolean;
|
|
21
20
|
width: number;
|
|
22
21
|
height: number;
|
|
@@ -28,7 +27,6 @@ export class WidgetInfos {
|
|
|
28
27
|
constructor(params: WidgetInfosDTO) {
|
|
29
28
|
this.id = params.id;
|
|
30
29
|
this.templateId = params.templateId;
|
|
31
|
-
this.code = params.code;
|
|
32
30
|
this.hideBorders = params.hideBorders;
|
|
33
31
|
this.width = params.width;
|
|
34
32
|
this.height = params.height;
|
|
@@ -42,7 +40,6 @@ export class WidgetInfos {
|
|
|
42
40
|
export interface WidgetInfosDTO {
|
|
43
41
|
id: string;
|
|
44
42
|
templateId: string;
|
|
45
|
-
code: string;
|
|
46
43
|
hideBorders: boolean;
|
|
47
44
|
width: number;
|
|
48
45
|
height: number;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@dative-gpi/foundation-core-domain",
|
|
3
3
|
"sideEffects": false,
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.46",
|
|
5
5
|
"description": "",
|
|
6
6
|
"publishConfig": {
|
|
7
7
|
"access": "public"
|
|
@@ -10,8 +10,8 @@
|
|
|
10
10
|
"author": "",
|
|
11
11
|
"license": "ISC",
|
|
12
12
|
"dependencies": {
|
|
13
|
-
"@dative-gpi/foundation-shared-domain": "1.0.
|
|
14
|
-
"@dative-gpi/foundation-shared-services": "1.0.
|
|
13
|
+
"@dative-gpi/foundation-shared-domain": "1.0.46",
|
|
14
|
+
"@dative-gpi/foundation-shared-services": "1.0.46"
|
|
15
15
|
},
|
|
16
|
-
"gitHead": "
|
|
16
|
+
"gitHead": "2798111f89f8a6eefc603e3777cce7b08cd9f56b"
|
|
17
17
|
}
|
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
export enum ChartOrigin {
|
|
2
|
-
None = 0,
|
|
3
|
-
Organisation = 1,
|
|
4
|
-
OrganisationType = 2
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
export enum ChartType {
|
|
8
|
-
None = 0,
|
|
9
|
-
XY = 1,
|
|
10
|
-
Pie = 2,
|
|
11
|
-
Heatmap = 3,
|
|
12
|
-
Slider = 4,
|
|
13
|
-
Gauge = 5,
|
|
14
|
-
ScoreCard = 6,
|
|
15
|
-
Table = 7
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export enum ColorSets {
|
|
19
|
-
Default = 0,
|
|
20
|
-
Grafana = 1,
|
|
21
|
-
Kelly = 2,
|
|
22
|
-
Armytage = 3,
|
|
23
|
-
ZeileisHornikMurrell = 4,
|
|
24
|
-
Hash = 5
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export enum AxisType {
|
|
28
|
-
None = 0,
|
|
29
|
-
Date = 1,
|
|
30
|
-
Value = 2,
|
|
31
|
-
Category = 3
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
export enum SerieType {
|
|
35
|
-
None = 0,
|
|
36
|
-
Lines = 1,
|
|
37
|
-
Area = 2,
|
|
38
|
-
Range = 3,
|
|
39
|
-
Histogram = 4,
|
|
40
|
-
Operation = 5,
|
|
41
|
-
Planning = 6,
|
|
42
|
-
ScatterPlot = 7,
|
|
43
|
-
Top = 8,
|
|
44
|
-
Bars = 9,
|
|
45
|
-
StackedBars = 10,
|
|
46
|
-
Pie = 11,
|
|
47
|
-
Heatmap = 12,
|
|
48
|
-
Slider = 13,
|
|
49
|
-
Gauge = 14,
|
|
50
|
-
ScoreCard = 15,
|
|
51
|
-
Table = 16
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
export enum PlotPer {
|
|
55
|
-
None = 0,
|
|
56
|
-
SinglePlot = 1,
|
|
57
|
-
Model = 2,
|
|
58
|
-
Group = 3,
|
|
59
|
-
Location = 4,
|
|
60
|
-
Device = 5
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
export enum AggregationType {
|
|
64
|
-
None = 0,
|
|
65
|
-
Sum = 1,
|
|
66
|
-
Cardinal = 2,
|
|
67
|
-
Mean = 3,
|
|
68
|
-
Median = 4,
|
|
69
|
-
First = 5,
|
|
70
|
-
Last = 6,
|
|
71
|
-
Difference = 7,
|
|
72
|
-
Minimum = 8,
|
|
73
|
-
Maximum = 9,
|
|
74
|
-
Range = 10
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
export enum PlanningType {
|
|
78
|
-
None = 0,
|
|
79
|
-
UntilNext = 1,
|
|
80
|
-
ElapsedTime = 2,
|
|
81
|
-
SinglePoint = 3
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
export enum DisplayAs {
|
|
85
|
-
None = 0,
|
|
86
|
-
Bars = 1,
|
|
87
|
-
Lines = 2,
|
|
88
|
-
Points = 3
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
export enum OperationOn {
|
|
92
|
-
None = 0,
|
|
93
|
-
SameGroup = 1,
|
|
94
|
-
SameEntity = 2,
|
|
95
|
-
SameGroupAndEntity = 3
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
export enum HeatmapRule {
|
|
99
|
-
None = 0,
|
|
100
|
-
Gradient = 1,
|
|
101
|
-
Ranges = 2,
|
|
102
|
-
Fixed = 3
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
export enum PieBreakdown {
|
|
106
|
-
Entity = 0,
|
|
107
|
-
Serie = 1,
|
|
108
|
-
Group = 2
|
|
109
|
-
}
|
package/models/enums/index.ts
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
export * from "./actionEnums";
|
|
2
|
-
export * from "./applicationEnums";
|
|
3
|
-
export * from "./chartEnums";
|
|
4
|
-
export * from "./customPropertyEnums";
|
|
5
|
-
export * from "./notificationEnums";
|
|
6
|
-
export * from "./roleEnums";
|
|
7
|
-
export * from "./sharedEnums";
|
|
8
|
-
export * from "./userEnums";
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
export enum SelectedEntities {
|
|
2
|
-
None = 0,
|
|
3
|
-
Models = 1,
|
|
4
|
-
Groups = 2,
|
|
5
|
-
Locations = 3,
|
|
6
|
-
Devices = 5
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
export enum FilterType {
|
|
10
|
-
None = 0,
|
|
11
|
-
Equal = 1,
|
|
12
|
-
More = 2,
|
|
13
|
-
Less = 3,
|
|
14
|
-
MoreOrEqual = 4,
|
|
15
|
-
LessOrEqual = 5,
|
|
16
|
-
Different = 6,
|
|
17
|
-
Contains = 7,
|
|
18
|
-
StartsWith = 8,
|
|
19
|
-
EndsWith = 9
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export enum DataTable {
|
|
23
|
-
None = 0,
|
|
24
|
-
Number = 1,
|
|
25
|
-
String = 2,
|
|
26
|
-
DateTime = 3
|
|
27
|
-
}
|