Reference
Push options
Fields accepted by `PushSender.send` for Web Push and FCM.
PushOptions is WebPushOptions | FcmPushOptions.
Pick the shape that matches your transport.
The one rule
Pass subscription to WebPushTransport and token to FcmTransport.
Shared fields
| Field | Type | Required |
|---|---|---|
title | string | yes |
body | string | yes |
data | Record<string, unknown> | no |
icon | string | no |
ttl | number | no |
messageId | string | no |
Web Push
| Field | Type | Required |
|---|---|---|
subscription | PushSubscription | yes |
A subscription contains endpoint, keys.p256dh, and keys.auth.
FCM
| Field | Type | Required |
|---|---|---|
token | string | yes |
image | string | no |
FCM stringifies non-string data values before send.
Result
| Field | Type | Notes |
|---|---|---|
messageId | string | Provider or client id |
status | string | e.g. "accepted" |
response | string | Often the HTTP status or FCM name |
provider | string? | "webpush" / "fcm"; set by fallback |
providerIndex | number? | Fallback chain index |
Map any channel result with channel send result.