ReferenceHTTP API
alerts
The alerts router: 7 methods of the alerts capability, with tier, scope, input and output.
Capability alerts · scope system · mode singleton · source packages/types/src/capabilities/alerts.cap.ts:78.
Every method is called at /trpc/alerts.<method> — queries with GET, mutations with POST. See How to call and Authorization.
| Method | Kind | Tier | Token scope | Viewer |
|---|---|---|---|---|
emit | mutation | protected | create | no |
update | mutation | protected | create | no |
list | query | protected | view | no |
getUnreadCount | query | protected | view | no |
markRead | mutation | protected | create | no |
markAllRead | mutation | protected | create | no |
dismiss | mutation | protected | create | no |
alerts.emit
- Kind: mutation —
POST /trpc/alerts.emit - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
createon capabilityalerts, or categorysystem - Viewer: no
- Try it: open
/system/api-explorer?method=alerts.emiton your hub
Input
AlertSchemaOutput
voidShapes: AlertSchema
alerts.update
- Kind: mutation —
POST /trpc/alerts.update - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
createon capabilityalerts, or categorysystem - Viewer: no
- Try it: open
/system/api-explorer?method=alerts.updateon your hub
Input
{ alertId: string; patch: { id?: string; category?: string; severity?: AlertSeveritySchema; title?: string; message?: string; action?: { label: string; href?: string; invoke?: { addonId: string; action: string; input?: Record<string, unknown> }; navigation?: "app" | "server" }; status?: AlertStatusSchema; progress?: number; read?: boolean; createdAt?: number; updatedAt?: number; source?: AlertSourceSchema; metadata?: Record<string, unknown> } }Output
voidShapes: AlertSeveritySchema · AlertStatusSchema · AlertSourceSchema
alerts.list
- Kind: query —
GET /trpc/alerts.list - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
viewon capabilityalerts, or categorysystem - Viewer: no
- Try it: open
/system/api-explorer?method=alerts.liston your hub
Input
{ unreadOnly?: boolean; limit?: number }?Output
AlertSchema[]Shapes: AlertSchema
alerts.getUnreadCount
- Kind: query —
GET /trpc/alerts.getUnreadCount - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
viewon capabilityalerts, or categorysystem - Viewer: no
- Try it: open
/system/api-explorer?method=alerts.getUnreadCounton your hub
Input
voidOutput
numberalerts.markRead
- Kind: mutation —
POST /trpc/alerts.markRead - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
createon capabilityalerts, or categorysystem - Viewer: no
- Try it: open
/system/api-explorer?method=alerts.markReadon your hub
Input
{ alertId: string }Output
voidalerts.markAllRead
- Kind: mutation —
POST /trpc/alerts.markAllRead - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
createon capabilityalerts, or categorysystem - Viewer: no
- Try it: open
/system/api-explorer?method=alerts.markAllReadon your hub
Input
voidOutput
voidalerts.dismiss
- Kind: mutation —
POST /trpc/alerts.dismiss - Tier: protected — any signed-in principal whose scopes cover the method
- Token scope:
createon capabilityalerts, or categorysystem - Viewer: no
- Try it: open
/system/api-explorer?method=alerts.dismisson your hub
Input
{ alertId: string }Output
void