@lunora/notify 1.0.0-alpha.77 → 1.0.0-alpha.78
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/dist/index.d.mts +4 -16
- package/dist/index.d.ts +4 -16
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -132,7 +132,7 @@ export const announce = action.input({ title: v.string(), body: v.string() }).ac
|
|
|
132
132
|
await ctx.push.send(subscriptionId, { title: "Hi", body: "…" });
|
|
133
133
|
```
|
|
134
134
|
|
|
135
|
-
`send` and `broadcast` take per-message
|
|
135
|
+
`send` and `broadcast` take per-message delivery hints, overriding the channel's `urgency` / `ttl`. Web Push sends them as the `Urgency` / `TTL` headers; FCM maps them to `android.priority` / `android.ttl`:
|
|
136
136
|
|
|
137
137
|
```ts
|
|
138
138
|
await ctx.push.broadcast({ title: "Approval needed", body: "…", urgency: "high", ttl: 3600 }, { userId });
|
package/dist/index.d.mts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FcmConfig } from '@visulima/notification/providers/fcm';
|
|
2
2
|
export type { FcmConfig } from '@visulima/notification/providers/fcm';
|
|
3
|
-
import {
|
|
3
|
+
import { PushSubscriptionLike, WebPushConfig } from '@visulima/notification/providers/web-push';
|
|
4
4
|
export type { PushSubscriptionLike, WebPushConfig } from '@visulima/notification/providers/web-push';
|
|
5
5
|
import { ChatPayload, Receipt, InAppPayload, PushPayload, NotificationMessage, WebhookPayload, Notification, Provider } from '@visulima/notification';
|
|
6
6
|
export type { ChatPayload, InAppPayload, NotificationMessage, PushPayload, Receipt, WebhookPayload } from '@visulima/notification';
|
|
@@ -376,22 +376,10 @@ interface PushOwner {
|
|
|
376
376
|
}
|
|
377
377
|
/**
|
|
378
378
|
* A push payload without its `to` target — the facade derives `to` from the
|
|
379
|
-
* stored subscription
|
|
379
|
+
* stored subscription. Its `ttl` / `urgency` override the channel defaults per
|
|
380
|
+
* message on every push transport (Web Push, FCM, APNs, Expo).
|
|
380
381
|
*/
|
|
381
|
-
|
|
382
|
-
/**
|
|
383
|
-
* Seconds the push service keeps this message for an offline device (the
|
|
384
|
-
* Web Push `TTL` header), overriding the channel's `ttl`. Web Push only: FCM
|
|
385
|
-
* targets ignore it.
|
|
386
|
-
*/
|
|
387
|
-
ttl?: number;
|
|
388
|
-
/**
|
|
389
|
-
* Delivery urgency of this message (the Web Push `Urgency` header),
|
|
390
|
-
* overriding the channel's `urgency` — e.g. `"high"` for an approval
|
|
391
|
-
* request, the default for the rest. Web Push only: FCM targets ignore it.
|
|
392
|
-
*/
|
|
393
|
-
urgency?: WebPushConfig["urgency"];
|
|
394
|
-
}
|
|
382
|
+
type PushContent = Omit<PushPayload, "to">;
|
|
395
383
|
/**
|
|
396
384
|
* The multi-channel notification facade — spliced onto ctx as `ctx.notify`.
|
|
397
385
|
* `send` delivers a fully-specified multi-channel message through the engine;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { FcmConfig } from '@visulima/notification/providers/fcm';
|
|
2
2
|
export type { FcmConfig } from '@visulima/notification/providers/fcm';
|
|
3
|
-
import {
|
|
3
|
+
import { PushSubscriptionLike, WebPushConfig } from '@visulima/notification/providers/web-push';
|
|
4
4
|
export type { PushSubscriptionLike, WebPushConfig } from '@visulima/notification/providers/web-push';
|
|
5
5
|
import { ChatPayload, Receipt, InAppPayload, PushPayload, NotificationMessage, WebhookPayload, Notification, Provider } from '@visulima/notification';
|
|
6
6
|
export type { ChatPayload, InAppPayload, NotificationMessage, PushPayload, Receipt, WebhookPayload } from '@visulima/notification';
|
|
@@ -376,22 +376,10 @@ interface PushOwner {
|
|
|
376
376
|
}
|
|
377
377
|
/**
|
|
378
378
|
* A push payload without its `to` target — the facade derives `to` from the
|
|
379
|
-
* stored subscription
|
|
379
|
+
* stored subscription. Its `ttl` / `urgency` override the channel defaults per
|
|
380
|
+
* message on every push transport (Web Push, FCM, APNs, Expo).
|
|
380
381
|
*/
|
|
381
|
-
|
|
382
|
-
/**
|
|
383
|
-
* Seconds the push service keeps this message for an offline device (the
|
|
384
|
-
* Web Push `TTL` header), overriding the channel's `ttl`. Web Push only: FCM
|
|
385
|
-
* targets ignore it.
|
|
386
|
-
*/
|
|
387
|
-
ttl?: number;
|
|
388
|
-
/**
|
|
389
|
-
* Delivery urgency of this message (the Web Push `Urgency` header),
|
|
390
|
-
* overriding the channel's `urgency` — e.g. `"high"` for an approval
|
|
391
|
-
* request, the default for the rest. Web Push only: FCM targets ignore it.
|
|
392
|
-
*/
|
|
393
|
-
urgency?: WebPushConfig["urgency"];
|
|
394
|
-
}
|
|
382
|
+
type PushContent = Omit<PushPayload, "to">;
|
|
395
383
|
/**
|
|
396
384
|
* The multi-channel notification facade — spliced onto ctx as `ctx.notify`.
|
|
397
385
|
* `send` delivers a fully-specified multi-channel message through the engine;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lunora/notify",
|
|
3
|
-
"version": "1.0.0-alpha.
|
|
3
|
+
"version": "1.0.0-alpha.78",
|
|
4
4
|
"description": "Multi-channel notifications for Lunora — ctx.notify / ctx.push over @visulima/notification: edge-safe Web Push + FCM, plus chat, in-app inbox and webhook channels, with subscription storage and queue-backed fan-out",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"cloudflare",
|