@astram/guide 0.2.21 → 0.2.22
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/CAPABILITIES.md +18 -3
- package/package.json +1 -1
package/CAPABILITIES.md
CHANGED
|
@@ -474,10 +474,25 @@ imports: [
|
|
|
474
474
|
(`{ announcement, personal, total }`), `POST /account/notifications/:uuid/read` (204),
|
|
475
475
|
`POST /account/notifications/read-all?category=` (`{ updated }`). Another user's or company's
|
|
476
476
|
notice is a 404, like a missing one. Restricted sessions (re-enrolment, mandatory 2FA) get 403.
|
|
477
|
+
- **Notification center (G-035):** the list also takes `kind`, `status=unread|read|archived`
|
|
478
|
+
(absent ⇒ not archived), `from` / `to` (UTC days `YYYY-MM-DD`, inclusive) and `search` (title or
|
|
479
|
+
body, case- and accent-insensitive, ≤ 100 characters; blank ⇒ no search); rows carry
|
|
480
|
+
`kindLabel`, `severity` and `archivedAt`. `GET /account/notifications/kinds` (`{ kinds: [{ kind,
|
|
481
|
+
label, category }] }`), `POST /account/notifications/:uuid/{unread,archive,unarchive}` (204;
|
|
482
|
+
archive also marks read, archived notices are never counted as unread) and `POST
|
|
483
|
+
/account/notifications/bulk` `{ action: read|unread|archive|unarchive, uuids (1–100) }` ⇒
|
|
484
|
+
`{ updated }` (only the caller's own notices in the active company change). Archive never
|
|
485
|
+
keeps a notice past retention. The scaffold's dropdowns show unread notices only and link to
|
|
486
|
+
the `/notifications` page; `server/src/notifications/app-notifications.service.ts` is an example
|
|
487
|
+
for posting your own.
|
|
477
488
|
- **Register your kinds** once: `ShieldModule.forRoot({ notificationKinds: [{ kind:
|
|
478
|
-
'naes.import_review', category: 'personal' }] })`.
|
|
479
|
-
(`^[a-z][a-z0-9_]*(\.[a-z][a-z0-9_]*)+$`, ≤ 64); `shield.` is
|
|
480
|
-
fails boot. `category` is `announcement` (release news,
|
|
489
|
+
'naes.import_review', category: 'personal', label: 'Import review', severity: 'warning' }] })`.
|
|
490
|
+
A kind is dotted lower-case (`^[a-z][a-z0-9_]*(\.[a-z][a-z0-9_]*)+$`, ≤ 64); `shield.` is
|
|
491
|
+
reserved. A bad or duplicate entry fails boot. `category` is `announcement` (release news,
|
|
492
|
+
notices to many) or `personal`. `label` (optional, 1–40 characters, plain text, shown to every
|
|
493
|
+
company: no company or person names) is the type users see; unset ⇒ made from the kind's last
|
|
494
|
+
segment (`Import review`), cut to 40 with "…", and boot logs one warning listing such kinds.
|
|
495
|
+
`severity` is `info` (default), `success` or `warning`; a bad label or severity fails boot.
|
|
481
496
|
- **Post** with `NotificationService` (inject `SHIELD_NOTIFICATIONS` from `@astram/guard`):
|
|
482
497
|
`post({ tenantId, recipients, kind, title, body?, link?, dedupeKey? }, { query? })` ⇒
|
|
483
498
|
`{ created, skipped }`. `post` trusts its caller: take `tenantId` (and the recipients) from the
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@astram/guide",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.22",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"description": "Astram framework — the AI/dev GUIDE layer (ADR-0025). Ships the framework's hard rules + capabilities manifest as installed, upgrade-refreshed docs. A consumer app's CLAUDE.md references FRAMEWORK_RULES.md from this package; `npm update` replaces it wholesale so new rules arrive cleanly, while the app's own .astram/guide/ layer is never touched. This is the framework-owned FLOOR: an app rule may tighten it, never weaken it.",
|
|
6
6
|
"type": "commonjs",
|