chore(docs): Generated References (automated) (#9567)

Co-authored-by: olivermrbl <olivermrbl@users.noreply.github.com>
This commit is contained in:
github-actions[bot]andolivermrbl authored and GitHub committed 2024-10-14 19:59:14 +02:00
1 parent f8e8b276bd
commit f2d662efca
61 files changed
+1345553 -1345196

No files matched your search

@@ -425,17 +425,17 @@ This exports the module's definition, indicating that the `MyAuthProviderService
## 4. Use Module
To use your Auth Module Provider, add it to the `providers` array of the Auth Module:
To use your Auth Module Provider, add it to the `providers` array of the Auth Module in `medusa-config.ts`:
```js title="medusa-config.js"
const { Modules } = require("@medusajs/framework/utils")
```ts title="medusa-config.ts"
import { Modules } from "@medusajs/framework/utils"
// ...
module.exports = defineConfig({
// ...
modules: {
[Modules.AUTH]: {
modules: [
{
resolve: "@medusajs/framework/auth",
options: {
providers: [
@@ -449,7 +449,7 @@ module.exports = defineConfig({
],
},
},
}
]
})
```
@@ -0,0 +1,20 @@
---
slug: /references/medusa-workflows/addShippingMethodToCartWorkflow
sidebar_label: addShippingMethodToCartWorkflow
---
import { TypeList, WorkflowDiagram } from "docs-ui"
# addShippingMethodToCartWorkflow - Medusa Workflows API Reference
This documentation provides a reference to the `addShippingMethodToCartWorkflow`. It belongs to the `@medusajs/medusa/core-flows` package.
This workflow adds shipping methods to a cart.
## Steps
<WorkflowDiagram workflow={{"name":"addShippingMethodToCartWorkflow","steps":[{"type":"step","name":"useRemoteQueryStep","description":"This step fetches data across modules using the remote query.\n\nLearn more in the [Remote Query documentation](https://docs.medusajs.com/v2/advanced-development/modules/remote-query).\n\n","link":"../../../../core_flows.Steps_Common/page.mdx#useremotequerystep","depth":1},{"type":"step","name":"validateCartShippingOptionsStep","description":"This step validates shipping options to ensure they can be applied on a cart.","link":"../../../../core_flows.Steps_Cart/page.mdx#validatecartshippingoptionsstep","depth":2},{"type":"step","name":"useRemoteQueryStep","description":"This step fetches data across modules using the remote query.\n\nLearn more in the [Remote Query documentation](https://docs.medusajs.com/v2/advanced-development/modules/remote-query).\n\n","link":"../../../../core_flows.Steps_Common/page.mdx#useremotequerystep","depth":3},{"type":"step","name":"removeShippingMethodFromCartStep","description":"This step removes shipping methods from a cart.","link":"../../../../core_flows.Steps_Cart/page.mdx#removeshippingmethodfromcartstep","depth":4},{"type":"step","name":"addShippingMethodToCartStep","description":"This step adds shipping methods to a cart.","link":"../../../../core_flows.Steps_Cart/page.mdx#addshippingmethodtocartstep","depth":4},{"type":"workflow","name":"updateTaxLinesWorkflow","description":"This workflow updates a cart's tax lines.","link":"../../../../core_flows.Workflows_Cart/page.mdx#updatetaxlinesworkflow","depth":5},{"type":"workflow","name":"updateCartPromotionsWorkflow","description":"This workflow updates a cart's promotions.","link":"../../../../core_flows.Workflows_Cart/page.mdx#updatecartpromotionsworkflow","depth":6}]}} />
## Input
<TypeList types={[{"name":"AddShippingMethodToCartWorkflowInput","type":"[AddShippingMethodToCartWorkflowInput](../../../../interfaces/core_flows.AddShippingMethodToCartWorkflowInput/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"cart_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"`object`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`Record<string, unknown>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="addShippingMethodToCartWorkflow"/>
@@ -1,20 +0,0 @@
---
slug: /references/medusa-workflows/addShippingMethodToWorkflow
sidebar_label: addShippingMethodToWorkflow
---
import { TypeList, WorkflowDiagram } from "docs-ui"
# addShippingMethodToWorkflow - Medusa Workflows API Reference
This documentation provides a reference to the `addShippingMethodToWorkflow`. It belongs to the `@medusajs/medusa/core-flows` package.
This workflow adds shipping methods to a cart.
## Steps
<WorkflowDiagram workflow={{"name":"addShippingMethodToWorkflow","steps":[{"type":"step","name":"useRemoteQueryStep","description":"This step fetches data across modules using the remote query.\n\nLearn more in the [Remote Query documentation](https://docs.medusajs.com/v2/advanced-development/modules/remote-query).\n\n","link":"../../../../core_flows.Steps_Common/page.mdx#useremotequerystep","depth":1},{"type":"step","name":"validateCartShippingOptionsStep","description":"This step validates shipping options to ensure they can be applied on a cart.","link":"../../../../core_flows.Steps_Cart/page.mdx#validatecartshippingoptionsstep","depth":2},{"type":"step","name":"useRemoteQueryStep","description":"This step fetches data across modules using the remote query.\n\nLearn more in the [Remote Query documentation](https://docs.medusajs.com/v2/advanced-development/modules/remote-query).\n\n","link":"../../../../core_flows.Steps_Common/page.mdx#useremotequerystep","depth":3},{"type":"step","name":"removeShippingMethodFromCartStep","description":"This step removes shipping methods from a cart.","link":"../../../../core_flows.Steps_Cart/page.mdx#removeshippingmethodfromcartstep","depth":4},{"type":"step","name":"addShippingMethodToCartStep","description":"This step adds shipping methods to a cart.","link":"../../../../core_flows.Steps_Cart/page.mdx#addshippingmethodtocartstep","depth":4},{"type":"workflow","name":"updateTaxLinesWorkflow","description":"This workflow updates a cart's tax lines.","link":"../../../../core_flows.Workflows_Cart/page.mdx#updatetaxlinesworkflow","depth":5},{"type":"workflow","name":"updateCartPromotionsWorkflow","description":"This workflow updates a cart's promotions.","link":"../../../../core_flows.Workflows_Cart/page.mdx#updatecartpromotionsworkflow","depth":6}]}} />
## Input
<TypeList types={[{"name":"AddShippingMethodToCartWorkflowInput","type":"[AddShippingMethodToCartWorkflowInput](../../../../interfaces/core_flows.AddShippingMethodToCartWorkflowInput/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"cart_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"`object`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`Record<string, unknown>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="addShippingMethodToWorkflow"/>
@@ -2,17 +2,17 @@ import { TypeList, WorkflowDiagram } from "docs-ui"
# Workflows\_Cart
## addShippingMethodToWorkflow
## addShippingMethodToCartWorkflow
This workflow adds shipping methods to a cart.
### Steps
<WorkflowDiagram workflow={{"name":"addShippingMethodToWorkflow","steps":[{"type":"step","name":"useRemoteQueryStep","description":"This step fetches data across modules using the remote query.\n\nLearn more in the [Remote Query documentation](https://docs.medusajs.com/v2/advanced-development/modules/remote-query).\n\n","link":"../../core_flows.Steps_Common/page.mdx#useremotequerystep","depth":1},{"type":"step","name":"validateCartShippingOptionsStep","description":"This step validates shipping options to ensure they can be applied on a cart.","link":"../../core_flows.Steps_Cart/page.mdx#validatecartshippingoptionsstep","depth":2},{"type":"step","name":"useRemoteQueryStep","description":"This step fetches data across modules using the remote query.\n\nLearn more in the [Remote Query documentation](https://docs.medusajs.com/v2/advanced-development/modules/remote-query).\n\n","link":"../../core_flows.Steps_Common/page.mdx#useremotequerystep","depth":3},{"type":"step","name":"removeShippingMethodFromCartStep","description":"This step removes shipping methods from a cart.","link":"../../core_flows.Steps_Cart/page.mdx#removeshippingmethodfromcartstep","depth":4},{"type":"step","name":"addShippingMethodToCartStep","description":"This step adds shipping methods to a cart.","link":"../../core_flows.Steps_Cart/page.mdx#addshippingmethodtocartstep","depth":4},{"type":"workflow","name":"updateTaxLinesWorkflow","description":"This workflow updates a cart's tax lines.","link":"../../core_flows.Workflows_Cart/page.mdx#updatetaxlinesworkflow","depth":5},{"type":"workflow","name":"updateCartPromotionsWorkflow","description":"This workflow updates a cart's promotions.","link":"../../core_flows.Workflows_Cart/page.mdx#updatecartpromotionsworkflow","depth":6}]}} />
<WorkflowDiagram workflow={{"name":"addShippingMethodToCartWorkflow","steps":[{"type":"step","name":"useRemoteQueryStep","description":"This step fetches data across modules using the remote query.\n\nLearn more in the [Remote Query documentation](https://docs.medusajs.com/v2/advanced-development/modules/remote-query).\n\n","link":"../../core_flows.Steps_Common/page.mdx#useremotequerystep","depth":1},{"type":"step","name":"validateCartShippingOptionsStep","description":"This step validates shipping options to ensure they can be applied on a cart.","link":"../../core_flows.Steps_Cart/page.mdx#validatecartshippingoptionsstep","depth":2},{"type":"step","name":"useRemoteQueryStep","description":"This step fetches data across modules using the remote query.\n\nLearn more in the [Remote Query documentation](https://docs.medusajs.com/v2/advanced-development/modules/remote-query).\n\n","link":"../../core_flows.Steps_Common/page.mdx#useremotequerystep","depth":3},{"type":"step","name":"removeShippingMethodFromCartStep","description":"This step removes shipping methods from a cart.","link":"../../core_flows.Steps_Cart/page.mdx#removeshippingmethodfromcartstep","depth":4},{"type":"step","name":"addShippingMethodToCartStep","description":"This step adds shipping methods to a cart.","link":"../../core_flows.Steps_Cart/page.mdx#addshippingmethodtocartstep","depth":4},{"type":"workflow","name":"updateTaxLinesWorkflow","description":"This workflow updates a cart's tax lines.","link":"../../core_flows.Workflows_Cart/page.mdx#updatetaxlinesworkflow","depth":5},{"type":"workflow","name":"updateCartPromotionsWorkflow","description":"This workflow updates a cart's promotions.","link":"../../core_flows.Workflows_Cart/page.mdx#updatecartpromotionsworkflow","depth":6}]}} />
### Input
<TypeList types={[{"name":"AddShippingMethodToCartWorkflowInput","type":"[AddShippingMethodToCartWorkflowInput](../../interfaces/core_flows.AddShippingMethodToCartWorkflowInput/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"cart_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"`object`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`Record<string, unknown>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="addShippingMethodToWorkflow"/>
<TypeList types={[{"name":"AddShippingMethodToCartWorkflowInput","type":"[AddShippingMethodToCartWorkflowInput](../../interfaces/core_flows.AddShippingMethodToCartWorkflowInput/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"cart_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"`object`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`Record<string, unknown>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="addShippingMethodToCartWorkflow"/>
___
@@ -84,17 +84,17 @@ ___
___
## addShippingMethodToWorkflow
## addShippingMethodToCartWorkflow
This workflow adds shipping methods to a cart.
### Steps
<WorkflowDiagram workflow={{"name":"addShippingMethodToWorkflow","steps":[{"type":"step","name":"useRemoteQueryStep","description":"This step fetches data across modules using the remote query.\n\nLearn more in the [Remote Query documentation](https://docs.medusajs.com/v2/advanced-development/modules/remote-query).\n\n","link":"../core_flows.Steps_Common/page.mdx#useremotequerystep","depth":1},{"type":"step","name":"validateCartShippingOptionsStep","description":"This step validates shipping options to ensure they can be applied on a cart.","link":"../core_flows.Steps_Cart/page.mdx#validatecartshippingoptionsstep","depth":2},{"type":"step","name":"useRemoteQueryStep","description":"This step fetches data across modules using the remote query.\n\nLearn more in the [Remote Query documentation](https://docs.medusajs.com/v2/advanced-development/modules/remote-query).\n\n","link":"../core_flows.Steps_Common/page.mdx#useremotequerystep","depth":3},{"type":"step","name":"removeShippingMethodFromCartStep","description":"This step removes shipping methods from a cart.","link":"../core_flows.Steps_Cart/page.mdx#removeshippingmethodfromcartstep","depth":4},{"type":"step","name":"addShippingMethodToCartStep","description":"This step adds shipping methods to a cart.","link":"../core_flows.Steps_Cart/page.mdx#addshippingmethodtocartstep","depth":4},{"type":"workflow","name":"updateTaxLinesWorkflow","description":"This workflow updates a cart's tax lines.","link":"page.mdx#updatetaxlinesworkflow","depth":5},{"type":"workflow","name":"updateCartPromotionsWorkflow","description":"This workflow updates a cart's promotions.","link":"page.mdx#updatecartpromotionsworkflow","depth":6}]}} />
<WorkflowDiagram workflow={{"name":"addShippingMethodToCartWorkflow","steps":[{"type":"step","name":"useRemoteQueryStep","description":"This step fetches data across modules using the remote query.\n\nLearn more in the [Remote Query documentation](https://docs.medusajs.com/v2/advanced-development/modules/remote-query).\n\n","link":"../core_flows.Steps_Common/page.mdx#useremotequerystep","depth":1},{"type":"step","name":"validateCartShippingOptionsStep","description":"This step validates shipping options to ensure they can be applied on a cart.","link":"../core_flows.Steps_Cart/page.mdx#validatecartshippingoptionsstep","depth":2},{"type":"step","name":"useRemoteQueryStep","description":"This step fetches data across modules using the remote query.\n\nLearn more in the [Remote Query documentation](https://docs.medusajs.com/v2/advanced-development/modules/remote-query).\n\n","link":"../core_flows.Steps_Common/page.mdx#useremotequerystep","depth":3},{"type":"step","name":"removeShippingMethodFromCartStep","description":"This step removes shipping methods from a cart.","link":"../core_flows.Steps_Cart/page.mdx#removeshippingmethodfromcartstep","depth":4},{"type":"step","name":"addShippingMethodToCartStep","description":"This step adds shipping methods to a cart.","link":"../core_flows.Steps_Cart/page.mdx#addshippingmethodtocartstep","depth":4},{"type":"workflow","name":"updateTaxLinesWorkflow","description":"This workflow updates a cart's tax lines.","link":"page.mdx#updatetaxlinesworkflow","depth":5},{"type":"workflow","name":"updateCartPromotionsWorkflow","description":"This workflow updates a cart's promotions.","link":"page.mdx#updatecartpromotionsworkflow","depth":6}]}} />
### Input
<TypeList types={[{"name":"AddShippingMethodToCartWorkflowInput","type":"[AddShippingMethodToCartWorkflowInput](../interfaces/core_flows.AddShippingMethodToCartWorkflowInput/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"cart_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"`object`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`Record<string, unknown>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="addShippingMethodToWorkflow"/>
<TypeList types={[{"name":"AddShippingMethodToCartWorkflowInput","type":"[AddShippingMethodToCartWorkflowInput](../interfaces/core_flows.AddShippingMethodToCartWorkflowInput/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"cart_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"`object`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`Record<string, unknown>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="addShippingMethodToCartWorkflow"/>
___
@@ -197,7 +197,7 @@ This exports the module's definition, indicating that the `MyFileProviderService
## 4. Use Module
To use your File Module Provider, add it to the `providers` array of the File Module:
To use your File Module Provider, add it to the `providers` array of the File Module in `medusa-config.ts`:
<Note>
@@ -205,15 +205,15 @@ The File Module accepts one provider only.
</Note>
```js title="medusa-config.js"
const { Modules } = require("@medusajs/framework/utils")
```ts title="medusa-config.ts"
import { Modules } from "@medusajs/framework/utils"
// ...
module.exports = defineConfig({
// ...
modules: {
[Modules.FILE]: {
modules: [
{
resolve: "@medusajs/framework/file",
options: {
providers: [
@@ -227,7 +227,7 @@ module.exports = defineConfig({
],
},
},
}
]
})
```
@@ -0,0 +1,40 @@
---
displayed_sidebar: fulfillmentReference
slug: /references/fulfillment/validateFulfillmentData
sidebar_label: validateFulfillmentData
---
import { TypeList } from "docs-ui"
# validateFulfillmentData - Fulfillment Module Reference
This documentation provides a reference to the `validateFulfillmentData` method. This belongs to the Fulfillment Module.
This method validates fulfillment data with the provider it belongs to.
e.g. if the shipping option requires a drop point, the data you pass to create the
shipping method must contain a drop point ID. This method can be used to
validate that.
## Example
```ts
const isValid =
await fulfillmentModuleService.validateFulfillmentData(
"webshipper",
{
requires_drop_point: true,
},
{
drop_point_id: "dp_123",
},
{}
)
```
## Parameters
<TypeList types={[{"name":"providerId","type":"`string`","description":"The fulfillment provider's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"optionData","type":"`Record<string, unknown>`","description":"The fulfillment option data to validate.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`Record<string, unknown>`","description":"The fulfillment data to validate.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"`Record<string, unknown>`","description":"The context to validate the fulfillment option data in.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="validateFulfillmentData"/>
## Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;Record&#60;string, unknown&#62;&#62;","optional":false,"defaultValue":"","description":"Whether the fulfillment option data is valid with the specified provider.","expandable":false,"children":[{"name":"Record","type":"`Record<string, unknown>`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"string","type":"`string`","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="validateFulfillmentData"/>
@@ -76,5 +76,6 @@ The main service interface for the Fulfillment Module.
- [cancelFulfillment](../../IFulfillmentModuleService/methods/fulfillment.IFulfillmentModuleService.cancelFulfillment/page.mdx)
- [retrieveFulfillmentOptions](../../IFulfillmentModuleService/methods/fulfillment.IFulfillmentModuleService.retrieveFulfillmentOptions/page.mdx)
- [validateFulfillmentOption](../../IFulfillmentModuleService/methods/fulfillment.IFulfillmentModuleService.validateFulfillmentOption/page.mdx)
- [validateFulfillmentData](../../IFulfillmentModuleService/methods/fulfillment.IFulfillmentModuleService.validateFulfillmentData/page.mdx)
- [validateShippingOption](../../IFulfillmentModuleService/methods/fulfillment.IFulfillmentModuleService.validateShippingOption/page.mdx)
- [listFulfillmentProviders](../../IFulfillmentModuleService/methods/fulfillment.IFulfillmentModuleService.listFulfillmentProviders/page.mdx)
@@ -142,7 +142,7 @@ class MyFulfillmentProviderService extends AbstractFulfillmentProviderService {
#### Parameters
<TypeList types={[{"name":"optionData","type":"`any`","description":"The `data` property of the shipping option.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`any`","description":"The `data` property of the shipping method.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"`any`","description":"Context details, such as context of the cart or customer.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="validateFulfillmentData"/>
<TypeList types={[{"name":"optionData","type":"`Record<string, unknown>`","description":"The `data` property of the shipping option.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`Record<string, unknown>`","description":"The `data` property of the shipping method.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"`Record<string, unknown>`","description":"Context details, such as context of the cart or customer.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="validateFulfillmentData"/>
#### Returns
@@ -168,7 +168,7 @@ class MyFulfillmentProviderService extends AbstractFulfillmentProviderService {
#### Parameters
<TypeList types={[{"name":"data","type":"`any`","description":"The data to validate.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="validateOption"/>
<TypeList types={[{"name":"data","type":"`Record<string, unknown>`","description":"The data to validate.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="validateOption"/>
#### Returns
@@ -192,7 +192,7 @@ class MyFulfillmentProviderService extends AbstractFulfillmentProviderService {
#### Parameters
<TypeList types={[{"name":"data","type":"`any`","description":"The `data` property of the shipping option.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="canCalculate"/>
<TypeList types={[{"name":"data","type":"`Record<string, unknown>`","description":"The `data` property of the shipping option.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="canCalculate"/>
#### Returns
@@ -222,7 +222,7 @@ class MyFulfillmentProviderService extends AbstractFulfillmentProviderService {
#### Parameters
<TypeList types={[{"name":"optionData","type":"`any`","description":"The `data` property of a shipping option.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`any`","description":"If the price is calculated for a shipping option, it's the `data` of the shipping option. Otherwise, it's the `data of the shipping method.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"cart","type":"`any`","description":"The cart details.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="calculatePrice"/>
<TypeList types={[{"name":"optionData","type":"`Record<string, unknown>`","description":"The `data` property of a shipping option.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`Record<string, unknown>`","description":"If the price is calculated for a shipping option, it's the `data` of the shipping option. Otherwise, it's the `data of the shipping method.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"`Record<string, unknown>`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="calculatePrice"/>
#### Returns
@@ -268,7 +268,7 @@ class MyFulfillmentProviderService extends AbstractFulfillmentProviderService {
#### Parameters
<TypeList types={[{"name":"data","type":"`any`","description":"The `data` property of the shipping method this fulfillment is created for.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"`any`","description":"The items in the fulfillment.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"`any`","description":"The order this fulfillment is created for.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment","type":"`any`","description":"The fulfillment's details.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createFulfillment"/>
<TypeList types={[{"name":"data","type":"`object`","description":"The `data` property of the shipping method this fulfillment is created for.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"`object`[]","description":"The items in the fulfillment.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"`undefined` \\| `object`","description":"The order this fulfillment is created for.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment","type":"`Record<string, unknown>`","description":"The fulfillment's details.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createFulfillment"/>
#### Returns
@@ -294,7 +294,7 @@ class MyFulfillmentProviderService extends AbstractFulfillmentProviderService {
#### Parameters
<TypeList types={[{"name":"fulfillment","type":"`any`","description":"The fulfillment's details.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="cancelFulfillment"/>
<TypeList types={[{"name":"fulfillment","type":"`Record<string, unknown>`","description":"The fulfillment's details.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="cancelFulfillment"/>
#### Returns
@@ -319,7 +319,7 @@ class MyFulfillmentProviderService extends AbstractFulfillmentProviderService {
#### Parameters
<TypeList types={[{"name":"data","type":"`any`","description":"The `data` property of the fulfillment.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="getFulfillmentDocuments"/>
<TypeList types={[{"name":"data","type":"`Record<string, unknown>`","description":"The `data` property of the fulfillment.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="getFulfillmentDocuments"/>
#### Returns
@@ -359,7 +359,7 @@ class MyFulfillmentProviderService extends AbstractFulfillmentProviderService {
#### Parameters
<TypeList types={[{"name":"fulfillment","type":"`any`","description":"The fulfillment's details.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createReturnFulfillment"/>
<TypeList types={[{"name":"fulfillment","type":"`Record<string, unknown>`","description":"The fulfillment's details.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createReturnFulfillment"/>
#### Returns
@@ -384,7 +384,7 @@ class MyFulfillmentProviderService extends AbstractFulfillmentProviderService {
#### Parameters
<TypeList types={[{"name":"data","type":"`any`","description":"The `data` property of the fulfillment.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="getReturnDocuments"/>
<TypeList types={[{"name":"data","type":"`Record<string, unknown>`","description":"The `data` property of the fulfillment.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="getReturnDocuments"/>
#### Returns
@@ -409,7 +409,7 @@ class MyFulfillmentProviderService extends AbstractFulfillmentProviderService {
#### Parameters
<TypeList types={[{"name":"data","type":"`any`","description":"The `data` property of the shipmnet.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="getShipmentDocuments"/>
<TypeList types={[{"name":"data","type":"`Record<string, unknown>`","description":"The `data` property of the shipmnet.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="getShipmentDocuments"/>
#### Returns
@@ -440,7 +440,7 @@ class MyFulfillmentProviderService extends AbstractFulfillmentProviderService {
#### Parameters
<TypeList types={[{"name":"fulfillmentData","type":"`any`","description":"The `data` property of the fulfillment.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"documentType","type":"`any`","description":"The document's type. For example, `invoice`.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="retrieveDocuments"/>
<TypeList types={[{"name":"fulfillmentData","type":"`Record<string, unknown>`","description":"The `data` property of the fulfillment.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"documentType","type":"`string`","description":"The document's type. For example, `invoice`.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="retrieveDocuments"/>
#### Returns
@@ -466,17 +466,17 @@ This exports the module's definition, indicating that the `MyFulfillmentProvider
## 4. Use Module
To use your Fulfillment Module Provider, add it to the `providers` array of the Fulfillment Module:
To use your Fulfillment Module Provider, add it to the `providers` array of the Fulfillment Module in `medusa-config.ts`:
```js title="medusa-config.js"
const { Modules } = require("@medusajs/framework/utils")
```ts title="medusa-config.ts"
import { Modules } from "@medusajs/framework/utils"
// ...
module.exports = defineConfig({
// ...
modules: {
[Modules.FULFILLMENT]: {
modules: [
{
resolve: "@medusajs/framework/fulfillment",
options: {
providers: [
@@ -490,7 +490,7 @@ module.exports = defineConfig({
],
},
},
}
]
})
```
@@ -6,7 +6,7 @@ import { TypeList } from "docs-ui"
# Configure Medusa Backend
In this document, you’ll learn how to create a file service in the Medusa backend and the methods you must implement in it.
In this document, you’ll learn how to create a file service in the Medusa application and the methods you must implement in it.
The configurations for your Medusa application are in `medusa-config.js` located in the root of your Medusa project. The configurations include configurations for database, modules, and more.
@@ -806,7 +806,7 @@ import { TypeList } from "docs-ui"
- [validateCartPaymentsStep](page.mdx#validatecartpaymentsstep)
- [validateCartShippingOptionsStep](page.mdx#validatecartshippingoptionsstep)
- [validateVariantPricesStep](page.mdx#validatevariantpricesstep)
- [addShippingMethodToWorkflow](page.mdx#addshippingmethodtoworkflow)
- [addShippingMethodToCartWorkflow](page.mdx#addshippingmethodtocartworkflow)
- [addToCartWorkflow](page.mdx#addtocartworkflow)
- [completeCartWorkflow](page.mdx#completecartworkflow)
- [confirmVariantInventoryWorkflow](page.mdx#confirmvariantinventoryworkflow)
@@ -3712,17 +3712,17 @@ This step validates the specified variant objects to ensure they have prices.
<TypeList types={[{"name":"ValidateVariantPricesStepInput","type":"[ValidateVariantPricesStepInput](../../core_flows/interfaces/core_flows.ValidateVariantPricesStepInput/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"variants","type":"`object`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"calculated_price","type":"`object`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"calculated_amount","type":"`null` \\| [BigNumberInput](../../types/types/types.BigNumberInput/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="validateVariantPricesStep"/>
### addShippingMethodToWorkflow
### addShippingMethodToCartWorkflow
This workflow adds shipping methods to a cart.
#### Steps
<undefined workflow={{"name":"addShippingMethodToWorkflow","steps":[{"type":"step","name":"useRemoteQueryStep","description":"This step fetches data across modules using the remote query.\n\nLearn more in the [Remote Query documentation](https://docs.medusajs.com/v2/advanced-development/modules/remote-query).\n\n","link":"../../core_flows/core_flows.Steps_Common/page.mdx#useremotequerystep","depth":1},{"type":"step","name":"validateCartShippingOptionsStep","description":"This step validates shipping options to ensure they can be applied on a cart.","link":"../../core_flows/core_flows.Steps_Cart/page.mdx#validatecartshippingoptionsstep","depth":2},{"type":"step","name":"useRemoteQueryStep","description":"This step fetches data across modules using the remote query.\n\nLearn more in the [Remote Query documentation](https://docs.medusajs.com/v2/advanced-development/modules/remote-query).\n\n","link":"../../core_flows/core_flows.Steps_Common/page.mdx#useremotequerystep","depth":3},{"type":"step","name":"removeShippingMethodFromCartStep","description":"This step removes shipping methods from a cart.","link":"../../core_flows/core_flows.Steps_Cart/page.mdx#removeshippingmethodfromcartstep","depth":4},{"type":"step","name":"addShippingMethodToCartStep","description":"This step adds shipping methods to a cart.","link":"../../core_flows/core_flows.Steps_Cart/page.mdx#addshippingmethodtocartstep","depth":4},{"type":"workflow","name":"updateTaxLinesWorkflow","description":"This workflow updates a cart's tax lines.","link":"../../core_flows/core_flows.Workflows_Cart/page.mdx#updatetaxlinesworkflow","depth":5},{"type":"workflow","name":"updateCartPromotionsWorkflow","description":"This workflow updates a cart's promotions.","link":"../../core_flows/core_flows.Workflows_Cart/page.mdx#updatecartpromotionsworkflow","depth":6}]}} />
<undefined workflow={{"name":"addShippingMethodToCartWorkflow","steps":[{"type":"step","name":"useRemoteQueryStep","description":"This step fetches data across modules using the remote query.\n\nLearn more in the [Remote Query documentation](https://docs.medusajs.com/v2/advanced-development/modules/remote-query).\n\n","link":"../../core_flows/core_flows.Steps_Common/page.mdx#useremotequerystep","depth":1},{"type":"step","name":"validateCartShippingOptionsStep","description":"This step validates shipping options to ensure they can be applied on a cart.","link":"../../core_flows/core_flows.Steps_Cart/page.mdx#validatecartshippingoptionsstep","depth":2},{"type":"step","name":"useRemoteQueryStep","description":"This step fetches data across modules using the remote query.\n\nLearn more in the [Remote Query documentation](https://docs.medusajs.com/v2/advanced-development/modules/remote-query).\n\n","link":"../../core_flows/core_flows.Steps_Common/page.mdx#useremotequerystep","depth":3},{"type":"step","name":"removeShippingMethodFromCartStep","description":"This step removes shipping methods from a cart.","link":"../../core_flows/core_flows.Steps_Cart/page.mdx#removeshippingmethodfromcartstep","depth":4},{"type":"step","name":"addShippingMethodToCartStep","description":"This step adds shipping methods to a cart.","link":"../../core_flows/core_flows.Steps_Cart/page.mdx#addshippingmethodtocartstep","depth":4},{"type":"workflow","name":"updateTaxLinesWorkflow","description":"This workflow updates a cart's tax lines.","link":"../../core_flows/core_flows.Workflows_Cart/page.mdx#updatetaxlinesworkflow","depth":5},{"type":"workflow","name":"updateCartPromotionsWorkflow","description":"This workflow updates a cart's promotions.","link":"../../core_flows/core_flows.Workflows_Cart/page.mdx#updatecartpromotionsworkflow","depth":6}]}} />
#### Input
<TypeList types={[{"name":"AddShippingMethodToCartWorkflowInput","type":"[AddShippingMethodToCartWorkflowInput](../../core_flows/interfaces/core_flows.AddShippingMethodToCartWorkflowInput/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"cart_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"`object`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`Record<string, unknown>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="addShippingMethodToWorkflow"/>
<TypeList types={[{"name":"AddShippingMethodToCartWorkflowInput","type":"[AddShippingMethodToCartWorkflowInput](../../core_flows/interfaces/core_flows.AddShippingMethodToCartWorkflowInput/page.mdx)","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"cart_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"`object`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`Record<string, unknown>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="addShippingMethodToCartWorkflow"/>
### addToCartWorkflow
@@ -121,7 +121,6 @@ import { TypeList } from "docs-ui"
- [CreatePriceListsWorkflowStepDTO](../../types/interfaces/types.CreatePriceListsWorkflowStepDTO/page.mdx)
- [CreatePriceListPricesWorkflowStepDTO](../../types/interfaces/types.CreatePriceListPricesWorkflowStepDTO/page.mdx)
- [ProductCategoryTransformOptions](../../types/interfaces/types.ProductCategoryTransformOptions/page.mdx)
- [SharedContext](../../types/interfaces/types.SharedContext/page.mdx)
- [MessageAggregatorFormat](../../types/interfaces/types.MessageAggregatorFormat/page.mdx)
- [IMessageAggregator](../../types/interfaces/types.IMessageAggregator/page.mdx)
- [Context](../../types/interfaces/types.Context/page.mdx)
@@ -150,7 +150,7 @@ This exports the module's definition, indicating that the `MyNotificationProvide
## 4. Use Module
To use your Notification Module Provider, add it to the `providers` array of the Notification Module:
To use your Notification Module Provider, add it to the `providers` array of the Notification Module in `medusa-config.ts`:
<Note>
@@ -158,15 +158,15 @@ The Notification Module accepts one provider per channel.
</Note>
```js title="medusa-config.js"
const { Modules } = require("@medusajs/framework/utils")
```ts title="medusa-config.ts"
import { Modules } from "@medusajs/framework/utils"
// ...
module.exports = defineConfig({
// ...
modules: {
[Modules.NOTIFICATION]: {
modules: [
{
resolve: "@medusajs/framework/notification",
options: {
providers: [
@@ -181,7 +181,7 @@ module.exports = defineConfig({
],
},
},
}
]
})
```
@@ -693,17 +693,17 @@ This exports the module's definition, indicating that the `MyPaymentProviderServ
## 4. Use Module
To use your Payment Module Provider, add it to the `providers` array of the Payment Module:
To use your Payment Module Provider, add it to the `providers` array of the Payment Module in `medusa-config.ts`:
```js title="medusa-config.js"
const { Modules } = require("@medusajs/framework/utils")
```ts title="medusa-config.ts"
import { Modules } from "@medusajs/framework/utils"
// ...
module.exports = defineConfig({
// ...
modules: {
[Modules.PAYMENT]: {
modules: [
{
resolve: "@medusajs/framework/payment",
options: {
providers: [
@@ -718,7 +718,7 @@ module.exports = defineConfig({
]
}
}
}
]
})
```
@@ -6,4 +6,4 @@ Fields that can be passed in the query parameters of a request.
## Properties
<TypeList types={[{"name":"expand","type":"`string`","description":"Comma-separated relations that should be expanded in the returned data.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"fields","type":"`string`","description":"Comma-separated fields that should be included in the returned data.\nif a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields.\nwithout prefix it will replace the entire default fields.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"offset","type":"`number`","description":"The number of items to skip when retrieving a list.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"limit","type":"`number`","description":"Limit the number of items returned in the list.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"`string`","description":"The field to sort the data by. By default, the sort order is ascending. To change the order to descending, prefix the field name with `-`.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="RequestQueryFields"/>
<TypeList types={[{"name":"fields","type":"`string`","description":"Comma-separated fields that should be included in the returned data.\nif a field is prefixed with `+` it will be added to the default fields, using `-` will remove it from the default fields.\nwithout prefix it will replace the entire default fields.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"offset","type":"`number`","description":"The number of items to skip when retrieving a list.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"limit","type":"`number`","description":"Limit the number of items returned in the list.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"`string`","description":"The field to sort the data by. By default, the sort order is ascending. To change the order to descending, prefix the field name with `-`.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="RequestQueryFields"/>
@@ -1,15 +0,0 @@
import { TypeList } from "docs-ui"
# SharedContext
:::note[Deprecated]
use `Context` instead
A context used to share resources, such as transaction manager, between the application and the module.
:::
## Properties
<TypeList types={[{"name":"transactionManager","type":"`any`","description":"An instance of a transaction manager.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"manager","type":"`any`","description":"An instance of an entity manager.","optional":true,"defaultValue":"","expandable":false,"children":[]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="SharedContext"/>
@@ -16,4 +16,4 @@ ___
### ProductEvents
`Const` **ProductEvents**: ReturnType&#60;["product", "productVariant", "productOption", "productType", "productTag", "productCategory"]&#62;
`Const` **ProductEvents**: ReturnType&#60;["product", "productVariant", "productOption", "productType", "productTag", "productCategory", "productCollection"]&#62;