Repository navigation
SubscriptionRepository
Viames Marino edited this page Feb 22, 2026
·
1 revision
Pair\Push\SubscriptionRepository manages push_subscriptions persistence.
Insert or update by endpoint.
Expected payload fields:
endpoint-
keys.p256dh(or top-levelp256dh) -
keys.auth(or top-levelauth)
If required fields are missing, it throws InvalidArgumentException.
Returns active subscriptions for user (revoked_at IS NULL).
Soft-revokes endpoint (revoked_at timestamp).
Hard delete by endpoint.
-
upsert()also refreshesupdated_atandlast_seen_at. -
user_agentis truncated to 255 chars. - endpoint must be unique in table design for correct upsert behavior.
See also: PushDispatcher, WebPushSender, PairPush.js.
Home · Setup · Configuration
Build with Pair 4
- Generator
- Controllers and responses
- Read models
- ActiveRecord and queries
- Forms and validation
- PairUI.js and HTML fragments
APIs and authentication
- API guide and CRUD
- Middleware and rate limits
- Users, sessions, and ACL
- Passkeys and social login
- Native mobile setup
Integrate and operate
- Integrations
- Runtime extensions and adapter keys
- Cache and cache stores
- Logs and observability
- PWA and push
- Packages and distribution
- Upgrade to v4