import type { AppContext } from '@voltro/runtime' // `documents` is `.with(tenant())`, so a keyed write to a row the caller may not // touch THROWS `TenantRowNotFound` rather than returning `null` — identically // whether the row is missing or belongs to another tenant. So there is no null // branch to write: it would be unreachable, and giving the two cases different // answers is what turns a keyed write into a cross-tenant existence oracle. const execute = async (input: { id: string; content: string }, ctx: AppContext) => ctx.store.update('documents', input.id, { content: input.content }) export default execute