@dative-gpi/foundation-core-domain 0.0.230 → 0.1.68

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 (93) hide show
  1. package/models/actions/actionInfos.ts +1 -1
  2. package/models/alerts/alertDetails.ts +10 -1
  3. package/models/alerts/alertInfos.ts +15 -15
  4. package/models/alerts/alertState.ts +5 -5
  5. package/models/chartOrganisationTypes/chartOrganisationTypeDetails.ts +1 -1
  6. package/models/chartOrganisationTypes/chartOrganisationTypeInfos.ts +3 -2
  7. package/models/chartOrganisations/chartOrganisationDetails.ts +1 -1
  8. package/models/chartOrganisations/chartOrganisationInfos.ts +3 -2
  9. package/models/charts/chartAxis.ts +1 -1
  10. package/models/charts/chartDetails.ts +1 -1
  11. package/models/charts/chartFilter.ts +1 -1
  12. package/models/charts/chartInfos.ts +2 -2
  13. package/models/charts/chartOperand.ts +1 -1
  14. package/models/charts/chartTimeRange.ts +1 -1
  15. package/models/charts/chartTimeStep.ts +1 -1
  16. package/models/comments/commentInfos.ts +3 -3
  17. package/models/connectivityAlerts/connectivityAlertInfos.ts +4 -4
  18. package/models/connectivityScenarios/index.ts +2 -1
  19. package/models/customProperties/customPropertyColor.ts +1 -1
  20. package/models/customProperties/customPropertyInfos.ts +1 -1
  21. package/models/customPropertyValues/customPropertyValueInfos.ts +2 -2
  22. package/models/dashboardDatePresets/dashboardDatePresetDetails.ts +3 -1
  23. package/models/dashboardDatePresets/dashboardDatePresetInfos.ts +6 -4
  24. package/models/dashboardEntityPresets/dashboardEntityPresetDetails.ts +2 -2
  25. package/models/dashboardEntityPresets/dashboardEntityPresetInfos.ts +10 -7
  26. package/models/dashboardOrganisationTypes/dashboardOrganisationTypeDetails.ts +4 -1
  27. package/models/dashboardOrganisationTypes/dashboardOrganisationTypeInfos.ts +2 -1
  28. package/models/dashboardOrganisations/dashboardOrganisationDetails.ts +3 -1
  29. package/models/dashboardOrganisations/dashboardOrganisationInfos.ts +2 -1
  30. package/models/dashboardShallowDatePresets/dashboardShallowDatePresetDetails.ts +1 -1
  31. package/models/dashboardShallowDatePresets/dashboardShallowDatePresetInfos.ts +1 -1
  32. package/models/dashboardShallowEntityPresets/dashboardShallowEntityPresetDetails.ts +2 -2
  33. package/models/dashboardShallowEntityPresets/dashboardShallowEntityPresetInfos.ts +4 -4
  34. package/models/dashboardShallowVariables/dashboardShallowVariableDetails.ts +1 -5
  35. package/models/dashboardShallowVariables/dashboardShallowVariableInfos.ts +3 -12
  36. package/models/dashboardShallows/dashboardShallowDetails.ts +63 -23
  37. package/models/dashboardShallows/dashboardShallowInfos.ts +1 -1
  38. package/models/dashboardVariableValues/dashboardVariableValue.ts +6 -3
  39. package/models/dashboardVariables/dashboardVariableDetails.ts +3 -3
  40. package/models/dashboardVariables/dashboardVariableInfos.ts +7 -7
  41. package/models/dashboards/dashboardInfos.ts +1 -1
  42. package/models/dataDefinitions/dataDefinitionInfos.ts +1 -1
  43. package/models/deviceConnectivities/deviceConnectivityInfos.ts +5 -5
  44. package/models/deviceOrganisations/deviceOrganisationAlert.ts +4 -4
  45. package/models/deviceStatuses/deviceStatusInfos.ts +4 -4
  46. package/models/folders/folderInfos.ts +1 -0
  47. package/models/index.ts +15 -16
  48. package/models/organisations/organisationDetails.ts +1 -1
  49. package/models/roleOrganisationTypes/roleOrganisationTypeDetails.ts +7 -8
  50. package/models/roleOrganisationTypes/roleOrganisationTypeInfos.ts +41 -43
  51. package/models/roleOrganisations/roleOrganisationDetails.ts +2 -4
  52. package/models/roleOrganisations/roleOrganisationInfos.ts +36 -38
  53. package/models/scenarioDeviceOrganisations/scenarioDeviceOrganisationDetails.ts +23 -9
  54. package/models/scenarioDeviceOrganisations/scenarioDeviceOrganisationInfos.ts +38 -14
  55. package/models/scenarioOrganisationTypes/scenarioOrganisationTypeDetails.ts +9 -2
  56. package/models/scenarioOrganisationTypes/scenarioOrganisationTypeInfos.ts +14 -2
  57. package/models/scenarioOrganisations/scenarioOrganisationDetails.ts +13 -2
  58. package/models/scenarioOrganisations/scenarioOrganisationInfos.ts +14 -2
  59. package/models/scenarioParameterDeviceOrganisations/index.ts +2 -0
  60. package/models/scenarioParameterDeviceOrganisations/scenarioParameterDeviceOrganisationDetails.ts +24 -0
  61. package/models/scenarioParameterDeviceOrganisations/scenarioParameterDeviceOrganisationInfos.ts +45 -0
  62. package/models/scenarios/index.ts +5 -1
  63. package/models/scenarios/scenarioChart.ts +30 -0
  64. package/models/scenarios/scenarioParameter.ts +52 -0
  65. package/models/scenarios/scenarioParameterOverride.ts +20 -0
  66. package/models/scenarios/translationScenarioParameter.ts +14 -0
  67. package/models/serviceAccountOrganisationAuthTokens/serviceAccountOrganisationAuthTokenDetails.ts +10 -11
  68. package/models/serviceAccountOrganisationAuthTokens/serviceAccountOrganisationAuthTokenInfos.ts +24 -20
  69. package/models/serviceAccountOrganisations/serviceAccountOrganisationDetails.ts +2 -7
  70. package/models/serviceAccountOrganisations/serviceAccountOrganisationInfos.ts +1 -5
  71. package/models/serviceAccountRoleOrganisations/index.ts +2 -0
  72. package/models/serviceAccountRoleOrganisations/serviceAccountRoleOrganisationDetails.ts +33 -0
  73. package/models/serviceAccountRoleOrganisations/serviceAccountRoleOrganisationInfos.ts +42 -0
  74. package/models/shared/timeRange.ts +1 -1
  75. package/models/userOrganisations/userOrganisationDetails.ts +2 -2
  76. package/models/userOrganisations/userOrganisationInfos.ts +67 -65
  77. package/models/widgetTemplates/widgetTemplateInfos.ts +16 -2
  78. package/models/widgets/widgetInfos.ts +16 -4
  79. package/package.json +6 -2
  80. package/models/enums/actionEnums.ts +0 -6
  81. package/models/enums/applicationEnums.ts +0 -8
  82. package/models/enums/chartEnums.ts +0 -109
  83. package/models/enums/customPropertyEnums.ts +0 -12
  84. package/models/enums/index.ts +0 -8
  85. package/models/enums/notificationEnums.ts +0 -6
  86. package/models/enums/roleEnums.ts +0 -5
  87. package/models/enums/sharedEnums.ts +0 -39
  88. package/models/enums/userEnums.ts +0 -12
  89. package/models/notifications/index.ts +0 -2
  90. package/models/notifications/notificationDetails.ts +0 -10
  91. package/models/notifications/notificationInfos.ts +0 -43
  92. package/models/scenarioDiffusions/index.ts +0 -1
  93. package/models/scenarioDiffusions/scenarioDiffusion.ts +0 -25
