Skip to main content
zerotal

Documentation


Documentation / @zerotal/admin / index / ActionContext

Interface: ActionContext

Defined in: admin/src/actions/Action.ts:37

Everything a handler (or link/visibility resolver) receives.

Properties

resource

resource: typeof Resource

Defined in: admin/src/actions/Action.ts:38


page

page: ActionPage

Defined in: admin/src/actions/Action.ts:39


base

base: string

Defined in: admin/src/actions/Action.ts:41

Panel base path, e.g. "/admin".


slug

slug: string

Defined in: admin/src/actions/Action.ts:43

Resource slug, e.g. "users".


panelId?

optional panelId?: string

Defined in: admin/src/actions/Action.ts:45

Which panel this action is running on — a queued job needs it to resolve the resource.


parentId?

optional parentId?: string

Defined in: admin/src/actions/Action.ts:47

Parent record's id, for a resource nested under another.


listOptions?

optional listOptions?: ListOptions

Defined in: admin/src/actions/Action.ts:52

How the list page has currently scoped itself — search, sort, filters, tab, soft-delete mode. An export reads this so the file matches what's on screen.


record?

optional record?: AdminRecord

Defined in: admin/src/actions/Action.ts:54

Present for record (row/header-on-record) actions.


records?

optional records?: AdminRecord[]

Defined in: admin/src/actions/Action.ts:56

Present for bulk actions — the selected records.


ids?

optional ids?: string[]

Defined in: admin/src/actions/Action.ts:58

Raw selected ids for bulk actions.


data?

optional data?: Record<string, unknown>

Defined in: admin/src/actions/Action.ts:60

Submitted modal-form values (present for actions declared with .form()).