chore(docs): Generated References (automated) (#12460)

Generated the following references:
- `_index.mdx`
- `api_key`
- `api_key_models`
- `auth`
- `auth_models`
- `auth_provider`
- `cart`
- `cart_models`
- `core_flows`
- `currency`
- `currency_models`
- `customer`
- `customer_models`
- `events`
- `file`
- `file_service`
- `fulfillment`
- `fulfillment_models`
- `fulfillment_provider`
- `inventory_next`
- `inventory_next_models`
- `js_sdk`
- `locking`
- `medusa`
- `module_events`
- `modules`
- `modules_sdk`
- `notification`
- `notification_service`
- `order`
- `order_models`
- `payment`
- `payment_models`
- `payment_provider`
- `pricing`
- `pricing_models`
- `product`
- `product_models`
- `promotion`
- `promotion_models`
- `region`
- `region_models`
- `sales_channel`
- `sales_channel_models`
- `stock_location_next`
- `stock_location_next_models`
- `store`
- `store_models`
- `tax`
- `tax_models`
- `tax_provider`
- `types`
- `user`
- `user_models`
- `utils`
- `workflows`

Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
Co-authored-by: Shahed Nasser <27354907+shahednasser@users.noreply.github.com>
This commit is contained in:
authored and GitHub committed 2025-05-13 13:31:57 +00:00
1 parent a4ffc0b2ee
commit 5c36bafc1d
1978 files changed
+332243 -279592

No files matched your search

@@ -0,0 +1,25 @@
import { TypeList } from "docs-ui"
# BaseStepErrror
## Constructors
- [constructor](page.mdx#constructor)
## Methods
- [getStepResponse](../../BaseStepErrror/methods/workflows.BaseStepErrror.getStepResponse/page.mdx)
## Properties
- [#private](page.mdx##private)
## constructor
### Parameters
<TypeList types={[{"name":"name","type":"`any`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"message","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"stepResponse","type":"`unknown`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="BaseStepErrror"/>
___
<TypeList types={[{"name":"#private","type":"`any`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="BaseStepErrror"/>
@@ -0,0 +1,67 @@
import { TypeList } from "docs-ui"
# DistributedTransaction
DistributedTransaction represents a distributed transaction, which is a transaction that is composed of multiple steps that are executed in a specific order.
## Accessors
- [isPartiallyCompleted](page.mdx#ispartiallycompleted)
## Constructors
- [constructor](page.mdx#constructor)
## Methods
- [addError](../../DistributedTransaction/methods/workflows.DistributedTransaction.addError/page.mdx)
- [addResponse](../../DistributedTransaction/methods/workflows.DistributedTransaction.addResponse/page.mdx)
- [canInvoke](../../DistributedTransaction/methods/workflows.DistributedTransaction.canInvoke/page.mdx)
- [canRevert](../../DistributedTransaction/methods/workflows.DistributedTransaction.canRevert/page.mdx)
- [clearRetry](../../DistributedTransaction/methods/workflows.DistributedTransaction.clearRetry/page.mdx)
- [clearStepTimeout](../../DistributedTransaction/methods/workflows.DistributedTransaction.clearStepTimeout/page.mdx)
- [clearTransactionTimeout](../../DistributedTransaction/methods/workflows.DistributedTransaction.clearTransactionTimeout/page.mdx)
- [getContext](../../DistributedTransaction/methods/workflows.DistributedTransaction.getContext/page.mdx)
- [getErrors](../../DistributedTransaction/methods/workflows.DistributedTransaction.getErrors/page.mdx)
- [getFlow](../../DistributedTransaction/methods/workflows.DistributedTransaction.getFlow/page.mdx)
- [getState](../../DistributedTransaction/methods/workflows.DistributedTransaction.getState/page.mdx)
- [getTemporaryData](../../DistributedTransaction/methods/workflows.DistributedTransaction.getTemporaryData/page.mdx)
- [getTimeout](../../DistributedTransaction/methods/workflows.DistributedTransaction.getTimeout/page.mdx)
- [hasFinished](../../DistributedTransaction/methods/workflows.DistributedTransaction.hasFinished/page.mdx)
- [hasTemporaryData](../../DistributedTransaction/methods/workflows.DistributedTransaction.hasTemporaryData/page.mdx)
- [hasTimeout](../../DistributedTransaction/methods/workflows.DistributedTransaction.hasTimeout/page.mdx)
- [loadTransaction](../../DistributedTransaction/methods/workflows.DistributedTransaction.loadTransaction/page.mdx)
- [saveCheckpoint](../../DistributedTransaction/methods/workflows.DistributedTransaction.saveCheckpoint/page.mdx)
- [scheduleRetry](../../DistributedTransaction/methods/workflows.DistributedTransaction.scheduleRetry/page.mdx)
- [scheduleStepTimeout](../../DistributedTransaction/methods/workflows.DistributedTransaction.scheduleStepTimeout/page.mdx)
- [scheduleTransactionTimeout](../../DistributedTransaction/methods/workflows.DistributedTransaction.scheduleTransactionTimeout/page.mdx)
- [setStorage](../../DistributedTransaction/methods/workflows.DistributedTransaction.setStorage/page.mdx)
- [setTemporaryData](../../DistributedTransaction/methods/workflows.DistributedTransaction.setTemporaryData/page.mdx)
## Properties
- [#private](page.mdx##private)
- [context](page.mdx#context)
- [errors](page.mdx#errors)
- [flow](page.mdx#flow)
- [handler](page.mdx#handler)
- [keyPrefix](page.mdx#keyprefix)
- [keyValueStore](page.mdx#keyvaluestore)
- [modelId](page.mdx#modelid)
- [payload](page.mdx#payload)
- [runId](page.mdx#runid)
- [transactionId](page.mdx#transactionid)
## isPartiallyCompleted
___
## constructor
### Parameters
<TypeList types={[{"name":"flow","type":"[TransactionFlow](../../types/workflows.TransactionFlow/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"modelId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"definition","type":"[TransactionStepsDefinition](../../types/workflows.TransactionStepsDefinition/page.mdx)","description":"Defines the structure and behavior of a single step within a transaction workflow.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"runId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"hasAsyncSteps","type":"`boolean`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"hasFailedSteps","type":"`boolean`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"hasSkippedOnFailureSteps","type":"`boolean`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"hasWaitingSteps","type":"`boolean`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"hasSkippedSteps","type":"`boolean`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"hasRevertedSteps","type":"`boolean`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"timedOutAt","type":"`number` \\| `null`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"state","type":"[TransactionState](../../enums/workflows.TransactionState/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"steps","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"[TransactionModelOptions](../../types/workflows.TransactionModelOptions/page.mdx)","description":"Defines the options for a transaction model, which are applicable to the entire workflow.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`object`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"startedAt","type":"`number`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"cancelledAt","type":"`number`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"handler","type":"[TransactionStepHandler](../../types/workflows.TransactionStepHandler/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payload","type":"`any`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"errors","type":"[TransactionStepError](../workflows.TransactionStepError/page.mdx)[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"action","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"handlerType","type":"[TransactionHandlerType](../../enums/workflows.TransactionHandlerType/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"error","type":"`any`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"context","type":"[TransactionContext](../workflows.TransactionContext/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"payload","type":"`unknown`","description":"Object containing the initial payload.","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":"compensate","type":"`Record<string, unknown>`","description":"Object containing responses of Compensate handlers on steps flagged with saveResponse.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="DistributedTransaction"/>
___
<TypeList types={[{"name":"#private","type":"`any`","description":"","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/workflows.TransactionStepHandler/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"keyPrefix","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"keyValueStore","type":"`any`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"modelId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"runId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payload","type":"`any`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="DistributedTransaction"/>
@@ -0,0 +1,61 @@
import { TypeList } from "docs-ui"
# LocalWorkflow
## Accessors
- [container](page.mdx#container)
## Constructors
- [constructor](page.mdx#constructor)
## Methods
- [addAction](../../LocalWorkflow/methods/workflows.LocalWorkflow.addAction/page.mdx)
- [appendAction](../../LocalWorkflow/methods/workflows.LocalWorkflow.appendAction/page.mdx)
- [assertHandler](../../LocalWorkflow/methods/workflows.LocalWorkflow.assertHandler/page.mdx)
- [cancel](../../LocalWorkflow/methods/workflows.LocalWorkflow.cancel/page.mdx)
- [commit](../../LocalWorkflow/methods/workflows.LocalWorkflow.commit/page.mdx)
- [deleteAction](../../LocalWorkflow/methods/workflows.LocalWorkflow.deleteAction/page.mdx)
- [getFlow](../../LocalWorkflow/methods/workflows.LocalWorkflow.getFlow/page.mdx)
- [getRunningTransaction](../../LocalWorkflow/methods/workflows.LocalWorkflow.getRunningTransaction/page.mdx)
- [insertActionAfter](../../LocalWorkflow/methods/workflows.LocalWorkflow.insertActionAfter/page.mdx)
- [insertActionBefore](../../LocalWorkflow/methods/workflows.LocalWorkflow.insertActionBefore/page.mdx)
- [mergeActions](../../LocalWorkflow/methods/workflows.LocalWorkflow.mergeActions/page.mdx)
- [moveAction](../../LocalWorkflow/methods/workflows.LocalWorkflow.moveAction/page.mdx)
- [moveAndMergeNextAction](../../LocalWorkflow/methods/workflows.LocalWorkflow.moveAndMergeNextAction/page.mdx)
- [pruneAction](../../LocalWorkflow/methods/workflows.LocalWorkflow.pruneAction/page.mdx)
- [registerStepFailure](../../LocalWorkflow/methods/workflows.LocalWorkflow.registerStepFailure/page.mdx)
- [registerStepSuccess](../../LocalWorkflow/methods/workflows.LocalWorkflow.registerStepSuccess/page.mdx)
- [replaceAction](../../LocalWorkflow/methods/workflows.LocalWorkflow.replaceAction/page.mdx)
- [run](../../LocalWorkflow/methods/workflows.LocalWorkflow.run/page.mdx)
- [setOptions](../../LocalWorkflow/methods/workflows.LocalWorkflow.setOptions/page.mdx)
## Properties
- [container\_](page.mdx#container_)
- [contextualizedMedusaModules](page.mdx#contextualizedmedusamodules)
- [customOptions](page.mdx#customoptions)
- [flow](page.mdx#flow)
- [handlers](page.mdx#handlers)
- [medusaContext](page.mdx#medusacontext)
- [onLoad](page.mdx#onload)
- [registerEventCallbacks](page.mdx#registereventcallbacks)
- [resolveContainer](page.mdx#resolvecontainer)
- [workflow](page.mdx#workflow)
- [workflowId](page.mdx#workflowid)
## container
___
## constructor
### Parameters
<TypeList types={[{"name":"workflowId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"modulesLoaded","type":"[MedusaContainer](../../types/workflows.MedusaContainer/page.mdx) \\| `object`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="LocalWorkflow"/>
___
<TypeList types={[{"name":"container_","type":"[MedusaContainer](../../types/workflows.MedusaContainer/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"contextualizedMedusaModules","type":"`any`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customOptions","type":"Partial&#60;[TransactionModelOptions](../../types/workflows.TransactionModelOptions/page.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"timeout","type":"`number`","description":"The global timeout for the entire transaction workflow (in seconds).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"store","type":"`boolean`","description":"If true, the state of the transaction will be persisted.\n\nLearn more in [this documentation](https://docs.medusajs.com/learn/fundamentals/workflows/store-executions).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"retentionTime","type":"`number`","description":"The number of seconds that the workflow execution should be stored in the database.\n\nLearn more in [this documentation](https://docs.medusajs.com/learn/fundamentals/workflows/store-executions).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"storeExecution","type":"`boolean`","description":"If true, the execution details of each step will be stored.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotent","type":"`boolean`","description":"If true, the workflow will use the transaction ID as the key to ensure only-once execution","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"schedule","type":"`string` \\| [SchedulerOptions](../../types/workflows.SchedulerOptions/page.mdx)","description":"Defines the workflow as a scheduled workflow that executes based on the cron configuration passed.\nThe value can either by a cron expression string, or an object that also allows to define the concurrency behavior.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"flow","type":"[OrchestratorBuilder](../workflows.OrchestratorBuilder/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"steps","type":"[InternalStep](../../interfaces/workflows.InternalStep/page.mdx)","description":"Defines the structure and behavior of a single step within a transaction workflow.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"hasChanges_","type":"`boolean`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"handlers","type":"Map&#60;string, [StepHandler](../../types/workflows.StepHandler/page.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"invoke","type":"[WorkflowStepHandler](../../types/workflows.WorkflowStepHandler/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"compensate","type":"[WorkflowStepHandler](../../types/workflows.WorkflowStepHandler/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"onLoad","type":"`any`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"registerEventCallbacks","type":"`any`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"resolveContainer","type":"`any`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"workflow","type":"[WorkflowDefinition](../../interfaces/workflows.WorkflowDefinition/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"handler","type":"(`container`: [MedusaContainer](../../types/workflows.MedusaContainer/page.mdx), `context?`: [Context](../../interfaces/workflows.Context/page.mdx)) => [TransactionStepHandler](../../types/workflows.TransactionStepHandler/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"orchestrator","type":"[TransactionOrchestrator](../workflows.TransactionOrchestrator/page.mdx)","description":"TransactionOrchestrator is responsible for managing and executing distributed transactions.\nIt is based on a single transaction definition, which is used to execute all the transaction steps","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"flow_","type":"[TransactionStepsDefinition](../../types/workflows.TransactionStepsDefinition/page.mdx)","description":"Defines the structure and behavior of a single step within a transaction workflow.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"handLine truncated
@@ -0,0 +1,52 @@
import { TypeList } from "docs-ui"
# OrchestratorBuilder
## Accessors
- [hasChanges](page.mdx#haschanges)
## Constructors
- [constructor](page.mdx#constructor)
## Methods
- [addAction](../../OrchestratorBuilder/methods/workflows.OrchestratorBuilder.addAction/page.mdx)
- [appendAction](../../OrchestratorBuilder/methods/workflows.OrchestratorBuilder.appendAction/page.mdx)
- [appendTo](../../OrchestratorBuilder/methods/workflows.OrchestratorBuilder.appendTo/page.mdx)
- [build](../../OrchestratorBuilder/methods/workflows.OrchestratorBuilder.build/page.mdx)
- [deleteAction](../../OrchestratorBuilder/methods/workflows.OrchestratorBuilder.deleteAction/page.mdx)
- [findLastStep](../../OrchestratorBuilder/methods/workflows.OrchestratorBuilder.findLastStep/page.mdx)
- [findOrThrowStepByAction](../../OrchestratorBuilder/methods/workflows.OrchestratorBuilder.findOrThrowStepByAction/page.mdx)
- [findParentStepByAction](../../OrchestratorBuilder/methods/workflows.OrchestratorBuilder.findParentStepByAction/page.mdx)
- [findStepByAction](../../OrchestratorBuilder/methods/workflows.OrchestratorBuilder.findStepByAction/page.mdx)
- [insertActionAfter](../../OrchestratorBuilder/methods/workflows.OrchestratorBuilder.insertActionAfter/page.mdx)
- [insertActionBefore](../../OrchestratorBuilder/methods/workflows.OrchestratorBuilder.insertActionBefore/page.mdx)
- [load](../../OrchestratorBuilder/methods/workflows.OrchestratorBuilder.load/page.mdx)
- [mergeActions](../../OrchestratorBuilder/methods/workflows.OrchestratorBuilder.mergeActions/page.mdx)
- [move](../../OrchestratorBuilder/methods/workflows.OrchestratorBuilder.move/page.mdx)
- [moveAction](../../OrchestratorBuilder/methods/workflows.OrchestratorBuilder.moveAction/page.mdx)
- [moveAndMergeNextAction](../../OrchestratorBuilder/methods/workflows.OrchestratorBuilder.moveAndMergeNextAction/page.mdx)
- [pruneAction](../../OrchestratorBuilder/methods/workflows.OrchestratorBuilder.pruneAction/page.mdx)
- [replaceAction](../../OrchestratorBuilder/methods/workflows.OrchestratorBuilder.replaceAction/page.mdx)
- [updateDepths](../../OrchestratorBuilder/methods/workflows.OrchestratorBuilder.updateDepths/page.mdx)
## Properties
- [hasChanges\_](page.mdx#haschanges_)
- [steps](page.mdx#steps)
## hasChanges
___
## constructor
### Parameters
<TypeList types={[{"name":"steps","type":"[TransactionStepsDefinition](../../types/workflows.TransactionStepsDefinition/page.mdx)","description":"Defines the structure and behavior of a single step within a transaction workflow.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"uuid","type":"`string`","description":"A unique identifier for the transaction step.\nThis is set automatically when declaring a workflow with \"createWorkflow\"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"action","type":"`string`","description":"Specifies the action to be performed in this step.\n\"name\" is an alias for action when creating a workflow with \"createWorkflow\".","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"continueOnPermanentFailure","type":"`boolean`","description":"Indicates whether the workflow should continue even if there is a permanent failure in this step.\nIn case it is set to true, the the current step will be marked as TransactionStepState.PERMANENT\\_FAILURE and the next steps will be executed.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"skipOnPermanentFailure","type":"`boolean` \\| `string`","description":"Indicates whether the workflow should skip all subsequent steps in case of a permanent failure in this step.\nIn case it is set to true, the next steps of the workflow will not be executed and their status will be marked as TransactionStepState.SKIPPED\\_FAILURE.\nIn case it is a string, the next steps until the step name provided will be skipped and the workflow will be resumed from the step provided.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"noCompensation","type":"`boolean`","description":"If true, no compensation action will be triggered for this step in case of a failure.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"maxRetries","type":"`number`","description":"The maximum number of times this step should be retried in case of temporary failures.\nThe default is 0 (no retries).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"retryInterval","type":"`number`","description":"The interval (in seconds) between retry attempts after a temporary failure.\nThe default is to retry immediately.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"retryIntervalAwaiting","type":"`number`","description":"The interval (in seconds) to retry a step even if its status is \"TransactionStepStatus.WAITING\".","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"timeout","type":"`number`","description":"The maximum amount of time (in seconds) to wait for this step to complete.\nThis is NOT an execution timeout, the step will always be executed and wait for its response.\nIf the response is not received within the timeout set, it will be marked as \"TransactionStepStatus.TIMEOUT\" and the workflow will be reverted as soon as it receives the response.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"async","type":"`boolean`","description":"If true, the step is executed asynchronously. This means that the workflow will not wait for the response of this step.\nAsync steps require to have their responses set using \"setStepSuccess\" or \"setStepFailure\", unless it is combined with \"backgroundExecution: true\".\nIf combined with a timeout, and any response is not set within that interval, the step will be marked as \"TransactionStepStatus.TIMEOUT\" and the workflow will be reverted immediately.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"nested","type":"`boolean`","description":"It flags where the step contains a sub transaction inside itself.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"backgroundExecution","type":"`boolean`","description":"It applies to \"async\" steps only, allowing them to run in the background and automatically complete without external intervention.\nIt is ideal for time-consuming tasks that will be complete after the execution, contrasting with standard \"async\" operations that require a response to be set in a later stage.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"compensateAsync","type":"`boolean`","description":"If true, the compensation function for this step is executed asynchronously. Which means, the response has to be set using \"setStepSuccess\" or \"setStepFailure\".","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"noWait","type":"`boolean`","description":"If true, the workflow will not wait for their sibling steps to complete before moving to the next step.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"saveResponse","type":"`boolean`","description":"If true, the response of this step will be stored.\nDefault is true.","optional":trLine truncated
___
<TypeList types={[{"name":"hasChanges_","type":"`boolean`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"steps","type":"[InternalStep](../../interfaces/workflows.InternalStep/page.mdx)","description":"Defines the structure and behavior of a single step within a transaction workflow.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"depth","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"next","type":"[InternalStep](../../interfaces/workflows.InternalStep/page.mdx) \\| [InternalStep](../../interfaces/workflows.InternalStep/page.mdx)[]","description":"Defines the next step(s) to execute after this step. Can be a single step or an array of steps.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"parent","type":"`null` \\| [InternalStep](../../interfaces/workflows.InternalStep/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"uuid","type":"`string`","description":"A unique identifier for the transaction step.\nThis is set automatically when declaring a workflow with \"createWorkflow\"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"action","type":"`string`","description":"Specifies the action to be performed in this step.\n\"name\" is an alias for action when creating a workflow with \"createWorkflow\".","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"continueOnPermanentFailure","type":"`boolean`","description":"Indicates whether the workflow should continue even if there is a permanent failure in this step.\nIn case it is set to true, the the current step will be marked as TransactionStepState.PERMANENT\\_FAILURE and the next steps will be executed.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"skipOnPermanentFailure","type":"`string` \\| `boolean`","description":"Indicates whether the workflow should skip all subsequent steps in case of a permanent failure in this step.\nIn case it is set to true, the next steps of the workflow will not be executed and their status will be marked as TransactionStepState.SKIPPED\\_FAILURE.\nIn case it is a string, the next steps until the step name provided will be skipped and the workflow will be resumed from the step provided.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"noCompensation","type":"`boolean`","description":"If true, no compensation action will be triggered for this step in case of a failure.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"maxRetries","type":"`number`","description":"The maximum number of times this step should be retried in case of temporary failures.\nThe default is 0 (no retries).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"retryInterval","type":"`number`","description":"The interval (in seconds) between retry attempts after a temporary failure.\nThe default is to retry immediately.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"retryIntervalAwaiting","type":"`number`","description":"The interval (in seconds) to retry a step even if its status is \"TransactionStepStatus.WAITING\".","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"timeout","type":"`number`","description":"The maximum amount of time (in seconds) to wait for this step to complete.\nThis is NOT an execution timeout, the step will always be executed and wait for its response.\nIf the response is not received within the timeout set, it will be marked as \"TransactionStepStatus.TIMEOUT\" and the workflow will be reverted as soon as it receives the response.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"async","type":"`boolean`","description":"If true, the step is executed asynchronously. This means that the workflow will not wait for the response of this step.\nAsync steps require to have their responses set using \"setStepSuccess\" or \"setStepFailure\", unless it is combined with \"backgroundExecution: true\".\nIf combined with a timeout, and any response is not set within that interval, the step will be marked as \"TransactionStepStatus.TIMEOUT\" and the workflow will be reverted immediately.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"nested","type":"`boolean`","description":"It flags where the step contains a sub transaction inside itself.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"backgroundExecution","type":"`boolean`","description":"It applies to \"async\" steps only, allowing them to run in the background and automatically complete without external intervention.\nIt is ideal for time-consuming tasks that will be complete after the execution, contrasting with standard \"async\" operations that require a response to Line truncated
@@ -0,0 +1,18 @@
import { TypeList } from "docs-ui"
# SkipStepResponse
## Constructors
- [constructor](page.mdx#constructor)
## Methods
- [getStepResponse](../../SkipStepResponse/methods/workflows.SkipStepResponse.getStepResponse/page.mdx)
- [isSkipStepResponse](../../SkipStepResponse/methods/workflows.SkipStepResponse.isSkipStepResponse/page.mdx)
## constructor
### Parameters
<TypeList types={[{"name":"message","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"stepResponse","type":"`unknown`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="SkipStepResponse"/>
@@ -0,0 +1,13 @@
import { TypeList } from "docs-ui"
# TransactionCheckpoint
## constructor
### Parameters
<TypeList types={[{"name":"flow","type":"[TransactionFlow](../../types/workflows.TransactionFlow/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"modelId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"definition","type":"[TransactionStepsDefinition](../../types/workflows.TransactionStepsDefinition/page.mdx)","description":"Defines the structure and behavior of a single step within a transaction workflow.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"runId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"hasAsyncSteps","type":"`boolean`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"hasFailedSteps","type":"`boolean`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"hasSkippedOnFailureSteps","type":"`boolean`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"hasWaitingSteps","type":"`boolean`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"hasSkippedSteps","type":"`boolean`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"hasRevertedSteps","type":"`boolean`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"timedOutAt","type":"`number` \\| `null`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"state","type":"[TransactionState](../../enums/workflows.TransactionState/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"steps","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"[TransactionModelOptions](../../types/workflows.TransactionModelOptions/page.mdx)","description":"Defines the options for a transaction model, which are applicable to the entire workflow.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`object`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"startedAt","type":"`number`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"cancelledAt","type":"`number`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"context","type":"[TransactionContext](../workflows.TransactionContext/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payload","type":"`unknown`","description":"Object containing the initial payload.","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":"compensate","type":"`Record<string, unknown>`","description":"Object containing responses of Compensate handlers on steps flagged with saveResponse.","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"errors","type":"[TransactionStepError](../workflows.TransactionStepError/page.mdx)[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"action","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"handlerType","type":"[TransactionHandlerType](../../enums/workflows.TransactionHandlerType/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"error","type":"`any`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="TransactionCheckpoint"/>
___
<TypeList types={[{"name":"flow","type":"[TransactionFlow](../../types/workflows.TransactionFlow/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"modelId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"definition","type":"[TransactionStepsDefinition](../../types/workflows.TransactionStepsDefinition/page.mdx)","description":"Defines the structure and behavior of a single step within a transaction workflow.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"runId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"hasAsyncSteps","type":"`boolean`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"hasFailedSteps","type":"`boolean`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"hasSkippedOnFailureSteps","type":"`boolean`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"hasWaitingSteps","type":"`boolean`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"hasSkippedSteps","type":"`boolean`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"hasRevertedSteps","type":"`boolean`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"timedOutAt","type":"`number` \\| `null`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"state","type":"[TransactionState](../../enums/workflows.TransactionState/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"steps","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"[TransactionModelOptions](../../types/workflows.TransactionModelOptions/page.mdx)","description":"Defines the options for a transaction model, which are applicable to the entire workflow.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`object`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"startedAt","type":"`number`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"cancelledAt","type":"`number`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"context","type":"[TransactionContext](../workflows.TransactionContext/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payload","type":"`unknown`","description":"Object containing the initial payload.","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":"compensate","type":"`Record<string, unknown>`","description":"Object containing responses of Compensate handlers on steps flagged with saveResponse.","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"errors","type":"[TransactionStepError](../workflows.TransactionStepError/page.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"action","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"handlerType","type":"[TransactionHandlerType](../../enums/workflows.TransactionHandlerType/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"error","type":"`any`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="TransactionCheckpoint"/>
@@ -0,0 +1,13 @@
import { TypeList } from "docs-ui"
# TransactionContext
## constructor
### Parameters
<TypeList types={[{"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":[]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="TransactionContext"/>
___
<TypeList types={[{"name":"payload","type":"`unknown`","description":"Object containing the initial payload.","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":"compensate","type":"`Record<string, unknown>`","description":"Object containing responses of Compensate handlers on steps flagged with saveResponse.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="TransactionContext"/>
@@ -0,0 +1,82 @@
import { TypeList } from "docs-ui"
# TransactionOrchestrator
TransactionOrchestrator is responsible for managing and executing distributed transactions.
It is based on a single transaction definition, which is used to execute all the transaction steps
## Constructors
- [constructor](page.mdx#constructor)
## Methods
- [beginTransaction](../../TransactionOrchestrator/methods/workflows.TransactionOrchestrator.beginTransaction/page.mdx)
- [cancelTransaction](../../TransactionOrchestrator/methods/workflows.TransactionOrchestrator.cancelTransaction/page.mdx)
- [clone](../../TransactionOrchestrator/methods/workflows.TransactionOrchestrator.clone/page.mdx)
- [getKeyName](../../TransactionOrchestrator/methods/workflows.TransactionOrchestrator.getKeyName/page.mdx)
- [getOptions](../../TransactionOrchestrator/methods/workflows.TransactionOrchestrator.getOptions/page.mdx)
- [getWorkflowOptions](../../TransactionOrchestrator/methods/workflows.TransactionOrchestrator.getWorkflowOptions/page.mdx)
- [registerStepFailure](../../TransactionOrchestrator/methods/workflows.TransactionOrchestrator.registerStepFailure/page.mdx)
- [registerStepSuccess](../../TransactionOrchestrator/methods/workflows.TransactionOrchestrator.registerStepSuccess/page.mdx)
- [resume](../../TransactionOrchestrator/methods/workflows.TransactionOrchestrator.resume/page.mdx)
- [retrieveExistingTransaction](../../TransactionOrchestrator/methods/workflows.TransactionOrchestrator.retrieveExistingTransaction/page.mdx)
- [skipStep](../../TransactionOrchestrator/methods/workflows.TransactionOrchestrator.skipStep/page.mdx)
## Properties
- [buildSteps](page.mdx#buildsteps)
- [canContinue](page.mdx#cancontinue)
- [canMoveBackward](page.mdx#canmovebackward)
- [canMoveForward](page.mdx#canmoveforward)
- [checkAllSteps](page.mdx#checkallsteps)
- [checkStepTimeout](page.mdx#checksteptimeout)
- [checkTransactionTimeout](page.mdx#checktransactiontimeout)
- [compensateSteps](page.mdx#compensatesteps)
- [computeCurrentTransactionState](page.mdx#computecurrenttransactionstate)
- [createStepExecutionPromise](page.mdx#createstepexecutionpromise)
- [createStepPayload](page.mdx#createsteppayload)
- [createTransactionFlow](page.mdx#createtransactionflow)
- [DEFAULT\_RETRIES](page.mdx#default_retries)
- [DEFAULT\_TTL](page.mdx#default_ttl)
- [definition](page.mdx#definition)
- [executeAsyncStep](page.mdx#executeasyncstep)
- [executeNext](page.mdx#executenext)
- [executeSyncStep](page.mdx#executesyncstep)
- [finalizeTransaction](page.mdx#finalizetransaction)
- [flagStepsToRevert](page.mdx#flagstepstorevert)
- [getCompensationSteps](page.mdx#getcompensationsteps)
- [getInvokeSteps](page.mdx#getinvokesteps)
- [getPreviousStep](page.mdx#getpreviousstep)
- [getStepByAction](page.mdx#getstepbyaction)
- [getTransactionAndStepFromIdempotencyKey](page.mdx#gettransactionandstepfromidempotencykey)
- [handleStepExpiration](page.mdx#handlestepexpiration)
- [handleStepFailure](page.mdx#handlestepfailure)
- [handleStepSuccess](page.mdx#handlestepsuccess)
- [hasExpired](page.mdx#hasexpired)
- [id](page.mdx#id)
- [invokeSteps](page.mdx#invokesteps)
- [loadTransactionById](page.mdx#loadtransactionbyid)
- [options](page.mdx#options)
- [parseFlowOptions](page.mdx#parseflowoptions)
- [prepareHandlerArgs](page.mdx#preparehandlerargs)
- [prepareStepForExecution](page.mdx#preparestepforexecution)
- [ROOT\_STEP](page.mdx#root_step)
- [SEPARATOR](page.mdx#separator)
- [setStepFailure](page.mdx#setstepfailure)
- [setStepSuccess](page.mdx#setstepsuccess)
- [setStepTimeout](page.mdx#setsteptimeout)
- [skipStep](page.mdx#skipstep)
- [traceStep](page.mdx#tracestep)
- [traceTransaction](page.mdx#tracetransaction)
- [workflowOptions](page.mdx#workflowoptions)
## constructor
### Parameters
<TypeList types={[{"name":"__namedParameters","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"definition","type":"[TransactionStepsDefinition](../../types/workflows.TransactionStepsDefinition/page.mdx)","description":"Defines the structure and behavior of a single step within a transaction workflow.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"[TransactionModelOptions](../../types/workflows.TransactionModelOptions/page.mdx)","description":"Defines the options for a transaction model, which are applicable to the entire workflow.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"isClone","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="TransactionOrchestrator"/>
___
<TypeList types={[{"name":"buildSteps","type":"`any`","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":"checkStepTimeout","type":"`any`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"checkTransactionTimeout","type":"`any`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"compensateSteps","type":"`any`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"computeCurrentTransactionState","type":"`any`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"createStepExecutionPromise","type":"`any`","description":"Create the step execution promise with optional tracing","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"createStepPayload","type":"`any`","description":"Create the payload for a step execution","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"createTransactionFlow","type":"`any`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"DEFAULT_RETRIES","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"DEFAULT_TTL","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"definition","type":"`any`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"executeAsyncStep","type":"`any`","description":"Execute an asynchronous step and handle its result","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"executeNext","type":"`any`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"executeSyncStep","type":"`any`","description":"Execute a synchronous step and handle its result","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"finalizeTransaction","type":"`any`","description":"Finalize the transaction when all steps are complete","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":"getStepByAction","type":"`any`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"getTransactionAndStepFromIdempotencyKey","type":"`any`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"handleStepExpiration","type":"`any`","description":"Check if step or transaction has expired and handle timeouts","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"handleStepFailure","type":"`any`","description":"Handle step failure","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"handleStepSuccess","type":"`any`","description":"Handle successful step completion","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"hasExpired","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":"loadTransactionById","type":"`any`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"parseFlowOptions","type":"`any`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"prepareHandlerArgs","type":"`any`","description":"Prepare handler arguments for step execution","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"prepareStepForExecution","type":"`any`","description":"Prepare a step for execution by setting state and incrementing attempts","optional":false,"defaultValue":"","expandable":false,"children":[]},Line truncated
@@ -0,0 +1,13 @@
import { TypeList } from "docs-ui"
# TransactionPayload
## constructor
### Parameters
<TypeList types={[{"name":"metadata","type":"[TransactionMetadata](../../types/workflows.TransactionMetadata/page.mdx)","description":"The metadata of the transaction.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"model_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotency_key","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"action","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"action_type","type":"[TransactionHandlerType](../../enums/workflows.TransactionHandlerType/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"attempt","type":"`number`","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](../workflows.TransactionContext/page.mdx)","description":"Object gathering responses of all 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":"invoke","type":"`Record<string, unknown>`","description":"Object containing responses of Invoke handlers on 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":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="TransactionPayload"/>
___
<TypeList types={[{"name":"metadata","type":"[TransactionMetadata](../../types/workflows.TransactionMetadata/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"model_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotency_key","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"action","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"action_type","type":"[TransactionHandlerType](../../enums/workflows.TransactionHandlerType/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"attempt","type":"`number`","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":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"[TransactionContext](../workflows.TransactionContext/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payload","type":"`unknown`","description":"Object containing the initial payload.","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":"compensate","type":"`Record<string, unknown>`","description":"Object containing responses of Compensate handlers on steps flagged with saveResponse.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="TransactionPayload"/>
@@ -0,0 +1,57 @@
import { TypeList } from "docs-ui"
# TransactionStep
TransactionStep
## Classdesc
A class representing a single step in a transaction flow
## Constructors
- [constructor](page.mdx#constructor)
## Methods
- [beginCompensation](../../TransactionStep/methods/workflows.TransactionStep.beginCompensation/page.mdx)
- [canCancel](../../TransactionStep/methods/workflows.TransactionStep.canCancel/page.mdx)
- [canCompensate](../../TransactionStep/methods/workflows.TransactionStep.canCompensate/page.mdx)
- [canInvoke](../../TransactionStep/methods/workflows.TransactionStep.canInvoke/page.mdx)
- [canRetry](../../TransactionStep/methods/workflows.TransactionStep.canRetry/page.mdx)
- [canRetryAwaiting](../../TransactionStep/methods/workflows.TransactionStep.canRetryAwaiting/page.mdx)
- [changeState](../../TransactionStep/methods/workflows.TransactionStep.changeState/page.mdx)
- [changeStatus](../../TransactionStep/methods/workflows.TransactionStep.changeStatus/page.mdx)
- [getStates](../../TransactionStep/methods/workflows.TransactionStep.getStates/page.mdx)
- [getTimeout](../../TransactionStep/methods/workflows.TransactionStep.getTimeout/page.mdx)
- [hasAwaitingRetry](../../TransactionStep/methods/workflows.TransactionStep.hasAwaitingRetry/page.mdx)
- [hasRetryInterval](../../TransactionStep/methods/workflows.TransactionStep.hasRetryInterval/page.mdx)
- [hasRetryScheduled](../../TransactionStep/methods/workflows.TransactionStep.hasRetryScheduled/page.mdx)
- [hasTimeout](../../TransactionStep/methods/workflows.TransactionStep.hasTimeout/page.mdx)
- [isCompensating](../../TransactionStep/methods/workflows.TransactionStep.isCompensating/page.mdx)
- [isInvoking](../../TransactionStep/methods/workflows.TransactionStep.isInvoking/page.mdx)
## Properties
- [attempts](page.mdx#attempts)
- [compensate](page.mdx#compensate)
- [definition](page.mdx#definition)
- [depth](page.mdx#depth)
- [failures](page.mdx#failures)
- [hasScheduledRetry](page.mdx#hasscheduledretry)
- [id](page.mdx#id)
- [invoke](page.mdx#invoke)
- [lastAttempt](page.mdx#lastattempt)
- [next](page.mdx#next)
- [retryRescheduledAt](page.mdx#retryrescheduledat)
- [saveResponse](page.mdx#saveresponse)
- [startedAt](page.mdx#startedat)
- [stepFailed](page.mdx#stepfailed)
- [timedOutAt](page.mdx#timedoutat)
- [uuid](page.mdx#uuid)
## constructor
___
<TypeList types={[{"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":"[TransactionStepState](../../enums/workflows.TransactionStepState/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"[TransactionStepStatus](../../enums/workflows.TransactionStepStatus/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"definition","type":"[TransactionStepsDefinition](../../types/workflows.TransactionStepsDefinition/page.mdx)","description":"Defines the structure and behavior of a single step within a transaction workflow.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"uuid","type":"`string`","description":"A unique identifier for the transaction step.\nThis is set automatically when declaring a workflow with \"createWorkflow\"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"action","type":"`string`","description":"Specifies the action to be performed in this step.\n\"name\" is an alias for action when creating a workflow with \"createWorkflow\".","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"continueOnPermanentFailure","type":"`boolean`","description":"Indicates whether the workflow should continue even if there is a permanent failure in this step.\nIn case it is set to true, the the current step will be marked as TransactionStepState.PERMANENT\\_FAILURE and the next steps will be executed.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"skipOnPermanentFailure","type":"`boolean` \\| `string`","description":"Indicates whether the workflow should skip all subsequent steps in case of a permanent failure in this step.\nIn case it is set to true, the next steps of the workflow will not be executed and their status will be marked as TransactionStepState.SKIPPED\\_FAILURE.\nIn case it is a string, the next steps until the step name provided will be skipped and the workflow will be resumed from the step provided.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"noCompensation","type":"`boolean`","description":"If true, no compensation action will be triggered for this step in case of a failure.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"maxRetries","type":"`number`","description":"The maximum number of times this step should be retried in case of temporary failures.\nThe default is 0 (no retries).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"retryInterval","type":"`number`","description":"The interval (in seconds) between retry attempts after a temporary failure.\nThe default is to retry immediately.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"retryIntervalAwaiting","type":"`number`","description":"The interval (in seconds) to retry a step even if its status is \"TransactionStepStatus.WAITING\".","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"timeout","type":"`number`","description":"The maximum amount of time (in seconds) to wait for this step to complete.\nThis is NOT an execution timeout, the step will always be executed and wait for its response.\nIf the response is not received within the timeout set, it will be marked as \"TransactionStepStatus.TIMEOUT\" and the workflow will be reverted as soon as it receives the response.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"async","type":"`boolean`","description":"If true, the step is executed asynchronously. This means that the workflow will not wait for the response of this step.\nAsync steps require to have their responses set using \"setStepSuccess\" or \"setStepFailure\", unless it is combined with \"backgroundExecution: true\".\nIf combined with a timeout, and any response is not set within that interval, the step will be marked as \"TransactionStepStatus.TIMEOUT\" and the workflow will be reverted immediately.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"nested","type":"`boolean`","description":"It flags where the step contains a sub transaction inside itself.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"backgroundExecution","type":"`boolean`","description":"It applies to \"async\" steps only, allowing them to run in the background and automatically complete without external intervention.\nIt is ideal for time-consuming tasks that will be complete after the execution, contrasting with standard \"async\" operations that require a response to be set in a later stage.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"compensateAsync","tLine truncated
@@ -0,0 +1,13 @@
import { TypeList } from "docs-ui"
# TransactionStepError
## constructor
### Parameters
<TypeList types={[{"name":"action","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"handlerType","type":"[TransactionHandlerType](../../enums/workflows.TransactionHandlerType/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"INVOKE","type":"`\"invoke\"`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"COMPENSATE","type":"`\"compensate\"`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"error","type":"`any`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="TransactionStepError"/>
___
<TypeList types={[{"name":"action","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"handlerType","type":"[TransactionHandlerType](../../enums/workflows.TransactionHandlerType/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"INVOKE","type":"`\"invoke\"`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"COMPENSATE","type":"`\"compensate\"`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"error","type":"`any`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="TransactionStepError"/>