docs: prep for v2 documentation (#6710)

This PR includes documentation that preps for v2 docs (but doesn't introduce new docs).

_Note: The number of file changes in the PR is due to find-and-replace within the `references` which is unavoidable. Let me know if I should move it to another PR._

## Changes

- Change Medusa version in base OAS used for v2.
- Fix to docblock generator related to not catching all path parameters.
- Added typedoc plugin that generates ER Diagrams, which will be used specifically for data model references in commerce modules.
- Changed OAS tool to output references in `www/apps/api-reference/specs-v2` directory when the `--v2` option is used.
- Added a version switcher to the API reference to switch between V1 and V2. This switcher is enabled by an environment variable, so it won't be visible/usable at the moment.
- Upgraded docusaurus to v3.0.1
- Added new Vale rules to ensure correct spelling of Medusa Admin and module names.
- Added new components to the `docs-ui` package that will be used in future documentation changes.
This commit is contained in:
Shahed Nasser authored and GitHub committed 2024-03-18 07:47:35 +00:00
1 parent 56a6ec0227
commit bb87db8342
2008 files changed
+15716 -10536

No files matched your search

+16 -16
View File
@@ -25,7 +25,7 @@ Medusa’s commerce features, including sales channels, customer groups, and pri
In Medusa, a sales channel allows you to set product availability per channel. In this case, you can create a B2B sales channel that will include only B2B products.
You can create a sales channel through the Medusa admin or Admin REST APIs.
You can create a sales channel through the Medusa Admin or Admin REST APIs.
<DocCardList colSize={6} items={[
{
@@ -34,7 +34,7 @@ You can create a sales channel through the Medusa admin or Admin REST APIs.
label: 'Option 1: Use Medusa Admin',
customProps: {
icon: Icons['users-solid'],
description: 'Create the sales channel using the Medusa admin.',
description: 'Create the sales channel using the Medusa Admin.',
}
},
{
@@ -54,7 +54,7 @@ You can create a sales channel through the Medusa admin or Admin REST APIs.
Publishable API keys can be associated with one or more sales channels. Then, in a client such as a storefront, you can pass the publishable API key in the header of your requests to ensure all products retrieved belong to the associated sales channel(s).
You can create a publishable API key through the Medusa admin or the Admin REST APIs, then associate it with the B2B sales channel. You’ll later use this key when developing your B2B storefront.
You can create a publishable API key through the Medusa Admin or the Admin REST APIs, then associate it with the B2B sales channel. You’ll later use this key when developing your B2B storefront.
<DocCardList colSize={6} items={[
{
@@ -63,7 +63,7 @@ You can create a publishable API key through the Medusa admin or the Admin REST
label: 'Option 1: Use Medusa Admin',
customProps: {
icon: Icons['users-solid'],
description: 'Create the publishable API key using the Medusa admin.',
description: 'Create the publishable API key using the Medusa Admin.',
}
},
{
@@ -81,7 +81,7 @@ You can create a publishable API key through the Medusa admin or the Admin REST
## Add Products
Using the Medusa admin or the Admin REST APIs, you can add your B2B products to your store. You can also import your products from an existing CSV file using the Product Import feature.
Using the Medusa Admin or the Admin REST APIs, you can add your B2B products to your store. You can also import your products from an existing CSV file using the Product Import feature.
After or while you add your products, set the products’ availability to the B2B sales channel you’ve created.
@@ -92,7 +92,7 @@ After or while you add your products, set the products’ availability to the B2
label: 'Add Products Using Medusa Admin',
customProps: {
icon: Icons['users-solid'],
description: 'Create the product using the Medusa admin.',
description: 'Create the product using the Medusa Admin.',
}
},
{
@@ -110,7 +110,7 @@ After or while you add your products, set the products’ availability to the B2
label: 'Import Products Using Medusa Admin',
customProps: {
icon: Icons['users-solid'],
description: 'Import the products using the Medusa admin.',
description: 'Import the products using the Medusa Admin.',
}
},
{
@@ -143,7 +143,7 @@ For more advanced customer modeling, you may create custom entities. This is cov
label: 'Option 1: Use Medusa Admin',
customProps: {
icon: Icons['users-solid'],
description: 'Create the customer group using the Medusa admin.',
description: 'Create the customer group using the Medusa Admin.',
}
},
{
@@ -163,7 +163,7 @@ For more advanced customer modeling, you may create custom entities. This is cov
After adding your B2B customer group, you can add B2B customers and assign them to the B2B customer group. Alternatively, if you want to allow B2B customers to register themselves, then that will be covered in a later step.
You can create a customer through the Medusa admin or Admin REST APIs.
You can create a customer through the Medusa Admin or Admin REST APIs.
<DocCardList colSize={6} items={[
{
@@ -172,7 +172,7 @@ You can create a customer through the Medusa admin or Admin REST APIs.
label: 'Option 1: Use Medusa Admin',
customProps: {
icon: Icons['users-solid'],
description: 'Create the customers using the Medusa admin.',
description: 'Create the customers using the Medusa Admin.',
}
},
{
@@ -194,7 +194,7 @@ A price list allows you to set different prices on a set of products for various
You can use price lists to set the same price for all B2B customers or different prices for different B2B customers if you’ve organized them into separate customer groups.
You can create a price list through the Medusa admin or Admin REST APIs.
You can create a price list through the Medusa Admin or Admin REST APIs.
<DocCardList colSize={6} items={[
{
@@ -203,7 +203,7 @@ You can create a price list through the Medusa admin or Admin REST APIs.
label: 'Add Price List Using Medusa Admin',
customProps: {
icon: Icons['users-solid'],
description: 'Create the price list using the Medusa admin.',
description: 'Create the price list using the Medusa Admin.',
}
},
{
@@ -325,9 +325,9 @@ Medusa allows you to create custom API Routes exposed as REST APIs.
## Customize Admin
Based on your use case, you may need to customize the Medusa admin to add new widgets or pages.
Based on your use case, you may need to customize the Medusa Admin to add new widgets or pages.
The Medusa admin plugin can be extended to add widgets, UI routes, and setting pages.
The Medusa Admin plugin can be extended to add widgets, UI routes, and setting pages.
<DocCardList colSize={4} items={[
{
@@ -345,7 +345,7 @@ The Medusa admin plugin can be extended to add widgets, UI routes, and setting p
label: 'Create Admin UI Routes',
customProps: {
icon: Icons['academic-cap-solid'],
description: 'Learn how to add new pages to your Medusa admin.',
description: 'Learn how to add new pages to your Medusa Admin.',
}
},
{
@@ -354,7 +354,7 @@ The Medusa admin plugin can be extended to add widgets, UI routes, and setting p
label: 'Create Admin Setting Page',
customProps: {
icon: Icons['academic-cap-solid'],
description: 'Learn how to add new page to the Medusa admin settings.',
description: 'Learn how to add new page to the Medusa Admin settings.',
}
},
]} />
@@ -548,7 +548,7 @@ Creating an API Route also requires creating a service, which is a class that ty
## Customize Admin Dashboard
The Medusa admin dashboard provides merchants with an easy-to-use interface to manage their store's data and settings. It's also extendable, so you can add widgets, pages, and setting pages relevant to your use case.
The Medusa Admin dashboard provides merchants with an easy-to-use interface to manage their store's data and settings. It's also extendable, so you can add widgets, pages, and setting pages relevant to your use case.
To add an interface that allows the admin user to upload digital products, you can create custom widgets or pages that use the routes you created. You can use the [Protected Files Upload API Route](https://docs.medusajs.com/api/admin#uploads_postuploadsprotected).
@@ -559,7 +559,7 @@ To add an interface that allows the admin user to upload digital products, you c
label: 'Create a Widget',
customProps: {
icon: Icons['academic-cap-solid'],
description: 'Learn how to create a widget in the Medusa admin.',
description: 'Learn how to create a widget in the Medusa Admin.',
}
},
{
@@ -568,7 +568,7 @@ To add an interface that allows the admin user to upload digital products, you c
label: 'Create UI Route',
customProps: {
icon: Icons['academic-cap-solid'],
description: 'Learn how to create a UI route in the Medusa admin.',
description: 'Learn how to create a UI route in the Medusa Admin.',
}
},
{
+1 -1
View File
@@ -97,7 +97,7 @@ You can now deploy your storefront. The instructions defer whether you're using
## Explore Features and Development Resources
Our documentation includes guides related to Medusa's features and how to customize your store. You can learn about how to add new features to your storefront and backend, how to customize existing features, or how to use the Medusa admin to perform different ecommerce functionalities.
Our documentation includes guides related to Medusa's features and how to customize your store. You can learn about how to add new features to your storefront and backend, how to customize existing features, or how to use the Medusa Admin to perform different ecommerce functionalities.
<DocCardList colSize={4} items={[
{
@@ -387,7 +387,7 @@ Medusa's [admin plugin](../admin/quickstart.mdx) can be extended to add widgets
label: 'Create Admin UI Routes',
customProps: {
icon: Icons['academic-cap-solid'],
description: 'Learn how to add new pages to your Medusa admin.',
description: 'Learn how to add new pages to your Medusa Admin.',
}
},
{
@@ -396,7 +396,7 @@ Medusa's [admin plugin](../admin/quickstart.mdx) can be extended to add widgets
label: 'Create Admin Setting Page',
customProps: {
icon: Icons['academic-cap-solid'],
description: 'Learn how to add new page to the Medusa admin settings.',
description: 'Learn how to add new page to the Medusa Admin settings.',
}
},
]} />
@@ -165,7 +165,7 @@ A multi-regional setup lets you manage your inventory through Medusa across the
label: 'Manage Stock Locations',
customProps: {
icon: Icons['users-solid'],
description: 'Learn how to manage stock locations in the Medusa admin.',
description: 'Learn how to manage stock locations in the Medusa Admin.',
}
},
{
@@ -174,7 +174,7 @@ A multi-regional setup lets you manage your inventory through Medusa across the
label: 'Manage Inventory',
customProps: {
icon: Icons['users-solid'],
description: 'Learn how to manage inventory in the Medusa admin.',
description: 'Learn how to manage inventory in the Medusa Admin.',
}
},
]} />
@@ -129,7 +129,7 @@ If you stored the personalized data in the `metadata` of the Line Items, those s
In the case that you’ve created a custom entity or extended a core entity, you can create a custom API Route that handles retrieving the personalization data. If the entity you’ve created or customized is associated with the Order entity, you can alternatively expand it similarly to the `items` relation.
If you want to show the personalized data in the Medusa admin, you can extend the Medusa admin to add a widget, a UI route, or a setting page and show the personalized data.
If you want to show the personalized data in the Medusa Admin, you can extend the Medusa Admin to add a widget, a UI route, or a setting page and show the personalized data.
<DocCardList colSize={4} items={[
{
@@ -156,7 +156,7 @@ If you want to show the personalized data in the Medusa admin, you can extend th
label: 'Extending Medusa Admin',
customProps: {
icon: Icons['academic-cap-solid'],
description: 'Learn how to extend the Medusa admin with widgets and more.',
description: 'Learn how to extend the Medusa Admin with widgets and more.',
}
},
]} />
+1 -1
View File
@@ -216,7 +216,7 @@ Medusa's architecture allows you to integrate any third-party payment processor
Once you accept the payment, you can place an order in the POS system using the [Draft Order APIs](https://docs.medusajs.com/api/admin#draft-orders). Draft orders provide similar features to an online checkout experience, including discounts, payment processing, and more.
Then, merchants can view all orders coming from different sales channels using the Medusa admin dashboard. This keeps logistics and order handling consistent and allows businesses to provide return and exchange features to online and in-store customers.
Then, merchants can view all orders coming from different sales channels using the Medusa Admin dashboard. This keeps logistics and order handling consistent and allows businesses to provide return and exchange features to online and in-store customers.
<DocCardList colSize={6} items={[
{
@@ -141,7 +141,7 @@ Medusa's [admin plugin](../admin/quickstart.mdx) can be extended to add widgets
label: 'Create Admin UI Routes',
customProps: {
icon: Icons['academic-cap-solid'],
description: 'Learn how to add new pages to your Medusa admin.',
description: 'Learn how to add new pages to your Medusa Admin.',
}
},
{
@@ -150,7 +150,7 @@ Medusa's [admin plugin](../admin/quickstart.mdx) can be extended to add widgets
label: 'Create Admin Setting Page',
customProps: {
icon: Icons['academic-cap-solid'],
description: 'Learn how to add new page to the Medusa admin settings.',
description: 'Learn how to add new page to the Medusa Admin settings.',
}
},
]} />