Protocol definitions for push notification delivery, device management, and analytics.
Protocol definitions for push notification delivery, device management, and analytics.
(apns-send! this payload device-token)Send APNs notification. Returns {:success? bool :apns-id str :error map}
Send APNs notification. Returns {:success? bool :apns-id str :error map}
(apns-send-batch! this payload device-tokens)Send to multiple APNs devices. Returns per-token results.
Send to multiple APNs devices. Returns per-token results.
(cleanup-stale-tokens! this max-age-days)Purge tokens not used within max-age-days.
Purge tokens not used within max-age-days.
(get-devices-by-platform this platform opts)All devices for platform. opts: {:limit n :offset n}. Used by broadcast.
All devices for platform. opts: {:limit n :offset n}. Used by broadcast.
(get-user-devices this user-id)All active devices for user.
All active devices for user.
(mark-token-invalid! this device-token)Flag token as invalid after provider rejection.
Flag token as invalid after provider rejection.
(register-device! this user-id device-info)Store device token. device-info: {:token str :platform kw :app-id str}
Store device token. device-info: {:token str :platform kw :app-id str}
(unregister-device! this user-id device-token)Remove device token.
Remove device token.
(fcm-send! this payload)Send FCM message. Returns {:success? bool :message-id str :error map}
Send FCM message. Returns {:success? bool :message-id str :error map}
(fcm-send-multicast! this payload tokens)Send to multiple FCM tokens. Returns per-token results.
Send to multiple FCM tokens. Returns per-token results.
(fcm-validate-token this token)Dry-run send to check token validity.
Dry-run send to check token validity.
(cleanup-old-events! this retention-days)Purge analytics events older than retention-days.
Purge analytics events older than retention-days.
(get-push-stats this notification-id opts)Aggregate stats: sent/delivered/opened/failed counts.
Aggregate stats: sent/delivered/opened/failed counts.
(record-delivery! this event)Log client-reported delivery confirmation.
Log client-reported delivery confirmation.
(record-open! this event)Log client-reported notification open.
Log client-reported notification open.
(record-send! this event)Log send attempt with provider response.
Log send attempt with provider response.
(broadcast! this notification-id data opts)Send to all registered devices matching opts: {:platform kw, :app-id str}
Send to all registered devices matching opts: {:platform kw, :app-id str}
(schedule-push! this notification-id data opts scheduled-at)Schedule push for future delivery via jobs.
Schedule push for future delivery via jobs.
(send-push! this notification-id data opts)Enqueue push delivery for all user devices. opts: {:user-id uuid, :locale kw}
Enqueue push delivery for all user devices. opts: {:user-id uuid, :locale kw}
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |