dt-common-device 7.1.3 → 7.1.5
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/dist/alerts/Alert.model.js +1 -1
- package/dist/alerts/Alert.repository.js +1 -1
- package/dist/alerts/Alert.service.js +4 -4
- package/dist/alerts/AlertBuilder.d.ts +1 -1
- package/dist/alerts/AlertBuilder.js +3 -3
- package/dist/alerts/alert.types.d.ts +0 -1
- package/dist/alerts/alert.types.js +0 -1
- package/dist/entities/device/local/services/Device.service.js +1 -1
- package/dist/issues/Issue.model.js +7 -1
- package/dist/issues/Issue.repository.js +1 -1
- package/dist/issues/Issue.service.d.ts +3 -3
- package/dist/issues/Issue.service.js +16 -12
- package/dist/issues/IssueBuilder.d.ts +9 -5
- package/dist/issues/IssueBuilder.js +19 -9
- package/dist/issues/issue.types.d.ts +12 -3
- package/dist/issues/issue.types.js +9 -3
- package/package.json +1 -1
|
@@ -77,7 +77,7 @@ let AlertRepository = (() => {
|
|
|
77
77
|
try {
|
|
78
78
|
const alert = new Alert_model_1.AlertModel({
|
|
79
79
|
...alertData,
|
|
80
|
-
severity: alertData.severity || alert_types_1.AlertSeverity.
|
|
80
|
+
severity: alertData.severity || alert_types_1.AlertSeverity.LOW,
|
|
81
81
|
isRead: false,
|
|
82
82
|
isActive: true,
|
|
83
83
|
isDeleted: false,
|
|
@@ -200,7 +200,7 @@ let AlertService = (() => {
|
|
|
200
200
|
* Raise alert for device battery level below threshold (READINESS + OPERATIONAL + ENERGY)
|
|
201
201
|
*/
|
|
202
202
|
async raiseDeviceBatteryAlert(device, batteryLevel, threshold, source) {
|
|
203
|
-
return await this.raiseDeviceAlert(device.deviceId, device.propertyId, device.zoneId, "Device Battery Low", `Device ${device.name} (${device.deviceId}) battery level is ${batteryLevel}%, which is below the property threshold of ${threshold}%.`, alert_types_1.AlertCategory.ENERGY, alert_types_1.AlertSeverity.
|
|
203
|
+
return await this.raiseDeviceAlert(device.deviceId, device.propertyId, device.zoneId, "Device Battery Low", `Device ${device.name} (${device.deviceId}) battery level is ${batteryLevel}%, which is below the property threshold of ${threshold}%.`, alert_types_1.AlertCategory.ENERGY, alert_types_1.AlertSeverity.HIGH, source);
|
|
204
204
|
}
|
|
205
205
|
/**
|
|
206
206
|
* Raise alert for device issue (jammed or malfunctioned) (READINESS + OPERATIONAL)
|
|
@@ -538,13 +538,13 @@ let AlertService = (() => {
|
|
|
538
538
|
determineDefaultSeverity(category) {
|
|
539
539
|
// Business logic: Determine default severity based on category
|
|
540
540
|
const categorySeverities = {
|
|
541
|
-
[alert_types_1.AlertCategory.READINESS]: alert_types_1.AlertSeverity.
|
|
541
|
+
[alert_types_1.AlertCategory.READINESS]: alert_types_1.AlertSeverity.LOW,
|
|
542
542
|
[alert_types_1.AlertCategory.OPERATIONS]: alert_types_1.AlertSeverity.HIGH,
|
|
543
543
|
[alert_types_1.AlertCategory.SECURITY]: alert_types_1.AlertSeverity.CRITICAL,
|
|
544
544
|
[alert_types_1.AlertCategory.ENERGY]: alert_types_1.AlertSeverity.LOW,
|
|
545
|
-
[alert_types_1.AlertCategory.OTHER]: alert_types_1.AlertSeverity.
|
|
545
|
+
[alert_types_1.AlertCategory.OTHER]: alert_types_1.AlertSeverity.LOW,
|
|
546
546
|
};
|
|
547
|
-
return categorySeverities[category] || alert_types_1.AlertSeverity.
|
|
547
|
+
return categorySeverities[category] || alert_types_1.AlertSeverity.LOW;
|
|
548
548
|
}
|
|
549
549
|
applyBusinessRules(filters) {
|
|
550
550
|
// Business logic: Apply additional filters based on business rules
|
|
@@ -49,7 +49,7 @@ export declare class AlertBuilder {
|
|
|
49
49
|
*/
|
|
50
50
|
setEntityType(entityType: EntityType): this;
|
|
51
51
|
/**
|
|
52
|
-
* Sets the alert severity (optional, defaults to
|
|
52
|
+
* Sets the alert severity (optional, defaults to LOW)
|
|
53
53
|
*/
|
|
54
54
|
setSeverity(severity?: AlertSeverity): this;
|
|
55
55
|
/**
|
|
@@ -89,7 +89,7 @@ class AlertBuilder {
|
|
|
89
89
|
return this;
|
|
90
90
|
}
|
|
91
91
|
/**
|
|
92
|
-
* Sets the alert severity (optional, defaults to
|
|
92
|
+
* Sets the alert severity (optional, defaults to LOW)
|
|
93
93
|
*/
|
|
94
94
|
setSeverity(severity) {
|
|
95
95
|
if (severity !== undefined) {
|
|
@@ -141,7 +141,7 @@ class AlertBuilder {
|
|
|
141
141
|
this.validate();
|
|
142
142
|
// Set default severity if not provided
|
|
143
143
|
if (!this.data.severity) {
|
|
144
|
-
this.data.severity = alert_types_1.AlertSeverity.
|
|
144
|
+
this.data.severity = alert_types_1.AlertSeverity.LOW;
|
|
145
145
|
}
|
|
146
146
|
return this.data;
|
|
147
147
|
}
|
|
@@ -158,7 +158,7 @@ class AlertBuilder {
|
|
|
158
158
|
static createReadinessAlert() {
|
|
159
159
|
return new AlertBuilder()
|
|
160
160
|
.setCategory(alert_types_1.AlertCategory.READINESS)
|
|
161
|
-
.setSeverity(alert_types_1.AlertSeverity.
|
|
161
|
+
.setSeverity(alert_types_1.AlertSeverity.LOW);
|
|
162
162
|
}
|
|
163
163
|
static createOperationsAlert() {
|
|
164
164
|
return new AlertBuilder()
|
|
@@ -13,7 +13,6 @@ var AlertSeverity;
|
|
|
13
13
|
(function (AlertSeverity) {
|
|
14
14
|
AlertSeverity["INFO"] = "INFO";
|
|
15
15
|
AlertSeverity["LOW"] = "LOW";
|
|
16
|
-
AlertSeverity["MEDIUM"] = "MEDIUM";
|
|
17
16
|
AlertSeverity["HIGH"] = "HIGH";
|
|
18
17
|
AlertSeverity["CRITICAL"] = "CRITICAL";
|
|
19
18
|
})(AlertSeverity || (exports.AlertSeverity = AlertSeverity = {}));
|
|
@@ -402,7 +402,7 @@ let LocalDeviceService = (() => {
|
|
|
402
402
|
// Raise alert for device malfunction (READINESS + OPERATIONAL)
|
|
403
403
|
await this.alertService.raiseDeviceIssueAlert(device, "Device Malfunction Detected", source, reason);
|
|
404
404
|
// Raise issue for device malfunction (READINESS + OPERATIONAL)
|
|
405
|
-
await this.issueService.createDeviceMalfunctionIssue(device,
|
|
405
|
+
await this.issueService.createDeviceMalfunctionIssue(device, source, reason);
|
|
406
406
|
}
|
|
407
407
|
}
|
|
408
408
|
async getMetaData(deviceId) {
|
|
@@ -81,6 +81,12 @@ const IssueSchema = new mongoose_1.Schema({
|
|
|
81
81
|
required: true,
|
|
82
82
|
index: true,
|
|
83
83
|
},
|
|
84
|
+
entitySubType: {
|
|
85
|
+
type: String,
|
|
86
|
+
enum: Object.values(issue_types_1.EntitySubType),
|
|
87
|
+
required: true,
|
|
88
|
+
index: true,
|
|
89
|
+
},
|
|
84
90
|
status: {
|
|
85
91
|
type: String,
|
|
86
92
|
enum: Object.values(issue_types_1.IssueStatus),
|
|
@@ -95,7 +101,7 @@ const IssueSchema = new mongoose_1.Schema({
|
|
|
95
101
|
priority: {
|
|
96
102
|
type: String,
|
|
97
103
|
enum: Object.values(issue_types_1.IssuePriority),
|
|
98
|
-
default: issue_types_1.IssuePriority.
|
|
104
|
+
default: issue_types_1.IssuePriority.LOW,
|
|
99
105
|
},
|
|
100
106
|
assignedTo: {
|
|
101
107
|
type: String,
|
|
@@ -84,7 +84,7 @@ let IssueRepository = (() => {
|
|
|
84
84
|
const issue = new Issue_model_1.IssueModel({
|
|
85
85
|
...issueData,
|
|
86
86
|
status: issue_types_1.IssueStatus.PENDING,
|
|
87
|
-
priority: issueData.priority || issue_types_1.IssuePriority.
|
|
87
|
+
priority: issueData.priority || issue_types_1.IssuePriority.LOW,
|
|
88
88
|
isDeleted: false,
|
|
89
89
|
});
|
|
90
90
|
return await issue.save();
|
|
@@ -55,15 +55,15 @@ export declare class IssueService {
|
|
|
55
55
|
/**
|
|
56
56
|
* Create issue for device malfunction (jammed or not accepting codes) (READINESS + OPERATIONAL)
|
|
57
57
|
*/
|
|
58
|
-
createDeviceMalfunctionIssue(device: IDevice,
|
|
58
|
+
createDeviceMalfunctionIssue(device: IDevice, source: Source, reason?: string): Promise<IIssueDocument>;
|
|
59
59
|
/**
|
|
60
60
|
* Create a maintenance issue using IssueBuilder
|
|
61
61
|
*/
|
|
62
62
|
createMaintenanceIssue(data: CreateIssueData): Promise<IIssueDocument>;
|
|
63
63
|
/**
|
|
64
|
-
* Create
|
|
64
|
+
* Create a high priority issue using IssueBuilder
|
|
65
65
|
*/
|
|
66
|
-
|
|
66
|
+
createHighPriorityIssue(data: CreateIssueData): Promise<IIssueDocument>;
|
|
67
67
|
/**
|
|
68
68
|
* Create a new issue with business logic validation
|
|
69
69
|
* Accepts either a CreateIssueData object or an IssueBuilder instance
|
|
@@ -183,7 +183,7 @@ let IssueService = (() => {
|
|
|
183
183
|
* Create a device-specific issue using IssueBuilder
|
|
184
184
|
*/
|
|
185
185
|
async createDeviceIssue(data) {
|
|
186
|
-
const issueBuilder = IssueBuilder_1.IssueBuilder.createDeviceIssue(data.entityId, data.propertyId, data.type)
|
|
186
|
+
const issueBuilder = IssueBuilder_1.IssueBuilder.createDeviceIssue(data.entityId, data.propertyId, data.type, data.entitySubType)
|
|
187
187
|
.setTitle(data.title)
|
|
188
188
|
.setDescription(data.description)
|
|
189
189
|
.setCreatedBy(data.createdBy);
|
|
@@ -253,6 +253,7 @@ let IssueService = (() => {
|
|
|
253
253
|
return await this.createDeviceIssue({
|
|
254
254
|
entityId: device.deviceId,
|
|
255
255
|
entityType: issue_types_1.EntityType.DEVICE,
|
|
256
|
+
entitySubType: device.deviceType.type,
|
|
256
257
|
propertyId: device.propertyId,
|
|
257
258
|
zoneId: device.zoneId,
|
|
258
259
|
title: "Device Offline - Requires Attention",
|
|
@@ -268,6 +269,7 @@ let IssueService = (() => {
|
|
|
268
269
|
return await this.createDeviceIssue({
|
|
269
270
|
entityId: device.deviceId,
|
|
270
271
|
entityType: issue_types_1.EntityType.DEVICE,
|
|
272
|
+
entitySubType: device.deviceType.type,
|
|
271
273
|
propertyId: device.propertyId,
|
|
272
274
|
zoneId: device.zoneId,
|
|
273
275
|
title: "Door Left Open - Requires Attention",
|
|
@@ -285,27 +287,29 @@ let IssueService = (() => {
|
|
|
285
287
|
return await this.createDeviceIssue({
|
|
286
288
|
entityId: device.deviceId,
|
|
287
289
|
entityType: issue_types_1.EntityType.DEVICE,
|
|
290
|
+
entitySubType: device.deviceType.type,
|
|
288
291
|
propertyId: device.propertyId,
|
|
289
292
|
zoneId: device.zoneId,
|
|
290
293
|
title: "Device Battery Low - Requires Attention",
|
|
291
294
|
description: `Device ${device.name} (${device.deviceId}) battery level is ${batteryLevel}%, which is below the property threshold of ${threshold}%. Please replace or charge the device battery.`,
|
|
292
295
|
createdBy: source,
|
|
293
296
|
category: issue_types_1.IssuesCategory.ENERGY,
|
|
294
|
-
priority: issue_types_1.IssuePriority.
|
|
297
|
+
priority: issue_types_1.IssuePriority.CRITICAL,
|
|
295
298
|
type: issue_types_1.IssueType.BATTERY_LOW,
|
|
296
299
|
});
|
|
297
300
|
}
|
|
298
301
|
/**
|
|
299
302
|
* Create issue for device malfunction (jammed or not accepting codes) (READINESS + OPERATIONAL)
|
|
300
303
|
*/
|
|
301
|
-
async createDeviceMalfunctionIssue(device,
|
|
304
|
+
async createDeviceMalfunctionIssue(device, source, reason) {
|
|
302
305
|
return await this.createDeviceIssue({
|
|
303
306
|
entityId: device.deviceId,
|
|
304
307
|
entityType: issue_types_1.EntityType.DEVICE,
|
|
308
|
+
entitySubType: device.deviceType.type,
|
|
305
309
|
propertyId: device.propertyId,
|
|
306
310
|
zoneId: device.zoneId,
|
|
307
|
-
title: `Device Malfunction -
|
|
308
|
-
description: `Device ${device.name} (${device.deviceId}) has a malfunction
|
|
311
|
+
title: `Device Malfunction - Requires Attention`,
|
|
312
|
+
description: `Device ${device.name} (${device.deviceId}) has a malfunction. ${reason ? `Reason: ${reason}` : ""} This requires immediate attention to resolve the device malfunction.`,
|
|
309
313
|
createdBy: source,
|
|
310
314
|
category: issue_types_1.IssuesCategory.OPERATIONS,
|
|
311
315
|
priority: issue_types_1.IssuePriority.HIGH,
|
|
@@ -329,10 +333,10 @@ let IssueService = (() => {
|
|
|
329
333
|
return await this.createIssue(issueBuilder);
|
|
330
334
|
}
|
|
331
335
|
/**
|
|
332
|
-
* Create
|
|
336
|
+
* Create a high priority issue using IssueBuilder
|
|
333
337
|
*/
|
|
334
|
-
async
|
|
335
|
-
const issueBuilder = IssueBuilder_1.IssueBuilder.
|
|
338
|
+
async createHighPriorityIssue(data) {
|
|
339
|
+
const issueBuilder = IssueBuilder_1.IssueBuilder.createHighPriorityIssue(data.propertyId, data.type, data.entityId, data.entityType)
|
|
336
340
|
.setTitle(data.title)
|
|
337
341
|
.setDescription(data.description)
|
|
338
342
|
.setCreatedBy(data.createdBy);
|
|
@@ -732,13 +736,13 @@ let IssueService = (() => {
|
|
|
732
736
|
determineDefaultPriority(category) {
|
|
733
737
|
// Business logic: Determine default priority based on category
|
|
734
738
|
const categoryPriorities = {
|
|
735
|
-
[issue_types_1.IssuesCategory.READINESS]: issue_types_1.IssuePriority.
|
|
739
|
+
[issue_types_1.IssuesCategory.READINESS]: issue_types_1.IssuePriority.LOW,
|
|
736
740
|
[issue_types_1.IssuesCategory.OPERATIONS]: issue_types_1.IssuePriority.HIGH,
|
|
737
741
|
[issue_types_1.IssuesCategory.SECURITY]: issue_types_1.IssuePriority.CRITICAL,
|
|
738
|
-
[issue_types_1.IssuesCategory.ENERGY]: issue_types_1.IssuePriority.
|
|
739
|
-
[issue_types_1.IssuesCategory.OTHER]: issue_types_1.IssuePriority.
|
|
742
|
+
[issue_types_1.IssuesCategory.ENERGY]: issue_types_1.IssuePriority.HIGH,
|
|
743
|
+
[issue_types_1.IssuesCategory.OTHER]: issue_types_1.IssuePriority.LOW,
|
|
740
744
|
};
|
|
741
|
-
return categoryPriorities[category] || issue_types_1.IssuePriority.
|
|
745
|
+
return categoryPriorities[category] || issue_types_1.IssuePriority.LOW;
|
|
742
746
|
}
|
|
743
747
|
applyBusinessRules(filters) {
|
|
744
748
|
// Business logic: Apply additional filters based on business rules
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CreateIssueData, IssuesCategory, IssuePriority, EntityType, IssueType } from "./issue.types";
|
|
1
|
+
import { CreateIssueData, IssuesCategory, IssuePriority, EntityType, IssueType, EntitySubType } from "./issue.types";
|
|
2
2
|
/**
|
|
3
3
|
* IssueBuilder - A builder pattern implementation for constructing CreateIssueData objects
|
|
4
4
|
*
|
|
@@ -55,7 +55,11 @@ export declare class IssueBuilder {
|
|
|
55
55
|
*/
|
|
56
56
|
setEntityType(entityType: EntityType): this;
|
|
57
57
|
/**
|
|
58
|
-
* Sets the
|
|
58
|
+
* Sets the entity sub type
|
|
59
|
+
*/
|
|
60
|
+
setEntitySubType(entitySubType: EntitySubType): this;
|
|
61
|
+
/**
|
|
62
|
+
* Sets the issue priority (optional, defaults to LOW)
|
|
59
63
|
*/
|
|
60
64
|
setPriority(priority?: IssuePriority): this;
|
|
61
65
|
/**
|
|
@@ -93,7 +97,7 @@ export declare class IssueBuilder {
|
|
|
93
97
|
/**
|
|
94
98
|
* Creates a device-specific issue builder
|
|
95
99
|
*/
|
|
96
|
-
static createDeviceIssue(deviceId: string, propertyId: string, type: IssueType): IssueBuilder;
|
|
100
|
+
static createDeviceIssue(deviceId: string, propertyId: string, type: IssueType, entitySubType: EntitySubType): IssueBuilder;
|
|
97
101
|
/**
|
|
98
102
|
* Creates a hub-specific issue builder
|
|
99
103
|
*/
|
|
@@ -111,8 +115,8 @@ export declare class IssueBuilder {
|
|
|
111
115
|
*/
|
|
112
116
|
static createMaintenanceIssue(propertyId: string, type: IssueType, entityId?: string, entityType?: EntityType): IssueBuilder;
|
|
113
117
|
/**
|
|
114
|
-
* Creates
|
|
118
|
+
* Creates a high priority issue builder
|
|
115
119
|
*/
|
|
116
|
-
static
|
|
120
|
+
static createHighPriorityIssue(propertyId: string, type: IssueType, entityId?: string, entityType?: EntityType): IssueBuilder;
|
|
117
121
|
static createCloudAccountAuthorizationIssue(propertyId: string, entityId: string, entityType: EntityType, type: IssueType): IssueBuilder;
|
|
118
122
|
}
|
|
@@ -100,7 +100,14 @@ class IssueBuilder {
|
|
|
100
100
|
return this;
|
|
101
101
|
}
|
|
102
102
|
/**
|
|
103
|
-
* Sets the
|
|
103
|
+
* Sets the entity sub type
|
|
104
|
+
*/
|
|
105
|
+
setEntitySubType(entitySubType) {
|
|
106
|
+
this.data.entitySubType = entitySubType;
|
|
107
|
+
return this;
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* Sets the issue priority (optional, defaults to LOW)
|
|
104
111
|
*/
|
|
105
112
|
setPriority(priority) {
|
|
106
113
|
if (priority !== undefined) {
|
|
@@ -148,6 +155,7 @@ class IssueBuilder {
|
|
|
148
155
|
"description",
|
|
149
156
|
"entityId",
|
|
150
157
|
"entityType",
|
|
158
|
+
"entitySubType",
|
|
151
159
|
"createdBy",
|
|
152
160
|
];
|
|
153
161
|
const missingFields = requiredFields.filter((field) => !this.data[field]);
|
|
@@ -163,7 +171,7 @@ class IssueBuilder {
|
|
|
163
171
|
this.validate();
|
|
164
172
|
// Set default priority if not provided
|
|
165
173
|
if (!this.data.priority) {
|
|
166
|
-
this.data.priority = issue_types_1.IssuePriority.
|
|
174
|
+
this.data.priority = issue_types_1.IssuePriority.LOW;
|
|
167
175
|
}
|
|
168
176
|
return this.data;
|
|
169
177
|
}
|
|
@@ -180,7 +188,7 @@ class IssueBuilder {
|
|
|
180
188
|
static createReadinessIssue() {
|
|
181
189
|
return new IssueBuilder()
|
|
182
190
|
.setCategory(issue_types_1.IssuesCategory.READINESS)
|
|
183
|
-
.setPriority(issue_types_1.IssuePriority.
|
|
191
|
+
.setPriority(issue_types_1.IssuePriority.LOW);
|
|
184
192
|
}
|
|
185
193
|
static createOperationsIssue() {
|
|
186
194
|
return new IssueBuilder()
|
|
@@ -200,12 +208,13 @@ class IssueBuilder {
|
|
|
200
208
|
/**
|
|
201
209
|
* Creates a device-specific issue builder
|
|
202
210
|
*/
|
|
203
|
-
static createDeviceIssue(deviceId, propertyId, type) {
|
|
211
|
+
static createDeviceIssue(deviceId, propertyId, type, entitySubType) {
|
|
204
212
|
const builder = new IssueBuilder()
|
|
205
213
|
.setEntityType(issue_types_1.EntityType.DEVICE)
|
|
206
214
|
.setEntityId(deviceId)
|
|
207
215
|
.setPropertyId(propertyId)
|
|
208
|
-
.setType(type)
|
|
216
|
+
.setType(type)
|
|
217
|
+
.setEntitySubType(entitySubType);
|
|
209
218
|
return builder;
|
|
210
219
|
}
|
|
211
220
|
/**
|
|
@@ -248,7 +257,8 @@ class IssueBuilder {
|
|
|
248
257
|
const builder = new IssueBuilder()
|
|
249
258
|
.setCategory(issue_types_1.IssuesCategory.READINESS)
|
|
250
259
|
.setPropertyId(propertyId)
|
|
251
|
-
.setType(type)
|
|
260
|
+
.setType(type)
|
|
261
|
+
.setPriority(issue_types_1.IssuePriority.LOW);
|
|
252
262
|
if (entityId)
|
|
253
263
|
builder.setEntityId(entityId);
|
|
254
264
|
if (entityType)
|
|
@@ -256,14 +266,14 @@ class IssueBuilder {
|
|
|
256
266
|
return builder;
|
|
257
267
|
}
|
|
258
268
|
/**
|
|
259
|
-
* Creates
|
|
269
|
+
* Creates a high priority issue builder
|
|
260
270
|
*/
|
|
261
|
-
static
|
|
271
|
+
static createHighPriorityIssue(propertyId, type, entityId, entityType) {
|
|
262
272
|
const builder = new IssueBuilder()
|
|
263
273
|
.setCategory(issue_types_1.IssuesCategory.OPERATIONS)
|
|
264
274
|
.setPropertyId(propertyId)
|
|
265
275
|
.setType(type)
|
|
266
|
-
.setPriority(issue_types_1.IssuePriority.
|
|
276
|
+
.setPriority(issue_types_1.IssuePriority.HIGH);
|
|
267
277
|
if (entityId)
|
|
268
278
|
builder.setEntityId(entityId);
|
|
269
279
|
if (entityType)
|
|
@@ -18,6 +18,13 @@ export declare enum EntityType {
|
|
|
18
18
|
CLOUD_DEVICE_ACCOUNT = "CLOUD_DEVICE_ACCOUNT",
|
|
19
19
|
CLOUD_PMS_ACCOUNT = "CLOUD_PMS_ACCOUNT"
|
|
20
20
|
}
|
|
21
|
+
export declare enum EntitySubType {
|
|
22
|
+
LOCK = "LOCK",
|
|
23
|
+
HUB = "HUB",
|
|
24
|
+
TV = "TV",
|
|
25
|
+
THERMOSTAT = "THERMOSTAT",
|
|
26
|
+
ON_PREM_SERVER = "ON_PREM_SERVER"
|
|
27
|
+
}
|
|
21
28
|
export declare enum IssueStatus {
|
|
22
29
|
PENDING = "PENDING",
|
|
23
30
|
IN_PROGRESS = "IN_PROGRESS",
|
|
@@ -29,10 +36,8 @@ export declare enum IssueStatus {
|
|
|
29
36
|
}
|
|
30
37
|
export declare enum IssuePriority {
|
|
31
38
|
LOW = "LOW",
|
|
32
|
-
MEDIUM = "MEDIUM",
|
|
33
39
|
HIGH = "HIGH",
|
|
34
|
-
CRITICAL = "CRITICAL"
|
|
35
|
-
URGENT = "URGENT"
|
|
40
|
+
CRITICAL = "CRITICAL"
|
|
36
41
|
}
|
|
37
42
|
export interface IssueComment {
|
|
38
43
|
id: string;
|
|
@@ -68,6 +73,7 @@ export interface IssueDocument {
|
|
|
68
73
|
description: string;
|
|
69
74
|
entityId?: string;
|
|
70
75
|
entityType: EntityType;
|
|
76
|
+
entitySubType: EntitySubType;
|
|
71
77
|
status: IssueStatus;
|
|
72
78
|
priority: IssuePriority;
|
|
73
79
|
type: IssueType;
|
|
@@ -89,6 +95,7 @@ export interface CreateIssueData {
|
|
|
89
95
|
description: string;
|
|
90
96
|
entityId: string;
|
|
91
97
|
entityType: EntityType;
|
|
98
|
+
entitySubType: EntitySubType;
|
|
92
99
|
type: IssueType;
|
|
93
100
|
priority?: IssuePriority;
|
|
94
101
|
assignedTo?: string;
|
|
@@ -101,6 +108,7 @@ export interface UpdateIssueData {
|
|
|
101
108
|
description?: string;
|
|
102
109
|
entityId?: string;
|
|
103
110
|
entityType?: EntityType;
|
|
111
|
+
entitySubType?: EntitySubType;
|
|
104
112
|
status?: IssueStatus;
|
|
105
113
|
type?: IssueType;
|
|
106
114
|
priority?: IssuePriority;
|
|
@@ -123,6 +131,7 @@ export interface IIssueQuery {
|
|
|
123
131
|
type?: IssueType;
|
|
124
132
|
category?: IssuesCategory;
|
|
125
133
|
entityType?: EntityType;
|
|
134
|
+
entitySubType?: EntitySubType;
|
|
126
135
|
entityId?: string;
|
|
127
136
|
includeDeleted?: boolean;
|
|
128
137
|
limit?: number;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.IssueType = exports.IssuePriority = exports.IssueStatus = exports.EntityType = exports.IssuesCategory = void 0;
|
|
3
|
+
exports.IssueType = exports.IssuePriority = exports.IssueStatus = exports.EntitySubType = exports.EntityType = exports.IssuesCategory = void 0;
|
|
4
4
|
var IssuesCategory;
|
|
5
5
|
(function (IssuesCategory) {
|
|
6
6
|
IssuesCategory["READINESS"] = "READINESS";
|
|
@@ -23,6 +23,14 @@ var EntityType;
|
|
|
23
23
|
EntityType["CLOUD_DEVICE_ACCOUNT"] = "CLOUD_DEVICE_ACCOUNT";
|
|
24
24
|
EntityType["CLOUD_PMS_ACCOUNT"] = "CLOUD_PMS_ACCOUNT";
|
|
25
25
|
})(EntityType || (exports.EntityType = EntityType = {}));
|
|
26
|
+
var EntitySubType;
|
|
27
|
+
(function (EntitySubType) {
|
|
28
|
+
EntitySubType["LOCK"] = "LOCK";
|
|
29
|
+
EntitySubType["HUB"] = "HUB";
|
|
30
|
+
EntitySubType["TV"] = "TV";
|
|
31
|
+
EntitySubType["THERMOSTAT"] = "THERMOSTAT";
|
|
32
|
+
EntitySubType["ON_PREM_SERVER"] = "ON_PREM_SERVER";
|
|
33
|
+
})(EntitySubType || (exports.EntitySubType = EntitySubType = {}));
|
|
26
34
|
var IssueStatus;
|
|
27
35
|
(function (IssueStatus) {
|
|
28
36
|
IssueStatus["PENDING"] = "PENDING";
|
|
@@ -36,10 +44,8 @@ var IssueStatus;
|
|
|
36
44
|
var IssuePriority;
|
|
37
45
|
(function (IssuePriority) {
|
|
38
46
|
IssuePriority["LOW"] = "LOW";
|
|
39
|
-
IssuePriority["MEDIUM"] = "MEDIUM";
|
|
40
47
|
IssuePriority["HIGH"] = "HIGH";
|
|
41
48
|
IssuePriority["CRITICAL"] = "CRITICAL";
|
|
42
|
-
IssuePriority["URGENT"] = "URGENT";
|
|
43
49
|
})(IssuePriority || (exports.IssuePriority = IssuePriority = {}));
|
|
44
50
|
var IssueType;
|
|
45
51
|
(function (IssueType) {
|