A browser push subscription: the endpoint plus its encryption keys.
Mirrors what pushManager.subscribe() returns in the browser, flattened
for storage. Map your persistence row (Ecto schema, plain map, JSON body)
into this struct before calling WebPush.send/3:
%WebPush.Subscription{
endpoint: row.endpoint,
p256dh: row.p256dh,
auth: row.auth
}
Summary
Functions
Builds a subscription from the JSON shape the browser produces
({"endpoint": ..., "keys": {"p256dh": ..., "auth": ...}}), such as a
request body posted by your subscribe endpoint.
Types
Functions
Builds a subscription from the JSON shape the browser produces
({"endpoint": ..., "keys": {"p256dh": ..., "auth": ...}}), such as a
request body posted by your subscribe endpoint.
Returns {:error, :invalid_subscription} for any other shape.