@klorad/notify
Rules over a scene's events raise alerts, addressed to Worlds and never wider than their scope.
import { createNotifier, inAppChannel } from "@klorad/notify";| Export | Kind | Description |
|---|---|---|
createNotifier(options) | function | Watches the scene and raises alerts. Returns a Notifier: alerts(), acknowledge(id, actor), stop(). |
Rule, Condition, ObjectFilter, Severity | type | A rule: id, name, condition, objects?, severity (info, warning, critical), worlds. |
Alert | type | id, ruleId, objectId, severity, title, at, worlds, and once acknowledged acknowledgedBy, acknowledgedAt. |
Channel | type | { id, deliver(alert) }. |
inAppChannel(limit?) | function | An in memory channel: list(worlds), subscribe(listener), update(alert). Keeps the last 200 by default. |
holds(condition, value), watches(rule, object) | function | The rule predicates, for your own tooling. |
Prop
Type
Not in 0.1: web push, email and SMS channels, escalation, quiet hours and persisted alerts.
Something wrong or unclear? Tell your contact at Prieston Technologies.