Skip to content

Commit c8373cd

Browse files
committed
docs(hook-bodies): the capability-inference table lists api.transaction and a read through a bound handle
Claude-Session: https://claude.ai/code/session_01ADHkmSwS4mQyXWrddL4r6B Co-authored-by: Claude <noreply@anthropic.com>
1 parent ffbc961 commit c8373cd

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

‎content/docs/automation/hook-bodies.mdx‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,9 @@ The extractor scans each body for known patterns and adds the matching capabilit
452452
| Pattern in source | Inferred capability |
453453
|---|---|
454454
| `*.object(…).find / findOne / count / aggregate / get / list` | `api.read` |
455+
| The same read leaves on a bound handle — `const h = ctx.api.object('x'); h.find(…)` | `api.read` |
455456
| `*.object(…).insert / update / updateById / updateMany / upsert / delete / deleteMany / patch / remove / create` | `api.write` |
457+
| `*.transaction(…)` — `ctx.api.transaction(…)`, the same call on an alias of `ctx.api` (`const api = ctx.api; api.transaction(…)`), `?.` allowed on either side, or the member destructured off it (`const { transaction } = ctx.api; transaction(…)`) | `api.transaction` |
456458
| `ctx.crypto.randomUUID` | `crypto.uuid` |
457459
| `ctx.log.info / warn / error / debug` | `log` |
458460
| `*.title(<argument>)` — the related-record form only; bare `ctx.title()` names this record and needs no token | `api.read` |

0 commit comments

Comments
 (0)