@marinoscar/platform-api 0.1.0-next.25 → 0.1.0-next.26

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.
Files changed (63) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/dist/identity/auth/decorators/current-user.decorator.d.ts +30 -5
  3. package/dist/identity/auth/decorators/current-user.decorator.d.ts.map +1 -1
  4. package/dist/identity/auth/decorators/current-user.decorator.js +31 -6
  5. package/dist/identity/auth/decorators/current-user.decorator.js.map +1 -1
  6. package/dist/notifications/dto/notification.dto.d.ts +24 -2
  7. package/dist/notifications/dto/notification.dto.d.ts.map +1 -1
  8. package/dist/notifications/dto/notification.dto.js +19 -1
  9. package/dist/notifications/dto/notification.dto.js.map +1 -1
  10. package/dist/notifications/index.d.ts +3 -2
  11. package/dist/notifications/index.d.ts.map +1 -1
  12. package/dist/notifications/index.js +9 -2
  13. package/dist/notifications/index.js.map +1 -1
  14. package/dist/notifications/notification-dismissal.d.ts +49 -0
  15. package/dist/notifications/notification-dismissal.d.ts.map +1 -0
  16. package/dist/notifications/notification-dismissal.js +109 -0
  17. package/dist/notifications/notification-dismissal.js.map +1 -0
  18. package/dist/notifications/notification-store.service.d.ts +12 -0
  19. package/dist/notifications/notification-store.service.d.ts.map +1 -1
  20. package/dist/notifications/notification-store.service.js +32 -6
  21. package/dist/notifications/notification-store.service.js.map +1 -1
  22. package/dist/notifications/notification-stream.service.d.ts +42 -1
  23. package/dist/notifications/notification-stream.service.d.ts.map +1 -1
  24. package/dist/notifications/notification-stream.service.js +97 -4
  25. package/dist/notifications/notification-stream.service.js.map +1 -1
  26. package/dist/notifications/notifications.controller.d.ts +2 -1
  27. package/dist/notifications/notifications.controller.d.ts.map +1 -1
  28. package/dist/notifications/notifications.controller.js +44 -3
  29. package/dist/notifications/notifications.controller.js.map +1 -1
  30. package/dist/notifications/notifications.system-settings.d.ts +13 -0
  31. package/dist/notifications/notifications.system-settings.d.ts.map +1 -1
  32. package/dist/notifications/notifications.system-settings.js +10 -0
  33. package/dist/notifications/notifications.system-settings.js.map +1 -1
  34. package/dist/notifications/notifications.user-settings.d.ts +8 -0
  35. package/dist/notifications/notifications.user-settings.d.ts.map +1 -1
  36. package/dist/notifications/notifications.user-settings.js +11 -0
  37. package/dist/notifications/notifications.user-settings.js.map +1 -1
  38. package/dist/settings/data/settings-db.d.ts +28 -0
  39. package/dist/settings/data/settings-db.d.ts.map +1 -1
  40. package/dist/settings/index.d.ts +2 -1
  41. package/dist/settings/index.d.ts.map +1 -1
  42. package/dist/settings/index.js.map +1 -1
  43. package/dist/settings/registry/system-settings-namespace.d.ts +9 -0
  44. package/dist/settings/registry/system-settings-namespace.d.ts.map +1 -1
  45. package/dist/settings/registry/system-settings-namespace.js +2 -0
  46. package/dist/settings/registry/system-settings-namespace.js.map +1 -1
  47. package/dist/settings/registry/user-settings-namespace.d.ts +9 -0
  48. package/dist/settings/registry/user-settings-namespace.d.ts.map +1 -1
  49. package/dist/settings/registry/user-settings-namespace.js +3 -0
  50. package/dist/settings/registry/user-settings-namespace.js.map +1 -1
  51. package/dist/settings/system-settings/system-settings.service.d.ts +7 -0
  52. package/dist/settings/system-settings/system-settings.service.d.ts.map +1 -1
  53. package/dist/settings/system-settings/system-settings.service.js +22 -4
  54. package/dist/settings/system-settings/system-settings.service.js.map +1 -1
  55. package/dist/settings/user-settings/user-settings.service.d.ts +9 -0
  56. package/dist/settings/user-settings/user-settings.service.d.ts.map +1 -1
  57. package/dist/settings/user-settings/user-settings.service.js +24 -4
  58. package/dist/settings/user-settings/user-settings.service.js.map +1 -1
  59. package/dist/settings/write-hooks.d.ts +53 -0
  60. package/dist/settings/write-hooks.d.ts.map +1 -0
  61. package/dist/settings/write-hooks.js +55 -0
  62. package/dist/settings/write-hooks.js.map +1 -0
  63. package/package.json +3 -3
package/CHANGELOG.md CHANGED
@@ -1,5 +1,24 @@
1
1
  # @marinoscar/platform-api
2
2
 
