@dative-gpi/foundation-core-domain 0.0.8 → 0.0.9
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/actionDetails.ts +10 -0
- package/models/actions/actionInfos.ts +28 -0
- package/models/actions/index.ts +2 -0
- package/models/alerts/alertInfos.ts +17 -15
- package/models/alerts/alertState.ts +9 -7
- package/models/authTokens/authTokenInfos.ts +6 -4
- package/models/chartOrganisationTypes/chartOrganisationTypeDetails.ts +61 -0
- package/models/chartOrganisationTypes/chartOrganisationTypeInfos.ts +66 -0
- package/models/chartOrganisationTypes/index.ts +2 -0
- package/models/chartOrganisations/chartOrganisationDetails.ts +65 -0
- package/models/chartOrganisations/chartOrganisationInfos.ts +63 -0
- package/models/chartOrganisations/index.ts +2 -0
- package/models/charts/chartAxis.ts +57 -0
- package/models/charts/chartDetails.ts +53 -0
- package/models/charts/chartFilter.ts +30 -0
- package/models/charts/chartFilterValue.ts +23 -0
- package/models/charts/chartInfos.ts +52 -0
- package/models/charts/chartModelLabel.ts +14 -0
- package/models/charts/chartModifier.ts +19 -0
- package/models/charts/chartOperand.ts +61 -0
- package/models/charts/chartPlot.ts +28 -0
- package/models/charts/chartSerie.ts +162 -0
- package/models/charts/chartSerieTranslation.ts +27 -0
- package/models/charts/chartTimeRange.ts +48 -0
- package/models/charts/chartTimeRangeTranslation.ts +19 -0
- package/models/charts/chartTimeStep.ts +25 -0
- package/models/charts/chartTranslation.ts +23 -0
- package/models/charts/chartValueRange.ts +39 -0
- package/models/charts/chartValueRangeTranslation.ts +19 -0
- package/models/charts/chartVariable.ts +19 -0
- package/models/charts/index.ts +18 -0
- package/models/comments/commentDetails.ts +19 -0
- package/models/comments/commentInfos.ts +50 -0
- package/models/comments/index.ts +2 -0
- package/models/connectivityAlerts/connectivityAlertInfos.ts +6 -4
- package/models/connectivityScenarios/connectivityScenarioDetails.ts +25 -0
- package/models/connectivityScenarios/connectivityScenarioInfos.ts +56 -0
- package/models/connectivityScenarios/index.ts +2 -0
- package/models/customPropertyValues/customPropertyValueInfos.ts +4 -2
- package/models/dashboardOrganisationTypes/dashboardOrganisationTypeDetails.ts +72 -0
- package/models/dashboardOrganisationTypes/dashboardOrganisationTypeInfos.ts +44 -0
- package/models/dashboardOrganisationTypes/index.ts +2 -0
- package/models/dashboardOrganisations/dashboardOrganisationDetails.ts +84 -0
- package/models/dashboardOrganisations/dashboardOrganisationInfos.ts +52 -0
- package/models/dashboardOrganisations/index.ts +2 -0
- package/models/dashboardShallows/dashboardShallowDetails.ts +103 -0
- package/models/dashboardShallows/dashboardShallowInfos.ts +55 -0
- package/models/dashboardShallows/index.ts +2 -0
- package/models/dashboards/dashboardDetails.ts +45 -0
- package/models/dashboards/dashboardInfos.ts +16 -0
- package/models/dashboards/index.ts +2 -0
- package/models/deviceConnectivities/deviceConnectivityInfos.ts +8 -7
- package/models/deviceOrganisations/deviceOrganisationAlert.ts +6 -5
- package/models/deviceOrganisations/deviceOrganisationInfos.ts +4 -4
- package/models/deviceStatuses/deviceStatusInfos.ts +12 -10
- package/models/enums/actionEnums.ts +6 -0
- package/models/enums/chartEnums.ts +103 -0
- package/models/enums/dashboardEnums.ts +24 -29
- package/models/enums/index.ts +2 -3
- package/models/enums/sharedEnums.ts +30 -0
- package/models/enums/userEnums.ts +7 -8
- package/models/extensionApplications/extensionApplicationDetails.ts +17 -0
- package/models/extensionApplications/extensionApplicationInfos.ts +18 -0
- package/models/extensionApplications/index.ts +2 -0
- package/models/folders/folderDetails.ts +33 -0
- package/models/folders/folderInfos.ts +58 -0
- package/models/folders/index.ts +2 -0
- package/models/groups/groupInfos.ts +2 -2
- package/models/index.ts +23 -11
- package/models/modelStatuses/index.ts +2 -1
- package/models/modelStatuses/modelStatusDetails.ts +10 -0
- package/models/modelStatuses/{modelStatus.ts → modelStatusInfos.ts} +19 -11
- package/models/organisations/index.ts +1 -2
- package/models/organisations/organisationDetails.ts +1 -48
- package/models/roleOrganisationTypes/roleOrganisationTypeInfos.ts +2 -1
- package/models/roleOrganisations/roleOrganisationInfos.ts +2 -1
- package/models/routes/applicationRoute.ts +35 -0
- package/models/routes/index.ts +3 -0
- package/models/routes/routeDetails.ts +10 -0
- package/models/routes/routeInfos.ts +35 -0
- package/models/scenarioDeviceOrganisations/index.ts +2 -0
- package/models/scenarioDeviceOrganisations/scenarioDeviceOrganisationDetails.ts +36 -0
- package/models/scenarioDeviceOrganisations/scenarioDeviceOrganisationInfos.ts +70 -0
- package/models/scenarioDiffusions/index.ts +1 -0
- package/models/scenarioDiffusions/scenarioDiffusion.ts +25 -0
- package/models/scenarioOrganisationTypes/index.ts +2 -0
- package/models/scenarioOrganisationTypes/scenarioOrganisationTypeDetails.ts +148 -0
- package/models/scenarioOrganisationTypes/scenarioOrganisationTypeInfos.ts +64 -0
- package/models/scenarioOrganisations/index.ts +2 -0
- package/models/scenarioOrganisations/scenarioOrganisationDetails.ts +181 -0
- package/models/scenarioOrganisations/scenarioOrganisationInfos.ts +61 -0
- package/models/shared/index.ts +3 -1
- package/models/shared/timeRange.ts +37 -0
- package/models/shared/valueRange.ts +19 -0
- package/models/userOrganisationDispositions/index.ts +2 -0
- package/models/userOrganisationDispositions/userOrganisationDispositionDetails.ts +16 -0
- package/models/userOrganisationDispositions/userOrganisationDispositionInfos.ts +32 -0
- package/models/userOrganisations/userOrganisationDetails.ts +2 -1
- package/models/widgetTemplates/index.ts +2 -0
- package/models/widgetTemplates/widgetTemplateDetails.ts +10 -0
- package/models/widgetTemplates/widgetTemplateInfos.ts +36 -0
- package/models/widgets/index.ts +2 -0
- package/models/widgets/widgetDetails.ts +20 -0
- package/models/widgets/widgetInfos.ts +35 -0
- package/package.json +2 -2
- package/models/applications/applicationDetails.ts +0 -16
- package/models/applications/applicationInfos.ts +0 -29
- package/models/applications/index.ts +0 -2
- package/models/enums/alertEnums.ts +0 -30
- package/models/enums/dataDefinitionEnums.ts +0 -5
- package/models/enums/deviceEnums.ts +0 -7
- package/models/families/familyDetails.ts +0 -18
- package/models/families/familyInfos.ts +0 -18
- package/models/families/index.ts +0 -2
- package/models/languages/index.ts +0 -2
- package/models/languages/languageDetails.ts +0 -10
- package/models/languages/languageInfos.ts +0 -24
- package/models/organisations/organisationInfos.ts +0 -33
- package/models/permissions/index.ts +0 -2
- package/models/permissions/permissionDetails.ts +0 -10
- package/models/permissions/permissionInfos.ts +0 -17
- package/models/translations/index.ts +0 -2
- package/models/translations/translationDetails.ts +0 -10
- package/models/translations/translationInfos.ts +0 -17
- package/models/users/index.ts +0 -2
- package/models/users/userDetails.ts +0 -39
- package/models/users/userInfos.ts +0 -39
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { ActionType } from "../enums/actionEnums";
|
|
2
|
+
|
|
3
|
+
export class ActionInfos {
|
|
4
|
+
extensionId?: string;
|
|
5
|
+
actionType: ActionType;
|
|
6
|
+
path: string;
|
|
7
|
+
uri: string;
|
|
8
|
+
label: string;
|
|
9
|
+
icon: string;
|
|
10
|
+
|
|
11
|
+
constructor(params: ActionInfosDTO) {
|
|
12
|
+
this.extensionId = params.extensionId;
|
|
13
|
+
this.actionType = params.actionType;
|
|
14
|
+
this.path = params.path;
|
|
15
|
+
this.uri = params.uri;
|
|
16
|
+
this.label = params.label;
|
|
17
|
+
this.icon = params.icon;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export interface ActionInfosDTO {
|
|
22
|
+
extensionId?: string;
|
|
23
|
+
actionType: ActionType;
|
|
24
|
+
path: string;
|
|
25
|
+
uri: string;
|
|
26
|
+
label: string;
|
|
27
|
+
icon: string;
|
|
28
|
+
}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import { AlertStatus, Criticity } from "@dative-gpi/foundation-shared-domain/models";
|
|
2
|
+
import { DatesTools } from "@dative-gpi/foundation-shared-services/tools";
|
|
3
|
+
|
|
1
4
|
import { AlertDataDefinition, AlertDataDefinitionDTO } from "./alertDataDefinition";
|
|
2
|
-
import { AlertStatus, Criticity } from "../enums/alertEnums";
|
|
3
5
|
import { AlertState, AlertStateDTO } from "./alertState";
|
|
4
6
|
import { SelectedEntities } from "../enums/sharedEnums";
|
|
5
7
|
import { DateVariable } from "../shared/dateVariable";
|
|
@@ -54,15 +56,15 @@ export class AlertInfos {
|
|
|
54
56
|
this.acknowledgingUserImageBlurHash = params.acknowledgingUserImageBlurHash;
|
|
55
57
|
this.acknowledgingUserImageWidth = params.acknowledgingUserImageWidth;
|
|
56
58
|
this.acknowledgingUserImageHeight = params.acknowledgingUserImageHeight;
|
|
57
|
-
this.acknowledgingTimestamp = params.acknowledgingTimestamp;
|
|
59
|
+
this.acknowledgingTimestamp = params.acknowledgingTimestamp ? DatesTools.utcToEpoch(params.acknowledgingTimestamp) : undefined;
|
|
58
60
|
this.initialState = new AlertState(params.initialState);
|
|
59
|
-
this.triggerSourceTimestamp = params.triggerSourceTimestamp;
|
|
60
|
-
this.triggerEnqueuedTimestamp = params.triggerEnqueuedTimestamp;
|
|
61
|
-
this.triggerProcessedTimestamp = params.triggerProcessedTimestamp;
|
|
61
|
+
this.triggerSourceTimestamp = params.triggerSourceTimestamp ? DatesTools.utcToEpoch(params.triggerSourceTimestamp) : undefined;
|
|
62
|
+
this.triggerEnqueuedTimestamp = params.triggerEnqueuedTimestamp ? DatesTools.utcToEpoch(params.triggerEnqueuedTimestamp) : undefined;
|
|
63
|
+
this.triggerProcessedTimestamp = params.triggerProcessedTimestamp ? DatesTools.utcToEpoch(params.triggerProcessedTimestamp) : undefined;
|
|
62
64
|
this.lastState = new AlertState(params.lastState);
|
|
63
|
-
this.currentSourceTimestamp = params.currentSourceTimestamp;
|
|
64
|
-
this.currentEnqueuedTimestamp = params.currentEnqueuedTimestamp;
|
|
65
|
-
this.currentProcessedTimestamp = params.currentProcessedTimestamp;
|
|
65
|
+
this.currentSourceTimestamp = params.currentSourceTimestamp ? DatesTools.utcToEpoch(params.currentSourceTimestamp) : undefined;
|
|
66
|
+
this.currentEnqueuedTimestamp = params.currentEnqueuedTimestamp ? DatesTools.utcToEpoch(params.currentEnqueuedTimestamp) : undefined;
|
|
67
|
+
this.currentProcessedTimestamp = params.currentProcessedTimestamp ? DatesTools.utcToEpoch(params.currentProcessedTimestamp) : undefined;
|
|
66
68
|
this.status = params.status;
|
|
67
69
|
this.tags = params.tags;
|
|
68
70
|
this.history = params.history.map(dto => new AlertState(dto));
|
|
@@ -88,15 +90,15 @@ export interface AlertInfosDTO {
|
|
|
88
90
|
acknowledgingUserImageBlurHash?: string;
|
|
89
91
|
acknowledgingUserImageWidth?: number;
|
|
90
92
|
acknowledgingUserImageHeight?: number;
|
|
91
|
-
acknowledgingTimestamp?:
|
|
93
|
+
acknowledgingTimestamp?: string;
|
|
92
94
|
initialState: AlertStateDTO;
|
|
93
|
-
triggerSourceTimestamp?:
|
|
94
|
-
triggerEnqueuedTimestamp?:
|
|
95
|
-
triggerProcessedTimestamp?:
|
|
95
|
+
triggerSourceTimestamp?: string;
|
|
96
|
+
triggerEnqueuedTimestamp?: string;
|
|
97
|
+
triggerProcessedTimestamp?: string;
|
|
96
98
|
lastState: AlertStateDTO;
|
|
97
|
-
currentSourceTimestamp?:
|
|
98
|
-
currentEnqueuedTimestamp?:
|
|
99
|
-
currentProcessedTimestamp?:
|
|
99
|
+
currentSourceTimestamp?: string;
|
|
100
|
+
currentEnqueuedTimestamp?: string;
|
|
101
|
+
currentProcessedTimestamp?: string;
|
|
100
102
|
status: AlertStatus;
|
|
101
103
|
tags: string[];
|
|
102
104
|
history: AlertStateDTO[];
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
+
import { AlertStatus } from "@dative-gpi/foundation-shared-domain/models";
|
|
2
|
+
import { DatesTools } from "@dative-gpi/foundation-shared-services/tools";
|
|
3
|
+
|
|
1
4
|
import { AlertDataDefinition, AlertDataDefinitionDTO } from "./alertDataDefinition";
|
|
2
|
-
import { AlertStatus } from "../enums/alertEnums";
|
|
3
5
|
|
|
4
6
|
export class AlertState {
|
|
5
7
|
id: string;
|
|
@@ -12,9 +14,9 @@ export class AlertState {
|
|
|
12
14
|
constructor(params: AlertStateDTO) {
|
|
13
15
|
this.id = params.id;
|
|
14
16
|
this.status = params.status;
|
|
15
|
-
this.sourceTimestamp = params.sourceTimestamp;
|
|
16
|
-
this.enqueuedTimestamp = params.enqueuedTimestamp;
|
|
17
|
-
this.processedTimestamp = params.processedTimestamp;
|
|
17
|
+
this.sourceTimestamp = DatesTools.utcToEpoch(params.sourceTimestamp);
|
|
18
|
+
this.enqueuedTimestamp = DatesTools.utcToEpoch(params.enqueuedTimestamp);
|
|
19
|
+
this.processedTimestamp = DatesTools.utcToEpoch(params.processedTimestamp);
|
|
18
20
|
this.metadataValues = params.metadataValues?.map(dto => new AlertDataDefinition(dto));
|
|
19
21
|
}
|
|
20
22
|
}
|
|
@@ -22,8 +24,8 @@ export class AlertState {
|
|
|
22
24
|
export interface AlertStateDTO {
|
|
23
25
|
id: string;
|
|
24
26
|
status: AlertStatus;
|
|
25
|
-
sourceTimestamp:
|
|
26
|
-
enqueuedTimestamp:
|
|
27
|
-
processedTimestamp:
|
|
27
|
+
sourceTimestamp: string;
|
|
28
|
+
enqueuedTimestamp: string;
|
|
29
|
+
processedTimestamp: string;
|
|
28
30
|
metadataValues?: AlertDataDefinitionDTO[];
|
|
29
31
|
}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { DatesTools } from "@dative-gpi/foundation-shared-services/tools";
|
|
2
|
+
|
|
1
3
|
export class AuthTokenInfos {
|
|
2
4
|
id: string;
|
|
3
5
|
userId?: string;
|
|
@@ -9,8 +11,8 @@ export class AuthTokenInfos {
|
|
|
9
11
|
this.id = params.id;
|
|
10
12
|
this.userId = params.userId;
|
|
11
13
|
this.label = params.label;
|
|
12
|
-
this.creationDate = params.creationDate;
|
|
13
|
-
this.dateMax = params.dateMax;
|
|
14
|
+
this.creationDate = DatesTools.utcToEpoch(params.creationDate);
|
|
15
|
+
this.dateMax = DatesTools.utcToEpoch(params.dateMax);
|
|
14
16
|
}
|
|
15
17
|
}
|
|
16
18
|
|
|
@@ -18,8 +20,8 @@ export interface AuthTokenInfosDTO {
|
|
|
18
20
|
id: string;
|
|
19
21
|
userId?: string;
|
|
20
22
|
label: string;
|
|
21
|
-
creationDate:
|
|
22
|
-
dateMax:
|
|
23
|
+
creationDate: string;
|
|
24
|
+
dateMax: string;
|
|
23
25
|
}
|
|
24
26
|
|
|
25
27
|
export interface AuthTokenFilters {
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { ChartVariable, ChartVariableDTO, CreateChartVariableDTO } from "../charts/chartVariable";
|
|
2
|
+
import { ChartOrganisationTypeInfos, ChartOrganisationTypeInfosDTO } from "./chartOrganisationTypeInfos";
|
|
3
|
+
import { ChartAxis, ChartAxisDTO, CreateChartAxisDTO } from "../charts/chartAxis";
|
|
4
|
+
import { ChartPlot, ChartPlotDTO, CreateChartPlotDTO } from "../charts/chartPlot";
|
|
5
|
+
import { CreateChartTranslationDTO } from "../charts/chartTranslation";
|
|
6
|
+
import { ColorSets } from "../enums/chartEnums";
|
|
7
|
+
|
|
8
|
+
export class ChartOrganisationTypeDetails extends ChartOrganisationTypeInfos {
|
|
9
|
+
colorSet: ColorSets;
|
|
10
|
+
colorSeed: string;
|
|
11
|
+
xAxis: ChartAxis;
|
|
12
|
+
aggregates?: boolean;
|
|
13
|
+
dynamicVariables?: boolean;
|
|
14
|
+
chartVariables: ChartVariable[];
|
|
15
|
+
chartPlots: ChartPlot[];
|
|
16
|
+
|
|
17
|
+
constructor(params: ChartOrganisationTypeDetailsDTO) {
|
|
18
|
+
super(params);
|
|
19
|
+
|
|
20
|
+
this.colorSet = params.colorSet as ColorSets;
|
|
21
|
+
this.colorSeed = params.colorSeed;
|
|
22
|
+
this.xAxis = new ChartAxis(params.xAxis);
|
|
23
|
+
this.aggregates = params.aggregates;
|
|
24
|
+
this.dynamicVariables = params.dynamicVariables;
|
|
25
|
+
this.chartVariables = params.chartVariables.map(cv => new ChartVariable(cv));
|
|
26
|
+
this.chartPlots = params.chartPlots.map(cp => new ChartPlot(cp));
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export interface ChartOrganisationTypeDetailsDTO extends ChartOrganisationTypeInfosDTO {
|
|
31
|
+
colorSet: number;
|
|
32
|
+
colorSeed: string;
|
|
33
|
+
xAxis?: ChartAxisDTO;
|
|
34
|
+
aggregates?: boolean;
|
|
35
|
+
dynamicVariables?: boolean;
|
|
36
|
+
chartVariables: ChartVariableDTO[];
|
|
37
|
+
chartPlots: ChartPlotDTO[];
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export interface CreateChartOrganisationTypeDTO {
|
|
41
|
+
chartOrganisationId: string;
|
|
42
|
+
organisationTypeId?: string;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export interface UpdateChartOrganisationTypeDTO {
|
|
46
|
+
code: string;
|
|
47
|
+
icon: string;
|
|
48
|
+
tags: string[];
|
|
49
|
+
multiple: boolean;
|
|
50
|
+
chartType: number;
|
|
51
|
+
colorSet: number;
|
|
52
|
+
colorSeed: string;
|
|
53
|
+
xAxis?: CreateChartAxisDTO;
|
|
54
|
+
aggregates?: boolean;
|
|
55
|
+
dynamicVariables?: boolean;
|
|
56
|
+
chartVariables: CreateChartVariableDTO[];
|
|
57
|
+
chartPlots: CreateChartPlotDTO[];
|
|
58
|
+
labelDefault: string;
|
|
59
|
+
titleDefault: string;
|
|
60
|
+
translations: CreateChartTranslationDTO[];
|
|
61
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
import { ChartTranslation, ChartTranslationDTO } from "../charts/chartTranslation";
|
|
2
|
+
import { ChartModelLabel, ChartModelLabelDTO } from "../charts/chartModelLabel";
|
|
3
|
+
import { ApplicationScope } from "../enums/applicationEnums";
|
|
4
|
+
import { ChartType } from "../enums/chartEnums";
|
|
5
|
+
|
|
6
|
+
export class ChartOrganisationTypeInfos {
|
|
7
|
+
id: string;
|
|
8
|
+
chartId: string;
|
|
9
|
+
organisationTypeId: string;
|
|
10
|
+
organisationTypeLabel: string;
|
|
11
|
+
scope: ApplicationScope;
|
|
12
|
+
icon: string;
|
|
13
|
+
code: string;
|
|
14
|
+
tags: string[];
|
|
15
|
+
multiple: boolean;
|
|
16
|
+
chartType: ChartType;
|
|
17
|
+
modelsLabels: ChartModelLabel[];
|
|
18
|
+
label: string;
|
|
19
|
+
title: string;
|
|
20
|
+
labelDefault: string;
|
|
21
|
+
titleDefault: string;
|
|
22
|
+
translations: ChartTranslation[];
|
|
23
|
+
|
|
24
|
+
constructor(params: ChartOrganisationTypeInfosDTO) {
|
|
25
|
+
this.id = params.id;
|
|
26
|
+
this.chartId = params.chartId;
|
|
27
|
+
this.organisationTypeId = params.organisationTypeId;
|
|
28
|
+
this.organisationTypeLabel = params.organisationTypeLabel;
|
|
29
|
+
this.scope = params.scope;
|
|
30
|
+
this.icon = params.icon;
|
|
31
|
+
this.code = params.code;
|
|
32
|
+
this.tags = params.tags.slice();
|
|
33
|
+
this.multiple = params.multiple;
|
|
34
|
+
this.chartType = params.chartType;
|
|
35
|
+
this.modelsLabels = params.modelsLabels.map((modelLabel) => new ChartModelLabel(modelLabel));
|
|
36
|
+
this.label = params.label;
|
|
37
|
+
this.title = params.title;
|
|
38
|
+
this.labelDefault = params.labelDefault;
|
|
39
|
+
this.titleDefault = params.titleDefault;
|
|
40
|
+
this.translations = params.translations.map((translation) => new ChartTranslation(translation));
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export interface ChartOrganisationTypeInfosDTO {
|
|
45
|
+
id: string;
|
|
46
|
+
chartId: string;
|
|
47
|
+
organisationTypeId: string;
|
|
48
|
+
organisationTypeLabel: string;
|
|
49
|
+
scope: ApplicationScope;
|
|
50
|
+
icon: string;
|
|
51
|
+
code: string;
|
|
52
|
+
tags: string[];
|
|
53
|
+
multiple: boolean;
|
|
54
|
+
chartType: ChartType;
|
|
55
|
+
modelsLabels: ChartModelLabelDTO[];
|
|
56
|
+
label: string;
|
|
57
|
+
title: string;
|
|
58
|
+
labelDefault: string;
|
|
59
|
+
titleDefault: string;
|
|
60
|
+
translations: ChartTranslationDTO[];
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export interface ChartOrganisationTypeFilters {
|
|
64
|
+
modelsIds?: string[];
|
|
65
|
+
search?: string;
|
|
66
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
import { ChartVariable, ChartVariableDTO, CreateChartVariableDTO } from "../charts/chartVariable";
|
|
2
|
+
import { ChartOrganisationInfos, ChartOrganisationInfosDTO } from "./chartOrganisationInfos";
|
|
3
|
+
import { ChartAxis, ChartAxisDTO, CreateChartAxisDTO } from "../charts/chartAxis";
|
|
4
|
+
import { ChartPlot, ChartPlotDTO, CreateChartPlotDTO } from "../charts/chartPlot";
|
|
5
|
+
import { CreateChartTranslationDTO } from "../charts/chartTranslation";
|
|
6
|
+
import { ColorSets } from "../enums/chartEnums";
|
|
7
|
+
|
|
8
|
+
export class ChartOrganisationDetails extends ChartOrganisationInfos {
|
|
9
|
+
colorSet: ColorSets;
|
|
10
|
+
colorSeed: string;
|
|
11
|
+
xAxis: ChartAxis;
|
|
12
|
+
aggregates?: boolean;
|
|
13
|
+
dynamicVariables?: boolean;
|
|
14
|
+
chartVariables: ChartVariable[];
|
|
15
|
+
chartPlots: ChartPlot[];
|
|
16
|
+
|
|
17
|
+
constructor(params: ChartOrganisationDetailsDTO) {
|
|
18
|
+
super(params);
|
|
19
|
+
|
|
20
|
+
this.colorSet = params.colorSet as ColorSets;
|
|
21
|
+
this.colorSeed = params.colorSeed;
|
|
22
|
+
this.xAxis = new ChartAxis(params.xAxis);
|
|
23
|
+
this.aggregates = params.aggregates;
|
|
24
|
+
this.dynamicVariables = params.dynamicVariables;
|
|
25
|
+
this.chartVariables = params.chartVariables.map(cv => new ChartVariable(cv));
|
|
26
|
+
this.chartPlots = params.chartPlots.map(cp => new ChartPlot(cp));
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export interface ChartOrganisationDetailsDTO extends ChartOrganisationInfosDTO {
|
|
31
|
+
colorSet: number;
|
|
32
|
+
colorSeed: string;
|
|
33
|
+
xAxis?: ChartAxisDTO;
|
|
34
|
+
aggregates?: boolean;
|
|
35
|
+
dynamicVariables?: boolean;
|
|
36
|
+
chartVariables: ChartVariableDTO[];
|
|
37
|
+
chartPlots: ChartPlotDTO[];
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export interface CreateChartOrganisationDTO {
|
|
41
|
+
code: string;
|
|
42
|
+
icon: string;
|
|
43
|
+
tags: string[];
|
|
44
|
+
labelDefault: string;
|
|
45
|
+
titleDefault: string;
|
|
46
|
+
translations: CreateChartTranslationDTO[];
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export interface UpdateChartOrganisationDTO {
|
|
50
|
+
code: string;
|
|
51
|
+
icon: string;
|
|
52
|
+
tags: string[];
|
|
53
|
+
multiple: boolean;
|
|
54
|
+
chartType: number;
|
|
55
|
+
colorSet: number;
|
|
56
|
+
colorSeed: string;
|
|
57
|
+
xAxis?: CreateChartAxisDTO;
|
|
58
|
+
aggregates?: boolean;
|
|
59
|
+
dynamicVariables?: boolean;
|
|
60
|
+
chartVariables: CreateChartVariableDTO[];
|
|
61
|
+
chartPlots: CreateChartPlotDTO[];
|
|
62
|
+
labelDefault: string;
|
|
63
|
+
titleDefault: string;
|
|
64
|
+
translations: CreateChartTranslationDTO[];
|
|
65
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { ChartTranslation, ChartTranslationDTO } from "../charts/chartTranslation";
|
|
2
|
+
import { ChartModelLabel, ChartModelLabelDTO } from "../charts/chartModelLabel";
|
|
3
|
+
import { ApplicationScope } from "../enums/applicationEnums";
|
|
4
|
+
import { ChartType } from "../enums/chartEnums";
|
|
5
|
+
|
|
6
|
+
export class ChartOrganisationInfos {
|
|
7
|
+
id: string;
|
|
8
|
+
chartId: string;
|
|
9
|
+
organisationId: string;
|
|
10
|
+
scope: ApplicationScope;
|
|
11
|
+
icon: string;
|
|
12
|
+
code: string;
|
|
13
|
+
tags: string[];
|
|
14
|
+
multiple: boolean;
|
|
15
|
+
chartType: ChartType;
|
|
16
|
+
modelsLabels: ChartModelLabel[];
|
|
17
|
+
label: string;
|
|
18
|
+
title: string;
|
|
19
|
+
labelDefault: string;
|
|
20
|
+
titleDefault: string;
|
|
21
|
+
translations: ChartTranslation[];
|
|
22
|
+
|
|
23
|
+
constructor(params: ChartOrganisationInfosDTO) {
|
|
24
|
+
this.id = params.id;
|
|
25
|
+
this.chartId = params.chartId;
|
|
26
|
+
this.organisationId = params.organisationId;
|
|
27
|
+
this.scope = params.scope;
|
|
28
|
+
this.icon = params.icon;
|
|
29
|
+
this.code = params.code;
|
|
30
|
+
this.tags = params.tags.slice();
|
|
31
|
+
this.multiple = params.multiple;
|
|
32
|
+
this.chartType = params.chartType;
|
|
33
|
+
this.modelsLabels = params.modelsLabels.map((modelLabel) => new ChartModelLabel(modelLabel));
|
|
34
|
+
this.label = params.label;
|
|
35
|
+
this.title = params.title;
|
|
36
|
+
this.labelDefault = params.labelDefault;
|
|
37
|
+
this.titleDefault = params.titleDefault;
|
|
38
|
+
this.translations = params.translations.map((translation) => new ChartTranslation(translation));
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export interface ChartOrganisationInfosDTO {
|
|
43
|
+
id: string;
|
|
44
|
+
chartId: string;
|
|
45
|
+
organisationId: string;
|
|
46
|
+
scope: ApplicationScope;
|
|
47
|
+
icon: string;
|
|
48
|
+
code: string;
|
|
49
|
+
tags: string[];
|
|
50
|
+
multiple: boolean;
|
|
51
|
+
chartType: ChartType;
|
|
52
|
+
modelsLabels: ChartModelLabelDTO[];
|
|
53
|
+
label: string;
|
|
54
|
+
title: string;
|
|
55
|
+
labelDefault: string;
|
|
56
|
+
titleDefault: string;
|
|
57
|
+
translations: ChartTranslationDTO[];
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export interface ChartOrganisationFilters {
|
|
61
|
+
modelsIds?: string[];
|
|
62
|
+
search?: string;
|
|
63
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { ChartValueRange, ChartValueRangeDTO, CreateChartValueRangeDTO } from "./chartValueRange";
|
|
2
|
+
import { CreateChartTimeRangeDTO, ChartTimeRange, ChartTimeRangeDTO } from "./chartTimeRange";
|
|
3
|
+
import { AxisType } from "../enums/chartEnums";
|
|
4
|
+
|
|
5
|
+
export class ChartAxis {
|
|
6
|
+
type: AxisType;
|
|
7
|
+
logarithmic: boolean;
|
|
8
|
+
boundaries: boolean;
|
|
9
|
+
min?: number;
|
|
10
|
+
max?: number;
|
|
11
|
+
unit?: string;
|
|
12
|
+
valueRanges: ChartValueRange[];
|
|
13
|
+
timeRanges: ChartTimeRange[];
|
|
14
|
+
|
|
15
|
+
constructor(params?: ChartAxisDTO) {
|
|
16
|
+
if (params == null) {
|
|
17
|
+
this.type = AxisType.None;
|
|
18
|
+
this.logarithmic = false;
|
|
19
|
+
this.boundaries = false;
|
|
20
|
+
this.unit = "";
|
|
21
|
+
this.valueRanges = [];
|
|
22
|
+
this.timeRanges = [];
|
|
23
|
+
}
|
|
24
|
+
else {
|
|
25
|
+
this.type = params.type as AxisType;
|
|
26
|
+
this.logarithmic = params.logarithmic;
|
|
27
|
+
this.boundaries = params.boundaries;
|
|
28
|
+
this.min = params.min;
|
|
29
|
+
this.max = params.max;
|
|
30
|
+
this.unit = params.unit;
|
|
31
|
+
this.valueRanges = params.valueRanges.map(vr => new ChartValueRange(vr));
|
|
32
|
+
this.timeRanges = params.timeRanges.map(tr => new ChartTimeRange(tr));
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
export interface ChartAxisDTO {
|
|
38
|
+
type: AxisType;
|
|
39
|
+
logarithmic: boolean;
|
|
40
|
+
boundaries: boolean;
|
|
41
|
+
min?: number;
|
|
42
|
+
max?: number;
|
|
43
|
+
unit?: string;
|
|
44
|
+
valueRanges: ChartValueRangeDTO[];
|
|
45
|
+
timeRanges: ChartTimeRangeDTO[];
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export interface CreateChartAxisDTO {
|
|
49
|
+
type: AxisType;
|
|
50
|
+
logarithmic: boolean;
|
|
51
|
+
boundaries: boolean;
|
|
52
|
+
min?: number;
|
|
53
|
+
max?: number;
|
|
54
|
+
unit?: string;
|
|
55
|
+
valueRanges: CreateChartValueRangeDTO[];
|
|
56
|
+
timeRanges: CreateChartTimeRangeDTO[];
|
|
57
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { ChartVariable, ChartVariableDTO } from "./chartVariable";
|
|
2
|
+
import { ApplicationScope } from "../enums/applicationEnums";
|
|
3
|
+
import { ChartType, ColorSets } from "../enums/chartEnums";
|
|
4
|
+
import { ChartInfos, ChartInfosDTO } from "./chartInfos";
|
|
5
|
+
import { ChartTranslationDTO } from "./chartTranslation";
|
|
6
|
+
import { ChartAxis, ChartAxisDTO } from "./chartAxis";
|
|
7
|
+
import { ChartModelLabelDTO } from "./chartModelLabel";
|
|
8
|
+
import { ChartPlot, ChartPlotDTO } from "./chartPlot";
|
|
9
|
+
|
|
10
|
+
export class ChartDetails extends ChartInfos {
|
|
11
|
+
colorSet: ColorSets;
|
|
12
|
+
colorSeed: string;
|
|
13
|
+
xAxis: ChartAxis;
|
|
14
|
+
aggregates?: boolean;
|
|
15
|
+
dynamicVariables?: boolean;
|
|
16
|
+
chartVariables: ChartVariable[];
|
|
17
|
+
chartPlots: ChartPlot[];
|
|
18
|
+
|
|
19
|
+
constructor(params: ChartDetailsDTO) {
|
|
20
|
+
super(params);
|
|
21
|
+
|
|
22
|
+
this.colorSet = params.colorSet as ColorSets;
|
|
23
|
+
this.colorSeed = params.colorSeed;
|
|
24
|
+
this.xAxis = new ChartAxis(params.xAxis);
|
|
25
|
+
this.aggregates = params.aggregates;
|
|
26
|
+
this.dynamicVariables = params.dynamicVariables;
|
|
27
|
+
this.chartVariables = params.chartVariables.map(cv => new ChartVariable(cv));
|
|
28
|
+
this.chartPlots = params.chartPlots.map(cp => new ChartPlot(cp));
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export interface ChartDetailsDTO extends ChartInfosDTO {
|
|
33
|
+
id: string;
|
|
34
|
+
scope: ApplicationScope;
|
|
35
|
+
icon: string;
|
|
36
|
+
code: string;
|
|
37
|
+
tags: string[];
|
|
38
|
+
multiple: boolean;
|
|
39
|
+
chartType: ChartType;
|
|
40
|
+
modelsLabels: ChartModelLabelDTO[];
|
|
41
|
+
label: string;
|
|
42
|
+
title: string;
|
|
43
|
+
labelDefault: string;
|
|
44
|
+
titleDefault: string;
|
|
45
|
+
translations: ChartTranslationDTO[];
|
|
46
|
+
colorSet: number;
|
|
47
|
+
colorSeed: string;
|
|
48
|
+
xAxis?: ChartAxisDTO;
|
|
49
|
+
aggregates?: boolean;
|
|
50
|
+
dynamicVariables?: boolean;
|
|
51
|
+
chartVariables: ChartVariableDTO[];
|
|
52
|
+
chartPlots: ChartPlotDTO[];
|
|
53
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { ChartFilterValue, ChartFilterValueDTO, CreateChartFilterValueDTO } from "./chartFilterValue";
|
|
2
|
+
import { FilterType } from "../enums/sharedEnums";
|
|
3
|
+
|
|
4
|
+
export class ChartFilter {
|
|
5
|
+
dataDefinitionId: string;
|
|
6
|
+
filterType: FilterType;
|
|
7
|
+
filterValues: ChartFilterValue[];
|
|
8
|
+
filterDynamic: boolean;
|
|
9
|
+
|
|
10
|
+
constructor(params: ChartFilterDTO) {
|
|
11
|
+
this.dataDefinitionId = params.dataDefinitionId;
|
|
12
|
+
this.filterType = params.filterType as FilterType;
|
|
13
|
+
this.filterValues = params.filterValues.map(fv => new ChartFilterValue(fv));
|
|
14
|
+
this.filterDynamic = params.filterDynamic;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export interface ChartFilterDTO {
|
|
19
|
+
dataDefinitionId: string;
|
|
20
|
+
filterType: number;
|
|
21
|
+
filterValues: ChartFilterValueDTO[];
|
|
22
|
+
filterDynamic: boolean;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export interface CreateChartFilterDTO {
|
|
26
|
+
dataDefinitionId: string;
|
|
27
|
+
filterType: FilterType;
|
|
28
|
+
filterValues: CreateChartFilterValueDTO[];
|
|
29
|
+
filterDynamic: boolean;
|
|
30
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export class ChartFilterValue {
|
|
2
|
+
id?: string;
|
|
3
|
+
label: string;
|
|
4
|
+
isCustom: boolean;
|
|
5
|
+
|
|
6
|
+
constructor(params: ChartFilterValueDTO) {
|
|
7
|
+
this.id = params.id;
|
|
8
|
+
this.label = params.label;
|
|
9
|
+
this.isCustom = params.isCustom;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export interface ChartFilterValueDTO {
|
|
14
|
+
id?: string;
|
|
15
|
+
label: string;
|
|
16
|
+
isCustom: boolean;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export interface CreateChartFilterValueDTO {
|
|
20
|
+
id?: string;
|
|
21
|
+
label: string;
|
|
22
|
+
isCustom: boolean;
|
|
23
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { ChartTranslation, ChartTranslationDTO } from "./chartTranslation";
|
|
2
|
+
import { ChartModelLabel, ChartModelLabelDTO } from "./chartModelLabel";
|
|
3
|
+
import { ApplicationScope } from "../enums/applicationEnums";
|
|
4
|
+
import { ChartType } from "../enums/chartEnums";
|
|
5
|
+
|
|
6
|
+
export class ChartInfos {
|
|
7
|
+
id: string;
|
|
8
|
+
scope: ApplicationScope;
|
|
9
|
+
icon: string;
|
|
10
|
+
code: string;
|
|
11
|
+
tags: string[];
|
|
12
|
+
multiple: boolean;
|
|
13
|
+
chartType: ChartType;
|
|
14
|
+
modelsLabels: ChartModelLabel[];
|
|
15
|
+
label: string;
|
|
16
|
+
title: string;
|
|
17
|
+
labelDefault: string;
|
|
18
|
+
titleDefault: string;
|
|
19
|
+
translations: ChartTranslation[];
|
|
20
|
+
|
|
21
|
+
constructor(params: ChartInfosDTO) {
|
|
22
|
+
this.id = params.id;
|
|
23
|
+
this.scope = params.scope;
|
|
24
|
+
this.icon = params.icon;
|
|
25
|
+
this.code = params.code;
|
|
26
|
+
this.tags = params.tags.slice();
|
|
27
|
+
this.multiple = params.multiple;
|
|
28
|
+
this.chartType = params.chartType;
|
|
29
|
+
this.modelsLabels = params.modelsLabels.map((modelLabel) => new ChartModelLabel(modelLabel));
|
|
30
|
+
this.label = params.label;
|
|
31
|
+
this.title = params.title;
|
|
32
|
+
this.labelDefault = params.labelDefault;
|
|
33
|
+
this.titleDefault = params.titleDefault;
|
|
34
|
+
this.translations = params.translations.map((translation) => new ChartTranslation(translation));
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export interface ChartInfosDTO {
|
|
39
|
+
id: string;
|
|
40
|
+
scope: ApplicationScope;
|
|
41
|
+
icon: string;
|
|
42
|
+
code: string;
|
|
43
|
+
tags: string[];
|
|
44
|
+
multiple: boolean;
|
|
45
|
+
chartType: ChartType;
|
|
46
|
+
modelsLabels: ChartModelLabelDTO[];
|
|
47
|
+
label: string;
|
|
48
|
+
title: string;
|
|
49
|
+
labelDefault: string;
|
|
50
|
+
titleDefault: string;
|
|
51
|
+
translations: ChartTranslationDTO[];
|
|
52
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export class ChartModifier {
|
|
2
|
+
dataDefinitionId: string;
|
|
3
|
+
hideLabel: boolean;
|
|
4
|
+
|
|
5
|
+
constructor(params: ChartModifierDTO) {
|
|
6
|
+
this.dataDefinitionId = params.dataDefinitionId;
|
|
7
|
+
this.hideLabel = params.hideLabel;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export interface ChartModifierDTO {
|
|
12
|
+
dataDefinitionId: string;
|
|
13
|
+
hideLabel: boolean;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export interface CreateChartModifierDTO {
|
|
17
|
+
dataDefinitionId: string;
|
|
18
|
+
hideLabel: boolean;
|
|
19
|
+
}
|