dt-common-device 7.6.5 → 7.6.6

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.
@@ -329,6 +329,7 @@ let AlertService = (() => {
329
329
  entityId: processedAlertData.entityId,
330
330
  entityType: processedAlertData.entityType,
331
331
  entitySubType: processedAlertData.entitySubType,
332
+ isActive: true,
332
333
  });
333
334
  if (existingAlert.length > 0) {
334
335
  await (0, audit_1.pushAudit)({
@@ -191,7 +191,7 @@ function getLogger() {
191
191
  * Throws an error if not set.
192
192
  */
193
193
  function getAdminPostgresDbUri() {
194
- const fullUri = process.env[db_keys.admin];
194
+ const fullUri = process.env[db_keys?.admin];
195
195
  if (!fullUri) {
196
196
  getConfig().LOGGER.error("ADMIN_DB_URI must be set in environment variables or .env file");
197
197
  throw new Error("dt-common-device: ADMIN_DB_URI must be set in environment variables or .env file");
@@ -199,7 +199,7 @@ function getAdminPostgresDbUri() {
199
199
  return fullUri;
200
200
  }
201
201
  function getAccessPostgresDbUri() {
202
- const fullUri = process.env[db_keys.access];
202
+ const fullUri = process.env[db_keys?.access];
203
203
  if (!fullUri) {
204
204
  getConfig().LOGGER.error("ACCESS_DB_URI must be set in environment variables or .env file");
205
205
  throw new Error("dt-common-device: ACCESS_DB_URI must be set in environment variables or .env file");
@@ -207,7 +207,7 @@ function getAccessPostgresDbUri() {
207
207
  return fullUri;
208
208
  }
209
209
  function getPmsPostgresDbUri() {
210
- const fullUri = process.env[db_keys.pms];
210
+ const fullUri = process.env[db_keys?.pms];
211
211
  if (!fullUri) {
212
212
  getConfig().LOGGER.error("PMS_DB_URI must be set in environment variables or .env file");
213
213
  throw new Error("dt-common-device: PMS_DB_URI must be set in environment variables or .env file");
@@ -36,10 +36,7 @@ export declare const DT_EVENT_TYPES: {
36
36
  CHANGED: string;
37
37
  };
38
38
  STATUS: {
39
- ATTEMPT: {
40
- SUCCESS: string;
41
- FAILED: string;
42
- };
39
+ UPDATED: string;
43
40
  ONLINE: string;
44
41
  OFFLINE: string;
45
42
  UNKNOWN: string;
@@ -39,10 +39,7 @@ exports.DT_EVENT_TYPES = {
39
39
  CHANGED: "device.state.changed",
40
40
  },
41
41
  STATUS: {
42
- ATTEMPT: {
43
- SUCCESS: "device.status.attempt.success",
44
- FAILED: "device.status.attempt.failed",
45
- },
42
+ UPDATED: "device.status.updated",
46
43
  ONLINE: "device.status.online",
47
44
  OFFLINE: "device.status.offline",
48
45
  UNKNOWN: "device.status.unknown",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dt-common-device",
3
- "version": "7.6.5",
3
+ "version": "7.6.6",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "files": [