chore(docs): Generated References (#8383)
Generated the following references: - `helper_steps` - `modules` - `types` - `workflows`
This commit is contained in:
+21
@@ -9,6 +9,27 @@ import { TypeList } from "docs-ui"
|
||||
|
||||
This documentation provides a reference to the `createRemoteLinkStep` step. It belongs to the `@medusajs/core-flows` package.
|
||||
|
||||
## Example
|
||||
|
||||
```ts
|
||||
import { createWorkflow } from "@medusajs/workflows-sdk"
|
||||
import { createRemoteLinkStep } from "@medusajs/core-flows"
|
||||
import { Modules } from "@medusajs/utils"
|
||||
|
||||
const helloWorldWorkflow = createWorkflow("hello-world", () => {
|
||||
createRemoteLinkStep([
|
||||
{
|
||||
[Modules.PRODUCT]: {
|
||||
product_id: "prod_123",
|
||||
},
|
||||
helloModuleService: {
|
||||
my_custom_id: "mc_123",
|
||||
},
|
||||
},
|
||||
])
|
||||
})
|
||||
```
|
||||
|
||||
## Input
|
||||
|
||||
<TypeList types={[{"name":"LinkDefinition[]","type":"[LinkDefinition](../../../modules_sdk/types/modules_sdk.LinkDefinition/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"LinkDefinition","type":"`object` & `object`","description":"A link for two records of linked data models.\n\nThe keys are the names of each module, and their value is an object that holds the ID of the linked data model's record.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} sectionTitle="createRemoteLinkStep"/>
|
||||
|
||||
+28
@@ -9,6 +9,34 @@ import { TypeList } from "docs-ui"
|
||||
|
||||
This documentation provides a reference to the `dismissRemoteLinkStep` step. It belongs to the `@medusajs/core-flows` package.
|
||||
|
||||
## Example
|
||||
|
||||
```ts
|
||||
import {
|
||||
createWorkflow
|
||||
} from "@medusajs/workflows-sdk"
|
||||
import {
|
||||
dismissRemoteLinkStep
|
||||
} from "@medusajs/core-flows"
|
||||
import {
|
||||
Modules
|
||||
} from "@medusajs/utils"
|
||||
|
||||
const helloWorldWorkflow = createWorkflow(
|
||||
"hello-world",
|
||||
() => {
|
||||
dismissRemoteLinkStep([{
|
||||
[Modules.PRODUCT]: {
|
||||
product_id: "prod_123",
|
||||
},
|
||||
"helloModuleService": {
|
||||
my_custom_id: "mc_123",
|
||||
},
|
||||
}])
|
||||
}
|
||||
)
|
||||
```
|
||||
|
||||
## Input
|
||||
|
||||
<TypeList types={[{"name":"DismissRemoteLinksStepInput","type":"[LinkDefinition](../../../modules_sdk/types/modules_sdk.LinkDefinition/page.mdx) \\| [LinkDefinition](../../../modules_sdk/types/modules_sdk.LinkDefinition/page.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="dismissRemoteLinkStep"/>
|
||||
|
||||
+25
@@ -9,6 +9,31 @@ import { TypeList } from "docs-ui"
|
||||
|
||||
This documentation provides a reference to the `removeRemoteLinkStep` step. It belongs to the `@medusajs/core-flows` package.
|
||||
|
||||
## Example
|
||||
|
||||
```ts
|
||||
import {
|
||||
createWorkflow
|
||||
} from "@medusajs/workflows-sdk"
|
||||
import {
|
||||
removeRemoteLinkStep
|
||||
} from "@medusajs/core-flows"
|
||||
import {
|
||||
Modules
|
||||
} from "@medusajs/utils"
|
||||
|
||||
const helloWorldWorkflow = createWorkflow(
|
||||
"hello-world",
|
||||
() => {
|
||||
removeRemoteLinkStep([{
|
||||
[Modules.PRODUCT]: {
|
||||
product_id: "prod_123",
|
||||
},
|
||||
}])
|
||||
}
|
||||
)
|
||||
```
|
||||
|
||||
## Input
|
||||
|
||||
<TypeList types={[{"name":"RemoveRemoteLinksStepInput","type":"`RemoveRemoteLinksStepInput`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="removeRemoteLinkStep"/>
|
||||
|
||||
+87
@@ -9,6 +9,93 @@ import { TypeList } from "docs-ui"
|
||||
|
||||
This documentation provides a reference to the `useRemoteQueryStep` step. It belongs to the `@medusajs/core-flows` package.
|
||||
|
||||
## Example
|
||||
|
||||
To retrieve a list of records of a data model:
|
||||
|
||||
```ts
|
||||
import {
|
||||
createWorkflow
|
||||
} from "@medusajs/workflows-sdk"
|
||||
import {
|
||||
useRemoteQueryStep
|
||||
} from "@medusajs/core-flows"
|
||||
|
||||
const helloWorldWorkflow = createWorkflow(
|
||||
"hello-world",
|
||||
() => {
|
||||
const products = useRemoteQueryStep({
|
||||
entry_point: "product",
|
||||
fields: [
|
||||
"*",
|
||||
"variants.*"
|
||||
]
|
||||
})
|
||||
}
|
||||
)
|
||||
```
|
||||
|
||||
To retrieve a single item instead of a an array:
|
||||
|
||||
```ts
|
||||
import {
|
||||
createWorkflow
|
||||
} from "@medusajs/workflows-sdk"
|
||||
import {
|
||||
useRemoteQueryStep
|
||||
} from "@medusajs/core-flows"
|
||||
|
||||
const helloWorldWorkflow = createWorkflow(
|
||||
"hello-world",
|
||||
() => {
|
||||
const product = useRemoteQueryStep({
|
||||
entry_point: "product",
|
||||
fields: [
|
||||
"*",
|
||||
"variants.*"
|
||||
],
|
||||
variables: {
|
||||
filters: {
|
||||
id: "123"
|
||||
}
|
||||
},
|
||||
list: false
|
||||
})
|
||||
}
|
||||
)
|
||||
```
|
||||
|
||||
To throw an error if a record isn't found matching the specified ID:
|
||||
|
||||
```ts
|
||||
import {
|
||||
createWorkflow
|
||||
} from "@medusajs/workflows-sdk"
|
||||
import {
|
||||
useRemoteQueryStep
|
||||
} from "@medusajs/core-flows"
|
||||
|
||||
const helloWorldWorkflow = createWorkflow(
|
||||
"hello-world",
|
||||
() => {
|
||||
const product = useRemoteQueryStep({
|
||||
entry_point: "product",
|
||||
fields: [
|
||||
"*",
|
||||
"variants.*"
|
||||
],
|
||||
variables: {
|
||||
filters: {
|
||||
id: "123"
|
||||
}
|
||||
},
|
||||
list: false,
|
||||
throw_if_key_not_found: true
|
||||
})
|
||||
}
|
||||
)
|
||||
```
|
||||
|
||||
## Input
|
||||
|
||||
<TypeList types={[{"name":"EntryStepInput \\| ServiceStepInput","type":"[EntryStepInput](../../interfaces/helper_steps.EntryStepInput/page.mdx) \\| [ServiceStepInput](../../interfaces/helper_steps.ServiceStepInput/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="useRemoteQueryStep"/>
|
||||
|
||||
Reference in New Issue
Block a user