Sanity Library Reference Docs
Preparing search index...
@sanity/workflow-blueprint
workflowProvider
Variable workflowProvider
Const
workflowProvider
:
{
apiUrl
:
string
;
displayName
:
string
;
displayNamePlural
:
string
;
lifecycleConfig
:
{
defaultDeletionPolicy
:
"retain"
;
preventDetach
:
false
}
;
primaryIdentifierPath
:
string
;
requiresInitialization
:
true
;
resourceType
:
string
;
scope
:
null
;
(
helpers
:
{
log
:
(
...
args
:
[
level
:
"error"
|
"info"
|
"warn"
,
message
:
string
,
metadata
?:
Record
<
string
,
unknown
>
,
]
,
)
=>
unknown
;
}
,
)
:
{
create
(
state
:
{
assets
:
Record
<
string
,
unknown
>
;
desired
:
WorkflowsResource
}
,
context
:
{
environment
:
"test"
|
"production"
|
"staging"
;
token
:
string
;
}
,
)
:
Promise
<
|
{
cause
?:
Error
;
error
:
string
;
success
:
false
}
|
{
externalId
:
string
;
providerMetadata
:
Record
<
string
,
unknown
>
;
resource
:
ResolvedWorkflowResource
;
rollback
:
()
=>
Promise
<
|
{
cause
?:
Error
;
error
:
string
;
success
:
false
}
|
{
externalId
?:
string
;
success
:
true
}
,
>
;
success
:
true
;
}
,
>
;
destroy
(
state
:
{
current
:
WorkflowsResource
;
externalId
:
string
;
providerMetadata
:
Record
<
string
,
unknown
>
;
}
,
)
:
Promise
<
{
cause
?:
Error
;
error
:
string
;
success
:
false
}
>
;
init
(
state
:
{
assets
:
Record
<
string
,
unknown
>
;
desired
:
WorkflowsResource
}
,
context
:
{
environment
:
"test"
|
"production"
|
"staging"
;
token
:
string
;
}
,
)
:
Promise
<
|
{
cause
?:
Error
;
error
:
string
;
success
:
false
}
|
{
externalId
:
string
;
providerMetadata
:
Record
<
string
,
unknown
>
;
resource
:
ResolvedWorkflowResource
;
rollback
:
()
=>
Promise
<
|
{
cause
?:
Error
;
error
:
string
;
success
:
false
}
|
{
externalId
?:
string
;
success
:
true
}
,
>
;
success
:
true
;
}
,
>
;
list
()
:
Promise
<
{
cause
?:
Error
;
error
:
string
;
success
:
false
}
>
;
read
(
state
:
{
current
:
WorkflowsResource
;
externalId
:
string
;
providerMetadata
:
Record
<
string
,
unknown
>
;
}
,
context
:
{
environment
:
"test"
|
"production"
|
"staging"
;
token
:
string
;
}
,
)
:
Promise
<
|
{
cause
?:
Error
;
error
:
string
;
success
:
false
}
|
{
resource
:
ResolvedWorkflowResource
;
success
:
true
}
,
>
;
update
(
state
:
{
assets
:
Record
<
string
,
unknown
>
;
current
:
WorkflowsResource
;
desired
:
WorkflowsResource
;
externalId
:
string
;
providerMetadata
:
Record
<
string
,
unknown
>
;
}
,
context
:
{
environment
:
"test"
|
"production"
|
"staging"
;
token
:
string
;
}
,
)
:
Promise
<
|
{
cause
?:
Error
;
error
:
string
;
success
:
false
}
|
{
externalId
:
string
;
providerMetadata
:
Record
<
string
,
unknown
>
;
resource
:
ResolvedWorkflowResource
;
rollback
:
()
=>
Promise
<
|
{
cause
?:
Error
;
error
:
string
;
success
:
false
}
|
{
externalId
?:
string
;
success
:
true
}
,
>
;
success
:
true
;
}
,
>
;
validate
(
parameters
:
unknown
)
:
{
errors
:
string
[]
;
valid
:
boolean
}
;
validateDestroy
(
state
:
{
current
:
WorkflowsResource
;
externalId
:
string
;
providerMetadata
:
Record
<
string
,
unknown
>
;
}
,
)
:
{
errors
:
string
[]
;
valid
:
boolean
}
;
validateUpdate
(
state
:
Omit
<
__type
<
WorkflowsResource
>
,
"assets"
>
,
)
:
{
errors
:
string
[]
;
valid
:
boolean
}
;
}
;
}
= ...
Provider factory registered by the Blueprints API for
WORKFLOW_RESOURCE_TYPE
.
Type declaration
(
helpers
:
{
log
:
(
...
args
:
[
level
:
"error"
|
"info"
|
"warn"
,
message
:
string
,
metadata
?:
Record
<
string
,
unknown
>
,
]
,
)
=>
unknown
;
}
,
)
:
{
create
(
state
:
{
assets
:
Record
<
string
,
unknown
>
;
desired
:
WorkflowsResource
}
,
context
:
{
environment
:
"test"
|
"production"
|
"staging"
;
token
:
string
}
,
)
:
Promise
<
|
{
cause
?:
Error
;
error
:
string
;
success
:
false
}
|
{
externalId
:
string
;
providerMetadata
:
Record
<
string
,
unknown
>
;
resource
:
ResolvedWorkflowResource
;
rollback
:
()
=>
Promise
<
|
{
cause
?:
Error
;
error
:
string
;
success
:
false
}
|
{
externalId
?:
string
;
success
:
true
}
,
>
;
success
:
true
;
}
,
>
;
destroy
(
state
:
{
current
:
WorkflowsResource
;
externalId
:
string
;
providerMetadata
:
Record
<
string
,
unknown
>
;
}
,
)
:
Promise
<
{
cause
?:
Error
;
error
:
string
;
success
:
false
}
>
;
init
(
state
:
{
assets
:
Record
<
string
,
unknown
>
;
desired
:
WorkflowsResource
}
,
context
:
{
environment
:
"test"
|
"production"
|
"staging"
;
token
:
string
}
,
)
:
Promise
<
|
{
cause
?:
Error
;
error
:
string
;
success
:
false
}
|
{
externalId
:
string
;
providerMetadata
:
Record
<
string
,
unknown
>
;
resource
:
ResolvedWorkflowResource
;
rollback
:
()
=>
Promise
<
|
{
cause
?:
Error
;
error
:
string
;
success
:
false
}
|
{
externalId
?:
string
;
success
:
true
}
,
>
;
success
:
true
;
}
,
>
;
list
()
:
Promise
<
{
cause
?:
Error
;
error
:
string
;
success
:
false
}
>
;
read
(
state
:
{
current
:
WorkflowsResource
;
externalId
:
string
;
providerMetadata
:
Record
<
string
,
unknown
>
;
}
,
context
:
{
environment
:
"test"
|
"production"
|
"staging"
;
token
:
string
}
,
)
:
Promise
<
|
{
cause
?:
Error
;
error
:
string
;
success
:
false
}
|
{
resource
:
ResolvedWorkflowResource
;
success
:
true
}
,
>
;
update
(
state
:
{
assets
:
Record
<
string
,
unknown
>
;
current
:
WorkflowsResource
;
desired
:
WorkflowsResource
;
externalId
:
string
;
providerMetadata
:
Record
<
string
,
unknown
>
;
}
,
context
:
{
environment
:
"test"
|
"production"
|
"staging"
;
token
:
string
}
,
)
:
Promise
<
|
{
cause
?:
Error
;
error
:
string
;
success
:
false
}
|
{
externalId
:
string
;
providerMetadata
:
Record
<
string
,
unknown
>
;
resource
:
ResolvedWorkflowResource
;
rollback
:
()
=>
Promise
<
|
{
cause
?:
Error
;
error
:
string
;
success
:
false
}
|
{
externalId
?:
string
;
success
:
true
}
,
>
;
success
:
true
;
}
,
>
;
validate
(
parameters
:
unknown
)
:
{
errors
:
string
[]
;
valid
:
boolean
}
;
validateDestroy
(
state
:
{
current
:
WorkflowsResource
;
externalId
:
string
;
providerMetadata
:
Record
<
string
,
unknown
>
;
}
,
)
:
{
errors
:
string
[]
;
valid
:
boolean
}
;
validateUpdate
(
state
:
Omit
<
__type
<
WorkflowsResource
>
,
"assets"
>
,
)
:
{
errors
:
string
[]
;
valid
:
boolean
}
;
}
Parameters
helpers
:
{
log
:
(
...
args
:
[
level
:
"error"
|
"info"
|
"warn"
,
message
:
string
,
metadata
?:
Record
<
string
,
unknown
>
,
]
,
)
=>
unknown
;
}
Returns
{
create
(
state
:
{
assets
:
Record
<
string
,
unknown
>
;
desired
:
WorkflowsResource
}
,
context
:
{
environment
:
"test"
|
"production"
|
"staging"
;
token
:
string
}
,
)
:
Promise
<
|
{
cause
?:
Error
;
error
:
string
;
success
:
false
}
|
{
externalId
:
string
;
providerMetadata
:
Record
<
string
,
unknown
>
;
resource
:
ResolvedWorkflowResource
;
rollback
:
()
=>
Promise
<
|
{
cause
?:
Error
;
error
:
string
;
success
:
false
}
|
{
externalId
?:
string
;
success
:
true
}
,
>
;
success
:
true
;
}
,
>
;
destroy
(
state
:
{
current
:
WorkflowsResource
;
externalId
:
string
;
providerMetadata
:
Record
<
string
,
unknown
>
;
}
,
)
:
Promise
<
{
cause
?:
Error
;
error
:
string
;
success
:
false
}
>
;
init
(
state
:
{
assets
:
Record
<
string
,
unknown
>
;
desired
:
WorkflowsResource
}
,
context
:
{
environment
:
"test"
|
"production"
|
"staging"
;
token
:
string
}
,
)
:
Promise
<
|
{
cause
?:
Error
;
error
:
string
;
success
:
false
}
|
{
externalId
:
string
;
providerMetadata
:
Record
<
string
,
unknown
>
;
resource
:
ResolvedWorkflowResource
;
rollback
:
()
=>
Promise
<
|
{
cause
?:
Error
;
error
:
string
;
success
:
false
}
|
{
externalId
?:
string
;
success
:
true
}
,
>
;
success
:
true
;
}
,
>
;
list
()
:
Promise
<
{
cause
?:
Error
;
error
:
string
;
success
:
false
}
>
;
read
(
state
:
{
current
:
WorkflowsResource
;
externalId
:
string
;
providerMetadata
:
Record
<
string
,
unknown
>
;
}
,
context
:
{
environment
:
"test"
|
"production"
|
"staging"
;
token
:
string
}
,
)
:
Promise
<
|
{
cause
?:
Error
;
error
:
string
;
success
:
false
}
|
{
resource
:
ResolvedWorkflowResource
;
success
:
true
}
,
>
;
update
(
state
:
{
assets
:
Record
<
string
,
unknown
>
;
current
:
WorkflowsResource
;
desired
:
WorkflowsResource
;
externalId
:
string
;
providerMetadata
:
Record
<
string
,
unknown
>
;
}
,
context
:
{
environment
:
"test"
|
"production"
|
"staging"
;
token
:
string
}
,
)
:
Promise
<
|
{
cause
?:
Error
;
error
:
string
;
success
:
false
}
|
{
externalId
:
string
;
providerMetadata
:
Record
<
string
,
unknown
>
;
resource
:
ResolvedWorkflowResource
;
rollback
:
()
=>
Promise
<
|
{
cause
?:
Error
;
error
:
string
;
success
:
false
}
|
{
externalId
?:
string
;
success
:
true
}
,
>
;
success
:
true
;
}
,
>
;
validate
(
parameters
:
unknown
)
:
{
errors
:
string
[]
;
valid
:
boolean
}
;
validateDestroy
(
state
:
{
current
:
WorkflowsResource
;
externalId
:
string
;
providerMetadata
:
Record
<
string
,
unknown
>
;
}
,
)
:
{
errors
:
string
[]
;
valid
:
boolean
}
;
validateUpdate
(
state
:
Omit
<
__type
<
WorkflowsResource
>
,
"assets"
>
,
)
:
{
errors
:
string
[]
;
valid
:
boolean
}
;
}
apiUrl
:
string
displayName
:
string
displayNamePlural
:
string
lifecycleConfig
:
{
defaultDeletionPolicy
:
"retain"
;
preventDetach
:
false
}
primaryIdentifierPath
:
string
requiresInitialization
:
true
resourceType
:
string
scope
:
null
Settings
Member Visibility
Protected
Inherited
External
Theme
OS
Light
Dark
Sanity Library Reference Docs
Loading...
Provider factory registered by the Blueprints API for WORKFLOW_RESOURCE_TYPE.