3
+ ## 0.1.0-next.26
4
+
5
+ ### Minor Changes
6
+
7
+ - e61179b: Notifications: dismiss-on-disable, dismiss-all and the `sync` stream frame (#1090). Settings: namespace `onWrite` hooks (#1105).
8
+
9
+ - Settings: a system or user namespace declaration may carry `onWrite(tx, { userId, scope, before, after })` (`SettingsWriteHook`, `SettingsWriteContext`, `SettingsTx`). `SystemSettingsService` and `UserSettingsService` run it inside the write's transaction, after the row and before commit, for each namespace whose value changed, in registration order; a throw rolls the write back. A write that triggers no hook stays a single write. `SettingsPrisma` gains `$transaction`.
10
+ - Notifications: disabling an event dismisses its live inbox rows in the settings write's transaction, per user (the `browser` channel preference, the `notifications` user namespace) and deployment-wide (`notifications.disabledEvents`, non-mandatory events only). Re-enabling restores nothing. New exports `dismissEventsForUser`, `dismissEventsGlobally`, `inboxDisabledEventKeys`, `dismissibleEventKeys`.
11
+ - Notifications: `POST /api/notifications/dismiss-all` (optional `scopeId`), `GET /api/notifications?status=all|unread|read|dismissed`, and a `sync` SSE frame (`NotificationStreamService.publishSync`, bus message `{ userId, sync, reason }`) published after read, read-all, dismiss and dismiss-all. The oversize by-reference stream path now keeps `count`, `scopeId`, `updatedAt` and `reason`.
12
+ - Contract: `NOTIFICATION_LIST_STATUSES`, `NOTIFICATION_SSE_SYNC_EVENT`, `NOTIFICATION_SYNC_REASONS`, `dismissAllNotificationsSchema`, `dismissAllResultSchema`, `notificationSyncFrameSchema`, and `status` on `notificationListQuerySchema`.
13
+ - Web: `connectNotificationStream` takes `onSync`; `NotificationProvider` refetches on a `sync` frame and `useNotifications` gains `dismissAll(scopeId?)`; `getNotifications` accepts `status`.
14
+
15
+ ### Patch Changes
16
+
17
+ - 5c815ac: Identity: `@CurrentUser()` always yields a `RequestUser`. On a bare `@Auth()` route (no `roles` or `permissions`) no guard sets `request.requestUser`, so the decorator returned the raw user graph from `request.user`; it now converts that graph with `toRequestUser` (the new `requestUserOf(request)` helper does the same for any code that reads the request directly). Routes that list permissions are unchanged.
18
+ - Updated dependencies [e61179b]
19
+ - @marinoscar/platform-contract@0.1.0-next.26
20
+ - @marinoscar/platform-ai-providers@0.1.0-next.26
21
+
3
22
  ## 0.1.0-next.25
4
23
 
5
24
  ### Patch Changes
@@ -1,13 +1,37 @@
1
- import { RequestUser } from '../interfaces/authenticated-user.interface';
1
+ import { AuthenticatedUser, RequestUser } from '../interfaces/authenticated-user.interface';
2
2
  /**
3
- * Decorator to extract the current authenticated user from the request
3
+ * The request fields `@CurrentUser()` reads: `requestUser` (the simplified
4
+ * user `PermissionsGuard`/`RolesGuard` set) and `user` (the full graph the
5
+ * credential strategy loaded).
6
+ */
7
+ interface FastifyRequestWithUser {
8
+ user?: AuthenticatedUser;
9
+ requestUser?: RequestUser;
10
+ }
11
+ /**
12
+ * The caller as a {@link RequestUser}, whatever guards ran (issue #1103).
13
+ *
14
+ * `request.requestUser` is set only by a guard that checks roles or
15
+ * permissions, so on a bare `@Auth()` route it is absent and `request.user`
16
+ * is the raw user graph. This converts that graph with `toRequestUser` (and
17
+ * remembers the result on the request) instead of leaking it.
18
+ *
19
+ * @param request - the Fastify request, or anything shaped like one.
20
+ * @returns the request user, or `undefined` on a public route.
21
+ *
22
+ * @stability stable
23
+ */
24
+ export declare function requestUserOf(request: FastifyRequestWithUser | undefined): RequestUser | undefined;
25
+ /**
26
+ * Decorator to extract the current authenticated user from the request.
4
27
  *
5
- * The decorator can extract properties from either `request.requestUser` (simplified user
6
- * set by guards) or `request.user` (full authenticated user from JWT strategy).
28
+ * It always yields a {@link RequestUser} (`id`, `email`, `roles`,
29
+ * `permissions`, `isActive`, `activeOrgId`), never the raw user graph, on
30
+ * every `@Auth()` route including one with no permission list.
7
31
  *
8
32
  * @example
9
33
  * ```typescript
10
- * // Get full user object
34
+ * // Get the request user
11
35
  * @Get('profile')
12
36
  * getProfile(@CurrentUser() user: RequestUser) {
13
37
  * return user;
@@ -23,4 +47,5 @@ import { RequestUser } from '../interfaces/authenticated-user.interface';
23
47
  * @stability stable
24
48
  */
25
49
  export declare const CurrentUser: (...dataOrPipes: (keyof RequestUser | import("@nestjs/common").PipeTransform<any, any> | import("@nestjs/common").Type<import("@nestjs/common").PipeTransform<any, any>> | undefined)[]) => ParameterDecorator;
50
+ export {};
26
51
  //# sourceMappingURL=current-user.decorator.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"current-user.decorator.d.ts","sourceRoot":"","sources":["../../../../src/identity/auth/decorators/current-user.decorator.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,4CAA4C,CAAC;AAUzE;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,eAAO,MAAM,WAAW,gNAOvB,CAAC"}
1
+ {"version":3,"file":"current-user.decorator.d.ts","sourceRoot":"","sources":["../../../../src/identity/auth/decorators/current-user.decorator.ts"],"names":[],"mappings":"AACA,OAAO,EACL,iBAAiB,EACjB,WAAW,EAEZ,MAAM,4CAA4C,CAAC;AAEpD;;;;GAIG;AACH,UAAU,sBAAsB;IAC9B,IAAI,CAAC,EAAE,iBAAiB,CAAC;IACzB,WAAW,CAAC,EAAE,WAAW,CAAC;CAC3B;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,aAAa,CAAC,OAAO,EAAE,sBAAsB,GAAG,SAAS,GAAG,WAAW,GAAG,SAAS,CAMlG;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,eAAO,MAAM,WAAW,gNAMvB,CAAC"}
@@ -1,16 +1,42 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.CurrentUser = void 0;
4
+ exports.requestUserOf = requestUserOf;
4
5
  const common_1 = require("@nestjs/common");
6
+ const authenticated_user_interface_1 = require("../interfaces/authenticated-user.interface");
5
7
  /**
6
- * Decorator to extract the current authenticated user from the request
8
+ * The caller as a {@link RequestUser}, whatever guards ran (issue #1103).
7
9
  *
8
- * The decorator can extract properties from either `request.requestUser` (simplified user
9
- * set by guards) or `request.user` (full authenticated user from JWT strategy).
10
+ * `request.requestUser` is set only by a guard that checks roles or
11
+ * permissions, so on a bare `@Auth()` route it is absent and `request.user`
12
+ * is the raw user graph. This converts that graph with `toRequestUser` (and
13
+ * remembers the result on the request) instead of leaking it.
14
+ *
15
+ * @param request - the Fastify request, or anything shaped like one.
16
+ * @returns the request user, or `undefined` on a public route.
17
+ *
18
+ * @stability stable
19
+ */
20
+ function requestUserOf(request) {
21
+ if (!request)
22
+ return undefined;
23
+ if (request.requestUser)
24
+ return request.requestUser;
25
+ if (!request.user)
26
+ return undefined;
27
+ request.requestUser = (0, authenticated_user_interface_1.toRequestUser)(request.user);
28
+ return request.requestUser;
29
+ }
30
+ /**
31
+ * Decorator to extract the current authenticated user from the request.
32
+ *
33
+ * It always yields a {@link RequestUser} (`id`, `email`, `roles`,
34
+ * `permissions`, `isActive`, `activeOrgId`), never the raw user graph, on
35
+ * every `@Auth()` route including one with no permission list.
10
36
  *
11
37
  * @example
12
38
  * ```typescript
13
- * // Get full user object
39
+ * // Get the request user
14
40
  * @Get('profile')
15
41
  * getProfile(@CurrentUser() user: RequestUser) {
16
42
  * return user;
@@ -26,8 +52,7 @@ const common_1 = require("@nestjs/common");
26
52
  * @stability stable
27
53
  */
28
54
  exports.CurrentUser = (0, common_1.createParamDecorator)((data, ctx) => {
29
- const request = ctx.switchToHttp().getRequest();
30
- const user = request.requestUser || request.user;
55
+ const user = requestUserOf(ctx.switchToHttp().getRequest());
31
56
  return data ? user?.[data] : user;
32
57
  });
33
58
  //# sourceMappingURL=current-user.decorator.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"current-user.decorator.js","sourceRoot":"","sources":["../../../../src/identity/auth/decorators/current-user.decorator.ts"],"names":[],"mappings":";;;AAAA,2CAAwE;AAWxE;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACU,QAAA,WAAW,GAAG,IAAA,6BAAoB,EAC7C,CAAC,IAAmC,EAAE,GAAqB,EAAE,EAAE;IAC7D,MAAM,OAAO,GAAG,GAAG,CAAC,YAAY,EAAE,CAAC,UAAU,EAA0B,CAAC;IACxE,MAAM,IAAI,GAAG,OAAO,CAAC,WAAW,IAAI,OAAO,CAAC,IAAI,CAAC;IAEjD,OAAO,IAAI,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;AACpC,CAAC,CACF,CAAC"}
1
+ {"version":3,"file":"current-user.decorator.js","sourceRoot":"","sources":["../../../../src/identity/auth/decorators/current-user.decorator.ts"],"names":[],"mappings":";;;AA8BA,sCAMC;AApCD,2CAAwE;AACxE,6FAIoD;AAYpD;;;;;;;;;;;;GAYG;AACH,SAAgB,aAAa,CAAC,OAA2C;IACvE,IAAI,CAAC,OAAO;QAAE,OAAO,SAAS,CAAC;IAC/B,IAAI,OAAO,CAAC,WAAW;QAAE,OAAO,OAAO,CAAC,WAAW,CAAC;IACpD,IAAI,CAAC,OAAO,CAAC,IAAI;QAAE,OAAO,SAAS,CAAC;IACpC,OAAO,CAAC,WAAW,GAAG,IAAA,4CAAa,EAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IAClD,OAAO,OAAO,CAAC,WAAW,CAAC;AAC7B,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACU,QAAA,WAAW,GAAG,IAAA,6BAAoB,EAC7C,CAAC,IAAmC,EAAE,GAAqB,EAAE,EAAE;IAC7D,MAAM,IAAI,GAAG,aAAa,CAAC,GAAG,CAAC,YAAY,EAAE,CAAC,UAAU,EAA0B,CAAC,CAAC;IAEpF,OAAO,IAAI,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;AACpC,CAAC,CACF,CAAC"}
@@ -1,5 +1,5 @@
1
- export { notificationListQuerySchema, notificationSchema, unreadCountSchema, } from '@marinoscar/platform-contract/notifications';
2
- export type { NotificationListResponse, NotificationResponse, UnreadCountResponse, } from '@marinoscar/platform-contract/notifications';
1
+ export { dismissAllNotificationsSchema, dismissAllResultSchema, notificationListQuerySchema, notificationSchema, unreadCountSchema, } from '@marinoscar/platform-contract/notifications';
2
+ export type { DismissAllNotificationsRequest, DismissAllResult, NotificationListResponse, NotificationResponse, UnreadCountResponse, } from '@marinoscar/platform-contract/notifications';
3
3
  declare const NotificationDto_base: import("nestjs-zod").ZodDto<import("zod").ZodObject<{
4
4
  id: import("zod").ZodUUID;
5
5
  eventKey: import("zod").ZodString;
@@ -24,6 +24,7 @@ declare const NotificationListQueryDto_base: import("nestjs-zod").ZodDto<import(
24
24
  page: import("zod").ZodDefault<import("zod").ZodCoercedNumber<unknown>>;
25
25
  pageSize: import("zod").ZodDefault<import("zod").ZodCoercedNumber<unknown>>;
26
26
  unreadOnly: import("zod").ZodPipe<import("zod").ZodDefault<import("zod").ZodEnum<import("@marinoscar/platform-contract/notifications").BooleanQueryEnum>>, import("zod").ZodTransform<boolean, "true" | "false">>;
27
+ status: import("zod").ZodOptional<import("zod").ZodEnum<import("@marinoscar/platform-contract/notifications").NotificationListStatusEnum>>;
27
28
  }, import("zod/v4/core").$strip>, false>;
28
29
  /**
29
30
  * `GET /api/notifications` query.
@@ -44,4 +45,25 @@ declare const UnreadCountDto_base: import("nestjs-zod").ZodDto<import("zod").Zod
44
45
  */
45
46
  export declare class UnreadCountDto extends UnreadCountDto_base {
46
47
  }
48
+ declare const DismissAllNotificationsDto_base: import("nestjs-zod").ZodDto<import("zod").ZodObject<{
49
+ scopeId: import("zod").ZodOptional<import("zod").ZodString>;
50
+ }, import("zod/v4/core").$strip>, false>;
51
+ /**
52
+ * `POST /api/notifications/dismiss-all` body.
53
+ *
54
+ * @stability stable
55
+ */
56
+ export declare class DismissAllNotificationsDto extends DismissAllNotificationsDto_base {
57
+ }
58
+ declare const DismissAllResultDto_base: import("nestjs-zod").ZodDto<import("zod").ZodObject<{
59
+ dismissed: import("zod").ZodNumber;
60
+ unreadCount: import("zod").ZodNumber;
61
+ }, import("zod/v4/core").$strip>, false>;
62
+ /**
63
+ * `POST /api/notifications/dismiss-all` response.
64
+ *
65
+ * @stability stable
66
+ */
67
+ export declare class DismissAllResultDto extends DismissAllResultDto_base {
68
+ }
47
69
  //# sourceMappingURL=notification.dto.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"notification.dto.d.ts","sourceRoot":"","sources":["../../../src/notifications/dto/notification.dto.ts"],"names":[],"mappings":"AAYA,OAAO,EACL,2BAA2B,EAC3B,kBAAkB,EAClB,iBAAiB,GAClB,MAAM,6CAA6C,CAAC;AACrD,YAAY,EACV,wBAAwB,EACxB,oBAAoB,EACpB,mBAAmB,GACpB,MAAM,6CAA6C,CAAC;;;;;;;;;;;;;;AAErD;;;;GAIG;AACH,qBAAa,eAAgB,SAAQ,oBAAgC;CAAG;;;;;;AAExE;;;;;;GAMG;AACH,qBAAa,wBAAyB,SAAQ,6BAAyC;CAAG;;;;AAE1F;;;;GAIG;AACH,qBAAa,cAAe,SAAQ,mBAA+B;CAAG"}
1
+ {"version":3,"file":"notification.dto.d.ts","sourceRoot":"","sources":["../../../src/notifications/dto/notification.dto.ts"],"names":[],"mappings":"AAcA,OAAO,EACL,6BAA6B,EAC7B,sBAAsB,EACtB,2BAA2B,EAC3B,kBAAkB,EAClB,iBAAiB,GAClB,MAAM,6CAA6C,CAAC;AACrD,YAAY,EACV,8BAA8B,EAC9B,gBAAgB,EAChB,wBAAwB,EACxB,oBAAoB,EACpB,mBAAmB,GACpB,MAAM,6CAA6C,CAAC;;;;;;;;;;;;;;AAErD;;;;GAIG;AACH,qBAAa,eAAgB,SAAQ,oBAAgC;CAAG;;;;;;;AAExE;;;;;;GAMG;AACH,qBAAa,wBAAyB,SAAQ,6BAAyC;CAAG;;;;AAE1F;;;;GAIG;AACH,qBAAa,cAAe,SAAQ,mBAA+B;CAAG;;;;AAEtE;;;;GAIG;AACH,qBAAa,0BAA2B,SAAQ,+BAA2C;CAAG;;;;;AAE9F;;;;GAIG;AACH,qBAAa,mBAAoB,SAAQ,wBAAoC;CAAG"}
@@ -4,10 +4,12 @@
4
4
  // open). This file wraps them as DTOs and re-exports them under their old
5
5
  // names, so the controllers and their importers did not change.
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.UnreadCountDto = exports.NotificationListQueryDto = exports.NotificationDto = exports.unreadCountSchema = exports.notificationSchema = exports.notificationListQuerySchema = void 0;
7
+ exports.DismissAllResultDto = exports.DismissAllNotificationsDto = exports.UnreadCountDto = exports.NotificationListQueryDto = exports.NotificationDto = exports.unreadCountSchema = exports.notificationSchema = exports.notificationListQuerySchema = exports.dismissAllResultSchema = exports.dismissAllNotificationsSchema = void 0;
8
8
  const nestjs_zod_1 = require("nestjs-zod");
9
9
  const notifications_1 = require("@marinoscar/platform-contract/notifications");
10
10
  var notifications_2 = require("@marinoscar/platform-contract/notifications");
11
+ Object.defineProperty(exports, "dismissAllNotificationsSchema", { enumerable: true, get: function () { return notifications_2.dismissAllNotificationsSchema; } });
12
+ Object.defineProperty(exports, "dismissAllResultSchema", { enumerable: true, get: function () { return notifications_2.dismissAllResultSchema; } });
11
13
  Object.defineProperty(exports, "notificationListQuerySchema", { enumerable: true, get: function () { return notifications_2.notificationListQuerySchema; } });
12
14
  Object.defineProperty(exports, "notificationSchema", { enumerable: true, get: function () { return notifications_2.notificationSchema; } });
13
15
  Object.defineProperty(exports, "unreadCountSchema", { enumerable: true, get: function () { return notifications_2.unreadCountSchema; } });
@@ -37,4 +39,20 @@ exports.NotificationListQueryDto = NotificationListQueryDto;
37
39
  class UnreadCountDto extends (0, nestjs_zod_1.createZodDto)(notifications_1.unreadCountSchema) {
38
40
  }
39
41
  exports.UnreadCountDto = UnreadCountDto;
42
+ /**
43
+ * `POST /api/notifications/dismiss-all` body.
44
+ *
45
+ * @stability stable
46
+ */
47
+ class DismissAllNotificationsDto extends (0, nestjs_zod_1.createZodDto)(notifications_1.dismissAllNotificationsSchema) {
48
+ }
49
+ exports.DismissAllNotificationsDto = DismissAllNotificationsDto;
50
+ /**
51
+ * `POST /api/notifications/dismiss-all` response.
52
+ *
53
+ * @stability stable
54
+ */
55
+ class DismissAllResultDto extends (0, nestjs_zod_1.createZodDto)(notifications_1.dismissAllResultSchema) {
56
+ }
57
+ exports.DismissAllResultDto = DismissAllResultDto;
40
58
  //# sourceMappingURL=notification.dto.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"notification.dto.js","sourceRoot":"","sources":["../../../src/notifications/dto/notification.dto.ts"],"names":[],"mappings":";AAAA,6EAA6E;AAC7E,2EAA2E;AAC3E,0EAA0E;AAC1E,gEAAgE;;;AAEhE,2CAA0C;AAC1C,+EAIqD;AAErD,6EAIqD;AAHnD,4HAAA,2BAA2B,OAAA;AAC3B,mHAAA,kBAAkB,OAAA;AAClB,kHAAA,iBAAiB,OAAA;AAQnB;;;;GAIG;AACH,MAAa,eAAgB,SAAQ,IAAA,yBAAY,EAAC,kCAAkB,CAAC;CAAG;AAAxE,0CAAwE;AAExE;;;;;;GAMG;AACH,MAAa,wBAAyB,SAAQ,IAAA,yBAAY,EAAC,2CAA2B,CAAC;CAAG;AAA1F,4DAA0F;AAE1F;;;;GAIG;AACH,MAAa,cAAe,SAAQ,IAAA,yBAAY,EAAC,iCAAiB,CAAC;CAAG;AAAtE,wCAAsE"}
1
+ {"version":3,"file":"notification.dto.js","sourceRoot":"","sources":["../../../src/notifications/dto/notification.dto.ts"],"names":[],"mappings":";AAAA,6EAA6E;AAC7E,2EAA2E;AAC3E,0EAA0E;AAC1E,gEAAgE;;;AAEhE,2CAA0C;AAC1C,+EAMqD;AAErD,6EAMqD;AALnD,8HAAA,6BAA6B,OAAA;AAC7B,uHAAA,sBAAsB,OAAA;AACtB,4HAAA,2BAA2B,OAAA;AAC3B,mHAAA,kBAAkB,OAAA;AAClB,kHAAA,iBAAiB,OAAA;AAUnB;;;;GAIG;AACH,MAAa,eAAgB,SAAQ,IAAA,yBAAY,EAAC,kCAAkB,CAAC;CAAG;AAAxE,0CAAwE;AAExE;;;;;;GAMG;AACH,MAAa,wBAAyB,SAAQ,IAAA,yBAAY,EAAC,2CAA2B,CAAC;CAAG;AAA1F,4DAA0F;AAE1F;;;;GAIG;AACH,MAAa,cAAe,SAAQ,IAAA,yBAAY,EAAC,iCAAiB,CAAC;CAAG;AAAtE,wCAAsE;AAEtE;;;;GAIG;AACH,MAAa,0BAA2B,SAAQ,IAAA,yBAAY,EAAC,6CAA6B,CAAC;CAAG;AAA9F,gEAA8F;AAE9F;;;;GAIG;AACH,MAAa,mBAAoB,SAAQ,IAAA,yBAAY,EAAC,sCAAsB,CAAC;CAAG;AAAhF,kDAAgF"}
@@ -26,8 +26,9 @@ export { NOTIFICATIONS_SYSTEM_SETTINGS, tightenNotificationsPolicy } from './not
26
26
  export { NOTIFICATIONS_USER_SETTINGS, notificationsPatchSchema } from './notifications.user-settings';
27
27
  export { PUSH_MAX_ACTIONS, PUSH_MAX_PAYLOAD_BYTES, sanitizePushExtras } from './channels/push-payload';
28
28
  export type { PushAction, PushPayloadExtras, PushPayloadFields, PushPayloadHook, PushUrgency, SanitizedPushExtras, } from './channels/push-payload';
29
- export { HEARTBEAT_INTERVAL_MS, NOTIFICATION_SSE_EVENT, parseNotificationStreamBusMessage } from './notification-stream.service';
30
- export type { NotificationStreamBusMessage, NotificationStreamEvent, NotificationStreamInlineMessage, NotificationStreamRefMessage, SseMessage, } from './notification-stream.service';
29
+ export { HEARTBEAT_INTERVAL_MS, NOTIFICATION_SSE_EVENT, NOTIFICATION_SSE_SYNC_EVENT, parseNotificationStreamBusMessage } from './notification-stream.service';
30
+ export type { NotificationStreamBusMessage, NotificationStreamEvent, NotificationStreamInlineMessage, NotificationStreamRefMessage, NotificationStreamSyncMessage, SseMessage, } from './notification-stream.service';
31
+ export { dismissEventsForUser, dismissEventsGlobally, dismissibleEventKeys, inboxDisabledEventKeys } from './notification-dismissal';
31
32
  export { PUSH_CONFIG_KEY, PushConfigService } from './push-config.service';
32
33
  export { PushTestService, endpointHost } from './push-test.service';
33
34
  export { AndroidAppNotificationChannel } from './channels/android-app-notification.channel';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/notifications/index.ts"],"names":[],"mappings":"AAeA,OAAO,EAAE,mBAAmB,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AAClE,OAAO,EAAE,qBAAqB,EAAE,iCAAiC,EAAE,MAAM,yBAAyB,CAAC;AACnG,YAAY,EACV,mBAAmB,EACnB,0BAA0B,EAC1B,kCAAkC,GACnC,MAAM,yBAAyB,CAAC;AAGjC,OAAO,EACL,0BAA0B,EAC1B,uBAAuB,EACvB,qBAAqB,EACrB,8BAA8B,EAC9B,+BAA+B,EAC/B,sCAAsC,GACvC,MAAM,SAAS,CAAC;AACjB,YAAY,EACV,2BAA2B,EAC3B,qBAAqB,EACrB,yBAAyB,EACzB,oBAAoB,EACpB,qBAAqB,GACtB,MAAM,SAAS,CAAC;AAGjB,OAAO,EAAE,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AAC/D,YAAY,EACV,qBAAqB,EACrB,yBAAyB,EACzB,2BAA2B,EAC3B,qBAAqB,EACrB,eAAe,EACf,oBAAoB,EACpB,aAAa,EACb,kBAAkB,EAClB,8BAA8B,EAC9B,eAAe,EACf,iBAAiB,EACjB,uBAAuB,GACxB,MAAM,sBAAsB,CAAC;AAG9B,OAAO,EACL,2BAA2B,EAC3B,gCAAgC,EAChC,+BAA+B,EAC/B,iCAAiC,EACjC,8BAA8B,EAC9B,8BAA8B,EAC9B,uBAAuB,EACvB,2BAA2B,EAC3B,uBAAuB,EACvB,4BAA4B,EAC5B,qBAAqB,EACrB,4BAA4B,EAC5B,0BAA0B,EAC1B,+BAA+B,EAC/B,wBAAwB,EACxB,2BAA2B,EAC3B,yBAAyB,EACzB,mBAAmB,EACnB,mCAAmC,EACnC,uBAAuB,EACvB,iCAAiC,EACjC,sBAAsB,EACtB,oBAAoB,EACpB,2BAA2B,EAC3B,4BAA4B,EAC5B,yBAAyB,EACz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,uBAAuB,EACvB,eAAe,EACf,yBAAyB,EACzB,6BAA6B,EAC7B,qBAAqB,EACrB,4BAA4B,EAC5B,2BAA2B,EAC3B,sBAAsB,EACtB,mBAAmB,EACnB,sBAAsB,EACtB,eAAe,EACf,kBAAkB,EAClB,mBAAmB,GACpB,MAAM,yBAAyB,CAAC;AAIjC;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,WAAW,sBAAsB;IACrC,oCAAoC;IACpC,KAAK,EAAE,IAAI,CAAC;IACZ,mCAAmC;IACnC,OAAO,EAAE,IAAI,CAAC;IACd,gBAAgB;IAChB,IAAI,EAAE,IAAI,CAAC;CACZ"}
@@ -14,8 +14,8 @@
14
14
  // =============================================================================
15
15
  Object.defineProperty(exports, "__esModule", { value: true });
16
16
  exports.OPS_NOTIFICATIONS = exports.NODES_NOTIFICATIONS = exports.BROADCASTS_NOTIFICATIONS = exports.supportsChannel = exports.listNotificationEvents = exports.isMandatory = exports.findEvent = exports.channelsFor = exports.NotificationChannelSenderRegistry = exports.renderChannelPayload = exports.registerPlatformNotificationChannels = exports.registerAndroidAppNotificationChannel = exports.registerNotifications = exports.registerNotificationEvent = exports.registerNotificationChannels = exports.registerNotificationChannel = exports.registerNotification = exports.registerEmailTemplates = exports.registerEmailNotificationTemplate = exports.registerChannelTemplate = exports.registerBrowserNotificationTemplate = exports.findChannelTemplate = exports.notificationEventRegistry = exports.notificationChannelRegistry = exports.listNotificationChannels = exports.isRegisteredNotificationChannel = exports.eventEmailTemplateRegistry = exports.eventBrowserTemplateRegistry = exports.emailTemplateRegistry = exports.describeNotificationChannels = exports.criticalCapableChannels = exports.collapseOverlappingChannels = exports.channelTemplateRegistry = exports.PLATFORM_NOTIFICATION_CHANNELS = exports.NOTIFICATION_EVENT_KEY_PATTERN = exports.NOTIFICATION_EVENT_KEY_MAX_LENGTH = exports.NOTIFICATION_CHANNEL_ID_PATTERN = exports.ANDROID_APP_NOTIFICATION_CHANNEL = exports.EMAIL_TEMPLATE_NAME_PATTERN = exports.NotificationsService = exports.NOTIFICATION_STREAM_INLINE_LIMIT_BYTES = exports.NOTIFICATION_STREAM_BUS_CHANNEL = exports.NOTIFICATION_RECIPIENT_HANDLES = exports.NOTIFICATIONS_METRICS = exports.NOTIFICATIONS_EVENT_BUS = exports.NOOP_NOTIFICATIONS_METRICS = exports.resolveNotificationsModuleOptions = exports.NOTIFICATIONS_OPTIONS = exports.BroadcastsModule = exports.NotificationsModule = void 0;
17
- exports.ORG_BROADCASTS_PERMISSIONS = exports.BROADCASTS_PERMISSIONS = exports.BROADCAST_CHUNK_TYPE = exports.BROADCAST_START_TYPE = exports.BROADCAST_EVENT_KEY = exports.BROADCAST_CRITICAL_EVENT_KEY = exports.audienceWhere = exports.BROADCAST_SUBJECT_TYPE = exports.BROADCAST_SEND_CONCURRENCY = exports.BROADCAST_CHUNK_SIZE = exports.PUSH_SETTINGS_PATH = exports.PUSH_VAPID_CREDENTIAL_PURPOSE_DEF = exports.PUSH_VAPID_CREDENTIAL_PURPOSE = exports.PUSH_VAPID_CREDENTIAL_NAME = exports.PUSH_VAPID_CREDENTIAL_LABEL = exports.DEFAULT_PUSH_CONFIG = exports.AndroidAppNotificationChannel = exports.endpointHost = exports.PushTestService = exports.PushConfigService = exports.PUSH_CONFIG_KEY = exports.parseNotificationStreamBusMessage = exports.NOTIFICATION_SSE_EVENT = exports.HEARTBEAT_INTERVAL_MS = exports.sanitizePushExtras = exports.PUSH_MAX_PAYLOAD_BYTES = exports.PUSH_MAX_ACTIONS = exports.notificationsPatchSchema = exports.NOTIFICATIONS_USER_SETTINGS = exports.tightenNotificationsPolicy = exports.NOTIFICATIONS_SYSTEM_SETTINGS = exports.policyChannels = exports.isChannelSwitchedOn = exports.isBrowserToastAllowed = exports.DEFAULT_NOTIFICATION_POLICY = exports.resolveChannels = exports.readNotificationPreferences = exports.isChannelEnabled = exports.NOTIFICATION_PREFERENCES_NAMESPACE = exports.sanitizeLink = exports.roleChangedBrowserTemplate = exports.restoreCompletedBrowserTemplate = exports.nodeOfflineBrowserTemplate = exports.broadcastBrowserTemplate = exports.backupFailedBrowserTemplate = exports.NotificationInboxPurgeHandler = exports.NOTIFICATION_INBOX_PURGE_TYPE = exports.PURGEABLE_DELIVERY_STATUSES = exports.NotificationDeliveriesPurgeHandler = exports.NOTIFICATION_DELIVERIES_PURGE_TYPE = void 0;
18
- exports.NotificationDeliveryStatus = exports.NotificationBroadcastStatus = exports.PUSH_PERMISSIONS = void 0;
17
+ exports.BROADCAST_CRITICAL_EVENT_KEY = exports.audienceWhere = exports.BROADCAST_SUBJECT_TYPE = exports.BROADCAST_SEND_CONCURRENCY = exports.BROADCAST_CHUNK_SIZE = exports.PUSH_SETTINGS_PATH = exports.PUSH_VAPID_CREDENTIAL_PURPOSE_DEF = exports.PUSH_VAPID_CREDENTIAL_PURPOSE = exports.PUSH_VAPID_CREDENTIAL_NAME = exports.PUSH_VAPID_CREDENTIAL_LABEL = exports.DEFAULT_PUSH_CONFIG = exports.AndroidAppNotificationChannel = exports.endpointHost = exports.PushTestService = exports.PushConfigService = exports.PUSH_CONFIG_KEY = exports.inboxDisabledEventKeys = exports.dismissibleEventKeys = exports.dismissEventsGlobally = exports.dismissEventsForUser = exports.parseNotificationStreamBusMessage = exports.NOTIFICATION_SSE_SYNC_EVENT = exports.NOTIFICATION_SSE_EVENT = exports.HEARTBEAT_INTERVAL_MS = exports.sanitizePushExtras = exports.PUSH_MAX_PAYLOAD_BYTES = exports.PUSH_MAX_ACTIONS = exports.notificationsPatchSchema = exports.NOTIFICATIONS_USER_SETTINGS = exports.tightenNotificationsPolicy = exports.NOTIFICATIONS_SYSTEM_SETTINGS = exports.policyChannels = exports.isChannelSwitchedOn = exports.isBrowserToastAllowed = exports.DEFAULT_NOTIFICATION_POLICY = exports.resolveChannels = exports.readNotificationPreferences = exports.isChannelEnabled = exports.NOTIFICATION_PREFERENCES_NAMESPACE = exports.sanitizeLink = exports.roleChangedBrowserTemplate = exports.restoreCompletedBrowserTemplate = exports.nodeOfflineBrowserTemplate = exports.broadcastBrowserTemplate = exports.backupFailedBrowserTemplate = exports.NotificationInboxPurgeHandler = exports.NOTIFICATION_INBOX_PURGE_TYPE = exports.PURGEABLE_DELIVERY_STATUSES = exports.NotificationDeliveriesPurgeHandler = exports.NOTIFICATION_DELIVERIES_PURGE_TYPE = void 0;
18
+ exports.NotificationDeliveryStatus = exports.NotificationBroadcastStatus = exports.PUSH_PERMISSIONS = exports.ORG_BROADCASTS_PERMISSIONS = exports.BROADCASTS_PERMISSIONS = exports.BROADCAST_CHUNK_TYPE = exports.BROADCAST_START_TYPE = exports.BROADCAST_EVENT_KEY = void 0;
19
19
  // ---- modules ---------------------------------------------------------------------------
20
20
  var notifications_module_1 = require("./notifications.module");
21
21
  Object.defineProperty(exports, "NotificationsModule", { enumerable: true, get: function () { return notifications_module_1.NotificationsModule; } });
@@ -126,7 +126,14 @@ Object.defineProperty(exports, "sanitizePushExtras", { enumerable: true, get: fu
126
126
  var notification_stream_service_1 = require("./notification-stream.service");
127
127
  Object.defineProperty(exports, "HEARTBEAT_INTERVAL_MS", { enumerable: true, get: function () { return notification_stream_service_1.HEARTBEAT_INTERVAL_MS; } });
128
128
  Object.defineProperty(exports, "NOTIFICATION_SSE_EVENT", { enumerable: true, get: function () { return notification_stream_service_1.NOTIFICATION_SSE_EVENT; } });
129
+ Object.defineProperty(exports, "NOTIFICATION_SSE_SYNC_EVENT", { enumerable: true, get: function () { return notification_stream_service_1.NOTIFICATION_SSE_SYNC_EVENT; } });
129
130
  Object.defineProperty(exports, "parseNotificationStreamBusMessage", { enumerable: true, get: function () { return notification_stream_service_1.parseNotificationStreamBusMessage; } });
131
+ // ---- dismiss-on-disable (issue #1090) ---------------------------------------------------
132
+ var notification_dismissal_1 = require("./notification-dismissal");
133
+ Object.defineProperty(exports, "dismissEventsForUser", { enumerable: true, get: function () { return notification_dismissal_1.dismissEventsForUser; } });
134
+ Object.defineProperty(exports, "dismissEventsGlobally", { enumerable: true, get: function () { return notification_dismissal_1.dismissEventsGlobally; } });
135
+ Object.defineProperty(exports, "dismissibleEventKeys", { enumerable: true, get: function () { return notification_dismissal_1.dismissibleEventKeys; } });
136
+ Object.defineProperty(exports, "inboxDisabledEventKeys", { enumerable: true, get: function () { return notification_dismissal_1.inboxDisabledEventKeys; } });
130
137
  // ---- Web Push configuration ----------------------------------------------------------------
131
138
  var push_config_service_1 = require("./push-config.service");
132
139
  Object.defineProperty(exports, "PUSH_CONFIG_KEY", { enumerable: true, get: function () { return push_config_service_1.PUSH_CONFIG_KEY; } });
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/notifications/index.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,gEAAgE;AAChE,gFAAgF;AAChF,EAAE;AACF,2EAA2E;AAC3E,4EAA4E;AAC5E,yEAAyE;AACzE,4EAA4E;AAC5E,8EAA8E;AAC9E,kEAAkE;AAClE,EAAE;AACF,+BAA+B;AAC/B,gFAAgF;;;;;AAEhF,2FAA2F;AAC3F,+DAA6D;AAApD,2HAAA,mBAAmB,OAAA;AAC5B,oEAAkE;AAAzD,qHAAA,gBAAgB,OAAA;AACzB,iEAAmG;AAA1F,8HAAA,qBAAqB,OAAA;AAAE,0IAAA,iCAAiC,OAAA;AAOjE,2FAA2F;AAC3F,iCAOiB;AANf,mHAAA,0BAA0B,OAAA;AAC1B,gHAAA,uBAAuB,OAAA;AACvB,8GAAA,qBAAqB,OAAA;AACrB,uHAAA,8BAA8B,OAAA;AAC9B,wHAAA,+BAA+B,OAAA;AAC/B,+HAAA,sCAAsC,OAAA;AAUxC,6FAA6F;AAC7F,iEAA+D;AAAtD,6HAAA,oBAAoB,OAAA;AAgB7B,6FAA6F;AAC7F,0CA+B0B;AA9BxB,oHAAA,2BAA2B,OAAA;AAC3B,yHAAA,gCAAgC,OAAA;AAChC,wHAAA,+BAA+B,OAAA;AAC/B,0HAAA,iCAAiC,OAAA;AACjC,uHAAA,8BAA8B,OAAA;AAC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,oBAAoB,OAAA;AAAE,gIAAA,sBAAsB,OAAA;AAElG,+FAA+F;AAC/F,6DAA2E;AAAlE,sHAAA,eAAe,OAAA;AAAE,wHAAA,iBAAiB,OAAA;AAC3C,sEAAsE;AACtE,4EAA4E;AAC5E,2EAA2E;AAC3E,yDAAoE;AAA3D,oHAAA,eAAe,OAAA;AAAE,iHAAA,YAAY,OAAA;AACtC,gGAA4F;AAAnF,iJAAA,6BAA6B,OAAA;AAEtC,2DAA2D;AAAlD,yHAAA,mBAAmB,OAAA;AAC5B,qFAK2C;AAJzC,8IAAA,2BAA2B,OAAA;AAC3B,6IAAA,0BAA0B,OAAA;AAC1B,gJAAA,6BAA6B,OAAA;AAC7B,oJAAA,iCAAiC,OAAA;AAEnC,4EAAsE;AAA7D,6HAAA,kBAAkB,OAAA;AAE3B,+FAA+F;AAC/F,sEAKyC;AAJvC,0HAAA,oBAAoB,OAAA;AACpB,gIAAA,0BAA0B,OAAA;AAC1B,4HAAA,sBAAsB,OAAA;AACtB,mHAAA,aAAa,OAAA;AAEf,sEAAoG;AAA3F,kIAAA,4BAA4B,OAAA;AAAE,yHAAA,mBAAmB,OAAA;AAC1D,yFAAqF;AAA5E,+HAAA,oBAAoB,OAAA;AAC7B,yFAAqF;AAA5E,+HAAA,oBAAoB,OAAA;AAE7B,+FAA+F;AAC/F,yEAIqC;AAHnC,mIAAA,sBAAsB,OAAA;AACtB,uIAAA,0BAA0B,OAAA;AAC1B,6HAAA,gBAAgB,OAAA;AAIlB,6FAA6F;AAC7F,4DAAkG;AAAzF,+HAAA,2BAA2B,OAAA;AAAE,8HAAA,0BAA0B,OAAA"}
@@ -0,0 +1,49 @@
1
+ import type { NotificationsTx } from './data/notifications-db';
2
+ /**
3
+ * The event keys a user has switched off for the in-app inbox (the `browser` channel), from their settings
4
+ * value AFTER a write: every event with a stored `false` that the resolver
5
+ * agrees is disabled, which excludes a mandatory event and any key the registry
6
+ * does not know.
7
+ *
8
+ * @param afterNamespace - the user's `notifications` namespace after the write (or `undefined`).
9
+ * @returns the event keys to dismiss.
10
+ *
11
+ * @stability experimental
12
+ */
13
+ export declare function inboxDisabledEventKeys(afterNamespace: unknown): string[];
14
+ /**
15
+ * The non-mandatory event keys among `eventKeys`: what an admin may suppress
16
+ * deployment-wide.
17
+ *
18
+ * @param eventKeys - `notifications.disabledEvents` after the write.
19
+ * @returns the keys whose live rows should be dismissed.
20
+ *
21
+ * @stability experimental
22
+ */
23
+ export declare function dismissibleEventKeys(eventKeys: readonly string[]): string[];
24
+ /**
25
+ * Dismisses every live row of the given events for ONE user, inside `tx`.
26
+ *
27
+ * Idempotent: a row already dismissed is untouched, so repeating it (every
28
+ * save does) is a no-op and a stale row is healed by the next save.
29
+ *
30
+ * @param tx - the settings write's transaction client.
31
+ * @param userId - whose rows.
32
+ * @param eventKeys - the events that are now off for this user.
33
+ * @returns how many rows were dismissed.
34
+ *
35
+ * @stability experimental
36
+ */
37
+ export declare function dismissEventsForUser(tx: NotificationsTx, userId: string, eventKeys: readonly string[]): Promise<number>;
38
+ /**
39
+ * Dismisses every live row of the given events for EVERY user, inside `tx`
40
+ * (an admin added them to `notifications.disabledEvents`).
41
+ *
42
+ * @param tx - the settings write's transaction client.
43
+ * @param eventKeys - the (non-mandatory) events now suppressed deployment-wide.
44
+ * @returns how many rows were dismissed.
45
+ *
46
+ * @stability experimental
47
+ */
48
+ export declare function dismissEventsGlobally(tx: NotificationsTx, eventKeys: readonly string[]): Promise<number>;
49
+ //# sourceMappingURL=notification-dismissal.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"notification-dismissal.d.ts","sourceRoot":"","sources":["../../src/notifications/notification-dismissal.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAgC/D;;;;;;;;;;GAUG;AACH,wBAAgB,sBAAsB,CAAC,cAAc,EAAE,OAAO,GAAG,MAAM,EAAE,CASxE;AAED;;;;;;;;GAQG;AACH,wBAAgB,oBAAoB,CAAC,SAAS,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,EAAE,CAE3E;AAED;;;;;;;;;;;;GAYG;AACH,wBAAsB,oBAAoB,CAAC,EAAE,EAAE,eAAe,EAAE,MAAM,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC,CAM7H;AAED;;;;;;;;;GASG;AACH,wBAAsB,qBAAqB,CAAC,EAAE,EAAE,eAAe,EAAE,SAAS,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC,CAM9G"}
@@ -0,0 +1,109 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.inboxDisabledEventKeys = inboxDisabledEventKeys;
4
+ exports.dismissibleEventKeys = dismissibleEventKeys;
5
+ exports.dismissEventsForUser = dismissEventsForUser;
6
+ exports.dismissEventsGlobally = dismissEventsGlobally;
7
+ const notification_events_1 = require("./notification-events");
8
+ const notification_preferences_1 = require("./notification-preferences");
9
+ // =============================================================================
10
+ // Dismiss-on-disable (issue #1090)
11
+ // =============================================================================
12
+ //
13
+ // Turning a notification event OFF means "stop showing me this", not "stop
14
+ // showing me this except for the eleven already there". For a STATE row it is
15
+ // the only way out at all: the reconcile that would drain the row to zero is
16
+ // now gated on the same preference, so the row would nag forever.
17
+ //
18
+ // Both functions below take the TRANSACTION CLIENT of the settings write and
19
+ // run inside it, so the settings change and the dismissal commit or roll back
20
+ // together. They are wired as the `onWrite` hooks of the `notifications`
21
+ // system and user settings namespaces (see `notifications.system-settings.ts`
22
+ // and `notifications.user-settings.ts`).
23
+ //
24
+ // RE-ENABLING DOES NOT RESTORE ANYTHING. A dismissed row stays dismissed; the
25
+ // producer raises a fresh one on its next occurrence.
26
+ //
27
+ // MANDATORY EVENTS ARE NEVER DISMISSED: a stored `false` for one is inert (see
28
+ // `isChannelEnabled`), and an audit-relevant inbox entry must outlive any
29
+ // toggle.
30
+ //
31
+ // Raw SQL on purpose: `updated_at` is anchored by the COUNTED rolling window
32
+ // and Prisma's `@updatedAt` is bypassed by raw statements, so it is set
33
+ // explicitly; `updateMany` would also not let one statement dismiss with
34
+ // `COALESCE(read_at, now())`.
35
+ // =============================================================================
36
+ /**
37
+ * The event keys a user has switched off for the in-app inbox (the `browser` channel), from their settings
38
+ * value AFTER a write: every event with a stored `false` that the resolver
39
+ * agrees is disabled, which excludes a mandatory event and any key the registry
40
+ * does not know.
41
+ *
42
+ * @param afterNamespace - the user's `notifications` namespace after the write (or `undefined`).
43
+ * @returns the event keys to dismiss.
44
+ *
45
+ * @stability experimental
46
+ */
47
+ function inboxDisabledEventKeys(afterNamespace) {
48
+ const preferences = (0, notification_preferences_1.readNotificationPreferences)({ notifications: afterNamespace });
49
+ const stored = preferences.browser ?? {};
50
+ const keys = [];
51
+ for (const eventKey of Object.keys(stored)) {
52
+ const event = (0, notification_events_1.findEvent)(eventKey);
53
+ if (event && !(0, notification_preferences_1.isChannelEnabled)(event, 'browser', preferences))
54
+ keys.push(eventKey);
55
+ }
56
+ return keys;
57
+ }
58
+ /**
59
+ * The non-mandatory event keys among `eventKeys`: what an admin may suppress
60
+ * deployment-wide.
61
+ *
62
+ * @param eventKeys - `notifications.disabledEvents` after the write.
63
+ * @returns the keys whose live rows should be dismissed.
64
+ *
65
+ * @stability experimental
66
+ */
67
+ function dismissibleEventKeys(eventKeys) {
68
+ return eventKeys.filter((eventKey) => (0, notification_events_1.findEvent)(eventKey)?.mandatory !== true);
69
+ }
70
+ /**
71
+ * Dismisses every live row of the given events for ONE user, inside `tx`.
72
+ *
73
+ * Idempotent: a row already dismissed is untouched, so repeating it (every
74
+ * save does) is a no-op and a stale row is healed by the next save.
75
+ *
76
+ * @param tx - the settings write's transaction client.
77
+ * @param userId - whose rows.
78
+ * @param eventKeys - the events that are now off for this user.
79
+ * @returns how many rows were dismissed.
80
+ *
81
+ * @stability experimental
82
+ */
83
+ async function dismissEventsForUser(tx, userId, eventKeys) {
84
+ if (eventKeys.length === 0)
85
+ return 0;
86
+ return tx.$executeRaw `
87
+ UPDATE notifications
88
+ SET dismissed_at = now(), read_at = COALESCE(read_at, now()), updated_at = now()
89
+ WHERE user_id = ${userId}::uuid AND event_key = ANY(${[...eventKeys]}::text[]) AND dismissed_at IS NULL`;
90
+ }
91
+ /**
92
+ * Dismisses every live row of the given events for EVERY user, inside `tx`
93
+ * (an admin added them to `notifications.disabledEvents`).
94
+ *
95
+ * @param tx - the settings write's transaction client.
96
+ * @param eventKeys - the (non-mandatory) events now suppressed deployment-wide.
97
+ * @returns how many rows were dismissed.
98
+ *
99
+ * @stability experimental
100
+ */
101
+ async function dismissEventsGlobally(tx, eventKeys) {
102
+ if (eventKeys.length === 0)
103
+ return 0;
104
+ return tx.$executeRaw `
105
+ UPDATE notifications
106
+ SET dismissed_at = now(), read_at = COALESCE(read_at, now()), updated_at = now()
107
+ WHERE event_key = ANY(${[...eventKeys]}::text[]) AND dismissed_at IS NULL`;
108
+ }
109
+ //# sourceMappingURL=notification-dismissal.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"notification-dismissal.js","sourceRoot":"","sources":["../../src/notifications/notification-dismissal.ts"],"names":[],"mappings":";;AA2CA,wDASC;AAWD,oDAEC;AAeD,oDAMC;AAYD,sDAMC;AAvGD,+DAAkD;AAClD,yEAA2F;AAE3F,gFAAgF;AAChF,mCAAmC;AACnC,gFAAgF;AAChF,EAAE;AACF,2EAA2E;AAC3E,8EAA8E;AAC9E,6EAA6E;AAC7E,kEAAkE;AAClE,EAAE;AACF,6EAA6E;AAC7E,8EAA8E;AAC9E,yEAAyE;AACzE,8EAA8E;AAC9E,yCAAyC;AACzC,EAAE;AACF,8EAA8E;AAC9E,sDAAsD;AACtD,EAAE;AACF,+EAA+E;AAC/E,0EAA0E;AAC1E,UAAU;AACV,EAAE;AACF,6EAA6E;AAC7E,wEAAwE;AACxE,yEAAyE;AACzE,8BAA8B;AAC9B,gFAAgF;AAEhF;;;;;;;;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AAoC,CAAC;AAC/E,CAAC"}
@@ -78,5 +78,17 @@ export declare class NotificationStoreService {
78
78
  * @throws NotFoundException when the id belongs to nobody, or to somebody else.
79
79
  */
80
80
  dismiss(userId: string, id: string): Promise<number>;
81
+ /**
82
+ * Dismiss every live notification of this user, optionally only those of one
83
+ * scope (issue #1090), and report how many were dismissed and the badge.
84
+ *
85
+ * Dismissal implies read, as for {@link dismiss}. `updated_at` is set
86
+ * explicitly: the raw statement bypasses Prisma's `@updatedAt`, and a COUNTED
87
+ * row's rolling window is anchored on it.
88
+ */
89
+ dismissAll(userId: string, scopeId?: string): Promise<{
90
+ dismissed: number;
91
+ unreadCount: number;
92
+ }>;
81
93
  }
82
94
  //# sourceMappingURL=notification-store.service.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"notification-store.service.d.ts","sourceRoot":"","sources":["../../src/notifications/notification-store.service.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAiC,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAClG,OAAO,KAAK,EACV,wBAAwB,EACxB,wBAAwB,EAEzB,MAAM,wBAAwB,CAAC;AA4DhC;;;;GAIG;AACH,qBACa,wBAAwB;IACE,OAAO,CAAC,QAAQ,CAAC,MAAM;gBAAN,MAAM,EAAE,mBAAmB;IAEjF;;;;;;;;;;;;;;OAcG;IACG,IAAI,CACR,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,wBAAwB,GAC9B,OAAO,CAAC,wBAAwB,CAAC;IA+BpC;;;;;;;;;;OAUG;IACG,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAMlD;;;;;;;;;;;;;;;;;;OAkBG;IACG,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAmC3D;;;;;;;;;;OAUG;IACG,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAYlD;;;;;;;;OAQG;IACG,OAAO,CAAC,MAAM,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;CAgB3D"}
1
+ {"version":3,"file":"notification-store.service.d.ts","sourceRoot":"","sources":["../../src/notifications/notification-store.service.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAiC,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAClG,OAAO,KAAK,EACV,wBAAwB,EACxB,wBAAwB,EAEzB,MAAM,wBAAwB,CAAC;AA4DhC;;;;GAIG;AACH,qBACa,wBAAwB;IACE,OAAO,CAAC,QAAQ,CAAC,MAAM;gBAAN,MAAM,EAAE,mBAAmB;IAEjF;;;;;;;;;;;;;;OAcG;IACG,IAAI,CACR,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,wBAAwB,GAC9B,OAAO,CAAC,wBAAwB,CAAC;IAsCpC;;;;;;;;;;OAUG;IACG,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAMlD;;;;;;;;;;;;;;;;;;OAkBG;IACG,QAAQ,CAAC,MAAM,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAmC3D;;;;;;;;;;OAUG;IACG,WAAW,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAYlD;;;;;;;;OAQG;IACG,OAAO,CAAC,MAAM,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAiB1D;;;;;;;OAOG;IACG,UAAU,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,CAAA;KAAE,CAAC;CAaxG"}
@@ -98,13 +98,19 @@ let NotificationStoreService = class NotificationStoreService {
98
98
  */
99
99
  async list(userId, query) {
100
100
  const { page, pageSize, unreadOnly } = query;
101
+ // `status` is the richer spelling; the older `unreadOnly` flag maps onto it.
102
+ const status = query.status ?? (unreadOnly ? 'unread' : 'all');
101
103
  // `userId` is in the where clause, not applied afterwards. See the header.
102
- // A dismissed row is "stop showing me this": never listed (issue #1077).
103
- const where = {
104
- userId,
105
- dismissedAt: null,
106
- ...(unreadOnly ? { readAt: null } : {}),
107
- };
104
+ // A dismissed row is "stop showing me this": listed only when asked for by
105
+ // `status=dismissed`, never by the other three (issue #1077, #1090).
106
+ const where = status === 'dismissed'
107
+ ? { userId, dismissedAt: { not: null } }
108
+ : {
109
+ userId,
110
+ dismissedAt: null,
111
+ ...(status === 'unread' ? { readAt: null } : {}),
112
+ ...(status === 'read' ? { readAt: { not: null } } : {}),
113
+ };
108
114
  const [items, total] = await this.prisma.$transaction([
109
115
  this.prisma.notification.findMany({
110
116
  where,
@@ -233,6 +239,26 @@ let NotificationStoreService = class NotificationStoreService {
233
239
  }
234
240
  return this.unreadCount(userId);
235
241
  }
242
+ /**
243
+ * Dismiss every live notification of this user, optionally only those of one
244
+ * scope (issue #1090), and report how many were dismissed and the badge.
245
+ *
246
+ * Dismissal implies read, as for {@link dismiss}. `updated_at` is set
247
+ * explicitly: the raw statement bypasses Prisma's `@updatedAt`, and a COUNTED
248
+ * row's rolling window is anchored on it.
249
+ */
250
+ async dismissAll(userId, scopeId) {
251
+ const dismissed = scopeId
252
+ ? await this.prisma.$executeRaw `
253
+ UPDATE notifications
254
+ SET dismissed_at = now(), read_at = COALESCE(read_at, now()), updated_at = now()
255
+ WHERE user_id = ${userId}::uuid AND scope_id = ${scopeId}::uuid AND dismissed_at IS NULL`
256
+ : await this.prisma.$executeRaw `
257
+ UPDATE notifications
258
+ SET dismissed_at = now(), read_at = COALESCE(read_at, now()), updated_at = now()
259
+ WHERE user_id = ${userId}::uuid AND dismissed_at IS NULL`;
260
+ return { dismissed, unreadCount: await this.unreadCount(userId) };
261
+ }
236
262
  };
237
263
  exports.NotificationStoreService = NotificationStoreService;
238
264
  exports.NotificationStoreService = NotificationStoreService = __decorate([
@@ -1 +1 @@
1
- {"version":3,"file":"notification-store.service.js","sourceRoot":"","sources":["../../src/notifications/notification-store.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAAuE;AAEvE,yCAAgD;AAQhD,gFAAgF;AAChF,wEAAwE;AACxE,0BAA0B;AAC1B,gFAAgF;AAChF,EAAE;AACF,6EAA6E;AAC7E,8EAA8E;AAC9E,QAAQ;AACR,EAAE;AACF,gFAAgF;AAChF,mEAAmE;AACnE,gFAAgF;AAChF,EAAE;AACF,2EAA2E;AAC3E,UAAU;AACV,EAAE;AACF,8EAA8E;AAC9E,+DAA+D;AAC/D,EAAE;AACF,2EAA2E;AAC3E,6EAA6E;AAC7E,yEAAyE;AACzE,+EAA+E;AAC/E,4EAA4E;AAC5E,4DAA4D;AAC5D,EAAE;AACF,6EAA6E;AAC7E,2EAA2E;AAC3E,4EAA4E;AAC5E,2EAA2E;AAC3E,6EAA6E;AAC7E,+EAA+E;AAC/E,6EAA6E;AAC7E,0EAA0E;AAC1E,uCAAuC;AACvC,gFAAgF;AAEhF;;;;;;GAMG;AACH,MAAM,mBAAmB,GAAG;IAC1B,EAAE,EAAE,IAAI;IACR,QAAQ,EAAE,IAAI;IACd,KAAK,EAAE,IAAI;IACX,IAAI,EAAE,IAAI;IACV,IAAI,EAAE,IAAI;IACV,MAAM,EAAE,IAAI;IACZ,SAAS,EAAE,IAAI;IACf,IAAI,EAAE,IAAI;IACV,OAAO,EAAE,IAAI;IACb,WAAW,EAAE,IAAI;IACjB,SAAS,EAAE,IAAI;CACP,CAAC;AAEX;;;;GAIG;AAEI,IAAM,wBAAwB,GAA9B,MAAM,wBAAwB;IACmB;IAAtD,YAAsD,MAA2B;QAA3B,WAAM,GAAN,MAAM,CAAqB;IAAG,CAAC;IAErF;;;;;;;;;;;;;;OAcG;IACH,KAAK,CAAC,IAAI,CACR,MAAc,EACd,KAA+B;QAE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AAC;YAC/E,IAAI,MAAM,KAAK,CAAC,EAAE,CAAC;gBACjB,MAAM,IAAI,0BAAiB,CAAC,wBAAwB,CAAC,CAAC;YACxD,CAAC;QACH,CAAC;QAED,OAAO,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;IAClC,CAAC;CACF,CAAA;AA3KY,4DAAwB;mCAAxB,wBAAwB;IADpC,IAAA,mBAAU,GAAE;IAEE,WAAA,IAAA,eAAM,EAAC,uBAAe,CAAC,CAAA;;GADzB,wBAAwB,CA2KpC;AAED;;;;;;;GAOG;AACH,SAAS,UAAU,CAAC,GAYnB;IACC,MAAM,KAAK,GAAI,GAAG,CAAC,IAAmC,EAAE,KAAK,CAAC;IAC9D,OAAO;QACL,EAAE,EAAE,GAAG,CAAC,EAAE;QACV,QAAQ,EAAE,GAAG,CAAC,QAAQ;QACtB,KAAK,EAAE,GAAG,CAAC,KAAK;QAChB,IAAI,EAAE,GAAG,CAAC,IAAI;QACd,IAAI,EAAE,GAAG,CAAC,IAAI;QACd,MAAM,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,MAAM,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,IAAI;QACpD,SAAS,EAAE,GAAG,CAAC,SAAS,CAAC,WAAW,EAAE;QACtC,KAAK,EAAE,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI;QAC/C,OAAO,EAAE,GAAG,CAAC,OAAO;QACpB,WAAW,EAAE,GAAG,CAAC,WAAW,CAAC,CAAC,CAAC,GAAG,CAAC,WAAW,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,IAAI;QACnE,SAAS,EAAE,GAAG,CAAC,SAAS,CAAC,WAAW,EAAE;KACvC,CAAC;AACJ,CAAC"}
1
+ {"version":3,"file":"notification-store.service.js","sourceRoot":"","sources":["../../src/notifications/notification-store.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,2CAAu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