docs: [2/n] generate core-flows reference (#8782)
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
---
|
||||
slug: /references/medusa-workflows/steps/createRemoteLinkStep
|
||||
sidebar_label: createRemoteLinkStep
|
||||
---
|
||||
|
||||
import { TypeList, WorkflowDiagram } from "docs-ui"
|
||||
|
||||
# createRemoteLinkStep - Medusa Workflows API Reference
|
||||
|
||||
This documentation provides a reference to the `createRemoteLinkStep`. It belongs to the `@medusajs/core-flows` package.
|
||||
|
||||
This step creates remote links between two records of linked data models.
|
||||
|
||||
Learn more in the [Remote Link documentation.](https://docs.medusajs.com/v2/advanced-development/modules/remote-link#create-link).
|
||||
|
||||
## 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":"[LinkDefinition](../../../../../modules_sdk/types/modules_sdk.LinkDefinition/page.mdx)","optional":false,"defaultValue":"","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.","expandable":false,"children":[{"name":"data","type":"`Record<string, unknown>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createRemoteLinkStep"/>
|
||||
|
||||
## Output
|
||||
|
||||
<TypeList types={[{"name":"LinkDefinition[]","type":"[LinkDefinition](../../../../../modules_sdk/types/modules_sdk.LinkDefinition/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"LinkDefinition","type":"[LinkDefinition](../../../../../modules_sdk/types/modules_sdk.LinkDefinition/page.mdx)","optional":false,"defaultValue":"","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.","expandable":false,"children":[{"name":"data","type":"`Record<string, unknown>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createRemoteLinkStep"/>
|
||||
@@ -0,0 +1,50 @@
|
||||
---
|
||||
slug: /references/medusa-workflows/steps/dismissRemoteLinkStep
|
||||
sidebar_label: dismissRemoteLinkStep
|
||||
---
|
||||
|
||||
import { TypeList, WorkflowDiagram } from "docs-ui"
|
||||
|
||||
# dismissRemoteLinkStep - Medusa Workflows API Reference
|
||||
|
||||
This documentation provides a reference to the `dismissRemoteLinkStep`. It belongs to the `@medusajs/core-flows` package.
|
||||
|
||||
This step removes remote links between two records of linked data models.
|
||||
|
||||
Learn more in the [Remote Link documentation.](https://docs.medusajs.com/v2/advanced-development/modules/remote-link#dismiss-link).
|
||||
|
||||
## 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":"[DismissRemoteLinksStepInput](../../../../types/core_flows.DismissRemoteLinksStepInput/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"data","type":"`Record<string, unknown>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="dismissRemoteLinkStep"/>
|
||||
|
||||
## Output
|
||||
|
||||
<TypeList types={[{"name":"LinkDefinition[]","type":"[LinkDefinition](../../../../../modules_sdk/types/modules_sdk.LinkDefinition/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"LinkDefinition","type":"[LinkDefinition](../../../../../modules_sdk/types/modules_sdk.LinkDefinition/page.mdx)","optional":false,"defaultValue":"","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.","expandable":false,"children":[{"name":"data","type":"`Record<string, unknown>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="dismissRemoteLinkStep"/>
|
||||
@@ -0,0 +1,39 @@
|
||||
---
|
||||
slug: /references/medusa-workflows/steps/emitEventStep
|
||||
sidebar_label: emitEventStep
|
||||
---
|
||||
|
||||
import { TypeList, WorkflowDiagram } from "docs-ui"
|
||||
|
||||
# emitEventStep - Medusa Workflows API Reference
|
||||
|
||||
This documentation provides a reference to the `emitEventStep`. It belongs to the `@medusajs/core-flows` package.
|
||||
|
||||
Emit an event.
|
||||
|
||||
## Example
|
||||
|
||||
```ts
|
||||
import {
|
||||
createWorkflow
|
||||
} from "@medusajs/workflows-sdk"
|
||||
import {
|
||||
emitEventStep
|
||||
} from "@medusajs/core-flows"
|
||||
|
||||
const helloWorldWorkflow = createWorkflow(
|
||||
"hello-world",
|
||||
() => {
|
||||
emitEventStep({
|
||||
eventName: "custom.created",
|
||||
data: {
|
||||
id: "123"
|
||||
}
|
||||
})
|
||||
}
|
||||
)
|
||||
```
|
||||
|
||||
## Input
|
||||
|
||||
<TypeList types={[{"name":"Input","type":"`Input`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="emitEventStep"/>
|
||||
@@ -0,0 +1,47 @@
|
||||
---
|
||||
slug: /references/medusa-workflows/steps/removeRemoteLinkStep
|
||||
sidebar_label: removeRemoteLinkStep
|
||||
---
|
||||
|
||||
import { TypeList, WorkflowDiagram } from "docs-ui"
|
||||
|
||||
# removeRemoteLinkStep - Medusa Workflows API Reference
|
||||
|
||||
This documentation provides a reference to the `removeRemoteLinkStep`. It belongs to the `@medusajs/core-flows` package.
|
||||
|
||||
This step deletes linked records of a record.
|
||||
|
||||
Learn more in the [Remote Link documentation](https://docs.medusajs.com/v2/advanced-development/modules/remote-link#cascade-delete-linked-records)
|
||||
|
||||
## 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":[]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="removeRemoteLinkStep"/>
|
||||
|
||||
## Output
|
||||
|
||||
<TypeList types={[{"name":"DeleteEntityInput","type":"[DeleteEntityInput](../../../../../modules_sdk/types/modules_sdk.DeleteEntityInput/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"DeleteEntityInput","type":"`object`","description":"The details of a data model's record whose linked records should be deleted. Usually used after the\ndata model's record is deleted.\n\nThe key is the data model's name. Its value is an object that has the ID of the data model's record.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="removeRemoteLinkStep"/>
|
||||
@@ -0,0 +1,18 @@
|
||||
---
|
||||
slug: /references/medusa-workflows/steps/updateRemoteLinksStep
|
||||
sidebar_label: updateRemoteLinksStep
|
||||
---
|
||||
|
||||
import { TypeList, WorkflowDiagram } from "docs-ui"
|
||||
|
||||
# updateRemoteLinksStep - Medusa Workflows API Reference
|
||||
|
||||
This documentation provides a reference to the `updateRemoteLinksStep`. It belongs to the `@medusajs/core-flows` package.
|
||||
|
||||
## 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":"[LinkDefinition](../../../../../modules_sdk/types/modules_sdk.LinkDefinition/page.mdx)","optional":false,"defaultValue":"","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.","expandable":false,"children":[{"name":"data","type":"`Record<string, unknown>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateRemoteLinksStep"/>
|
||||
|
||||
## Output
|
||||
|
||||
<TypeList types={[{"name":"LinkDefinition[]","type":"[LinkDefinition](../../../../../modules_sdk/types/modules_sdk.LinkDefinition/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"LinkDefinition","type":"[LinkDefinition](../../../../../modules_sdk/types/modules_sdk.LinkDefinition/page.mdx)","optional":false,"defaultValue":"","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.","expandable":false,"children":[{"name":"data","type":"`Record<string, unknown>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateRemoteLinksStep"/>
|
||||
@@ -0,0 +1,105 @@
|
||||
---
|
||||
slug: /references/medusa-workflows/steps/useRemoteQueryStep
|
||||
sidebar_label: useRemoteQueryStep
|
||||
---
|
||||
|
||||
import { TypeList, WorkflowDiagram } from "docs-ui"
|
||||
|
||||
# useRemoteQueryStep - Medusa Workflows API Reference
|
||||
|
||||
This documentation provides a reference to the `useRemoteQueryStep`. It belongs to the `@medusajs/core-flows` package.
|
||||
|
||||
This step fetches data across modules using the remote query.
|
||||
|
||||
Learn more in the [Remote Query documentation](https://docs.medusajs.com/v2/advanced-development/modules/remote-query).
|
||||
|
||||
## 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/core_flows.EntryStepInput/page.mdx) \\| [ServiceStepInput](../../../../interfaces/core_flows.ServiceStepInput/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"EntryStepInput \\| ServiceStepInput","type":"[EntryStepInput](../../../../interfaces/core_flows.EntryStepInput/page.mdx) \\| [ServiceStepInput](../../../../interfaces/core_flows.ServiceStepInput/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="useRemoteQueryStep"/>
|
||||
@@ -0,0 +1,5 @@
|
||||
import { TypeList, WorkflowDiagram } from "docs-ui"
|
||||
|
||||
# createLinksStepId
|
||||
|
||||
`Const` **createLinksStepId**: `"create-remote-links"`
|
||||
@@ -0,0 +1,5 @@
|
||||
import { TypeList, WorkflowDiagram } from "docs-ui"
|
||||
|
||||
# dismissRemoteLinkStepId
|
||||
|
||||
`Const` **dismissRemoteLinkStepId**: `"dismiss-remote-links"`
|
||||
@@ -0,0 +1,5 @@
|
||||
import { TypeList, WorkflowDiagram } from "docs-ui"
|
||||
|
||||
# emitEventStepId
|
||||
|
||||
`Const` **emitEventStepId**: `"emit-event-step"`
|
||||
@@ -0,0 +1,5 @@
|
||||
import { TypeList, WorkflowDiagram } from "docs-ui"
|
||||
|
||||
# removeRemoteLinkStepId
|
||||
|
||||
`Const` **removeRemoteLinkStepId**: `"remove-remote-links"`
|
||||
@@ -0,0 +1,5 @@
|
||||
import { TypeList, WorkflowDiagram } from "docs-ui"
|
||||
|
||||
# updateRemoteLinksStepId
|
||||
|
||||
`Const` **updateRemoteLinksStepId**: `"update-remote-links-step"`
|
||||
@@ -0,0 +1,5 @@
|
||||
import { TypeList, WorkflowDiagram } from "docs-ui"
|
||||
|
||||
# useRemoteQueryStepId
|
||||
|
||||
`Const` **useRemoteQueryStepId**: `"use-remote-query"`
|
||||
@@ -0,0 +1,24 @@
|
||||
---
|
||||
slug: /references/medusa-workflows/batchLinksWorkflow
|
||||
sidebar_label: batchLinksWorkflow
|
||||
---
|
||||
|
||||
import { TypeList, WorkflowDiagram } from "docs-ui"
|
||||
|
||||
# batchLinksWorkflow - Medusa Workflows API Reference
|
||||
|
||||
This documentation provides a reference to the `batchLinksWorkflow`. It belongs to the `@medusajs/core-flows` package.
|
||||
|
||||
This workflow manages one or more links to create, update, or dismiss them.
|
||||
|
||||
## Steps
|
||||
|
||||
<WorkflowDiagram workflow={{"name":"batchLinksWorkflow","steps":[{"type":"step","name":"createRemoteLinkStep","description":"This step creates remote links between two records of linked data models.\n\nLearn more in the [Remote Link documentation.](https://docs.medusajs.com/v2/advanced-development/modules/remote-link#create-link).\n\n","link":"../../../../core_flows.Steps_Common/page.mdx#createremotelinkstep","depth":1},{"type":"step","name":"updateRemoteLinksStep","description":"","link":"../../../../core_flows.Steps_Common/page.mdx#updateremotelinksstep","depth":1},{"type":"step","name":"dismissRemoteLinkStep","description":"This step removes remote links between two records of linked data models.\n\nLearn more in the [Remote Link documentation.](https://docs.medusajs.com/v2/advanced-development/modules/remote-link#dismiss-link).\n\n","link":"../../../../core_flows.Steps_Common/page.mdx#dismissremotelinkstep","depth":1}]}} />
|
||||
|
||||
## Input
|
||||
|
||||
<TypeList types={[{"name":"BatchWorkflowInput","type":"[BatchWorkflowInput](../../../../../types/CommonTypes/types/types.CommonTypes.BatchWorkflowInput/page.mdx)<LinkDefinition, LinkDefinition, LinkDefinition>","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"LinkDefinition","type":"[LinkDefinition](../../../../../modules_sdk/types/modules_sdk.LinkDefinition/page.mdx)","optional":false,"defaultValue":"","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.","expandable":false,"children":[{"name":"data","type":"`Record<string, unknown>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"LinkDefinition","type":"[LinkDefinition](../../../../../modules_sdk/types/modules_sdk.LinkDefinition/page.mdx)","optional":false,"defaultValue":"","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.","expandable":false,"children":[{"name":"data","type":"`Record<string, unknown>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"LinkDefinition","type":"[LinkDefinition](../../../../../modules_sdk/types/modules_sdk.LinkDefinition/page.mdx)","optional":false,"defaultValue":"","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.","expandable":false,"children":[{"name":"data","type":"`Record<string, unknown>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="batchLinksWorkflow"/>
|
||||
|
||||
## Output
|
||||
|
||||
<TypeList types={[{"name":"created","type":"([LinkDefinition](../../../../../modules_sdk/types/modules_sdk.LinkDefinition/page.mdx) \\| [WorkflowData](../../../../../workflows/types/workflows.WorkflowData/page.mdx)<LinkDefinition>)[] & [LinkDefinition](../../../../../modules_sdk/types/modules_sdk.LinkDefinition/page.mdx)[] & [WorkflowDataProperties](../../../../../workflows/types/workflows.WorkflowDataProperties/page.mdx)<LinkDefinition[]> & `object` & StepFunctionReturnConfig<LinkDefinition[]>","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"__step__","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"updated","type":"([LinkDefinition](../../../../../modules_sdk/types/modules_sdk.LinkDefinition/page.mdx) \\| [WorkflowData](../../../../../workflows/types/workflows.WorkflowData/page.mdx)<LinkDefinition>)[] & [LinkDefinition](../../../../../modules_sdk/types/modules_sdk.LinkDefinition/page.mdx)[] & [WorkflowDataProperties](../../../../../workflows/types/workflows.WorkflowDataProperties/page.mdx)<LinkDefinition[]> & `object` & StepFunctionReturnConfig<LinkDefinition[]>","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"__step__","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"deleted","type":"([LinkDefinition](../../../../../modules_sdk/types/modules_sdk.LinkDefinition/page.mdx) \\| [WorkflowData](../../../../../workflows/types/workflows.WorkflowData/page.mdx)<LinkDefinition>)[] & [LinkDefinition](../../../../../modules_sdk/types/modules_sdk.LinkDefinition/page.mdx)[] & [WorkflowDataProperties](../../../../../workflows/types/workflows.WorkflowDataProperties/page.mdx)<LinkDefinition[]> & `object` & StepFunctionReturnConfig<LinkDefinition[]>","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"__step__","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="batchLinksWorkflow"/>
|
||||
@@ -0,0 +1,24 @@
|
||||
---
|
||||
slug: /references/medusa-workflows/createLinksWorkflow
|
||||
sidebar_label: createLinksWorkflow
|
||||
---
|
||||
|
||||
import { TypeList, WorkflowDiagram } from "docs-ui"
|
||||
|
||||
# createLinksWorkflow - Medusa Workflows API Reference
|
||||
|
||||
This documentation provides a reference to the `createLinksWorkflow`. It belongs to the `@medusajs/core-flows` package.
|
||||
|
||||
This workflow creates one or more links between records.
|
||||
|
||||
## Steps
|
||||
|
||||
<WorkflowDiagram workflow={{"name":"createLinksWorkflow","steps":[{"type":"step","name":"createRemoteLinkStep","description":"This step creates remote links between two records of linked data models.\n\nLearn more in the [Remote Link documentation.](https://docs.medusajs.com/v2/advanced-development/modules/remote-link#create-link).\n\n","link":"../../../../core_flows.Steps_Common/page.mdx#createremotelinkstep","depth":1}]}} />
|
||||
|
||||
## 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":"[LinkDefinition](../../../../../modules_sdk/types/modules_sdk.LinkDefinition/page.mdx)","optional":false,"defaultValue":"","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.","expandable":false,"children":[{"name":"data","type":"`Record<string, unknown>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createLinksWorkflow"/>
|
||||
|
||||
## Output
|
||||
|
||||
<TypeList types={[{"name":"LinkDefinition[]","type":"[LinkDefinition](../../../../../modules_sdk/types/modules_sdk.LinkDefinition/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"LinkDefinition","type":"[LinkDefinition](../../../../../modules_sdk/types/modules_sdk.LinkDefinition/page.mdx)","optional":false,"defaultValue":"","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.","expandable":false,"children":[{"name":"data","type":"`Record<string, unknown>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createLinksWorkflow"/>
|
||||
@@ -0,0 +1,24 @@
|
||||
---
|
||||
slug: /references/medusa-workflows/dismissLinksWorkflow
|
||||
sidebar_label: dismissLinksWorkflow
|
||||
---
|
||||
|
||||
import { TypeList, WorkflowDiagram } from "docs-ui"
|
||||
|
||||
# dismissLinksWorkflow - Medusa Workflows API Reference
|
||||
|
||||
This documentation provides a reference to the `dismissLinksWorkflow`. It belongs to the `@medusajs/core-flows` package.
|
||||
|
||||
This workflow dismisses one or more links between records.
|
||||
|
||||
## Steps
|
||||
|
||||
<WorkflowDiagram workflow={{"name":"dismissLinksWorkflow","steps":[{"type":"step","name":"dismissRemoteLinkStep","description":"This step removes remote links between two records of linked data models.\n\nLearn more in the [Remote Link documentation.](https://docs.medusajs.com/v2/advanced-development/modules/remote-link#dismiss-link).\n\n","link":"../../../../core_flows.Steps_Common/page.mdx#dismissremotelinkstep","depth":1}]}} />
|
||||
|
||||
## 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":"[LinkDefinition](../../../../../modules_sdk/types/modules_sdk.LinkDefinition/page.mdx)","optional":false,"defaultValue":"","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.","expandable":false,"children":[{"name":"data","type":"`Record<string, unknown>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="dismissLinksWorkflow"/>
|
||||
|
||||
## Output
|
||||
|
||||
<TypeList types={[{"name":"LinkDefinition[]","type":"[LinkDefinition](../../../../../modules_sdk/types/modules_sdk.LinkDefinition/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"LinkDefinition","type":"[LinkDefinition](../../../../../modules_sdk/types/modules_sdk.LinkDefinition/page.mdx)","optional":false,"defaultValue":"","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.","expandable":false,"children":[{"name":"data","type":"`Record<string, unknown>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="dismissLinksWorkflow"/>
|
||||
@@ -0,0 +1,24 @@
|
||||
---
|
||||
slug: /references/medusa-workflows/updateLinksWorkflow
|
||||
sidebar_label: updateLinksWorkflow
|
||||
---
|
||||
|
||||
import { TypeList, WorkflowDiagram } from "docs-ui"
|
||||
|
||||
# updateLinksWorkflow - Medusa Workflows API Reference
|
||||
|
||||
This documentation provides a reference to the `updateLinksWorkflow`. It belongs to the `@medusajs/core-flows` package.
|
||||
|
||||
This workflow updates one or more links between records.
|
||||
|
||||
## Steps
|
||||
|
||||
<WorkflowDiagram workflow={{"name":"updateLinksWorkflow","steps":[{"type":"step","name":"updateRemoteLinksStep","description":"","link":"../../../../core_flows.Steps_Common/page.mdx#updateremotelinksstep","depth":1}]}} />
|
||||
|
||||
## 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":"[LinkDefinition](../../../../../modules_sdk/types/modules_sdk.LinkDefinition/page.mdx)","optional":false,"defaultValue":"","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.","expandable":false,"children":[{"name":"data","type":"`Record<string, unknown>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateLinksWorkflow"/>
|
||||
|
||||
## Output
|
||||
|
||||
<TypeList types={[{"name":"LinkDefinition[]","type":"[LinkDefinition](../../../../../modules_sdk/types/modules_sdk.LinkDefinition/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"LinkDefinition","type":"[LinkDefinition](../../../../../modules_sdk/types/modules_sdk.LinkDefinition/page.mdx)","optional":false,"defaultValue":"","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.","expandable":false,"children":[{"name":"data","type":"`Record<string, unknown>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateLinksWorkflow"/>
|
||||
@@ -0,0 +1,5 @@
|
||||
import { TypeList, WorkflowDiagram } from "docs-ui"
|
||||
|
||||
# batchLinksWorkflowId
|
||||
|
||||
`Const` **batchLinksWorkflowId**: `"batch-links"`
|
||||
@@ -0,0 +1,5 @@
|
||||
import { TypeList, WorkflowDiagram } from "docs-ui"
|
||||
|
||||
# createLinksWorkflowId
|
||||
|
||||
`Const` **createLinksWorkflowId**: `"create-link"`
|
||||
@@ -0,0 +1,5 @@
|
||||
import { TypeList, WorkflowDiagram } from "docs-ui"
|
||||
|
||||
# dismissLinksWorkflowId
|
||||
|
||||
`Const` **dismissLinksWorkflowId**: `"dismiss-link"`
|
||||
@@ -0,0 +1,5 @@
|
||||
import { TypeList, WorkflowDiagram } from "docs-ui"
|
||||
|
||||
# updateLinksWorkflowId
|
||||
|
||||
`Const` **updateLinksWorkflowId**: `"update-link"`
|
||||
@@ -0,0 +1,267 @@
|
||||
import { TypeList, WorkflowDiagram } from "docs-ui"
|
||||
|
||||
# Steps\_Common
|
||||
|
||||
## createRemoteLinkStep
|
||||
|
||||
This step creates remote links between two records of linked data models.
|
||||
|
||||
Learn more in the [Remote Link documentation.](https://docs.medusajs.com/v2/advanced-development/modules/remote-link#create-link).
|
||||
|
||||
### 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":"[LinkDefinition](../../../modules_sdk/types/modules_sdk.LinkDefinition/page.mdx)","optional":false,"defaultValue":"","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.","expandable":false,"children":[{"name":"data","type":"`Record<string, unknown>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createRemoteLinkStep"/>
|
||||
|
||||
### Output
|
||||
|
||||
<TypeList types={[{"name":"LinkDefinition[]","type":"[LinkDefinition](../../../modules_sdk/types/modules_sdk.LinkDefinition/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"LinkDefinition","type":"[LinkDefinition](../../../modules_sdk/types/modules_sdk.LinkDefinition/page.mdx)","optional":false,"defaultValue":"","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.","expandable":false,"children":[{"name":"data","type":"`Record<string, unknown>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createRemoteLinkStep"/>
|
||||
|
||||
___
|
||||
|
||||
## dismissRemoteLinkStep
|
||||
|
||||
This step removes remote links between two records of linked data models.
|
||||
|
||||
Learn more in the [Remote Link documentation.](https://docs.medusajs.com/v2/advanced-development/modules/remote-link#dismiss-link).
|
||||
|
||||
### 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":"[DismissRemoteLinksStepInput](../../types/core_flows.DismissRemoteLinksStepInput/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"data","type":"`Record<string, unknown>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="dismissRemoteLinkStep"/>
|
||||
|
||||
### Output
|
||||
|
||||
<TypeList types={[{"name":"LinkDefinition[]","type":"[LinkDefinition](../../../modules_sdk/types/modules_sdk.LinkDefinition/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"LinkDefinition","type":"[LinkDefinition](../../../modules_sdk/types/modules_sdk.LinkDefinition/page.mdx)","optional":false,"defaultValue":"","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.","expandable":false,"children":[{"name":"data","type":"`Record<string, unknown>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="dismissRemoteLinkStep"/>
|
||||
|
||||
___
|
||||
|
||||
## emitEventStep
|
||||
|
||||
Emit an event.
|
||||
|
||||
### Example
|
||||
|
||||
```ts
|
||||
import {
|
||||
createWorkflow
|
||||
} from "@medusajs/workflows-sdk"
|
||||
import {
|
||||
emitEventStep
|
||||
} from "@medusajs/core-flows"
|
||||
|
||||
const helloWorldWorkflow = createWorkflow(
|
||||
"hello-world",
|
||||
() => {
|
||||
emitEventStep({
|
||||
eventName: "custom.created",
|
||||
data: {
|
||||
id: "123"
|
||||
}
|
||||
})
|
||||
}
|
||||
)
|
||||
```
|
||||
|
||||
### Input
|
||||
|
||||
<TypeList types={[{"name":"Input","type":"`Input`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="emitEventStep"/>
|
||||
|
||||
___
|
||||
|
||||
## removeRemoteLinkStep
|
||||
|
||||
This step deletes linked records of a record.
|
||||
|
||||
Learn more in the [Remote Link documentation](https://docs.medusajs.com/v2/advanced-development/modules/remote-link#cascade-delete-linked-records)
|
||||
|
||||
### 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":[]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="removeRemoteLinkStep"/>
|
||||
|
||||
### Output
|
||||
|
||||
<TypeList types={[{"name":"DeleteEntityInput","type":"[DeleteEntityInput](../../../modules_sdk/types/modules_sdk.DeleteEntityInput/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"DeleteEntityInput","type":"`object`","description":"The details of a data model's record whose linked records should be deleted. Usually used after the\ndata model's record is deleted.\n\nThe key is the data model's name. Its value is an object that has the ID of the data model's record.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="removeRemoteLinkStep"/>
|
||||
|
||||
___
|
||||
|
||||
## updateRemoteLinksStep
|
||||
|
||||
### 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":"[LinkDefinition](../../../modules_sdk/types/modules_sdk.LinkDefinition/page.mdx)","optional":false,"defaultValue":"","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.","expandable":false,"children":[{"name":"data","type":"`Record<string, unknown>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateRemoteLinksStep"/>
|
||||
|
||||
### Output
|
||||
|
||||
<TypeList types={[{"name":"LinkDefinition[]","type":"[LinkDefinition](../../../modules_sdk/types/modules_sdk.LinkDefinition/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"LinkDefinition","type":"[LinkDefinition](../../../modules_sdk/types/modules_sdk.LinkDefinition/page.mdx)","optional":false,"defaultValue":"","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.","expandable":false,"children":[{"name":"data","type":"`Record<string, unknown>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateRemoteLinksStep"/>
|
||||
|
||||
___
|
||||
|
||||
## useRemoteQueryStep
|
||||
|
||||
This step fetches data across modules using the remote query.
|
||||
|
||||
Learn more in the [Remote Query documentation](https://docs.medusajs.com/v2/advanced-development/modules/remote-query).
|
||||
|
||||
### 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/core_flows.EntryStepInput/page.mdx) \\| [ServiceStepInput](../../interfaces/core_flows.ServiceStepInput/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"EntryStepInput \\| ServiceStepInput","type":"[EntryStepInput](../../interfaces/core_flows.EntryStepInput/page.mdx) \\| [ServiceStepInput](../../interfaces/core_flows.ServiceStepInput/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="useRemoteQueryStep"/>
|
||||
@@ -0,0 +1,73 @@
|
||||
import { TypeList, WorkflowDiagram } from "docs-ui"
|
||||
|
||||
# Workflows\_Common
|
||||
|
||||
## batchLinksWorkflow
|
||||
|
||||
This workflow manages one or more links to create, update, or dismiss them.
|
||||
|
||||
### Steps
|
||||
|
||||
<WorkflowDiagram workflow={{"name":"batchLinksWorkflow","steps":[{"type":"step","name":"createRemoteLinkStep","description":"This step creates remote links between two records of linked data models.\n\nLearn more in the [Remote Link documentation.](https://docs.medusajs.com/v2/advanced-development/modules/remote-link#create-link).\n\n","link":"../../core_flows.Steps_Common/page.mdx#createremotelinkstep","depth":1},{"type":"step","name":"updateRemoteLinksStep","description":"","link":"../../core_flows.Steps_Common/page.mdx#updateremotelinksstep","depth":1},{"type":"step","name":"dismissRemoteLinkStep","description":"This step removes remote links between two records of linked data models.\n\nLearn more in the [Remote Link documentation.](https://docs.medusajs.com/v2/advanced-development/modules/remote-link#dismiss-link).\n\n","link":"../../core_flows.Steps_Common/page.mdx#dismissremotelinkstep","depth":1}]}} />
|
||||
|
||||
### Input
|
||||
|
||||
<TypeList types={[{"name":"BatchWorkflowInput","type":"[BatchWorkflowInput](../../../types/CommonTypes/types/types.CommonTypes.BatchWorkflowInput/page.mdx)<LinkDefinition, LinkDefinition, LinkDefinition>","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"LinkDefinition","type":"[LinkDefinition](../../../modules_sdk/types/modules_sdk.LinkDefinition/page.mdx)","optional":false,"defaultValue":"","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.","expandable":false,"children":[{"name":"data","type":"`Record<string, unknown>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"LinkDefinition","type":"[LinkDefinition](../../../modules_sdk/types/modules_sdk.LinkDefinition/page.mdx)","optional":false,"defaultValue":"","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.","expandable":false,"children":[{"name":"data","type":"`Record<string, unknown>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"LinkDefinition","type":"[LinkDefinition](../../../modules_sdk/types/modules_sdk.LinkDefinition/page.mdx)","optional":false,"defaultValue":"","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.","expandable":false,"children":[{"name":"data","type":"`Record<string, unknown>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="batchLinksWorkflow"/>
|
||||
|
||||
### Output
|
||||
|
||||
<TypeList types={[{"name":"created","type":"([LinkDefinition](../../../modules_sdk/types/modules_sdk.LinkDefinition/page.mdx) \\| [WorkflowData](../../../workflows/types/workflows.WorkflowData/page.mdx)<LinkDefinition>)[] & [LinkDefinition](../../../modules_sdk/types/modules_sdk.LinkDefinition/page.mdx)[] & [WorkflowDataProperties](../../../workflows/types/workflows.WorkflowDataProperties/page.mdx)<LinkDefinition[]> & `object` & StepFunctionReturnConfig<LinkDefinition[]>","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"__step__","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"updated","type":"([LinkDefinition](../../../modules_sdk/types/modules_sdk.LinkDefinition/page.mdx) \\| [WorkflowData](../../../workflows/types/workflows.WorkflowData/page.mdx)<LinkDefinition>)[] & [LinkDefinition](../../../modules_sdk/types/modules_sdk.LinkDefinition/page.mdx)[] & [WorkflowDataProperties](../../../workflows/types/workflows.WorkflowDataProperties/page.mdx)<LinkDefinition[]> & `object` & StepFunctionReturnConfig<LinkDefinition[]>","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"__step__","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"deleted","type":"([LinkDefinition](../../../modules_sdk/types/modules_sdk.LinkDefinition/page.mdx) \\| [WorkflowData](../../../workflows/types/workflows.WorkflowData/page.mdx)<LinkDefinition>)[] & [LinkDefinition](../../../modules_sdk/types/modules_sdk.LinkDefinition/page.mdx)[] & [WorkflowDataProperties](../../../workflows/types/workflows.WorkflowDataProperties/page.mdx)<LinkDefinition[]> & `object` & StepFunctionReturnConfig<LinkDefinition[]>","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"__step__","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="batchLinksWorkflow"/>
|
||||
|
||||
___
|
||||
|
||||
## createLinksWorkflow
|
||||
|
||||
This workflow creates one or more links between records.
|
||||
|
||||
### Steps
|
||||
|
||||
<WorkflowDiagram workflow={{"name":"createLinksWorkflow","steps":[{"type":"step","name":"createRemoteLinkStep","description":"This step creates remote links between two records of linked data models.\n\nLearn more in the [Remote Link documentation.](https://docs.medusajs.com/v2/advanced-development/modules/remote-link#create-link).\n\n","link":"../../core_flows.Steps_Common/page.mdx#createremotelinkstep","depth":1}]}} />
|
||||
|
||||
### 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":"[LinkDefinition](../../../modules_sdk/types/modules_sdk.LinkDefinition/page.mdx)","optional":false,"defaultValue":"","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.","expandable":false,"children":[{"name":"data","type":"`Record<string, unknown>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createLinksWorkflow"/>
|
||||
|
||||
### Output
|
||||
|
||||
<TypeList types={[{"name":"LinkDefinition[]","type":"[LinkDefinition](../../../modules_sdk/types/modules_sdk.LinkDefinition/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"LinkDefinition","type":"[LinkDefinition](../../../modules_sdk/types/modules_sdk.LinkDefinition/page.mdx)","optional":false,"defaultValue":"","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.","expandable":false,"children":[{"name":"data","type":"`Record<string, unknown>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createLinksWorkflow"/>
|
||||
|
||||
___
|
||||
|
||||
## dismissLinksWorkflow
|
||||
|
||||
This workflow dismisses one or more links between records.
|
||||
|
||||
### Steps
|
||||
|
||||
<WorkflowDiagram workflow={{"name":"dismissLinksWorkflow","steps":[{"type":"step","name":"dismissRemoteLinkStep","description":"This step removes remote links between two records of linked data models.\n\nLearn more in the [Remote Link documentation.](https://docs.medusajs.com/v2/advanced-development/modules/remote-link#dismiss-link).\n\n","link":"../../core_flows.Steps_Common/page.mdx#dismissremotelinkstep","depth":1}]}} />
|
||||
|
||||
### 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":"[LinkDefinition](../../../modules_sdk/types/modules_sdk.LinkDefinition/page.mdx)","optional":false,"defaultValue":"","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.","expandable":false,"children":[{"name":"data","type":"`Record<string, unknown>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="dismissLinksWorkflow"/>
|
||||
|
||||
### Output
|
||||
|
||||
<TypeList types={[{"name":"LinkDefinition[]","type":"[LinkDefinition](../../../modules_sdk/types/modules_sdk.LinkDefinition/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"LinkDefinition","type":"[LinkDefinition](../../../modules_sdk/types/modules_sdk.LinkDefinition/page.mdx)","optional":false,"defaultValue":"","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.","expandable":false,"children":[{"name":"data","type":"`Record<string, unknown>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="dismissLinksWorkflow"/>
|
||||
|
||||
___
|
||||
|
||||
## updateLinksWorkflow
|
||||
|
||||
This workflow updates one or more links between records.
|
||||
|
||||
### Steps
|
||||
|
||||
<WorkflowDiagram workflow={{"name":"updateLinksWorkflow","steps":[{"type":"step","name":"updateRemoteLinksStep","description":"","link":"../../core_flows.Steps_Common/page.mdx#updateremotelinksstep","depth":1}]}} />
|
||||
|
||||
### 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":"[LinkDefinition](../../../modules_sdk/types/modules_sdk.LinkDefinition/page.mdx)","optional":false,"defaultValue":"","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.","expandable":false,"children":[{"name":"data","type":"`Record<string, unknown>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateLinksWorkflow"/>
|
||||
|
||||
### Output
|
||||
|
||||
<TypeList types={[{"name":"LinkDefinition[]","type":"[LinkDefinition](../../../modules_sdk/types/modules_sdk.LinkDefinition/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"LinkDefinition","type":"[LinkDefinition](../../../modules_sdk/types/modules_sdk.LinkDefinition/page.mdx)","optional":false,"defaultValue":"","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.","expandable":false,"children":[{"name":"data","type":"`Record<string, unknown>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateLinksWorkflow"/>
|
||||
@@ -0,0 +1,20 @@
|
||||
---
|
||||
slug: /references/medusa-workflows/steps/createCustomerAddressesStep
|
||||
sidebar_label: createCustomerAddressesStep
|
||||
---
|
||||
|
||||
import { TypeList, WorkflowDiagram } from "docs-ui"
|
||||
|
||||
# createCustomerAddressesStep - Medusa Workflows API Reference
|
||||
|
||||
This documentation provides a reference to the `createCustomerAddressesStep`. It belongs to the `@medusajs/core-flows` package.
|
||||
|
||||
This step creates one or more customer addresses.
|
||||
|
||||
## Input
|
||||
|
||||
<TypeList types={[{"name":"CreateCustomerAddressDTO[]","type":"[CreateCustomerAddressDTO](../../../../../customer/interfaces/customer.CreateCustomerAddressDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"CreateCustomerAddressDTO","type":"[CreateCustomerAddressDTO](../../../../../customer/interfaces/customer.CreateCustomerAddressDTO/page.mdx)","optional":false,"defaultValue":"","description":"The customer address to be created.","expandable":false,"children":[{"name":"customer_id","type":"`string`","description":"The associated customer's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"address_name","type":"`null` \\| `string`","description":"The address's name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_default_shipping","type":"`boolean`","description":"Whether the address is default shipping.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_default_billing","type":"`boolean`","description":"Whether the address is the default for billing.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"company","type":"`null` \\| `string`","description":"The company.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"first_name","type":"`null` \\| `string`","description":"The first name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`null` \\| `string`","description":"The last name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_1","type":"`null` \\| `string`","description":"The address 1.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_2","type":"`null` \\| `string`","description":"The address 2.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"city","type":"`null` \\| `string`","description":"The city.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"country_code","type":"`null` \\| `string`","description":"The country code.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"province","type":"`null` \\| `string`","description":"The province.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"postal_code","type":"`null` \\| `string`","description":"The postal code.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"phone","type":"`null` \\| `string`","description":"The phone.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"[MetadataType](../../../../../customer/types/customer.MetadataType/page.mdx)","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createCustomerAddressesStep"/>
|
||||
|
||||
## Output
|
||||
|
||||
<TypeList types={[{"name":"CustomerAddressDTO[]","type":"[CustomerAddressDTO](../../../../../customer/interfaces/customer.CustomerAddressDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"CustomerAddressDTO","type":"[CustomerAddressDTO](../../../../../customer/interfaces/customer.CustomerAddressDTO/page.mdx)","optional":false,"defaultValue":"","description":"The customer address details.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the customer address.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_default_shipping","type":"`boolean`","description":"Whether the customer address is default shipping.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_default_billing","type":"`boolean`","description":"Whether the customer address is default billing.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`string`","description":"The associated customer's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string`","description":"The created at of the customer address.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string`","description":"The updated at of the customer address.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"address_name","type":"`string`","description":"The address name of the customer address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"company","type":"`string`","description":"The company of the customer address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"first_name","type":"`string`","description":"The first name of the customer address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`string`","description":"The last name of the customer address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_1","type":"`string`","description":"The address 1 of the customer address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_2","type":"`string`","description":"The address 2 of the customer address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"city","type":"`string`","description":"The city of the customer address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"country_code","type":"`string`","description":"The country code of the customer address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"province","type":"`string`","description":"The province of the customer address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"postal_code","type":"`string`","description":"The postal code of the customer address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"phone","type":"`string`","description":"The phone of the customer address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createCustomerAddressesStep"/>
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,16 @@
|
||||
---
|
||||
slug: /references/medusa-workflows/steps/deleteCustomerAddressesStep
|
||||
sidebar_label: deleteCustomerAddressesStep
|
||||
---
|
||||
|
||||
import { TypeList, WorkflowDiagram } from "docs-ui"
|
||||
|
||||
# deleteCustomerAddressesStep - Medusa Workflows API Reference
|
||||
|
||||
This documentation provides a reference to the `deleteCustomerAddressesStep`. It belongs to the `@medusajs/core-flows` package.
|
||||
|
||||
This step deletes one or more customer addresses.
|
||||
|
||||
## Input
|
||||
|
||||
<TypeList types={[{"name":"string[]","type":"`string`[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"string","type":"`string`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="deleteCustomerAddressesStep"/>
|
||||
@@ -0,0 +1,16 @@
|
||||
---
|
||||
slug: /references/medusa-workflows/steps/deleteCustomersStep
|
||||
sidebar_label: deleteCustomersStep
|
||||
---
|
||||
|
||||
import { TypeList, WorkflowDiagram } from "docs-ui"
|
||||
|
||||
# deleteCustomersStep - Medusa Workflows API Reference
|
||||
|
||||
This documentation provides a reference to the `deleteCustomersStep`. It belongs to the `@medusajs/core-flows` package.
|
||||
|
||||
This step deletes one or more customers.
|
||||
|
||||
## Input
|
||||
|
||||
<TypeList types={[{"name":"string[]","type":"`string`[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"string","type":"`string`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="deleteCustomersStep"/>
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1,5 @@
|
||||
import { TypeList, WorkflowDiagram } from "docs-ui"
|
||||
|
||||
# createCustomerAddressesStepId
|
||||
|
||||
`Const` **createCustomerAddressesStepId**: `"create-customer-addresses"`
|
||||
@@ -0,0 +1,5 @@
|
||||
import { TypeList, WorkflowDiagram } from "docs-ui"
|
||||
|
||||
# createCustomersStepId
|
||||
|
||||
`Const` **createCustomersStepId**: `"create-customers"`
|
||||
@@ -0,0 +1,5 @@
|
||||
import { TypeList, WorkflowDiagram } from "docs-ui"
|
||||
|
||||
# deleteCustomerAddressesStepId
|
||||
|
||||
`Const` **deleteCustomerAddressesStepId**: `"delete-customer-addresses"`
|
||||
@@ -0,0 +1,5 @@
|
||||
import { TypeList, WorkflowDiagram } from "docs-ui"
|
||||
|
||||
# deleteCustomersStepId
|
||||
|
||||
`Const` **deleteCustomersStepId**: `"delete-customers"`
|
||||
@@ -0,0 +1,5 @@
|
||||
import { TypeList, WorkflowDiagram } from "docs-ui"
|
||||
|
||||
# maybeUnsetDefaultBillingAddressesStepId
|
||||
|
||||
`Const` **maybeUnsetDefaultBillingAddressesStepId**: `"maybe-unset-default-billing-customer-addresses"`
|
||||
@@ -0,0 +1,5 @@
|
||||
import { TypeList, WorkflowDiagram } from "docs-ui"
|
||||
|
||||
# maybeUnsetDefaultShippingAddressesStepId
|
||||
|
||||
`Const` **maybeUnsetDefaultShippingAddressesStepId**: `"maybe-unset-default-shipping-customer-addresses"`
|
||||
@@ -0,0 +1,5 @@
|
||||
import { TypeList, WorkflowDiagram } from "docs-ui"
|
||||
|
||||
# updateCustomerAddresseStepId
|
||||
|
||||
`Const` **updateCustomerAddresseStepId**: `"update-customer-addresses"`
|
||||
@@ -0,0 +1,5 @@
|
||||
import { TypeList, WorkflowDiagram } from "docs-ui"
|
||||
|
||||
# updateCustomersStepId
|
||||
|
||||
`Const` **updateCustomersStepId**: `"update-customer"`
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,46 @@
|
||||
---
|
||||
slug: /references/medusa-workflows/createCustomerAddressesWorkflow
|
||||
sidebar_label: createCustomerAddressesWorkflow
|
||||
---
|
||||
|
||||
import { TypeList, WorkflowDiagram } from "docs-ui"
|
||||
|
||||
# createCustomerAddressesWorkflow - Medusa Workflows API Reference
|
||||
|
||||
This documentation provides a reference to the `createCustomerAddressesWorkflow`. It belongs to the `@medusajs/core-flows` package.
|
||||
|
||||
This workflow creates one or more customer address.
|
||||
|
||||
## Steps
|
||||
|
||||
<WorkflowDiagram workflow={{"name":"createCustomerAddressesWorkflow","steps":[{"type":"step","name":"maybeUnsetDefaultShippingAddressesStep","description":"This step unsets the `is_default_shipping` property of one or more addresses.","link":"../../../../core_flows.Steps_Customer/page.mdx#maybeunsetdefaultshippingaddressesstep","depth":1},{"type":"step","name":"maybeUnsetDefaultBillingAddressesStep","description":"This step unsets the `is_default_billing` property of one or more addresses.","link":"../../../../core_flows.Steps_Customer/page.mdx#maybeunsetdefaultbillingaddressesstep","depth":1},{"type":"step","name":"createCustomerAddressesStep","description":"This step creates one or more customer addresses.","link":"../../../../core_flows.Steps_Customer/page.mdx#createcustomeraddressesstep","depth":2},{"type":"hook","name":"addressesCreated","description":"This step is a hook that you can inject custom functionality into.\n\n","link":"#addressesCreated","depth":3}]}} />
|
||||
|
||||
## Input
|
||||
|
||||
<TypeList types={[{"name":"CreateCustomerAddressesWorkflowInput","type":"[CreateCustomerAddressesWorkflowInput](../../../../types/core_flows.CreateCustomerAddressesWorkflowInput/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"addresses","type":"[CreateCustomerAddressDTO](../../../../../customer/interfaces/customer.CreateCustomerAddressDTO/page.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"customer_id","type":"`string`","description":"The associated customer's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"address_name","type":"`null` \\| `string`","description":"The address's name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_default_shipping","type":"`boolean`","description":"Whether the address is default shipping.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_default_billing","type":"`boolean`","description":"Whether the address is the default for billing.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"company","type":"`null` \\| `string`","description":"The company.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"first_name","type":"`null` \\| `string`","description":"The first name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`null` \\| `string`","description":"The last name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_1","type":"`null` \\| `string`","description":"The address 1.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_2","type":"`null` \\| `string`","description":"The address 2.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"city","type":"`null` \\| `string`","description":"The city.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"country_code","type":"`null` \\| `string`","description":"The country code.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"province","type":"`null` \\| `string`","description":"The province.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"postal_code","type":"`null` \\| `string`","description":"The postal code.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"phone","type":"`null` \\| `string`","description":"The phone.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"[MetadataType](../../../../../customer/types/customer.MetadataType/page.mdx)","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"additional_data","type":"`Record<string, unknown>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createCustomerAddressesWorkflow"/>
|
||||
|
||||
## Output
|
||||
|
||||
<TypeList types={[{"name":"CustomerAddressDTO[]","type":"[CustomerAddressDTO](../../../../../customer/interfaces/customer.CustomerAddressDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"CustomerAddressDTO","type":"[CustomerAddressDTO](../../../../../customer/interfaces/customer.CustomerAddressDTO/page.mdx)","optional":false,"defaultValue":"","description":"The customer address details.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the customer address.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_default_shipping","type":"`boolean`","description":"Whether the customer address is default shipping.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_default_billing","type":"`boolean`","description":"Whether the customer address is default billing.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`string`","description":"The associated customer's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string`","description":"The created at of the customer address.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string`","description":"The updated at of the customer address.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"address_name","type":"`string`","description":"The address name of the customer address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"company","type":"`string`","description":"The company of the customer address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"first_name","type":"`string`","description":"The first name of the customer address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`string`","description":"The last name of the customer address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_1","type":"`string`","description":"The address 1 of the customer address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_2","type":"`string`","description":"The address 2 of the customer address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"city","type":"`string`","description":"The city of the customer address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"country_code","type":"`string`","description":"The country code of the customer address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"province","type":"`string`","description":"The province of the customer address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"postal_code","type":"`string`","description":"The postal code of the customer address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"phone","type":"`string`","description":"The phone of the customer address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createCustomerAddressesWorkflow"/>
|
||||
|
||||
## Hooks
|
||||
|
||||
### addressesCreated
|
||||
|
||||
#### Example
|
||||
|
||||
```ts
|
||||
import { createCustomerAddressesWorkflow } from "@medusajs/core-flows"
|
||||
|
||||
createCustomerAddressesWorkflow.hooks.addressesCreated(
|
||||
async (({ addresses, additional_data }, { container }) => {
|
||||
//TODO
|
||||
})
|
||||
)
|
||||
```
|
||||
|
||||
#### Input
|
||||
|
||||
Handlers consuming this hook accept the following input.
|
||||
|
||||
<TypeList types={[{"name":"input","type":"object","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"addresses","type":"[CustomerAddressDTO](../../../../../customer/interfaces/customer.CustomerAddressDTO/page.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the customer address.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_default_shipping","type":"`boolean`","description":"Whether the customer address is default shipping.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_default_billing","type":"`boolean`","description":"Whether the customer address is default billing.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`string`","description":"The associated customer's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string`","description":"The created at of the customer address.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string`","description":"The updated at of the customer address.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"address_name","type":"`string`","description":"The address name of the customer address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"company","type":"`string`","description":"The company of the customer address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"first_name","type":"`string`","description":"The first name of the customer address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`string`","description":"The last name of the customer address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_1","type":"`string`","description":"The address 1 of the customer address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_2","type":"`string`","description":"The address 2 of the customer address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"city","type":"`string`","description":"The city of the customer address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"country_code","type":"`string`","description":"The country code of the customer address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"province","type":"`string`","description":"The province of the customer address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"postal_code","type":"`string`","description":"The postal code of the customer address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"phone","type":"`string`","description":"The phone of the customer address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"additional_data","type":"`Record<string, unknown> | undefined`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="addressesCreated"/>
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,42 @@
|
||||
---
|
||||
slug: /references/medusa-workflows/deleteCustomerAddressesWorkflow
|
||||
sidebar_label: deleteCustomerAddressesWorkflow
|
||||
---
|
||||
|
||||
import { TypeList, WorkflowDiagram } from "docs-ui"
|
||||
|
||||
# deleteCustomerAddressesWorkflow - Medusa Workflows API Reference
|
||||
|
||||
This documentation provides a reference to the `deleteCustomerAddressesWorkflow`. It belongs to the `@medusajs/core-flows` package.
|
||||
|
||||
This workflow deletes one or more customer addresses.
|
||||
|
||||
## Steps
|
||||
|
||||
<WorkflowDiagram workflow={{"name":"deleteCustomerAddressesWorkflow","steps":[{"type":"step","name":"deleteCustomerAddressesStep","description":"This step deletes one or more customer addresses.","link":"../../../../core_flows.Steps_Customer/page.mdx#deletecustomeraddressesstep","depth":1},{"type":"hook","name":"addressesDeleted","description":"This step is a hook that you can inject custom functionality into.\n\n","link":"#addressesDeleted","depth":2}]}} />
|
||||
|
||||
## Input
|
||||
|
||||
<TypeList types={[{"name":"DeleteCustomerAddressesWorkflowInput","type":"[DeleteCustomerAddressesWorkflowInput](../../../../types/core_flows.DeleteCustomerAddressesWorkflowInput/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"ids","type":"`string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="deleteCustomerAddressesWorkflow"/>
|
||||
|
||||
## Hooks
|
||||
|
||||
### addressesDeleted
|
||||
|
||||
#### Example
|
||||
|
||||
```ts
|
||||
import { deleteCustomerAddressesWorkflow } from "@medusajs/core-flows"
|
||||
|
||||
deleteCustomerAddressesWorkflow.hooks.addressesDeleted(
|
||||
async (({ ids }, { container }) => {
|
||||
//TODO
|
||||
})
|
||||
)
|
||||
```
|
||||
|
||||
#### Input
|
||||
|
||||
Handlers consuming this hook accept the following input.
|
||||
|
||||
<TypeList types={[{"name":"input","type":"object","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"ids","type":"`string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="addressesDeleted"/>
|
||||
@@ -0,0 +1,42 @@
|
||||
---
|
||||
slug: /references/medusa-workflows/deleteCustomersWorkflow
|
||||
sidebar_label: deleteCustomersWorkflow
|
||||
---
|
||||
|
||||
import { TypeList, WorkflowDiagram } from "docs-ui"
|
||||
|
||||
# deleteCustomersWorkflow - Medusa Workflows API Reference
|
||||
|
||||
This documentation provides a reference to the `deleteCustomersWorkflow`. It belongs to the `@medusajs/core-flows` package.
|
||||
|
||||
This workflow deletes one or more customers.
|
||||
|
||||
## Steps
|
||||
|
||||
<WorkflowDiagram workflow={{"name":"deleteCustomersWorkflow","steps":[{"type":"step","name":"deleteCustomersStep","description":"This step deletes one or more customers.","link":"../../../../core_flows.Steps_Customer/page.mdx#deletecustomersstep","depth":1},{"type":"hook","name":"customersDeleted","description":"This step is a hook that you can inject custom functionality into.\n\n","link":"#customersDeleted","depth":2}]}} />
|
||||
|
||||
## Input
|
||||
|
||||
<TypeList types={[{"name":"DeleteCustomersWorkflowInput","type":"[DeleteCustomersWorkflowInput](../../../../types/core_flows.DeleteCustomersWorkflowInput/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"ids","type":"`string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="deleteCustomersWorkflow"/>
|
||||
|
||||
## Hooks
|
||||
|
||||
### customersDeleted
|
||||
|
||||
#### Example
|
||||
|
||||
```ts
|
||||
import { deleteCustomersWorkflow } from "@medusajs/core-flows"
|
||||
|
||||
deleteCustomersWorkflow.hooks.customersDeleted(
|
||||
async (({ ids }, { container }) => {
|
||||
//TODO
|
||||
})
|
||||
)
|
||||
```
|
||||
|
||||
#### Input
|
||||
|
||||
Handlers consuming this hook accept the following input.
|
||||
|
||||
<TypeList types={[{"name":"input","type":"object","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"ids","type":"`string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="customersDeleted"/>
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1,5 @@
|
||||
import { TypeList, WorkflowDiagram } from "docs-ui"
|
||||
|
||||
# createCustomerAccountWorkflowId
|
||||
|
||||
`Const` **createCustomerAccountWorkflowId**: `"create-customer-account"`
|
||||
@@ -0,0 +1,5 @@
|
||||
import { TypeList, WorkflowDiagram } from "docs-ui"
|
||||
|
||||
# createCustomerAddressesWorkflowId
|
||||
|
||||
`Const` **createCustomerAddressesWorkflowId**: `"create-customer-addresses"`
|
||||
@@ -0,0 +1,5 @@
|
||||
import { TypeList, WorkflowDiagram } from "docs-ui"
|
||||
|
||||
# createCustomersWorkflowId
|
||||
|
||||
`Const` **createCustomersWorkflowId**: `"create-customers"`
|
||||
@@ -0,0 +1,5 @@
|
||||
import { TypeList, WorkflowDiagram } from "docs-ui"
|
||||
|
||||
# deleteCustomerAddressesWorkflowId
|
||||
|
||||
`Const` **deleteCustomerAddressesWorkflowId**: `"delete-customer-addresses"`
|
||||
@@ -0,0 +1,5 @@
|
||||
import { TypeList, WorkflowDiagram } from "docs-ui"
|
||||
|
||||
# deleteCustomersWorkflowId
|
||||
|
||||
`Const` **deleteCustomersWorkflowId**: `"delete-customers"`
|
||||
@@ -0,0 +1,5 @@
|
||||
import { TypeList, WorkflowDiagram } from "docs-ui"
|
||||
|
||||
# updateCustomerAddressesWorkflowId
|
||||
|
||||
`Const` **updateCustomerAddressesWorkflowId**: `"update-customer-addresses"`
|
||||
@@ -0,0 +1,5 @@
|
||||
import { TypeList, WorkflowDiagram } from "docs-ui"
|
||||
|
||||
# updateCustomersWorkflowId
|
||||
|
||||
`Const` **updateCustomersWorkflowId**: `"update-customers"`
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1,20 @@
|
||||
---
|
||||
slug: /references/medusa-workflows/steps/createCustomerGroupsStep
|
||||
sidebar_label: createCustomerGroupsStep
|
||||
---
|
||||
|
||||
import { TypeList, WorkflowDiagram } from "docs-ui"
|
||||
|
||||
# createCustomerGroupsStep - Medusa Workflows API Reference
|
||||
|
||||
This documentation provides a reference to the `createCustomerGroupsStep`. It belongs to the `@medusajs/core-flows` package.
|
||||
|
||||
This step creates one or more customer groups.
|
||||
|
||||
## Input
|
||||
|
||||
<TypeList types={[{"name":"CreateCustomerGroupDTO[]","type":"[CreateCustomerGroupDTO](../../../../../customer/interfaces/customer.CreateCustomerGroupDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"CreateCustomerGroupDTO","type":"[CreateCustomerGroupDTO](../../../../../customer/interfaces/customer.CreateCustomerGroupDTO/page.mdx)","optional":false,"defaultValue":"","description":"The customer group to be created.","expandable":false,"children":[{"name":"name","type":"`string`","description":"The name of the customer group.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"[MetadataType](../../../../../customer/types/customer.MetadataType/page.mdx)","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"`string`","description":"Who created the customer group. For example,\nthe ID of the user that created the customer group.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createCustomerGroupsStep"/>
|
||||
|
||||
## Output
|
||||
|
||||
<TypeList types={[{"name":"CustomerGroupDTO[]","type":"[CustomerGroupDTO](../../../../../customer/interfaces/customer.CustomerGroupDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"CustomerGroupDTO","type":"[CustomerGroupDTO](../../../../../customer/interfaces/customer.CustomerGroupDTO/page.mdx)","optional":false,"defaultValue":"","description":"The customer group details.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the customer group.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name of the customer group.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customers","type":"Partial<[CustomerDTO](../../../../../customer/interfaces/customer.CustomerDTO/page.mdx)>[]","description":"The customers of the customer group.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the customer.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`string`","description":"The email of the customer.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"has_account","type":"`boolean`","description":"A flag indicating if customer has an account or not.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"default_billing_address_id","type":"`null` \\| `string`","description":"The associated default billing address's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"default_shipping_address_id","type":"`null` \\| `string`","description":"The associated default shipping address's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"company_name","type":"`null` \\| `string`","description":"The company name of the customer.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"first_name","type":"`null` \\| `string`","description":"The first name of the customer.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`null` \\| `string`","description":"The last name of the customer.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"addresses","type":"[CustomerAddressDTO](../../../../../customer/interfaces/customer.CustomerAddressDTO/page.mdx)[]","description":"The addresses of the customer.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"phone","type":"`null` \\| `string`","description":"The phone of the customer.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"groups","type":"`object`[]","description":"The groups of the customer.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"`null` \\| `string`","description":"Who created the customer.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `string` \\| `Date`","description":"The deletion date of the customer.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The creation date of the customer.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The update date of the customer.","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"metadata","type":"`Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"`null` \\| `string`","description":"Who created the customer group.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `string` \\| `Date`","description":"The deletion date of the customer group.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The creation date of the customer group.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The update date of the customer group.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createCustomerGroupsStep"/>
|
||||
@@ -0,0 +1,16 @@
|
||||
---
|
||||
slug: /references/medusa-workflows/steps/deleteCustomerGroupStep
|
||||
sidebar_label: deleteCustomerGroupStep
|
||||
---
|
||||
|
||||
import { TypeList, WorkflowDiagram } from "docs-ui"
|
||||
|
||||
# deleteCustomerGroupStep - Medusa Workflows API Reference
|
||||
|
||||
This documentation provides a reference to the `deleteCustomerGroupStep`. It belongs to the `@medusajs/core-flows` package.
|
||||
|
||||
This step deletes one or more customer groups.
|
||||
|
||||
## Input
|
||||
|
||||
<TypeList types={[{"name":"string[]","type":"`string`[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"string","type":"`string`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="deleteCustomerGroupStep"/>
|
||||
@@ -0,0 +1,16 @@
|
||||
---
|
||||
slug: /references/medusa-workflows/steps/linkCustomersToCustomerGroupStep
|
||||
sidebar_label: linkCustomersToCustomerGroupStep
|
||||
---
|
||||
|
||||
import { TypeList, WorkflowDiagram } from "docs-ui"
|
||||
|
||||
# linkCustomersToCustomerGroupStep - Medusa Workflows API Reference
|
||||
|
||||
This documentation provides a reference to the `linkCustomersToCustomerGroupStep`. It belongs to the `@medusajs/core-flows` package.
|
||||
|
||||
This step creates one or more links between customer and customer group records.
|
||||
|
||||
## Input
|
||||
|
||||
<TypeList types={[{"name":"LinkWorkflowInput","type":"[LinkWorkflowInput](../../../../../types/CommonTypes/types/types.CommonTypes.LinkWorkflowInput/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"add","type":"`string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"remove","type":"`string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="linkCustomersToCustomerGroupStep"/>
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,5 @@
|
||||
import { TypeList, WorkflowDiagram } from "docs-ui"
|
||||
|
||||
# createCustomerGroupsStepId
|
||||
|
||||
`Const` **createCustomerGroupsStepId**: `"create-customer-groups"`
|
||||
@@ -0,0 +1,5 @@
|
||||
import { TypeList, WorkflowDiagram } from "docs-ui"
|
||||
|
||||
# deleteCustomerGroupStepId
|
||||
|
||||
`Const` **deleteCustomerGroupStepId**: `"delete-customer-groups"`
|
||||
@@ -0,0 +1,5 @@
|
||||
import { TypeList, WorkflowDiagram } from "docs-ui"
|
||||
|
||||
# linkCustomersToCustomerGroupStepId
|
||||
|
||||
`Const` **linkCustomersToCustomerGroupStepId**: `"link-customers-to-customer-group"`
|
||||
@@ -0,0 +1,5 @@
|
||||
import { TypeList, WorkflowDiagram } from "docs-ui"
|
||||
|
||||
# updateCustomerGroupStepId
|
||||
|
||||
`Const` **updateCustomerGroupStepId**: `"update-customer-groups"`
|
||||
@@ -0,0 +1,24 @@
|
||||
---
|
||||
slug: /references/medusa-workflows/createCustomerGroupsWorkflow
|
||||
sidebar_label: createCustomerGroupsWorkflow
|
||||
---
|
||||
|
||||
import { TypeList, WorkflowDiagram } from "docs-ui"
|
||||
|
||||
# createCustomerGroupsWorkflow - Medusa Workflows API Reference
|
||||
|
||||
This documentation provides a reference to the `createCustomerGroupsWorkflow`. It belongs to the `@medusajs/core-flows` package.
|
||||
|
||||
This workflow creates one or more customer groups.
|
||||
|
||||
## Steps
|
||||
|
||||
<WorkflowDiagram workflow={{"name":"createCustomerGroupsWorkflow","steps":[{"type":"step","name":"createCustomerGroupsStep","description":"This step creates one or more customer groups.","link":"../../../../core_flows.Steps_Customer_Group/page.mdx#createcustomergroupsstep","depth":1}]}} />
|
||||
|
||||
## Input
|
||||
|
||||
<TypeList types={[{"name":"CreateCustomerGroupsWorkflowInput","type":"[CreateCustomerGroupsWorkflowInput](../../../../types/core_flows.CreateCustomerGroupsWorkflowInput/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"customersData","type":"[CreateCustomerGroupDTO](../../../../../customer/interfaces/customer.CreateCustomerGroupDTO/page.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"name","type":"`string`","description":"The name of the customer group.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"[MetadataType](../../../../../customer/types/customer.MetadataType/page.mdx)","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"`string`","description":"Who created the customer group. For example,\nthe ID of the user that created the customer group.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createCustomerGroupsWorkflow"/>
|
||||
|
||||
## Output
|
||||
|
||||
<TypeList types={[{"name":"CustomerGroupDTO[]","type":"[CustomerGroupDTO](../../../../../customer/interfaces/customer.CustomerGroupDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"CustomerGroupDTO","type":"[CustomerGroupDTO](../../../../../customer/interfaces/customer.CustomerGroupDTO/page.mdx)","optional":false,"defaultValue":"","description":"The customer group details.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the customer group.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name of the customer group.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customers","type":"Partial<[CustomerDTO](../../../../../customer/interfaces/customer.CustomerDTO/page.mdx)>[]","description":"The customers of the customer group.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the customer.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`string`","description":"The email of the customer.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"has_account","type":"`boolean`","description":"A flag indicating if customer has an account or not.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"default_billing_address_id","type":"`null` \\| `string`","description":"The associated default billing address's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"default_shipping_address_id","type":"`null` \\| `string`","description":"The associated default shipping address's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"company_name","type":"`null` \\| `string`","description":"The company name of the customer.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"first_name","type":"`null` \\| `string`","description":"The first name of the customer.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`null` \\| `string`","description":"The last name of the customer.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"addresses","type":"[CustomerAddressDTO](../../../../../customer/interfaces/customer.CustomerAddressDTO/page.mdx)[]","description":"The addresses of the customer.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"phone","type":"`null` \\| `string`","description":"The phone of the customer.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"groups","type":"`object`[]","description":"The groups of the customer.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"`null` \\| `string`","description":"Who created the customer.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `string` \\| `Date`","description":"The deletion date of the customer.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The creation date of the customer.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The update date of the customer.","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"metadata","type":"`Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"`null` \\| `string`","description":"Who created the customer group.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `string` \\| `Date`","description":"The deletion date of the customer group.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The creation date of the customer group.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The update date of the customer group.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createCustomerGroupsWorkflow"/>
|
||||
@@ -0,0 +1,20 @@
|
||||
---
|
||||
slug: /references/medusa-workflows/deleteCustomerGroupsWorkflow
|
||||
sidebar_label: deleteCustomerGroupsWorkflow
|
||||
---
|
||||
|
||||
import { TypeList, WorkflowDiagram } from "docs-ui"
|
||||
|
||||
# deleteCustomerGroupsWorkflow - Medusa Workflows API Reference
|
||||
|
||||
This documentation provides a reference to the `deleteCustomerGroupsWorkflow`. It belongs to the `@medusajs/core-flows` package.
|
||||
|
||||
This workflow deletes one or more customer groups.
|
||||
|
||||
## Steps
|
||||
|
||||
<WorkflowDiagram workflow={{"name":"deleteCustomerGroupsWorkflow","steps":[{"type":"step","name":"deleteCustomerGroupStep","description":"This step deletes one or more customer groups.","link":"../../../../core_flows.Steps_Customer_Group/page.mdx#deletecustomergroupstep","depth":1}]}} />
|
||||
|
||||
## Input
|
||||
|
||||
<TypeList types={[{"name":"DeleteCustomerGroupsWorkflowInput","type":"[DeleteCustomerGroupsWorkflowInput](../../../../types/core_flows.DeleteCustomerGroupsWorkflowInput/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"ids","type":"`string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="deleteCustomerGroupsWorkflow"/>
|
||||
@@ -0,0 +1,20 @@
|
||||
---
|
||||
slug: /references/medusa-workflows/linkCustomersToCustomerGroupWorkflow
|
||||
sidebar_label: linkCustomersToCustomerGroupWorkflow
|
||||
---
|
||||
|
||||
import { TypeList, WorkflowDiagram } from "docs-ui"
|
||||
|
||||
# linkCustomersToCustomerGroupWorkflow - Medusa Workflows API Reference
|
||||
|
||||
This documentation provides a reference to the `linkCustomersToCustomerGroupWorkflow`. It belongs to the `@medusajs/core-flows` package.
|
||||
|
||||
This workflow creates one or more links between customer and customer group records.
|
||||
|
||||
## Steps
|
||||
|
||||
<WorkflowDiagram workflow={{"name":"linkCustomersToCustomerGroupWorkflow","steps":[{"type":"step","name":"linkCustomersToCustomerGroupStep","description":"This step creates one or more links between customer and customer group records.","link":"../../../../core_flows.Steps_Customer_Group/page.mdx#linkcustomerstocustomergroupstep","depth":1}]}} />
|
||||
|
||||
## Input
|
||||
|
||||
<TypeList types={[{"name":"LinkWorkflowInput","type":"[LinkWorkflowInput](../../../../../types/CommonTypes/types/types.CommonTypes.LinkWorkflowInput/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"add","type":"`string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"remove","type":"`string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="linkCustomersToCustomerGroupWorkflow"/>
|
||||
File diff suppressed because one or more lines are too long
@@ -0,0 +1,5 @@
|
||||
import { TypeList, WorkflowDiagram } from "docs-ui"
|
||||
|
||||
# createCustomerGroupsWorkflowId
|
||||
|
||||
`Const` **createCustomerGroupsWorkflowId**: `"create-customer-groups"`
|
||||
@@ -0,0 +1,5 @@
|
||||
import { TypeList, WorkflowDiagram } from "docs-ui"
|
||||
|
||||
# deleteCustomerGroupsWorkflowId
|
||||
|
||||
`Const` **deleteCustomerGroupsWorkflowId**: `"delete-customer-groups"`
|
||||
@@ -0,0 +1,5 @@
|
||||
import { TypeList, WorkflowDiagram } from "docs-ui"
|
||||
|
||||
# linkCustomersToCustomerGroupWorkflowId
|
||||
|
||||
`Const` **linkCustomersToCustomerGroupWorkflowId**: `"link-customers-to-customer-group"`
|
||||
@@ -0,0 +1,5 @@
|
||||
import { TypeList, WorkflowDiagram } from "docs-ui"
|
||||
|
||||
# updateCustomerGroupsWorkflowId
|
||||
|
||||
`Const` **updateCustomerGroupsWorkflowId**: `"update-customer-groups"`
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -0,0 +1,20 @@
|
||||
---
|
||||
slug: /references/medusa-workflows/steps/createDefaultStoreStep
|
||||
sidebar_label: createDefaultStoreStep
|
||||
---
|
||||
|
||||
import { TypeList, WorkflowDiagram } from "docs-ui"
|
||||
|
||||
# createDefaultStoreStep - Medusa Workflows API Reference
|
||||
|
||||
This documentation provides a reference to the `createDefaultStoreStep`. It belongs to the `@medusajs/core-flows` package.
|
||||
|
||||
This step creates a default store.
|
||||
|
||||
## Input
|
||||
|
||||
<TypeList types={[{"name":"CreateDefaultStoreStepInput","type":"`CreateDefaultStoreStepInput`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createDefaultStoreStep"/>
|
||||
|
||||
## Output
|
||||
|
||||
<TypeList types={[{"name":"StoreDTO","type":"[StoreDTO](../../../../../store/interfaces/store.StoreDTO/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the store.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name of the store.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, any>`","description":"Holds custom data in key-value pairs.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string`","description":"The created at of the store.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string`","description":"The updated at of the store.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"supported_currencies","type":"[StoreCurrencyDTO](../../../../../store/interfaces/store.StoreCurrencyDTO/page.mdx)[]","description":"The supported currency codes of the store.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the store currency.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The currency code of the store currency.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_default","type":"`boolean`","description":"Whether the currency is the default one for the store.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"store_id","type":"`string`","description":"The store ID associated with the currency.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string`","description":"The created date of the currency","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string`","description":"The updated date of the currency","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `string`","description":"The deleted date of the currency","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"default_sales_channel_id","type":"`string`","description":"The associated default sales channel's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"default_region_id","type":"`string`","description":"The associated default region's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"default_location_id","type":"`string`","description":"The associated default location's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createDefaultStoreStep"/>
|
||||
@@ -0,0 +1,5 @@
|
||||
import { TypeList, WorkflowDiagram } from "docs-ui"
|
||||
|
||||
# createDefaultStoreStepId
|
||||
|
||||
`Const` **createDefaultStoreStepId**: `"create-default-store"`
|
||||
@@ -0,0 +1,20 @@
|
||||
---
|
||||
slug: /references/medusa-workflows/createDefaultsWorkflow
|
||||
sidebar_label: createDefaultsWorkflow
|
||||
---
|
||||
|
||||
import { TypeList, WorkflowDiagram } from "docs-ui"
|
||||
|
||||
# createDefaultsWorkflow - Medusa Workflows API Reference
|
||||
|
||||
This documentation provides a reference to the `createDefaultsWorkflow`. It belongs to the `@medusajs/core-flows` package.
|
||||
|
||||
This workflow creates default data for a Medusa application.
|
||||
|
||||
## Steps
|
||||
|
||||
<WorkflowDiagram workflow={{"name":"createDefaultsWorkflow","steps":[{"type":"step","name":"createDefaultSalesChannelStep","description":"This step creates a default sales channel.","link":"../../../../core_flows.Steps_Sales_Channel/page.mdx#createdefaultsaleschannelstep","depth":1},{"type":"step","name":"createDefaultStoreStep","description":"This step creates a default store.","link":"../../../../core_flows.Steps_Defaults/page.mdx#createdefaultstorestep","depth":2}]}} />
|
||||
|
||||
## Output
|
||||
|
||||
<TypeList types={[{"name":"undefined \\| StoreDTO","type":"`undefined` \\| [StoreDTO](../../../../../store/interfaces/store.StoreDTO/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"undefined \\| StoreDTO","type":"`undefined` \\| [StoreDTO](../../../../../store/interfaces/store.StoreDTO/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createDefaultsWorkflow"/>
|
||||
@@ -0,0 +1,5 @@
|
||||
import { TypeList, WorkflowDiagram } from "docs-ui"
|
||||
|
||||
# createDefaultsWorkflowID
|
||||
|
||||
`Const` **createDefaultsWorkflowID**: `"create-defaults"`
|
||||
@@ -0,0 +1,15 @@
|
||||
import { TypeList, WorkflowDiagram } from "docs-ui"
|
||||
|
||||
# Steps\_Defaults
|
||||
|
||||
## createDefaultStoreStep
|
||||
|
||||
This step creates a default store.
|
||||
|
||||
### Input
|
||||
|
||||
<TypeList types={[{"name":"CreateDefaultStoreStepInput","type":"`CreateDefaultStoreStepInput`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createDefaultStoreStep"/>
|
||||
|
||||
### Output
|
||||
|
||||
<TypeList types={[{"name":"StoreDTO","type":"[StoreDTO](../../../store/interfaces/store.StoreDTO/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the store.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name of the store.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, any>`","description":"Holds custom data in key-value pairs.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string`","description":"The created at of the store.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string`","description":"The updated at of the store.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"supported_currencies","type":"[StoreCurrencyDTO](../../../store/interfaces/store.StoreCurrencyDTO/page.mdx)[]","description":"The supported currency codes of the store.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the store currency.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The currency code of the store currency.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_default","type":"`boolean`","description":"Whether the currency is the default one for the store.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"store_id","type":"`string`","description":"The store ID associated with the currency.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string`","description":"The created date of the currency","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string`","description":"The updated date of the currency","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `string`","description":"The deleted date of the currency","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"default_sales_channel_id","type":"`string`","description":"The associated default sales channel's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"default_region_id","type":"`string`","description":"The associated default region's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"default_location_id","type":"`string`","description":"The associated default location's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createDefaultStoreStep"/>
|
||||
@@ -0,0 +1,15 @@
|
||||
import { TypeList, WorkflowDiagram } from "docs-ui"
|
||||
|
||||
# Workflows\_Defaults
|
||||
|
||||
## createDefaultsWorkflow
|
||||
|
||||
This workflow creates default data for a Medusa application.
|
||||
|
||||
### Steps
|
||||
|
||||
<WorkflowDiagram workflow={{"name":"createDefaultsWorkflow","steps":[{"type":"step","name":"createDefaultSalesChannelStep","description":"This step creates a default sales channel.","link":"../../core_flows.Steps_Sales_Channel/page.mdx#createdefaultsaleschannelstep","depth":1},{"type":"step","name":"createDefaultStoreStep","description":"This step creates a default store.","link":"../../core_flows.Steps_Defaults/page.mdx#createdefaultstorestep","depth":2}]}} />
|
||||
|
||||
### Output
|
||||
|
||||
<TypeList types={[{"name":"undefined \\| StoreDTO","type":"`undefined` \\| [StoreDTO](../../../store/interfaces/store.StoreDTO/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"undefined \\| StoreDTO","type":"`undefined` \\| [StoreDTO](../../../store/interfaces/store.StoreDTO/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createDefaultsWorkflow"/>
|
||||
@@ -0,0 +1,16 @@
|
||||
---
|
||||
slug: /references/medusa-workflows/steps/deleteFilesStep
|
||||
sidebar_label: deleteFilesStep
|
||||
---
|
||||
|
||||
import { TypeList, WorkflowDiagram } from "docs-ui"
|
||||
|
||||
# deleteFilesStep - Medusa Workflows API Reference
|
||||
|
||||
This documentation provides a reference to the `deleteFilesStep`. It belongs to the `@medusajs/core-flows` package.
|
||||
|
||||
This step deletes one or more files.
|
||||
|
||||
## Input
|
||||
|
||||
<TypeList types={[{"name":"string[]","type":"`string`[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"string","type":"`string`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="deleteFilesStep"/>
|
||||
@@ -0,0 +1,20 @@
|
||||
---
|
||||
slug: /references/medusa-workflows/steps/uploadFilesStep
|
||||
sidebar_label: uploadFilesStep
|
||||
---
|
||||
|
||||
import { TypeList, WorkflowDiagram } from "docs-ui"
|
||||
|
||||
# uploadFilesStep - Medusa Workflows API Reference
|
||||
|
||||
This documentation provides a reference to the `uploadFilesStep`. It belongs to the `@medusajs/core-flows` package.
|
||||
|
||||
This step uploads one or more files.
|
||||
|
||||
## Input
|
||||
|
||||
<TypeList types={[{"name":"UploadFilesStepInput","type":"[UploadFilesStepInput](../../../../types/core_flows.UploadFilesStepInput/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"files","type":"`object`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"filename","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"mimeType","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"content","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"access","type":"`\"public\"` \\| `\"private\"`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="uploadFilesStep"/>
|
||||
|
||||
## Output
|
||||
|
||||
<TypeList types={[{"name":"FileDTO[]","type":"[FileDTO](../../../../../types/FileTypes/interfaces/types.FileTypes.FileDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"FileDTO","type":"[FileDTO](../../../../../types/FileTypes/interfaces/types.FileTypes.FileDTO/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the File.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"url","type":"`string`","description":"The URL of the File.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="uploadFilesStep"/>
|
||||
@@ -0,0 +1,5 @@
|
||||
import { TypeList, WorkflowDiagram } from "docs-ui"
|
||||
|
||||
# deleteFilesStepId
|
||||
|
||||
`Const` **deleteFilesStepId**: `"delete-files"`
|
||||
@@ -0,0 +1,5 @@
|
||||
import { TypeList, WorkflowDiagram } from "docs-ui"
|
||||
|
||||
# uploadFilesStepId
|
||||
|
||||
`Const` **uploadFilesStepId**: `"upload-files"`
|
||||
@@ -0,0 +1,20 @@
|
||||
---
|
||||
slug: /references/medusa-workflows/deleteFilesWorkflow
|
||||
sidebar_label: deleteFilesWorkflow
|
||||
---
|
||||
|
||||
import { TypeList, WorkflowDiagram } from "docs-ui"
|
||||
|
||||
# deleteFilesWorkflow - Medusa Workflows API Reference
|
||||
|
||||
This documentation provides a reference to the `deleteFilesWorkflow`. It belongs to the `@medusajs/core-flows` package.
|
||||
|
||||
This workflow deletes one or more files.
|
||||
|
||||
## Steps
|
||||
|
||||
<WorkflowDiagram workflow={{"name":"deleteFilesWorkflow","steps":[{"type":"step","name":"deleteFilesStep","description":"This step deletes one or more files.","link":"../../../../core_flows.Steps_File/page.mdx#deletefilesstep","depth":1}]}} />
|
||||
|
||||
## Input
|
||||
|
||||
<TypeList types={[{"name":"DeleteFilesWorkflowInput","type":"[DeleteFilesWorkflowInput](../../../../types/core_flows.DeleteFilesWorkflowInput/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"ids","type":"`string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="deleteFilesWorkflow"/>
|
||||
@@ -0,0 +1,24 @@
|
||||
---
|
||||
slug: /references/medusa-workflows/uploadFilesWorkflow
|
||||
sidebar_label: uploadFilesWorkflow
|
||||
---
|
||||
|
||||
import { TypeList, WorkflowDiagram } from "docs-ui"
|
||||
|
||||
# uploadFilesWorkflow - Medusa Workflows API Reference
|
||||
|
||||
This documentation provides a reference to the `uploadFilesWorkflow`. It belongs to the `@medusajs/core-flows` package.
|
||||
|
||||
This workflow uploads one or more files.
|
||||
|
||||
## Steps
|
||||
|
||||
<WorkflowDiagram workflow={{"name":"uploadFilesWorkflow","steps":[{"type":"step","name":"uploadFilesStep","description":"This step uploads one or more files.","link":"../../../../core_flows.Steps_File/page.mdx#uploadfilesstep","depth":1}]}} />
|
||||
|
||||
## Input
|
||||
|
||||
<TypeList types={[{"name":"UploadFilesWorkflowInput","type":"[UploadFilesWorkflowInput](../../../../types/core_flows.UploadFilesWorkflowInput/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"files","type":"`object`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"filename","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"mimeType","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"content","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"access","type":"`\"public\"` \\| `\"private\"`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="uploadFilesWorkflow"/>
|
||||
|
||||
## Output
|
||||
|
||||
<TypeList types={[{"name":"FileDTO[]","type":"[FileDTO](../../../../../types/FileTypes/interfaces/types.FileTypes.FileDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"FileDTO","type":"[FileDTO](../../../../../types/FileTypes/interfaces/types.FileTypes.FileDTO/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the File.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"url","type":"`string`","description":"The URL of the File.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="uploadFilesWorkflow"/>
|
||||
@@ -0,0 +1,5 @@
|
||||
import { TypeList, WorkflowDiagram } from "docs-ui"
|
||||
|
||||
# deleteFilesWorkflowId
|
||||
|
||||
`Const` **deleteFilesWorkflowId**: `"delete-files"`
|
||||
@@ -0,0 +1,5 @@
|
||||
import { TypeList, WorkflowDiagram } from "docs-ui"
|
||||
|
||||
# uploadFilesWorkflowId
|
||||
|
||||
`Const` **uploadFilesWorkflowId**: `"upload-files"`
|
||||
@@ -0,0 +1,25 @@
|
||||
import { TypeList, WorkflowDiagram } from "docs-ui"
|
||||
|
||||
# Steps\_File
|
||||
|
||||
## deleteFilesStep
|
||||
|
||||
This step deletes one or more files.
|
||||
|
||||
### Input
|
||||
|
||||
<TypeList types={[{"name":"string[]","type":"`string`[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"string","type":"`string`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="deleteFilesStep"/>
|
||||
|
||||
___
|
||||
|
||||
## uploadFilesStep
|
||||
|
||||
This step uploads one or more files.
|
||||
|
||||
### Input
|
||||
|
||||
<TypeList types={[{"name":"UploadFilesStepInput","type":"[UploadFilesStepInput](../../types/core_flows.UploadFilesStepInput/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"files","type":"`object`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"filename","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"mimeType","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"content","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"access","type":"`\"public\"` \\| `\"private\"`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="uploadFilesStep"/>
|
||||
|
||||
### Output
|
||||
|
||||
<TypeList types={[{"name":"FileDTO[]","type":"[FileDTO](../../../types/FileTypes/interfaces/types.FileTypes.FileDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"FileDTO","type":"[FileDTO](../../../types/FileTypes/interfaces/types.FileTypes.FileDTO/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the File.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"url","type":"`string`","description":"The URL of the File.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="uploadFilesStep"/>
|
||||
@@ -0,0 +1,33 @@
|
||||
import { TypeList, WorkflowDiagram } from "docs-ui"
|
||||
|
||||
# Workflows\_File
|
||||
|
||||
## deleteFilesWorkflow
|
||||
|
||||
This workflow deletes one or more files.
|
||||
|
||||
### Steps
|
||||
|
||||
<WorkflowDiagram workflow={{"name":"deleteFilesWorkflow","steps":[{"type":"step","name":"deleteFilesStep","description":"This step deletes one or more files.","link":"../../core_flows.Steps_File/page.mdx#deletefilesstep","depth":1}]}} />
|
||||
|
||||
### Input
|
||||
|
||||
<TypeList types={[{"name":"DeleteFilesWorkflowInput","type":"[DeleteFilesWorkflowInput](../../types/core_flows.DeleteFilesWorkflowInput/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"ids","type":"`string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="deleteFilesWorkflow"/>
|
||||
|
||||
___
|
||||
|
||||
## uploadFilesWorkflow
|
||||
|
||||
This workflow uploads one or more files.
|
||||
|
||||
### Steps
|
||||
|
||||
<WorkflowDiagram workflow={{"name":"uploadFilesWorkflow","steps":[{"type":"step","name":"uploadFilesStep","description":"This step uploads one or more files.","link":"../../core_flows.Steps_File/page.mdx#uploadfilesstep","depth":1}]}} />
|
||||
|
||||
### Input
|
||||
|
||||
<TypeList types={[{"name":"UploadFilesWorkflowInput","type":"[UploadFilesWorkflowInput](../../types/core_flows.UploadFilesWorkflowInput/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"files","type":"`object`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"filename","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"mimeType","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"content","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"access","type":"`\"public\"` \\| `\"private\"`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="uploadFilesWorkflow"/>
|
||||
|
||||
### Output
|
||||
|
||||
<TypeList types={[{"name":"FileDTO[]","type":"[FileDTO](../../../types/FileTypes/interfaces/types.FileTypes.FileDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"FileDTO","type":"[FileDTO](../../../types/FileTypes/interfaces/types.FileTypes.FileDTO/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the File.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"url","type":"`string`","description":"The URL of the File.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="uploadFilesWorkflow"/>
|
||||
@@ -0,0 +1,8 @@
|
||||
import { TypeList, WorkflowDiagram } from "docs-ui"
|
||||
|
||||
# Common
|
||||
|
||||
## Namespaces
|
||||
|
||||
- [Steps\_Common](../core_flows.Steps_Common/page.mdx)
|
||||
- [Workflows\_Common](../core_flows.Workflows_Common/page.mdx)
|
||||
@@ -0,0 +1,8 @@
|
||||
import { TypeList, WorkflowDiagram } from "docs-ui"
|
||||
|
||||
# Customer
|
||||
|
||||
## Namespaces
|
||||
|
||||
- [Steps\_Customer](../core_flows.Steps_Customer/page.mdx)
|
||||
- [Workflows\_Customer](../core_flows.Workflows_Customer/page.mdx)
|
||||
@@ -0,0 +1,8 @@
|
||||
import { TypeList, WorkflowDiagram } from "docs-ui"
|
||||
|
||||
# Customer Group
|
||||
|
||||
## Namespaces
|
||||
|
||||
- [Steps\_Customer Group](../core_flows.Steps_Customer_Group/page.mdx)
|
||||
- [Workflows\_Customer Group](../core_flows.Workflows_Customer_Group/page.mdx)
|
||||
@@ -0,0 +1,8 @@
|
||||
import { TypeList, WorkflowDiagram } from "docs-ui"
|
||||
|
||||
# Defaults
|
||||
|
||||
## Namespaces
|
||||
|
||||
- [Steps\_Defaults](../core_flows.Steps_Defaults/page.mdx)
|
||||
- [Workflows\_Defaults](../core_flows.Workflows_Defaults/page.mdx)
|
||||
@@ -0,0 +1,8 @@
|
||||
import { TypeList, WorkflowDiagram } from "docs-ui"
|
||||
|
||||
# File
|
||||
|
||||
## Namespaces
|
||||
|
||||
- [Steps\_File](../core_flows.Steps_File/page.mdx)
|
||||
- [Workflows\_File](../core_flows.Workflows_File/page.mdx)
|
||||
Reference in New Issue
Block a user