@dative-gpi/foundation-core-domain 1.0.66 → 1.0.67-map-edit

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 (76) hide show
  1. package/models/actions/actionInfos.ts +3 -0
  2. package/models/alerts/alertDetails.ts +0 -7
  3. package/models/alerts/alertInfos.ts +26 -8
  4. package/models/alerts/alertState.ts +9 -6
  5. package/models/chartCategories/chartCategoryDetails.ts +2 -0
  6. package/models/chartCategories/chartCategoryInfos.ts +3 -0
  7. package/models/chartOrganisationTypes/chartOrganisationTypeDetails.ts +17 -4
  8. package/models/chartOrganisationTypes/chartOrganisationTypeInfos.ts +10 -1
  9. package/models/chartOrganisations/chartOrganisationDetails.ts +20 -7
  10. package/models/chartOrganisations/chartOrganisationInfos.ts +10 -1
  11. package/models/charts/chartAllowedStep.ts +31 -0
  12. package/models/charts/chartAllowedStepTranslation.ts +19 -0
  13. package/models/charts/chartDetails.ts +12 -1
  14. package/models/charts/chartInfos.ts +6 -0
  15. package/models/charts/chartPreset.ts +4 -0
  16. package/models/charts/chartTimeRange.ts +3 -1
  17. package/models/charts/chartTimeStep.ts +0 -4
  18. package/models/charts/index.ts +2 -0
  19. package/models/connectivityAlerts/connectivityAlertInfos.ts +6 -0
  20. package/models/connectivityScenarios/connectivityScenarioDetails.ts +2 -2
  21. package/models/customProperties/customPropertyInfos.ts +0 -3
  22. package/models/dashboardDatePresets/dashboardDatePresetDetails.ts +1 -0
  23. package/models/dashboardDatePresets/dashboardDatePresetInfos.ts +3 -0
  24. package/models/dashboardEntityPresets/dashboardEntityPresetDetails.ts +1 -0
  25. package/models/dashboardEntityPresets/dashboardEntityPresetInfos.ts +3 -0
  26. package/models/dashboardShallowWidgets/dashboardShallowWidgetDetails.ts +4 -0
  27. package/models/dashboardShallowWidgets/dashboardShallowWidgetInfos.ts +30 -0
  28. package/models/dashboardShallowWidgets/index.ts +2 -0
  29. package/models/dashboardShallows/dashboardShallowDetails.ts +37 -61
  30. package/models/dashboardShallows/dashboardShallowInfos.ts +1 -0
  31. package/models/dashboardVariables/dashboardVariableDetails.ts +1 -0
  32. package/models/dashboardVariables/dashboardVariableInfos.ts +3 -0
  33. package/models/dashboards/dashboardSettings.ts +22 -0
  34. package/models/dashboards/index.ts +1 -0
  35. package/models/deviceDataDefinitions/deviceDataDefinitionInfos.ts +39 -0
  36. package/models/deviceDataDefinitions/index.ts +1 -0
  37. package/models/deviceExplorerElements/deviceExplorerElementDetails.ts +11 -0
  38. package/models/deviceExplorerElements/deviceExplorerElementInfos.ts +149 -0
  39. package/models/deviceExplorerElements/index.ts +2 -0
  40. package/models/deviceOrganisations/deviceOrganisationAlert.ts +3 -0
  41. package/models/deviceOrganisations/deviceOrganisationDetails.ts +2 -3
  42. package/models/deviceOrganisations/deviceOrganisationInfos.ts +26 -12
  43. package/models/folders/folderInfos.ts +6 -0
  44. package/models/groups/groupInfos.ts +1 -2
  45. package/models/index.ts +5 -1
  46. package/models/locations/locationInfos.ts +3 -0
  47. package/models/playlists/index.ts +3 -0
  48. package/models/playlists/playlistDashboard.ts +31 -0
  49. package/models/playlists/playlistDetails.ts +32 -0
  50. package/models/playlists/playlistInfos.ts +39 -0
  51. package/models/roleOrganisations/roleOrganisationDetails.ts +12 -0
  52. package/models/roles/index.ts +1 -0
  53. package/models/roles/roleTranslation.ts +17 -0
  54. package/models/scenarioDeviceOrganisations/scenarioDeviceOrganisationDetails.ts +18 -9
  55. package/models/scenarioDeviceOrganisations/scenarioDeviceOrganisationInfos.ts +14 -11
  56. package/models/scenarioOrganisationTypes/scenarioOrganisationTypeDetails.ts +12 -3
  57. package/models/scenarioOrganisationTypes/scenarioOrganisationTypeInfos.ts +18 -7
  58. package/models/scenarioOrganisations/scenarioOrganisationDetails.ts +16 -5
  59. package/models/scenarioOrganisations/scenarioOrganisationInfos.ts +18 -7
  60. package/models/scenarios/scenarioChart.ts +1 -1
  61. package/models/scenarios/scenarioParameterOverride.ts +4 -4
  62. package/models/serviceAccountOrganisations/serviceAccountOrganisationDetails.ts +0 -7
  63. package/models/serviceAccountOrganisations/serviceAccountOrganisationInfos.ts +6 -0
  64. package/models/shared/timeRange.ts +5 -1
  65. package/models/userOrganisationTables/userOrganisationTableInfos.ts +2 -2
  66. package/models/userOrganisations/userOrganisationDetails.ts +2 -1
  67. package/models/userOrganisations/userOrganisationInfos.ts +3 -0
  68. package/models/widgetTemplates/widgetTemplateInfos.ts +10 -0
  69. package/models/widgets/index.ts +2 -1
  70. package/models/widgets/widgetDetails.ts +3 -0
  71. package/models/widgets/widgetInfos.ts +7 -0
  72. package/models/widgets/widgetInterface.ts +15 -0
  73. package/package.json +4 -4
  74. package/models/extensionApplications/extensionApplicationDetails.ts +0 -18
  75. package/models/extensionApplications/extensionApplicationInfos.ts +0 -18
  76. package/models/extensionApplications/index.ts +0 -2
