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?
optionalpanelId?: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?
optionalparentId?:string
Defined in: admin/src/actions/Action.ts:47
Parent record's id, for a resource nested under another.
listOptions?
optionallistOptions?: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?
optionalrecord?:AdminRecord
Defined in: admin/src/actions/Action.ts:54
Present for record (row/header-on-record) actions.
records?
optionalrecords?:AdminRecord[]
Defined in: admin/src/actions/Action.ts:56
Present for bulk actions — the selected records.
ids?
optionalids?:string[]
Defined in: admin/src/actions/Action.ts:58
Raw selected ids for bulk actions.
data?
optionaldata?:Record<string,unknown>
Defined in: admin/src/actions/Action.ts:60
Submitted modal-form values (present for actions declared with .form()).