ActionRun
ActionRun = {
kind:"update";values:Record<string,unknown>; } | {kind:"delete"; } | {kind:"link";to:AppAddress; } | {href:string;kind:"link"; } | {kind:"ai";prompt?:string;writes:string; }
Defined in: packages/schema/src/model.ts:908
What a named action does in the app: set fields of the record (update), delete it (delete), go to an address in
the app (link with to), open a link that leaves it (link with href), {field} replaced by the record’s
values, or have the model write a field (ai). Without it the app runs a handler it registered by name.
Union Members
Section titled “Union Members”Type Literal
Section titled “Type Literal”{ kind: "update"; values: Record<string, unknown>; }
kind:
"update"
Updates the record.
values
Section titled “values”values:
Record<string,unknown>
The fields it sets, by name; a value that is exactly {input} is that input’s answer.
Type Literal
Section titled “Type Literal”{ kind: "delete"; }
kind:
"delete"
Deletes the record, soft deleting when the resource does.
Type Literal
Section titled “Type Literal”{ kind: "link"; to: AppAddress; }
kind:
"link"
Goes to an address in the app.
to:
AppAddress
The address, with {field} replaced by the record’s values.
Type Literal
Section titled “Type Literal”{ href: string; kind: "link"; }
href:
string
The link (https:, mailto:), with {field} replaced by the record’s values, percent-encoded; or only {field},
the https: or http: URL the record holds, without which the action does not show.
kind:
"link"
Opens a link that leaves the app, an https: or http: one in a new tab without the referrer.
Type Literal
Section titled “Type Literal”{ kind: "ai"; prompt?: string; writes: string; }
kind:
"ai"
Has the model write one field of the record from prompt, {field} replaced by the record’s values, as the user.
prompt?
Section titled “prompt?”
optionalprompt?:string
The prompt, with {field} placeholders; /meta leaves it out.
writes
Section titled “writes”writes:
string
The field it writes.