askrobots / dbbasic-object-server
Public
Runs live, versioned Python application objects on one VM, with a suite of apps: projects, notes, tasks, files and more.
danq9
signup: the person chooses the password and name on the confirm page
83c7aa6
2 weeks, 5 days ago
History
notify_rules.json · 2.1 KB · 23 lines
| 1 | { |
| 2 | "name": "notify_rules", |
| 3 | "title": "Notify Rules", |
| 4 | "version": 1, |
| 5 | "description": "Declared event-pattern -> notification rules (plan/vocabulary/12-notify-spec.md). One row per rule: an event_pattern (<collection>.record.<created|updated|deleted>, * allowed per segment), an optional flat match {field:value} (ANDed; on an update, restricted to CHANGED fields so it fires on the transition), a recipients rule (owner/field/users/role), and channels (v1 delivers in_app: one notifications row per recipient; email waits on 01-email-adapter). Driven by object_notify + the daemon's process_notifications pass polling the record-change log -- no event-handler dependency. admin-owned: a rule can notify anyone, so only admins author them.", |
| 6 | "fields": [ |
| 7 | { "name": "id" }, |
| 8 | { "name": "name", "type": "text", "required": true, "label": "Name" }, |
| 9 | { "name": "enabled", "type": "boolean", "default": "true", "label": "Enabled" }, |
| 10 | { "name": "event_pattern", "type": "text", "required": true, "label": "Event Pattern", "help": "<collection>.record.<created|updated|deleted>; * allowed in the collection or action segment." }, |
| 11 | { "name": "match", "type": "textarea", "label": "Match Conditions (JSON)", "help": "Flat {field: value}, ANDed on equality. Omit for every record matching the pattern." }, |
| 12 | { "name": "recipients", "type": "textarea", "required": true, "label": "Recipients (JSON)", "help": "{mode: owner|field|users|role, ...}" }, |
| 13 | { "name": "suppress_self", "type": "boolean", "default": "true", "label": "Suppress Self", "help": "Skip the recipient who is the change's own actor." }, |
| 14 | { "name": "channels", "type": "textarea", "required": true, "label": "Channels (JSON)", "help": "[{channel: in_app, body_template}, ...]. v1 delivers in_app only." }, |
| 15 | { "name": "last_run_at", "type": "datetime", "label": "Last Run", "read_only": true }, |
| 16 | { "name": "created_at", "type": "datetime", "read_only": true, "label": "Created" }, |
| 17 | { "name": "updated_at", "type": "datetime", "read_only": true, "label": "Updated" } |
| 18 | ], |
| 19 | "views": { |
| 20 | "list_mode": "table", |
| 21 | "list_fields": ["name", "event_pattern", "enabled"] |
| 22 | } |
| 23 | } |