docs: generate medusa-react reference (#6004)
* add new plugin for better organization * added handling in theme for mutations and query types * added tsdoc to hooks * added tsdocs to utility functions * added tsdoc to providers * generated reference * general fixes for generated reference * generated api reference specs + general fixes * add missing import react * split utilities into different directories * added overview page * added link to customer authentication section * fix lint errors * added changeset * fix readme * fixed build error * added expand fields + other sections to overview * updated what's new section * general refactoring * remove unnecessary query field * fix links * added ignoreApi option
This commit is contained in:
@@ -10,26 +10,7 @@ This class is used to create the response returned by a step. A step return its
|
||||
|
||||
## Type parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "TOutput",
|
||||
"type": "`object`",
|
||||
"description": "The type of the output of the step.",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "TCompensateInput",
|
||||
"type": "`object`",
|
||||
"description": "The type of the compensation input. If the step doesn't specify any compensation input, then the type of `TCompensateInput` is the same\nas that of `TOutput`.",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
<ParameterTypes parameters={[{"name":"TOutput","type":"`object`","description":"The type of the output of the step.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"TCompensateInput","type":"`object`","description":"The type of the compensation input. If the step doesn't specify any compensation input, then the type of `TCompensateInput` is the same\nas that of `TOutput`.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} />
|
||||
|
||||
## constructor
|
||||
|
||||
@@ -37,46 +18,8 @@ The constructor of the StepResponse
|
||||
|
||||
### Type Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "TOutput",
|
||||
"type": "`object`",
|
||||
"description": "The type of the output of the step.",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "TCompensateInput",
|
||||
"type": "`object`",
|
||||
"description": "The type of the compensation input. If the step doesn't specify any compensation input, then the type of `TCompensateInput` is the same\nas that of `TOutput`.",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
<ParameterTypes parameters={[{"name":"TOutput","type":"`object`","description":"The type of the output of the step.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"TCompensateInput","type":"`object`","description":"The type of the compensation input. If the step doesn't specify any compensation input, then the type of `TCompensateInput` is the same\nas that of `TOutput`.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} />
|
||||
|
||||
### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "output",
|
||||
"type": "`TOutput`",
|
||||
"description": "The output of the step.",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "compensateInput",
|
||||
"type": "`TCompensateInput`",
|
||||
"description": "The input to be passed as a parameter to the step's compensation function. If not provided, the `output` will be provided instead.",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
<ParameterTypes parameters={[{"name":"output","type":"`TOutput`","description":"The output of the step.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"compensateInput","type":"`TCompensateInput`","description":"The input to be passed as a parameter to the step's compensation function. If not provided, the `output` will be provided instead.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} />
|
||||
|
||||
@@ -56,78 +56,12 @@ export const createProductStep = createStep(
|
||||
|
||||
## Type Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "TInvokeInput",
|
||||
"type": "`object`",
|
||||
"description": "The type of the expected input parameter to the invocation function.",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "TInvokeResultOutput",
|
||||
"type": "`object`",
|
||||
"description": "The type of the expected output parameter of the invocation function.",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "TInvokeResultCompensateInput",
|
||||
"type": "`object`",
|
||||
"description": "The type of the expected input parameter to the compensation function.",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
<ParameterTypes parameters={[{"name":"TInvokeInput","type":"`object`","description":"The type of the expected input parameter to the invocation function.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"TInvokeResultOutput","type":"`object`","description":"The type of the expected output parameter of the invocation function.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"TInvokeResultCompensateInput","type":"`object`","description":"The type of the expected input parameter to the compensation function.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} />
|
||||
|
||||
## Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "name",
|
||||
"type": "`string`",
|
||||
"description": "The name of the step.",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "invokeFn",
|
||||
"type": "InvokeFn<TInvokeInput, TInvokeResultOutput, TInvokeResultCompensateInput>",
|
||||
"description": "An invocation function that will be executed when the workflow is executed. The function must return an instance of [StepResponse](../classes/workflows.StepResponse.mdx). The constructor of [StepResponse](../classes/workflows.StepResponse.mdx)\naccepts the output of the step as a first argument, and optionally as a second argument the data to be passed to the compensation function as a parameter.",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "compensateFn",
|
||||
"type": "CompensateFn<TInvokeResultCompensateInput>",
|
||||
"description": "A compensation function that's executed if an error occurs in the workflow. It's used to roll-back actions when errors occur.\nIt accepts as a parameter the second argument passed to the constructor of the [StepResponse](../classes/workflows.StepResponse.mdx) instance returned by the invocation function. If the\ninvocation function doesn't pass the second argument to `StepResponse` constructor, the compensation function receives the first argument\npassed to the `StepResponse` constructor instead.",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
<ParameterTypes parameters={[{"name":"name","type":"`string`","description":"The name of the step.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"invokeFn","type":"InvokeFn<TInvokeInput, TInvokeResultOutput, TInvokeResultCompensateInput>","description":"An invocation function that will be executed when the workflow is executed. The function must return an instance of [StepResponse](../classes/workflows.StepResponse.mdx). The constructor of [StepResponse](../classes/workflows.StepResponse.mdx)\naccepts the output of the step as a first argument, and optionally as a second argument the data to be passed to the compensation function as a parameter.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"compensateFn","type":"CompensateFn<TInvokeResultCompensateInput>","description":"A compensation function that's executed if an error occurs in the workflow. It's used to roll-back actions when errors occur.\nIt accepts as a parameter the second argument passed to the constructor of the [StepResponse](../classes/workflows.StepResponse.mdx) instance returned by the invocation function. If the\ninvocation function doesn't pass the second argument to `StepResponse` constructor, the compensation function receives the first argument\npassed to the `StepResponse` constructor instead.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} />
|
||||
|
||||
## Returns
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "StepFunction",
|
||||
"type": "[StepFunction](../types/workflows.StepFunction.mdx)<TInvokeInput, TInvokeResultOutput>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "A step function to be used in a workflow.",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
<ParameterTypes parameters={[{"name":"StepFunction","type":"[StepFunction](../types/workflows.StepFunction.mdx)<TInvokeInput, TInvokeResultOutput>","optional":false,"defaultValue":"","description":"A step function to be used in a workflow.","expandable":false,"children":[]}]} />
|
||||
|
||||
@@ -62,69 +62,12 @@ export async function GET(
|
||||
|
||||
## Type Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "TData",
|
||||
"type": "`object`",
|
||||
"description": "The type of the input passed to the composer function.",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "TResult",
|
||||
"type": "`object`",
|
||||
"description": "The type of the output returned by the composer function.",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "THooks",
|
||||
"type": "`Record<string, Function>`",
|
||||
"description": "The type of hooks defined in the workflow.",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
<ParameterTypes parameters={[{"name":"TData","type":"`object`","description":"The type of the input passed to the composer function.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"TResult","type":"`object`","description":"The type of the output returned by the composer function.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"THooks","type":"`Record<string, Function>`","description":"The type of hooks defined in the workflow.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} />
|
||||
|
||||
## Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "name",
|
||||
"type": "`string`",
|
||||
"description": "The name of the workflow.",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "composer",
|
||||
"type": "(`input`: [WorkflowData](../types/workflows.WorkflowData.mdx)<TData>) => `void` \\| [WorkflowData](../types/workflows.WorkflowData.mdx)<TResult> \\| { [K in string \\| number \\| symbol]: WorkflowDataProperties<TResult[K]> \\| WorkflowData<TResult[K]> }",
|
||||
"description": "The constructor function that is executed when the `run` method in ReturnWorkflow is used.\nThe function can't be an arrow function or an asynchronus function. It also can't directly manipulate data.\nYou'll have to use the [transform](workflows.transform.mdx) function if you need to directly manipulate data.",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
<ParameterTypes parameters={[{"name":"name","type":"`string`","description":"The name of the workflow.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"composer","type":"(`input`: [WorkflowData](../types/workflows.WorkflowData.mdx)<TData>) => `void` \\| [WorkflowData](../types/workflows.WorkflowData.mdx)<TResult> \\| { [K in string \\| number \\| symbol]: WorkflowDataProperties<TResult[K]> \\| WorkflowData<TResult[K]> }","description":"The constructor function that is executed when the `run` method in ReturnWorkflow is used.\nThe function can't be an arrow function or an asynchronus function. It also can't directly manipulate data.\nYou'll have to use the [transform](workflows.transform.mdx) function if you need to directly manipulate data.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} />
|
||||
|
||||
## Returns
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "ReturnWorkflow",
|
||||
"type": "ReturnWorkflow<TData, TResult, THooks>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "The created workflow. You can later execute the workflow by invoking it, then using its `run` method.",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
<ParameterTypes parameters={[{"name":"ReturnWorkflow","type":"ReturnWorkflow<TData, TResult, THooks>","optional":false,"defaultValue":"","description":"The created workflow. You can later execute the workflow by invoking it, then using its `run` method.","expandable":false,"children":[]}]} />
|
||||
|
||||
@@ -49,42 +49,12 @@ const myWorkflow = createWorkflow<
|
||||
|
||||
## Type Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "TResult",
|
||||
"type": "[WorkflowDataProperties](../types/workflows.WorkflowDataProperties.mdx)<unknown>[]",
|
||||
"description": "The type of the expected result.",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
<ParameterTypes parameters={[{"name":"TResult","type":"[WorkflowDataProperties](../types/workflows.WorkflowDataProperties.mdx)<unknown>[]","description":"The type of the expected result.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} />
|
||||
|
||||
## Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "steps",
|
||||
"type": "`TResult`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
<ParameterTypes parameters={[{"name":"steps","type":"`TResult`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} />
|
||||
|
||||
## Returns
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "TResult",
|
||||
"type": "`TResult`",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "The step results. The results are ordered in the array by the order they're passed in the function's parameter.",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
<ParameterTypes parameters={[{"name":"TResult","type":"`TResult`","optional":false,"defaultValue":"","description":"The step results. The results are ordered in the array by the order they're passed in the function's parameter.","expandable":false,"children":[]}]} />
|
||||
|
||||
@@ -55,60 +55,12 @@ const myWorkflow = createWorkflow<
|
||||
|
||||
## Type Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "T",
|
||||
"type": "`object` \\| [WorkflowDataProperties](../types/workflows.WorkflowDataProperties.mdx)<unknown>",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "RFinal",
|
||||
"type": "`object`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
<ParameterTypes parameters={[{"name":"T","type":"`object` \\| [WorkflowDataProperties](../types/workflows.WorkflowDataProperties.mdx)<unknown>","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"RFinal","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} />
|
||||
|
||||
## Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "values",
|
||||
"type": "`T`",
|
||||
"description": "The output(s) of other step functions.",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "func",
|
||||
"type": "[Func1<T, RFinal>]",
|
||||
"description": "The transform function used to perform action on the runtime values of the provided `values`.",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
<ParameterTypes parameters={[{"name":"values","type":"`T`","description":"The output(s) of other step functions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"func","type":"[Func1<T, RFinal>]","description":"The transform function used to perform action on the runtime values of the provided `values`.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} />
|
||||
|
||||
## Returns
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "WorkflowData",
|
||||
"type": "[WorkflowData](../types/workflows.WorkflowData.mdx)<RFinal>",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"description": "There's no expected value to be returned by the `transform` function.",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
<ParameterTypes parameters={[{"name":"WorkflowData","type":"[WorkflowData](../types/workflows.WorkflowData.mdx)<RFinal>","optional":false,"defaultValue":"","description":"There's no expected value to be returned by the `transform` function.","expandable":false,"children":[]}]} />
|
||||
|
||||
+1
-94
@@ -8,97 +8,4 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
The step's context.
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "container",
|
||||
"type": "[MedusaContainer](../../medusa/types/medusa.MedusaContainer-1.mdx)",
|
||||
"description": "The container used to access resources, such as services, in the step.",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": [
|
||||
{
|
||||
"name": "createScope",
|
||||
"type": "() => [MedusaContainer](../../medusa/types/medusa.MedusaContainer-1.mdx)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "registerAdd",
|
||||
"type": "`<T>`(`name`: `string`, `registration`: `T`) => [MedusaContainer](../../medusa/types/medusa.MedusaContainer-1.mdx)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "context",
|
||||
"type": "[Context](../../types/interfaces/types.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`",
|
||||
"description": "Metadata passed in the input.",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
<ParameterTypes parameters={[{"name":"container","type":"[MedusaContainer](../../medusa/types/medusa.MedusaContainer-1.mdx)","description":"The container used to access resources, such as services, in the step.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"[Context](../../types/interfaces/types.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`","description":"Metadata passed in the input.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} />
|
||||
|
||||
+1
-74
@@ -10,77 +10,4 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
## Type declaration
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "flow",
|
||||
"type": "`OrchestratorBuilder`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "handlers",
|
||||
"type": "`WorkflowHandler`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "hookBinder",
|
||||
"type": "`<TOutput>`(`name`: `string`, `fn`: `Function`) => [WorkflowData](workflows.WorkflowData.mdx)<TOutput>",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "hooksCallback_",
|
||||
"type": "`Record<string, Function[]>`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "hooks_",
|
||||
"type": "`string`[]",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "parallelizeBinder",
|
||||
"type": "`<TOutput>`(`fn`: (`this`: [CreateWorkflowComposerContext](workflows.CreateWorkflowComposerContext.mdx)) => `TOutput`) => `TOutput`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "stepBinder",
|
||||
"type": "`<TOutput>`(`fn`: [StepFunctionResult](workflows.StepFunctionResult.mdx)) => [WorkflowData](workflows.WorkflowData.mdx)<TOutput>",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "workflowId",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
<ParameterTypes parameters={[{"name":"flow","type":"`OrchestratorBuilder`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"handlers","type":"`WorkflowHandler`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"hookBinder","type":"`<TOutput>`(`name`: `string`, `fn`: `Function`) => [WorkflowData](workflows.WorkflowData.mdx)<TOutput>","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"hooksCallback_","type":"`Record<string, Function[]>`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"hooks_","type":"`string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"parallelizeBinder","type":"`<TOutput>`(`fn`: (`this`: [CreateWorkflowComposerContext](workflows.CreateWorkflowComposerContext.mdx)) => `TOutput`) => `TOutput`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"stepBinder","type":"`<TOutput>`(`fn`: [StepFunctionResult](workflows.StepFunctionResult.mdx)) => [WorkflowData](workflows.WorkflowData.mdx)<TOutput>","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"workflowId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} />
|
||||
|
||||
@@ -12,23 +12,4 @@ A step function to be used in a workflow.
|
||||
|
||||
## Type Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "TInput",
|
||||
"type": "`object`",
|
||||
"description": "The type of the input of the step.",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "TOutput",
|
||||
"type": "`object`",
|
||||
"description": "The type of the output of the step.",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
<ParameterTypes parameters={[{"name":"TInput","type":"`object`","description":"The type of the input of the step.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"TOutput","type":"`object`","description":"The type of the output of the step.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} />
|
||||
|
||||
@@ -10,117 +10,14 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
## Type Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "TOutput",
|
||||
"type": "`unknown` \\| `unknown`[]",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
<ParameterTypes parameters={[{"name":"TOutput","type":"`unknown` \\| `unknown`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} />
|
||||
|
||||
## Type declaration
|
||||
|
||||
### Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "this",
|
||||
"type": "[CreateWorkflowComposerContext](workflows.CreateWorkflowComposerContext.mdx)",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": [
|
||||
{
|
||||
"name": "flow",
|
||||
"type": "`OrchestratorBuilder`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "handlers",
|
||||
"type": "`WorkflowHandler`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "hookBinder",
|
||||
"type": "`<TOutput>`(`name`: `string`, `fn`: `Function`) => [WorkflowData](workflows.WorkflowData.mdx)<TOutput>",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "hooksCallback_",
|
||||
"type": "`Record<string, Function[]>`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "hooks_",
|
||||
"type": "`string`[]",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "parallelizeBinder",
|
||||
"type": "`<TOutput>`(`fn`: (`this`: [CreateWorkflowComposerContext](workflows.CreateWorkflowComposerContext.mdx)) => `TOutput`) => `TOutput`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "stepBinder",
|
||||
"type": "`<TOutput>`(`fn`: [StepFunctionResult](workflows.StepFunctionResult.mdx)) => [WorkflowData](workflows.WorkflowData.mdx)<TOutput>",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "workflowId",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]
|
||||
}
|
||||
]} />
|
||||
<ParameterTypes parameters={[{"name":"this","type":"[CreateWorkflowComposerContext](workflows.CreateWorkflowComposerContext.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"flow","type":"`OrchestratorBuilder`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"handlers","type":"`WorkflowHandler`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"hookBinder","type":"`<TOutput>`(`name`: `string`, `fn`: `Function`) => [WorkflowData](workflows.WorkflowData.mdx)<TOutput>","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"hooksCallback_","type":"`Record<string, Function[]>`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"hooks_","type":"`string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"parallelizeBinder","type":"`<TOutput>`(`fn`: (`this`: [CreateWorkflowComposerContext](workflows.CreateWorkflowComposerContext.mdx)) => `TOutput`) => `TOutput`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"stepBinder","type":"`<TOutput>`(`fn`: [StepFunctionResult](workflows.StepFunctionResult.mdx)) => [WorkflowData](workflows.WorkflowData.mdx)<TOutput>","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"workflowId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} />
|
||||
|
||||
### Returns
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "TOutput extends [] ? [...WorkflowData<{ [K in keyof TOutput]: TOutput[number][K] }>[]] : WorkflowData<{ [K in keyof TOutput]: TOutput[K] }>",
|
||||
"type": "`TOutput` extends [] ? [...WorkflowData<{ [K in keyof TOutput]: TOutput[number][K] }>[]] : [WorkflowData](workflows.WorkflowData.mdx)<{ [K in keyof TOutput]: TOutput[K] }>",
|
||||
"optional": true,
|
||||
"defaultValue": "",
|
||||
"description": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
<ParameterTypes parameters={[{"name":"TOutput extends [] ? [...WorkflowData<{ [K in keyof TOutput]: TOutput[number][K] }>[]] : WorkflowData<{ [K in keyof TOutput]: TOutput[K] }>","type":"`TOutput` extends [] ? [...WorkflowData<{ [K in keyof TOutput]: TOutput[number][K] }>[]] : [WorkflowData](workflows.WorkflowData.mdx)<{ [K in keyof TOutput]: TOutput[K] }>","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} />
|
||||
|
||||
@@ -12,14 +12,4 @@ This type is used to encapsulate the input or output type of all utils.
|
||||
|
||||
## Type Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "T",
|
||||
"type": "`object`",
|
||||
"description": "The type of a step's input or result.",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
<ParameterTypes parameters={[{"name":"T","type":"`object`","description":"The type of a step's input or result.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} />
|
||||
|
||||
+2
-31
@@ -10,37 +10,8 @@ import ParameterTypes from "@site/src/components/ParameterTypes"
|
||||
|
||||
## Type Parameters
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "T",
|
||||
"type": "`object`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
<ParameterTypes parameters={[{"name":"T","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} />
|
||||
|
||||
## Type declaration
|
||||
|
||||
<ParameterTypes parameters={[
|
||||
{
|
||||
"name": "__step__",
|
||||
"type": "`string`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
},
|
||||
{
|
||||
"name": "__type",
|
||||
"type": "`Symbol`",
|
||||
"description": "",
|
||||
"optional": false,
|
||||
"defaultValue": "",
|
||||
"expandable": false,
|
||||
"children": []
|
||||
}
|
||||
]} />
|
||||
<ParameterTypes parameters={[{"name":"__step__","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"__type","type":"`Symbol`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} />
|
||||
|
||||
Reference in New Issue
Block a user