@backstage/plugin-notifications-backend 0.4.1-next.0 → 0.4.1-next.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,22 @@
1
1
  # @backstage/plugin-notifications-backend
2
2
 
3
+ ## 0.4.1-next.1
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+ - @backstage/plugin-auth-node@0.5.3-next.1
9
+ - @backstage/plugin-catalog-node@1.13.1-next.1
10
+ - @backstage/catalog-client@1.7.1-next.0
11
+ - @backstage/backend-plugin-api@1.0.1-next.1
12
+ - @backstage/catalog-model@1.7.0
13
+ - @backstage/config@1.2.0
14
+ - @backstage/errors@1.2.4
15
+ - @backstage/plugin-events-node@0.4.1-next.1
16
+ - @backstage/plugin-notifications-common@0.0.5
17
+ - @backstage/plugin-notifications-node@0.2.7-next.1
18
+ - @backstage/plugin-signals-node@0.1.12-next.1
19
+
3
20
  ## 0.4.1-next.0
4
21
 
5
22
  ### Patch Changes
@@ -0,0 +1,298 @@
1
+ 'use strict';
2
+
3
+ var backendPluginApi = require('@backstage/backend-plugin-api');
4
+ var pluginNotificationsCommon = require('@backstage/plugin-notifications-common');
5
+
6
+ const migrationsDir = backendPluginApi.resolvePackagePath(
7
+ "@backstage/plugin-notifications-backend",
8
+ "migrations"
9
+ );
10
+ const NOTIFICATION_COLUMNS = [
11
+ "id",
12
+ "title",
13
+ "description",
14
+ "severity",
15
+ "link",
16
+ "origin",
17
+ "scope",
18
+ "topic",
19
+ "icon",
20
+ "created",
21
+ "updated",
22
+ "user",
23
+ "read",
24
+ "saved"
25
+ ];
26
+ const normalizeSeverity = (input) => {
27
+ let lower = (input ?? "normal").toLowerCase();
28
+ if (pluginNotificationsCommon.notificationSeverities.indexOf(lower) < 0) {
29
+ lower = "normal";
30
+ }
31
+ return lower;
32
+ };
33
+ class DatabaseNotificationsStore {
34
+ constructor(db) {
35
+ this.db = db;
36
+ this.isSQLite = this.db.client.config.client.includes("sqlite3");
37
+ }
38
+ isSQLite = false;
39
+ static async create({
40
+ database,
41
+ skipMigrations
42
+ }) {
43
+ const client = await database.getClient();
44
+ if (!database.migrations?.skip && !skipMigrations) {
45
+ await client.migrate.latest({
46
+ directory: migrationsDir
47
+ });
48
+ }
49
+ return new DatabaseNotificationsStore(client);
50
+ }
51
+ mapToInteger = (val) => {
52
+ return typeof val === "string" ? Number.parseInt(val, 10) : val ?? 0;
53
+ };
54
+ mapToNotifications = (rows) => {
55
+ return rows.map((row) => ({
56
+ id: row.id,
57
+ user: row.user,
58
+ created: new Date(row.created),
59
+ saved: row.saved,
60
+ read: row.read,
61
+ updated: row.updated,
62
+ origin: row.origin,
63
+ payload: {
64
+ title: row.title,
65
+ description: row.description,
66
+ link: row.link,
67
+ topic: row.topic,
68
+ severity: row.severity,
69
+ scope: row.scope,
70
+ icon: row.icon
71
+ }
72
+ }));
73
+ };
74
+ mapNotificationToDbRow = (notification) => {
75
+ return {
76
+ id: notification.id,
77
+ user: notification.user,
78
+ origin: notification.origin,
79
+ created: notification.created,
80
+ topic: notification.payload?.topic,
81
+ link: notification.payload?.link,
82
+ title: notification.payload?.title,
83
+ description: notification.payload?.description,
84
+ severity: normalizeSeverity(notification.payload?.severity),
85
+ scope: notification.payload?.scope,
86
+ icon: notification.payload.icon,
87
+ saved: notification.saved,
88
+ read: notification.read
89
+ };
90
+ };
91
+ mapBroadcastToDbRow = (notification) => {
92
+ return {
93
+ id: notification.id,
94
+ origin: notification.origin,
95
+ created: notification.created,
96
+ topic: notification.payload?.topic,
97
+ link: notification.payload?.link,
98
+ title: notification.payload?.title,
99
+ description: notification.payload?.description,
100
+ severity: normalizeSeverity(notification.payload?.severity),
101
+ icon: notification.payload.icon,
102
+ scope: notification.payload?.scope
103
+ };
104
+ };
105
+ getBroadcastUnion = (user) => {
106
+ return this.db("broadcast").leftJoin("broadcast_user_status", function clause() {
107
+ const join = this.on("id", "=", "broadcast_user_status.broadcast_id");
108
+ if (user !== null && user !== void 0) {
109
+ join.andOnVal("user", "=", user);
110
+ }
111
+ }).select(NOTIFICATION_COLUMNS);
112
+ };
113
+ getNotificationsBaseQuery = (options) => {
114
+ const { user, orderField } = options;
115
+ const subQuery = this.db("notification").select(NOTIFICATION_COLUMNS).unionAll([this.getBroadcastUnion(user)]).as("notifications");
116
+ const query = this.db.from(subQuery).where((q) => {
117
+ q.where("user", user).orWhereNull("user");
118
+ });
119
+ if (orderField && orderField.length > 0) {
120
+ orderField.forEach((orderBy) => {
121
+ query.orderBy(orderBy.field, orderBy.order);
122
+ });
123
+ } else if (!orderField) {
124
+ query.orderBy("created", "desc");
125
+ }
126
+ if (options.createdAfter) {
127
+ if (this.isSQLite) {
128
+ query.where("created", ">=", options.createdAfter.valueOf());
129
+ } else {
130
+ query.where("created", ">=", options.createdAfter.toISOString());
131
+ }
132
+ }
133
+ if (options.limit) {
134
+ query.limit(options.limit);
135
+ }
136
+ if (options.offset) {
137
+ query.offset(options.offset);
138
+ }
139
+ if (options.search) {
140
+ query.whereRaw(
141
+ `(LOWER(title) LIKE LOWER(?) OR LOWER(description) LIKE LOWER(?))`,
142
+ [`%${options.search}%`, `%${options.search}%`]
143
+ );
144
+ }
145
+ if (options.ids) {
146
+ query.whereIn("id", options.ids);
147
+ }
148
+ if (options.read) {
149
+ query.whereNotNull("read");
150
+ } else if (options.read === false) {
151
+ query.whereNull("read");
152
+ }
153
+ if (options.topic) {
154
+ query.where("topic", "=", options.topic);
155
+ }
156
+ if (options.saved) {
157
+ query.whereNotNull("saved");
158
+ } else if (options.saved === false) {
159
+ query.whereNull("saved");
160
+ }
161
+ if (options.minimumSeverity !== void 0) {
162
+ const idx = pluginNotificationsCommon.notificationSeverities.indexOf(options.minimumSeverity);
163
+ const equalOrHigher = pluginNotificationsCommon.notificationSeverities.slice(0, idx + 1);
164
+ query.whereIn("severity", equalOrHigher);
165
+ }
166
+ return query;
167
+ };
168
+ async getNotifications(options) {
169
+ const notificationQuery = this.getNotificationsBaseQuery(options);
170
+ const notifications = await notificationQuery.select(NOTIFICATION_COLUMNS);
171
+ return this.mapToNotifications(notifications);
172
+ }
173
+ async getNotificationsCount(options) {
174
+ const countOptions = { ...options };
175
+ countOptions.limit = void 0;
176
+ countOptions.offset = void 0;
177
+ countOptions.orderField = [];
178
+ const notificationQuery = this.getNotificationsBaseQuery(countOptions);
179
+ const response = await notificationQuery.count("id as CNT");
180
+ return Number(response[0].CNT);
181
+ }
182
+ async saveNotification(notification) {
183
+ await this.db.insert(this.mapNotificationToDbRow(notification)).into("notification");
184
+ }
185
+ async saveBroadcast(notification) {
186
+ await this.db.insert(this.mapBroadcastToDbRow(notification)).into("broadcast");
187
+ if (notification.saved || notification.read) {
188
+ await this.db.insert({
189
+ user: notification.user,
190
+ broadcast_id: notification.id,
191
+ saved: notification.saved,
192
+ read: notification.read
193
+ }).into("broadcast_user_status");
194
+ }
195
+ }
196
+ async getStatus(options) {
197
+ const notificationQuery = this.getNotificationsBaseQuery({
198
+ ...options,
199
+ orderField: []
200
+ });
201
+ const readSubQuery = notificationQuery.clone().count("id").whereNotNull("read").as("READ");
202
+ const unreadSubQuery = notificationQuery.clone().count("id").whereNull("read").as("UNREAD");
203
+ const query = await notificationQuery.select(readSubQuery, unreadSubQuery).first();
204
+ return {
205
+ unread: this.mapToInteger(query?.UNREAD),
206
+ read: this.mapToInteger(query?.READ)
207
+ };
208
+ }
209
+ async getExistingScopeNotification(options) {
210
+ const query = this.db("notification").where("user", options.user).where("scope", options.scope).where("origin", options.origin).limit(1);
211
+ const rows = await query;
212
+ if (!rows || rows.length === 0) {
213
+ return null;
214
+ }
215
+ return rows[0];
216
+ }
217
+ async getExistingScopeBroadcast(options) {
218
+ const query = this.db("broadcast").where("scope", options.scope).where("origin", options.origin).limit(1);
219
+ const rows = await query;
220
+ if (!rows || rows.length === 0) {
221
+ return null;
222
+ }
223
+ return rows[0];
224
+ }
225
+ async restoreExistingNotification({
226
+ id,
227
+ notification
228
+ }) {
229
+ const updateColumns = {
230
+ title: notification.payload.title,
231
+ description: notification.payload.description,
232
+ link: notification.payload.link,
233
+ topic: notification.payload.topic,
234
+ updated: /* @__PURE__ */ new Date(),
235
+ severity: normalizeSeverity(notification.payload?.severity),
236
+ read: null
237
+ };
238
+ const notificationQuery = this.db("notification").where("id", id).where("user", notification.user);
239
+ const broadcastQuery = this.db("broadcast").where("id", id);
240
+ await Promise.all([
241
+ notificationQuery.update(updateColumns),
242
+ broadcastQuery.update({ ...updateColumns, read: void 0 })
243
+ ]);
244
+ return await this.getNotification({ id, user: notification.user });
245
+ }
246
+ async getNotification(options) {
247
+ const rows = await this.db.select("*").from(
248
+ this.db("notification").select(NOTIFICATION_COLUMNS).unionAll([this.getBroadcastUnion(options.user)]).as("notifications")
249
+ ).where("id", options.id).limit(1);
250
+ if (!rows || rows.length === 0) {
251
+ return null;
252
+ }
253
+ return this.mapToNotifications(rows)[0];
254
+ }
255
+ markReadSaved = async (ids, user, read, saved) => {
256
+ await this.db("notification").whereIn("id", ids).where("user", user).update({ read, saved });
257
+ const broadcasts = this.mapToNotifications(
258
+ await this.db("broadcast").whereIn("id", ids).select()
259
+ );
260
+ if (broadcasts.length > 0)
261
+ if (!this.isSQLite) {
262
+ await this.db("broadcast_user_status").insert(
263
+ broadcasts.map((b) => ({
264
+ broadcast_id: b.id,
265
+ user,
266
+ read,
267
+ saved
268
+ }))
269
+ ).onConflict(["broadcast_id", "user"]).merge(["read", "saved"]);
270
+ } else {
271
+ for (const b of broadcasts) {
272
+ const baseQuery = this.db("broadcast_user_status").where("broadcast_id", b.id).where("user", user);
273
+ const exists = await baseQuery.clone().limit(1).select().first();
274
+ if (exists) {
275
+ await baseQuery.clone().update({ read, saved });
276
+ } else {
277
+ await baseQuery.clone().insert({ broadcast_id: b.id, user, read, saved });
278
+ }
279
+ }
280
+ }
281
+ };
282
+ async markRead(options) {
283
+ await this.markReadSaved(options.ids, options.user, /* @__PURE__ */ new Date(), void 0);
284
+ }
285
+ async markUnread(options) {
286
+ await this.markReadSaved(options.ids, options.user, null, void 0);
287
+ }
288
+ async markSaved(options) {
289
+ await this.markReadSaved(options.ids, options.user, void 0, /* @__PURE__ */ new Date());
290
+ }
291
+ async markUnsaved(options) {
292
+ await this.markReadSaved(options.ids, options.user, void 0, null);
293
+ }
294
+ }
295
+
296
+ exports.DatabaseNotificationsStore = DatabaseNotificationsStore;
297
+ exports.normalizeSeverity = normalizeSeverity;
298
+ //# sourceMappingURL=DatabaseNotificationsStore.cjs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DatabaseNotificationsStore.cjs.js","sources":["../../src/database/DatabaseNotificationsStore.ts"],"sourcesContent":["/*\n * Copyright 2023 The Backstage Authors\n *\n * Licensed under the Apache License, Version 2.0 (the \"License\");\n * you may not use this file except in compliance with the License.\n * You may obtain a copy of the License at\n *\n * http://www.apache.org/licenses/LICENSE-2.0\n *\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS,\n * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * See the License for the specific language governing permissions and\n * limitations under the License.\n */\nimport { PluginDatabaseManager } from '@backstage/backend-common';\nimport { resolvePackagePath } from '@backstage/backend-plugin-api';\nimport {\n NotificationGetOptions,\n NotificationModifyOptions,\n NotificationsStore,\n} from './NotificationsStore';\nimport {\n Notification,\n NotificationSeverity,\n notificationSeverities,\n} from '@backstage/plugin-notifications-common';\nimport { Knex } from 'knex';\n\nconst migrationsDir = resolvePackagePath(\n '@backstage/plugin-notifications-backend',\n 'migrations',\n);\n\nconst NOTIFICATION_COLUMNS = [\n 'id',\n 'title',\n 'description',\n 'severity',\n 'link',\n 'origin',\n 'scope',\n 'topic',\n 'icon',\n 'created',\n 'updated',\n 'user',\n 'read',\n 'saved',\n];\n\nexport const normalizeSeverity = (input?: string): NotificationSeverity => {\n let lower = (input ?? 'normal').toLowerCase() as NotificationSeverity;\n if (notificationSeverities.indexOf(lower) < 0) {\n lower = 'normal';\n }\n return lower;\n};\n\n/** @internal */\nexport class DatabaseNotificationsStore implements NotificationsStore {\n private readonly isSQLite = false;\n\n private constructor(private readonly db: Knex) {\n this.isSQLite = this.db.client.config.client.includes('sqlite3');\n }\n\n static async create({\n database,\n skipMigrations,\n }: {\n database: PluginDatabaseManager;\n skipMigrations?: boolean;\n }): Promise<DatabaseNotificationsStore> {\n const client = await database.getClient();\n\n if (!database.migrations?.skip && !skipMigrations) {\n await client.migrate.latest({\n directory: migrationsDir,\n });\n }\n\n return new DatabaseNotificationsStore(client);\n }\n\n private mapToInteger = (val: string | number | undefined): number => {\n return typeof val === 'string' ? Number.parseInt(val, 10) : val ?? 0;\n };\n\n private mapToNotifications = (rows: any[]): Notification[] => {\n return rows.map(row => ({\n id: row.id,\n user: row.user,\n created: new Date(row.created),\n saved: row.saved,\n read: row.read,\n updated: row.updated,\n origin: row.origin,\n payload: {\n title: row.title,\n description: row.description,\n link: row.link,\n topic: row.topic,\n severity: row.severity,\n scope: row.scope,\n icon: row.icon,\n },\n }));\n };\n\n private mapNotificationToDbRow = (notification: Notification) => {\n return {\n id: notification.id,\n user: notification.user,\n origin: notification.origin,\n created: notification.created,\n topic: notification.payload?.topic,\n link: notification.payload?.link,\n title: notification.payload?.title,\n description: notification.payload?.description,\n severity: normalizeSeverity(notification.payload?.severity),\n scope: notification.payload?.scope,\n icon: notification.payload.icon,\n saved: notification.saved,\n read: notification.read,\n };\n };\n\n private mapBroadcastToDbRow = (notification: Notification) => {\n return {\n id: notification.id,\n origin: notification.origin,\n created: notification.created,\n topic: notification.payload?.topic,\n link: notification.payload?.link,\n title: notification.payload?.title,\n description: notification.payload?.description,\n severity: normalizeSeverity(notification.payload?.severity),\n icon: notification.payload.icon,\n scope: notification.payload?.scope,\n };\n };\n\n private getBroadcastUnion = (user?: string | null) => {\n return this.db('broadcast')\n .leftJoin('broadcast_user_status', function clause() {\n const join = this.on('id', '=', 'broadcast_user_status.broadcast_id');\n if (user !== null && user !== undefined) {\n join.andOnVal('user', '=', user);\n }\n })\n .select(NOTIFICATION_COLUMNS);\n };\n\n private getNotificationsBaseQuery = (\n options: NotificationGetOptions | NotificationModifyOptions,\n ) => {\n const { user, orderField } = options;\n\n const subQuery = this.db('notification')\n .select(NOTIFICATION_COLUMNS)\n .unionAll([this.getBroadcastUnion(user)])\n .as('notifications');\n\n const query = this.db.from(subQuery).where(q => {\n q.where('user', user).orWhereNull('user');\n });\n\n if (orderField && orderField.length > 0) {\n orderField.forEach(orderBy => {\n query.orderBy(orderBy.field, orderBy.order);\n });\n } else if (!orderField) {\n query.orderBy('created', 'desc');\n }\n\n if (options.createdAfter) {\n if (this.isSQLite) {\n query.where('created', '>=', options.createdAfter.valueOf());\n } else {\n query.where('created', '>=', options.createdAfter.toISOString());\n }\n }\n\n if (options.limit) {\n query.limit(options.limit);\n }\n\n if (options.offset) {\n query.offset(options.offset);\n }\n\n if (options.search) {\n query.whereRaw(\n `(LOWER(title) LIKE LOWER(?) OR LOWER(description) LIKE LOWER(?))`,\n [`%${options.search}%`, `%${options.search}%`],\n );\n }\n\n if (options.ids) {\n query.whereIn('id', options.ids);\n }\n\n if (options.read) {\n query.whereNotNull('read');\n } else if (options.read === false) {\n query.whereNull('read');\n } // or match both if undefined\n\n if (options.topic) {\n query.where('topic', '=', options.topic);\n }\n\n if (options.saved) {\n query.whereNotNull('saved');\n } else if (options.saved === false) {\n query.whereNull('saved');\n } // or match both if undefined\n\n if (options.minimumSeverity !== undefined) {\n const idx = notificationSeverities.indexOf(options.minimumSeverity);\n const equalOrHigher = notificationSeverities.slice(0, idx + 1);\n query.whereIn('severity', equalOrHigher);\n }\n\n return query;\n };\n\n async getNotifications(options: NotificationGetOptions) {\n const notificationQuery = this.getNotificationsBaseQuery(options);\n const notifications = await notificationQuery.select(NOTIFICATION_COLUMNS);\n return this.mapToNotifications(notifications);\n }\n\n async getNotificationsCount(options: NotificationGetOptions) {\n const countOptions: NotificationGetOptions = { ...options };\n countOptions.limit = undefined;\n countOptions.offset = undefined;\n countOptions.orderField = [];\n const notificationQuery = this.getNotificationsBaseQuery(countOptions);\n const response = await notificationQuery.count('id as CNT');\n return Number(response[0].CNT);\n }\n\n async saveNotification(notification: Notification) {\n await this.db\n .insert(this.mapNotificationToDbRow(notification))\n .into('notification');\n }\n\n async saveBroadcast(notification: Notification) {\n await this.db\n .insert(this.mapBroadcastToDbRow(notification))\n .into('broadcast');\n if (notification.saved || notification.read) {\n await this.db\n .insert({\n user: notification.user,\n broadcast_id: notification.id,\n saved: notification.saved,\n read: notification.read,\n })\n .into('broadcast_user_status');\n }\n }\n\n async getStatus(options: NotificationGetOptions) {\n const notificationQuery = this.getNotificationsBaseQuery({\n ...options,\n orderField: [],\n });\n const readSubQuery = notificationQuery\n .clone()\n .count('id')\n .whereNotNull('read')\n .as('READ');\n const unreadSubQuery = notificationQuery\n .clone()\n .count('id')\n .whereNull('read')\n .as('UNREAD');\n\n const query = await notificationQuery\n .select(readSubQuery, unreadSubQuery)\n .first();\n\n return {\n unread: this.mapToInteger((query as any)?.UNREAD),\n read: this.mapToInteger((query as any)?.READ),\n };\n }\n\n async getExistingScopeNotification(options: {\n user: string;\n scope: string;\n origin: string;\n }) {\n const query = this.db('notification')\n .where('user', options.user)\n .where('scope', options.scope)\n .where('origin', options.origin)\n .limit(1);\n\n const rows = await query;\n if (!rows || rows.length === 0) {\n return null;\n }\n return rows[0] as Notification;\n }\n\n async getExistingScopeBroadcast(options: { scope: string; origin: string }) {\n const query = this.db('broadcast')\n .where('scope', options.scope)\n .where('origin', options.origin)\n .limit(1);\n\n const rows = await query;\n if (!rows || rows.length === 0) {\n return null;\n }\n return rows[0] as Notification;\n }\n\n async restoreExistingNotification({\n id,\n notification,\n }: {\n id: string;\n notification: Notification;\n }) {\n const updateColumns = {\n title: notification.payload.title,\n description: notification.payload.description,\n link: notification.payload.link,\n topic: notification.payload.topic,\n updated: new Date(),\n severity: normalizeSeverity(notification.payload?.severity),\n read: null,\n };\n\n const notificationQuery = this.db('notification')\n .where('id', id)\n .where('user', notification.user);\n const broadcastQuery = this.db('broadcast').where('id', id);\n\n await Promise.all([\n notificationQuery.update(updateColumns),\n broadcastQuery.update({ ...updateColumns, read: undefined }),\n ]);\n\n return await this.getNotification({ id, user: notification.user });\n }\n\n async getNotification(options: {\n id: string;\n user?: string | null;\n }): Promise<Notification | null> {\n const rows = await this.db\n .select('*')\n .from(\n this.db('notification')\n .select(NOTIFICATION_COLUMNS)\n .unionAll([this.getBroadcastUnion(options.user)])\n .as('notifications'),\n )\n .where('id', options.id)\n .limit(1);\n if (!rows || rows.length === 0) {\n return null;\n }\n return this.mapToNotifications(rows)[0];\n }\n\n private markReadSaved = async (\n ids: string[],\n user: string,\n read?: Date | null,\n saved?: Date | null,\n ) => {\n await this.db('notification')\n .whereIn('id', ids)\n .where('user', user)\n .update({ read, saved });\n\n const broadcasts = this.mapToNotifications(\n await this.db('broadcast').whereIn('id', ids).select(),\n );\n\n if (broadcasts.length > 0)\n if (!this.isSQLite) {\n await this.db('broadcast_user_status')\n .insert(\n broadcasts.map(b => ({\n broadcast_id: b.id,\n user,\n read,\n saved,\n })),\n )\n .onConflict(['broadcast_id', 'user'])\n .merge(['read', 'saved']);\n } else {\n // SQLite does not support upsert so fall back to this (mostly for tests and local dev)\n for (const b of broadcasts) {\n const baseQuery = this.db('broadcast_user_status')\n .where('broadcast_id', b.id)\n .where('user', user);\n const exists = await baseQuery.clone().limit(1).select().first();\n if (exists) {\n await baseQuery.clone().update({ read, saved });\n } else {\n await baseQuery\n .clone()\n .insert({ broadcast_id: b.id, user, read, saved });\n }\n }\n }\n };\n\n async markRead(options: NotificationModifyOptions): Promise<void> {\n await this.markReadSaved(options.ids, options.user, new Date(), undefined);\n }\n\n async markUnread(options: NotificationModifyOptions): Promise<void> {\n await this.markReadSaved(options.ids, options.user, null, undefined);\n }\n\n async markSaved(options: NotificationModifyOptions): Promise<void> {\n await this.markReadSaved(options.ids, options.user, undefined, new Date());\n }\n\n async markUnsaved(options: NotificationModifyOptions): Promise<void> {\n await this.markReadSaved(options.ids, options.user, undefined, null);\n }\n}\n"],"names":["resolvePackagePath","notificationSeverities"],"mappings":";;;;;AA6BA,MAAM,aAAgB,GAAAA,mCAAA;AAAA,EACpB,yCAAA;AAAA,EACA,YAAA;AACF,CAAA,CAAA;AAEA,MAAM,oBAAuB,GAAA;AAAA,EAC3B,IAAA;AAAA,EACA,OAAA;AAAA,EACA,aAAA;AAAA,EACA,UAAA;AAAA,EACA,MAAA;AAAA,EACA,QAAA;AAAA,EACA,OAAA;AAAA,EACA,OAAA;AAAA,EACA,MAAA;AAAA,EACA,SAAA;AAAA,EACA,SAAA;AAAA,EACA,MAAA;AAAA,EACA,MAAA;AAAA,EACA,OAAA;AACF,CAAA,CAAA;AAEa,MAAA,iBAAA,GAAoB,CAAC,KAAyC,KAAA;AACzE,EAAI,IAAA,KAAA,GAAA,CAAS,KAAS,IAAA,QAAA,EAAU,WAAY,EAAA,CAAA;AAC5C,EAAA,IAAIC,gDAAuB,CAAA,OAAA,CAAQ,KAAK,CAAA,GAAI,CAAG,EAAA;AAC7C,IAAQ,KAAA,GAAA,QAAA,CAAA;AAAA,GACV;AACA,EAAO,OAAA,KAAA,CAAA;AACT,EAAA;AAGO,MAAM,0BAAyD,CAAA;AAAA,EAG5D,YAA6B,EAAU,EAAA;AAAV,IAAA,IAAA,CAAA,EAAA,GAAA,EAAA,CAAA;AACnC,IAAA,IAAA,CAAK,WAAW,IAAK,CAAA,EAAA,CAAG,OAAO,MAAO,CAAA,MAAA,CAAO,SAAS,SAAS,CAAA,CAAA;AAAA,GACjE;AAAA,EAJiB,QAAW,GAAA,KAAA,CAAA;AAAA,EAM5B,aAAa,MAAO,CAAA;AAAA,IAClB,QAAA;AAAA,IACA,cAAA;AAAA,GAIsC,EAAA;AACtC,IAAM,MAAA,MAAA,GAAS,MAAM,QAAA,CAAS,SAAU,EAAA,CAAA;AAExC,IAAA,IAAI,CAAC,QAAA,CAAS,U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