Push Tokens Table
Component Detail
Data Layer
low complexity
backend
0
Dependencies
2
Dependents
0
Entities
0
Integrations
Description
Backend repository managing CRUD operations against the push_tokens table. Supports one token record per user per device to enable multi-device dispatch, with upsert-on-refresh semantics and deletion on sign-out or token invalidation.
push-tokens-table
Responsibilities
- Upsert push token records keyed by user ID and device ID to handle refresh transparently
- Fetch all active tokens for a given user to support multi-device notification delivery
- Delete token by device ID on sign-out or explicit invalidation
- Delete all tokens for a user on account deletion or forced session revocation
Interfaces
upsertToken(userId, deviceId, token, platform)
getTokensByUserId(userId)
deleteToken(userId, deviceId)
deleteAllTokensForUser(userId)
Relationships
Dependents (2)
Components that depend on this component