diff --git a/docs-util/packages/typedoc-config/entities.js b/docs-util/packages/typedoc-config/entities.js
index 4a31015bba..70c9e059c3 100644
--- a/docs-util/packages/typedoc-config/entities.js
+++ b/docs-util/packages/typedoc-config/entities.js
@@ -11,11 +11,31 @@ module.exports = {
tsconfig: path.join(pathPrefix, "packages/medusa/tsconfig.json"),
name: "Entities Reference",
indexTitle: "Entities Reference",
- entryDocument: "index.md",
+ entryDocument: "_index.mdx",
hideInPageTOC: true,
hideBreadcrumbs: true,
- plugin: [...globalTypedocOptions.plugin, "typedoc-plugin-frontmatter"],
+ plugin: ["typedoc-plugin-markdown-medusa", "typedoc-plugin-frontmatter"],
frontmatterData: {
displayed_sidebar: "entitiesSidebar",
},
+ formatting: {
+ "*": {
+ showCommentsAsHeader: true,
+ sections: {
+ member_sources_definedIn: false,
+ reflection_hierarchy: false,
+ },
+ parameterStyle: "component",
+ parameterComponent: "ParameterTypes",
+ mdxImports: [
+ `import ParameterTypes from "@site/src/components/ParameterTypes"`,
+ ],
+ reflectionGroups: {
+ Constructors: false,
+ Methods: false,
+ },
+ },
+ },
+ objectLiteralTypeDeclarationStyle: "component",
+ mdxOutput: true,
}
diff --git a/docs-util/packages/typedoc-config/js-client.js b/docs-util/packages/typedoc-config/js-client.js
index 3778ef27ec..3eb24da4ea 100644
--- a/docs-util/packages/typedoc-config/js-client.js
+++ b/docs-util/packages/typedoc-config/js-client.js
@@ -12,7 +12,7 @@ module.exports = {
tsconfig: path.join(pathPrefix, "packages/medusa-js/tsconfig.json"),
name: "JS Client Reference",
indexTitle: "JS Client Reference",
- entryDocument: "index.md",
+ entryDocument: "_index.mdx",
hideInPageTOC: true,
hideBreadcrumbs: true,
plugin: [
diff --git a/docs-util/packages/typedoc-config/modules.js b/docs-util/packages/typedoc-config/modules.js
index c8b8acc6da..1b43bb6105 100644
--- a/docs-util/packages/typedoc-config/modules.js
+++ b/docs-util/packages/typedoc-config/modules.js
@@ -86,7 +86,6 @@ module.exports = ({
"typedoc-plugin-rename-defaults",
"typedoc-plugin-frontmatter",
],
- hideMembersSymbol: true,
formatting,
allReflectionsHaveOwnDocument: true,
objectLiteralTypeDeclarationStyle: "component",
diff --git a/docs-util/packages/typedoc-plugin-markdown-medusa/src/index.ts b/docs-util/packages/typedoc-plugin-markdown-medusa/src/index.ts
index cb1d3864e1..849986bf8c 100644
--- a/docs-util/packages/typedoc-plugin-markdown-medusa/src/index.ts
+++ b/docs-util/packages/typedoc-plugin-markdown-medusa/src/index.ts
@@ -71,7 +71,7 @@ export function load(app: Application) {
help: "[Markdown Plugin] Do not add special symbols for class members.",
name: "hideMembersSymbol",
type: ParameterType.Boolean,
- defaultValue: false,
+ defaultValue: true,
})
app.options.addDeclaration({
diff --git a/www/apps/docs/content/development/batch-jobs/index.mdx b/www/apps/docs/content/development/batch-jobs/index.mdx
index a8187d9ca1..faed836020 100644
--- a/www/apps/docs/content/development/batch-jobs/index.mdx
+++ b/www/apps/docs/content/development/batch-jobs/index.mdx
@@ -21,7 +21,7 @@ You can also create a custom batch job or overwrite Medusa’s batch jobs.
### BatchJob Entity Overview
-A batch job is stored in the database as a [BatchJob](../../references/entities/classes/BatchJob) entity. Some of its important attributes are:
+A batch job is stored in the database as a [BatchJob](../../references/entities/classes/BatchJob.mdx) entity. Some of its important attributes are:
- `status`: A string that determines the current status of the Batch Job.
- `context`: An object that can be used to store configurations related to the batch job. For example, you can use it to store listing configurations such as the limit or offset of the list to be retrieved during the processing of the batch job.
diff --git a/www/apps/docs/content/development/events/events-list.md b/www/apps/docs/content/development/events/events-list.md
index 0f3bb93e8e..d4b7605450 100644
--- a/www/apps/docs/content/development/events/events-list.md
+++ b/www/apps/docs/content/development/events/events-list.md
@@ -1948,7 +1948,7 @@ Triggered when a payment is created.
-The entire payment passed as an object. You can refer to the [Payment entity](../../references/entities/classes/Payment.md) for an idea of what fields to expect.
+The entire payment passed as an object. You can refer to the [Payment entity](../../references/entities/classes/Payment.mdx) for an idea of what fields to expect.
|
@@ -1966,7 +1966,7 @@ Triggered when a payment is updated.
-The entire payment passed as an object. You can refer to the [Payment entity](../../references/entities/classes/Payment.md) for an idea of what fields to expect.
+The entire payment passed as an object. You can refer to the [Payment entity](../../references/entities/classes/Payment.mdx) for an idea of what fields to expect.
|
@@ -1984,7 +1984,7 @@ Triggered when a payment is captured.
-The entire payment passed as an object. You can refer to the [Payment entity](../../references/entities/classes/Payment.md) for an idea of what fields to expect.
+The entire payment passed as an object. You can refer to the [Payment entity](../../references/entities/classes/Payment.mdx) for an idea of what fields to expect.
|
@@ -2002,7 +2002,7 @@ Triggered when the capturing of a payment fails.
-The entire payment passed as an object. You can refer to the [Payment entity](../../references/entities/classes/Payment.md) for an idea of what fields to expect.
+The entire payment passed as an object. You can refer to the [Payment entity](../../references/entities/classes/Payment.mdx) for an idea of what fields to expect.
In addition, an error object is passed within the same object as the Payment Processor:
@@ -2034,7 +2034,7 @@ Triggered when a refund of a payment is created.
|
-The entire refund passed as an object. You can refer to the [Refund entity](../../references/entities/classes/Refund.md) for an idea of what fields to expect.
+The entire refund passed as an object. You can refer to the [Refund entity](../../references/entities/classes/Refund.mdx) for an idea of what fields to expect.
|
@@ -2052,7 +2052,7 @@ Triggered when a payment's refund fails.
-The entire payment passed as an object. You can refer to the [Payment entity](../../references/entities/classes/Payment.md) for an idea of what fields to expect.
+The entire payment passed as an object. You can refer to the [Payment entity](../../references/entities/classes/Payment.mdx) for an idea of what fields to expect.
|
@@ -2095,7 +2095,7 @@ Triggered when a payment collection is created.
-The entire payment collection passed as an object. You can refer to the [Payment Collection entity](../../references/entities/classes/PaymentCollection.md) for an idea of what fields to expect.
+The entire payment collection passed as an object. You can refer to the [Payment Collection entity](../../references/entities/classes/PaymentCollection.mdx) for an idea of what fields to expect.
|
@@ -2113,7 +2113,7 @@ Triggered when a payment collection is update.
-The entire payment collection passed as an object. You can refer to the [Payment Collection entity](../../references/entities/classes/PaymentCollection.md) for an idea of what fields to expect.
+The entire payment collection passed as an object. You can refer to the [Payment Collection entity](../../references/entities/classes/PaymentCollection.mdx) for an idea of what fields to expect.
|
@@ -2131,7 +2131,7 @@ Triggered when a payment collection is deleted.
-The entire payment collection passed as an object. You can refer to the [Payment Collection entity](../../references/entities/classes/PaymentCollection.md) for an idea of what fields to expect.
+The entire payment collection passed as an object. You can refer to the [Payment Collection entity](../../references/entities/classes/PaymentCollection.mdx) for an idea of what fields to expect.
|
@@ -2149,7 +2149,7 @@ Triggered when a payment collection is either marked authorized or its payment s
-The entire payment collection passed as an object. You can refer to the [Payment Collection entity](../../references/entities/classes/PaymentCollection.md) for an idea of what fields to expect.
+The entire payment collection passed as an object. You can refer to the [Payment Collection entity](../../references/entities/classes/PaymentCollection.mdx) for an idea of what fields to expect.
|
@@ -2216,7 +2216,7 @@ Triggered when a product and data associated with it (options, variant orders, e
-The entire product passed as an object. You can refer to the [Product entity](../../references/entities/classes/Product.md) for an idea of what fields to expect.
+The entire product passed as an object. You can refer to the [Product entity](../../references/entities/classes/Product.mdx) for an idea of what fields to expect.
In one case, when the `/admin/products/{id}` API Route is used to update the product, the payload is an object of the following format:
diff --git a/www/apps/docs/content/development/notification/overview.mdx b/www/apps/docs/content/development/notification/overview.mdx
index 54938fc204..0206e8d3e4 100644
--- a/www/apps/docs/content/development/notification/overview.mdx
+++ b/www/apps/docs/content/development/notification/overview.mdx
@@ -58,7 +58,7 @@ A Notification also represents a resent notification. So, when a notification is
### Notification Entity Overview
-The two most important properties in the [`Notification`](../../references/entities/classes/Notification.md) entity are the `to` and `data` properties.
+The two most important properties in the [`Notification`](../../references/entities/classes/Notification.mdx) entity are the `to` and `data` properties.
The `to` property is a string that represents the receiver of the Notification. For example, if the Notification was sent to an email address, the `to` property holds the email address the Notification was sent to.
diff --git a/www/apps/docs/content/development/strategies/override-strategy.md b/www/apps/docs/content/development/strategies/override-strategy.md
index fe4e3cf8fb..40da7cd681 100644
--- a/www/apps/docs/content/development/strategies/override-strategy.md
+++ b/www/apps/docs/content/development/strategies/override-strategy.md
@@ -37,7 +37,7 @@ There are other resources that provide steps specific to a strategy type:
- [How to override the Cart Completion Strategy](../../modules/carts-and-checkout/backend/cart-completion-strategy.md)
- [How to override the Tax Calculation Strategy](../../modules/taxes/backend/tax-calculation-strategy.md)
-- [How to override the Price Selection Strategy](../../modules/price-lists/backend/override-price-selection-strategy.md)
+- [How to override the Price Selection Strategy](../../modules/price-lists/backend/override-price-selection-strategy.mdx)
- [How to override a Batch Job Strategy](../batch-jobs/customize-import.md)
---
diff --git a/www/apps/docs/content/modules/carts-and-checkout/backend/add-fulfillment-provider.md b/www/apps/docs/content/modules/carts-and-checkout/backend/add-fulfillment-provider.md
index d655f9fe29..83f5c46d23 100644
--- a/www/apps/docs/content/modules/carts-and-checkout/backend/add-fulfillment-provider.md
+++ b/www/apps/docs/content/modules/carts-and-checkout/backend/add-fulfillment-provider.md
@@ -262,7 +262,7 @@ It accepts four parameters:
1. If the resource the fulfillment is being created for is a claim, the `is_claim` property in the object will be `true`.
2. If the resource the fulfillment is being created for is a swap, the `is_swap` property in the object will be `true`.
3. Otherwise, the resource is an order.
-4. The fourth parameter is an object of type [Fulfillment](../../../references/entities/classes/Fulfillment.md), which is the fulfillment being created.
+4. The fourth parameter is an object of type [Fulfillment](../../../references/entities/classes/Fulfillment.mdx), which is the fulfillment being created.
You can use the `data` property in the shipping method (first parameter) to access the data specific to the shipping option. This is based on your implementation of previous methods.
@@ -328,7 +328,7 @@ This method receives three parameters:
1. If the price is being calculated for the list of shipping options available for a cart, it's the `data` object of the shipping option.
2. If the price is being calculated when the shipping method is being created, it's the data returned by the [validateFulfillmentData](#validatefulfillmentdata) method used during the shipping method creation.
3. If the price is being calculated while calculating the cart's totals, it will be the `data` object of the cart's shipping method.
-3. The third parameter is either the [Cart](../../../references/entities/classes/Cart.md) or the [Order](../../../references/entities/classes/Order.md) object.
+3. The third parameter is either the [Cart](../../../references/entities/classes/Cart.mdx) or the [Order](../../../references/entities/classes/Order.mdx) object.
The method is expected to return a number that will be used to set the price of the shipping method or option, based on the context it's used in.
@@ -368,7 +368,7 @@ Fulfillment providers can also be used to return products. A shipping option can
This method is used when the admin [creates a return request](https://docs.medusajs.com/api/admin#orders_postordersorderreturns) for an order, [creates a swap](https://docs.medusajs.com/api/admin#orders_postordersorderswaps) for an order, or when the customer [creates a return of their order](https://docs.medusajs.com/api/store#returns_postreturns). The fulfillment is created automatically for the order return.
-The method receives as a parameter the [Return](../../../references/entities/classes/Return.md) object, which is the return that the fulfillment is being created for.
+The method receives as a parameter the [Return](../../../references/entities/classes/Return.mdx) object, which is the return that the fulfillment is being created for.
The method must return an object that will be used to set the value of the `shipping_data` attribute of the return being created.
diff --git a/www/apps/docs/content/modules/carts-and-checkout/backend/add-payment-provider.md b/www/apps/docs/content/modules/carts-and-checkout/backend/add-payment-provider.md
index a822b6e2ec..a1f63e4132 100644
--- a/www/apps/docs/content/modules/carts-and-checkout/backend/add-payment-provider.md
+++ b/www/apps/docs/content/modules/carts-and-checkout/backend/add-payment-provider.md
@@ -138,7 +138,7 @@ class MyPaymentProcessor extends AbstractPaymentProcessor {
Record |
PaymentProcessorError
> {
- throw new Error("Method not implemented.");
+ throw new Error("Method not implemented.")
}
}
@@ -440,7 +440,7 @@ An example of a minimal implementation of `updatePaymentData` that returns the `
```ts
import {
- PaymentProcessorError
+ PaymentProcessorError,
} from "@medusajs/medusa"
// ...
diff --git a/www/apps/docs/content/modules/carts-and-checkout/cart.md b/www/apps/docs/content/modules/carts-and-checkout/cart.md
index d7774e9875..2d8ce9ec90 100644
--- a/www/apps/docs/content/modules/carts-and-checkout/cart.md
+++ b/www/apps/docs/content/modules/carts-and-checkout/cart.md
@@ -26,7 +26,7 @@ A cart is represented by the `Cart` entity. Some of the `Cart` entity’s attrib
- `completed_at`: the date the cart was completed. A completed cart means that it has been used for its main purpose. For example, if the cart is used to place an order, then a completed cart means that the order was placed.
- `payment_authorized_at`: the date a payment was authorized.
-There are other important attributes discussed in later sections. Check out the [full Cart entity in the entities reference](../../references/entities/classes/Cart.md).
+There are other important attributes discussed in later sections. Check out the [full Cart entity in the entities reference](../../references/entities/classes/Cart.mdx).
---
diff --git a/www/apps/docs/content/modules/carts-and-checkout/payment.md b/www/apps/docs/content/modules/carts-and-checkout/payment.md
index cd5bd8c31b..31dbc630fe 100644
--- a/www/apps/docs/content/modules/carts-and-checkout/payment.md
+++ b/www/apps/docs/content/modules/carts-and-checkout/payment.md
@@ -58,7 +58,7 @@ It’s important to enable a payment processor in a region, or else the payment
### PaymentProvider Entity Overview
-The [`PaymentProvider`](../../references/entities/classes/PaymentProvider.md) entity only has 2 attributes: `is_installed` which is a boolean value indicating whether the Payment Processor is installed; and `id` which is the unique identifier that you define in the Payment Processor service.
+The [`PaymentProvider`](../../references/entities/classes/PaymentProvider.mdx) entity only has 2 attributes: `is_installed` which is a boolean value indicating whether the Payment Processor is installed; and `id` which is the unique identifier that you define in the Payment Processor service.
---
@@ -82,7 +82,7 @@ Among the Payment Sessions available only one will be selected based on the cust
### PaymentSession Entity Overview
-The [`PaymentSession`](../../references/entities/classes/PaymentSession.md) entity belongs to a `Cart`. This is the customer‘s cart that was used for checkout which lead to the creation of the Payment Session.
+The [`PaymentSession`](../../references/entities/classes/PaymentSession.mdx) entity belongs to a `Cart`. This is the customer‘s cart that was used for checkout which lead to the creation of the Payment Session.
The `PaymentSession` instance also belongs to a `PaymentProvider` instance. This is the Payment Processor that was used to create the Payment Session and that controls it for further actions like authorizing the payment.
@@ -116,7 +116,7 @@ When the store operator then chooses to capture the order from the Medusa Admin,
### Payment Entity Overview
-The [`Payment`](../../references/entities/classes/Payment.md) entity belongs to the `Cart` that it was originally created from when the customer’s payment was authorized. It also belongs to an `Order` once it’s placed. Additionally, it belongs to a `PaymentProvider` which is the payment processor that the customer chose on checkout.
+The [`Payment`](../../references/entities/classes/Payment.mdx) entity belongs to the `Cart` that it was originally created from when the customer’s payment was authorized. It also belongs to an `Order` once it’s placed. Additionally, it belongs to a `PaymentProvider` which is the payment processor that the customer chose on checkout.
In case a `Swap` is created for an order, `Payment` will be associated with that swap to handle payment operations related to it.
diff --git a/www/apps/docs/content/modules/carts-and-checkout/shipping.md b/www/apps/docs/content/modules/carts-and-checkout/shipping.md
index 845adb8508..f319c7dec0 100644
--- a/www/apps/docs/content/modules/carts-and-checkout/shipping.md
+++ b/www/apps/docs/content/modules/carts-and-checkout/shipping.md
@@ -49,7 +49,7 @@ Once the Fulfillment Provider is added to the backend, the store operator will b
### FulfillmentProvider Entity Overview
-The [`FulfillmentProvider`](../../references/entities/classes/FulfillmentProvider.md) entity only has 2 attributes: `is_installed` to indicate if the fulfillment provider is installed and its value is a boolean; and `id` which is the unique identifier that you define in the Fulfillment Provider Service.
+The [`FulfillmentProvider`](../../references/entities/classes/FulfillmentProvider.mdx) entity only has 2 attributes: `is_installed` to indicate if the fulfillment provider is installed and its value is a boolean; and `id` which is the unique identifier that you define in the Fulfillment Provider Service.
---
@@ -73,7 +73,7 @@ For example, shipping heavy items might be more expensive than others, which wou
### ShippingProfile Entity Overview
-The [`ShippingProfile`](../../references/entities/classes/ShippingProfile.md) entity can have a set of `Product` instances. These would be the products the shipping profile is providing shipping options for.
+The [`ShippingProfile`](../../references/entities/classes/ShippingProfile.mdx) entity can have a set of `Product` instances. These would be the products the shipping profile is providing shipping options for.
The `ShippingProfile` has a `type` attribute that can be `default`, `gift_card`, or `custom`.
@@ -101,7 +101,7 @@ Think of a shipping option as a template defined by the admin that indicates wha
### ShippingOption Entity Overview
-The [`ShippingOption`](../../references/entities/classes/ShippingOption.md) entity belongs to the `ShippingProfile` entity.
+The [`ShippingOption`](../../references/entities/classes/ShippingOption.mdx) entity belongs to the `ShippingProfile` entity.
The `ShippingOption` entity also belongs to a `FulfillmentProvider`. This can be either a custom third-party provider or one of Medusa’s default fulfillment providers.
@@ -139,7 +139,7 @@ This separation allows for developers to implement the custom integration with t
A lot of the shipping method’s attributes are similar to the shipping option’s attribute.
-The [`ShippingMethod`](../../references/entities/classes/ShippingMethod.md) entity belongs to a `ShippingOption`.
+The [`ShippingMethod`](../../references/entities/classes/ShippingMethod.mdx) entity belongs to a `ShippingOption`.
Similar to the `data` attribute explained for the `ShippingOption` entity, a `ShippingMethod` has a similar `data` attribute that includes all the data to be sent to the fulfillment provider when fulfilling the order.
diff --git a/www/apps/docs/content/modules/customers/customer-groups.md b/www/apps/docs/content/modules/customers/customer-groups.md
index ba629c926d..6557f32431 100644
--- a/www/apps/docs/content/modules/customers/customer-groups.md
+++ b/www/apps/docs/content/modules/customers/customer-groups.md
@@ -24,7 +24,7 @@ The customer groups feature can be used in a variety of use cases including:
## CustomerGroup Entity Overview
-A customer group is stored in the database as a [CustomerGroup](../../references/entities/classes/CustomerGroup.md) entity. This entity has two attributes other than the `id`: `name` and `metadata`.
+A customer group is stored in the database as a [CustomerGroup](../../references/entities/classes/CustomerGroup.mdx) entity. This entity has two attributes other than the `id`: `name` and `metadata`.
Similar to all entities in Medusa, you can use the `metadata` object attribute to store any custom data you want. For example, you can add some flag or tag to the customer group for a custom use case:
diff --git a/www/apps/docs/content/modules/discounts/discounts.md b/www/apps/docs/content/modules/discounts/discounts.md
index 72523782de..1c89da61cc 100644
--- a/www/apps/docs/content/modules/discounts/discounts.md
+++ b/www/apps/docs/content/modules/discounts/discounts.md
@@ -32,7 +32,7 @@ Discounts can be used in many use cases including:
## Discount Entity Overview
-A discount is represented by the [`Discount`](../../references/entities/classes/Discount.md) entity. Some of its important attributes are:
+A discount is represented by the [`Discount`](../../references/entities/classes/Discount.mdx) entity. Some of its important attributes are:
- `code` is a unique code that you specify when you create the discount. Customers use this code to apply the discount during checkout. The code can only include upper-case letters and numbers.
- `rule_id` is the ID of the rule of this discount. The `rule` attribute is the expanded object of the `DiscountRule` entity. You can use the `rule` attribute to get details regarding the discount type. You can learn more about this in the [`DiscountRule` entity overview](#discountrule-entity-overview) later.
@@ -54,7 +54,7 @@ The `is_dynamic` attribute in the `Discount` entity is a boolean value that dete
## DiscountRule Entity Overview
-Every `Discount` entity belongs to a [`DiscountRule`](../../references/entities/classes/DiscountRule.md) entity. `DiscountRule` includes details such as the type of discount, the amount to be discounted, and more.
+Every `Discount` entity belongs to a [`DiscountRule`](../../references/entities/classes/DiscountRule.mdx) entity. `DiscountRule` includes details such as the type of discount, the amount to be discounted, and more.
Some of the `DiscountRule` entity’s important attributes are:
@@ -71,7 +71,7 @@ Some of the `DiscountRule` entity’s important attributes are:
A discount can optionally have discount conditions. Discount conditions are used to further add limitations on when the discount can be applied.
-A [`DiscountCondition`](../../references/entities/classes/DiscountCondition.md) belongs to a `DiscountRule` entity. The `discount_rule_id` attribute indicates the ID of the `DiscountRule` it belongs to.
+A [`DiscountCondition`](../../references/entities/classes/DiscountCondition.mdx) belongs to a `DiscountRule` entity. The `discount_rule_id` attribute indicates the ID of the `DiscountRule` it belongs to.
Discount conditions have an attribute `type` that indicates the condition’s type. Its value must be one of the following:
@@ -92,11 +92,11 @@ Discount conditions also have an attribute `operator` that indicates how the con
Based on the value of `type`, one of the following relations can be used to retrieve the condition’s items:
-- `products` is an array of products that this condition applies to if the condition’s `type` is `products`. Each item of the array would be a [`DiscountConditionProduct`](../../references/entities/classes/DiscountConditionProduct.md).
-- `product_types` is an array of product types that this condition applies to if the condition’s `type` is `product_types`. Each item of the array would be a [`DiscountConditionProductType`](../../references/entities/classes/DiscountConditionProductType.md).
-- `product_collections` is an array of product collections that this condition applies to if the condition’s `type` is `product_collections`. Each item of the array would be a [`DiscountConditionProductCollection`](../../references/entities/classes/DiscountConditionProductCollection.md).
-- `product_tags` is an array of product tags that this condition applies to if the condition’s `type` is `product_tags`. Each item of the array would be a [`DiscountConditionProductTag`](../../references/entities/classes/DiscountConditionProductTag.md).
-- `customer_groups` is an array of customer groups that this condition applies to if the condition’s `type` is `customer_groups`. Each item of the array would be a [`DiscountConditionCustomerGroup`](../../references/entities/classes/DiscountConditionCustomerGroup.md).
+- `products` is an array of products that this condition applies to if the condition’s `type` is `products`. Each item of the array would be a [`DiscountConditionProduct`](../../references/entities/classes/DiscountConditionProduct.mdx).
+- `product_types` is an array of product types that this condition applies to if the condition’s `type` is `product_types`. Each item of the array would be a [`DiscountConditionProductType`](../../references/entities/classes/DiscountConditionProductType.mdx).
+- `product_collections` is an array of product collections that this condition applies to if the condition’s `type` is `product_collections`. Each item of the array would be a [`DiscountConditionProductCollection`](../../references/entities/classes/DiscountConditionProductCollection.mdx).
+- `product_tags` is an array of product tags that this condition applies to if the condition’s `type` is `product_tags`. Each item of the array would be a [`DiscountConditionProductTag`](../../references/entities/classes/DiscountConditionProductTag.mdx).
+- `customer_groups` is an array of customer groups that this condition applies to if the condition’s `type` is `customer_groups`. Each item of the array would be a [`DiscountConditionCustomerGroup`](../../references/entities/classes/DiscountConditionCustomerGroup.mdx).

diff --git a/www/apps/docs/content/modules/gift-cards/gift-cards.md b/www/apps/docs/content/modules/gift-cards/gift-cards.md
index a51d5c231e..a03c0e27e6 100644
--- a/www/apps/docs/content/modules/gift-cards/gift-cards.md
+++ b/www/apps/docs/content/modules/gift-cards/gift-cards.md
@@ -34,7 +34,7 @@ As custom gift cards can be used once they’re created, they’re also represen
## GiftCard Entity Overview
-Some of the [GiftCard](../../references/entities/classes/GiftCard.md) entity’s attributes are:
+Some of the [GiftCard](../../references/entities/classes/GiftCard.mdx) entity’s attributes are:
- `code`: a unique string of random characters. This is the code that the customer can use during their checkout to redeem the gift card.
- `value`: The amount of the gift card. This is the amount the customer purchased, or was gifted in the case of custom gift cards.
diff --git a/www/apps/docs/content/modules/orders/admin/manage-orders.mdx b/www/apps/docs/content/modules/orders/admin/manage-orders.mdx
index 1199569cf3..6c5df5dc86 100644
--- a/www/apps/docs/content/modules/orders/admin/manage-orders.mdx
+++ b/www/apps/docs/content/modules/orders/admin/manage-orders.mdx
@@ -208,7 +208,7 @@ curl -L -X GET '/admin/orders?status[]=completed' \
:::note
-You can check available order statuses [here](../../../references/entities/enums/OrderStatus).
+You can check available order statuses [here](../../../references/entities/enums/OrderStatus.mdx).
:::
diff --git a/www/apps/docs/content/modules/orders/claims.md b/www/apps/docs/content/modules/orders/claims.md
index ca60ad9783..7c48dd8441 100644
--- a/www/apps/docs/content/modules/orders/claims.md
+++ b/www/apps/docs/content/modules/orders/claims.md
@@ -19,12 +19,12 @@ The Medusa core provides the necessary implementation and functionalities that a
A claim is represented by the `ClaimOrder` entity. Some of its attributes include:
- `type`: a string indicating the type of the claim. Its value can be either `refund` or `replace`.
-- `payment_status`: a string indicating the status of the claim’s payment. Its possible values are indicated by the [ClaimPaymentStatus enum](../../references/entities/enums/ClaimPaymentStatus.md). This attribute is useful to check the status of the payment if the claim’s type is `refund`.
-- `fulfillment_status`: a string indicating the status of the claim’s fulfillment. Its possible values are indicated by the [ClaimFulfillmentStatus enum](../../references/entities/enums/ClaimFulfillmentStatus.md). This attribute is useful to check the status of the fulfillment if the claim’s type is `replace`.
+- `payment_status`: a string indicating the status of the claim’s payment. Its possible values are indicated by the [ClaimPaymentStatus enum](../../references/entities/enums/ClaimPaymentStatus.mdx). This attribute is useful to check the status of the payment if the claim’s type is `refund`.
+- `fulfillment_status`: a string indicating the status of the claim’s fulfillment. Its possible values are indicated by the [ClaimFulfillmentStatus enum](../../references/entities/enums/ClaimFulfillmentStatus.mdx). This attribute is useful to check the status of the fulfillment if the claim’s type is `replace`.
- `refund_amount`: an integer used to indicate the amount that should be refunded to the customer. This is only useful if the claim’s type is `refund`.
- `canceled_at`: a date indicating when the claim was canceled.
-There are other important attributes discussed in later sections. Check out the [full ClaimOrder entity in the entities reference](../../references/entities/classes/ClaimOrder.md).
+There are other important attributes discussed in later sections. Check out the [full ClaimOrder entity in the entities reference](../../references/entities/classes/ClaimOrder.mdx).
---
diff --git a/www/apps/docs/content/modules/orders/draft-orders.md b/www/apps/docs/content/modules/orders/draft-orders.md
index c6a32c728c..6080e07146 100644
--- a/www/apps/docs/content/modules/orders/draft-orders.md
+++ b/www/apps/docs/content/modules/orders/draft-orders.md
@@ -26,7 +26,7 @@ Some of the `DraftOrder`'s attributes include:
- `completed_at`: a date indicating when the draft order was completed.
- `no_notification_order`: a boolean indicating whether the customer should receive notifications when the order is updated.
-There are other important attributes discussed in later sections. Check out the [full DraftOrder entity in the entities reference](../../references/entities/classes/DraftOrder.md).
+There are other important attributes discussed in later sections. Check out the [full DraftOrder entity in the entities reference](../../references/entities/classes/DraftOrder.mdx).
---
diff --git a/www/apps/docs/content/modules/orders/fulfillments.md b/www/apps/docs/content/modules/orders/fulfillments.md
index 8fe202f6a3..bc9410d34e 100644
--- a/www/apps/docs/content/modules/orders/fulfillments.md
+++ b/www/apps/docs/content/modules/orders/fulfillments.md
@@ -27,7 +27,7 @@ Some of the `Fulfillment` entity’s attributes include:
- `shipped_at`: a date indicating when the fulfillment was shipped.
- `canceled_at`: a date indicating when the fulfillment was canceled.
-There are other important attributes discussed in later sections. Check out the [full Fulfillment entity in the entities reference](../../references/entities/classes/Fulfillment.md).
+There are other important attributes discussed in later sections. Check out the [full Fulfillment entity in the entities reference](../../references/entities/classes/Fulfillment.mdx).
---
diff --git a/www/apps/docs/content/modules/orders/orders.md b/www/apps/docs/content/modules/orders/orders.md
index 03970119d6..a2c8a1c509 100644
--- a/www/apps/docs/content/modules/orders/orders.md
+++ b/www/apps/docs/content/modules/orders/orders.md
@@ -37,7 +37,7 @@ Some of the attributes of the `Order` entity include:
- `no_notification`: a boolean value indicating whether the customer should receive notifications when the order is updated.
- `external_id`: a string indicating an ID of the order in an external system. This can be useful if you’re migrating your orders from another commerce system or you’re linking your order to a third-party service.
-There are other important attributes discussed in later sections. Check out the full [Order entity in the entities reference](../../references/entities/classes/Order.md).
+There are other important attributes discussed in later sections. Check out the full [Order entity in the entities reference](../../references/entities/classes/Order.mdx).
---
@@ -145,7 +145,7 @@ Some of the `OrderEdit`'s other attributes include:
- `confirmed_by`: a string that typically should hold the ID of who confirmed the order edit. Similar to the `created_by` attribute, there are no restrictions on what value this attribute can actually hold.
- `declined_by`: a string that typically should hold the ID of who declined the order edit. Similar to the `created_by` attribute, there are no restrictions on what value this attribute can actually hold.
-There are other attributes explained in other sections. You can also check out the full [OrderEdit entity in the entities reference](../../references/entities/classes/OrderEdit.md).
+There are other attributes explained in other sections. You can also check out the full [OrderEdit entity in the entities reference](../../references/entities/classes/OrderEdit.mdx).
### Item Changes
diff --git a/www/apps/docs/content/modules/orders/returns.md b/www/apps/docs/content/modules/orders/returns.md
index 404f7983df..277e857f61 100644
--- a/www/apps/docs/content/modules/orders/returns.md
+++ b/www/apps/docs/content/modules/orders/returns.md
@@ -28,7 +28,7 @@ Some of the `Return` entity’s attributes include:
- `no_notification`: a boolean value indicating whether the customer should receive notification updates when there are any changes in the return.
- `shipping_data`: this is a JSONB object that can hold any data related to the fulfillment associated with the return.
-There are other important attributes discussed in later sections. Check out the [full Return entity in the entities reference](../../references/entities/classes/Return.md).
+There are other important attributes discussed in later sections. Check out the [full Return entity in the entities reference](../../references/entities/classes/Return.mdx).
---
diff --git a/www/apps/docs/content/modules/orders/swaps.md b/www/apps/docs/content/modules/orders/swaps.md
index dd2d59fcac..4ccfb1dcc9 100644
--- a/www/apps/docs/content/modules/orders/swaps.md
+++ b/www/apps/docs/content/modules/orders/swaps.md
@@ -18,8 +18,8 @@ The Medusa core provides the necessary implementation and functionalities that a
Some of the attributes of the `Swap` entity include:
-- `fulfillment_status`: a string indicating the status of the swap’s fulfillment. Its possible values indicated by the [SwapFulfillmentStatus enum](../../references/entities/enums/SwapFulfillmentStatus.md) can determine whether all items have been fulfilled, shipped, or canceled.
-- `payment_status`: a string indicating the status of the swap’s payment. Its possible values indicated by the [SwapPaymentStatus enum](../../references/entities/enums/SwapFulfillmentStatus.md) can determine whether the payment of the swap has been captured or refunded.
+- `fulfillment_status`: a string indicating the status of the swap’s fulfillment. Its possible values indicated by the [SwapFulfillmentStatus enum](../../references/entities/enums/SwapFulfillmentStatus.mdx) can determine whether all items have been fulfilled, shipped, or canceled.
+- `payment_status`: a string indicating the status of the swap’s payment. Its possible values indicated by the [SwapPaymentStatus enum](../../references/entities/enums/SwapFulfillmentStatus.mdx) can determine whether the payment of the swap has been captured or refunded.
- `difference_due`: An integer indicating the difference amount between the order’s original total and the new total imposed by the swap.
- If the value of `difference_due` is negative, that means the customer should be refunded.
- If it’s positive, that means the customer must authorize additional payment.
@@ -29,7 +29,7 @@ Some of the attributes of the `Swap` entity include:
- `no_notification`: a boolean value indicating whether the customer should receive notifications when the order is updated.
- `allow_backorder`: a boolean value indicating whether a swap can be created and completed with items that are out of stock.
-There are other important attributes discussed in later sections. Check out the full [Swap entity in the entities reference](../../references/entities/classes/Swap.md).
+There are other important attributes discussed in later sections. Check out the full [Swap entity in the entities reference](../../references/entities/classes/Swap.mdx).
---
diff --git a/www/apps/docs/content/modules/price-lists/backend/override-price-selection-strategy.md b/www/apps/docs/content/modules/price-lists/backend/override-price-selection-strategy.md
deleted file mode 100644
index f820118e78..0000000000
--- a/www/apps/docs/content/modules/price-lists/backend/override-price-selection-strategy.md
+++ /dev/null
@@ -1,128 +0,0 @@
----
-description: 'Learn how to override the price selection strategy. The price selection strategy is used to determine the best price based on a specific context.'
-addHowToData: true
----
-
-# How to Override Price Selection Strategy
-
-In this document, you’ll learn how to override Medusa’s price selection strategy to create a custom pricing strategy.
-
-:::note
-
-If you’re interested in learning what a price selection strategy is and how it works, check out [this documentation](../price-selection-strategy.md) instead.
-
-:::
-
-## 1. Create Class
-
-Create a TypeScript or JavaScript file in `src/strategies` of your Medusa backend project with a class that extends the `AbstractPriceSelectionStrategy` class:
-
-```ts title=src/strategies/price.ts
-import {
- AbstractPriceSelectionStrategy,
- IPriceSelectionStrategy,
- PriceSelectionContext,
- PriceSelectionResult,
-} from "@medusajs/medusa"
-
-import { EntityManager } from "typeorm"
-
-export default class MyStrategy extends
- AbstractPriceSelectionStrategy {
- withTransaction(
- manager: EntityManager
- ): IPriceSelectionStrategy {
- if (!manager) {
- return this
- }
-
- return new MyStrategy()
- }
-
- async calculateVariantPrice(
- variant_id: string,
- context: PriceSelectionContext
- ): Promise {
- // TODO
- }
-}
-```
-
-You can use services or repositories in the strategy by adding them to the constructor and updating the parameters passed to the `MyStrategy` constructor in `withTransaction`. For example:
-
-```ts
-import {
- AbstractPriceSelectionStrategy,
- CustomerService,
- IPriceSelectionStrategy,
- PriceSelectionContext,
- PriceSelectionResult,
-} from "@medusajs/medusa"
-
-export default class MyStrategy extends
- AbstractPriceSelectionStrategy {
- private customerService: CustomerService
-
- constructor({
- customerService,
- }) {
- super()
- this.customerService = customerService
- }
-
- withTransaction(
- manager: EntityManager
- ): IPriceSelectionStrategy {
- if (!manager) {
- return this
- }
-
- return new MyStrategy({
- customerService: this.customerService,
- })
- }
- // ...
-}
-```
-
----
-
-## 2. Implement calculateVariantPrice
-
-Implement the price selection strategy you want inside the `calculateVariantPrice` method.
-
-This method accepts the variant ID as a first parameter and the [context](../price-selection-strategy.md#context-object) object as a second parameter.
-
-This method must return an object having the following fields:
-
-```ts noReport
-{
- originalPrice, // number | null
- calculatedPrice, // number | null
- prices // MoneyAmount[]
-}
-```
-
-You can learn more about optional properties and the meaning behind every property [here](../price-selection-strategy.md#calculatevariantprice-method).
-
----
-
-## 3. Run Build Command
-
-In your terminal, run the build command to transpile the files in the `src` directory into the `dist` directory:
-
-```bash npm2yarn
-npm run build
-```
-
----
-
-## Test it Out
-
-Run your backend to test it out:
-
-```bash npm2yarn
-npx medusa develop
-```
-
-Then, try out your strategy using any of the [Products](https://docs.medusajs.com/api/store#products) or [Carts](https://docs.medusajs.com/api/store#carts) API Routes which include retrieving product variants and line items respectively. You should then see the prices in the response based on your implemented strategy.
diff --git a/www/apps/docs/content/modules/price-lists/backend/override-price-selection-strategy.mdx b/www/apps/docs/content/modules/price-lists/backend/override-price-selection-strategy.mdx
new file mode 100644
index 0000000000..346705af89
--- /dev/null
+++ b/www/apps/docs/content/modules/price-lists/backend/override-price-selection-strategy.mdx
@@ -0,0 +1,295 @@
+---
+description: 'Learn how to override the price selection strategy. The price selection strategy is used to determine the best price based on a specific context.'
+addHowToData: true
+---
+
+import ParameterTypes from "@site/src/components/ParameterTypes"
+
+# How to Override Price Selection Strategy
+
+In this document, you’ll learn how to override Medusa’s price selection strategy to create a custom pricing strategy.
+
+:::note
+
+If you’re interested in learning what a price selection strategy is and how it works, check out [this documentation](../price-selection-strategy.md) instead.
+
+:::
+
+## 1. Create Class
+
+Create a TypeScript or JavaScript file in `src/strategies` of your Medusa backend project with a class that extends the `AbstractPriceSelectionStrategy` class:
+
+```ts title=src/strategies/price.ts
+import {
+ AbstractPriceSelectionStrategy,
+ PriceSelectionContext,
+ PriceSelectionResult,
+} from "@medusajs/medusa"
+import {
+ TaxServiceRate,
+} from "@medusajs/medusa/dist/types/tax-service"
+
+export default class MyStrategy extends
+ AbstractPriceSelectionStrategy {
+
+ async calculateVariantPrice(
+ data: {
+ variantId: string;
+ taxRates: TaxServiceRate[];
+ quantity?: number
+ }[],
+ context: PriceSelectionContext
+ ): Promise |