@productcraft/notify 0.0.0 → 0.1.1
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/README.md +1 -1
- package/api.md +141 -89
- package/dist/index.cjs +143 -88
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1748 -486
- package/dist/index.d.ts +1748 -486
- package/dist/index.js +143 -88
- package/dist/index.js.map +1 -1
- package/package.json +10 -5
package/README.md
CHANGED
|
@@ -56,7 +56,7 @@ const ids = page.data.map((item) => item.id);
|
|
|
56
56
|
if (ids.length) await me.inbox.mark({ ids, action: "read" });
|
|
57
57
|
```
|
|
58
58
|
|
|
59
|
-
`client({ token })` sends `Authorization: Bearer <token>` and nothing else: no API key, no environment fallback. It refuses a `pcft_` key. Tokens expire (one hour by default); fetch a new one when a call fails with `RECIPIENT_TOKEN_EXPIRED`. For a stateful inbox with real-time updates, use `@productcraft/notify-js` or `@productcraft/notify-react`
|
|
59
|
+
`client({ token })` sends `Authorization: Bearer <token>` and nothing else: no API key, no environment fallback. It refuses a `pcft_` key. Tokens expire (one hour by default); fetch a new one when a call fails with `RECIPIENT_TOKEN_EXPIRED`. For a stateful inbox with real-time updates, web push and preferences, use [`@productcraft/notify-js`](https://www.npmjs.com/package/@productcraft/notify-js) (browser and React Native) or [`@productcraft/notify-react`](https://www.npmjs.com/package/@productcraft/notify-react) (ready-made inbox and preference components); both are built on this package.
|
|
60
60
|
|
|
61
61
|
## Credentials
|
|
62
62
|
|