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:
Shahed Nasser
2023-11-27 16:49:12 +00:00
committed by GitHub
parent cf0939aab2
commit cdc1da5df7
148 changed files with 14225 additions and 435 deletions

View File

@@ -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": []
}
]} />

View File

@@ -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": []
}
]} />

View File

@@ -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 \\| &#123; forwardArgumentsOnPath: string[] ; path: string &#125;>`",
"description": "alias for deeper nested relationships (e.g. &#123; 'price': 'prices.calculated\\_price\\_set.amount' &#125;)",
"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": []
}
]} />

View File

@@ -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": []
}
]} />

View File

@@ -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": []
}
]
}
]} />

View File

@@ -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&#60;string, &#123; compensate?: [WorkflowStepHandler](../types/WorkflowStepHandler.mdx) ; invoke: [WorkflowStepHandler](../types/WorkflowStepHandler.mdx) &#125;&#62;",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "id",
"type": "`string`",
"description": "",
"optional": false,
"defaultValue": "",
"expandable": false,
"children": []
},
{
"name": "optionalModules",
"type": "Set&#60;string&#62;",
"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&#60;string&#62;",
"description": "",
"optional": true,
"defaultValue": "",
"expandable": false,
"children": []
}
]} />