Sanity Library Reference Docs
Preparing search index...
@sanity/workflow-engine
define
defineAction
Function defineAction
defineAction
(
action
:
{
description
?:
string
;
effects
?:
{
bindings
?:
{
[
key
:
string
]:
string
}
;
description
?:
string
;
input
?:
{
[
key
:
string
]:
unknown
}
;
name
:
string
;
outputs
?:
FieldShape
[]
;
title
?:
string
;
}
[]
;
filter
?:
string
;
group
?:
GroupMembership
;
name
:
string
;
ops
?:
AuthoringOp
[]
;
params
?:
{
description
?:
string
;
name
:
string
;
options
?:
ChoiceOptions
;
required
?:
boolean
;
title
?:
string
;
type
:
|
"string"
|
"number"
|
"boolean"
|
"actor"
|
"url"
|
"doc.ref"
|
"doc.refs"
|
"dateTime"
|
"json"
;
validation
?:
ScalarValidation
;
}
[]
;
semantics
?:
ActionSemantic
[]
;
spawn
?:
{
context
?:
{
[
key
:
string
]:
string
}
;
definition
:
{
name
:
string
;
version
?:
number
|
"latest"
}
;
forEach
:
string
;
onExit
?:
"detach"
|
"abort"
;
with
?:
{
[
key
:
string
]:
string
}
;
}
;
title
?:
string
;
when
?:
string
;
}
&
{
roles
?:
string
[]
;
status
?:
TerminalActivityStatus
}
,
)
:
{
description
?:
string
;
effects
?:
{
bindings
?:
{
[
key
:
string
]:
string
}
;
description
?:
string
;
input
?:
{
[
key
:
string
]:
unknown
}
;
name
:
string
;
outputs
?:
FieldShape
[]
;
title
?:
string
;
}
[]
;
filter
?:
string
;
group
?:
GroupMembership
;
name
:
string
;
ops
?:
AuthoringOp
[]
;
params
?:
{
description
?:
string
;
name
:
string
;
options
?:
ChoiceOptions
;
required
?:
boolean
;
title
?:
string
;
type
:
|
"string"
|
"number"
|
"boolean"
|
"actor"
|
"url"
|
"doc.ref"
|
"doc.refs"
|
"dateTime"
|
"json"
;
validation
?:
ScalarValidation
;
}
[]
;
semantics
?:
ActionSemantic
[]
;
spawn
?:
{
context
?:
{
[
key
:
string
]:
string
}
;
definition
:
{
name
:
string
;
version
?:
number
|
"latest"
}
;
forEach
:
string
;
onExit
?:
"detach"
|
"abort"
;
with
?:
{
[
key
:
string
]:
string
}
;
}
;
title
?:
string
;
when
?:
string
;
}
&
{
roles
?:
string
[]
;
status
?:
TerminalActivityStatus
}
Parameters
action
:
{
description
?:
string
;
effects
?:
{
bindings
?:
{
[
key
:
string
]:
string
}
;
description
?:
string
;
input
?:
{
[
key
:
string
]:
unknown
}
;
name
:
string
;
outputs
?:
FieldShape
[]
;
title
?:
string
;
}
[]
;
filter
?:
string
;
group
?:
GroupMembership
;
name
:
string
;
ops
?:
AuthoringOp
[]
;
params
?:
{
description
?:
string
;
name
:
string
;
options
?:
ChoiceOptions
;
required
?:
boolean
;
title
?:
string
;
type
:
|
"string"
|
"number"
|
"boolean"
|
"actor"
|
"url"
|
"doc.ref"
|
"doc.refs"
|
"dateTime"
|
"json"
;
validation
?:
ScalarValidation
;
}
[]
;
semantics
?:
ActionSemantic
[]
;
spawn
?:
{
context
?:
{
[
key
:
string
]:
string
}
;
definition
:
{
name
:
string
;
version
?:
number
|
"latest"
}
;
forEach
:
string
;
onExit
?:
"detach"
|
"abort"
;
with
?:
{
[
key
:
string
]:
string
}
;
}
;
title
?:
string
;
when
?:
string
;
}
&
{
roles
?:
string
[]
;
status
?:
TerminalActivityStatus
}
Returns
{
description
?:
string
;
effects
?:
{
bindings
?:
{
[
key
:
string
]:
string
}
;
description
?:
string
;
input
?:
{
[
key
:
string
]:
unknown
}
;
name
:
string
;
outputs
?:
FieldShape
[]
;
title
?:
string
;
}
[]
;
filter
?:
string
;
group
?:
GroupMembership
;
name
:
string
;
ops
?:
AuthoringOp
[]
;
params
?:
{
description
?:
string
;
name
:
string
;
options
?:
ChoiceOptions
;
required
?:
boolean
;
title
?:
string
;
type
:
|
"string"
|
"number"
|
"boolean"
|
"actor"
|
"url"
|
"doc.ref"
|
"doc.refs"
|
"dateTime"
|
"json"
;
validation
?:
ScalarValidation
;
}
[]
;
semantics
?:
ActionSemantic
[]
;
spawn
?:
{
context
?:
{
[
key
:
string
]:
string
}
;
definition
:
{
name
:
string
;
version
?:
number
|
"latest"
}
;
forEach
:
string
;
onExit
?:
"detach"
|
"abort"
;
with
?:
{
[
key
:
string
]:
string
}
;
}
;
title
?:
string
;
when
?:
string
;
}
&
{
roles
?:
string
[]
;
status
?:
TerminalActivityStatus
}
Settings
Member Visibility
Protected
Inherited
External
Theme
OS
Light
Dark
Sanity Library Reference Docs
Loading...