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"
# TaxProviderService
@@ -12,13 +12,13 @@ Finds tax providers and assists in tax related operations.
### Parameters
<ParameterTypes parameters={[{"name":"container","type":"AwilixContainer&#60;any&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="new TaxProviderService"/>
<TypeList types={[{"name":"container","type":"AwilixContainer&#60;any&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="new TaxProviderService"/>
___
## 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":"container_","type":"AwilixContainer&#60;any&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"cacheService_","type":"[ICacheService](../../types/CacheTypes/interfaces/types.CacheTypes.ICacheService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"taxRateService_","type":"[TaxRateService](services.TaxRateService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"taxLineRepo_","type":"Repository&#60;[LineItemTaxLine](../../entities/classes/entities.LineItemTaxLine.mdx)&#62; & `object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"smTaxLineRepo_","type":"Repository&#60;[ShippingMethodTaxLine](../../entities/classes/entities.ShippingMethodTaxLine.mdx)&#62; & `object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"taxProviderRepo_","type":"Repository&#60;[TaxProvider](../../entities/classes/entities.TaxProvider.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"eventBus_","type":"[IEventBusService](../../types/EventBusTypes/interfaces/types.EventBusTypes.IEventBusService.mdx)","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="TaxProviderService"/>
<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":"container_","type":"AwilixContainer&#60;any&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"cacheService_","type":"[ICacheService](../../types/CacheTypes/interfaces/types.CacheTypes.ICacheService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"taxRateService_","type":"[TaxRateService](services.TaxRateService.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"taxLineRepo_","type":"Repository&#60;[LineItemTaxLine](../../entities/classes/entities.LineItemTaxLine.mdx)&#62; & `object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"smTaxLineRepo_","type":"Repository&#60;[ShippingMethodTaxLine](../../entities/classes/entities.ShippingMethodTaxLine.mdx)&#62; & `object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"taxProviderRepo_","type":"Repository&#60;[TaxProvider](../../entities/classes/entities.TaxProvider.mdx)&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"eventBus_","type":"[IEventBusService](../../types/EventBusTypes/interfaces/types.EventBusTypes.IEventBusService.mdx)","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="TaxProviderService"/>
___
@@ -28,7 +28,7 @@ ___
#### 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_"/>
___
@@ -38,21 +38,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\_
@@ -62,21 +62,21 @@ 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_"/>
### list
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[TaxProvider](../../entities/classes/entities.TaxProvider.mdx)[]&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="list"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[TaxProvider](../../entities/classes/entities.TaxProvider.mdx)[]&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="list"/>
### retrieveProvider
@@ -84,31 +84,31 @@ Retrieves the relevant tax provider for the given region.
#### Parameters
<ParameterTypes parameters={[{"name":"region","type":"[Region](../../entities/classes/entities.Region.mdx)","description":"the region to get tax provider for.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="retrieveProvider"/>
<TypeList types={[{"name":"region","type":"[Region](../../entities/classes/entities.Region.mdx)","description":"the region to get tax provider for.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="retrieveProvider"/>
#### Returns
<ParameterTypes parameters={[{"name":"ITaxService","type":"`object`","description":"## Overview\n\nA tax provider is used to retrieve the tax lines in a cart. The Medusa backend provides a default `system` provider. You can create your own tax provider,\neither in a plugin or directly in your Medusa backend, then use it in any region.\n\nA tax provider class is defined in a TypeScript or JavaScript file under the `src/services` directory and the class must extend the\n`AbstractTaxService` class imported from `@medusajs/medusa`. The file's name is the tax provider's class name as a slug and without the word `Service`.\n\nFor example, you can create the file `src/services/my-tax.ts` with the following content:\n\n```ts title=\"src/services/my-tax.ts\"\nimport {\n AbstractTaxService,\n ItemTaxCalculationLine,\n ShippingTaxCalculationLine,\n TaxCalculationContext,\n} from \"@medusajs/medusa\"\nimport {\n ProviderTaxLine,\n} from \"@medusajs/medusa/dist/types/tax-service\"\n\nclass MyTaxService extends AbstractTaxService {\n async getTaxLines(\n itemLines: ItemTaxCalculationLine[],\n shippingLines: ShippingTaxCalculationLine[],\n context: TaxCalculationContext):\n Promise<ProviderTaxLine[]> {\n throw new Error(\"Method not implemented.\")\n }\n}\n\nexport default MyTaxService\n```\n\n---\n\n## Identifier Property\n\nThe `TaxProvider` entity has 2 properties: `identifier` and `is_installed`. The `identifier` property in the tax provider service is used when the tax provider is added to the database.\n\nThe value of this property is also used to reference the tax provider throughout Medusa. For example, it is used to [change the tax provider](https://docs.medusajs.com/modules/taxes/admin/manage-tax-settings#change-tax-provider-of-a-region) to a region.\n\n```ts title=\"src/services/my-tax.ts\"\nclass MyTaxService extends AbstractTaxService {\n static identifier = \"my-tax\"\n // ...\n}\n```\n\n---","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="retrieveProvider"/>
<TypeList types={[{"name":"ITaxService","type":"`object`","description":"## Overview\n\nA tax provider is used to retrieve the tax lines in a cart. The Medusa backend provides a default `system` provider. You can create your own tax provider,\neither in a plugin or directly in your Medusa backend, then use it in any region.\n\nA tax provider class is defined in a TypeScript or JavaScript file under the `src/services` directory and the class must extend the\n`AbstractTaxService` class imported from `@medusajs/medusa`. The file's name is the tax provider's class name as a slug and without the word `Service`.\n\nFor example, you can create the file `src/services/my-tax.ts` with the following content:\n\n```ts title=\"src/services/my-tax.ts\"\nimport {\n AbstractTaxService,\n ItemTaxCalculationLine,\n ShippingTaxCalculationLine,\n TaxCalculationContext,\n} from \"@medusajs/medusa\"\nimport {\n ProviderTaxLine,\n} from \"@medusajs/medusa/dist/types/tax-service\"\n\nclass MyTaxService extends AbstractTaxService {\n async getTaxLines(\n itemLines: ItemTaxCalculationLine[],\n shippingLines: ShippingTaxCalculationLine[],\n context: TaxCalculationContext):\n Promise<ProviderTaxLine[]> {\n throw new Error(\"Method not implemented.\")\n }\n}\n\nexport default MyTaxService\n```\n\n---\n\n## Identifier Property\n\nThe `TaxProvider` entity has 2 properties: `identifier` and `is_installed`. The `identifier` property in the tax provider service is used when the tax provider is added to the database.\n\nThe value of this property is also used to reference the tax provider throughout Medusa. For example, it is used to [change the tax provider](https://docs.medusajs.com/modules/taxes/admin/manage-tax-settings#change-tax-provider-of-a-region) to a region.\n\n```ts title=\"src/services/my-tax.ts\"\nclass MyTaxService extends AbstractTaxService {\n static identifier = \"my-tax\"\n // ...\n}\n```\n\n---","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="retrieveProvider"/>
### clearLineItemsTaxLines
#### Parameters
<ParameterTypes parameters={[{"name":"itemIds","type":"`string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="clearLineItemsTaxLines"/>
<TypeList types={[{"name":"itemIds","type":"`string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="clearLineItemsTaxLines"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="clearLineItemsTaxLines"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="clearLineItemsTaxLines"/>
### clearTaxLines
#### Parameters
<ParameterTypes parameters={[{"name":"cartId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="clearTaxLines"/>
<TypeList types={[{"name":"cartId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="clearTaxLines"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="clearTaxLines"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="clearTaxLines"/>
### createTaxLines
@@ -116,11 +116,11 @@ Persists the tax lines relevant for an order to the database.
#### Parameters
<ParameterTypes parameters={[{"name":"cartOrLineItems","type":"[LineItem](../../entities/classes/entities.LineItem.mdx)[] \\| [Cart](../../entities/classes/entities.Cart.mdx)","description":"the cart or line items to create tax lines for","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"calculationContext","type":"[TaxCalculationContext](../../medusa/types/medusa.TaxCalculationContext.mdx)","description":"the calculation context to get tax lines by","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="createTaxLines"/>
<TypeList types={[{"name":"cartOrLineItems","type":"[LineItem](../../entities/classes/entities.LineItem.mdx)[] \\| [Cart](../../entities/classes/entities.Cart.mdx)","description":"the cart or line items to create tax lines for","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"calculationContext","type":"[TaxCalculationContext](../../medusa/types/medusa.TaxCalculationContext.mdx)","description":"the calculation context to get tax lines by","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="createTaxLines"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;([LineItemTaxLine](../../entities/classes/entities.LineItemTaxLine.mdx) \\| [ShippingMethodTaxLine](../../entities/classes/entities.ShippingMethodTaxLine.mdx))[]&#62;","optional":false,"defaultValue":"","description":"the newly created tax lines","expandable":false,"children":[]}]} sectionTitle="createTaxLines"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;([LineItemTaxLine](../../entities/classes/entities.LineItemTaxLine.mdx) \\| [ShippingMethodTaxLine](../../entities/classes/entities.ShippingMethodTaxLine.mdx))[]&#62;","optional":false,"defaultValue":"","description":"the newly created tax lines","expandable":false,"children":[]}]} sectionTitle="createTaxLines"/>
### createShippingTaxLines
@@ -129,11 +129,11 @@ for return shipping methods.
#### Parameters
<ParameterTypes parameters={[{"name":"shippingMethod","type":"[ShippingMethod](../../entities/classes/entities.ShippingMethod.mdx)","description":"the shipping method to create tax lines for","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"calculationContext","type":"[TaxCalculationContext](../../medusa/types/medusa.TaxCalculationContext.mdx)","description":"the calculation context to get tax lines by","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="createShippingTaxLines"/>
<TypeList types={[{"name":"shippingMethod","type":"[ShippingMethod](../../entities/classes/entities.ShippingMethod.mdx)","description":"the shipping method to create tax lines for","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"calculationContext","type":"[TaxCalculationContext](../../medusa/types/medusa.TaxCalculationContext.mdx)","description":"the calculation context to get tax lines by","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="createShippingTaxLines"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;([LineItemTaxLine](../../entities/classes/entities.LineItemTaxLine.mdx) \\| [ShippingMethodTaxLine](../../entities/classes/entities.ShippingMethodTaxLine.mdx))[]&#62;","optional":false,"defaultValue":"","description":"the newly created tax lines","expandable":false,"children":[]}]} sectionTitle="createShippingTaxLines"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;([LineItemTaxLine](../../entities/classes/entities.LineItemTaxLine.mdx) \\| [ShippingMethodTaxLine](../../entities/classes/entities.ShippingMethodTaxLine.mdx))[]&#62;","optional":false,"defaultValue":"","description":"the newly created tax lines","expandable":false,"children":[]}]} sectionTitle="createShippingTaxLines"/>
### getShippingTaxLines
@@ -143,11 +143,11 @@ persist the tax lines to the DB layer.
#### Parameters
<ParameterTypes parameters={[{"name":"shippingMethod","type":"[ShippingMethod](../../entities/classes/entities.ShippingMethod.mdx)","description":"the shipping method to get tax lines for","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"calculationContext","type":"[TaxCalculationContext](../../medusa/types/medusa.TaxCalculationContext.mdx)","description":"the calculation context to get tax lines by","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="getShippingTaxLines"/>
<TypeList types={[{"name":"shippingMethod","type":"[ShippingMethod](../../entities/classes/entities.ShippingMethod.mdx)","description":"the shipping method to get tax lines for","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"calculationContext","type":"[TaxCalculationContext](../../medusa/types/medusa.TaxCalculationContext.mdx)","description":"the calculation context to get tax lines by","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="getShippingTaxLines"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[ShippingMethodTaxLine](../../entities/classes/entities.ShippingMethodTaxLine.mdx)[]&#62;","optional":false,"defaultValue":"","description":"the computed tax lines","expandable":false,"children":[]}]} sectionTitle="getShippingTaxLines"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[ShippingMethodTaxLine](../../entities/classes/entities.ShippingMethodTaxLine.mdx)[]&#62;","optional":false,"defaultValue":"","description":"the computed tax lines","expandable":false,"children":[]}]} sectionTitle="getShippingTaxLines"/>
### getTaxLines
@@ -159,11 +159,11 @@ wish to persist the tax lines to the DB layer.
#### Parameters
<ParameterTypes parameters={[{"name":"lineItems","type":"[LineItem](../../entities/classes/entities.LineItem.mdx)[]","description":"the cart or order to get tax lines for","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"calculationContext","type":"[TaxCalculationContext](../../medusa/types/medusa.TaxCalculationContext.mdx)","description":"the calculation context to get tax lines by","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="getTaxLines"/>
<TypeList types={[{"name":"lineItems","type":"[LineItem](../../entities/classes/entities.LineItem.mdx)[]","description":"the cart or order to get tax lines for","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"calculationContext","type":"[TaxCalculationContext](../../medusa/types/medusa.TaxCalculationContext.mdx)","description":"the calculation context to get tax lines by","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="getTaxLines"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;([LineItemTaxLine](../../entities/classes/entities.LineItemTaxLine.mdx) \\| [ShippingMethodTaxLine](../../entities/classes/entities.ShippingMethodTaxLine.mdx))[]&#62;","optional":false,"defaultValue":"","description":"the computed tax lines","expandable":false,"children":[]}]} sectionTitle="getTaxLines"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;([LineItemTaxLine](../../entities/classes/entities.LineItemTaxLine.mdx) \\| [ShippingMethodTaxLine](../../entities/classes/entities.ShippingMethodTaxLine.mdx))[]&#62;","optional":false,"defaultValue":"","description":"the computed tax lines","expandable":false,"children":[]}]} sectionTitle="getTaxLines"/>
### getTaxLinesMap
@@ -171,11 +171,11 @@ Return a map of tax lines for line items and shipping methods
#### Parameters
<ParameterTypes parameters={[{"name":"items","type":"[LineItem](../../entities/classes/entities.LineItem.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"calculationContext","type":"[TaxCalculationContext](../../medusa/types/medusa.TaxCalculationContext.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="getTaxLinesMap"/>
<TypeList types={[{"name":"items","type":"[LineItem](../../entities/classes/entities.LineItem.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"calculationContext","type":"[TaxCalculationContext](../../medusa/types/medusa.TaxCalculationContext.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="getTaxLinesMap"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;TaxLinesMaps&#62;","optional":false,"defaultValue":"","description":"Return a map of tax lines for line items and shipping methods","expandable":false,"children":[]}]} sectionTitle="getTaxLinesMap"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;TaxLinesMaps&#62;","optional":false,"defaultValue":"","description":"Return a map of tax lines for line items and shipping methods","expandable":false,"children":[]}]} sectionTitle="getTaxLinesMap"/>
### getRegionRatesForShipping
@@ -184,11 +184,11 @@ between calls.
#### Parameters
<ParameterTypes parameters={[{"name":"optionId","type":"`string`","description":"the option id of the shipping method.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"regionDetails","type":"`RegionDetails`","description":"the region to get configured rates for.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="getRegionRatesForShipping"/>
<TypeList types={[{"name":"optionId","type":"`string`","description":"the option id of the shipping method.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"regionDetails","type":"`RegionDetails`","description":"the region to get configured rates for.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="getRegionRatesForShipping"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;[TaxServiceRate](../../medusa/types/medusa.TaxServiceRate.mdx)[]&#62;","optional":false,"defaultValue":"","description":"the tax rates configured for the shipping option.","expandable":false,"children":[]}]} sectionTitle="getRegionRatesForShipping"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[TaxServiceRate](../../medusa/types/medusa.TaxServiceRate.mdx)[]&#62;","optional":false,"defaultValue":"","description":"the tax rates configured for the shipping option.","expandable":false,"children":[]}]} sectionTitle="getRegionRatesForShipping"/>
### getRegionRatesForProduct
@@ -197,11 +197,11 @@ calls.
#### Parameters
<ParameterTypes parameters={[{"name":"productIds","type":"`string` \\| `string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region","type":"`RegionDetails`","description":"the region to get configured rates for.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="getRegionRatesForProduct"/>
<TypeList types={[{"name":"productIds","type":"`string` \\| `string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region","type":"`RegionDetails`","description":"the region to get configured rates for.","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="getRegionRatesForProduct"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;Map&#60;string, [TaxServiceRate](../../medusa/types/medusa.TaxServiceRate.mdx)[]&#62;&#62;","optional":false,"defaultValue":"","description":"the tax rates configured for the shipping option. A map by product id","expandable":false,"children":[]}]} sectionTitle="getRegionRatesForProduct"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;Map&#60;string, [TaxServiceRate](../../medusa/types/medusa.TaxServiceRate.mdx)[]&#62;&#62;","optional":false,"defaultValue":"","description":"the tax rates configured for the shipping option. A map by product id","expandable":false,"children":[]}]} sectionTitle="getRegionRatesForProduct"/>
### getCacheKey
@@ -209,18 +209,18 @@ The cache key to get cache hits by.
#### Parameters
<ParameterTypes parameters={[{"name":"id","type":"`string`","description":"the entity id to cache","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"regionId","type":"`string`","description":"the region id to cache","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="getCacheKey"/>
<TypeList types={[{"name":"id","type":"`string`","description":"the entity id to cache","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"regionId","type":"`string`","description":"the region id to cache","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="getCacheKey"/>
#### Returns
<ParameterTypes parameters={[{"name":"string","type":"`string`","optional":false,"defaultValue":"","description":"the cache key to use for the id set","expandable":false,"children":[]}]} sectionTitle="getCacheKey"/>
<TypeList types={[{"name":"string","type":"`string`","optional":false,"defaultValue":"","description":"the cache key to use for the id set","expandable":false,"children":[]}]} sectionTitle="getCacheKey"/>
### registerInstalledProviders
#### Parameters
<ParameterTypes parameters={[{"name":"providers","type":"`string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="registerInstalledProviders"/>
<TypeList types={[{"name":"providers","type":"`string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]} sectionTitle="registerInstalledProviders"/>
#### Returns
<ParameterTypes parameters={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="registerInstalledProviders"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;void&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]} sectionTitle="registerInstalledProviders"/>