@dative-gpi/foundation-core-domain 1.0.139 → 1.0.140-selectable

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.
@@ -16,6 +16,8 @@ export class AlertInfos {
16
16
  deviceOrganisationImageId: string | null;
17
17
  deviceOrganisationCode: string;
18
18
  deviceOrganisationLabel: string;
19
+ deviceOrganisationLocationLabel: string | null;
20
+ deviceOrganisationOwnerLabel: string | null;
19
21
  icon: string;
20
22
  code: string;
21
23
  label: string;
@@ -48,6 +50,8 @@ export class AlertInfos {
48
50
  this.deviceOrganisationImageId = params.deviceOrganisationImageId;
49
51
  this.deviceOrganisationCode = params.deviceOrganisationCode;
50
52
  this.deviceOrganisationLabel = params.deviceOrganisationLabel;
53
+ this.deviceOrganisationLocationLabel = params.deviceOrganisationLocationLabel;
54
+ this.deviceOrganisationOwnerLabel = params.deviceOrganisationOwnerLabel;
51
55
  this.icon = params.icon;
52
56
  this.code = params.code;
53
57
  this.label = params.label;
@@ -89,6 +93,8 @@ export interface AlertInfosDTO {
89
93
  deviceOrganisationImageId: string | null;
90
94
  deviceOrganisationCode: string;
91
95
  deviceOrganisationLabel: string;
96
+ deviceOrganisationLocationLabel: string | null;
97
+ deviceOrganisationOwnerLabel: string | null;
92
98
  icon: string;
93
99
  code: string;
94
100
  label: string;
@@ -1,4 +1,4 @@
1
1
  export interface CreateDashboardShallowWidgetDTO {
2
- widgetId: string;
2
+ hiddenCode: string;
3
3
  meta: { [key: string]: string };
4
4
  }
@@ -15,16 +15,16 @@ const clean = <T>(meta: T): T => {
15
15
  }
16
16
 
17
17
  export class DashboardShallowWidgetInfos {
18
- widgetId: string;
18
+ hiddenCode: string;
19
19
  meta: { [key: string]: string };
20
20
 
21
21
  constructor(params: DashboardShallowWidgetInfosDTO) {
22
- this.widgetId = params.widgetId;
22
+ this.hiddenCode = params.hiddenCode;
23
23
  this.meta = clean(params.meta);
24
24
  }
25
25
  }
26
26
 
27
27
  export interface DashboardShallowWidgetInfosDTO {
28
- widgetId: string;
28
+ hiddenCode: string;
29
29
  meta: { [key: string]: string };
30
30
  }
@@ -0,0 +1,22 @@
1
+ import type { ApplicationScope } from "@dative-gpi/foundation-shared-domain/enums";
2
+ import type { CreateDashboardDatePresetDTO, CreateDashboardEntityPresetDTO, CreateDashboardVariableDTO, DashboardTranslationDTO } from "@dative-gpi/foundation-core-domain/models";
3
+
4
+ export interface DashboardSettings {
5
+ folderId: string | null;
6
+ imageId: string | null;
7
+ image: string | null;
8
+ labelDefault: string;
9
+ locked: boolean;
10
+ code: string;
11
+ colors: string[];
12
+ icon: string;
13
+ tags: string[];
14
+ translations: DashboardTranslationDTO[];
15
+ entityPresetCode: string | null;
16
+ datePresetCode: string | null;
17
+ variableCode: string | null;
18
+ datePresets: CreateDashboardDatePresetDTO[];
19
+ entityPresets: CreateDashboardEntityPresetDTO[];
20
+ variables: CreateDashboardVariableDTO[];
21
+ scope: ApplicationScope;
22
+ }
@@ -1,3 +1,4 @@
1
1
  export * from "./dashboardDetails";
2
2
  export * from "./dashboardInfos";
3
+ export * from "./dashboardSettings";
3
4
  export * from "./dashboardTranslation";
@@ -35,8 +35,6 @@ export interface CreateDeviceOrganisationDTO {
35
35
  manufacturerId: string;
36
36
  managerId: string | null;
37
37
  locationId: string | null;
38
- latitude: number | null;
39
- longitude: number | null;
40
38
  groupId: string | null;
41
39
  code: string;
42
40
  label: string;
package/models/index.ts CHANGED
@@ -38,7 +38,6 @@ export * from "./models";
38
38
  export * from "./modelStatuses"; // No service
39
39
  export * from "./organisations";
40
40
  export * from "./permissionCategories";
41
- export * from "./reports";
42
41
  export * from "./roleOrganisations";
43
42
  export * from "./roleOrganisationTypes";
44
43
  export * from "./routes";
@@ -3,22 +3,15 @@ import { PermissionInfos, type PermissionInfosDTO } from "@dative-gpi/foundation
3
3
  import { ServiceAccountOrganisationInfos, type ServiceAccountOrganisationInfosDTO } from "./serviceAccountOrganisationInfos";
4
4
 
5
5
  export class ServiceAccountOrganisationDetails extends ServiceAccountOrganisationInfos {
6
- languageCode: string;
7
- timeZoneId: string;
8
6
  permissions: PermissionInfos[];
9
7
 
10
8
  constructor(params: ServiceAccountOrganisationDetailsDTO) {
11
9
  super(params);
12
-
13
- this.languageCode = params.languageCode;
14
- this.timeZoneId = params.timeZoneId;
15
10
  this.permissions = params.permissions.map(dto => new PermissionInfos(dto));
16
11
  }
17
12
  }
18
13
 
19
14
  export interface ServiceAccountOrganisationDetailsDTO extends ServiceAccountOrganisationInfosDTO {
20
- languageCode: string;
21
- timeZoneId: string;
22
15
  permissions: PermissionInfosDTO[];
23
16
  }
24
17
 
@@ -4,6 +4,8 @@ export class ServiceAccountOrganisationInfos {
4
4
  id: string;
5
5
  userId: string;
6
6
  organisationId: string;
7
+ languageCode: string;
8
+ timeZoneId: string;
7
9
  roleId: string | null;
8
10
  roleLabel: string;
9
11
  roleIcon: string;
@@ -18,6 +20,8 @@ export class ServiceAccountOrganisationInfos {
18
20
  this.id = params.id;
19
21
  this.userId = params.userId;
20
22
  this.organisationId = params.organisationId;
23
+ this.languageCode = params.languageCode;
24
+ this.timeZoneId = params.timeZoneId;
21
25
  this.roleId = params.roleId;
22
26
  this.roleLabel = params.roleLabel;
23
27
  this.roleIcon = params.roleIcon;
@@ -34,6 +38,8 @@ export interface ServiceAccountOrganisationInfosDTO {
34
38
  id: string;
35
39
  userId: string;
36
40
  organisationId: string;
41
+ languageCode: string;
42
+ timeZoneId: string;
37
43
  roleId: string | null;
38
44
  roleLabel: string;
39
45
  roleIcon: string;
@@ -1,5 +1,6 @@
1
1
  import _ from "lodash";
2
2
  import type { WidgetCategory } from "@dative-gpi/foundation-shared-domain/enums";
3
+ import type { WidgetTemplateType } from '@dative-gpi/foundation-shared-domain/enums/widgetTemplates';
3
4
 
4
5
  const clean = <T>(meta: T): T => {
5
6
  const newMeta = _.cloneDeepWith(meta, (value) => {
@@ -16,6 +17,9 @@ const clean = <T>(meta: T): T => {
16
17
 
17
18
  export class WidgetTemplateInfos {
18
19
  id: string;
20
+ type: WidgetTemplateType;
21
+ extensionId: string | null;
22
+ extensionHost: string | null;
19
23
  label: string;
20
24
  code: string;
21
25
  icon: string;
@@ -27,6 +31,9 @@ export class WidgetTemplateInfos {
27
31
 
28
32
  constructor(params: WidgetTemplateInfosDTO) {
29
33
  this.id = params.id;
34
+ this.type = params.type;
35
+ this.extensionId = params.extensionId ?? null;
36
+ this.extensionHost = params.extensionHost ?? null;
30
37
  this.label = params.label;
31
38
  this.code = params.code;
32
39
  this.icon = params.icon;
@@ -40,6 +47,9 @@ export class WidgetTemplateInfos {
40
47
 
41
48
  export interface WidgetTemplateInfosDTO {
42
49
  id: string;
50
+ type: WidgetTemplateType;
51
+ extensionId?: string;
52
+ extensionHost?: string;
43
53
  label: string;
44
54
  code: string;
45
55
  icon: string;
@@ -1,2 +1,3 @@
1
1
  export * from "./widgetDetails";
2
- export * from "./widgetInfos";
2
+ export * from "./widgetInfos";
3
+ export * from "./widgetInterface";
@@ -1,3 +1,4 @@
1
+ import type { WidgetTemplateType } from '@dative-gpi/foundation-shared-domain/enums/widgetTemplates';
1
2
  import type { WidgetInfosDTO } from "./widgetInfos";
2
3
  import { WidgetInfos } from "./widgetInfos";
3
4
 
@@ -11,6 +12,8 @@ export interface WidgetDetailsDTO extends WidgetInfosDTO {
11
12
  }
12
13
 
13
14
  export interface CreateWidgetDTO {
15
+ hiddenCode: string;
16
+ templateType: WidgetTemplateType;
14
17
  templateId: string;
15
18
  hideBorders: boolean;
16
19
  width: number;
@@ -1,3 +1,4 @@
1
+ import type { WidgetTemplateType } from '@dative-gpi/foundation-shared-domain/enums/widgetTemplates';
1
2
  import _ from "lodash";
2
3
 
3
4
  const clean = <T>(meta: T): T => {
@@ -15,6 +16,8 @@ const clean = <T>(meta: T): T => {
15
16
 
16
17
  export class WidgetInfos {
17
18
  id: string;
19
+ hiddenCode: string;
20
+ templateType: WidgetTemplateType;
18
21
  templateId: string;
19
22
  hideBorders: boolean;
20
23
  width: number;
@@ -26,6 +29,8 @@ export class WidgetInfos {
26
29
 
27
30
  constructor(params: WidgetInfosDTO) {
28
31
  this.id = params.id;
32
+ this.hiddenCode = params.hiddenCode;
33
+ this.templateType = params.templateType;
29
34
  this.templateId = params.templateId;
30
35
  this.hideBorders = params.hideBorders;
31
36
  this.width = params.width;
@@ -39,6 +44,8 @@ export class WidgetInfos {
39
44
 
40
45
  export interface WidgetInfosDTO {
41
46
  id: string;
47
+ hiddenCode: string;
48
+ templateType: WidgetTemplateType;
42
49
  templateId: string;
43
50
  hideBorders: boolean;
44
51
  width: number;
@@ -0,0 +1,15 @@
1
+ import type { WidgetTemplateType } from '@dative-gpi/foundation-shared-domain/enums/widgetTemplates';
2
+
3
+ export interface Widget {
4
+ id: string;
5
+ hiddenCode: string;
6
+ templateType: WidgetTemplateType;
7
+ templateId: string;
8
+ hideBorders: boolean;
9
+ width: number;
10
+ height: number;
11
+ x: number;
12
+ y: number;
13
+ targetScreenSize: "s" | "m" | "l" | "xl";
14
+ meta: { [key: string]: string };
15
+ }
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.139",
4
+ "version": "1.0.140-selectable",
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.139",
14
- "@dative-gpi/foundation-shared-services": "1.0.139"
13
+ "@dative-gpi/foundation-shared-domain": "1.0.140-selectable",
14
+ "@dative-gpi/foundation-shared-services": "1.0.140-selectable"
15
15
  },
16
- "gitHead": "e87dd93aeba0c018e180ab8d5764fe997011cea5"
16
+ "gitHead": "6faaffa554359a3319265c4f25e44a5da901fe20"
17
17
  }
@@ -1,4 +0,0 @@
1
- export * from "./reportDetails";
2
- export * from "./reportInfos";
3
- export * from "./reportExecutions";
4
- export * from "./translationReport";
@@ -1,39 +0,0 @@
1
- import type { DashboardType } from "@dative-gpi/foundation-shared-domain/enums";
2
- import { ReportInfos, type ReportInfosDTO } from "./reportInfos";
3
- import type { TranslationReportDTO } from "./translationReport";
4
-
5
- export class ReportDetails extends ReportInfos {
6
-
7
- constructor(params: ReportDetailsDTO) {
8
- super(params);
9
- }
10
- }
11
-
12
- export interface ReportDetailsDTO extends ReportInfosDTO {
13
- }
14
-
15
- export interface CreateReportDTO {
16
- labelDefault: string;
17
- bodyDefault: string;
18
- dashboardId: string;
19
- startDate: string;
20
- endDate: string;
21
- dashboardScope: DashboardType;
22
- icon: string;
23
- cron: string;
24
- userIds: string[];
25
- translations: TranslationReportDTO[];
26
- }
27
-
28
- export interface UpdateReportDTO {
29
- labelDefault: string;
30
- bodyDefault: string;
31
- dashboardId: string;
32
- startDate: string;
33
- endDate: string;
34
- dashboardScope: DashboardType;
35
- icon: string;
36
- cron: string;
37
- userIds: string[];
38
- translations: TranslationReportDTO[];
39
- }
@@ -1,79 +0,0 @@
1
- import type { DashboardType, JobState } from "@dative-gpi/foundation-shared-domain/enums";
2
- import { isoToEpoch } from "@dative-gpi/foundation-shared-domain/tools";
3
-
4
- import { useDateFormat } from "@dative-gpi/foundation-shared-services/composables";
5
-
6
- const { epochToLongDateFormat } = useDateFormat();
7
-
8
- export class ReportExecution {
9
- id: string | null;
10
- reportId: string;
11
- jobId: string;
12
- fileId: string | null;
13
- fileLabel: string | null;
14
- reportLabel: string | null;
15
- mailBody: string | null;
16
- state: JobState;
17
- startDate: string;
18
- endDate: string;
19
- users: string[];
20
- dashboardLabel: string;
21
- dashboardId: string;
22
- dashboardScope: DashboardType;
23
- executedAt: number;
24
- error: string;
25
- cron: string;
26
-
27
- get executedAtGroup(): string {
28
- return epochToLongDateFormat(this.executedAt);
29
- }
30
-
31
-
32
- constructor(params: ReportExecutionDTO) {
33
- this.id = params.id;
34
- this.reportId = params.reportId;
35
- this.jobId = params.jobId;
36
- this.fileId = params.fileId;
37
- this.fileLabel = params.fileLabel;
38
- this.reportLabel = params.reportLabel;
39
- this.mailBody = params.mailBody
40
- this.state = params.state;
41
- this.startDate = params.startDate;
42
- this.endDate = params.endDate;
43
- this.users = params.users;
44
- this.dashboardLabel = params.dashboardLabel;
45
- this.dashboardId = params.dashboardId;
46
- this.dashboardScope = params.dashboardScope;
47
- this.executedAt = isoToEpoch(params.executedAt);
48
- this.error = params.error;
49
- this.cron = params.cron;
50
- }
51
- }
52
-
53
-
54
- export interface ReportExecutionDTO {
55
- id: string | null;
56
- reportId: string;
57
- jobId: string;
58
- fileId: string | null;
59
- fileLabel: string | null;
60
- reportLabel: string | null;
61
- mailBody: string | null;
62
- state: JobState;
63
- success: boolean;
64
- startDate: string;
65
- endDate: string;
66
- users: string[];
67
- dashboardLabel: string;
68
- dashboardId: string;
69
- dashboardScope: DashboardType;
70
- executedAt: string;
71
- error: string;
72
- cron: string;
73
- }
74
-
75
- export interface ReportExecutionFilters {
76
- reportId?: string | null;
77
- startDate?: string | null;
78
- endDate?: string | null;
79
- }
@@ -1,71 +0,0 @@
1
- import type { DashboardType } from "@dative-gpi/foundation-shared-domain/enums";
2
- import { isoToEpoch } from "@dative-gpi/foundation-shared-domain/tools";
3
- import { TranslationReport } from "./translationReport";
4
-
5
- export class ReportInfos {
6
-
7
- id: string;
8
- labelDefault: string;
9
- bodyDefault: string;
10
- label: string;
11
- body: string;
12
- cron: string;
13
- icon: string;
14
- userIds: string[];
15
- dashboardId: string;
16
- dashboardScope: DashboardType;
17
- dashboardLabel: string;
18
- startDate: string;
19
- endDate: string;
20
- createdAt: number | null;
21
- nextExecution: number | null;
22
- lastExecution: number | null;
23
- translations: TranslationReport[];
24
-
25
- constructor(params: ReportInfosDTO) {
26
- this.id = params.id;
27
- this.labelDefault = params.labelDefault;
28
- this.bodyDefault = params.bodyDefault;
29
- this.label = params.label;
30
- this.body = params.body;
31
- this.cron = params.cron;
32
- this.icon = params.icon;
33
- this.dashboardId = params.dashboardId;
34
- this.dashboardScope = params.dashboardScope;
35
- this.dashboardLabel = params.dashboardLabel;
36
- this.startDate = params.startDate;
37
- this.endDate = params.endDate;
38
- this.userIds = params.userIds;
39
- this.createdAt = params.createdAt ? isoToEpoch(params.createdAt) : null;
40
- this.nextExecution = params.nextExecution ? isoToEpoch(params.nextExecution) : null;
41
- this.lastExecution = params.lastExecution ? isoToEpoch(params.lastExecution) : null;
42
- this.translations = params.translations.map((translation) => new TranslationReport(translation));
43
- }
44
- }
45
-
46
-
47
- export interface ReportInfosDTO {
48
- id: string;
49
- labelDefault: string;
50
- bodyDefault: string;
51
- label: string;
52
- body: string;
53
- cron: string;
54
- icon: string;
55
- dashboardId: string;
56
- dashboardScope: DashboardType;
57
- dashboardLabel: string;
58
- startDate: string;
59
- endDate: string;
60
- userIds: string[];
61
- createdAt: string | null;
62
- nextExecution: string | null;
63
- lastExecution: string | null;
64
- translations: TranslationReport[];
65
- }
66
-
67
- export interface ReportFilters {
68
- search?: string | null;
69
- startDate?: string | null;
70
- endDate?: string | null;
71
- }
@@ -1,17 +0,0 @@
1
- export class TranslationReport {
2
- languageCode: string;
3
- label: string;
4
- body: string;
5
-
6
- constructor(params: TranslationReportDTO) {
7
- this.languageCode = params.languageCode;
8
- this.label = params.label;
9
- this.body = params.body;
10
- }
11
- }
12
-
13
- export interface TranslationReportDTO {
14
- languageCode: string;
15
- label: string;
16
- body: string;
17
- }