Dominevo
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.

MethodKindTierToken scopeViewer
emitmutationprotectedcreateno
updatemutationprotectedcreateno
listqueryprotectedviewno
getUnreadCountqueryprotectedviewno
markReadmutationprotectedcreateno
markAllReadmutationprotectedcreateno
dismissmutationprotectedcreateno

alerts.emit

  • Kind: mutation — POST /trpc/alerts.emit
  • Tier: protected — any signed-in principal whose scopes cover the method
  • Token scope: create on capability alerts, or category system
  • Viewer: no
  • Try it: open /system/api-explorer?method=alerts.emit on your hub

Input

AlertSchema

Output

void

Shapes: AlertSchema

alerts.update

  • Kind: mutation — POST /trpc/alerts.update
  • Tier: protected — any signed-in principal whose scopes cover the method
  • Token scope: create on capability alerts, or category system
  • Viewer: no
  • Try it: open /system/api-explorer?method=alerts.update on 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

void

Shapes: AlertSeveritySchema · AlertStatusSchema · AlertSourceSchema

alerts.list

  • Kind: query — GET /trpc/alerts.list
  • Tier: protected — any signed-in principal whose scopes cover the method
  • Token scope: view on capability alerts, or category system
  • Viewer: no
  • Try it: open /system/api-explorer?method=alerts.list on 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: view on capability alerts, or category system
  • Viewer: no
  • Try it: open /system/api-explorer?method=alerts.getUnreadCount on your hub

Input

void

Output

number

alerts.markRead

  • Kind: mutation — POST /trpc/alerts.markRead
  • Tier: protected — any signed-in principal whose scopes cover the method
  • Token scope: create on capability alerts, or category system
  • Viewer: no
  • Try it: open /system/api-explorer?method=alerts.markRead on your hub

Input

{ alertId: string }

Output

void

alerts.markAllRead

  • Kind: mutation — POST /trpc/alerts.markAllRead
  • Tier: protected — any signed-in principal whose scopes cover the method
  • Token scope: create on capability alerts, or category system
  • Viewer: no
  • Try it: open /system/api-explorer?method=alerts.markAllRead on your hub

Input

void

Output

void

alerts.dismiss

  • Kind: mutation — POST /trpc/alerts.dismiss
  • Tier: protected — any signed-in principal whose scopes cover the method
  • Token scope: create on capability alerts, or category system
  • Viewer: no
  • Try it: open /system/api-explorer?method=alerts.dismiss on your hub

Input

{ alertId: string }

Output

void