docs: revise main docs outline (#10502)
This commit is contained in:
1 parent
c8cb9b5c1a
commit
0ae98c51eb
141 files changed
+814
-1181
No files matched your search
@@ -175,7 +175,7 @@ You create the `CreateForm` component. For now, it uses `useForm` from `react-ho
|
||||
|
||||
You also define a `handleSubmit` function to perform an action when the form is submitted.
|
||||
|
||||
You can replace the content of the function with sending a request to Medusa's routes. Refer to [this guide](!docs!/learn/advanced-development/admin/tips#send-requests-to-api-routes) for more details on how to do that.
|
||||
You can replace the content of the function with sending a request to Medusa's routes. Refer to [this guide](!docs!/learn/fundamentals/admin/tips#send-requests-to-api-routes) for more details on how to do that.
|
||||
|
||||
### Render Components
|
||||
|
||||
@@ -454,7 +454,7 @@ You create the `EditForm` component. For now, it uses `useForm` from `react-hook
|
||||
|
||||
You also define a `handleSubmit` function to perform an action when the form is submitted.
|
||||
|
||||
You can replace the content of the function with sending a request to Medusa's routes. Refer to [this guide](!docs!/learn/advanced-development/admin/tips#send-requests-to-api-routes) for more details on how to do that.
|
||||
You can replace the content of the function with sending a request to Medusa's routes. Refer to [this guide](!docs!/learn/fundamentals/admin/tips#send-requests-to-api-routes) for more details on how to do that.
|
||||
|
||||
### Render Components
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ Before creating an actor type, you must have a module with a data model represen
|
||||
|
||||
<Note title="Tip">
|
||||
|
||||
Learn how to create a module in [this guide](!docs!/learn/basics/modules).
|
||||
Learn how to create a module in [this guide](!docs!/learn/fundamentals/modules).
|
||||
|
||||
</Note>
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ Consider you have a Hello Module defined in the `/src/modules/hello` directory.
|
||||
|
||||
<Note title="Tip">
|
||||
|
||||
If you don't have a module, follow [this guide](!docs!/learn/basics/modules) to create one.
|
||||
If you don't have a module, follow [this guide](!docs!/learn/fundamentals/modules) to create one.
|
||||
|
||||
</Note>
|
||||
|
||||
@@ -43,7 +43,7 @@ This creates a `Custom` data model that has the `id` and `custom_name` propertie
|
||||
|
||||
<Note title="Tip">
|
||||
|
||||
Learn more about data models in [this guide](!docs!/learn/basics/modules#1-create-data-model).
|
||||
Learn more about data models in [this guide](!docs!/learn/fundamentals/modules#1-create-data-model).
|
||||
|
||||
</Note>
|
||||
|
||||
@@ -55,7 +55,7 @@ Next, you'll define a module link between the `Custom` and `Cart` data model. A
|
||||
|
||||
<Note title="Tip">
|
||||
|
||||
Learn more about module links in [this guide](!docs!/learn/advanced-development/module-links).
|
||||
Learn more about module links in [this guide](!docs!/learn/fundamentals/module-links).
|
||||
|
||||
</Note>
|
||||
|
||||
@@ -82,7 +82,7 @@ This defines a link between the `Cart` and `Custom` data models. Using this link
|
||||
items={[
|
||||
{
|
||||
text: "Module must be registered in medusa-config.ts",
|
||||
link: "!docs!/learn/basics/modules#4-add-module-to-configurations"
|
||||
link: "!docs!/learn/fundamentals/modules#4-add-module-to-configurations"
|
||||
}
|
||||
]}
|
||||
/>
|
||||
@@ -115,7 +115,7 @@ To do that, you'll consume the [cartCreated](/references/medusa-workflows/create
|
||||
|
||||
<Note title="Tip">
|
||||
|
||||
Learn more about workflow hooks in [this guide](!docs!/learn/advanced-development/workflows/workflow-hooks).
|
||||
Learn more about workflow hooks in [this guide](!docs!/learn/fundamentals/workflows/workflow-hooks).
|
||||
|
||||
</Note>
|
||||
|
||||
@@ -150,7 +150,7 @@ In the snippet above, you add a validation rule indicating that `custom_name` is
|
||||
|
||||
<Note title="Tip">
|
||||
|
||||
Learn more about additional data validation in [this guide](!docs!/learn/advanced-development/api-routes/additional-data).
|
||||
Learn more about additional data validation in [this guide](!docs!/learn/fundamentals/api-routes/additional-data).
|
||||
|
||||
</Note>
|
||||
|
||||
@@ -202,7 +202,7 @@ In the compensation function that undoes the step's actions in case of an error,
|
||||
|
||||
<Note title="Tip">
|
||||
|
||||
Learn more about compensation functions in [this guide](!docs!/learn/advanced-development/workflows/compensation-function).
|
||||
Learn more about compensation functions in [this guide](!docs!/learn/fundamentals/workflows/compensation-function).
|
||||
|
||||
</Note>
|
||||
|
||||
@@ -260,9 +260,9 @@ The workflow accepts as an input the created cart and the `additional_data` para
|
||||
|
||||
In the workflow, you:
|
||||
|
||||
1. Use the `transform` utility to get the value of `custom_name` based on whether it's set in `additional_data`. Learn more about why you can't use conditional operators in a workflow without using `transform` in [this guide](!docs!/learn/advanced-development/workflows/conditions#why-if-conditions-arent-allowed-in-workflows).
|
||||
1. Use the `transform` utility to get the value of `custom_name` based on whether it's set in `additional_data`. Learn more about why you can't use conditional operators in a workflow without using `transform` in [this guide](!docs!/learn/fundamentals/workflows/conditions#why-if-conditions-arent-allowed-in-workflows).
|
||||
2. Create the `Custom` record using the `createCustomStep`.
|
||||
3. Use the `when-then` utility to link the cart to the `Custom` record if it was created. Learn more about why you can't use if-then conditions in a workflow without using `when-then` in [this guide](!docs!/learn/advanced-development/workflows/conditions#why-if-conditions-arent-allowed-in-workflows).
|
||||
3. Use the `when-then` utility to link the cart to the `Custom` record if it was created. Learn more about why you can't use if-then conditions in a workflow without using `when-then` in [this guide](!docs!/learn/fundamentals/workflows/conditions#why-if-conditions-arent-allowed-in-workflows).
|
||||
|
||||
You'll next call the workflow in the hook handler.
|
||||
|
||||
@@ -355,7 +355,7 @@ Among the returned `cart` object, you'll find a `custom` property which holds th
|
||||
|
||||
### Retrieve using Query
|
||||
|
||||
You can also retrieve the `Custom` record linked to a cart in your code using [Query](!docs!/learn/advanced-development/module-links/query).
|
||||
You can also retrieve the `Custom` record linked to a cart in your code using [Query](!docs!/learn/fundamentals/module-links/query).
|
||||
|
||||
For example:
|
||||
|
||||
@@ -369,7 +369,7 @@ const { data: [cart] } = await query.graph({
|
||||
})
|
||||
```
|
||||
|
||||
Learn more about how to use Query in [this guide](!docs!/learn/advanced-development/module-links/query).
|
||||
Learn more about how to use Query in [this guide](!docs!/learn/fundamentals/module-links/query).
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ Consider you have a Hello Module defined in the `/src/modules/hello` directory.
|
||||
|
||||
<Note title="Tip">
|
||||
|
||||
If you don't have a module, follow [this guide](!docs!/learn/basics/modules) to create one.
|
||||
If you don't have a module, follow [this guide](!docs!/learn/fundamentals/modules) to create one.
|
||||
|
||||
</Note>
|
||||
|
||||
@@ -49,7 +49,7 @@ This creates a `Custom` data model that has the `id` and `custom_name` propertie
|
||||
|
||||
<Note title="Tip">
|
||||
|
||||
Learn more about data models in [this guide](!docs!/learn/basics/modules#1-create-data-model).
|
||||
Learn more about data models in [this guide](!docs!/learn/fundamentals/modules#1-create-data-model).
|
||||
|
||||
</Note>
|
||||
|
||||
@@ -61,7 +61,7 @@ Next, you'll define a module link between the `Custom` and `Customer` data model
|
||||
|
||||
<Note title="Tip">
|
||||
|
||||
Learn more about module links in [this guide](!docs!/learn/advanced-development/module-links).
|
||||
Learn more about module links in [this guide](!docs!/learn/fundamentals/module-links).
|
||||
|
||||
</Note>
|
||||
|
||||
@@ -88,7 +88,7 @@ This defines a link between the `Customer` and `Custom` data models. Using this
|
||||
items={[
|
||||
{
|
||||
text: "Module must be registered in medusa-config.ts",
|
||||
link: "!docs!/learn/basics/modules#4-add-module-to-configurations"
|
||||
link: "!docs!/learn/fundamentals/modules#4-add-module-to-configurations"
|
||||
}
|
||||
]}
|
||||
/>
|
||||
@@ -121,7 +121,7 @@ To do that, you'll consume the [customersCreated](/resources/references/medusa-w
|
||||
|
||||
<Note title="Tip">
|
||||
|
||||
Learn more about workflow hooks in [this guide](!docs!/learn/advanced-development/workflows/workflow-hooks).
|
||||
Learn more about workflow hooks in [this guide](!docs!/learn/fundamentals/workflows/workflow-hooks).
|
||||
|
||||
</Note>
|
||||
|
||||
@@ -156,7 +156,7 @@ In the snippet above, you add a validation rule indicating that `custom_name` is
|
||||
|
||||
<Note title="Tip">
|
||||
|
||||
Learn more about additional data validation in [this guide](!docs!/learn/advanced-development/api-routes/additional-data).
|
||||
Learn more about additional data validation in [this guide](!docs!/learn/fundamentals/api-routes/additional-data).
|
||||
|
||||
</Note>
|
||||
|
||||
@@ -208,7 +208,7 @@ In the compensation function that undoes the step's actions in case of an error,
|
||||
|
||||
<Note title="Tip">
|
||||
|
||||
Learn more about compensation functions in [this guide](!docs!/learn/advanced-development/workflows/compensation-function).
|
||||
Learn more about compensation functions in [this guide](!docs!/learn/fundamentals/workflows/compensation-function).
|
||||
|
||||
</Note>
|
||||
|
||||
@@ -266,9 +266,9 @@ The workflow accepts as an input the created customer and the `additional_data`
|
||||
|
||||
In the workflow, you:
|
||||
|
||||
1. Use the `transform` utility to get the value of `custom_name` based on whether it's set in `additional_data`. Learn more about why you can't use conditional operators in a workflow without using `transform` in [this guide](!docs!/learn/advanced-development/workflows/conditions#why-if-conditions-arent-allowed-in-workflows).
|
||||
1. Use the `transform` utility to get the value of `custom_name` based on whether it's set in `additional_data`. Learn more about why you can't use conditional operators in a workflow without using `transform` in [this guide](!docs!/learn/fundamentals/workflows/conditions#why-if-conditions-arent-allowed-in-workflows).
|
||||
2. Create the `Custom` record using the `createCustomStep`.
|
||||
3. Use the `when-then` utility to link the customer to the `Custom` record if it was created. Learn more about why you can't use if-then conditions in a workflow without using `when-then` in [this guide](!docs!/learn/advanced-development/workflows/conditions#why-if-conditions-arent-allowed-in-workflows).
|
||||
3. Use the `when-then` utility to link the customer to the `Custom` record if it was created. Learn more about why you can't use if-then conditions in a workflow without using `when-then` in [this guide](!docs!/learn/fundamentals/workflows/conditions#why-if-conditions-arent-allowed-in-workflows).
|
||||
|
||||
You'll next execute the workflow in the hook handler.
|
||||
|
||||
@@ -367,7 +367,7 @@ Among the returned `customer` object, you'll find a `custom` property which hold
|
||||
|
||||
### Retrieve using Query
|
||||
|
||||
You can also retrieve the `Custom` record linked to a customer in your code using [Query](!docs!/learn/advanced-development/module-links/query).
|
||||
You can also retrieve the `Custom` record linked to a customer in your code using [Query](!docs!/learn/fundamentals/module-links/query).
|
||||
|
||||
For example:
|
||||
|
||||
@@ -381,7 +381,7 @@ const { data: [customer] } = await query.graph({
|
||||
})
|
||||
```
|
||||
|
||||
Learn more about how to use Query in [this guide](!docs!/learn/advanced-development/module-links/query).
|
||||
Learn more about how to use Query in [this guide](!docs!/learn/fundamentals/module-links/query).
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -66,7 +66,7 @@ remoteLink.create({
|
||||
|
||||
<Note title="Tip">
|
||||
|
||||
Learn more about the remote link in [this documentation](!docs!/learn/advanced-development/module-links/remote-link).
|
||||
Learn more about the remote link in [this documentation](!docs!/learn/fundamentals/module-links/remote-link).
|
||||
|
||||
</Note>
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ Consider you have a Hello Module defined in the `/src/modules/hello` directory.
|
||||
|
||||
<Note title="Tip">
|
||||
|
||||
If you don't have a module, follow [this guide](!docs!/learn/basics/modules) to create one.
|
||||
If you don't have a module, follow [this guide](!docs!/learn/fundamentals/modules) to create one.
|
||||
|
||||
</Note>
|
||||
|
||||
@@ -49,7 +49,7 @@ This creates a `Custom` data model that has the `id` and `custom_name` propertie
|
||||
|
||||
<Note title="Tip">
|
||||
|
||||
Learn more about data models in [this guide](!docs!/learn/basics/modules#1-create-data-model).
|
||||
Learn more about data models in [this guide](!docs!/learn/fundamentals/modules#1-create-data-model).
|
||||
|
||||
</Note>
|
||||
|
||||
@@ -61,7 +61,7 @@ Next, you'll define a module link between the `Custom` and `Product` data model.
|
||||
|
||||
<Note title="Tip">
|
||||
|
||||
Learn more about module links in [this guide](!docs!/learn/advanced-development/module-links).
|
||||
Learn more about module links in [this guide](!docs!/learn/fundamentals/module-links).
|
||||
|
||||
</Note>
|
||||
|
||||
@@ -88,7 +88,7 @@ This defines a link between the `Product` and `Custom` data models. Using this l
|
||||
items={[
|
||||
{
|
||||
text: "Module must be registered in medusa-config.js",
|
||||
link: "!docs!/learn/basics/modules#4-add-module-to-configurations"
|
||||
link: "!docs!/learn/fundamentals/modules#4-add-module-to-configurations"
|
||||
}
|
||||
]}
|
||||
/>
|
||||
@@ -121,7 +121,7 @@ To do that, you'll consume the [productsCreated](/references/medusa-workflows/cr
|
||||
|
||||
<Note title="Tip">
|
||||
|
||||
Learn more about workflow hooks in [this guide](!docs!/learn/advanced-development/workflows/workflow-hooks).
|
||||
Learn more about workflow hooks in [this guide](!docs!/learn/fundamentals/workflows/workflow-hooks).
|
||||
|
||||
</Note>
|
||||
|
||||
@@ -156,7 +156,7 @@ In the snippet above, you add a validation rule indicating that `custom_name` is
|
||||
|
||||
<Note title="Tip">
|
||||
|
||||
Learn more about additional data validation in [this guide](!docs!/learn/advanced-development/api-routes/additional-data).
|
||||
Learn more about additional data validation in [this guide](!docs!/learn/fundamentals/api-routes/additional-data).
|
||||
|
||||
</Note>
|
||||
|
||||
@@ -208,7 +208,7 @@ In the compensation function that undoes the step's actions in case of an error,
|
||||
|
||||
<Note title="Tip">
|
||||
|
||||
Learn more about compensation functions in [this guide](!docs!/learn/advanced-development/workflows/compensation-function).
|
||||
Learn more about compensation functions in [this guide](!docs!/learn/fundamentals/workflows/compensation-function).
|
||||
|
||||
</Note>
|
||||
|
||||
@@ -266,9 +266,9 @@ The workflow accepts as an input the created product and the `additional_data` p
|
||||
|
||||
In the workflow, you:
|
||||
|
||||
1. Use the `transform` utility to get the value of `custom_name` based on whether it's set in `additional_data`. Learn more about why you can't use conditional operators in a workflow without using `transform` in [this guide](!docs!/learn/advanced-development/workflows/conditions#why-if-conditions-arent-allowed-in-workflows).
|
||||
1. Use the `transform` utility to get the value of `custom_name` based on whether it's set in `additional_data`. Learn more about why you can't use conditional operators in a workflow without using `transform` in [this guide](!docs!/learn/fundamentals/workflows/conditions#why-if-conditions-arent-allowed-in-workflows).
|
||||
2. Create the `Custom` record using the `createCustomStep`.
|
||||
3. Use the `when-then` utility to link the product to the `Custom` record if it was created. Learn more about why you can't use if-then conditions in a workflow without using `when-then` in [this guide](!docs!/learn/advanced-development/workflows/conditions#why-if-conditions-arent-allowed-in-workflows).
|
||||
3. Use the `when-then` utility to link the product to the `Custom` record if it was created. Learn more about why you can't use if-then conditions in a workflow without using `when-then` in [this guide](!docs!/learn/fundamentals/workflows/conditions#why-if-conditions-arent-allowed-in-workflows).
|
||||
|
||||
You'll next execute the workflow in the hook handler.
|
||||
|
||||
@@ -373,7 +373,7 @@ Among the returned `product` object, you'll find a `custom` property which holds
|
||||
|
||||
### Retrieve using Query
|
||||
|
||||
You can also retrieve the `Custom` record linked to a product in your code using [Query](!docs!/learn/advanced-development/module-links/query).
|
||||
You can also retrieve the `Custom` record linked to a product in your code using [Query](!docs!/learn/fundamentals/module-links/query).
|
||||
|
||||
For example:
|
||||
|
||||
@@ -387,7 +387,7 @@ const { data: [product] } = await query.graph({
|
||||
})
|
||||
```
|
||||
|
||||
Learn more about how to use Query in [this guide](!docs!/learn/advanced-development/module-links/query).
|
||||
Learn more about how to use Query in [this guide](!docs!/learn/fundamentals/module-links/query).
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ In this document, you'll learn how to calculate a product variant's price with t
|
||||
|
||||
You'll need the following resources for the taxes calculation:
|
||||
|
||||
1. [Query](!docs!/learn/advanced-development/module-links/query) to retrieve the product's variants' prices for a context. Learn more about that in [this guide](../price/page.mdx).
|
||||
1. [Query](!docs!/learn/fundamentals/module-links/query) to retrieve the product's variants' prices for a context. Learn more about that in [this guide](../price/page.mdx).
|
||||
2. The Tax Module's main service to get the tax lines for each product.
|
||||
|
||||
```ts
|
||||
|
||||
@@ -8,7 +8,7 @@ export const metadata = {
|
||||
|
||||
# {metadata.title}
|
||||
|
||||
In this document, you'll learn how to retrieve product variant prices in the Medusa application using [Query](!docs!/learn/advanced-development/module-links/query).
|
||||
In this document, you'll learn how to retrieve product variant prices in the Medusa application using [Query](!docs!/learn/fundamentals/module-links/query).
|
||||
|
||||
<Note title="Why use Query?">
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ Consider you have a Hello Module defined in the `/src/modules/hello` directory.
|
||||
|
||||
<Note title="Tip">
|
||||
|
||||
If you don't have a module, follow [this guide](!docs!/learn/basics/modules) to create one.
|
||||
If you don't have a module, follow [this guide](!docs!/learn/fundamentals/modules) to create one.
|
||||
|
||||
</Note>
|
||||
|
||||
@@ -49,7 +49,7 @@ This creates a `Custom` data model that has the `id` and `custom_name` propertie
|
||||
|
||||
<Note title="Tip">
|
||||
|
||||
Learn more about data models in [this guide](!docs!/learn/basics/modules#1-create-data-model).
|
||||
Learn more about data models in [this guide](!docs!/learn/fundamentals/modules#1-create-data-model).
|
||||
|
||||
</Note>
|
||||
|
||||
@@ -61,7 +61,7 @@ Next, you'll define a module link between the `Custom` and `Promotion` data mode
|
||||
|
||||
<Note title="Tip">
|
||||
|
||||
Learn more about module links in [this guide](!docs!/learn/advanced-development/module-links).
|
||||
Learn more about module links in [this guide](!docs!/learn/fundamentals/module-links).
|
||||
|
||||
</Note>
|
||||
|
||||
@@ -88,7 +88,7 @@ This defines a link between the `Promotion` and `Custom` data models. Using this
|
||||
items={[
|
||||
{
|
||||
text: "Module must be registered in medusa-config.js",
|
||||
link: "!docs!/learn/basics/modules#4-add-module-to-configurations"
|
||||
link: "!docs!/learn/fundamentals/modules#4-add-module-to-configurations"
|
||||
}
|
||||
]}
|
||||
/>
|
||||
@@ -121,7 +121,7 @@ To do that, you'll consume the [promotionsCreated](/references/medusa-workflows/
|
||||
|
||||
<Note title="Tip">
|
||||
|
||||
Learn more about workflow hooks in [this guide](!docs!/learn/advanced-development/workflows/workflow-hooks).
|
||||
Learn more about workflow hooks in [this guide](!docs!/learn/fundamentals/workflows/workflow-hooks).
|
||||
|
||||
</Note>
|
||||
|
||||
@@ -156,7 +156,7 @@ In the snippet above, you add a validation rule indicating that `custom_name` is
|
||||
|
||||
<Note title="Tip">
|
||||
|
||||
Learn more about additional data validation in [this guide](!docs!/learn/advanced-development/api-routes/additional-data).
|
||||
Learn more about additional data validation in [this guide](!docs!/learn/fundamentals/api-routes/additional-data).
|
||||
|
||||
</Note>
|
||||
|
||||
@@ -208,7 +208,7 @@ In the compensation function that undoes the step's actions in case of an error,
|
||||
|
||||
<Note title="Tip">
|
||||
|
||||
Learn more about compensation functions in [this guide](!docs!/learn/advanced-development/workflows/compensation-function).
|
||||
Learn more about compensation functions in [this guide](!docs!/learn/fundamentals/workflows/compensation-function).
|
||||
|
||||
</Note>
|
||||
|
||||
@@ -266,9 +266,9 @@ The workflow accepts as an input the created promotion and the `additional_data`
|
||||
|
||||
In the workflow, you:
|
||||
|
||||
1. Use the `transform` utility to get the value of `custom_name` based on whether it's set in `additional_data`. Learn more about why you can't use conditional operators in a workflow without using `transform` in [this guide](!docs!/learn/advanced-development/workflows/conditions#why-if-conditions-arent-allowed-in-workflows).
|
||||
1. Use the `transform` utility to get the value of `custom_name` based on whether it's set in `additional_data`. Learn more about why you can't use conditional operators in a workflow without using `transform` in [this guide](!docs!/learn/fundamentals/workflows/conditions#why-if-conditions-arent-allowed-in-workflows).
|
||||
2. Create the `Custom` record using the `createCustomStep`.
|
||||
3. Use the `when-then` utility to link the promotion to the `Custom` record if it was created. Learn more about why you can't use if-then conditions in a workflow without using `when-then` in [this guide](!docs!/learn/advanced-development/workflows/conditions#why-if-conditions-arent-allowed-in-workflows).
|
||||
3. Use the `when-then` utility to link the promotion to the `Custom` record if it was created. Learn more about why you can't use if-then conditions in a workflow without using `when-then` in [this guide](!docs!/learn/fundamentals/workflows/conditions#why-if-conditions-arent-allowed-in-workflows).
|
||||
|
||||
You'll next execute the workflow in the hook handler.
|
||||
|
||||
@@ -379,7 +379,7 @@ Among the returned `promotion` object, you'll find a `custom` property which hol
|
||||
|
||||
### Retrieve using Query
|
||||
|
||||
You can also retrieve the `Custom` record linked to a promotion in your code using [Query](!docs!/learn/advanced-development/module-links/query).
|
||||
You can also retrieve the `Custom` record linked to a promotion in your code using [Query](!docs!/learn/fundamentals/module-links/query).
|
||||
|
||||
For example:
|
||||
|
||||
@@ -393,7 +393,7 @@ const { data: [promotion] } = await query.graph({
|
||||
})
|
||||
```
|
||||
|
||||
Learn more about how to use Query in [this guide](!docs!/learn/advanced-development/module-links/query).
|
||||
Learn more about how to use Query in [this guide](!docs!/learn/fundamentals/module-links/query).
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@ export const GET = (
|
||||
|
||||
This creates a `GET` API route at `/hello-world`.
|
||||
|
||||
Learn more in [this documentation](!docs!/learn/basics/api-routes).
|
||||
Learn more in [this documentation](!docs!/learn/fundamentals/api-routes).
|
||||
|
||||
### Resolve Resources in API Route
|
||||
|
||||
@@ -65,7 +65,7 @@ export const GET = async (
|
||||
|
||||
This resolves the Product Module's main service.
|
||||
|
||||
Learn more in [this documentation](!docs!/learn/basics/medusa-container).
|
||||
Learn more in [this documentation](!docs!/learn/fundamentals/medusa-container).
|
||||
|
||||
### Use Path Parameters
|
||||
|
||||
@@ -93,7 +93,7 @@ export const GET = async (
|
||||
}
|
||||
```
|
||||
|
||||
Learn more about path parameters in [this documentation](!docs!/learn/advanced-development/api-routes/parameters#path-parameters).
|
||||
Learn more about path parameters in [this documentation](!docs!/learn/fundamentals/api-routes/parameters#path-parameters).
|
||||
|
||||
### Use Query Parameters
|
||||
|
||||
@@ -119,7 +119,7 @@ export const GET = async (
|
||||
}
|
||||
```
|
||||
|
||||
Learn more about query parameters in [this documentation](!docs!/learn/advanced-development/api-routes/parameters#query-parameters).
|
||||
Learn more about query parameters in [this documentation](!docs!/learn/fundamentals/api-routes/parameters#query-parameters).
|
||||
|
||||
### Use Body Parameters
|
||||
|
||||
@@ -150,7 +150,7 @@ export const POST = async (
|
||||
}
|
||||
```
|
||||
|
||||
Learn more about request body parameters in [this documentation](!docs!/learn/advanced-development/api-routes/parameters#request-body-parameters).
|
||||
Learn more about request body parameters in [this documentation](!docs!/learn/fundamentals/api-routes/parameters#request-body-parameters).
|
||||
|
||||
### Set Response Code
|
||||
|
||||
@@ -169,7 +169,7 @@ export const GET = async (
|
||||
}
|
||||
```
|
||||
|
||||
Learn more about setting the response code in [this documentation](!docs!/learn/advanced-development/api-routes/responses#set-response-status-code).
|
||||
Learn more about setting the response code in [this documentation](!docs!/learn/fundamentals/api-routes/responses#set-response-status-code).
|
||||
|
||||
### Execute a Workflow in an API Route
|
||||
|
||||
@@ -197,7 +197,7 @@ export async function GET(
|
||||
}
|
||||
```
|
||||
|
||||
Learn more in [this documentation](!docs!/learn/basics/workflows#3-execute-the-workflow).
|
||||
Learn more in [this documentation](!docs!/learn/fundamentals/workflows#3-execute-the-workflow).
|
||||
|
||||
### Change Response Content Type
|
||||
|
||||
@@ -235,7 +235,7 @@ export const GET = async (
|
||||
|
||||
This changes the response type to return an event stream.
|
||||
|
||||
Learn more in [this documentation](!docs!/learn/advanced-development/api-routes/responses#change-response-content-type).
|
||||
Learn more in [this documentation](!docs!/learn/fundamentals/api-routes/responses#change-response-content-type).
|
||||
|
||||
### Create Middleware
|
||||
|
||||
@@ -285,7 +285,7 @@ export default defineMiddlewares({
|
||||
})
|
||||
```
|
||||
|
||||
Learn more about middlewares in [this documentation](!docs!/learn/advanced-development/api-routes/middlewares).
|
||||
Learn more about middlewares in [this documentation](!docs!/learn/fundamentals/api-routes/middlewares).
|
||||
|
||||
### Restrict HTTP Methods in Middleware
|
||||
|
||||
@@ -370,7 +370,7 @@ export const POST = async (
|
||||
}
|
||||
```
|
||||
|
||||
Learn more about request body validation in [this documentation](!docs!/learn/advanced-development/api-routes/validation).
|
||||
Learn more about request body validation in [this documentation](!docs!/learn/fundamentals/api-routes/validation).
|
||||
|
||||
### Pass Additional Data to API Route
|
||||
|
||||
@@ -403,7 +403,7 @@ export default defineMiddlewares({
|
||||
|
||||
<Note>
|
||||
|
||||
Learn more about additional data in [this documentation](!docs!/learn/advanced-development/api-routes/additional-data).
|
||||
Learn more about additional data in [this documentation](!docs!/learn/fundamentals/api-routes/additional-data).
|
||||
|
||||
</Note>
|
||||
|
||||
@@ -430,7 +430,7 @@ createProductsWorkflow.hooks.productsCreated(
|
||||
|
||||
<Note>
|
||||
|
||||
Learn more about workflow hooks in [this documentation](!docs!/learn/advanced-development/workflows/workflow-hooks).
|
||||
Learn more about workflow hooks in [this documentation](!docs!/learn/fundamentals/workflows/workflow-hooks).
|
||||
|
||||
</Note>
|
||||
|
||||
@@ -461,7 +461,7 @@ export default defineMiddlewares({
|
||||
})
|
||||
```
|
||||
|
||||
Learn more in [this documentation](!docs!/learn/advanced-development/api-routes/protected-routes).
|
||||
Learn more in [this documentation](!docs!/learn/fundamentals/api-routes/protected-routes).
|
||||
|
||||
### Restrict an API Route to Logged-In Customers
|
||||
|
||||
@@ -487,7 +487,7 @@ export default defineMiddlewares({
|
||||
})
|
||||
```
|
||||
|
||||
Learn more in [this documentation](!docs!/learn/advanced-development/api-routes/protected-routes).
|
||||
Learn more in [this documentation](!docs!/learn/fundamentals/api-routes/protected-routes).
|
||||
|
||||
### Retrieve Logged-In Admin User
|
||||
|
||||
@@ -522,7 +522,7 @@ export const GET = async (
|
||||
}
|
||||
```
|
||||
|
||||
Learn more in [this documentation](!docs!/learn/advanced-development/api-routes/protected-routes#retrieve-logged-in-admin-users-details).
|
||||
Learn more in [this documentation](!docs!/learn/fundamentals/api-routes/protected-routes#retrieve-logged-in-admin-users-details).
|
||||
|
||||
### Retrieve Logged-In Customer
|
||||
|
||||
@@ -560,7 +560,7 @@ export const GET = async (
|
||||
}
|
||||
```
|
||||
|
||||
Learn more in [this documentation](!docs!/learn/advanced-development/api-routes/protected-routes#retrieve-logged-in-customers-details).
|
||||
Learn more in [this documentation](!docs!/learn/fundamentals/api-routes/protected-routes#retrieve-logged-in-customers-details).
|
||||
|
||||
### Throw Errors in API Route
|
||||
|
||||
@@ -585,7 +585,7 @@ export const GET = async (
|
||||
}
|
||||
```
|
||||
|
||||
Learn more in [this documentation](!docs!/learn/advanced-development/api-routes/errors).
|
||||
Learn more in [this documentation](!docs!/learn/fundamentals/api-routes/errors).
|
||||
|
||||
### Override Error Handler of API Routes
|
||||
|
||||
@@ -614,7 +614,7 @@ export default defineMiddlewares({
|
||||
})
|
||||
```
|
||||
|
||||
Learn more in [this documentation](!docs!/learn/advanced-development/api-routes/errors#override-error-handler),
|
||||
Learn more in [this documentation](!docs!/learn/fundamentals/api-routes/errors#override-error-handler),
|
||||
|
||||
### Setting up CORS for Custom API Routes
|
||||
|
||||
@@ -707,7 +707,7 @@ A module is a package of reusable commerce or architectural functionalities. The
|
||||
|
||||
<Note>
|
||||
|
||||
Find this example explained in details in [this documentation](!docs!/learn/basics/modules).
|
||||
Find this example explained in details in [this documentation](!docs!/learn/fundamentals/modules).
|
||||
|
||||
</Note>
|
||||
|
||||
@@ -843,7 +843,7 @@ class HelloModuleService extends MedusaService({
|
||||
export default HelloModuleService
|
||||
```
|
||||
|
||||
Learn more in [this documentation](!docs!/learn/advanced-development/modules/multiple-services).
|
||||
Learn more in [this documentation](!docs!/learn/fundamentals/modules/multiple-services).
|
||||
|
||||
### Accept Module Options
|
||||
|
||||
@@ -895,7 +895,7 @@ export default class HelloModuleService extends MedusaService({
|
||||
}
|
||||
```
|
||||
|
||||
Learn more in [this documentation](!docs!/learn/advanced-development/modules/options).
|
||||
Learn more in [this documentation](!docs!/learn/fundamentals/modules/options).
|
||||
|
||||
### Integrate Third-Party System in Module
|
||||
|
||||
@@ -974,7 +974,7 @@ npx medusa db:generate helloModuleService
|
||||
npx medusa db:migrate
|
||||
```
|
||||
|
||||
Learn more in [this documentation](!docs!/learn/basics/modules#1-create-data-model).
|
||||
Learn more in [this documentation](!docs!/learn/fundamentals/modules#1-create-data-model).
|
||||
|
||||
### Data Model Property Types
|
||||
|
||||
@@ -1061,7 +1061,7 @@ const MyCustom = model.define("my_custom", {
|
||||
})
|
||||
```
|
||||
|
||||
Learn more in [this documentation](!docs!/learn/advanced-development/data-models/property-types).
|
||||
Learn more in [this documentation](!docs!/learn/fundamentals/data-models/property-types).
|
||||
|
||||
### Set Primary Key
|
||||
|
||||
@@ -1104,7 +1104,7 @@ const MyCustom = model.define("my_custom", {
|
||||
export default MyCustom
|
||||
```
|
||||
|
||||
Learn more in [this documentation](!docs!/learn/advanced-development/data-models/primary-key).
|
||||
Learn more in [this documentation](!docs!/learn/fundamentals/data-models/primary-key).
|
||||
|
||||
### Default Property Value
|
||||
|
||||
@@ -1126,7 +1126,7 @@ const MyCustom = model.define("my_custom", {
|
||||
export default MyCustom
|
||||
```
|
||||
|
||||
Learn more in [this documentation](!docs!/learn/advanced-development/data-models/configure-properties).
|
||||
Learn more in [this documentation](!docs!/learn/fundamentals/data-models/configure-properties).
|
||||
|
||||
### Nullable Property
|
||||
|
||||
@@ -1143,7 +1143,7 @@ const MyCustom = model.define("my_custom", {
|
||||
export default MyCustom
|
||||
```
|
||||
|
||||
Learn more in [this documentation](!docs!/learn/advanced-development/data-models/configure-properties#nullable-property).
|
||||
Learn more in [this documentation](!docs!/learn/fundamentals/data-models/configure-properties#nullable-property).
|
||||
|
||||
### Unique Property
|
||||
|
||||
@@ -1160,7 +1160,7 @@ const User = model.define("user", {
|
||||
export default User
|
||||
```
|
||||
|
||||
Learn more in [this documentation](!docs!/learn/advanced-development/data-models/configure-properties#unique-property).
|
||||
Learn more in [this documentation](!docs!/learn/fundamentals/data-models/configure-properties#unique-property).
|
||||
|
||||
### Define Database Index on Property
|
||||
|
||||
@@ -1179,7 +1179,7 @@ const MyCustom = model.define("my_custom", {
|
||||
export default MyCustom
|
||||
```
|
||||
|
||||
Learn more in [this documentation](!docs!/learn/advanced-development/data-models/index#define-database-index-on-property).
|
||||
Learn more in [this documentation](!docs!/learn/fundamentals/data-models/index#define-database-index-on-property).
|
||||
|
||||
### Define Composite Index on Data Model
|
||||
|
||||
@@ -1206,7 +1206,7 @@ const MyCustom = model.define("my_custom", {
|
||||
export default MyCustom
|
||||
```
|
||||
|
||||
Learn more in [this documentation](!docs!/learn/advanced-development/data-models/index#define-database-index-on-data-model).
|
||||
Learn more in [this documentation](!docs!/learn/fundamentals/data-models/index#define-database-index-on-data-model).
|
||||
|
||||
### Make a Property Searchable
|
||||
|
||||
@@ -1237,7 +1237,7 @@ const myCustoms = await helloModuleService.listMyCustoms({
|
||||
})
|
||||
```
|
||||
|
||||
Learn more in [this documentation](!docs!/learn/advanced-development/data-models/searchable-property).
|
||||
Learn more in [this documentation](!docs!/learn/fundamentals/data-models/searchable-property).
|
||||
|
||||
### Create One-to-One Relationship
|
||||
|
||||
@@ -1259,7 +1259,7 @@ const Email = model.define("email", {
|
||||
})
|
||||
```
|
||||
|
||||
Learn more in [this documentation](!docs!/learn/advanced-development/data-models/relationships#one-to-one-relationship).
|
||||
Learn more in [this documentation](!docs!/learn/fundamentals/data-models/relationships#one-to-one-relationship).
|
||||
|
||||
### Create One-to-Many Relationship
|
||||
|
||||
@@ -1281,7 +1281,7 @@ const Product = model.define("product", {
|
||||
})
|
||||
```
|
||||
|
||||
Learn more in [this documentation](!docs!/learn/advanced-development/data-models/relationships#one-to-many-relationship).
|
||||
Learn more in [this documentation](!docs!/learn/fundamentals/data-models/relationships#one-to-many-relationship).
|
||||
|
||||
### Create Many-to-Many Relationship
|
||||
|
||||
@@ -1305,7 +1305,7 @@ const Product = model.define("product", {
|
||||
})
|
||||
```
|
||||
|
||||
Learn more in [this documentation](!docs!/learn/advanced-development/data-models/relationships#many-to-many-relationship).
|
||||
Learn more in [this documentation](!docs!/learn/fundamentals/data-models/relationships#many-to-many-relationship).
|
||||
|
||||
### Configure Cascades of Data Model
|
||||
|
||||
@@ -1326,7 +1326,7 @@ const Store = model.define("store", {
|
||||
|
||||
This configures the delete cascade on the `Store` data model so that, when a store is delete, its products are also deleted.
|
||||
|
||||
Learn more in [this documentation](!docs!/learn/advanced-development/data-models/relationships#cascades).
|
||||
Learn more in [this documentation](!docs!/learn/fundamentals/data-models/relationships#cascades).
|
||||
|
||||
|
||||
### Manage One-to-One Relationship
|
||||
@@ -1373,7 +1373,7 @@ const user = await helloModuleService.updateUsers({
|
||||
})
|
||||
```
|
||||
|
||||
Learn more in [this documentation](!docs!/learn/advanced-development/data-models/manage-relationships#manage-one-to-one-relationship).
|
||||
Learn more in [this documentation](!docs!/learn/fundamentals/data-models/manage-relationships#manage-one-to-one-relationship).
|
||||
|
||||
### Manage One-to-Many Relationship
|
||||
|
||||
@@ -1402,7 +1402,7 @@ const product = await helloModuleService.updateProducts({
|
||||
})
|
||||
```
|
||||
|
||||
Learn more in [this documentation](!docs!/learn/advanced-development/data-models/manage-relationships#manage-one-to-many-relationship)
|
||||
Learn more in [this documentation](!docs!/learn/fundamentals/data-models/manage-relationships#manage-one-to-many-relationship)
|
||||
|
||||
### Manage Many-to-Many Relationship
|
||||
|
||||
@@ -1443,7 +1443,7 @@ const updatedProduct = await helloModuleService.updateProducts({
|
||||
})
|
||||
```
|
||||
|
||||
Learn more in [this documentation](!docs!/learn/advanced-development/data-models/manage-relationships#manage-many-to-many-relationship).
|
||||
Learn more in [this documentation](!docs!/learn/fundamentals/data-models/manage-relationships#manage-many-to-many-relationship).
|
||||
|
||||
### Retrieve Related Records
|
||||
|
||||
@@ -1464,7 +1464,7 @@ const product = await helloModuleService.retrieveProducts(
|
||||
)
|
||||
```
|
||||
|
||||
Learn more in [this documentation](!docs!/learn/advanced-development/data-models/manage-relationships#retrieve-records-of-relation).
|
||||
Learn more in [this documentation](!docs!/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation).
|
||||
|
||||
---
|
||||
|
||||
@@ -1495,7 +1495,7 @@ The `HelloModuleService` will now have data-management methods for `MyCustom`.
|
||||
|
||||
Refer to [this reference](../service-factory-reference/page.mdx) for details on the generated methods.
|
||||
|
||||
Learn more about the service factory in [this documentation](!docs!/learn/advanced-development/modules/service-factory).
|
||||
Learn more about the service factory in [this documentation](!docs!/learn/fundamentals/modules/service-factory).
|
||||
|
||||
### Resolve Resources in the Service
|
||||
|
||||
@@ -1557,7 +1557,7 @@ export default class HelloModuleService {
|
||||
</CodeTab>
|
||||
</CodeTabs>
|
||||
|
||||
Learn more in [this documentation](!docs!/learn/advanced-development/modules/container).
|
||||
Learn more in [this documentation](!docs!/learn/fundamentals/modules/container).
|
||||
|
||||
### Access Module Options in Service
|
||||
|
||||
@@ -1589,7 +1589,7 @@ export default class HelloModuleService extends MedusaService({
|
||||
}
|
||||
```
|
||||
|
||||
Learn more in [this documentation](!docs!/learn/advanced-development/modules/options).
|
||||
Learn more in [this documentation](!docs!/learn/fundamentals/modules/options).
|
||||
|
||||
### Run Database Query in Service
|
||||
|
||||
@@ -1625,7 +1625,7 @@ class HelloModuleService {
|
||||
}
|
||||
```
|
||||
|
||||
Learn more in [this documentation](!docs!/learn/advanced-development/modules/db-operations#run-queries)
|
||||
Learn more in [this documentation](!docs!/learn/fundamentals/modules/db-operations#run-queries)
|
||||
|
||||
### Execute Database Operations in Transactions
|
||||
|
||||
@@ -1682,7 +1682,7 @@ class HelloModuleService {
|
||||
}
|
||||
```
|
||||
|
||||
Learn more in [this documentation](!docs!/learn/advanced-development/modules/db-operations#execute-operations-in-transactions).
|
||||
Learn more in [this documentation](!docs!/learn/fundamentals/modules/db-operations#execute-operations-in-transactions).
|
||||
|
||||
---
|
||||
|
||||
@@ -1713,7 +1713,7 @@ export default defineLink(
|
||||
npx medusa db:migrate
|
||||
```
|
||||
|
||||
Learn more in [this documentation](!docs!/learn/advanced-development/module-links).
|
||||
Learn more in [this documentation](!docs!/learn/fundamentals/module-links).
|
||||
|
||||
### Define a List Link
|
||||
|
||||
@@ -1733,7 +1733,7 @@ export default defineLink(
|
||||
)
|
||||
```
|
||||
|
||||
Learn more about list links in [this documentation](!docs!/learn/advanced-development/module-links#define-a-list-link).
|
||||
Learn more about list links in [this documentation](!docs!/learn/fundamentals/module-links#define-a-list-link).
|
||||
|
||||
### Set Delete Cascade on Link Definition
|
||||
|
||||
@@ -1753,7 +1753,7 @@ export default defineLink(
|
||||
)
|
||||
```
|
||||
|
||||
Learn more in [this documentation](!docs!/learn/advanced-development/module-links#define-a-list-link).
|
||||
Learn more in [this documentation](!docs!/learn/fundamentals/module-links#define-a-list-link).
|
||||
|
||||
### Add Custom Columns to Module Link
|
||||
|
||||
@@ -1813,7 +1813,7 @@ const { data } = await query.graph({
|
||||
})
|
||||
```
|
||||
|
||||
Learn more in [this documentation](!docs!/learn/advanced-development/module-links/custom-columns).
|
||||
Learn more in [this documentation](!docs!/learn/fundamentals/module-links/custom-columns).
|
||||
|
||||
### Create Link Between Records
|
||||
|
||||
@@ -1835,7 +1835,7 @@ await remoteLink.create({
|
||||
})
|
||||
```
|
||||
|
||||
Learn more in [this documentation](!docs!/learn/advanced-development/module-links/remote-link#create-link).
|
||||
Learn more in [this documentation](!docs!/learn/fundamentals/module-links/remote-link#create-link).
|
||||
|
||||
### Dismiss Link Between Records
|
||||
|
||||
@@ -1857,7 +1857,7 @@ await remoteLink.dismiss({
|
||||
})
|
||||
```
|
||||
|
||||
Learn more in [this documentation](!docs!/learn/advanced-development/module-links/remote-link#dismiss-link).
|
||||
Learn more in [this documentation](!docs!/learn/fundamentals/module-links/remote-link#dismiss-link).
|
||||
|
||||
### Cascade Delete Linked Records
|
||||
|
||||
@@ -1877,7 +1877,7 @@ await remoteLink.delete({
|
||||
})
|
||||
```
|
||||
|
||||
Learn more in [this documentation](!docs!/learn/advanced-development/module-links/remote-link#cascade-delete-linked-records).
|
||||
Learn more in [this documentation](!docs!/learn/fundamentals/module-links/remote-link#cascade-delete-linked-records).
|
||||
|
||||
### Restore Linked Records
|
||||
|
||||
@@ -1897,7 +1897,7 @@ await remoteLink.restore({
|
||||
})
|
||||
```
|
||||
|
||||
Learn more in [this documentation](!docs!/learn/advanced-development/module-links/remote-link#restore-linked-records).
|
||||
Learn more in [this documentation](!docs!/learn/fundamentals/module-links/remote-link#restore-linked-records).
|
||||
|
||||
---
|
||||
|
||||
@@ -1933,7 +1933,7 @@ export const GET = async (
|
||||
}
|
||||
```
|
||||
|
||||
Learn more in [this documentation](!docs!/learn/advanced-development/module-links/query).
|
||||
Learn more in [this documentation](!docs!/learn/fundamentals/module-links/query).
|
||||
|
||||
### Retrieve Linked Records of Data Model
|
||||
|
||||
@@ -1967,7 +1967,7 @@ export const GET = async (
|
||||
}
|
||||
```
|
||||
|
||||
Learn more in [this documentation](!docs!/learn/advanced-development/module-links/query#retrieve-linked-records).
|
||||
Learn more in [this documentation](!docs!/learn/fundamentals/module-links/query#retrieve-linked-records).
|
||||
|
||||
### Apply Filters to Retrieved Records
|
||||
|
||||
@@ -2003,7 +2003,7 @@ export const GET = async (
|
||||
}
|
||||
```
|
||||
|
||||
Learn more in [this documentation](!docs!/learn/advanced-development/module-links/query#apply-filters).
|
||||
Learn more in [this documentation](!docs!/learn/fundamentals/module-links/query#apply-filters).
|
||||
|
||||
### Apply Pagination and Sort Records
|
||||
|
||||
@@ -2048,7 +2048,7 @@ export const GET = async (
|
||||
}
|
||||
```
|
||||
|
||||
Learn more in [this documentation](!docs!/learn/advanced-development/module-links/query#sort-records).
|
||||
Learn more in [this documentation](!docs!/learn/fundamentals/module-links/query#sort-records).
|
||||
|
||||
---
|
||||
|
||||
@@ -2115,7 +2115,7 @@ const myWorkflow = createWorkflow(
|
||||
export default myWorkflow
|
||||
```
|
||||
|
||||
Learn more in [this documentation](!docs!/learn/basics/workflows).
|
||||
Learn more in [this documentation](!docs!/learn/fundamentals/workflows).
|
||||
|
||||
### Execute a Workflow
|
||||
|
||||
@@ -2211,7 +2211,7 @@ Learn more in [this documentation](!docs!/learn/basics/workflows).
|
||||
</CodeTab>
|
||||
</CodeTabs>
|
||||
|
||||
Learn more in [this documentation](!docs!/learn/basics/workflows#3-execute-the-workflow).
|
||||
Learn more in [this documentation](!docs!/learn/fundamentals/workflows#3-execute-the-workflow).
|
||||
|
||||
### Step with a Compensation Function
|
||||
|
||||
@@ -2238,7 +2238,7 @@ const step1 = createStep(
|
||||
)
|
||||
```
|
||||
|
||||
Learn more in [this documentation](!docs!/learn/advanced-development/workflows/compensation-function).
|
||||
Learn more in [this documentation](!docs!/learn/fundamentals/workflows/compensation-function).
|
||||
|
||||
### Manipulate Variables in Workflow
|
||||
|
||||
@@ -2268,7 +2268,7 @@ const myWorkflow = createWorkflow(
|
||||
)
|
||||
```
|
||||
|
||||
Learn more in [this documentation](!docs!/learn/advanced-development/workflows/variable-manipulation)
|
||||
Learn more in [this documentation](!docs!/learn/fundamentals/workflows/variable-manipulation)
|
||||
|
||||
### Using Conditions in Workflow
|
||||
|
||||
@@ -2336,7 +2336,7 @@ const workflow = createWorkflow(
|
||||
)
|
||||
```
|
||||
|
||||
Learn more in [this documentation](!docs!/learn/advanced-development/workflows/execute-another-workflow).
|
||||
Learn more in [this documentation](!docs!/learn/fundamentals/workflows/execute-another-workflow).
|
||||
|
||||
### Consume a Workflow Hook
|
||||
|
||||
@@ -2357,7 +2357,7 @@ createProductsWorkflow.hooks.productsCreated(
|
||||
|
||||
This executes a custom step at the hook's designated point in the workflow.
|
||||
|
||||
Learn more in [this documentation](!docs!/learn/advanced-development/workflows/workflow-hooks).
|
||||
Learn more in [this documentation](!docs!/learn/fundamentals/workflows/workflow-hooks).
|
||||
|
||||
### Expose a Hook
|
||||
|
||||
@@ -2388,7 +2388,7 @@ export const myWorkflow = createWorkflow(
|
||||
)
|
||||
```
|
||||
|
||||
Learn more in [this documentation](!book!/learn/advanced-development/workflows/add-workflow-hook).
|
||||
Learn more in [this documentation](!book!/learn/fundamentals/workflows/add-workflow-hook).
|
||||
|
||||
### Retry Steps
|
||||
|
||||
@@ -2412,7 +2412,7 @@ export const step1 = createStep(
|
||||
)
|
||||
```
|
||||
|
||||
Learn more in [this documentation](!docs!/learn/advanced-development/workflows/retry-failed-steps).
|
||||
Learn more in [this documentation](!docs!/learn/fundamentals/workflows/retry-failed-steps).
|
||||
|
||||
### Run Steps in Parallel
|
||||
|
||||
@@ -2453,7 +2453,7 @@ const myWorkflow = createWorkflow(
|
||||
)
|
||||
```
|
||||
|
||||
Learn more in [this documentation](!docs!/learn/advanced-development/workflows/parallel-steps).
|
||||
Learn more in [this documentation](!docs!/learn/fundamentals/workflows/parallel-steps).
|
||||
|
||||
### Configure Workflow Timeout
|
||||
|
||||
@@ -2481,7 +2481,7 @@ const myWorkflow = createWorkflow({
|
||||
export default myWorkflow
|
||||
```
|
||||
|
||||
Learn more in [this documentation](!docs!/learn/advanced-development/workflows/workflow-timeout).
|
||||
Learn more in [this documentation](!docs!/learn/fundamentals/workflows/workflow-timeout).
|
||||
|
||||
### Configure Step Timeout
|
||||
|
||||
@@ -2499,7 +2499,7 @@ const step1 = createStep(
|
||||
)
|
||||
```
|
||||
|
||||
Learn more in [this documentation](!docs!/learn/advanced-development/workflows/workflow-timeout#configure-step-timeout).
|
||||
Learn more in [this documentation](!docs!/learn/fundamentals/workflows/workflow-timeout#configure-step-timeout).
|
||||
|
||||
### Long-Running Workflow
|
||||
|
||||
@@ -2519,7 +2519,7 @@ const step2 = createStep(
|
||||
)
|
||||
```
|
||||
|
||||
Learn more in [this documentation](!docs!/learn/advanced-development/workflows/long-running-workflow).
|
||||
Learn more in [this documentation](!docs!/learn/fundamentals/workflows/long-running-workflow).
|
||||
|
||||
### Change Step Status in Long-Running Workflow
|
||||
|
||||
@@ -2588,7 +2588,7 @@ await workflowEngineService.setStepFailure({
|
||||
})
|
||||
```
|
||||
|
||||
Learn more in [this documentation](!docs!/learn/advanced-development/workflows/long-running-workflow).
|
||||
Learn more in [this documentation](!docs!/learn/fundamentals/workflows/long-running-workflow).
|
||||
|
||||
### Access Long-Running Workflow's Result
|
||||
|
||||
@@ -2634,7 +2634,7 @@ export async function GET(req: MedusaRequest, res: MedusaResponse) {
|
||||
}
|
||||
```
|
||||
|
||||
Learn more in [this documentation](!docs!/learn/advanced-development/workflows/long-running-workflow#access-long-running-workflow-status-and-result).
|
||||
Learn more in [this documentation](!docs!/learn/fundamentals/workflows/long-running-workflow#access-long-running-workflow-status-and-result).
|
||||
|
||||
---
|
||||
|
||||
@@ -2664,7 +2664,7 @@ export const config: SubscriberConfig = {
|
||||
}
|
||||
```
|
||||
|
||||
Learn more in [this documentation](!docs!/learn/basics/events-and-subscribers).
|
||||
Learn more in [this documentation](!docs!/learn/fundamentals/events-and-subscribers).
|
||||
|
||||
### Resolve Resources in Subscriber
|
||||
|
||||
@@ -2694,7 +2694,7 @@ export const config: SubscriberConfig = {
|
||||
}
|
||||
```
|
||||
|
||||
Learn more in [this documentation](!docs!/learn/basics/events-and-subscribers#resolve-resources).
|
||||
Learn more in [this documentation](!docs!/learn/fundamentals/events-and-subscribers#resolve-resources).
|
||||
|
||||
### Send a Notification to Reset Password
|
||||
|
||||
@@ -2779,7 +2779,7 @@ export const config: SubscriberConfig = {
|
||||
}
|
||||
```
|
||||
|
||||
Learn more in [this documentation](!docs!/learn/basics/workflows#3-execute-the-workflow)
|
||||
Learn more in [this documentation](!docs!/learn/fundamentals/workflows#3-execute-the-workflow)
|
||||
|
||||
---
|
||||
|
||||
@@ -2805,7 +2805,7 @@ export const config = {
|
||||
}
|
||||
```
|
||||
|
||||
Learn more in [this documentation](!docs!/learn/basics/scheduled-jobs).
|
||||
Learn more in [this documentation](!docs!/learn/fundamentals/scheduled-jobs).
|
||||
|
||||
### Resolve Resources in Scheduled Job
|
||||
|
||||
@@ -2834,7 +2834,7 @@ export const config = {
|
||||
}
|
||||
```
|
||||
|
||||
Learn more in [this documentation](!docs!/learn/basics/scheduled-jobs#resolve-resources)
|
||||
Learn more in [this documentation](!docs!/learn/fundamentals/scheduled-jobs#resolve-resources)
|
||||
|
||||
### Specify a Job's Execution Number
|
||||
|
||||
@@ -2853,7 +2853,7 @@ export const config = {
|
||||
}
|
||||
```
|
||||
|
||||
Learn more in [this documentation](!docs!/learn/advanced-development/scheduled-jobs/execution-number).
|
||||
Learn more in [this documentation](!docs!/learn/fundamentals/scheduled-jobs/execution-number).
|
||||
|
||||
### Execute a Workflow in a Scheduled Job
|
||||
|
||||
@@ -2882,7 +2882,7 @@ export const config = {
|
||||
}
|
||||
```
|
||||
|
||||
Learn more in [this documentation](!docs!/learn/basics/workflows#3-execute-the-workflow)
|
||||
Learn more in [this documentation](!docs!/learn/fundamentals/workflows#3-execute-the-workflow)
|
||||
|
||||
---
|
||||
|
||||
@@ -2904,7 +2904,7 @@ export default async function helloWorldLoader() {
|
||||
}
|
||||
```
|
||||
|
||||
Learn more in [this documentation](!docs!/learn/basics/loaders).
|
||||
Learn more in [this documentation](!docs!/learn/fundamentals/modules/loaders).
|
||||
|
||||
### Resolve Resources in Loader
|
||||
|
||||
@@ -2927,7 +2927,7 @@ export default async function helloWorldLoader({
|
||||
}
|
||||
```
|
||||
|
||||
Learn more in [this documentation](!docs!/learn/advanced-development/modules/container).
|
||||
Learn more in [this documentation](!docs!/learn/fundamentals/modules/container).
|
||||
|
||||
### Access Module Options
|
||||
|
||||
@@ -2954,7 +2954,7 @@ export default async function helloWorldLoader({
|
||||
}
|
||||
```
|
||||
|
||||
Learn more in [this documentation](!docs!/learn/advanced-development/modules/options).
|
||||
Learn more in [this documentation](!docs!/learn/fundamentals/modules/options).
|
||||
|
||||
### Register Resources in the Module's Container
|
||||
|
||||
@@ -3019,7 +3019,7 @@ export const config = defineWidgetConfig({
|
||||
export default ProductWidget
|
||||
```
|
||||
|
||||
Learn more about widgets in [this documentation](!docs!/learn/advanced-development/admin/widgets).
|
||||
Learn more about widgets in [this documentation](!docs!/learn/fundamentals/admin/widgets).
|
||||
|
||||
### Receive Details Props in Widgets
|
||||
|
||||
@@ -3056,7 +3056,7 @@ export const config = defineWidgetConfig({
|
||||
export default ProductWidget
|
||||
```
|
||||
|
||||
Learn more in [this documentation](!docs!/learn/advanced-development/admin/widgets#detail-widget-props).
|
||||
Learn more in [this documentation](!docs!/learn/fundamentals/admin/widgets#detail-widget-props).
|
||||
|
||||
### Create a UI Route
|
||||
|
||||
@@ -3089,7 +3089,7 @@ export default CustomPage
|
||||
|
||||
This adds a new page at `localhost:9000/app/custom`.
|
||||
|
||||
Learn more in [this documentation](!docs!/learn/advanced-development/admin/ui-routes).
|
||||
Learn more in [this documentation](!docs!/learn/fundamentals/admin/ui-routes).
|
||||
|
||||
### Create Settings Page
|
||||
|
||||
@@ -3120,7 +3120,7 @@ export default CustomSettingPage
|
||||
|
||||
This adds a setting page at `localhost:9000/app/settings/custom`.
|
||||
|
||||
Learn more in [this documentation](!docs!/learn/advanced-development/admin/ui-routes#create-settings-page)
|
||||
Learn more in [this documentation](!docs!/learn/fundamentals/admin/ui-routes#create-settings-page)
|
||||
|
||||
### Accept Path Parameters in UI Routes
|
||||
|
||||
@@ -3149,7 +3149,7 @@ export default CustomPage
|
||||
|
||||
This creates a UI route at `localhost:9000/app/custom/:id`, where `:id` is a path parameter.
|
||||
|
||||
Learn more in [this documentation](!docs!/learn/advanced-development/admin/ui-routes#path-parameters)
|
||||
Learn more in [this documentation](!docs!/learn/fundamentals/admin/ui-routes#path-parameters)
|
||||
|
||||
### Send Request to API Route
|
||||
|
||||
@@ -3196,7 +3196,7 @@ export const config = defineWidgetConfig({
|
||||
export default ProductWidget
|
||||
```
|
||||
|
||||
Learn more in [this documentation](!docs!/learn/advanced-development/admin/tips#send-requests-to-api-routes)
|
||||
Learn more in [this documentation](!docs!/learn/fundamentals/admin/tips#send-requests-to-api-routes)
|
||||
|
||||
### Add Link to Another Page
|
||||
|
||||
@@ -3224,7 +3224,7 @@ export const config = defineWidgetConfig({
|
||||
export default ProductWidget
|
||||
```
|
||||
|
||||
Learn more in [this documentation](!docs!/learn/advanced-development/admin/tips#routing-functionalities).
|
||||
Learn more in [this documentation](!docs!/learn/fundamentals/admin/tips#routing-functionalities).
|
||||
|
||||
---
|
||||
|
||||
@@ -3750,7 +3750,7 @@ Learn more in [this documentation](../commerce-modules/payment/payment-flow/page
|
||||
|
||||
### Get Variant's Prices for Region and Currency
|
||||
|
||||
To get prices of a product variant for a region and currency using [Query](!docs!/learn/advanced-development/module-links/query):
|
||||
To get prices of a product variant for a region and currency using [Query](!docs!/learn/fundamentals/module-links/query):
|
||||
|
||||
```ts
|
||||
import { QueryContext } from "@medusajs/framework/utils"
|
||||
@@ -3782,7 +3782,7 @@ Learn more in [this documentation](../commerce-modules/product/guides/price/page
|
||||
|
||||
### Get All Variant's Prices
|
||||
|
||||
To get all prices of a product variant using [Query](!docs!/learn/advanced-development/module-links/query):
|
||||
To get all prices of a product variant using [Query](!docs!/learn/fundamentals/module-links/query):
|
||||
|
||||
```ts
|
||||
const { data: products } = await query.graph({
|
||||
@@ -3804,7 +3804,7 @@ Learn more in [this documentation](../commerce-modules/product/guides/price/page
|
||||
|
||||
### Get Variant Prices with Taxes
|
||||
|
||||
To get a variant's prices with taxes using [Query](!docs!/learn/advanced-development/module-links/query) and the [Tax Module](../commerce-modules/tax/page.mdx)
|
||||
To get a variant's prices with taxes using [Query](!docs!/learn/fundamentals/module-links/query) and the [Tax Module](../commerce-modules/tax/page.mdx)
|
||||
|
||||
```ts
|
||||
import {
|
||||
|
||||
@@ -81,7 +81,7 @@ Afterwards, the installation process will start, which will install the Medusa a
|
||||
|
||||
<Note title="Why is the storefront installed separately?">
|
||||
|
||||
The Medusa application is composed of a headless Node.js server and an admin dashboard. The storefront is installed or custom-built separately and connects to the Medusa application through its REST endpoints, called [API routes](!docs!/learn/basics/api-routes). Learn more about Medusa's architecture in [this documentation](!docs!/learn/advanced-development/architecture/overview).
|
||||
The Medusa application is composed of a headless Node.js server and an admin dashboard. The storefront is installed or custom-built separately and connects to the Medusa application through its REST endpoints, called [API routes](!docs!/learn/fundamentals/api-routes). Learn more about Medusa's architecture in [this documentation](!docs!/learn/introduction/architecture).
|
||||
|
||||
</Note>
|
||||
|
||||
@@ -154,7 +154,7 @@ Medusa's Notification Module delegates sending notifications to other modules, c
|
||||
|
||||
<Note>
|
||||
|
||||
Learn more about modules in [this documentation](!docs!/learn/basics/modules).
|
||||
Learn more about modules in [this documentation](!docs!/learn/fundamentals/modules).
|
||||
|
||||
</Note>
|
||||
|
||||
@@ -248,7 +248,7 @@ class ResendNotificationProviderService extends AbstractNotificationProviderServ
|
||||
|
||||
A module's service accepts two parameters:
|
||||
|
||||
1. Dependencies resolved from the [Module's container](!docs!/learn/advanced-development/modules/container), which is the module's local registry that the Medusa application adds framework tools to. In this service, you resolve the [Logger utility](!docs!/learn/debugging-and-testing/logging) from the module's container.
|
||||
1. Dependencies resolved from the [Module's container](!docs!/learn/fundamentals/modules/container), which is the module's local registry that the Medusa application adds framework tools to. In this service, you resolve the [Logger utility](!docs!/learn/debugging-and-testing/logging) from the module's container.
|
||||
2. The module's options that are passed to the module in Medusa's configuration as you'll see in a later section.
|
||||
|
||||
Using the API key passed in the module's options, you initialize the Resend client. You also set the `options` and `logger` properties.
|
||||
@@ -627,7 +627,7 @@ Instead, you'll create a subscriber that listens to the `order.placed` event and
|
||||
|
||||
<Note>
|
||||
|
||||
Learn more about Medusa's event system in [this documentation](!docs!/learn/basics/events-and-subscribers).
|
||||
Learn more about Medusa's event system in [this documentation](!docs!/learn/fundamentals/events-and-subscribers).
|
||||
|
||||
</Note>
|
||||
|
||||
@@ -639,7 +639,7 @@ A workflow is a series of queries and actions, called steps, that complete a tas
|
||||
|
||||
<Note>
|
||||
|
||||
Learn more about workflows in [this documentation](!docs!/learn/basics/workflows)
|
||||
Learn more about workflows in [this documentation](!docs!/learn/fundamentals/workflows)
|
||||
|
||||
</Note>
|
||||
|
||||
@@ -669,7 +669,7 @@ You define the `sendNotificationStep` using the `createStep` function that accep
|
||||
- A string indicating the step's unique name.
|
||||
- The step's function definition as a second parameter. It accepts the step's input as a first parameter, and an object of options as a second.
|
||||
|
||||
The `container` property in the second parameter is an instance of the [Medusa container](!docs!/learn/basics/medusa-container), which is a registry of framework and commerce tools, such a module's service, that you can resolve to utilize their functionalities.
|
||||
The `container` property in the second parameter is an instance of the [Medusa container](!docs!/learn/fundamentals/medusa-container), which is a registry of framework and commerce tools, such a module's service, that you can resolve to utilize their functionalities.
|
||||
|
||||
<Note title="Tip">
|
||||
|
||||
@@ -741,7 +741,7 @@ You create a workflow using the `createWorkflow` function imported from `@medusa
|
||||
|
||||
It accepts as a second parameter a constructor function, which is the workflow's implementation. The workflow has the following steps:
|
||||
|
||||
1. `useQueryGraphStep`, which is a step implemented by Medusa that uses [Query](!docs!/learn/advanced-development/module-links/query), a tool that allows you to retrieve data across modules. You use it to retrieve the order's details.
|
||||
1. `useQueryGraphStep`, which is a step implemented by Medusa that uses [Query](!docs!/learn/fundamentals/module-links/query), a tool that allows you to retrieve data across modules. You use it to retrieve the order's details.
|
||||
2. `sendNotificationStep` which is the step you implemented. You pass it an array with one object, which is the notification's details having following properties:
|
||||
- `to`: The address to send the email to. You pass the customer's email that is stored in the order.
|
||||
- `channel`: The channel to send the notification through, which is `email`. Since you specified `email` in the Resend Module Provider's `channel` option, the Notification Module will delegate the sending to the Resend Module Provider's service.
|
||||
@@ -750,7 +750,7 @@ It accepts as a second parameter a constructor function, which is the workflow's
|
||||
|
||||
<Note title="Tip">
|
||||
|
||||
A workflow's constructor function has some constraints in implementation. Learn more about them in [this documentation](!docs!/learn/advanced-development/workflows/constructor-constraints).
|
||||
A workflow's constructor function has some constraints in implementation. Learn more about them in [this documentation](!docs!/learn/fundamentals/workflows/constructor-constraints).
|
||||
|
||||
</Note>
|
||||
|
||||
@@ -802,7 +802,7 @@ A subscriber file exports:
|
||||
- An asynchronous function that's executed whenever the associated event is emitted, which is the `order.placed` event.
|
||||
- A configuration object with an `event` property indicating the event the subscriber is listening to.
|
||||
|
||||
The subscriber function accepts the event's details as a first paramter which has a `data` property that holds the data payload of the event. For example, Medusa emits the `order.placed` event with the order's ID in the data payload. The function also accepts as a second parameter the [Medusa container](!docs!/learn/basics/medusa-container).
|
||||
The subscriber function accepts the event's details as a first paramter which has a `data` property that holds the data payload of the event. For example, Medusa emits the `order.placed` event with the order's ID in the data payload. The function also accepts as a second parameter the [Medusa container](!docs!/learn/fundamentals/medusa-container).
|
||||
|
||||
In the function, you execute the `sendOrderConfirmationWorkflow` by invoking it, passing it the `container`, then using its `run` method. The `run` method accepts an object having an `input` property, which is the input to pass to the workflow. You pass the ID of the placed order as received in the event's data payload.
|
||||
|
||||
|
||||
@@ -82,7 +82,7 @@ Afterwards, the installation process will start, which will install the Medusa a
|
||||
|
||||
<Note title="Why is the storefront installed separately?">
|
||||
|
||||
The Medusa application is composed of a headless Node.js server and an admin dashboard. The storefront is installed or custom-built separately and connects to the Medusa application through its REST endpoints, called [API routes](!docs!/learn/basics/api-routes). Learn more about Medusa's architecture in [this documentation](!docs!/learn/advanced-development/architecture/overview).
|
||||
The Medusa application is composed of a headless Node.js server and an admin dashboard. The storefront is installed or custom-built separately and connects to the Medusa application through its REST endpoints, called [API routes](!docs!/learn/fundamentals/api-routes). Learn more about Medusa's architecture in [this documentation](!docs!/learn/introduction/architecture).
|
||||
|
||||
</Note>
|
||||
|
||||
@@ -138,7 +138,7 @@ In this step, you'll create a Sanity Module that provides the interface to conne
|
||||
|
||||
<Note>
|
||||
|
||||
Learn more about modules in [this documentation](!docs!/learn/basics/modules).
|
||||
Learn more about modules in [this documentation](!docs!/learn/fundamentals/modules).
|
||||
|
||||
</Note>
|
||||
|
||||
@@ -150,11 +150,11 @@ A module is created under the `src/modules` directory of your Medusa application
|
||||
|
||||
You define a module's functionalities in a service. A service is a TypeScript or JavaScript class that the module exports. In the service's methods, you can connect to the database, which is useful if your module defines tables in the database, or connect to a third-party service.
|
||||
|
||||
Medusa registers the module's service in the [Medusa container](!docs!/learn/basics/medusa-container), allowing you to easily resolve the service from other customizations and use its methods.
|
||||
Medusa registers the module's service in the [Medusa container](!docs!/learn/fundamentals/medusa-container), allowing you to easily resolve the service from other customizations and use its methods.
|
||||
|
||||
<Note title="What is the Medusa Container?">
|
||||
|
||||
The Medusa application registers resources, such as a module's service or the [logging tool](!docs!/learn/debugging-and-testing/logging), in the Medusa container so that you can resolve them from other customizations, as you'll see in later sections. Learn more about it in [this documentation](!docs!/learn/basics/medusa-container).
|
||||
The Medusa application registers resources, such as a module's service or the [logging tool](!docs!/learn/debugging-and-testing/logging), in the Medusa container so that you can resolve them from other customizations, as you'll see in later sections. Learn more about it in [this documentation](!docs!/learn/fundamentals/medusa-container).
|
||||
|
||||
</Note>
|
||||
|
||||
@@ -258,7 +258,7 @@ class SanityModuleService {
|
||||
|
||||
The service's constructor accepts two parameters:
|
||||
|
||||
1. Resources to resolve from the Module's container. A module has a different container than the Medusa application, which you can learn more about it in [this documentation](!docs!/learn/advanced-development/modules/container).
|
||||
1. Resources to resolve from the Module's container. A module has a different container than the Medusa application, which you can learn more about it in [this documentation](!docs!/learn/fundamentals/modules/container).
|
||||
2. The options passed to the module.
|
||||
|
||||
In the constructor, you create a Sanity client using the `createClient` function imported from `@sanity/client`. You pass it the options that the module receives.
|
||||
@@ -603,7 +603,7 @@ In the next steps, you'll create a link between the Product and Sanity modules t
|
||||
|
||||
Since a product has a document in Sanity, you want to build an association between the [Product](../../../commerce-modules/product/page.mdx) and Sanity modules so that when you retrieve a product, you also retrieve its associated Sanity document.
|
||||
|
||||
However, modules are [isolated](!docs!/learn/advanced-development/modules/isolation) to ensure they're re-usable and don't have side effects when integrated into the Medusa application. So, to build associations between modules, you define [module links](!docs!/learn/advanced-development/module-links).
|
||||
However, modules are [isolated](!docs!/learn/fundamentals/modules/isolation) to ensure they're re-usable and don't have side effects when integrated into the Medusa application. So, to build associations between modules, you define [module links](!docs!/learn/fundamentals/module-links).
|
||||
|
||||
A Module Link associates two modules' data models while maintaining module isolation. A data model can be a table in the database or a virtual model from an external systems.
|
||||
|
||||
@@ -657,7 +657,7 @@ Within a workflow's steps, you resolve modules to use their service's functional
|
||||
|
||||
<Note>
|
||||
|
||||
Learn more about workflows in [this documentation](!docs!/learn/basics/workflows)
|
||||
Learn more about workflows in [this documentation](!docs!/learn/fundamentals/workflows)
|
||||
|
||||
</Note>
|
||||
|
||||
@@ -743,7 +743,7 @@ You define the `syncStep` using the `createStep` function, which accepts two par
|
||||
|
||||
The step function accepts the step's input as a first parameter, and an object of options as a second. The object of options has a `container` property, which is an instance of the Medusa container that you can use to resolve resources.
|
||||
|
||||
In the step, you resolve from the Medusa container Sanity Module's service and [Query](!docs!/learn/advanced-development/module-links/query), which is a tool that allows you to retrieve data across modules and links.
|
||||
In the step, you resolve from the Medusa container Sanity Module's service and [Query](!docs!/learn/fundamentals/module-links/query), which is a tool that allows you to retrieve data across modules and links.
|
||||
|
||||
You use Query's `graph` method to retrieve products, filtering them by their IDs and applying pagination configurations. The `graph` method accepts a `fields` property in its object parameter, which indicates the product data model's fields and relations to retrieve.
|
||||
|
||||
@@ -816,7 +816,7 @@ If no errors occur, the step returns an instance of `StepResponse`, which must b
|
||||
|
||||
<Note title="Tip">
|
||||
|
||||
Learn more about compensation functions in [this documentation](!docs!/learn/advanced-development/workflows/compensation-function).
|
||||
Learn more about compensation functions in [this documentation](!docs!/learn/fundamentals/workflows/compensation-function).
|
||||
|
||||
</Note>
|
||||
|
||||
@@ -895,7 +895,7 @@ The `retentionTime` property indicates how long should the workflow's progress b
|
||||
|
||||
<Note title="Tip">
|
||||
|
||||
A workflow's constructor function has some constraints in implementation. Learn more about them in [this documentation](!docs!/learn/advanced-development/workflows/constructor-constraints).
|
||||
A workflow's constructor function has some constraints in implementation. Learn more about them in [this documentation](!docs!/learn/fundamentals/workflows/constructor-constraints).
|
||||
|
||||
</Note>
|
||||
|
||||
@@ -915,7 +915,7 @@ Subscribers are useful when you want to perform an action that isn't an integral
|
||||
|
||||
<Note>
|
||||
|
||||
Learn more about events and subscribers in [this documentation](!docs!/learn/basics/events-and-subscribers). You can also find the list of emitted events in [this reference](../../../events-reference/page.mdx).
|
||||
Learn more about events and subscribers in [this documentation](!docs!/learn/fundamentals/events-and-subscribers). You can also find the list of emitted events in [this reference](../../../events-reference/page.mdx).
|
||||
|
||||
</Note>
|
||||
|
||||
@@ -1316,7 +1316,7 @@ You can now manage the product's content in Sanity, add more fields, and customi
|
||||
|
||||
There are cases where you need to trigger the syncing of products manually, such as when an error occurs or you have products from before creating this integration.
|
||||
|
||||
The Medusa Admin dashboard is customizable, allowing you to either inject components, called [widgets](!docs!/learn/advanced-development/admin/widgets), into existing pages, or adding new pages, called [UI routes](!docs!/learn/advanced-development/admin/ui-routes). In these customizations, you can send requests to the Medusa application to perform custom operations.
|
||||
The Medusa Admin dashboard is customizable, allowing you to either inject components, called [widgets](!docs!/learn/fundamentals/admin/widgets), into existing pages, or adding new pages, called [UI routes](!docs!/learn/fundamentals/admin/ui-routes). In these customizations, you can send requests to the Medusa application to perform custom operations.
|
||||
|
||||
In this step, you'll add a widget to the product's details page. In that page, you'll show whether a product is synced with Sanity, and allow the admin user to trigger syncing it manually.
|
||||
|
||||
@@ -1326,7 +1326,7 @@ Before you do that, however, you need two new API routes in your Medusa applicat
|
||||
|
||||
<Note title="What is an API Route?">
|
||||
|
||||
An API route is a REST API endpoint that exposes commerce features to the admin dashboard or other frontend clients. Learn more about API routes in [this documentation](!docs!/learn/basics/api-routes).
|
||||
An API route is a REST API endpoint that exposes commerce features to the admin dashboard or other frontend clients. Learn more about API routes in [this documentation](!docs!/learn/fundamentals/api-routes).
|
||||
|
||||
</Note>
|
||||
|
||||
@@ -1395,7 +1395,7 @@ You'll test out this route in a later section.
|
||||
|
||||
<Note title="Tip">
|
||||
|
||||
Since the API route is added under the `/admin` prefix, only authenticated admin users can access it. Learn more about protected routes in [this documentation](!docs!/learn/advanced-development/api-routes/protected-routes).
|
||||
Since the API route is added under the `/admin` prefix, only authenticated admin users can access it. Learn more about protected routes in [this documentation](!docs!/learn/fundamentals/api-routes/protected-routes).
|
||||
|
||||
</Note>
|
||||
|
||||
@@ -1654,7 +1654,7 @@ To render a widget that matches the rest of the admin dashboard's design, you us
|
||||
|
||||
<Note>
|
||||
|
||||
Learn more about widgets in [this documentation](/learn/advanced-development/admin/widgets).
|
||||
Learn more about widgets in [this documentation](/learn/fundamentals/admin/widgets).
|
||||
|
||||
</Note>
|
||||
|
||||
@@ -1676,7 +1676,7 @@ Earlier in this guide when introducing workflows, you learned that you can track
|
||||
|
||||
Medusa has a [workflow engine](../../../architectural-modules/workflow-engine/page.mdx) that manages workflow executions, roll-backs, and other functionalities under the hood.
|
||||
|
||||
The workflow engine is an [architectural module](!docs!/learn/advanced-development/architecture/architectural-modules), which can be replaced with a [Redis Workflow Engine](../../../architectural-modules/workflow-engine/redis/page.mdx), or a custom one of your choice, allowing you to take ownership of your application's tooling.
|
||||
The workflow engine is an [architectural module](!docs!/learn/fundamentals/modules/architectural-modules), which can be replaced with a [Redis Workflow Engine](../../../architectural-modules/workflow-engine/redis/page.mdx), or a custom one of your choice, allowing you to take ownership of your application's tooling.
|
||||
|
||||
In your customizations, you can resolve the workflow engine from the container and manage executions of a workflow, such as retrieve them and check their progress.
|
||||
|
||||
@@ -1921,7 +1921,7 @@ To display components that match the design of the Medusa Admin, you use compone
|
||||
|
||||
<Note>
|
||||
|
||||
Learn more about UI routes in [this documentation](!docs!/learn/advanced-development/admin/ui-routes).
|
||||
Learn more about UI routes in [this documentation](!docs!/learn/fundamentals/admin/ui-routes).
|
||||
|
||||
</Note>
|
||||
|
||||
|
||||
@@ -11,7 +11,7 @@ export const metadata = {
|
||||
|
||||
# {metadata.title}
|
||||
|
||||
Run a custom CLI script. Learn more about it in [this guide](!docs!/learn/advanced-development/custom-cli-scripts).
|
||||
Run a custom CLI script. Learn more about it in [this guide](!docs!/learn/fundamentals/custom-cli-scripts).
|
||||
|
||||
```bash
|
||||
npx medusa exec [file] [args...]
|
||||
|
||||
@@ -14,7 +14,7 @@ The following table has a list of all resources that you can resolve in your cus
|
||||
|
||||
<Note>
|
||||
|
||||
Learn more about the Medusa Container in [this documentation](!docs!/learn/basics/medusa-container).
|
||||
Learn more about the Medusa Container in [this documentation](!docs!/learn/fundamentals/medusa-container).
|
||||
|
||||
</Note>
|
||||
|
||||
@@ -147,7 +147,7 @@ The following table has a list of all resources that you can resolve in a module
|
||||
|
||||
<Note>
|
||||
|
||||
Learn more about the Module Container in [this documentation](!docs!/learn/advanced-development/modules/container).
|
||||
Learn more about the Module Container in [this documentation](!docs!/learn/fundamentals/modules/container).
|
||||
|
||||
</Note>
|
||||
|
||||
|
||||
@@ -173,13 +173,13 @@ You can create a B2B module that adds necessary data models to represent a B2B c
|
||||
|
||||
<CardList items={[
|
||||
{
|
||||
href: "!docs!/learn/basics/modules",
|
||||
href: "!docs!/learn/fundamentals/modules",
|
||||
title: "Create Module",
|
||||
text: "Learn how to create a module in Medusa.",
|
||||
icon: AcademicCapSolid,
|
||||
},
|
||||
{
|
||||
href: "!docs!/learn/basics/modules#1-create-data-model",
|
||||
href: "!docs!/learn/fundamentals/modules#1-create-data-model",
|
||||
title: "Create Data Models",
|
||||
text: "Learn how to create data models.",
|
||||
icon: AcademicCapSolid,
|
||||
@@ -187,7 +187,7 @@ You can create a B2B module that adds necessary data models to represent a B2B c
|
||||
]} />
|
||||
|
||||
{/* <Card
|
||||
href="!docs!/learn/advanced-development/modules/module-relationships"
|
||||
href="!docs!/learn/fundamentals/modules/module-relationships"
|
||||
title="Create Module Relationships"
|
||||
text="Learn how to create a relationship between modules."
|
||||
icon={AcademicCapSolid}
|
||||
@@ -573,7 +573,7 @@ To implement a more advanced B2B sales flow, add custom data models such as `Com
|
||||
This provides more granular control of your B2B sales and allows you to build features like privileges, limits, and more.
|
||||
|
||||
<Card
|
||||
href="!docs!/learn/basics/modules#1-create-data-model"
|
||||
href="!docs!/learn/fundamentals/modules#1-create-data-model"
|
||||
title="Create a Data Model"
|
||||
text="Learn how to create a custom data model in a module."
|
||||
icon={AcademicCapSolid}
|
||||
@@ -588,7 +588,7 @@ On the frontend clients communicating with your store, such as the storefront, y
|
||||
The API route can check if the customer has any group with an associated company.
|
||||
|
||||
<Card
|
||||
href="!docs!/learn/basics/api-routes"
|
||||
href="!docs!/learn/fundamentals/api-routes"
|
||||
title="Create an API Route"
|
||||
text="Learn how to create an API Route in Medusa."
|
||||
icon={AcademicCapSolid}
|
||||
@@ -724,19 +724,19 @@ The Medusa Admin plugin can be extended to add widgets, new pages, and setting p
|
||||
|
||||
<CardList items={[
|
||||
{
|
||||
href: "!docs!/learn/advanced-development/admin/widgets",
|
||||
href: "!docs!/learn/fundamentals/admin/widgets",
|
||||
title: "Create Admin Widget",
|
||||
text: "Learn how to add widgets into existing admin pages.",
|
||||
icon: AcademicCapSolid,
|
||||
},
|
||||
{
|
||||
href: "!docs!/learn/advanced-development/admin/ui-routes",
|
||||
href: "!docs!/learn/fundamentals/admin/ui-routes",
|
||||
title: "Create Admin UI Routes",
|
||||
text: "Learn how to add new pages to your Medusa Admin.",
|
||||
icon: AcademicCapSolid,
|
||||
},
|
||||
{
|
||||
href: "!docs!/learn/advanced-development/admin/ui-routes#create-settings-page",
|
||||
href: "!docs!/learn/fundamentals/admin/ui-routes#create-settings-page",
|
||||
title: "Create Admin Setting Page",
|
||||
text: "Learn how to add new page to the Medusa Admin settings.",
|
||||
icon: AcademicCapSolid,
|
||||
|
||||
@@ -36,13 +36,13 @@ The `inventory-item.updated` event is currently not emitted.
|
||||
|
||||
<CardList items={[
|
||||
{
|
||||
href: "!docs!/learn/basics/modules",
|
||||
href: "!docs!/learn/fundamentals/modules",
|
||||
title: "Create a Module",
|
||||
text: "Learn how to create a module in Medusa.",
|
||||
icon: AcademicCapSolid,
|
||||
},
|
||||
{
|
||||
href: "!docs!/learn/basics/modules#1-create-data-model",
|
||||
href: "!docs!/learn/fundamentals/modules#1-create-data-model",
|
||||
title: "Create a Data Model",
|
||||
text: "Learn how to create a data model.",
|
||||
icon: AcademicCapSolid,
|
||||
@@ -51,13 +51,13 @@ The `inventory-item.updated` event is currently not emitted.
|
||||
|
||||
<CardList items={[
|
||||
{
|
||||
href: "!docs!/learn/basics/api-routes",
|
||||
href: "!docs!/learn/fundamentals/api-routes",
|
||||
title: "Create an API Route",
|
||||
text: "Learn how to create an API route in Medusa.",
|
||||
icon: AcademicCapSolid,
|
||||
},
|
||||
{
|
||||
href: "!docs!/learn/basics/events-and-subscribers",
|
||||
href: "!docs!/learn/fundamentals/events-and-subscribers",
|
||||
title: "Create a Subscriber",
|
||||
text: "Learn how to create a subscriber in Medusa.",
|
||||
icon: AcademicCapSolid,
|
||||
@@ -409,7 +409,7 @@ Medusa also provides Notification Module Providers that integrate with third-par
|
||||
icon: AcademicCapSolid,
|
||||
},
|
||||
{
|
||||
href: "!docs!/learn/basics/events-and-subscribers",
|
||||
href: "!docs!/learn/fundamentals/events-and-subscribers",
|
||||
title: "Create Subscriber",
|
||||
text: "Learn how to create a subscriber to handle events.",
|
||||
icon: AcademicCapSolid,
|
||||
@@ -428,7 +428,7 @@ To implement that:
|
||||
- Create a scheduled job that executes the workflow automatically at the specified time pattern.
|
||||
|
||||
<Card
|
||||
href="!docs!/learn/basics/scheduled-jobs"
|
||||
href="!docs!/learn/fundamentals/scheduled-jobs"
|
||||
title="Create a Scheduled Job"
|
||||
text="Learn how to create a scheduled job in Medusa."
|
||||
icon={AcademicCapSolid}
|
||||
@@ -654,7 +654,7 @@ The `order.placed` event is currently not emitted.
|
||||
</Note>
|
||||
|
||||
<Card
|
||||
href="!docs!/learn/basics/events-and-subscribers"
|
||||
href="!docs!/learn/fundamentals/events-and-subscribers"
|
||||
title="Create a Subscriber"
|
||||
text="Learn how to create a subscriber in Medusa."
|
||||
icon={AcademicCapSolid}
|
||||
@@ -662,7 +662,7 @@ The `order.placed` event is currently not emitted.
|
||||
|
||||
{/* <CardList items={[
|
||||
{
|
||||
href: "!docs!/learn/basics/events-and-subscribers",
|
||||
href: "!docs!/learn/fundamentals/events-and-subscribers",
|
||||
title: "Create a Subscriber",
|
||||
text: "Learn how to create a subscriber in Medusa.",
|
||||
icon: AcademicCapSolid,
|
||||
@@ -695,7 +695,7 @@ Medusa's commerce features are geared towards automating RMA flows and ensuring
|
||||
icon: AcademicCapSolid,
|
||||
},
|
||||
{
|
||||
href: "!docs!/learn/basics/events-and-subscribers",
|
||||
href: "!docs!/learn/fundamentals/events-and-subscribers",
|
||||
title: "Create a Subscriber",
|
||||
text: "Learn how to create a subscriber in Medusa.",
|
||||
icon: AcademicCapSolid,
|
||||
@@ -738,7 +738,7 @@ The `order.placed` event is currently not emitted.
|
||||
icon: AcademicCapSolid,
|
||||
},
|
||||
{
|
||||
href: "!docs!/learn/basics/events-and-subscribers",
|
||||
href: "!docs!/learn/fundamentals/events-and-subscribers",
|
||||
title: "Create a Subscriber",
|
||||
text: "Learn how to create a subscriber in Medusa.",
|
||||
icon: AcademicCapSolid,
|
||||
@@ -840,13 +840,13 @@ You can also create a scheduled job that checks whether the number of new produc
|
||||
|
||||
<CardList items={[
|
||||
{
|
||||
href: "!docs!/learn/basics/events-and-subscribers",
|
||||
href: "!docs!/learn/fundamentals/events-and-subscribers",
|
||||
title: "Create a Subscriber",
|
||||
text: "Learn how to create a subscriber in Medusa.",
|
||||
icon: AcademicCapSolid,
|
||||
},
|
||||
{
|
||||
href: "!docs!/learn/basics/scheduled-jobs",
|
||||
href: "!docs!/learn/fundamentals/scheduled-jobs",
|
||||
title: "Scheduled Jobs",
|
||||
text: "Learn how to create a scheduled job in Medusa.",
|
||||
icon: AcademicCapSolid,
|
||||
|
||||
@@ -174,7 +174,7 @@ class DigitalProductModuleService extends MedusaService({
|
||||
export default DigitalProductModuleService
|
||||
```
|
||||
|
||||
The service extends the [service factory](!docs!/learn/advanced-development/modules/service-factory), which provides basic data-management features.
|
||||
The service extends the [service factory](!docs!/learn/fundamentals/modules/service-factory), which provides basic data-management features.
|
||||
|
||||
### Create Module Definition
|
||||
|
||||
@@ -208,8 +208,8 @@ module.exports = defineConfig({
|
||||
|
||||
### Further Reads
|
||||
|
||||
- [How to Create a Module](!docs!/learn/basics/modules)
|
||||
- [How to Create a Data Model](!docs!/learn/basics/modules#1-create-data-model)
|
||||
- [How to Create a Module](!docs!/learn/fundamentals/modules)
|
||||
- [How to Create a Data Model](!docs!/learn/fundamentals/modules#1-create-data-model)
|
||||
|
||||
---
|
||||
|
||||
@@ -268,7 +268,7 @@ This defines a link between `DigitalProductOrder` and the Order Module’s `Orde
|
||||
|
||||
### Further Read
|
||||
|
||||
- [How to Define Module Links](!docs!/learn/advanced-development/module-links)
|
||||
- [How to Define Module Links](!docs!/learn/fundamentals/module-links)
|
||||
|
||||
---
|
||||
|
||||
@@ -376,8 +376,8 @@ Make sure to replace `{token}` with the JWT token you retrieved.
|
||||
|
||||
### Further Reads
|
||||
|
||||
- [How to Create an API Route](!docs!/learn/basics/api-routes)
|
||||
- [Learn more about Query](!docs!/learn/advanced-development/module-links/query)
|
||||
- [How to Create an API Route](!docs!/learn/fundamentals/api-routes)
|
||||
- [Learn more about Query](!docs!/learn/fundamentals/module-links/query)
|
||||
|
||||
---
|
||||
|
||||
@@ -626,9 +626,9 @@ You’ll test out the workflow in the next section.
|
||||
|
||||
### Further Reads
|
||||
|
||||
- [How to Create a Workflow](!docs!/learn/basics/workflows)
|
||||
- [What is the Compensation Function](!docs!/learn/advanced-development/workflows/compensation-function)
|
||||
- [Learn more about the remote link function](!docs!/learn/advanced-development/module-links/remote-link)
|
||||
- [How to Create a Workflow](!docs!/learn/fundamentals/workflows)
|
||||
- [What is the Compensation Function](!docs!/learn/fundamentals/workflows/compensation-function)
|
||||
- [Learn more about the remote link function](!docs!/learn/fundamentals/module-links/remote-link)
|
||||
|
||||
---
|
||||
|
||||
@@ -727,7 +727,7 @@ This adds a validation middleware to ensure that the body of `POST` requests sen
|
||||
|
||||
### Further Read
|
||||
|
||||
- [How to Create a Middleware](!docs!/learn/advanced-development/api-routes/middlewares)
|
||||
- [How to Create a Middleware](!docs!/learn/fundamentals/api-routes/middlewares)
|
||||
|
||||
---
|
||||
|
||||
@@ -1062,8 +1062,8 @@ Once you log in, you’ll find a new sidebar item, “Digital Products.” If yo
|
||||
|
||||
### Further Reads
|
||||
|
||||
- [How to Create UI Routes](!docs!/learn/advanced-development/admin/ui-routes)
|
||||
- [How to Create Admin Widgets](!docs!/learn/advanced-development/admin/widgets)
|
||||
- [How to Create UI Routes](!docs!/learn/fundamentals/admin/ui-routes)
|
||||
- [How to Create Admin Widgets](!docs!/learn/fundamentals/admin/widgets)
|
||||
|
||||
---
|
||||
|
||||
@@ -1836,7 +1836,7 @@ In a later step, you’ll add an API route to allow customers to view and downlo
|
||||
|
||||
### Further Read
|
||||
|
||||
- [Conditions in Workflows with When-Then](!docs!/learn/advanced-development/workflows/conditions)
|
||||
- [Conditions in Workflows with When-Then](!docs!/learn/fundamentals/workflows/conditions)
|
||||
|
||||
---
|
||||
|
||||
@@ -2319,7 +2319,7 @@ You’ll test out these API routes in the next step.
|
||||
|
||||
### Further Reads
|
||||
|
||||
- [What are protected API routes](!docs!/learn/advanced-development/api-routes/protected-routes)
|
||||
- [What are protected API routes](!docs!/learn/fundamentals/api-routes/protected-routes)
|
||||
|
||||
---
|
||||
|
||||
@@ -2746,4 +2746,4 @@ Aside from customizing the Next.js Starter storefront, you can also create a cus
|
||||
|
||||
### Admin Development
|
||||
|
||||
In this recipe, you learned how to customize the admin with UI routes. You can also do further customization using widgets. Learn more in [this documentation](!docs!/learn/advanced-development/admin).
|
||||
In this recipe, you learned how to customize the admin with UI routes. You can also do further customization using widgets. Learn more in [this documentation](!docs!/learn/fundamentals/admin).
|
||||
@@ -49,7 +49,7 @@ Your custom features and functionalities are implemented inside modules. The mod
|
||||
The module will hold your custom data models and the service implementing digital-product-related features.
|
||||
|
||||
<Card
|
||||
href="!docs!/learn/basics/modules"
|
||||
href="!docs!/learn/fundamentals/modules"
|
||||
title="How to Create a Module"
|
||||
text="Learn how to create a module."
|
||||
icon={AcademicCapSolid}
|
||||
@@ -63,13 +63,13 @@ Then, you can link your custom data model to data models from other modules. For
|
||||
|
||||
<CardList itemsPerRow={2} items={[
|
||||
{
|
||||
href: "!docs!/learn/basics/modules#1-create-data-model",
|
||||
href: "!docs!/learn/fundamentals/modules#1-create-data-model",
|
||||
title: "How to Create a Data Model",
|
||||
text: "Learn how to create a data model.",
|
||||
icon: AcademicCapSolid,
|
||||
},
|
||||
{
|
||||
href: "!docs!/learn/advanced-development/module-links",
|
||||
href: "!docs!/learn/fundamentals/module-links",
|
||||
title: "Module Links",
|
||||
text: "Learn how to link data models of different modules.",
|
||||
icon: AcademicCapSolid,
|
||||
@@ -83,7 +83,7 @@ Your module’s main service holds data-management and other related features. T
|
||||
Medusa facilitates implementing data-management features using the service factory. Your module's main service can extend this service factory, and it generates data-management methods for your data models.
|
||||
|
||||
<Card
|
||||
href="!docs!/learn/advanced-development/modules/service-factory"
|
||||
href="!docs!/learn/fundamentals/modules/service-factory"
|
||||
title="Service Factory"
|
||||
text="Learn about the service factory and how to use it."
|
||||
icon={AcademicCapSolid}
|
||||
@@ -98,7 +98,7 @@ API routes expose your features to external applications, such as the admin dash
|
||||
You can create custom API routes that allow merchants to list and create digital products. In these API routes, you resolve the Digital Product Module’s main service to use its data-management features.
|
||||
|
||||
<Card
|
||||
href="!docs!/learn/basics/api-routes"
|
||||
href="!docs!/learn/fundamentals/api-routes"
|
||||
title="API Routes"
|
||||
text="Learn how to create an API route."
|
||||
icon={AcademicCapSolid}
|
||||
@@ -113,7 +113,7 @@ Your use case most likely has flows, such as creating digital products, that req
|
||||
Create workflows to implement these flows, then utilize these workflows in other resources, such as an API route.
|
||||
|
||||
<Card
|
||||
href="!docs!/learn/basics/workflows"
|
||||
href="!docs!/learn/fundamentals/workflows"
|
||||
title="Workflows"
|
||||
text="Learn how to create a workflow."
|
||||
icon={AcademicCapSolid}
|
||||
@@ -129,13 +129,13 @@ Use the remote link to create a link between two records, and use Query to fetch
|
||||
|
||||
<CardList itemsPerRow={2} items={[
|
||||
{
|
||||
href: "!docs!/learn/advanced-development/module-links/remote-link",
|
||||
href: "!docs!/learn/fundamentals/module-links/remote-link",
|
||||
title: "How to Use the Remote Link",
|
||||
text: "Learn how to link data models of different modules.",
|
||||
icon: AcademicCapSolid,
|
||||
},
|
||||
{
|
||||
href: "!docs!/learn/advanced-development/module-links/query",
|
||||
href: "!docs!/learn/fundamentals/module-links/query",
|
||||
title: "How to Use Query",
|
||||
text: "Learn how to fetch data across modules with Medusa's Query.",
|
||||
icon: AcademicCapSolid,
|
||||
@@ -152,13 +152,13 @@ In your customizations, you send requests to the API routes you created to creat
|
||||
|
||||
<CardList items={[
|
||||
{
|
||||
href: "!docs!/learn/advanced-development/admin/widgets",
|
||||
href: "!docs!/learn/fundamentals/admin/widgets",
|
||||
title: "Create a Widget",
|
||||
text: "Learn how to create a widget in the Medusa Admin.",
|
||||
icon: AcademicCapSolid,
|
||||
},
|
||||
{
|
||||
href: "!docs!/learn/advanced-development/admin/ui-routes",
|
||||
href: "!docs!/learn/fundamentals/admin/ui-routes",
|
||||
title: "Create UI Route",
|
||||
text: "Learn how to create a UI route in the Medusa Admin.",
|
||||
icon: AcademicCapSolid,
|
||||
|
||||
@@ -28,7 +28,7 @@ To integrate an external system, such as an ERP, into your Medusa application, c
|
||||
Then, resolve the module's main service in other resources, such as API routes or workflows, to perform actions in the external system.
|
||||
|
||||
<Card
|
||||
href="!docs!/learn/basics/modules"
|
||||
href="!docs!/learn/fundamentals/modules"
|
||||
title="Create a Module"
|
||||
text="Learn how to create a module in Medusa."
|
||||
icon={AcademicCapSolid}
|
||||
@@ -101,7 +101,7 @@ export const serviceHighlights = [
|
||||
|
||||
<Note title="Tip">
|
||||
|
||||
You can store the product's ID in the external system using the `metadata` property of the `Product` data model in the Product Module. Alternatively, you can create a [data model](!docs!/learn/basics/modules#1-create-data-model) in your module to store data related to the external system.
|
||||
You can store the product's ID in the external system using the `metadata` property of the `Product` data model in the Product Module. Alternatively, you can create a [data model](!docs!/learn/fundamentals/modules#1-create-data-model) in your module to store data related to the external system.
|
||||
|
||||
</Note>
|
||||
|
||||
@@ -150,7 +150,7 @@ Workflows can be executed from anywhere. So, taking the workflow described above
|
||||
Workflows guarantee data consistency through their compensation feature. You can provide a compensation function to steps that roll back the actions of that step. Then, if an error occurs in any step, the actions of previous steps are rolled back using their compensation function.
|
||||
|
||||
<Card
|
||||
href="!docs!/learn/basics/workflows"
|
||||
href="!docs!/learn/fundamentals/workflows"
|
||||
title="Workflows"
|
||||
text="Learn more about Workflows and how to create them."
|
||||
icon={AcademicCapSolid}
|
||||
@@ -295,7 +295,7 @@ You can provide webhook listeners that your external systems call when their dat
|
||||
For example, suppose an administrator changes the product data in the ERP system. The system then sends a request to the webhook you define in your Medusa application, which updates the product data in the application.
|
||||
|
||||
<Card
|
||||
href="!docs!/learn/basics/api-routes"
|
||||
href="!docs!/learn/fundamentals/api-routes"
|
||||
title="Create an API Route"
|
||||
text="Learn how to create an API Route in Medusa."
|
||||
icon={AcademicCapSolid}
|
||||
|
||||
@@ -140,7 +140,7 @@ class RestaurantModuleService extends MedusaService({
|
||||
export default RestaurantModuleService
|
||||
```
|
||||
|
||||
The service extends the [service factory](!docs!/learn/advanced-development/modules/service-factory), which provides basic data-management features.
|
||||
The service extends the [service factory](!docs!/learn/fundamentals/modules/service-factory), which provides basic data-management features.
|
||||
|
||||
### Create Restaurant Module Definition
|
||||
|
||||
@@ -174,8 +174,8 @@ module.exports = defineConfig({
|
||||
|
||||
### Further Reads
|
||||
|
||||
- [How to Create a Module](!docs!/learn/basics/modules)
|
||||
- [How to Create a Data Model](!docs!/learn/basics/modules#1-create-data-model)
|
||||
- [How to Create a Module](!docs!/learn/fundamentals/modules)
|
||||
- [How to Create a Data Model](!docs!/learn/fundamentals/modules#1-create-data-model)
|
||||
|
||||
---
|
||||
|
||||
@@ -284,7 +284,7 @@ class DeliveryModuleService extends MedusaService({
|
||||
export default DeliveryModuleService
|
||||
```
|
||||
|
||||
The service extends the [service factory](!docs!/learn/advanced-development/modules/service-factory), which provides basic data-management features.
|
||||
The service extends the [service factory](!docs!/learn/fundamentals/modules/service-factory), which provides basic data-management features.
|
||||
|
||||
### Create Delivery Module Definition
|
||||
|
||||
@@ -415,7 +415,7 @@ This defines a link between the Delivery Module’s `delivery` data model and th
|
||||
|
||||
### Further Reads
|
||||
|
||||
- [How to Define Links](!docs!/learn/advanced-development/module-links)
|
||||
- [How to Define Links](!docs!/learn/fundamentals/module-links)
|
||||
|
||||
---
|
||||
|
||||
@@ -625,15 +625,15 @@ The API route creates a restaurant and returns it.
|
||||
|
||||
<Note>
|
||||
|
||||
If you’re calling this API route from a frontend client, make sure to set the [CORS middleware](!docs!/learn/advanced-development/api-routes/cors) on it since it’s not under the `/store` or `/admin` route prefixes.
|
||||
If you’re calling this API route from a frontend client, make sure to set the [CORS middleware](!docs!/learn/fundamentals/api-routes/cors) on it since it’s not under the `/store` or `/admin` route prefixes.
|
||||
|
||||
</Note>
|
||||
|
||||
### Further Reads
|
||||
|
||||
- [How to Create a Workflow](!docs!/learn/basics/workflows)
|
||||
- [What is a Compensation Function](!docs!/learn/advanced-development/workflows/compensation-function)
|
||||
- [How to Create an API route](!docs!/learn/basics/api-routes)
|
||||
- [How to Create a Workflow](!docs!/learn/fundamentals/workflows)
|
||||
- [What is a Compensation Function](!docs!/learn/fundamentals/workflows/compensation-function)
|
||||
- [How to Create an API route](!docs!/learn/fundamentals/api-routes)
|
||||
|
||||
---
|
||||
|
||||
@@ -704,7 +704,7 @@ This returns the list of restaurants in the response.
|
||||
|
||||
### Further Reads
|
||||
|
||||
- [What is and how to use it](!docs!/learn/advanced-development/module-links/query)
|
||||
- [What is and how to use it](!docs!/learn/fundamentals/module-links/query)
|
||||
- [How to Retrieve Prices for Product Variants](../../../../commerce-modules/product/guides/price/page.mdx)
|
||||
|
||||
---
|
||||
@@ -1561,7 +1561,7 @@ In this step, you’ll create the workflow that handles the different stages of
|
||||
|
||||
For example, when a restaurant finishes preparing the order’s items, this workflow creates a fulfillment for the order.
|
||||
|
||||
This workflow will be a [long-running workflow](!docs!/learn/advanced-development/workflows/long-running-workflow) that runs asynchronously in the background. Its async steps only succeed once an outside action sets its status, allowing the workflow to move to the next step.
|
||||
This workflow will be a [long-running workflow](!docs!/learn/fundamentals/workflows/long-running-workflow) that runs asynchronously in the background. Its async steps only succeed once an outside action sets its status, allowing the workflow to move to the next step.
|
||||
|
||||
API routes that perform actions related to the delivery, which you’ll create later, will trigger the workflow to move to the next step.
|
||||
|
||||
@@ -2082,7 +2082,7 @@ In the next steps, you’ll execute the workflow and see it in action as you add
|
||||
|
||||
### Further Reads
|
||||
|
||||
- [Long-Running Workflows](!docs!/learn/advanced-development/workflows/long-running-workflow)
|
||||
- [Long-Running Workflows](!docs!/learn/fundamentals/workflows/long-running-workflow)
|
||||
|
||||
---
|
||||
|
||||
@@ -3478,7 +3478,7 @@ The next steps of this example depend on your use case. This section provides so
|
||||
|
||||
### Admin Development
|
||||
|
||||
The Medusa Admin is extendable, allowing you to add widgets to existing pages or create new pages. Learn more about it in [this documentation](!docs!/learn/advanced-development/admin).
|
||||
The Medusa Admin is extendable, allowing you to add widgets to existing pages or create new pages. Learn more about it in [this documentation](!docs!/learn/fundamentals/admin).
|
||||
|
||||
### Storefront Development
|
||||
|
||||
|
||||
@@ -120,7 +120,7 @@ class MarketplaceModuleService extends MedusaService({
|
||||
export default MarketplaceModuleService
|
||||
```
|
||||
|
||||
The service extends the [service factory](!docs!/learn/advanced-development/modules/service-factory), which provides basic data-management features.
|
||||
The service extends the [service factory](!docs!/learn/fundamentals/modules/service-factory), which provides basic data-management features.
|
||||
|
||||
### Create Module Definition
|
||||
|
||||
@@ -154,8 +154,8 @@ module.exports = defineConfig({
|
||||
|
||||
### Further Reads
|
||||
|
||||
- [How to Create a Module](!docs!/learn/basics/modules)
|
||||
- [How to Create Data Models](!docs!/learn/basics/modules#1-create-data-model)
|
||||
- [How to Create a Module](!docs!/learn/fundamentals/modules)
|
||||
- [How to Create Data Models](!docs!/learn/fundamentals/modules#1-create-data-model)
|
||||
|
||||
---
|
||||
|
||||
@@ -213,7 +213,7 @@ This adds a list link between the `Vendor` and `Order` data models, indicating t
|
||||
|
||||
### Further Read
|
||||
|
||||
- [How to Define Module Links](!docs!/learn/advanced-development/module-links)
|
||||
- [How to Define Module Links](!docs!/learn/fundamentals/module-links)
|
||||
|
||||
---
|
||||
|
||||
@@ -350,10 +350,10 @@ You return the created vendor admin.
|
||||
|
||||
### Further Read
|
||||
|
||||
- [How to Create a Workflow](!docs!/learn/basics/workflows)
|
||||
- [How to Create a Workflow](!docs!/learn/fundamentals/workflows)
|
||||
- [What is an Actor Type](../../../../commerce-modules/auth/auth-identity-and-actor-types/page.mdx)
|
||||
- [How to Create an Actor Type](../../../../commerce-modules/auth/create-actor-type/page.mdx)
|
||||
- [What is a Compensation Function](!docs!/learn/advanced-development/workflows/compensation-function)
|
||||
- [What is a Compensation Function](!docs!/learn/fundamentals/workflows/compensation-function)
|
||||
|
||||
---
|
||||
|
||||
@@ -527,7 +527,7 @@ This route is available because you created the `vendor` actor type previously.
|
||||
|
||||
<Note>
|
||||
|
||||
Don't include a trailing slash at the end of the URL. Learn more [here](!docs!/learn/advanced-development/api-routes/middlewares).
|
||||
Don't include a trailing slash at the end of the URL. Learn more [here](!docs!/learn/fundamentals/api-routes/middlewares).
|
||||
|
||||
</Note>
|
||||
|
||||
@@ -563,8 +563,8 @@ Use this token in the header of later requests that require authentication.
|
||||
|
||||
### Further Reads
|
||||
|
||||
- [How to Create an API route](!docs!/learn/basics/api-routes)
|
||||
- [How to Create a Middleware](!docs!/learn/advanced-development/api-routes/middlewares)
|
||||
- [How to Create an API route](!docs!/learn/fundamentals/api-routes)
|
||||
- [How to Create a Middleware](!docs!/learn/fundamentals/api-routes/middlewares)
|
||||
- [Learn more about the /auth route](../../../../commerce-modules/auth/authentication-route/page.mdx)
|
||||
|
||||
---
|
||||
@@ -792,8 +792,8 @@ curl 'http://localhost:9000/vendors/products' \
|
||||
|
||||
### Further Reads
|
||||
|
||||
- [How to use Query](!docs!/learn/advanced-development/module-links/query)
|
||||
- [How to use the Remote Link](!docs!/learn/advanced-development/module-links/remote-link)
|
||||
- [How to use Query](!docs!/learn/fundamentals/module-links/query)
|
||||
- [How to use the Remote Link](!docs!/learn/fundamentals/module-links/remote-link)
|
||||
|
||||
---
|
||||
|
||||
@@ -1392,7 +1392,7 @@ For example, you can link sales channels to vendors or other settings.
|
||||
|
||||
<Note>
|
||||
|
||||
[Learn more about module links](!docs!/learn/advanced-development/module-links).
|
||||
[Learn more about module links](!docs!/learn/fundamentals/module-links).
|
||||
|
||||
</Note>
|
||||
|
||||
@@ -1404,6 +1404,6 @@ You can also create a custom storefront. Check out the [Storefront Development](
|
||||
|
||||
### Admin Development
|
||||
|
||||
The Medusa Admin is extendable, allowing you to add widgets to existing pages or create new pages. Learn more about it in [this documentation](!docs!/learn/advanced-development/admin).
|
||||
The Medusa Admin is extendable, allowing you to add widgets to existing pages or create new pages. Learn more about it in [this documentation](!docs!/learn/fundamentals/admin).
|
||||
|
||||
If your use case requires bigger customizations to the admin, such as showing different products and orders based on the logged-in vendor, use the [admin API routes](!api!/admin) to build a custom admin.
|
||||
@@ -35,13 +35,13 @@ You can create a marketplace module that implements data models for vendors, the
|
||||
|
||||
<CardList items={[
|
||||
{
|
||||
href: "!docs!/learn/basics/modules",
|
||||
href: "!docs!/learn/fundamentals/modules",
|
||||
title: "Create a Module",
|
||||
text: "Learn how to create a module.",
|
||||
icon: AcademicCapSolid,
|
||||
},
|
||||
{
|
||||
href: "!docs!/learn/basics/modules#1-create-data-model",
|
||||
href: "!docs!/learn/fundamentals/modules#1-create-data-model",
|
||||
title: "Create Data Models",
|
||||
text: "Create data models in the module.",
|
||||
icon: AcademicCapSolid,
|
||||
@@ -57,7 +57,7 @@ Since a vendor has products, orders, and other models based on your use case, de
|
||||
For example, if you defined a vendor data model in a marketplace module, you can define a module link between the vendor and the Product Module's product data model.
|
||||
|
||||
<Card
|
||||
href="!docs!/learn/advanced-development/module-links"
|
||||
href="!docs!/learn/fundamentals/module-links"
|
||||
title="Define a Module Link"
|
||||
text="Learn how to define a module link."
|
||||
icon={AcademicCapSolid}
|
||||
@@ -86,13 +86,13 @@ If you provide vendor or sellers with custom features, or a different way of man
|
||||
|
||||
<CardList items={[
|
||||
{
|
||||
href: "!docs!/learn/basics/api-routes",
|
||||
href: "!docs!/learn/fundamentals/api-routes",
|
||||
title: "Create API Routes",
|
||||
text: "Learn how to create an API Route in Medusa.",
|
||||
icon: AcademicCapSolid,
|
||||
},
|
||||
{
|
||||
href: "!docs!/learn/advanced-development/api-routes/protected-routes",
|
||||
href: "!docs!/learn/fundamentals/api-routes/protected-routes",
|
||||
title: "Protect Routes",
|
||||
text: "Learn how to guard routes to allow authenticated users only.",
|
||||
icon: AcademicCapSolid,
|
||||
@@ -108,7 +108,7 @@ If your use case allows a customer's orders to have items from different vendors
|
||||
If your flow requires different steps, such as creating a parent order then creating a child order, create a workflow and execute it from the API route.
|
||||
|
||||
<Card
|
||||
href="!docs!/learn/basics/workflows"
|
||||
href="!docs!/learn/fundamentals/workflows"
|
||||
title="Create a Workflow"
|
||||
text="Learn how to create a workflow in Medusa."
|
||||
icon={AcademicCapSolid}
|
||||
|
||||
@@ -157,7 +157,7 @@ By integrating a third-party Content Management Systems (CMS), you benefit from
|
||||
To integrate a third-party system, create a custom module whose main service connects to that third-party service.
|
||||
|
||||
<Card
|
||||
href="!docs!/learn/basics/modules"
|
||||
href="!docs!/learn/fundamentals/modules"
|
||||
title="Create a Module"
|
||||
text="Learn how to create a module in Medusa."
|
||||
icon={AcademicCapSolid}
|
||||
|
||||
@@ -52,7 +52,7 @@ Another channel that attracts customer sales is social media. You can create a c
|
||||
icon: AcademicCapSolid,
|
||||
},
|
||||
{
|
||||
href: "!docs!/learn/basics/modules",
|
||||
href: "!docs!/learn/fundamentals/modules",
|
||||
title: "Create a Module",
|
||||
text: "Learn how to create a module.",
|
||||
icon: AcademicCapSolid,
|
||||
@@ -73,13 +73,13 @@ Medusa’s architecture also makes it easier to integrate any third-party servic
|
||||
|
||||
<CardList itemsPerRow={2} items={[
|
||||
{
|
||||
href: "!docs!/learn/basics/modules",
|
||||
href: "!docs!/learn/fundamentals/modules",
|
||||
title: "Create a Module",
|
||||
text: "Learn how to create a module.",
|
||||
icon: AcademicCapSolid,
|
||||
},
|
||||
{
|
||||
href: "!docs!/learn/basics/api-routes",
|
||||
href: "!docs!/learn/fundamentals/api-routes",
|
||||
title: "Create an API Route",
|
||||
text: "Learn how to create an API route.",
|
||||
icon: AcademicCapSolid,
|
||||
|
||||
@@ -43,13 +43,13 @@ For example, you can support importing orders into Medusa through a custom API R
|
||||
icon: AcademicCapSolid,
|
||||
},
|
||||
{
|
||||
href: "!docs!/learn/basics/api-routes",
|
||||
href: "!docs!/learn/fundamentals/api-routes",
|
||||
title: "Create API Route",
|
||||
text: "Learn how to create a custom API Route.",
|
||||
icon: AcademicCapSolid,
|
||||
},
|
||||
{
|
||||
href: "!docs!/learn/basics/scheduled-jobs",
|
||||
href: "!docs!/learn/fundamentals/scheduled-jobs",
|
||||
title: "Create Scheduled Jobs",
|
||||
text: "Learn how to create a scheduled job.",
|
||||
icon: AcademicCapSolid,
|
||||
@@ -82,7 +82,7 @@ Emitting of event `order.fulfillment_created` isn't implemented yet.
|
||||
icon: AcademicCapSolid,
|
||||
},
|
||||
{
|
||||
href: "!docs!/learn/basics/events-and-subscribers",
|
||||
href: "!docs!/learn/fundamentals/events-and-subscribers",
|
||||
title: "Create a Subscriber",
|
||||
text: "Learn about create a subscriber",
|
||||
icon: AcademicCapSolid,
|
||||
@@ -111,7 +111,7 @@ Emitting of event `order.payment_captured` isn't implemented yet.
|
||||
icon: AcademicCapSolid,
|
||||
},
|
||||
{
|
||||
href: "!docs!/learn/basics/events-and-subscribers",
|
||||
href: "!docs!/learn/fundamentals/events-and-subscribers",
|
||||
title: "Create a Subscriber",
|
||||
text: "Learn about create a subscriber",
|
||||
icon: AcademicCapSolid,
|
||||
@@ -179,7 +179,7 @@ Emitting of event `order.return_requested` isn't implemented yet.
|
||||
icon: AcademicCapSolid,
|
||||
},
|
||||
{
|
||||
href: "!docs!/learn/basics/events-and-subscribers",
|
||||
href: "!docs!/learn/fundamentals/events-and-subscribers",
|
||||
title: "Create a Subscriber",
|
||||
text: "Learn about create a subscriber",
|
||||
icon: AcademicCapSolid,
|
||||
|
||||
@@ -48,13 +48,13 @@ In more complex cases, you can create a custom module that stores and manages th
|
||||
|
||||
<CardList items={[
|
||||
{
|
||||
href: "!docs!/learn/basics/modules",
|
||||
href: "!docs!/learn/fundamentals/modules",
|
||||
title: "Create a Module",
|
||||
text: "Learn how to create a module.",
|
||||
icon: AcademicCapSolid,
|
||||
},
|
||||
{
|
||||
href: "!docs!/learn/basics/modules#1-create-data-model",
|
||||
href: "!docs!/learn/fundamentals/modules#1-create-data-model",
|
||||
title: "Create a Data Model",
|
||||
text: "Learn how to create a data model.",
|
||||
icon: AcademicCapSolid,
|
||||
@@ -98,13 +98,13 @@ If you store the personalized data using a custom module:
|
||||
|
||||
<CardList items={[
|
||||
{
|
||||
href: "!docs!/learn/basics/api-routes",
|
||||
href: "!docs!/learn/fundamentals/api-routes",
|
||||
title: "Create API Route",
|
||||
text: "Learn how to create an API route.",
|
||||
icon: AcademicCapSolid,
|
||||
},
|
||||
{
|
||||
href: "!docs!/learn/basics/events-and-subscribers",
|
||||
href: "!docs!/learn/fundamentals/events-and-subscribers",
|
||||
title: "Create a Subscriber",
|
||||
text: "Learn how to create a subscriber.",
|
||||
icon: AcademicCapSolid,
|
||||
|
||||
@@ -60,7 +60,7 @@ To search through product variants by their barcode, create a custom API Route a
|
||||
icon: AcademicCapSolid,
|
||||
},
|
||||
{
|
||||
href: "!docs!/learn/basics/api-routes",
|
||||
href: "!docs!/learn/fundamentals/api-routes",
|
||||
title: "Create API Route",
|
||||
text: "Learn how to create an API Route.",
|
||||
icon: AcademicCapSolid,
|
||||
@@ -167,7 +167,7 @@ You can also create custom modules to provide features for a better customer exp
|
||||
icon: AcademicCapSolid,
|
||||
},
|
||||
{
|
||||
href: "!docs!/learn/basics/modules",
|
||||
href: "!docs!/learn/fundamentals/modules",
|
||||
title: "Create a Module",
|
||||
text: "Learn how to create a module.",
|
||||
icon: AcademicCapSolid,
|
||||
|
||||
@@ -172,9 +172,9 @@ module.exports = defineConfig({
|
||||
|
||||
### Further Read
|
||||
|
||||
- [How to Create a Module](!docs!/learn/basics/modules)
|
||||
- [How to Create a Data Model](!docs!/learn/basics/modules#1-create-data-model)
|
||||
- [Learn more about the service factory](!docs!/learn/advanced-development/modules/service-factory).
|
||||
- [How to Create a Module](!docs!/learn/fundamentals/modules)
|
||||
- [How to Create a Data Model](!docs!/learn/fundamentals/modules#1-create-data-model)
|
||||
- [Learn more about the service factory](!docs!/learn/fundamentals/modules/service-factory).
|
||||
|
||||
---
|
||||
|
||||
@@ -257,7 +257,7 @@ This defines a list link to the `Order` data model since a subscription has mult
|
||||
|
||||
### Further Reads
|
||||
|
||||
- [How to Define a Link](!docs!/learn/advanced-development/module-links)
|
||||
- [How to Define a Link](!docs!/learn/fundamentals/module-links)
|
||||
|
||||
---
|
||||
|
||||
@@ -670,9 +670,9 @@ The workflow returns the created subscription and order.
|
||||
|
||||
### Further Reads
|
||||
|
||||
- [How to Create a Workflow](!docs!/learn/basics/workflows)
|
||||
- [Learn more about the compensation function](!docs!/learn/advanced-development/workflows/compensation-function)
|
||||
- [How to use the Remote Link](!docs!/learn/advanced-development/module-links/remote-link)
|
||||
- [How to Create a Workflow](!docs!/learn/fundamentals/workflows)
|
||||
- [Learn more about the compensation function](!docs!/learn/fundamentals/workflows/compensation-function)
|
||||
- [How to use the Remote Link](!docs!/learn/fundamentals/module-links/remote-link)
|
||||
|
||||
---
|
||||
|
||||
@@ -986,7 +986,7 @@ npm run dev
|
||||
|
||||
### Further Reads
|
||||
|
||||
- [How to Create an API Route](!docs!/learn/basics/api-routes)
|
||||
- [How to Create an API Route](!docs!/learn/fundamentals/api-routes)
|
||||
|
||||
---
|
||||
|
||||
@@ -1465,7 +1465,7 @@ To view a subscription’s details, click on its ID, which opens the subscriptio
|
||||
|
||||
### Further Reads
|
||||
|
||||
- [How to Create UI Routes](!docs!/learn/advanced-development/admin/ui-routes)
|
||||
- [How to Create UI Routes](!docs!/learn/fundamentals/admin/ui-routes)
|
||||
|
||||
---
|
||||
|
||||
@@ -2008,7 +2008,7 @@ This loops over the returned subscriptions and executes the `createSubscriptionO
|
||||
|
||||
### Further Reads
|
||||
|
||||
- [How to Create a Scheduled Job](!docs!/learn/basics/scheduled-jobs)
|
||||
- [How to Create a Scheduled Job](!docs!/learn/fundamentals/scheduled-jobs)
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -33,13 +33,13 @@ You can link the subscription data model to models of other modules, such as the
|
||||
|
||||
<CardList items={[
|
||||
{
|
||||
href: "!docs!/learn/basics/modules",
|
||||
href: "!docs!/learn/fundamentals/modules",
|
||||
title: "Create a Module",
|
||||
text: "Learn how to create a module.",
|
||||
icon: AcademicCapSolid,
|
||||
},
|
||||
{
|
||||
href: "!docs!/learn/basics/modules#1-create-data-model",
|
||||
href: "!docs!/learn/fundamentals/modules#1-create-data-model",
|
||||
title: "Create a Data Model",
|
||||
text: "Learn how to create a data model.",
|
||||
icon: AcademicCapSolid,
|
||||
@@ -57,7 +57,7 @@ For example, you can link the subscription data model to the Order Module's `Ord
|
||||
If you want to create subscriptions on the product level, you can link the subscription data model to the Product Module's `Product` data model.
|
||||
|
||||
<Card
|
||||
href="!docs!/learn/advanced-development/module-links"
|
||||
href="!docs!/learn/fundamentals/module-links"
|
||||
title="Define a Module Link"
|
||||
text="Learn how to define a module link."
|
||||
icon={AcademicCapSolid}
|
||||
@@ -81,13 +81,13 @@ Implementing the logic depends on your use case, but you'll mainly implement the
|
||||
|
||||
<CardList itemsPerRow={2} items={[
|
||||
{
|
||||
href: "!docs!/learn/basics/api-routes",
|
||||
href: "!docs!/learn/fundamentals/api-routes",
|
||||
title: "Create an API Route",
|
||||
text: "Learn how to create an API route.",
|
||||
icon: AcademicCapSolid,
|
||||
},
|
||||
{
|
||||
href: "!docs!/learn/basics/scheduled-jobs",
|
||||
href: "!docs!/learn/fundamentals/scheduled-jobs",
|
||||
title: "Create a Scheduled Job",
|
||||
text: "Learn how to create a scheduled job.",
|
||||
icon: AcademicCapSolid,
|
||||
@@ -119,13 +119,13 @@ Extend the Medusa Admin to add widgets to existing pages or add new pages.
|
||||
|
||||
<CardList items={[
|
||||
{
|
||||
href: "!docs!/learn/advanced-development/admin/widgets",
|
||||
href: "!docs!/learn/fundamentals/admin/widgets",
|
||||
title: "Create Admin Widget",
|
||||
text: "Learn how to add widgets into existing admin pages.",
|
||||
icon: AcademicCapSolid,
|
||||
},
|
||||
{
|
||||
href: "!docs!/learn/advanced-development/admin/ui-routes",
|
||||
href: "!docs!/learn/fundamentals/admin/ui-routes",
|
||||
title: "Create Admin UI Routes",
|
||||
text: "Learn how to add new pages to your Medusa Admin.",
|
||||
icon: AcademicCapSolid,
|
||||
|
||||
@@ -48,7 +48,7 @@ The method returns an array of the first `15` records matching the filters.
|
||||
|
||||
<Note>
|
||||
|
||||
This applies to relations between data models of the same module. To retrieve linked records of different modules, use [Query](!docs!/learn/advanced-development/module-links/query).
|
||||
This applies to relations between data models of the same module. To retrieve linked records of different modules, use [Query](!docs!/learn/fundamentals/module-links/query).
|
||||
|
||||
</Note>
|
||||
|
||||
|
||||
@@ -54,7 +54,7 @@ The method returns an array with two items:
|
||||
|
||||
<Note>
|
||||
|
||||
This applies to relations between data models of the same module. To retrieve linked records of different modules, use [Query](!docs!/learn/advanced-development/module-links/query).
|
||||
This applies to relations between data models of the same module. To retrieve linked records of different modules, use [Query](!docs!/learn/fundamentals/module-links/query).
|
||||
|
||||
</Note>
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ The method returns the record as an object.
|
||||
|
||||
<Note>
|
||||
|
||||
This applies to relations between data models of the same module. To retrieve linked records of different modules, use [Query](!docs!/learn/advanced-development/module-links/query).
|
||||
This applies to relations between data models of the same module. To retrieve linked records of different modules, use [Query](!docs!/learn/fundamentals/module-links/query).
|
||||
|
||||
</Note>
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ This section of the documentation provides a reference of the methods generated
|
||||
|
||||
<Note title="Tip">
|
||||
|
||||
Learn more about the service factory in [this documentation](!docs!/learn/advanced-development/modules/service-factory).
|
||||
Learn more about the service factory in [this documentation](!docs!/learn/fundamentals/modules/service-factory).
|
||||
|
||||
</Note>
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ Refer to the [Admin Widget Injection Zones list](../../../admin-widget-injection
|
||||
|
||||
Widget and UI routes must be defined as arrow functions. Any other type of declaration isn't accepted.
|
||||
|
||||
Refer to the [Admin Development Constraints](!docs!/learn/advanced-development/admin/constraints) documentation for more details.
|
||||
Refer to the [Admin Development Constraints](!docs!/learn/fundamentals/admin/constraints) documentation for more details.
|
||||
|
||||
---
|
||||
|
||||
@@ -34,7 +34,7 @@ export const config = defineWidgetConfig({
|
||||
|
||||
Any other usage leads to the widget not being shown.
|
||||
|
||||
Refer to the [Admin Development Constraints](!docs!/learn/advanced-development/admin/constraints) documentation for more details.
|
||||
Refer to the [Admin Development Constraints](!docs!/learn/fundamentals/admin/constraints) documentation for more details.
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ Expose a hook in your workflow where you can inject custom functionality as a st
|
||||
|
||||
A handler hook can later be registered to consume the hook and perform custom functionality.
|
||||
|
||||
Learn more in [this documentation](https://docs.medusajs.com/advanced-development/workflows/add-workflow-hook).
|
||||
Learn more in [this documentation](https://docs.medusajs.com/fundamentals/workflows/add-workflow-hook).
|
||||
|
||||
## Example
|
||||
|
||||
|
||||
+1
-1
@@ -14,4 +14,4 @@ type WorkflowInputData = UnwrapWorkflowInputDataType<typeof myWorkflow>
|
||||
|
||||
## Type Parameters
|
||||
|
||||
<TypeList types={[{"name":"T","type":"[ReturnWorkflow](../workflows.ReturnWorkflow/page.mdx)<any, any, any>","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"runAsStep","type":"(`{\n input,\n }`: ``{ input: TData \\| [WorkflowData](../workflows.WorkflowData/page.mdx)<TData> }``) => ReturnType<[StepFunction](../workflows.StepFunction/page.mdx)<TData, TResult>>","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"run","type":"`<TDataOverride, TResultOverride>`(...`args`: Parameters<ExportedWorkflow<TData, TResult, TDataOverride, TResultOverride>[\"run\"]>) => ReturnType<ExportedWorkflow<TData, TResult, TDataOverride, TResultOverride>[\"run\"]>","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"getName","type":"() => `string`","description":"This method retrieves the workflow's name.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"(`config`: `TransactionModelOptions`) => `void`","description":"This method sets the workflow's configurations.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"hooks","type":"ConvertHooksToFunctions<THooks>","description":"The workflow's exposed hooks, used to register a handler to consume the hook.\n\nLearn more in [this documentation](https://docs.medusajs.com/advanced-development/workflows/add-workflow-hook#how-to-consume-a-hook).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="UnwrapWorkflowInputDataType"/>
|
||||
<TypeList types={[{"name":"T","type":"[ReturnWorkflow](../workflows.ReturnWorkflow/page.mdx)<any, any, any>","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"runAsStep","type":"(`{\n input,\n }`: ``{ input: TData \\| [WorkflowData](../workflows.WorkflowData/page.mdx)<TData> }``) => ReturnType<[StepFunction](../workflows.StepFunction/page.mdx)<TData, TResult>>","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"run","type":"`<TDataOverride, TResultOverride>`(...`args`: Parameters<ExportedWorkflow<TData, TResult, TDataOverride, TResultOverride>[\"run\"]>) => ReturnType<ExportedWorkflow<TData, TResult, TDataOverride, TResultOverride>[\"run\"]>","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"getName","type":"() => `string`","description":"This method retrieves the workflow's name.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"config","type":"(`config`: `TransactionModelOptions`) => `void`","description":"This method sets the workflow's configurations.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"hooks","type":"ConvertHooksToFunctions<THooks>","description":"The workflow's exposed hooks, used to register a handler to consume the hook.\n\nLearn more in [this documentation](https://docs.medusajs.com/fundamentals/workflows/add-workflow-hook#how-to-consume-a-hook).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/v2/advanced-development/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="UnwrapWorkflowInputDataType"/>
|
||||
Reference in new issue
Block a user