From 95a5a85c9570272de9be460d65fa1e7fbfdebfe9 Mon Sep 17 00:00:00 2001 From: Daniel Salazar Date: Wed, 30 Sep 2026 15:23:57 -0700 Subject: [PATCH] docs: notification examples use notif:app-user, which apps can read --- src/docs/src/Events.md | 4 ++-- src/docs/src/Events/fetch.md | 8 ++++---- .../src/playground/examples/events-fetch-then-listen.html | 4 ++-- src/docs/src/playground/examples/events-fetch.html | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/docs/src/Events.md b/src/docs/src/Events.md index c13364d3f..d396739f3 100644 --- a/src/docs/src/Events.md +++ b/src/docs/src/Events.md @@ -20,7 +20,7 @@ What you watch is written as a subject string: | `fs:~/Documents` | Everything under a folder, or one file by path or uid | | `fs:~/inbox/*.json:add` | Matching paths, one kind of change | | `kv:cart` | One key in your app's key-value store (`kv:cart*` for a prefix) | -| `notif:account` | The user's notifications | +| `notif:app-user` | Notifications about the user's use of your app | See [`onLocal()`](/Events/onLocal/#subjects) for the full subject syntax, the event shape, and how to share key-value events with another user. @@ -239,7 +239,7 @@ With the [User-Pays Model](/user-pays-model/), deliveries are billed to the user let seen = 0; do { const page = await puter.events.fetch({ - subject: 'notif:account', + subject: 'notif:app-user', after, }); for (const event of page.items) { diff --git a/src/docs/src/Events/fetch.md b/src/docs/src/Events/fetch.md index fe71ae764..857b76264 100644 --- a/src/docs/src/Events/fetch.md +++ b/src/docs/src/Events/fetch.md @@ -21,7 +21,7 @@ puter.events.fetch(options) #### `options` (Object) (required) -- `subject` (String) (required): What to read: `notif:account` (the account's notifications), `notif:app-user` (the ones belonging to the app you're running as), or `notif::`. Audiences are `account`, `developer` (about an app, sent to its owner), and `app-user` (about your data inside an app). +- `subject` (String) (required): What to read: `notif:app-user` (the ones belonging to the app you're running as), `notif:developer` (about your app, for its owner), or `notif::`. Audiences are `account`, `developer` (about an app, sent to its owner), and `app-user` (about your data inside an app). Apps and websites never see `account` notifications: `notif:account` returns an empty page for them. - `after` (String): The `cursor` from the previous page. Leave it off to start from the oldest notification still kept. - `limit` (Number): Events per page. Defaults to 50, max 200. @@ -68,7 +68,7 @@ The promise rejects with `{ message, code }`: `fetch_unsupported_subject` for `f let seen = 0; do { const page = await puter.events.fetch({ - subject: 'notif:account', + subject: 'notif:app-user', after, }); for (const event of page.items) { @@ -103,10 +103,10 @@ The promise rejects with `{ message, code }`: `fetch_unsupported_subject` for `f // Live first, so nothing arriving during the catch-up is lost — // `id` is what makes the overlap harmless. - const sub = await puter.events.onLocal('notif:account', + const sub = await puter.events.onLocal('notif:app-user', ({ event }) => show(event)); - const page = await puter.events.fetch({ subject: 'notif:account' }); + const page = await puter.events.fetch({ subject: 'notif:app-user' }); page.items.forEach(show); await sub.off(); diff --git a/src/docs/src/playground/examples/events-fetch-then-listen.html b/src/docs/src/playground/examples/events-fetch-then-listen.html index c0b00dc07..daf4be80c 100644 --- a/src/docs/src/playground/examples/events-fetch-then-listen.html +++ b/src/docs/src/playground/examples/events-fetch-then-listen.html @@ -13,10 +13,10 @@ // Live first, so nothing arriving during the catch-up is lost — // `id` is what makes the overlap harmless. - const sub = await puter.events.onLocal('notif:account', + const sub = await puter.events.onLocal('notif:app-user', ({ event }) => show(event)); - const page = await puter.events.fetch({ subject: 'notif:account' }); + const page = await puter.events.fetch({ subject: 'notif:app-user' }); page.items.forEach(show); await sub.off(); diff --git a/src/docs/src/playground/examples/events-fetch.html b/src/docs/src/playground/examples/events-fetch.html index 202c02daf..b3ba09545 100644 --- a/src/docs/src/playground/examples/events-fetch.html +++ b/src/docs/src/playground/examples/events-fetch.html @@ -7,7 +7,7 @@ let seen = 0; do { const page = await puter.events.fetch({ - subject: 'notif:account', + subject: 'notif:app-user', after, }); for (const event of page.items) {