@dative-gpi/foundation-core-domain 0.0.2
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/index.ts +1 -0
- package/models/alerts/alertDataDefinition.ts +17 -0
- package/models/alerts/alertDetails.ts +15 -0
- package/models/alerts/alertInfos.ts +116 -0
- package/models/alerts/alertState.ts +29 -0
- package/models/alerts/index.ts +4 -0
- package/models/applications/applicationDetails.ts +16 -0
- package/models/applications/applicationInfos.ts +29 -0
- package/models/applications/index.ts +2 -0
- package/models/articles/articleDetails.ts +27 -0
- package/models/articles/articleInfos.ts +30 -0
- package/models/articles/index.ts +2 -0
- package/models/authTokens/authTokenDetails.ts +20 -0
- package/models/authTokens/authTokenInfos.ts +27 -0
- package/models/authTokens/index.ts +2 -0
- package/models/connectivityAlerts/connectivityAlertDetails.ts +10 -0
- package/models/connectivityAlerts/connectivityAlertInfos.ts +58 -0
- package/models/connectivityAlerts/index.ts +2 -0
- package/models/customProperties/customPropertyColor.ts +22 -0
- package/models/customProperties/customPropertyDetails.ts +11 -0
- package/models/customProperties/customPropertyInfos.ts +68 -0
- package/models/customProperties/index.ts +3 -0
- package/models/customPropertyValues/customPropertyValueDetails.ts +10 -0
- package/models/customPropertyValues/customPropertyValueInfos.ts +14 -0
- package/models/customPropertyValues/index.ts +2 -0
- package/models/dataCategories/dataCategoryDetails.ts +10 -0
- package/models/dataCategories/dataCategoryInfos.ts +29 -0
- package/models/dataCategories/index.ts +2 -0
- package/models/dataDefinitionMappings/dataDefinitionMappingDetails.ts +10 -0
- package/models/dataDefinitionMappings/dataDefinitionMappingInfos.ts +17 -0
- package/models/dataDefinitionMappings/index.ts +2 -0
- package/models/dataDefinitions/dataDefinitionDetails.ts +10 -0
- package/models/dataDefinitions/dataDefinitionInfos.ts +57 -0
- package/models/dataDefinitions/index.ts +2 -0
- package/models/deviceConnectivities/deviceConnectivityDetails.ts +10 -0
- package/models/deviceConnectivities/deviceConnectivityInfos.ts +31 -0
- package/models/deviceConnectivities/index.ts +2 -0
- package/models/deviceOrganisations/deviceOrganisationAlert.ts +28 -0
- package/models/deviceOrganisations/deviceOrganisationDetails.ts +64 -0
- package/models/deviceOrganisations/deviceOrganisationInfos.ts +132 -0
- package/models/deviceOrganisations/deviceOrganisationOption.ts +23 -0
- package/models/deviceOrganisations/index.ts +4 -0
- package/models/deviceStatuses/deviceStatusDetails.ts +10 -0
- package/models/deviceStatuses/deviceStatusInfos.ts +65 -0
- package/models/deviceStatuses/index.ts +2 -0
- package/models/enums/alertEnums.ts +30 -0
- package/models/enums/applicationEnums.ts +8 -0
- package/models/enums/customPropertyEnums.ts +12 -0
- package/models/enums/dashboardEnums.ts +30 -0
- package/models/enums/dataDefinitionEnums.ts +5 -0
- package/models/enums/deviceEnums.ts +7 -0
- package/models/enums/index.ts +9 -0
- package/models/enums/roleEnums.ts +5 -0
- package/models/enums/sharedEnums.ts +20 -0
- package/models/enums/userEnums.ts +13 -0
- package/models/families/familyDetails.ts +18 -0
- package/models/families/familyInfos.ts +18 -0
- package/models/families/index.ts +2 -0
- package/models/groups/groupDetails.ts +41 -0
- package/models/groups/groupInfos.ts +72 -0
- package/models/groups/index.ts +2 -0
- package/models/index.ts +32 -0
- package/models/languages/index.ts +2 -0
- package/models/languages/languageDetails.ts +10 -0
- package/models/languages/languageInfos.ts +24 -0
- package/models/locations/address.ts +29 -0
- package/models/locations/index.ts +3 -0
- package/models/locations/locationDetails.ts +35 -0
- package/models/locations/locationInfos.ts +46 -0
- package/models/manufacturers/index.ts +2 -0
- package/models/manufacturers/manufacturerDetails.ts +15 -0
- package/models/manufacturers/manufacturerInfos.ts +30 -0
- package/models/modelStatuses/index.ts +1 -0
- package/models/modelStatuses/modelStatus.ts +53 -0
- package/models/models/index.ts +2 -0
- package/models/models/modelDetails.ts +10 -0
- package/models/models/modelInfos.ts +43 -0
- package/models/organisationTypes/index.ts +2 -0
- package/models/organisationTypes/organisationTypeDetails.ts +21 -0
- package/models/organisationTypes/organisationTypeInfos.ts +29 -0
- package/models/organisations/index.ts +2 -0
- package/models/organisations/organisationDetails.ts +53 -0
- package/models/organisations/organisationInfos.ts +33 -0
- package/models/permissionCategories/index.ts +2 -0
- package/models/permissionCategories/permissionCategoryDetails.ts +10 -0
- package/models/permissionCategories/permissionCategoryInfos.ts +24 -0
- package/models/permissions/index.ts +2 -0
- package/models/permissions/permissionDetails.ts +10 -0
- package/models/permissions/permissionInfos.ts +17 -0
- package/models/roleOrganisationTypes/index.ts +2 -0
- package/models/roleOrganisationTypes/roleOrganisationTypeDetails.ts +15 -0
- package/models/roleOrganisationTypes/roleOrganisationTypeInfos.ts +52 -0
- package/models/roleOrganisations/index.ts +2 -0
- package/models/roleOrganisations/roleOrganisationDetails.ts +36 -0
- package/models/roleOrganisations/roleOrganisationInfos.ts +47 -0
- package/models/shared/dateVariable.ts +14 -0
- package/models/shared/index.ts +2 -0
- package/models/shared/pathCrumb.ts +17 -0
- package/models/timeZones/index.ts +1 -0
- package/models/timeZones/timeZoneInfos.ts +18 -0
- package/models/translations/index.ts +2 -0
- package/models/translations/translationDetails.ts +10 -0
- package/models/translations/translationInfos.ts +17 -0
- package/models/userOrganisations/index.ts +2 -0
- package/models/userOrganisations/userOrganisationDetails.ts +70 -0
- package/models/userOrganisations/userOrganisationInfos.ts +82 -0
- package/models/users/index.ts +2 -0
- package/models/users/userDetails.ts +39 -0
- package/models/users/userInfos.ts +39 -0
- package/package.json +12 -0
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { DataDefinitionMappingInfos, DataDefinitionMappingInfosDTO } from "../dataDefinitionMappings/dataDefinitionMappingInfos";
|
|
2
|
+
import { DataTable } from "../enums/dataDefinitionEnums";
|
|
3
|
+
|
|
4
|
+
export class DataDefinitionInfos {
|
|
5
|
+
id: string;
|
|
6
|
+
modelId: string;
|
|
7
|
+
dataCategoryId: string;
|
|
8
|
+
dataCategoryCode: string;
|
|
9
|
+
dataCategoryLabel: string;
|
|
10
|
+
code: string;
|
|
11
|
+
label: string;
|
|
12
|
+
description: string;
|
|
13
|
+
dataTable: DataTable;
|
|
14
|
+
useOnlyMappings: boolean;
|
|
15
|
+
unit: string;
|
|
16
|
+
codes: string[];
|
|
17
|
+
mappings: DataDefinitionMappingInfos[];
|
|
18
|
+
|
|
19
|
+
constructor(params: DataDefinitionInfosDTO) {
|
|
20
|
+
this.id = params.id;
|
|
21
|
+
this.modelId = params.modelId;
|
|
22
|
+
this.dataCategoryId = params.dataCategoryId;
|
|
23
|
+
this.dataCategoryCode = params.dataCategoryCode;
|
|
24
|
+
this.dataCategoryLabel = params.dataCategoryLabel;
|
|
25
|
+
this.code = params.code;
|
|
26
|
+
this.label = params.label;
|
|
27
|
+
this.description = params.description;
|
|
28
|
+
this.dataTable = params.dataTable;
|
|
29
|
+
this.useOnlyMappings = params.useOnlyMappings;
|
|
30
|
+
this.unit = params.unit;
|
|
31
|
+
this.codes = params.codes.slice();
|
|
32
|
+
this.mappings = params.mappings?.map(dto => new DataDefinitionMappingInfos(dto)) ?? [];
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export interface DataDefinitionInfosDTO {
|
|
37
|
+
id: string;
|
|
38
|
+
modelId: string;
|
|
39
|
+
dataCategoryId: string;
|
|
40
|
+
dataCategoryCode: string;
|
|
41
|
+
dataCategoryLabel: string;
|
|
42
|
+
code: string;
|
|
43
|
+
label: string;
|
|
44
|
+
description: string;
|
|
45
|
+
dataTable: DataTable;
|
|
46
|
+
useOnlyMappings: boolean;
|
|
47
|
+
unit: string;
|
|
48
|
+
codes: string[];
|
|
49
|
+
mappings: DataDefinitionMappingInfosDTO[];
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export interface DataDefinitionFilters {
|
|
53
|
+
modelsIds?: string[];
|
|
54
|
+
dataCategoryId?: string;
|
|
55
|
+
dataTable?: DataTable;
|
|
56
|
+
search?: string;
|
|
57
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { DeviceConnectivityInfos, DeviceConnectivityInfosDTO } from "./deviceConnectivityInfos";
|
|
2
|
+
|
|
3
|
+
export class DeviceConnectivityDetails extends DeviceConnectivityInfos {
|
|
4
|
+
constructor(params: DeviceConnectivityDetailsDTO) {
|
|
5
|
+
super(params);
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export interface DeviceConnectivityDetailsDTO extends DeviceConnectivityInfosDTO {
|
|
10
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { ConnectivityStatus } from "../enums/deviceEnums";
|
|
2
|
+
|
|
3
|
+
export class DeviceConnectivityInfos {
|
|
4
|
+
id: string;
|
|
5
|
+
sourceTimestamp?: number;
|
|
6
|
+
enqueuedTimestamp?: number;
|
|
7
|
+
processedTimestamp?: number;
|
|
8
|
+
status: ConnectivityStatus;
|
|
9
|
+
icon: string;
|
|
10
|
+
color: string;
|
|
11
|
+
|
|
12
|
+
constructor(params: DeviceConnectivityInfosDTO) {
|
|
13
|
+
this.id = params.id;
|
|
14
|
+
this.sourceTimestamp = params.sourceTimestamp;
|
|
15
|
+
this.enqueuedTimestamp = params.enqueuedTimestamp;
|
|
16
|
+
this.processedTimestamp = params.processedTimestamp;
|
|
17
|
+
this.status = params.status;
|
|
18
|
+
this.icon = params.icon;
|
|
19
|
+
this.color = params.color;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
export interface DeviceConnectivityInfosDTO {
|
|
24
|
+
id: string;
|
|
25
|
+
sourceTimestamp?: number;
|
|
26
|
+
enqueuedTimestamp?: number;
|
|
27
|
+
processedTimestamp?: number;
|
|
28
|
+
status: ConnectivityStatus;
|
|
29
|
+
icon: string;
|
|
30
|
+
color: string;
|
|
31
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { AlertStatus, Criticity } from "../enums/alertEnums";
|
|
2
|
+
|
|
3
|
+
export class DeviceOrganisationAlert {
|
|
4
|
+
id: string;
|
|
5
|
+
label: string;
|
|
6
|
+
status: AlertStatus;
|
|
7
|
+
criticity: Criticity;
|
|
8
|
+
sourceTimestamp?: number;
|
|
9
|
+
enqueuedTimestamp?: number;
|
|
10
|
+
|
|
11
|
+
constructor(params: DeviceOrganisationAlertDTO) {
|
|
12
|
+
this.id = params.id;
|
|
13
|
+
this.label = params.label;
|
|
14
|
+
this.status = params.status;
|
|
15
|
+
this.criticity = params.criticity;
|
|
16
|
+
this.sourceTimestamp = params.sourceTimestamp;
|
|
17
|
+
this.enqueuedTimestamp = params.enqueuedTimestamp;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export interface DeviceOrganisationAlertDTO {
|
|
22
|
+
id: string;
|
|
23
|
+
label: string;
|
|
24
|
+
status: AlertStatus;
|
|
25
|
+
criticity: Criticity;
|
|
26
|
+
sourceTimestamp?: number;
|
|
27
|
+
enqueuedTimestamp?: number;
|
|
28
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { DeviceOrganisationOption, DeviceOrganisationOptionDTO } from "./deviceOrganisationOption";
|
|
2
|
+
import { DeviceOrganisationInfos, DeviceOrganisationInfosDTO } from "./deviceOrganisationInfos";
|
|
3
|
+
import { PathCrumb, PathCrumbDTO } from "../shared/pathCrumb";
|
|
4
|
+
|
|
5
|
+
export class DeviceOrganisationDetails extends DeviceOrganisationInfos {
|
|
6
|
+
articleCode: string;
|
|
7
|
+
familyId: string;
|
|
8
|
+
familyLabel: string;
|
|
9
|
+
description: string;
|
|
10
|
+
options: DeviceOrganisationOption[];
|
|
11
|
+
path: PathCrumb[];
|
|
12
|
+
|
|
13
|
+
constructor(params: DeviceOrganisationDetailsDTO) {
|
|
14
|
+
super(params);
|
|
15
|
+
|
|
16
|
+
this.articleCode = params.articleCode;
|
|
17
|
+
this.familyId = params.familyId;
|
|
18
|
+
this.familyLabel = params.familyLabel;
|
|
19
|
+
this.description = params.description;
|
|
20
|
+
this.options = params.options.map(dto => new DeviceOrganisationOption({ ...dto }));
|
|
21
|
+
this.path = params.path.map(dto => new PathCrumb({ ...dto })).sort((a, b) => b.index - a.index);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export interface DeviceOrganisationDetailsDTO extends DeviceOrganisationInfosDTO {
|
|
26
|
+
articleCode: string;
|
|
27
|
+
familyId: string;
|
|
28
|
+
familyLabel: string;
|
|
29
|
+
description: string;
|
|
30
|
+
options: DeviceOrganisationOptionDTO[];
|
|
31
|
+
path: PathCrumbDTO[];
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export interface CreateDeviceOrganisationDTO {
|
|
35
|
+
manufacturerId: string;
|
|
36
|
+
managerId?: string;
|
|
37
|
+
locationId?: string;
|
|
38
|
+
groupId?: string;
|
|
39
|
+
code: string;
|
|
40
|
+
label: string;
|
|
41
|
+
description: string;
|
|
42
|
+
tags: string[];
|
|
43
|
+
meta: { [key: string]: string };
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export interface UpdateDeviceOrganisationDTO {
|
|
47
|
+
managerId?: string;
|
|
48
|
+
locationId?: string;
|
|
49
|
+
groupId?: string;
|
|
50
|
+
imageId?: string;
|
|
51
|
+
image?: string;
|
|
52
|
+
label: string;
|
|
53
|
+
description: string;
|
|
54
|
+
tags: string[];
|
|
55
|
+
meta: { [key: string]: string };
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export interface ChangeDeviceOrganisationGroupDTO {
|
|
59
|
+
groupId?: string;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export interface ChangeDeviceOrganisationLocationDTO {
|
|
63
|
+
locationId?: string;
|
|
64
|
+
}
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import { DeviceConnectivityDetails, DeviceConnectivityDetailsDTO } from "../deviceConnectivities/deviceConnectivityDetails";
|
|
2
|
+
import { DeviceStatusDetails, DeviceStatusDetailsDTO } from "../deviceStatuses/deviceStatusDetails";
|
|
3
|
+
import { DeviceOrganisationAlert, DeviceOrganisationAlertDTO } from "./deviceOrganisationAlert";
|
|
4
|
+
import { ModelStatus, ModelStatusDTO } from "../modelStatuses/modelStatus";
|
|
5
|
+
|
|
6
|
+
export class DeviceOrganisationInfos {
|
|
7
|
+
id: string;
|
|
8
|
+
deviceId: string;
|
|
9
|
+
manufacturerId: string;
|
|
10
|
+
manufacturerLabel: string;
|
|
11
|
+
articleId: string;
|
|
12
|
+
articleLabel: string;
|
|
13
|
+
modelId: string;
|
|
14
|
+
modelLabel: string;
|
|
15
|
+
ownerId?: string;
|
|
16
|
+
ownerLabel?: string;
|
|
17
|
+
organisationId: string;
|
|
18
|
+
managerId?: string;
|
|
19
|
+
managerName?: string;
|
|
20
|
+
locationId?: string;
|
|
21
|
+
locationLabel?: string;
|
|
22
|
+
locationAddress?: string;
|
|
23
|
+
groupId?: string;
|
|
24
|
+
groupLabel?: string;
|
|
25
|
+
groupIcon?: string;
|
|
26
|
+
label: string;
|
|
27
|
+
code: string;
|
|
28
|
+
imageId?: string;
|
|
29
|
+
imageBlurHash?: string;
|
|
30
|
+
imageHeight?: number;
|
|
31
|
+
imageWidth?: number;
|
|
32
|
+
tags: string[];
|
|
33
|
+
unrestricted: boolean;
|
|
34
|
+
online: number;
|
|
35
|
+
meta: { [key: string]: string };
|
|
36
|
+
modelStatuses: ModelStatus[];
|
|
37
|
+
status?: DeviceStatusDetails;
|
|
38
|
+
connectivity?: DeviceConnectivityDetails;
|
|
39
|
+
alerts: DeviceOrganisationAlert[];
|
|
40
|
+
worstAlert?: DeviceOrganisationAlert;
|
|
41
|
+
|
|
42
|
+
get connectable(): DeviceConnectivityDetails | undefined {
|
|
43
|
+
return this.connectivity;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
constructor(params: DeviceOrganisationInfosDTO) {
|
|
47
|
+
this.id = params.id;
|
|
48
|
+
this.deviceId = params.deviceId;
|
|
49
|
+
this.manufacturerId = params.manufacturerId;
|
|
50
|
+
this.manufacturerLabel = params.manufacturerLabel;
|
|
51
|
+
this.articleId = params.articleId;
|
|
52
|
+
this.articleLabel = params.articleLabel;
|
|
53
|
+
this.modelId = params.modelId;
|
|
54
|
+
this.modelLabel = params.modelLabel;
|
|
55
|
+
this.ownerId = params.ownerId;
|
|
56
|
+
this.ownerLabel = params.ownerLabel;
|
|
57
|
+
this.organisationId = params.organisationId;
|
|
58
|
+
this.managerId = params.managerId;
|
|
59
|
+
this.managerName = params.managerName;
|
|
60
|
+
this.locationId = params.locationId;
|
|
61
|
+
this.locationLabel = params.locationLabel;
|
|
62
|
+
this.locationAddress = params.locationAddress;
|
|
63
|
+
this.groupId = params.groupId;
|
|
64
|
+
this.groupLabel = params.groupLabel;
|
|
65
|
+
this.groupIcon = params.groupIcon;
|
|
66
|
+
this.label = params.label;
|
|
67
|
+
this.code = params.code;
|
|
68
|
+
this.imageId = params.imageId;
|
|
69
|
+
this.imageBlurHash = params.imageBlurHash;
|
|
70
|
+
this.imageHeight = params.imageHeight;
|
|
71
|
+
this.imageWidth = params.imageWidth;
|
|
72
|
+
this.tags = params.tags.slice();
|
|
73
|
+
this.unrestricted = params.unrestricted;
|
|
74
|
+
this.online = params.online;
|
|
75
|
+
this.meta = { ...params.meta };
|
|
76
|
+
this.modelStatuses = params.modelStatuses.map(dto => new ModelStatus(dto));
|
|
77
|
+
this.status = params.status != null ? new DeviceStatusDetails(params.status) : undefined;
|
|
78
|
+
this.connectivity = params.connectivity != null ? new DeviceConnectivityDetails({ ...params.connectivity, id: params.id }) : undefined;
|
|
79
|
+
this.alerts = params.alerts.map(dto => new DeviceOrganisationAlert(dto));
|
|
80
|
+
this.worstAlert = params.worstAlert != null ? new DeviceOrganisationAlert(params.worstAlert) : undefined;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export interface DeviceOrganisationInfosDTO {
|
|
85
|
+
id: string;
|
|
86
|
+
deviceId: string;
|
|
87
|
+
manufacturerId: string;
|
|
88
|
+
manufacturerLabel: string;
|
|
89
|
+
articleId: string;
|
|
90
|
+
articleLabel: string;
|
|
91
|
+
modelId: string;
|
|
92
|
+
modelLabel: string;
|
|
93
|
+
ownerId?: string;
|
|
94
|
+
ownerLabel?: string;
|
|
95
|
+
organisationId: string;
|
|
96
|
+
managerId?: string;
|
|
97
|
+
managerName?: string;
|
|
98
|
+
locationId?: string;
|
|
99
|
+
locationLabel?: string;
|
|
100
|
+
locationAddress?: string;
|
|
101
|
+
groupId?: string;
|
|
102
|
+
groupLabel?: string;
|
|
103
|
+
groupIcon?: string;
|
|
104
|
+
label: string;
|
|
105
|
+
code: string;
|
|
106
|
+
imageId?: string;
|
|
107
|
+
imageBlurHash?: string;
|
|
108
|
+
imageHeight?: number;
|
|
109
|
+
imageWidth?: number;
|
|
110
|
+
tags: string[];
|
|
111
|
+
unrestricted: boolean;
|
|
112
|
+
online: number;
|
|
113
|
+
meta: { [key: string]: string };
|
|
114
|
+
modelStatuses: ModelStatusDTO[];
|
|
115
|
+
status?: DeviceStatusDetailsDTO;
|
|
116
|
+
connectivity?: DeviceConnectivityDetailsDTO;
|
|
117
|
+
alerts: DeviceOrganisationAlertDTO[];
|
|
118
|
+
worstAlert?: DeviceOrganisationAlertDTO;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
export interface DeviceOrganisationFilters {
|
|
122
|
+
locationId?: string;
|
|
123
|
+
otherLocationId?: string;
|
|
124
|
+
groupId?: string;
|
|
125
|
+
otherGroupId?: string;
|
|
126
|
+
root?: boolean;
|
|
127
|
+
unrestricted?: boolean;
|
|
128
|
+
modelsIds?: string[];
|
|
129
|
+
deviceOrganisationsIds?: string[];
|
|
130
|
+
otherDeviceOrganisationsIds?: string[];
|
|
131
|
+
search?: string;
|
|
132
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export class DeviceOrganisationOption {
|
|
2
|
+
id: number;
|
|
3
|
+
key: string;
|
|
4
|
+
value: string;
|
|
5
|
+
keyLabel: string;
|
|
6
|
+
valueLabel: string;
|
|
7
|
+
|
|
8
|
+
constructor(params: DeviceOrganisationOptionDTO) {
|
|
9
|
+
this.id = params.id;
|
|
10
|
+
this.key = params.key;
|
|
11
|
+
this.value = params.value;
|
|
12
|
+
this.keyLabel = params.keyLabel;
|
|
13
|
+
this.valueLabel = params.valueLabel;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export interface DeviceOrganisationOptionDTO {
|
|
18
|
+
id: number;
|
|
19
|
+
key: string;
|
|
20
|
+
value: string;
|
|
21
|
+
keyLabel: string;
|
|
22
|
+
valueLabel: string;
|
|
23
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { DeviceStatusInfos, DeviceStatusInfosDTO } from "./deviceStatusInfos";
|
|
2
|
+
|
|
3
|
+
export class DeviceStatusDetails extends DeviceStatusInfos {
|
|
4
|
+
constructor(params: DeviceStatusDetailsDTO) {
|
|
5
|
+
super(params);
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export interface DeviceStatusDetailsDTO extends DeviceStatusInfosDTO {
|
|
10
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
export class DeviceStatusInfos {
|
|
2
|
+
id: string;
|
|
3
|
+
statuses: DeviceStatus[];
|
|
4
|
+
|
|
5
|
+
constructor(params: DeviceStatusInfosDTO) {
|
|
6
|
+
this.id = params.id;
|
|
7
|
+
this.statuses = params.statuses.map(dto => new DeviceStatus(dto));
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export class DeviceStatus {
|
|
12
|
+
modelStatusId: string;
|
|
13
|
+
statusGroups: DeviceStatusGroup[];
|
|
14
|
+
|
|
15
|
+
constructor(params: DeviceStatusDTO) {
|
|
16
|
+
this.modelStatusId = params.modelStatusId;
|
|
17
|
+
this.statusGroups = params.statusGroups.map(dto => new DeviceStatusGroup(dto));
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export class DeviceStatusGroup {
|
|
22
|
+
sourceTimestamp?: number;
|
|
23
|
+
enqueuedTimestamp?: number;
|
|
24
|
+
processedTimestamp?: number;
|
|
25
|
+
groupByValue: string;
|
|
26
|
+
value: string;
|
|
27
|
+
unit: string;
|
|
28
|
+
label: string;
|
|
29
|
+
icon: string;
|
|
30
|
+
color: string;
|
|
31
|
+
|
|
32
|
+
constructor(params: DeviceStatusGroupDTO) {
|
|
33
|
+
this.sourceTimestamp = params.sourceTimestamp;
|
|
34
|
+
this.enqueuedTimestamp = params.enqueuedTimestamp;
|
|
35
|
+
this.processedTimestamp = params.processedTimestamp;
|
|
36
|
+
this.groupByValue = params.groupByValue;
|
|
37
|
+
this.value = params.value;
|
|
38
|
+
this.unit = params.unit;
|
|
39
|
+
this.label = params.label;
|
|
40
|
+
this.icon = params.icon;
|
|
41
|
+
this.color = params.color;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export interface DeviceStatusInfosDTO {
|
|
46
|
+
id: string;
|
|
47
|
+
statuses: DeviceStatusDTO[];
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export interface DeviceStatusDTO {
|
|
51
|
+
modelStatusId: string;
|
|
52
|
+
statusGroups: DeviceStatusGroupDTO[];
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export interface DeviceStatusGroupDTO {
|
|
56
|
+
sourceTimestamp?: number;
|
|
57
|
+
enqueuedTimestamp?: number;
|
|
58
|
+
processedTimestamp?: number;
|
|
59
|
+
groupByValue: string;
|
|
60
|
+
value: string;
|
|
61
|
+
unit: string;
|
|
62
|
+
label: string;
|
|
63
|
+
icon: string;
|
|
64
|
+
color: string;
|
|
65
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export enum AlertStatus
|
|
2
|
+
{
|
|
3
|
+
None = 0,
|
|
4
|
+
Pending = 1,
|
|
5
|
+
Untriggered = 2,
|
|
6
|
+
Unresolved = 3,
|
|
7
|
+
Resolved = 4,
|
|
8
|
+
Expired = 5,
|
|
9
|
+
Triggered = 6,
|
|
10
|
+
Abandoned = 7
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export enum Criticity {
|
|
14
|
+
None = 0,
|
|
15
|
+
Information = 1,
|
|
16
|
+
Warning = 2,
|
|
17
|
+
Error = 3
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export enum TriggerOn {
|
|
21
|
+
None = 0,
|
|
22
|
+
RisingEdge = 1,
|
|
23
|
+
Everytime = 2
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export enum ResolveOn {
|
|
27
|
+
None = 0,
|
|
28
|
+
OutOfTrigger = 1,
|
|
29
|
+
NewOperation = 2
|
|
30
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export enum StructureLevel {
|
|
2
|
+
None = 0,
|
|
3
|
+
OrganisationDashboard = 1,
|
|
4
|
+
OrganisationTypeDashboard = 2,
|
|
5
|
+
OrganisationWidget = 3,
|
|
6
|
+
OrganisationTypeWidget = 4,
|
|
7
|
+
GroupDashboard = 5,
|
|
8
|
+
GroupWidget = 6,
|
|
9
|
+
AlertDashboard = 7,
|
|
10
|
+
AlertWidget = 8,
|
|
11
|
+
OrganisationList = 9
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export enum DashboardType {
|
|
15
|
+
None = 0,
|
|
16
|
+
Organisation = 1,
|
|
17
|
+
OrganisationType = 2,
|
|
18
|
+
Shallow = 3
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export enum AutoRefresh {
|
|
22
|
+
None = 0,
|
|
23
|
+
FifteenSeconds = 1,
|
|
24
|
+
ThirtySeconds = 2,
|
|
25
|
+
OneMinute = 3,
|
|
26
|
+
FiveMinutes = 4,
|
|
27
|
+
FifteenMinutes = 5,
|
|
28
|
+
ThirtyMinutes = 6,
|
|
29
|
+
OneHour = 7
|
|
30
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export * from "./alertEnums";
|
|
2
|
+
export * from "./applicationEnums";
|
|
3
|
+
export * from "./customPropertyEnums";
|
|
4
|
+
export * from "./dashboardEnums";
|
|
5
|
+
export * from "./dataDefinitionEnums";
|
|
6
|
+
export * from "./deviceEnums";
|
|
7
|
+
export * from "./roleEnums";
|
|
8
|
+
export * from "./sharedEnums";
|
|
9
|
+
export * from "./userEnums";
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export enum SelectedEntities {
|
|
2
|
+
None = 0,
|
|
3
|
+
Models = 1,
|
|
4
|
+
Groups = 2,
|
|
5
|
+
Locations = 3,
|
|
6
|
+
Devices = 5
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export enum FilterType {
|
|
10
|
+
None = 0,
|
|
11
|
+
Equal = 1,
|
|
12
|
+
More = 2,
|
|
13
|
+
Less = 3,
|
|
14
|
+
MoreOrEqual = 4,
|
|
15
|
+
LessOrEqual = 5,
|
|
16
|
+
Different = 6,
|
|
17
|
+
Contains = 7,
|
|
18
|
+
StartsWith = 8,
|
|
19
|
+
EndsWith = 9
|
|
20
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { FamilyInfos, FamilyInfosDTO } from "./familyInfos";
|
|
2
|
+
|
|
3
|
+
export class FamilyDetails extends FamilyInfos {
|
|
4
|
+
parentId: string;
|
|
5
|
+
parentLabel: string;
|
|
6
|
+
|
|
7
|
+
constructor(params: FamilyDetailsDTO) {
|
|
8
|
+
super(params);
|
|
9
|
+
|
|
10
|
+
this.parentId = params.parentId;
|
|
11
|
+
this.parentLabel = params.parentLabel;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export interface FamilyDetailsDTO extends FamilyInfosDTO {
|
|
16
|
+
parentId: string;
|
|
17
|
+
parentLabel: string;
|
|
18
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
export class FamilyInfos {
|
|
2
|
+
id: string;
|
|
3
|
+
label: string;
|
|
4
|
+
|
|
5
|
+
constructor(params: FamilyInfosDTO) {
|
|
6
|
+
this.id = params.id;
|
|
7
|
+
this.label = params.label;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export interface FamilyInfosDTO {
|
|
12
|
+
id: string;
|
|
13
|
+
label: string;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export interface FamilyFilters {
|
|
17
|
+
search?: string;
|
|
18
|
+
}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { GroupInfos, GroupInfosDTO } from "./groupInfos";
|
|
2
|
+
|
|
3
|
+
export class GroupDetails extends GroupInfos {
|
|
4
|
+
parentIcon?: string;
|
|
5
|
+
parentLabel?: string;
|
|
6
|
+
|
|
7
|
+
constructor(params: GroupDetailsDTO) {
|
|
8
|
+
super(params);
|
|
9
|
+
|
|
10
|
+
this.parentIcon = params.parentIcon;
|
|
11
|
+
this.parentLabel = params.parentLabel;
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export interface GroupDetailsDTO extends GroupInfosDTO {
|
|
16
|
+
parentIcon?: string;
|
|
17
|
+
parentLabel?: string;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export interface CreateGroupDTO {
|
|
21
|
+
parentId?: string;
|
|
22
|
+
image?: string;
|
|
23
|
+
icon: string;
|
|
24
|
+
code: string;
|
|
25
|
+
label: string;
|
|
26
|
+
tags: string[];
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export interface UpdateGroupDTO {
|
|
30
|
+
parentId?: string;
|
|
31
|
+
imageId?: string;
|
|
32
|
+
image?: string;
|
|
33
|
+
icon: string;
|
|
34
|
+
code: string;
|
|
35
|
+
label: string;
|
|
36
|
+
tags: string[];
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
export interface ChangeGroupParentDTO {
|
|
40
|
+
parentId?: string;
|
|
41
|
+
}
|