@openinc/parse-server-opendash 3.17.1 → 3.17.3

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.
@@ -40,6 +40,7 @@ async function assignUsersAndRoles(ticket, assignedTo, fetchOptions, assigningUs
40
40
  batchStamp: batchTime,
41
41
  }));
42
42
  }
43
+ const userNotifiedIds = [];
43
44
  for (const assignedTo of newUsers) {
44
45
  assignments.push(new types_1.Maintenance_Ticket_Assignment({
45
46
  ticket,
@@ -48,6 +49,8 @@ async function assignUsersAndRoles(ticket, assignedTo, fetchOptions, assigningUs
48
49
  user: ticket.get("user"),
49
50
  batchStamp: batchTime,
50
51
  }));
52
+ if (assignedTo.id === assigningUser?.id)
53
+ continue;
51
54
  await new types_1.Notification({
52
55
  data: {
53
56
  ticketId: ticket.id,
@@ -62,6 +65,7 @@ async function assignUsersAndRoles(ticket, assignedTo, fetchOptions, assigningUs
62
65
  user: assignedTo,
63
66
  description: "maintenance:ticket.assignuser.notification.description",
64
67
  }).save(null, fetchOptions);
68
+ userNotifiedIds.push(assignedTo.id);
65
69
  }
66
70
  for (const assignedTo of newRoles) {
67
71
  assignments.push(new types_1.Maintenance_Ticket_Assignment({
@@ -76,6 +80,9 @@ async function assignUsersAndRoles(ticket, assignedTo, fetchOptions, assigningUs
76
80
  .query()
77
81
  .find(fetchOptions);
78
82
  for (const roleUser of roleUsers) {
83
+ if (userNotifiedIds.includes(roleUser.id) ||
84
+ roleUser.id === assigningUser?.id)
85
+ continue;
79
86
  await new types_1.Notification({
80
87
  data: {
81
88
  ticketId: ticket.id,
@@ -1,13 +1,8 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
2
  Object.defineProperty(exports, "__esModule", { value: true });
6
3
  exports.init = init;
7
- const bree_1 = __importDefault(require("bree"));
8
4
  const __1 = require("..");
9
5
  const types_1 = require("../types");
10
- bree_1.default.extend(require("@breejs/ts-worker"));
11
6
  async function init() {
12
7
  (0, __1.beforeSaveHook)(types_1.Maintenance_Schedule_Template, async (request) => {
13
8
  const { object, original, user } = request;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openinc/parse-server-opendash",
3
- "version": "3.17.1",
3
+ "version": "3.17.3",
4
4
  "description": "Parse Server Cloud Code for open.INC Stack.",
5
5
  "packageManager": "pnpm@10.15.0",
6
6
  "keywords": [
@@ -59,8 +59,6 @@
59
59
  "rebuild:docker": "cd ./docker-dev && powershell -NoProfile -ExecutionPolicy Bypass -File rebuild_and_restart.ps1"
60
60
  },
61
61
  "dependencies": {
62
- "@breejs/later": "^4.2.0",
63
- "@breejs/ts-worker": "^2.0.0",
64
62
  "@openinc/parse-server-schema": "^1.7.12",
65
63
  "@opentelemetry/api-logs": "^0.202.0",
66
64
  "@opentelemetry/auto-instrumentations-node": "^0.60.1",
@@ -69,19 +67,18 @@
69
67
  "@opentelemetry/resources": "^2.0.1",
70
68
  "@opentelemetry/sdk-logs": "^0.202.0",
71
69
  "@opentelemetry/sdk-node": "^0.202.0",
72
- "@opentelemetry/semantic-conventions": "^1.34.0",
70
+ "@opentelemetry/semantic-conventions": "^1.37.0",
73
71
  "@opentelemetry/winston-transport": "^0.13.0",
74
- "bree": "^9.2.4",
75
- "cron": "^4.3.1",
76
- "dayjs": "^1.11.13",
72
+ "cron": "^4.3.3",
73
+ "dayjs": "^1.11.18",
77
74
  "fast-equals": "^5.2.2",
78
75
  "jsonwebtoken": "^9.0.2",
79
76
  "jwks-rsa": "^3.2.0",
80
- "nodemailer": "^7.0.5",
77
+ "nodemailer": "^7.0.6",
81
78
  "nunjucks": "^3.2.4",
82
- "parse-server": "^8.2.2",
79
+ "parse-server": "^8.2.4",
83
80
  "pdf-img-convert": "2.0.0",
84
- "semantic-release": "^24.2.6",
81
+ "semantic-release": "^24.2.7",
85
82
  "table": "^6.9.0",
86
83
  "web-push": "^3.6.7",
87
84
  "winston": "^3.17.0"
@@ -91,19 +88,19 @@
91
88
  "@semantic-release/commit-analyzer": "^13.0.1",
92
89
  "@semantic-release/exec": "^7.1.0",
93
90
  "@semantic-release/git": "^10.0.1",
94
- "@semantic-release/github": "^11.0.3",
91
+ "@semantic-release/github": "^11.0.5",
95
92
  "@semantic-release/npm": "^12.0.2",
96
93
  "@semantic-release/release-notes-generator": "^14.0.3",
97
94
  "@types/jsonwebtoken": "^9.0.10",
98
- "@types/node": "^24.0.12",
99
- "@types/nodemailer": "^6.4.17",
95
+ "@types/node": "^24.3.0",
96
+ "@types/nodemailer": "^6.4.19",
100
97
  "@types/nunjucks": "^3.2.6",
101
98
  "@types/parse": "^3.0.9",
102
99
  "@types/safe-timers": "^1.1.2",
103
100
  "@types/web-push": "^3.6.4",
104
- "semantic-release-export-data": "^1.1.0",
105
- "typedoc": "^0.28.7",
106
- "typedoc-plugin-markdown": "^4.7.0",
107
- "typescript": "^5.8.3"
101
+ "semantic-release-export-data": "^1.1.1",
102
+ "typedoc": "^0.28.12",
103
+ "typedoc-plugin-markdown": "^4.8.1",
104
+ "typescript": "^5.9.2"
108
105
  }
109
106
  }