@dative-gpi/foundation-core-domain 1.0.138 → 1.0.139-auth-token
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.
- package/models/alerts/alertInfos.ts +6 -0
- package/models/dashboards/dashboardSettings.ts +22 -0
- package/models/dashboards/index.ts +1 -0
- package/models/deviceOrganisations/deviceOrganisationDetails.ts +0 -2
- package/models/index.ts +0 -1
- package/models/serviceAccountOrganisations/serviceAccountOrganisationDetails.ts +0 -7
- package/models/serviceAccountOrganisations/serviceAccountOrganisationInfos.ts +6 -0
- package/models/widgetTemplates/widgetTemplateInfos.ts +6 -0
- package/models/widgets/index.ts +2 -1
- package/models/widgets/widgetInterface.ts +11 -0
- package/package.json +4 -4
- package/models/reports/index.ts +0 -4
- package/models/reports/reportDetails.ts +0 -39
- package/models/reports/reportExecutions.ts +0 -79
- package/models/reports/reportInfos.ts +0 -71
- package/models/reports/translationReport.ts +0 -17
|
@@ -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;
|
|
@@ -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
|
+
}
|
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;
|
|
@@ -16,6 +16,8 @@ const clean = <T>(meta: T): T => {
|
|
|
16
16
|
|
|
17
17
|
export class WidgetTemplateInfos {
|
|
18
18
|
id: string;
|
|
19
|
+
extensionId: string | null;
|
|
20
|
+
extensionHost: string | null;
|
|
19
21
|
label: string;
|
|
20
22
|
code: string;
|
|
21
23
|
icon: string;
|
|
@@ -27,6 +29,8 @@ export class WidgetTemplateInfos {
|
|
|
27
29
|
|
|
28
30
|
constructor(params: WidgetTemplateInfosDTO) {
|
|
29
31
|
this.id = params.id;
|
|
32
|
+
this.extensionId = params.extensionId ?? null;
|
|
33
|
+
this.extensionHost = params.extensionHost ?? null;
|
|
30
34
|
this.label = params.label;
|
|
31
35
|
this.code = params.code;
|
|
32
36
|
this.icon = params.icon;
|
|
@@ -40,6 +44,8 @@ export class WidgetTemplateInfos {
|
|
|
40
44
|
|
|
41
45
|
export interface WidgetTemplateInfosDTO {
|
|
42
46
|
id: string;
|
|
47
|
+
extensionId?: string;
|
|
48
|
+
extensionHost?: string;
|
|
43
49
|
label: string;
|
|
44
50
|
code: string;
|
|
45
51
|
icon: string;
|
package/models/widgets/index.ts
CHANGED
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.
|
|
4
|
+
"version": "1.0.139-auth-token",
|
|
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.
|
|
14
|
-
"@dative-gpi/foundation-shared-services": "1.0.
|
|
13
|
+
"@dative-gpi/foundation-shared-domain": "1.0.139-auth-token",
|
|
14
|
+
"@dative-gpi/foundation-shared-services": "1.0.139-auth-token"
|
|
15
15
|
},
|
|
16
|
-
"gitHead": "
|
|
16
|
+
"gitHead": "af9d894b3fa209b796f8466b8545bb1ecc46a399"
|
|
17
17
|
}
|
package/models/reports/index.ts
DELETED
|
@@ -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
|
-
}
|