notifications
Alerting channels (email, Gotify, ntfy, Discord webhook, generic webhook), per-event routing and quiet hours. Credentials are write-only: a channel response never carries the secret it holds, only whether one is configured.
List notification channels
Every configured alerting destination.
Add a notification channel
A credential supplied in `secret` is encrypted with the machine key before it reaches the database and is never returned by any later read — `hasSecret` on the response is the only trace of it.
Get a notification channel
A single channel's current configuration, by id, secret excluded.
Replace a notification channel's configuration
A full replace, like the request body of createNotificationChannel: every type-specific field the request omits is cleared, not left as it was. `secret` is tri-state — omitted keeps the existing credential, `null` clears it, a string replaces it — since this is the one field a response never echoes back for a client to resend unchanged.
Remove a notification channel
Also removes every routing entry that named this channel.
Send a test notification through a channel
Sent immediately, outside the delivery queue and its retry policy — this is a synchronous probe of the channel's own configuration, not a routed event, so it reports success or the delivery error directly rather than being retried and logged like a routed notification. A test that succeeds is also recorded for the migration checklist (`getMigrationChecklist`), which counts a channel only while it is enabled and its latest successful test ran in a later second than the one the channel last changed in; a test that fails is not recorded.
Get the full per-event routing matrix
One entry per event type in the fixed event catalog, in the catalog's own order: every event type appears even before it has ever been routed anywhere, with its compiled-in default severity and an empty channel list.
Set one event type's severity and routed channels
A full replace of eventType's own row in the matrix: the channel list becomes exactly channelIds, and the severity becomes exactly severity — including reverting to the compiled-in default when the request's severity matches it, and un-routing every channel by sending an empty list, e.g. for `sync_succeeded`'s opt-in, off-by-default event.
Get the quiet hours configuration
The current quiet hours window and the always-on critical override.
Set the quiet hours window
`criticalAlwaysDelivers` is not part of the request body: the override that makes critical alerts always deliver cannot be disabled, so there is nothing for a client to set — the response always reports it `true`.
List in-app notification alerts
Unread alerts first, grouped by event type. Reads only the central database — never probes block devices.
Mark in-app alerts read
Marks every alert whose id is listed, or every alert when `all` is true (mark all as read). Omitted ids with `all` false is a no-op that returns the current unread count.