@dative-gpi/foundation-shared-domain 1.0.110 → 1.0.112

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.
@@ -0,0 +1,5 @@
1
+ export enum DeviceExplorerElementType {
2
+ None = 0,
3
+ Group = 1,
4
+ DeviceOrganisation = 2
5
+ }
package/enums/index.ts CHANGED
@@ -8,6 +8,7 @@ export * from "./customProperties";
8
8
  export * from "./dashboards";
9
9
  export * from "./datas";
10
10
  export * from "./dates";
11
+ export * from "./deviceExplorerElements";
11
12
  export * from "./filters";
12
13
  export * from "./index";
13
14
  export * from "./lists";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@dative-gpi/foundation-shared-domain",
3
3
  "sideEffects": false,
4
- "version": "1.0.110",
4
+ "version": "1.0.112",
5
5
  "description": "",
6
6
  "publishConfig": {
7
7
  "access": "public"
@@ -12,5 +12,5 @@
12
12
  "peerDependencies": {
13
13
  "date-fns": "^3.6.0"
14
14
  },
15
- "gitHead": "ce27d3542d6a82946127e9004d82ff2f401d7242"
15
+ "gitHead": "459a258053b4f0a24eede34e8278c7e2b6a218cf"
16
16
  }
@@ -0,0 +1,34 @@
1
+ import { type DeviceExplorerElementInfos, type DeviceOrganisationInfos, type GroupInfos } from "@dative-gpi/foundation-core-domain/models";
2
+
3
+ import { DeviceExplorerElementType } from "../enums";
4
+
5
+ export const fromDeviceOrganisation = (deviceOrganisation: DeviceOrganisationInfos): DeviceExplorerElementInfos => ({
6
+ ...deviceOrganisation,
7
+ type: DeviceExplorerElementType.DeviceOrganisation,
8
+ parentId: deviceOrganisation.groupId,
9
+ icon: null,
10
+ groupsIds: null,
11
+ deviceOrganisationsIds: null,
12
+ modelsIds: null,
13
+ recursiveGroupsIds: null,
14
+ recursiveDeviceOrganisationsIds: null,
15
+ recursiveModelsIds: null
16
+ });
17
+
18
+ export const fromGroup = (group: GroupInfos): DeviceExplorerElementInfos => ({
19
+ ...group,
20
+ type: DeviceExplorerElementType.Group,
21
+ manufacturerLabel: null,
22
+ articleLabel: null,
23
+ modelLabel: null,
24
+ ownerLabel: null,
25
+ managerName: null,
26
+ unrestricted: null,
27
+ online: null,
28
+ meta: null,
29
+ modelStatuses: null,
30
+ status: null,
31
+ connectivity: null,
32
+ alerts: null,
33
+ worstAlert: null
34
+ });
package/tools/index.ts CHANGED
@@ -1,5 +1,6 @@
1
+ export * from "./autoRefresh";
1
2
  export * from "./datesTools";
2
- export * from "./single";
3
+ export * from "./deviceExplorerElements";
4
+ export * from "./enumTools";
3
5
  export * from "./notificationsTools";
4
- export * from "./autoRefresh";
5
- export * from "./enumTools";
6
+ export * from "./single";