@@ -0,0 +1,149 @@
1
+ import { DeviceExplorerElementType } from "@dative-gpi/foundation-shared-domain/enums";
2
+
3
+ import { DeviceConnectivityDetails, type DeviceConnectivityDetailsDTO } from "../deviceConnectivities/deviceConnectivityDetails";
4
+ import { DeviceOrganisationAlert, type DeviceOrganisationAlertDTO } from "../deviceOrganisations/deviceOrganisationAlert";
5
+ import { DeviceStatusDetails, type DeviceStatusDetailsDTO } from "../deviceStatuses/deviceStatusDetails";
6
+ import { ModelStatusInfos, type ModelStatusInfosDTO } from "../modelStatuses/modelStatusInfos";
7
+ import { type DeviceOrganisationInfos } from "../deviceOrganisations/deviceOrganisationInfos";
8
+ import { PathCrumb, type PathCrumbDTO } from "../shared/pathCrumb";
9
+ import { type GroupInfos } from "../groups/groupInfos";
10
+
11
+ export class DeviceExplorerElementInfos {
12
+ id: string;
13
+ organisationId: string | null;
14
+ parentId: string | null;
15
+ imageId: string | null;
16
+ code: string;
17
+ label: string;
18
+ tags: string[];
19
+ path: PathCrumb[];
20
+ type: DeviceExplorerElementType;
21
+
22
+ icon: string | null;
23
+ groupsIds: string[] | null;
24
+ deviceOrganisationsIds: string[] | null;
25
+ modelsIds: string[] | null;
26
+ recursiveGroupsIds: string[] | null;
27
+ recursiveDeviceOrganisationsIds: string[] | null;
28
+ recursiveModelsIds: string[] | null;
29
+
30
+ manufacturerLabel: string | null;
31
+ articleLabel: string | null;
32
+ modelLabel: string | null;
33
+ ownerLabel: string | null;
34
+ managerName: string | null;
35
+ unrestricted: boolean | null;
36
+ online: number | null;
37
+ meta: { [key: string]: string } | null;
38
+ modelStatuses: ModelStatusInfos[] | null;
39
+ status: DeviceStatusDetails | null;
40
+ connectivity: DeviceConnectivityDetails | null;
41
+ alerts: DeviceOrganisationAlert[] | null;
42
+ worstAlert: DeviceOrganisationAlert | null;
43
+
44
+ constructor(params: DeviceExplorerElementInfosDTO) {
45
+ this.id = params.id;
46
+ this.organisationId = params.organisationId;
47
+ this.parentId = params.parentId;
48
+ this.imageId = params.imageId;
49
+ this.code = params.code;
50
+ this.label = params.label;
51
+ this.tags = params.tags;
52
+ this.path = params.path.map(dto => new PathCrumb({ ...dto })).sort((a, b) => b.index - a.index);
53
+ this.type = params.type;
54
+
55
+ this.icon = params.icon ?? null;
56
+ this.groupsIds = params.groupsIds?.slice() ?? null;
57
+ this.deviceOrganisationsIds = params.deviceOrganisationsIds?.slice() ?? null;
58
+ this.modelsIds = params.modelsIds?.slice() ?? null;
59
+ this.recursiveGroupsIds = params.recursiveGroupsIds?.slice() ?? null;
60
+ this.recursiveDeviceOrganisationsIds = params.recursiveDeviceOrganisationsIds?.slice() ?? null;
61
+ this.recursiveModelsIds = params.recursiveModelsIds?.slice() ?? null;
62
+
63
+ this.manufacturerLabel = params.manufacturerLabel ?? null;
64
+ this.articleLabel = params.articleLabel ?? null;
65
+ this.modelLabel = params.modelLabel ?? null;
66
+ this.ownerLabel = params.ownerLabel ?? null;
67
+ this.managerName = params.managerName ?? null;
68
+ this.unrestricted = params.unrestricted ?? null;
69
+ this.online = params.online ?? null;
70
+ this.meta = params.meta ? { ...params.meta } : null;
71
+ this.modelStatuses = params.modelStatuses?.map(dto => new ModelStatusInfos(dto)) ?? null;
72
+ this.status = params.status ? new DeviceStatusDetails(params.status) : null;
73
+ this.connectivity = params.connectivity ? new DeviceConnectivityDetails(params.connectivity) : null;
74
+ this.alerts = params.alerts?.map(dto => new DeviceOrganisationAlert(dto)) ?? null;
75
+ this.worstAlert = params.worstAlert ? new DeviceOrganisationAlert(params.worstAlert) : null;
76
+ }
77
+
78
+ static fromDeviceOrganisation = (deviceOrganisation: DeviceOrganisationInfos): DeviceExplorerElementInfos => ({
79
+ ...deviceOrganisation,
80
+ type: DeviceExplorerElementType.DeviceOrganisation,
81
+ parentId: deviceOrganisation.groupId,
82
+ icon: null,
83
+ groupsIds: null,
84
+ deviceOrganisationsIds: null,
85
+ modelsIds: null,
86
+ recursiveGroupsIds: null,
87
+ recursiveDeviceOrganisationsIds: null,
88
+ recursiveModelsIds: null
89
+ });
90
+
91
+ static fromGroup = (group: GroupInfos): DeviceExplorerElementInfos => ({
92
+ ...group,
93
+ type: DeviceExplorerElementType.Group,
94
+ manufacturerLabel: null,
95
+ articleLabel: null,
96
+ modelLabel: null,
97
+ ownerLabel: null,
98
+ managerName: null,
99
+ unrestricted: null,
100
+ online: null,
101
+ meta: null,
102
+ modelStatuses: null,
103
+ status: null,
104
+ connectivity: null,
105
+ alerts: null,
106
+ worstAlert: null
107
+ });
108
+ }
109
+
110
+ export interface DeviceExplorerElementInfosDTO {
111
+ id: string;
112
+ organisationId: string | null;
113
+ parentId: string | null;
114
+ imageId: string | null;
115
+ code: string;
116
+ label: string;
117
+ tags: string[];
118
+ path: PathCrumbDTO[];
119
+ type: number;
120
+
121
+ icon?: string | null;
122
+ groupsIds?: string[] | null;
123
+ deviceOrganisationsIds?: string[] | null;
124
+ modelsIds?: string[] | null;
125
+ recursiveGroupsIds?: string[] | null;
126
+ recursiveDeviceOrganisationsIds?: string[] | null;
127
+ recursiveModelsIds?: string[] | null;
128
+
129
+ manufacturerLabel?: string | null;
130
+ articleLabel?: string | null;
131
+ modelLabel?: string | null;
132
+ ownerLabel?: string | null;
133
+ managerName?: string | null;
134
+ unrestricted?: boolean | null;
135
+ online?: number | null;
136
+ meta?: { [key: string]: string } | null;
137
+ modelStatuses?: ModelStatusInfosDTO[] | null;
138
+ status?: DeviceStatusDetailsDTO | null;
139
+ connectivity?: DeviceConnectivityDetailsDTO | null;
140
+ alerts?: DeviceOrganisationAlertDTO[] | null;
141
+ worstAlert?: DeviceOrganisationAlertDTO | null;
142
+ }
143
+
144
+ export interface DeviceExplorerElementFilters {
145
+ ancestorId?: string | null;
146
+ parentId?: string | null;
147
+ root?: boolean | null;
148
+ search?: string | null;
149
+ }
@@ -0,0 +1,2 @@
1
+ export * from "./deviceExplorerElementDetails";
2
+ export * from "./deviceExplorerElementInfos";
@@ -8,6 +8,7 @@ export class DeviceOrganisationAlert {
8
8
  criticity: Criticity;
9
9
  sourceTimestamp?: number;
10
10
  enqueuedTimestamp?: number;
11
+ actualTimestamp: number;
11
12
 
12
13
  constructor(params: DeviceOrganisationAlertDTO) {
13
14
  this.id = params.id;
@@ -16,6 +17,7 @@ export class DeviceOrganisationAlert {
16
17
  this.criticity = params.criticity;
17
18
  this.sourceTimestamp = params.sourceTimestamp ? isoToEpoch(params.sourceTimestamp) : undefined;
18
19
  this.enqueuedTimestamp = params.enqueuedTimestamp ? isoToEpoch(params.enqueuedTimestamp) : undefined;
20
+ this.actualTimestamp = isoToEpoch(params.actualTimestamp);
19
21
  }
20
22
  }
21
23
 
@@ -26,4 +28,5 @@ export interface DeviceOrganisationAlertDTO {
26
28
  criticity: Criticity;
27
29
  sourceTimestamp?: string;
28
30
  enqueuedTimestamp?: string;
31
+ actualTimestamp: string;
29
32
  }
@@ -9,7 +9,6 @@ export class DeviceOrganisationDetails extends DeviceOrganisationInfos {
9
9
  articleCode: string;
10
10
  familyId: string;
11
11
  familyLabel: string;
12
- description: string;
13
12
  options: DeviceOrganisationOption[];
14
13
  path: PathCrumb[];
15
14
 
@@ -19,7 +18,6 @@ export class DeviceOrganisationDetails extends DeviceOrganisationInfos {
19
18
  this.articleCode = params.articleCode;
20
19
  this.familyId = params.familyId;
21
20
  this.familyLabel = params.familyLabel;
22
- this.description = params.description;
23
21
  this.options = params.options.map(dto => new DeviceOrganisationOption({ ...dto }));
24
22
  this.path = params.path.map(dto => new PathCrumb({ ...dto })).sort((a, b) => b.index - a.index);
25
23
  }
@@ -29,7 +27,6 @@ export interface DeviceOrganisationDetailsDTO extends DeviceOrganisationInfosDTO
29
27
  articleCode: string;
30
28
  familyId: string;
31
29
  familyLabel: string;
32
- description: string;
33
30
  options: DeviceOrganisationOptionDTO[];
34
31
  path: PathCrumbDTO[];
35
32
  }
@@ -49,6 +46,8 @@ export interface CreateDeviceOrganisationDTO {
49
46
  export interface UpdateDeviceOrganisationDTO {
50
47
  managerId: string | null;
51
48
  locationId: string | null;
49
+ latitude: number | null;
50
+ longitude: number | null;
52
51
  groupId: string | null;
53
52
  imageId: string | null;
54
53
  image: string | null;
@@ -1,17 +1,17 @@
1
- import type { DeviceConnectivityDetailsDTO } from "../deviceConnectivities/deviceConnectivityDetails";
2
- import { DeviceConnectivityDetails } from "../deviceConnectivities/deviceConnectivityDetails";
3
- import type { DeviceStatusDetailsDTO } from "../deviceStatuses/deviceStatusDetails";
4
- import { DeviceStatusDetails } from "../deviceStatuses/deviceStatusDetails";
5
- import type { DeviceOrganisationAlertDTO } from "./deviceOrganisationAlert";
6
- import { DeviceOrganisationAlert } from "./deviceOrganisationAlert";
7
- import type { ModelStatusInfosDTO } from "../modelStatuses/modelStatusInfos";
8
- import { ModelStatusInfos } from "../modelStatuses/modelStatusInfos";
1
+ import { DeviceConnectivityDetails, type DeviceConnectivityDetailsDTO } from "../deviceConnectivities/deviceConnectivityDetails";
2
+ import { DeviceStatusDetails, type DeviceStatusDetailsDTO } from "../deviceStatuses/deviceStatusDetails";
3
+ import { DeviceOrganisationAlert, type DeviceOrganisationAlertDTO } from "./deviceOrganisationAlert";
4
+ import { ModelStatusInfos, type ModelStatusInfosDTO } from "../modelStatuses/modelStatusInfos";
5
+ import { type EntityType } from '@dative-gpi/foundation-shared-domain/enums';
6
+ import { PathCrumb, type PathCrumbDTO } from "../shared/pathCrumb";
9
7
 
10
8
  export class DeviceOrganisationInfos {
11
9
  id: string;
12
10
  deviceId: string;
13
11
  manufacturerId: string;
14
12
  manufacturerLabel: string;
13
+ latitude: number | null;
14
+ longitude: number | null;
15
15
  articleId: string;
16
16
  articleLabel: string;
17
17
  modelId: string;
@@ -24,15 +24,19 @@ export class DeviceOrganisationInfos {
24
24
  locationId: string | null;
25
25
  locationLabel: string | null;
26
26
  locationAddress: string | null;
27
+ locationLatitude: number | null;
28
+ locationLongitude: number | null;
27
29
  groupId: string | null;
28
30
  groupLabel: string | null;
29
31
  groupIcon: string | null;
30
32
  label: string;
31
33
  code: string;
34
+ description: string;
32
35
  imageId: string | null;
33
36
  tags: string[];
34
37
  unrestricted: boolean;
35
38
  online: number;
39
+ path: PathCrumb[];
36
40
  meta: { [key: string]: string };
37
41
  modelStatuses: ModelStatusInfos[];
38
42
  status: DeviceStatusDetails;
@@ -40,15 +44,13 @@ export class DeviceOrganisationInfos {
40
44
  alerts: DeviceOrganisationAlert[];
41
45
  worstAlert: DeviceOrganisationAlert | null;
42
46
 
43
- get connectable(): DeviceConnectivityDetails | undefined {
44
- return this.connectivity;
45
- }
46
-
47
47
  constructor(params: DeviceOrganisationInfosDTO) {
48
48
  this.id = params.id;
49
49
  this.deviceId = params.deviceId;
50
50
  this.manufacturerId = params.manufacturerId;
51
51
  this.manufacturerLabel = params.manufacturerLabel;
52
+ this.latitude = params.latitude;
53
+ this.longitude = params.longitude;
52
54
  this.articleId = params.articleId;
53
55
  this.articleLabel = params.articleLabel;
54
56
  this.modelId = params.modelId;
@@ -61,15 +63,19 @@ export class DeviceOrganisationInfos {
61
63
  this.locationId = params.locationId;
62
64
  this.locationLabel = params.locationLabel;
63
65
  this.locationAddress = params.locationAddress;
66
+ this.locationLatitude = params.locationLatitude;
67
+ this.locationLongitude = params.locationLongitude;
64
68
  this.groupId = params.groupId;
65
69
  this.groupLabel = params.groupLabel;
66
70
  this.groupIcon = params.groupIcon;
67
71
  this.label = params.label;
68
72
  this.code = params.code;
73
+ this.description = params.description;
69
74
  this.imageId = params.imageId;
70
75
  this.tags = params.tags.slice();
71
76
  this.unrestricted = params.unrestricted;
72
77
  this.online = params.online;
78
+ this.path = params.path.map(dto => new PathCrumb({ ...dto })).sort((a, b) => b.index - a.index);
73
79
  this.meta = { ...params.meta };
74
80
  this.modelStatuses = params.modelStatuses.map(dto => new ModelStatusInfos(dto));
75
81
  this.status = new DeviceStatusDetails(params.status);
@@ -85,6 +91,8 @@ export interface DeviceOrganisationInfosDTO {
85
91
  deviceId: string;
86
92
  manufacturerId: string;
87
93
  manufacturerLabel: string;
94
+ latitude: number | null;
95
+ longitude: number | null;
88
96
  articleId: string;
89
97
  articleLabel: string;
90
98
  modelId: string;
@@ -97,15 +105,19 @@ export interface DeviceOrganisationInfosDTO {
97
105
  locationId: string | null;
98
106
  locationLabel: string | null;
99
107
  locationAddress: string | null;
108
+ locationLatitude: number | null;
109
+ locationLongitude: number | null;
100
110
  groupId: string | null;
101
111
  groupLabel: string | null;
102
112
  groupIcon: string | null;
103
113
  label: string;
104
114
  code: string;
115
+ description: string;
105
116
  imageId: string | null;
106
117
  tags: string[];
107
118
  unrestricted: boolean;
108
119
  online: number;
120
+ path: PathCrumbDTO[];
109
121
  meta: { [key: string]: string };
110
122
  modelStatuses: ModelStatusInfosDTO[];
111
123
  status: DeviceStatusDetailsDTO;
@@ -125,4 +137,6 @@ export interface DeviceOrganisationFilters {
125
137
  deviceOrganisationsIds?: string[] | null;
126
138
  otherDeviceOrganisationsIds?: string[] | null;
127
139
  search?: string | null;
140
+ entityType?: EntityType | null;
141
+ entitiesIds?: string[] | null;
128
142
  }
@@ -14,6 +14,8 @@ export class FolderInfos {
14
14
  colors: string[];
15
15
  imageId: string | null;
16
16
  path: PathCrumb[];
17
+ recursiveFoldersIds: string[];
18
+ recursiveDashboardsIds: string[];
17
19
 
18
20
  constructor(params: FolderInfosDTO) {
19
21
  this.id = params.id;
@@ -28,6 +30,8 @@ export class FolderInfos {
28
30
  this.colors = params.colors.slice();
29
31
  this.imageId = params.imageId;
30
32
  this.path = params.path.map(dto => new PathCrumb(dto)).sort((a, b) => b.index - a.index);
33
+ this.recursiveFoldersIds = params.recursiveFoldersIds ? params.recursiveFoldersIds.slice() : [];
34
+ this.recursiveDashboardsIds = params.recursiveDashboardsIds ? params.recursiveDashboardsIds.slice() : [];
31
35
  }
32
36
  }
33
37
 
@@ -44,6 +48,8 @@ export interface FolderInfosDTO {
44
48
  colors: string[];
45
49
  imageId: string | null;
46
50
  path: PathCrumbDTO[];
51
+ recursiveFoldersIds?: string[];
52
+ recursiveDashboardsIds?: string[];
47
53
  }
48
54
 
49
55
  export interface FolderFilters {
@@ -1,5 +1,4 @@
1
- import type { PathCrumbDTO } from "../shared/pathCrumb";
2
- import { PathCrumb } from "../shared/pathCrumb";
1
+ import { PathCrumb, type PathCrumbDTO } from "../shared/pathCrumb";
3
2
 
4
3
  export class GroupInfos {
5
4
  id: string;
package/models/index.ts CHANGED
@@ -19,15 +19,17 @@ export * from "./dashboardShallowDatePresets"; // No service
19
19
  export * from "./dashboardShallowEntityPresets"; // No service
20
20
  export * from "./dashboardShallows";
21
21
  export * from "./dashboardShallowVariables"; // No service
22
+ export * from "./dashboardShallowWidgets"; // No service
22
23
  export * from "./dashboardVariables"; // No service
23
24
  export * from "./dashboardVariableValues"; // No service
24
25
  export * from "./dataCategories";
25
26
  export * from "./dataDefinitions";
26
27
  export * from "./dataDefinitionMappings"; // No service
27
28
  export * from "./deviceConnectivities";
29
+ export * from "./deviceDataDefinitions";
30
+ export * from "./deviceExplorerElements";
28
31
  export * from "./deviceOrganisations";
29
32
  export * from "./deviceStatuses";
30
- export * from "./extensionApplications";
31
33
  export * from "./folders";
32
34
  export * from "./groups";
33
35
  export * from "./locations";
@@ -36,8 +38,10 @@ export * from "./models";
36
38
  export * from "./modelStatuses"; // No service
37
39
  export * from "./organisations";
38
40
  export * from "./permissionCategories";
41
+ export * from "./playlists";
39
42
  export * from "./roleOrganisations";
40
43
  export * from "./roleOrganisationTypes";
44
+ export * from "./roles";
41
45
  export * from "./routes";
42
46
  export * from "./scenarioDeviceOrganisations";
43
47
  export * from "./scenarioOrganisations";
@@ -1,3 +1,4 @@
1
+ import type { EntityType } from '@dative-gpi/foundation-shared-domain/enums';
1
2
  import { Address, type AddressDTO } from "@dative-gpi/foundation-shared-domain/models";
2
3
 
3
4
  export class LocationInfos {
@@ -46,4 +47,6 @@ export interface LocationFilters {
46
47
  locationsIds?: string[] | null;
47
48
  modelsIds?: string[] | null;
48
49
  search?: string | null;
50
+ entityType?: EntityType | null;
51
+ entitiesIds?: string[] | null;
49
52
  }
@@ -0,0 +1,3 @@
1
+ export * from './playlistInfos';
2
+ export * from './playlistDashboard';
3
+ export * from './playlistDetails';
@@ -0,0 +1,31 @@
1
+ import type { DashboardType } from '@dative-gpi/foundation-shared-domain/enums';
2
+
3
+ export class PlaylistDashboard
4
+ {
5
+ id: string;
6
+ dashboardScopedId: string;
7
+ dashboardType: DashboardType;
8
+ index: number;
9
+
10
+ constructor(params: PlaylistDashboardDTO)
11
+ {
12
+ this.id = params.id;
13
+ this.dashboardScopedId = params.dashboardScopedId;
14
+ this.dashboardType = params.dashboardType as DashboardType;
15
+ this.index = params.index;
16
+ }
17
+ }
18
+
19
+ export interface PlaylistDashboardDTO
20
+ {
21
+ id: string;
22
+ dashboardScopedId: string;
23
+ dashboardType: number;
24
+ index: number;
25
+ }
26
+
27
+ export interface CreatePlaylistDashboardDTO {
28
+ dashboardScopedId: string;
29
+ dashboardType: number;
30
+ index: number;
31
+ }
@@ -0,0 +1,32 @@
1
+ import { PlaylistInfos, type PlaylistInfosDTO } from "./playlistInfos";
2
+ import type { CreatePlaylistDashboardDTO } from "./playlistDashboard";
3
+
4
+ export class PlaylistDetails extends PlaylistInfos {
5
+
6
+ constructor(params: PlaylistDetailsDTO) {
7
+ super(params);
8
+ }
9
+ }
10
+
11
+ export interface PlaylistDetailsDTO extends PlaylistInfosDTO {
12
+ }
13
+
14
+ export interface CreatePlaylistDTO {
15
+ label: string;
16
+ description: string;
17
+ icon: string;
18
+ code: string;
19
+ looped: boolean;
20
+ delay: number;
21
+ dashboards: CreatePlaylistDashboardDTO[];
22
+ }
23
+
24
+ export interface UpdatePlaylistDTO {
25
+ label: string;
26
+ description: string;
27
+ icon: string;
28
+ code: string;
29
+ looped: boolean;
30
+ delay: number;
31
+ dashboards: CreatePlaylistDashboardDTO[];
32
+ }
@@ -0,0 +1,39 @@
1
+ import { PlaylistDashboard, type PlaylistDashboardDTO } from './playlistDashboard';
2
+
3
+ export class PlaylistInfos {
4
+ id: string;
5
+ label: string;
6
+ description: string;
7
+ icon: string;
8
+ code: string;
9
+ looped: boolean;
10
+ delay: number;
11
+ dashboards: PlaylistDashboard[];
12
+
13
+ constructor(params: PlaylistInfosDTO) {
14
+ this.id = params.id;
15
+ this.label = params.label;
16
+ this.description = params.description;
17
+ this.icon = params.icon;
18
+ this.code = params.code;
19
+ this.looped = params.looped;
20
+ this.delay = params.delay;
21
+ this.dashboards = params.dashboards.map((d: PlaylistDashboardDTO) => new PlaylistDashboard(d));
22
+ }
23
+ }
24
+
25
+ export interface PlaylistInfosDTO {
26
+ id: string;
27
+ label: string;
28
+ description: string;
29
+ icon: string;
30
+ code: string;
31
+ looped: boolean;
32
+ delay: number;
33
+ dashboards: PlaylistDashboardDTO[];
34
+ }
35
+
36
+ export interface PlaylistFilters {
37
+ playlistsIds?: string[] | null;
38
+ search?: string | null;
39
+ }
@@ -1,18 +1,28 @@
1
+ import { RoleTranslation, type RoleTranslationDTO } from '@dative-gpi/foundation-core-domain/models';
1
2
  import { RoleOrganisationInfos, type RoleOrganisationInfosDTO } from "./roleOrganisationInfos";
2
3
  import { type RoleType } from "@dative-gpi/foundation-shared-domain/enums";
3
4
 
4
5
  export class RoleOrganisationDetails extends RoleOrganisationInfos {
6
+ labelDefault: string;
5
7
  description: string;
8
+ descriptionDefault: string;
9
+ translations: RoleTranslation[];
6
10
 
7
11
  constructor(params: RoleOrganisationDetailsDTO) {
8
12
  super(params);
9
13
 
14
+ this.labelDefault = params.labelDefault;
10
15
  this.description = params.description;
16
+ this.descriptionDefault = params.descriptionDefault;
17
+ this.translations = params.translations.map(t => new RoleTranslation(t));
11
18
  }
12
19
  }
13
20
 
14
21
  export interface RoleOrganisationDetailsDTO extends RoleOrganisationInfosDTO {
22
+ labelDefault: string;
15
23
  description: string;
24
+ descriptionDefault: string;
25
+ translations: RoleTranslationDTO[];
16
26
  }
17
27
 
18
28
  export interface CreateRoleOrganisationDTO {
@@ -23,6 +33,7 @@ export interface CreateRoleOrganisationDTO {
23
33
  label: string;
24
34
  description: string;
25
35
  tags: string[];
36
+ translations: RoleTranslationDTO[];
26
37
  }
27
38
 
28
39
  export interface UpdateRoleOrganisationDTO {
@@ -32,4 +43,5 @@ export interface UpdateRoleOrganisationDTO {
32
43
  description: string;
33
44
  tags: string[];
34
45
  permissionsIds: string[];
46
+ translations: RoleTranslationDTO[];
35
47
  }
@@ -0,0 +1 @@
1
+ export * from "./roleTranslation";
@@ -0,0 +1,17 @@
1
+ export class RoleTranslation {
2
+ languageCode: string;
3
+ label: string;
4
+ description: string;
5
+
6
+ constructor(params: RoleTranslationDTO) {
7
+ this.languageCode = params.languageCode;
8
+ this.label = params.label;
9
+ this.description = params.description;
10
+ }
11
+ }
12
+
13
+ export interface RoleTranslationDTO {
14
+ languageCode: string;
15
+ label: string;
16
+ description: string;
17
+ }
@@ -2,6 +2,7 @@ import type { CreateTimeRangeDTO } from "../shared/timeRange";
2
2
  import type { ScenarioDeviceOrganisationInfosDTO } from "./scenarioDeviceOrganisationInfos";
3
3
  import { ScenarioDeviceOrganisationInfos } from "./scenarioDeviceOrganisationInfos";
4
4
  import type { CreateScenarioParameterOverrideDTO } from "../scenarios/scenarioParameterOverride";
5
+ import type { ApplicationScope } from "@dative-gpi/foundation-shared-domain/enums";
5
6
 
6
7
 
7
8
  export class ScenarioDeviceOrganisationDetails extends ScenarioDeviceOrganisationInfos {
@@ -16,32 +17,40 @@ export interface ScenarioDeviceOrganisationDetailsDTO extends ScenarioDeviceOrga
16
17
  }
17
18
 
18
19
  export interface CreateScenarioDeviceOrganisationDTO {
19
- deprecatedScenarioId: string;
20
+ scenarioId: string;
21
+ scenarioScope: ApplicationScope;
20
22
  deviceOrganisationId: string;
21
23
  overrideTimeRanges: boolean;
22
- timeRanges: CreateTimeRangeDTO[] | null;
24
+ timeRanges: CreateTimeRangeDTO[];
25
+ overrideDelay: boolean;
23
26
  delay: number | null;
24
27
  warnDeviceManager: boolean;
25
28
  userOrganisationsIds: string[];
26
- overrideParameters: CreateScenarioParameterOverrideDTO[];
29
+ overrideParameters: boolean;
30
+ parameters: CreateScenarioParameterOverrideDTO[];
27
31
  }
28
32
 
29
- export interface CreateManyScenarioDeviceOrganisationDTO {
30
- deprecatedScenarioId: string;
33
+ export interface UpsertScenarioDeviceOrganisationDTO {
34
+ scenarioId: string;
35
+ scenarioScope: ApplicationScope;
31
36
  deviceOrganisationsIds: string[];
32
37
  overrideTimeRanges: boolean;
33
- timeRanges: CreateTimeRangeDTO[] | null;
38
+ timeRanges: CreateTimeRangeDTO[];
39
+ overrideDelay: boolean;
34
40
  delay: number | null;
35
41
  warnDeviceManager: boolean;
36
42
  userOrganisationsIds: string[];
37
- overrideParameters: CreateScenarioParameterOverrideDTO[];
43
+ overrideParameters: boolean;
44
+ parameters: CreateScenarioParameterOverrideDTO[];
38
45
  }
39
46
 
40
47
  export interface UpdateScenarioDeviceOrganisationDTO {
41
48
  overrideTimeRanges: boolean;
42
- timeRanges: CreateTimeRangeDTO[] | null;
49
+ timeRanges: CreateTimeRangeDTO[];
43
50
  warnDeviceManager: boolean;
51
+ overrideDelay: boolean;
44
52
  delay: number | null;
45
53
  userOrganisationsIds: string[];
46
- overrideParameters: CreateScenarioParameterOverrideDTO[];
54
+ overrideParameters: boolean;
55
+ parameters: CreateScenarioParameterOverrideDTO[];
47
56
  }