dt-common-device 7.8.11 → 7.8.13

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.
@@ -133,8 +133,14 @@ let AuditUtils = (() => {
133
133
  }
134
134
  async populateAuditFields(audit) {
135
135
  const { propertyId, propertyName, userId, userName, guestId, guestName, deviceId, deviceName, zoneId, zoneName, accessGroupId, accessGroupName, scheduleId, } = audit;
136
- if (propertyId && !propertyName)
137
- audit.propertyName = await this.getPropertyName(propertyId);
136
+ if (propertyId && !propertyName) {
137
+ if (propertyId === "triggered_externally") {
138
+ audit.propertyName = "Triggered Externally";
139
+ }
140
+ else {
141
+ audit.propertyName = await this.getPropertyName(propertyId);
142
+ }
143
+ }
138
144
  if (!propertyId && deviceId) {
139
145
  audit.propertyId = await this.getFieldFromDevice(deviceId, "propertyId");
140
146
  audit.propertyName = await this.getPropertyName(audit.propertyId);
@@ -11,6 +11,6 @@ async function pushAudit(data) {
11
11
  const audit = await typedi_1.default.get(AuditUtils_1.AuditUtils).buildAuditProperties(data.auditData);
12
12
  await (0, dt_audit_library_1.publishAudit)({
13
13
  eventType: data.auditType,
14
- properties: { ...audit, "dt-timestamp": new Date().getTime() },
14
+ properties: { ...audit, timestamp: new Date().toISOString() },
15
15
  });
16
16
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dt-common-device",
3
- "version": "7.8.11",
3
+ "version": "7.8.13",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "files": [