dt-common-device 13.4.9 → 13.4.11
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.
|
@@ -26,7 +26,8 @@ export declare enum AlertType {
|
|
|
26
26
|
DEVICE_ONLINE = "DEVICE_ONLINE",
|
|
27
27
|
ZONE_NOT_MAPPED_TO_ACCESS_GROUP = "ZONE_NOT_MAPPED_TO_ACCESS_GROUP",
|
|
28
28
|
INCORRECT_CODE_USED = "INCORRECT_CODE_USED",
|
|
29
|
-
RESERVATION_INACTIVE_ACCESSGROUP = "RESERVATION_INACTIVE_ACCESSGROUP"
|
|
29
|
+
RESERVATION_INACTIVE_ACCESSGROUP = "RESERVATION_INACTIVE_ACCESSGROUP",
|
|
30
|
+
ACCESS_GROUP_CREATED = "ACCESS_GROUP_CREATED"
|
|
30
31
|
}
|
|
31
32
|
export declare const AlertDescriptions: {
|
|
32
33
|
ACCOUNT_NEW_DEVICE: string;
|
|
@@ -44,6 +45,7 @@ export declare const AlertDescriptions: {
|
|
|
44
45
|
ZONE_NOT_MAPPED_TO_ACCESS_GROUP: string;
|
|
45
46
|
INCORRECT_CODE_USED: string;
|
|
46
47
|
RESERVATION_INACTIVE_ACCESSGROUP: string;
|
|
48
|
+
ACCESS_GROUP_CREATED: string;
|
|
47
49
|
};
|
|
48
50
|
export interface AlertDocument {
|
|
49
51
|
_id: string;
|
|
@@ -32,6 +32,7 @@ var AlertType;
|
|
|
32
32
|
AlertType["ZONE_NOT_MAPPED_TO_ACCESS_GROUP"] = "ZONE_NOT_MAPPED_TO_ACCESS_GROUP";
|
|
33
33
|
AlertType["INCORRECT_CODE_USED"] = "INCORRECT_CODE_USED";
|
|
34
34
|
AlertType["RESERVATION_INACTIVE_ACCESSGROUP"] = "RESERVATION_INACTIVE_ACCESSGROUP";
|
|
35
|
+
AlertType["ACCESS_GROUP_CREATED"] = "ACCESS_GROUP_CREATED";
|
|
35
36
|
})(AlertType || (exports.AlertType = AlertType = {}));
|
|
36
37
|
exports.AlertDescriptions = {
|
|
37
38
|
[AlertType.ACCOUNT_NEW_DEVICE]: "The alert is raised when system detects a new device in the device cloud account.",
|
|
@@ -49,6 +50,7 @@ exports.AlertDescriptions = {
|
|
|
49
50
|
[AlertType.ZONE_NOT_MAPPED_TO_ACCESS_GROUP]: "The alert is raised when a zone is not mapped to an access group.",
|
|
50
51
|
[AlertType.INCORRECT_CODE_USED]: "The alert is raised when user uses the incorrect code on the device.",
|
|
51
52
|
[AlertType.RESERVATION_INACTIVE_ACCESSGROUP]: "The alert is raised when a reservation is received for an inactive access group.",
|
|
53
|
+
[AlertType.ACCESS_GROUP_CREATED]: "The alert is raised when an access group is created for the pms system.",
|
|
52
54
|
};
|
|
53
55
|
// Re-export EntityType from issue.types.ts to avoid duplication
|
|
54
56
|
var issue_types_1 = require("../issues/issue.types");
|
|
@@ -53,10 +53,11 @@ let NotificationRepository = (() => {
|
|
|
53
53
|
}
|
|
54
54
|
const normalizedPayload = { ...payload };
|
|
55
55
|
const response = await (0, http_utils_1.getNotificationServiceAxiosInstance)().post(`/connections/query`, normalizedPayload);
|
|
56
|
+
console.log("Connections api response:", response.data);
|
|
56
57
|
if (!response.data?.success || !response.data?.data?.length) {
|
|
57
58
|
return null;
|
|
58
59
|
}
|
|
59
|
-
return response.data.data;
|
|
60
|
+
return response.data.data[0];
|
|
60
61
|
}
|
|
61
62
|
async getNotificationTemplate(payload) {
|
|
62
63
|
if (!payload.propertyId ||
|
|
@@ -66,7 +67,6 @@ let NotificationRepository = (() => {
|
|
|
66
67
|
throw new Error("Property ID, Organization ID, Event Name, and Channel are required in payload");
|
|
67
68
|
}
|
|
68
69
|
const response = await (0, http_utils_1.getNotificationServiceAxiosInstance)().post(`/notification-templates/resolve`, payload);
|
|
69
|
-
console.log("NotificationTemplate response:", response.data);
|
|
70
70
|
return response.data;
|
|
71
71
|
}
|
|
72
72
|
};
|