@warlock.js/notifications 4.2.10 → 4.2.11

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 (2) hide show
  1. package/CHANGELOG.md +6 -4
  2. package/package.json +5 -5
package/CHANGELOG.md CHANGED
@@ -6,13 +6,15 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/).
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## 4.2.11
10
+
9
11
  ### Changed
10
12
 
11
- - **In-app column mapping moved onto the model as `static columnMap`.** A notification model declares its physical columns once (`recipient` / `tenant` / `readAt` / `isRead`); `DatabaseNotification` accessors, `BaseNotificationsRepository` (read filter **and** write mapping), the `database` channel, and `notificationColumns` all derive from it — replacing the duplicated per-getter + `filterBy` column literals. New exported `NotificationColumnMap` type.
12
- - **Read-state is presence-based.** Declaring `readAt`, `isRead`, or both selects the representation (timestamp / indexed boolean / both); omitting both defaults to a `read_at` timestamp. The mode-agnostic `unread` filter replaces the `isRead` filter key on `inApp` and the repository.
13
- - **Multi-tenant support.** When the model declares a `tenant` column, the `database` channel reads the tenant value off the recipient and `createFor(recipientId, input, tenantId?)` writes it — no custom channel needed.
13
+ - In-app column mapping moved onto the model as `static columnMap` (`recipient` / `tenant` / `readAt` / `isRead`); accessors, the repository, the `database` channel, and `notificationColumns` all derive from it. New exported `NotificationColumnMap` type.
14
+ - Read-state is presence-based: declaring `readAt`, `isRead`, or both selects the representation; omitting both defaults to a `read_at` timestamp. The mode-agnostic `unread` filter replaces the `isRead` filter key.
15
+ - Multi-tenant support: when the model declares a `tenant` column, the `database` channel reads it off the recipient and `createFor(recipientId, input, tenantId?)` writes it.
14
16
  - `inApp.list` / `inApp.listUnread` now forward full list options (`page` / `limit` / `orderBy` + filters), not just filter keys.
15
- - `notificationColumns(model)` names the recipient / tenant / read-state columns from `columnMap`; the SQL-vs-MongoDB `dataSource` branch is removed (declare the column names in `columnMap` instead).
17
+ - `notificationColumns(model)` derives recipient / tenant / read-state columns from `columnMap`; the SQL-vs-MongoDB `dataSource` branch is removed.
16
18
 
17
19
  ## 4.2.0
18
20
 
package/package.json CHANGED
@@ -16,12 +16,12 @@
16
16
  "url": "https://github.com/warlockjs/notifications"
17
17
  },
18
18
  "dependencies": {
19
- "@warlock.js/cache": "4.2.10",
20
- "@warlock.js/cascade": "4.2.10",
21
- "@warlock.js/core": "4.2.10",
22
- "@warlock.js/logger": "4.2.10"
19
+ "@warlock.js/cache": "4.2.11",
20
+ "@warlock.js/cascade": "4.2.11",
21
+ "@warlock.js/core": "4.2.11",
22
+ "@warlock.js/logger": "4.2.11"
23
23
  },
24
- "version": "4.2.10",
24
+ "version": "4.2.11",
25
25
  "main": "./cjs/index.cjs",
26
26
  "module": "./esm/index.mjs",
27
27
  "types": "./esm/index.d.mts",