@dative-gpi/foundation-core-domain 1.0.129 → 1.0.130-maps2

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.
@@ -70,4 +70,5 @@ export interface ChartOrganisationTypeFilters {
70
70
  draft?: boolean | null;
71
71
  deprecatedChartId?: string | null;
72
72
  deviceOrganisationsIds?: string[] | null
73
+ dataDefinitionsIds?: string[] | null;
73
74
  }
@@ -66,5 +66,6 @@ export interface ChartOrganisationFilters {
66
66
  search?: string | null;
67
67
  draft?: boolean | null;
68
68
  deprecatedChartId?: string | null;
69
- deviceOrganisationsIds?: string[] | null
69
+ deviceOrganisationsIds?: string[] | null;
70
+ dataDefinitionsIds?: string[] | null;
70
71
  }
@@ -5,6 +5,7 @@ import type { DashboardDatePresetTranslationDTO } from "./dashboardDatePresetTra
5
5
  export interface CreateDashboardDatePresetDTO {
6
6
  hiddenCode: string;
7
7
  labelDefault: string;
8
+ showInOptions: boolean;
8
9
  startDate: string;
9
10
  endDate: string;
10
11
  useAutoRefresh: boolean;
@@ -7,6 +7,7 @@ import { DashboardDatePresetTranslation } from "./dashboardDatePresetTranslation
7
7
  export class DashboardDatePresetInfos {
8
8
  hiddenCode: string;
9
9
  labelDefault: string;
10
+ showInOptions: boolean;
10
11
  startDate: string;
11
12
  endDate: string;
12
13
  useAutoRefresh: boolean;
@@ -20,6 +21,7 @@ export class DashboardDatePresetInfos {
20
21
  constructor(params: DashboardDatePresetInfosDTO) {
21
22
  this.hiddenCode = params.hiddenCode;
22
23
  this.labelDefault = params.labelDefault;
24
+ this.showInOptions = params.showInOptions;
23
25
  this.startDate = params.startDate;
24
26
  this.endDate = params.endDate;
25
27
  this.useAutoRefresh = params.useAutoRefresh;
@@ -31,6 +33,7 @@ export class DashboardDatePresetInfos {
31
33
  export interface DashboardDatePresetInfosDTO {
32
34
  hiddenCode: string;
33
35
  labelDefault: string;
36
+ showInOptions: boolean;
34
37
  startDate: string;
35
38
  endDate: string;
36
39
  useAutoRefresh: boolean;
@@ -4,6 +4,7 @@ import type { EntityType } from "@dative-gpi/foundation-shared-domain/enums";
4
4
  export interface CreateDashboardEntityPresetDTO {
5
5
  hiddenCode: string;
6
6
  labelDefault: string;
7
+ showInOptions: boolean;
7
8
  singleEntity: boolean;
8
9
  entityType: EntityType;
9
10
  entitiesFilters: string;
@@ -7,6 +7,7 @@ import type { EntityType } from "@dative-gpi/foundation-shared-domain/enums";
7
7
  export class DashboardEntityPresetInfos {
8
8
  hiddenCode: string;
9
9
  labelDefault: string;
10
+ showInOptions: boolean;
10
11
  singleEntity: boolean;
11
12
  entityType: EntityType;
12
13
  entitiesFilters: string;
@@ -20,6 +21,7 @@ export class DashboardEntityPresetInfos {
20
21
  constructor(params: DashboardEntityPresetInfosDTO) {
21
22
  this.hiddenCode = params.hiddenCode;
22
23
  this.labelDefault = params.labelDefault;
24
+ this.showInOptions = params.showInOptions;
23
25
  this.singleEntity = params.singleEntity;
24
26
  this.entityType = params.entityType;
25
27
  this.entitiesFilters = params.entitiesFilters;
@@ -31,6 +33,7 @@ export class DashboardEntityPresetInfos {
31
33
  export interface DashboardEntityPresetInfosDTO {
32
34
  hiddenCode: string;
33
35
  labelDefault: string;
36
+ showInOptions: boolean;
34
37
  singleEntity: boolean;
35
38
  entityType: EntityType;
36
39
  entitiesFilters: string;
@@ -27,51 +27,36 @@ export class DashboardShallowDetails extends DashboardShallowInfos {
27
27
 
28
28
  widgets: WidgetInfos[];
29
29
 
30
- defaultEntityPresetCode: string | null;
31
- defaultDatePresetCode: string | null;
32
- defaultVariableCode: string | null;
30
+ entityPresetCode: string | null;
31
+ datePresetCode: string | null;
32
+ variableCode: string | null;
33
33
  defaultDatePresets: DashboardDatePresetInfos[];
34
34
  defaultEntityPresets: DashboardEntityPresetInfos[];
35
35
  defaultVariables: DashboardVariableInfos[];
36
36
 
37
- overrideEntityPresetCode: string | null;
38
- overrideDatePresetCode: string | null;
39
- overrideVariableCode: string | null;
40
37
  overrideDatePresets: DashboardShallowDatePresetInfos[];
41
38
  overrideEntityPresets: DashboardShallowEntityPresetInfos[];
42
39
  overrideVariables: DashboardShallowVariableInfos[];
43
-
44
- get entityPresetCode() {
45
- return this.overrideEntityPresetCode ?? this.defaultEntityPresetCode;
46
- }
47
-
48
- get datePresetCode() {
49
- return this.overrideDatePresetCode ?? this.defaultDatePresetCode;
50
- }
51
-
52
- get variableCode() {
53
- return this.overrideVariableCode ?? this.defaultVariableCode;
54
- }
55
40
 
56
41
  get datePresets() : DashboardDatePresetInfos[] {
57
42
  return this.defaultDatePresets.map(d => {
58
43
  const override = this.overrideDatePresets.find(od => od.hiddenCode === d.hiddenCode);
59
44
  return override ? new DashboardDatePresetInfos({ ...d, ...override }) : d;
60
- })
45
+ });
61
46
  }
62
47
 
63
48
  get entityPresets() {
64
49
  return this.defaultEntityPresets.map(d => {
65
50
  const override = this.overrideEntityPresets.find(od => od.hiddenCode === d.hiddenCode);
66
51
  return override ? new DashboardEntityPresetInfos({ ...d, ...override }) : d;
67
- })
52
+ });
68
53
  }
69
54
 
70
55
  get variables() {
71
56
  return this.defaultVariables.map(d => {
72
57
  const override = this.overrideVariables.find(od => od.hiddenCode === d.hiddenCode);
73
58
  return override ? new DashboardVariableInfos({ ...d, ...override }) : d;
74
- })
59
+ });
75
60
  }
76
61
 
77
62
  constructor(params: DashboardShallowDetailsDTO) {
@@ -82,16 +67,13 @@ export class DashboardShallowDetails extends DashboardShallowInfos {
82
67
  this.translations = params.translations.map(t => new DashboardTranslation(t));
83
68
  this.widgets = params.widgets.map(dto => new WidgetInfos(dto));
84
69
 
85
- this.overrideEntityPresetCode = params.overrideEntityPresetCode;
86
- this.overrideDatePresetCode = params.overrideDatePresetCode;
87
- this.overrideVariableCode = params.overrideVariableCode;
88
70
  this.overrideDatePresets = params.overrideDatePresets.map(dto => new DashboardShallowDatePresetInfos(dto));
89
71
  this.overrideEntityPresets = params.overrideEntityPresets.map(dto => new DashboardShallowEntityPresetInfos(dto));
90
72
  this.overrideVariables = params.overrideVariables.map(dto => new DashboardShallowVariableInfos(dto));
91
73
 
92
- this.defaultEntityPresetCode = params.defaultEntityPresetCode;
93
- this.defaultDatePresetCode = params.defaultDatePresetCode;
94
- this.defaultVariableCode = params.defaultVariableCode;
74
+ this.entityPresetCode = params.entityPresetCode;
75
+ this.datePresetCode = params.datePresetCode;
76
+ this.variableCode = params.variableCode;
95
77
  this.defaultDatePresets = params.defaultDatePresets.map(dto => new DashboardDatePresetInfos(dto));
96
78
  this.defaultEntityPresets = params.defaultEntityPresets.map(dto => new DashboardEntityPresetInfos(dto));
97
79
  this.defaultVariables = params.defaultVariables.map(dto => new DashboardVariableInfos(dto));
@@ -101,18 +83,15 @@ export class DashboardShallowDetails extends DashboardShallowInfos {
101
83
  export interface DashboardShallowDetailsDTO extends DashboardShallowInfosDTO {
102
84
  labelDefault: string;
103
85
  path: PathCrumbDTO[];
104
- overrideEntityPresetCode: string | null;
105
- overrideDatePresetCode: string | null;
106
- overrideVariableCode: string | null;
107
86
  overrideDatePresets: DashboardShallowDatePresetInfosDTO[];
108
87
  overrideEntityPresets: DashboardShallowEntityPresetInfosDTO[];
109
88
  overrideVariables: DashboardShallowVariableInfosDTO[];
110
89
  translations: DashboardTranslationDTO[];
111
90
  dashboardId: string;
112
91
  scope: number;
113
- defaultEntityPresetCode: string | null;
114
- defaultDatePresetCode: string | null;
115
- defaultVariableCode: string | null;
92
+ entityPresetCode: string | null;
93
+ datePresetCode: string | null;
94
+ variableCode: string | null;
116
95
  defaultDatePresets: DashboardDatePresetInfosDTO[];
117
96
  defaultEntityPresets: DashboardEntityPresetInfosDTO[];
118
97
  defaultVariables: DashboardVariableInfosDTO[];
@@ -132,9 +111,6 @@ export interface UpdateDashboardShallowDTO {
132
111
  colors: string[];
133
112
  icon: string;
134
113
  tags: string[];
135
- overrideEntityPresetCode: string | null;
136
- overrideDatePresetCode: string | null;
137
- overrideVariableCode: string | null;
138
114
  overrideDatePresets: CreateDashboardShallowDatePresetDTO[];
139
115
  overrideEntityPresets: CreateDashboardShallowEntityPresetDTO[];
140
116
  overrideVariables: CreateDashboardShallowVariableDTO[];
@@ -7,6 +7,7 @@ export interface CreateDashboardVariableDTO {
7
7
  hiddenCode: string;
8
8
  variableType: DashboardVariableType;
9
9
  labelDefault: string;
10
+ showInOptions: boolean;
10
11
  code: string;
11
12
  value: string;
12
13
  useOnlyAllowedValues: boolean;
@@ -9,6 +9,7 @@ export class DashboardVariableInfos {
9
9
  hiddenCode: string;
10
10
  variableType: DashboardVariableType;
11
11
  labelDefault: string;
12
+ showInOptions: boolean;
12
13
  code: string;
13
14
  value: string;
14
15
  useOnlyAllowedValues: boolean;
@@ -23,6 +24,7 @@ export class DashboardVariableInfos {
23
24
  this.hiddenCode = params.hiddenCode;
24
25
  this.variableType = params.variableType;
25
26
  this.labelDefault = params.labelDefault;
27
+ this.showInOptions = params.showInOptions;
26
28
  this.code = params.code;
27
29
  this.value = params.value;
28
30
  this.useOnlyAllowedValues = params.useOnlyAllowedValues;
@@ -35,6 +37,7 @@ export interface DashboardVariableInfosDTO {
35
37
  hiddenCode: string;
36
38
  variableType: DashboardVariableType;
37
39
  labelDefault: string;
40
+ showInOptions: boolean;
38
41
  code: string;
39
42
  value: string;
40
43
  useOnlyAllowedValues: boolean;
@@ -0,0 +1,39 @@
1
+ import { isoToEpoch } from "@dative-gpi/foundation-shared-domain/tools";
2
+
3
+ export class DeviceDataDefinitionInfos {
4
+ id: string;
5
+ deviceId: string;
6
+ dataDefinitionId: string;
7
+ dataDefinitionCode: string;
8
+ dataDefinitionLabel: string;
9
+ dataCategoryCode: string;
10
+ dataCategoryLabel: string;
11
+ timestamp: number;
12
+
13
+ constructor(params: DeviceDataDefinitionInfosDTO) {
14
+ this.id = params.id;
15
+ this.deviceId = params.deviceId;
16
+ this.dataDefinitionId = params.dataDefinitionId;
17
+ this.dataDefinitionCode = params.dataDefinitionCode;
18
+ this.dataDefinitionLabel = params.dataDefinitionLabel;
19
+ this.dataCategoryCode = params.dataCategoryCode;
20
+ this.dataCategoryLabel = params.dataCategoryLabel;
21
+ this.timestamp = isoToEpoch(params.timestamp);
22
+ }
23
+ }
24
+
25
+ export interface DeviceDataDefinitionInfosDTO {
26
+ id: string;
27
+ deviceId: string;
28
+ dataDefinitionId: string;
29
+ dataDefinitionCode: string;
30
+ dataDefinitionLabel: string;
31
+ dataCategoryCode: string;
32
+ dataCategoryLabel: string;
33
+ timestamp: string;
34
+ }
35
+
36
+ export interface DeviceDataDefinitionFilters {
37
+ devicesIds?: string[];
38
+ deviceId?: string;
39
+ }
@@ -0,0 +1 @@
1
+ export * from "./deviceDataDefinitionInfos";
@@ -1,3 +1,4 @@
1
+ import type { AddressDTO } from "@dative-gpi/foundation-shared-domain/models";
1
2
  import type { DeviceOrganisationOptionDTO } from "./deviceOrganisationOption";
2
3
  import { DeviceOrganisationOption } from "./deviceOrganisationOption";
3
4
  import type { DeviceOrganisationInfosDTO } from "./deviceOrganisationInfos";
@@ -35,6 +36,7 @@ export interface CreateDeviceOrganisationDTO {
35
36
  manufacturerId: string;
36
37
  managerId: string | null;
37
38
  locationId: string | null;
39
+ address: AddressDTO | null;
38
40
  groupId: string | null;
39
41
  code: string;
40
42
  label: string;
@@ -46,6 +48,7 @@ export interface CreateDeviceOrganisationDTO {
46
48
  export interface UpdateDeviceOrganisationDTO {
47
49
  managerId: string | null;
48
50
  locationId: string | null;
51
+ address: AddressDTO | null;
49
52
  groupId: string | null;
50
53
  imageId: string | null;
51
54
  image: string | null;
@@ -2,6 +2,7 @@ import { DeviceConnectivityDetails, type DeviceConnectivityDetailsDTO } from "..
2
2
  import { DeviceStatusDetails, type DeviceStatusDetailsDTO } from "../deviceStatuses/deviceStatusDetails";
3
3
  import { DeviceOrganisationAlert, type DeviceOrganisationAlertDTO } from "./deviceOrganisationAlert";
4
4
  import { ModelStatusInfos, type ModelStatusInfosDTO } from "../modelStatuses/modelStatusInfos";
5
+ import { Address, type AddressDTO } from "@dative-gpi/foundation-shared-domain/models";
5
6
  import { PathCrumb, type PathCrumbDTO } from "../shared/pathCrumb";
6
7
 
7
8
  export class DeviceOrganisationInfos {
@@ -9,6 +10,7 @@ export class DeviceOrganisationInfos {
9
10
  deviceId: string;
10
11
  manufacturerId: string;
11
12
  manufacturerLabel: string;
13
+ address: Address;
12
14
  articleId: string;
13
15
  articleLabel: string;
14
16
  modelId: string;
@@ -44,6 +46,7 @@ export class DeviceOrganisationInfos {
44
46
  this.deviceId = params.deviceId;
45
47
  this.manufacturerId = params.manufacturerId;
46
48
  this.manufacturerLabel = params.manufacturerLabel;
49
+ this.address = new Address(params.address);
47
50
  this.articleId = params.articleId;
48
51
  this.articleLabel = params.articleLabel;
49
52
  this.modelId = params.modelId;
@@ -82,6 +85,7 @@ export interface DeviceOrganisationInfosDTO {
82
85
  deviceId: string;
83
86
  manufacturerId: string;
84
87
  manufacturerLabel: string;
88
+ address: AddressDTO;
85
89
  articleId: string;
86
90
  articleLabel: string;
87
91
  modelId: string;
package/models/index.ts CHANGED
@@ -25,10 +25,10 @@ export * from "./dataCategories";
25
25
  export * from "./dataDefinitions";
26
26
  export * from "./dataDefinitionMappings"; // No service
27
27
  export * from "./deviceConnectivities";
28
+ export * from "./deviceDataDefinitions";
28
29
  export * from "./deviceExplorerElements";
29
30
  export * from "./deviceOrganisations";
30
31
  export * from "./deviceStatuses";
31
- export * from "./extensionApplications";
32
32
  export * from "./folders";
33
33
  export * from "./groups";
34
34
  export * from "./locations";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@dative-gpi/foundation-core-domain",
3
3
  "sideEffects": false,
4
- "version": "1.0.129",
4
+ "version": "1.0.130-maps2",
5
5
  "description": "",
6
6
  "publishConfig": {
7
7
  "access": "public"
@@ -10,8 +10,8 @@
10
10
  "author": "",
11
11
  "license": "ISC",
12
12
  "dependencies": {
13
- "@dative-gpi/foundation-shared-domain": "1.0.129",
14
- "@dative-gpi/foundation-shared-services": "1.0.129"
13
+ "@dative-gpi/foundation-shared-domain": "1.0.130-maps2",
14
+ "@dative-gpi/foundation-shared-services": "1.0.130-maps2"
15
15
  },
16
- "gitHead": "73ebbdb8cfd158e2748933ec57315bc1b5fc4835"
16
+ "gitHead": "a0739b48282166f721cf6c2376a430e4690d92ef"
17
17
  }
@@ -1,18 +0,0 @@
1
- import type { ExtensionApplicationInfosDTO } from "./extensionApplicationInfos";
2
- import { ExtensionApplicationInfos } from "./extensionApplicationInfos";
3
-
4
- export class ExtensionApplicationDetails extends ExtensionApplicationInfos {
5
- host: string;
6
- extensionId: string;
7
-
8
- constructor(params: ExtensionApplicationDetailsDTO) {
9
- super(params);
10
- this.extensionId = params.extensionId;
11
- this.host = params.host
12
- }
13
- }
14
-
15
- export interface ExtensionApplicationDetailsDTO extends ExtensionApplicationInfosDTO {
16
- extensionId: string;
17
- host: string;
18
- }
@@ -1,18 +0,0 @@
1
- export class ExtensionApplicationInfos {
2
- id: string;
3
- label: string;
4
- description: string;
5
-
6
- constructor(params: ExtensionApplicationInfosDTO) {
7
- this.id = params.id;
8
- this.label = params.label;
9
- this.description = params.description;
10
- }
11
- }
12
-
13
- export interface ExtensionApplicationInfosDTO {
14
- id: string;
15
- label: string;
16
- description: string;
17
- }
18
-
@@ -1,2 +0,0 @@
1
- export * from "./extensionApplicationDetails";
2
- export * from "./extensionApplicationInfos";