dt-common-device 13.2.0 → 13.2.1

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.
@@ -432,16 +432,16 @@ let AlertService = (() => {
432
432
  const preferences = await typedi_1.default.get(property_1.LocalPropertyService).getPropertyPreferences(processedAlertData.propertyId, [
433
433
  "alertsAndIssues",
434
434
  ]);
435
- const enabledAlertsAndIssues = preferences?.settings?.alertsAndIssues?.enabled;
435
+ const disabledAlertsAndIssues = preferences?.settings?.alertsAndIssues?.disabled;
436
436
  // Check if the property has the alertsAndIssues preferences set, if no, skip the check and create the alert
437
- const isAlertEnabled = !enabledAlertsAndIssues ||
438
- (processedAlertData.type &&
439
- enabledAlertsAndIssues?.includes(processedAlertData.type));
440
- if (!isAlertEnabled) {
437
+ const isAlertDisabled = disabledAlertsAndIssues &&
438
+ processedAlertData.type &&
439
+ disabledAlertsAndIssues?.includes(processedAlertData.type);
440
+ if (isAlertDisabled) {
441
441
  (0, audit_1.pushAudit)({
442
442
  auditType: constants_1.DT_EVENT_TYPES.ALERT.CREATE.SKIPPED,
443
443
  auditData: {
444
- reason: "Alert type is not enabled",
444
+ reason: "Alert type is disabled",
445
445
  resource: audit_1.Resource.ALERT,
446
446
  source: constants_1.Source.SYSTEM,
447
447
  ...processedAlertData,
@@ -421,16 +421,16 @@ let IssueService = (() => {
421
421
  const preferences = await typedi_1.default.get(property_1.LocalPropertyService).getPropertyPreferences(processedIssueData.propertyId, [
422
422
  "alertsAndIssues",
423
423
  ]);
424
- const enabledAlertsAndIssues = preferences?.settings?.alertsAndIssues?.enabled;
424
+ const disabledAlertsAndIssues = preferences?.settings?.alertsAndIssues?.disabled;
425
425
  // Check if the property has the alertsAndIssues preferences set, if no, skip the check and create the issue
426
- const isIssueEnabled = !enabledAlertsAndIssues ||
427
- (processedIssueData.type &&
428
- enabledAlertsAndIssues?.includes(processedIssueData.type));
429
- if (!isIssueEnabled) {
426
+ const isIssueDisabled = disabledAlertsAndIssues &&
427
+ processedIssueData.type &&
428
+ disabledAlertsAndIssues?.includes(processedIssueData.type);
429
+ if (isIssueDisabled) {
430
430
  (0, audit_1.pushAudit)({
431
431
  auditType: constants_1.DT_EVENT_TYPES.ISSUE.CREATE.SKIPPED,
432
432
  auditData: {
433
- reason: "Issue type is not enabled",
433
+ reason: "Issue type is disabled",
434
434
  resource: audit_1.Resource.ISSUE,
435
435
  source: Service_1.Source.SYSTEM,
436
436
  ...processedIssueData,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dt-common-device",
3
- "version": "13.2.0",
3
+ "version": "13.2.1",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "files": [