@@ -1,4 +1,4 @@
1
- import type { ActionType } from "../enums/actionEnums";
1
+ import type { ActionType } from "@dative-gpi/foundation-shared-domain/enums";
2
2
 
3
3
  export class ActionInfos {
4
4
  extensionId: string | null;
@@ -1,15 +1,24 @@
1
+ import type { ApplicationScope } from "@/shared/foundation-shared-domain/enums";
1
2
  import { AlertInfos, type AlertInfosDTO } from "./alertInfos";
2
3
 
3
4
  export class AlertDetails extends AlertInfos {
4
5
  description: string;
6
+ comments: string;
7
+ scenarioId: string;
8
+ scenarioScope: ApplicationScope;
5
9
 
6
10
  constructor(params: AlertDetailsDTO) {
7
11
  super(params);
8
-
12
+ this.comments = params.comments;
9
13
  this.description = params.description;
14
+ this.scenarioId = params.scenarioId;
15
+ this.scenarioScope = params.scenarioScope;
10
16
  }
11
17
  }
12
18
 
13
19
  export interface AlertDetailsDTO extends AlertInfosDTO {
14
20
  description: string;
21
+ comments: string;
22
+ scenarioId: string;
23
+ scenarioScope: ApplicationScope;
15
24
  }
@@ -1,14 +1,14 @@
1
- import { type AlertStatus, type Criticity } from "@dative-gpi/foundation-shared-domain/models";
2
- import { utcToEpoch } from "@dative-gpi/foundation-shared-domain/tools";
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 SelectedEntities } from "../enums/sharedEnums";
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 {
10
10
  id: string;
11
- scenarioId: string;
11
+ deprecatedScenarioId: string;
12
12
  scenarioLabel: string;
13
13
  organisationId: string;
14
14
  deviceOrganisationId: string;
@@ -39,7 +39,7 @@ export class AlertInfos {
39
39
 
40
40
  constructor(params: AlertInfosDTO) {
41
41
  this.id = params.id;
42
- this.scenarioId = params.scenarioId;
42
+ this.deprecatedScenarioId = params.deprecatedScenarioId;
43
43
  this.scenarioLabel = params.scenarioLabel;
44
44
  this.organisationId = params.organisationId;
45
45
  this.deviceOrganisationId = params.deviceOrganisationId;
@@ -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
- utcToEpoch(params.acknowledgingTimestamp) : null;
58
+ isoToEpoch(params.acknowledgingTimestamp) : null;
59
59
  this.initialState = new AlertState(params.initialState);
60
60
  this.triggerSourceTimestamp = params.triggerSourceTimestamp ?
61
- utcToEpoch(params.triggerSourceTimestamp) : null;
61
+ isoToEpoch(params.triggerSourceTimestamp) : null;
62
62
  this.triggerEnqueuedTimestamp = params.triggerEnqueuedTimestamp ?
63
- utcToEpoch(params.triggerEnqueuedTimestamp) : null;
63
+ isoToEpoch(params.triggerEnqueuedTimestamp) : null;
64
64
  this.triggerProcessedTimestamp = params.triggerProcessedTimestamp ?
65
- utcToEpoch(params.triggerProcessedTimestamp) : null;
65
+ isoToEpoch(params.triggerProcessedTimestamp) : null;
66
66
  this.lastState = new AlertState(params.lastState);
67
67
  this.currentSourceTimestamp = params.currentSourceTimestamp ?
68
- utcToEpoch(params.currentSourceTimestamp) : null;
68
+ isoToEpoch(params.currentSourceTimestamp) : null;
69
69
  this.currentEnqueuedTimestamp = params.currentEnqueuedTimestamp ?
70
- utcToEpoch(params.currentEnqueuedTimestamp) : null;
70
+ isoToEpoch(params.currentEnqueuedTimestamp) : null;
71
71
  this.currentProcessedTimestamp = params.currentProcessedTimestamp ?
72
- utcToEpoch(params.currentProcessedTimestamp) : null;
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));
@@ -79,7 +79,7 @@ export class AlertInfos {
79
79
 
80
80
  export interface AlertInfosDTO {
81
81
  id: string;
82
- scenarioId: string;
82
+ deprecatedScenarioId: string;
83
83
  scenarioLabel: string;
84
84
  organisationId: string;
85
85
  deviceOrganisationId: string;
@@ -110,13 +110,13 @@ export interface AlertInfosDTO {
110
110
  }
111
111
 
112
112
  export interface AlertFilters {
113
- scenarioId?: string | null;
113
+ deprecatedScenarioId?: string | null;
114
114
  deviceOrganisationId?: string | null;
115
115
  statuses?: AlertStatus[] | null;
116
116
  acknowledged?: boolean | null;
117
117
  startDate?: string | null;
118
118
  endDate?: string | null;
119
- selectedEntities?: SelectedEntities | null;
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/models";
2
- import { utcToEpoch } from "@dative-gpi/foundation-shared-domain/tools";
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 = utcToEpoch(params.sourceTimestamp);
18
- this.enqueuedTimestamp = utcToEpoch(params.enqueuedTimestamp);
19
- this.processedTimestamp = utcToEpoch(params.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 "../enums/chartEnums";
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 "../enums/applicationEnums";
4
- import type { ChartType, PlotPer } from "../enums/chartEnums";
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;
@@ -64,4 +64,5 @@ export interface ChartOrganisationTypeFilters {
64
64
  modelsIds?: string[] | null;
65
65
  plotPer?: PlotPer | null;
66
66
  search?: string | null;
67
+ deprecatedChartId?: string | null;
67
68
  }
@@ -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 "../enums/chartEnums";
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 "../enums/applicationEnums";
4
- import type { ChartType, PlotPer } from "../enums/chartEnums";
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;
@@ -61,4 +61,5 @@ export interface ChartOrganisationFilters {
61
61
  modelsIds?: string[] | null;
62
62
  plotPer?: PlotPer | null;
63
63
  search?: string | null;
64
+ deprecatedChartId?: string | null;
64
65
  }
@@ -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 "../enums/chartEnums";
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 "../enums/chartEnums";
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 "../enums/sharedEnums";
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 "../enums/applicationEnums";
4
- import type { ChartType } from "../enums/chartEnums";
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 { AggregationType } from "../enums/chartEnums";
1
+ import type { AggregationType } from "@dative-gpi/foundation-shared-domain/enums";
2
2
 
3
3
  export class ChartOperand {
4
4
  id: string;
@@ -1,4 +1,4 @@
1
- import type { Days } from "@dative-gpi/foundation-shared-domain/models";
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 type { TimeUnit } from "../enums/sharedEnums";
1
+ import type { TimeUnit } from "@dative-gpi/foundation-shared-domain/enums";
2
2
 
3
3
  export class ChartTimeStep {
4
4
  use: boolean;
@@ -1,4 +1,4 @@
1
- import { utcToEpoch } from "@dative-gpi/foundation-shared-domain/tools";
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 = utcToEpoch(params.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
- utcToEpoch(params.editTimestamp) : null;
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/models";
2
- import { utcToEpoch } from "@dative-gpi/foundation-shared-domain/tools";
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 = utcToEpoch(params.triggerProcessedTimestamp);
30
+ this.triggerProcessedTimestamp = isoToEpoch(params.triggerProcessedTimestamp);
31
31
  this.resolveProcessedTimestamp = params.resolveProcessedTimestamp ?
32
- utcToEpoch(params.resolveProcessedTimestamp) : null;
32
+ isoToEpoch(params.resolveProcessedTimestamp) : null;
33
33
  this.status = params.status;
34
34
  }
35
35
  }
@@ -1,2 +1,3 @@
1
1
  export * from "./connectivityScenarioDetails";
2
- export * from "./connectivityScenarioInfos";
2
+ export * from "./connectivityScenarioInfos";
3
+ export * from "./connectivityScenarioUserInfos";
@@ -1,4 +1,4 @@
1
- import type { FilterType } from "../enums/sharedEnums";
1
+ import type { FilterType } from "@dative-gpi/foundation-shared-domain/enums";
2
2
 
3
3
  export class CustomPropertyColor {
4
4
  priority: number;
@@ -1,6 +1,6 @@
1
1
  import type { CustomPropertyColorDTO } from "./customPropertyColor";
2
2
  import { CustomPropertyColor } from "./customPropertyColor";
3
- import type { PropertyDataType, PropertyEntity } from "../enums/customPropertyEnums";
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 { utcToEpoch } from "@dative-gpi/foundation-shared-domain/tools";
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
- utcToEpoch(params.timestamp) : null;
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: number;
11
+ autoRefresh: AutoRefresh;
10
12
  translations: DashboardDatePresetTranslationDTO[];
11
13
  }
@@ -1,11 +1,11 @@
1
- import type { AutoRefresh } from "@dative-gpi/foundation-shared-domain/models";
1
+ import type { AutoRefresh } from "@dative-gpi/foundation-shared-domain/enums";
2
+ import { translate } from "@dative-gpi/foundation-shared-services/tools/translate";
2
3
 
3
4
  import type { DashboardDatePresetTranslationDTO } from "./dashboardDatePresetTranslation";
4
5
  import { DashboardDatePresetTranslation } from "./dashboardDatePresetTranslation";
5
6
 
6
7
  export class DashboardDatePresetInfos {
7
8
  hiddenCode: string;
8
- label: string;
9
9
  labelDefault: string;
10
10
  startDate: string;
11
11
  endDate: string;
@@ -13,9 +13,12 @@ export class DashboardDatePresetInfos {
13
13
  autoRefresh: AutoRefresh;
14
14
  translations: DashboardDatePresetTranslation[];
15
15
 
16
+ get label() {
17
+ return translate(this.translations, t => t.label, this.labelDefault)
18
+ };
19
+
16
20
  constructor(params: DashboardDatePresetInfosDTO) {
17
21
  this.hiddenCode = params.hiddenCode;
18
- this.label = params.label;
19
22
  this.labelDefault = params.labelDefault;
20
23
  this.startDate = params.startDate;
21
24
  this.endDate = params.endDate;
@@ -27,7 +30,6 @@ export class DashboardDatePresetInfos {
27
30
 
28
31
  export interface DashboardDatePresetInfosDTO {
29
32
  hiddenCode: string;
30
- label: string;
31
33
  labelDefault: string;
32
34
  startDate: string;
33
35
  endDate: string;
@@ -1,11 +1,11 @@
1
1
  import type { DashboardEntityPresetTranslationDTO } from "./dashboardEntityPresetTranslation";
2
- import type { SelectedEntities } from "../enums/sharedEnums";
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
- selectedEntities: SelectedEntities;
8
+ entityType: EntityType;
9
9
  entitiesFilters: string;
10
10
  entitiesIds: string[];
11
11
  translations: DashboardEntityPresetTranslationDTO[];
@@ -1,23 +1,27 @@
1
+ import { translate } from "@dative-gpi/foundation-shared-services/tools/translate";
2
+
1
3
  import type { DashboardEntityPresetTranslationDTO } from "./dashboardEntityPresetTranslation";
2
4
  import { DashboardEntityPresetTranslation } from "./dashboardEntityPresetTranslation";
3
- import type { SelectedEntities } from "../enums/sharedEnums";
5
+ import type { EntityType } from "@dative-gpi/foundation-shared-domain/enums";
4
6
 
5
7
  export class DashboardEntityPresetInfos {
6
8
  hiddenCode: string;
7
- label: string;
8
9
  labelDefault: string;
9
10
  singleEntity: boolean;
10
- selectedEntities: SelectedEntities;
11
+ entityType: EntityType;
11
12
  entitiesFilters: string;
12
13
  entitiesIds: string[];
13
14
  translations: DashboardEntityPresetTranslation[];
14
15
 
16
+ get label() {
17
+ return translate(this.translations, t => t.label, this.labelDefault)
18
+ };
19
+
15
20
  constructor(params: DashboardEntityPresetInfosDTO) {
16
21
  this.hiddenCode = params.hiddenCode;
17
- this.label = params.label;
18
22
  this.labelDefault = params.labelDefault;
19
23
  this.singleEntity = params.singleEntity;
20
- this.selectedEntities = params.selectedEntities;
24
+ this.entityType = params.entityType;
21
25
  this.entitiesFilters = params.entitiesFilters;
22
26
  this.entitiesIds = params.entitiesIds.slice();
23
27
  this.translations = params.translations.map(t => new DashboardEntityPresetTranslation(t));
@@ -26,10 +30,9 @@ export class DashboardEntityPresetInfos {
26
30
 
27
31
  export interface DashboardEntityPresetInfosDTO {
28
32
  hiddenCode: string;
29
- label: string;
30
33
  labelDefault: string;
31
34
  singleEntity: boolean;
32
- selectedEntities: SelectedEntities;
35
+ entityType: EntityType;
33
36
  entitiesFilters: string;
34
37
  entitiesIds: string[];
35
38
  translations: DashboardEntityPresetTranslationDTO[];
@@ -15,13 +15,15 @@ import type { CreateWidgetDTO } from "../widgets/widgetDetails";
15
15
  export class DashboardOrganisationTypeDetails extends DashboardOrganisationTypeInfos {
16
16
  labelDefault: string;
17
17
  translations: DashboardTranslation[];
18
+
19
+ widgets: WidgetInfos[];
20
+
18
21
  entityPresetCode: string | null;
19
22
  datePresetCode: string | null;
20
23
  variableCode: string | null;
21
24
  datePresets: DashboardDatePresetInfos[];
22
25
  entityPresets: DashboardEntityPresetInfos[];
23
26
  variables: DashboardVariableInfos[];
24
- widgets: WidgetInfos[];
25
27
 
26
28
  constructor(params: DashboardOrganisationTypeDetailsDTO) {
27
29
  super(params);
@@ -55,6 +57,7 @@ export interface UpdateDashboardOrganisationTypeDTO {
55
57
  image: string | null;
56
58
  labelDefault: string;
57
59
  code: string;
60
+ colors: string[];
58
61
  icon: string;
59
62
  tags: string[];
60
63
  translations: DashboardTranslationDTO[];
@@ -1,4 +1,4 @@
1
- import type { ApplicationScope } from "../enums/applicationEnums";
1
+ import type { ApplicationScope } from "@dative-gpi/foundation-shared-domain/enums";
2
2
 
3
3
  export class DashboardOrganisationTypeInfos {
4
4
  id: string;
@@ -46,5 +46,6 @@ export interface DashboardOrganisationTypeInfosDTO {
46
46
  }
47
47
 
48
48
  export interface DashboardOrganisationTypeFilters {
49
+ dashboardOrganisationTypesIds?: string[] | null;
49
50
  search?: string | null;
50
51
  }
@@ -18,13 +18,15 @@ export class DashboardOrganisationDetails extends DashboardOrganisationInfos {
18
18
  labelDefault: string;
19
19
  path: PathCrumb[];
20
20
  translations: DashboardTranslation[];
21
+
22
+ widgets: WidgetInfos[];
23
+
21
24
  entityPresetCode: string | null;
22
25
  datePresetCode: string | null;
23
26
  variableCode: string | null;
24
27
  datePresets: DashboardDatePresetInfos[];
25
28
  entityPresets: DashboardEntityPresetInfos[];
26
29
  variables: DashboardVariableInfos[];
27
- widgets: WidgetInfos[];
28
30
 
29
31
  constructor(params: DashboardOrganisationDetailsDTO) {
30
32
  super(params);
@@ -1,4 +1,4 @@
1
- import type { ApplicationScope } from "../enums/applicationEnums";
1
+ import type { ApplicationScope } from "@dative-gpi/foundation-shared-domain/enums";
2
2
 
3
3
  export class DashboardOrganisationInfos {
4
4
  id: string;
@@ -52,6 +52,7 @@ export interface DashboardOrganisationInfosDTO {
52
52
  }
53
53
 
54
54
  export interface DashboardOrganisationFilters {
55
+ dashboardOrganisationsIds?: string[] | null;
55
56
  root?: boolean | null;
56
57
  folderId?: string | null;
57
58
  search?: string | null;
@@ -1,4 +1,4 @@
1
- import type { AutoRefresh } from "@/shared/foundation-shared-domain/models";
1
+ import type { AutoRefresh } from "@/shared/foundation-shared-domain/enums";
2
2
 
3
3
  export interface CreateDashboardShallowDatePresetDTO {
4
4
  hiddenCode: string;
@@ -1,4 +1,4 @@
1
- import type { AutoRefresh } from "@/shared/foundation-shared-domain/models";
1
+ import type { AutoRefresh } from "@/shared/foundation-shared-domain/enums";
2
2
 
3
3
  export class DashboardShallowDatePresetInfos {
4
4
  hiddenCode: string;
@@ -1,9 +1,9 @@
1
- import type { SelectedEntities } from "../enums/sharedEnums";
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
- selectedEntities: SelectedEntities;
6
+ entityType: EntityType;
7
7
  entitiesFilters: string;
8
8
  entitiesIds: string[];
9
9
  }
@@ -1,16 +1,16 @@
1
- import type { SelectedEntities } from "../enums/sharedEnums";
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
- selectedEntities: SelectedEntities;
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.selectedEntities = params.selectedEntities;
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
- selectedEntities: SelectedEntities;
22
+ entityType: EntityType;
23
23
  entitiesFilters: string;
24
24
  entitiesIds: string[];
25
25
  }
@@ -1,8 +1,4 @@
1
- import type { CreateDashboardVariableValueDTO } from "../dashboardVariableValues";
2
-
3
1
  export interface CreateDashboardShallowVariableDTO {
4
2
  hiddenCode: string;
5
- defaultValue: string;
6
- useOnlyAllowedValues: boolean;
7
- allowedValues: CreateDashboardVariableValueDTO[];
3
+ value: string;
8
4
  }
@@ -1,23 +1,14 @@
1
- import type { DashboardVariableValueDTO } from "../dashboardVariableValues";
2
- import { DashboardVariableValue } from "../dashboardVariableValues";
3
-
4
1
  export class DashboardShallowVariableInfos {
5
2
  hiddenCode: string;
6
- defaultValue: string;
7
- useOnlyAllowedValues: boolean;
8
- allowedValues: DashboardVariableValue[];
3
+ value: string;
9
4
 
10
5
  constructor(params: DashboardShallowVariableInfosDTO) {
11
6
  this.hiddenCode = params.hiddenCode;
12
- this.defaultValue = params.defaultValue;
13
- this.useOnlyAllowedValues = params.useOnlyAllowedValues;
14
- this.allowedValues = params.allowedValues.map(dto => new DashboardVariableValue(dto));
7
+ this.value = params.value;
15
8
  }
16
9
  }
17
10
 
18
11
  export interface DashboardShallowVariableInfosDTO {
19
12
  hiddenCode: string;
20
- defaultValue: string;
21
- useOnlyAllowedValues: boolean;
22
- allowedValues: DashboardVariableValueDTO[];
13
+ value: string;
23
14
  }