@dative-gpi/foundation-core-domain 0.1.120 → 1.0.1

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.
Files changed (152) hide show
  1. package/models/actions/actionDetails.ts +2 -1
  2. package/models/actions/actionInfos.ts +5 -1
  3. package/models/alerts/alertDataDefinition.ts +18 -15
  4. package/models/alerts/alertDetails.ts +7 -7
  5. package/models/alerts/alertInfos.ts +5 -5
  6. package/models/alerts/alertState.ts +22 -22
  7. package/models/articles/articleDetails.ts +2 -1
  8. package/models/chartCategories/chartCategoryDetails.ts +33 -0
  9. package/models/chartCategories/chartCategoryInfos.ts +21 -0
  10. package/models/chartCategories/chartCategoryTranslation.ts +14 -0
  11. package/models/chartCategories/index.ts +3 -0
  12. package/models/chartOrganisationTypes/chartOrganisationTypeDetails.ts +106 -49
  13. package/models/chartOrganisationTypes/chartOrganisationTypeInfos.ts +57 -56
  14. package/models/chartOrganisations/chartOrganisationDetails.ts +113 -53
  15. package/models/chartOrganisations/chartOrganisationInfos.ts +54 -53
  16. package/models/charts/chartAxis.ts +50 -47
  17. package/models/charts/chartDetails.ts +51 -29
  18. package/models/charts/chartFilter.ts +32 -2
  19. package/models/charts/chartFilterTranslation.ts +14 -0
  20. package/models/charts/chartFilterValue.ts +4 -4
  21. package/models/charts/chartInfos.ts +45 -45
  22. package/models/charts/chartModelLabel.ts +8 -8
  23. package/models/charts/chartModifier.ts +25 -15
  24. package/models/charts/chartOperand.ts +31 -23
  25. package/models/charts/chartPlot.ts +11 -10
  26. package/models/charts/chartPreset.ts +40 -0
  27. package/models/charts/chartPresetFilter.ts +32 -0
  28. package/models/charts/chartPresetTranslation.ts +14 -0
  29. package/models/charts/chartSerie.ts +158 -152
  30. package/models/charts/chartSerieTranslation.ts +18 -18
  31. package/models/charts/chartTimeRange.ts +37 -36
  32. package/models/charts/chartTimeRangeTranslation.ts +10 -10
  33. package/models/charts/chartTimeStep.ts +15 -15
  34. package/models/charts/chartTranslation.ts +11 -17
  35. package/models/charts/chartValueRange.ts +28 -27
  36. package/models/charts/chartValueRangeTranslation.ts +10 -10
  37. package/models/charts/chartVariable.ts +37 -12
  38. package/models/charts/chartVariableTranslation.ts +14 -0
  39. package/models/charts/index.ts +6 -1
  40. package/models/comments/commentDetails.ts +2 -1
  41. package/models/connectivityAlerts/connectivityAlertDetails.ts +2 -1
  42. package/models/connectivityAlerts/connectivityAlertInfos.ts +6 -2
  43. package/models/connectivityScenarios/connectivityScenarioDetails.ts +7 -3
  44. package/models/connectivityScenarios/connectivityScenarioInfos.ts +10 -4
  45. package/models/connectivityScenarios/connectivityScenarioUserInfos.ts +26 -0
  46. package/models/customProperties/customPropertyColor.ts +1 -1
  47. package/models/customProperties/customPropertyDetails.ts +2 -1
  48. package/models/customProperties/customPropertyInfos.ts +3 -2
  49. package/models/customPropertyValues/customPropertyValueDetails.ts +2 -1
  50. package/models/dashboardDatePresets/dashboardDatePresetDetails.ts +11 -0
  51. package/models/dashboardDatePresets/dashboardDatePresetInfos.ts +37 -0
  52. package/models/dashboardDatePresets/dashboardDatePresetTranslation.ts +14 -0
  53. package/models/dashboardDatePresets/index.ts +3 -0
  54. package/models/dashboardEntityPresets/dashboardEntityPresetDetails.ts +12 -0
  55. package/models/dashboardEntityPresets/dashboardEntityPresetInfos.ts +36 -0
  56. package/models/dashboardEntityPresets/dashboardEntityPresetTranslation.ts +14 -0
  57. package/models/dashboardEntityPresets/index.ts +3 -0
  58. package/models/dashboardOrganisationTypes/dashboardOrganisationTypeDetails.ts +62 -57
  59. package/models/dashboardOrganisationTypes/dashboardOrganisationTypeInfos.ts +28 -25
  60. package/models/dashboardOrganisations/dashboardOrganisationDetails.ts +74 -64
  61. package/models/dashboardOrganisations/dashboardOrganisationInfos.ts +4 -1
  62. package/models/dashboardShallowDatePresets/dashboardShallowDatePresetDetails.ts +9 -0
  63. package/models/dashboardShallowDatePresets/dashboardShallowDatePresetInfos.ts +25 -0
  64. package/models/dashboardShallowDatePresets/index.ts +2 -0
  65. package/models/dashboardShallowEntityPresets/dashboardShallowEntityPresetDetails.ts +9 -0
  66. package/models/dashboardShallowEntityPresets/dashboardShallowEntityPresetInfos.ts +25 -0
  67. package/models/dashboardShallowEntityPresets/index.ts +2 -0
  68. package/models/dashboardShallowVariables/dashboardShallowVariableDetails.ts +8 -0
  69. package/models/dashboardShallowVariables/dashboardShallowVariableInfos.ts +23 -0
  70. package/models/dashboardShallowVariables/index.ts +2 -0
  71. package/models/dashboardShallows/dashboardShallowDetails.ts +82 -80
  72. package/models/dashboardShallows/dashboardShallowInfos.ts +4 -1
  73. package/models/dashboardVariableValues/dashboardVariableValue.ts +29 -0
  74. package/models/dashboardVariableValues/dashboardVariableValueTranslation.ts +14 -0
  75. package/models/dashboardVariableValues/index.ts +2 -0
  76. package/models/dashboardVariables/dashboardVariableDetails.ts +15 -0
  77. package/models/dashboardVariables/dashboardVariableInfos.ts +43 -0
  78. package/models/dashboardVariables/dashboardVariableTranslation.ts +14 -0
  79. package/models/dashboardVariables/index.ts +3 -0
  80. package/models/dashboards/dashboardDetails.ts +34 -37
  81. package/models/dashboards/dashboardInfos.ts +1 -1
  82. package/models/dashboards/dashboardTranslation.ts +14 -0
  83. package/models/dashboards/index.ts +2 -1
  84. package/models/dataCategories/dataCategoryDetails.ts +2 -1
  85. package/models/dataDefinitionMappings/dataDefinitionMappingDetails.ts +2 -1
  86. package/models/dataDefinitions/dataDefinitionDetails.ts +2 -1
  87. package/models/dataDefinitions/dataDefinitionInfos.ts +3 -2
  88. package/models/deviceConnectivities/deviceConnectivityDetails.ts +2 -1
  89. package/models/deviceConnectivities/deviceConnectivityInfos.ts +1 -1
  90. package/models/deviceOrganisations/deviceOrganisationAlert.ts +1 -1
  91. package/models/deviceOrganisations/deviceOrganisationDetails.ts +6 -3
  92. package/models/deviceOrganisations/deviceOrganisationInfos.ts +8 -4
  93. package/models/deviceStatuses/deviceStatusDetails.ts +2 -1
  94. package/models/enums/applicationEnums.ts +7 -7
  95. package/models/enums/chartEnums.ts +77 -71
  96. package/models/enums/index.ts +1 -1
  97. package/models/enums/notificationEnums.ts +6 -0
  98. package/models/enums/userEnums.ts +8 -8
  99. package/models/extensionApplications/extensionApplicationDetails.ts +2 -1
  100. package/models/folders/folderDetails.ts +4 -1
  101. package/models/folders/folderInfos.ts +2 -1
  102. package/models/groups/groupDetails.ts +18 -17
  103. package/models/groups/groupInfos.ts +2 -1
  104. package/models/index.ts +19 -8
  105. package/models/locations/index.ts +0 -1
  106. package/models/locations/locationDetails.ts +24 -20
  107. package/models/locations/locationInfos.ts +39 -36
  108. package/models/manufacturers/manufacturerDetails.ts +2 -1
  109. package/models/modelStatuses/modelStatusDetails.ts +2 -1
  110. package/models/models/modelDetails.ts +2 -1
  111. package/models/notifications/index.ts +2 -0
  112. package/models/notifications/notificationDetails.ts +10 -0
  113. package/models/notifications/notificationInfos.ts +43 -0
  114. package/models/organisations/organisationDetails.ts +1 -1
  115. package/models/permissionCategories/permissionCategoryDetails.ts +2 -1
  116. package/models/roleOrganisationTypes/roleOrganisationTypeDetails.ts +2 -1
  117. package/models/roleOrganisationTypes/roleOrganisationTypeInfos.ts +4 -3
  118. package/models/roleOrganisations/roleOrganisationDetails.ts +3 -2
  119. package/models/roleOrganisations/roleOrganisationInfos.ts +4 -3
  120. package/models/routes/applicationRoute.ts +1 -1
  121. package/models/routes/routeDetails.ts +2 -1
  122. package/models/scenarioDeviceOrganisations/scenarioDeviceOrganisationDetails.ts +21 -24
  123. package/models/scenarioDeviceOrganisations/scenarioDeviceOrganisationInfos.ts +43 -52
  124. package/models/scenarioOrganisationTypes/scenarioOrganisationTypeDetails.ts +109 -133
  125. package/models/scenarioOrganisationTypes/scenarioOrganisationTypeInfos.ts +53 -53
  126. package/models/scenarioOrganisations/scenarioOrganisationDetails.ts +133 -166
  127. package/models/scenarioOrganisations/scenarioOrganisationInfos.ts +50 -50
  128. package/models/scenarios/index.ts +1 -0
  129. package/models/scenarios/scenarioTranslation.ts +23 -0
  130. package/models/serviceAccountOrganisationAuthTokens/index.ts +2 -0
  131. package/models/serviceAccountOrganisationAuthTokens/serviceAccountOrganisationAuthTokenDetails.ts +21 -0
  132. package/models/serviceAccountOrganisationAuthTokens/serviceAccountOrganisationAuthTokenInfos.ts +30 -0
  133. package/models/serviceAccountOrganisations/index.ts +2 -0
  134. package/models/serviceAccountOrganisations/serviceAccountOrganisationDetails.ts +49 -0
  135. package/models/{serviceAccounts/serviceAccountInfos.ts → serviceAccountOrganisations/serviceAccountOrganisationInfos.ts} +6 -6
  136. package/models/shared/timeRange.ts +1 -1
  137. package/models/userOrganisationColumns/userOrganisationColumnDetails.ts +2 -1
  138. package/models/userOrganisationTables/userOrganisationTableDetails.ts +3 -2
  139. package/models/userOrganisationTables/userOrganisationTableInfos.ts +4 -3
  140. package/models/userOrganisations/userOrganisationDetails.ts +5 -4
  141. package/models/userOrganisations/userOrganisationInfos.ts +5 -2
  142. package/models/widgetTemplates/widgetTemplateDetails.ts +2 -1
  143. package/models/widgetTemplates/widgetTemplateInfos.ts +5 -0
  144. package/models/widgets/widgetDetails.ts +3 -1
  145. package/package.json +2 -2
  146. package/models/authTokens/authTokenDetails.ts +0 -20
  147. package/models/authTokens/authTokenInfos.ts +0 -29
  148. package/models/authTokens/index.ts +0 -2
  149. package/models/enums/dashboardEnums.ts +0 -25
  150. package/models/locations/address.ts +0 -29
  151. package/models/serviceAccounts/index.ts +0 -2
  152. package/models/serviceAccounts/serviceAccountDetails.ts +0 -47
