@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
package/index.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./models";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export class AlertDataDefinition {
|
|
2
|
+
dataDefinitionId: string;
|
|
3
|
+
value: string;
|
|
4
|
+
label: string;
|
|
5
|
+
|
|
6
|
+
constructor(params: AlertDataDefinitionDTO) {
|
|
7
|
+
this.dataDefinitionId = params.dataDefinitionId;
|
|
8
|
+
this.value = params.value;
|
|
9
|
+
this.label = params.label;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export interface AlertDataDefinitionDTO {
|
|
14
|
+
dataDefinitionId: string;
|
|
15
|
+
value: string;
|
|
16
|
+
label: string;
|
|
17
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { AlertInfos, AlertInfosDTO } from "./alertInfos";
|
|
2
|
+
|
|
3
|
+
export class AlertDetails extends AlertInfos {
|
|
4
|
+
description: string;
|
|
5
|
+
|
|
6
|
+
constructor(params: AlertDetailsDTO) {
|
|
7
|
+
super(params);
|
|
8
|
+
|
|
9
|
+
this.description = params.description;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export interface AlertDetailsDTO extends AlertInfosDTO {
|
|
14
|
+
description: string;
|
|
15
|
+
}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import { AlertDataDefinition, AlertDataDefinitionDTO } from "./alertDataDefinition";
|
|
2
|
+
import { AlertStatus, Criticity } from "../enums/alertEnums";
|
|
3
|
+
import { AlertState, AlertStateDTO } from "./alertState";
|
|
4
|
+
import { SelectedEntities } from "../enums/sharedEnums";
|
|
5
|
+
import { DateVariable } from "../shared/dateVariable";
|
|
6
|
+
|
|
7
|
+
export class AlertInfos {
|
|
8
|
+
id: string;
|
|
9
|
+
scenarioId: string;
|
|
10
|
+
scenarioLabel: string;
|
|
11
|
+
organisationId: string;
|
|
12
|
+
deviceOrganisationId: string;
|
|
13
|
+
deviceOrganisationLabel: string;
|
|
14
|
+
icon: string;
|
|
15
|
+
code: string;
|
|
16
|
+
label: string;
|
|
17
|
+
criticity: Criticity;
|
|
18
|
+
acknowledged: boolean;
|
|
19
|
+
acknowledgingUserId?: string;
|
|
20
|
+
acknowledgingUserName?: string;
|
|
21
|
+
acknowledgingUserImageId?: string;
|
|
22
|
+
acknowledgingUserImageBlurHash?: string;
|
|
23
|
+
acknowledgingUserImageWidth?: number;
|
|
24
|
+
acknowledgingUserImageHeight?: number;
|
|
25
|
+
acknowledgingTimestamp?: number;
|
|
26
|
+
initialState: AlertState;
|
|
27
|
+
triggerSourceTimestamp?: number;
|
|
28
|
+
triggerEnqueuedTimestamp?: number;
|
|
29
|
+
triggerProcessedTimestamp?: number;
|
|
30
|
+
lastState: AlertState;
|
|
31
|
+
currentSourceTimestamp?: number;
|
|
32
|
+
currentEnqueuedTimestamp?: number;
|
|
33
|
+
currentProcessedTimestamp?: number;
|
|
34
|
+
status: AlertStatus;
|
|
35
|
+
tags: string[];
|
|
36
|
+
history: AlertState[];
|
|
37
|
+
groupByValues: AlertDataDefinition[];
|
|
38
|
+
|
|
39
|
+
constructor(params: AlertInfosDTO) {
|
|
40
|
+
this.id = params.id;
|
|
41
|
+
this.scenarioId = params.scenarioId;
|
|
42
|
+
this.scenarioLabel = params.scenarioLabel;
|
|
43
|
+
this.organisationId = params.organisationId;
|
|
44
|
+
this.deviceOrganisationId = params.deviceOrganisationId;
|
|
45
|
+
this.deviceOrganisationLabel = params.deviceOrganisationLabel;
|
|
46
|
+
this.icon = params.icon;
|
|
47
|
+
this.code = params.code;
|
|
48
|
+
this.label = params.label;
|
|
49
|
+
this.criticity = params.criticity;
|
|
50
|
+
this.acknowledged = params.acknowledged;
|
|
51
|
+
this.acknowledgingUserId = params.acknowledgingUserId;
|
|
52
|
+
this.acknowledgingUserName = params.acknowledgingUserName;
|
|
53
|
+
this.acknowledgingUserImageId = params.acknowledgingUserImageId;
|
|
54
|
+
this.acknowledgingUserImageBlurHash = params.acknowledgingUserImageBlurHash;
|
|
55
|
+
this.acknowledgingUserImageWidth = params.acknowledgingUserImageWidth;
|
|
56
|
+
this.acknowledgingUserImageHeight = params.acknowledgingUserImageHeight;
|
|
57
|
+
this.acknowledgingTimestamp = params.acknowledgingTimestamp;
|
|
58
|
+
this.initialState = new AlertState(params.initialState);
|
|
59
|
+
this.triggerSourceTimestamp = params.triggerSourceTimestamp;
|
|
60
|
+
this.triggerEnqueuedTimestamp = params.triggerEnqueuedTimestamp;
|
|
61
|
+
this.triggerProcessedTimestamp = params.triggerProcessedTimestamp;
|
|
62
|
+
this.lastState = new AlertState(params.lastState);
|
|
63
|
+
this.currentSourceTimestamp = params.currentSourceTimestamp;
|
|
64
|
+
this.currentEnqueuedTimestamp = params.currentEnqueuedTimestamp;
|
|
65
|
+
this.currentProcessedTimestamp = params.currentProcessedTimestamp;
|
|
66
|
+
this.status = params.status;
|
|
67
|
+
this.tags = params.tags;
|
|
68
|
+
this.history = params.history.map(dto => new AlertState(dto));
|
|
69
|
+
this.groupByValues = params.groupByValues.map(dto => new AlertDataDefinition(dto));
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export interface AlertInfosDTO {
|
|
74
|
+
id: string;
|
|
75
|
+
scenarioId: string;
|
|
76
|
+
scenarioLabel: string;
|
|
77
|
+
organisationId: string;
|
|
78
|
+
deviceOrganisationId: string;
|
|
79
|
+
deviceOrganisationLabel: string;
|
|
80
|
+
icon: string;
|
|
81
|
+
code: string;
|
|
82
|
+
label: string;
|
|
83
|
+
criticity: Criticity;
|
|
84
|
+
acknowledged: boolean;
|
|
85
|
+
acknowledgingUserId?: string;
|
|
86
|
+
acknowledgingUserName?: string;
|
|
87
|
+
acknowledgingUserImageId?: string;
|
|
88
|
+
acknowledgingUserImageBlurHash?: string;
|
|
89
|
+
acknowledgingUserImageWidth?: number;
|
|
90
|
+
acknowledgingUserImageHeight?: number;
|
|
91
|
+
acknowledgingTimestamp?: number;
|
|
92
|
+
initialState: AlertStateDTO;
|
|
93
|
+
triggerSourceTimestamp?: number;
|
|
94
|
+
triggerEnqueuedTimestamp?: number;
|
|
95
|
+
triggerProcessedTimestamp?: number;
|
|
96
|
+
lastState: AlertStateDTO;
|
|
97
|
+
currentSourceTimestamp?: number;
|
|
98
|
+
currentEnqueuedTimestamp?: number;
|
|
99
|
+
currentProcessedTimestamp?: number;
|
|
100
|
+
status: AlertStatus;
|
|
101
|
+
tags: string[];
|
|
102
|
+
history: AlertStateDTO[];
|
|
103
|
+
groupByValues: AlertDataDefinitionDTO[];
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
export interface AlertFilters {
|
|
107
|
+
scenarioId?: string;
|
|
108
|
+
deviceOrganisationId?: string;
|
|
109
|
+
statuses?: AlertStatus[];
|
|
110
|
+
acknowledged?: boolean;
|
|
111
|
+
startDate?: string;
|
|
112
|
+
endDate?: string;
|
|
113
|
+
selectedEntities?: SelectedEntities;
|
|
114
|
+
entitiesIds?: string[];
|
|
115
|
+
dateVariables?: DateVariable[];
|
|
116
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { AlertDataDefinition, AlertDataDefinitionDTO } from "./alertDataDefinition";
|
|
2
|
+
import { AlertStatus } from "../enums/alertEnums";
|
|
3
|
+
|
|
4
|
+
export class AlertState {
|
|
5
|
+
id: string;
|
|
6
|
+
status: AlertStatus;
|
|
7
|
+
sourceTimestamp: number;
|
|
8
|
+
enqueuedTimestamp: number;
|
|
9
|
+
processedTimestamp: number;
|
|
10
|
+
metadataValues?: AlertDataDefinition[];
|
|
11
|
+
|
|
12
|
+
constructor(params: AlertStateDTO) {
|
|
13
|
+
this.id = params.id;
|
|
14
|
+
this.status = params.status;
|
|
15
|
+
this.sourceTimestamp = params.sourceTimestamp;
|
|
16
|
+
this.enqueuedTimestamp = params.enqueuedTimestamp;
|
|
17
|
+
this.processedTimestamp = params.processedTimestamp;
|
|
18
|
+
this.metadataValues = params.metadataValues?.map(dto => new AlertDataDefinition(dto));
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export interface AlertStateDTO {
|
|
23
|
+
id: string;
|
|
24
|
+
status: AlertStatus;
|
|
25
|
+
sourceTimestamp: number;
|
|
26
|
+
enqueuedTimestamp: number;
|
|
27
|
+
processedTimestamp: number;
|
|
28
|
+
metadataValues?: AlertDataDefinitionDTO[];
|
|
29
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { LanguageInfos, LanguageInfosDTO } from "../languages/languageInfos";
|
|
2
|
+
import { ApplicationInfos, ApplicationInfosDTO } from "./applicationInfos";
|
|
3
|
+
|
|
4
|
+
export class ApplicationDetails extends ApplicationInfos {
|
|
5
|
+
languages: LanguageInfos[];
|
|
6
|
+
|
|
7
|
+
constructor(params: ApplicationDetailsDTO) {
|
|
8
|
+
super(params);
|
|
9
|
+
|
|
10
|
+
this.languages = params.languages.map((dto) => new LanguageInfos(dto));
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export interface ApplicationDetailsDTO extends ApplicationInfosDTO {
|
|
15
|
+
languages: LanguageInfosDTO[];
|
|
16
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export class ApplicationInfos {
|
|
2
|
+
id: string;
|
|
3
|
+
fallbackLanguageCode: string;
|
|
4
|
+
logoId?: string;
|
|
5
|
+
logoBlurHash?: string;
|
|
6
|
+
logoHeight?: string;
|
|
7
|
+
logoWidth?: string;
|
|
8
|
+
label: string;
|
|
9
|
+
|
|
10
|
+
constructor(params: ApplicationInfosDTO) {
|
|
11
|
+
this.id = params.id;
|
|
12
|
+
this.fallbackLanguageCode = params.fallbackLanguageCode;
|
|
13
|
+
this.logoId = params.logoId;
|
|
14
|
+
this.logoBlurHash = params.logoBlurHash;
|
|
15
|
+
this.logoHeight = params.logoHeight;
|
|
16
|
+
this.logoWidth = params.logoWidth;
|
|
17
|
+
this.label = params.label;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export interface ApplicationInfosDTO {
|
|
22
|
+
id: string;
|
|
23
|
+
fallbackLanguageCode: string;
|
|
24
|
+
logoId?: string;
|
|
25
|
+
logoBlurHash?: string;
|
|
26
|
+
logoHeight?: string;
|
|
27
|
+
logoWidth?: string;
|
|
28
|
+
label: string;
|
|
29
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { ArticleInfos, ArticleInfosDTO } from "./articleInfos";
|
|
2
|
+
|
|
3
|
+
export class ArticleDetails extends ArticleInfos {
|
|
4
|
+
manufacturerId: string;
|
|
5
|
+
familyId: string;
|
|
6
|
+
familyLabel: string;
|
|
7
|
+
code: string;
|
|
8
|
+
description: string;
|
|
9
|
+
|
|
10
|
+
constructor(params: ArticleDetailsDTO) {
|
|
11
|
+
super(params);
|
|
12
|
+
|
|
13
|
+
this.manufacturerId = params.manufacturerId;
|
|
14
|
+
this.familyId = params.familyId;
|
|
15
|
+
this.familyLabel = params.familyLabel;
|
|
16
|
+
this.code = params.code;
|
|
17
|
+
this.description = params.description;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export interface ArticleDetailsDTO extends ArticleInfosDTO {
|
|
22
|
+
manufacturerId: string;
|
|
23
|
+
familyId: string;
|
|
24
|
+
familyLabel: string;
|
|
25
|
+
code: string;
|
|
26
|
+
description: string;
|
|
27
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
export class ArticleInfos {
|
|
2
|
+
id: string;
|
|
3
|
+
imageId?: string;
|
|
4
|
+
imageBlurHash?: string;
|
|
5
|
+
imageHeight?: number;
|
|
6
|
+
imageWidth?: number;
|
|
7
|
+
label: string;
|
|
8
|
+
|
|
9
|
+
constructor(params: ArticleInfosDTO) {
|
|
10
|
+
this.id = params.id;
|
|
11
|
+
this.label = params.label;
|
|
12
|
+
this.imageId = params.imageId;
|
|
13
|
+
this.imageBlurHash = params.imageBlurHash;
|
|
14
|
+
this.imageHeight = params.imageHeight;
|
|
15
|
+
this.imageWidth = params.imageWidth;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export interface ArticleInfosDTO {
|
|
20
|
+
id: string;
|
|
21
|
+
imageId?: string;
|
|
22
|
+
imageBlurHash?: string;
|
|
23
|
+
imageHeight?: number;
|
|
24
|
+
imageWidth?: number;
|
|
25
|
+
label: string;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export interface ArticleFilters {
|
|
29
|
+
search?: string;
|
|
30
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { AuthTokenInfos, AuthTokenInfosDTO } from "./authTokenInfos";
|
|
2
|
+
|
|
3
|
+
export class AuthTokenDetails extends AuthTokenInfos {
|
|
4
|
+
token: string;
|
|
5
|
+
|
|
6
|
+
constructor(params: AuthTokenDetailsDTO) {
|
|
7
|
+
super(params);
|
|
8
|
+
this.token = params.token;
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
export interface AuthTokenDetailsDTO extends AuthTokenInfosDTO {
|
|
13
|
+
token: string;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export interface CreateAuthTokenDTO {
|
|
17
|
+
userId: string;
|
|
18
|
+
label: string;
|
|
19
|
+
lifetime: number;
|
|
20
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export class AuthTokenInfos {
|
|
2
|
+
id: string;
|
|
3
|
+
userId?: string;
|
|
4
|
+
label: string;
|
|
5
|
+
creationDate: number;
|
|
6
|
+
dateMax: number;
|
|
7
|
+
|
|
8
|
+
constructor(params: AuthTokenInfosDTO) {
|
|
9
|
+
this.id = params.id;
|
|
10
|
+
this.userId = params.userId;
|
|
11
|
+
this.label = params.label;
|
|
12
|
+
this.creationDate = params.creationDate;
|
|
13
|
+
this.dateMax = params.dateMax;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export interface AuthTokenInfosDTO {
|
|
18
|
+
id: string;
|
|
19
|
+
userId?: string;
|
|
20
|
+
label: string;
|
|
21
|
+
creationDate: number;
|
|
22
|
+
dateMax: number;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export interface AuthTokenFilters {
|
|
26
|
+
userId?: string;
|
|
27
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ConnectivityAlertInfos, ConnectivityAlertInfosDTO } from "./connectivityAlertInfos";
|
|
2
|
+
|
|
3
|
+
export class ConnectivityAlertDetails extends ConnectivityAlertInfos {
|
|
4
|
+
constructor(params: ConnectivityAlertDetailsDTO) {
|
|
5
|
+
super(params);
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export interface ConnectivityAlertDetailsDTO extends ConnectivityAlertInfosDTO {
|
|
10
|
+
}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { DeviceConnectivityInfos, DeviceConnectivityInfosDTO } from "../deviceConnectivities/deviceConnectivityInfos";
|
|
2
|
+
import { AlertStatus } from "../enums/alertEnums";
|
|
3
|
+
|
|
4
|
+
export class ConnectivityAlertInfos {
|
|
5
|
+
id: string;
|
|
6
|
+
deviceId: string;
|
|
7
|
+
organisationId: string;
|
|
8
|
+
deviceOrganisationId: string;
|
|
9
|
+
deviceOrganisationLabel: string;
|
|
10
|
+
deviceOrganisationImageId?: string;
|
|
11
|
+
deviceOrganisationImageBlurHash?: string;
|
|
12
|
+
deviceOrganisationImageHeight?: number;
|
|
13
|
+
deviceOrganisationImageWidth?: number;
|
|
14
|
+
deviceOrganisationConnectivity?: DeviceConnectivityInfos;
|
|
15
|
+
triggerProcessedTimestamp: number;
|
|
16
|
+
resolveProcessedTimestamp?: number;
|
|
17
|
+
status: AlertStatus;
|
|
18
|
+
|
|
19
|
+
constructor(params: ConnectivityAlertInfosDTO) {
|
|
20
|
+
this.id = params.id;
|
|
21
|
+
this.deviceId = params.deviceId;
|
|
22
|
+
this.organisationId = params.organisationId;
|
|
23
|
+
this.deviceOrganisationId = params.deviceOrganisationId;
|
|
24
|
+
this.deviceOrganisationLabel = params.deviceOrganisationLabel;
|
|
25
|
+
this.deviceOrganisationImageId = params.deviceOrganisationImageId;
|
|
26
|
+
this.deviceOrganisationImageBlurHash = params.deviceOrganisationImageBlurHash;
|
|
27
|
+
this.deviceOrganisationImageHeight = params.deviceOrganisationImageHeight;
|
|
28
|
+
this.deviceOrganisationImageWidth = params.deviceOrganisationImageWidth;
|
|
29
|
+
this.deviceOrganisationConnectivity = params.deviceOrganisationConnectivity != null ?
|
|
30
|
+
new DeviceConnectivityInfos({ ...params.deviceOrganisationConnectivity, id: params.deviceOrganisationId }) :
|
|
31
|
+
undefined;
|
|
32
|
+
this.triggerProcessedTimestamp = params.triggerProcessedTimestamp;
|
|
33
|
+
this.resolveProcessedTimestamp = params.resolveProcessedTimestamp;
|
|
34
|
+
this.status = params.status;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export interface ConnectivityAlertInfosDTO {
|
|
39
|
+
id: string;
|
|
40
|
+
deviceId: string;
|
|
41
|
+
organisationId: string;
|
|
42
|
+
deviceOrganisationId: string;
|
|
43
|
+
deviceOrganisationLabel: string;
|
|
44
|
+
deviceOrganisationImageId?: string;
|
|
45
|
+
deviceOrganisationImageBlurHash?: string;
|
|
46
|
+
deviceOrganisationImageHeight?: number;
|
|
47
|
+
deviceOrganisationImageWidth?: number;
|
|
48
|
+
deviceOrganisationConnectivity?: DeviceConnectivityInfosDTO;
|
|
49
|
+
triggerProcessedTimestamp: number;
|
|
50
|
+
resolveProcessedTimestamp?: number;
|
|
51
|
+
status: AlertStatus;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
export interface ConnectivityAlertFilters {
|
|
55
|
+
deviceOrganisationId?: string;
|
|
56
|
+
startDate?: string;
|
|
57
|
+
endDate?: string;
|
|
58
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { FilterType } from "../enums/sharedEnums";
|
|
2
|
+
|
|
3
|
+
export class CustomPropertyColor {
|
|
4
|
+
priority: number;
|
|
5
|
+
filterType: FilterType;
|
|
6
|
+
filterValues: string[];
|
|
7
|
+
color: string;
|
|
8
|
+
|
|
9
|
+
constructor(params: CustomPropertyColorDTO) {
|
|
10
|
+
this.priority = params.priority;
|
|
11
|
+
this.filterType = params.filterType;
|
|
12
|
+
this.filterValues = params.filterValues.slice();
|
|
13
|
+
this.color = params.color;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export interface CustomPropertyColorDTO {
|
|
18
|
+
priority: number;
|
|
19
|
+
filterType: FilterType;
|
|
20
|
+
filterValues: string[];
|
|
21
|
+
color: string;
|
|
22
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { CustomPropertyInfos, CustomPropertyInfosDTO } from "./customPropertyInfos";
|
|
2
|
+
|
|
3
|
+
export class CustomPropertyDetails extends CustomPropertyInfos {
|
|
4
|
+
constructor(params: CustomPropertyDetailsDTO) {
|
|
5
|
+
super(params);
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export interface CustomPropertyDetailsDTO extends CustomPropertyInfosDTO {
|
|
10
|
+
description: string;
|
|
11
|
+
}
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { CustomPropertyColor, CustomPropertyColorDTO } from "./customPropertyColor";
|
|
2
|
+
import { PropertyDataType, PropertyEntity } from "../enums/customPropertyEnums";
|
|
3
|
+
|
|
4
|
+
export class CustomPropertyInfos {
|
|
5
|
+
id: string;
|
|
6
|
+
code: string;
|
|
7
|
+
label: string;
|
|
8
|
+
categoryLabel: string;
|
|
9
|
+
index: number;
|
|
10
|
+
entity: PropertyEntity;
|
|
11
|
+
dataType: PropertyDataType;
|
|
12
|
+
addInInfos: boolean;
|
|
13
|
+
readOnlyCore: boolean;
|
|
14
|
+
readOnlyAdmin: boolean;
|
|
15
|
+
defaultValue: string;
|
|
16
|
+
history: boolean;
|
|
17
|
+
historySize: number;
|
|
18
|
+
colorful: boolean;
|
|
19
|
+
colorMap: CustomPropertyColor[];
|
|
20
|
+
useOnlyAllowedValues: boolean;
|
|
21
|
+
allowedValues: { [key: string]: string };
|
|
22
|
+
|
|
23
|
+
constructor(params: CustomPropertyInfosDTO) {
|
|
24
|
+
this.id = params.id;
|
|
25
|
+
this.code = params.code;
|
|
26
|
+
this.label = params.label;
|
|
27
|
+
this.categoryLabel = params.categoryLabel;
|
|
28
|
+
this.index = params.index;
|
|
29
|
+
this.entity = params.entity;
|
|
30
|
+
this.dataType = params.dataType;
|
|
31
|
+
this.addInInfos = params.addInInfos;
|
|
32
|
+
this.readOnlyCore = params.readOnlyCore;
|
|
33
|
+
this.readOnlyAdmin = params.readOnlyAdmin;
|
|
34
|
+
this.defaultValue = params.defaultValue;
|
|
35
|
+
this.history = params.history;
|
|
36
|
+
this.historySize = params.historySize;
|
|
37
|
+
this.colorful = params.colorful;
|
|
38
|
+
this.colorMap = params.colorMap.map(dto => new CustomPropertyColor(dto));
|
|
39
|
+
this.useOnlyAllowedValues = params.useOnlyAllowedValues;
|
|
40
|
+
this.allowedValues = { ...params.allowedValues };
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export interface CustomPropertyInfosDTO {
|
|
45
|
+
id: string;
|
|
46
|
+
code: string;
|
|
47
|
+
label: string;
|
|
48
|
+
categoryLabel: string;
|
|
49
|
+
index: number;
|
|
50
|
+
entity: number;
|
|
51
|
+
dataType: number;
|
|
52
|
+
addInInfos: boolean;
|
|
53
|
+
readOnlyCore: boolean;
|
|
54
|
+
readOnlyAdmin: boolean;
|
|
55
|
+
defaultValue: string;
|
|
56
|
+
history: boolean;
|
|
57
|
+
historySize: number;
|
|
58
|
+
colorful: boolean;
|
|
59
|
+
colorMap: CustomPropertyColorDTO[];
|
|
60
|
+
useOnlyAllowedValues: boolean;
|
|
61
|
+
allowedValues: { [key: string]: string };
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export interface CustomPropertyFilters {
|
|
65
|
+
entities?: PropertyEntity[];
|
|
66
|
+
editableCore?: boolean;
|
|
67
|
+
search?: string;
|
|
68
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { CustomPropertyValueInfos, CustomPropertyValueInfosDTO } from "./customPropertyValueInfos";
|
|
2
|
+
|
|
3
|
+
export class CustomPropertyValueDetails extends CustomPropertyValueInfos {
|
|
4
|
+
constructor(params: CustomPropertyValueDetailsDTO) {
|
|
5
|
+
super(params);
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export interface CustomPropertyValueDetailsDTO extends CustomPropertyValueInfosDTO {
|
|
10
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export class CustomPropertyValueInfos {
|
|
2
|
+
value: string;
|
|
3
|
+
timestamp?: number;
|
|
4
|
+
|
|
5
|
+
constructor(params: CustomPropertyValueInfosDTO) {
|
|
6
|
+
this.value = params.value;
|
|
7
|
+
this.timestamp = params.timestamp;
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export interface CustomPropertyValueInfosDTO {
|
|
12
|
+
value: string;
|
|
13
|
+
timestamp?: number;
|
|
14
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { DataCategoryInfos, DataCategoryInfosDTO } from "./dataCategoryInfos";
|
|
2
|
+
|
|
3
|
+
export class DataCategoryDetails extends DataCategoryInfos {
|
|
4
|
+
constructor(params: DataCategoryDetailsDTO) {
|
|
5
|
+
super(params);
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export interface DataCategoryDetailsDTO extends DataCategoryInfosDTO {
|
|
10
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export class DataCategoryInfos {
|
|
2
|
+
id: string;
|
|
3
|
+
modelId: string;
|
|
4
|
+
code: string;
|
|
5
|
+
label: string;
|
|
6
|
+
correlated: boolean;
|
|
7
|
+
|
|
8
|
+
constructor(params: DataCategoryInfosDTO) {
|
|
9
|
+
this.id = params.id;
|
|
10
|
+
this.modelId = params.modelId;
|
|
11
|
+
this.code = params.code;
|
|
12
|
+
this.label = params.label;
|
|
13
|
+
this.correlated = params.correlated;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export interface DataCategoryInfosDTO {
|
|
18
|
+
id: string;
|
|
19
|
+
modelId: string;
|
|
20
|
+
code: string;
|
|
21
|
+
label: string;
|
|
22
|
+
correlated: boolean;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export interface DataCategoryFilters {
|
|
26
|
+
modelId?: string;
|
|
27
|
+
correlated?: boolean;
|
|
28
|
+
search?: string;
|
|
29
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { DataDefinitionMappingInfos, DataDefinitionMappingInfosDTO } from "./dataDefinitionMappingInfos";
|
|
2
|
+
|
|
3
|
+
export class DataDefinitionMappingDetails extends DataDefinitionMappingInfos {
|
|
4
|
+
constructor(params: DataDefinitionMappingDetailsDTO) {
|
|
5
|
+
super(params);
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export interface DataDefinitionMappingDetailsDTO extends DataDefinitionMappingInfosDTO {
|
|
10
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export class DataDefinitionMappingInfos {
|
|
2
|
+
id: string;
|
|
3
|
+
inputValue: string;
|
|
4
|
+
outputValue: string;
|
|
5
|
+
|
|
6
|
+
constructor(params: DataDefinitionMappingInfosDTO) {
|
|
7
|
+
this.id = params.id;
|
|
8
|
+
this.inputValue = params.inputValue;
|
|
9
|
+
this.outputValue = params.outputValue;
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
export interface DataDefinitionMappingInfosDTO {
|
|
14
|
+
id: string;
|
|
15
|
+
inputValue: string;
|
|
16
|
+
outputValue: string;
|
|
17
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { DataDefinitionInfos, DataDefinitionInfosDTO } from "./dataDefinitionInfos";
|
|
2
|
+
|
|
3
|
+
export class DataDefinitionDetails extends DataDefinitionInfos {
|
|
4
|
+
constructor(params: DataDefinitionDetailsDTO) {
|
|
5
|
+
super(params);
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export interface DataDefinitionDetailsDTO extends DataDefinitionInfosDTO {
|
|
10
|
+
}
|