Overview
Admin Notifications API provides real-time notification management for platform administrators. Notifications are triggered by key platform events (store approvals, payout requests, flagged reviews, order issues) and delivered via both in-app and email channels. All public functions require admin authorization. Location:convex/admins/adminNotifications.ts
Get Unread Notifications
Returns up to 50 unread notifications ordered by most recent. Designed for real-time subscription to power the notification bell indicator. No parameters required.Notification types:
store_approval, payout_request, review_flagged, order_issue. Priority levels: high, medium, low.Get All Notifications
Returns all notifications with offset-based pagination, ordered by most recent first.Get Notification Count
Returns the total number of unread notifications. Use this for badge counters. No parameters required.Mark As Read
Marks a single notification as read and records the read timestamp.Mark All As Read
Marks all unread notifications as read. Iterates through all notifications withisRead: false and updates each one.
No parameters required.
Delete Notification
Permanently deletes a notification from the database.Notifications are also created internally via
createNotification (an internal mutation) triggered by other platform events. When a notification is created, email delivery is automatically scheduled for all admins whose notification settings match the event category.