@@ -1,4 +1,5 @@
1
- import { ActionInfos, ActionInfosDTO } from "./actionInfos";
1
+ import type { ActionInfosDTO } from "./actionInfos";
2
+ import { ActionInfos } from "./actionInfos";
2
3
 
3
4
  export class ActionDetails extends ActionInfos {
4
5
  constructor(params: ActionDetailsDTO) {
@@ -1,4 +1,4 @@
1
- import { ActionType } from "../enums/actionEnums";
1
+ import type { ActionType } from "../enums/actionEnums";
2
2
 
3
3
  export class ActionInfos {
4
4
  extensionId: string | null;
@@ -25,4 +25,8 @@ export interface ActionInfosDTO {
25
25
  uri: string;
26
26
  label: string;
27
27
  icon: string;
28
+ }
29
+
30
+ export interface ActionFilters {
31
+ path: string;
28
32
  }
@@ -1,17 +1,20 @@
1
1
  export class AlertDataDefinition {
2
- dataDefinitionId: string;
3
- value: string;
4
- label: string;
5
-
6
- constructor(params: AlertDataDefinitionDTO) {
7
- this.dataDefinitionId = params.dataDefinitionId;
8
- this.value = params.value;
9
- this.label = params.label;
10
- }
2
+ dataDefinitionId: string;
3
+ value: string;
4
+ unit: string;
5
+ label: string;
6
+
7
+ constructor(params: AlertDataDefinitionDTO) {
8
+ this.dataDefinitionId = params.dataDefinitionId;
9
+ this.value = params.value;
10
+ this.unit = params.unit;
11
+ this.label = params.label;
11
12
  }
12
-
13
- export interface AlertDataDefinitionDTO {
14
- dataDefinitionId: string;
15
- value: string;
16
- label: string;
17
- }
13
+ }
14
+
15
+ export interface AlertDataDefinitionDTO {
16
+ dataDefinitionId: string;
17
+ value: string;
18
+ unit: string;
19
+ label: string;
20
+ }
@@ -1,15 +1,15 @@
1
- import { AlertInfos, AlertInfosDTO } from "./alertInfos";
1
+ import { AlertInfos, type AlertInfosDTO } from "./alertInfos";
2
2
 
3
3
  export class AlertDetails extends AlertInfos {
4
- description: string;
4
+ description: string;
5
5
 
6
- constructor(params: AlertDetailsDTO) {
7
- super(params);
6
+ constructor(params: AlertDetailsDTO) {
7
+ super(params);
8
8
 
9
- this.description = params.description;
10
- }
9
+ this.description = params.description;
10
+ }
11
11
  }
12
12
 
13
13
  export interface AlertDetailsDTO extends AlertInfosDTO {
14
- description: string;
14
+ description: string;
15
15
  }
@@ -1,10 +1,10 @@
1
- import { AlertStatus, Criticity } from "@dative-gpi/foundation-shared-domain/models";
1
+ import { type AlertStatus, type Criticity } from "@dative-gpi/foundation-shared-domain/models";
2
2
  import { utcToEpoch } from "@dative-gpi/foundation-shared-domain/tools";
3
3
 
4
- import { AlertDataDefinition, AlertDataDefinitionDTO } from "./alertDataDefinition";
5
- import { AlertState, AlertStateDTO } from "./alertState";
6
- import { SelectedEntities } from "../enums/sharedEnums";
7
- import { DateVariable } from "../shared/dateVariable";
4
+ import { AlertDataDefinition, type AlertDataDefinitionDTO } from "./alertDataDefinition";
5
+ import { AlertState, type AlertStateDTO } from "./alertState";
6
+ import { type SelectedEntities } from "../enums/sharedEnums";
7
+ import { type DateVariable } from "../shared/dateVariable";
8
8
 
9
9
  export class AlertInfos {
10
10
  id: string;
@@ -1,31 +1,31 @@
1
- import { AlertStatus } from "@dative-gpi/foundation-shared-domain/models";
1
+ import { type AlertStatus } from "@dative-gpi/foundation-shared-domain/models";
2
2
  import { utcToEpoch } from "@dative-gpi/foundation-shared-domain/tools";
3
3
 
4
- import { AlertDataDefinition, AlertDataDefinitionDTO } from "./alertDataDefinition";
4
+ import { AlertDataDefinition, type AlertDataDefinitionDTO } from "./alertDataDefinition";
5
5
 
6
6
  export class AlertState {
7
- id: string;
8
- status: AlertStatus;
9
- sourceTimestamp: number;
10
- enqueuedTimestamp: number;
11
- processedTimestamp: number;
12
- metadataValues?: AlertDataDefinition[];
7
+ id: string;
8
+ status: AlertStatus;
9
+ sourceTimestamp: number;
10
+ enqueuedTimestamp: number;
11
+ processedTimestamp: number;
12
+ metadataValues?: AlertDataDefinition[];
13
13
 
14
- constructor(params: AlertStateDTO) {
15
- this.id = params.id;
16
- this.status = params.status;
17
- this.sourceTimestamp = utcToEpoch(params.sourceTimestamp);
18
- this.enqueuedTimestamp = utcToEpoch(params.enqueuedTimestamp);
19
- this.processedTimestamp = utcToEpoch(params.processedTimestamp);
20
- this.metadataValues = params.metadataValues?.map(dto => new AlertDataDefinition(dto));
21
- }
14
+ constructor(params: AlertStateDTO) {
15
+ this.id = params.id;
16
+ this.status = params.status;
17
+ this.sourceTimestamp = utcToEpoch(params.sourceTimestamp);
18
+ this.enqueuedTimestamp = utcToEpoch(params.enqueuedTimestamp);
19
+ this.processedTimestamp = utcToEpoch(params.processedTimestamp);
20
+ this.metadataValues = params.metadataValues?.map(dto => new AlertDataDefinition(dto));
21
+ }
22
22
  }
23
23
 
24
24
  export interface AlertStateDTO {
25
- id: string;
26
- status: AlertStatus;
27
- sourceTimestamp: string;
28
- enqueuedTimestamp: string;
29
- processedTimestamp: string;
30
- metadataValues?: AlertDataDefinitionDTO[];
25
+ id: string;
26
+ status: AlertStatus;
27
+ sourceTimestamp: string;
28
+ enqueuedTimestamp: string;
29
+ processedTimestamp: string;
30
+ metadataValues?: AlertDataDefinitionDTO[];
31
31
  }
@@ -1,4 +1,5 @@
1
- import { ArticleInfos, ArticleInfosDTO } from "./articleInfos";
1
+ import type { ArticleInfosDTO } from "./articleInfos";
2
+ import { ArticleInfos } from "./articleInfos";
2
3
 
3
4
  export class ArticleDetails extends ArticleInfos {
4
5
  manufacturerId: string;
@@ -0,0 +1,33 @@
1
+ import type { ChartCategoryTranslationDTO } from "./chartCategoryTranslation";
2
+ import { ChartCategoryTranslation } from "./chartCategoryTranslation";
3
+ import type { ChartCategoryInfosDTO } from "./chartCategoryInfos";
4
+ import { ChartCategoryInfos } from "./chartCategoryInfos";
5
+
6
+ export class ChartCategoryDetails extends ChartCategoryInfos {
7
+ labelDefault: string;
8
+ translations: ChartCategoryTranslation[];
9
+
10
+ constructor(params: ChartCategoryDetailsDTO) {
11
+ super(params);
12
+
13
+ this.labelDefault = params.labelDefault;
14
+ this.translations = params.translations.map(t => new ChartCategoryTranslation(t));
15
+ }
16
+ }
17
+
18
+ export interface ChartCategoryDetailsDTO extends ChartCategoryInfosDTO {
19
+ labelDefault: string;
20
+ translations: ChartCategoryTranslationDTO[];
21
+ }
22
+
23
+ export interface CreateChartCategoryDTO {
24
+ labelDefault: string;
25
+ code: string;
26
+ translations: ChartCategoryTranslationDTO[];
27
+ }
28
+
29
+ export interface UpdateChartCategoryDTO {
30
+ labelDefault: string;
31
+ code: string;
32
+ translations: ChartCategoryTranslationDTO[];
33
+ }
@@ -0,0 +1,21 @@
1
+ export class ChartCategoryInfos {
2
+ id: string;
3
+ label: string;
4
+ code: string;
5
+
6
+ constructor(params: ChartCategoryInfosDTO) {
7
+ this.id = params.id;
8
+ this.label = params.label;
9
+ this.code = params.code;
10
+ }
11
+ }
12
+
13
+ export interface ChartCategoryInfosDTO {
14
+ id: string;
15
+ label: string;
16
+ code: string;
17
+ }
18
+
19
+ export interface ChartCategoryFilters {
20
+ search?: string | null;
21
+ }
@@ -0,0 +1,14 @@
1
+ export class ChartCategoryTranslation {
2
+ languageCode: string;
3
+ label: string;
4
+
5
+ constructor(params: ChartCategoryTranslationDTO) {
6
+ this.languageCode = params.languageCode;
7
+ this.label = params.label;
8
+ }
9
+ }
10
+
11
+ export interface ChartCategoryTranslationDTO {
12
+ languageCode: string;
13
+ label: string;
14
+ }
@@ -0,0 +1,3 @@
1
+ export * from "./chartCategoryDetails";
2
+ export * from "./chartCategoryInfos";
3
+ export * from "./chartCategoryTranslation";
@@ -1,62 +1,119 @@
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";
1
+ import type { ChartPresetFilterDTO, CreateChartPresetFilterDTO } from "../charts/chartPresetFilter";
2
+ import { ChartPresetFilter } from "../charts/chartPresetFilter";
3
+ import type { ChartOrganisationTypeInfosDTO } from "./chartOrganisationTypeInfos";
4
+ import { ChartOrganisationTypeInfos } from "./chartOrganisationTypeInfos";
5
+ import type { ChartVariableDTO, CreateChartVariableDTO } from "../charts/chartVariable";
6
+ import { ChartVariable } from "../charts/chartVariable";
7
+ import type { ChartPresetDTO, CreateChartPresetDTO } from "../charts/chartPreset";
8
+ import { ChartPreset } from "../charts/chartPreset";
9
+ import type { ChartTranslationDTO } from "../charts/chartTranslation";
10
+ import { ChartTranslation } from "../charts/chartTranslation";
11
+ import type { ChartAxisDTO, CreateChartAxisDTO } from "../charts/chartAxis";
12
+ import { ChartAxis } from "../charts/chartAxis";
13
+ import type { ChartPlotDTO, CreateChartPlotDTO } from "../charts/chartPlot";
14
+ import { ChartPlot } from "../charts/chartPlot";
15
+ import { ChartFilter } from "../charts/chartFilter";
16
+ import type { ChartFilterDTO,CreateChartFilterDTO } from "../charts/chartFilter";
17
+ import { ChartModifier } from "../charts/chartModifier";
18
+ import type { ChartModifierDTO,CreateChartModifierDTO } from "../charts/chartModifier";
19
+ import { ChartOperand } from "../charts/chartOperand";
20
+ import type { ChartOperandDTO,CreateChartOperandDTO } from "../charts/chartOperand";
21
+ import { ChartSerie } from "../charts/chartSerie";
22
+ import type { ChartSerieDTO,CreateChartSerieDTO } from "../charts/chartSerie";
23
+ import type { ColorSets } from "../enums/chartEnums";
7
24
 
8
25
  export class ChartOrganisationTypeDetails extends ChartOrganisationTypeInfos {
9
- colorSet: ColorSets;
10
- colorSeed: string;
11
- xAxis: ChartAxis | null;
12
- aggregates: boolean | null;
13
- dynamicVariables: boolean | null;
14
- chartVariables: ChartVariable[];
15
- chartPlots: ChartPlot[];
26
+ labelDefault: string;
27
+ titleDefault: string;
28
+ colorSet: ColorSets;
29
+ colorSeed: string;
30
+ xAxis: ChartAxis | null;
31
+ aggregates: boolean | null;
32
+ dynamicVariables: boolean | null;
33
+ chartVariables: ChartVariable[];
34
+ chartPresets: ChartPreset[];
35
+ chartPresetFilters: ChartPresetFilter[];
36
+ chartPlots: ChartPlot[];
37
+ chartSeries: ChartSerie[];
38
+ chartOperands: ChartOperand[];
39
+ chartFilters: ChartFilter[];
40
+ chartModifiers: ChartModifier[];
41
+ yAxis: ChartAxis[];
42
+ translations: ChartTranslation[];
16
43
 
17
- constructor(params: ChartOrganisationTypeDetailsDTO) {
18
- super(params);
19
-
20
- this.colorSet = params.colorSet as ColorSets;
21
- this.colorSeed = params.colorSeed;
22
- this.xAxis = params.xAxis ?
23
- new ChartAxis(params.xAxis) : null;
24
- this.aggregates = params.aggregates;
25
- this.dynamicVariables = params.dynamicVariables;
26
- this.chartVariables = params.chartVariables.map(cv => new ChartVariable(cv));
27
- this.chartPlots = params.chartPlots.map(cp => new ChartPlot(cp));
28
- }
44
+ constructor(params: ChartOrganisationTypeDetailsDTO) {
45
+ super(params);
46
+
47
+ this.labelDefault = params.labelDefault;
48
+ this.titleDefault = params.titleDefault;
49
+ this.colorSet = params.colorSet as ColorSets;
50
+ this.colorSeed = params.colorSeed;
51
+ this.xAxis = params.xAxis ?
52
+ new ChartAxis(params.xAxis) : null;
53
+ this.aggregates = params.aggregates;
54
+ this.dynamicVariables = params.dynamicVariables;
55
+ this.chartVariables = params.chartVariables.map(cv => new ChartVariable(cv));
56
+ this.chartPresets = params.chartPresets.map(cp => new ChartPreset(cp));
57
+ this.chartPresetFilters = params.chartPresetFilters.map(cpf => new ChartPresetFilter(cpf));
58
+ this.chartPlots = params.chartPlots.map(cp => new ChartPlot(cp));
59
+ this.chartSeries = params.chartSeries.map(cs => new ChartSerie(cs));
60
+ this.chartOperands = params.chartOperands.map(co => new ChartOperand(co));
61
+ this.chartFilters = params.chartFilters.map(cf => new ChartFilter(cf));
62
+ this.chartModifiers = params.chartModifiers.map(cm => new ChartModifier(cm));
63
+ this.yAxis = params.yAxis.map(ya => new ChartAxis(ya));
64
+ this.translations = params.translations.map((translation) => new ChartTranslation(translation));
65
+ }
29
66
  }
30
67
 
31
68
  export interface ChartOrganisationTypeDetailsDTO extends ChartOrganisationTypeInfosDTO {
32
- colorSet: number;
33
- colorSeed: string;
34
- xAxis: ChartAxisDTO | null;
35
- aggregates: boolean | null;
36
- dynamicVariables: boolean | null;
37
- chartVariables: ChartVariableDTO[];
38
- chartPlots: ChartPlotDTO[];
69
+ labelDefault: string;
70
+ titleDefault: string;
71
+ colorSet: number;
72
+ colorSeed: string;
73
+ xAxis: ChartAxisDTO | null;
74
+ aggregates: boolean | null;
75
+ dynamicVariables: boolean | null;
76
+ chartVariables: ChartVariableDTO[];
77
+ chartPresets: ChartPresetDTO[];
78
+ chartPresetFilters: ChartPresetFilterDTO[];
79
+ chartPlots: ChartPlotDTO[];
80
+ chartSeries: ChartSerieDTO[];
81
+ chartOperands: ChartOperandDTO[];
82
+ chartFilters: ChartFilterDTO[];
83
+ chartModifiers: ChartModifierDTO[];
84
+ yAxis: ChartAxisDTO[];
85
+ translations: ChartTranslationDTO[];
39
86
  }
40
87
 
41
88
  export interface CreateChartOrganisationTypeDTO {
42
- chartOrganisationId: string;
43
- organisationTypeId: string | null;
89
+ chartOrganisationId: string;
90
+ organisationTypeId: string | null;
44
91
  }
45
92
 
46
93
  export interface UpdateChartOrganisationTypeDTO {
47
- code: string;
48
- icon: string;
49
- tags: string[];
50
- multiple: boolean;
51
- chartType: number;
52
- colorSet: number;
53
- colorSeed: string;
54
- xAxis: CreateChartAxisDTO | null;
55
- aggregates: boolean | null;
56
- dynamicVariables: boolean | null;
57
- chartVariables: CreateChartVariableDTO[];
58
- chartPlots: CreateChartPlotDTO[];
59
- labelDefault: string;
60
- titleDefault: string;
61
- translations: CreateChartTranslationDTO[];
94
+ chartCategoryId: string | null;
95
+ imageId: string | null;
96
+ image: string | null;
97
+ labelDefault: string;
98
+ titleDefault: string;
99
+ code: string;
100
+ icon: string;
101
+ tags: string[];
102
+ multiple: boolean;
103
+ chartType: number;
104
+ colorSet: number;
105
+ colorSeed: string;
106
+ xAxis: CreateChartAxisDTO | null;
107
+ aggregates: boolean | null;
108
+ dynamicVariables: boolean | null;
109
+ chartVariables: CreateChartVariableDTO[];
110
+ chartPresets: CreateChartPresetDTO[];
111
+ chartPresetFilters: CreateChartPresetFilterDTO[];
112
+ chartPlots: CreateChartPlotDTO[];
113
+ chartSeries: CreateChartSerieDTO[];
114
+ chartOperands: CreateChartOperandDTO[];
115
+ chartFilters: CreateChartFilterDTO[];
116
+ chartModifiers: CreateChartModifierDTO[];
117
+ yAxis: CreateChartAxisDTO[];
118
+ translations: ChartTranslationDTO[];
62
119
  }
@@ -1,66 +1,67 @@
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";
1
+ import type { ChartModelLabelDTO } from "../charts/chartModelLabel";
2
+ import { ChartModelLabel } from "../charts/chartModelLabel";
3
+ import type { ApplicationScope } from "../enums/applicationEnums";
4
+ import type { ChartType, PlotPer } from "../enums/chartEnums";
5
5
 
6
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[];
7
+ id: string;
8
+ imageId: string | null;
9
+ chartId: string;
10
+ organisationTypeId: string;
11
+ organisationTypeLabel: string;
12
+ chartCategoryId: string | null;
13
+ chartCategoryLabel: string | null;
14
+ scope: ApplicationScope;
15
+ label: string;
16
+ title: string;
17
+ code: string;
18
+ icon: string;
19
+ tags: string[];
20
+ multiple: boolean;
21
+ chartType: ChartType;
22
+ modelsLabels: ChartModelLabel[];
23
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
- }
24
+ constructor(params: ChartOrganisationTypeInfosDTO) {
25
+ this.id = params.id;
26
+ this.imageId = params.imageId;
27
+ this.chartId = params.chartId;
28
+ this.organisationTypeId = params.organisationTypeId;
29
+ this.organisationTypeLabel = params.organisationTypeLabel;
30
+ this.chartCategoryId = params.chartCategoryId;
31
+ this.chartCategoryLabel = params.chartCategoryLabel;
32
+ this.scope = params.scope;
33
+ this.label = params.label;
34
+ this.title = params.title;
35
+ this.code = params.code;
36
+ this.icon = params.icon;
37
+ this.tags = params.tags.slice();
38
+ this.multiple = params.multiple;
39
+ this.chartType = params.chartType;
40
+ this.modelsLabels = params.modelsLabels.map((modelLabel) => new ChartModelLabel(modelLabel));
41
+ }
42
42
  }
43
43
 
44
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[];
45
+ id: string;
46
+ chartId: string;
47
+ organisationTypeId: string;
48
+ organisationTypeLabel: string;
49
+ chartCategoryId: string | null;
50
+ chartCategoryLabel: string | null;
51
+ scope: ApplicationScope;
52
+ label: string;
53
+ title: string;
54
+ code: string;
55
+ icon: string;
56
+ imageId: string | null;
57
+ tags: string[];
58
+ multiple: boolean;
59
+ chartType: ChartType;
60
+ modelsLabels: ChartModelLabelDTO[];
61
61
  }
62
62
 
63
63
  export interface ChartOrganisationTypeFilters {
64
- modelsIds?: string[] | null;
65
- search?: string | null;
64
+ modelsIds?: string[] | null;
65
+ plotPer?: PlotPer | null;
66
+ search?: string | null;
66
67
  }