docs: [12/n] generate core-flows reference (#8793)

This commit is contained in:
Shahed Nasser
2024-08-27 12:23:32 +03:00
committed by GitHub
parent d4aaf70667
commit 8553cd6427
93 changed files with 1948 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
---
slug: /references/medusa-workflows/steps/addCampaignPromotionsStep
sidebar_label: addCampaignPromotionsStep
---
import { TypeList, WorkflowDiagram } from "docs-ui"
# addCampaignPromotionsStep - Medusa Workflows API Reference
This documentation provides a reference to the `addCampaignPromotionsStep`. It belongs to the `@medusajs/core-flows` package.
This step adds promotions to a campaign.
## Input
<TypeList types={[{"name":"","type":"","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"","type":"","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="addCampaignPromotionsStep"/>

View File

@@ -0,0 +1,20 @@
---
slug: /references/medusa-workflows/steps/addRulesToPromotionsStep
sidebar_label: addRulesToPromotionsStep
---
import { TypeList, WorkflowDiagram } from "docs-ui"
# addRulesToPromotionsStep - Medusa Workflows API Reference
This documentation provides a reference to the `addRulesToPromotionsStep`. It belongs to the `@medusajs/core-flows` package.
This step adds rules to a promotion.
## Input
<TypeList types={[{"name":"AddPromotionRulesWorkflowDTO","type":"`AddPromotionRulesWorkflowDTO`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="addRulesToPromotionsStep"/>
## Output
<TypeList types={[{"name":"PromotionRuleDTO[]","type":"[PromotionRuleDTO](../../../../../promotion/interfaces/promotion.PromotionRuleDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"PromotionRuleDTO","type":"[PromotionRuleDTO](../../../../../promotion/interfaces/promotion.PromotionRuleDTO/page.mdx)","optional":false,"defaultValue":"","description":"The promotion rule details.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the promotion rule.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"values","type":"[PromotionRuleValueDTO](../../../../../promotion/interfaces/promotion.PromotionRuleValueDTO/page.mdx)[]","description":"The values of the promotion rule.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the promotion rule value.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"value","type":"`string`","description":"The value of the promotion rule value.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"description","type":"`null` \\| `string`","description":"The description of the promotion rule.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"attribute","type":"`string`","description":"The attribute of the promotion rule.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"operator","type":"[PromotionRuleOperatorValues](../../../../../promotion/types/promotion.PromotionRuleOperatorValues/page.mdx)","description":"The operator of the promotion rule.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="addRulesToPromotionsStep"/>

View File

@@ -0,0 +1,16 @@
---
slug: /references/medusa-workflows/steps/deleteCampaignsStep
sidebar_label: deleteCampaignsStep
---
import { TypeList, WorkflowDiagram } from "docs-ui"
# deleteCampaignsStep - Medusa Workflows API Reference
This documentation provides a reference to the `deleteCampaignsStep`. It belongs to the `@medusajs/core-flows` package.
This step deletes one or more campaigns.
## 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="deleteCampaignsStep"/>

View File

@@ -0,0 +1,16 @@
---
slug: /references/medusa-workflows/steps/deletePromotionsStep
sidebar_label: deletePromotionsStep
---
import { TypeList, WorkflowDiagram } from "docs-ui"
# deletePromotionsStep - Medusa Workflows API Reference
This documentation provides a reference to the `deletePromotionsStep`. It belongs to the `@medusajs/core-flows` package.
This step deletes one or more promotions.
## 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="deletePromotionsStep"/>

View File

@@ -0,0 +1,16 @@
---
slug: /references/medusa-workflows/steps/removeCampaignPromotionsStep
sidebar_label: removeCampaignPromotionsStep
---
import { TypeList, WorkflowDiagram } from "docs-ui"
# removeCampaignPromotionsStep - Medusa Workflows API Reference
This documentation provides a reference to the `removeCampaignPromotionsStep`. It belongs to the `@medusajs/core-flows` package.
This step removes promotions from a campaigns.
## Input
<TypeList types={[{"name":"","type":"","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"","type":"","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="removeCampaignPromotionsStep"/>

View File

@@ -0,0 +1,16 @@
---
slug: /references/medusa-workflows/steps/removeRulesFromPromotionsStep
sidebar_label: removeRulesFromPromotionsStep
---
import { TypeList, WorkflowDiagram } from "docs-ui"
# removeRulesFromPromotionsStep - Medusa Workflows API Reference
This documentation provides a reference to the `removeRulesFromPromotionsStep`. It belongs to the `@medusajs/core-flows` package.
This step removes rules from a promotion.
## Input
<TypeList types={[{"name":"RemovePromotionRulesWorkflowDTO","type":"`RemovePromotionRulesWorkflowDTO`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="removeRulesFromPromotionsStep"/>

View File

@@ -0,0 +1,20 @@
---
slug: /references/medusa-workflows/steps/updatePromotionRulesStep
sidebar_label: updatePromotionRulesStep
---
import { TypeList, WorkflowDiagram } from "docs-ui"
# updatePromotionRulesStep - Medusa Workflows API Reference
This documentation provides a reference to the `updatePromotionRulesStep`. It belongs to the `@medusajs/core-flows` package.
This step updates one or more promotion rules.
## Input
<TypeList types={[{"name":"UpdatePromotionRulesWorkflowDTO","type":"`UpdatePromotionRulesWorkflowDTO`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updatePromotionRulesStep"/>
## Output
<TypeList types={[{"name":"PromotionRuleDTO[]","type":"[PromotionRuleDTO](../../../../../promotion/interfaces/promotion.PromotionRuleDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"PromotionRuleDTO","type":"[PromotionRuleDTO](../../../../../promotion/interfaces/promotion.PromotionRuleDTO/page.mdx)","optional":false,"defaultValue":"","description":"The promotion rule details.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the promotion rule.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"values","type":"[PromotionRuleValueDTO](../../../../../promotion/interfaces/promotion.PromotionRuleValueDTO/page.mdx)[]","description":"The values of the promotion rule.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the promotion rule value.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"value","type":"`string`","description":"The value of the promotion rule value.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"description","type":"`null` \\| `string`","description":"The description of the promotion rule.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"attribute","type":"`string`","description":"The attribute of the promotion rule.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"operator","type":"[PromotionRuleOperatorValues](../../../../../promotion/types/promotion.PromotionRuleOperatorValues/page.mdx)","description":"The operator of the promotion rule.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updatePromotionRulesStep"/>

View File

@@ -0,0 +1,5 @@
import { TypeList, WorkflowDiagram } from "docs-ui"
# addCampaignPromotionsStepId
`Const` **addCampaignPromotionsStepId**: `"add-campaign-promotions"`

View File

@@ -0,0 +1,5 @@
import { TypeList, WorkflowDiagram } from "docs-ui"
# addRulesToPromotionsStepId
`Const` **addRulesToPromotionsStepId**: `"add-rules-to-promotions"`

View File

@@ -0,0 +1,5 @@
import { TypeList, WorkflowDiagram } from "docs-ui"
# createCampaignsStepId
`Const` **createCampaignsStepId**: `"create-campaigns"`

View File

@@ -0,0 +1,5 @@
import { TypeList, WorkflowDiagram } from "docs-ui"
# createPromotionsStepId
`Const` **createPromotionsStepId**: `"create-promotions"`

View File

@@ -0,0 +1,5 @@
import { TypeList, WorkflowDiagram } from "docs-ui"
# deleteCampaignsStepId
`Const` **deleteCampaignsStepId**: `"delete-campaigns"`

View File

@@ -0,0 +1,5 @@
import { TypeList, WorkflowDiagram } from "docs-ui"
# deletePromotionsStepId
`Const` **deletePromotionsStepId**: `"delete-promotions"`

View File

@@ -0,0 +1,5 @@
import { TypeList, WorkflowDiagram } from "docs-ui"
# removeCampaignPromotionsStepId
`Const` **removeCampaignPromotionsStepId**: `"remove-campaign-promotions"`

View File

@@ -0,0 +1,5 @@
import { TypeList, WorkflowDiagram } from "docs-ui"
# removeRulesFromPromotionsStepId
`Const` **removeRulesFromPromotionsStepId**: `"remove-rules-from-promotions"`

View File

@@ -0,0 +1,5 @@
import { TypeList, WorkflowDiagram } from "docs-ui"
# updateCampaignsStepId
`Const` **updateCampaignsStepId**: `"update-campaigns"`

View File

@@ -0,0 +1,5 @@
import { TypeList, WorkflowDiagram } from "docs-ui"
# updatePromotionRulesStepId
`Const` **updatePromotionRulesStepId**: `"update-promotion-rules"`

View File

@@ -0,0 +1,5 @@
import { TypeList, WorkflowDiagram } from "docs-ui"
# updatePromotionsStepId
`Const` **updatePromotionsStepId**: `"update-promotions"`

View File

@@ -0,0 +1,20 @@
---
slug: /references/medusa-workflows/addOrRemoveCampaignPromotionsWorkflow
sidebar_label: addOrRemoveCampaignPromotionsWorkflow
---
import { TypeList, WorkflowDiagram } from "docs-ui"
# addOrRemoveCampaignPromotionsWorkflow - Medusa Workflows API Reference
This documentation provides a reference to the `addOrRemoveCampaignPromotionsWorkflow`. It belongs to the `@medusajs/core-flows` package.
This workflow adds or removes promotions from campaigns.
## Steps
<WorkflowDiagram workflow={{"name":"addOrRemoveCampaignPromotionsWorkflow","steps":[{"type":"step","name":"addCampaignPromotionsStep","description":"This step adds promotions to a campaign.","link":"../../../../core_flows.Steps_Promotion/page.mdx#addcampaignpromotionsstep","depth":1},{"type":"step","name":"removeCampaignPromotionsStep","description":"This step removes promotions from a campaigns.","link":"../../../../core_flows.Steps_Promotion/page.mdx#removecampaignpromotionsstep","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="addOrRemoveCampaignPromotionsWorkflow"/>

View File

@@ -0,0 +1,24 @@
---
slug: /references/medusa-workflows/batchPromotionRulesWorkflow
sidebar_label: batchPromotionRulesWorkflow
---
import { TypeList, WorkflowDiagram } from "docs-ui"
# batchPromotionRulesWorkflow - Medusa Workflows API Reference
This documentation provides a reference to the `batchPromotionRulesWorkflow`. It belongs to the `@medusajs/core-flows` package.
This workflow creates, updates, or deletes promotion rules.
## Steps
<WorkflowDiagram workflow={{"name":"batchPromotionRulesWorkflow","steps":[{"type":"workflow","name":"createPromotionRulesWorkflow","description":"This workflow creates one or more promotion rules.","link":"../../../../core_flows.Workflows_Promotion/page.mdx#createpromotionrulesworkflow","depth":1},{"type":"workflow","name":"updatePromotionRulesWorkflow","description":"This workflow updates one or more promotion rules.","link":"../../../../core_flows.Workflows_Promotion/page.mdx#updatepromotionrulesworkflow","depth":1}]}} />
## Input
<TypeList types={[{"name":"BatchWorkflowInput&#60;CreatePromotionRuleDTO, UpdatePromotionRuleDTO&#62; & object","type":"[BatchWorkflowInput](../../../../../types/CommonTypes/types/types.CommonTypes.BatchWorkflowInput/page.mdx)&#60;[CreatePromotionRuleDTO](../../../../../promotion/interfaces/promotion.CreatePromotionRuleDTO/page.mdx), [UpdatePromotionRuleDTO](../../../../../promotion/interfaces/promotion.UpdatePromotionRuleDTO/page.mdx)&#62; & `object`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"BatchWorkflowInput","type":"[BatchWorkflowInput](../../../../../types/CommonTypes/types/types.CommonTypes.BatchWorkflowInput/page.mdx)&#60;[CreatePromotionRuleDTO](../../../../../promotion/interfaces/promotion.CreatePromotionRuleDTO/page.mdx), [UpdatePromotionRuleDTO](../../../../../promotion/interfaces/promotion.UpdatePromotionRuleDTO/page.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"CreatePromotionRuleDTO","type":"`object`","description":"The promotion rule to be created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"UpdatePromotionRuleDTO","type":"`object`","description":"The attributes to update in the promotion rule.","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"rule_type","type":"[RuleType](../../../../../utils/PromotionUtils/enums/utils.PromotionUtils.RuleType/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"RULES","type":"`\"rules\"`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"TARGET_RULES","type":"`\"target_rules\"`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"BUY_RULES","type":"`\"buy_rules\"`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="batchPromotionRulesWorkflow"/>
## Output
<TypeList types={[{"name":"BatchWorkflowOutput","type":"[BatchWorkflowOutput](../../../../../types/CommonTypes/types/types.CommonTypes.BatchWorkflowOutput/page.mdx)&#60;[PromotionRuleDTO](../../../../../promotion/interfaces/promotion.PromotionRuleDTO/page.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"PromotionRuleDTO","type":"[PromotionRuleDTO](../../../../../promotion/interfaces/promotion.PromotionRuleDTO/page.mdx)","optional":false,"defaultValue":"","description":"The promotion rule details.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the promotion rule.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"values","type":"[PromotionRuleValueDTO](../../../../../promotion/interfaces/promotion.PromotionRuleValueDTO/page.mdx)[]","description":"The values of the promotion rule.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the promotion rule value.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"value","type":"`string`","description":"The value of the promotion rule value.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"description","type":"`null` \\| `string`","description":"The description of the promotion rule.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"attribute","type":"`string`","description":"The attribute of the promotion rule.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"operator","type":"[PromotionRuleOperatorValues](../../../../../promotion/types/promotion.PromotionRuleOperatorValues/page.mdx)","description":"The operator of the promotion rule.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="batchPromotionRulesWorkflow"/>

View File

@@ -0,0 +1,24 @@
---
slug: /references/medusa-workflows/createPromotionRulesWorkflow
sidebar_label: createPromotionRulesWorkflow
---
import { TypeList, WorkflowDiagram } from "docs-ui"
# createPromotionRulesWorkflow - Medusa Workflows API Reference
This documentation provides a reference to the `createPromotionRulesWorkflow`. It belongs to the `@medusajs/core-flows` package.
This workflow creates one or more promotion rules.
## Steps
<WorkflowDiagram workflow={{"name":"createPromotionRulesWorkflow","steps":[{"type":"step","name":"addRulesToPromotionsStep","description":"This step adds rules to a promotion.","link":"../../../../core_flows.Steps_Promotion/page.mdx#addrulestopromotionsstep","depth":1}]}} />
## Input
<TypeList types={[{"name":"AddPromotionRulesWorkflowDTO","type":"`AddPromotionRulesWorkflowDTO`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createPromotionRulesWorkflow"/>
## Output
<TypeList types={[{"name":"PromotionRuleDTO[]","type":"[PromotionRuleDTO](../../../../../promotion/interfaces/promotion.PromotionRuleDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"PromotionRuleDTO","type":"[PromotionRuleDTO](../../../../../promotion/interfaces/promotion.PromotionRuleDTO/page.mdx)","optional":false,"defaultValue":"","description":"The promotion rule details.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the promotion rule.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"values","type":"[PromotionRuleValueDTO](../../../../../promotion/interfaces/promotion.PromotionRuleValueDTO/page.mdx)[]","description":"The values of the promotion rule.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the promotion rule value.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"value","type":"`string`","description":"The value of the promotion rule value.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"description","type":"`null` \\| `string`","description":"The description of the promotion rule.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"attribute","type":"`string`","description":"The attribute of the promotion rule.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"operator","type":"[PromotionRuleOperatorValues](../../../../../promotion/types/promotion.PromotionRuleOperatorValues/page.mdx)","description":"The operator of the promotion rule.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createPromotionRulesWorkflow"/>

View File

@@ -0,0 +1,42 @@
---
slug: /references/medusa-workflows/deleteCampaignsWorkflow
sidebar_label: deleteCampaignsWorkflow
---
import { TypeList, WorkflowDiagram } from "docs-ui"
# deleteCampaignsWorkflow - Medusa Workflows API Reference
This documentation provides a reference to the `deleteCampaignsWorkflow`. It belongs to the `@medusajs/core-flows` package.
This workflow deletes one or more campaigns.
## Steps
<WorkflowDiagram workflow={{"name":"deleteCampaignsWorkflow","steps":[{"type":"step","name":"deleteCampaignsStep","description":"This step deletes one or more campaigns.","link":"../../../../core_flows.Steps_Promotion/page.mdx#deletecampaignsstep","depth":1},{"type":"hook","name":"campaignsDeleted","description":"This step is a hook that you can inject custom functionality into.\n\n","link":"#campaignsDeleted","depth":2}]}} />
## Input
<TypeList types={[{"name":"DeleteCampaignsWorkflowInput","type":"[DeleteCampaignsWorkflowInput](../../../../types/core_flows.DeleteCampaignsWorkflowInput/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="deleteCampaignsWorkflow"/>
## Hooks
### campaignsDeleted
#### Example
```ts
import { deleteCampaignsWorkflow } from "@medusajs/core-flows"
deleteCampaignsWorkflow.hooks.campaignsDeleted(
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="campaignsDeleted"/>

View File

@@ -0,0 +1,20 @@
---
slug: /references/medusa-workflows/deletePromotionRulesWorkflow
sidebar_label: deletePromotionRulesWorkflow
---
import { TypeList, WorkflowDiagram } from "docs-ui"
# deletePromotionRulesWorkflow - Medusa Workflows API Reference
This documentation provides a reference to the `deletePromotionRulesWorkflow`. It belongs to the `@medusajs/core-flows` package.
This workflow deletes one or more promotion rules.
## Steps
<WorkflowDiagram workflow={{"name":"deletePromotionRulesWorkflow","steps":[{"type":"step","name":"removeRulesFromPromotionsStep","description":"This step removes rules from a promotion.","link":"../../../../core_flows.Steps_Promotion/page.mdx#removerulesfrompromotionsstep","depth":1}]}} />
## Input
<TypeList types={[{"name":"RemovePromotionRulesWorkflowDTO","type":"`RemovePromotionRulesWorkflowDTO`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="deletePromotionRulesWorkflow"/>

View File

@@ -0,0 +1,42 @@
---
slug: /references/medusa-workflows/deletePromotionsWorkflow
sidebar_label: deletePromotionsWorkflow
---
import { TypeList, WorkflowDiagram } from "docs-ui"
# deletePromotionsWorkflow - Medusa Workflows API Reference
This documentation provides a reference to the `deletePromotionsWorkflow`. It belongs to the `@medusajs/core-flows` package.
This workflow deletes one or more promotions.
## Steps
<WorkflowDiagram workflow={{"name":"deletePromotionsWorkflow","steps":[{"type":"step","name":"deletePromotionsStep","description":"This step deletes one or more promotions.","link":"../../../../core_flows.Steps_Promotion/page.mdx#deletepromotionsstep","depth":1},{"type":"hook","name":"promotionsDeleted","description":"This step is a hook that you can inject custom functionality into.\n\n","link":"#promotionsDeleted","depth":2}]}} />
## Input
<TypeList types={[{"name":"DeletePromotionsWorkflowInput","type":"[DeletePromotionsWorkflowInput](../../../../types/core_flows.DeletePromotionsWorkflowInput/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="deletePromotionsWorkflow"/>
## Hooks
### promotionsDeleted
#### Example
```ts
import { deletePromotionsWorkflow } from "@medusajs/core-flows"
deletePromotionsWorkflow.hooks.promotionsDeleted(
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="promotionsDeleted"/>

View File

@@ -0,0 +1,24 @@
---
slug: /references/medusa-workflows/updatePromotionRulesWorkflow
sidebar_label: updatePromotionRulesWorkflow
---
import { TypeList, WorkflowDiagram } from "docs-ui"
# updatePromotionRulesWorkflow - Medusa Workflows API Reference
This documentation provides a reference to the `updatePromotionRulesWorkflow`. It belongs to the `@medusajs/core-flows` package.
This workflow updates one or more promotion rules.
## Steps
<WorkflowDiagram workflow={{"name":"updatePromotionRulesWorkflow","steps":[{"type":"step","name":"updatePromotionRulesStep","description":"This step updates one or more promotion rules.","link":"../../../../core_flows.Steps_Promotion/page.mdx#updatepromotionrulesstep","depth":1}]}} />
## Input
<TypeList types={[{"name":"UpdatePromotionRulesWorkflowDTO","type":"`UpdatePromotionRulesWorkflowDTO`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updatePromotionRulesWorkflow"/>
## Output
<TypeList types={[{"name":"PromotionRuleDTO[]","type":"[PromotionRuleDTO](../../../../../promotion/interfaces/promotion.PromotionRuleDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"PromotionRuleDTO","type":"[PromotionRuleDTO](../../../../../promotion/interfaces/promotion.PromotionRuleDTO/page.mdx)","optional":false,"defaultValue":"","description":"The promotion rule details.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the promotion rule.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"values","type":"[PromotionRuleValueDTO](../../../../../promotion/interfaces/promotion.PromotionRuleValueDTO/page.mdx)[]","description":"The values of the promotion rule.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the promotion rule value.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"value","type":"`string`","description":"The value of the promotion rule value.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"description","type":"`null` \\| `string`","description":"The description of the promotion rule.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"attribute","type":"`string`","description":"The attribute of the promotion rule.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"operator","type":"[PromotionRuleOperatorValues](../../../../../promotion/types/promotion.PromotionRuleOperatorValues/page.mdx)","description":"The operator of the promotion rule.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updatePromotionRulesWorkflow"/>

View File

@@ -0,0 +1,5 @@
import { TypeList, WorkflowDiagram } from "docs-ui"
# addOrRemoveCampaignPromotionsWorkflowId
`Const` **addOrRemoveCampaignPromotionsWorkflowId**: `"add-or-remove-campaign-promotions"`

View File

@@ -0,0 +1,5 @@
import { TypeList, WorkflowDiagram } from "docs-ui"
# batchPromotionRulesWorkflowId
`Const` **batchPromotionRulesWorkflowId**: `"batch-promotion-rules"`

View File

@@ -0,0 +1,5 @@
import { TypeList, WorkflowDiagram } from "docs-ui"
# createCampaignsWorkflowId
`Const` **createCampaignsWorkflowId**: `"create-campaigns"`

View File

@@ -0,0 +1,5 @@
import { TypeList, WorkflowDiagram } from "docs-ui"
# createPromotionRulesWorkflowId
`Const` **createPromotionRulesWorkflowId**: `"create-promotion-rules-workflow"`

View File

@@ -0,0 +1,5 @@
import { TypeList, WorkflowDiagram } from "docs-ui"
# createPromotionsWorkflowId
`Const` **createPromotionsWorkflowId**: `"create-promotions"`

View File

@@ -0,0 +1,5 @@
import { TypeList, WorkflowDiagram } from "docs-ui"
# deleteCampaignsWorkflowId
`Const` **deleteCampaignsWorkflowId**: `"delete-campaigns"`

View File

@@ -0,0 +1,5 @@
import { TypeList, WorkflowDiagram } from "docs-ui"
# deletePromotionRulesWorkflowId
`Const` **deletePromotionRulesWorkflowId**: `"delete-promotion-rules-workflow"`

View File

@@ -0,0 +1,5 @@
import { TypeList, WorkflowDiagram } from "docs-ui"
# deletePromotionsWorkflowId
`Const` **deletePromotionsWorkflowId**: `"delete-promotions"`

View File

@@ -0,0 +1,5 @@
import { TypeList, WorkflowDiagram } from "docs-ui"
# updateCampaignsWorkflowId
`Const` **updateCampaignsWorkflowId**: `"update-campaigns"`

View File

@@ -0,0 +1,5 @@
import { TypeList, WorkflowDiagram } from "docs-ui"
# updatePromotionRulesWorkflowId
`Const` **updatePromotionRulesWorkflowId**: `"update-promotion-rules-workflow"`

View File

@@ -0,0 +1,5 @@
import { TypeList, WorkflowDiagram } from "docs-ui"
# updatePromotionsWorkflowId
`Const` **updatePromotionsWorkflowId**: `"update-promotions"`

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,20 @@
---
slug: /references/medusa-workflows/steps/createReservationsStep
sidebar_label: createReservationsStep
---
import { TypeList, WorkflowDiagram } from "docs-ui"
# createReservationsStep - Medusa Workflows API Reference
This documentation provides a reference to the `createReservationsStep`. It belongs to the `@medusajs/core-flows` package.
This step creates one or more reservations.
## Input
<TypeList types={[{"name":"CreateReservationItemInput[]","type":"[CreateReservationItemInput](../../../../../types/InventoryTypes/interfaces/types.InventoryTypes.CreateReservationItemInput/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"CreateReservationItemInput","type":"[CreateReservationItemInput](../../../../../types/InventoryTypes/interfaces/types.InventoryTypes.CreateReservationItemInput/page.mdx)","optional":false,"defaultValue":"","description":"The details of the reservation item to be created.","expandable":false,"children":[{"name":"inventory_item_id","type":"`string`","description":"The ID of the associated inventory item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string`","description":"The ID of the associated location.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"quantity","type":"[BigNumberInput](../../../../../types/types/types.BigNumberInput/page.mdx)","description":"The reserved quantity.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../../../../types/types/types.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"line_item_id","type":"`null` \\| `string`","description":"The ID of the associated line item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"allow_backorder","type":"`boolean`","description":"Allow backorder of the item. If true, it won't check inventory levels before reserving it.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"The description of the reservation.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"`null` \\| `string`","description":"The user or system that created the reservation. Can be any form of identification string.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"external_id","type":"`null` \\| `string`","description":"An ID associated with an external third-party system that the reservation item is connected to.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `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="createReservationsStep"/>
## Output
<TypeList types={[{"name":"ReservationItemDTO[]","type":"[ReservationItemDTO](../../../../../types/InventoryTypes/interfaces/types.InventoryTypes.ReservationItemDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"ReservationItemDTO","type":"[ReservationItemDTO](../../../../../types/InventoryTypes/interfaces/types.InventoryTypes.ReservationItemDTO/page.mdx)","optional":false,"defaultValue":"","description":"The reservation item details.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the reservation item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string`","description":"The associated location's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"inventory_item_id","type":"`string`","description":"The associated inventory item's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"quantity","type":"[BigNumberInput](../../../../../types/types/types.BigNumberInput/page.mdx)","description":"The quantity of the reservation item.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../../../../types/types/types.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The creation date of the reservation item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The update date of the reservation item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `string` \\| `Date`","description":"The deletion date of the reservation item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"line_item_id","type":"`null` \\| `string`","description":"The associated line item's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"The description of the reservation item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"allow_backorder","type":"`boolean`","description":"Allow backorder of the item. If true, it won't check inventory levels before reserving it.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"`null` \\| `string`","description":"The created by of the reservation item.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createReservationsStep"/>

View File

@@ -0,0 +1,16 @@
---
slug: /references/medusa-workflows/steps/deleteReservationsByLineItemsStep
sidebar_label: deleteReservationsByLineItemsStep
---
import { TypeList, WorkflowDiagram } from "docs-ui"
# deleteReservationsByLineItemsStep - Medusa Workflows API Reference
This documentation provides a reference to the `deleteReservationsByLineItemsStep`. It belongs to the `@medusajs/core-flows` package.
This step deletes reservations by their associated line items.
## 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="deleteReservationsByLineItemsStep"/>

View File

@@ -0,0 +1,16 @@
---
slug: /references/medusa-workflows/steps/deleteReservationsStep
sidebar_label: deleteReservationsStep
---
import { TypeList, WorkflowDiagram } from "docs-ui"
# deleteReservationsStep - Medusa Workflows API Reference
This documentation provides a reference to the `deleteReservationsStep`. It belongs to the `@medusajs/core-flows` package.
This step deletes one or more reservations.
## 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="deleteReservationsStep"/>

View File

@@ -0,0 +1,20 @@
---
slug: /references/medusa-workflows/steps/updateReservationsStep
sidebar_label: updateReservationsStep
---
import { TypeList, WorkflowDiagram } from "docs-ui"
# updateReservationsStep - Medusa Workflows API Reference
This documentation provides a reference to the `updateReservationsStep`. It belongs to the `@medusajs/core-flows` package.
This step updates one or more reservations.
## Input
<TypeList types={[{"name":"UpdateReservationItemInput[]","type":"[UpdateReservationItemInput](../../../../../types/InventoryTypes/interfaces/types.InventoryTypes.UpdateReservationItemInput/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"UpdateReservationItemInput","type":"[UpdateReservationItemInput](../../../../../types/InventoryTypes/interfaces/types.InventoryTypes.UpdateReservationItemInput/page.mdx)","optional":false,"defaultValue":"","description":"The attributes to update in a reservation item.","expandable":false,"children":[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"quantity","type":"[BigNumberInput](../../../../../types/types/types.BigNumberInput/page.mdx)","description":"The reserved quantity.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../../../../types/types/types.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"location_id","type":"`string`","description":"The ID of the associated location.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"The description of the reservation item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"allow_backorder","type":"`boolean`","description":"Allow backorder of the item. If true, it won't check inventory levels before reserving it.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `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="updateReservationsStep"/>
## Output
<TypeList types={[{"name":"ReservationItemDTO[]","type":"[ReservationItemDTO](../../../../../types/InventoryTypes/interfaces/types.InventoryTypes.ReservationItemDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"ReservationItemDTO","type":"[ReservationItemDTO](../../../../../types/InventoryTypes/interfaces/types.InventoryTypes.ReservationItemDTO/page.mdx)","optional":false,"defaultValue":"","description":"The reservation item details.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the reservation item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string`","description":"The associated location's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"inventory_item_id","type":"`string`","description":"The associated inventory item's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"quantity","type":"[BigNumberInput](../../../../../types/types/types.BigNumberInput/page.mdx)","description":"The quantity of the reservation item.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../../../../types/types/types.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The creation date of the reservation item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The update date of the reservation item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `string` \\| `Date`","description":"The deletion date of the reservation item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"line_item_id","type":"`null` \\| `string`","description":"The associated line item's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"The description of the reservation item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"allow_backorder","type":"`boolean`","description":"Allow backorder of the item. If true, it won't check inventory levels before reserving it.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"`null` \\| `string`","description":"The created by of the reservation item.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateReservationsStep"/>

View File

@@ -0,0 +1,5 @@
import { TypeList, WorkflowDiagram } from "docs-ui"
# createReservationsStepId
`Const` **createReservationsStepId**: `"create-reservations-step"`

View File

@@ -0,0 +1,5 @@
import { TypeList, WorkflowDiagram } from "docs-ui"
# deleteReservationsByLineItemsStepId
`Const` **deleteReservationsByLineItemsStepId**: `"delete-reservations-by-line-items"`

View File

@@ -0,0 +1,5 @@
import { TypeList, WorkflowDiagram } from "docs-ui"
# deleteReservationsStepId
`Const` **deleteReservationsStepId**: `"delete-reservations"`

View File

@@ -0,0 +1,5 @@
import { TypeList, WorkflowDiagram } from "docs-ui"
# updateReservationsStepId
`Const` **updateReservationsStepId**: `"update-reservations-step"`

View File

@@ -0,0 +1,24 @@
---
slug: /references/medusa-workflows/createReservationsWorkflow
sidebar_label: createReservationsWorkflow
---
import { TypeList, WorkflowDiagram } from "docs-ui"
# createReservationsWorkflow - Medusa Workflows API Reference
This documentation provides a reference to the `createReservationsWorkflow`. It belongs to the `@medusajs/core-flows` package.
This workflow creates one or more reservations.
## Steps
<WorkflowDiagram workflow={{"name":"createReservationsWorkflow","steps":[{"type":"step","name":"createReservationsStep","description":"This step creates one or more reservations.","link":"../../../../core_flows.Steps_Reservation/page.mdx#createreservationsstep","depth":1}]}} />
## Input
<TypeList types={[{"name":"CreateReservationsWorkflowInput","type":"[CreateReservationsWorkflowInput](../../../../../types/WorkflowTypes/ReservationWorkflow/interfaces/types.WorkflowTypes.ReservationWorkflow.CreateReservationsWorkflowInput/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"reservations","type":"[CreateReservationItemInput](../../../../../types/InventoryTypes/interfaces/types.InventoryTypes.CreateReservationItemInput/page.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"inventory_item_id","type":"`string`","description":"The ID of the associated inventory item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string`","description":"The ID of the associated location.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"quantity","type":"[BigNumberInput](../../../../../types/types/types.BigNumberInput/page.mdx)","description":"The reserved quantity.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../../../../types/types/types.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"line_item_id","type":"`null` \\| `string`","description":"The ID of the associated line item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"allow_backorder","type":"`boolean`","description":"Allow backorder of the item. If true, it won't check inventory levels before reserving it.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"The description of the reservation.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"`null` \\| `string`","description":"The user or system that created the reservation. Can be any form of identification string.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"external_id","type":"`null` \\| `string`","description":"An ID associated with an external third-party system that the reservation item is connected to.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `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="createReservationsWorkflow"/>
## Output
<TypeList types={[{"name":"CreateReservationsWorkflowOutput","type":"[CreateReservationsWorkflowOutput](../../../../../types/WorkflowTypes/ReservationWorkflow/types/types.WorkflowTypes.ReservationWorkflow.CreateReservationsWorkflowOutput/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the reservation item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string`","description":"The associated location's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"inventory_item_id","type":"`string`","description":"The associated inventory item's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"quantity","type":"[BigNumberInput](../../../../../types/types/types.BigNumberInput/page.mdx)","description":"The quantity of the reservation item.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../../../../types/types/types.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The creation date of the reservation item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The update date of the reservation item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `string` \\| `Date`","description":"The deletion date of the reservation item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"line_item_id","type":"`null` \\| `string`","description":"The associated line item's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"The description of the reservation item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"allow_backorder","type":"`boolean`","description":"Allow backorder of the item. If true, it won't check inventory levels before reserving it.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"`null` \\| `string`","description":"The created by of the reservation item.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createReservationsWorkflow"/>

View File

@@ -0,0 +1,20 @@
---
slug: /references/medusa-workflows/deleteReservationsByLineItemsWorkflow
sidebar_label: deleteReservationsByLineItemsWorkflow
---
import { TypeList, WorkflowDiagram } from "docs-ui"
# deleteReservationsByLineItemsWorkflow - Medusa Workflows API Reference
This documentation provides a reference to the `deleteReservationsByLineItemsWorkflow`. It belongs to the `@medusajs/core-flows` package.
This workflow deletes reservations by their associated line items.
## Steps
<WorkflowDiagram workflow={{"name":"deleteReservationsByLineItemsWorkflow","steps":[{"type":"step","name":"deleteReservationsByLineItemsStep","description":"This step deletes reservations by their associated line items.","link":"../../../../core_flows.Steps_Reservation/page.mdx#deletereservationsbylineitemsstep","depth":1}]}} />
## Input
<TypeList types={[{"name":"DeleteReservationByLineItemsWorkflowInput","type":"[DeleteReservationByLineItemsWorkflowInput](../../../../types/core_flows.DeleteReservationByLineItemsWorkflowInput/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="deleteReservationsByLineItemsWorkflow"/>

View File

@@ -0,0 +1,20 @@
---
slug: /references/medusa-workflows/deleteReservationsWorkflow
sidebar_label: deleteReservationsWorkflow
---
import { TypeList, WorkflowDiagram } from "docs-ui"
# deleteReservationsWorkflow - Medusa Workflows API Reference
This documentation provides a reference to the `deleteReservationsWorkflow`. It belongs to the `@medusajs/core-flows` package.
This workflow deletes one or more reservations.
## Steps
<WorkflowDiagram workflow={{"name":"deleteReservationsWorkflow","steps":[{"type":"step","name":"deleteReservationsStep","description":"This step deletes one or more reservations.","link":"../../../../core_flows.Steps_Reservation/page.mdx#deletereservationsstep","depth":1}]}} />
## Input
<TypeList types={[{"name":"WorkflowInput","type":"`WorkflowInput`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="deleteReservationsWorkflow"/>

View File

@@ -0,0 +1,24 @@
---
slug: /references/medusa-workflows/updateReservationsWorkflow
sidebar_label: updateReservationsWorkflow
---
import { TypeList, WorkflowDiagram } from "docs-ui"
# updateReservationsWorkflow - Medusa Workflows API Reference
This documentation provides a reference to the `updateReservationsWorkflow`. It belongs to the `@medusajs/core-flows` package.
This workflow updates one or more reservations.
## Steps
<WorkflowDiagram workflow={{"name":"updateReservationsWorkflow","steps":[{"type":"step","name":"updateReservationsStep","description":"This step updates one or more reservations.","link":"../../../../core_flows.Steps_Reservation/page.mdx#updatereservationsstep","depth":1}]}} />
## Input
<TypeList types={[{"name":"UpdateReservationsWorkflowInput","type":"[UpdateReservationsWorkflowInput](../../../../../types/WorkflowTypes/ReservationWorkflow/interfaces/types.WorkflowTypes.ReservationWorkflow.UpdateReservationsWorkflowInput/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"updates","type":"[UpdateReservationItemInput](../../../../../types/InventoryTypes/interfaces/types.InventoryTypes.UpdateReservationItemInput/page.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"quantity","type":"[BigNumberInput](../../../../../types/types/types.BigNumberInput/page.mdx)","description":"The reserved quantity.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../../../../types/types/types.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"location_id","type":"`string`","description":"The ID of the associated location.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"The description of the reservation item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"allow_backorder","type":"`boolean`","description":"Allow backorder of the item. If true, it won't check inventory levels before reserving it.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `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="updateReservationsWorkflow"/>
## Output
<TypeList types={[{"name":"UpdateReservationsWorkflowOutput","type":"[UpdateReservationsWorkflowOutput](../../../../../types/WorkflowTypes/ReservationWorkflow/types/types.WorkflowTypes.ReservationWorkflow.UpdateReservationsWorkflowOutput/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the reservation item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string`","description":"The associated location's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"inventory_item_id","type":"`string`","description":"The associated inventory item's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"quantity","type":"[BigNumberInput](../../../../../types/types/types.BigNumberInput/page.mdx)","description":"The quantity of the reservation item.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../../../../types/types/types.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The creation date of the reservation item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The update date of the reservation item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `string` \\| `Date`","description":"The deletion date of the reservation item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"line_item_id","type":"`null` \\| `string`","description":"The associated line item's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"The description of the reservation item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"allow_backorder","type":"`boolean`","description":"Allow backorder of the item. If true, it won't check inventory levels before reserving it.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"`null` \\| `string`","description":"The created by of the reservation item.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateReservationsWorkflow"/>

View File

@@ -0,0 +1,5 @@
import { TypeList, WorkflowDiagram } from "docs-ui"
# createReservationsWorkflowId
`Const` **createReservationsWorkflowId**: `"create-reservations-workflow"`

View File

@@ -0,0 +1,5 @@
import { TypeList, WorkflowDiagram } from "docs-ui"
# deleteReservationsByLineItemsWorkflowId
`Const` **deleteReservationsByLineItemsWorkflowId**: `"delete-reservations-by-line-items"`

View File

@@ -0,0 +1,5 @@
import { TypeList, WorkflowDiagram } from "docs-ui"
# deleteReservationsWorkflowId
`Const` **deleteReservationsWorkflowId**: `"delete-reservations"`

View File

@@ -0,0 +1,5 @@
import { TypeList, WorkflowDiagram } from "docs-ui"
# updateReservationsWorkflowId
`Const` **updateReservationsWorkflowId**: `"update-reservations-workflow"`

View File

@@ -0,0 +1,49 @@
import { TypeList, WorkflowDiagram } from "docs-ui"
# Steps\_Reservation
## createReservationsStep
This step creates one or more reservations.
### Input
<TypeList types={[{"name":"CreateReservationItemInput[]","type":"[CreateReservationItemInput](../../../types/InventoryTypes/interfaces/types.InventoryTypes.CreateReservationItemInput/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"CreateReservationItemInput","type":"[CreateReservationItemInput](../../../types/InventoryTypes/interfaces/types.InventoryTypes.CreateReservationItemInput/page.mdx)","optional":false,"defaultValue":"","description":"The details of the reservation item to be created.","expandable":false,"children":[{"name":"inventory_item_id","type":"`string`","description":"The ID of the associated inventory item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string`","description":"The ID of the associated location.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"quantity","type":"[BigNumberInput](../../../types/types/types.BigNumberInput/page.mdx)","description":"The reserved quantity.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../../types/types/types.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"line_item_id","type":"`null` \\| `string`","description":"The ID of the associated line item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"allow_backorder","type":"`boolean`","description":"Allow backorder of the item. If true, it won't check inventory levels before reserving it.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"The description of the reservation.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"`null` \\| `string`","description":"The user or system that created the reservation. Can be any form of identification string.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"external_id","type":"`null` \\| `string`","description":"An ID associated with an external third-party system that the reservation item is connected to.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `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="createReservationsStep"/>
### Output
<TypeList types={[{"name":"ReservationItemDTO[]","type":"[ReservationItemDTO](../../../types/InventoryTypes/interfaces/types.InventoryTypes.ReservationItemDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"ReservationItemDTO","type":"[ReservationItemDTO](../../../types/InventoryTypes/interfaces/types.InventoryTypes.ReservationItemDTO/page.mdx)","optional":false,"defaultValue":"","description":"The reservation item details.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the reservation item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string`","description":"The associated location's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"inventory_item_id","type":"`string`","description":"The associated inventory item's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"quantity","type":"[BigNumberInput](../../../types/types/types.BigNumberInput/page.mdx)","description":"The quantity of the reservation item.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../../types/types/types.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The creation date of the reservation item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The update date of the reservation item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `string` \\| `Date`","description":"The deletion date of the reservation item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"line_item_id","type":"`null` \\| `string`","description":"The associated line item's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"The description of the reservation item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"allow_backorder","type":"`boolean`","description":"Allow backorder of the item. If true, it won't check inventory levels before reserving it.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"`null` \\| `string`","description":"The created by of the reservation item.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createReservationsStep"/>
___
## deleteReservationsByLineItemsStep
This step deletes reservations by their associated line items.
### 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="deleteReservationsByLineItemsStep"/>
___
## deleteReservationsStep
This step deletes one or more reservations.
### 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="deleteReservationsStep"/>
___
## updateReservationsStep
This step updates one or more reservations.
### Input
<TypeList types={[{"name":"UpdateReservationItemInput[]","type":"[UpdateReservationItemInput](../../../types/InventoryTypes/interfaces/types.InventoryTypes.UpdateReservationItemInput/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"UpdateReservationItemInput","type":"[UpdateReservationItemInput](../../../types/InventoryTypes/interfaces/types.InventoryTypes.UpdateReservationItemInput/page.mdx)","optional":false,"defaultValue":"","description":"The attributes to update in a reservation item.","expandable":false,"children":[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"quantity","type":"[BigNumberInput](../../../types/types/types.BigNumberInput/page.mdx)","description":"The reserved quantity.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../../types/types/types.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"location_id","type":"`string`","description":"The ID of the associated location.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"The description of the reservation item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"allow_backorder","type":"`boolean`","description":"Allow backorder of the item. If true, it won't check inventory levels before reserving it.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `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="updateReservationsStep"/>
### Output
<TypeList types={[{"name":"ReservationItemDTO[]","type":"[ReservationItemDTO](../../../types/InventoryTypes/interfaces/types.InventoryTypes.ReservationItemDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"ReservationItemDTO","type":"[ReservationItemDTO](../../../types/InventoryTypes/interfaces/types.InventoryTypes.ReservationItemDTO/page.mdx)","optional":false,"defaultValue":"","description":"The reservation item details.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the reservation item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string`","description":"The associated location's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"inventory_item_id","type":"`string`","description":"The associated inventory item's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"quantity","type":"[BigNumberInput](../../../types/types/types.BigNumberInput/page.mdx)","description":"The quantity of the reservation item.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../../types/types/types.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The creation date of the reservation item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The update date of the reservation item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `string` \\| `Date`","description":"The deletion date of the reservation item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"line_item_id","type":"`null` \\| `string`","description":"The associated line item's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"The description of the reservation item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"allow_backorder","type":"`boolean`","description":"Allow backorder of the item. If true, it won't check inventory levels before reserving it.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"`null` \\| `string`","description":"The created by of the reservation item.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateReservationsStep"/>

View File

@@ -0,0 +1,65 @@
import { TypeList, WorkflowDiagram } from "docs-ui"
# Workflows\_Reservation
## createReservationsWorkflow
This workflow creates one or more reservations.
### Steps
<WorkflowDiagram workflow={{"name":"createReservationsWorkflow","steps":[{"type":"step","name":"createReservationsStep","description":"This step creates one or more reservations.","link":"../../core_flows.Steps_Reservation/page.mdx#createreservationsstep","depth":1}]}} />
### Input
<TypeList types={[{"name":"CreateReservationsWorkflowInput","type":"[CreateReservationsWorkflowInput](../../../types/WorkflowTypes/ReservationWorkflow/interfaces/types.WorkflowTypes.ReservationWorkflow.CreateReservationsWorkflowInput/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"reservations","type":"[CreateReservationItemInput](../../../types/InventoryTypes/interfaces/types.InventoryTypes.CreateReservationItemInput/page.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"inventory_item_id","type":"`string`","description":"The ID of the associated inventory item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string`","description":"The ID of the associated location.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"quantity","type":"[BigNumberInput](../../../types/types/types.BigNumberInput/page.mdx)","description":"The reserved quantity.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../../types/types/types.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"line_item_id","type":"`null` \\| `string`","description":"The ID of the associated line item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"allow_backorder","type":"`boolean`","description":"Allow backorder of the item. If true, it won't check inventory levels before reserving it.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"The description of the reservation.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"`null` \\| `string`","description":"The user or system that created the reservation. Can be any form of identification string.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"external_id","type":"`null` \\| `string`","description":"An ID associated with an external third-party system that the reservation item is connected to.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `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="createReservationsWorkflow"/>
### Output
<TypeList types={[{"name":"CreateReservationsWorkflowOutput","type":"[CreateReservationsWorkflowOutput](../../../types/WorkflowTypes/ReservationWorkflow/types/types.WorkflowTypes.ReservationWorkflow.CreateReservationsWorkflowOutput/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the reservation item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string`","description":"The associated location's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"inventory_item_id","type":"`string`","description":"The associated inventory item's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"quantity","type":"[BigNumberInput](../../../types/types/types.BigNumberInput/page.mdx)","description":"The quantity of the reservation item.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../../types/types/types.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The creation date of the reservation item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The update date of the reservation item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `string` \\| `Date`","description":"The deletion date of the reservation item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"line_item_id","type":"`null` \\| `string`","description":"The associated line item's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"The description of the reservation item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"allow_backorder","type":"`boolean`","description":"Allow backorder of the item. If true, it won't check inventory levels before reserving it.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"`null` \\| `string`","description":"The created by of the reservation item.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createReservationsWorkflow"/>
___
## deleteReservationsByLineItemsWorkflow
This workflow deletes reservations by their associated line items.
### Steps
<WorkflowDiagram workflow={{"name":"deleteReservationsByLineItemsWorkflow","steps":[{"type":"step","name":"deleteReservationsByLineItemsStep","description":"This step deletes reservations by their associated line items.","link":"../../core_flows.Steps_Reservation/page.mdx#deletereservationsbylineitemsstep","depth":1}]}} />
### Input
<TypeList types={[{"name":"DeleteReservationByLineItemsWorkflowInput","type":"[DeleteReservationByLineItemsWorkflowInput](../../types/core_flows.DeleteReservationByLineItemsWorkflowInput/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="deleteReservationsByLineItemsWorkflow"/>
___
## deleteReservationsWorkflow
This workflow deletes one or more reservations.
### Steps
<WorkflowDiagram workflow={{"name":"deleteReservationsWorkflow","steps":[{"type":"step","name":"deleteReservationsStep","description":"This step deletes one or more reservations.","link":"../../core_flows.Steps_Reservation/page.mdx#deletereservationsstep","depth":1}]}} />
### Input
<TypeList types={[{"name":"WorkflowInput","type":"`WorkflowInput`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="deleteReservationsWorkflow"/>
___
## updateReservationsWorkflow
This workflow updates one or more reservations.
### Steps
<WorkflowDiagram workflow={{"name":"updateReservationsWorkflow","steps":[{"type":"step","name":"updateReservationsStep","description":"This step updates one or more reservations.","link":"../../core_flows.Steps_Reservation/page.mdx#updatereservationsstep","depth":1}]}} />
### Input
<TypeList types={[{"name":"UpdateReservationsWorkflowInput","type":"[UpdateReservationsWorkflowInput](../../../types/WorkflowTypes/ReservationWorkflow/interfaces/types.WorkflowTypes.ReservationWorkflow.UpdateReservationsWorkflowInput/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"updates","type":"[UpdateReservationItemInput](../../../types/InventoryTypes/interfaces/types.InventoryTypes.UpdateReservationItemInput/page.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"quantity","type":"[BigNumberInput](../../../types/types/types.BigNumberInput/page.mdx)","description":"The reserved quantity.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../../types/types/types.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"location_id","type":"`string`","description":"The ID of the associated location.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"The description of the reservation item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"allow_backorder","type":"`boolean`","description":"Allow backorder of the item. If true, it won't check inventory levels before reserving it.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `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="updateReservationsWorkflow"/>
### Output
<TypeList types={[{"name":"UpdateReservationsWorkflowOutput","type":"[UpdateReservationsWorkflowOutput](../../../types/WorkflowTypes/ReservationWorkflow/types/types.WorkflowTypes.ReservationWorkflow.UpdateReservationsWorkflowOutput/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the reservation item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string`","description":"The associated location's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"inventory_item_id","type":"`string`","description":"The associated inventory item's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"quantity","type":"[BigNumberInput](../../../types/types/types.BigNumberInput/page.mdx)","description":"The quantity of the reservation item.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../../types/types/types.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The creation date of the reservation item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The update date of the reservation item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `string` \\| `Date`","description":"The deletion date of the reservation item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"line_item_id","type":"`null` \\| `string`","description":"The associated line item's ID.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"The description of the reservation item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"allow_backorder","type":"`boolean`","description":"Allow backorder of the item. If true, it won't check inventory levels before reserving it.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"`null` \\| `string`","description":"The created by of the reservation item.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateReservationsWorkflow"/>

View File

@@ -0,0 +1,20 @@
---
slug: /references/medusa-workflows/steps/associateLocationsWithSalesChannelsStep
sidebar_label: associateLocationsWithSalesChannelsStep
---
import { TypeList, WorkflowDiagram } from "docs-ui"
# associateLocationsWithSalesChannelsStep - Medusa Workflows API Reference
This documentation provides a reference to the `associateLocationsWithSalesChannelsStep`. It belongs to the `@medusajs/core-flows` package.
This step creates links between locations and sales channel records.
## Input
<TypeList types={[{"name":"AssociateLocationsWithSalesChannelsStepInput","type":"[AssociateLocationsWithSalesChannelsStepInput](../../../../interfaces/core_flows.AssociateLocationsWithSalesChannelsStepInput/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"links","type":"`object`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"sales_channel_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","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="associateLocationsWithSalesChannelsStep"/>
## Output
<TypeList types={[{"name":"unknown[]","type":"`unknown`[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"unknown","type":"`unknown`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="associateLocationsWithSalesChannelsStep"/>

View File

@@ -0,0 +1,20 @@
---
slug: /references/medusa-workflows/steps/associateProductsWithSalesChannelsStep
sidebar_label: associateProductsWithSalesChannelsStep
---
import { TypeList, WorkflowDiagram } from "docs-ui"
# associateProductsWithSalesChannelsStep - Medusa Workflows API Reference
This documentation provides a reference to the `associateProductsWithSalesChannelsStep`. It belongs to the `@medusajs/core-flows` package.
This step creates links between products and sales channel records.
## Input
<TypeList types={[{"name":"AssociateProductsWithSalesChannelsStepInput","type":"[AssociateProductsWithSalesChannelsStepInput](../../../../interfaces/core_flows.AssociateProductsWithSalesChannelsStepInput/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"links","type":"`object`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"sales_channel_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"product_id","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="associateProductsWithSalesChannelsStep"/>
## Output
<TypeList types={[{"name":"unknown[]","type":"`unknown`[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"unknown","type":"`unknown`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="associateProductsWithSalesChannelsStep"/>

View File

@@ -0,0 +1,20 @@
---
slug: /references/medusa-workflows/steps/createDefaultSalesChannelStep
sidebar_label: createDefaultSalesChannelStep
---
import { TypeList, WorkflowDiagram } from "docs-ui"
# createDefaultSalesChannelStep - Medusa Workflows API Reference
This documentation provides a reference to the `createDefaultSalesChannelStep`. It belongs to the `@medusajs/core-flows` package.
This step creates a default sales channel.
## Input
<TypeList types={[{"name":"CreateDefaultSalesChannelStepInput","type":"[CreateDefaultSalesChannelStepInput](../../../../interfaces/core_flows.CreateDefaultSalesChannelStepInput/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"data","type":"[CreateSalesChannelDTO](../../../../../sales_channel/interfaces/sales_channel.CreateSalesChannelDTO/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"name","type":"`string`","description":"The name of the sales channel.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"The description of the sales channel.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_disabled","type":"`boolean`","description":"Whether the sales channel is disabled.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createDefaultSalesChannelStep"/>
## Output
<TypeList types={[{"name":"SalesChannelDTO","type":"[SalesChannelDTO](../../../../../sales_channel/interfaces/sales_channel.SalesChannelDTO/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the sales channel.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name of the sales channel.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"The description of the sales channel.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_disabled","type":"`boolean`","description":"Whether the sales channel is disabled.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"locations","type":"[SalesChannelLocationDTO](../../../../../sales_channel/interfaces/sales_channel.SalesChannelLocationDTO/page.mdx)[]","description":"The locations of the sales channel.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"sales_channel_id","type":"`string`","description":"The associated sales channel's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string`","description":"The associated location's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel","type":"[SalesChannelDTO](../../../../../sales_channel/interfaces/sales_channel.SalesChannelDTO/page.mdx)","description":"The associated sales channel.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the sales channel.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name of the sales channel.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"The description of the sales channel.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_disabled","type":"`boolean`","description":"Whether the sales channel is disabled.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"locations","type":"[SalesChannelLocationDTO](../../../../../sales_channel/interfaces/sales_channel.SalesChannelLocationDTO/page.mdx)[]","description":"The locations of the sales channel.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createDefaultSalesChannelStep"/>

View File

@@ -0,0 +1,20 @@
---
slug: /references/medusa-workflows/steps/createSalesChannelsStep
sidebar_label: createSalesChannelsStep
---
import { TypeList, WorkflowDiagram } from "docs-ui"
# createSalesChannelsStep - Medusa Workflows API Reference
This documentation provides a reference to the `createSalesChannelsStep`. It belongs to the `@medusajs/core-flows` package.
This step creates one or more sales channels.
## Input
<TypeList types={[{"name":"CreateSalesChannelsStepInput","type":"[CreateSalesChannelsStepInput](../../../../interfaces/core_flows.CreateSalesChannelsStepInput/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"data","type":"[CreateSalesChannelDTO](../../../../../sales_channel/interfaces/sales_channel.CreateSalesChannelDTO/page.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"name","type":"`string`","description":"The name of the sales channel.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"The description of the sales channel.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_disabled","type":"`boolean`","description":"Whether the sales channel is disabled.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createSalesChannelsStep"/>
## Output
<TypeList types={[{"name":"SalesChannelDTO[]","type":"[SalesChannelDTO](../../../../../sales_channel/interfaces/sales_channel.SalesChannelDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"SalesChannelDTO","type":"[SalesChannelDTO](../../../../../sales_channel/interfaces/sales_channel.SalesChannelDTO/page.mdx)","optional":false,"defaultValue":"","description":"The sales channel details.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the sales channel.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name of the sales channel.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"The description of the sales channel.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_disabled","type":"`boolean`","description":"Whether the sales channel is disabled.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"locations","type":"[SalesChannelLocationDTO](../../../../../sales_channel/interfaces/sales_channel.SalesChannelLocationDTO/page.mdx)[]","description":"The locations of the sales channel.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"sales_channel_id","type":"`string`","description":"The associated sales channel's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string`","description":"The associated location's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel","type":"[SalesChannelDTO](../../../../../sales_channel/interfaces/sales_channel.SalesChannelDTO/page.mdx)","description":"The associated sales channel.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createSalesChannelsStep"/>

View File

@@ -0,0 +1,16 @@
---
slug: /references/medusa-workflows/steps/deleteSalesChannelsStep
sidebar_label: deleteSalesChannelsStep
---
import { TypeList, WorkflowDiagram } from "docs-ui"
# deleteSalesChannelsStep - Medusa Workflows API Reference
This documentation provides a reference to the `deleteSalesChannelsStep`. It belongs to the `@medusajs/core-flows` package.
This step deletes one or more sales channels.
## 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="deleteSalesChannelsStep"/>

View File

@@ -0,0 +1,20 @@
---
slug: /references/medusa-workflows/steps/detachLocationsFromSalesChannelsStep
sidebar_label: detachLocationsFromSalesChannelsStep
---
import { TypeList, WorkflowDiagram } from "docs-ui"
# detachLocationsFromSalesChannelsStep - Medusa Workflows API Reference
This documentation provides a reference to the `detachLocationsFromSalesChannelsStep`. It belongs to the `@medusajs/core-flows` package.
This step dismisses links between location and sales channel records.
## Input
<TypeList types={[{"name":"DetachLocationsFromSalesChannelsStepInput","type":"[DetachLocationsFromSalesChannelsStepInput](../../../../interfaces/core_flows.DetachLocationsFromSalesChannelsStepInput/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"links","type":"`object`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"sales_channel_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","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="detachLocationsFromSalesChannelsStep"/>
## Output
<TypeList types={[{"name":"never[]","type":"`never`[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"never","type":"`never`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="detachLocationsFromSalesChannelsStep"/>

View File

@@ -0,0 +1,16 @@
---
slug: /references/medusa-workflows/steps/detachProductsFromSalesChannelsStep
sidebar_label: detachProductsFromSalesChannelsStep
---
import { TypeList, WorkflowDiagram } from "docs-ui"
# detachProductsFromSalesChannelsStep - Medusa Workflows API Reference
This documentation provides a reference to the `detachProductsFromSalesChannelsStep`. It belongs to the `@medusajs/core-flows` package.
This step dismisses links between product and sales channel records.
## Input
<TypeList types={[{"name":"DetachProductsFromSalesChannelsStepInput","type":"[DetachProductsFromSalesChannelsStepInput](../../../../interfaces/core_flows.DetachProductsFromSalesChannelsStepInput/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"links","type":"`object`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"sales_channel_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"product_id","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="detachProductsFromSalesChannelsStep"/>

View File

@@ -0,0 +1,5 @@
import { TypeList, WorkflowDiagram } from "docs-ui"
# associateLocationsWithSalesChannelsStepId
`Const` **associateLocationsWithSalesChannelsStepId**: `"associate-locations-with-sales-channels-step"`

View File

@@ -0,0 +1,5 @@
import { TypeList, WorkflowDiagram } from "docs-ui"
# associateProductsWithSalesChannelsStepId
`Const` **associateProductsWithSalesChannelsStepId**: `"associate-products-with-channels"`

View File

@@ -0,0 +1,5 @@
import { TypeList, WorkflowDiagram } from "docs-ui"
# createDefaultSalesChannelStepId
`Const` **createDefaultSalesChannelStepId**: `"create-default-sales-channel"`

View File

@@ -0,0 +1,5 @@
import { TypeList, WorkflowDiagram } from "docs-ui"
# createSalesChannelsStepId
`Const` **createSalesChannelsStepId**: `"create-sales-channels"`

View File

@@ -0,0 +1,5 @@
import { TypeList, WorkflowDiagram } from "docs-ui"
# deleteSalesChannelsStepId
`Const` **deleteSalesChannelsStepId**: `"delete-sales-channels"`

View File

@@ -0,0 +1,5 @@
import { TypeList, WorkflowDiagram } from "docs-ui"
# detachLocationsFromSalesChannelsStepId
`Const` **detachLocationsFromSalesChannelsStepId**: `"detach-locations-from-sales-channels"`

View File

@@ -0,0 +1,5 @@
import { TypeList, WorkflowDiagram } from "docs-ui"
# detachProductsFromSalesChannelsStepId
`Const` **detachProductsFromSalesChannelsStepId**: `"detach-products-from-sales-channels-step"`

View File

@@ -0,0 +1,5 @@
import { TypeList, WorkflowDiagram } from "docs-ui"
# updateSalesChannelsStepId
`Const` **updateSalesChannelsStepId**: `"update-sales-channels"`

View File

@@ -0,0 +1,24 @@
---
slug: /references/medusa-workflows/createSalesChannelsWorkflow
sidebar_label: createSalesChannelsWorkflow
---
import { TypeList, WorkflowDiagram } from "docs-ui"
# createSalesChannelsWorkflow - Medusa Workflows API Reference
This documentation provides a reference to the `createSalesChannelsWorkflow`. It belongs to the `@medusajs/core-flows` package.
This workflow creates one or more sales channels.
## Steps
<WorkflowDiagram workflow={{"name":"createSalesChannelsWorkflow","steps":[{"type":"step","name":"createSalesChannelsStep","description":"This step creates one or more sales channels.","link":"../../../../core_flows.Steps_Sales_Channel/page.mdx#createsaleschannelsstep","depth":1}]}} />
## Input
<TypeList types={[{"name":"CreateSalesChannelsWorkflowInput","type":"[CreateSalesChannelsWorkflowInput](../../../../types/core_flows.CreateSalesChannelsWorkflowInput/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"salesChannelsData","type":"[CreateSalesChannelDTO](../../../../../sales_channel/interfaces/sales_channel.CreateSalesChannelDTO/page.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"name","type":"`string`","description":"The name of the sales channel.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"The description of the sales channel.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_disabled","type":"`boolean`","description":"Whether the sales channel is disabled.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createSalesChannelsWorkflow"/>
## Output
<TypeList types={[{"name":"SalesChannelDTO[]","type":"[SalesChannelDTO](../../../../../sales_channel/interfaces/sales_channel.SalesChannelDTO/page.mdx)[]","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"SalesChannelDTO","type":"[SalesChannelDTO](../../../../../sales_channel/interfaces/sales_channel.SalesChannelDTO/page.mdx)","optional":false,"defaultValue":"","description":"The sales channel details.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the sales channel.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name of the sales channel.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"The description of the sales channel.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_disabled","type":"`boolean`","description":"Whether the sales channel is disabled.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"locations","type":"[SalesChannelLocationDTO](../../../../../sales_channel/interfaces/sales_channel.SalesChannelLocationDTO/page.mdx)[]","description":"The locations of the sales channel.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"sales_channel_id","type":"`string`","description":"The associated sales channel's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string`","description":"The associated location's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel","type":"[SalesChannelDTO](../../../../../sales_channel/interfaces/sales_channel.SalesChannelDTO/page.mdx)","description":"The associated sales channel.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createSalesChannelsWorkflow"/>

View File

@@ -0,0 +1,20 @@
---
slug: /references/medusa-workflows/deleteSalesChannelsWorkflow
sidebar_label: deleteSalesChannelsWorkflow
---
import { TypeList, WorkflowDiagram } from "docs-ui"
# deleteSalesChannelsWorkflow - Medusa Workflows API Reference
This documentation provides a reference to the `deleteSalesChannelsWorkflow`. It belongs to the `@medusajs/core-flows` package.
This workflow deletes one or more sales channels.
## Steps
<WorkflowDiagram workflow={{"name":"deleteSalesChannelsWorkflow","steps":[{"type":"step","name":"deleteSalesChannelsStep","description":"This step deletes one or more sales channels.","link":"../../../../core_flows.Steps_Sales_Channel/page.mdx#deletesaleschannelsstep","depth":1},{"type":"step","name":"removeRemoteLinkStep","description":"This step deletes linked records of a record.\n\nLearn more in the [Remote Link documentation](https://docs.medusajs.com/v2/advanced-development/modules/remote-link#cascade-delete-linked-records)\n\n","link":"../../../../core_flows.Steps_Common/page.mdx#removeremotelinkstep","depth":2}]}} />
## Input
<TypeList types={[{"name":"DeleteSalesChannelsWorkflowInput","type":"[DeleteSalesChannelsWorkflowInput](../../../../types/core_flows.DeleteSalesChannelsWorkflowInput/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="deleteSalesChannelsWorkflow"/>

View File

@@ -0,0 +1,20 @@
---
slug: /references/medusa-workflows/linkProductsToSalesChannelWorkflow
sidebar_label: linkProductsToSalesChannelWorkflow
---
import { TypeList, WorkflowDiagram } from "docs-ui"
# linkProductsToSalesChannelWorkflow - Medusa Workflows API Reference
This documentation provides a reference to the `linkProductsToSalesChannelWorkflow`. It belongs to the `@medusajs/core-flows` package.
This workflow creates or dismisses links between product and sales channel records.
## Steps
<WorkflowDiagram workflow={{"name":"linkProductsToSalesChannelWorkflow","steps":[{"type":"step","name":"associateProductsWithSalesChannelsStep","description":"This step creates links between products and sales channel records.","link":"../../../../core_flows.Steps_Sales_Channel/page.mdx#associateproductswithsaleschannelsstep","depth":1},{"type":"step","name":"detachProductsFromSalesChannelsStep","description":"This step dismisses links between product and sales channel records.","link":"../../../../core_flows.Steps_Sales_Channel/page.mdx#detachproductsfromsaleschannelsstep","depth":2}]}} />
## 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="linkProductsToSalesChannelWorkflow"/>

View File

@@ -0,0 +1,5 @@
import { TypeList, WorkflowDiagram } from "docs-ui"
# createSalesChannelsWorkflowId
`Const` **createSalesChannelsWorkflowId**: `"create-sales-channels"`

View File

@@ -0,0 +1,5 @@
import { TypeList, WorkflowDiagram } from "docs-ui"
# deleteSalesChannelsWorkflowId
`Const` **deleteSalesChannelsWorkflowId**: `"delete-sales-channels"`

View File

@@ -0,0 +1,5 @@
import { TypeList, WorkflowDiagram } from "docs-ui"
# linkProductsToSalesChannelWorkflowId
`Const` **linkProductsToSalesChannelWorkflowId**: `"link-products-to-sales-channel"`

View File

@@ -0,0 +1,5 @@
import { TypeList, WorkflowDiagram } from "docs-ui"
# updateSalesChannelsWorkflowId
`Const` **updateSalesChannelsWorkflowId**: `"update-sales-channels"`

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,8 @@
import { TypeList, WorkflowDiagram } from "docs-ui"
# Promotion
## Namespaces
- [Steps\_Promotion](../core_flows.Steps_Promotion/page.mdx)
- [Workflows\_Promotion](../core_flows.Workflows_Promotion/page.mdx)

View File

@@ -0,0 +1,8 @@
import { TypeList, WorkflowDiagram } from "docs-ui"
# Reservation
## Namespaces
- [Steps\_Reservation](../core_flows.Steps_Reservation/page.mdx)
- [Workflows\_Reservation](../core_flows.Workflows_Reservation/page.mdx)

View File

@@ -0,0 +1,8 @@
import { TypeList, WorkflowDiagram } from "docs-ui"
# Sales Channel
## Namespaces
- [Steps\_Sales Channel](../core_flows.Steps_Sales_Channel/page.mdx)
- [Workflows\_Sales Channel](../core_flows.Workflows_Sales_Channel/page.mdx)