docs: update modules chapter in basics (#9452)

* docs: update modules chapter in basics

* address PR feedback
This commit is contained in:
Shahed Nasser
2024-10-04 14:15:41 +03:00
committed by GitHub
parent d98f22c7d6
commit ed174826a4
24 changed files with 339 additions and 319 deletions
+3 -3
View File
@@ -173,13 +173,13 @@ You can create a B2B module that adds necessary data models to represent a B2B c
<CardList items={[
{
href: "!docs!/basics/modules-and-services",
href: "!docs!/basics/modules",
title: "Create Module",
text: "Learn how to create a module in Medusa.",
icon: AcademicCapSolid,
},
{
href: "!docs!/basics/data-models",
href: "!docs!/basics/modules#1-create-data-model",
title: "Create Data Models",
text: "Learn how to create data models.",
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!/basics/data-models"
href="!docs!/basics/modules#1-create-data-model"
title="Create a Data Model"
text="Learn how to create a custom data model in a module."
icon={AcademicCapSolid}
@@ -36,13 +36,13 @@ The `inventory-item.updated` event is currently not emitted.
<CardList items={[
{
href: "!docs!/basics/modules-and-services",
href: "!docs!/basics/modules",
title: "Create a Module",
text: "Learn how to create a module in Medusa.",
icon: AcademicCapSolid,
},
{
href: "!docs!/basics/data-models",
href: "!docs!/basics/modules#1-create-data-model",
title: "Create a Data Model",
text: "Learn how to create a data model.",
icon: AcademicCapSolid,
@@ -204,8 +204,8 @@ module.exports = defineConfig({
### Further Reads
- [How to Create a Module](!docs!/basics/modules-and-services)
- [How to Create a Data Model](!docs!/basics/data-models)
- [How to Create a Module](!docs!/basics/modules)
- [How to Create a Data Model](!docs!/basics/modules#1-create-data-model)
---
@@ -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!/basics/modules-and-services"
href="!docs!/basics/modules"
title="How to Create a Module"
text="Learn how to create a module."
icon={AcademicCapSolid}
@@ -63,7 +63,7 @@ Then, you can link your custom data model to data models from other modules. For
<CardList itemsPerRow={2} items={[
{
href: "!docs!/basics/data-models",
href: "!docs!/basics/modules#1-create-data-model",
title: "How to Create a Data Model",
text: "Learn how to create a data model.",
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!/basics/modules-and-services"
href="!docs!/basics/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!/basics/data-models) 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!/basics/modules#1-create-data-model) in your module to store data related to the external system.
</Note>
@@ -170,8 +170,8 @@ module.exports = defineConfig({
### Further Reads
- [How to Create a Module](!docs!/basics/modules-and-services)
- [How to Create a Data Model](!docs!/basics/data-models)
- [How to Create a Module](!docs!/basics/modules)
- [How to Create a Data Model](!docs!/basics/modules#1-create-data-model)
---
@@ -150,8 +150,8 @@ module.exports = defineConfig({
### Further Reads
- [How to Create a Module](!docs!/basics/modules-and-services)
- [How to Create Data Models](!docs!/basics/data-models)
- [How to Create a Module](!docs!/basics/modules)
- [How to Create Data Models](!docs!/basics/modules#1-create-data-model)
---
@@ -35,13 +35,13 @@ You can create a marketplace module that implements data models for vendors, the
<CardList items={[
{
href: "!docs!/basics/modules-and-services",
href: "!docs!/basics/modules",
title: "Create a Module",
text: "Learn how to create a module.",
icon: AcademicCapSolid,
},
{
href: "!docs!/basics/data-models",
href: "!docs!/basics/modules#1-create-data-model",
title: "Create Data Models",
text: "Create data models in the module.",
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!/basics/modules-and-services"
href="!docs!/basics/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!/basics/modules-and-services",
href: "!docs!/basics/modules",
title: "Create a Module",
text: "Learn how to create a module.",
icon: AcademicCapSolid,
@@ -73,7 +73,7 @@ Medusas architecture also makes it easier to integrate any third-party servic
<CardList itemsPerRow={2} items={[
{
href: "!docs!/basics/modules-and-services",
href: "!docs!/basics/modules",
title: "Create a Module",
text: "Learn how to create a module.",
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!/basics/modules-and-services",
href: "!docs!/basics/modules",
title: "Create a Module",
text: "Learn how to create a module.",
icon: AcademicCapSolid,
},
{
href: "!docs!/basics/data-models",
href: "!docs!/basics/modules#1-create-data-model",
title: "Create a Data Model",
text: "Learn how to create a data model.",
icon: AcademicCapSolid,
+1 -1
View File
@@ -167,7 +167,7 @@ You can also create custom modules to provide features for a better customer exp
icon: AcademicCapSolid,
},
{
href: "!docs!/basics/modules-and-services",
href: "!docs!/basics/modules",
title: "Create a Module",
text: "Learn how to create a module.",
icon: AcademicCapSolid,
@@ -168,8 +168,8 @@ module.exports = defineConfig({
### Further Read
- [How to Create a Module](!docs!/basics/modules-and-services)
- [How to Create a Data Model](!docs!/basics/data-models)
- [How to Create a Module](!docs!/basics/modules)
- [How to Create a Data Model](!docs!/basics/modules#1-create-data-model)
- [Learn more about the service factory](!docs!/advanced-development/modules/service-factory).
---
@@ -33,13 +33,13 @@ You can link the subscription data model to models of other modules, such as the
<CardList items={[
{
href: "!docs!/basics/modules-and-services",
href: "!docs!/basics/modules",
title: "Create a Module",
text: "Learn how to create a module.",
icon: AcademicCapSolid,
},
{
href: "!docs!/basics/data-models",
href: "!docs!/basics/modules#1-create-data-model",
title: "Create a Data Model",
text: "Learn how to create a data model.",
icon: AcademicCapSolid,
+14 -14
View File
@@ -139,21 +139,21 @@ export const generatedEditDates = {
"app/medusa-container-resources/page.mdx": "2024-09-30T08:43:53.173Z",
"app/medusa-workflows-reference/page.mdx": "2024-09-30T08:43:53.174Z",
"app/nextjs-starter/page.mdx": "2024-07-01T10:21:19+03:00",
"app/recipes/b2b/page.mdx": "2024-09-30T08:43:53.175Z",
"app/recipes/commerce-automation/page.mdx": "2024-09-30T08:43:53.175Z",
"app/recipes/digital-products/examples/standard/page.mdx": "2024-09-30T08:43:53.176Z",
"app/recipes/digital-products/page.mdx": "2024-08-02T13:02:06+00:00",
"app/recipes/b2b/page.mdx": "2024-10-03T13:07:44.153Z",
"app/recipes/commerce-automation/page.mdx": "2024-10-03T13:07:44.147Z",
"app/recipes/digital-products/examples/standard/page.mdx": "2024-10-03T13:07:44.153Z",
"app/recipes/digital-products/page.mdx": "2024-10-03T13:07:44.147Z",
"app/recipes/ecommerce/page.mdx": "2024-06-09T15:18:43+02:00",
"app/recipes/integrate-ecommerce-stack/page.mdx": "2024-09-30T08:43:53.177Z",
"app/recipes/marketplace/examples/vendors/page.mdx": "2024-09-30T08:43:53.179Z",
"app/recipes/marketplace/page.mdx": "2024-07-11T15:56:41+00:00",
"app/recipes/multi-region-store/page.mdx": "2024-07-01T10:21:19+03:00",
"app/recipes/omnichannel/page.mdx": "2024-06-09T15:18:43+02:00",
"app/recipes/integrate-ecommerce-stack/page.mdx": "2024-10-03T13:07:44.146Z",
"app/recipes/marketplace/examples/vendors/page.mdx": "2024-10-03T13:07:44.153Z",
"app/recipes/marketplace/page.mdx": "2024-10-03T13:07:44.153Z",
"app/recipes/multi-region-store/page.mdx": "2024-10-03T13:07:13.813Z",
"app/recipes/omnichannel/page.mdx": "2024-10-03T13:07:14.384Z",
"app/recipes/oms/page.mdx": "2024-07-01T10:21:19+03:00",
"app/recipes/personalized-products/page.mdx": "2024-09-11T10:53:03.936Z",
"app/recipes/pos/page.mdx": "2024-09-30T08:43:53.180Z",
"app/recipes/subscriptions/examples/standard/page.mdx": "2024-09-30T08:43:53.180Z",
"app/recipes/subscriptions/page.mdx": "2024-08-02T12:40:26+03:00",
"app/recipes/personalized-products/page.mdx": "2024-10-03T13:07:44.153Z",
"app/recipes/pos/page.mdx": "2024-10-03T13:07:13.964Z",
"app/recipes/subscriptions/examples/standard/page.mdx": "2024-10-03T13:07:44.164Z",
"app/recipes/subscriptions/page.mdx": "2024-10-03T13:07:44.155Z",
"app/recipes/page.mdx": "2024-07-11T15:56:41+00:00",
"app/service-factory-reference/methods/create/page.mdx": "2024-07-31T17:01:33+03:00",
"app/service-factory-reference/methods/delete/page.mdx": "2024-07-31T17:01:33+03:00",
@@ -642,7 +642,7 @@ export const generatedEditDates = {
"app/medusa-cli/commands/start/page.mdx": "2024-08-28T10:44:19.952Z",
"app/medusa-cli/commands/telemtry/page.mdx": "2024-08-28T11:25:08.553Z",
"app/medusa-cli/commands/user/page.mdx": "2024-08-28T10:44:52.489Z",
"app/recipes/marketplace/examples/restaurant-delivery/page.mdx": "2024-09-30T08:43:53.178Z",
"app/recipes/marketplace/examples/restaurant-delivery/page.mdx": "2024-10-03T13:07:44.153Z",
"references/types/HttpTypes/interfaces/types.HttpTypes.AdminCreateCustomerGroup/page.mdx": "2024-08-30T00:11:02.074Z",
"references/types/HttpTypes/interfaces/types.HttpTypes.AdminCreateReservation/page.mdx": "2024-08-30T00:11:02.342Z",
"references/types/HttpTypes/interfaces/types.HttpTypes.AdminCustomerGroup/page.mdx": "2024-10-03T00:11:52.871Z",