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
2024-03-18 07:47:35 +00:00
committed by GitHub
parent 56a6ec0227
commit bb87db8342
2008 changed files with 15716 additions and 10536 deletions
@@ -2,7 +2,7 @@
displayed_sidebar: servicesSidebar
---
import ParameterTypes from "@site/src/components/ParameterTypes"
import TypeList from "@site/src/components/TypeList"
# PricingService
@@ -12,13 +12,13 @@ Allows retrieval of prices.
### Parameters
<ParameterTypes parameters={[{"name":"__namedParameters","type":"`InjectedDependencies`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="new PricingService"/>
<TypeList types={[{"name":"__namedParameters","type":"`InjectedDependencies`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="new PricingService"/>
___
## Properties
<ParameterTypes parameters={[{"name":"manager_","type":"`EntityManager`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionManager_","type":"`undefined` \\| `EntityManager`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"__container__","type":"`any`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"regionService","type":"[RegionService](services.RegionService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"taxProviderService","type":"[TaxProviderService](services.TaxProviderService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customerService_","type":"[CustomerService](services.CustomerService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"priceSelectionStrategy","type":"[IPriceSelectionStrategy](../../medusa/interfaces/medusa.IPriceSelectionStrategy.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"productVariantService","type":"[ProductVariantService](services.ProductVariantService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"featureFlagRouter","type":"`FlagRouter`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"__configModule__","type":"`Record<string, unknown>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"__moduleDeclaration__","type":"`Record<string, unknown>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="PricingService"/>
<TypeList types={[{"name":"manager_","type":"`EntityManager`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"transactionManager_","type":"`undefined` \\| `EntityManager`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"__container__","type":"`any`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"regionService","type":"[RegionService](services.RegionService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"taxProviderService","type":"[TaxProviderService](services.TaxProviderService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customerService_","type":"[CustomerService](services.CustomerService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"priceSelectionStrategy","type":"[IPriceSelectionStrategy](../../medusa/interfaces/medusa.IPriceSelectionStrategy.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"productVariantService","type":"[ProductVariantService](services.ProductVariantService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"featureFlagRouter","type":"`FlagRouter`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"__configModule__","type":"`Record<string, unknown>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"__moduleDeclaration__","type":"`Record<string, unknown>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="PricingService"/>
___
@@ -28,19 +28,19 @@ ___
#### Returns
<ParameterTypes parameters={[{"name":"EntityManager","type":"`EntityManager`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="activeManager_"/>
<TypeList types={[{"name":"EntityManager","type":"`EntityManager`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="activeManager_"/>
### pricingModuleService
#### Returns
<ParameterTypes parameters={[{"name":"IPricingModuleService","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="pricingModuleService"/>
<TypeList types={[{"name":"IPricingModuleService","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="pricingModuleService"/>
### remoteQuery
#### Returns
<ParameterTypes parameters={[{"name":"RemoteQueryFunction","type":"(`query`: `string` \\| [RemoteJoinerQuery](../../types/interfaces/types.RemoteJoinerQuery.mdx) \\| `object`, `variables?`: `Record<string, unknown>`) => Promise&#60;any&#62; \\| `null`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="remoteQuery"/>
<TypeList types={[{"name":"RemoteQueryFunction","type":"(`query`: `string` \\| [RemoteJoinerQuery](../../types/interfaces/types.RemoteJoinerQuery.mdx) \\| `object`, `variables?`: `Record<string, unknown>`) => Promise&#60;any&#62; \\| `null`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="remoteQuery"/>
___
@@ -50,21 +50,21 @@ ___
#### Parameters
<ParameterTypes parameters={[{"name":"transactionManager","type":"`EntityManager`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="withTransaction"/>
<TypeList types={[{"name":"transactionManager","type":"`EntityManager`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="withTransaction"/>
#### Returns
<ParameterTypes parameters={[{"name":"this","type":"`this`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="withTransaction"/>
<TypeList types={[{"name":"this","type":"`this`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="withTransaction"/>
### shouldRetryTransaction\_
#### Parameters
<ParameterTypes parameters={[{"name":"err","type":"`Record<string, unknown>` \\| `object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="shouldRetryTransaction_"/>
<TypeList types={[{"name":"err","type":"`Record<string, unknown>` \\| `object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="shouldRetryTransaction_"/>
#### Returns
<ParameterTypes parameters={[{"name":"boolean","type":"`boolean`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="shouldRetryTransaction_"/>
<TypeList types={[{"name":"boolean","type":"`boolean`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="shouldRetryTransaction_"/>
### atomicPhase\_
@@ -74,15 +74,15 @@ transaction manager is created.
#### Type Parameters
<ParameterTypes parameters={[{"name":"TResult","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"TError","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="atomicPhase_"/>
<TypeList types={[{"name":"TResult","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"TError","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="atomicPhase_"/>
#### Parameters
<ParameterTypes parameters={[{"name":"work","type":"(`transactionManager`: `EntityManager`) => Promise&#60;TResult&#62;","description":"the transactional work to be done","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationOrErrorHandler","type":"`IsolationLevel` \\| (`error`: TError) => Promise&#60;void \\| TResult&#62;","description":"the isolation level to be used for the work.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"maybeErrorHandlerOrDontFail","type":"(`error`: TError) => Promise&#60;void \\| TResult&#62;","description":"Potential error handler","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="atomicPhase_"/>
<TypeList types={[{"name":"work","type":"(`transactionManager`: `EntityManager`) => Promise&#60;TResult&#62;","description":"the transactional work to be done","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"isolationOrErrorHandler","type":"`IsolationLevel` \\| (`error`: TError) => Promise&#60;void \\| TResult&#62;","description":"the isolation level to be used for the work.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"maybeErrorHandlerOrDontFail","type":"(`error`: TError) => Promise&#60;void \\| TResult&#62;","description":"Potential error handler","optional":true,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="atomicPhase_"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;TResult&#62;","optional":false,"defaultValue":"","description":"the result of the transactional work","expandable":false,"children":[]}]} sectionTitle="atomicPhase_"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;TResult&#62;","optional":false,"defaultValue":"","description":"the result of the transactional work","expandable":false,"children":[]}]} sectionTitle="atomicPhase_"/>
### collectPricingContext
@@ -91,11 +91,11 @@ selection.
#### Parameters
<ParameterTypes parameters={[{"name":"context","type":"[PriceSelectionContext](../../medusa/interfaces/medusa.PriceSelectionContext.mdx)","description":"the price selection context to use","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="collectPricingContext"/>
<TypeList types={[{"name":"context","type":"[PriceSelectionContext](../../medusa/interfaces/medusa.PriceSelectionContext.mdx)","description":"the price selection context to use","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="collectPricingContext"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;PricingContext&#62;","optional":false,"defaultValue":"","description":"The pricing context","expandable":false,"children":[]}]} sectionTitle="collectPricingContext"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;PricingContext&#62;","optional":false,"defaultValue":"","description":"The pricing context","expandable":false,"children":[]}]} sectionTitle="collectPricingContext"/>
### calculateTaxes
@@ -103,31 +103,31 @@ Gets the prices for a product variant
#### Parameters
<ParameterTypes parameters={[{"name":"variantPricing","type":"[ProductVariantPricing](../../medusa/types/medusa.ProductVariantPricing.mdx)","description":"the prices retrieved from a variant","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"productRates","type":"[TaxServiceRate](../../medusa/types/medusa.TaxServiceRate.mdx)[]","description":"the tax rates that the product has applied","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="calculateTaxes"/>
<TypeList types={[{"name":"variantPricing","type":"[ProductVariantPricing](../../medusa/types/medusa.ProductVariantPricing.mdx)","description":"the prices retrieved from a variant","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"productRates","type":"[TaxServiceRate](../../medusa/types/medusa.TaxServiceRate.mdx)[]","description":"the tax rates that the product has applied","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="calculateTaxes"/>
#### Returns
<ParameterTypes parameters={[{"name":"TaxedPricing","type":"`object`","description":"Pricing fields related to taxes.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="calculateTaxes"/>
<TypeList types={[{"name":"TaxedPricing","type":"`object`","description":"Pricing fields related to taxes.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="calculateTaxes"/>
### getProductVariantPricingModulePricing\_
#### Parameters
<ParameterTypes parameters={[{"name":"variantPriceData","type":"`object`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"[PricingContext](../../types/interfaces/types.PricingContext.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="getProductVariantPricingModulePricing_"/>
<TypeList types={[{"name":"variantPriceData","type":"`object`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"[PricingContext](../../types/interfaces/types.PricingContext.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="getProductVariantPricingModulePricing_"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;Map&#60;any, any&#62;&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="getProductVariantPricingModulePricing_"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;Map&#60;any, any&#62;&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="getProductVariantPricingModulePricing_"/>
### getProductVariantPricing\_
#### Parameters
<ParameterTypes parameters={[{"name":"data","type":"`object`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"[PricingContext](../../types/interfaces/types.PricingContext.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="getProductVariantPricing_"/>
<TypeList types={[{"name":"data","type":"`object`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"[PricingContext](../../types/interfaces/types.PricingContext.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="getProductVariantPricing_"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;Map&#60;string, [ProductVariantPricing](../../medusa/types/medusa.ProductVariantPricing.mdx)&#62;&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="getProductVariantPricing_"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;Map&#60;string, [ProductVariantPricing](../../medusa/types/medusa.ProductVariantPricing.mdx)&#62;&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="getProductVariantPricing_"/>
### getProductVariantPricing
@@ -135,11 +135,11 @@ Gets the prices for a product variant.
#### Parameters
<ParameterTypes parameters={[{"name":"variant","type":"Pick&#60;[ProductVariant](../../entities/classes/entities.ProductVariant.mdx), \"id\" \\| \"product_id\"&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"[PriceSelectionContext](../../medusa/interfaces/medusa.PriceSelectionContext.mdx) \\| [PricingContext](../../types/interfaces/types.PricingContext.mdx)","description":"the price selection context to use","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="getProductVariantPricing"/>
<TypeList types={[{"name":"variant","type":"Pick&#60;[ProductVariant](../../entities/classes/entities.ProductVariant.mdx), \"id\" \\| \"product_id\"&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"[PriceSelectionContext](../../medusa/interfaces/medusa.PriceSelectionContext.mdx) \\| [PricingContext](../../types/interfaces/types.PricingContext.mdx)","description":"the price selection context to use","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="getProductVariantPricing"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[ProductVariantPricing](../../medusa/types/medusa.ProductVariantPricing.mdx)&#62;","optional":false,"defaultValue":"","description":"The product variant prices","expandable":false,"children":[]}]} sectionTitle="getProductVariantPricing"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[ProductVariantPricing](../../medusa/types/medusa.ProductVariantPricing.mdx)&#62;","optional":false,"defaultValue":"","description":"The product variant prices","expandable":false,"children":[]}]} sectionTitle="getProductVariantPricing"/>
### getProductVariantPricingById
@@ -147,11 +147,11 @@ Gets the prices for a product variant by a variant id.
#### Parameters
<ParameterTypes parameters={[{"name":"variantId","type":"`string`","description":"the id of the variant to get prices for","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"[PriceSelectionContext](../../medusa/interfaces/medusa.PriceSelectionContext.mdx) \\| [PricingContext](../../types/interfaces/types.PricingContext.mdx)","description":"the price selection context to use","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="getProductVariantPricingById"/>
<TypeList types={[{"name":"variantId","type":"`string`","description":"the id of the variant to get prices for","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"[PriceSelectionContext](../../medusa/interfaces/medusa.PriceSelectionContext.mdx) \\| [PricingContext](../../types/interfaces/types.PricingContext.mdx)","description":"the price selection context to use","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="getProductVariantPricingById"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[ProductVariantPricing](../../medusa/types/medusa.ProductVariantPricing.mdx)&#62;","optional":false,"defaultValue":"","description":"The product variant prices","expandable":false,"children":[]}]} sectionTitle="getProductVariantPricingById"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[ProductVariantPricing](../../medusa/types/medusa.ProductVariantPricing.mdx)&#62;","optional":false,"defaultValue":"","description":"The product variant prices","expandable":false,"children":[]}]} sectionTitle="getProductVariantPricingById"/>
#### Deprecated
@@ -163,21 +163,21 @@ Gets the prices for a collection of variants.
#### Parameters
<ParameterTypes parameters={[{"name":"data","type":"`object`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"[PriceSelectionContext](../../medusa/interfaces/medusa.PriceSelectionContext.mdx) \\| [PricingContext](../../types/interfaces/types.PricingContext.mdx)","description":"the price selection context to use","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="getProductVariantsPricing"/>
<TypeList types={[{"name":"data","type":"`object`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"[PriceSelectionContext](../../medusa/interfaces/medusa.PriceSelectionContext.mdx) \\| [PricingContext](../../types/interfaces/types.PricingContext.mdx)","description":"the price selection context to use","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="getProductVariantsPricing"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;object&#62;","optional":false,"defaultValue":"","description":"The product variant prices","expandable":false,"children":[]}]} sectionTitle="getProductVariantsPricing"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;object&#62;","optional":false,"defaultValue":"","description":"The product variant prices","expandable":false,"children":[]}]} sectionTitle="getProductVariantsPricing"/>
### getProductPricing\_
#### Parameters
<ParameterTypes parameters={[{"name":"data","type":"`object`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"[PricingContext](../../types/interfaces/types.PricingContext.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="getProductPricing_"/>
<TypeList types={[{"name":"data","type":"`object`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"[PricingContext](../../types/interfaces/types.PricingContext.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="getProductPricing_"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;Map&#60;string, Record&#60;string, [ProductVariantPricing](../../medusa/types/medusa.ProductVariantPricing.mdx)&#62;&#62;&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="getProductPricing_"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;Map&#60;string, Record&#60;string, [ProductVariantPricing](../../medusa/types/medusa.ProductVariantPricing.mdx)&#62;&#62;&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="getProductPricing_"/>
### getProductPricing
@@ -186,11 +186,11 @@ be fetched.
#### Parameters
<ParameterTypes parameters={[{"name":"product","type":"Pick&#60;[Product](../../entities/classes/entities.Product.mdx), \"id\" \\| \"variants\"&#62;","description":"the product to get pricing for.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"[PriceSelectionContext](../../medusa/interfaces/medusa.PriceSelectionContext.mdx)","description":"the price selection context to use","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="getProductPricing"/>
<TypeList types={[{"name":"product","type":"Pick&#60;[Product](../../entities/classes/entities.Product.mdx), \"id\" \\| \"variants\"&#62;","description":"the product to get pricing for.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"[PriceSelectionContext](../../medusa/interfaces/medusa.PriceSelectionContext.mdx)","description":"the price selection context to use","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="getProductPricing"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;Record&#60;string, [ProductVariantPricing](../../medusa/types/medusa.ProductVariantPricing.mdx)&#62;&#62;","optional":false,"defaultValue":"","description":"A map of variant ids to their corresponding prices","expandable":false,"children":[]}]} sectionTitle="getProductPricing"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;Record&#60;string, [ProductVariantPricing](../../medusa/types/medusa.ProductVariantPricing.mdx)&#62;&#62;","optional":false,"defaultValue":"","description":"A map of variant ids to their corresponding prices","expandable":false,"children":[]}]} sectionTitle="getProductPricing"/>
### getProductPricingById
@@ -198,11 +198,11 @@ Gets all the variant prices for a product by the product id
#### Parameters
<ParameterTypes parameters={[{"name":"productId","type":"`string`","description":"the id of the product to get prices for","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"[PriceSelectionContext](../../medusa/interfaces/medusa.PriceSelectionContext.mdx)","description":"the price selection context to use","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="getProductPricingById"/>
<TypeList types={[{"name":"productId","type":"`string`","description":"the id of the product to get prices for","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"[PriceSelectionContext](../../medusa/interfaces/medusa.PriceSelectionContext.mdx)","description":"the price selection context to use","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="getProductPricingById"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;Record&#60;string, [ProductVariantPricing](../../medusa/types/medusa.ProductVariantPricing.mdx)&#62;&#62;","optional":false,"defaultValue":"","description":"A map of variant ids to their corresponding prices","expandable":false,"children":[]}]} sectionTitle="getProductPricingById"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;Record&#60;string, [ProductVariantPricing](../../medusa/types/medusa.ProductVariantPricing.mdx)&#62;&#62;","optional":false,"defaultValue":"","description":"A map of variant ids to their corresponding prices","expandable":false,"children":[]}]} sectionTitle="getProductPricingById"/>
### setVariantPrices
@@ -210,11 +210,11 @@ Set additional prices on a list of product variants.
#### Parameters
<ParameterTypes parameters={[{"name":"variants","type":"[ProductVariant](../../entities/classes/entities.ProductVariant.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"[PriceSelectionContext](../../medusa/interfaces/medusa.PriceSelectionContext.mdx)","description":"the price selection context to use","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="setVariantPrices"/>
<TypeList types={[{"name":"variants","type":"[ProductVariant](../../entities/classes/entities.ProductVariant.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"[PriceSelectionContext](../../medusa/interfaces/medusa.PriceSelectionContext.mdx)","description":"the price selection context to use","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="setVariantPrices"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[PricedVariant](../../medusa/types/medusa.PricedVariant.mdx)[]&#62;","optional":false,"defaultValue":"","description":"A list of products with variants decorated with prices","expandable":false,"children":[]}]} sectionTitle="setVariantPrices"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[PricedVariant](../../medusa/types/medusa.PricedVariant.mdx)[]&#62;","optional":false,"defaultValue":"","description":"A list of products with variants decorated with prices","expandable":false,"children":[]}]} sectionTitle="setVariantPrices"/>
### setProductPrices
@@ -222,41 +222,41 @@ Set additional prices on a list of products.
#### Parameters
<ParameterTypes parameters={[{"name":"products","type":"[Product](../../entities/classes/entities.Product.mdx)[]","description":"list of products on which to set additional prices","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"[PriceSelectionContext](../../medusa/interfaces/medusa.PriceSelectionContext.mdx)","description":"the price selection context to use","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="setProductPrices"/>
<TypeList types={[{"name":"products","type":"[Product](../../entities/classes/entities.Product.mdx)[]","description":"list of products on which to set additional prices","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"[PriceSelectionContext](../../medusa/interfaces/medusa.PriceSelectionContext.mdx)","description":"the price selection context to use","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="setProductPrices"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;([Product](../../entities/classes/entities.Product.mdx) \\| [PricedProduct](../../medusa/types/medusa.PricedProduct.mdx))[]&#62;","optional":false,"defaultValue":"","description":"A list of products with variants decorated with prices","expandable":false,"children":[]}]} sectionTitle="setProductPrices"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;([Product](../../entities/classes/entities.Product.mdx) \\| [PricedProduct](../../medusa/types/medusa.PricedProduct.mdx))[]&#62;","optional":false,"defaultValue":"","description":"A list of products with variants decorated with prices","expandable":false,"children":[]}]} sectionTitle="setProductPrices"/>
### getPricingModuleVariantMoneyAmounts
#### Parameters
<ParameterTypes parameters={[{"name":"variantIds","type":"`string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="getPricingModuleVariantMoneyAmounts"/>
<TypeList types={[{"name":"variantIds","type":"`string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="getPricingModuleVariantMoneyAmounts"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;Map&#60;string, [MoneyAmount](../../entities/classes/entities.MoneyAmount.mdx)[]&#62;&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="getPricingModuleVariantMoneyAmounts"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;Map&#60;string, [MoneyAmount](../../entities/classes/entities.MoneyAmount.mdx)[]&#62;&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="getPricingModuleVariantMoneyAmounts"/>
### setAdminVariantPricing
#### Parameters
<ParameterTypes parameters={[{"name":"variants","type":"[ProductVariant](../../entities/classes/entities.ProductVariant.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"[PriceSelectionContext](../../medusa/interfaces/medusa.PriceSelectionContext.mdx)","description":"","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="setAdminVariantPricing"/>
<TypeList types={[{"name":"variants","type":"[ProductVariant](../../entities/classes/entities.ProductVariant.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"[PriceSelectionContext](../../medusa/interfaces/medusa.PriceSelectionContext.mdx)","description":"","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="setAdminVariantPricing"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[PricedVariant](../../medusa/types/medusa.PricedVariant.mdx)[]&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="setAdminVariantPricing"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[PricedVariant](../../medusa/types/medusa.PricedVariant.mdx)[]&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="setAdminVariantPricing"/>
### setAdminProductPricing
#### Parameters
<ParameterTypes parameters={[{"name":"products","type":"[Product](../../entities/classes/entities.Product.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="setAdminProductPricing"/>
<TypeList types={[{"name":"products","type":"[Product](../../entities/classes/entities.Product.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="setAdminProductPricing"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;([Product](../../entities/classes/entities.Product.mdx) \\| [PricedProduct](../../medusa/types/medusa.PricedProduct.mdx))[]&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="setAdminProductPricing"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;([Product](../../entities/classes/entities.Product.mdx) \\| [PricedProduct](../../medusa/types/medusa.PricedProduct.mdx))[]&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="setAdminProductPricing"/>
### getShippingOptionPricing
@@ -264,11 +264,11 @@ Gets the prices for a shipping option.
#### Parameters
<ParameterTypes parameters={[{"name":"shippingOption","type":"[ShippingOption](../../entities/classes/entities.ShippingOption.mdx)","description":"the shipping option to get prices for","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"[PriceSelectionContext](../../medusa/interfaces/medusa.PriceSelectionContext.mdx) \\| [PricingContext](../../types/interfaces/types.PricingContext.mdx)","description":"the price selection context to use","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="getShippingOptionPricing"/>
<TypeList types={[{"name":"shippingOption","type":"[ShippingOption](../../entities/classes/entities.ShippingOption.mdx)","description":"the shipping option to get prices for","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"[PriceSelectionContext](../../medusa/interfaces/medusa.PriceSelectionContext.mdx) \\| [PricingContext](../../types/interfaces/types.PricingContext.mdx)","description":"the price selection context to use","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="getShippingOptionPricing"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[PricedShippingOption](../../medusa/types/medusa.PricedShippingOption.mdx)&#62;","optional":false,"defaultValue":"","description":"The shipping option prices","expandable":false,"children":[]}]} sectionTitle="getShippingOptionPricing"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[PricedShippingOption](../../medusa/types/medusa.PricedShippingOption.mdx)&#62;","optional":false,"defaultValue":"","description":"The shipping option prices","expandable":false,"children":[]}]} sectionTitle="getShippingOptionPricing"/>
### setShippingOptionPrices
@@ -276,8 +276,8 @@ Set additional prices on a list of shipping options.
#### Parameters
<ParameterTypes parameters={[{"name":"shippingOptions","type":"[ShippingOption](../../entities/classes/entities.ShippingOption.mdx)[]","description":"list of shipping options on which to set additional prices","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"Omit&#60;[PriceSelectionContext](../../medusa/interfaces/medusa.PriceSelectionContext.mdx), \"region_id\"&#62;","description":"the price selection context to use","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="setShippingOptionPrices"/>
<TypeList types={[{"name":"shippingOptions","type":"[ShippingOption](../../entities/classes/entities.ShippingOption.mdx)[]","description":"list of shipping options on which to set additional prices","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"Omit&#60;[PriceSelectionContext](../../medusa/interfaces/medusa.PriceSelectionContext.mdx), \"region_id\"&#62;","description":"the price selection context to use","optional":false,"defaultValue":"{}","expandable":false,"children":[]}]} sectionTitle="setShippingOptionPrices"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[PricedShippingOption](../../medusa/types/medusa.PricedShippingOption.mdx)[]&#62;","optional":false,"defaultValue":"","description":"A list of shipping options with prices","expandable":false,"children":[]}]} sectionTitle="setShippingOptionPrices"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[PricedShippingOption](../../medusa/types/medusa.PricedShippingOption.mdx)[]&#62;","optional":false,"defaultValue":"","description":"A list of shipping options with prices","expandable":false,"children":[]}]} sectionTitle="setShippingOptionPrices"/>