ResourceWorkflowsApi
@gravity-rail/sdk / ResourceWorkflowsApi
Class: ResourceWorkflowsApi
Extends
Constructors
Constructor
new ResourceWorkflowsApi(
apiKey,baseUrl,customFetch?):ResourceWorkflowsApi
Parameters
apiKey
string | undefined
baseUrl
string
customFetch?
{(input, init?): Promise<Response>; (input, init?): Promise<Response>; }
Returns
ResourceWorkflowsApi
Inherited from
Methods
getResourceWorkflow()
getResourceWorkflow(
wid,workflowUuid):Promise<ResourceWorkflowSummary>
One Workflow's summary, for a viewer that can see it.
Parameters
wid
string
workflowUuid
string
Returns
Promise<ResourceWorkflowSummary>
getResourceWorkflowRevision()
getResourceWorkflowRevision(
wid,workflowUuid,revisionUuid):Promise<ResourceWorkflowDisclosureResponse|ResourceWorkflowGraphResponse>
One published revision.
The response is a union: the owner (or a full grantee) receives the
complete ResourceWorkflowGraphResponse, while a bounded grantee receives
the ResourceWorkflowDisclosureResponse envelope. Branch on publishedAt
being present — never assume the full shape. A retained revision stays
readable here after a stop_updates revocation.
Parameters
wid
string
workflowUuid
string
revisionUuid
string
Returns
Promise<ResourceWorkflowDisclosureResponse | ResourceWorkflowGraphResponse>
listResourceWorkflows()
listResourceWorkflows(
wid,params?):Promise<PaginatedResponseResourceWorkflowSummary>
List published Workflows owned by or shared with this workspace.
The Bundle draft editor reads publishedRevisionUuid from each summary to
pin a Workflow item; archived Workflows are excluded unless asked for.
Parameters
wid
string
params?
includeArchived?
boolean
page?
number
pageSize?
number
Returns
Promise<PaginatedResponseResourceWorkflowSummary>
setEnhancedAuthHandler()
setEnhancedAuthHandler(
handler):void
Set the handler for enhanced authentication requirements (RFC 9470 Step-Up Auth). This handler is called when a 401 response includes WWW-Authenticate header with error="insufficient_user_authentication".
Parameters
handler
EnhancedAuthHandler | undefined
Returns
void
Inherited from
BaseApiClient.setEnhancedAuthHandler
setOrgAuthHandler()
setOrgAuthHandler(
handler):void
Set the handler for organization authentication requirements. This handler is called when a 401 response includes WWW-Authenticate header with realm="org". The handler should redirect the user to complete org auth.
Parameters
handler
OrgAuthHandler | undefined
Returns
void
Inherited from
BaseApiClient.setOrgAuthHandler
setOrgSession()
setOrgSession(
session,orgUuid?):void
Set the opaque org session credential for cross-domain requests. Opaque gr_sess_ values use X-Org-Session. Legacy orgToken JWE values still use X-Org-Token through setOrgToken() during the migration window.
orgUuid is the org that issued the credential; passing it lets the 401
handler detect a stale session when a subsequent request targets a
different org and re-fire the org-auth handler instead of silently
401-ing. Callers without that context (legacy / unknown) may omit it.
Parameters
session
string | undefined
orgUuid?
string
Returns
void
Inherited from
setOrgToken()
setOrgToken(
token,orgUuid?):void
Parameters
token
string | undefined
orgUuid?
string
Returns
void
Deprecated
Legacy compatibility for stateless orgToken JWE credentials. Prefer setOrgSession() for opaque org browser sessions.
Inherited from
updateApiKey()
updateApiKey(
newApiKey):void
Update the API key (used after successful re-authentication).
Parameters
newApiKey
string
Returns
void