Skip to content

ActionModel

ActionModel = object

Defined in: packages/schema/src/model.ts:1471

A named action of a view (.actions((a) => ...)); see Named actions.

bulk: boolean

Defined in: packages/schema/src/model.ts:1486

Whether the action is offered for the rows selected in the list, running on each it applies to (bulk).


optional confirm?: string

Defined in: packages/schema/src/model.ts:1484

The question the button asks before it runs the action.


optional icon?: string

Defined in: packages/schema/src/model.ts:1482

The button’s icon: archive, arrow-right-left, ban, bath, bed, bell, bookmark, calendar, camera, copy, cpu, door-open, download, external-link, file-text, hard-drive, heart, house, key, land-plot, leaf, memory, network, play, plug, power, restart, ruler, send, server, stop, tag, terminal, upload, wallet or wrench; another name shows a lightning bolt.


optional inputs?: ActionInputModel[]

Defined in: packages/schema/src/model.ts:1501

What the button asks for in a dialog before the action runs: a handler gets the answers as values, an update writes them through set.


label: string

Defined in: packages/schema/src/model.ts:1475

The button’s label.


optional mailbox?: boolean

Defined in: packages/schema/src/model.ts:1506

Whether the handler sends mail from the person’s own mailbox (mailbox: true): its dialog offers to connect one instead of running while none is linked.


name: string

Defined in: packages/schema/src/model.ts:1473

The action’s name, which <Action name="..." /> and handlers use.


optional otherwise?: "hide" | "disable"

Defined in: packages/schema/src/model.ts:1493

What the button does on a record when does not hold for: it is left out, or shown disabled with reason.


optional reason?: string

Defined in: packages/schema/src/model.ts:1495

Why the button is disabled on a record when does not hold for, shown to the user.


optional run?: ActionRun

Defined in: packages/schema/src/model.ts:1499

What it does; without it the app runs the handler registered under name.


optional variant?: "danger"

Defined in: packages/schema/src/model.ts:1497

danger draws an action that destroys or interrupts something, such as Force off, in red.


optional when?: string

Defined in: packages/schema/src/model.ts:1491

An AIP-160 condition over the record’s own fields, as status = 'running', for the records the action applies to. It only decides what the buttons show; the API’s access rules decide what may run.