docs: added documentation pages for experimental features (#5671)
* docs: added documentation pages for experimental features * fix content lint issues * fixed lint errors * added migration step * added workflows introduction * add installation guides * added installation guides for modules + generated workflows reference * added missing workflows reference link * Added warning message for experimental features * fix note
This commit is contained in:
1
www/apps/docs/content/references/workflows/.nojekyll
Normal file
1
www/apps/docs/content/references/workflows/.nojekyll
Normal file
@@ -0,0 +1 @@
|
||||
TypeDoc added this file to prevent GitHub Pages from using Jekyll. You can turn off this behavior by setting the `githubPages` option to false.
|
||||
@@ -0,0 +1,74 @@
|
||||
---
|
||||
displayed_sidebar: workflowsSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# addError
|
||||
|
||||
[DistributedTransaction](../../classes/DistributedTransaction.mdx).addError
|
||||
|
||||
## Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "action",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "handlerType",
|
||||
"type": "[TransactionHandlerType](../../enums/TransactionHandlerType.mdx)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": [
|
||||
{
|
||||
"name": "COMPENSATE",
|
||||
"type": "`\"compensate\"`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "INVOKE",
|
||||
"type": "`\"invoke\"`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "error",
|
||||
"type": "`any`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
## Returns
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "void",
|
||||
"type": "`void`",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
@@ -0,0 +1,74 @@
|
||||
---
|
||||
displayed_sidebar: workflowsSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# addResponse
|
||||
|
||||
[DistributedTransaction](../../classes/DistributedTransaction.mdx).addResponse
|
||||
|
||||
## Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "action",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "handlerType",
|
||||
"type": "[TransactionHandlerType](../../enums/TransactionHandlerType.mdx)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": [
|
||||
{
|
||||
"name": "COMPENSATE",
|
||||
"type": "`\"compensate\"`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "INVOKE",
|
||||
"type": "`\"invoke\"`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "response",
|
||||
"type": "`unknown`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
## Returns
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "void",
|
||||
"type": "`void`",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
@@ -0,0 +1,23 @@
|
||||
---
|
||||
displayed_sidebar: workflowsSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# canInvoke
|
||||
|
||||
[DistributedTransaction](../../classes/DistributedTransaction.mdx).canInvoke
|
||||
|
||||
## Returns
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "boolean",
|
||||
"type": "`boolean`",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
@@ -0,0 +1,23 @@
|
||||
---
|
||||
displayed_sidebar: workflowsSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# canRevert
|
||||
|
||||
[DistributedTransaction](../../classes/DistributedTransaction.mdx).canRevert
|
||||
|
||||
## Returns
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "boolean",
|
||||
"type": "`boolean`",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
@@ -0,0 +1,23 @@
|
||||
---
|
||||
displayed_sidebar: workflowsSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# deleteCheckpoint
|
||||
|
||||
[DistributedTransaction](../../classes/DistributedTransaction.mdx).deleteCheckpoint
|
||||
|
||||
## Returns
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "Promise",
|
||||
"type": "Promise<void>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
@@ -0,0 +1,23 @@
|
||||
---
|
||||
displayed_sidebar: workflowsSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# getContext
|
||||
|
||||
[DistributedTransaction](../../classes/DistributedTransaction.mdx).getContext
|
||||
|
||||
## Returns
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "TransactionContext",
|
||||
"type": "[TransactionContext](../../classes/TransactionContext.mdx)",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
@@ -0,0 +1,66 @@
|
||||
---
|
||||
displayed_sidebar: workflowsSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# getErrors
|
||||
|
||||
[DistributedTransaction](../../classes/DistributedTransaction.mdx).getErrors
|
||||
|
||||
## Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "handlerType",
|
||||
"type": "[TransactionHandlerType](../../enums/TransactionHandlerType.mdx)",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": [
|
||||
{
|
||||
"name": "COMPENSATE",
|
||||
"type": "`\"compensate\"`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "INVOKE",
|
||||
"type": "`\"invoke\"`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]} />
|
||||
|
||||
## Returns
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "TransactionStepError[]",
|
||||
"type": "[TransactionStepError](../../classes/TransactionStepError.mdx)[]",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"expandable": false,
|
||||
"children": [
|
||||
{
|
||||
"name": "TransactionStepError",
|
||||
"type": "[TransactionStepError](../../classes/TransactionStepError.mdx)",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]} />
|
||||
@@ -0,0 +1,87 @@
|
||||
---
|
||||
displayed_sidebar: workflowsSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# getFlow
|
||||
|
||||
[DistributedTransaction](../../classes/DistributedTransaction.mdx).getFlow
|
||||
|
||||
## Returns
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "TransactionFlow",
|
||||
"type": "`object`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": [
|
||||
{
|
||||
"name": "definition",
|
||||
"type": "[TransactionStepsDefinition](../../types/TransactionStepsDefinition.mdx)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "hasFailedSteps",
|
||||
"type": "`boolean`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "hasSkippedSteps",
|
||||
"type": "`boolean`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "modelId",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "state",
|
||||
"type": "[TransactionState](../../enums/TransactionState.mdx)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "steps",
|
||||
"type": "`object`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "transactionId",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]} />
|
||||
@@ -0,0 +1,95 @@
|
||||
---
|
||||
displayed_sidebar: workflowsSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# getState
|
||||
|
||||
[DistributedTransaction](../../classes/DistributedTransaction.mdx).getState
|
||||
|
||||
## Returns
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "COMPENSATING",
|
||||
"type": "`\"compensating\"`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "DONE",
|
||||
"type": "`\"done\"`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "DORMANT",
|
||||
"type": "`\"dormant\"`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "FAILED",
|
||||
"type": "`\"failed\"`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "INVOKING",
|
||||
"type": "`\"invoking\"`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "NOT_STARTED",
|
||||
"type": "`\"not_started\"`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "REVERTED",
|
||||
"type": "`\"reverted\"`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "SKIPPED",
|
||||
"type": "`\"skipped\"`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "WAITING_TO_COMPENSATE",
|
||||
"type": "`\"waiting_to_compensate\"`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
@@ -0,0 +1,23 @@
|
||||
---
|
||||
displayed_sidebar: workflowsSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# hasFinished
|
||||
|
||||
[DistributedTransaction](../../classes/DistributedTransaction.mdx).hasFinished
|
||||
|
||||
## Returns
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "boolean",
|
||||
"type": "`boolean`",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
@@ -0,0 +1,47 @@
|
||||
---
|
||||
displayed_sidebar: workflowsSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# loadTransaction
|
||||
|
||||
[DistributedTransaction](../../classes/DistributedTransaction.mdx).loadTransaction
|
||||
|
||||
## Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "transactionId",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
## Returns
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "Promise",
|
||||
"type": "Promise<null \\| [TransactionCheckpoint](../../classes/TransactionCheckpoint.mdx)>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"expandable": false,
|
||||
"children": [
|
||||
{
|
||||
"name": "null \\| TransactionCheckpoint",
|
||||
"type": "`null` \\| [TransactionCheckpoint](../../classes/TransactionCheckpoint.mdx)",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]} />
|
||||
@@ -0,0 +1,33 @@
|
||||
---
|
||||
displayed_sidebar: workflowsSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# saveCheckpoint
|
||||
|
||||
[DistributedTransaction](../../classes/DistributedTransaction.mdx).saveCheckpoint
|
||||
|
||||
## Returns
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "Promise",
|
||||
"type": "Promise<[TransactionCheckpoint](../../classes/TransactionCheckpoint.mdx)>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"expandable": false,
|
||||
"children": [
|
||||
{
|
||||
"name": "TransactionCheckpoint",
|
||||
"type": "[TransactionCheckpoint](../../classes/TransactionCheckpoint.mdx)",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]} />
|
||||
@@ -0,0 +1,74 @@
|
||||
---
|
||||
displayed_sidebar: workflowsSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# addAction
|
||||
|
||||
[LocalWorkflow](../../classes/LocalWorkflow.mdx).addAction
|
||||
|
||||
## Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "action",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "handler",
|
||||
"type": "[StepHandler](../../types/StepHandler.mdx)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": [
|
||||
{
|
||||
"name": "compensate",
|
||||
"type": "[WorkflowStepHandler](../../types/WorkflowStepHandler.mdx)",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "invoke",
|
||||
"type": "[WorkflowStepHandler](../../types/WorkflowStepHandler.mdx)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "options",
|
||||
"type": "Partial<[TransactionStepsDefinition](../../types/TransactionStepsDefinition.mdx)>",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
## Returns
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "OrchestratorBuilder",
|
||||
"type": "[OrchestratorBuilder](../../classes/OrchestratorBuilder.mdx)",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
@@ -0,0 +1,83 @@
|
||||
---
|
||||
displayed_sidebar: workflowsSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# appendAction
|
||||
|
||||
[LocalWorkflow](../../classes/LocalWorkflow.mdx).appendAction
|
||||
|
||||
## Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "action",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "to",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "handler",
|
||||
"type": "[StepHandler](../../types/StepHandler.mdx)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": [
|
||||
{
|
||||
"name": "compensate",
|
||||
"type": "[WorkflowStepHandler](../../types/WorkflowStepHandler.mdx)",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "invoke",
|
||||
"type": "[WorkflowStepHandler](../../types/WorkflowStepHandler.mdx)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "options",
|
||||
"type": "Partial<[TransactionStepsDefinition](../../types/TransactionStepsDefinition.mdx)>",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
## Returns
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "OrchestratorBuilder",
|
||||
"type": "[OrchestratorBuilder](../../classes/OrchestratorBuilder.mdx)",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
@@ -0,0 +1,65 @@
|
||||
---
|
||||
displayed_sidebar: workflowsSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# assertHandler
|
||||
|
||||
[LocalWorkflow](../../classes/LocalWorkflow.mdx).assertHandler
|
||||
|
||||
## Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "handler",
|
||||
"type": "[StepHandler](../../types/StepHandler.mdx)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": [
|
||||
{
|
||||
"name": "compensate",
|
||||
"type": "[WorkflowStepHandler](../../types/WorkflowStepHandler.mdx)",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "invoke",
|
||||
"type": "[WorkflowStepHandler](../../types/WorkflowStepHandler.mdx)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "action",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
## Returns
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "void",
|
||||
"type": "`void`",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
@@ -0,0 +1,23 @@
|
||||
---
|
||||
displayed_sidebar: workflowsSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# commit
|
||||
|
||||
[LocalWorkflow](../../classes/LocalWorkflow.mdx).commit
|
||||
|
||||
## Returns
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "void",
|
||||
"type": "`void`",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
@@ -0,0 +1,46 @@
|
||||
---
|
||||
displayed_sidebar: workflowsSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# deleteAction
|
||||
|
||||
[LocalWorkflow](../../classes/LocalWorkflow.mdx).deleteAction
|
||||
|
||||
## Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "action",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "parentSteps",
|
||||
"type": "`any`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
## Returns
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "OrchestratorBuilder",
|
||||
"type": "[OrchestratorBuilder](../../classes/OrchestratorBuilder.mdx)",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
@@ -0,0 +1,83 @@
|
||||
---
|
||||
displayed_sidebar: workflowsSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# insertActionAfter
|
||||
|
||||
[LocalWorkflow](../../classes/LocalWorkflow.mdx).insertActionAfter
|
||||
|
||||
## Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "existingAction",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "action",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "handler",
|
||||
"type": "[StepHandler](../../types/StepHandler.mdx)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": [
|
||||
{
|
||||
"name": "compensate",
|
||||
"type": "[WorkflowStepHandler](../../types/WorkflowStepHandler.mdx)",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "invoke",
|
||||
"type": "[WorkflowStepHandler](../../types/WorkflowStepHandler.mdx)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "options",
|
||||
"type": "Partial<[TransactionStepsDefinition](../../types/TransactionStepsDefinition.mdx)>",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
## Returns
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "OrchestratorBuilder",
|
||||
"type": "[OrchestratorBuilder](../../classes/OrchestratorBuilder.mdx)",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
@@ -0,0 +1,83 @@
|
||||
---
|
||||
displayed_sidebar: workflowsSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# insertActionBefore
|
||||
|
||||
[LocalWorkflow](../../classes/LocalWorkflow.mdx).insertActionBefore
|
||||
|
||||
## Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "existingAction",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "action",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "handler",
|
||||
"type": "[StepHandler](../../types/StepHandler.mdx)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": [
|
||||
{
|
||||
"name": "compensate",
|
||||
"type": "[WorkflowStepHandler](../../types/WorkflowStepHandler.mdx)",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "invoke",
|
||||
"type": "[WorkflowStepHandler](../../types/WorkflowStepHandler.mdx)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "options",
|
||||
"type": "Partial<[TransactionStepsDefinition](../../types/TransactionStepsDefinition.mdx)>",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
## Returns
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "OrchestratorBuilder",
|
||||
"type": "[OrchestratorBuilder](../../classes/OrchestratorBuilder.mdx)",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
@@ -0,0 +1,46 @@
|
||||
---
|
||||
displayed_sidebar: workflowsSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# mergeActions
|
||||
|
||||
[LocalWorkflow](../../classes/LocalWorkflow.mdx).mergeActions
|
||||
|
||||
## Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "where",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "actions",
|
||||
"type": "`string`[]",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
## Returns
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "OrchestratorBuilder",
|
||||
"type": "[OrchestratorBuilder](../../classes/OrchestratorBuilder.mdx)",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
@@ -0,0 +1,46 @@
|
||||
---
|
||||
displayed_sidebar: workflowsSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# moveAction
|
||||
|
||||
[LocalWorkflow](../../classes/LocalWorkflow.mdx).moveAction
|
||||
|
||||
## Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "actionToMove",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "targetAction",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
## Returns
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "OrchestratorBuilder",
|
||||
"type": "[OrchestratorBuilder](../../classes/OrchestratorBuilder.mdx)",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
@@ -0,0 +1,46 @@
|
||||
---
|
||||
displayed_sidebar: workflowsSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# moveAndMergeNextAction
|
||||
|
||||
[LocalWorkflow](../../classes/LocalWorkflow.mdx).moveAndMergeNextAction
|
||||
|
||||
## Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "actionToMove",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "targetAction",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
## Returns
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "OrchestratorBuilder",
|
||||
"type": "[OrchestratorBuilder](../../classes/OrchestratorBuilder.mdx)",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
@@ -0,0 +1,37 @@
|
||||
---
|
||||
displayed_sidebar: workflowsSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# pruneAction
|
||||
|
||||
[LocalWorkflow](../../classes/LocalWorkflow.mdx).pruneAction
|
||||
|
||||
## Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "action",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
## Returns
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "OrchestratorBuilder",
|
||||
"type": "[OrchestratorBuilder](../../classes/OrchestratorBuilder.mdx)",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
@@ -0,0 +1,111 @@
|
||||
---
|
||||
displayed_sidebar: workflowsSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# registerStepFailure
|
||||
|
||||
[LocalWorkflow](../../classes/LocalWorkflow.mdx).registerStepFailure
|
||||
|
||||
## Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "idempotencyKey",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "error",
|
||||
"type": "`any`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "context",
|
||||
"type": "[Context](../../interfaces/Context.mdx)",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": [
|
||||
{
|
||||
"name": "enableNestedTransactions",
|
||||
"type": "`boolean`",
|
||||
"description": "A boolean value indicating whether nested transactions are enabled.",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "isolationLevel",
|
||||
"type": "`string`",
|
||||
"description": "A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "manager",
|
||||
"type": "`TManager`",
|
||||
"description": "An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "transactionId",
|
||||
"type": "`string`",
|
||||
"description": "A string indicating the ID of the current transaction.",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "transactionManager",
|
||||
"type": "`TManager`",
|
||||
"description": "An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]} />
|
||||
|
||||
## Returns
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "Promise",
|
||||
"type": "Promise<[DistributedTransaction](../../classes/DistributedTransaction.mdx)>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"expandable": false,
|
||||
"children": [
|
||||
{
|
||||
"name": "DistributedTransaction",
|
||||
"type": "[DistributedTransaction](../../classes/DistributedTransaction.mdx)",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]} />
|
||||
@@ -0,0 +1,111 @@
|
||||
---
|
||||
displayed_sidebar: workflowsSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# registerStepSuccess
|
||||
|
||||
[LocalWorkflow](../../classes/LocalWorkflow.mdx).registerStepSuccess
|
||||
|
||||
## Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "idempotencyKey",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "response",
|
||||
"type": "`unknown`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "context",
|
||||
"type": "[Context](../../interfaces/Context.mdx)",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": [
|
||||
{
|
||||
"name": "enableNestedTransactions",
|
||||
"type": "`boolean`",
|
||||
"description": "A boolean value indicating whether nested transactions are enabled.",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "isolationLevel",
|
||||
"type": "`string`",
|
||||
"description": "A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "manager",
|
||||
"type": "`TManager`",
|
||||
"description": "An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "transactionId",
|
||||
"type": "`string`",
|
||||
"description": "A string indicating the ID of the current transaction.",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "transactionManager",
|
||||
"type": "`TManager`",
|
||||
"description": "An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]} />
|
||||
|
||||
## Returns
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "Promise",
|
||||
"type": "Promise<[DistributedTransaction](../../classes/DistributedTransaction.mdx)>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"expandable": false,
|
||||
"children": [
|
||||
{
|
||||
"name": "DistributedTransaction",
|
||||
"type": "[DistributedTransaction](../../classes/DistributedTransaction.mdx)",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]} />
|
||||
@@ -0,0 +1,83 @@
|
||||
---
|
||||
displayed_sidebar: workflowsSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# replaceAction
|
||||
|
||||
[LocalWorkflow](../../classes/LocalWorkflow.mdx).replaceAction
|
||||
|
||||
## Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "existingAction",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "action",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "handler",
|
||||
"type": "[StepHandler](../../types/StepHandler.mdx)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": [
|
||||
{
|
||||
"name": "compensate",
|
||||
"type": "[WorkflowStepHandler](../../types/WorkflowStepHandler.mdx)",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "invoke",
|
||||
"type": "[WorkflowStepHandler](../../types/WorkflowStepHandler.mdx)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "options",
|
||||
"type": "Partial<[TransactionStepsDefinition](../../types/TransactionStepsDefinition.mdx)>",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
## Returns
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "OrchestratorBuilder",
|
||||
"type": "[OrchestratorBuilder](../../classes/OrchestratorBuilder.mdx)",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
@@ -0,0 +1,111 @@
|
||||
---
|
||||
displayed_sidebar: workflowsSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# run
|
||||
|
||||
[LocalWorkflow](../../classes/LocalWorkflow.mdx).run
|
||||
|
||||
## Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "uniqueTransactionId",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "input",
|
||||
"type": "`unknown`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "context",
|
||||
"type": "[Context](../../interfaces/Context.mdx)",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": [
|
||||
{
|
||||
"name": "enableNestedTransactions",
|
||||
"type": "`boolean`",
|
||||
"description": "A boolean value indicating whether nested transactions are enabled.",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "isolationLevel",
|
||||
"type": "`string`",
|
||||
"description": "A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "manager",
|
||||
"type": "`TManager`",
|
||||
"description": "An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "transactionId",
|
||||
"type": "`string`",
|
||||
"description": "A string indicating the ID of the current transaction.",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "transactionManager",
|
||||
"type": "`TManager`",
|
||||
"description": "An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]} />
|
||||
|
||||
## Returns
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "Promise",
|
||||
"type": "Promise<[DistributedTransaction](../../classes/DistributedTransaction.mdx)>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"expandable": false,
|
||||
"children": [
|
||||
{
|
||||
"name": "DistributedTransaction",
|
||||
"type": "[DistributedTransaction](../../classes/DistributedTransaction.mdx)",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]} />
|
||||
@@ -0,0 +1,46 @@
|
||||
---
|
||||
displayed_sidebar: workflowsSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# addAction
|
||||
|
||||
[OrchestratorBuilder](../../classes/OrchestratorBuilder.mdx).addAction
|
||||
|
||||
## Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "action",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "options",
|
||||
"type": "Partial<[TransactionStepsDefinition](../../types/TransactionStepsDefinition.mdx)>",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
## Returns
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "OrchestratorBuilder",
|
||||
"type": "[OrchestratorBuilder](../../classes/OrchestratorBuilder.mdx)",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
@@ -0,0 +1,55 @@
|
||||
---
|
||||
displayed_sidebar: workflowsSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# appendAction
|
||||
|
||||
[OrchestratorBuilder](../../classes/OrchestratorBuilder.mdx).appendAction
|
||||
|
||||
## Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "action",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "to",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "options",
|
||||
"type": "Partial<[TransactionStepsDefinition](../../types/TransactionStepsDefinition.mdx)>",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
## Returns
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "OrchestratorBuilder",
|
||||
"type": "[OrchestratorBuilder](../../classes/OrchestratorBuilder.mdx)",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
@@ -0,0 +1,155 @@
|
||||
---
|
||||
displayed_sidebar: workflowsSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# appendTo
|
||||
|
||||
[OrchestratorBuilder](../../classes/OrchestratorBuilder.mdx).appendTo
|
||||
|
||||
## Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "step",
|
||||
"type": "`string` \\| [InternalStep](../../interfaces/InternalStep.mdx)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "newStep",
|
||||
"type": "[InternalStep](../../interfaces/InternalStep.mdx)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": [
|
||||
{
|
||||
"name": "action",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "async",
|
||||
"type": "`boolean`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "continueOnPermanentFailure",
|
||||
"type": "`boolean`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "depth",
|
||||
"type": "`number`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "maxRetries",
|
||||
"type": "`number`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "next",
|
||||
"type": "[InternalStep](../../interfaces/InternalStep.mdx) \\| [InternalStep](../../interfaces/InternalStep.mdx)[]",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "noCompensation",
|
||||
"type": "`boolean`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "noWait",
|
||||
"type": "`boolean`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "parent",
|
||||
"type": "`null` \\| [InternalStep](../../interfaces/InternalStep.mdx)",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "retryInterval",
|
||||
"type": "`number`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "saveResponse",
|
||||
"type": "`boolean`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "timeout",
|
||||
"type": "`number`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]} />
|
||||
|
||||
## Returns
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "OrchestratorBuilder",
|
||||
"type": "[OrchestratorBuilder](../../classes/OrchestratorBuilder.mdx)",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
@@ -0,0 +1,114 @@
|
||||
---
|
||||
displayed_sidebar: workflowsSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# build
|
||||
|
||||
[OrchestratorBuilder](../../classes/OrchestratorBuilder.mdx).build
|
||||
|
||||
## Returns
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "TransactionStepsDefinition",
|
||||
"type": "`object`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": [
|
||||
{
|
||||
"name": "action",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "async",
|
||||
"type": "`boolean`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "continueOnPermanentFailure",
|
||||
"type": "`boolean`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "maxRetries",
|
||||
"type": "`number`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "next",
|
||||
"type": "[TransactionStepsDefinition](../../types/TransactionStepsDefinition.mdx) \\| [TransactionStepsDefinition](../../types/TransactionStepsDefinition.mdx)[]",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "noCompensation",
|
||||
"type": "`boolean`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "noWait",
|
||||
"type": "`boolean`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "retryInterval",
|
||||
"type": "`number`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "saveResponse",
|
||||
"type": "`boolean`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "timeout",
|
||||
"type": "`number`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]} />
|
||||
@@ -0,0 +1,155 @@
|
||||
---
|
||||
displayed_sidebar: workflowsSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# deleteAction
|
||||
|
||||
[OrchestratorBuilder](../../classes/OrchestratorBuilder.mdx).deleteAction
|
||||
|
||||
## Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "action",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "steps",
|
||||
"type": "[InternalStep](../../interfaces/InternalStep.mdx)",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": [
|
||||
{
|
||||
"name": "action",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "async",
|
||||
"type": "`boolean`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "continueOnPermanentFailure",
|
||||
"type": "`boolean`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "depth",
|
||||
"type": "`number`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "maxRetries",
|
||||
"type": "`number`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "next",
|
||||
"type": "[InternalStep](../../interfaces/InternalStep.mdx) \\| [InternalStep](../../interfaces/InternalStep.mdx)[]",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "noCompensation",
|
||||
"type": "`boolean`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "noWait",
|
||||
"type": "`boolean`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "parent",
|
||||
"type": "`null` \\| [InternalStep](../../interfaces/InternalStep.mdx)",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "retryInterval",
|
||||
"type": "`number`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "saveResponse",
|
||||
"type": "`boolean`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "timeout",
|
||||
"type": "`number`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]} />
|
||||
|
||||
## Returns
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "OrchestratorBuilder",
|
||||
"type": "[OrchestratorBuilder](../../classes/OrchestratorBuilder.mdx)",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
@@ -0,0 +1,146 @@
|
||||
---
|
||||
displayed_sidebar: workflowsSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# findLastStep
|
||||
|
||||
[OrchestratorBuilder](../../classes/OrchestratorBuilder.mdx).findLastStep
|
||||
|
||||
## Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "steps",
|
||||
"type": "[InternalStep](../../interfaces/InternalStep.mdx)",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": [
|
||||
{
|
||||
"name": "action",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "async",
|
||||
"type": "`boolean`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "continueOnPermanentFailure",
|
||||
"type": "`boolean`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "depth",
|
||||
"type": "`number`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "maxRetries",
|
||||
"type": "`number`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "next",
|
||||
"type": "[InternalStep](../../interfaces/InternalStep.mdx) \\| [InternalStep](../../interfaces/InternalStep.mdx)[]",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "noCompensation",
|
||||
"type": "`boolean`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "noWait",
|
||||
"type": "`boolean`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "parent",
|
||||
"type": "`null` \\| [InternalStep](../../interfaces/InternalStep.mdx)",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "retryInterval",
|
||||
"type": "`number`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "saveResponse",
|
||||
"type": "`boolean`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "timeout",
|
||||
"type": "`number`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]} />
|
||||
|
||||
## Returns
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "InternalStep",
|
||||
"type": "[InternalStep](../../interfaces/InternalStep.mdx)",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
@@ -0,0 +1,155 @@
|
||||
---
|
||||
displayed_sidebar: workflowsSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# findOrThrowStepByAction
|
||||
|
||||
[OrchestratorBuilder](../../classes/OrchestratorBuilder.mdx).findOrThrowStepByAction
|
||||
|
||||
## Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "action",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "steps",
|
||||
"type": "[InternalStep](../../interfaces/InternalStep.mdx)",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": [
|
||||
{
|
||||
"name": "action",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "async",
|
||||
"type": "`boolean`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "continueOnPermanentFailure",
|
||||
"type": "`boolean`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "depth",
|
||||
"type": "`number`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "maxRetries",
|
||||
"type": "`number`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "next",
|
||||
"type": "[InternalStep](../../interfaces/InternalStep.mdx) \\| [InternalStep](../../interfaces/InternalStep.mdx)[]",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "noCompensation",
|
||||
"type": "`boolean`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "noWait",
|
||||
"type": "`boolean`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "parent",
|
||||
"type": "`null` \\| [InternalStep](../../interfaces/InternalStep.mdx)",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "retryInterval",
|
||||
"type": "`number`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "saveResponse",
|
||||
"type": "`boolean`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "timeout",
|
||||
"type": "`number`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]} />
|
||||
|
||||
## Returns
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "InternalStep",
|
||||
"type": "[InternalStep](../../interfaces/InternalStep.mdx)",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
@@ -0,0 +1,155 @@
|
||||
---
|
||||
displayed_sidebar: workflowsSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# findParentStepByAction
|
||||
|
||||
[OrchestratorBuilder](../../classes/OrchestratorBuilder.mdx).findParentStepByAction
|
||||
|
||||
## Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "action",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "step",
|
||||
"type": "[InternalStep](../../interfaces/InternalStep.mdx)",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": [
|
||||
{
|
||||
"name": "action",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "async",
|
||||
"type": "`boolean`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "continueOnPermanentFailure",
|
||||
"type": "`boolean`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "depth",
|
||||
"type": "`number`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "maxRetries",
|
||||
"type": "`number`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "next",
|
||||
"type": "[InternalStep](../../interfaces/InternalStep.mdx) \\| [InternalStep](../../interfaces/InternalStep.mdx)[]",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "noCompensation",
|
||||
"type": "`boolean`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "noWait",
|
||||
"type": "`boolean`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "parent",
|
||||
"type": "`null` \\| [InternalStep](../../interfaces/InternalStep.mdx)",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "retryInterval",
|
||||
"type": "`number`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "saveResponse",
|
||||
"type": "`boolean`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "timeout",
|
||||
"type": "`number`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]} />
|
||||
|
||||
## Returns
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "undefined \\| InternalStep",
|
||||
"type": "`undefined` \\| [InternalStep](../../interfaces/InternalStep.mdx)",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
@@ -0,0 +1,155 @@
|
||||
---
|
||||
displayed_sidebar: workflowsSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# findStepByAction
|
||||
|
||||
[OrchestratorBuilder](../../classes/OrchestratorBuilder.mdx).findStepByAction
|
||||
|
||||
## Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "action",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "step",
|
||||
"type": "[InternalStep](../../interfaces/InternalStep.mdx)",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": [
|
||||
{
|
||||
"name": "action",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "async",
|
||||
"type": "`boolean`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "continueOnPermanentFailure",
|
||||
"type": "`boolean`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "depth",
|
||||
"type": "`number`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "maxRetries",
|
||||
"type": "`number`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "next",
|
||||
"type": "[InternalStep](../../interfaces/InternalStep.mdx) \\| [InternalStep](../../interfaces/InternalStep.mdx)[]",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "noCompensation",
|
||||
"type": "`boolean`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "noWait",
|
||||
"type": "`boolean`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "parent",
|
||||
"type": "`null` \\| [InternalStep](../../interfaces/InternalStep.mdx)",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "retryInterval",
|
||||
"type": "`number`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "saveResponse",
|
||||
"type": "`boolean`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "timeout",
|
||||
"type": "`number`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]} />
|
||||
|
||||
## Returns
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "undefined \\| InternalStep",
|
||||
"type": "`undefined` \\| [InternalStep](../../interfaces/InternalStep.mdx)",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
@@ -0,0 +1,55 @@
|
||||
---
|
||||
displayed_sidebar: workflowsSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# insertActionAfter
|
||||
|
||||
[OrchestratorBuilder](../../classes/OrchestratorBuilder.mdx).insertActionAfter
|
||||
|
||||
## Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "existingAction",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "action",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "options",
|
||||
"type": "Partial<[TransactionStepsDefinition](../../types/TransactionStepsDefinition.mdx)>",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
## Returns
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "OrchestratorBuilder",
|
||||
"type": "[OrchestratorBuilder](../../classes/OrchestratorBuilder.mdx)",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
@@ -0,0 +1,55 @@
|
||||
---
|
||||
displayed_sidebar: workflowsSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# insertActionBefore
|
||||
|
||||
[OrchestratorBuilder](../../classes/OrchestratorBuilder.mdx).insertActionBefore
|
||||
|
||||
## Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "existingAction",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "action",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "options",
|
||||
"type": "Partial<[TransactionStepsDefinition](../../types/TransactionStepsDefinition.mdx)>",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
## Returns
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "OrchestratorBuilder",
|
||||
"type": "[OrchestratorBuilder](../../classes/OrchestratorBuilder.mdx)",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
@@ -0,0 +1,128 @@
|
||||
---
|
||||
displayed_sidebar: workflowsSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# load
|
||||
|
||||
[OrchestratorBuilder](../../classes/OrchestratorBuilder.mdx).load
|
||||
|
||||
## Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "steps",
|
||||
"type": "[TransactionStepsDefinition](../../types/TransactionStepsDefinition.mdx)",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": [
|
||||
{
|
||||
"name": "action",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "async",
|
||||
"type": "`boolean`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "continueOnPermanentFailure",
|
||||
"type": "`boolean`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "maxRetries",
|
||||
"type": "`number`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "next",
|
||||
"type": "[TransactionStepsDefinition](../../types/TransactionStepsDefinition.mdx) \\| [TransactionStepsDefinition](../../types/TransactionStepsDefinition.mdx)[]",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "noCompensation",
|
||||
"type": "`boolean`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "noWait",
|
||||
"type": "`boolean`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "retryInterval",
|
||||
"type": "`number`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "saveResponse",
|
||||
"type": "`boolean`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "timeout",
|
||||
"type": "`number`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]} />
|
||||
|
||||
## Returns
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "OrchestratorBuilder",
|
||||
"type": "[OrchestratorBuilder](../../classes/OrchestratorBuilder.mdx)",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
@@ -0,0 +1,46 @@
|
||||
---
|
||||
displayed_sidebar: workflowsSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# mergeActions
|
||||
|
||||
[OrchestratorBuilder](../../classes/OrchestratorBuilder.mdx).mergeActions
|
||||
|
||||
## Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "where",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "actions",
|
||||
"type": "`string`[]",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
## Returns
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "OrchestratorBuilder",
|
||||
"type": "[OrchestratorBuilder](../../classes/OrchestratorBuilder.mdx)",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
@@ -0,0 +1,92 @@
|
||||
---
|
||||
displayed_sidebar: workflowsSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# move
|
||||
|
||||
[OrchestratorBuilder](../../classes/OrchestratorBuilder.mdx).move
|
||||
|
||||
## Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "actionToMove",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "targetAction",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "__namedParameters",
|
||||
"type": "`object`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": [
|
||||
{
|
||||
"name": "mergeNext",
|
||||
"type": "`boolean`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "runInParallel",
|
||||
"type": "`boolean`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "__namedParameters.mergeNext",
|
||||
"type": "`boolean`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "__namedParameters.runInParallel",
|
||||
"type": "`boolean`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
## Returns
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "OrchestratorBuilder",
|
||||
"type": "[OrchestratorBuilder](../../classes/OrchestratorBuilder.mdx)",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
@@ -0,0 +1,46 @@
|
||||
---
|
||||
displayed_sidebar: workflowsSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# moveAction
|
||||
|
||||
[OrchestratorBuilder](../../classes/OrchestratorBuilder.mdx).moveAction
|
||||
|
||||
## Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "actionToMove",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "targetAction",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
## Returns
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "OrchestratorBuilder",
|
||||
"type": "[OrchestratorBuilder](../../classes/OrchestratorBuilder.mdx)",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
@@ -0,0 +1,46 @@
|
||||
---
|
||||
displayed_sidebar: workflowsSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# moveAndMergeNextAction
|
||||
|
||||
[OrchestratorBuilder](../../classes/OrchestratorBuilder.mdx).moveAndMergeNextAction
|
||||
|
||||
## Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "actionToMove",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "targetAction",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
## Returns
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "OrchestratorBuilder",
|
||||
"type": "[OrchestratorBuilder](../../classes/OrchestratorBuilder.mdx)",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
@@ -0,0 +1,37 @@
|
||||
---
|
||||
displayed_sidebar: workflowsSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# pruneAction
|
||||
|
||||
[OrchestratorBuilder](../../classes/OrchestratorBuilder.mdx).pruneAction
|
||||
|
||||
## Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "action",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
## Returns
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "OrchestratorBuilder",
|
||||
"type": "[OrchestratorBuilder](../../classes/OrchestratorBuilder.mdx)",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
@@ -0,0 +1,55 @@
|
||||
---
|
||||
displayed_sidebar: workflowsSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# replaceAction
|
||||
|
||||
[OrchestratorBuilder](../../classes/OrchestratorBuilder.mdx).replaceAction
|
||||
|
||||
## Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "existingAction",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "action",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "options",
|
||||
"type": "Partial<[TransactionStepsDefinition](../../types/TransactionStepsDefinition.mdx)>",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
## Returns
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "OrchestratorBuilder",
|
||||
"type": "[OrchestratorBuilder](../../classes/OrchestratorBuilder.mdx)",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
@@ -0,0 +1,173 @@
|
||||
---
|
||||
displayed_sidebar: workflowsSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# updateDepths
|
||||
|
||||
[OrchestratorBuilder](../../classes/OrchestratorBuilder.mdx).updateDepths
|
||||
|
||||
## Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "startingStep",
|
||||
"type": "[InternalStep](../../interfaces/InternalStep.mdx)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": [
|
||||
{
|
||||
"name": "action",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "async",
|
||||
"type": "`boolean`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "continueOnPermanentFailure",
|
||||
"type": "`boolean`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "depth",
|
||||
"type": "`number`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "maxRetries",
|
||||
"type": "`number`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "next",
|
||||
"type": "[InternalStep](../../interfaces/InternalStep.mdx) \\| [InternalStep](../../interfaces/InternalStep.mdx)[]",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "noCompensation",
|
||||
"type": "`boolean`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "noWait",
|
||||
"type": "`boolean`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "parent",
|
||||
"type": "`null` \\| [InternalStep](../../interfaces/InternalStep.mdx)",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "retryInterval",
|
||||
"type": "`number`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "saveResponse",
|
||||
"type": "`boolean`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "timeout",
|
||||
"type": "`number`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "parent",
|
||||
"type": "`any`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "incr",
|
||||
"type": "`number`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "beginFrom",
|
||||
"type": "`number`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
## Returns
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "void",
|
||||
"type": "`void`",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
@@ -0,0 +1,67 @@
|
||||
---
|
||||
displayed_sidebar: workflowsSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# beginTransaction
|
||||
|
||||
[TransactionOrchestrator](../../classes/TransactionOrchestrator.mdx).beginTransaction
|
||||
|
||||
Create a new transaction
|
||||
|
||||
## Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "transactionId",
|
||||
"type": "`string`",
|
||||
"description": "unique identifier of the transaction",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "handler",
|
||||
"type": "[TransactionStepHandler](../../types/TransactionStepHandler.mdx)",
|
||||
"description": "function to handle action of the transaction",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "payload",
|
||||
"type": "`unknown`",
|
||||
"description": "payload to be passed to all the transaction steps",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
## Returns
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "Promise",
|
||||
"type": "Promise<[DistributedTransaction](../../classes/DistributedTransaction.mdx)>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"expandable": false,
|
||||
"children": [
|
||||
{
|
||||
"name": "DistributedTransaction",
|
||||
"type": "[DistributedTransaction](../../classes/DistributedTransaction.mdx)",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]} />
|
||||
@@ -0,0 +1,121 @@
|
||||
---
|
||||
displayed_sidebar: workflowsSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# cancelTransaction
|
||||
|
||||
[TransactionOrchestrator](../../classes/TransactionOrchestrator.mdx).cancelTransaction
|
||||
|
||||
Cancel and revert a transaction compensating all its executed steps. It can be an ongoing transaction or a completed one
|
||||
|
||||
## Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "transaction",
|
||||
"type": "[DistributedTransaction](../../classes/DistributedTransaction.mdx)",
|
||||
"description": "The transaction to be reverted",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": [
|
||||
{
|
||||
"name": "context",
|
||||
"type": "`any`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "errors",
|
||||
"type": "`any`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "flow",
|
||||
"type": "`any`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "handler",
|
||||
"type": "[TransactionStepHandler](../../types/TransactionStepHandler.mdx)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "modelId",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "payload",
|
||||
"type": "`any`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "transactionId",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "keyPrefix",
|
||||
"type": "`any`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "keyValueStore",
|
||||
"type": "`any`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]} />
|
||||
|
||||
## Returns
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "Promise",
|
||||
"type": "Promise<void>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
@@ -0,0 +1,37 @@
|
||||
---
|
||||
displayed_sidebar: workflowsSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# getKeyName
|
||||
|
||||
[TransactionOrchestrator](../../classes/TransactionOrchestrator.mdx).getKeyName
|
||||
|
||||
## Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "params",
|
||||
"type": "`string`[]",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
## Returns
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "string",
|
||||
"type": "`string`",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
@@ -0,0 +1,158 @@
|
||||
---
|
||||
displayed_sidebar: workflowsSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# registerStepFailure
|
||||
|
||||
[TransactionOrchestrator](../../classes/TransactionOrchestrator.mdx).registerStepFailure
|
||||
|
||||
Register a step failure for a specific transaction and step
|
||||
|
||||
## Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "responseIdempotencyKey",
|
||||
"type": "`string`",
|
||||
"description": "The idempotency key for the step",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "error",
|
||||
"type": "`any`",
|
||||
"description": "The error that caused the failure",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "handler",
|
||||
"type": "[TransactionStepHandler](../../types/TransactionStepHandler.mdx)",
|
||||
"description": "The handler function to execute the step",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "transaction",
|
||||
"type": "[DistributedTransaction](../../classes/DistributedTransaction.mdx)",
|
||||
"description": "The current transaction",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": [
|
||||
{
|
||||
"name": "context",
|
||||
"type": "`any`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "errors",
|
||||
"type": "`any`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "flow",
|
||||
"type": "`any`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "handler",
|
||||
"type": "[TransactionStepHandler](../../types/TransactionStepHandler.mdx)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "modelId",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "payload",
|
||||
"type": "`any`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "transactionId",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "keyPrefix",
|
||||
"type": "`any`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "keyValueStore",
|
||||
"type": "`any`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]} />
|
||||
|
||||
## Returns
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "Promise",
|
||||
"type": "Promise<[DistributedTransaction](../../classes/DistributedTransaction.mdx)>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"expandable": false,
|
||||
"children": [
|
||||
{
|
||||
"name": "DistributedTransaction",
|
||||
"type": "[DistributedTransaction](../../classes/DistributedTransaction.mdx)",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]} />
|
||||
@@ -0,0 +1,158 @@
|
||||
---
|
||||
displayed_sidebar: workflowsSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# registerStepSuccess
|
||||
|
||||
[TransactionOrchestrator](../../classes/TransactionOrchestrator.mdx).registerStepSuccess
|
||||
|
||||
Register a step success for a specific transaction and step
|
||||
|
||||
## Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "responseIdempotencyKey",
|
||||
"type": "`string`",
|
||||
"description": "The idempotency key for the step",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "handler",
|
||||
"type": "[TransactionStepHandler](../../types/TransactionStepHandler.mdx)",
|
||||
"description": "The handler function to execute the step",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "transaction",
|
||||
"type": "[DistributedTransaction](../../classes/DistributedTransaction.mdx)",
|
||||
"description": "The current transaction. If not provided it will be loaded based on the responseIdempotencyKey",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": [
|
||||
{
|
||||
"name": "context",
|
||||
"type": "`any`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "errors",
|
||||
"type": "`any`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "flow",
|
||||
"type": "`any`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "handler",
|
||||
"type": "[TransactionStepHandler](../../types/TransactionStepHandler.mdx)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "modelId",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "payload",
|
||||
"type": "`any`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "transactionId",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "keyPrefix",
|
||||
"type": "`any`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "keyValueStore",
|
||||
"type": "`any`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "response",
|
||||
"type": "`unknown`",
|
||||
"description": "The response of the step",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
## Returns
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "Promise",
|
||||
"type": "Promise<[DistributedTransaction](../../classes/DistributedTransaction.mdx)>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"expandable": false,
|
||||
"children": [
|
||||
{
|
||||
"name": "DistributedTransaction",
|
||||
"type": "[DistributedTransaction](../../classes/DistributedTransaction.mdx)",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]} />
|
||||
@@ -0,0 +1,121 @@
|
||||
---
|
||||
displayed_sidebar: workflowsSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# resume
|
||||
|
||||
[TransactionOrchestrator](../../classes/TransactionOrchestrator.mdx).resume
|
||||
|
||||
Start a new transaction or resume a transaction that has been previously started
|
||||
|
||||
## Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "transaction",
|
||||
"type": "[DistributedTransaction](../../classes/DistributedTransaction.mdx)",
|
||||
"description": "The transaction to resume",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": [
|
||||
{
|
||||
"name": "context",
|
||||
"type": "`any`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "errors",
|
||||
"type": "`any`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "flow",
|
||||
"type": "`any`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "handler",
|
||||
"type": "[TransactionStepHandler](../../types/TransactionStepHandler.mdx)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "modelId",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "payload",
|
||||
"type": "`any`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "transactionId",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "keyPrefix",
|
||||
"type": "`any`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "keyValueStore",
|
||||
"type": "`any`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]} />
|
||||
|
||||
## Returns
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "Promise",
|
||||
"type": "Promise<void>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
@@ -0,0 +1,23 @@
|
||||
---
|
||||
displayed_sidebar: workflowsSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# beginCompensation
|
||||
|
||||
[TransactionStep](../../classes/TransactionStep.mdx).beginCompensation
|
||||
|
||||
## Returns
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "void",
|
||||
"type": "`void`",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
@@ -0,0 +1,119 @@
|
||||
---
|
||||
displayed_sidebar: workflowsSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# canCompensate
|
||||
|
||||
[TransactionStep](../../classes/TransactionStep.mdx).canCompensate
|
||||
|
||||
## Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "flowState",
|
||||
"type": "[TransactionState](../../enums/TransactionState.mdx)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": [
|
||||
{
|
||||
"name": "COMPENSATING",
|
||||
"type": "`\"compensating\"`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "DONE",
|
||||
"type": "`\"done\"`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "DORMANT",
|
||||
"type": "`\"dormant\"`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "FAILED",
|
||||
"type": "`\"failed\"`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "INVOKING",
|
||||
"type": "`\"invoking\"`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "NOT_STARTED",
|
||||
"type": "`\"not_started\"`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "REVERTED",
|
||||
"type": "`\"reverted\"`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "SKIPPED",
|
||||
"type": "`\"skipped\"`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "WAITING_TO_COMPENSATE",
|
||||
"type": "`\"waiting_to_compensate\"`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]} />
|
||||
|
||||
## Returns
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "boolean",
|
||||
"type": "`boolean`",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
@@ -0,0 +1,119 @@
|
||||
---
|
||||
displayed_sidebar: workflowsSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# canInvoke
|
||||
|
||||
[TransactionStep](../../classes/TransactionStep.mdx).canInvoke
|
||||
|
||||
## Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "flowState",
|
||||
"type": "[TransactionState](../../enums/TransactionState.mdx)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": [
|
||||
{
|
||||
"name": "COMPENSATING",
|
||||
"type": "`\"compensating\"`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "DONE",
|
||||
"type": "`\"done\"`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "DORMANT",
|
||||
"type": "`\"dormant\"`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "FAILED",
|
||||
"type": "`\"failed\"`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "INVOKING",
|
||||
"type": "`\"invoking\"`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "NOT_STARTED",
|
||||
"type": "`\"not_started\"`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "REVERTED",
|
||||
"type": "`\"reverted\"`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "SKIPPED",
|
||||
"type": "`\"skipped\"`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "WAITING_TO_COMPENSATE",
|
||||
"type": "`\"waiting_to_compensate\"`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]} />
|
||||
|
||||
## Returns
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "boolean",
|
||||
"type": "`boolean`",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
@@ -0,0 +1,23 @@
|
||||
---
|
||||
displayed_sidebar: workflowsSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# canRetry
|
||||
|
||||
[TransactionStep](../../classes/TransactionStep.mdx).canRetry
|
||||
|
||||
## Returns
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "boolean",
|
||||
"type": "`boolean`",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
@@ -0,0 +1,119 @@
|
||||
---
|
||||
displayed_sidebar: workflowsSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# changeState
|
||||
|
||||
[TransactionStep](../../classes/TransactionStep.mdx).changeState
|
||||
|
||||
## Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "toState",
|
||||
"type": "[TransactionState](../../enums/TransactionState.mdx)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": [
|
||||
{
|
||||
"name": "COMPENSATING",
|
||||
"type": "`\"compensating\"`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "DONE",
|
||||
"type": "`\"done\"`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "DORMANT",
|
||||
"type": "`\"dormant\"`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "FAILED",
|
||||
"type": "`\"failed\"`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "INVOKING",
|
||||
"type": "`\"invoking\"`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "NOT_STARTED",
|
||||
"type": "`\"not_started\"`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "REVERTED",
|
||||
"type": "`\"reverted\"`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "SKIPPED",
|
||||
"type": "`\"skipped\"`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "WAITING_TO_COMPENSATE",
|
||||
"type": "`\"waiting_to_compensate\"`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]} />
|
||||
|
||||
## Returns
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "void",
|
||||
"type": "`void`",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
@@ -0,0 +1,83 @@
|
||||
---
|
||||
displayed_sidebar: workflowsSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# changeStatus
|
||||
|
||||
[TransactionStep](../../classes/TransactionStep.mdx).changeStatus
|
||||
|
||||
## Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "toStatus",
|
||||
"type": "[TransactionStepStatus](../../enums/TransactionStepStatus.mdx)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": [
|
||||
{
|
||||
"name": "IDLE",
|
||||
"type": "`\"idle\"`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "OK",
|
||||
"type": "`\"ok\"`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "PERMANENT_FAILURE",
|
||||
"type": "`\"permanent_failure\"`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "TEMPORARY_FAILURE",
|
||||
"type": "`\"temp_failure\"`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "WAITING",
|
||||
"type": "`\"waiting_response\"`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]} />
|
||||
|
||||
## Returns
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "void",
|
||||
"type": "`void`",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
@@ -0,0 +1,172 @@
|
||||
---
|
||||
displayed_sidebar: workflowsSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# getStates
|
||||
|
||||
[TransactionStep](../../classes/TransactionStep.mdx).getStates
|
||||
|
||||
## Returns
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "object",
|
||||
"type": "`object`",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "state",
|
||||
"type": "[TransactionState](../../enums/TransactionState.mdx)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": [
|
||||
{
|
||||
"name": "COMPENSATING",
|
||||
"type": "`\"compensating\"`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "DONE",
|
||||
"type": "`\"done\"`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "DORMANT",
|
||||
"type": "`\"dormant\"`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "FAILED",
|
||||
"type": "`\"failed\"`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "INVOKING",
|
||||
"type": "`\"invoking\"`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "NOT_STARTED",
|
||||
"type": "`\"not_started\"`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "REVERTED",
|
||||
"type": "`\"reverted\"`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "SKIPPED",
|
||||
"type": "`\"skipped\"`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "WAITING_TO_COMPENSATE",
|
||||
"type": "`\"waiting_to_compensate\"`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "status",
|
||||
"type": "[TransactionStepStatus](../../enums/TransactionStepStatus.mdx)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": [
|
||||
{
|
||||
"name": "IDLE",
|
||||
"type": "`\"idle\"`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "OK",
|
||||
"type": "`\"ok\"`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "PERMANENT_FAILURE",
|
||||
"type": "`\"permanent_failure\"`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "TEMPORARY_FAILURE",
|
||||
"type": "`\"temp_failure\"`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "WAITING",
|
||||
"type": "`\"waiting_response\"`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]} />
|
||||
@@ -0,0 +1,23 @@
|
||||
---
|
||||
displayed_sidebar: workflowsSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# isCompensating
|
||||
|
||||
[TransactionStep](../../classes/TransactionStep.mdx).isCompensating
|
||||
|
||||
## Returns
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "boolean",
|
||||
"type": "`boolean`",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
@@ -0,0 +1,284 @@
|
||||
---
|
||||
displayed_sidebar: workflowsSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# DistributedTransaction
|
||||
|
||||
DistributedTransaction represents a distributed transaction, which is a transaction that is composed of multiple steps that are executed in a specific order.
|
||||
|
||||
## Methods
|
||||
|
||||
- [addError](../DistributedTransaction/methods/DistributedTransaction.addError.mdx)
|
||||
- [addResponse](../DistributedTransaction/methods/DistributedTransaction.addResponse.mdx)
|
||||
- [canInvoke](../DistributedTransaction/methods/DistributedTransaction.canInvoke.mdx)
|
||||
- [canRevert](../DistributedTransaction/methods/DistributedTransaction.canRevert.mdx)
|
||||
- [deleteCheckpoint](../DistributedTransaction/methods/DistributedTransaction.deleteCheckpoint.mdx)
|
||||
- [getContext](../DistributedTransaction/methods/DistributedTransaction.getContext.mdx)
|
||||
- [getErrors](../DistributedTransaction/methods/DistributedTransaction.getErrors.mdx)
|
||||
- [getFlow](../DistributedTransaction/methods/DistributedTransaction.getFlow.mdx)
|
||||
- [getState](../DistributedTransaction/methods/DistributedTransaction.getState.mdx)
|
||||
- [hasFinished](../DistributedTransaction/methods/DistributedTransaction.hasFinished.mdx)
|
||||
- [saveCheckpoint](../DistributedTransaction/methods/DistributedTransaction.saveCheckpoint.mdx)
|
||||
- [loadTransaction](../DistributedTransaction/methods/DistributedTransaction.loadTransaction.mdx)
|
||||
|
||||
## constructor
|
||||
|
||||
### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "flow",
|
||||
"type": "[TransactionFlow](../types/TransactionFlow.mdx)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": [
|
||||
{
|
||||
"name": "definition",
|
||||
"type": "[TransactionStepsDefinition](../types/TransactionStepsDefinition.mdx)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "hasFailedSteps",
|
||||
"type": "`boolean`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "hasSkippedSteps",
|
||||
"type": "`boolean`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "modelId",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "state",
|
||||
"type": "[TransactionState](../enums/TransactionState.mdx)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "steps",
|
||||
"type": "`object`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "transactionId",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "handler",
|
||||
"type": "[TransactionStepHandler](../types/TransactionStepHandler.mdx)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "payload",
|
||||
"type": "`any`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "errors",
|
||||
"type": "[TransactionStepError](TransactionStepError.mdx)[]",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": [
|
||||
{
|
||||
"name": "action",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "error",
|
||||
"type": "`any`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "handlerType",
|
||||
"type": "[TransactionHandlerType](../enums/TransactionHandlerType.mdx)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "context",
|
||||
"type": "[TransactionContext](TransactionContext.mdx)",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": [
|
||||
{
|
||||
"name": "compensate",
|
||||
"type": "`Record<string, unknown>`",
|
||||
"description": "Object containing responses of Compensate handlers on steps flagged with saveResponse.",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "invoke",
|
||||
"type": "`Record<string, unknown>`",
|
||||
"description": "Object containing responses of Invoke handlers on steps flagged with saveResponse.",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "payload",
|
||||
"type": "`unknown`",
|
||||
"description": "Object containing the initial payload.",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]} />
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "context",
|
||||
"type": "`any`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "errors",
|
||||
"type": "`any`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "flow",
|
||||
"type": "`any`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "handler",
|
||||
"type": "[TransactionStepHandler](../types/TransactionStepHandler.mdx)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "modelId",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "payload",
|
||||
"type": "`any`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "transactionId",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "keyPrefix",
|
||||
"type": "`any`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "keyValueStore",
|
||||
"type": "`any`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
## isPartiallyCompleted
|
||||
|
||||
**isPartiallyCompleted**: [object Object]
|
||||
@@ -0,0 +1,200 @@
|
||||
---
|
||||
displayed_sidebar: workflowsSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# LocalWorkflow
|
||||
|
||||
## Methods
|
||||
|
||||
- [addAction](../LocalWorkflow/methods/LocalWorkflow.addAction.mdx)
|
||||
- [appendAction](../LocalWorkflow/methods/LocalWorkflow.appendAction.mdx)
|
||||
- [assertHandler](../LocalWorkflow/methods/LocalWorkflow.assertHandler.mdx)
|
||||
- [commit](../LocalWorkflow/methods/LocalWorkflow.commit.mdx)
|
||||
- [deleteAction](../LocalWorkflow/methods/LocalWorkflow.deleteAction.mdx)
|
||||
- [insertActionAfter](../LocalWorkflow/methods/LocalWorkflow.insertActionAfter.mdx)
|
||||
- [insertActionBefore](../LocalWorkflow/methods/LocalWorkflow.insertActionBefore.mdx)
|
||||
- [mergeActions](../LocalWorkflow/methods/LocalWorkflow.mergeActions.mdx)
|
||||
- [moveAction](../LocalWorkflow/methods/LocalWorkflow.moveAction.mdx)
|
||||
- [moveAndMergeNextAction](../LocalWorkflow/methods/LocalWorkflow.moveAndMergeNextAction.mdx)
|
||||
- [pruneAction](../LocalWorkflow/methods/LocalWorkflow.pruneAction.mdx)
|
||||
- [registerStepFailure](../LocalWorkflow/methods/LocalWorkflow.registerStepFailure.mdx)
|
||||
- [registerStepSuccess](../LocalWorkflow/methods/LocalWorkflow.registerStepSuccess.mdx)
|
||||
- [replaceAction](../LocalWorkflow/methods/LocalWorkflow.replaceAction.mdx)
|
||||
- [run](../LocalWorkflow/methods/LocalWorkflow.run.mdx)
|
||||
|
||||
## constructor
|
||||
|
||||
### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "workflowId",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "modulesLoaded",
|
||||
"type": "[MedusaContainer](../types/MedusaContainer.mdx) \\| ``{ __definition: [ModuleDefinition](../types/ModuleDefinition.mdx) ; __joinerConfig: [ModuleJoinerConfig](../types/ModuleJoinerConfig.mdx) }``[]",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "container",
|
||||
"type": "[MedusaContainer](../types/MedusaContainer.mdx)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": [
|
||||
{
|
||||
"name": "createScope",
|
||||
"type": "() => [MedusaContainer](../types/MedusaContainer.mdx)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "registerAdd",
|
||||
"type": "`<T>`(`name`: `string`, `registration`: `T`) => [MedusaContainer](../types/MedusaContainer.mdx)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "flow",
|
||||
"type": "[OrchestratorBuilder](OrchestratorBuilder.mdx)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": [
|
||||
{
|
||||
"name": "hasChanges_",
|
||||
"type": "`boolean`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "steps",
|
||||
"type": "[InternalStep](../interfaces/InternalStep.mdx)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "handlers",
|
||||
"type": "Map<string, [StepHandler](../types/StepHandler.mdx)>",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "workflow",
|
||||
"type": "[WorkflowDefinition](../interfaces/WorkflowDefinition.mdx)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": [
|
||||
{
|
||||
"name": "flow_",
|
||||
"type": "[TransactionStepsDefinition](../types/TransactionStepsDefinition.mdx)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "handler",
|
||||
"type": "(`container`: [MedusaContainer](../types/MedusaContainer.mdx), `context?`: [Context](../interfaces/Context.mdx)) => [TransactionStepHandler](../types/TransactionStepHandler.mdx)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "handlers_",
|
||||
"type": "Map<string, { compensate?: [WorkflowStepHandler](../types/WorkflowStepHandler.mdx) ; invoke: [WorkflowStepHandler](../types/WorkflowStepHandler.mdx) }>",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "id",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "optionalModules",
|
||||
"type": "Set<string>",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "orchestrator",
|
||||
"type": "[TransactionOrchestrator](TransactionOrchestrator.mdx)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "requiredModules",
|
||||
"type": "Set<string>",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "workflowId",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
@@ -0,0 +1,270 @@
|
||||
---
|
||||
displayed_sidebar: workflowsSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# OrchestratorBuilder
|
||||
|
||||
## Methods
|
||||
|
||||
- [addAction](../OrchestratorBuilder/methods/OrchestratorBuilder.addAction.mdx)
|
||||
- [appendAction](../OrchestratorBuilder/methods/OrchestratorBuilder.appendAction.mdx)
|
||||
- [appendTo](../OrchestratorBuilder/methods/OrchestratorBuilder.appendTo.mdx)
|
||||
- [build](../OrchestratorBuilder/methods/OrchestratorBuilder.build.mdx)
|
||||
- [deleteAction](../OrchestratorBuilder/methods/OrchestratorBuilder.deleteAction.mdx)
|
||||
- [findLastStep](../OrchestratorBuilder/methods/OrchestratorBuilder.findLastStep.mdx)
|
||||
- [findOrThrowStepByAction](../OrchestratorBuilder/methods/OrchestratorBuilder.findOrThrowStepByAction.mdx)
|
||||
- [findParentStepByAction](../OrchestratorBuilder/methods/OrchestratorBuilder.findParentStepByAction.mdx)
|
||||
- [findStepByAction](../OrchestratorBuilder/methods/OrchestratorBuilder.findStepByAction.mdx)
|
||||
- [insertActionAfter](../OrchestratorBuilder/methods/OrchestratorBuilder.insertActionAfter.mdx)
|
||||
- [insertActionBefore](../OrchestratorBuilder/methods/OrchestratorBuilder.insertActionBefore.mdx)
|
||||
- [load](../OrchestratorBuilder/methods/OrchestratorBuilder.load.mdx)
|
||||
- [mergeActions](../OrchestratorBuilder/methods/OrchestratorBuilder.mergeActions.mdx)
|
||||
- [move](../OrchestratorBuilder/methods/OrchestratorBuilder.move.mdx)
|
||||
- [moveAction](../OrchestratorBuilder/methods/OrchestratorBuilder.moveAction.mdx)
|
||||
- [moveAndMergeNextAction](../OrchestratorBuilder/methods/OrchestratorBuilder.moveAndMergeNextAction.mdx)
|
||||
- [pruneAction](../OrchestratorBuilder/methods/OrchestratorBuilder.pruneAction.mdx)
|
||||
- [replaceAction](../OrchestratorBuilder/methods/OrchestratorBuilder.replaceAction.mdx)
|
||||
- [updateDepths](../OrchestratorBuilder/methods/OrchestratorBuilder.updateDepths.mdx)
|
||||
|
||||
## constructor
|
||||
|
||||
### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "steps",
|
||||
"type": "[TransactionStepsDefinition](../types/TransactionStepsDefinition.mdx)",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": [
|
||||
{
|
||||
"name": "action",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "async",
|
||||
"type": "`boolean`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "continueOnPermanentFailure",
|
||||
"type": "`boolean`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "maxRetries",
|
||||
"type": "`number`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "next",
|
||||
"type": "[TransactionStepsDefinition](../types/TransactionStepsDefinition.mdx) \\| [TransactionStepsDefinition](../types/TransactionStepsDefinition.mdx)[]",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "noCompensation",
|
||||
"type": "`boolean`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "noWait",
|
||||
"type": "`boolean`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "retryInterval",
|
||||
"type": "`number`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "saveResponse",
|
||||
"type": "`boolean`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "timeout",
|
||||
"type": "`number`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]} />
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "hasChanges_",
|
||||
"type": "`boolean`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "steps",
|
||||
"type": "[InternalStep](../interfaces/InternalStep.mdx)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": [
|
||||
{
|
||||
"name": "action",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "async",
|
||||
"type": "`boolean`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "continueOnPermanentFailure",
|
||||
"type": "`boolean`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "depth",
|
||||
"type": "`number`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "maxRetries",
|
||||
"type": "`number`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "next",
|
||||
"type": "[InternalStep](../interfaces/InternalStep.mdx) \\| [InternalStep](../interfaces/InternalStep.mdx)[]",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "noCompensation",
|
||||
"type": "`boolean`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "noWait",
|
||||
"type": "`boolean`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "parent",
|
||||
"type": "`null` \\| [InternalStep](../interfaces/InternalStep.mdx)",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "retryInterval",
|
||||
"type": "`number`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "saveResponse",
|
||||
"type": "`boolean`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "timeout",
|
||||
"type": "`number`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]} />
|
||||
|
||||
## hasChanges
|
||||
|
||||
**hasChanges**: [object Object]
|
||||
@@ -0,0 +1,82 @@
|
||||
---
|
||||
displayed_sidebar: workflowsSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# StepResponse
|
||||
|
||||
This class is used to create the response returned by a step. A step return its data by returning an instance of `StepResponse`.
|
||||
|
||||
## Type parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "TOutput",
|
||||
"type": "`object`",
|
||||
"description": "The type of the output of the step.",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "TCompensateInput",
|
||||
"type": "`object`",
|
||||
"description": "The type of the compensation input. If the step doesn't specify any compensation input, then the type of `TCompensateInput` is the same as that of `TOutput`.",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
## constructor
|
||||
|
||||
The constructor of the StepResponse
|
||||
|
||||
### Type Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "TOutput",
|
||||
"type": "`object`",
|
||||
"description": "The type of the output of the step.",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "TCompensateInput",
|
||||
"type": "`object`",
|
||||
"description": "The type of the compensation input. If the step doesn't specify any compensation input, then the type of `TCompensateInput` is the same as that of `TOutput`.",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "output",
|
||||
"type": "`TOutput`",
|
||||
"description": "The output of the step.",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "compensateInput",
|
||||
"type": "`TCompensateInput`",
|
||||
"description": "The input to be passed as a parameter to the step's compensation function. If not provided, the `output` will be provided instead.",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
@@ -0,0 +1,311 @@
|
||||
---
|
||||
displayed_sidebar: workflowsSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# TransactionCheckpoint
|
||||
|
||||
## constructor
|
||||
|
||||
### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "flow",
|
||||
"type": "[TransactionFlow](../types/TransactionFlow.mdx)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": [
|
||||
{
|
||||
"name": "definition",
|
||||
"type": "[TransactionStepsDefinition](../types/TransactionStepsDefinition.mdx)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "hasFailedSteps",
|
||||
"type": "`boolean`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "hasSkippedSteps",
|
||||
"type": "`boolean`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "modelId",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "state",
|
||||
"type": "[TransactionState](../enums/TransactionState.mdx)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "steps",
|
||||
"type": "`object`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "transactionId",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "context",
|
||||
"type": "[TransactionContext](TransactionContext.mdx)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": [
|
||||
{
|
||||
"name": "compensate",
|
||||
"type": "`Record<string, unknown>`",
|
||||
"description": "Object containing responses of Compensate handlers on steps flagged with saveResponse.",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "invoke",
|
||||
"type": "`Record<string, unknown>`",
|
||||
"description": "Object containing responses of Invoke handlers on steps flagged with saveResponse.",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "payload",
|
||||
"type": "`unknown`",
|
||||
"description": "Object containing the initial payload.",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "errors",
|
||||
"type": "[TransactionStepError](TransactionStepError.mdx)[]",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": [
|
||||
{
|
||||
"name": "action",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "error",
|
||||
"type": "`any`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "handlerType",
|
||||
"type": "[TransactionHandlerType](../enums/TransactionHandlerType.mdx)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]} />
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "context",
|
||||
"type": "[TransactionContext](TransactionContext.mdx)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": [
|
||||
{
|
||||
"name": "compensate",
|
||||
"type": "`Record<string, unknown>`",
|
||||
"description": "Object containing responses of Compensate handlers on steps flagged with saveResponse.",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "invoke",
|
||||
"type": "`Record<string, unknown>`",
|
||||
"description": "Object containing responses of Invoke handlers on steps flagged with saveResponse.",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "payload",
|
||||
"type": "`unknown`",
|
||||
"description": "Object containing the initial payload.",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "errors",
|
||||
"type": "[TransactionStepError](TransactionStepError.mdx)[]",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": [
|
||||
{
|
||||
"name": "action",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "error",
|
||||
"type": "`any`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "handlerType",
|
||||
"type": "[TransactionHandlerType](../enums/TransactionHandlerType.mdx)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "flow",
|
||||
"type": "[TransactionFlow](../types/TransactionFlow.mdx)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": [
|
||||
{
|
||||
"name": "definition",
|
||||
"type": "[TransactionStepsDefinition](../types/TransactionStepsDefinition.mdx)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "hasFailedSteps",
|
||||
"type": "`boolean`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "hasSkippedSteps",
|
||||
"type": "`boolean`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "modelId",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "state",
|
||||
"type": "[TransactionState](../enums/TransactionState.mdx)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "steps",
|
||||
"type": "`object`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "transactionId",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]} />
|
||||
@@ -0,0 +1,71 @@
|
||||
---
|
||||
displayed_sidebar: workflowsSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# TransactionContext
|
||||
|
||||
## constructor
|
||||
|
||||
### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "payload",
|
||||
"type": "`unknown`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "invoke",
|
||||
"type": "`Record<string, unknown>`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "compensate",
|
||||
"type": "`Record<string, unknown>`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "compensate",
|
||||
"type": "`Record<string, unknown>`",
|
||||
"description": "Object containing responses of Compensate handlers on steps flagged with saveResponse.",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "invoke",
|
||||
"type": "`Record<string, unknown>`",
|
||||
"description": "Object containing responses of Invoke handlers on steps flagged with saveResponse.",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "payload",
|
||||
"type": "`unknown`",
|
||||
"description": "Object containing the initial payload.",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
@@ -0,0 +1,342 @@
|
||||
---
|
||||
displayed_sidebar: workflowsSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# TransactionOrchestrator
|
||||
|
||||
## Methods
|
||||
|
||||
- [beginTransaction](../TransactionOrchestrator/methods/TransactionOrchestrator.beginTransaction.mdx)
|
||||
- [cancelTransaction](../TransactionOrchestrator/methods/TransactionOrchestrator.cancelTransaction.mdx)
|
||||
- [registerStepFailure](../TransactionOrchestrator/methods/TransactionOrchestrator.registerStepFailure.mdx)
|
||||
- [registerStepSuccess](../TransactionOrchestrator/methods/TransactionOrchestrator.registerStepSuccess.mdx)
|
||||
- [resume](../TransactionOrchestrator/methods/TransactionOrchestrator.resume.mdx)
|
||||
- [getKeyName](../TransactionOrchestrator/methods/TransactionOrchestrator.getKeyName.mdx)
|
||||
|
||||
## constructor
|
||||
|
||||
### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "id",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "definition",
|
||||
"type": "[TransactionStepsDefinition](../types/TransactionStepsDefinition.mdx)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": [
|
||||
{
|
||||
"name": "action",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "async",
|
||||
"type": "`boolean`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "continueOnPermanentFailure",
|
||||
"type": "`boolean`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "maxRetries",
|
||||
"type": "`number`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "next",
|
||||
"type": "[TransactionStepsDefinition](../types/TransactionStepsDefinition.mdx) \\| [TransactionStepsDefinition](../types/TransactionStepsDefinition.mdx)[]",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "noCompensation",
|
||||
"type": "`boolean`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "noWait",
|
||||
"type": "`boolean`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "retryInterval",
|
||||
"type": "`number`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "saveResponse",
|
||||
"type": "`boolean`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "timeout",
|
||||
"type": "`number`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]} />
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "canContinue",
|
||||
"type": "`any`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "canMoveBackward",
|
||||
"type": "`any`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "canMoveForward",
|
||||
"type": "`any`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "checkAllSteps",
|
||||
"type": "`any`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "compensateSteps",
|
||||
"type": "`any`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "createTransactionFlow",
|
||||
"type": "`any`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "definition",
|
||||
"type": "`any`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "executeNext",
|
||||
"type": "`any`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "flagStepsToRevert",
|
||||
"type": "`any`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "getCompensationSteps",
|
||||
"type": "`any`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "getInvokeSteps",
|
||||
"type": "`any`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "getPreviousStep",
|
||||
"type": "`any`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "id",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "invokeSteps",
|
||||
"type": "`any`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "DEFAULT_RETRIES",
|
||||
"type": "`number`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "ROOT_STEP",
|
||||
"type": "`any`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "SEPARATOR",
|
||||
"type": "`any`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "buildSteps",
|
||||
"type": "`any`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "getStepByAction",
|
||||
"type": "`any`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "getTransactionAndStepFromIdempotencyKey",
|
||||
"type": "`any`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "loadTransactionById",
|
||||
"type": "`any`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "setStepFailure",
|
||||
"type": "`any`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "setStepSuccess",
|
||||
"type": "`any`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
@@ -0,0 +1,255 @@
|
||||
---
|
||||
displayed_sidebar: workflowsSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# TransactionPayload
|
||||
|
||||
## constructor
|
||||
|
||||
### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "metadata",
|
||||
"type": "[TransactionMetadata](../types/TransactionMetadata.mdx)",
|
||||
"description": "The metadata of the transaction.",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": [
|
||||
{
|
||||
"name": "action",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "action_type",
|
||||
"type": "[TransactionHandlerType](../enums/TransactionHandlerType.mdx)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "attempt",
|
||||
"type": "`number`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "idempotency_key",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "model_id",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "reply_to_topic",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "timestamp",
|
||||
"type": "`number`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "data",
|
||||
"type": "`Record<string, unknown>`",
|
||||
"description": "The initial payload data to begin a transation.",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "context",
|
||||
"type": "[TransactionContext](TransactionContext.mdx)",
|
||||
"description": "Object gathering responses of all steps flagged with saveResponse.",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": [
|
||||
{
|
||||
"name": "compensate",
|
||||
"type": "`Record<string, unknown>`",
|
||||
"description": "Object containing responses of Compensate handlers on steps flagged with saveResponse.",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "invoke",
|
||||
"type": "`Record<string, unknown>`",
|
||||
"description": "Object containing responses of Invoke handlers on steps flagged with saveResponse.",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "payload",
|
||||
"type": "`unknown`",
|
||||
"description": "Object containing the initial payload.",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]} />
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "context",
|
||||
"type": "[TransactionContext](TransactionContext.mdx)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": [
|
||||
{
|
||||
"name": "compensate",
|
||||
"type": "`Record<string, unknown>`",
|
||||
"description": "Object containing responses of Compensate handlers on steps flagged with saveResponse.",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "invoke",
|
||||
"type": "`Record<string, unknown>`",
|
||||
"description": "Object containing responses of Invoke handlers on steps flagged with saveResponse.",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "payload",
|
||||
"type": "`unknown`",
|
||||
"description": "Object containing the initial payload.",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "data",
|
||||
"type": "`Record<string, unknown>`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "metadata",
|
||||
"type": "[TransactionMetadata](../types/TransactionMetadata.mdx)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": [
|
||||
{
|
||||
"name": "action",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "action_type",
|
||||
"type": "[TransactionHandlerType](../enums/TransactionHandlerType.mdx)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "attempt",
|
||||
"type": "`number`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "idempotency_key",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "model_id",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "reply_to_topic",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "timestamp",
|
||||
"type": "`number`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]} />
|
||||
@@ -0,0 +1,547 @@
|
||||
---
|
||||
displayed_sidebar: workflowsSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# TransactionStep
|
||||
|
||||
## Classdesc
|
||||
|
||||
A class representing a single step in a transaction flow
|
||||
|
||||
## Methods
|
||||
|
||||
- [beginCompensation](../TransactionStep/methods/TransactionStep.beginCompensation.mdx)
|
||||
- [canCompensate](../TransactionStep/methods/TransactionStep.canCompensate.mdx)
|
||||
- [canInvoke](../TransactionStep/methods/TransactionStep.canInvoke.mdx)
|
||||
- [canRetry](../TransactionStep/methods/TransactionStep.canRetry.mdx)
|
||||
- [changeState](../TransactionStep/methods/TransactionStep.changeState.mdx)
|
||||
- [changeStatus](../TransactionStep/methods/TransactionStep.changeStatus.mdx)
|
||||
- [getStates](../TransactionStep/methods/TransactionStep.getStates.mdx)
|
||||
- [isCompensating](../TransactionStep/methods/TransactionStep.isCompensating.mdx)
|
||||
|
||||
## constructor
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "attempts",
|
||||
"type": "`number`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "compensate",
|
||||
"type": "`object`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": [
|
||||
{
|
||||
"name": "state",
|
||||
"type": "[TransactionState](../enums/TransactionState.mdx)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "status",
|
||||
"type": "[TransactionStepStatus](../enums/TransactionStepStatus.mdx)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "compensate.state",
|
||||
"type": "[TransactionState](../enums/TransactionState.mdx)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": [
|
||||
{
|
||||
"name": "COMPENSATING",
|
||||
"type": "`\"compensating\"`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "DONE",
|
||||
"type": "`\"done\"`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "DORMANT",
|
||||
"type": "`\"dormant\"`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "FAILED",
|
||||
"type": "`\"failed\"`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "INVOKING",
|
||||
"type": "`\"invoking\"`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "NOT_STARTED",
|
||||
"type": "`\"not_started\"`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "REVERTED",
|
||||
"type": "`\"reverted\"`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "SKIPPED",
|
||||
"type": "`\"skipped\"`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "WAITING_TO_COMPENSATE",
|
||||
"type": "`\"waiting_to_compensate\"`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "compensate.status",
|
||||
"type": "[TransactionStepStatus](../enums/TransactionStepStatus.mdx)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": [
|
||||
{
|
||||
"name": "IDLE",
|
||||
"type": "`\"idle\"`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "OK",
|
||||
"type": "`\"ok\"`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "PERMANENT_FAILURE",
|
||||
"type": "`\"permanent_failure\"`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "TEMPORARY_FAILURE",
|
||||
"type": "`\"temp_failure\"`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "WAITING",
|
||||
"type": "`\"waiting_response\"`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "definition",
|
||||
"type": "[TransactionStepsDefinition](../types/TransactionStepsDefinition.mdx)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": [
|
||||
{
|
||||
"name": "action",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "async",
|
||||
"type": "`boolean`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "continueOnPermanentFailure",
|
||||
"type": "`boolean`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "maxRetries",
|
||||
"type": "`number`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "next",
|
||||
"type": "[TransactionStepsDefinition](../types/TransactionStepsDefinition.mdx) \\| [TransactionStepsDefinition](../types/TransactionStepsDefinition.mdx)[]",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "noCompensation",
|
||||
"type": "`boolean`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "noWait",
|
||||
"type": "`boolean`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "retryInterval",
|
||||
"type": "`number`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "saveResponse",
|
||||
"type": "`boolean`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "timeout",
|
||||
"type": "`number`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "depth",
|
||||
"type": "`number`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "failures",
|
||||
"type": "`number`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "id",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "invoke",
|
||||
"type": "`object`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": [
|
||||
{
|
||||
"name": "state",
|
||||
"type": "[TransactionState](../enums/TransactionState.mdx)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "status",
|
||||
"type": "[TransactionStepStatus](../enums/TransactionStepStatus.mdx)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "invoke.state",
|
||||
"type": "[TransactionState](../enums/TransactionState.mdx)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": [
|
||||
{
|
||||
"name": "COMPENSATING",
|
||||
"type": "`\"compensating\"`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "DONE",
|
||||
"type": "`\"done\"`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "DORMANT",
|
||||
"type": "`\"dormant\"`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "FAILED",
|
||||
"type": "`\"failed\"`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "INVOKING",
|
||||
"type": "`\"invoking\"`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "NOT_STARTED",
|
||||
"type": "`\"not_started\"`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "REVERTED",
|
||||
"type": "`\"reverted\"`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "SKIPPED",
|
||||
"type": "`\"skipped\"`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "WAITING_TO_COMPENSATE",
|
||||
"type": "`\"waiting_to_compensate\"`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "invoke.status",
|
||||
"type": "[TransactionStepStatus](../enums/TransactionStepStatus.mdx)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": [
|
||||
{
|
||||
"name": "IDLE",
|
||||
"type": "`\"idle\"`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "OK",
|
||||
"type": "`\"ok\"`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "PERMANENT_FAILURE",
|
||||
"type": "`\"permanent_failure\"`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "TEMPORARY_FAILURE",
|
||||
"type": "`\"temp_failure\"`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "WAITING",
|
||||
"type": "`\"waiting_response\"`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "lastAttempt",
|
||||
"type": "`null` \\| `number`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "next",
|
||||
"type": "`string`[]",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "saveResponse",
|
||||
"type": "`boolean`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "stepFailed",
|
||||
"type": "`any`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
@@ -0,0 +1,109 @@
|
||||
---
|
||||
displayed_sidebar: workflowsSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# TransactionStepError
|
||||
|
||||
## constructor
|
||||
|
||||
### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "action",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "handlerType",
|
||||
"type": "[TransactionHandlerType](../enums/TransactionHandlerType.mdx)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": [
|
||||
{
|
||||
"name": "COMPENSATE",
|
||||
"type": "`\"compensate\"`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "INVOKE",
|
||||
"type": "`\"invoke\"`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "error",
|
||||
"type": "`any`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "action",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "error",
|
||||
"type": "`any`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "handlerType",
|
||||
"type": "[TransactionHandlerType](../enums/TransactionHandlerType.mdx)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": [
|
||||
{
|
||||
"name": "COMPENSATE",
|
||||
"type": "`\"compensate\"`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "INVOKE",
|
||||
"type": "`\"invoke\"`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]} />
|
||||
@@ -0,0 +1,17 @@
|
||||
---
|
||||
displayed_sidebar: workflowsSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# MODULE\_RESOURCE\_TYPE
|
||||
|
||||
## ISOLATED
|
||||
|
||||
**ISOLATED** = `"isolated"`
|
||||
|
||||
___
|
||||
|
||||
## SHARED
|
||||
|
||||
**SHARED** = `"shared"`
|
||||
@@ -0,0 +1,17 @@
|
||||
---
|
||||
displayed_sidebar: workflowsSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# TransactionHandlerType
|
||||
|
||||
## COMPENSATE
|
||||
|
||||
**COMPENSATE** = `"compensate"`
|
||||
|
||||
___
|
||||
|
||||
## INVOKE
|
||||
|
||||
**INVOKE** = `"invoke"`
|
||||
@@ -0,0 +1,59 @@
|
||||
---
|
||||
displayed_sidebar: workflowsSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# TransactionState
|
||||
|
||||
## COMPENSATING
|
||||
|
||||
**COMPENSATING** = `"compensating"`
|
||||
|
||||
___
|
||||
|
||||
## DONE
|
||||
|
||||
**DONE** = `"done"`
|
||||
|
||||
___
|
||||
|
||||
## DORMANT
|
||||
|
||||
**DORMANT** = `"dormant"`
|
||||
|
||||
___
|
||||
|
||||
## FAILED
|
||||
|
||||
**FAILED** = `"failed"`
|
||||
|
||||
___
|
||||
|
||||
## INVOKING
|
||||
|
||||
**INVOKING** = `"invoking"`
|
||||
|
||||
___
|
||||
|
||||
## NOT\_STARTED
|
||||
|
||||
**NOT\_STARTED** = `"not_started"`
|
||||
|
||||
___
|
||||
|
||||
## REVERTED
|
||||
|
||||
**REVERTED** = `"reverted"`
|
||||
|
||||
___
|
||||
|
||||
## SKIPPED
|
||||
|
||||
**SKIPPED** = `"skipped"`
|
||||
|
||||
___
|
||||
|
||||
## WAITING\_TO\_COMPENSATE
|
||||
|
||||
**WAITING\_TO\_COMPENSATE** = `"waiting_to_compensate"`
|
||||
@@ -0,0 +1,35 @@
|
||||
---
|
||||
displayed_sidebar: workflowsSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# TransactionStepStatus
|
||||
|
||||
## IDLE
|
||||
|
||||
**IDLE** = `"idle"`
|
||||
|
||||
___
|
||||
|
||||
## OK
|
||||
|
||||
**OK** = `"ok"`
|
||||
|
||||
___
|
||||
|
||||
## PERMANENT\_FAILURE
|
||||
|
||||
**PERMANENT\_FAILURE** = `"permanent_failure"`
|
||||
|
||||
___
|
||||
|
||||
## TEMPORARY\_FAILURE
|
||||
|
||||
**TEMPORARY\_FAILURE** = `"temp_failure"`
|
||||
|
||||
___
|
||||
|
||||
## WAITING
|
||||
|
||||
**WAITING** = `"waiting_response"`
|
||||
@@ -0,0 +1,133 @@
|
||||
---
|
||||
displayed_sidebar: workflowsSidebar
|
||||
slug: /references/workflows/createStep
|
||||
sidebar_label: createStep
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# createStep - Workflows Reference
|
||||
|
||||
This documentation provides a reference to the `createStep` . It belongs to the `@medusajs/workflows-sdk` package.
|
||||
|
||||
This function creates a [StepFunction](../types/StepFunction.mdx) that can be used as a step in a workflow constructed by the [createWorkflow](createWorkflow.mdx) function.
|
||||
|
||||
## Example
|
||||
|
||||
```ts
|
||||
import {
|
||||
createStep,
|
||||
StepResponse,
|
||||
StepExecutionContext,
|
||||
WorkflowData
|
||||
} from "@medusajs/workflows-sdk"
|
||||
|
||||
interface CreateProductInput {
|
||||
title: string
|
||||
}
|
||||
|
||||
export const createProductStep = createStep(
|
||||
"createProductStep",
|
||||
async function (
|
||||
input: CreateProductInput,
|
||||
context
|
||||
) {
|
||||
const productService = context.container.resolve(
|
||||
"productService"
|
||||
)
|
||||
const product = await productService.create(input)
|
||||
return new StepResponse({
|
||||
product
|
||||
}, {
|
||||
product_id: product.id
|
||||
})
|
||||
},
|
||||
async function (
|
||||
input,
|
||||
context
|
||||
) {
|
||||
const productService = context.container.resolve(
|
||||
"productService"
|
||||
)
|
||||
await productService.delete(input.product_id)
|
||||
}
|
||||
)
|
||||
```
|
||||
|
||||
## Type Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "TInvokeInput",
|
||||
"type": "`object`",
|
||||
"description": "The type of the expected input parameter to the invocation function.",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "TInvokeResultOutput",
|
||||
"type": "`object`",
|
||||
"description": "The type of the expected output parameter of the invocation function.",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "TInvokeResultCompensateInput",
|
||||
"type": "`object`",
|
||||
"description": "The type of the expected input parameter to the compensation function.",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
## Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "name",
|
||||
"type": "`string`",
|
||||
"description": "The name of the step.",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "invokeFn",
|
||||
"type": "[InvokeFn](../types/InvokeFn.mdx)<TInvokeInput, TInvokeResultOutput, TInvokeResultCompensateInput>",
|
||||
"description": "An invocation function that will be executed when the workflow is executed. The function must return an instance of [StepResponse](../classes/StepResponse.mdx). The constructor of [StepResponse](../classes/StepResponse.mdx) accepts the output of the step as a first argument, and optionally as a second argument the data to be passed to the compensation function as a parameter.",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "compensateFn",
|
||||
"type": "[CompensateFn](../types/CompensateFn.mdx)<TInvokeResultCompensateInput>",
|
||||
"description": "A compensation function that's executed if an error occurs in the workflow. It's used to roll-back actions when errors occur. It accepts as a parameter the second argument passed to the constructor of the [StepResponse](../classes/StepResponse.mdx) instance returned by the invocation function. If the invocation function doesn't pass the second argument to `StepResponse` constructor, the compensation function receives the first argument passed to the `StepResponse` constructor instead.",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
## Returns
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "StepFunction",
|
||||
"type": "[StepFunction](../types/StepFunction.mdx)<TInvokeInput, TInvokeResultOutput>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "A step function to be used in a workflow.",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
@@ -0,0 +1,130 @@
|
||||
---
|
||||
displayed_sidebar: workflowsSidebar
|
||||
slug: /references/workflows/createWorkflow
|
||||
sidebar_label: createWorkflow
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# createWorkflow - Workflows Reference
|
||||
|
||||
This documentation provides a reference to the `createWorkflow` . It belongs to the `@medusajs/workflows-sdk` package.
|
||||
|
||||
This function creates a workflow with the provided name and a constructor function.
|
||||
The constructor function builds the workflow from steps created by the [createStep](createStep.mdx) function.
|
||||
The returned workflow is an exported workflow of type [ReturnWorkflow](../types/ReturnWorkflow.mdx), meaning it's not executed right away. To execute it,
|
||||
invoke the exported workflow, then run its `run` method.
|
||||
|
||||
## Example
|
||||
|
||||
```ts
|
||||
import { createWorkflow } from "@medusajs/workflows-sdk"
|
||||
import { MedusaRequest, MedusaResponse, Product } from "@medusajs/medusa"
|
||||
import {
|
||||
createProductStep,
|
||||
getProductStep,
|
||||
createPricesStep
|
||||
} from "./steps"
|
||||
|
||||
interface WorkflowInput {
|
||||
title: string
|
||||
}
|
||||
|
||||
const myWorkflow = createWorkflow<
|
||||
WorkflowInput,
|
||||
Product
|
||||
>("my-workflow", (input) => {
|
||||
// Everything here will be executed and resolved later
|
||||
// during the execution. Including the data access.
|
||||
|
||||
const product = createProductStep(input)
|
||||
const prices = createPricesStep(product)
|
||||
return getProductStep(product.id)
|
||||
}
|
||||
)
|
||||
|
||||
export async function GET(
|
||||
req: MedusaRequest,
|
||||
res: MedusaResponse
|
||||
) {
|
||||
const { result: product } = await myWorkflow(req.scope)
|
||||
.run({
|
||||
input: {
|
||||
title: "Shirt"
|
||||
}
|
||||
})
|
||||
|
||||
res.json({
|
||||
product
|
||||
})
|
||||
}
|
||||
```
|
||||
|
||||
## Type Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "TData",
|
||||
"type": "`object`",
|
||||
"description": "The type of the input passed to the composer function.",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "TResult",
|
||||
"type": "`object`",
|
||||
"description": "The type of the output returned by the composer function.",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "THooks",
|
||||
"type": "`Record<string, Function>`",
|
||||
"description": "The type of hooks defined in the workflow.",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
## Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "name",
|
||||
"type": "`string`",
|
||||
"description": "The name of the workflow.",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "composer",
|
||||
"type": "(`input`: [WorkflowData](../types/WorkflowData.mdx)<TData>) => `void` \\| [WorkflowData](../types/WorkflowData.mdx)<TResult> \\| { [K in string \\| number \\| symbol]: WorkflowDataProperties<TResult[K]> \\| WorkflowData<TResult[K]> }",
|
||||
"description": "The constructor function that is executed when the `run` method in [ReturnWorkflow](../types/ReturnWorkflow.mdx) is used. The function can't be an arrow function or an asynchronus function. It also can't directly manipulate data. You'll have to use the [transform](transform.mdx) function if you need to directly manipulate data.",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
## Returns
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "ReturnWorkflow",
|
||||
"type": "[ReturnWorkflow](../types/ReturnWorkflow.mdx)<TData, TResult, THooks>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "The created workflow. You can later execute the workflow by invoking it, then using its `run` method.",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
@@ -0,0 +1,89 @@
|
||||
---
|
||||
displayed_sidebar: workflowsSidebar
|
||||
slug: /references/workflows/parallelize
|
||||
sidebar_label: parallelize
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# parallelize - Workflows Reference
|
||||
|
||||
This documentation provides a reference to the `parallelize` . It belongs to the `@medusajs/workflows-sdk` package.
|
||||
|
||||
This function is used to run multiple steps in parallel. The result of each step will be returned as part of the result array.
|
||||
|
||||
## Example
|
||||
|
||||
```ts
|
||||
import {
|
||||
createWorkflow,
|
||||
parallelize
|
||||
} from "@medusajs/workflows-sdk"
|
||||
import {
|
||||
createProductStep,
|
||||
getProductStep,
|
||||
createPricesStep,
|
||||
attachProductToSalesChannelStep
|
||||
} from "./steps"
|
||||
|
||||
interface WorkflowInput {
|
||||
title: string
|
||||
}
|
||||
|
||||
const myWorkflow = createWorkflow<
|
||||
WorkflowInput,
|
||||
Product
|
||||
>("my-workflow", (input) => {
|
||||
const product = createProductStep(input)
|
||||
|
||||
const [prices, productSalesChannel] = parallelize(
|
||||
createPricesStep(product),
|
||||
attachProductToSalesChannelStep(product)
|
||||
)
|
||||
|
||||
const id = product.id
|
||||
return getProductStep(product.id)
|
||||
}
|
||||
)
|
||||
|
||||
## Type Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "TResult",
|
||||
"type": "[WorkflowDataProperties](../types/WorkflowDataProperties.mdx)<unknown>[]",
|
||||
"description": "The type of the expected result.",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
## Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "steps",
|
||||
"type": "`TResult`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
## Returns
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "TResult",
|
||||
"type": "`TResult`",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "The step results. The results are ordered in the array by the order they're passed in the function's parameter.",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
@@ -0,0 +1,114 @@
|
||||
---
|
||||
displayed_sidebar: workflowsSidebar
|
||||
slug: /references/workflows/transform
|
||||
sidebar_label: transform
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# transform - Workflows Reference
|
||||
|
||||
This documentation provides a reference to the `transform` . It belongs to the `@medusajs/workflows-sdk` package.
|
||||
|
||||
This function transforms the output of other utility functions.
|
||||
|
||||
For example, if you're using the value(s) of some step(s) as an input to a later step. As you can't directly manipulate data in the workflow constructor function passed to [createWorkflow](createWorkflow.mdx),
|
||||
the `transform` function provides access to the runtime value of the step(s) output so that you can manipulate them.
|
||||
|
||||
Another example is if you're using the runtime value of some step(s) as the output of a workflow.
|
||||
|
||||
If you're also retrieving the output of a hook and want to check if its value is set, you must use a workflow to get the runtime value of that hook.
|
||||
|
||||
## Example
|
||||
|
||||
```ts
|
||||
import {
|
||||
createWorkflow,
|
||||
transform
|
||||
} from "@medusajs/workflows-sdk"
|
||||
import { step1, step2 } from "./steps"
|
||||
|
||||
type WorkflowInput = {
|
||||
name: string
|
||||
}
|
||||
|
||||
type WorkflowOutput = {
|
||||
message: string
|
||||
}
|
||||
|
||||
const myWorkflow = createWorkflow<
|
||||
WorkflowInput,
|
||||
WorkflowOutput
|
||||
>
|
||||
("hello-world", (input) => {
|
||||
const str1 = step1(input)
|
||||
const str2 = step2(input)
|
||||
|
||||
return transform({
|
||||
str1,
|
||||
str2
|
||||
}, (input) => ({
|
||||
message: `${input.str1}${input.str2}`
|
||||
}))
|
||||
})
|
||||
```
|
||||
|
||||
## Type Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "T",
|
||||
"type": "`object` \\| [WorkflowDataProperties](../types/WorkflowDataProperties.mdx)<unknown>",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "RFinal",
|
||||
"type": "`object`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
## Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "values",
|
||||
"type": "`T`",
|
||||
"description": "The output(s) of other step functions.",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "func",
|
||||
"type": "[[Func1](../types/Func1.mdx)<T, RFinal>]",
|
||||
"description": "The transform function used to perform action on the runtime values of the provided `values`.",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
## Returns
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "WorkflowData",
|
||||
"type": "[WorkflowData](../types/WorkflowData.mdx)<RFinal>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "There's no expected value to be returned by the `transform` function.",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
16
www/apps/docs/content/references/workflows/index.mdx
Normal file
16
www/apps/docs/content/references/workflows/index.mdx
Normal file
@@ -0,0 +1,16 @@
|
||||
---
|
||||
displayed_sidebar: workflowsSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# Workflows API Reference
|
||||
|
||||
This section of the documentation provides a reference to the utility functions of the `@medusajs/workflows-sdk` package.
|
||||
|
||||
## Functions
|
||||
|
||||
- [createStep](functions/createStep.mdx)
|
||||
- [createWorkflow](functions/createWorkflow.mdx)
|
||||
- [parallelize](functions/parallelize.mdx)
|
||||
- [transform](functions/transform.mdx)
|
||||
@@ -0,0 +1,71 @@
|
||||
---
|
||||
displayed_sidebar: workflowsSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# Context
|
||||
|
||||
A shared context object that is used to share resources between the application and the module.
|
||||
|
||||
## Type parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "TManager",
|
||||
"type": "`object`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "enableNestedTransactions",
|
||||
"type": "`boolean`",
|
||||
"description": "A boolean value indicating whether nested transactions are enabled.",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "isolationLevel",
|
||||
"type": "`string`",
|
||||
"description": "A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "manager",
|
||||
"type": "`TManager`",
|
||||
"description": "An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "transactionId",
|
||||
"type": "`string`",
|
||||
"description": "A string indicating the ID of the current transaction.",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "transactionManager",
|
||||
"type": "`TManager`",
|
||||
"description": "An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
@@ -0,0 +1,118 @@
|
||||
---
|
||||
displayed_sidebar: workflowsSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# InternalStep
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "action",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "async",
|
||||
"type": "`boolean`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "continueOnPermanentFailure",
|
||||
"type": "`boolean`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "depth",
|
||||
"type": "`number`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "maxRetries",
|
||||
"type": "`number`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "next",
|
||||
"type": "[InternalStep](InternalStep.mdx) \\| [InternalStep](InternalStep.mdx)[]",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "noCompensation",
|
||||
"type": "`boolean`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "noWait",
|
||||
"type": "`boolean`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "parent",
|
||||
"type": "`null` \\| [InternalStep](InternalStep.mdx)",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "retryInterval",
|
||||
"type": "`number`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "saveResponse",
|
||||
"type": "`boolean`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "timeout",
|
||||
"type": "`number`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
@@ -0,0 +1,165 @@
|
||||
---
|
||||
displayed_sidebar: workflowsSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# JoinerServiceConfig
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "alias",
|
||||
"type": "[JoinerServiceConfigAlias](JoinerServiceConfigAlias.mdx) \\| [JoinerServiceConfigAlias](JoinerServiceConfigAlias.mdx)[]",
|
||||
"description": "Property name to use as entrypoint to the service",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "args",
|
||||
"type": "`Record<string, any>`",
|
||||
"description": "Extra arguments to pass to the remoteFetchData callback",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "extends",
|
||||
"type": "``{ relationship: [JoinerRelationship](../types/JoinerRelationship.mdx) ; serviceName: string }``[]",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": [
|
||||
{
|
||||
"name": "relationship",
|
||||
"type": "[JoinerRelationship](../types/JoinerRelationship.mdx)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "serviceName",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "fieldAlias",
|
||||
"type": "`Record<string, string \\| { forwardArgumentsOnPath: string[] ; path: string }>`",
|
||||
"description": "alias for deeper nested relationships (e.g. { 'price': 'prices.calculated\\_price\\_set.amount' })",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "primaryKeys",
|
||||
"type": "`string`[]",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "relationships",
|
||||
"type": "[JoinerRelationship](../types/JoinerRelationship.mdx)[]",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": [
|
||||
{
|
||||
"name": "alias",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "args",
|
||||
"type": "`Record<string, any>`",
|
||||
"description": "Extra arguments to pass to the remoteFetchData callback",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "foreignKey",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "inverse",
|
||||
"type": "`boolean`",
|
||||
"description": "In an inverted relationship the foreign key is on the other service and the primary key is on the current service",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "isInternalService",
|
||||
"type": "`boolean`",
|
||||
"description": "If true, the relationship is an internal service from the medusa core TODO: Remove when there are no more \"internal\" services",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "isList",
|
||||
"type": "`boolean`",
|
||||
"description": "Force the relationship to return a list",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "primaryKey",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "serviceName",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "serviceName",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
@@ -0,0 +1,28 @@
|
||||
---
|
||||
displayed_sidebar: workflowsSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# JoinerServiceConfigAlias
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "args",
|
||||
"type": "`Record<string, any>`",
|
||||
"description": "Extra arguments to pass to the remoteFetchData callback",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "name",
|
||||
"type": "`string` \\| `string`[]",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
@@ -0,0 +1,168 @@
|
||||
---
|
||||
displayed_sidebar: workflowsSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# StepExecutionContext
|
||||
|
||||
The step's context.
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "container",
|
||||
"type": "[MedusaContainer](../types/MedusaContainer.mdx)",
|
||||
"description": "The container used to access resources, such as services, in the step.",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": [
|
||||
{
|
||||
"name": "createScope",
|
||||
"type": "() => [MedusaContainer](../types/MedusaContainer.mdx)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "registerAdd",
|
||||
"type": "`<T>`(`name`: `string`, `registration`: `T`) => [MedusaContainer](../types/MedusaContainer.mdx)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "context",
|
||||
"type": "[Context](Context.mdx)",
|
||||
"description": "A shared context object that is used to share resources between the application and the module.",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": [
|
||||
{
|
||||
"name": "enableNestedTransactions",
|
||||
"type": "`boolean`",
|
||||
"description": "A boolean value indicating whether nested transactions are enabled.",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "isolationLevel",
|
||||
"type": "`string`",
|
||||
"description": "A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "manager",
|
||||
"type": "`TManager`",
|
||||
"description": "An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "transactionId",
|
||||
"type": "`string`",
|
||||
"description": "A string indicating the ID of the current transaction.",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "transactionManager",
|
||||
"type": "`TManager`",
|
||||
"description": "An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "metadata",
|
||||
"type": "[TransactionMetadata](../types/TransactionMetadata.mdx)",
|
||||
"description": "Metadata passed in the input.",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": [
|
||||
{
|
||||
"name": "action",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "action_type",
|
||||
"type": "[TransactionHandlerType](../enums/TransactionHandlerType.mdx)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "attempt",
|
||||
"type": "`number`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "idempotency_key",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "model_id",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "reply_to_topic",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "timestamp",
|
||||
"type": "`number`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]} />
|
||||
@@ -0,0 +1,372 @@
|
||||
---
|
||||
displayed_sidebar: workflowsSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# WorkflowDefinition
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "flow_",
|
||||
"type": "[TransactionStepsDefinition](../types/TransactionStepsDefinition.mdx)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": [
|
||||
{
|
||||
"name": "action",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "async",
|
||||
"type": "`boolean`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "continueOnPermanentFailure",
|
||||
"type": "`boolean`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "maxRetries",
|
||||
"type": "`number`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "next",
|
||||
"type": "[TransactionStepsDefinition](../types/TransactionStepsDefinition.mdx) \\| [TransactionStepsDefinition](../types/TransactionStepsDefinition.mdx)[]",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "noCompensation",
|
||||
"type": "`boolean`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "noWait",
|
||||
"type": "`boolean`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "retryInterval",
|
||||
"type": "`number`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "saveResponse",
|
||||
"type": "`boolean`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "timeout",
|
||||
"type": "`number`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "handler",
|
||||
"type": "(`container`: [MedusaContainer](../types/MedusaContainer.mdx), `context?`: [Context](Context.mdx)) => [TransactionStepHandler](../types/TransactionStepHandler.mdx)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "handlers_",
|
||||
"type": "Map<string, { compensate?: [WorkflowStepHandler](../types/WorkflowStepHandler.mdx) ; invoke: [WorkflowStepHandler](../types/WorkflowStepHandler.mdx) }>",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "id",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "optionalModules",
|
||||
"type": "Set<string>",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "orchestrator",
|
||||
"type": "[TransactionOrchestrator](../classes/TransactionOrchestrator.mdx)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": [
|
||||
{
|
||||
"name": "canContinue",
|
||||
"type": "`any`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "canMoveBackward",
|
||||
"type": "`any`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "canMoveForward",
|
||||
"type": "`any`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "checkAllSteps",
|
||||
"type": "`any`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "compensateSteps",
|
||||
"type": "`any`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "createTransactionFlow",
|
||||
"type": "`any`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "definition",
|
||||
"type": "`any`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "executeNext",
|
||||
"type": "`any`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "flagStepsToRevert",
|
||||
"type": "`any`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "getCompensationSteps",
|
||||
"type": "`any`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "getInvokeSteps",
|
||||
"type": "`any`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "getPreviousStep",
|
||||
"type": "`any`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "id",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "invokeSteps",
|
||||
"type": "`any`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "DEFAULT_RETRIES",
|
||||
"type": "`number`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "ROOT_STEP",
|
||||
"type": "`any`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "SEPARATOR",
|
||||
"type": "`any`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "buildSteps",
|
||||
"type": "`any`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "getStepByAction",
|
||||
"type": "`any`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "getTransactionAndStepFromIdempotencyKey",
|
||||
"type": "`any`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "loadTransactionById",
|
||||
"type": "`any`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "setStepFailure",
|
||||
"type": "`any`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "setStepSuccess",
|
||||
"type": "`any`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "requiredModules",
|
||||
"type": "Set<string>",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
@@ -0,0 +1,92 @@
|
||||
---
|
||||
displayed_sidebar: workflowsSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# CompensateFn
|
||||
|
||||
**CompensateFn**: (`input`: `T` \| `undefined`, `context`: [StepExecutionContext](../interfaces/StepExecutionContext.mdx)) => `unknown` \| Promise<unknown>
|
||||
|
||||
## Type Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "T",
|
||||
"type": "`object`",
|
||||
"description": "The type of the argument passed to the compensation function. If not specified, then it will be the same type as the invocation function's output.",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
## Type declaration
|
||||
|
||||
The type of compensation function passed to a step.
|
||||
|
||||
### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "input",
|
||||
"type": "`T` \\| `undefined`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "context",
|
||||
"type": "[StepExecutionContext](../interfaces/StepExecutionContext.mdx)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": [
|
||||
{
|
||||
"name": "container",
|
||||
"type": "[MedusaContainer](MedusaContainer.mdx)",
|
||||
"description": "The container used to access resources, such as services, in the step.",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "context",
|
||||
"type": "[Context](../interfaces/Context.mdx)",
|
||||
"description": "A shared context object that is used to share resources between the application and the module.",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "metadata",
|
||||
"type": "[TransactionMetadata](TransactionMetadata.mdx)",
|
||||
"description": "Metadata passed in the input.",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]} />
|
||||
|
||||
### Returns
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "unknown \\| Promise<unknown>",
|
||||
"type": "`unknown` \\| Promise<unknown>",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "There's no expected type to be returned by the compensation function.",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
@@ -0,0 +1,105 @@
|
||||
---
|
||||
displayed_sidebar: workflowsSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# CreateWorkflowComposerContext
|
||||
|
||||
**CreateWorkflowComposerContext**: `Object`
|
||||
|
||||
## Type declaration
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "flow",
|
||||
"type": "[OrchestratorBuilder](../classes/OrchestratorBuilder.mdx)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": [
|
||||
{
|
||||
"name": "hasChanges_",
|
||||
"type": "`boolean`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "steps",
|
||||
"type": "[InternalStep](../interfaces/InternalStep.mdx)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "handlers",
|
||||
"type": "[WorkflowHandler](WorkflowHandler.mdx)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "hookBinder",
|
||||
"type": "`<TOutput>`(`name`: `string`, `fn`: `Function`) => [WorkflowData](WorkflowData.mdx)<TOutput>",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "hooksCallback_",
|
||||
"type": "`Record<string, Function[]>`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "hooks_",
|
||||
"type": "`string`[]",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "parallelizeBinder",
|
||||
"type": "`<TOutput>`(`fn`: (`this`: [CreateWorkflowComposerContext](CreateWorkflowComposerContext.mdx)) => `TOutput`) => `TOutput`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "stepBinder",
|
||||
"type": "`<TOutput>`(`fn`: [StepFunctionResult](StepFunctionResult.mdx)) => [WorkflowData](WorkflowData.mdx)<TOutput>",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "workflowId",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
@@ -0,0 +1,214 @@
|
||||
---
|
||||
displayed_sidebar: workflowsSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# ExternalModuleDeclaration
|
||||
|
||||
**ExternalModuleDeclaration**: `Object`
|
||||
|
||||
## Type declaration
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "alias",
|
||||
"type": "`string`",
|
||||
"description": "If multiple modules are registered with the same key, the alias can be used to differentiate them",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "definition",
|
||||
"type": "[ModuleDefinition](ModuleDefinition.mdx)",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": [
|
||||
{
|
||||
"name": "canOverride",
|
||||
"type": "`boolean`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "defaultModuleDeclaration",
|
||||
"type": "[InternalModuleDeclaration](InternalModuleDeclaration.mdx) \\| [ExternalModuleDeclaration](ExternalModuleDeclaration.mdx)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "defaultPackage",
|
||||
"type": "`string` \\| `false`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "dependencies",
|
||||
"type": "`string`[]",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "isLegacy",
|
||||
"type": "`boolean`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "isQueryable",
|
||||
"type": "`boolean`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "isRequired",
|
||||
"type": "`boolean`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "key",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "label",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "registrationName",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "main",
|
||||
"type": "`boolean`",
|
||||
"description": "If the module is the main module for the key when multiple ones are registered",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "options",
|
||||
"type": "`Record<string, unknown>`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "scope",
|
||||
"type": "[EXTERNAL](../index.mdx#external)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "server",
|
||||
"type": "`object`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": [
|
||||
{
|
||||
"name": "keepAlive",
|
||||
"type": "`boolean`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "type",
|
||||
"type": "`\"http\"`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "url",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "server.keepAlive",
|
||||
"type": "`boolean`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "server.type",
|
||||
"type": "`\"http\"`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "server.url",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
@@ -0,0 +1,110 @@
|
||||
---
|
||||
displayed_sidebar: workflowsSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# FlowRunOptions
|
||||
|
||||
**FlowRunOptions**: `Object`
|
||||
|
||||
## Type Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "TData",
|
||||
"type": "`object`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
## Type declaration
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "context",
|
||||
"type": "[Context](../interfaces/Context.mdx)",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": [
|
||||
{
|
||||
"name": "enableNestedTransactions",
|
||||
"type": "`boolean`",
|
||||
"description": "A boolean value indicating whether nested transactions are enabled.",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "isolationLevel",
|
||||
"type": "`string`",
|
||||
"description": "A string indicating the isolation level of the context. Possible values are `READ UNCOMMITTED`, `READ COMMITTED`, `REPEATABLE READ`, or `SERIALIZABLE`.",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "manager",
|
||||
"type": "`TManager`",
|
||||
"description": "An instance of a manager, typically an entity manager, of type `TManager`, which is a typed parameter passed to the context to specify the type of the `manager`.",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "transactionId",
|
||||
"type": "`string`",
|
||||
"description": "A string indicating the ID of the current transaction.",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "transactionManager",
|
||||
"type": "`TManager`",
|
||||
"description": "An instance of a transaction manager of type `TManager`, which is a typed parameter passed to the context to specify the type of the `transactionManager`.",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "input",
|
||||
"type": "`TData`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "resultFrom",
|
||||
"type": "`string` \\| `string`[]",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "throwOnError",
|
||||
"type": "`boolean`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
99
www/apps/docs/content/references/workflows/types/Func.mdx
Normal file
99
www/apps/docs/content/references/workflows/types/Func.mdx
Normal file
@@ -0,0 +1,99 @@
|
||||
---
|
||||
displayed_sidebar: workflowsSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# Func
|
||||
|
||||
**Func**: (`input`: `T`, `context`: [StepExecutionContext](../interfaces/StepExecutionContext.mdx)) => `U` \| Promise<U>
|
||||
|
||||
## Type Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "T",
|
||||
"type": "`object`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "U",
|
||||
"type": "`object`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
## Type declaration
|
||||
|
||||
### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "input",
|
||||
"type": "`T`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "context",
|
||||
"type": "[StepExecutionContext](../interfaces/StepExecutionContext.mdx)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": [
|
||||
{
|
||||
"name": "container",
|
||||
"type": "[MedusaContainer](MedusaContainer.mdx)",
|
||||
"description": "The container used to access resources, such as services, in the step.",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "context",
|
||||
"type": "[Context](../interfaces/Context.mdx)",
|
||||
"description": "A shared context object that is used to share resources between the application and the module.",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "metadata",
|
||||
"type": "[TransactionMetadata](TransactionMetadata.mdx)",
|
||||
"description": "Metadata passed in the input.",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]} />
|
||||
|
||||
### Returns
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "U \\| Promise<U>",
|
||||
"type": "`U` \\| Promise<U>",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
99
www/apps/docs/content/references/workflows/types/Func1.mdx
Normal file
99
www/apps/docs/content/references/workflows/types/Func1.mdx
Normal file
@@ -0,0 +1,99 @@
|
||||
---
|
||||
displayed_sidebar: workflowsSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# Func1
|
||||
|
||||
**Func1**: (`input`: `T` extends [WorkflowData](WorkflowData.mdx)<infer U> ? `U` : `T` extends `object` ? { [K in keyof T]: T[K] extends WorkflowData<infer U> ? U : T[K] } : ``{}``, `context`: [StepExecutionContext](../interfaces/StepExecutionContext.mdx)) => `U` \| Promise<U>
|
||||
|
||||
## Type Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "T",
|
||||
"type": "`object` \\| [WorkflowData](WorkflowData.mdx)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "U",
|
||||
"type": "`object`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
## Type declaration
|
||||
|
||||
### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "input",
|
||||
"type": "`T` extends [WorkflowData](WorkflowData.mdx)<infer U> ? `U` : `T` extends `object` ? { [K in keyof T]: T[K] extends WorkflowData<infer U> ? U : T[K] } : ``{}``",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "context",
|
||||
"type": "[StepExecutionContext](../interfaces/StepExecutionContext.mdx)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": [
|
||||
{
|
||||
"name": "container",
|
||||
"type": "[MedusaContainer](MedusaContainer.mdx)",
|
||||
"description": "The container used to access resources, such as services, in the step.",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "context",
|
||||
"type": "[Context](../interfaces/Context.mdx)",
|
||||
"description": "A shared context object that is used to share resources between the application and the module.",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "metadata",
|
||||
"type": "[TransactionMetadata](TransactionMetadata.mdx)",
|
||||
"description": "Metadata passed in the input.",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]} />
|
||||
|
||||
### Returns
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "U \\| Promise<U>",
|
||||
"type": "`U` \\| Promise<U>",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
@@ -0,0 +1,196 @@
|
||||
---
|
||||
displayed_sidebar: workflowsSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# InternalModuleDeclaration
|
||||
|
||||
**InternalModuleDeclaration**: `Object`
|
||||
|
||||
## Type declaration
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "alias",
|
||||
"type": "`string`",
|
||||
"description": "If multiple modules are registered with the same key, the alias can be used to differentiate them",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "definition",
|
||||
"type": "[ModuleDefinition](ModuleDefinition.mdx)",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": [
|
||||
{
|
||||
"name": "canOverride",
|
||||
"type": "`boolean`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "defaultModuleDeclaration",
|
||||
"type": "[InternalModuleDeclaration](InternalModuleDeclaration.mdx) \\| [ExternalModuleDeclaration](ExternalModuleDeclaration.mdx)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "defaultPackage",
|
||||
"type": "`string` \\| `false`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "dependencies",
|
||||
"type": "`string`[]",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "isLegacy",
|
||||
"type": "`boolean`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "isQueryable",
|
||||
"type": "`boolean`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "isRequired",
|
||||
"type": "`boolean`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "key",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "label",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "registrationName",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "dependencies",
|
||||
"type": "`string`[]",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "main",
|
||||
"type": "`boolean`",
|
||||
"description": "If the module is the main module for the key when multiple ones are registered",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "options",
|
||||
"type": "`Record<string, unknown>`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "resolve",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "resources",
|
||||
"type": "[MODULE_RESOURCE_TYPE](../enums/MODULE_RESOURCE_TYPE.mdx)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": [
|
||||
{
|
||||
"name": "ISOLATED",
|
||||
"type": "`\"isolated\"`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "SHARED",
|
||||
"type": "`\"shared\"`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "scope",
|
||||
"type": "[INTERNAL](../index.mdx#internal)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
110
www/apps/docs/content/references/workflows/types/InvokeFn.mdx
Normal file
110
www/apps/docs/content/references/workflows/types/InvokeFn.mdx
Normal file
@@ -0,0 +1,110 @@
|
||||
---
|
||||
displayed_sidebar: workflowsSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# InvokeFn
|
||||
|
||||
**InvokeFn**: (`input`: { [Key in keyof TInput]: TInput[Key] }, `context`: [StepExecutionContext](../interfaces/StepExecutionContext.mdx)) => `void` \| [StepResponse](../classes/StepResponse.mdx)<TOutput, TCompensateInput extends undefined ? TOutput : TCompensateInput> \| Promise<void \| [StepResponse](../classes/StepResponse.mdx)<TOutput, TCompensateInput extends undefined ? TOutput : TCompensateInput>>
|
||||
|
||||
## Type Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "TInput",
|
||||
"type": "`object`",
|
||||
"description": "The type of the input that the function expects.",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "TOutput",
|
||||
"type": "`object`",
|
||||
"description": "The type of the output that the function returns.",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "TCompensateInput",
|
||||
"type": "`object`",
|
||||
"description": "The type of the input that the compensation function expects.",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
|
||||
## Type declaration
|
||||
|
||||
The type of invocation function passed to a step.
|
||||
|
||||
### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "input",
|
||||
"type": "{ [Key in keyof TInput]: TInput[Key] }",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "context",
|
||||
"type": "[StepExecutionContext](../interfaces/StepExecutionContext.mdx)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": [
|
||||
{
|
||||
"name": "container",
|
||||
"type": "[MedusaContainer](MedusaContainer.mdx)",
|
||||
"description": "The container used to access resources, such as services, in the step.",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "context",
|
||||
"type": "[Context](../interfaces/Context.mdx)",
|
||||
"description": "A shared context object that is used to share resources between the application and the module.",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "metadata",
|
||||
"type": "[TransactionMetadata](TransactionMetadata.mdx)",
|
||||
"description": "Metadata passed in the input.",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]} />
|
||||
|
||||
### Returns
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "void \\| StepResponse<TOutput, TCompensateInput extends undefined ? TOutput : TCompensateInput> \\| Promise<void \\| StepResponse<TOutput, TCompensateInput extends undefined ? TOutput : TCompensateInput>>",
|
||||
"type": "`void` \\| [StepResponse](../classes/StepResponse.mdx)<TOutput, TCompensateInput extends undefined ? TOutput : TCompensateInput> \\| Promise<void \\| [StepResponse](../classes/StepResponse.mdx)<TOutput, TCompensateInput extends undefined ? TOutput : TCompensateInput>>",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "The expected output based on the type parameter `TOutput`.",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
@@ -0,0 +1,86 @@
|
||||
---
|
||||
displayed_sidebar: workflowsSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# JoinerRelationship
|
||||
|
||||
**JoinerRelationship**: `Object`
|
||||
|
||||
## Type declaration
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "alias",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "args",
|
||||
"type": "`Record<string, any>`",
|
||||
"description": "Extra arguments to pass to the remoteFetchData callback",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "foreignKey",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "inverse",
|
||||
"type": "`boolean`",
|
||||
"description": "In an inverted relationship the foreign key is on the other service and the primary key is on the current service",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "isInternalService",
|
||||
"type": "`boolean`",
|
||||
"description": "If true, the relationship is an internal service from the medusa core TODO: Remove when there are no more \"internal\" services",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "isList",
|
||||
"type": "`boolean`",
|
||||
"description": "Force the relationship to return a list",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "primaryKey",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "serviceName",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
@@ -0,0 +1,9 @@
|
||||
---
|
||||
displayed_sidebar: workflowsSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# MedusaContainer
|
||||
|
||||
**MedusaContainer**: `AwilixContainer` & ``{ createScope: () => [MedusaContainer](MedusaContainer.mdx) ; registerAdd: <T>(name: string, registration: T) => [MedusaContainer](MedusaContainer.mdx) }``
|
||||
@@ -0,0 +1,104 @@
|
||||
---
|
||||
displayed_sidebar: workflowsSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# ModuleDefinition
|
||||
|
||||
**ModuleDefinition**: `Object`
|
||||
|
||||
## Type declaration
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "canOverride",
|
||||
"type": "`boolean`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "defaultModuleDeclaration",
|
||||
"type": "[InternalModuleDeclaration](InternalModuleDeclaration.mdx) \\| [ExternalModuleDeclaration](ExternalModuleDeclaration.mdx)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "defaultPackage",
|
||||
"type": "`string` \\| `false`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "dependencies",
|
||||
"type": "`string`[]",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "isLegacy",
|
||||
"type": "`boolean`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "isQueryable",
|
||||
"type": "`boolean`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "isRequired",
|
||||
"type": "`boolean`",
|
||||
"description": "",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "key",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "label",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "registrationName",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
@@ -0,0 +1,9 @@
|
||||
---
|
||||
displayed_sidebar: workflowsSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# ModuleJoinerConfig
|
||||
|
||||
**ModuleJoinerConfig**: Omit<[JoinerServiceConfig](../interfaces/JoinerServiceConfig.mdx), "serviceName" \| "primaryKeys" \| "relationships" \| "extends"> & ``{ databaseConfig?: { extraFields?: Record<string, { defaultValue?: string ; nullable?: boolean ; options?: Record<string, unknown> ; type: "date" \| "time" \| "datetime" \| bigint \| "blob" \| "uint8array" \| "array" \| "enumArray" \| "enum" \| "json" \| "integer" \| "smallint" \| "tinyint" \| "mediumint" \| "float" \| "double" \| "boolean" \| "decimal" \| "string" \| "uuid" \| "text" }> ; idPrefix?: string ; tableName?: string } ; extends?: { fieldAlias?: Record<string, string \| { forwardArgumentsOnPath: string[] ; path: string }> ; relationship: [ModuleJoinerRelationship](ModuleJoinerRelationship.mdx) ; serviceName: string }[] ; isLink?: boolean ; isReadOnlyLink?: boolean ; linkableKeys?: Record<string, string> ; primaryKeys?: string[] ; relationships?: [ModuleJoinerRelationship](ModuleJoinerRelationship.mdx)[] ; schema?: string ; serviceName?: string }``
|
||||
@@ -0,0 +1,9 @@
|
||||
---
|
||||
displayed_sidebar: workflowsSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# ModuleJoinerRelationship
|
||||
|
||||
**ModuleJoinerRelationship**: [JoinerRelationship](JoinerRelationship.mdx) & ``{ deleteCascade?: boolean ; isInternalService?: boolean }``
|
||||
@@ -0,0 +1,88 @@
|
||||
---
|
||||
displayed_sidebar: workflowsSidebar
|
||||
---
|
||||
|
||||
import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
# ReturnWorkflow
|
||||
|
||||
**ReturnWorkflow**: `<TDataOverride, TResultOverride>`(`container?`: [MedusaContainer](MedusaContainer.mdx) \| ``{ __definition: [ModuleDefinition](ModuleDefinition.mdx) ; __joinerConfig: [ModuleJoinerConfig](ModuleJoinerConfig.mdx) }``[]) => Omit<[LocalWorkflow](../classes/LocalWorkflow.mdx), "run"> & ``{ run: (args?: [FlowRunOptions](FlowRunOptions.mdx)<TDataOverride extends undefined ? TData : TDataOverride>) => Promise<[WorkflowResult](WorkflowResult.mdx)<TResultOverride extends undefined ? TResult : TResultOverride>> }`` & `THooks`
|
||||
|
||||
An exported workflow, which is the type of a workflow constructed by the [createWorkflow](../functions/createWorkflow.mdx) function. The exported workflow can be invoked to create
|
||||
an executable workflow, optionally within a specified container. So, to execute the workflow, you must invoke the exported workflow, then run the
|
||||
`run` method of the exported workflow.
|
||||
|
||||
## Example
|
||||
|
||||
To execute a workflow:
|
||||
|
||||
```ts
|
||||
myWorkflow()
|
||||
.run({
|
||||
input: {
|
||||
name: "John",
|
||||
},
|
||||
})
|
||||
.then(({ result }) => {
|
||||
console.log(result)
|
||||
})
|
||||
```
|
||||
|
||||
To specify the container of the workflow, you can pass it as an argument to the call of the exported workflow. This is necessary when executing the workflow
|
||||
within a Medusa resource such as an API Route or a Subscriber.
|
||||
|
||||
For example:
|
||||
|
||||
```ts
|
||||
import type {
|
||||
MedusaRequest,
|
||||
MedusaResponse
|
||||
} from "@medusajs/medusa";
|
||||
import myWorkflow from "../../../workflows/hello-world";
|
||||
|
||||
export async function GET(
|
||||
req: MedusaRequest,
|
||||
res: MedusaResponse
|
||||
) {
|
||||
const { result } = await myWorkflow(req.scope)
|
||||
.run({
|
||||
input: {
|
||||
name: req.query.name as string
|
||||
}
|
||||
})
|
||||
|
||||
res.send(result)
|
||||
}
|
||||
```
|
||||
|
||||
## Type Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "TData",
|
||||
"type": "`object`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "TResult",
|
||||
"type": "`object`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "THooks",
|
||||
"type": "`Record<string, Function>`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user