git mv rename (history preserved); install.sh + README updated. The skill is consumed via user-level install (~/.zcode/skills), so in-repo .agents discovery was unnecessary.
50 lines
2.3 KiB
Markdown
50 lines
2.3 KiB
Markdown
# Record Subscriptions
|
|
|
|
Digest/instant email subscriptions over table records. Full CRUD via
|
|
`subscription list/get/create/update/delete/events/send`.
|
|
|
|
## Commands
|
|
|
|
```bash
|
|
inkreach-teable subscription list
|
|
inkreach-teable subscription get <subscriptionId>
|
|
inkreach-teable subscription create --name "Daily escalations" --table-id tblXXX [options]
|
|
inkreach-teable subscription update <subscriptionId> [options]
|
|
inkreach-teable subscription delete <subscriptionId>
|
|
inkreach-teable subscription events <subscriptionId>
|
|
inkreach-teable subscription send <subscriptionId> # force a digest send now
|
|
```
|
|
|
|
## Options (create/update)
|
|
|
|
| Option | Meaning |
|
|
|--------|---------|
|
|
| `--name` | Display name |
|
|
| `--table-id` | Target table |
|
|
| `--no-watch-created` / `--no-watch-updated` | Exclude create/update events |
|
|
| `--field-ids '<json>'` | Restrict watched fields |
|
|
| `--record-ids '<json>'` | Restrict watched records |
|
|
| `--display-field-id <fld>` | Field shown in the digest row |
|
|
| `--attach-csv` / `--no-attach-csv` | Attach matching records as CSV |
|
|
| `--filter '<IFilter json>'` | Scope: only records matching this filter |
|
|
| `--trigger-on-enter` | Notify only on the transition INTO the filter condition (requires `--filter`); default is state semantics (every matching change) |
|
|
| `--send-mode digest\|instant` | Digest (batched on schedule) or instant email |
|
|
| `--recipients '<a@x.com,b@y.com>'` | Email recipients |
|
|
| `--no-notify-in-app` | Disable in-app notification |
|
|
| `--schedule-type daily\|weekly\|hours\|minutes` | Digest schedule kind |
|
|
| `--schedule-time HH:mm` | Daily/weekly fire time |
|
|
| `--schedule-weekday 0-6` | Weekly day (0 = Sunday) |
|
|
| `--schedule-interval n` | Interval for hours/minutes modes |
|
|
| `--inactive` | Create/update in inactive state |
|
|
|
|
## Semantics & gotchas
|
|
|
|
- `--filter` uses the SAME IFilter shape as view filters. Date values:
|
|
`{"mode":"exactDate","exactDate":"2026-08-21","timeZone":"Asia/Shanghai"}`.
|
|
User values are id arrays (`"Me"` resolves to the subscription creator).
|
|
- Filter fields must be **visible to the creator** (enforced server-side,
|
|
fail-closed: unknown operator or deleted field never matches).
|
|
- `--trigger-on-enter` implements "notify only when it starts matching"
|
|
(e.g. status turns critical); the default state semantics notify on every
|
|
matching change.
|