generate references (#7882)
This commit is contained in:
1 parent
b9036eca1a
commit
dd864da4e0
2424 files changed
+106679
-116201
No files matched your search
+1
-1
@@ -29,7 +29,7 @@ export const createProductStep = createStep(
|
||||
)
|
||||
|
||||
try {
|
||||
const product = await productService.create(input)
|
||||
const product = await productService.createProducts(input)
|
||||
return new StepResponse({
|
||||
product
|
||||
}, {
|
||||
|
||||
@@ -22,4 +22,4 @@ The constructor of the StepResponse
|
||||
|
||||
### Parameters
|
||||
|
||||
<TypeList types={[{"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":[]}]} sectionTitle="new StepResponse"/>
|
||||
<TypeList types={[{"name":"output","type":"TOutput","description":"The output of the step.","optional":true,"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":[]}]} sectionTitle="new StepResponse"/>
|
||||
@@ -34,7 +34,7 @@ export const createProductStep = createStep(
|
||||
const productService = context.container.resolve(
|
||||
"productService"
|
||||
)
|
||||
const product = await productService.create(input)
|
||||
const product = await productService.createProducts(input)
|
||||
return new StepResponse({
|
||||
product
|
||||
}, {
|
||||
@@ -48,7 +48,7 @@ export const createProductStep = createStep(
|
||||
const productService = context.container.resolve(
|
||||
"productService"
|
||||
)
|
||||
await productService.delete(input.product_id)
|
||||
await productService.deleteProducts(input.product_id)
|
||||
}
|
||||
)
|
||||
```
|
||||
|
||||
+1
-1
@@ -4,4 +4,4 @@ import { TypeList } from "docs-ui"
|
||||
|
||||
The step's context.
|
||||
|
||||
<TypeList types={[{"name":"workflowId","type":"`string`","description":"The ID of the workflow.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"attempt","type":"`number`","description":"The attempt number of the step.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"The idempoency key of the step.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"stepName","type":"`string`","description":"The name of the step.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"action","type":"`\"invoke\"` \\| `\"compensate\"`","description":"The action of the step.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"container","type":"[MedusaContainer](../../../medusa/types/medusa.MedusaContainer-2/page.mdx)","description":"The container used to access resources, such as services, in the step.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`TransactionMetadata`","description":"Metadata passed in the input.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"[Context](../../../types/interfaces/types.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":false,"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":"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":"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":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","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":"messageAggregator","type":"[IMessageAggregator](../../../types/interfaces/types.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} sectionTitle="StepExecutionContext"/>
|
||||
<TypeList types={[{"name":"workflowId","type":"`string`","description":"The ID of the workflow.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"attempt","type":"`number`","description":"The attempt number of the step.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"The idempoency key of the step.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"stepName","type":"`string`","description":"The name of the step.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"action","type":"`\"invoke\"` \\| `\"compensate\"`","description":"The action of the step.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"container","type":"[MedusaContainer](../../../medusa/types/medusa.MedusaContainer/page.mdx)","description":"The container used to access resources, such as services, in the step.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`TransactionMetadata`","description":"Metadata passed in the input.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"[Context](../../../types/interfaces/types.Context/page.mdx)","description":"A context used to share resources, such as transaction manager, between the application and the module.","optional":false,"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":"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":"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":"enableNestedTransactions","type":"`boolean`","description":"A boolean value indicating whether nested transactions are enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","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":"messageAggregator","type":"[IMessageAggregator](../../../types/interfaces/types.IMessageAggregator/page.mdx)","description":"An instance of a message aggregator, which is used to aggregate messages to be emitted at a later point.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"requestId","type":"`string`","description":"A string indicating the ID of the current request.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"idempotencyKey","type":"`string`","description":"A string indicating the idempotencyKey of the current workflow execution.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"eventGroupId","type":"`string`","description":"A string indicating the ID of the group to aggregate the events to be emitted at a later point.","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":[]}]} sectionTitle="StepExecutionContext"/>
|
||||
@@ -2,7 +2,7 @@ import { TypeList } from "docs-ui"
|
||||
|
||||
# ReturnWorkflow
|
||||
|
||||
**ReturnWorkflow**: `<TDataOverride, TResultOverride>`(`container?`: [MedusaContainer](../../../medusa/types/medusa.MedusaContainer-2/page.mdx) \| ``{ __joinerConfig: [ModuleJoinerConfig](../../../types/ModulesSdkTypes/types/types.ModulesSdkTypes.ModuleJoinerConfig/page.mdx) ; __definition: [ModuleDefinition](../../../medusa/types/medusa.ModuleDefinition/page.mdx) }``[]) => Omit<LocalWorkflow, "run" \| "registerStepSuccess" \| "registerStepFailure" \| "cancel"> & ExportedWorkflow<TData, TResult, TDataOverride, TResultOverride> & THooks & `object` & `object`
|
||||
**ReturnWorkflow**: `<TDataOverride, TResultOverride>`(`container?`: [MedusaContainer](../../../medusa/types/medusa.MedusaContainer/page.mdx) \| ``{ __joinerConfig: [ModuleJoinerConfig](../../../types/ModulesSdkTypes/types/types.ModulesSdkTypes.ModuleJoinerConfig/page.mdx) ; __definition: [ModuleDefinition](../../../types/ModulesSdkTypes/types/types.ModulesSdkTypes.ModuleDefinition/page.mdx) }``[]) => Omit<LocalWorkflow, "run" \| "registerStepSuccess" \| "registerStepFailure" \| "cancel"> & ExportedWorkflow<TData, TResult, TDataOverride, TResultOverride> & THooks & `object`
|
||||
|
||||
An exported workflow, which is the type of a workflow constructed by the [createWorkflow](../../functions/workflows.createWorkflow/page.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
|
||||
|
||||
@@ -2,7 +2,7 @@ import { TypeList } from "docs-ui"
|
||||
|
||||
# StepFunction
|
||||
|
||||
**StepFunction**: KeysOfUnion<TInput> extends [] ? () => TOutput extends `Item`[] ? (`Item` \| [WorkflowData](../workflows.WorkflowData/page.mdx)<Item>)[] : TOutput extends `object` ? { [Key in string \| number \| symbol]: TOutput[Key] \| WorkflowData<(...)[(...)]> } : TOutput & [WorkflowDataProperties](../workflows.WorkflowDataProperties/page.mdx)<TOutput> & TOutput & [WorkflowDataProperties](../workflows.WorkflowDataProperties/page.mdx)<TOutput> & ``{ config: Method config }`` & StepFunctionReturnConfig<TOutput> : (`input`: TInput \| [WorkflowData](../workflows.WorkflowData/page.mdx)<TInput>) => TOutput extends `Item`[] ? (`Item` \| [WorkflowData](../workflows.WorkflowData/page.mdx)<Item>)[] : TOutput extends `object` ? { [Key in string \| number \| symbol]: TOutput[Key] \| WorkflowData<(...)[(...)]> } : TOutput & [WorkflowDataProperties](../workflows.WorkflowDataProperties/page.mdx)<TOutput> & TOutput & [WorkflowDataProperties](../workflows.WorkflowDataProperties/page.mdx)<TOutput> & ``{ config: Method config }`` & StepFunctionReturnConfig<TOutput> & [WorkflowDataProperties](../workflows.WorkflowDataProperties/page.mdx)<TOutput>
|
||||
**StepFunction**: KeysOfUnion<TInput> extends [] ? () => TOutput extends `Item`[] ? (`Item` \| [WorkflowData](../workflows.WorkflowData/page.mdx)<Item>)[] : TOutput extends `object` ? { [Key in string \| number \| symbol]: TOutput<(...)>[Key] \| WorkflowData<(...)[(...)]> } : TOutput & [WorkflowDataProperties](../workflows.WorkflowDataProperties/page.mdx)<TOutput> & TOutput & [WorkflowDataProperties](../workflows.WorkflowDataProperties/page.mdx)<TOutput> & ``{ config: Method config }`` & StepFunctionReturnConfig<TOutput> : (`input`: TInput \| [WorkflowData](../workflows.WorkflowData/page.mdx)<TInput>) => TOutput extends `Item`[] ? (`Item` \| [WorkflowData](../workflows.WorkflowData/page.mdx)<Item>)[] : TOutput extends `object` ? { [Key in string \| number \| symbol]: TOutput<(...)>[Key] \| WorkflowData<(...)[(...)]> } : TOutput & [WorkflowDataProperties](../workflows.WorkflowDataProperties/page.mdx)<TOutput> & TOutput & [WorkflowDataProperties](../workflows.WorkflowDataProperties/page.mdx)<TOutput> & ``{ config: Method config }`` & StepFunctionReturnConfig<TOutput> & [WorkflowDataProperties](../workflows.WorkflowDataProperties/page.mdx)<TOutput>
|
||||
|
||||
A step function to be used in a workflow.
|
||||
|
||||
|
||||
+1
-1
@@ -14,4 +14,4 @@ type WorkflowInputData = UnwrapWorkflowInputDataType<typeof myWorkflow>
|
||||
|
||||
## Type Parameters
|
||||
|
||||
<TypeList types={[{"name":"T","type":"[ReturnWorkflow](../workflows.ReturnWorkflow/page.mdx)<any, any, any>","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="UnwrapWorkflowInputDataType"/>
|
||||
<TypeList types={[{"name":"T","type":"[ReturnWorkflow](../workflows.ReturnWorkflow/page.mdx)<any, any, any>","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"runAsStep","type":"(`{\n input,\n }`: ``{ input: TData \\| [WorkflowData](../workflows.WorkflowData/page.mdx)<TData> }``) => ReturnType<[StepFunction](../workflows.StepFunction/page.mdx)<TData, TResult>>","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"run","type":"`<TDataOverride, TResultOverride>`(...`args`: Parameters<ExportedWorkflow<TData, TResult, TDataOverride, TResultOverride>[\"run\"]>) => ReturnType<ExportedWorkflow<TData, TResult, TDataOverride, TResultOverride>[\"run\"]>","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"getName","type":"() => `string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"(`config`: `TransactionModelOptions`) => `void`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} sectionTitle="UnwrapWorkflowInputDataType"/>
|
||||
Reference in new issue
Block a user