@marinoscar/platform-api 0.1.0-next.25 → 0.1.0-next.27
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 +31 -0
- package/dist/identity/auth/decorators/current-user.decorator.d.ts +30 -5
- package/dist/identity/auth/decorators/current-user.decorator.d.ts.map +1 -1
- package/dist/identity/auth/decorators/current-user.decorator.js +31 -6
- package/dist/identity/auth/decorators/current-user.decorator.js.map +1 -1
- package/dist/manifest/platform-model-ownership.d.ts.map +1 -1
- package/dist/manifest/platform-model-ownership.js +19 -0
- package/dist/manifest/platform-model-ownership.js.map +1 -1
- package/dist/manifest/platform-user-owned-models.d.ts.map +1 -1
- package/dist/manifest/platform-user-owned-models.js +15 -0
- package/dist/manifest/platform-user-owned-models.js.map +1 -1
- package/dist/notifications/dto/notification.dto.d.ts +24 -2
- package/dist/notifications/dto/notification.dto.d.ts.map +1 -1
- package/dist/notifications/dto/notification.dto.js +19 -1
- package/dist/notifications/dto/notification.dto.js.map +1 -1
- package/dist/notifications/index.d.ts +3 -2
- package/dist/notifications/index.d.ts.map +1 -1
- package/dist/notifications/index.js +9 -2
- package/dist/notifications/index.js.map +1 -1
- package/dist/notifications/notification-dismissal.d.ts +49 -0
- package/dist/notifications/notification-dismissal.d.ts.map +1 -0
- package/dist/notifications/notification-dismissal.js +109 -0
- package/dist/notifications/notification-dismissal.js.map +1 -0
- package/dist/notifications/notification-store.service.d.ts +12 -0
- package/dist/notifications/notification-store.service.d.ts.map +1 -1
- package/dist/notifications/notification-store.service.js +32 -6
- package/dist/notifications/notification-store.service.js.map +1 -1
- package/dist/notifications/notification-stream.service.d.ts +42 -1
- package/dist/notifications/notification-stream.service.d.ts.map +1 -1
- package/dist/notifications/notification-stream.service.js +97 -4
- package/dist/notifications/notification-stream.service.js.map +1 -1
- package/dist/notifications/notifications.controller.d.ts +2 -1
- package/dist/notifications/notifications.controller.d.ts.map +1 -1
- package/dist/notifications/notifications.controller.js +44 -3
- package/dist/notifications/notifications.controller.js.map +1 -1
- package/dist/notifications/notifications.system-settings.d.ts +13 -0
- package/dist/notifications/notifications.system-settings.d.ts.map +1 -1
- package/dist/notifications/notifications.system-settings.js +10 -0
- package/dist/notifications/notifications.system-settings.js.map +1 -1
- package/dist/notifications/notifications.user-settings.d.ts +8 -0
- package/dist/notifications/notifications.user-settings.d.ts.map +1 -1
- package/dist/notifications/notifications.user-settings.js +11 -0
- package/dist/notifications/notifications.user-settings.js.map +1 -1
- package/dist/settings/data/settings-db.d.ts +28 -0
- package/dist/settings/data/settings-db.d.ts.map +1 -1
- package/dist/settings/index.d.ts +2 -1
- package/dist/settings/index.d.ts.map +1 -1
- package/dist/settings/index.js.map +1 -1
- package/dist/settings/registry/system-settings-namespace.d.ts +9 -0
- package/dist/settings/registry/system-settings-namespace.d.ts.map +1 -1
- package/dist/settings/registry/system-settings-namespace.js +2 -0
- package/dist/settings/registry/system-settings-namespace.js.map +1 -1
- package/dist/settings/registry/user-settings-namespace.d.ts +9 -0
- package/dist/settings/registry/user-settings-namespace.d.ts.map +1 -1
- package/dist/settings/registry/user-settings-namespace.js +3 -0
- package/dist/settings/registry/user-settings-namespace.js.map +1 -1
- package/dist/settings/system-settings/system-settings.service.d.ts +7 -0
- package/dist/settings/system-settings/system-settings.service.d.ts.map +1 -1
- package/dist/settings/system-settings/system-settings.service.js +22 -4
- package/dist/settings/system-settings/system-settings.service.js.map +1 -1
- package/dist/settings/user-settings/user-settings.service.d.ts +9 -0
- package/dist/settings/user-settings/user-settings.service.d.ts.map +1 -1
- package/dist/settings/user-settings/user-settings.service.js +24 -4
- package/dist/settings/user-settings/user-settings.service.js.map +1 -1
- package/dist/settings/write-hooks.d.ts +53 -0
- package/dist/settings/write-hooks.d.ts.map +1 -0
- package/dist/settings/write-hooks.js +55 -0
- package/dist/settings/write-hooks.js.map +1 -0
- package/dist/storage/config/storage-config.module.d.ts.map +1 -1
- package/dist/storage/config/storage-config.module.js +10 -1
- package/dist/storage/config/storage-config.module.js.map +1 -1
- package/dist/storage/data/storage-db.d.ts +118 -1
- package/dist/storage/data/storage-db.d.ts.map +1 -1
- package/dist/storage/data/storage-db.js +25 -1
- package/dist/storage/data/storage-db.js.map +1 -1
- package/dist/storage/index.d.ts +5 -2
- package/dist/storage/index.d.ts.map +1 -1
- package/dist/storage/index.js +25 -1
- package/dist/storage/index.js.map +1 -1
- package/dist/storage/migration/copy-and-verify.d.ts +39 -0
- package/dist/storage/migration/copy-and-verify.d.ts.map +1 -0
- package/dist/storage/migration/copy-and-verify.js +94 -0
- package/dist/storage/migration/copy-and-verify.js.map +1 -0
- package/dist/storage/migration/dto/storage-migration.dto.d.ts +73 -0
- package/dist/storage/migration/dto/storage-migration.dto.d.ts.map +1 -0
- package/dist/storage/migration/dto/storage-migration.dto.js +34 -0
- package/dist/storage/migration/dto/storage-migration.dto.js.map +1 -0
- package/dist/storage/migration/index.d.ts +11 -0
- package/dist/storage/migration/index.d.ts.map +1 -0
- package/dist/storage/migration/index.js +27 -0
- package/dist/storage/migration/index.js.map +1 -0
- package/dist/storage/migration/storage-migrate-object.handler.d.ts +40 -0
- package/dist/storage/migration/storage-migrate-object.handler.d.ts.map +1 -0
- package/dist/storage/migration/storage-migrate-object.handler.js +177 -0
- package/dist/storage/migration/storage-migrate-object.handler.js.map +1 -0
- package/dist/storage/migration/storage-migrate-plan.handler.d.ts +34 -0
- package/dist/storage/migration/storage-migrate-plan.handler.d.ts.map +1 -0
- package/dist/storage/migration/storage-migrate-plan.handler.js +168 -0
- package/dist/storage/migration/storage-migrate-plan.handler.js.map +1 -0
- package/dist/storage/migration/storage-migration-settled.listener.d.ts +15 -0
- package/dist/storage/migration/storage-migration-settled.listener.d.ts.map +1 -0
- package/dist/storage/migration/storage-migration-settled.listener.js +87 -0
- package/dist/storage/migration/storage-migration-settled.listener.js.map +1 -0
- package/dist/storage/migration/storage-migration.constants.d.ts +69 -0
- package/dist/storage/migration/storage-migration.constants.d.ts.map +1 -0
- package/dist/storage/migration/storage-migration.constants.js +83 -0
- package/dist/storage/migration/storage-migration.constants.js.map +1 -0
- package/dist/storage/migration/storage-migration.controller.d.ts +26 -0
- package/dist/storage/migration/storage-migration.controller.d.ts.map +1 -0
- package/dist/storage/migration/storage-migration.controller.js +135 -0
- package/dist/storage/migration/storage-migration.controller.js.map +1 -0
- package/dist/storage/migration/storage-migration.service.d.ts +182 -0
- package/dist/storage/migration/storage-migration.service.d.ts.map +1 -0
- package/dist/storage/migration/storage-migration.service.js +444 -0
- package/dist/storage/migration/storage-migration.service.js.map +1 -0
- package/dist/storage/ports.d.ts +1 -1
- package/dist/storage/ports.d.ts.map +1 -1
- package/package.json +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,36 @@
|
|
|
1
1
|
# @marinoscar/platform-api
|
|
2
2
|
|
|
3
|
+
## 0.1.0-next.27
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 3c48c78: Add copy-only storage provider migration (#1093). An administrator starts a run from one storage driver to another (`POST /api/admin/storage/migrations`, `storage_config:write`; list, get and cancel need `storage_config:read` / `storage_config:write`); every `ready` object recorded on the source is copied by streaming, verified (byte count and sha256 of the bytes read back from the target), and only then repointed, while the source object is left in place as a fallback. Platform migration `0042_add_storage_migrations` adds `storage_migration_runs` and `storage_migration_items` (both under forced row-level security on `org_id`; an item links to its object by the composite `(object_id, org_id)` key) and the raw-SQL partial unique index `storage_migration_runs_active_uniq_idx`, so at most one run is pending or running (a second start is a 409 naming `details.activeRunId`). Two server-only job types do the work: `storage.migrate_plan` (one per run, lists the objects and queues them, resumable) and `storage.migrate_object` (one per object, `skipDedup`, background priority). A cancelled run stops before its next unclaimed object, and a re-run skips objects already on the target. The contract gains the run wire shapes, and `StorageConfigPage` gains a migration panel with live progress and run history.
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Updated dependencies [3c48c78]
|
|
12
|
+
- @marinoscar/platform-contract@0.1.0-next.27
|
|
13
|
+
- @marinoscar/platform-ai-providers@0.1.0-next.27
|
|
14
|
+
|
|
15
|
+
## 0.1.0-next.26
|
|
16
|
+
|
|
17
|
+
### Minor Changes
|
|
18
|
+
|
|
19
|
+
- e61179b: Notifications: dismiss-on-disable, dismiss-all and the `sync` stream frame (#1090). Settings: namespace `onWrite` hooks (#1105).
|
|
20
|
+
|
|
21
|
+
- 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`.
|
|
22
|
+
- 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`.
|
|
23
|
+
- 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`.
|
|
24
|
+
- Contract: `NOTIFICATION_LIST_STATUSES`, `NOTIFICATION_SSE_SYNC_EVENT`, `NOTIFICATION_SYNC_REASONS`, `dismissAllNotificationsSchema`, `dismissAllResultSchema`, `notificationSyncFrameSchema`, and `status` on `notificationListQuerySchema`.
|
|
25
|
+
- Web: `connectNotificationStream` takes `onSync`; `NotificationProvider` refetches on a `sync` frame and `useNotifications` gains `dismissAll(scopeId?)`; `getNotifications` accepts `status`.
|
|
26
|
+
|
|
27
|
+
### Patch Changes
|
|
28
|
+
|
|
29
|
+
- 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.
|
|
30
|
+
- Updated dependencies [e61179b]
|
|
31
|
+
- @marinoscar/platform-contract@0.1.0-next.26
|
|
32
|
+
- @marinoscar/platform-ai-providers@0.1.0-next.26
|
|
33
|
+
|
|
3
34
|
## 0.1.0-next.25
|
|
4
35
|
|
|
5
36
|
### 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
|
-
*
|
|
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
|
-
*
|
|
6
|
-
*
|
|
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
|
|
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,
|
|
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
|
-
*
|
|
8
|
+
* The caller as a {@link RequestUser}, whatever guards ran (issue #1103).
|
|
7
9
|
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
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
|
|
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
|
|
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":";;;
|
|
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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"platform-model-ownership.d.ts","sourceRoot":"","sources":["../../src/manifest/platform-model-ownership.ts"],"names":[],"mappings":"AAyBA,OAAO,EAA0B,KAAK,iBAAiB,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"platform-model-ownership.d.ts","sourceRoot":"","sources":["../../src/manifest/platform-model-ownership.ts"],"names":[],"mappings":"AAyBA,OAAO,EAA0B,KAAK,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAiK/E;;;;;;GAMG;AACH,eAAO,MAAM,wBAAwB,EAAE,SAAS,iBAAiB,EAc/D,CAAC;AAEH;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,8BAA8B,CAAC,MAAM,SAAS,MAAM,EAAE,SAAS,GAAE,SAAS,iBAAiB,CAAC,MAAM,CAAC,EAAO,GAAG,IAAI,CAGhI"}
|
|
@@ -155,6 +155,23 @@ const WEBHOOKS_MODEL_OWNERSHIP = [
|
|
|
155
155
|
rationale: "One event's delivery to one endpoint, carrying the event body. Carries the endpoint's org_id (a policy cannot join through its parent); NULL for a system-scope endpoint's deliveries, visible to the system client only.",
|
|
156
156
|
},
|
|
157
157
|
];
|
|
158
|
+
/**
|
|
159
|
+
* The storage slice's copy-only provider migration tables (#1093), under
|
|
160
|
+
* forced row-level security on `org_id`.
|
|
161
|
+
*/
|
|
162
|
+
const STORAGE_MIGRATION_MODEL_OWNERSHIP = [
|
|
163
|
+
{
|
|
164
|
+
model: 'StorageMigrationRun',
|
|
165
|
+
kind: 'org',
|
|
166
|
+
orgField: 'orgId',
|
|
167
|
+
rationale: 'A copy-only storage provider migration run. Deployment-wide today, so its nullable org_id is NULL and the policy shows the row to the system client only; the column lets a future organization-owned run need no migration.',
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
model: 'StorageMigrationItem',
|
|
171
|
+
kind: 'org',
|
|
172
|
+
rationale: "One object of a migration run. Carries its object's org_id (a policy cannot join through its parent) and a composite foreign key (object_id, org_id) to the object, so an item can never point at another organisation's object.",
|
|
173
|
+
},
|
|
174
|
+
];
|
|
158
175
|
/**
|
|
159
176
|
* Every platform model's ownership kind (`org`, `org-optional`, `user` or
|
|
160
177
|
* `system`), in registration order: the base inventory, then the sharing,
|
|
@@ -174,6 +191,8 @@ exports.PLATFORM_MODEL_OWNERSHIP = Object.freeze([
|
|
|
174
191
|
...index_2.ANDROID_APP_MODEL_OWNERSHIP,
|
|
175
192
|
// The webhooks slice's two org tables (#1046).
|
|
176
193
|
...WEBHOOKS_MODEL_OWNERSHIP,
|
|
194
|
+
// The storage slice's provider-migration tables (#1093).
|
|
195
|
+
...STORAGE_MIGRATION_MODEL_OWNERSHIP,
|
|
177
196
|
]);
|
|
178
197
|
/**
|
|
179
198
|
* Registers {@link PLATFORM_MODEL_OWNERSHIP} in core's
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"platform-model-ownership.js","sourceRoot":"","sources":["../../src/manifest/platform-model-ownership.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,4EAA4E;AAC5E,gFAAgF;AAChF,EAAE;AACF,gDAAgD;AAChD,oDAAoD;AACpD,EAAE;AACF,gFAAgF;AAChF,6EAA6E;AAC7E,4DAA4D;AAC5D,yDAAyD;AACzD,oDAAoD;AACpD,EAAE;AACF,4CAA4C;AAC5C,gFAAgF;AAChF,6EAA6E;AAC7E,6EAA6E;AAC7E,4EAA4E;AAC5E,uDAAuD;AACvD,2EAA2E;AAC3E,8EAA8E;AAC9E,4EAA4E;AAC5E,wBAAwB;AACxB,gFAAgF;;;
|
|
1
|
+
{"version":3,"file":"platform-model-ownership.js","sourceRoot":"","sources":["../../src/manifest/platform-model-ownership.ts"],"names":[],"mappings":";A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AC;AACpC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"platform-user-owned-models.d.ts","sourceRoot":"","sources":["../../src/manifest/platform-user-owned-models.ts"],"names":[],"mappings":"AAwBA,OAAO,EAA2B,KAAK,iBAAiB,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"platform-user-owned-models.d.ts","sourceRoot":"","sources":["../../src/manifest/platform-user-owned-models.ts"],"names":[],"mappings":"AAwBA,OAAO,EAA2B,KAAK,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAoOhF;;;;;;GAMG;AACH,eAAO,MAAM,0BAA0B,EAAE,SAAS,iBAAiB,EAcjE,CAAC;AAEH;;;;;;;;;;;;;;;;;;GAkBG;AACH,wBAAgB,+BAA+B,CAAC,MAAM,SAAS,MAAM,EAAE,SAAS,GAAE,SAAS,iBAAiB,CAAC,MAAM,CAAC,EAAO,GAAG,IAAI,CAGjI"}
|
|
@@ -226,6 +226,19 @@ const WEBHOOKS_USER_OWNED_MODELS = [
|
|
|
226
226
|
rationale: "The user's own outbound webhook destinations. Deleting the user deletes the endpoint (Cascade) and, through it, its deliveries. The signing secret lives in the credentials store and is never a column.",
|
|
227
227
|
},
|
|
228
228
|
];
|
|
229
|
+
/**
|
|
230
|
+
* The storage slice's provider-migration run (#1093): it records who started
|
|
231
|
+
* and who cancelled it (SetNull), and is a deployment artifact, not user data.
|
|
232
|
+
*/
|
|
233
|
+
const STORAGE_MIGRATION_USER_OWNED_MODELS = [
|
|
234
|
+
{
|
|
235
|
+
model: 'StorageMigrationRun',
|
|
236
|
+
actorFields: ['startedById', 'cancelledById'],
|
|
237
|
+
purge: 'detach',
|
|
238
|
+
export: 'exclude',
|
|
239
|
+
rationale: 'A deployment-wide storage provider migration; it records who started it and who cancelled it.',
|
|
240
|
+
},
|
|
241
|
+
];
|
|
229
242
|
/**
|
|
230
243
|
* Every platform model with a foreign key to `User`, with its role, purge and
|
|
231
244
|
* export policy, in registration order: the base inventory, then the sharing,
|
|
@@ -245,6 +258,8 @@ exports.PLATFORM_USER_OWNED_MODELS = Object.freeze([
|
|
|
245
258
|
...index_2.ANDROID_APP_USER_OWNED_MODELS,
|
|
246
259
|
// The webhooks slice's endpoint table (#1046).
|
|
247
260
|
...WEBHOOKS_USER_OWNED_MODELS,
|
|
261
|
+
// The storage slice's provider-migration run (#1093).
|
|
262
|
+
...STORAGE_MIGRATION_USER_OWNED_MODELS,
|
|
248
263
|
]);
|
|
249
264
|
/**
|
|
250
265
|
* Registers {@link PLATFORM_USER_OWNED_MODELS} in core's
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"platform-user-owned-models.js","sourceRoot":"","sources":["../../src/manifest/platform-user-owned-models.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,2EAA2E;AAC3E,gFAAgF;AAChF,EAAE;AACF,4EAA4E;AAC5E,4EAA4E;AAC5E,+EAA+E;AAC/E,6EAA6E;AAC7E,uDAAuD;AACvD,EAAE;AACF,kDAAkD;AAClD,yEAAyE;AACzE,0EAA0E;AAC1E,8EAA8E;AAC9E,8EAA8E;AAC9E,qBAAqB;AACrB,EAAE;AACF,8EAA8E;AAC9E,2EAA2E;AAC3E,0EAA0E;AAC1E,0EAA0E;AAC1E,wBAAwB;AACxB,gFAAgF;;;
|
|
1
|
+
{"version":3,"file":"platform-user-owned-models.js","sourceRoot":"","sources":["../../src/manifest/platform-user-owned-models.ts"],"names":[],"mappings":";AAAA,gFAAgF;AAChF,2EAA2E;AAC3E,gFAAgF;AAChF,EAAE;AACF,4EAA4E;AAC5E,4EAA4E;AAC5E,+EAA+E;AAC/E,6EAA6E;AAC7E,uDAAuD;AACvD,EAAE;AACF,kDAAkD;AAClD,yEAAyE;AACzE,0EAA0E;AAC1E,8EAA8E;AAC9E,8EAA8E;AAC9E,qBAAqB;AACrB,EAAE;AACF,8EAA8E;AAC9E,2EAA2E;AAC3E,0EAA0E;AAC1E,0EAA0E;AAC1E,wBAAwB;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;QACjB,SAAS,EAAE,uEAAuE;KACnF;CACF,CAAC;AAEF;;;GAGG;AACH,MAAM,0BAA0B,GAAiC;IAC/D;QACE,KAAK,EAAE,iBAAiB;QACxB,UAAU,EAAE,aAAa;QACzB,aAAa,EAAE,OAAO;QACtB,KAAK,EAAE,QAAQ;QACf,MAAM,EAAE,SAAS;QACjB,SAAS,EACP,0MAA0M;KAC7M;CACF,CAAC;AAEF;;;GAGG;AACH,MAAM,mCAAmC,GAAiC;IACxE;QACE,KAAK,EAAE,qBAAqB;QAC5B,WAAW,EAAE,CAAC,aAAa,EAAE,eAAe,CAAC;QAC7C,KAAK,EAAE,QAAQ;QACf,MAAM,EAAE,SAAS;QACjB,SAAS,EAAE,+FAA+F;KAC3G;CACF,CAAC;AAEF;;;;;;GAMG;AACU,QAAA,0BAA0B,GAAiC,MAAM,CAAC,MAAM,CAAC;IACpF,GAAG,sBAAsB;IACzB,qCAAqC;IACrC,GAAG,iCAAyB;IAC5B,yCAAyC;IACzC,GAAG,kCAA0B;IAC7B,+CAA+C;IAC/C,GAAG,qCAA6B;IAChC,yCAAyC;IACzC,GAAG,qCAA6B;IAChC,+CAA+C;IAC/C,GAAG,0BAA0B;IAC7B,sDAAsD;IACtD,GAAG,mCAAmC;CACvC,CAAC,CAAC;AAEH;;;;;;;;;;;;;;;;;;GAkBG;AACH,SAAgB,+BAA+B,CAAwB,YAAkD,EAAE;IACzH,IAAA,+BAAuB,EAAC,kCAA0B,CAAC,CAAC;IACpD,IAAA,+BAAuB,EAAC,SAAS,CAAC,CAAC;AACrC,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":"
|
|
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,+
|
|
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,gBA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}
|
|
@@ -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.
|
|
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;AAC9B,uHAAA,8BAA8B,OAAA;AAC9B,gHAAA,uBAAuB,OAAA;AACvB,oHAAA,2BAA2B,OAAA;AAC3B,gHAAA,uBAAuB,OAAA;AACvB,qHAAA,4BAA4B,OAAA;AAC5B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+HAAA,qBAAqB,OAAA;AAAE,8HAAA,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"}
|